Skip to content
ConsoleMonster
Struct

Constraints

ConsoleMonster.Layout

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 109 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 106

Constructors

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

Creates constraints.

Parameters

maxWidth int required
Maximum width in cells.
maxHeight int = 2147483647 optional
Maximum height in cells, or Constraints.Unbounded.

Methods

public Constraints Height(int maxHeight) #

Returns constraints with a different maximum height.

Parameters

maxHeight int required
The height.

Returns

Constraints New constraints.
public Constraints Shrink(int horizontal, int vertical) #

Returns constraints reduced by padding or borders.

Parameters

horizontal int required
Cells to remove from the width.
vertical int required
Cells to remove from the height (ignored when unbounded).

Returns

Constraints The reduced constraints.
public override string ToString() #

Returns the fully qualified type name of this instance.

Returns

string The fully qualified type name.
public Constraints Width(int maxWidth) #

Returns constraints with a different maximum width.

Parameters

maxWidth int required
The width.

Returns

Constraints New constraints.

Properties

public int MaxWidth { get; } #

Maximum width in cells.

public int MaxHeight { get; } #

Maximum height in cells, or Constraints.Unbounded.

public bool IsHeightUnbounded { get; } #

Whether the height is unbounded.

Fields

public const int Unbounded #

Marker for an unbounded dimension.

Value: 2147483647