#include <Wt/WSlider>

Public Types | |
| enum | TickPosition { NoTicks = 0x0, TicksBothSides = 0x3, TicksAbove = 0x1, TicksBelow = 0x2, TicksLeft = TicksAbove, TicksRight = TicksBelow } |
| Enumeration that specifies the location of ticks. More... | |
Public Member Functions | |
| WSlider (WContainerWidget *parent=0) | |
| Create a default horizontal slider. | |
| WSlider (Orientation orientation, WContainerWidget *parent=0) | |
| Create a default slider of the given orientation. | |
| ~WSlider () | |
| Destructor. | |
| void | setOrientation (Wt::Orientation orientation) |
| Change the slider orientation. | |
| Orientation | orientation () const |
| Returns the slider orientation. | |
| void | setTickInterval (int tickInterval) |
| Change the tick interval. | |
| int | tickInterval () const |
| Returns the tick interval. | |
| void | setTickPosition (TickPosition tickPosition) |
| Set the tick position. | |
| TickPosition | tickPosition () const |
| Return the tick position. | |
| void | setValue (int value) |
| Change the slider value. | |
| int | value () const |
| Returns the current slider value. | |
| void | setMaximum (int maximum) |
| Set the maximum value. | |
| int | maximum () const |
| Returns the maximum value. | |
| void | setMinimum (int minimum) |
| Set the minimum value. | |
| int | minimum () const |
| Returns the minimum value. | |
| void | setRange (int minimum, int maximum) |
| Set the value range. | |
| virtual void | resize (const WLength &width, const WLength &height) |
| Resize the widget. | |
Public Attributes | |
| Signal< int > | valueChanged |
| Signal emitted when the user has changed the value of the slider. | |
A slider allows the user to specify an integer value within a particular range using a visual slider.
The slider must be sized explicitly using WWidget::resize(const WLength&, const WLength&). The default size is 150 x 50 pixels for a horizontal slider, and 50 x 150 pixels for a vertical sliders.
Horizontal slider with ticks on both sides.
Enumeration that specifies the location of ticks.
| Wt::WSlider::WSlider | ( | WContainerWidget * | parent = 0 |
) |
Create a default horizontal slider.
The slider shows no ticks, has a range from 0 to 99, and has tickInterval of 0 (defaulting to three ticks over the whole range).
The initial value is 0.
| Wt::WSlider::WSlider | ( | Orientation | orientation, | |
| WContainerWidget * | parent = 0 | |||
| ) |
Create a default slider of the given orientation.
The slider shows no ticks, has a range from 0 to 99, and has tickInterval of 0 (defaulting to three ticks over the whole range).
The initial value is 0.
| void Wt::WSlider::setOrientation | ( | Wt::Orientation | orientation | ) |
| Orientation Wt::WSlider::orientation | ( | ) | const [inline] |
| void Wt::WSlider::setTickInterval | ( | int | tickInterval | ) |
Change the tick interval.
The tick interval specifies the interval for placing ticks along the slider. The interval is specified in value units (not pixel units). A value of 0 specifies an automatic tick interval, which defaults to 3 ticks spanning the whole range.
| int Wt::WSlider::tickInterval | ( | ) | const [inline] |
| void Wt::WSlider::setTickPosition | ( | TickPosition | tickPosition | ) |
Set the tick position.
The tick position indicates if and where ticks are placed around the slider groove.
| TickPosition Wt::WSlider::tickPosition | ( | ) | const [inline] |
| void Wt::WSlider::setValue | ( | int | value | ) |
| int Wt::WSlider::value | ( | ) | const [inline] |
| void Wt::WSlider::setMaximum | ( | int | maximum | ) |
Set the maximum value.
The maximum value defines the upper limit of the valid range. The lower limit and current value are automatically adjusted to remain valid.
| int Wt::WSlider::maximum | ( | ) | const [inline] |
| void Wt::WSlider::setMinimum | ( | int | minimum | ) |
Set the minimum value.
The minimum value defines the lower limit of the valid range. The upper limit and current value are automatically adjusted to remain valid.
| int Wt::WSlider::minimum | ( | ) | const [inline] |
| void Wt::WSlider::setRange | ( | int | minimum, | |
| int | maximum | |||
| ) |
Resize the widget.
Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().
This applies to CSS-based layout.
Reimplemented from Wt::WCompositeWidget.
Signal emitted when the user has changed the value of the slider.
The new value is passed as the argument.
1.5.6