UI_Lib
a1366e08a59cc549a65fa26081e6409aa12f26d5
This is a user interface library for graphical LCDs. It offers many different controls and indicators that can be nested depending on the element types.
|
Class for an enum indicator that is only showing a enumeration variable value. More...
#include <EnumIndicator.h>
Public Member Functions | |
EnumIndicator (T *valuePointer, const char **enumNames, uint8_t numEnumValues, uint16_t locX=0, uint16_t locY=0) | |
Constructor of the EnumIndicator. | |
virtual void | Draw (bool redraw) override |
Method used for drawing of the EnumIndicator. | |
virtual void | RecalculateDimensions () override |
Recalculate the Height and Width of the UIElement. | |
![]() | |
UIElement (UIElementType type) | |
Constructor of the UIElement. | |
UIElement (uint16_t locX, uint16_t locY, UIElementType type) | |
Constructor of the UIElement. | |
virtual bool | KeyInput (Keys_t key) |
Process the given key. | |
virtual bool | TouchInput (uint16_t x, uint16_t y, TouchTypes touchType) |
Process a touch input at the given point (x, y) | |
virtual void | RecalculateLayout () |
Recalculate the UIElement layout (containers update the X- and Y-Location of all their items, all other items can do other layout update stuff) | |
bool | HitTest (uint16_t x, uint16_t y) |
Check if the given point (x, y) is inside this UIElement. | |
Protected Attributes | |
const char ** | _enumNames |
Pointer to an array of char pointers containing the display names for all enumeration values. | |
uint8_t | _numEnumValues |
Number of enumeration values. | |
T * | _valuePointer |
Pointer to the enumeration variable that is shown by this indicator. | |
T | _lastValueDraw |
Last drawn enum value. | |
![]() | |
bool | _lastDrawnVisible |
The Visible value that was last drawn. | |
Additional Inherited Members | |
![]() | |
UIElementType | Type |
Element type (control, indicator, container) | |
uint16_t | LocX |
X Location of the upper left corner of the UIElement. | |
uint16_t | LocY |
Y Location of the upper left corner of the UIElement. | |
uint16_t | Width |
Drawing width of the UIElement. | |
uint16_t | Height |
Drawing height of the UIElement. | |
bool | Visible |
The UIElement is only drawn if the visibility is set to true. | |
bool | IsInEditMode |
Is the UIElement in edit mode? | |
UIElement * | Parent |
Parent UIElement that this UIElement belongs to. | |
UIElement * | ActiveChild |
Child element that is currently active (receiving all key inputs). | |
Class for an enum indicator that is only showing a enumeration variable value.
T | Type of enumeration handled by this indicator |
EnumIndicator< T >::EnumIndicator | ( | T * | valuePointer, |
const char ** | enumNames, | ||
uint8_t | numEnumValues, | ||
uint16_t | locX = 0, | ||
uint16_t | locY = 0 ) |
Constructor of the EnumIndicator.
valuePointer | Pointer to the enumeration variable that is shown by this indicator. |
enumNames | Pointer to an array of char pointers containing the display names for all enumeration values. The number of elements in this array must be at least the number of enum values. |
numEnumValues | Number of enumeration values. This number must match the real number of enum values in T. |
locX | X Location of the upper left corner of the EnumIndicator |
locY | Y Location of the upper left corner of the EnumIndicator |
|
overridevirtual |
Method used for drawing of the EnumIndicator.
Implements UIElement.
Reimplemented in EnumControl< T >.
|
overridevirtual |
|
protected |
Pointer to an array of char pointers containing the display names for all enumeration values.
The number of elements in this array must be at least the number of enum values.
|
protected |
Last drawn enum value.
Only if the _valueDraw differs from this value, the indicator is redrawn.
|
protected |
Number of enumeration values.
This number is set by the constructor of the indicator and must match the real number of enum values in T.