GraphNode

A GraphNode is a container with potentially several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.

A GraphNode is a container. Each GraphNode can have several input and output slots, sometimes referred to as ports, allowing connections between GraphNodes. To add a slot to GraphNode, add any Control-derived child node to it. After adding at least one child to GraphNode new sections will be automatically created in the Inspector called 'Slot'. When 'Slot' is expanded you will see list with index number for each slot. You can click on each of them to expand further. In the Inspector you can enable (show) or disable (hide) slots. By default, all slots are disabled so you may not see any slots on your GraphNode initially. You can assign a type to each slot. Only slots of the same type will be able to connect to each other. You can also assign colors to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input connections are on the left and output connections are on the right side of GraphNode. Only enabled slots are counted as connections.

@GodotBaseClass
struct GraphNode {}

Members

Aliases

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

Enums

Constants
enum Constants
Overlay
enum Overlay

Functions

_guiInput
void _guiInput(InputEvent arg0)
clearAllSlots
void clearAllSlots()

Disables all input and output slots of the GraphNode.

clearSlot
void clearSlot(long idx)

Disables input and output slot whose index is idx.

getConnectionInputColor
Color getConnectionInputColor(long idx)

Returns the color of the input connection idx.

getConnectionInputCount
long getConnectionInputCount()

Returns the number of enabled input slots (connections) to the GraphNode.

getConnectionInputPosition
Vector2 getConnectionInputPosition(long idx)

Returns the position of the input connection idx.

getConnectionInputType
long getConnectionInputType(long idx)

Returns the type of the input connection idx.

getConnectionOutputColor
Color getConnectionOutputColor(long idx)

Returns the color of the output connection idx.

getConnectionOutputCount
long getConnectionOutputCount()

Returns the number of enabled output slots (connections) of the GraphNode.

getConnectionOutputPosition
Vector2 getConnectionOutputPosition(long idx)

Returns the position of the output connection idx.

getConnectionOutputType
long getConnectionOutputType(long idx)

Returns the type of the output connection idx.

getOffset
Vector2 getOffset()
getOverlay
GraphNode.Overlay getOverlay()
getSlotColorLeft
Color getSlotColorLeft(long idx)

Returns the color set to idx left (input) slot.

getSlotColorRight
Color getSlotColorRight(long idx)

Returns the color set to idx right (output) slot.

getSlotTypeLeft
long getSlotTypeLeft(long idx)

Returns the (integer) type of left (input) idx slot.

getSlotTypeRight
long getSlotTypeRight(long idx)

Returns the (integer) type of right (output) idx slot.

getTitle
String getTitle()
isCloseButtonVisible
bool isCloseButtonVisible()
isComment
bool isComment()
isResizable
bool isResizable()
isSelected
bool isSelected()
isSlotEnabledLeft
bool isSlotEnabledLeft(long idx)

Returns true if left (input) slot idx is enabled, false otherwise.

isSlotEnabledRight
bool isSlotEnabledRight(long idx)

Returns true if right (output) slot idx is enabled, false otherwise.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(GraphNode other)
opEquals
bool opEquals(typeof(null) n)
setComment
void setComment(bool comment)
setOffset
void setOffset(Vector2 offset)
setOverlay
void setOverlay(long overlay)
setResizable
void setResizable(bool resizable)
setSelected
void setSelected(bool selected)
setShowCloseButton
void setShowCloseButton(bool show)
setSlot
void setSlot(long idx, bool enable_left, long type_left, Color color_left, bool enable_right, long type_right, Color color_right, Texture custom_left, Texture custom_right)

Sets properties of the slot with ID idx. If enable_left/right, a port will appear and the slot will be able to be connected from this side. type_left/right is an arbitrary type of the port. Only ports with the same type values can be connected. color_left/right is the tint of the port's icon on this side. custom_left/right is a custom texture for this side's port. Note: This method only sets properties of the slot. To create the slot, add a Control-derived child to the GraphNode.

setTitle
void setTitle(String title)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

comment
bool comment [@property getter]
bool comment [@property setter]

If true, the GraphNode is a comment node.

offset
Vector2 offset [@property getter]
Vector2 offset [@property setter]

The offset of the GraphNode, relative to the scroll offset of the GraphEdit. Note: You cannot use position directly, as GraphEdit is a Container.

overlay
GraphNode.Overlay overlay [@property getter]
long overlay [@property setter]

Sets the overlay shown above the GraphNode. See overlay.

resizable
bool resizable [@property getter]
bool resizable [@property setter]

If true, the user can resize the GraphNode. Note: Dragging the handle will only emit the resizeRequest signal, the GraphNode needs to be resized manually.

selected
bool selected [@property getter]
bool selected [@property setter]

If true, the GraphNode is selected.

showClose
bool showClose [@property getter]
bool showClose [@property setter]

If true, the close button will be visible. Note: Pressing it will only emit the closeRequest signal, the GraphNode needs to be removed manually.

title
String title [@property getter]
String title [@property setter]

The text displayed in the GraphNode's title bar.

Static functions

_new
GraphNode _new()

Construct a new instance of GraphNode. Note: use memnew!GraphNode instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
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
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(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