Table of Contents

Class LayoutDefaults

Namespace
SharpConsoleUI.Configuration
Assembly
SharpConsoleUI.dll

Centralized default values for layout measurement and rendering width limits.

public static class LayoutDefaults
Inheritance
LayoutDefaults
Inherited Members

Fields

DefaultUnboundedMeasureWidth

Width used by GetLogicalContentSize when no explicit width is set. Prevents unbounded allocation when measuring Spectre renderables.

public const int DefaultUnboundedMeasureWidth = 1000

Field Value

int

MaxSafeRenderWidth

Hard safety cap for AnsiEmptySpace to prevent OOM from any caller passing an excessively large width.

public const int MaxSafeRenderWidth = 10000

Field Value

int

MaxUnboundedMeasureHeight

Hard safety cap for a layout node's auto-measured DESIRED HEIGHT when the incoming constraints are unbounded (MaxHeight == int.MaxValue). A node's reported size becomes its arranged bounds; if an unbounded child measure (e.g. a Fill child receiving int.MaxValue - fixed ≈ 2 billion) leaks into the returned size, an ancestor container's row-fill loop would iterate hundreds of millions of times (effective hang). No real terminal viewport is anywhere near this tall, so clamping here is behavior-preserving for legitimate content while making a runaway extent impossible.

public const int MaxUnboundedMeasureHeight = 10000

Field Value

int