WidgetList
Functions
-
template<typename T>
inline BaseWidgetValue<T> *WIDGET_LIST(const T values[], const uint8_t size, const uint8_t activePosition = 0, const char *format = "%s", const uint8_t cursorOffset = 0, const bool cycle = false, void (*callback)(const T&) = nullptr) Function to create a new WidgetList<T> instance.
- Template Parameters:
T – The type of the value.
- Parameters:
values – The list of values to choose from.
size – The size of the list.
activePosition – The initial active position in the list (default: 0).
format – The format of the value (default: “%s”).
cursorOffset – The cursor offset (default: 0).
cycle – Whether to cycle through the list (default: false).
callback – The callback function to call when the value changes (default: nullptr).
-
template<typename T>
class WidgetList : public BaseWidgetValue<T> - #include <WidgetList.h>
Widget that allows a user to select a value from a list. Manages a value within a specified list, allowing cycling through values.
Public Functions
Protected Functions
-
inline virtual bool process(LcdMenu *menu, const unsigned char command) override
Process command.
Handle commands:
UP
- increment value and trigger callback;DOWN
- decrement value and trigger callback;
-
inline virtual bool process(LcdMenu *menu, const unsigned char command) override