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
BoolIndicator.h
Go to the documentation of this file.
1
5
6#ifndef BOOLINDICATOR_H_
7#define BOOLINDICATOR_H_
8
9#include "../Core/UIElement.h"
10
19
20#define DEFAULT_BOOLINDICATOR_LED_DIAMETER 20
21#define DEFAULT_BOOLINDICATOR_LED_SPACING 3
22
27{
28 protected:
32
33 public:
34
42 BoolIndicator(bool* valuePointer, BoolIndicatorStyles_t style = BOOLINDICATOR_STYLE_LED, uint16_t locX = 0, uint16_t locY = 0);
43
47 virtual void Draw(bool redraw) override;
48
52 virtual void RecalculateDimensions() override;
53};
54
55#endif /* BOOLINDICATOR_H_ */
BoolIndicatorStyles
Available boolean indicator styles.
Definition BoolIndicator.h:15
@ BOOLINDICATOR_STYLE_LED
The boolean indicator is styled like a LED.
Definition BoolIndicator.h:16
@ BOOLINDICATOR_STYLE_CLASSIC
The boolean indicator is styled with a rectangle with ON/OFF text.
Definition BoolIndicator.h:17
enum BoolIndicatorStyles BoolIndicatorStyles_t
Available boolean indicator styles.
Containing the abstract base class for all user interface elements (controls, indicators,...
BoolIndicatorStyles_t _style
Style used by the boolean indicator.
Definition BoolIndicator.h:31
virtual void RecalculateDimensions() override
Recalculate the Height and Width of the UIElement.
Definition BoolIndicator.cpp:55
BoolIndicator(bool *valuePointer, BoolIndicatorStyles_t style=BOOLINDICATOR_STYLE_LED, uint16_t locX=0, uint16_t locY=0)
Constructor of the BooleanIndicator.
Definition BoolIndicator.cpp:8
bool _lastValueDraw
Last drawn bool value.
Definition BoolIndicator.h:30
virtual void Draw(bool redraw) override
Method used for drawing of the BooleanIndicator.
Definition BoolIndicator.cpp:14
bool * _valuePointer
Pointer to the boolean variable that is shown by this indicator.
Definition BoolIndicator.h:29
UIElement(UIElementType type)
Constructor of the UIElement.
Definition UIElement.h:43