Debian Codegraph @

doc/classes/GraphEdit.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="GraphEdit" inherits="Control" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 An editor for graph-like structures, using [GraphNode]s.
5 </brief_description>
6 <description>
7 [GraphEdit] provides tools for creation, manipulation, and display of various graphs. Its main purpose in the engine is to power the visual programming systems, such as visual shaders, but it is also available for use in user projects.
8 [GraphEdit] by itself is only an empty container, representing an infinite grid where [GraphNode]s can be placed. Each [GraphNode] represents a node in the graph, a single unit of data in the connected scheme. [GraphEdit], in turn, helps to control various interactions with nodes and between nodes. When the user attempts to connect, disconnect, or delete a [GraphNode], a signal is emitted in the [GraphEdit], but no action is taken by default. It is the responsibility of the programmer utilizing this control to implement the necessary logic to determine how each request should be handled.
9 [b]Performance:[/b] It is greatly advised to enable low-processor usage mode (see [member OS.low_processor_usage_mode]) when using GraphEdits.
10 [b]Note:[/b] Keep in mind that [method Node.get_children] will also return the connection layer node named [code]_connection_layer[/code] due to technical limitations. This behavior may change in future releases.
11 </description>
12 <tutorials>
13 </tutorials>
14 <methods>
15 <method name="_get_connection_line" qualifiers="virtual const">
16 <return type="PackedVector2Array" />
17 <param index="0" name="from_position" type="Vector2" />
18 <param index="1" name="to_position" type="Vector2" />
19 <description>
20 Virtual method which can be overridden to customize how connections are drawn.
21 </description>
22 </method>
23 <method name="_is_in_input_hotzone" qualifiers="virtual">
24 <return type="bool" />
25 <param index="0" name="in_node" type="Object" />
26 <param index="1" name="in_port" type="int" />
27 <param index="2" name="mouse_position" type="Vector2" />
28 <description>
29 Returns whether the [param mouse_position] is in the input hot zone.
30 By default, a hot zone is a [Rect2] positioned such that its center is at [param in_node].[method GraphNode.get_input_port_position]([param in_port]) (For output's case, call [method GraphNode.get_output_port_position] instead). The hot zone's width is twice the Theme Property [code]port_grab_distance_horizontal[/code], and its height is twice the [code]port_grab_distance_vertical[/code].
31 Below is a sample code to help get started:
32 [codeblock]
33 func _is_in_input_hotzone(in_node, in_port, mouse_position):
34 var port_size = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
35 var port_pos = in_node.get_position() + in_node.get_input_port_position(in_port) - port_size / 2
36 var rect = Rect2(port_pos, port_size)
37
38 return rect.has_point(mouse_position)
39 [/codeblock]
40 </description>
41 </method>
42 <method name="_is_in_output_hotzone" qualifiers="virtual">
43 <return type="bool" />
44 <param index="0" name="in_node" type="Object" />
45 <param index="1" name="in_port" type="int" />
46 <param index="2" name="mouse_position" type="Vector2" />
47 <description>
48 Returns whether the [param mouse_position] is in the output hot zone. For more information on hot zones, see [method _is_in_input_hotzone].
49 Below is a sample code to help get started:
50 [codeblock]
51 func _is_in_output_hotzone(in_node, in_port, mouse_position):
52 var port_size = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
53 var port_pos = in_node.get_position() + in_node.get_output_port_position(in_port) - port_size / 2
54 var rect = Rect2(port_pos, port_size)
55
56 return rect.has_point(mouse_position)
57 [/codeblock]
58 </description>
59 </method>
60 <method name="_is_node_hover_valid" qualifiers="virtual">
61 <return type="bool" />
62 <param index="0" name="from_node" type="StringName" />
63 <param index="1" name="from_port" type="int" />
64 <param index="2" name="to_node" type="StringName" />
65 <param index="3" name="to_port" type="int" />
66 <description>
67 This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port.
68 Return [code]true[/code] if the connection is indeed valid or return [code]false[/code] if the connection is impossible. If the connection is impossible, no snapping to the port and thus no connection request to that port will happen.
69 In this example a connection to same node is suppressed:
70 [codeblocks]
71 [gdscript]
72 func _is_node_hover_valid(from, from_port, to, to_port):
73 return from != to
74 [/gdscript]
75 [csharp]
76 public override bool _IsNodeHoverValid(StringName fromNode, int fromPort, StringName toNode, int toPort)
77 {
78 return fromNode != toNode;
79 }
80 [/csharp]
81 [/codeblocks]
82 </description>
83 </method>
84 <method name="add_valid_connection_type">
85 <return type="void" />
86 <param index="0" name="from_type" type="int" />
87 <param index="1" name="to_type" type="int" />
88 <description>
89 Allows the connection between two different port types. The port type is defined individually for the left and the right port of each slot with the [method GraphNode.set_slot] method.
90 See also [method is_valid_connection_type] and [method remove_valid_connection_type].
91 </description>
92 </method>
93 <method name="add_valid_left_disconnect_type">
94 <return type="void" />
95 <param index="0" name="type" type="int" />
96 <description>
97 Allows to disconnect nodes when dragging from the left port of the [GraphNode]'s slot if it has the specified type. See also [method remove_valid_left_disconnect_type].
98 </description>
99 </method>
100 <method name="add_valid_right_disconnect_type">
101 <return type="void" />
102 <param index="0" name="type" type="int" />
103 <description>
104 Allows to disconnect nodes when dragging from the right port of the [GraphNode]'s slot if it has the specified type. See also [method remove_valid_right_disconnect_type].
105 </description>
106 </method>
107 <method name="arrange_nodes">
108 <return type="void" />
109 <description>
110 Rearranges selected nodes in a layout with minimum crossings between connections and uniform horizontal and vertical gap between nodes.
111 </description>
112 </method>
113 <method name="attach_graph_element_to_frame">
114 <return type="void" />
115 <param index="0" name="element" type="StringName" />
116 <param index="1" name="frame" type="StringName" />
117 <description>
118 Attaches the [param element] [GraphElement] to the [param frame] [GraphFrame].
119 </description>
120 </method>
121 <method name="clear_connections">
122 <return type="void" />
123 <description>
124 Removes all connections between nodes.
125 </description>
126 </method>
127 <method name="connect_node">
128 <return type="int" enum="Error" />
129 <param index="0" name="from_node" type="StringName" />
130 <param index="1" name="from_port" type="int" />
131 <param index="2" name="to_node" type="StringName" />
132 <param index="3" name="to_port" type="int" />
133 <param index="4" name="keep_alive" type="bool" default="false" />
134 <description>
135 Create a connection between the [param from_port] of the [param from_node] [GraphNode] and the [param to_port] of the [param to_node] [GraphNode]. If the connection already exists, no connection is created.
136 Connections with [param keep_alive] set to [code]false[/code] may be deleted automatically if invalid during a redraw.
137 </description>
138 </method>
139 <method name="detach_graph_element_from_frame">
140 <return type="void" />
141 <param index="0" name="element" type="StringName" />
142 <description>
143 Detaches the [param element] [GraphElement] from the [GraphFrame] it is currently attached to.
144 </description>
145 </method>
146 <method name="disconnect_node">
147 <return type="void" />
148 <param index="0" name="from_node" type="StringName" />
149 <param index="1" name="from_port" type="int" />
150 <param index="2" name="to_node" type="StringName" />
151 <param index="3" name="to_port" type="int" />
152 <description>
153 Removes the connection between the [param from_port] of the [param from_node] [GraphNode] and the [param to_port] of the [param to_node] [GraphNode]. If the connection does not exist, no connection is removed.
154 </description>
155 </method>
156 <method name="force_connection_drag_end">
157 <return type="void" />
158 <description>
159 Ends the creation of the current connection. In other words, if you are dragging a connection you can use this method to abort the process and remove the line that followed your cursor.
160 This is best used together with [signal connection_drag_started] and [signal connection_drag_ended] to add custom behavior like node addition through shortcuts.
161 [b]Note:[/b] This method suppresses any other connection request signals apart from [signal connection_drag_ended].
162 </description>
163 </method>
164 <method name="get_attached_nodes_of_frame">
165 <return type="StringName[]" />
166 <param index="0" name="frame" type="StringName" />
167 <description>
168 Returns an array of node names that are attached to the [GraphFrame] with the given name.
169 </description>
170 </method>
171 <method name="get_closest_connection_at_point" qualifiers="const">
172 <return type="Dictionary" />
173 <param index="0" name="point" type="Vector2" />
174 <param index="1" name="max_distance" type="float" default="4.0" />
175 <description>
176 Returns the closest connection to the given point in screen space. If no connection is found within [param max_distance] pixels, an empty [Dictionary] is returned.
177 A connection is represented as a [Dictionary] in the form of:
178 [codeblock]
179 {
180 from_node: StringName,
181 from_port: int,
182 to_node: StringName,
183 to_port: int,
184 keep_alive: bool
185 }
186 [/codeblock]
187 For example, getting a connection at a given mouse position can be achieved like this:
188 [codeblocks]
189 [gdscript]
190 var connection = get_closest_connection_at_point(mouse_event.get_position())
191 [/gdscript]
192 [/codeblocks]
193 </description>
194 </method>
195 <method name="get_connection_count">
196 <return type="int" />
197 <param index="0" name="from_node" type="StringName" />
198 <param index="1" name="from_port" type="int" />
199 <description>
200 Returns the number of connections from [param from_port] of [param from_node].
201 </description>
202 </method>
203 <method name="get_connection_line" qualifiers="const">
204 <return type="PackedVector2Array" />
205 <param index="0" name="from_node" type="Vector2" />
206 <param index="1" name="to_node" type="Vector2" />
207 <description>
208 Returns the points which would make up a connection between [param from_node] and [param to_node].
209 </description>
210 </method>
211 <method name="get_connection_list_from_node" qualifiers="const">
212 <return type="Dictionary[]" />
213 <param index="0" name="node" type="StringName" />
214 <description>
215 Returns an [Array] containing a list of all connections for [param node].
216 A connection is represented as a [Dictionary] in the form of:
217 [codeblock]
218 {
219 from_node: StringName,
220 from_port: int,
221 to_node: StringName,
222 to_port: int,
223 keep_alive: bool
224 }
225 [/codeblock]
226 [b]Example:[/b] Get all connections on a specific port:
227 [codeblock]
228 func get_connection_list_from_port(node, port):
229 var connections = get_connection_list_from_node(node)
230 var result = []
231 for connection in connections:
232 var dict = {}
233 if connection["from_node"] == node and connection["from_port"] == port:
234 dict["node"] = connection["to_node"]
235 dict["port"] = connection["to_port"]
236 dict["type"] = "left"
237 result.push_back(dict)
238 elif connection["to_node"] == node and connection["to_port"] == port:
239 dict["node"] = connection["from_node"]
240 dict["port"] = connection["from_port"]
241 dict["type"] = "right"
242 result.push_back(dict)
243 return result
244 [/codeblock]
245 </description>
246 </method>
247 <method name="get_connections_intersecting_with_rect" qualifiers="const">
248 <return type="Dictionary[]" />
249 <param index="0" name="rect" type="Rect2" />
250 <description>
251 Returns an [Array] containing the list of connections that intersect with the given [Rect2].
252 A connection is represented as a [Dictionary] in the form of:
253 [codeblock]
254 {
255 from_node: StringName,
256 from_port: int,
257 to_node: StringName,
258 to_port: int,
259 keep_alive: bool
260 }
261 [/codeblock]
262 </description>
263 </method>
264 <method name="get_element_frame">
265 <return type="GraphFrame" />
266 <param index="0" name="element" type="StringName" />
267 <description>
268 Returns the [GraphFrame] that contains the [GraphElement] with the given name.
269 </description>
270 </method>
271 <method name="get_menu_hbox">
272 <return type="HBoxContainer" />
273 <description>
274 Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph. You can use this method to reposition the toolbar or to add your own custom controls to it.
275 [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
276 </description>
277 </method>
278 <method name="is_node_connected">
279 <return type="bool" />
280 <param index="0" name="from_node" type="StringName" />
281 <param index="1" name="from_port" type="int" />
282 <param index="2" name="to_node" type="StringName" />
283 <param index="3" name="to_port" type="int" />
284 <description>
285 Returns [code]true[/code] if the [param from_port] of the [param from_node] [GraphNode] is connected to the [param to_port] of the [param to_node] [GraphNode].
286 </description>
287 </method>
288 <method name="is_valid_connection_type" qualifiers="const">
289 <return type="bool" />
290 <param index="0" name="from_type" type="int" />
291 <param index="1" name="to_type" type="int" />
292 <description>
293 Returns whether it's possible to make a connection between two different port types. The port type is defined individually for the left and the right port of each slot with the [method GraphNode.set_slot] method.
294 See also [method add_valid_connection_type] and [method remove_valid_connection_type].
295 </description>
296 </method>
297 <method name="remove_valid_connection_type">
298 <return type="void" />
299 <param index="0" name="from_type" type="int" />
300 <param index="1" name="to_type" type="int" />
301 <description>
302 Disallows the connection between two different port types previously allowed by [method add_valid_connection_type]. The port type is defined individually for the left and the right port of each slot with the [method GraphNode.set_slot] method.
303 See also [method is_valid_connection_type].
304 </description>
305 </method>
306 <method name="remove_valid_left_disconnect_type">
307 <return type="void" />
308 <param index="0" name="type" type="int" />
309 <description>
310 Disallows to disconnect nodes when dragging from the left port of the [GraphNode]'s slot if it has the specified type. Use this to disable a disconnection previously allowed with [method add_valid_left_disconnect_type].
311 </description>
312 </method>
313 <method name="remove_valid_right_disconnect_type">
314 <return type="void" />
315 <param index="0" name="type" type="int" />
316 <description>
317 Disallows to disconnect nodes when dragging from the right port of the [GraphNode]'s slot if it has the specified type. Use this to disable a disconnection previously allowed with [method add_valid_right_disconnect_type].
318 </description>
319 </method>
320 <method name="set_connection_activity">
321 <return type="void" />
322 <param index="0" name="from_node" type="StringName" />
323 <param index="1" name="from_port" type="int" />
324 <param index="2" name="to_node" type="StringName" />
325 <param index="3" name="to_port" type="int" />
326 <param index="4" name="amount" type="float" />
327 <description>
328 Sets the coloration of the connection between [param from_node]'s [param from_port] and [param to_node]'s [param to_port] with the color provided in the [theme_item activity] theme property. The color is linearly interpolated between the connection color and the activity color using [param amount] as weight.
329 </description>
330 </method>
331 <method name="set_selected">
332 <return type="void" />
333 <param index="0" name="node" type="Node" />
334 <description>
335 Sets the specified [param node] as the one selected.
336 </description>
337 </method>
338 </methods>
339 <members>
340 <member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
341 <member name="connection_lines_antialiased" type="bool" setter="set_connection_lines_antialiased" getter="is_connection_lines_antialiased" default="true">
342 If [code]true[/code], the lines between nodes will use antialiasing.
343 </member>
344 <member name="connection_lines_curvature" type="float" setter="set_connection_lines_curvature" getter="get_connection_lines_curvature" default="0.5">
345 The curvature of the lines between the nodes. 0 results in straight lines.
346 </member>
347 <member name="connection_lines_thickness" type="float" setter="set_connection_lines_thickness" getter="get_connection_lines_thickness" default="4.0">
348 The thickness of the lines between the nodes.
349 </member>
350 <member name="connections" type="Dictionary[]" setter="set_connections" getter="get_connection_list" default="[]">
351 The connections between [GraphNode]s.
352 A connection is represented as a [Dictionary] in the form of:
353 [codeblock]
354 {
355 from_node: StringName,
356 from_port: int,
357 to_node: StringName,
358 to_port: int,
359 keep_alive: bool
360 }
361 [/codeblock]
362 Connections with [code]keep_alive[/code] set to [code]false[/code] may be deleted automatically if invalid during a redraw.
363 </member>
364 <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
365 <member name="grid_pattern" type="int" setter="set_grid_pattern" getter="get_grid_pattern" enum="GraphEdit.GridPattern" default="0">
366 The pattern used for drawing the grid.
367 </member>
368 <member name="minimap_enabled" type="bool" setter="set_minimap_enabled" getter="is_minimap_enabled" default="true">
369 If [code]true[/code], the minimap is visible.
370 </member>
371 <member name="minimap_opacity" type="float" setter="set_minimap_opacity" getter="get_minimap_opacity" default="0.65">
372 The opacity of the minimap rectangle.
373 </member>
374 <member name="minimap_size" type="Vector2" setter="set_minimap_size" getter="get_minimap_size" default="Vector2(240, 160)">
375 The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle.
376 </member>
377 <member name="panning_scheme" type="int" setter="set_panning_scheme" getter="get_panning_scheme" enum="GraphEdit.PanningScheme" default="0">
378 Defines the control scheme for panning with mouse wheel.
379 </member>
380 <member name="right_disconnects" type="bool" setter="set_right_disconnects" getter="is_right_disconnects_enabled" default="false">
381 If [code]true[/code], enables disconnection of existing connections in the GraphEdit by dragging the right end.
382 </member>
383 <member name="scroll_offset" type="Vector2" setter="set_scroll_offset" getter="get_scroll_offset" default="Vector2(0, 0)">
384 The scroll offset.
385 </member>
386 <member name="show_arrange_button" type="bool" setter="set_show_arrange_button" getter="is_showing_arrange_button" default="true">
387 If [code]true[/code], the button to automatically arrange graph nodes is visible.
388 </member>
389 <member name="show_grid" type="bool" setter="set_show_grid" getter="is_showing_grid" default="true">
390 If [code]true[/code], the grid is visible.
391 </member>
392 <member name="show_grid_buttons" type="bool" setter="set_show_grid_buttons" getter="is_showing_grid_buttons" default="true">
393 If [code]true[/code], buttons that allow to configure grid and snapping options are visible.
394 </member>
395 <member name="show_menu" type="bool" setter="set_show_menu" getter="is_showing_menu" default="true">
396 If [code]true[/code], the menu toolbar is visible.
397 </member>
398 <member name="show_minimap_button" type="bool" setter="set_show_minimap_button" getter="is_showing_minimap_button" default="true">
399 If [code]true[/code], the button to toggle the minimap is visible.
400 </member>
401 <member name="show_zoom_buttons" type="bool" setter="set_show_zoom_buttons" getter="is_showing_zoom_buttons" default="true">
402 If [code]true[/code], buttons that allow to change and reset the zoom level are visible.
403 </member>
404 <member name="show_zoom_label" type="bool" setter="set_show_zoom_label" getter="is_showing_zoom_label" default="false">
405 If [code]true[/code], the label with the current zoom level is visible. The zoom level is displayed in percents.
406 </member>
407 <member name="snapping_distance" type="int" setter="set_snapping_distance" getter="get_snapping_distance" default="20">
408 The snapping distance in pixels, also determines the grid line distance.
409 </member>
410 <member name="snapping_enabled" type="bool" setter="set_snapping_enabled" getter="is_snapping_enabled" default="true">
411 If [code]true[/code], enables snapping.
412 </member>
413 <member name="type_names" type="Dictionary" setter="set_type_names" getter="get_type_names" default="{}">
414 [Dictionary] of human-readable port type names.
415 </member>
416 <member name="zoom" type="float" setter="set_zoom" getter="get_zoom" default="1.0">
417 The current zoom value.
418 </member>
419 <member name="zoom_max" type="float" setter="set_zoom_max" getter="get_zoom_max" default="2.0736003">
420 The upper zoom limit.
421 </member>
422 <member name="zoom_min" type="float" setter="set_zoom_min" getter="get_zoom_min" default="0.23256795">
423 The lower zoom limit.
424 </member>
425 <member name="zoom_step" type="float" setter="set_zoom_step" getter="get_zoom_step" default="1.2">
426 The step of each zoom level.
427 </member>
428 </members>
429 <signals>
430 <signal name="begin_node_move">
431 <description>
432 Emitted at the beginning of a [GraphElement]'s movement.
433 </description>
434 </signal>
435 <signal name="connection_drag_ended">
436 <description>
437 Emitted at the end of a connection drag.
438 </description>
439 </signal>
440 <signal name="connection_drag_started">
441 <param index="0" name="from_node" type="StringName" />
442 <param index="1" name="from_port" type="int" />
443 <param index="2" name="is_output" type="bool" />
444 <description>
445 Emitted at the beginning of a connection drag.
446 </description>
447 </signal>
448 <signal name="connection_from_empty">
449 <param index="0" name="to_node" type="StringName" />
450 <param index="1" name="to_port" type="int" />
451 <param index="2" name="release_position" type="Vector2" />
452 <description>
453 Emitted when user drags a connection from an input port into the empty space of the graph.
454 </description>
455 </signal>
456 <signal name="connection_request">
457 <param index="0" name="from_node" type="StringName" />
458 <param index="1" name="from_port" type="int" />
459 <param index="2" name="to_node" type="StringName" />
460 <param index="3" name="to_port" type="int" />
461 <description>
462 Emitted to the GraphEdit when the connection between the [param from_port] of the [param from_node] [GraphNode] and the [param to_port] of the [param to_node] [GraphNode] is attempted to be created.
463 </description>
464 </signal>
465 <signal name="connection_to_empty">
466 <param index="0" name="from_node" type="StringName" />
467 <param index="1" name="from_port" type="int" />
468 <param index="2" name="release_position" type="Vector2" />
469 <description>
470 Emitted when user drags a connection from an output port into the empty space of the graph.
471 </description>
472 </signal>
473 <signal name="copy_nodes_request">
474 <description>
475 Emitted when this [GraphEdit] captures a [code]ui_copy[/code] action ([kbd]Ctrl + C[/kbd] by default). In general, this signal indicates that the selected [GraphElement]s should be copied.
476 </description>
477 </signal>
478 <signal name="cut_nodes_request">
479 <description>
480 Emitted when this [GraphEdit] captures a [code]ui_cut[/code] action ([kbd]Ctrl + X[/kbd] by default). In general, this signal indicates that the selected [GraphElement]s should be cut.
481 </description>
482 </signal>
483 <signal name="delete_nodes_request">
484 <param index="0" name="nodes" type="StringName[]" />
485 <description>
486 Emitted when this [GraphEdit] captures a [code]ui_graph_delete[/code] action ([kbd]Delete[/kbd] by default).
487 [param nodes] is an array of node names that should be removed. These usually include all selected nodes.
488 </description>
489 </signal>
490 <signal name="disconnection_request">
491 <param index="0" name="from_node" type="StringName" />
492 <param index="1" name="from_port" type="int" />
493 <param index="2" name="to_node" type="StringName" />
494 <param index="3" name="to_port" type="int" />
495 <description>
496 Emitted to the GraphEdit when the connection between [param from_port] of [param from_node] [GraphNode] and [param to_port] of [param to_node] [GraphNode] is attempted to be removed.
497 </description>
498 </signal>
499 <signal name="duplicate_nodes_request">
500 <description>
501 Emitted when this [GraphEdit] captures a [code]ui_graph_duplicate[/code] action ([kbd]Ctrl + D[/kbd] by default). In general, this signal indicates that the selected [GraphElement]s should be duplicated.
502 </description>
503 </signal>
504 <signal name="end_node_move">
505 <description>
506 Emitted at the end of a [GraphElement]'s movement.
507 </description>
508 </signal>
509 <signal name="frame_rect_changed">
510 <param index="0" name="frame" type="GraphFrame" />
511 <param index="1" name="new_rect" type="Rect2" />
512 <description>
513 Emitted when the [GraphFrame] [param frame] is resized to [param new_rect].
514 </description>
515 </signal>
516 <signal name="graph_elements_linked_to_frame_request">
517 <param index="0" name="elements" type="Array" />
518 <param index="1" name="frame" type="StringName" />
519 <description>
520 Emitted when one or more [GraphElement]s are dropped onto the [GraphFrame] named [param frame], when they were not previously attached to any other one.
521 [param elements] is an array of [GraphElement]s to be attached.
522 </description>
523 </signal>
524 <signal name="node_deselected">
525 <param index="0" name="node" type="Node" />
526 <description>
527 Emitted when the given [GraphElement] node is deselected.
528 </description>
529 </signal>
530 <signal name="node_selected">
531 <param index="0" name="node" type="Node" />
532 <description>
533 Emitted when the given [GraphElement] node is selected.
534 </description>
535 </signal>
536 <signal name="paste_nodes_request">
537 <description>
538 Emitted when this [GraphEdit] captures a [code]ui_paste[/code] action ([kbd]Ctrl + V[/kbd] by default). In general, this signal indicates that previously copied [GraphElement]s should be pasted.
539 </description>
540 </signal>
541 <signal name="popup_request">
542 <param index="0" name="at_position" type="Vector2" />
543 <description>
544 Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. [param at_position] is the position of the mouse pointer when the signal is sent.
545 </description>
546 </signal>
547 <signal name="scroll_offset_changed">
548 <param index="0" name="offset" type="Vector2" />
549 <description>
550 Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code.
551 </description>
552 </signal>
553 </signals>
554 <constants>
555 <constant name="SCROLL_ZOOMS" value="0" enum="PanningScheme">
556 [kbd]Mouse Wheel[/kbd] will zoom, [kbd]Ctrl + Mouse Wheel[/kbd] will move the view.
557 </constant>
558 <constant name="SCROLL_PANS" value="1" enum="PanningScheme">
559 [kbd]Mouse Wheel[/kbd] will move the view, [kbd]Ctrl + Mouse Wheel[/kbd] will zoom.
560 </constant>
561 <constant name="GRID_PATTERN_LINES" value="0" enum="GridPattern">
562 Draw the grid using solid lines.
563 </constant>
564 <constant name="GRID_PATTERN_DOTS" value="1" enum="GridPattern">
565 Draw the grid using dots.
566 </constant>
567 </constants>
568 <theme_items>
569 <theme_item name="activity" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
570 Color the connection line is interpolated to based on the activity value of a connection (see [method set_connection_activity]).
571 </theme_item>
572 <theme_item name="connection_hover_tint_color" data_type="color" type="Color" default="Color(0, 0, 0, 0.3)">
573 Color which is blended with the connection line when the mouse is hovering over it.
574 </theme_item>
575 <theme_item name="connection_rim_color" data_type="color" type="Color" default="Color(0.1, 0.1, 0.1, 0.6)">
576 Color of the rim around each connection line used for making intersecting lines more distinguishable.
577 </theme_item>
578 <theme_item name="connection_valid_target_tint_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.4)">
579 Color which is blended with the connection line when the currently dragged connection is hovering over a valid target port.
580 </theme_item>
581 <theme_item name="grid_major" data_type="color" type="Color" default="Color(1, 1, 1, 0.2)">
582 Color of major grid lines/dots.
583 </theme_item>
584 <theme_item name="grid_minor" data_type="color" type="Color" default="Color(1, 1, 1, 0.05)">
585 Color of minor grid lines/dots.
586 </theme_item>
587 <theme_item name="selection_fill" data_type="color" type="Color" default="Color(1, 1, 1, 0.3)">
588 The fill color of the selection rectangle.
589 </theme_item>
590 <theme_item name="selection_stroke" data_type="color" type="Color" default="Color(1, 1, 1, 0.8)">
591 The outline color of the selection rectangle.
592 </theme_item>
593 <theme_item name="connection_hover_thickness" data_type="constant" type="int" default="0">
594 Widens the line of a connection when the mouse is hovering over it by a percentage factor. A value of [code]0[/code] disables the highlight. A value of [code]100[/code] doubles the line width.
595 </theme_item>
596 <theme_item name="port_hotzone_inner_extent" data_type="constant" type="int" default="22">
597 The horizontal range within which a port can be grabbed (inner side).
598 </theme_item>
599 <theme_item name="port_hotzone_outer_extent" data_type="constant" type="int" default="26">
600 The horizontal range within which a port can be grabbed (outer side).
601 </theme_item>
602 <theme_item name="grid_toggle" data_type="icon" type="Texture2D">
603 The icon for the grid toggle button.
604 </theme_item>
605 <theme_item name="layout" data_type="icon" type="Texture2D">
606 The icon for the layout button for auto-arranging the graph.
607 </theme_item>
608 <theme_item name="minimap_toggle" data_type="icon" type="Texture2D">
609 The icon for the minimap toggle button.
610 </theme_item>
611 <theme_item name="snapping_toggle" data_type="icon" type="Texture2D">
612 The icon for the snapping toggle button.
613 </theme_item>
614 <theme_item name="zoom_in" data_type="icon" type="Texture2D">
615 The icon for the zoom in button.
616 </theme_item>
617 <theme_item name="zoom_out" data_type="icon" type="Texture2D">
618 The icon for the zoom out button.
619 </theme_item>
620 <theme_item name="zoom_reset" data_type="icon" type="Texture2D">
621 The icon for the zoom reset button.
622 </theme_item>
623 <theme_item name="menu_panel" data_type="style" type="StyleBox">
624 </theme_item>
625 <theme_item name="panel" data_type="style" type="StyleBox">
626 The background drawn under the grid.
627 </theme_item>
628 <theme_item name="panel_focus" data_type="style" type="StyleBox">
629 [StyleBox] used when the [GraphEdit] is focused (when used with assistive apps).
630 </theme_item>
631 </theme_items>
632 </class>