MGUI::FORM_SLIDER Class Reference

Form containing optional label, slider and numeric edit controls. More...

#include <mgui/slider.h>

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

List of all members.

Public Member Functions

 FORM_SLIDER ()
virtual ~FORM_SLIDER ()
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, TEXTID label, double dftvalue, double min, double max, int sliderlength=100, int editplaces=0, int editwidth=0, CTRL_SLIDER::STYLE sliderstyle=CTRL_SLIDER::STYLE_Horizontal, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize)
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const MISTRING &label, double dftvalue, double min, double max, int sliderlength=100, int editplaces=0, int editwidth=0, CTRL_SLIDER::STYLE sliderstyle=CTRL_SLIDER::STYLE_Horizontal, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize)
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, double dftvalue, double min, double max, int sliderlength=100, int editplaces=0, int editwidth=0, CTRL_SLIDER::STYLE sliderstyle=CTRL_SLIDER::STYLE_Horizontal, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize)
CTRL_EDIT_NUMBERGetEditCtrl ()
CTRL_LABELGetLabel ()
CTRL_SLIDERGetSlider ()
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 SetLabel (const MISTRING &label)
void SetPlaces (int places)
void SetRange (double min, double max)
bool SetStep (double step, bool notify=true)
void SetValue (double value, bool notify=true)

Detailed Description

Form containing optional label, slider and numeric edit controls.


Constructor & Destructor Documentation

MGUI::FORM_SLIDER::FORM_SLIDER (  ) 

Constructor.

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

Destructor.


Member Function Documentation

void MGUI::FORM_SLIDER::Create ( MGUI::LAYOUT_PANE_BASE ParentPane,
TEXTID  label,
double  dftvalue,
double  min,
double  max,
int  sliderlength = 100,
int  editplaces = 0,
int  editwidth = 0,
CTRL_SLIDER::STYLE  sliderstyle = CTRL_SLIDER::STYLE_Horizontal,
MGUI::LAYOUT_SIZEALIGN  sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize 
)

Create slider form with a label.

Parameters:
ParentPane Parent pane
label Label text id
dftvalue Default value
min Minimum value
max Maximum value
sliderlength Length of the slider in pixels
editplaces Number of Decimal places to show in "edit" control
editwidth Width in "characters" of "edit" control, 0 to base on range and places
sliderstyle Slider style
void MGUI::FORM_SLIDER::Create ( MGUI::LAYOUT_PANE_BASE ParentPane,
const MISTRING label,
double  dftvalue,
double  min,
double  max,
int  sliderlength = 100,
int  editplaces = 0,
int  editwidth = 0,
CTRL_SLIDER::STYLE  sliderstyle = CTRL_SLIDER::STYLE_Horizontal,
MGUI::LAYOUT_SIZEALIGN  sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize 
)

Create slider form with a label.

Parameters:
ParentPane Parent pane
label Label string
dftvalue Default value
min Minimum value
max Maximum value
sliderlength Length of the slider in pixels
editplaces Number of Decimal places to show in "edit" control
editwidth Width in "characters" of "edit" control, 0 to base on range and places
sliderstyle Slider style
void MGUI::FORM_SLIDER::Create ( MGUI::LAYOUT_PANE_BASE ParentPane,
double  dftvalue,
double  min,
double  max,
int  sliderlength = 100,
int  editplaces = 0,
int  editwidth = 0,
CTRL_SLIDER::STYLE  sliderstyle = CTRL_SLIDER::STYLE_Horizontal,
MGUI::LAYOUT_SIZEALIGN  sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize 
)

Create slider form with no label.

Parameters:
ParentPane Parent pane
dftvalue Default value
min Minimum value
max Maximum value
sliderlength Length of the slider in pixels
editplaces Number of Decimal places to show in "edit" control
editwidth Width in "characters" of "edit" control, 0 to base on range and places
sliderstyle Slider style
CTRL_EDIT_NUMBER& MGUI::FORM_SLIDER::GetEditCtrl (  )  [inline]

Retrieve string "edit" control for form.

CTRL_LABEL& MGUI::FORM_SLIDER::GetLabel (  )  [inline]

Retrieve label control for form.

Usually the label control is only retrieved for alignment purposes.

CTRL_SLIDER& MGUI::FORM_SLIDER::GetSlider (  )  [inline]

Retrieve label control for form.

Usually the slider control is only retrieved for alignment purposes.

double MGUI::FORM_SLIDER::GetValue (  )  const [inline]

Get current slider value, note it only has accuracy equal to the number of decimal places specified.

void MGUI::FORM_SLIDER::SetColorBar ( const COLOR barcolor  )  [inline]

Sets the color of the bar tool on the slider. Only call after create.

void MGUI::FORM_SLIDER::SetColorTrough ( const COLOR troughcolor  )  [inline]

Sets the color of the trough on the slider. Only call after create.

void MGUI::FORM_SLIDER::SetDelegateOnUserSliding ( DELEGATE_VOID_NOPARMS  delegate  )  [inline]

Called while user drags slider each time is moved, useful for dynamically updating.

void MGUI::FORM_SLIDER::SetDelegateOnValueChanged ( DELEGATE_VOID_NOPARMS  delegate  )  [inline]

Set delegate called after value gets changed either via dragging and letting go of slider or via typing into control and enter/exiting.

void MGUI::FORM_SLIDER::SetLabel ( const MISTRING label  ) 

Set Label.

void MGUI::FORM_SLIDER::SetPlaces ( int  places  )  [inline]

Set number of decimal places to display.

void MGUI::FORM_SLIDER::SetRange ( double  min,
double  max 
)

Set new range for the slider.

Parameters:
min New minimum
max New maximum
bool MGUI::FORM_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::FORM_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:36:07 2012 for TNTsdk 2012 by  doxygen 1.6.1