9#ifndef ASW_UI_CONTEXT_H
10#define ASW_UI_CONTEXT_H
Shared state for the UI system.
Widget * hover
The widget currently being hovered.
bool pointer_down
Whether the pointer is currently down.
Widget * pointer_capture
The widget that has captured pointer input.
Context()=default
Default constructor.
FocusManager focus
The focus manager.
Theme theme
The current UI theme.
bool need_focus_rebuild
Whether the focus list needs to be rebuilt.
Manages focus navigation for UI widgets.
void focus_prev(Context &ctx)
Move focus to the previous focusable widget.
void focus_dir(Context &ctx, int dx, int dy)
Move focus in a direction based on widget positions.
void set_focus(Context &ctx, Widget *w)
Set focus to a specific widget.
void focus_next(Context &ctx)
Move focus to the next focusable widget.
std::vector< Widget * > focusables_
Widget * focused() const
Get the currently focused widget.
void rebuild(Context &ctx, Widget &root)
Rebuild the focusable widget list from the widget tree.
Theme configuration for UI elements.
UI theme configuration for the ASW UI module.