Class daisy::MappedIntValue¶
ClassList > daisy > MappedIntValue
Inherits the following classes: daisy::MappedValue
Public Functions¶
| Type | Name |
|---|---|
| virtual void | AppentToString (FixedCapStrBase< char > & string) override const |
| int | Get () const |
| virtual float | GetAs0to1 () override const |
| const int * | GetPtr () const |
| MappedIntValue (int min, int max, int defaultValue, int stepSizeFine, int stepSizeCoarse, const char * unitStr="", bool forceSign=false) |
|
| virtual void | ResetToDefault () override |
| void | Set (int newValue) |
| virtual void | SetFrom0to1 (float normalizedValue0to1) override |
| virtual void | Step (int16_t numStepsUp, bool useCoarseStepSize) override |
| operator int () const |
|
| MappedIntValue & | operator= (int val) |
| ~MappedIntValue () override |
Public Functions inherited from daisy::MappedValue¶
| Type | Name |
|---|---|
| virtual void | AppentToString (FixedCapStrBase< char > & string) const = 0 |
| virtual float | GetAs0to1 () const = 0 |
| virtual void | ResetToDefault () = 0 |
| virtual void | SetFrom0to1 (float normalizedValue0to1) = 0 |
| virtual void | Step (int16_t numStepsUp, bool useCoarseStepSize) = 0 |
| virtual | ~MappedValue () |
Public Functions Documentation¶
function AppentToString¶
virtual void daisy::MappedIntValue::AppentToString (
FixedCapStrBase < char > & string
) override const
Generates a string representation and adds it to an existing string.
Parameters:
stringThe string to add to
Implements daisy::MappedValue::AppentToString
function Get¶
Returns the current value.
function GetAs0to1¶
Returns the 0..1 normalized representation of the value, e.g. to display a slider/knob on a UI.
Implements daisy::MappedValue::GetAs0to1
function GetPtr¶
Returns a const pointer to the current value.
function MappedIntValue¶
daisy::MappedIntValue::MappedIntValue (
int min,
int max,
int defaultValue,
int stepSizeFine,
int stepSizeCoarse,
const char * unitStr="",
bool forceSign=false
)
Creates a MappedIntValue.
Parameters:
minThe lower end of the range of possible valuesmaxThe upper end of the range of possible valuesdefaultValueThe default valuestepSizeFineA fine step size to use in theStep()functionstepSizeCoarseA coarse step size to use in theStep()functionunitStrA string for the unit, e.g. "Hz"forceSignControls whetherAppendToString()always prints the sign, even for positive numbers
function ResetToDefault¶
Resets the value to its default.
Implements daisy::MappedValue::ResetToDefault
function Set¶
Sets the value, clamping it to the valid range.
function SetFrom0to1¶
Sets the value so that GetAs0to1() returns normalizedValue0to1.
Implements daisy::MappedValue::SetFrom0to1
function Step¶
Steps the value up or down using the step sizes specified in the constructor.
Implements daisy::MappedValue::Step
function operator int¶
Returns the current value.
function operator=¶
Sets the value, clamping it to the valid range.
function ~MappedIntValue¶
The documentation for this class was generated from the following file external-docs/libDaisy/src/util/MappedValue.h