LayoutRegions
ConsoleMonster.Widgets
Equal layout regions that show only the active region below a configurable width. Focus and retained control state follow swapped content.
Inheritance
- object
- LayoutRegions
Usage
Explore 14 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 8
- Method Ui.LayoutRegions
- Extension method LayoutRegions.ActiveRegion
- Extension method LayoutRegions.Gap
- Extension method LayoutRegions.NarrowBelow
- Method LayoutRegions.Add
- Method LayoutRegionsFluent.ActiveRegion
- Method LayoutRegionsFluent.Gap
- Method LayoutRegionsFluent.NarrowBelow
Accepted by parameters 6
- Extension method LayoutRegions.ActiveRegion
- Extension method LayoutRegions.Gap
- Extension method LayoutRegions.NarrowBelow
- Method LayoutRegionsFluent.ActiveRegion
- Method LayoutRegionsFluent.Gap
- Method LayoutRegionsFluent.NarrowBelow
Constructors
public LayoutRegions() #Methods
public void Activate(string key) #Shows a region and focuses its first enabled input.
Parameters
- key string
public LayoutRegions Add(string key, IWidget content) #Adds a stable named region.
Parameters
- key string
- content ConsoleMonster.Layout.IWidget
Returns
LayoutRegionspublic Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public void Render(Region region, RenderContext context) #Renders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public void Swap(string first, string second) #Swaps two existing subtrees without reconstructing their controls.
Parameters
- first string
- second string
Inherited Methods
Properties
Extension Methods
public static LayoutRegions ActiveRegion(LayoutRegions layoutRegions, string? value) #Sets LayoutRegions.ActiveRegion: The region shown in narrow mode when no region owns focus.
Parameters
- layoutRegions ConsoleMonster.Widgets.LayoutRegions
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.LayoutRegions { ActiveRegion = value }; Ui.LayoutRegions().ActiveRegion(value);public static LayoutRegions Gap(LayoutRegions layoutRegions, int value) #Sets LayoutRegions.Gap: The gap in cells between regions.
Parameters
- layoutRegions ConsoleMonster.Widgets.LayoutRegions
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.LayoutRegions { Gap = value }; Ui.LayoutRegions().Gap(value);public static LayoutRegions NarrowBelow(LayoutRegions layoutRegions, int value) #Sets LayoutRegions.NarrowBelow: The minimum width for showing regions side by side.
Parameters
- layoutRegions ConsoleMonster.Widgets.LayoutRegions
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.LayoutRegions { NarrowBelow = value }; Ui.LayoutRegions().NarrowBelow(value);