Flow
ConsoleMonster.Widgets
A native cell strip of nodes and labelled arrows, with one optional side branch.
Inheritance
- LiveWidget
- Flow
Usage
Explore 3 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 3
- Method Ui.Flow
- Method Flow.Add
- Method Flow.WithBranch
Constructors
public Flow(string widgetId = "flow") #Creates an empty flow with a live widget identifier.
Parameters
- widgetId string = "flow"
- The live event target.
Methods
public Flow Add(FlowNode node) #Adds a node or replaces the node with the same key in place.
Parameters
- node ConsoleMonster.Widgets.FlowNode
- The node.
public Flow Add(FlowEdge edge) #Adds or replaces an edge after its adjacent nodes have been added.
Parameters
- edge ConsoleMonster.Widgets.FlowEdge
- The edge.
public override void Apply(LiveEvent liveEvent) #Applies an event to the widget's state.
Parameters
- liveEvent ConsoleMonster.Live.LiveEvent
- The event.
public FlowHandle Handle(ILiveDispatcher dispatcher) #Returns a handle that posts state changes through the live dispatcher.
Parameters
- dispatcher ConsoleMonster.Live.ILiveDispatcher
- The dispatcher.
public override Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public override void Render(Region region, RenderContext context) #Renders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public Flow WithBranch(FlowBranch? branch) #Sets the one side branch, ending below its source or returning to a later node.
Parameters
- branch ConsoleMonster.Widgets.FlowBranch?
- The branch, or null to remove it.
Inherited Methods
public virtual string? Describe(LiveEvent liveEvent) #Parameters
- liveEvent LiveEvent
Returns
string?Properties
public IReadOnlyList<FlowEdge> Edges { get; } #Explicit connections; omitted adjacent connections use an unlabelled arrow.