13#include <Adafruit_GFX.h>
15#include "Fonts/FreeSans12pt7b.h"
18#define RGB565(r, g, b) ((((r)& 0xF8) << 8) | (((g) & 0xFC) << 3) | (((b) & 0xF8) >> 3))
72 virtual void Draw(
bool redraw) = 0;
Containing definitions for all available keys.
enum Keys Keys_t
Available input keys.
Containing the definition for all touch types.
TouchTypes
Available touch types.
Definition TouchTypes.h:13
Containing the definition for all user interface element types (controls, indicators,...
UIElementType
Available user interface element types.
Definition UIElementType.h:14
bool _lastDrawnVisible
The Visible value that was last drawn.
Definition UIElement.h:26
bool IsInEditMode
Is the UIElement in edit mode?
Definition UIElement.h:35
UIElement * Parent
Parent UIElement that this UIElement belongs to.
Definition UIElement.h:36
virtual void RecalculateDimensions()=0
Recalculate the Height and Width of the UIElement.
virtual bool KeyInput(Keys_t key)
Process the given key.
Definition UIElement.h:82
virtual void RecalculateLayout()
Recalculate the UIElement layout (containers update the X- and Y-Location of all their items,...
Definition UIElement.h:101
UIElement * ActiveChild
Child element that is currently active (receiving all key inputs).
Definition UIElement.h:37
UIElement(uint16_t locX, uint16_t locY, UIElementType type)
Constructor of the UIElement.
Definition UIElement.h:57
UIElementType Type
Element type (control, indicator, container)
Definition UIElement.h:29
bool HitTest(uint16_t x, uint16_t y)
Check if the given point (x, y) is inside this UIElement.
Definition UIElement.h:109
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
virtual bool TouchInput(uint16_t x, uint16_t y, TouchTypes touchType)
Process a touch input at the given point (x, y)
Definition UIElement.h:91
uint16_t Width
Drawing width of the UIElement.
Definition UIElement.h:32
virtual void Draw(bool redraw)=0
Virtual method used for drawing of the UIElement.
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