TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::GradientEditorSubsystem Class Reference

The gradient editor's state plus swatch styles keyed by swatch ID, with the same lifecycle as ColorPickerSubsystem's. More...

#include <gui_controls/subsystems/gui_gradient_editor_subsystem.h>

Public Types

using Swatch = SwatchStyles<GradientFieldSwatch>::Entry

Public Member Functions

 GradientEditorSubsystem (FramePipeline &frame)
GradientEditorState & State ()
 The editor popup's state.
tachyon::VisualColorStyleIndex & ClaimSwatchStyle (tachyon::ID swatchID)
 The style slot of swatch swatchID, kept alive this frame.
Swatch & ClaimSwatch (tachyon::ID swatchID)
 As ClaimSwatchStyle, the whole entry.
Swatch * FindSwatch (tachyon::ID swatchID)
 Swatch swatchID as last claimed, or null.
void KeepSwatchAlive (tachyon::ID swatchID)
 Carries swatchID's style over without rebuilding it: a cache-hit scope doesn't re-claim its swatches, but its blitted primitives still use them.
void ForgetStyles ()
 Drops every held style index without destroying it; call after a theme reload (StyleManager::ClearAll), which already freed them.

Detailed Description

The gradient editor's state plus swatch styles keyed by swatch ID, with the same lifecycle as ColorPickerSubsystem's.

The popup body is GUIApplication::EmitGradientEditor.

Member Typedef Documentation

◆ Swatch

Constructor & Destructor Documentation

◆ GradientEditorSubsystem()

tachyon::GradientEditorSubsystem::GradientEditorSubsystem ( FramePipeline & frame)
explicit

Member Function Documentation

◆ State()

GradientEditorState & tachyon::GradientEditorSubsystem::State ( )
inline

The editor popup's state.

◆ ClaimSwatchStyle()

tachyon::VisualColorStyleIndex & tachyon::GradientEditorSubsystem::ClaimSwatchStyle ( tachyon::ID swatchID)
inline

The style slot of swatch swatchID, kept alive this frame.

Invalid for a new swatch: the caller creates the style and stores it there, reused from then on.

◆ ClaimSwatch()

Swatch & tachyon::GradientEditorSubsystem::ClaimSwatch ( tachyon::ID swatchID)
inline

As ClaimSwatchStyle, the whole entry.

◆ FindSwatch()

Swatch * tachyon::GradientEditorSubsystem::FindSwatch ( tachyon::ID swatchID)
inline

Swatch swatchID as last claimed, or null.

◆ KeepSwatchAlive()

void tachyon::GradientEditorSubsystem::KeepSwatchAlive ( tachyon::ID swatchID)

Carries swatchID's style over without rebuilding it: a cache-hit scope doesn't re-claim its swatches, but its blitted primitives still use them.

◆ ForgetStyles()

void tachyon::GradientEditorSubsystem::ForgetStyles ( )

Drops every held style index without destroying it; call after a theme reload (StyleManager::ClearAll), which already freed them.


The documentation for this class was generated from the following file: