Table of Contents

Class GraphElement

Namespace
Godot
Assembly
GodotSharp.dll

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.

public class GraphElement : Container, IDisposable
Inheritance
GraphElement
Implements
Derived
Inherited Members

Constructors

GraphElement()

public GraphElement()

Properties

Draggable

If true, the user can drag the GraphElement.

public bool Draggable { get; set; }

Property Value

bool

PositionOffset

The offset of the GraphElement, relative to the scroll offset of the GraphEdit.

public Vector2 PositionOffset { get; set; }

Property Value

Vector2

Resizable

If true, the user can resize the GraphElement.

Note: Dragging the handle will only emit the ResizeRequest and ResizeEnd signals, the GraphElement needs to be resized manually.

public bool Resizable { get; set; }

Property Value

bool

Selectable

If true, the user can select the GraphElement.

public bool Selectable { get; set; }

Property Value

bool

Selected

If true, the GraphElement is selected.

public bool Selected { get; set; }

Property Value

bool

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

Events

DeleteRequest

Emitted when removing the GraphElement is requested.

public event Action DeleteRequest

Event Type

Action

Dragged

Emitted when the GraphElement is dragged.

public event GraphElement.DraggedEventHandler Dragged

Event Type

GraphElement.DraggedEventHandler

NodeDeselected

Emitted when the GraphElement is deselected.

public event Action NodeDeselected

Event Type

Action

NodeSelected

Emitted when the GraphElement is selected.

public event Action NodeSelected

Event Type

Action

PositionOffsetChanged

Emitted when the GraphElement is moved.

public event Action PositionOffsetChanged

Event Type

Action

RaiseRequest

Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement.

public event Action RaiseRequest

Event Type

Action

ResizeEnd

Emitted when releasing the mouse button after dragging the resizer handle (see Resizable).

public event GraphElement.ResizeEndEventHandler ResizeEnd

Event Type

GraphElement.ResizeEndEventHandler

ResizeRequest

Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see Resizable).

public event GraphElement.ResizeRequestEventHandler ResizeRequest

Event Type

GraphElement.ResizeRequestEventHandler