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, Divider, Spacer) to guide developers toward the correct API usage.

csharp
public readonly struct InfoBarContext

Methods ​

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:

Returns: InfoBarDividerWidget

An .

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

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)

Spacer() ​

Creates a flexible spacer that pushes adjacent sections apart. The spacer expands to fill available horizontal space.

Returns: InfoBarSpacerWidget

An .

csharp
public InfoBarSpacerWidget Spacer()

Released under the MIT License.