11#define DEFAULT_MAX_CONTAINER_ITEMS 20
#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.
Containing the abstract base class for all user interface elements (controls, indicators,...
uint8_t _numItems
Number of items in the container (number of valid items in the _items array).
Definition Container.h:21
bool PreviousControlItem()
Select the previous item in the container that is of UI_CONTROL type.
Definition Container.cpp:109
bool NextItem()
Select the next item in the container.
Definition Container.cpp:45
bool PreviousItem()
Select the previous item in the container.
Definition Container.cpp:63
bool NextControlItem()
Select the next item in the container that is of UI_CONTROL type.
Definition Container.cpp:81
void GetItemsBoundingBox(uint16_t *x, uint16_t *y, uint16_t *w, uint16_t *h)
Get a bounding box around all items in the Container.
Definition Container.cpp:137
uint8_t _selectedItemIndex
Index of the selected container item.
Definition Container.h:22
virtual void Draw()
Virtual method used for drawing of the container UIElement.
Definition Container.h:43
bool AddItem(UIElement *item)
Add a new element to the container and activate it as active child.
Definition Container.cpp:19
Container(uint8_t maxNumItems=DEFAULT_MAX_CONTAINER_ITEMS)
Constructor of the Container.
Definition Container.cpp:7
uint8_t _maxNumItems
Maximum number of items, each container can hold.
Definition Container.h:19
UIElement ** _items
Array holding pointers to all UIElement that are items of the container.
Definition Container.h:20
void ClearAllItems()
Clear all items in the container.
Definition Container.cpp:32
UIElement * GetSelectedItem()
Get the selected item.
Definition Container.cpp:14
virtual bool KeyInput(Keys_t key)
Process the given key.
Definition Container.h:53
~Container()
Destructor of the Container.
Definition Container.h:34
Abstract base class for all user interface elements (controls, indicators, containers).
Definition UIElement.h:24
UIElement(UIElementType type)
Constructor of the UIElement.
Definition UIElement.h:43