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, Separator, Spacer) to guide developers toward the correct API usage.
public readonly struct InfoBarContextMethods
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)Separator(string?, Hex1bColor?, Hex1bColor?)
Creates an explicit separator between sections. When placed between sections, this overrides any default separator.
Parameters:
character(String): The separator character(s). Defaults to "|" if not specified.foreground(Nullable<Hex1bColor>): Optional foreground color override.background(Nullable<Hex1bColor>): Optional background color override.
Returns: InfoBarSeparatorWidget
An InfoBarSeparatorWidget.
public InfoBarSeparatorWidget Separator(string? character = null, 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 InfoBarSpacerWidget.
public InfoBarSpacerWidget Spacer()