4#include <unordered_map>
75 std::unordered_map<tachyon::ID, tachyon::VisualColorStyleIndex> m_swatchStyles, m_prevSwatchStyles;
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.
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:59
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,...
@ None
Definition gui_element_flags.h:19
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
Gradient editor popup state: edits a working copy, written back each frame it's open.
Definition gui_gradient_editor_subsystem.h:22
tachyon::PointerDrag press
the press on a stop, a drag from the start
Definition gui_gradient_editor_subsystem.h:38
CloseRequest
OK keeps the gradient, Cancel and the close button restore the original one.
Definition gui_gradient_editor_subsystem.h:35
@ None
Definition gui_gradient_editor_subsystem.h:35
tachyon::VisualColorStyleIndex previewGradientStyle
Definition gui_gradient_editor_subsystem.h:45
std::string context
the field's label, shown after the title
Definition gui_gradient_editor_subsystem.h:31
tachyon::Gradient workingCopy
the gradient being edited
Definition gui_gradient_editor_subsystem.h:25
bool dragOff
dragged well below the bar: removed on release
Definition gui_gradient_editor_subsystem.h:41
tachyon::ID triggerID
swatch that opened the editor
Definition gui_gradient_editor_subsystem.h:23
tachyon::VisualColorStyleIndex stopHaloColor
Definition gui_gradient_editor_subsystem.h:48
int selectedBeforeDrag
Definition gui_gradient_editor_subsystem.h:43
tachyon::Gradient originalGradient
to restore on Cancel
Definition gui_gradient_editor_subsystem.h:30
tachyon::VisualColorStyleIndex stopOutlineColor
Definition gui_gradient_editor_subsystem.h:47
enum tachyon::GradientEditorState::CloseRequest closeRequest
int dragStopIndex
the dragged stop, or -1
Definition gui_gradient_editor_subsystem.h:39
tachyon::VisualColorStyleIndex stopEdgeColor
Definition gui_gradient_editor_subsystem.h:46
tachyon::ID windowID
popup window ID
Definition gui_gradient_editor_subsystem.h:24
int selectedStop
index into workingCopy.stops[]
Definition gui_gradient_editor_subsystem.h:26
tachyon::Gradient beforeDrag
the gradient before the drag; put back by Escape
Definition gui_gradient_editor_subsystem.h:42
std::vector< tachyon::Gradient > savedPresets
"Save preset", for the session
Definition gui_gradient_editor_subsystem.h:36
float dragGrab
cursor minus the stop's offset at the press, so it doesn't jump
Definition gui_gradient_editor_subsystem.h:40
float selectedStopPosition
selected stop's position, for its Field
Definition gui_gradient_editor_subsystem.h:28
tachyon::color4f selectedStopColor
selected stop's color, for its ColorField
Definition gui_gradient_editor_subsystem.h:27
Up to kMaxStops color stops plus an angle and interpolation color space.
Definition gui_style_gradient.h:91
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
One press on an element that may become a drag.
Definition gui_pointer_drag.h:41
Definition gui_base_types.h:395