Skip to content
0.2.0-dev Download ZIP
83 lines ·3.6 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="GraphElement" inherits="Container" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A container that represents a basic element that can be placed inside a [GraphEdit] control.
5 </brief_description>
6 <description>
7 [GraphElement] allows to create custom elements for a [GraphEdit] graph. By default such elements can be selected, resized, and repositioned, but they cannot be connected. For a graph element that allows for connections see [GraphNode].
8 </description>
9 <tutorials>
10 </tutorials>
11 <members>
12 <member name="draggable" type="bool" setter="set_draggable" getter="is_draggable" default="true">
13 If [code]true[/code], the user can drag the GraphElement.
14 </member>
15 <member name="position_offset" type="Vector2" setter="set_position_offset" getter="get_position_offset" default="Vector2(0, 0)">
16 The offset of the GraphElement, relative to the scroll offset of the [GraphEdit].
17 </member>
18 <member name="resizable" type="bool" setter="set_resizable" getter="is_resizable" default="false">
19 If [code]true[/code], the user can resize the GraphElement.
20 [b]Note:[/b] Dragging the handle will only emit the [signal resize_request] and [signal resize_end] signals, the GraphElement needs to be resized manually.
21 </member>
22 <member name="scaling_menus" type="bool" setter="set_scaling_menus" getter="is_scaling_menus" default="false">
23 If [code]true[/code], [PopupMenu]s that are descendants of the GraphElement are scaled with the [GraphEdit] zoom.
24 </member>
25 <member name="selectable" type="bool" setter="set_selectable" getter="is_selectable" default="true">
26 If [code]true[/code], the user can select the GraphElement.
27 </member>
28 <member name="selected" type="bool" setter="set_selected" getter="is_selected" default="false">
29 If [code]true[/code], the GraphElement is selected.
30 </member>
31 </members>
32 <signals>
33 <signal name="delete_request">
34 <description>
35 Emitted when removing the GraphElement is requested.
36 </description>
37 </signal>
38 <signal name="dragged">
39 <param index="0" name="from" type="Vector2" />
40 <param index="1" name="to" type="Vector2" />
41 <description>
42 Emitted when the GraphElement is dragged.
43 </description>
44 </signal>
45 <signal name="node_deselected">
46 <description>
47 Emitted when the GraphElement is deselected.
48 </description>
49 </signal>
50 <signal name="node_selected">
51 <description>
52 Emitted when the GraphElement is selected.
53 </description>
54 </signal>
55 <signal name="position_offset_changed">
56 <description>
57 Emitted when the GraphElement is moved.
58 </description>
59 </signal>
60 <signal name="raise_request">
61 <description>
62 Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement.
63 </description>
64 </signal>
65 <signal name="resize_end">
66 <param index="0" name="new_size" type="Vector2" />
67 <description>
68 Emitted when releasing the mouse button after dragging the resizer handle (see [member resizable]).
69 </description>
70 </signal>
71 <signal name="resize_request">
72 <param index="0" name="new_size" type="Vector2" />
73 <description>
74 Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see [member resizable]).
75 </description>
76 </signal>
77 </signals>
78 <theme_items>
79 <theme_item name="resizer" data_type="icon" type="Texture2D">
80 The icon used for the resizer, visible when [member resizable] is enabled.
81 </theme_item>
82 </theme_items>
83</class>