17#include <unordered_map>
18#include <unordered_set>
43 std::optional<PropertyEndpoint>
input;
64 std::function<std::string()>
value;
137 std::optional<std::vector<tachyon::ID>>
members;
245 std::vector<std::pair<PropertyEndpoint, int>>
fed;
246 std::vector<std::pair<uint32_t, WireRouteOverrides>>
lanes;
317 std::vector<std::pair<int, NodeFrame>>
frames;
318 std::vector<std::pair<int, tachyon::int2>>
nodes;
390 std::function<bool(
const NodeGraph& graph,
472 std::unordered_set<tachyon::ID>
nodes;
581 template<
class Graph,
class State>
588 template<
class View>
requires std::is_convertible_v<View&, Graph&> && std::is_convertible_v<View&, State&>
590 template<
class G,
class S>
requires std::is_convertible_v<G&, Graph&> && std::is_convertible_v<S&, State&>
BasicNodeViewRef< const NodeGraph, const NodeViewState > ConstNodeViewRef
Definition gui_node_view_types.h:594
FrameEdges
Which edges of a frame a resize moves.
Definition gui_node_view_types.h:307
NodeViewKind
What a node view edits: a graph of nodes with fields wired output to input, or a state machine,...
Definition gui_node_view_types.h:100
BasicNodeViewRef< NodeGraph, NodeViewState > NodeViewRef
Definition gui_node_view_types.h:593
WireHandle
Interior lane a drag handle adjusts: the corridor route's vertical lane (LaneX), or the detour route'...
Definition gui_node_view_types.h:162
NodeWireShape
How a node view draws its wires (NodeGraph::wireShape).
Definition gui_node_view_types.h:208
@ Corner
Definition gui_node_view_types.h:307
@ None
Definition gui_node_view_types.h:307
@ Graph
nodes with properties and sockets, wired output to input
Definition gui_node_view_types.h:101
@ StateMachine
states (nodes without properties) and transitions between them
Definition gui_node_view_types.h:102
@ LaneY
Definition gui_node_view_types.h:162
@ EntryX
Definition gui_node_view_types.h:162
@ None
Definition gui_node_view_types.h:162
@ ExitX
Definition gui_node_view_types.h:162
@ LaneX
Definition gui_node_view_types.h:162
@ Curved
one smooth curve from output to input
Definition gui_node_view_types.h:210
@ Orthogonal
along the grid, round the nodes, with lanes that drag
Definition gui_node_view_types.h:209
@ None
Definition gui_element_flags.h:18
@ Bottom
Definition gui_style.h:255
Definition gui_logging.h:24
A graph and one view of it, as RenderNodeView and the helpers take them: a NodeView passes as one,...
Definition gui_node_view_types.h:583
NodeViewState & state
Definition gui_node_view_types.h:585
BasicNodeViewRef(Graph &g, State &s)
Definition gui_node_view_types.h:587
BasicNodeViewRef(View &view)
Definition gui_node_view_types.h:589
BasicNodeViewRef(const BasicNodeViewRef< G, S > &other)
Definition gui_node_view_types.h:591
NodeGraph & graph
Definition gui_node_view_types.h:584
Last frame's draggable segment (node.pos space), for laying out its grab element.
Definition gui_node_view_types.h:216
uint32_t wireKey
Definition gui_node_view_types.h:217
bool vertical
Definition gui_node_view_types.h:219
tachyon::int2 a
Definition gui_node_view_types.h:220
tachyon::int2 b
Definition gui_node_view_types.h:220
WireHandle role
Definition gui_node_view_types.h:218
Click-gesture tracker, owned per widget instance so instances (and tests) don't share it.
Definition gui_widget_state_types.h:77
A wire as drawn this frame, for hit-testing; points in node.pos space.
Definition gui_node_view_types.h:287
std::vector< tachyon::int2 > points
Definition gui_node_view_types.h:289
bool curved
as WireRoute::curved
Definition gui_node_view_types.h:290
uint32_t wireKey
Definition gui_node_view_types.h:288
A press on a frame's title or one of its edges, and what it moves.
Definition gui_node_view_types.h:311
tachyon::ID frameID
Definition gui_node_view_types.h:313
tachyon::Gesture press
a move's press becomes a drag past the drag distance; a resize's at once
Definition gui_node_view_types.h:312
std::vector< std::pair< int, tachyon::int2 > > nodes
Definition gui_node_view_types.h:318
FrameEdges edges
None: a move, by the title.
Definition gui_node_view_types.h:314
std::vector< std::pair< int, NodeFrame > > frames
At the press: the frames it moves (it, and those inside it) and the nodes inside them,...
Definition gui_node_view_types.h:317
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
GesturePhase Phase() const noexcept
Definition gui_gesture.h:67
The part of a drawn control under the pointer (a key, a handle, a clip's end), for its hover look.
Definition gui_gesture.h:115
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_base_types.h:406
A frame (a comment box): a titled, colored box behind a group of nodes.
Definition gui_node_view_types.h:119
bool operator==(const NodeFrame &) const =default
tachyon::ID stableID
Assigned once on creation, as a node's: the ID of its elements and of its selection.
Definition gui_node_view_types.h:122
bool collapsed
Shown as one node: its title bar, and a row for each wire crossing its edge, an input on the left for...
Definition gui_node_view_types.h:132
tachyon::int2 size
width and height, the title bar included, while expanded
Definition gui_node_view_types.h:128
std::optional< std::vector< tachyon::ID > > members
While collapsed: the nodes and frames it held when it collapsed, by stableID.
Definition gui_node_view_types.h:137
tachyon::color4f color
Its tint; alpha 0 uses the theme's neutral one.
Definition gui_node_view_types.h:126
tachyon::int2 pos
top-left, in node.pos space
Definition gui_node_view_types.h:127
std::string title
shown in its title bar; double-click to rename
Definition gui_node_view_types.h:123
What a node view's graph is: its nodes, frames and wires (or a state machine's states and transitions...
Definition gui_node_view_types.h:353
tachyon::ID activeState
The state the machine is in, as the app runs it: ringed. Invalid: none.
Definition gui_node_view_types.h:366
uint32_t revision
Goes up by one with each edit applied (ApplyNodeViewEdit).
Definition gui_node_view_types.h:396
std::function< void(const NodeViewEdit &)> onEdit
Called once per finished user edit (a whole drag is one), after it is applied.
Definition gui_node_view_types.h:387
std::vector< NodeFrame > frames
Frames, drawn behind the nodes and wires, the first at the back.
Definition gui_node_view_types.h:372
bool snapToGrid
Keeps node positions on the grid: dragged nodes land on it, and positions set in code are moved onto ...
Definition gui_node_view_types.h:378
std::function< bool(const NodeGraph &graph, PropertyEndpoint output, PropertyEndpoint input)> canConnect
Whether an output -> input wire is allowed; null allows any.
Definition gui_node_view_types.h:392
tachyon::ID initialState
where the machine starts: marked with an arrow in
Definition gui_node_view_types.h:364
std::vector< int > ordering
Z-order, last == front (a clicked node moves there).
Definition gui_node_view_types.h:374
float activeStateTime
How long the machine has been in activeState, in seconds, shown under it ("1.24 s"); negative shows n...
Definition gui_node_view_types.h:369
std::unordered_map< uint32_t, WireRouteOverrides > wireOverrides
Pinned wire lanes, keyed by WireKey() of the wire's target endpoint.
Definition gui_node_view_types.h:384
std::vector< NodeModel > nodes
the graph; endpoints and edits refer to nodes by index
Definition gui_node_view_types.h:354
NodeViewKind kind
A graph of fields and wires, or a state machine.
Definition gui_node_view_types.h:357
std::vector< StateTransition > transitions
Definition gui_node_view_types.h:363
NodeWireShape wireShape
Orthogonal: wires run along the grid, round the nodes, their lanes dragged by hand.
Definition gui_node_view_types.h:382
Internal: a socket of a node hidden in a collapsed frame, on that frame's box edge.
Definition gui_node_view_types.h:335
int node
Definition gui_node_view_types.h:336
int prop
Definition gui_node_view_types.h:337
int row
the box's row it's on
Definition gui_node_view_types.h:339
bool output
Definition gui_node_view_types.h:338
Internal: a list per node, all in one array, refilled each frame in the storage it has.
Definition gui_node_view_types.h:324
std::span< const T > operator[](size_t n) const
Definition gui_node_view_types.h:330
std::vector< uint32_t > first
node n's are items[first[n] .. first[n + 1])
Definition gui_node_view_types.h:326
std::span< T > operator[](size_t n)
Definition gui_node_view_types.h:329
size_t size() const
Definition gui_node_view_types.h:328
std::vector< T > items
Definition gui_node_view_types.h:325
One node of a node view.
Definition gui_node_view_types.h:69
bool hidden
Internal: inside a collapsed frame, as last drawn: not shown, clicked or selected.
Definition gui_node_view_types.h:91
std::string category
Category name, shown right-aligned in the header.
Definition gui_node_view_types.h:76
bool collapsed
rows hidden, header only (double-click toggles)
Definition gui_node_view_types.h:83
tachyon::int2 startPos
internal: pos at drag start
Definition gui_node_view_types.h:81
bool reroute
A reroute: a dot that a wire passes through, a waypoint, instead of a box.
Definition gui_node_view_types.h:88
tachyon::int2 lastSize
outer-rect size from last frame's layout
Definition gui_node_view_types.h:82
tachyon::ID stableID
Assigned once on creation; the node's element ID and the salt for its sub-IDs, so ID-keyed state surv...
Definition gui_node_view_types.h:72
std::vector< NodeProperty > properties
the rows, top to bottom
Definition gui_node_view_types.h:89
bool subMachine
In a state machine (NodeViewKind::StateMachine): the state holds a machine of its own.
Definition gui_node_view_types.h:94
tachyon::color4f categoryColor
Color of the header's category square; alpha 0 uses the accent.
Definition gui_node_view_types.h:78
std::string title
header text
Definition gui_node_view_types.h:74
tachyon::int2 pos
Top-left in canvas layout space (whole pixels relative to the canvas, before pan/zoom).
Definition gui_node_view_types.h:80
One row of a node: an optional input socket, a body, and an optional output socket.
Definition gui_node_view_types.h:41
std::function< std::string()> value
Definition gui_node_view_types.h:64
std::string type
Definition gui_node_view_types.h:63
std::function< void()> renderBody
Row body, built between the two sockets; may call any widget (Label, Field, ...).
Definition gui_node_view_types.h:49
bool output
Right socket, rendered when true. It drives every input that names it as its source.
Definition gui_node_view_types.h:46
int rowSpan
Row height in row pitches, for tall bodies (previews, multi-line).
Definition gui_node_view_types.h:56
tachyon::color4f socketColor
Socket dot colour, also used for wires leaving this output.
Definition gui_node_view_types.h:52
std::optional< PropertyEndpoint > input
Left socket, rendered when has_value(); holds the source output feeding it (one at most).
Definition gui_node_view_types.h:43
std::string name
What its sockets' tooltip says: the pin's name, its type (muted, monospace) and its value now,...
Definition gui_node_view_types.h:62
A node (index) collapsed or expanded.
Definition gui_node_view_types.h:232
bool from
Definition gui_node_view_types.h:232
int node
Definition gui_node_view_types.h:232
bool to
Definition gui_node_view_types.h:232
A frame (index) moved, resized, renamed or recolored: all of it before and after.
Definition gui_node_view_types.h:250
NodeFrame to
Definition gui_node_view_types.h:250
NodeFrame from
Definition gui_node_view_types.h:250
int frame
Definition gui_node_view_types.h:250
A frame added at index (or, when !added, taken from there); the frames after it move up or down one.
Definition gui_node_view_types.h:253
NodeFrame frame
Definition gui_node_view_types.h:253
bool added
Definition gui_node_view_types.h:253
int index
Definition gui_node_view_types.h:253
The initial state changed (by stableID; Invalid: none).
Definition gui_node_view_types.h:260
tachyon::ID from
Definition gui_node_view_types.h:260
tachyon::ID to
Definition gui_node_view_types.h:260
A wire's (by WireKey) lane overrides changed; default means no overrides.
Definition gui_node_view_types.h:234
uint32_t wireKey
Definition gui_node_view_types.h:234
WireRouteOverrides to
Definition gui_node_view_types.h:234
WireRouteOverrides from
Definition gui_node_view_types.h:234
A node (index) moved; positions in node.pos space.
Definition gui_node_view_types.h:228
tachyon::int2 from
Definition gui_node_view_types.h:228
tachyon::int2 to
Definition gui_node_view_types.h:228
int node
Definition gui_node_view_types.h:228
A node added at index (or, when !added, taken from there), with the wires from its outputs into other...
Definition gui_node_view_types.h:240
NodeModel node
Definition gui_node_view_types.h:243
std::vector< std::pair< uint32_t, WireRouteOverrides > > lanes
WireKey -> overrides.
Definition gui_node_view_types.h:246
std::vector< std::pair< PropertyEndpoint, int > > fed
Another node's input and the property of this node whose output feeds it.
Definition gui_node_view_types.h:245
bool added
Definition gui_node_view_types.h:242
int index
Definition gui_node_view_types.h:241
An input's source changed; an invalid endpoint means unwired.
Definition gui_node_view_types.h:230
PropertyEndpoint to
Definition gui_node_view_types.h:230
PropertyEndpoint from
Definition gui_node_view_types.h:230
PropertyEndpoint input
Definition gui_node_view_types.h:230
A transition (index) relabelled or redirected: all of it before and after.
Definition gui_node_view_types.h:258
StateTransition from
Definition gui_node_view_types.h:258
StateTransition to
Definition gui_node_view_types.h:258
int index
Definition gui_node_view_types.h:258
A transition added at index (or, when !added, taken from there); the ones after it move up or down on...
Definition gui_node_view_types.h:256
StateTransition transition
Definition gui_node_view_types.h:256
bool added
Definition gui_node_view_types.h:256
int index
Definition gui_node_view_types.h:256
One thing the user did in a node view, as values before and after, so a host can keep the undo histor...
Definition gui_node_view_types.h:226
std::vector< Transition > transitions
Applied before transitionChanges, and undone after.
Definition gui_node_view_types.h:272
std::vector< Move > moves
Definition gui_node_view_types.h:262
std::optional< Initial > initial
Definition gui_node_view_types.h:274
std::vector< Frame > frames
Applied before frameChanges, as nodes are, and undone after.
Definition gui_node_view_types.h:270
std::vector< Rewire > rewires
Definition gui_node_view_types.h:263
std::vector< FrameChange > frameChanges
Definition gui_node_view_types.h:268
std::vector< Node > nodes
Applied before the others (so a rewire may name an added node) and undone after.
Definition gui_node_view_types.h:267
std::vector< TransitionChange > transitionChanges
Definition gui_node_view_types.h:273
std::vector< Collapse > collapses
Definition gui_node_view_types.h:264
std::vector< Lanes > lanes
Definition gui_node_view_types.h:265
bool empty() const
True when nothing changed.
Definition gui_node_view_types.h:277
What a marquee starts from: the selection before it, put back by Escape, and the modifiers held at it...
Definition gui_node_view_types.h:471
bool ctrl
Definition gui_node_view_types.h:475
bool shift
Definition gui_node_view_types.h:474
std::unordered_set< tachyon::ID > nodes
the nodes selected
Definition gui_node_view_types.h:472
std::unordered_set< tachyon::ID > frames
the frames selected
Definition gui_node_view_types.h:473
How one view shows a NodeGraph: its pan and zoom, what's selected in it, what the user is doing in it...
Definition gui_node_view_types.h:403
tachyon::int2 transitionPointer
Definition gui_node_view_types.h:546
WireSegmentDrag wireDrag
Definition gui_node_view_types.h:484
std::vector< int > nodeHiddenBy
the collapsed frame hiding each node, or -1
Definition gui_node_view_types.h:524
std::vector< std::vector< PropertyEndpoint > > framePortsIn
Each collapsed frame's rows: the inputs wired from outside it, and the outputs inside it feeding a no...
Definition gui_node_view_types.h:529
std::unordered_set< tachyon::ID > selectedTransitionIDs
selected transition stableIDs
Definition gui_node_view_types.h:404
std::unordered_set< tachyon::ID > reportedSelection
internal: the selection last reported
Definition gui_node_view_types.h:460
tachyon::int2 lastInnerSize
last frame's canvas size, for centering
Definition gui_node_view_types.h:439
tachyon::int2 marqueeCurrentScreen
Definition gui_node_view_types.h:480
tachyon::Gesture< tachyon::float3x2 > pan
Internal: the view dragged (middle, or Alt + left); once dragged, not a click.
Definition gui_node_view_types.h:536
std::optional< tachyon::ID > transitionMenuTransition
internal: the transition the open menu is for
Definition gui_node_view_types.h:560
std::optional< float2 > canvasMenuPos
internal: where the open canvas menu is for
Definition gui_node_view_types.h:505
CommandMode commandMode
Command mode set while the canvas has focus.
Definition gui_node_view_types.h:449
std::string portText
a collapsed frame's port name, as built
Definition gui_node_view_types.h:532
std::vector< uint32_t > drivenOutputs
the wired outputs' WireKeys, sorted
Definition gui_node_view_types.h:523
std::function< void()> onSelectionChanged
Called when the selection changed, once per RenderNodeView that finds it changed: by the user (clicks...
Definition gui_node_view_types.h:456
tachyon::Gesture nodeDrag
internal: the press on a node; moves the selection once dragged
Definition gui_node_view_types.h:538
std::function< void(PropertyEndpoint from, bool fromOutput, float2 canvasPos)> onWireDroppedOnCanvas
A new wire was released over the empty canvas (not on a node), e.g.
Definition gui_node_view_types.h:493
float2 wireMenuPos
internal: where on the canvas it was opened
Definition gui_node_view_types.h:495
std::function< void(float2 canvasPos)> onCanvasContextMenu
Builds the canvas's context menu (MenuItem and the like), each frame while it's open; without it ther...
Definition gui_node_view_types.h:500
tachyon::ID transitionFrom
Definition gui_node_view_types.h:545
std::vector< CachedWireHandle > wireHandleCache
Last frame's draggable segments, since grab elements are laid out before routing.
Definition gui_node_view_types.h:483
float minZoom
The zoom range (1 = 100%) the wheel, the keys and the zoom controls stay in.
Definition gui_node_view_types.h:425
std::vector< std::pair< tachyon::ID, int > > nodesByID
(stableID, index), sorted: a collapsed frame's members
Definition gui_node_view_types.h:530
std::unordered_set< tachyon::ID > reportedFrameSelection
internal: the frames selected last reported
Definition gui_node_view_types.h:461
std::vector< tachyon::IntRect > hiddenBox
that frame's box, for a hidden node with crossing wires
Definition gui_node_view_types.h:525
bool showZoomControls
zoom overlay, bottom-left
Definition gui_node_view_types.h:421
tachyon::Gesture transitionDrag
Internal: a transition being drawn from a state's edge, the state it leaves, and where the pointer is...
Definition gui_node_view_types.h:544
std::unordered_set< tachyon::ID > selectedFrameIDs
Selected frame stableIDs.
Definition gui_node_view_types.h:413
std::vector< tachyon::ElementRef > nodeRefs
each node's element, as last built
Definition gui_node_view_types.h:522
std::optional< tachyon::ID > frameMenuFrame
internal: the stableID the open frame menu is for
Definition gui_node_view_types.h:507
bool renameFocused
internal: the field has had the focus
Definition gui_node_view_types.h:512
NodeLists< NodeHiddenPort > hiddenPorts
a hidden node's sockets on that box
Definition gui_node_view_types.h:526
bool virtualizeLayout
Lays out (and calls renderBody for) only the nodes in or near view: one far out of view stands in as ...
Definition gui_node_view_types.h:431
std::string renameText
internal: its title as edited so far
Definition gui_node_view_types.h:511
std::unordered_set< tachyon::ID > selectedNodeIDs
Selected node stableIDs.
Definition gui_node_view_types.h:452
tachyon::HoverPart< tachyon::ID > stateEdgeHover
Internal: the state whose edge is under the pointer (a transition starts there).
Definition gui_node_view_types.h:551
tachyon::int2 lastGridOrigin
Last frame's canvas border box less its content box: node.pos is measured from the border box,...
Definition gui_node_view_types.h:445
std::function< void(int frame)> onFrameContextMenu
As onNodeContextMenu, for frame frame (an index into frames): a right click on its title opens it and...
Definition gui_node_view_types.h:416
bool showMinimap
minimap overlay, bottom-right
Definition gui_node_view_types.h:422
tachyon::HoverPart< std::optional< tachyon::ID > > hoveredTransition
Internal: the transition under the pointer, from the last frame: highlighted, and what a click select...
Definition gui_node_view_types.h:554
NodeLists< tachyon::ElementRef > socketRefs
Definition gui_node_view_types.h:521
tachyon::ID canvasID
Internal: the canvas element as last built; its nodes' element IDs are scoped under it (NodeElementID...
Definition gui_node_view_types.h:570
FrameDrag frameDrag
internal: a frame being moved or resized
Definition gui_node_view_types.h:508
uint32_t seenRevision
Internal: the graph's revision this view last saw (NodeGraph::revision).
Definition gui_node_view_types.h:567
PendingConnection pendingConnection
internal: the wire being dragged
Definition gui_node_view_types.h:437
std::vector< std::pair< tachyon::ID, int > > framesByID
Definition gui_node_view_types.h:531
std::function< void(int node)> onNodeContextMenu
As onCanvasContextMenu, for node node (an index into nodes): opened by a right click on it,...
Definition gui_node_view_types.h:504
std::optional< uint32_t > wireMenuWire
the wire the open context menu is for
Definition gui_node_view_types.h:494
tachyon::Gesture menuPress
internal: a right press; its release without a drag opens a menu
Definition gui_node_view_types.h:537
DoubleClickTracker frameDoubleClick
internal: a double-click on a title renames
Definition gui_node_view_types.h:509
std::vector< tachyon::IntRect > frameBoxes
Internal: each frame's box as last drawn, by index (node.pos space): a collapsed one's node-like box,...
Definition gui_node_view_types.h:516
float minimapScale
Last frame's minimap mapping (canvas = origin + minimap pixels / scale), for clicks.
Definition gui_node_view_types.h:434
float maxZoom
Definition gui_node_view_types.h:426
std::vector< std::string > breadcrumb
Breadcrumb overlay at the canvas top-left, shown when non-empty.
Definition gui_node_view_types.h:419
bool transitionPicking
Internal: a transition started from a menu (StartTransition): it follows the pointer until a click on...
Definition gui_node_view_types.h:549
std::function< void(int transition)> onTransitionContextMenu
As onNodeContextMenu, for transition transition (an index into transitions): a right click on its arr...
Definition gui_node_view_types.h:410
DoubleClickTracker nodeDoubleClick
Double-click-to-collapse, per view so views (and test frames) don't share it.
Definition gui_node_view_types.h:466
tachyon::Gesture< MarqueeStart > marquee
A press on the empty background: a marquee once it moves the drag distance.
Definition gui_node_view_types.h:479
std::vector< std::vector< PropertyEndpoint > > framePortsOut
Definition gui_node_view_types.h:529
std::optional< tachyon::ID > nodeMenuNode
internal: the stableID the open node menu is for
Definition gui_node_view_types.h:506
tachyon::float3x2 transform
identity = centered view (no pan/zoom)
Definition gui_node_view_types.h:438
tachyon::float2 minimapOrigin
Definition gui_node_view_types.h:435
DoubleClickTracker transitionClicks
internal: a double-click on a transition relabels it
Definition gui_node_view_types.h:555
uint32_t selectionGeneration
Goes up by one each time onSelectionChanged would be called, for an app that would rather compare it ...
Definition gui_node_view_types.h:459
std::function< void(int node)> onOpenState
A double-click on a state that holds a machine of its own (NodeModel::subMachine): open it,...
Definition gui_node_view_types.h:407
std::optional< tachyon::ID > renamingFrame
internal: the frame whose title is being edited
Definition gui_node_view_types.h:510
tachyon::ID revealedFocusID
internal: the focus last scrolled into view
Definition gui_node_view_types.h:446
std::function< void(int)> onBreadcrumb
called with the clicked segment index
Definition gui_node_view_types.h:420
std::vector< std::pair< tachyon::ID, tachyon::IntRect > > transitionLabelBoxes
Internal: each transition's label chip as last laid out (node.pos space): a click on it is a click on...
Definition gui_node_view_types.h:558
tachyon::ID lastClickedNodeID
StableID of the last clicked node.
Definition gui_node_view_types.h:463
std::optional< tachyon::ID > renamingTransition
internal: the transition whose label is being edited
Definition gui_node_view_types.h:559
std::unordered_map< uint32_t, tachyon::VisualColorStyleIndex > wireColorStyles
This frame's colors from the app (sockets, nodes, frames): packed RGBA -> its color style,...
Definition gui_node_view_types.h:565
int32_t gridSize
internal: the grid the view was last drawn with
Definition gui_node_view_types.h:513
tachyon::IntRect lastCanvasRect
Last frame's canvas padding box, in screen pixels (as events have them), for NodeViewScreenToCanvas a...
Definition gui_node_view_types.h:442
tachyon::HoverPart< std::optional< uint32_t > > hoveredWire
The wire under the mouse (by WireKey), from the last frame: highlighted, removed by a middle click,...
Definition gui_node_view_types.h:488
tachyon::Gesture< tachyon::float3x2 > minimapDrag
Internal: a press in the minimap; the transform before it, put back by Escape.
Definition gui_node_view_types.h:540
tachyon::ID focusedNodeID
internal: the node holding the focus last frame
Definition gui_node_view_types.h:447
A graph shown in one place: the graph and the one view of it together.
Definition gui_node_view_types.h:576
A wire being dragged. Committed wires are the reciprocal endpoints on NodeProperty.
Definition gui_node_view_types.h:144
std::optional< PropertyEndpoint > detachedInput
the input the wire was pulled off, if any
Definition gui_node_view_types.h:157
tachyon::int2 currentScreen
most recent mouse screen pos
Definition gui_node_view_types.h:153
PropertyEndpoint target
This frame: the socket it is over and may connect to (an input, or an output when fromInput).
Definition gui_node_view_types.h:156
bool IsActive() const
A wire drag is in progress: the press has become a drag.
Definition gui_node_view_types.h:149
bool fromInput
dragged from an input, towards an output
Definition gui_node_view_types.h:152
PropertyEndpoint source
The socket the wire starts from: an output, or an unwired input when fromInput.
Definition gui_node_view_types.h:151
tachyon::Gesture press
The socket's press.
Definition gui_node_view_types.h:147
A property on a node. Default-constructed is invalid: in a socket it means "present,...
Definition gui_node_view_types.h:30
int nodeIdx
index into NodeGraph::nodes
Definition gui_node_view_types.h:31
bool operator==(const PropertyEndpoint &) const =default
bool valid() const
True when both indices are set.
Definition gui_node_view_types.h:35
int propIdx
index into that node's properties
Definition gui_node_view_types.h:32
A transition of a state machine: from one state to another, or to itself.
Definition gui_node_view_types.h:107
tachyon::ID from
the state it leaves, by stableID
Definition gui_node_view_types.h:109
tachyon::ID to
the state it enters (from for a loop)
Definition gui_node_view_types.h:110
tachyon::ID stableID
assigned once on creation, as a node's
Definition gui_node_view_types.h:108
std::string label
shown on its arrow: an event or a condition
Definition gui_node_view_types.h:111
bool operator==(const StateTransition &) const =default
A wire's place among the wires between the same two nodes, so their default lanes nest instead of coi...
Definition gui_node_view_types.h:167
int32_t index
by input, top first
Definition gui_node_view_types.h:169
int32_t offset
grid steps right for the corridor lane
Definition gui_node_view_types.h:168
int32_t count
wires in the group
Definition gui_node_view_types.h:170
bool operator==(const WireLane &) const =default
User-pinned lanes of one wire (unset = default), in the route's space.
Definition gui_node_view_types.h:178
std::optional< int32_t > laneX
corridor vertical lane X
Definition gui_node_view_types.h:179
std::optional< int32_t > exitX
detour vertical lane near the output
Definition gui_node_view_types.h:180
std::optional< int32_t > laneY
detour horizontal return-lane Y
Definition gui_node_view_types.h:182
bool operator==(const WireRouteOverrides &) const =default
std::optional< int32_t > entryX
detour vertical lane near the input
Definition gui_node_view_types.h:181
WireLane lane
where the unpinned lanes go in its group
Definition gui_node_view_types.h:183
Polyline plus its draggable interior segments (never the end stubs).
Definition gui_node_view_types.h:198
std::vector< tachyon::int2 > points
the polyline, output to input
Definition gui_node_view_types.h:199
bool curved
The points are a curved line's four instead: output, two control points, input (see WireCurvePoint).
Definition gui_node_view_types.h:203
std::vector< WireSegmentHandle > handles
Definition gui_node_view_types.h:200
Segment drag via mouse capture rather than DnD, so the resize cursor sticks.
Definition gui_node_view_types.h:295
bool vertical
Definition gui_node_view_types.h:301
int32_t startValue
lane coordinate at drag start (node.pos space)
Definition gui_node_view_types.h:302
uint32_t wireKey
Definition gui_node_view_types.h:299
WireHandle role
Definition gui_node_view_types.h:300
tachyon::Gesture< WireRouteOverrides > press
The handle's press, a drag from the start; the wire's overrides as they were, for the edit and for Es...
Definition gui_node_view_types.h:298
Draggable interior segment; vertical segments drag horizontally and vice versa.
Definition gui_node_view_types.h:190
WireHandle role
which lane dragging it changes
Definition gui_node_view_types.h:192
tachyon::int2 b
segment endpoints, same space as the route points
Definition gui_node_view_types.h:191
bool vertical
Definition gui_node_view_types.h:193
tachyon::int2 a
Definition gui_node_view_types.h:191
Definition gui_base_types.h:394
Definition gui_base_types.h:120
2D affine transform matrix (2 rows x 3 columns): x' = r0.x*x + r0.y*y + r0.z y' = r1....
Definition gui_base_types.h:218
Integer 2D vector.
Definition gui_base_types.h:18