WorkflowCanvas class
Beep.Skia (core) — class
Visual workflow designer canvas that provides drag-drop functionality, connection management, and workflow execution controls for automation components.
Members
| Member | Kind | Description |
|---|---|---|
event EventHandler<NodeSelectedEventArgs> NodeSelected | Event | Event raised when a node is selected. |
event EventHandler<ConnectionCreatedEventArgs> ConnectionCreated | Event | Event raised when a connection is created. |
new event EventHandler<ConnectionRemovedEventArgs> ConnectionRemoved | Property | Event raised when a connection is removed. |
event EventHandler<WorkflowExecutionStateChangedEventArgs> ExecutionStateChanged | Event | Event raised when workflow execution state changes. |
event EventHandler<NodeAddedEventArgs> NodeAdded | Event | Event raised when a node is added to the canvas. |
event EventHandler<NodeRemovedEventArgs> NodeRemoved | Event | Event raised when a node is removed from the canvas. |
IReadOnlyList<AutomationNode> AutomationNodes | Property | Gets the collection of automation nodes in the workflow. |
IReadOnlyList<WorkflowConnection> Connections | Property | Gets the collection of connections between nodes. |
AutomationNode SelectedNode | Property | Gets or sets the currently selected node. |
float ZoomLevel | Property | Gets or sets the zoom level of the canvas. |
SKPoint PanOffset | Property | Gets or sets the pan offset of the canvas. |
bool ShowGrid | Property | Gets or sets whether to show the grid background. |
float GridSize | Property | Gets or sets the grid size. |
WorkflowExecutionState ExecutionState | Property | Gets the current workflow execution state. |
Dictionary<string, object> WorkflowVariables | Property | Gets or sets the workflow variables. |
WorkflowCanvas() | Method | Initializes a new instance of the WorkflowCanvas class. |
void AddNode(AutomationNode node, SKPoint position) | Method | Adds an automation node to the canvas. The node to add. The position to place the node. |
void RemoveNode(AutomationNode node) | Method | Removes an automation node from the canvas. The node to remove. |
AutomationNode GetNodeAtPosition(SKPoint position) | Method | Gets the node at the specified position. The position to check. The node at the position, or null if none found. |
void ArrangeNodesInGrid(float spacing = 150f) | Method | Arranges nodes automatically in a grid layout. |
void CreateConnection(AutomationNode fromNode, AutomationNode toNode, ConnectionPoint fromPoint, ConnectionPoint toPoint) | Method | Creates a connection between two nodes. The source node. The target node. The source connection point. The target connection point. |
void RemoveConnection(WorkflowConnection connection) | Method | Removes a connection. The connection to remove. |
WorkflowConnection GetConnectionAtPosition(SKPoint position, float tolerance = 5f) | Method | Gets the connection at the specified position. The position to check. The tolerance for hit detection. The connection at the position, or null if none found. |
SKPoint ScreenToCanvas(SKPoint screenPoint) | Method | Converts screen coordinates to canvas coordinates. The screen point. The canvas point. |
SKPoint CanvasToScreen(SKPoint canvasPoint) | Method | Converts canvas coordinates to screen coordinates. The canvas point. The screen point. |
void OnMouseWheel(SKPoint point, float delta) | Method | Handles mouse wheel events for zooming. The mouse position. The wheel delta. |