Return to Index
Valuator
Parent class: Widget
The Valuator class provides a base class for numeric
input widgets. It cannot be instantiated on its
own, but its direct descendants Scrollbar, Counter,
Slider, ValueSlider, ValueInput, and ValueOutput
are frequently used widgets.
Object Events:
Changed | An event generated when the value changes. No information is stored in the event structure, so use the Valuator methods to obtain the value. |
Method Summary: |
double | Valuator::clamp | (double value); |
double | Valuator::round | (double value); |
double | Valuator::getMax | (); |
void | Valuator::setMax | (double max); |
double | Valuator::getMin | (); |
void | Valuator::setMin | (double min); |
void | Valuator::setPrecision | (int ndigits); |
void | Valuator::setRange | (double min, double max); |
void | Valuator::setStep | (double step); |
void | Valuator::setStep | (int n, int d); |
double | Valuator::getStep | (); |
void | Valuator::setValue | (double val); |
void | Valuator::getValue | (); |
double Valuator::clamp |
double Valuator::clamp(double value);
Clamps the given value to the range of the slider and returns the clamped value. |
Parameters: |
double | value | The value to clamp. |
|
double Valuator::round |
double Valuator::round(double value);
Rounds the given value to the nearest step increment and returns the rounded value. |
Parameters: |
double | value | The value to round. |
|
double Valuator::getMax |
double Valuator::getMax();
Returns the valuator's maximum value. |
void Valuator::setMax |
void Valuator::setMax(double max);
Sets the valuator's maximum value. |
Parameters: |
double | max | The maximum value. |
|
double Valuator::getMin |
double Valuator::getMin();
Returns the valuator's minimum value. |
void Valuator::setMin |
void Valuator::setMin(double min);
Sets the valuator's minimum value. |
Parameters: |
double | min | The minimum value. |
|
void Valuator::setPrecision |
void Valuator::setPrecision(int ndigits);
Sets the step value to 1/10^ndigits. |
Parameters: |
int | ndigits | The precision value. |
|
void Valuator::setRange |
void Valuator::setRange(double min, double max);
Sets the minimum and maximum values of the valuator. |
Parameters: |
double | min | The minimum value. |
double | max | The maximum value. |
|
void Valuator::setStep |
void Valuator::setStep(double step);
Sets the step/increment value. |
Parameters: |
double | step | The increment value |
|
void Valuator::setStep |
void Valuator::setStep(int n, int d);
Sets the step/increment value as a ratio of two integers. |
Parameters: |
int | n | The numerator of the ratio. |
int | d | The denominator of the ratio. |
|
double Valuator::getStep |
double Valuator::getStep();
Returns the step/increment value. |
void Valuator::setValue |
void Valuator::setValue(double val);
Sets the value of the valuator. This does not clamp or round the value. Call those functions before setting the value. |
Parameters: |
double | val | The new value. |
|
void Valuator::getValue |
void Valuator::getValue();
Returns the value of the valuator. |
Generated automatically by docgen 0.0.1
© 2003 Aron Dobos