InfoBarSectionWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
A section within an info bar that contains content (text or widgets). Sections can have custom colors, width hints, and alignment.
public sealed record InfoBarSectionWidget : IInfoBarChild, IEquatable<InfoBarSectionWidget>Inheritance
Object → InfoBarSectionWidget
Implements
Constructors
InfoBarSectionWidget(Hex1bWidget, Hex1bColor?, Hex1bColor?)
A section within an info bar that contains content (text or widgets). Sections can have custom colors, width hints, and alignment.
Parameters:
Content(Hex1bWidget): The widget content to display in this section.Foreground(Nullable<Hex1bColor>): Optional foreground color override.Background(Nullable<Hex1bColor>): Optional background color override.
public InfoBarSectionWidget(Hex1bWidget Content, Hex1bColor? Foreground = null, Hex1bColor? Background = null)Properties
Alignment
The alignment of content within this section.
Returns: InfoBarSectionAlignment
public InfoBarSectionAlignment Alignment { get; init; }Background
Optional background color override.
Returns: Nullable<Hex1bColor>
public Hex1bColor? Background { get; init; }Content
The widget content to display in this section.
Returns: Hex1bWidget
public Hex1bWidget Content { get; init; }Foreground
Optional foreground color override.
Returns: Nullable<Hex1bColor>
public Hex1bColor? Foreground { get; init; }ThemeMutator
Optional theme customization for this section.
Returns: Func<Hex1bTheme, Hex1bTheme>
public Func<Hex1bTheme, Hex1bTheme>? ThemeMutator { get; init; }WidthHint
Optional width hint for layout.
Returns: Nullable<SizeHint>
public SizeHint? WidthHint { get; init; }Methods
AlignCenter()
Centers content within this section.
Returns: InfoBarSectionWidget
A new section with center alignment.
public InfoBarSectionWidget AlignCenter()AlignLeft()
Aligns content to the left within this section.
Returns: InfoBarSectionWidget
A new section with left alignment.
public InfoBarSectionWidget AlignLeft()AlignRight()
Aligns content to the right within this section.
Returns: InfoBarSectionWidget
A new section with right alignment.
public InfoBarSectionWidget AlignRight()ContentWidth()
Sets this section to size to its content (default behavior).
Returns: InfoBarSectionWidget
A new section with content width.
public InfoBarSectionWidget ContentWidth()FillWidth(int)
Sets this section to fill available width with an optional weight.
Parameters:
weight(Int32): The fill weight (higher values take more space).
Returns: InfoBarSectionWidget
A new section with fill width.
public InfoBarSectionWidget FillWidth(int weight = 1)FixedWidth(int)
Sets this section to a fixed width.
Parameters:
width(Int32): The fixed width in characters.
Returns: InfoBarSectionWidget
A new section with fixed width.
public InfoBarSectionWidget FixedWidth(int width)Theme(Func<Hex1bTheme, Hex1bTheme>)
Applies custom theme settings to this section.
Parameters:
mutator(Func<Hex1bTheme, Hex1bTheme>): A function that customizes the theme for this section.
Returns: InfoBarSectionWidget
A new section with the theme customization.
public InfoBarSectionWidget Theme(Func<Hex1bTheme, Hex1bTheme> mutator)