Root container that manages the UI tree, input, and rendering.
More...
#include <root.h>
Root container that manages the UI tree, input, and rendering.
Definition at line 19 of file root.h.
◆ Root()
Default constructor.
Definition at line 5 of file root.cpp.
◆ dispatch_pointer()
| bool asw::ui::Root::dispatch_pointer |
( |
const UIEvent & | e | ) |
|
Route a pointer event to the appropriate widget.
- Parameters
-
| e | The UI event to dispatch. |
- Returns
- True if the event was handled.
Definition at line 54 of file root.cpp.
◆ dispatch_to_focused()
| bool asw::ui::Root::dispatch_to_focused |
( |
const UIEvent & | e | ) |
|
Dispatch an event to the currently focused widget.
- Parameters
-
| e | The UI event to dispatch. |
- Returns
- True if the event was handled.
Definition at line 73 of file root.cpp.
◆ draw()
| void asw::ui::Root::draw |
( |
| ) |
|
Draw the UI tree.
Definition at line 223 of file root.cpp.
◆ hit_test()
Find the deepest widget at a given pointer position.
- Parameters
-
| w | The widget to test. |
| pointer_pos | The pointer position. |
- Returns
- Pointer to the hit widget, or nullptr.
Definition at line 31 of file root.cpp.
◆ rebuild_focus_if_needed()
| void asw::ui::Root::rebuild_focus_if_needed |
( |
| ) |
|
Rebuild the focus list if the tree has changed.
Definition at line 20 of file root.cpp.
◆ set_size()
| void asw::ui::Root::set_size |
( |
float | w, |
|
|
float | h ) |
Set the size of the root panel.
- Parameters
-
Definition at line 11 of file root.cpp.
◆ update()
| void asw::ui::Root::update |
( |
| ) |
|
Process input and dispatch UI events.
Definition at line 87 of file root.cpp.
◆ ctx
The UI context.
Definition at line 26 of file root.h.
◆ root
| Panel asw::ui::Root::root |
The root panel widget.
Definition at line 29 of file root.h.
The documentation for this class was generated from the following files: