reckfellENGINE

GraphElement

Base GraphEdit UI element with graph coordinates, selection and editing requests.

On this page
class GraphElementReckfellSharpInherits Container

Add the element as a direct GraphEdit child. GraphElement is a base UI container rather than a running game-world entity or a complete visual scripting system. The application implements model storage, graph execution, domain connections and undo/redo.

Persist PositionOffset: graph coordinates before zoom/scroll. GraphEdit computes local display Position as PositionOffset × Zoom − ScrollOffset and manages Scale. Do not persist Position as model coordinates or pre-multiply PositionOffset by zoom. PositionOffsetChanged also fires for programmatic assignments; Dragged concerns drag completion rather than every setter.

Selected changes only while Selectable = true. Programmatic selection emits NodeSelected/NodeDeselected on transitions; reassigning the same value does nothing. Disabling Selectable clears selection. Draggable restricts user dragging rather than the PositionOffset setter. These flags are independent, not a general read-only mode.

Resizable enables the handle, but GraphElement itself does not apply the requested size inside its input handler. With its normal parent, GraphEdit subscribes to ResizeRequest and applies size with constraints/snapping. Avoid adding a second competing Size handler unnecessarily. ResizeEnd reports the resulting Size; persist the constrained result rather than only requested newSize.

The base container fits eligible Control children into the same rectangle, so several direct children can overlap. Add one VBoxContainer/HBoxContainer for your form. Use specialized GraphNode for ports and rows. ScalingMenus controls local child popup scaling during zoom rather than scaling the entire graph.

DeleteRequest and RaiseRequest are requests rather than model deletion or undo recording. Update your model and connections before freeing the element. Use stable model keys for dynamic graphs; child indices are not IDs.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

GraphElementConstructor
# GraphElement
C#
public GraphElement();

Creates the base container: PositionOffset = (0,0), Draggable/Selectable = true, Selected/Resizable/ScalingMenus = false.

Properties6

DraggableProperty
# Draggable
C#
public bool Draggable { get; set; }

Allows user dragging in GraphEdit, default true. Does not block programmatic PositionOffset or clear selection.

PositionOffsetProperty
# PositionOffset
C#
public Vector2 PositionOffset { get; set; }

Position in graph coordinates before zoom/scroll. A change, including a programmatic setter, emits PositionOffsetChanged; equal values are skipped.

ResizableProperty
# Resizable
C#
public bool Resizable { get; set; }

Enables the resize handle, default false. The element emits a request; its normal GraphEdit applies it with constraints. GraphFrame manual resizing requires AutoshrinkEnabled off.

ScalingMenusProperty
# ScalingMenus
C#
public bool ScalingMenus { get; set; }

Allows GraphEdit zoom to affect preparation of local child popups, default false. Does not change PositionOffset or graph zoom itself.

SelectableProperty
# Selectable
C#
public bool Selectable { get; set; }

Allows Selected changes, default true. Setting false first clears selection and can emit NodeDeselected.

SelectedProperty
# Selected
C#
public bool Selected { get; set; }

Current selection. Setter is ignored when Selectable = false; transitions emit NodeSelected/NodeDeselected even from code, while equal assignments do not.

Methods12

GetPositionOffsetVector2
# GetPositionOffset
C#
public Vector2 GetPositionOffset();

Position in graph coordinates before zoom/scroll. A change, including a programmatic setter, emits PositionOffsetChanged; equal values are skipped.

Returns Vector2

Position in graph coordinates before zoom/scroll. A change, including a programmatic setter, emits PositionOffsetChanged; equal values are skipped.

IsDraggablebool
# IsDraggable
C#
public bool IsDraggable();

Allows user dragging in GraphEdit, default true. Does not block programmatic PositionOffset or clear selection.

Returns bool

Allows user dragging in GraphEdit, default true. Does not block programmatic PositionOffset or clear selection.

IsResizablebool
# IsResizable
C#
public bool IsResizable();

Enables the resize handle, default false. The element emits a request; its normal GraphEdit applies it with constraints. GraphFrame manual resizing requires AutoshrinkEnabled off.

Returns bool

Enables the resize handle, default false. The element emits a request; its normal GraphEdit applies it with constraints. GraphFrame manual resizing requires AutoshrinkEnabled off.

IsScalingMenusbool
# IsScalingMenus
C#
public bool IsScalingMenus();

Allows GraphEdit zoom to affect preparation of local child popups, default false. Does not change PositionOffset or graph zoom itself.

Returns bool

Allows GraphEdit zoom to affect preparation of local child popups, default false. Does not change PositionOffset or graph zoom itself.

IsSelectablebool
# IsSelectable
C#
public bool IsSelectable();

Allows Selected changes, default true. Setting false first clears selection and can emit NodeDeselected.

Returns bool

Allows Selected changes, default true. Setting false first clears selection and can emit NodeDeselected.

IsSelectedbool
# IsSelected
C#
public bool IsSelected();

