Skip to content
ConsoleMonster

API Reference

Class

ProgressColumn

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 28 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, Int32 x, Int32 y, Int32 width, ProgressRow row, RenderContext context) #
Returns: Void

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

Parameters

region ConsoleMonster.Canvas.Region requiredposition: 0
The region.
x System.Int32 requiredposition: 1
The first column.
y System.Int32 requiredposition: 2
The row.
width System.Int32 requiredposition: 3
The width in cells.
row ConsoleMonster.Widgets.ProgressRow requiredposition: 4
The row.
context ConsoleMonster.Canvas.RenderContext requiredposition: 5
The render context.
public virtual Int32 Measure(IReadOnlyList<ProgressRow> rows, RenderContext context) #
Returns: Int32

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

Parameters

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

Returns

The width in cells.

public abstract StyledLine Render(ProgressRow row, RenderContext context) #
Returns: StyledLine

The content of one row.

Parameters

row ConsoleMonster.Widgets.ProgressRow requiredposition: 0
The row.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
The render context.

Returns

The styled text.

public virtual String? Summarize(ProgressRow row, RenderContext context) #
Returns: String?

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

Parameters

row ConsoleMonster.Widgets.ProgressRow requiredposition: 0
The row.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
The render context.

Returns

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 Int32 Priority { get; set; } #

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

public Int32 MaxWidth { get; set; } #

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

public virtual Boolean Flexible { get; } #

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

public virtual Int32 MinWidth { get; } #

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