SimpleCxxLib
packageclass GSlider : public GInteractor
ActionEvent
if the
slider has a nonempty action command.
The display image of a slider is machine-dependent, but the declaration
GSlider *slider = new GSlider();typically produces a slider that looks something like this:
Constructor | |
GSlider(min, max, value) | Creates a horizontal GSlider . |
Methods | |
Returns the current value of the slider. | |
Sets the current value of the slider. |
GSlider(); GSlider(int min, int max, int value);
GSlider
. The second form allows
the client to specify the minimum value, maximum value, and current
value of the slider. The first form is equivalent to calling
GSlider(0, 100, 50)
. Assigning an action command
to the slider causes the slider to generate an action event whenever
the slider value changes.
Usage:
GSlider *slider = new GSlider(); GSlider *slider = new GSlider(min, max, value);
void setValue(int value);
Usage:
slider->setValue(value);
int getValue();
Usage:
int value = slider->getValue();