MGUI::CTRL_SLIDER Class Reference

Slider bar control. More...

#include <mgui/slider.h>

Inheritance diagram for MGUI::CTRL_SLIDER:
Inheritance graph
[legend]

List of all members.

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)

Detailed Description

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".


Member Enumeration Documentation

Enumerator:
STYLE_Horizontal 

lays down horizontal

STYLE_Vertical 

stands up vertical

STYLE_ReverseDirection 

left or down would be positive

STYLE_Logarithmic 

Logarithmic scale.


Constructor & Destructor Documentation

MGUI::CTRL_SLIDER::CTRL_SLIDER (  ) 

Constructor.

virtual MGUI::CTRL_SLIDER::~CTRL_SLIDER (  )  [virtual]

Destructor.


Member Function Documentation

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.

Parameters:
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.

Parameters:
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.

Returns:
true if results in value change, false if not.
Parameters:
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.

Parameters:
value Value to set
notify If true call OnValueChanged delegate if actual value changed

The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:35:37 2012 for TNTsdk 2012 by  doxygen 1.6.1