|
ZenitUI
Retained-mode C++20 UI framework
|
Resolves, caches, and transitions the style of a single node. More...
#include <StyleResolver.hpp>
Classes | |
| struct | InlineStateStyles |
| Inline style overrides for interaction states (allocated lazily). More... | |
| struct | TransitionState |
| Active state-transition buffers (allocated only while transitioning). More... | |
| struct | ThemeCache |
| Cached theme-only resolution result before inline overlays. More... | |
| struct | PartTransition |
| Independent transition state for one pseudo-element (::part). More... | |
| struct | InheritedSnapshot |
| Last-seen inherited values on container nodes with children. More... | |
Public Member Functions | |
| Style & | ensureInlineDefaults () |
| Style & | ensureInlineBase () |
| InlineStateStyles & | ensureInlineStates () |
| const Style * | inlineDefaultsPtr () const noexcept |
| const Style * | inlineBasePtr () const noexcept |
| const InlineStateStyles * | inlineStatesPtr () const noexcept |
| const ComputedStyle & | effectiveTargetStyle () const noexcept |
| Return the active transition target, or currentStyle when settled. | |
| bool | isTransitioning () const noexcept |
| true while a property transition is actively interpolating. | |
| float | transitionProgress () const noexcept |
| Normalized transition progress in [0, 1] (1.0f when settled). | |
| void | initImmediate (Layout &node) |
| Resolve and snap currentStyle immediately, clearing any transition buffer. | |
| void | restartTransition () |
| Reset the transition timer to 0 and snapshot currentStyle as start. | |
| ComputedStyle | resolveFor (Layout &node) |
Compute the fully resolved ComputedStyle for node. | |
| Style | partFor (Layout &node, const std::string &partName) |
Resolve the style for pseudo-element partName on node. | |
| void | beginStateTransition (Layout &node, UIState newState) |
Start a transition from the current style to newState's style. | |
| void | resolvePendingTransition (Layout &node, bool instant=false) |
| Re-resolve the target style after a theme or ancestor change. | |
| void | tick (Layout &node, float dt) |
Advance the state transition by dt seconds. | |
| void | propagateInheritance (Layout &node) |
| Propagate inherited property changes to children. | |
| void | invalidateCache () noexcept |
| Invalidate the theme style cache; called on selector/inline changes. | |
Public Attributes | |
| ComputedStyle | currentStyle |
| The value consumed by layout and render. | |
| UIState | currentState {UIState::Idle} |
| Last observed interaction state. | |
Resolves, caches, and transitions the style of a single node.
| void ZenitUI::StyleResolver::tick | ( | Layout & | node, |
| float | dt ) |
Advance the state transition by dt seconds.
| node | Unused today; reserved for future per-node easing. |
| dt | Frame delta in seconds. |