00001 /* 00002 File : slider_t.h 00003 Date : 19-Sep-02 00004 Description : Class to represent a slider toolbox gadget template. 00005 00006 Copyright © 1995-2002 Alexander Thoukydides 00007 00008 This program is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU General Public License 00010 as published by the Free Software Foundation; either version 2 00011 of the License, or (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 00021 */ 00022 00023 // Only include header file once 00024 #ifndef slider_t_h 00025 #define slider_t_h 00026 00027 // Include alexlib header files 00028 #ifndef gadget_t_h 00029 #include "gadget_t.h" 00030 #endif 00031 #ifndef slider_b_h 00032 #include "slider_b.h" 00033 #endif 00034 00035 // A class to represent a slider gadget template 00036 class slider_t : public virtual gadget_b, 00037 public gadget_t, 00038 public slider_b 00039 { 00040 public: 00041 00042 /* 00043 Parameters : void 00044 Returns : - 00045 Description : Constructor function. 00046 */ 00047 slider_t(); 00048 00049 /* 00050 Parameters : value - The number to set. 00051 Returns : slider_t - This object. 00052 Description : Set the value of this gadget. To reduce flicker the value 00053 is not updated unless it has changed. 00054 */ 00055 slider_t &operator=(int value); 00056 00057 protected: 00058 00059 /* 00060 Parameters : value - The number to set. 00061 Returns : void 00062 Description : Gadget specific function to set the value. 00063 */ 00064 virtual void _set_value(int value); 00065 00066 /* 00067 Parameters : void 00068 Returns : int - The value 00069 Description : Gadget specific function to get the value. 00070 */ 00071 virtual int _get_value() const; 00072 00073 /* 00074 Parameters : lower - The lower bound. 00075 Returns : void 00076 Description : Gadget specific function to set the lower bound. 00077 */ 00078 virtual void _set_lower_bound(int lower); 00079 00080 /* 00081 Parameters : void 00082 Returns : int - The lower bound. 00083 Description : Gadget specific function to get the lower bound. 00084 */ 00085 virtual int _get_lower_bound() const; 00086 00087 /* 00088 Parameters : upper - The upper bound. 00089 Returns : void 00090 Description : Gadget specific function to set the upper bound. 00091 */ 00092 virtual void _set_upper_bound(int upper); 00093 00094 /* 00095 Parameters : void 00096 Returns : int - The upper bound. 00097 Description : Gadget specific function to get the upper bound. 00098 */ 00099 virtual int _get_upper_bound() const; 00100 00101 /* 00102 Parameters : step - The step size. 00103 Returns : void 00104 Description : Gadget specific function to set the step size. 00105 */ 00106 virtual void _set_step_size(int step); 00107 00108 /* 00109 Parameters : void 00110 Returns : int - The step size. 00111 Description : Gadget specific function to get the step size. 00112 */ 00113 virtual int _get_step_size() const; 00114 }; 00115 00116 #endif
1.3.3