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
| Member | Summary |
|---|---|
StatusBar() |
Properties
| Member | Summary |
|---|---|
Left | Items shown from the left edge. Empty results are skipped, separators and all. |
Right | Items shown from the right edge. |
Style | Color to draw in. The muted theme color when left alone. |
Methods
| Member | Summary |
|---|---|
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>>
Right
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
| Name | Type | Description |
|---|---|---|
region | SurfaceRegion | Where to draw; only its first row is used. |
Returns SurfaceRegion — The region below the bar.