daisy::MappedStringListValue¶
#include <MappedValue.h>
Inherits from daisy::MappedValue
Public Functions¶
Name | |
---|---|
MappedStringListValue(const char ** itemStrings, uint16_t numItems, uint32_t defaultIndex) | |
~MappedStringListValue() override | |
int | GetIndex() const |
const char * | GetString() const |
const uint32_t * | GetIndexPtr() const |
void | SetIndex(uint32_t index) |
operator int() const | |
operator const char *() const | |
MappedStringListValue & | operator=(int index) |
virtual void | AppentToString(FixedCapStrBase< char > & string) const override |
virtual void | ResetToDefault() override |
virtual float | GetAs0to1() const override |
virtual void | SetFrom0to1(float normalizedValue0to1) override |
virtual void | Step(int16_t numStepsUp, bool useCoarseStepSize) override |
Additional inherited members¶
Public Functions inherited from daisy::MappedValue
Name | |
---|---|
virtual | ~MappedValue() |
Public Functions Documentation¶
function MappedStringListValue¶
Parameters:
- itemStrings An Array of strings, one for each possible item.
- numItems The number of possible items
- defaultIndex The default index
Creates a MappedStringListValue.
function ~MappedStringListValue¶
function GetIndex¶
Returns the current item index.
function GetString¶
Returns the current item string.
function GetIndexPtr¶
Returns a pointer to the current item index.
function SetIndex¶
Sets the current item index, clamping it to a valid item index.
function operator int¶
Returns the current item index.
function operator const char *¶
Returns the current item string.
function operator=¶
Sets the current item index, clamping it to a valid item index.
function AppentToString¶
Parameters:
- string The string to add to
Reimplements: daisy::MappedValue::AppentToString
Generates a string representation and adds it to an existing string.
function ResetToDefault¶
Reimplements: daisy::MappedValue::ResetToDefault
Resets the value to its default.
function GetAs0to1¶
Reimplements: daisy::MappedValue::GetAs0to1
Returns the 0..1 normalized representation of the value, e.g. to display a slider/knob on a UI.
function SetFrom0to1¶
Reimplements: daisy::MappedValue::SetFrom0to1
Sets the value so that [GetAs0to1()](/libDaisy/Classes/classdaisy_1_1_mapped_string_list_value/#function-getas0to1)
returns normalizedValue0to1
.
function Step¶
Reimplements: daisy::MappedValue::Step
Steps through the items up or down. If the coarse step size is used, the value will jump to the first or last item.
---¶
Updated on 2024-01-03 at 19:41:00 +0000