The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
integer_selector.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 - 2016 by Mark de Wever <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #ifndef GUI_WIDGETS_INTEGER_SELECTOR_HPP_INCLUDED
16 #define GUI_WIDGETS_INTEGER_SELECTOR_HPP_INCLUDED
17 
18 namespace gui2
19 {
20 
21 /**
22  * Small abstract helper class.
23  *
24  * Parts of the engine inherit this class so we can have generic
25  * widgets to select an integer value.
26  */
28 {
29 public:
31  {
32  }
33 
34  /** Sets the selected value. */
35  virtual void set_value(const int value) = 0;
36 
37  /** Gets the selected value. */
38  virtual int get_value() const = 0;
39 
40  /** Sets the minimum value. */
41  virtual void set_minimum_value(const int value) = 0;
42 
43  /** Gets the minimum value. */
44  virtual int get_minimum_value() const = 0;
45 
46  /** Sets the maximum value. */
47  virtual void set_maximum_value(const int value) = 0;
48 
49  /** Gets the maximum value. */
50  virtual int get_maximum_value() const = 0;
51 };
52 
53 } // namespace gui2
54 
55 #endif
virtual int get_maximum_value() const =0
Gets the maximum value.
virtual int get_minimum_value() const =0
Gets the minimum value.
Small abstract helper class.
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
GLsizei const GLfloat * value
Definition: glew.h:1817
virtual void set_value(const int value)=0
Sets the selected value.
virtual void set_minimum_value(const int value)=0
Sets the minimum value.
virtual int get_value() const =0
Gets the selected value.
virtual void set_maximum_value(const int value)=0
Sets the maximum value.