gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
box.hpp
Go to the documentation of this file.
1
2#pragma once
3
5
6namespace ui {
7
13class Box : public SingleChildWidget {
14 Bounds widgetBounds;
15
16public:
23
24 Bounds bounds() const override;
25
30 void setBounds(const Bounds &bounds);
31
32 void draw() const override;
33 void update(time_t time_ms) override;
34
35 DERIVE_EVENT_HANDLERS(Box)
36};
37
38} // namespace ui
Display a single widget within arbitrary bounds.
Definition box.hpp:13
void draw() const override
Render the widget to the screen.
void update(time_t time_ms) override
Update any internal state of the widget, and check if it needs to be re-rendered.
Bounds bounds() const override
Get the rendering bounds of this widget.
void setBounds(const Bounds &bounds)
Set the bounds for the child widget.
Box(Widget *child, const Bounds &bounds)
Construct a Box from a child and Bounds to restrict the child to.
The common interface for a widget that contains a single child.
Definition single_child_widget.hpp:11
Widget * child
The child widget.
Definition single_child_widget.hpp:14
The common interface for all UI objects.
Definition widget.hpp:27
A struct that holds the pixel space that a widget would take up on the screen.
Definition bounds.hpp:11