Skip to content
ConsoleMonster
Class

StatusLine

ConsoleMonster.Output

Namespace
ConsoleMonster.Output
Assembly
ConsoleMonster
Modifiers
sealed

A single updating status line on a real VT console (Show-ConsoleStatusLine in PowerShell): redrawn in place (carriage return, the line, clear to the end), with an optional spinner, clock and elapsed time refreshed about ten times a second. The refresh stops by itself as soon as anything else moves the cursor (other output, the prompt), so it never draws over later output; completing the status ends the line.

Inheritance

  • object
  • StatusLine

Methods

public static StyledLine Compose(RenderContext context, RichText content, StatusKind? status, bool spinner, bool showTimestamp, bool showElapsed, string timestampFormat, DateTime started, long frame, bool final) #

Builds the status line text for a context: spinner or status marker, clock, elapsed time, then the content.

Parameters

context ConsoleMonster.Canvas.RenderContext required
The render context.
content ConsoleMonster.Text.RichText required
The text after the marker.
status ConsoleMonster.Styling.StatusKind? required
A status marker instead of the spinner, or null.
spinner bool required
Whether to show the spinner.
showTimestamp bool required
Whether the time of day leads the line.
showElapsed bool required
Whether the elapsed time follows the content.
timestampFormat string required
The time format for the clock.
started System.DateTime required
When the status started (for the elapsed time).
frame long required
The animation frame (spinner position).
final bool required
Whether the line is complete (no spinner).

Returns

StyledLine The line.
public static void Show(TerminalProfile profile, RichText content, StatusKind? status, bool spinner, bool showTimestamp, bool showElapsed, string timestampFormat, bool final) #

Shows or updates the status line; with final the line is completed.

Parameters

profile ConsoleMonster.Capabilities.TerminalProfile required
The console profile.
content ConsoleMonster.Text.RichText required
The text after the marker.
status ConsoleMonster.Styling.StatusKind? required
A status marker instead of the spinner, or null.
spinner bool required
Whether a spinner turns until the line completes.
showTimestamp bool required
Whether the time of day leads the line.
showElapsed bool required
Whether the elapsed time follows the content.
timestampFormat string required
The time format for the clock.
final bool required
Whether the line completes (the next output starts below it).