Class GraphElement

Namespace
Forma
Assembly
Forma.dll

Base movable graph element, corresponding to Godot's GraphElement.

public class GraphElement : TemplatedControl, IAddChild<Control>, IAddChild, INotifyPropertyChanged, IDisposable
Inheritance
GraphElement
Implements
Derived
Inherited Members

Constructors

GraphElement()

public GraphElement()

Properties

AccessibilityActions

public override AccessibilityActions AccessibilityActions { get; }

Property Value

AccessibilityActions

AccessibilityRole

public override AccessibilityRole AccessibilityRole { get; }

Property Value

AccessibilityRole

AccessibilityStates

public override AccessibilityStates AccessibilityStates { get; }

Property Value

AccessibilityStates

Draggable

public bool Draggable { get; set; }

Property Value

bool

IsResizing

Whether a retained resize gesture is currently active.

public bool IsResizing { get; }

Property Value

bool

Position

Logical graph position. The base control position is transformed only for viewport rendering.

public Vector2 Position { get; set; }

Property Value

Vector2

PositionOffset

Position in graph coordinates, equivalent to Godot's position_offset.

public Vector2 PositionOffset { get; set; }

Property Value

Vector2

Resizable

Whether the element exposes Godot's bottom-right resize handle.

public bool Resizable { get; set; }

Property Value

bool

ScalingMenus

Retained state for Godot's scaling_menus flag.

public bool ScalingMenus { get; set; }

Property Value

bool

Selectable

Whether this element may be selected, equivalent to Godot's selectable property.

public bool Selectable { get; set; }

Property Value

bool

Selected

public bool Selected { get; }

Property Value

bool

Size

Logical graph size. The rendered base-control size is scaled by the parent GraphEdit zoom.

public Vector2 Size { get; set; }

Property Value

Vector2

Methods

DrawResizeHandle(UIRenderContext)

protected void DrawResizeHandle(UIRenderContext context)

Parameters

context UIRenderContext

FitChildInRect(Control, Vector2, Vector2, bool)

protected static void FitChildInRect(Control child, Vector2 position, Vector2 size, bool rtl)

Parameters

child Control
position Vector2
size Vector2
rtl bool

GetDragFrom()

public Vector2 GetDragFrom()

Returns

Vector2

GetResizeHandleBounds()

public Rectangle GetResizeHandleBounds()

Returns

Rectangle

IsDraggable()

public bool IsDraggable()

Returns

bool

IsResizable()

public bool IsResizable()

Returns

bool

IsScalingMenus()

public bool IsScalingMenus()

Returns

bool

IsSelectable()

public bool IsSelectable()

Returns

bool

IsSelected()

public bool IsSelected()

Returns

bool

SetDrag(bool)

public void SetDrag(bool drag)

Parameters

drag bool

SetDraggable(bool)

public void SetDraggable(bool draggable)

Parameters

draggable bool

SetResizable(bool)

public void SetResizable(bool resizable)

Parameters

resizable bool

SetScalingMenus(bool)

public void SetScalingMenus(bool scalingMenus)

Parameters

scalingMenus bool

SetSelectable(bool)

public void SetSelectable(bool selectable)

Parameters

selectable bool

SetSelected(bool)

public void SetSelected(bool selected)

Parameters

selected bool

Events

Dragged

public event Action<GraphElement, Vector2, Vector2> Dragged

Event Type

Action<GraphElement, Vector2, Vector2>

NodeDeselected

public event Action<GraphElement> NodeDeselected

Event Type

Action<GraphElement>

NodeSelected

public event Action<GraphElement> NodeSelected

Event Type

Action<GraphElement>

PositionChanged

public event Action<GraphElement> PositionChanged

Event Type

Action<GraphElement>

RaiseRequest

public event Action<GraphElement> RaiseRequest

Event Type

Action<GraphElement>

ResizeEnd

public event Action<GraphElement, Vector2> ResizeEnd

Event Type

Action<GraphElement, Vector2>

ResizeRequest

public event Action<GraphElement, Vector2> ResizeRequest

Event Type

Action<GraphElement, Vector2>