Skip to content
ConsoleMonster

API Reference

Class

Rows

Namespace ConsoleMonster.Layout
Assembly ConsoleMonster
Source Rows.cs:12
Implements
Modifiers sealed

Stacks children vertically. In print-once output every child gets its measured height; in a live frame, LayoutSize.Fraction rows share the height left after fixed and auto rows (for example a log region that fills the bottom of the screen).

Inheritance

  • Object
  • Rows

Usage

Explore 9 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 7

Accepted by parameters 2

Constructors

public Rows(params IWidget[] children) #

Creates rows from children sized to their content.

Parameters

children ConsoleMonster.Layout.IWidget[] requiredposition: 0
The children.

Methods

public Rows Add(IWidget child, LayoutSize? size = null) #
Returns: Rows

Adds a child.

Parameters

child ConsoleMonster.Layout.IWidget requiredposition: 0
The child.
size ConsoleMonster.Layout.LayoutSize? = null optionalposition: 1
Its height specification (default auto).

Returns

This instance.

public Size Measure(Constraints constraints, RenderContext context) #
Returns: Size

Returns the size the widget wants within the constraints.

Parameters

constraints ConsoleMonster.Layout.Constraints requiredposition: 0
The space offered.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
Profile, theme and glyphs.

Returns

The desired size, never larger than the constraints.

public Void Render(Region region, RenderContext context) #
Returns: Void

Renders into a region. The region may be smaller or larger than the measured size.

Parameters

region ConsoleMonster.Canvas.Region requiredposition: 0
The target region.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
Profile, theme and glyphs.

Properties

public Int32 Gap { get; set; } #

Blank rows between children.

public IReadOnlyList<IWidget> Children { get; } #

The child widgets in layout order.

public IReadOnlyList<LayoutSize> Sizes { get; } #

Size specifications, parallel to Rows.Children.

Extension Methods

public static Rows WithGap(Rows rows, Int32 value) #
Returns: Rows

Sets Rows.Gap: Blank rows between children.

Parameters

rows ConsoleMonster.Layout.Rows requiredposition: 0
The instance.
value System.Int32 requiredposition: 1
The value.

Returns

The same instance.