|
TachyonUI 0.1.0
High-performance UI for building tools.
|
All state of one node-view widget; no global state. More...
#include <gui_controls/gui_node_view_types.h>
Public Attributes | |
| std::vector< NodeModel > | nodes |
| the graph; endpoints and edits refer to nodes by index | |
| std::vector< std::string > | breadcrumb |
| Breadcrumb overlay at the canvas top-left, shown when non-empty. | |
| std::function< void(int)> | onBreadcrumb |
| called with the clicked segment index | |
| bool | showZoomControls = true |
| zoom overlay, bottom-left | |
| bool | showMinimap = true |
| minimap overlay, bottom-right | |
| float | minimapScale = 0.0f |
| Last frame's minimap mapping (canvas = origin + minimap pixels / scale), for clicks. | |
| tachyon::float2 | minimapOrigin {} |
| PendingConnection | pendingConnection |
| internal: the wire being dragged | |
| tachyon::float3x2 | transform |
| identity = centered view (no pan/zoom) | |
| tachyon::int2 | lastInnerSize { 0, 0 } |
| last frame's canvas size, for centering | |
| tachyon::IntRect | lastCanvasRect {} |
| Last frame's canvas padding box, in screen pixels (as events have them), for NodeViewScreenToCanvas and NodeViewCanvasToScreen. | |
| tachyon::ID | revealedFocusID = tachyon::ID::Invalid() |
| internal: the focus last scrolled into view | |
| CommandMode | commandMode = CommandMode::Default |
| Command mode set while the canvas has focus. | |
| std::vector< int > | ordering |
| Z-order, last == front (a clicked node moves there). | |
| std::unordered_set< tachyon::ID > | selectedNodeIDs |
| Selected node stableIDs. | |
| tachyon::ID | lastClickedNodeID = tachyon::ID::Invalid() |
| StableID of the last clicked node. | |
| DoubleClickTracker | nodeDoubleClick |
| Double-click-to-collapse, per view so views (and test frames) don't share it. | |
| tachyon::PointerDrag | marquee |
| A press on the empty background: a marquee once it moves the drag distance. | |
| tachyon::int2 | marqueeCurrentScreen {} |
| std::unordered_set< tachyon::ID > | marqueeBaseSelection |
| selection snapshot before the drag | |
| bool | marqueeShift = false |
| modifier snapshot at start | |
| bool | marqueeCtrl = false |
| std::unordered_map< uint32_t, WireRouteOverrides > | wireOverrides |
| Pinned wire lanes, keyed by WireKey() of the wire's target endpoint. | |
| std::vector< CachedWireHandle > | wireHandleCache |
| Last frame's draggable segments, since grab elements are laid out before routing. | |
| WireSegmentDrag | wireDrag |
| std::optional< uint32_t > | hoveredWire |
| The wire under the mouse (by WireKey), from the last frame: highlighted, removed by a middle click, and offered for deletion by a right click. | |
| std::function< void(const NodeViewEdit &)> | onEdit |
| Called once per finished user edit (a whole drag is one), after it is applied. | |
| 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. | |
| std::optional< uint32_t > | wireMenuWire |
| the wire the open context menu is for | |
| float2 | wireMenuPos {} |
| internal: where on the canvas it was opened | |
| std::function< void(float2 canvasPos)> | onCanvasContextMenu |
| Builds the canvas's context menu (MenuItem and the like), each frame while it's open; without it there's none. | |
| std::function< void(int node)> | onNodeContextMenu |
| As onCanvasContextMenu, for node node (an index into nodes): opened by a right click on it, which selects it if it wasn't, or from the keys while one is selected (the one clicked last). | |
| std::optional< float2 > | canvasMenuPos |
| internal: where the open canvas menu is for | |
| std::optional< tachyon::ID > | nodeMenuNode |
| internal: the stableID the open node menu is for | |
| tachyon::PointerDrag | pan |
| internal: a right press; once dragged, not a click | |
| tachyon::float3x2 | panStart {} |
| internal: the transform before it; put back by Escape | |
| tachyon::PointerDrag | nodeDrag |
| internal: the press on a node; moves the selection once dragged | |
| tachyon::PointerDrag | minimapDrag |
| internal: a press in the minimap | |
| tachyon::float3x2 | minimapStart {} |
| internal: the transform before it; put back by Escape | |
| std::function< bool(const NodeView &view, PropertyEndpoint output, PropertyEndpoint input)> | canConnect |
| Whether an output -> input wire is allowed; null allows any. | |
| std::unordered_map< uint32_t, tachyon::VisualColorStyleIndex > | wireColorStyles |
| Packed RGBA -> registered color style, since RenderPolyline takes a style index. | |
| uint32_t | wireColorStylesGeneration = 0 |
| StyleManager::Generation() of the cache. | |
All state of one node-view widget; no global state.
commandMode is active while the view has focus, for per-view shortcuts.
| std::vector<NodeModel> tachyon::NodeView::nodes |
the graph; endpoints and edits refer to nodes by index
| std::vector<std::string> tachyon::NodeView::breadcrumb |
Breadcrumb overlay at the canvas top-left, shown when non-empty.
| std::function<void(int)> tachyon::NodeView::onBreadcrumb |
called with the clicked segment index
| bool tachyon::NodeView::showZoomControls = true |
zoom overlay, bottom-left
| bool tachyon::NodeView::showMinimap = true |
minimap overlay, bottom-right
| float tachyon::NodeView::minimapScale = 0.0f |
Last frame's minimap mapping (canvas = origin + minimap pixels / scale), for clicks.
| tachyon::float2 tachyon::NodeView::minimapOrigin {} |
| PendingConnection tachyon::NodeView::pendingConnection |
internal: the wire being dragged
| tachyon::float3x2 tachyon::NodeView::transform |
identity = centered view (no pan/zoom)
| tachyon::int2 tachyon::NodeView::lastInnerSize { 0, 0 } |
last frame's canvas size, for centering
| tachyon::IntRect tachyon::NodeView::lastCanvasRect {} |
Last frame's canvas padding box, in screen pixels (as events have them), for NodeViewScreenToCanvas and NodeViewCanvasToScreen.
| tachyon::ID tachyon::NodeView::revealedFocusID = tachyon::ID::Invalid() |
internal: the focus last scrolled into view
| CommandMode tachyon::NodeView::commandMode = CommandMode::Default |
Command mode set while the canvas has focus.
| std::vector<int> tachyon::NodeView::ordering |
Z-order, last == front (a clicked node moves there).
| std::unordered_set<tachyon::ID> tachyon::NodeView::selectedNodeIDs |
Selected node stableIDs.
| tachyon::ID tachyon::NodeView::lastClickedNodeID = tachyon::ID::Invalid() |
StableID of the last clicked node.
| DoubleClickTracker tachyon::NodeView::nodeDoubleClick |
Double-click-to-collapse, per view so views (and test frames) don't share it.
| tachyon::PointerDrag tachyon::NodeView::marquee |
A press on the empty background: a marquee once it moves the drag distance.
Its points are screen space (marquee.pressScreen is the start).
| tachyon::int2 tachyon::NodeView::marqueeCurrentScreen {} |
| std::unordered_set<tachyon::ID> tachyon::NodeView::marqueeBaseSelection |
selection snapshot before the drag
| bool tachyon::NodeView::marqueeShift = false |
modifier snapshot at start
| bool tachyon::NodeView::marqueeCtrl = false |
| std::unordered_map<uint32_t, WireRouteOverrides> tachyon::NodeView::wireOverrides |
Pinned wire lanes, keyed by WireKey() of the wire's target endpoint.
| std::vector<CachedWireHandle> tachyon::NodeView::wireHandleCache |
Last frame's draggable segments, since grab elements are laid out before routing.
| WireSegmentDrag tachyon::NodeView::wireDrag |
| std::optional<uint32_t> tachyon::NodeView::hoveredWire |
The wire under the mouse (by WireKey), from the last frame: highlighted, removed by a middle click, and offered for deletion by a right click.
| std::function<void(const NodeViewEdit&)> tachyon::NodeView::onEdit |
Called once per finished user edit (a whole drag is one), after it is applied.
| std::function<void(PropertyEndpoint from, bool fromOutput, float2 canvasPos)> tachyon::NodeView::onWireDroppedOnCanvas |
A new wire was released over the empty canvas (not on a node), e.g.
to offer the nodes it could connect to. from is the socket it was dragged from: an output when fromOutput, else an unwired input. canvasPos is where, in node.pos space. A wire pulled off an input and dropped there is a disconnect (onEdit), not this.
| std::optional<uint32_t> tachyon::NodeView::wireMenuWire |
the wire the open context menu is for
| float2 tachyon::NodeView::wireMenuPos {} |
internal: where on the canvas it was opened
| std::function<void(float2 canvasPos)> tachyon::NodeView::onCanvasContextMenu |
Builds the canvas's context menu (MenuItem and the like), each frame while it's open; without it there's none.
It opens on a right click (not a pan) on the empty canvas, or on the Menu key or Shift+F10 with the canvas focused and no node selected. canvasPos is where, in node.pos space (the canvas's centre from the keys).
| std::function<void(int node)> tachyon::NodeView::onNodeContextMenu |
As onCanvasContextMenu, for node node (an index into nodes): opened by a right click on it, which selects it if it wasn't, or from the keys while one is selected (the one clicked last).
| std::optional<float2> tachyon::NodeView::canvasMenuPos |
internal: where the open canvas menu is for
| std::optional<tachyon::ID> tachyon::NodeView::nodeMenuNode |
internal: the stableID the open node menu is for
| tachyon::PointerDrag tachyon::NodeView::pan |
internal: a right press; once dragged, not a click
| tachyon::float3x2 tachyon::NodeView::panStart {} |
internal: the transform before it; put back by Escape
| tachyon::PointerDrag tachyon::NodeView::nodeDrag |
internal: the press on a node; moves the selection once dragged
| tachyon::PointerDrag tachyon::NodeView::minimapDrag |
internal: a press in the minimap
| tachyon::float3x2 tachyon::NodeView::minimapStart {} |
internal: the transform before it; put back by Escape
| std::function<bool(const NodeView& view, PropertyEndpoint output, PropertyEndpoint input)> tachyon::NodeView::canConnect |
Whether an output -> input wire is allowed; null allows any.
Called only for bounds-checked, cross-node endpoints, so it may index view.nodes directly.
| std::unordered_map<uint32_t, tachyon::VisualColorStyleIndex> tachyon::NodeView::wireColorStyles |
Packed RGBA -> registered color style, since RenderPolyline takes a style index.
| uint32_t tachyon::NodeView::wireColorStylesGeneration = 0 |
StyleManager::Generation() of the cache.