00001 /* $Id: integer_selector.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */ 00002 /* 00003 Copyright (C) 2008 - 2012 by Mark de Wever <koraq@xs4all.nl> 00004 Part of the Battle for Wesnoth Project http://www.wesnoth.org/ 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY. 00012 00013 See the COPYING file for more details. 00014 */ 00015 00016 #ifndef GUI_WIDGETS_INTEGER_SELECTOR_HPP_INCLUDED 00017 #define GUI_WIDGETS_INTEGER_SELECTOR_HPP_INCLUDED 00018 00019 namespace gui2 { 00020 00021 /** 00022 * Small abstract helper class. 00023 * 00024 * Parts of the engine inherit this class so we can have generic 00025 * widgets to select an integer value. 00026 */ 00027 class tinteger_selector_ 00028 { 00029 public: 00030 virtual ~tinteger_selector_() {} 00031 00032 /** Sets the selected value. */ 00033 virtual void set_value(const int value) = 0; 00034 00035 /** Gets the selected value. */ 00036 virtual int get_value() const = 0; 00037 00038 /** Sets the minimum value. */ 00039 virtual void set_minimum_value(const int value) = 0; 00040 00041 /** Gets the minimum value. */ 00042 virtual int get_minimum_value() const = 0; 00043 00044 /** Sets the maximum value. */ 00045 virtual void set_maximum_value(const int value) = 0; 00046 00047 /** Gets the maximum value. */ 00048 virtual int get_maximum_value() const = 0; 00049 }; 00050 00051 } // namespace gui2 00052 00053 #endif
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:02:59 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |