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
AccessibilityRole
public override AccessibilityRole AccessibilityRole { get; }
Property Value
AccessibilityStates
public override AccessibilityStates AccessibilityStates { get; }
Property Value
Draggable
public bool Draggable { get; set; }
Property Value
IsResizing
Whether a retained resize gesture is currently active.
public bool IsResizing { get; }
Property Value
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
ScalingMenus
Retained state for Godot's scaling_menus flag.
public bool ScalingMenus { get; set; }
Property Value
Selectable
Whether this element may be selected, equivalent to Godot's selectable property.
public bool Selectable { get; set; }
Property Value
Selected
public bool Selected { get; }
Property Value
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
contextUIRenderContext
FitChildInRect(Control, Vector2, Vector2, bool)
protected static void FitChildInRect(Control child, Vector2 position, Vector2 size, bool rtl)
Parameters
GetDragFrom()
public Vector2 GetDragFrom()
Returns
- Vector2
GetResizeHandleBounds()
public Rectangle GetResizeHandleBounds()
Returns
- Rectangle
IsDraggable()
public bool IsDraggable()
Returns
IsResizable()
public bool IsResizable()
Returns
IsScalingMenus()
public bool IsScalingMenus()
Returns
IsSelectable()
public bool IsSelectable()
Returns
IsSelected()
public bool IsSelected()
Returns
SetDrag(bool)
public void SetDrag(bool drag)
Parameters
dragbool
SetDraggable(bool)
public void SetDraggable(bool draggable)
Parameters
draggablebool
SetResizable(bool)
public void SetResizable(bool resizable)
Parameters
resizablebool
SetScalingMenus(bool)
public void SetScalingMenus(bool scalingMenus)
Parameters
scalingMenusbool
SetSelectable(bool)
public void SetSelectable(bool selectable)
Parameters
selectablebool
SetSelected(bool)
public void SetSelected(bool selected)
Parameters
selectedbool
Events
Dragged
public event Action<GraphElement, Vector2, Vector2> Dragged
Event Type
- Action<GraphElement, Vector2, Vector2>
NodeDeselected
public event Action<GraphElement> NodeDeselected
Event Type
NodeSelected
public event Action<GraphElement> NodeSelected
Event Type
PositionChanged
public event Action<GraphElement> PositionChanged
Event Type
RaiseRequest
public event Action<GraphElement> RaiseRequest
Event Type
ResizeEnd
public event Action<GraphElement, Vector2> ResizeEnd
Event Type
- Action<GraphElement, Vector2>
ResizeRequest
public event Action<GraphElement, Vector2> ResizeRequest
Event Type
- Action<GraphElement, Vector2>