Rocket::Controls::WidgetSliderInput Class Reference

#include <WidgetSliderInput.h>

Inheritance diagram for Rocket::Controls::WidgetSliderInput:
Collaboration diagram for Rocket::Controls::WidgetSliderInput:

Public Member Functions

 WidgetSliderInput (ElementFormControl *parent)
void SetValue (float value)
float GetValue ()
void SetMinValue (float min_value)
void SetMaxValue (float max_value)
void SetStep (float step)
void FormatElements ()
 Formats the slider's elements.

Protected Member Functions

virtual float OnBarChange (float bar_position)
virtual float OnLineIncrement ()
virtual float OnLineDecrement ()
virtual float OnPageIncrement (float click_position)
virtual float OnPageDecrement (float click_position)

Detailed Description

A specialisation of the slider widget for input sliders.

Author:
Peter Curry

Member Function Documentation

void Rocket::Controls::WidgetSliderInput::SetValue ( float  value  ) 

Sets a new value on the slider.

Parameters:
[in] value The new value for the slider. This will be clamped between the min and max values, and set to the nearest increment.

float Rocket::Controls::WidgetSliderInput::GetValue (  ) 

Returns the current value of the slider.

Returns:
The current value of the slider.

void Rocket::Controls::WidgetSliderInput::SetMinValue ( float  min_value  ) 

Sets the minimum value of the slider.

Parameters:
[in] min_value The new minimum value of the slider.

void Rocket::Controls::WidgetSliderInput::SetMaxValue ( float  max_value  ) 

Sets the maximum value of the slider.

Parameters:
[in] max_value The new minimum value of the slider.

void Rocket::Controls::WidgetSliderInput::SetStep ( float  step  ) 

Sets the slider's value increment.

Parameters:
[in] step The new increment for the slider's value.

float Rocket::Controls::WidgetSliderInput::OnBarChange ( float  bar_position  )  [protected, virtual]

Called when the slider's bar position is set or dragged.

Parameters:
bar_position[in] The new position of the bar (0 representing the start of the track, 1 representing the end).
Returns:
The new position of the bar.

Implements Rocket::Controls::WidgetSlider.

float Rocket::Controls::WidgetSliderInput::OnLineIncrement (  )  [protected, virtual]

Called when the slider is incremented by one 'line', either by the down / right key or a mouse-click on the increment arrow.

Returns:
The new position of the bar.

Implements Rocket::Controls::WidgetSlider.

float Rocket::Controls::WidgetSliderInput::OnLineDecrement (  )  [protected, virtual]

Called when the slider is decremented by one 'line', either by the up / left key or a mouse-click on the decrement arrow.

Returns:
The new position of the bar.

Implements Rocket::Controls::WidgetSlider.

float Rocket::Controls::WidgetSliderInput::OnPageIncrement ( float  click_position  )  [protected, virtual]

Called when the slider is incremented by one 'page', either by the page-up key or a mouse-click on the track below / right of the bar.

Returns:
The new position of the bar.

Implements Rocket::Controls::WidgetSlider.

float Rocket::Controls::WidgetSliderInput::OnPageDecrement ( float  click_position  )  [protected, virtual]

Called when the slider is incremented by one 'page', either by the page-down key or a mouse-click on the track above / left of the bar.

Returns:
The new position of the bar.

Implements Rocket::Controls::WidgetSlider.


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