|
ZenitUI
Retained-mode C++20 UI framework
|
Stateless per-node input dispatcher. More...
#include <InputController.hpp>
Public Member Functions | |
| void | updateFlags (Layout &node, bool selfBlocked, bool scrolling) |
| Recompute the node's hovered / pressed / focused flags. | |
| UIState | computeNextState (const Layout &node) const |
| Derive the UIState enum from the node's current state flags. | |
| void | fireCallbacks (Layout &node, UIState prev, UIState next, bool changed) |
| Fire callbacks for state transitions and pointer events. | |
| void | handleKeyInput (Layout &node) |
| Fire onClick on Enter or Space for the focused, keyboard- activatable node. | |
Stateless per-node input dispatcher.
Derive the UIState enum from the node's current state flags.
Order of precedence: Disabled > Pressed > Hover > Idle.
| void ZenitUI::InputController::updateFlags | ( | Layout & | node, |
| bool | selfBlocked, | ||
| bool | scrolling ) |
Recompute the node's hovered / pressed / focused flags.
| node | Node whose flags are updated. |
| selfBlocked | true when input to this node should be suppressed. |
| scrolling | true while any ancestor is scrolling or the node itself is scrolling. In this mode, only focus is updated: hover / press are frozen so that a drag does not flicker buttons under the pointer. |