:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/4.2/doc/classes/GraphElement.xml. .. _class_GraphElement: GraphElement ============ **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`GraphNode` A container that represents a basic element that can be placed inside a :ref:`GraphEdit` control. .. rst-class:: classref-introduction-group Description ----------- **GraphElement** allows to create custom elements for a :ref:`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 :ref:`GraphNode`. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-------------------------------+---------------------------------------------------------------------+-------------------+ | :ref:`bool` | :ref:`draggable` | ``true`` | +-------------------------------+---------------------------------------------------------------------+-------------------+ | :ref:`Vector2` | :ref:`position_offset` | ``Vector2(0, 0)`` | +-------------------------------+---------------------------------------------------------------------+-------------------+ | :ref:`bool` | :ref:`resizable` | ``false`` | +-------------------------------+---------------------------------------------------------------------+-------------------+ | :ref:`bool` | :ref:`selectable` | ``true`` | +-------------------------------+---------------------------------------------------------------------+-------------------+ | :ref:`bool` | :ref:`selected` | ``false`` | +-------------------------------+---------------------------------------------------------------------+-------------------+ .. rst-class:: classref-reftable-group Theme Properties ---------------- .. table:: :widths: auto +-----------------------------------+-------------------------------------------------------+ | :ref:`Texture2D` | :ref:`resizer` | +-----------------------------------+-------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_GraphElement_signal_delete_request: .. rst-class:: classref-signal **delete_request** **(** **)** Emitted when removing the GraphElement is requested. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_signal_dragged: .. rst-class:: classref-signal **dragged** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** Emitted when the GraphElement is dragged. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_signal_node_deselected: .. rst-class:: classref-signal **node_deselected** **(** **)** Emitted when the GraphElement is deselected. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_signal_node_selected: .. rst-class:: classref-signal **node_selected** **(** **)** Emitted when the GraphElement is selected. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_signal_position_offset_changed: .. rst-class:: classref-signal **position_offset_changed** **(** **)** Emitted when the GraphElement is moved. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_signal_raise_request: .. rst-class:: classref-signal **raise_request** **(** **)** Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_signal_resize_request: .. rst-class:: classref-signal **resize_request** **(** :ref:`Vector2` new_minsize **)** Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see :ref:`resizable`). .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GraphElement_property_draggable: .. rst-class:: classref-property :ref:`bool` **draggable** = ``true`` .. rst-class:: classref-property-setget - void **set_draggable** **(** :ref:`bool` value **)** - :ref:`bool` **is_draggable** **(** **)** If ``true``, the user can drag the GraphElement. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_property_position_offset: .. rst-class:: classref-property :ref:`Vector2` **position_offset** = ``Vector2(0, 0)`` .. rst-class:: classref-property-setget - void **set_position_offset** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_position_offset** **(** **)** The offset of the GraphElement, relative to the scroll offset of the :ref:`GraphEdit`. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_property_resizable: .. rst-class:: classref-property :ref:`bool` **resizable** = ``false`` .. rst-class:: classref-property-setget - void **set_resizable** **(** :ref:`bool` value **)** - :ref:`bool` **is_resizable** **(** **)** If ``true``, the user can resize the GraphElement. \ **Note:** Dragging the handle will only emit the :ref:`resize_request` signal, the GraphElement needs to be resized manually. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_property_selectable: .. rst-class:: classref-property :ref:`bool` **selectable** = ``true`` .. rst-class:: classref-property-setget - void **set_selectable** **(** :ref:`bool` value **)** - :ref:`bool` **is_selectable** **(** **)** If ``true``, the user can select the GraphElement. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_property_selected: .. rst-class:: classref-property :ref:`bool` **selected** = ``false`` .. rst-class:: classref-property-setget - void **set_selected** **(** :ref:`bool` value **)** - :ref:`bool` **is_selected** **(** **)** If ``true``, the GraphElement is selected. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Theme Property Descriptions --------------------------- .. _class_GraphElement_theme_icon_resizer: .. rst-class:: classref-themeproperty :ref:`Texture2D` **resizer** The icon used for the resizer, visible when :ref:`resizable` is enabled. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`