Class GraphNode

Namespace
Forma
Assembly
Forma.dll

Graph node with named input and output port metadata.

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

Constructors

GraphNode()

public GraphNode()

Properties

Font

public SpriteFont Font { get; set; }

Property Value

SpriteFont

IgnoreInvalidConnectionType

Allows this node to accept an interactive connection whose type is not otherwise compatible.

public bool IgnoreInvalidConnectionType { get; set; }

Property Value

bool

InputPortCount

public int InputPortCount { get; }

Property Value

int

InputPorts

public IReadOnlyList<string> InputPorts { get; }

Property Value

IReadOnlyList<string>

OutputPortCount

public int OutputPortCount { get; }

Property Value

int

OutputPorts

public IReadOnlyList<string> OutputPorts { get; }

Property Value

IReadOnlyList<string>

Title

public string Title { get; set; }

Property Value

string

UIFont

public UIFont UIFont { get; set; }

Property Value

UIFont

Methods

AddInputPort(string, int, Color?)

public void AddInputPort(string name, int type = 0, Color? color = null)

Parameters

name string
type int
color Color?

AddOutputPort(string, int, Color?)

public void AddOutputPort(string name, int type = 0, Color? color = null)

Parameters

name string
type int
color Color?

ArrangeChildren()

protected override void ArrangeChildren()

ClearAllSlots()

public void ClearAllSlots()

ClearSlot(int)

public void ClearSlot(int slot)

Parameters

slot int

GetDesiredSize()

Returns the desired-size variant of the GraphNode layout requirement.

public override Vector2 GetDesiredSize()

Returns

Vector2

GetInputPortColor(int)

public Color GetInputPortColor(int port)

Parameters

port int

Returns

Color

GetInputPortDrawBounds(int)

Rendered input-port icon/dot bounds in screen coordinates.

public Rectangle GetInputPortDrawBounds(int port)

Parameters

port int

Returns

Rectangle

GetInputPortIcon(int)

public Texture2D GetInputPortIcon(int port)

Parameters

port int

Returns

Texture2D

GetInputPortPosition(int)

Port position in node-local coordinates.

public Vector2 GetInputPortPosition(int port)

Parameters

port int

Returns

Vector2

GetInputPortSlot(int)

public int GetInputPortSlot(int port)

Parameters

port int

Returns

int

GetInputPortType(int)

public int GetInputPortType(int port)

Parameters

port int

Returns

int

GetMinimumSize()

Returns the titlebar, slot, panel, and separation minimum required by Godot's GraphNode layout.

public override Vector2 GetMinimumSize()

Returns

Vector2

GetOutputPortColor(int)

public Color GetOutputPortColor(int port)

Parameters

port int

Returns

Color

GetOutputPortDrawBounds(int)

Rendered output-port icon/dot bounds in screen coordinates.

public Rectangle GetOutputPortDrawBounds(int port)

Parameters

port int

Returns

Rectangle

GetOutputPortIcon(int)

public Texture2D GetOutputPortIcon(int port)

Parameters

port int

Returns

Texture2D

GetOutputPortPosition(int)

Port position in node-local coordinates.

public Vector2 GetOutputPortPosition(int port)

Parameters

port int

Returns

Vector2

GetOutputPortSlot(int)

public int GetOutputPortSlot(int port)

Parameters

port int

Returns

int

GetOutputPortType(int)

public int GetOutputPortType(int port)

Parameters

port int

Returns

int

GetSlotColorLeft(int)

public Color GetSlotColorLeft(int slot)

Parameters

slot int

Returns

Color

GetSlotColorRight(int)

public Color GetSlotColorRight(int slot)

Parameters

slot int

Returns

Color

GetSlotCustomIconLeft(int)

public Texture2D GetSlotCustomIconLeft(int slot)

Parameters

slot int

Returns

Texture2D

GetSlotCustomIconRight(int)

public Texture2D GetSlotCustomIconRight(int slot)

Parameters

slot int

Returns

Texture2D

GetSlotMetadataLeft(int)

