19#ifndef UI_RENDER_FREQUENCY
21#define UI_RENDER_FREQUENCY 50
uint32_t id_t
A (typically unique) identifier for widgets.
Definition id.hpp:13
void setRoot(Widget *const root)
Set the root widget for the UI to render.
void showBoundingBoxes(bool enable)
Toggle whether bounding boxes are displayed for all widgets.
void setTimeout(callback_t callback, time_t timeout)
Schedule a function to run after a delay.
std::function< void()> callback_t
A callback function that takes no arguments and returns nothing.
Definition ui.hpp:30
void render(bool block=true)
Update all UI elements and re-render any areas that need it.
Widget * getWidgetById(id_t id) noexcept
Get the first widget (root or any children) that has the given ID.