API Reference
StatusList
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 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
- Method Ui.Status
- Extension method StatusList.WithDetailColumn
- Method StatusList.Add
- Method StatusList.Set
- Method StatusListFluent.WithDetailColumn
Accepted by parameters 2
- Extension method StatusList.WithDetailColumn
- Method StatusListFluent.WithDetailColumn
Constructors
public StatusList(String name = "status") #Creates a status list.
Parameters
- name System.String = "status"
- The live name (default status).
Methods
public StatusList Add(String label, StatusKind status, String? detail = null) #StatusListAdds a row (alias of StatusList.Set).
Parameters
- label System.String
- Label (markup); also the key.
- status ConsoleMonster.Styling.StatusKind
- Status.
- detail System.String? = null
- Detail.
Returns
This instance.
public StatusList Add(RichText label, StatusKind status, String? detail = null) #StatusListAdds 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 System.String? = null
- An optional muted detail.
Returns
This instance.
public override Void Apply(LiveEvent liveEvent) #VoidApplies an event to the widget's state.
Parameters
- liveEvent ConsoleMonster.Live.LiveEvent
- The event.
public override String? Describe(LiveEvent liveEvent) #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
- The event that was applied.
Returns
A plain line or null.
public StatusListHandle Handle(ILiveDispatcher dispatcher) #StatusListHandleReturns a handle that updates this list through a dispatcher.
Parameters
- dispatcher ConsoleMonster.Live.ILiveDispatcher
- The dispatcher.
Returns
The handle.
public override Size Measure(Constraints constraints, RenderContext context) #SizeReturns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Returns
The desired size, never larger than the constraints.
public override Void Render(Region region, RenderContext context) #VoidRenders 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) #StatusListAdds or updates a row.
Parameters
- key System.String
- Unique key.
- label System.String?
- Label (markup); null keeps the existing label or uses the key.
- status ConsoleMonster.Styling.StatusKind
- Status.
- detail System.String? = null
- Detail; null keeps the existing one.
Returns
This instance.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
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 WithDetailColumn(StatusList statusList, ColumnFormat value) #StatusListSets 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.
Returns
The same instance.
public static StatusList WithDetailColumn(StatusList statusList, Action<ColumnFormat> configure) #StatusListConfigures 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.
Returns
The same instance.