InfoBarWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
A horizontal info bar widget, typically placed at the bottom of the screen. Supports sections, separators, and spacers with flexible layout options.
public sealed record InfoBarWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<InfoBarWidget>Inheritance
Object → Hex1bWidget → InfoBarWidget
Implements
Constructors
InfoBarWidget(IReadOnlyList<IInfoBarChild>, bool)
A horizontal info bar widget, typically placed at the bottom of the screen. Supports sections, separators, and spacers with flexible layout options.
Parameters:
Children(IReadOnlyList<IInfoBarChild>): The info bar children (sections, separators, spacers).InvertColors(Boolean): Whether to invert foreground/background colors (default: true).
public InfoBarWidget(IReadOnlyList<IInfoBarChild> Children, bool InvertColors = true)Properties
Children
The info bar children (sections, separators, spacers).
Returns: IReadOnlyList<IInfoBarChild>
public IReadOnlyList<IInfoBarChild> Children { get; init; }DefaultSeparator
The default separator to insert between consecutive sections. When null, no automatic separators are inserted.
Returns: InfoBarSeparatorWidget
public InfoBarSeparatorWidget? DefaultSeparator { get; init; }InvertColors
Whether to invert foreground/background colors (default: true).
Returns: Boolean
public bool InvertColors { get; init; }Methods
WithDefaultSeparator(string, Hex1bColor?, Hex1bColor?)
Sets the default separator to insert between consecutive sections.
Parameters:
character(String): The separator character(s). Defaults to " | ".foreground(Nullable<Hex1bColor>): Optional foreground color.background(Nullable<Hex1bColor>): Optional background color.
Returns: InfoBarWidget
A new InfoBarWidget with the default separator configured.
public InfoBarWidget WithDefaultSeparator(string character = " | ", Hex1bColor? foreground = null, Hex1bColor? background = null)Examples
// Basic info bar with default separators
ctx.InfoBar(s => [
s.Section("NORMAL"),
s.Section("file.cs"),
s.Section("Ln 42")
]).WithDefaultSeparator(" | ")
// Info bar with spacer to push content right
ctx.InfoBar(s => [
s.Section("Mode"),
s.Spacer(),
s.Section("Ready")
])