A slider is, as its name suggests, an item with a handle which can be pulled back and forth to change a value. It is currently horizontal only. In MS Windows, a scrollbar is used to simulate the slider.
wxSlider::wxSlider
wxSlider::~wxSlider
wxSlider::Create
wxSlider::GetMax
wxSlider::GetMin
wxSlider::GetValue
wxSlider::SetRange
wxSlider::SetValue
void wxSlider(wxPanel *parent, wxFunction func, char *label,
int value, int min_value, int max_value, int width,
int x = -1, int y = -1, long style = wxHORIZONTAL, char *name = "slider")
Constructor, creating and showing a horizontal slider.
func may be NULL; otherwise it is used as the callback for the slider. Note that the cast (wxFunction) must be used when passing your callback function name, or the compiler may complain that the function does not match the constructor declaration.
If label is non-NULL, it will be used to label the slider.
The parameters x and y are used to specify an absolute position, or a position after the previous panel item if omitted or default.
The width is in pixels, and the scroll increment will be adjusted to a suitable value given the minimum and maximum integer values.
The style parameter may be wxHORIZONTAL to denote a horizontal slider, or wxVERTICAL for a vertical slider.
The name parameter is used to associate a name with the item, allowing the application user to set Motif resource values for individual sliders.
void ~wxSlider(void)
Destructor, destroying the slider.
void Create(wxPanel *parent, wxFunction func, char *label,
int value, int min_value, int max_value, int width,
int x = -1, int y = -1, long style = 0, char *name = "slider")
Used for two-step slider construction. See wxSlider::wxSlider for further details.
int GetMax(void)
Gets the maximum slider value.
int GetMin(void)
Gets the minimum slider value.
int GetValue(void)
Gets the current slider value.
void SetRange(int minValue, int maxValue)
Sets the minimum and maximum slider values.
void SetValue(int value)
Sets the value (and displayed position) of the slider).