A GraphNode is a container with potentially several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
</brief_description>
<description>
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.
</description>
<tutorials>
</tutorials>
<methods>
<methodname="clear_all_slots">
<returntype="void"/>
<description>
Disables all input and output slots of the GraphNode.
</description>
</method>
<methodname="clear_slot">
<returntype="void"/>
<argumentindex="0"name="idx"type="int"/>
<description>
Disables input and output slot whose index is [code]idx[/code].
</description>
</method>
<methodname="get_connection_input_color">
<returntype="Color"/>
<argumentindex="0"name="idx"type="int"/>
<description>
Returns the [Color] of the input connection [code]idx[/code].
</description>
</method>
<methodname="get_connection_input_count">
<returntype="int"/>
<description>
Returns the number of enabled input slots (connections) to the GraphNode.
</description>
</method>
<methodname="get_connection_input_position">
<returntype="Vector2"/>
<argumentindex="0"name="idx"type="int"/>
<description>
Returns the position of the input connection [code]idx[/code].
</description>
</method>
<methodname="get_connection_input_type">
<returntype="int"/>
<argumentindex="0"name="idx"type="int"/>
<description>
Returns the type of the input connection [code]idx[/code].
</description>
</method>
<methodname="get_connection_output_color">
<returntype="Color"/>
<argumentindex="0"name="idx"type="int"/>
<description>
Returns the [Color] of the output connection [code]idx[/code].
</description>
</method>
<methodname="get_connection_output_count">
<returntype="int"/>
<description>
Returns the number of enabled output slots (connections) of the GraphNode.
</description>
</method>
<methodname="get_connection_output_position">
<returntype="Vector2"/>
<argumentindex="0"name="idx"type="int"/>
<description>
Returns the position of the output connection [code]idx[/code].
</description>
</method>
<methodname="get_connection_output_type">
<returntype="int"/>
<argumentindex="0"name="idx"type="int"/>
<description>
Returns the type of the output connection [code]idx[/code].
Sets the [Color] of the right (output) side of the slot [code]idx[/code] to [code]color_right[/code].
</description>
</method>
<methodname="set_slot_enabled_left">
<returntype="void"/>
<argumentindex="0"name="idx"type="int"/>
<argumentindex="1"name="enable_left"type="bool"/>
<description>
Toggles the left (input) side of the slot [code]idx[/code]. If [code]enable_left[/code] is [code]true[/code], a port will appear on the left side and the slot will be able to be connected from this side.
Toggles the right (output) side of the slot [code]idx[/code]. If [code]enable_right[/code] is [code]true[/code], a port will appear on the right side and the slot will be able to be connected from this side.
</description>
</method>
<methodname="set_slot_type_left">
<returntype="void"/>
<argumentindex="0"name="idx"type="int"/>
<argumentindex="1"name="type_left"type="int"/>
<description>
Sets the left (input) type of the slot [code]idx[/code] to [code]type_left[/code].
</description>
</method>
<methodname="set_slot_type_right">
<returntype="void"/>
<argumentindex="0"name="idx"type="int"/>
<argumentindex="1"name="type_right"type="int"/>
<description>
Sets the right (output) type of the slot [code]idx[/code] to [code]type_right[/code].