InfoBarWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
A horizontal info bar widget, typically placed at the bottom of the screen. Supports sections, dividers, 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, dividers, and spacers with flexible layout options.
Parameters:
Children(IReadOnlyList<IInfoBarChild>): The info bar children (sections, dividers, 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, dividers, spacers).
Returns: IReadOnlyList<IInfoBarChild>
public IReadOnlyList<IInfoBarChild> Children { get; init; }DefaultDivider
The default divider to insert between consecutive sections. When null, no automatic dividers are inserted.
Returns: InfoBarDividerWidget
public InfoBarDividerWidget? DefaultDivider { get; init; }InvertColors
Whether to invert foreground/background colors (default: true).
Returns: Boolean
public bool InvertColors { get; init; }Methods
Divider(string, Hex1bColor?, Hex1bColor?)
Sets the default divider that is automatically inserted between consecutive sections.
Parameters:
character(String): The divider character(s). Defaults to " | ".foreground(Nullable<Hex1bColor>): Optional foreground color.background(Nullable<Hex1bColor>): Optional background color.
Returns: InfoBarWidget
A new with the default divider configured.
public InfoBarWidget Divider(string character = " | ", Hex1bColor? foreground = null, Hex1bColor? background = null)Examples
// Basic info bar with an automatic divider between consecutive sections
ctx.InfoBar(s => [
s.Section("NORMAL"),
s.Section("file.cs"),
s.Section("Ln 42")
]).Divider(" | ")
// Info bar with a spacer to push content right
ctx.InfoBar(s => [
s.Section("Mode"),
s.Spacer(),
s.Section("Ready")
])