Skip to content
ConsoleMonster

API Reference

Struct

Constraints

Namespace ConsoleMonster.Layout
Assembly ConsoleMonster
Base ValueType
Modifiers sealed

The space offered to a widget during measurement. Print-once output offers an unbounded height; live output offers the screen.

Inheritance

  • ValueType
  • Constraints

Usage

Explore 53 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 3

Accepted by parameters 50

Constructors

public Constraints(Int32 maxWidth, Int32 maxHeight = 2147483647) #

Creates constraints.

Parameters

maxWidth System.Int32 requiredposition: 0
Maximum width in cells.
maxHeight System.Int32 = 2147483647 optionalposition: 1
Maximum height in cells, or Constraints.Unbounded.

Methods

public Constraints Shrink(Int32 horizontal, Int32 vertical) #
Returns: Constraints

Returns constraints reduced by padding or borders.

Parameters

horizontal System.Int32 requiredposition: 0
Cells to remove from the width.
vertical System.Int32 requiredposition: 1
Cells to remove from the height (ignored when unbounded).

Returns

The reduced constraints.

public override String ToString() #
Returns: String

Returns the fully qualified type name of this instance.

Returns

The fully qualified type name.

public Constraints WithHeight(Int32 maxHeight) #
Returns: Constraints

Returns constraints with a different maximum height.

Parameters

maxHeight System.Int32 requiredposition: 0
The height.

Returns

New constraints.

public Constraints WithWidth(Int32 maxWidth) #
Returns: Constraints

Returns constraints with a different maximum width.

Parameters

maxWidth System.Int32 requiredposition: 0
The width.

Returns

New constraints.

Properties

public Int32 MaxWidth { get; } #

Maximum width in cells.

public Int32 MaxHeight { get; } #

Maximum height in cells, or Constraints.Unbounded.

public Boolean IsHeightUnbounded { get; } #

Whether the height is unbounded.

Fields

public const Int32 Unbounded #

Marker for an unbounded dimension.

Value: 2147483647