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
PositionOffset
The offset of the GraphElement, relative to the scroll offset of the GraphEdit.
public Vector2 PositionOffset { get; set; }
Property Value
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
Selectable
If true, the user can select the GraphElement.
public bool Selectable { get; set; }
Property Value
Selected
If true, the GraphElement is selected.
public bool Selected { get; set; }
Property Value
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_nameName of the method to check for.
Returns
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_nameName of the signal to check for.
Returns
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_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
Events
DeleteRequest
Emitted when removing the GraphElement is requested.
public event Action DeleteRequest
Event Type
Dragged
Emitted when the GraphElement is dragged.
public event GraphElement.DraggedEventHandler Dragged
Event Type
NodeDeselected
Emitted when the GraphElement is deselected.
public event Action NodeDeselected
Event Type
NodeSelected
Emitted when the GraphElement is selected.
public event Action NodeSelected
Event Type
PositionOffsetChanged
Emitted when the GraphElement is moved.
public event Action PositionOffsetChanged
Event Type
RaiseRequest
Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement.
public event Action RaiseRequest
Event Type
ResizeEnd
Emitted when releasing the mouse button after dragging the resizer handle (see Resizable).
public event GraphElement.ResizeEndEventHandler ResizeEnd
Event Type
ResizeRequest
Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see Resizable).
public event GraphElement.ResizeRequestEventHandler ResizeRequest