|
| | StyleManager (GradientManager &gm) noexcept |
| | Gradients of registered color styles are allocated from gm, which must outlive it.
|
| StyleRef | FallbackStyle () const noexcept |
| | The style registered first, again after every ClearAll: the one a box drawn without a style (GPU box style 0) gets.
|
| | ~StyleManager () |
| StyleRef | Register (const Style &s, StyleUnits units=StyleUnits::Css) noexcept |
| | Bakes s into the pools, reusing identical entries, and returns its indices.
|
| StyleRef | RegisterWithChildStyles (const Style &s, const Style &first, const Style &last, const Style &only, StyleUnits units=StyleUnits::Css) noexcept |
| | Registers s as a style of its own (never shared, so its variants are its alone) with the styles its elements take as a first, last or only child (ElementStorage swaps them in when the parent's children are done).
|
| const ChildStyleRefs * | GetChildStyles (LayoutStyleIndex index) const noexcept |
| | The child styles of a style registered with them, by its layout style; nullptr for others.
|
| bool | HasChildStyles () const noexcept |
| | Whether any style has child styles (a quick test before looking one up).
|
| Style | ToPixels (const Style &s) const noexcept |
| | A CSS-pixel style at the UI scale, as Register would store it.
|
| TextStyle | ToPixels (const TextStyle &t) const noexcept |
| | A CSS-pixel text style at the UI scale.
|
| void | SetUIScale (float scale) noexcept |
| | UI scale applied to every style as it's registered (see Register).
|
| float | GetUIScale () const noexcept |
| | see SetUIScale
|
| int32_t | Px (int32_t cssPx) const noexcept |
| | A size given in code (CSS px) at the UI scale: whole pixels, and a non-zero size stays at least 1.
|
| float | Px (float cssPx) const noexcept |
| | see Px(int32_t)
|
| StyleRef | WithTextOverride (StyleRef base, const TextOverride &textOverride) noexcept |
| | A variant of base whose text uses another font and/or language, for one element's text (e.g.
|
| StyleRef | WithFlexWrap (StyleRef base, FlexWrap wrap) noexcept |
| | A variant of base whose flex container wraps as wrap says (a tab bar that puts its tabs on several rows, say); the box and text styles are shared.
|
| StyleRef | WithTextOf (StyleRef base, StyleRef from, tachyon::ElementState state, bool padding=true) noexcept |
| | A variant of base whose text is set as from's is in state: its font, text layout (alignment, trim), icon size and gap, and vertical padding (with padding), so at from's height the text sits as high; on one line and never cut short.
|
| int32_t | GetBorderBoxWidth (LayoutStyleIndex layoutStyleIndex) const noexcept |
| | Horizontal padding plus border widths of a layout style, in pixels; 0 for an invalid index.
|
| bool | AreVisualColorStylesModified () const noexcept |
| | Color styles modified since the last upload.
|
| void | ResetVisualColorStylesModified () noexcept |
| | Called by the renderer after uploading the color styles.
|
| bool | AreVisualBoxStylesModified () const noexcept |
| | Box styles modified since the last upload.
|
| void | ResetVisualBoxStylesModified () noexcept |
| | Called by the renderer after uploading the box styles.
|
| std::span< const tachyon::VisualBoxStyle > | GetVisualBoxStylesSpan () noexcept |
| | The flat box style pool (kStateCount entries per style), for GPU upload.
|
| std::span< const tachyon::VisualColorStyle > | GetVisualColorStylesSpan () noexcept |
| | The color style pool, for GPU upload.
|
| VisualColorStyleIndex | RegisterVisualColorStyle (const VisualColorStyle &s, GradientHandle incomingHandle) noexcept |
| | Takes ownership of incomingHandle: released on a dedup hit, otherwise stored with the slot.
|
| VisualColorStyleIndex | RegisterColorStyle (const ColorStyle &s, ImageIndex textureIndex=ImageIndex::Invalid) noexcept |
| | Bakes s and registers it, reusing an identical entry; the usual way to register a color.
|
| VisualColorStyleIndex | CreateColorStyle (const ColorStyle &s) noexcept |
| | A color style of its own that can be changed later (UpdateColorStyle); never shared with other registrations.
|
| void | UpdateColorStyle (VisualColorStyleIndex idx, const ColorStyle &s) noexcept |
| | Replaces the CreateColorStyle style at idx in place.
|
| void | DestroyColorStyle (VisualColorStyleIndex idx) noexcept |
| | Frees a CreateColorStyle style and its atlas slot; idx may be reused later.
|
| void | ClearAll () noexcept |
| | Releases every atlas slot and clears every style, for a theme reload; every index and StyleRef handed out before is invalid, so holders re-register (see Generation).
|
| uint32_t | Generation () const noexcept |
| | Bumped by ClearAll.
|
| GradientManager & | GetGradientManager () noexcept |
| | The renderer resolves logical page indices to physical bindless slots through it.
|
|
Each returns nullptr for an out-of-range index.
The per-state getters ignore non-visual state bits; Disabled overrides every other state.
|
| const LayoutStyle * | GetLayoutStyle (LayoutStyleIndex index) const noexcept |
| | All state variants of a box style.
|
| const VisualColorStyle * | GetVisualColorStyle (VisualColorStyleIndex index) const noexcept |
| | All state variants of a box style.
|
| const VisualBoxStyleStates * | GetVisualBoxStyles (VisualBoxStyleIndex index) const noexcept |
| | All state variants of a box style.
|
| const VisualBoxStyle * | GetVisualBoxStyle (VisualBoxStyleIndex index, tachyon::ElementState state) const noexcept |
| | All state variants of a box style.
|
| const VisualBoxStyle * | GetSelectionVisualBoxStyle (VisualBoxStyleIndex index, tachyon::ElementState state=tachyon::ElementState::None) const noexcept |
| | The variant for state plus Selection (selected text / ranges).
|
| const VisualTextStyle * | GetSelectionVisualTextStyle (VisualTextStyleIndex index, tachyon::ElementState state=tachyon::ElementState::None) const noexcept |
| | The variant for state plus Selection (selected text / ranges).
|
| const VisualTextStyleStates * | GetVisualTextStyles (VisualTextStyleIndex index) const noexcept |
| | All state variants of a text style.
|
| const VisualTextStyle * | GetVisualTextStyle (VisualTextStyleIndex index, tachyon::ElementState state) const noexcept |
| | All state variants of a box style.
|
| const VisualShadowStyle * | GetVisualShadowStyle (uint32_t gpuStyleIndex) const noexcept |
| | The shadows of a box style by its flat GPU index (ComputeGPUStyleIndex); nullptr if none.
|
| VisualBoxStyleIndex | RegisterOutline (BoxEdges widths, BoxCorners radius, color4b color) noexcept |
| | A border-only box style in pixels: widths and radius with a color border and no background, registered once (until ClearAll).
|
| float | GetOpacity (uint32_t gpuStyleIndex) const noexcept |
| | The CSS opacity of a flat GPU style index (style and state); below 0 when not set.
|
| const VisualBoxStyle * | GetVisualBoxStyleAt (uint32_t gpuStyleIndex) const noexcept |
| | A box style's state by its flat GPU index; nullptr out of range.
|
| bool | IsBoxBackgroundOpaque (uint32_t gpuStyleIndex) const noexcept |
| | Whether the box style's background, by its flat GPU index, hides what's under it: a color or gradient with every stop opaque (not a texture).
|
| static void | ApplyStateLayer (Style &style) noexcept |
| | For Style::stateLayer Content (Register does it): each hovered and pressed slot gets the slot's text color over its background without hover and press, 8% and 14%.
|
| size_t | LayoutStyleCount () const noexcept |
| | Number of registered (deduplicated) styles in each pool.
|
| size_t | VisualBoxStyleCount () const noexcept |
| | Number of registered (deduplicated) styles in each pool.
|
| size_t | VisualTextStyleCount () const noexcept |
| | Number of registered (deduplicated) styles in each pool.
|
| size_t | VisualColorStyleCount () const noexcept |
| | Number of registered (deduplicated) styles in each pool.
|
Bakes serializable Styles into deduplicated runtime layout/visual styles; a StyleRef holds indices into the (possibly shared) pools.
Each VisualColorStyle owns exactly one GradientHandle; Register / Create / Update / Destroy handle Acquire / Release, so callers never manage them.