|
ZenitUI
Retained-mode C++20 UI framework
|
The node class: tree structure, layout pass, style resolution, input dispatch, render orchestration, and scroll handling. More...
#include "Common.hpp"#include "Style.hpp"#include "Theme.hpp"#include "UIContext.hpp"#include "AnimPrimitives.hpp"#include "Logger.hpp"#include "ScrollState.hpp"#include "StyleResolver.hpp"#include "AnimationPlayer.hpp"#include "InputController.hpp"#include "ScrollController.hpp"#include "UIEnums.hpp"#include "Media.hpp"#include "SmallVector.hpp"Go to the source code of this file.
Classes | |
| struct | ZenitUI::NodeState |
| Per-frame interaction flags derived from pointer / keyboard state. More... | |
| struct | ZenitUI::NodeConfig |
| Static configuration bits: interaction behaviour, render behaviour. More... | |
| struct | ZenitUI::NodeInternal |
| Transient bookkeeping bits used by the layout / style / culling passes. More... | |
| struct | ZenitUI::DragHandlers |
| Lazily allocated Drag & Drop callbacks owned by Layout (§5.22). More... | |
| class | ZenitUI::Layout |
| The base node type: tree, style, layout, input, scroll, render. More... | |
| struct | ZenitUI::Layout::ResolvedBgTexture |
| Result of resolveBgTexture: a texture plus its nine-slice insets. More... | |
| class | ZenitUI::TLayout< Derived, Base > |
| CRTP base for components that want fluent builders and a static create() factory. More... | |
Functions | |
| bool | ZenitUI::nodeMatchesAtom (const Layout *node, SimpleSelector::Kind kind, const std::string &name, const std::vector< std::pair< SimpleSelector::Kind, std::string > > &extras, bool reqHover, bool reqPressed, bool reqFocus, bool reqDisabled, bool reqChecked) |
| bool | ZenitUI::nodeMatchesSimple (const Layout *node, const SimpleSelector &ss) |
true if node matches the primary selector, all extras, and none of its :not() clauses. | |
| const Layout * | ZenitUI::previousStyleSibling (const Layout *node) |
Return the immediately preceding non-sentinel sibling of node, or nullptr. | |
| bool | ZenitUI::matchSelectorChainAt (const std::vector< SimpleSelector > &chain, size_t idx, const Layout *node) |
| bool | ZenitUI::ruleMatches (const ThemeRule &r, const Layout *node, Vec2 viewport) |
true if node matches the full rule selector chain ( , >, +, ~, :not()). | |
The node class: tree structure, layout pass, style resolution, input dispatch, render orchestration, and scroll handling.
Layout is the single node type in ZenitUI. There is no separate "widget" base class: every visual element is a Layout subclass (either directly, via TLayout<Derived>, or by composition). The node owns or co-owns:
The public API mirrors the four-pass frame cycle, each function called from Layout::runFrame:
Subclasses hook in via the virtuals (computeIntrinsicSize, renderContent, renderChrome, onLayout, onUpdate, …) rather than by overriding the four main passes, except in rare cases (VirtualView, Canvas, Popup, Tooltip override arrange or draw).