Skip to main content

Module node_graph

Module node_graph 

Source
Expand description

Node graph widget Interactive node graph editor widget.

Provides the [NodeGraph] widget for building visual node-based editors (e.g. shader graphs, data-flow pipelines). Key types:

  • [NodeGraph] — top-level widget holding nodes, types, and callbacks
  • [Node] — a single node with typed input/output connections and editable fields
  • [NodeTypeInfo] / [InputOutputInfo] — metadata describing node types and their I/O ports
  • [NodeGraphCallbacks] — user-provided callbacks for add, remove, drag, connect, etc.

Known limitation: Connection curves between nodes are currently not rendered (draw_connection returns a null image pending RenderImageCallbackInfo support).

Structs§

GraphDragAmount
Amount (in logical pixels) the entire graph was dragged.
InputConnection
An input port’s connections to one or more output ports on other nodes.
InputConnectionVec
InputConnectionVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
InputNodeAndIndex
Reference to a specific input port on a node.
InputNodeAndIndexVec
InputNodeAndIndexVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
InputOutputInfo
Display metadata for an input/output port type (name and color).
InputOutputTypeId
Unique identifier for an input/output port type.
InputOutputTypeIdInfoMap
Maps an InputOutputTypeId to its InputOutputInfo metadata.
InputOutputTypeIdInfoMapVec
InputOutputTypeIdInfoMapVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
InputOutputTypeIdVec
InputOutputTypeIdVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
Node
A single node with typed input/output connections and editable fields.
NodeDragAmount
Amount (in logical pixels) a single node was dragged.
NodeGraph
Interactive node graph editor widget with typed input/output connections.
NodeGraphCallbacks
User-provided callbacks for node graph interaction events.
NodeGraphNodeId
Unique identifier for a node instance within the graph.
NodeGraphNodePosition
Things only relevant to the display of the node in an interactive editor
NodeIdNodeMap
Maps a NodeGraphNodeId to its Node data.
NodeIdNodeMapVec
NodeIdNodeMapVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
NodeTypeField
A key-value field on a node (e.g. a text input labelled “Name”).
NodeTypeFieldVec
NodeTypeFieldVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
NodeTypeId
Unique identifier for a node type (e.g. “Add”, “Multiply”).
NodeTypeIdInfoMap
Maps a NodeTypeId to its NodeTypeInfo metadata.
NodeTypeIdInfoMapVec
NodeTypeIdInfoMapVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
NodeTypeInfo
Metadata describing a node type and its I/O port configuration.
OnNodeAdded
OnNodeAddedCallback
OnNodeConnected
OnNodeConnectedCallback
OnNodeDragged
OnNodeDraggedCallback
OnNodeFieldEdited
OnNodeFieldEditedCallback
OnNodeGraphDragged
OnNodeGraphDraggedCallback
OnNodeInputDisconnected
OnNodeInputDisconnectedCallback
OnNodeOutputDisconnected
OnNodeOutputDisconnectedCallback
OnNodeRemoved
OnNodeRemovedCallback
OutputConnection
An output port’s connections to one or more input ports on other nodes.
OutputConnectionVec
OutputConnectionVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
OutputNodeAndIndex
Reference to a specific output port on a node.
OutputNodeAndIndexVec
OutputNodeAndIndexVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.

Enums§

InputConnectionVecDestructor
InputNodeAndIndexVecDestructor
InputOutputTypeIdInfoMapVecDestructor
InputOutputTypeIdVecDestructor
NodeGraphError
NodeGraphStyle
NodeIdNodeMapVecDestructor
NodeTypeFieldValue
The value of a node field, determining which widget is rendered.
NodeTypeFieldVecDestructor
NodeTypeIdInfoMapVecDestructor
OptionInputConnection
OptionInputNodeAndIndex
OptionInputOutputTypeId
OptionInputOutputTypeIdInfoMap
OptionNodeIdNodeMap
OptionNodeTypeField
OptionNodeTypeIdInfoMap
OptionOnNodeAdded
OptionOnNodeConnected
OptionOnNodeDragged
OptionOnNodeFieldEdited
OptionOnNodeGraphDragged
OptionOnNodeInputDisconnected
OptionOnNodeOutputDisconnected
OptionOnNodeRemoved
OptionOutputConnection
OptionOutputNodeAndIndex
OutputConnectionVecDestructor
OutputNodeAndIndexVecDestructor

Type Aliases§

InputConnectionVecDestructorType
InputNodeAndIndexVecDestructorType
InputOutputTypeIdInfoMapVecDestructorType
InputOutputTypeIdVecDestructorType
NodeIdNodeMapVecDestructorType
NodeTypeFieldVecDestructorType
NodeTypeIdInfoMapVecDestructorType
OnNodeAddedCallbackType
OnNodeConnectedCallbackType
OnNodeDraggedCallbackType
OnNodeFieldEditedCallbackType
OnNodeGraphDraggedCallbackType
OnNodeInputDisconnectedCallbackType
OnNodeOutputDisconnectedCallbackType
OnNodeRemovedCallbackType
OutputConnectionVecDestructorType
OutputNodeAndIndexVecDestructorType