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.
Loading...
Searching...
No Matches
EnumIndicator.h
Go to the documentation of this file.
1
5
6#ifndef ENUMINDICATOR_H_
7#define ENUMINDICATOR_H_
8
9#include "../Core/UIElement.h"
10
15template <class T>
17{
18 protected:
19 const char** _enumNames;
23
24 public:
25
34 EnumIndicator(T* valuePointer, const char** enumNames, uint8_t numEnumValues, uint16_t locX = 0, uint16_t locY = 0);
35
39 virtual void Draw(bool redraw) override;
40
44 virtual void RecalculateDimensions() override;
45};
46
47#endif /* ENUMINDICATOR_H_ */
Containing the abstract base class for all user interface elements (controls, indicators,...
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
UIElement(UIElementType type)
Constructor of the UIElement.
Definition UIElement.h:43