4#include <unordered_map>
Stage callbacks run in registration order (no priorities): if A must run before B,...
Definition gui_frame_pipeline.h:74
tachyon::VisualColorStyleIndex & ClaimSwatchStyle(tachyon::ID swatchID)
The style slot of swatch swatchID, kept alive this frame.
Definition gui_gradient_editor_subsystem.h:92
void ForgetStyles()
Drops every held style index without destroying it; call after a theme reload (StyleManager::ClearAll...
GradientEditorState & State()
The editor popup's state.
Definition gui_gradient_editor_subsystem.h:88
GradientEditorSubsystem(FramePipeline &frame)
void KeepSwatchAlive(tachyon::ID swatchID)
Carries swatchID's style over without rebuilding it: a cache-hit scope doesn't re-claim its swatches,...
SwatchStyles< GradientFieldSwatch >::Entry Swatch
Definition gui_gradient_editor_subsystem.h:83
Swatch * FindSwatch(tachyon::ID swatchID)
Swatch swatchID as last claimed, or null.
Definition gui_gradient_editor_subsystem.h:96
Swatch & ClaimSwatch(tachyon::ID swatchID)
As ClaimSwatchStyle, the whole entry.
Definition gui_gradient_editor_subsystem.h:94
Swatches' color styles, by swatch ID: each kept while it's claimed every frame, and destroyed the fra...
Definition gui_swatch_styles.h:21
@ None
Definition gui_element_flags.h:18
VisualColorStyleIndex
Index into StyleManager's color style pool; Invalid (0) draws nothing (transparent).
Definition gui_style.h:33
@ Invalid
Definition gui_style.h:33
Definition gui_logging.h:24
Per-frame values plus references to long-lived managers, passed to every stage callback.
Definition gui_frame_pipeline.h:32
One press that may become a drag, with what every control does around it: the focus and the capture o...
Definition gui_gesture.h:60
What the gradient editor lets a field's gradient have: a Gradient's 8 stops of 8-bit colors,...
Definition gui_gradient_editor_subsystem.h:24
bool perStopInterpolation
each stop's StopInterpolation
Definition gui_gradient_editor_subsystem.h:27
bool hdr
colors over 1
Definition gui_gradient_editor_subsystem.h:26
int maxStops
Definition gui_gradient_editor_subsystem.h:25
What a stop's drag changes, as it was at the press; put back by Escape.
Definition gui_gradient_editor_subsystem.h:52
tachyon::GradientF gradient
Definition gui_gradient_editor_subsystem.h:53
int selectedStop
Definition gui_gradient_editor_subsystem.h:54
Gradient editor popup state: edits a working copy, written back each frame it's open.
Definition gui_gradient_editor_subsystem.h:32
CloseRequest
OK keeps the gradient, Cancel and the close button restore the original one.
Definition gui_gradient_editor_subsystem.h:47
@ None
Definition gui_gradient_editor_subsystem.h:47
tachyon::VisualColorStyleIndex previewGradientStyle
Definition gui_gradient_editor_subsystem.h:61
std::string context
the field's label, shown after the title
Definition gui_gradient_editor_subsystem.h:43
bool dragOff
dragged well below the bar: removed on release
Definition gui_gradient_editor_subsystem.h:59
tachyon::Gradient originalGradient8
a Gradient field's own, restored exactly
Definition gui_gradient_editor_subsystem.h:42
tachyon::GradientF workingCopy
the gradient being edited
Definition gui_gradient_editor_subsystem.h:35
std::vector< tachyon::GradientF > savedPresets
"Save preset", for the session
Definition gui_gradient_editor_subsystem.h:48
tachyon::ID triggerID
swatch that opened the editor
Definition gui_gradient_editor_subsystem.h:33
tachyon::GradientF originalGradient
to restore on Cancel
Definition gui_gradient_editor_subsystem.h:41
tachyon::VisualColorStyleIndex stopHaloColor
Definition gui_gradient_editor_subsystem.h:64
tachyon::Gesture< DragSnapshot > press
the press on a stop, a drag from the start
Definition gui_gradient_editor_subsystem.h:56
GradientEditLimits limits
what the field's gradient can have
Definition gui_gradient_editor_subsystem.h:36
tachyon::VisualColorStyleIndex stopOutlineColor
Definition gui_gradient_editor_subsystem.h:63
enum tachyon::GradientEditorState::CloseRequest closeRequest
int dragStopIndex
the dragged stop, or -1
Definition gui_gradient_editor_subsystem.h:57
tachyon::VisualColorStyleIndex stopEdgeColor
Definition gui_gradient_editor_subsystem.h:62
tachyon::ID windowID
popup window ID
Definition gui_gradient_editor_subsystem.h:34
int selectedStop
index into workingCopy.stops
Definition gui_gradient_editor_subsystem.h:37
float dragGrab
cursor minus the stop's offset at the press, so it doesn't jump
Definition gui_gradient_editor_subsystem.h:58
float selectedStopPosition
selected stop's position, for its Field
Definition gui_gradient_editor_subsystem.h:39
tachyon::color4f selectedStopColor
selected stop's color, for its ColorField
Definition gui_gradient_editor_subsystem.h:38
A gradient of float colors, for data such as a material editor's gradient map: up to kMaxStops stops,...
Definition gui_style_gradient.h:303
What a GradientField's swatch keeps besides its style: the gradient it was drawn from,...
Definition gui_gradient_editor_subsystem.h:70
std::string context
the field's label
Definition gui_gradient_editor_subsystem.h:75
GradientEditLimits limits
Definition gui_gradient_editor_subsystem.h:74
tachyon::Gradient original8
a Gradient field's own, restored exactly on Cancel
Definition gui_gradient_editor_subsystem.h:73
bool drawnSet
Definition gui_gradient_editor_subsystem.h:72
tachyon::GradientF drawn
the gradient as last drawn
Definition gui_gradient_editor_subsystem.h:71
Up to kMaxStops color stops plus an angle and interpolation color space.
Definition gui_style_gradient.h:93
static constexpr int kMaxStops
capacity of stops
Definition gui_style_gradient.h:94
A 64-bit element ID whose bit layout depends on its IDMode.
Definition gui_id.h:23
static constexpr ID Invalid()
The "no element" ID (all bits zero); also the default for optional ID parameters.
Definition gui_id.h:66
Definition gui_swatch_styles.h:24
VisualColorStyleIndex index
Invalid until the caller makes it.
Definition gui_swatch_styles.h:25
Definition gui_base_types.h:394