Skip to content
ConsoleMonster
Class

ProgressColumn

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Modifiers
abstract

One column of a progress display (Lanes.Columns, ProgressBar.Columns). Built-ins come from ProgressColumns; derive from this class, or use ProgressColumns.Custom, for your own (an icon, result counts, a phase). The same columns render in full-screen and inline sessions and feed the compact stream summary.

Inheritance

  • object
  • ProgressColumn

Usage

Explore 29 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.

Accepted by parameters 13

Methods

public virtual void Draw(Region region, int x, int y, int width, ProgressRow row, RenderContext context) #

Draws one row into its cell range (truncated and aligned by default).

Parameters

region ConsoleMonster.Canvas.Region required
The region.
x int required
The first column.
y int required
The row.
width int required
The width in cells.
row ConsoleMonster.Widgets.ProgressRow required
The row.
context ConsoleMonster.Canvas.RenderContext required
The render context.
public virtual int Measure(IReadOnlyList<ProgressRow> rows, RenderContext context) #

The width of a fixed column: the widest row (capped by ProgressColumn.MaxWidth).

Parameters

rows System.Collections.Generic.IReadOnlyList<ConsoleMonster.Widgets.ProgressRow> required
Every row, so the width stays stable while values change.
context ConsoleMonster.Canvas.RenderContext required
The render context.

Returns

int The width in cells.
public abstract StyledLine Render(ProgressRow row, RenderContext context) #

The content of one row.

Parameters

row ConsoleMonster.Widgets.ProgressRow required
The row.
context ConsoleMonster.Canvas.RenderContext required
The render context.

Returns

StyledLine The styled text.
public virtual string? Summarize(ProgressRow row, RenderContext context) #

The column in a compact stream summary line, or null to leave it out (the bar).

Parameters

row ConsoleMonster.Widgets.ProgressRow required
The row.
context ConsoleMonster.Canvas.RenderContext required
The render context.

Returns

string? The text, or null.

Properties

public string Name { get; } #

The column name.

public HorizontalAlignment Alignment { get; set; } #

The alignment of the text within the column.

public int Priority { get; set; } #

When the region is too narrow, columns with the lowest priority are dropped first.

public int MaxWidth { get; set; } #

The widest the column gets, or 0 for no limit.

public virtual bool Flexible { get; } #

Whether the column takes a share of the width left over by the fixed columns (the bar, the status text).

public virtual int MinWidth { get; } #

The narrowest a flexible column may be before it is dropped.