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
InputPortCount
public int InputPortCount { get; }
Property Value
InputPorts
public IReadOnlyList<string> InputPorts { get; }
Property Value
OutputPortCount
public int OutputPortCount { get; }
Property Value
OutputPorts
public IReadOnlyList<string> OutputPorts { get; }
Property Value
Title
public string Title { get; set; }
Property Value
UIFont
public UIFont UIFont { get; set; }
Property Value
Methods
AddInputPort(string, int, Color?)
public void AddInputPort(string name, int type = 0, Color? color = null)
Parameters
AddOutputPort(string, int, Color?)
public void AddOutputPort(string name, int type = 0, Color? color = null)
Parameters
ArrangeChildren()
protected override void ArrangeChildren()
ClearAllSlots()
public void ClearAllSlots()
ClearSlot(int)
public void ClearSlot(int slot)
Parameters
slotint
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
portint
Returns
- Color
GetInputPortDrawBounds(int)
Rendered input-port icon/dot bounds in screen coordinates.
public Rectangle GetInputPortDrawBounds(int port)
Parameters
portint
Returns
- Rectangle
GetInputPortIcon(int)
public Texture2D GetInputPortIcon(int port)
Parameters
portint
Returns
- Texture2D
GetInputPortPosition(int)
Port position in node-local coordinates.
public Vector2 GetInputPortPosition(int port)
Parameters
portint
Returns
- Vector2
GetInputPortSlot(int)
public int GetInputPortSlot(int port)
Parameters
portint
Returns
GetInputPortType(int)
public int GetInputPortType(int port)
Parameters
portint
Returns
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
portint
Returns
- Color
GetOutputPortDrawBounds(int)
Rendered output-port icon/dot bounds in screen coordinates.
public Rectangle GetOutputPortDrawBounds(int port)
Parameters
portint
Returns
- Rectangle
GetOutputPortIcon(int)
public Texture2D GetOutputPortIcon(int port)
Parameters
portint
Returns
- Texture2D
GetOutputPortPosition(int)
Port position in node-local coordinates.
public Vector2 GetOutputPortPosition(int port)
Parameters
portint
Returns
- Vector2
GetOutputPortSlot(int)
public int GetOutputPortSlot(int port)
Parameters
portint
Returns
GetOutputPortType(int)
public int GetOutputPortType(int port)
Parameters
portint
Returns
GetSlotColorLeft(int)
public Color GetSlotColorLeft(int slot)
Parameters
slotint
Returns
- Color
GetSlotColorRight(int)
public Color GetSlotColorRight(int slot)
Parameters
slotint
Returns
- Color
GetSlotCustomIconLeft(int)
public Texture2D GetSlotCustomIconLeft(int slot)
Parameters
slotint
Returns
- Texture2D
GetSlotCustomIconRight(int)
public Texture2D GetSlotCustomIconRight(int slot)
Parameters
slotint
Returns
- Texture2D
GetSlotMetadataLeft(int)
public object GetSlotMetadataLeft(int slot)
Parameters
slotint
Returns
GetSlotMetadataRight(int)
public object GetSlotMetadataRight(int slot)
Parameters
slotint
Returns
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
slotint
Returns
- Rectangle
GetSlotTypeLeft(int)
public int GetSlotTypeLeft(int slot)
Parameters
slotint
Returns
GetSlotTypeRight(int)
public int GetSlotTypeRight(int slot)
Parameters
slotint
Returns
IsSlotDrawStyleBox(int)
public bool IsSlotDrawStyleBox(int slot)
Parameters
slotint
Returns
IsSlotEnabledLeft(int)
public bool IsSlotEnabledLeft(int slot)
Parameters
slotint
Returns
IsSlotEnabledRight(int)
public bool IsSlotEnabledRight(int slot)
Parameters
slotint
Returns
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
slotintenableLeftbooltypeLeftintcolorLeftColorenableRightbooltypeRightintcolorRightColor
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
slotintenableLeftbooltypeLeftintcolorLeftColorenableRightbooltypeRightintcolorRightColorcustomIconLeftTexture2DcustomIconRightTexture2DdrawStyleBoxbool
SetSlotColorLeft(int, Color)
public void SetSlotColorLeft(int slot, Color color)
Parameters
slotintcolorColor
SetSlotColorRight(int, Color)
public void SetSlotColorRight(int slot, Color color)
Parameters
slotintcolorColor
SetSlotCustomIconLeft(int, Texture2D)
public void SetSlotCustomIconLeft(int slot, Texture2D icon)
Parameters
slotinticonTexture2D
SetSlotCustomIconRight(int, Texture2D)
public void SetSlotCustomIconRight(int slot, Texture2D icon)
Parameters
slotinticonTexture2D
SetSlotDrawStyleBox(int, bool)
public void SetSlotDrawStyleBox(int slot, bool enable)
Parameters
SetSlotEnabledLeft(int, bool)
public void SetSlotEnabledLeft(int slot, bool enable)
Parameters
SetSlotEnabledRight(int, bool)
public void SetSlotEnabledRight(int slot, bool enable)
Parameters
SetSlotMetadataLeft(int, object)
public void SetSlotMetadataLeft(int slot, object value)
Parameters
SetSlotMetadataRight(int, object)
public void SetSlotMetadataRight(int slot, object value)
Parameters
SetSlotTypeLeft(int, int)
public void SetSlotTypeLeft(int slot, int type)
Parameters
SetSlotTypeRight(int, int)
public void SetSlotTypeRight(int slot, int type)
Parameters
Events
SlotSizesChanged
Raised after child-backed slot rows are rearranged, matching Godot's slot_sizes_changed signal.
public event Action<GraphNode> SlotSizesChanged
Event Type
SlotUpdated
public event Action<GraphNode, int> SlotUpdated