DsValueBase is a base class that contains a float value.
More...
#include <ds_value_base.h>
|
float | getNormalizedValue (float value) |
|
void | notifyValueChange (bool in_motion) |
|
virtual float | onValueChange (float value)=0 |
|
|
float | mMinValue |
|
float | mMaxValue |
|
float | mValue |
|
DsValueBase is a base class that contains a float value.
◆ getValue()
float DsValueBase::getValue |
( |
void |
| ) |
const |
Returns the value.
- Returns
- Value
◆ setOnChangeCallback()
void DsValueBase::setOnChangeCallback |
( |
const lambda< void(float value, bool in_motion, bool user_input)> & |
cb | ) |
|
Sets the lambda that will receive value change events.
- Parameters
-
action | Lambda of type void(float value, bool in_motion, bool user_input) that will be called whenever the value of the control changes.
value is the new value of the control.
in_motion is true if the control is still in motion and false when the motion stopped and the user lifted the finger off the control.
user_input is true if the change happened as a result of the user manipulating the control or false if the control was changed programatically by calling the setValue() method.
|
◆ setValue()
void DsValueBase::setValue |
( |
float |
value | ) |
|
Sets the value.
- Parameters
-
state | New value. It will be saturated in the interval [min, max] set by setValueRange() |
◆ setValueRange()
void DsValueBase::setValueRange |
( |
float |
min, |
|
|
float |
max |
|
) |
| |
Sets the value range.
- Parameters
-
min | Minimum value. Default is 0. |
max | Maximum value. Default is 1.0. |
The documentation for this class was generated from the following file: