Class daisy::MappedStringListValue¶
ClassList > daisy > MappedStringListValue
Inherits the following classes: daisy::MappedValue
Public Functions¶
Type | Name |
---|---|
virtual void | AppentToString (FixedCapStrBase< char > & string) override const |
virtual float | GetAs0to1 () override const |
int | GetIndex () const |
const uint32_t * | GetIndexPtr () const |
const char * | GetString () const |
MappedStringListValue (const char ** itemStrings, uint16_t numItems, uint32_t defaultIndex) |
|
virtual void | ResetToDefault () override |
virtual void | SetFrom0to1 (float normalizedValue0to1) override |
void | SetIndex (uint32_t index) |
virtual void | Step (int16_t numStepsUp, bool useCoarseStepSize) override |
operator const char * () const |
|
operator int () const |
|
MappedStringListValue & | operator= (int index) |
~MappedStringListValue () 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::MappedStringListValue::AppentToString (
FixedCapStrBase < char > & string
) override const
Generates a string representation and adds it to an existing string.
Parameters:
string
The string to add to
Implements daisy::MappedValue::AppentToString
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 GetIndex¶
Returns the current item index.
function GetIndexPtr¶
Returns a pointer to the current item index.
function GetString¶
Returns the current item string.
function MappedStringListValue¶
daisy::MappedStringListValue::MappedStringListValue (
const char ** itemStrings,
uint16_t numItems,
uint32_t defaultIndex
)
Creates a MappedStringListValue.
Parameters:
itemStrings
An Array of strings, one for each possible item.numItems
The number of possible itemsdefaultIndex
The default index
function ResetToDefault¶
Resets the value to its default.
Implements daisy::MappedValue::ResetToDefault
function SetFrom0to1¶
Sets the value so that GetAs0to1()
returns normalizedValue0to1
.
Implements daisy::MappedValue::SetFrom0to1
function SetIndex¶
Sets the current item index, clamping it to a valid item index.
function Step¶
virtual void daisy::MappedStringListValue::Step (
int16_t numStepsUp,
bool useCoarseStepSize
) override
Steps through the items up or down. If the coarse step size is used, the value will jump to the first or last item.
Implements daisy::MappedValue::Step
function operator const char *¶
Returns the current item string.
function operator int¶
Returns the current item index.
function operator=¶
Sets the current item index, clamping it to a valid item index.
function ~MappedStringListValue¶
The documentation for this class was generated from the following file external-docs/libDaisy/src/util/MappedValue.h