summaryrefslogtreecommitdiff
path: root/doc/classes/GraphEdit.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/GraphEdit.xml')
-rw-r--r--doc/classes/GraphEdit.xml125
1 files changed, 72 insertions, 53 deletions
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 3bc7fed1d9..2090155e85 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GraphEdit" inherits="Control" category="Core" version="3.0-beta">
+<class name="GraphEdit" inherits="Control" category="Core" version="3.0-stable">
<brief_description>
GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
</brief_description>
@@ -12,6 +12,42 @@
<demos>
</demos>
<methods>
+ <method name="add_valid_connection_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_type" type="int">
+ </argument>
+ <argument index="1" name="to_type" type="int">
+ </argument>
+ <description>
+ Makes possible the connection between two different slot types. The type is defined with the [method GraphNode.set_slot] method.
+ </description>
+ </method>
+ <method name="add_valid_left_disconnect_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int">
+ </argument>
+ <description>
+ Makes possible to disconnect nodes when dragging from the slot at the left if it has the specified type.
+ </description>
+ </method>
+ <method name="add_valid_right_disconnect_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int">
+ </argument>
+ <description>
+ Makes possible to disconnect nodes when dragging from the slot at the right if it has the specified type.
+ </description>
+ </method>
+ <method name="clear_connections">
+ <return type="void">
+ </return>
+ <description>
+ Remove all connections between nodes.
+ </description>
+ </method>
<method name="connect_node">
<return type="int" enum="Error">
</return>
@@ -49,26 +85,6 @@
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" }
</description>
</method>
- <method name="get_scroll_ofs" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Return the scroll offset.
- </description>
- </method>
- <method name="get_snap" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_zoom" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the current zoom value.
- </description>
- </method>
<method name="is_node_connected">
<return type="bool">
</return>
@@ -84,70 +100,73 @@
Return true if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode.
</description>
</method>
- <method name="is_right_disconnects_enabled" qualifiers="const">
+ <method name="is_valid_connection_type" qualifiers="const">
<return type="bool">
</return>
- <description>
- Return true is the disconnection of connections is enable in the visual GraphEdit. False otherwise.
- </description>
- </method>
- <method name="is_using_snap" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_right_disconnects">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
+ <argument index="0" name="from_type" type="int">
</argument>
- <description>
- Enable the disconnection of existing connections in the visual GraphEdit by left-clicking a connection and releasing into the void.
- </description>
- </method>
- <method name="set_scroll_ofs">
- <return type="void">
- </return>
- <argument index="0" name="ofs" type="Vector2">
+ <argument index="1" name="to_type" type="int">
</argument>
<description>
+ Returns whether it's possible to connect slots of the specified types.
</description>
</method>
- <method name="set_selected">
+ <method name="remove_valid_connection_type">
<return type="void">
</return>
- <argument index="0" name="node" type="Node">
+ <argument index="0" name="from_type" type="int">
+ </argument>
+ <argument index="1" name="to_type" type="int">
</argument>
<description>
+ Makes it not possible to connect between two different slot types. The type is defined with the [method GraphNode.set_slot] method.
</description>
</method>
- <method name="set_snap">
+ <method name="remove_valid_left_disconnect_type">
<return type="void">
</return>
- <argument index="0" name="pixels" type="int">
+ <argument index="0" name="type" type="int">
</argument>
<description>
+ Removes the possibility to disconnect nodes when dragging from the slot at the left if it has the specified type.
</description>
</method>
- <method name="set_use_snap">
+ <method name="remove_valid_right_disconnect_type">
<return type="void">
</return>
- <argument index="0" name="enable" type="bool">
+ <argument index="0" name="type" type="int">
</argument>
<description>
+ Removes the possibility to disconnect nodes when dragging from the slot at the right if it has the specified type.
</description>
</method>
- <method name="set_zoom">
+ <method name="set_selected">
<return type="void">
</return>
- <argument index="0" name="p_zoom" type="float">
+ <argument index="0" name="node" type="Node">
</argument>
<description>
- Set the zoom value of the GraphEdit. Zoom value is between [0.01; 1.728].
+ Sets the specified [code]node[/code] as the one selected.
</description>
</method>
</methods>
+ <members>
+ <member name="right_disconnects" type="bool" setter="set_right_disconnects" getter="is_right_disconnects_enabled">
+ If [code]true[/code], enables disconnection of existing connections in the GraphEdit by dragging the right end.
+ </member>
+ <member name="scroll_offset" type="Vector2" setter="set_scroll_ofs" getter="get_scroll_ofs">
+ The scroll offset.
+ </member>
+ <member name="snap_distance" type="int" setter="set_snap" getter="get_snap">
+ The snapping distance in pixels.
+ </member>
+ <member name="use_snap" type="bool" setter="set_use_snap" getter="is_using_snap">
+ If [code]true[/code], enables snapping.
+ </member>
+ <member name="zoom" type="float" setter="set_zoom" getter="get_zoom">
+ The current zoom value.
+ </member>
+ </members>
<signals>
<signal name="_begin_node_move">
<description>