Skip to content

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.

csharp
public readonly struct InfoBarContext

Methods

Section(Func<WidgetContext<HStackWidget>, Hex1bWidget>, Hex1bColor?, Hex1bColor?)

Creates a widget section that can contain any widget(s).

Parameters:

Returns: InfoBarSectionWidget

An InfoBarSectionWidget configured with the built widget.

csharp
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:

Returns: InfoBarSectionWidget

An InfoBarSectionWidget configured with the specified text and colors.

csharp
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:

Returns: InfoBarSeparatorWidget

An InfoBarSeparatorWidget.

csharp
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.

csharp
public InfoBarSpacerWidget Spacer()

Released under the MIT License.