Skip to content
ConsoleMonster
Class

Flow

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Modifiers
sealed

A native cell strip of nodes and labelled arrows, with one optional side branch.

Inheritance

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

Constructors

public Flow(string widgetId = "flow") #

Creates an empty flow with a live widget identifier.

Parameters

widgetId string = "flow" optional
The live event target.

Methods

Add 2 overloads
public Flow Add(FlowNode node) #

Adds a node or replaces the node with the same key in place.

Parameters

node ConsoleMonster.Widgets.FlowNode required
The node.

Returns

Flow This flow.
public Flow Add(FlowEdge edge) #

Adds or replaces an edge after its adjacent nodes have been added.

Parameters

edge ConsoleMonster.Widgets.FlowEdge required
The edge.

Returns

Flow This flow.
public override void Apply(LiveEvent liveEvent) #

Applies an event to the widget's state.

Parameters

liveEvent ConsoleMonster.Live.LiveEvent required
The event.
public FlowHandle Handle(ILiveDispatcher dispatcher) #

Returns a handle that posts state changes through the live dispatcher.

Parameters

dispatcher ConsoleMonster.Live.ILiveDispatcher required
The dispatcher.

Returns

FlowHandle The handle.
public override Size Measure(Constraints constraints, RenderContext context) #

Returns the size the widget wants within the constraints.

Parameters

constraints ConsoleMonster.Layout.Constraints required
The space offered.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Returns

Size The desired size, never larger than the constraints.
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 required
The target region.
context ConsoleMonster.Canvas.RenderContext required
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? required
The branch, or null to remove it.

Returns

Flow This flow.

Properties

public IReadOnlyList<FlowNode> Nodes { get; } #

Nodes in strip order.

public IReadOnlyList<FlowEdge> Edges { get; } #

Explicit connections; omitted adjacent connections use an unlabelled arrow.

public FlowBranch? Branch { get; private set; } #

The single optional branch.