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

Constructors

ConsoleWindowSystemOptions(bool, bool, int, StatusBarOptions?, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, double, 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 Fix1_DisablePreclear = true, bool Fix2_ConditionalDirty = true, bool Fix3_NoAnsiAccumulation = true, bool Fix6_WidthLimit = false, bool Fix7_ClearAreaConditional = true, bool Fix12_ResetAfterLine = true, bool Fix13_OptimizeAnsiOutput = true, bool Fix15_FixBufferSyncBug = true, bool Fix24_DrainInputBeforeRender = false, bool Fix25_DisableMouseDuringRender = false, bool Fix27_PeriodicFullRedraw = true, double Fix27_RedrawIntervalSeconds = 1, 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
Fix1_DisablePreclear bool
Fix2_ConditionalDirty bool
Fix3_NoAnsiAccumulation bool
Fix6_WidthLimit bool
Fix7_ClearAreaConditional bool
Fix12_ResetAfterLine bool
Fix13_OptimizeAnsiOutput bool
Fix15_FixBufferSyncBug bool
Fix24_DrainInputBeforeRender bool
Fix25_DisableMouseDuringRender bool
Fix27_PeriodicFullRedraw bool
Fix27_RedrawIntervalSeconds double
EnableDiagnostics bool
DiagnosticsRetainFrames int
DiagnosticsLayers DiagnosticsLayers
EnableQualityAnalysis bool
EnablePerformanceProfiling bool

Properties

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

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

Fix12_ResetAfterLine

public bool Fix12_ResetAfterLine { get; init; }

Property Value

bool

Fix13_OptimizeAnsiOutput

public bool Fix13_OptimizeAnsiOutput { get; init; }

Property Value

bool

Fix15_FixBufferSyncBug

public bool Fix15_FixBufferSyncBug { get; init; }

Property Value

bool

Fix1_DisablePreclear

public bool Fix1_DisablePreclear { get; init; }

Property Value

bool

Fix24_DrainInputBeforeRender

public bool Fix24_DrainInputBeforeRender { get; init; }

Property Value

bool

Fix25_DisableMouseDuringRender

public bool Fix25_DisableMouseDuringRender { get; init; }

Property Value

bool

Fix27_PeriodicFullRedraw

public bool Fix27_PeriodicFullRedraw { get; init; }

Property Value

bool

Fix27_RedrawIntervalSeconds

public double Fix27_RedrawIntervalSeconds { get; init; }

Property Value

double

Fix2_ConditionalDirty

public bool Fix2_ConditionalDirty { get; init; }

Property Value

bool

Fix3_NoAnsiAccumulation

public bool Fix3_NoAnsiAccumulation { get; init; }

Property Value

bool

Fix6_WidthLimit

public bool Fix6_WidthLimit { get; init; }

Property Value

bool

Fix7_ClearAreaConditional

public bool Fix7_ClearAreaConditional { get; init; }

Property Value

bool

MinFrameTime

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

public int MinFrameTime { get; }

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