libyui  3.3.2
YSlider.h
1 /*
2  Copyright (C) 2000-2012 Novell, Inc
3  This library is free software; you can redistribute it and/or modify
4  it under the terms of the GNU Lesser General Public License as
5  published by the Free Software Foundation; either version 2.1 of the
6  License, or (at your option) version 3.0 of the License. This library
7  is distributed in the hope that it will be useful, but WITHOUT ANY
8  WARRANTY; without even the implied warranty of MERCHANTABILITY or
9  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10  License for more details. You should have received a copy of the GNU
11  Lesser General Public License along with this library; if not, write
12  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13  Floor, Boston, MA 02110-1301 USA
14 */
15 
16 
17 /*-/
18 
19  File: YSlider.h
20 
21  Author: Stefan Hundhammer <sh@suse.de>
22 
23 /-*/
24 
25 #ifndef YSlider_h
26 #define YSlider_h
27 
28 #include "YIntField.h"
29 
30 class YSliderPrivate;
31 
32 
33 /**
34  * Slider: Input widget for an integer value between a minimum and a maximum
35  * value. Very similar to IntField in semantics, but with a graphical slider
36  * that can be dragged to the desired value. It also contains an IntField to
37  * allow entering the value directly.
38  *
39  * Don't confuse this widget with ProgressBar: ProgressBar is output-only.
40  *
41  *
42  * This is an optional widget, i.e. not all UIs support it.
43  **/
44 class YSlider : public YIntField
45 {
46 protected:
47  /**
48  * Constructor.
49  *
50  * Create a Slider with 'label' as the caption, and the specified minimum
51  * and maximum values.
52  *
53  * Note that YWidgetFactory::createSlider() also has an 'initialValue'
54  * parameter that is not used here (because the current value is not stored
55  * in this base class, but in the derived class).
56  **/
58  const std::string & label,
59  int minValue,
60  int maxValue );
61 
62 public:
63  /**
64  * Destructor.
65  **/
66  virtual ~YSlider();
67 
68  /**
69  * Returns a descriptive name of this widget class for logging,
70  * debugging etc.
71  **/
72  virtual const char * widgetClass() const { return "YSlider"; }
73 
74 private:
75 
77 };
78 
79 
80 #endif // YSlider_h
virtual const char * widgetClass() const
Returns a descriptive name of this widget class for logging, debugging etc.
Definition: YSlider.h:72
int maxValue() const
Return the maximum value.
Definition: YIntField.cc:104
YWidget * parent() const
Return this widget&#39;s parent or 0 if it doesn&#39;t have a parent.
Definition: YWidget.cc:269
int minValue() const
Return the minimum value.
Definition: YIntField.cc:84
std::string label() const
Get the label (the caption above the input field).
Definition: YIntField.cc:124
IntField: Input field for integer values.
Definition: YIntField.h:38
Slider: Input widget for an integer value between a minimum and a maximum value.
Definition: YSlider.h:44
virtual ~YSlider()
Destructor.
Definition: YSlider.cc:57
Abstract base class of all UI widgets.
Definition: YWidget.h:54
YSlider(YWidget *parent, const std::string &label, int minValue, int maxValue)
Constructor.
Definition: YSlider.cc:43