6#ifndef CONTAINERPAGE_H_
7#define CONTAINERPAGE_H_
53 virtual void Draw(
bool redraw)
override;
Containing the base class for container elements.
#define DEFAULT_MAX_CONTAINER_ITEMS
Default maximum number of items, each container can hold.
Definition Container.h:11
enum Keys Keys_t
Available input keys.
TouchTypes
Available touch types.
Definition TouchTypes.h:13
virtual void Draw()
Virtual method used for drawing of the container UIElement.
Definition Container.h:43
Container(uint8_t maxNumItems=DEFAULT_MAX_CONTAINER_ITEMS)
Constructor of the Container.
Definition Container.cpp:7
void InitItems()
This method selects the first UIElement in the container that is of UI_CONTROL type.
Definition ContainerPage.cpp:64
virtual bool TouchInput(uint16_t x, uint16_t y, TouchTypes touchType) override
Process a touch input at the given point (x, y)
Definition ContainerPage.cpp:47
bool AddItem(UIElement *item)
Add the item to the elements of this container and adapt the save the current relative coordinates.
Definition ContainerPage.cpp:73
ContainerPage(uint8_t maxNumItems=DEFAULT_MAX_CONTAINER_ITEMS, uint16_t locX=0, uint16_t locY=0, uint16_t width=0, uint16_t height=0)
Constructor of the ContainerPage.
Definition ContainerPage.cpp:8
~ContainerPage()
Destructor of the ContainerPage.
Definition ContainerPage.h:44
virtual void RecalculateLayout() override
Recalculate the UIElement layout (containers update the X- and Y-Location of all their items,...
Definition ContainerPage.cpp:94
virtual void RecalculateDimensions() override
Recalculate the Height and Width of the UIElement.
Definition ContainerPage.cpp:86
virtual bool KeyInput(Keys_t key) override
Process the given key.
Definition ContainerPage.cpp:34
PageItemConfig * _itemConfiguration
Configuration data for all items inside the page.
Definition ContainerPage.h:27
Abstract base class for all user interface elements (controls, indicators, containers).
Definition UIElement.h:24
Struct used to store the relative coordinates of a item inside the page.
Definition ContainerPage.h:15
uint16_t relativeX
Relative X coordinate inside the page where the item is placed.
Definition ContainerPage.h:17
uint16_t relativeY
Relative Y coordinate inside the page where the item is placed.
Definition ContainerPage.h:18
UIElement * item
Pointer to the item for which this configuration applies.
Definition ContainerPage.h:16