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

Gradient editor popup state: edits a working copy, written back each frame it's open. More...

#include <gui_controls/subsystems/gui_gradient_editor_subsystem.h>

Classes

struct  DragSnapshot
 What a stop's drag changes, as it was at the press; put back by Escape. More...

Public Types

enum class  CloseRequest { None , Ok , Cancel }
 OK keeps the gradient, Cancel and the close button restore the original one. More...

Public Attributes

tachyon::ID triggerID = tachyon::ID::Invalid()
 swatch that opened the editor
tachyon::ID windowID = tachyon::ID::Invalid()
 popup window ID
tachyon::GradientF workingCopy {}
 the gradient being edited
GradientEditLimits limits {}
 what the field's gradient can have
int selectedStop = 0
 index into workingCopy.stops
tachyon::color4f selectedStopColor {}
 selected stop's color, for its ColorField
float selectedStopPosition = 0.0f
 selected stop's position, for its Field
tachyon::GradientF originalGradient {}
 to restore on Cancel
tachyon::Gradient originalGradient8 {}
 a Gradient field's own, restored exactly
std::string context
 the field's label, shown after the title
enum tachyon::GradientEditorState::CloseRequest closeRequest = CloseRequest::None
std::vector< tachyon::GradientF > savedPresets
 "Save preset", for the session
tachyon::Gesture< DragSnapshot > press
 the press on a stop, a drag from the start
int dragStopIndex = -1
 the dragged stop, or -1
float dragGrab = 0.0f
 cursor minus the stop's offset at the press, so it doesn't jump
bool dragOff = false
 dragged well below the bar: removed on release
tachyon::VisualColorStyleIndex previewGradientStyle = tachyon::VisualColorStyleIndex::Invalid
tachyon::VisualColorStyleIndex stopEdgeColor = tachyon::VisualColorStyleIndex::Invalid
tachyon::VisualColorStyleIndex stopOutlineColor = tachyon::VisualColorStyleIndex::Invalid
tachyon::VisualColorStyleIndex stopHaloColor = tachyon::VisualColorStyleIndex::Invalid

Detailed Description

Gradient editor popup state: edits a working copy, written back each frame it's open.

Member Enumeration Documentation

◆ CloseRequest

OK keeps the gradient, Cancel and the close button restore the original one.

Handled by the GradientField on its next frame.

Enumerator
None 
Ok 
Cancel 

Member Data Documentation

◆ triggerID

tachyon::ID tachyon::GradientEditorState::triggerID = tachyon::ID::Invalid()

swatch that opened the editor

◆ windowID

tachyon::ID tachyon::GradientEditorState::windowID = tachyon::ID::Invalid()

popup window ID

◆ workingCopy

tachyon::GradientF tachyon::GradientEditorState::workingCopy {}

the gradient being edited

◆ limits

GradientEditLimits tachyon::GradientEditorState::limits {}

what the field's gradient can have

◆ selectedStop

int tachyon::GradientEditorState::selectedStop = 0

index into workingCopy.stops

◆ selectedStopColor

tachyon::color4f tachyon::GradientEditorState::selectedStopColor {}

selected stop's color, for its ColorField

◆ selectedStopPosition

float tachyon::GradientEditorState::selectedStopPosition = 0.0f

selected stop's position, for its Field

◆ originalGradient

tachyon::GradientF tachyon::GradientEditorState::originalGradient {}

to restore on Cancel

◆ originalGradient8

tachyon::Gradient tachyon::GradientEditorState::originalGradient8 {}

a Gradient field's own, restored exactly

◆ context

std::string tachyon::GradientEditorState::context

the field's label, shown after the title

◆ closeRequest

enum tachyon::GradientEditorState::CloseRequest tachyon::GradientEditorState::closeRequest = CloseRequest::None

◆ savedPresets

std::vector<tachyon::GradientF> tachyon::GradientEditorState::savedPresets

"Save preset", for the session

◆ press

tachyon::Gesture<DragSnapshot> tachyon::GradientEditorState::press

the press on a stop, a drag from the start

◆ dragStopIndex

int tachyon::GradientEditorState::dragStopIndex = -1

the dragged stop, or -1

◆ dragGrab

float tachyon::GradientEditorState::dragGrab = 0.0f

cursor minus the stop's offset at the press, so it doesn't jump

◆ dragOff

bool tachyon::GradientEditorState::dragOff = false

dragged well below the bar: removed on release

◆ previewGradientStyle

tachyon::VisualColorStyleIndex tachyon::GradientEditorState::previewGradientStyle = tachyon::VisualColorStyleIndex::Invalid

◆ stopEdgeColor

tachyon::VisualColorStyleIndex tachyon::GradientEditorState::stopEdgeColor = tachyon::VisualColorStyleIndex::Invalid

◆ stopOutlineColor

tachyon::VisualColorStyleIndex tachyon::GradientEditorState::stopOutlineColor = tachyon::VisualColorStyleIndex::Invalid

◆ stopHaloColor

tachyon::VisualColorStyleIndex tachyon::GradientEditorState::stopHaloColor = tachyon::VisualColorStyleIndex::Invalid

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