GraphEdit

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 GraphNodes slots is disabled by default. It is greatly advised to enable low processor usage mode (see OS.setLowProcessorUsageMode) when using GraphEdits.

@GodotBaseClass
struct GraphEdit {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

_connectionsLayerDraw
void _connectionsLayerDraw()
_graphNodeMoved
void _graphNodeMoved(GodotObject arg0)
_graphNodeRaised
void _graphNodeRaised(GodotObject arg0)
_guiInput
void _guiInput(InputEvent arg0)
_scrollMoved
void _scrollMoved(double arg0)
_snapToggled
void _snapToggled()
_snapValueChanged
void _snapValueChanged(double arg0)
_topLayerDraw
void _topLayerDraw()
_topLayerInput
void _topLayerInput(InputEvent arg0)
_updateScrollOffset
void _updateScrollOffset()
_zoomMinus
void _zoomMinus()
_zoomPlus
void _zoomPlus()
_zoomReset
void _zoomReset()
addValidConnectionType
void addValidConnectionType(long from_type, long to_type)

Makes possible the connection between two different slot types. The type is defined with the GraphNode.setSlot method.

addValidLeftDisconnectType
void addValidLeftDisconnectType(long type)

Makes possible to disconnect nodes when dragging from the slot at the left if it has the specified type.

addValidRightDisconnectType
void addValidRightDisconnectType(long type)

Makes possible to disconnect nodes when dragging from the slot at the right if it has the specified type.

clearConnections
void clearConnections()

Remove all connections between nodes.

connectNode
GodotError connectNode(StringArg0 from, long from_port, StringArg2 to, long to_port)

Create a connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode. If the connection already exists, no connection is created.

disconnectNode
void disconnectNode(StringArg0 from, long from_port, StringArg2 to, long to_port)

Remove the connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode, if connection exists.

getConnectionList
Array getConnectionList()

Return an Array containing the list of connections. A connection consists in a structure of the form {from_slot: 0, from: "GraphNode name 0", to_slot: 1, to: "GraphNode name 1" }

getScrollOfs
Vector2 getScrollOfs()
getSnap
long getSnap()
getZoom
double getZoom()
getZoomHbox
HBoxContainer getZoomHbox()
isNodeConnected
bool isNodeConnected(StringArg0 from, long from_port, StringArg2 to, long to_port)

Return true if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode.

isRightDisconnectsEnabled
bool isRightDisconnectsEnabled()
isUsingSnap
bool isUsingSnap()
isValidConnectionType
bool isValidConnectionType(long from_type, long to_type)

Returns whether it's possible to connect slots of the specified types.

opAssign
GraphEdit opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(GraphEdit other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
removeValidConnectionType
void removeValidConnectionType(long from_type, long to_type)

Makes it not possible to connect between two different slot types. The type is defined with the GraphNode.setSlot method.

removeValidLeftDisconnectType
void removeValidLeftDisconnectType(long type)

Removes the possibility to disconnect nodes when dragging from the slot at the left if it has the specified type.

removeValidRightDisconnectType
void removeValidRightDisconnectType(long type)

Removes the possibility to disconnect nodes when dragging from the slot at the right if it has the specified type.

setConnectionActivity
void setConnectionActivity(StringArg0 from, long from_port, StringArg2 to, long to_port, double amount)
setRightDisconnects
void setRightDisconnects(bool enable)
setScrollOfs
void setScrollOfs(Vector2 ofs)
setSelected
void setSelected(GodotObject node)

Sets the specified node as the one selected.

setSnap
void setSnap(long pixels)
setUseSnap
void setUseSnap(bool enable)
setZoom
void setZoom(double p_zoom)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

rightDisconnects
bool rightDisconnects [@property getter]
bool rightDisconnects [@property setter]

If true, enables disconnection of existing connections in the GraphEdit by dragging the right end.

scrollOffset
Vector2 scrollOffset [@property getter]
Vector2 scrollOffset [@property setter]

The scroll offset.

snapDistance
long snapDistance [@property getter]
long snapDistance [@property setter]

The snapping distance in pixels.

useSnap
bool useSnap [@property getter]
bool useSnap [@property setter]

If true, enables snapping.

zoom
double zoom [@property getter]
double zoom [@property setter]

The current zoom value.

Static functions

_new
GraphEdit _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta