Table of Contents

Class ConsoleWindowSystemOptions

Namespace
SharpConsoleUI.Configuration
Assembly
SharpConsoleUI.dll

Configuration options for ConsoleWindowSystem behavior.

public record ConsoleWindowSystemOptions : IEquatable<ConsoleWindowSystemOptions>
Inheritance
ConsoleWindowSystemOptions
Implements
Inherited Members
Extension Methods

Constructors

ConsoleWindowSystemOptions(bool, bool, int, StatusBarOptions?, bool, DirtyTrackingMode, float, int, bool, bool, bool, int, DiagnosticsLayers, bool, bool)

Configuration options for ConsoleWindowSystem behavior.

public ConsoleWindowSystemOptions(bool EnablePerformanceMetrics = false, bool EnableFrameRateLimiting = true, int TargetFPS = 60, StatusBarOptions? StatusBarOptions = null, bool ClampToWindowWidth = false, DirtyTrackingMode DirtyTrackingMode = DirtyTrackingMode.Smart, float SmartModeCoverageThreshold = 0.6, int SmartModeFragmentationThreshold = 5, bool EnableAnimations = true, bool ClearDestinationOnWindowMove = true, bool EnableDiagnostics = false, int DiagnosticsRetainFrames = 1, DiagnosticsLayers DiagnosticsLayers = DiagnosticsLayers.All, bool EnableQualityAnalysis = false, bool EnablePerformanceProfiling = false)

Parameters

EnablePerformanceMetrics bool
EnableFrameRateLimiting bool
TargetFPS int
StatusBarOptions StatusBarOptions
ClampToWindowWidth bool
DirtyTrackingMode DirtyTrackingMode
SmartModeCoverageThreshold float
SmartModeFragmentationThreshold int
EnableAnimations bool
ClearDestinationOnWindowMove bool
EnableDiagnostics bool
DiagnosticsRetainFrames int
DiagnosticsLayers DiagnosticsLayers
EnableQualityAnalysis bool
EnablePerformanceProfiling bool

Properties

ClampToWindowWidth

public bool ClampToWindowWidth { get; init; }

Property Value

bool

ClearDestinationOnWindowMove

public bool ClearDestinationOnWindowMove { get; init; }

Property Value

bool

Default

Gets the default configuration with frame rate limiting enabled at 60 FPS.

public static ConsoleWindowSystemOptions Default { get; }

Property Value

ConsoleWindowSystemOptions

DiagnosticsLayers

public DiagnosticsLayers DiagnosticsLayers { get; init; }

Property Value

DiagnosticsLayers

DiagnosticsRetainFrames

public int DiagnosticsRetainFrames { get; init; }

Property Value

int

DirtyTrackingMode

public DirtyTrackingMode DirtyTrackingMode { get; init; }

Property Value

DirtyTrackingMode

EnableAnimations

public bool EnableAnimations { get; init; }

Property Value

bool

EnableDiagnostics

public bool EnableDiagnostics { get; init; }

Property Value

bool

EnableFrameRateLimiting

public bool EnableFrameRateLimiting { get; init; }

Property Value

bool

EnablePerformanceMetrics

public bool EnablePerformanceMetrics { get; init; }

Property Value

bool

EnablePerformanceProfiling

public bool EnablePerformanceProfiling { get; init; }

Property Value

bool

EnableQualityAnalysis

public bool EnableQualityAnalysis { get; init; }

Property Value

bool

MinFrameTime

Gets the minimum time between frames in milliseconds based on TargetFPS.

public int MinFrameTime { get; }

Property Value

int

SmartModeCoverageThreshold

public float SmartModeCoverageThreshold { get; init; }

Property Value

float

SmartModeFragmentationThreshold

public int SmartModeFragmentationThreshold { get; init; }

Property Value

int

StatusBar

Gets the status bar configuration, using defaults if not specified.

public StatusBarOptions StatusBar { get; }

Property Value

StatusBarOptions

StatusBarOptions

public StatusBarOptions? StatusBarOptions { get; init; }

Property Value

StatusBarOptions

TargetFPS

public int TargetFPS { get; init; }

Property Value

int

WithMetrics

Gets a configuration with performance metrics enabled.

public static ConsoleWindowSystemOptions WithMetrics { get; }

Property Value

ConsoleWindowSystemOptions

WithoutFrameRateLimiting

Gets a configuration with frame rate limiting disabled (renders as fast as possible).

public static ConsoleWindowSystemOptions WithoutFrameRateLimiting { get; }

Property Value

ConsoleWindowSystemOptions

Methods

Create(bool?, bool?, int?)

Creates a new configuration, checking environment variable SHARPCONSOLEUI_PERF_METRICS for override.

public static ConsoleWindowSystemOptions Create(bool? enableMetrics = null, bool? enableFrameRateLimiting = null, int? targetFPS = null)

Parameters

enableMetrics bool?

Explicit enable flag, or null to check environment variable.

enableFrameRateLimiting bool?

Enable frame rate limiting (default: true).

targetFPS int?

Target frames per second (default: 60).

Returns

ConsoleWindowSystemOptions

A new ConsoleWindowSystemOptions instance.

WithTargetFPS(int)

Gets a configuration with custom target FPS.

public static ConsoleWindowSystemOptions WithTargetFPS(int fps)

Parameters

fps int

Returns

ConsoleWindowSystemOptions