GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNode slots is disabled by default.
It is greatly advised to enable low-processor usage mode (see [member OS.low_processor_usage_mode]) when using GraphEdits.
Makes possible the connection between two different slot types. The type is defined with the [method GraphNode.set_slot] method.
Makes possible to disconnect nodes when dragging from the slot at the left if it has the specified type.
Makes possible to disconnect nodes when dragging from the slot at the right if it has the specified type.
Removes all connections between nodes.
Create a connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection already exists, no connection is created.
Removes the connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection does not exist, no connection is removed.
Returns an Array containing the list of connections. A connection consists in a structure of the form [code]{ from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" }[/code].
Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph.
Warning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of it's children use their [member CanvasItem.visible] property instead.
Returns [code]true[/code] if the [code]from_port[/code] slot of the [code]from[/code] GraphNode is connected to the [code]to_port[/code] slot of the [code]to[/code] GraphNode.
Returns whether it's possible to connect slots of the specified types.
Makes it not possible to connect between two different slot types. The type is defined with the [method GraphNode.set_slot] method.
Removes the possibility to disconnect nodes when dragging from the slot at the left if it has the specified type.
Removes the possibility to disconnect nodes when dragging from the slot at the right if it has the specified type.
Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [code]activity[/code] theme property.
Sets the specified [code]node[/code] as the one selected.
If [code]true[/code], enables disconnection of existing connections in the GraphEdit by dragging the right end.
The scroll offset.
The snapping distance in pixels.
If [code]true[/code], enables snapping.
The current zoom value.
Emitted at the beginning of a GraphNode movement.
Emitted when user dragging connection from input port into empty space of the graph.
Emitted to the GraphEdit when the connection between the [code]from_slot[/code] slot of the [code]from[/code] GraphNode and the [code]to_slot[/code] slot of the [code]to[/code] GraphNode is attempted to be created.
Emitted when user dragging connection from output port into empty space of the graph.
Emitted when the user presses [kbd]Ctrl + C[/kbd].
Emitted when a GraphNode is attempted to be removed from the GraphEdit.
Emitted to the GraphEdit when the connection between [code]from_slot[/code] slot of [code]from[/code] GraphNode and [code]to_slot[/code] slot of [code]to[/code] GraphNode is attempted to be removed.
Emitted when a GraphNode is attempted to be duplicated in the GraphEdit.
Emitted at the end of a GraphNode movement.
Emitted when a GraphNode is selected.
Emitted when the user presses [kbd]Ctrl + V[/kbd].
Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. [code]position[/code] is the position of the mouse pointer when the signal is sent.
Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code.
The background drawn under the grid.
Color of major grid lines.
Color of minor grid lines.
The icon for the zoom out button.
The icon for the zoom in button.
The horizontal range within which a port can be grabbed (on both sides).
The vertical range within which a port can be grabbed (on both sides).
The icon for the zoom reset button.
The fill color of the selection rectangle.
The outline color of the selection rectangle.
The icon for the snap toggle button.