Class to define an real slider. More...
#include <Inventor/dialog/PoXtRealSliderData.h>
Public Member Functions | |
PoXtRealSliderData (const char *label=NULL, float min=0, float max=1, float initVal=0, TriggerMode mode=MOUSE_ON_RELEASE_TRIGGER) | |
virtual | ~PoXtRealSliderData () |
void | setValue (float value) |
float | getValue () const |
void | setLimit (float min, float max) |
void | getLimit (float &min, float &max) const |
virtual TypeXtElement | getType () const |
virtual PoXtElementData * | copy () const |
An real slider is a slider where the values are reals. By default the limits of the slider are [0-1] and the initial value is 0.
PoXtRealSliderData::PoXtRealSliderData | ( | const char * | label = NULL , |
|
float | min = 0 , |
|||
float | max = 1 , |
|||
float | initVal = 0 , |
|||
TriggerMode | mode = MOUSE_ON_RELEASE_TRIGGER | |||
) |
Constructor.
virtual PoXtRealSliderData::~PoXtRealSliderData | ( | ) | [virtual] |
Destructor.
virtual PoXtElementData* PoXtRealSliderData::copy | ( | ) | const [virtual] |
Creates and returns a new Xt element which is a copy of this Xt element.
Implements PoXtElementData.
void PoXtRealSliderData::getLimit | ( | float & | min, | |
float & | max | |||
) | const |
Gets the limits of the slider.
virtual TypeXtElement PoXtRealSliderData::getType | ( | ) | const [virtual] |
Returns the type of the Xt element.
Implements PoXtSliderData.
float PoXtRealSliderData::getValue | ( | ) | const |
Gets the real value of the slider.
void PoXtRealSliderData::setLimit | ( | float | min, | |
float | max | |||
) |
Sets the limits of the slider.
Update the slider thumb position. If the current value is not beetween the new limit, the current value is set to the minimal or maximum value, and a event is raised.
void PoXtRealSliderData::setValue | ( | float | value | ) |
Sets the real value of the slider.
If the user enters a value greater or less than the limits of the slider in the numerical field, the corresponding limit is updated to this value.