Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

slider_c.h

Go to the documentation of this file.
00001 /*
00002     File        : slider_c.h
00003     Date        : 19-Sep-02
00004     Description : Class to represent a slider toolbox gadget.
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_c_h
00025 #define slider_c_h
00026 
00027 // Include alexlib header files
00028 #ifndef gadget_c_h
00029 #include "gadget_c.h"
00030 #endif
00031 #ifndef slider_b_h
00032 #include "slider_b.h"
00033 #endif
00034 
00035 // A class to represent a slider gadget
00036 class slider_c : public virtual gadget_b,
00037                  public gadget_c,
00038                  public slider_b
00039 {
00040 public:
00041 
00042     /*
00043         Parameters  : component - The component ID of this slider.
00044                       object    - The object ID of this slider's parent
00045                                   window.
00046         Returns     : -
00047         Description : Constructor function. This does not create a slider;
00048                       it merely creates an object to represent the slider.
00049     */
00050     slider_c(toolbox_c component = toolbox_NULL_COMPONENT,
00051              toolbox_o object = toolbox_NULL_OBJECT);
00052 
00053     /*
00054         Parameters  : value     - The number to set.
00055         Returns     : slider_c  - This object.
00056         Description : Set the value of this gadget. To reduce flicker the value
00057                       is not updated unless it has changed.
00058     */
00059     slider_c &operator=(int value);
00060 
00061 protected:
00062 
00063     /*
00064         Parameters  : colour    - The slider colour.
00065         Returns     : void
00066         Description : Gadget specific function to set the colour of the slider.
00067     */
00068     virtual void _set_slider_colour(wimp_colour colour);
00069 
00070     /*
00071         Parameters  : void
00072         Returns     : wimp_colour   - The slider colour.
00073         Description : Gadget specific function to get the colour of the slider.
00074     */
00075     virtual wimp_colour _get_slider_colour() const;
00076 
00077     /*
00078         Parameters  : colour    - The well colour.
00079         Returns     : void
00080         Description : Gadget specific function to set the colour of the well.
00081     */
00082     virtual void _set_well_colour(wimp_colour colour);
00083 
00084     /*
00085         Parameters  : void
00086         Returns     : wimp_colour   - The well colour.
00087         Description : Gadget specific function to get the colour of the well.
00088     */
00089     virtual wimp_colour _get_well_colour() const;
00090 
00091     /*
00092         Parameters  : value - The number to set.
00093         Returns     : void
00094         Description : Gadget specific function to set the value.
00095     */
00096     virtual void _set_value(int value);
00097 
00098     /*
00099         Parameters  : void
00100         Returns     : int   - The value
00101         Description : Gadget specific function to get the value.
00102     */
00103     virtual int _get_value() const;
00104 
00105     /*
00106         Parameters  : lower - The lower bound.
00107         Returns     : void
00108         Description : Gadget specific function to set the lower bound.
00109     */
00110     virtual void _set_lower_bound(int lower);
00111 
00112     /*
00113         Parameters  : void
00114         Returns     : int   - The lower bound.
00115         Description : Gadget specific function to get the lower bound.
00116     */
00117     virtual int _get_lower_bound() const;
00118 
00119     /*
00120         Parameters  : upper - The upper bound.
00121         Returns     : void
00122         Description : Gadget specific function to set the upper bound.
00123     */
00124     virtual void _set_upper_bound(int upper);
00125 
00126     /*
00127         Parameters  : void
00128         Returns     : int   - The upper bound.
00129         Description : Gadget specific function to get the upper bound.
00130     */
00131     virtual int _get_upper_bound() const;
00132 
00133     /*
00134         Parameters  : step  - The step size.
00135         Returns     : void
00136         Description : Gadget specific function to set the step size.
00137     */
00138     virtual void _set_step_size(int step);
00139 
00140     /*
00141         Parameters  : void
00142         Returns     : int   - The step size.
00143         Description : Gadget specific function to get the step size.
00144     */
00145     virtual int _get_step_size() const;
00146 };
00147 
00148 /*
00149     Parameters  : component - The component ID of this slider.
00150                   object    - The object ID of this slider's parent
00151                               window.
00152     Returns     : -
00153     Description : Constructor function. This does not create a slider;
00154                   it merely creates an object to represent the slider.
00155 */
00156 inline slider_c::slider_c(toolbox_c component, toolbox_o object)
00157 : gadget_c(component, object) {}
00158 
00159 #endif

Generated on Sun Jan 26 10:18:44 2025 for NBLib by doxygen 1.3.3