TachyonUI 0.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>

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::Gradient workingCopy {}
 the gradient being edited
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::Gradient originalGradient {}
 to restore on Cancel
std::string context
 the field's label, shown after the title
enum tachyon::GradientEditorState::CloseRequest closeRequest = CloseRequest::None
std::vector< tachyon::Gradient > savedPresets
 "Save preset", for the session
tachyon::PointerDrag 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::Gradient beforeDrag {}
 the gradient before the drag; put back by Escape
int selectedBeforeDrag = 0
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::Gradient tachyon::GradientEditorState::workingCopy {}

the gradient being edited

◆ 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::Gradient tachyon::GradientEditorState::originalGradient {}

to restore on Cancel

◆ 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::Gradient> tachyon::GradientEditorState::savedPresets

"Save preset", for the session

◆ press

tachyon::PointerDrag 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

◆ beforeDrag

tachyon::Gradient tachyon::GradientEditorState::beforeDrag {}

the gradient before the drag; put back by Escape

◆ selectedBeforeDrag

int tachyon::GradientEditorState::selectedBeforeDrag = 0

◆ 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: