Skip to content
ConsoleMonster

API Reference

Class

StatusList

Namespace ConsoleMonster.Widgets
Assembly ConsoleMonster
Implements
Modifiers sealed

A checklist: a status marker, a label and a right-aligned muted detail per row. Running rows show a spinner. Only the marker carries colour (one signal per row). Live operations: set (Key, State, Text = label, optional Total ignored) and detail (Key, Text).

Inheritance

Usage

Explore 7 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 5

Accepted by parameters 2

Constructors

public StatusList(String name = "status") #

Creates a status list.

Parameters

name System.String = "status" optionalposition: 0
The live name (default status).

Methods

Add 2 overloads
public StatusList Add(String label, StatusKind status, String? detail = null) #
Returns: StatusList

Adds a row (alias of StatusList.Set).

Parameters

label System.String requiredposition: 0
Label (markup); also the key.
status ConsoleMonster.Styling.StatusKind requiredposition: 1
Status.
detail System.String? = null optionalposition: 2
Detail.

Returns

This instance.

public StatusList Add(RichText label, StatusKind status, String? detail = null) #
Returns: StatusList

Adds or updates an item with a multicolour label (its plain text is the key).

Parameters

label ConsoleMonster.Text.RichText requiredposition: 0
The label.
status ConsoleMonster.Styling.StatusKind requiredposition: 1
The status.
detail System.String? = null optionalposition: 2
An optional muted detail.

Returns

This instance.

public override Void Apply(LiveEvent liveEvent) #
Returns: Void

Applies an event to the widget's state.

Parameters

liveEvent ConsoleMonster.Live.LiveEvent requiredposition: 0
The event.
public override String? Describe(LiveEvent liveEvent) #
Returns: String?

Returns a line describing the event for line-based outputs (Stream/Plain), or null when the event is not worth a line (for example a single counter increment). Called after ILiveTarget.Apply.

Parameters

liveEvent ConsoleMonster.Live.LiveEvent requiredposition: 0
The event that was applied.

Returns

A plain line or null.

public StatusListHandle Handle(ILiveDispatcher dispatcher) #
Returns: StatusListHandle

Returns a handle that updates this list through a dispatcher.

Parameters

dispatcher ConsoleMonster.Live.ILiveDispatcher requiredposition: 0
The dispatcher.

Returns

The handle.

public override Size Measure(Constraints constraints, RenderContext context) #
Returns: Size

Returns the size the widget wants within the constraints.

Parameters

constraints ConsoleMonster.Layout.Constraints requiredposition: 0
The space offered.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
Profile, theme and glyphs.

Returns

The desired size, never larger than the constraints.

public override Void Render(Region region, RenderContext context) #
Returns: Void

Renders into a region. The region may be smaller or larger than the measured size.

Parameters

region ConsoleMonster.Canvas.Region requiredposition: 0
The target region.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
Profile, theme and glyphs.
public StatusList Set(String key, String? label, StatusKind status, String? detail = null) #
Returns: StatusList

Adds or updates a row.

Parameters

key System.String requiredposition: 0
Unique key.
label System.String? requiredposition: 1
Label (markup); null keeps the existing label or uses the key.
status ConsoleMonster.Styling.StatusKind requiredposition: 2
Status.
detail System.String? = null optionalposition: 3
Detail; null keeps the existing one.

Returns

This instance.

Properties

public IReadOnlyList<StatusItem> Items { get; } #

The rows.

public ColumnFormat DetailColumn { get; set; } #

Layout of the detail column on the right (default right-aligned). All rows share its width, which never shrinks during a session, so labels keep their room as details change.

Extension Methods

WithDetailColumn 2 overloads
public static StatusList WithDetailColumn(StatusList statusList, ColumnFormat value) #
Returns: StatusList

Sets StatusList.DetailColumn: Layout of the detail column on the right (default right-aligned). All rows share its width, which never shrinks during a session, so labels keep their room as details change.

Parameters

statusList ConsoleMonster.Widgets.StatusList requiredposition: 0
The instance.
value ConsoleMonster.Layout.ColumnFormat requiredposition: 1
The value.

Returns

The same instance.

public static StatusList WithDetailColumn(StatusList statusList, Action<ColumnFormat> configure) #
Returns: StatusList

Configures StatusList.DetailColumn in place: Layout of the detail column on the right (default right-aligned). All rows share its width, which never shrinks during a session, so labels keep their room as details change.

Parameters

statusList ConsoleMonster.Widgets.StatusList requiredposition: 0
The instance.
configure System.Action<ConsoleMonster.Layout.ColumnFormat> requiredposition: 1
Configures the value.

Returns

The same instance.