Implemented by widgets that wrap a single body child (e.g. More...
Public Member Functions | |
| Region | ComputeBodyRegion (Region outer) |
| Compute the region allocated to Body given the outer region allocated to this widget. | |
| Public Member Functions inherited from ConsoleForge.Layout.IWidget | |
| void | Render (IRenderContext ctx) |
| Render this widget into the provided context. | |
Properties | |
| IWidget? | Body [get] |
| The single child widget contained by this wrapper, or null if empty. | |
| Properties inherited from ConsoleForge.Layout.IWidget | |
| SizeConstraint | Height [get] |
| Height constraint used by the layout engine. | |
| Style | Style [get] |
| Visual style for this widget. Inherits from Theme if unset. | |
| SizeConstraint | Width [get] |
| Width constraint used by the layout engine. | |
Implemented by widgets that wrap a single body child (e.g.
BorderBox, Modal). Used by Core.FocusManager and LayoutEngine to traverse into the body for focus collection and region allocation.
Compute the region allocated to Body given the outer region allocated to this widget.
The default implementation insets by 1 on all sides (one-character border convention used by BorderBox) plus any additional padding set on the widget's IWidget.Style. Override for widgets whose body occupies a different sub-region (e.g. Modal centers its dialog box within the outer region).
Implemented in ConsoleForge.Widgets.Modal.