Current selection. Setter is ignored when Selectable = false; transitions emit NodeSelected/NodeDeselected even from code, while equal assignments do not.

Returns bool

Current selection. Setter is ignored when Selectable = false; transitions emit NodeSelected/NodeDeselected even from code, while equal assignments do not.

SetDraggablevoid
# SetDraggable
C#
public void SetDraggable(bool draggable);

Allows user dragging in GraphEdit, default true. Does not block programmatic PositionOffset or clear selection.

Parameters
NameTypeDefault
draggablebool—
draggable

Allows user dragging in GraphEdit, default true. Does not block programmatic PositionOffset or clear selection.

SetPositionOffsetvoid
# SetPositionOffset
C#
public void SetPositionOffset(Vector2 offset);

Position in graph coordinates before zoom/scroll. A change, including a programmatic setter, emits PositionOffsetChanged; equal values are skipped.

Parameters
NameTypeDefault
offsetVector2—
offset

Position in graph coordinates before zoom/scroll rather than display Position.

SetResizablevoid
# SetResizable
C#
public void SetResizable(bool resizable);

Enables the resize handle, default false. The element emits a request; its normal GraphEdit applies it with constraints. GraphFrame manual resizing requires AutoshrinkEnabled off.

Parameters
NameTypeDefault
resizablebool—
resizable

Enables the resize handle, default false. The element emits a request; its normal GraphEdit applies it with constraints. GraphFrame manual resizing requires AutoshrinkEnabled off.

SetScalingMenusvoid
# SetScalingMenus
C#
public void SetScalingMenus(bool scalingMenus);

Allows GraphEdit zoom to affect preparation of local child popups, default false. Does not change PositionOffset or graph zoom itself.

Parameters
NameTypeDefault
scalingMenusbool—
scalingMenus

Allows GraphEdit zoom to affect preparation of local child popups, default false. Does not change PositionOffset or graph zoom itself.

SetSelectablevoid
# SetSelectable
C#
public void SetSelectable(bool selectable);

Allows Selected changes, default true. Setting false first clears selection and can emit NodeDeselected.

Parameters
NameTypeDefault
selectablebool—
selectable

Allows Selected changes, default true. Setting false first clears selection and can emit NodeDeselected.

SetSelectedvoid
# SetSelected
C#
public void SetSelected(bool selected);

Current selection. Setter is ignored when Selectable = false; transitions emit NodeSelected/NodeDeselected even from code, while equal assignments do not.

Parameters
NameTypeDefault
selectedbool—
selected

Current selection. Setter is ignored when Selectable = false; transitions emit NodeSelected/NodeDeselected even from code, while equal assignments do not.

Signals and events8

DeleteRequestEvent
# DeleteRequest
C#
public event Action DeleteRequest;

Declared deletion request rather than automatic Free. Standard GraphEdit ui_graph_delete emits GraphEdit.DeleteNodesRequest with names rather than this signal on each element. Handle the model and connections before freeing objects.

DraggedEvent
# Dragged
C#
public event GraphElement.DraggedEventHandler Dragged;

Drag completion with starting and ending PositionOffset, suitable for one undo record. An ordinary PositionOffset setter does not emit it.

Handler parameters
NameTypeDefault
fromVector2—
toVector2—
from

Position in graph coordinates before zoom/scroll rather than display Position.

to

Position in graph coordinates before zoom/scroll rather than display Position.

NodeDeselectedEvent
# NodeDeselected
C#
public event Action NodeDeselected;

Selection was cleared, including by Selectable = false or the Selected setter.

NodeSelectedEvent
# NodeSelected
C#
public event Action NodeSelected;

Element transitioned to Selected = true; can result from a programmatic setter. Does not execute a graph node.

PositionOffsetChangedEvent
# PositionOffsetChanged
C#
public event Action PositionOffsetChanged;

PositionOffset changed, including programmatically. No arguments: read the property. Does not imply drag completion.

RaiseRequestEvent
# RaiseRequest
C#
public event Action RaiseRequest;

Request to raise the element in display order. GraphEdit handles ordering; this does not change model IDs or structure.

ResizeEndEvent
# ResizeEnd
C#
public event GraphElement.ResizeEndEventHandler ResizeEnd;

Handle resize completion carrying actual current Size. Persist the constrained result; does not replace intermediate ResizeRequest notifications.

Handler parameters
NameTypeDefault
newSizeVector2—
newSize

Element-local size; ResizeRequest is a request, ResizeEnd carries the current resulting Size.

ResizeRequestEvent
# ResizeRequest
C#
public event GraphElement.ResizeRequestEventHandler ResizeRequest;

Requested size in element-local units. GraphEdit applies snapping/constraints, so the resulting Size can differ. The signal is not gesture completion.

Handler parameters
NameTypeDefault
newSizeVector2—
newSize

Element-local size; ResizeRequest is a request, ResizeEnd carries the current resulting Size.

Theme properties

These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.

Key and typeDescription
resizer
Texture2D

The icon used for the resizer, visible when GraphElement.Resizable is enabled.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.