gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
row.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "collection.hpp"
5
6namespace ui {
7
11class Row : public Collection {
13 uisize_t minimumWidth = 0;
15 align_t childAlignment = ALIGN_LEFT;
16
21 void calcChildBounds(int index);
22
23public:
25
26 void update(time_t time) override;
27
28 void push(Widget *const child) override;
29
34 void setMinWidth(uisize_t minWidth);
35
45
50 inline uisize_t getMinWidth() const {
51 return minimumWidth;
52 }
53
58 inline align_t getChildAlign() const {
59 return childAlignment;
60 }
61
62 DERIVE_EVENT_HANDLERS(Row)
63};
64
65} // namespace ui
align_t
The various ways a child widget can be aligned in its parent.
Definition alignment.hpp:11
A container widget for displaying a list of arbitrarily-positioned child widgets.
Definition collection.hpp:11
Collection(const Size &size, const Position &pos={0, 0}, const Alignment &align={ALIGN_LEFT, ALIGN_TOP}, const Padding &padding={0})
Construct a collection.
A container widget that horizontally organizes its children into a structured row.
Definition row.hpp:11
void setChildAlign(align_t align)
Set where to start when displaying child widgets; on the left, or right.
align_t getChildAlign() const
Get where to start when displaying child widgets; on the left, or right.
Definition row.hpp:58
void setMinWidth(uisize_t minWidth)
Set the minimum width of each cell in the row.
void push(Widget *const child) override
Append a child widget to the end of the list.
void update(time_t time) override
Update any internal state of the widget, and check if it needs to be re-rendered.
uisize_t getMinWidth() const
Get the minimum width of each cell in the row.
Definition row.hpp:50
The common interface for all UI objects.
Definition widget.hpp:27
uint16_t uisize_t
A non-negative size for UI widgets.
Definition size.hpp:12