:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GraphElement.xml. .. _class_GraphElement: GraphElement ============ **Experimental:** This class may be changed or removed in future versions. **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`GraphFrame`, :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**\ (\ ) :ref:`🔗` Emitted when removing the GraphElement is requested. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_signal_dragged: .. rst-class:: classref-signal **dragged**\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`\ ) :ref:`🔗` Emitted when the GraphElement is dragged. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_signal_node_deselected: .. rst-class:: classref-signal **node_deselected**\ (\ ) :ref:`🔗` Emitted when the GraphElement is deselected. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_signal_node_selected: .. rst-class:: classref-signal **node_selected**\ (\ ) :ref:`🔗` Emitted when the GraphElement is selected. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_signal_position_offset_changed: .. rst-class:: classref-signal **position_offset_changed**\ (\ ) :ref:`🔗` Emitted when the GraphElement is moved. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_signal_raise_request: .. rst-class:: classref-signal **raise_request**\ (\ ) :ref:`🔗` 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_end: .. rst-class:: classref-signal **resize_end**\ (\ new_size\: :ref:`Vector2`\ ) :ref:`🔗` Emitted when releasing the mouse button after dragging the resizer handle (see :ref:`resizable`). .. rst-class:: classref-item-separator ---- .. _class_GraphElement_signal_resize_request: .. rst-class:: classref-signal **resize_request**\ (\ new_size\: :ref:`Vector2`\ ) :ref:`🔗` 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`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_draggable**\ (\ value\: :ref:`bool`\ ) - :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)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_position_offset**\ (\ value\: :ref:`Vector2`\ ) - :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`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_resizable**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_resizable**\ (\ ) If ``true``, the user can resize the GraphElement. \ **Note:** Dragging the handle will only emit the :ref:`resize_request` and :ref:`resize_end` signals, the GraphElement needs to be resized manually. .. rst-class:: classref-item-separator ---- .. _class_GraphElement_property_selectable: .. rst-class:: classref-property :ref:`bool` **selectable** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_selectable**\ (\ value\: :ref:`bool`\ ) - :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`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_selected**\ (\ value\: :ref:`bool`\ ) - :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** :ref:`🔗` 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.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |void| replace:: :abbr:`void (No return value.)`