Slider bar control. More...
#include <mgui/slider.h>

Public Types | |
| enum | STYLE { STYLE_Horizontal = 0x0001, STYLE_Vertical = 0x0002, STYLE_ReverseDirection = 0x0004, STYLE_Logarithmic = 0x0008 } |
Public Member Functions | |
| CTRL_SLIDER () | |
| virtual | ~CTRL_SLIDER () |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, double dftvalue, double min, double max, int length=100, STYLE style=STYLE_Horizontal, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize) |
| double | GetStep () const |
| double | GetValue () const |
| void | SetColorBar (const COLOR &barcolor) |
| void | SetColorTrough (const COLOR &troughcolor) |
| void | SetDelegateOnUserSliding (DELEGATE_VOID_NOPARMS delegate) |
| void | SetDelegateOnValueChanged (DELEGATE_VOID_NOPARMS delegate) |
| void | SetRange (double min, double max) |
| bool | SetStep (double step, bool notify=true) |
| void | SetValue (double value, bool notify=true) |
Slider bar control.
A slider control provides a way to graphically adjust a numeric value. The actual accuracy of the associated value is limited to the displayed length of the slider "trough".
| MGUI::CTRL_SLIDER::CTRL_SLIDER | ( | ) |
Constructor.
| virtual MGUI::CTRL_SLIDER::~CTRL_SLIDER | ( | ) | [virtual] |
Destructor.
| void MGUI::CTRL_SLIDER::Create | ( | MGUI::LAYOUT_PANE_BASE & | ParentPane, | |
| double | dftvalue, | |||
| double | min, | |||
| double | max, | |||
| int | length = 100, |
|||
| STYLE | style = STYLE_Horizontal, |
|||
| MGUI::LAYOUT_SIZEALIGN | sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize | |||
| ) |
Create slider form.
| ParentPane | Parent pane | |
| dftvalue | Default value | |
| min | Minimum value for the slider bar | |
| max | Maximum value for the slider bar. If stepsize is set needs to be min plus integral multiple of stepsize | |
| length | Length of the slider in pixels | |
| style | Slider style |
| double MGUI::CTRL_SLIDER::GetStep | ( | ) | const [inline] |
Get current step setting.
| double MGUI::CTRL_SLIDER::GetValue | ( | ) | const [inline] |
Get current slider value.
| void MGUI::CTRL_SLIDER::SetColorBar | ( | const COLOR & | barcolor | ) |
Set color for slider bar.
| void MGUI::CTRL_SLIDER::SetColorTrough | ( | const COLOR & | troughcolor | ) |
Set color for slider trough.
| void MGUI::CTRL_SLIDER::SetDelegateOnUserSliding | ( | DELEGATE_VOID_NOPARMS | delegate | ) | [inline] |
Called while user drags slider each time is moved, useful for dynamically updating something else.
| void MGUI::CTRL_SLIDER::SetDelegateOnValueChanged | ( | DELEGATE_VOID_NOPARMS | delegate | ) | [inline] |
Set delegate called after value gets changed via dragging and letting go of slider.
| void MGUI::CTRL_SLIDER::SetRange | ( | double | min, | |
| double | max | |||
| ) |
Set new range for the slider.
| min | New minimum | |
| max | New maximum |
| bool MGUI::CTRL_SLIDER::SetStep | ( | double | step, | |
| bool | notify = true | |||
| ) |
Set step for rounding.
If non-zero, values will be rounded to integral multiple of 'step' from minimum.
| step | Step for rounding | |
| notify | If true call OnValueChanged delegate if actual value changed |
| void MGUI::CTRL_SLIDER::SetValue | ( | double | value, | |
| bool | notify = true | |||
| ) |
Set value for the slider.
| value | Value to set | |
| notify | If true call OnValueChanged delegate if actual value changed |
1.6.1