49 uint16_t maxWidth = 0;
55 if(w > maxWidth) { maxWidth = w; }
Containing a class for an enum indicator that is only showing a enumeration variable value.
Containing a class that is used to handle the drawing and key handling of all UI_Elements.
UI_Manager UiManager
Access object for the singleton instance of the UI_Manager.
Definition UI_Manager.cpp:7
@ UI_INDICATOR
Indicator elements are only used to show information to the user.
Definition UIElementType.h:15
T * _valuePointer
Pointer to the enumeration variable that is shown by this indicator.
Definition EnumIndicator.h:21
const char ** _enumNames
Pointer to an array of char pointers containing the display names for all enumeration values.
Definition EnumIndicator.h:19
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
uint8_t _numEnumValues
Number of enumeration values.
Definition EnumIndicator.h:20
virtual void RecalculateDimensions() override
Recalculate the Height and Width of the UIElement.
Definition EnumIndicator.cpp:45
T _lastValueDraw
Last drawn enum value.
Definition EnumIndicator.h:22
virtual void Draw(bool redraw) override
Method used for drawing of the EnumIndicator.
Definition EnumIndicator.cpp:17
bool _lastDrawnVisible
The Visible value that was last drawn.
Definition UIElement.h:26
UIElementType Type
Element type (control, indicator, container)
Definition UIElement.h:29
uint16_t Height
Drawing height of the UIElement.
Definition UIElement.h:33
uint16_t LocY
Y Location of the upper left corner of the UIElement.
Definition UIElement.h:31
bool Visible
The UIElement is only drawn if the visibility is set to true.
Definition UIElement.h:34
uint16_t Width
Drawing width of the UIElement.
Definition UIElement.h:32
UIElement(UIElementType type)
Constructor of the UIElement.
Definition UIElement.h:43
uint16_t LocX
X Location of the upper left corner of the UIElement.
Definition UIElement.h:30