Skip to content
ConsoleMonster
Class

FactFlow

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Implements
IWidget
Modifiers
sealed

Flows facts at separators without breaking a fact into unrelated words.

Inheritance

  • object
  • FactFlow

Usage

Explore 16 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 8

Accepted by parameters 8

Constructors

FactFlow 2 overloads
public FactFlow(params string[] parts) #

Creates a flow from markup parts.

Parameters

parts string[] required
public FactFlow(IEnumerable<string> parts) #

Creates a flow from markup parts; empty parts are omitted.

Parameters

parts System.Collections.Generic.IEnumerable<string> required

Methods

public 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 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.

Properties

public IList<string> Parts { get; } #

Markup facts in display order.

public ThemeToken? Role { get; set; } #

An optional role beneath each fact.

public string? Separator { get; set; } #

Optional literal separator; the default is the tier's middle dot.

Extension Methods

public static FactFlow AddPart(FactFlow factFlow, string item) #

Adds an item to FactFlow.Parts: Markup facts in display order.

Parameters

factFlow ConsoleMonster.Widgets.FactFlow required
The instance.
item string required
The item.

Returns

FactFlow The same instance.
AddParts 2 overloads
public static FactFlow AddParts(FactFlow factFlow, params string[] items) #

Adds items to FactFlow.Parts: Markup facts in display order.

Parameters

factFlow ConsoleMonster.Widgets.FactFlow required
The instance.
items string[] required
The items, in order.

Returns

FactFlow The same instance.
public static FactFlow AddParts(FactFlow factFlow, IEnumerable<string> items) #

Adds items to FactFlow.Parts: Markup facts in display order.

Parameters

factFlow ConsoleMonster.Widgets.FactFlow required
The instance.
items System.Collections.Generic.IEnumerable<string> required
The items, in order.

Returns

FactFlow The same instance.
public static FactFlow Role(FactFlow factFlow, ThemeToken? value) #

Sets FactFlow.Role: An optional role beneath each fact.

Parameters

factFlow ConsoleMonster.Widgets.FactFlow required
The instance.
value ConsoleMonster.Styling.ThemeToken? required
The value.

Returns

FactFlow The same instance.

Examples

// C# initializer or property    // C# fluent
factFlow.Role = value;           factFlow.Role(value);
public static FactFlow Separator(FactFlow factFlow, string? value) #

Sets FactFlow.Separator: Optional literal separator; the default is the tier's middle dot.

Parameters

factFlow ConsoleMonster.Widgets.FactFlow required
The instance.
value string? required
The value.

Returns

FactFlow The same instance.

Examples

// C# initializer or property    // C# fluent
factFlow.Separator = value;      factFlow.Separator(value);