State machine family
API reference for Beep.Skia.StateMachine (12 public types)
Complete API surface of the Beep.Skia.StateMachine assembly: 12 public types with their documented members. Follow the family guide for usage patterns.
Types in this assembly
ChoiceNodeclassCompositeStateNodeclassFinalStateNodeclassForkNodeclassHistoryNodeclassInitialStateNodeclassJoinNodeclassStateMachineControlclassStateMachineIssueclassStateMachineIssueSeverityenumStateMachineValidatorclassStateNodeclass
ChoiceNode (class)
Choice/Junction pseudostate: evaluates guard conditions and selects one outgoing transition. Rendered as a small diamond shape.
| Member | Kind | Description |
|---|---|---|
string Title | Property | Gets or sets the title. |
ChoiceNode() | Method | Initializes a new instance of the ChoiceNode class. |
override Dictionary<string, object> GetProperties(bool includeCommon = true, bool includeNodeProperties = true) | Method | |
override void SetPropperties(IDictionary<string, object> properties, bool updateNodeProperties = true, bool applyToPublicSetters = true) | Method | Gets or sets the set propperties. |
CompositeStateNode (class)
Composite state: a state that contains nested sub-states (hierarchical state machine). Rendered as a larger rounded rectangle with a dashed border and title area at top. Child components are positioned within the inner content area.
| Member | Kind | Description |
|---|---|---|
string Title | Property | Gets or sets the title. |
float TitleBarHeight | Property | Gets or sets the title bar height. |
int RegionCount | Property | Number of orthogonal regions inside the composite state (1-4). Regions are separated by dashed dividers in the content area. |
CompositeStateNode() | Method | Initializes a new instance of the CompositeStateNode class. |
SKRect GetContentArea() | Method | Gets the inner content area for child components (below the title bar). |
override Dictionary<string, object> GetProperties(bool includeCommon = true, bool includeNodeProperties = true) | Method | |
override void SetPropperties(IDictionary<string, object> properties, bool updateNodeProperties = true, bool applyToPublicSetters = true) | Method | Gets or sets the set propperties. |
FinalStateNode (class)
Final state: double circle (outer ring), one input, no outputs.
| Member | Kind | Description |
|---|---|---|
string Title | Property | Gets or sets the title. |
FinalStateNode() | Method | Initializes a new instance of the FinalStateNode class. |
ForkNode (class)
Fork pseudostate: one input, two or more outputs. Rendered as a thick horizontal bar splitting a single flow into multiple parallel flows.
| Member | Kind | Description |
|---|---|---|
string Title | Property | Gets or sets the title. |
new int OutPortCount | Property | Gets or sets the out port count. |
ForkNode() | Method | Initializes a new instance of the ForkNode class. |
override Dictionary<string, object> GetProperties(bool includeCommon = true, bool includeNodeProperties = true) | Method | |
override void SetPropperties(IDictionary<string, object> properties, bool updateNodeProperties = true, bool applyToPublicSetters = true) | Method | Gets or sets the set propperties. |
HistoryNode (class)
History pseudostate: remembers the last active sub-state within a composite state. Shallow (H) remembers only the immediate sub-state. Deep (H*) remembers the full nesting path. Rendered as a circle with 'H' or 'H*' inside.
| Member | Kind | Description |
|---|---|---|
string Title | Property | Gets or sets the title. |
bool IsDeep | Property | Gets or sets the is deep. |
HistoryNode() | Method | Initializes a new instance of the HistoryNode class. |
override Dictionary<string, object> GetProperties(bool includeCommon = true, bool includeNodeProperties = true) | Method | |
override void SetPropperties(IDictionary<string, object> properties, bool updateNodeProperties = true, bool applyToPublicSetters = true) | Method | Gets or sets the set propperties. |
InitialStateNode (class)
Initial state: drawn as a filled circle, no inputs, one output.
| Member | Kind | Description |
|---|---|---|
string Title | Property | Gets or sets the title. |
InitialStateNode() | Method | Initializes a new instance of the InitialStateNode class. |
JoinNode (class)
Join pseudostate: two or more inputs, one output. Rendered as a thick horizontal bar merging multiple parallel flows into one.
| Member | Kind | Description |
|---|---|---|
string Title | Property | Gets or sets the title. |
new int InPortCount | Property | Gets or sets the in port count. |
JoinNode() | Method | Initializes a new instance of the JoinNode class. |
override Dictionary<string, object> GetProperties(bool includeCommon = true, bool includeNodeProperties = true) | Method | |
override void SetPropperties(IDictionary<string, object> properties, bool updateNodeProperties = true, bool applyToPublicSetters = true) | Method | Gets or sets the set propperties. |
StateMachineControl (class)
Base control for State Machine nodes with Material theming and standardized port management.
| Member | Kind | Description |
|---|---|---|
SKColor BackgroundColor | Property | Gets or sets the background color. |
SKColor BorderColor | Property | Gets or sets the border color. |
float BorderThickness | Property | Gets or sets the border thickness. |
int InPortCount | Property | Gets or sets the in port count. |
int OutPortCount | Property | Gets or sets the out port count. |
StateMachineIssue (class)
A single state-machine validation issue.
| Member | Kind | Description |
|---|---|---|
string Message | Property | Gets or sets the message. |
StateMachineIssueSeverity Severity | Property | Gets or sets the severity. |
SkiaComponent? Component | Property | Gets or sets the component. |
IConnectionLine? Line | Property | Gets or sets the line. |
string? FixSuggestion | Property | Gets or sets the fix suggestion. |
override string ToString() | Method | Gets or sets the to string. |
StateMachineIssueSeverity (enum)
Severity of a state-machine validation issue.
StateMachineValidator (class)
Validates state-machine diagrams: initial/final states, reachability, and guards/triggers on transitions (read from ConnectionLine.GuardCondition/TriggerEvent, falling back to Label1/Label2 for older diagrams).
| Member | Kind | Description |
|---|---|---|
List<StateMachineIssue> Issues | Property | Gets or sets the issues. |
bool Validate(IReadOnlyList<SkiaComponent> components, IReadOnlyList<IConnectionLine> lines) | Method | Runs all checks. Returns true when no errors were found (warnings are allowed). |
static string? GetGuard(IConnectionLine line) | Method | Gets the guard condition for a transition, falling back to Label1 for legacy diagrams. |
static string? GetTrigger(IConnectionLine line) | Method | Gets the trigger event for a transition, falling back to Label2 for legacy diagrams. |
static bool SetTransition(IConnectionLine line, string trigger, string guard, string action) | Method | Sets guard/action/trigger fields on a concrete connection line. |
StateNode (class)
Regular state: rounded rectangle with optional title and entry/exit/do activities, one input and multiple outputs.
| Member | Kind | Description |
|---|---|---|
string Title | Property | Gets or sets the title. |
string EntryAction | Property | Activity executed when the state is entered (UML entry action). |
string ExitAction | Property | Activity executed when the state is exited (UML exit action). |
string DoActivity | Property | Activity executed while the state is active (UML do activity). |
StateNode() | Method | Initializes a new instance of the StateNode class. |