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

The color picker popup's state plus swatch ColorStyles keyed by swatch ID. More...

#include <gui_controls/subsystems/gui_color_picker_subsystem.h>

Public Member Functions

 ColorPickerSubsystem (FramePipeline &frame)
ColorPickerState & State ()
 The picker popup's state.
tachyon::VisualColorStyleIndex & ClaimSwatchStyle (tachyon::ID swatchID)
 The color style slot of swatch swatchID, kept alive this frame.
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 color picker popup's state plus swatch ColorStyles keyed by swatch ID.

Claimed styles are updated in place across frames; unclaimed ones belong to vanished swatches and are destroyed next frame. The popup body is GUIApplication::EmitColorPicker.

Constructor & Destructor Documentation

◆ ColorPickerSubsystem()

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

Member Function Documentation

◆ State()

ColorPickerState & tachyon::ColorPickerSubsystem::State ( )
inline

The picker popup's state.

◆ ClaimSwatchStyle()

tachyon::VisualColorStyleIndex & tachyon::ColorPickerSubsystem::ClaimSwatchStyle ( tachyon::ID swatchID)

The color 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.

◆ KeepSwatchAlive()

void tachyon::ColorPickerSubsystem::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::ColorPickerSubsystem::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: