35 EnumControl(T* valuePointer,
const char** enumNames, uint8_t numEnumValues,
void* controlContext = NULL,
void(*onValueChanged)(
void* controlContext) = NULL, uint16_t locX = 0, uint16_t locY = 0);
40 virtual void Draw(
bool redraw)
override;
Containing a class for an enum indicator that is only showing a enumeration variable value.
enum Keys Keys_t
Available input keys.
TouchTypes
Available touch types.
Definition TouchTypes.h:13
virtual void Draw(bool redraw) override
Method used for drawing of the EnumControl.
Definition EnumControl.cpp:17
virtual bool TouchInput(uint16_t x, uint16_t y, TouchTypes touchType) override
Process a touch input at the given point (x, y)
Definition EnumControl.cpp:72
void * _controlContext
Context pointer that is returned with the _onValueChanged function pointer.
Definition EnumControl.h:19
void(* _onValueChanged)(void *controlContext)
Function pointer for _onValueChanged event.
Definition EnumControl.h:20
bool PreviousValue()
Set the value of the controlled enumeration variable to the previous enum value.
Definition EnumControl.cpp:103
EnumControl(T *valuePointer, const char **enumNames, uint8_t numEnumValues, void *controlContext=NULL, void(*onValueChanged)(void *controlContext)=NULL, uint16_t locX=0, uint16_t locY=0)
Constructor of the EnumControl.
Definition EnumControl.cpp:9
void ToggleEditMode()
Toggle the control between display and edit mode.
Definition EnumControl.cpp:131
bool NextValue()
Set the value of the controlled enumeration variable to the next enum value.
Definition EnumControl.cpp:117
virtual bool KeyInput(Keys_t key) override
Process the given key.
Definition EnumControl.cpp:55
bool _lastDrawnEditMode
The EditMode that was last drawn.
Definition EnumControl.h:21
EnumIndicator(T *valuePointer, const char **enumNames, uint8_t numEnumValues, uint16_t locX=0, uint16_t locY=0)
Constructor of the EnumIndicator.
Definition EnumIndicator.cpp:9