StatusList
ConsoleMonster.Widgets
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
- LiveWidget
- StatusList
Usage
Explore 10 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 6
- Method Ui.StatusList
- Extension method StatusList.DetailColumn
- Method StatusList.Add
- Method StatusList.Child
- Method StatusList.Set
- Method StatusListFluent.DetailColumn
Accepted by parameters 4
- Method ContentBuilder.StatusList
- Method ContentBuilder.StatusList
- Extension method StatusList.DetailColumn
- Method StatusListFluent.DetailColumn
Constructors
public StatusList(string widgetId = "status") #Creates a status list.
Parameters
- widgetId string = "status"
- The live name (default status).
Methods
public StatusList Add(string label, StatusKind status, string? detail = null) #Adds a row (alias of StatusList.Set).
Parameters
- label string
- Label (markup); also the key.
- status ConsoleMonster.Styling.StatusKind
- Status.
- detail string? = null
- Detail.
public StatusList Add(RichText label, StatusKind status, string? detail = null) #Adds or updates an item with a multicolour label (its plain text is the key).
Parameters
- label ConsoleMonster.Text.RichText
- The label.
- status ConsoleMonster.Styling.StatusKind
- The status.
- detail string? = null
- An optional muted detail.
public override void Apply(LiveEvent liveEvent) #Applies an event to the widget's state.
Parameters
- liveEvent ConsoleMonster.Live.LiveEvent
- The event.
public StatusList Child(string parentKey, string label, StatusKind status = None, string? detail = null) #Adds a row nested under an existing row, indented under its label.
Parameters
- parentKey string
- The key of the row it belongs to.
- label string
- Label (markup).
- status ConsoleMonster.Styling.StatusKind = None
- Status (default StatusKind.None: a plain detail row).
- detail string? = null
- Detail, or null.
public override string? Describe(LiveEvent liveEvent) #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
- The event that was applied.
Returns
string? A plain line or null.public StatusListHandle Handle(ILiveDispatcher dispatcher) #Returns a handle that updates this list through a 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 StatusList Set(string key, string? label, StatusKind status, string? detail = null) #Adds or updates a row.
Parameters
- key string
- Unique key.
- label string?
- Label (markup); null keeps the existing label or uses the key.
- status ConsoleMonster.Styling.StatusKind
- Status.
- detail string? = null
- Detail; null keeps the existing one.
Inherited Methods
Properties
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.
Inherited Properties
Extension Methods
public static StatusList DetailColumn(StatusList statusList, ColumnFormat value) #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
- The instance.
- value ConsoleMonster.Layout.ColumnFormat
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.StatusList { DetailColumn = value }; Ui.StatusList().DetailColumn(value);public static StatusList DetailColumn(StatusList statusList, Action<ColumnFormat> configure) #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
- The instance.
- configure System.Action<ConsoleMonster.Layout.ColumnFormat>
- Configures the value.