ConsoleForge 0.3.0
Elm-architecture TUI framework for .NET 8
Loading...
Searching...
No Matches
ConsoleForge.Widgets.BorderBox Class Referencesealed

A widget that renders a bordered box with an optional title and a body child widget. More...

Inheritance diagram for ConsoleForge.Widgets.BorderBox:

Public Member Functions

 BorderBox (string title="", IWidget? body=null, Style? style=null)
 Positional/named constructor for inline usage.
void Render (IRenderContext ctx)
 Render this widget into the provided context.The context carries the allocated region, theme, and color profile. Implementations MUST NOT write outside ctx.Region.
Public Member Functions inherited from ConsoleForge.Layout.ISingleBodyWidget
Region ComputeBodyRegion (Region outer)
 Compute the region allocated to Body given the outer region allocated to this widget.

Properties

IWidgetBody [get]
 Optional child widget rendered inside the border, in the inner region.
SizeConstraint Height = SizeConstraint.Flex(1) [get]
 Height constraint used by the layout engine.
Style Style = Style.Default.Border(Borders.Normal) [get]
 Visual style for the border and title. Defaults to Borders.Normal.
string Title = "" [get]
 Optional title text rendered in the top border edge.
SizeConstraint Width = SizeConstraint.Flex(1) [get]
 Width constraint used by the layout engine.

Detailed Description

A widget that renders a bordered box with an optional title and a body child widget.

Default border style is Borders.Normal unless overridden by the widget style or theme.


The documentation for this class was generated from the following file:
  • src/ConsoleForge/Widgets/BorderBox.cs