InfoBarContext
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
Provides a fluent API context for building info bar structures. This context exposes only info bar-related methods (Section, Divider, Spacer) to guide developers toward the correct API usage.
public readonly struct InfoBarContextMethods
Divider(string?, Hex1bColor?, Hex1bColor?)
Creates an explicit divider between sections. When placed between sections, this overrides any default divider configured on the parent via .
Parameters:
character(String): The divider character(s). Defaults to "|" if not specified.foreground(Nullable<Hex1bColor>): Optional foreground color override.background(Nullable<Hex1bColor>): Optional background color override.
Returns: InfoBarDividerWidget
An .
public InfoBarDividerWidget Divider(string? character = null, Hex1bColor? foreground = null, Hex1bColor? background = null)Section(Func<WidgetContext<HStackWidget>, Hex1bWidget>, Hex1bColor?, Hex1bColor?)
Creates a widget section that can contain any widget(s).
Parameters:
builder(Func<HStackWidget>, Hex1bWidget>): A function that builds the section content.foreground(Nullable<Hex1bColor>): Optional foreground color override.background(Nullable<Hex1bColor>): Optional background color override.
Returns: InfoBarSectionWidget
An InfoBarSectionWidget configured with the built widget.
public InfoBarSectionWidget Section(Func<WidgetContext<HStackWidget>, Hex1bWidget> builder, Hex1bColor? foreground = null, Hex1bColor? background = null)Section(string, Hex1bColor?, Hex1bColor?)
Creates a text section with optional styling.
Parameters:
text(String): The text content to display.foreground(Nullable<Hex1bColor>): Optional foreground color override.background(Nullable<Hex1bColor>): Optional background color override.
Returns: InfoBarSectionWidget
An InfoBarSectionWidget configured with the specified text and colors.
public InfoBarSectionWidget Section(string text, Hex1bColor? foreground = null, Hex1bColor? background = null)Spacer()
Creates a flexible spacer that pushes adjacent sections apart. The spacer expands to fill available horizontal space.
Returns: InfoBarSpacerWidget
An .
public InfoBarSpacerWidget Spacer()