public object GetSlotMetadataLeft(int slot)

Parameters

slot int

Returns

object

GetSlotMetadataRight(int)

public object GetSlotMetadataRight(int slot)

Parameters

slot int

Returns

object

GetSlotStyleBoxBounds(int)

Rendered bounds for a retained slot stylebox in screen coordinates, or an empty rectangle when disabled or absent.

public Rectangle GetSlotStyleBoxBounds(int slot)

Parameters

slot int

Returns

Rectangle

GetSlotTypeLeft(int)

public int GetSlotTypeLeft(int slot)

Parameters

slot int

Returns

int

GetSlotTypeRight(int)

public int GetSlotTypeRight(int slot)

Parameters

slot int

Returns

int

IsSlotDrawStyleBox(int)

public bool IsSlotDrawStyleBox(int slot)

Parameters

slot int

Returns

bool

IsSlotEnabledLeft(int)

public bool IsSlotEnabledLeft(int slot)

Parameters

slot int

Returns

bool

IsSlotEnabledRight(int)

public bool IsSlotEnabledRight(int slot)

Parameters

slot int

Returns

bool

SetSlot(int, bool, int, Color, bool, int, Color)

Configures Godot's paired left/input and right/output port slot.

public void SetSlot(int slot, bool enableLeft, int typeLeft, Color colorLeft, bool enableRight, int typeRight, Color colorRight)

Parameters

slot int
enableLeft bool
typeLeft int
colorLeft Color
enableRight bool
typeRight int
colorRight Color

SetSlot(int, bool, int, Color, bool, int, Color, Texture2D, Texture2D, bool)

Configures Godot's paired left/input and right/output port slot, including retained custom icons and slot stylebox policy.

public void SetSlot(int slot, bool enableLeft, int typeLeft, Color colorLeft, bool enableRight, int typeRight, Color colorRight, Texture2D customIconLeft, Texture2D customIconRight, bool drawStyleBox = true)

Parameters

slot int
enableLeft bool
typeLeft int
colorLeft Color
enableRight bool
typeRight int
colorRight Color
customIconLeft Texture2D
customIconRight Texture2D
drawStyleBox bool

SetSlotColorLeft(int, Color)

public void SetSlotColorLeft(int slot, Color color)

Parameters

slot int
color Color

SetSlotColorRight(int, Color)

public void SetSlotColorRight(int slot, Color color)

Parameters

slot int
color Color

SetSlotCustomIconLeft(int, Texture2D)

public void SetSlotCustomIconLeft(int slot, Texture2D icon)

Parameters

slot int
icon Texture2D

SetSlotCustomIconRight(int, Texture2D)

public void SetSlotCustomIconRight(int slot, Texture2D icon)

Parameters

slot int
icon Texture2D

SetSlotDrawStyleBox(int, bool)

public void SetSlotDrawStyleBox(int slot, bool enable)

Parameters

slot int
enable bool

SetSlotEnabledLeft(int, bool)

public void SetSlotEnabledLeft(int slot, bool enable)

Parameters

slot int
enable bool

SetSlotEnabledRight(int, bool)

public void SetSlotEnabledRight(int slot, bool enable)

Parameters

slot int
enable bool

SetSlotMetadataLeft(int, object)

public void SetSlotMetadataLeft(int slot, object value)

Parameters

slot int
value object

SetSlotMetadataRight(int, object)

public void SetSlotMetadataRight(int slot, object value)

Parameters

slot int
value object

SetSlotTypeLeft(int, int)

public void SetSlotTypeLeft(int slot, int type)

Parameters

slot int
type int

SetSlotTypeRight(int, int)

public void SetSlotTypeRight(int slot, int type)

Parameters

slot int
type int

Events

SlotSizesChanged

Raised after child-backed slot rows are rearranged, matching Godot's slot_sizes_changed signal.

public event Action<GraphNode> SlotSizesChanged

Event Type

Action<GraphNode>

SlotUpdated

public event Action<GraphNode, int> SlotUpdated

Event Type

Action<GraphNode, int>