Skip to main content

StatusBar class

Namespace: Arlecchino.Widgets.Readouts · Assembly: Arlecchino

A line of short readouts pinned to an edge. Items are delegates because a status line is redrawn every frame and is expected to show what is true now, not what was true when it was built.

public sealed class StatusBar : IArlecchinoWidget

Implements IArlecchinoWidget

Constructors

MemberSummary
StatusBar()

Properties

MemberSummary
LeftItems shown from the left edge. Empty results are skipped, separators and all.
RightItems shown from the right edge.
StyleColor to draw in. The muted theme color when left alone.

Methods

MemberSummary
Draw(SurfaceRegion)Draws both groups on the first row and returns the rows below. The left side is truncated to fit, and the right side is dropped entirely when the two would collide, so the bar never overlaps itself.

Constructors in detail

StatusBar()

public StatusBar();

Properties in detail

Left

public IReadOnlyList<Func<string>> Left { get; init; }

Items shown from the left edge. Empty results are skipped, separators and all.

Type IReadOnlyList<T><Func<TResult><string>>

public IReadOnlyList<Func<string>> Right { get; init; }

Items shown from the right edge.

Type IReadOnlyList<T><Func<TResult><string>>

Style

public IArlecchinoColor? Style { get; init; }

Color to draw in. The muted theme color when left alone.

Type IArlecchinoColor

Methods in detail

Draw(SurfaceRegion)

public SurfaceRegion Draw(SurfaceRegion region);

Draws both groups on the first row and returns the rows below. The left side is truncated to fit, and the right side is dropped entirely when the two would collide, so the bar never overlaps itself.

Parameters

NameTypeDescription
regionSurfaceRegionWhere to draw; only its first row is used.

Returns SurfaceRegion — The region below the bar.