gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
column.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "collection.hpp"
5
6namespace ui {
7
11class Column : public Collection {
13 uisize_t minimumHeight = 0;
15 align_t childAlignment = ALIGN_TOP;
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 setMinHeight(uisize_t minHeight);
35
45
50 inline uisize_t getMinHeight() const {
51 return minimumHeight;
52 }
53
58 inline align_t getChildAlign() const {
59 return childAlignment;
60 }
61
62 DERIVE_EVENT_HANDLERS(Column)
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 vertically organizes its children into a structured column.
Definition column.hpp:11
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.
void setMinHeight(uisize_t minHeight)
Set the minimum height of each cell in the column.
align_t getChildAlign() const
Get where to start when displaying child widgets; on the top, or bottom.
Definition column.hpp:58
void setChildAlign(align_t align)
Set where to start when displaying child widgets; on the top, or bottom.
uisize_t getMinHeight() const
Get the minimum height of each cell in the column.
Definition column.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