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
EnablePerformanceMetricsboolEnableFrameRateLimitingboolTargetFPSintStatusBarOptionsStatusBarOptionsFix1_DisablePreclearboolFix2_ConditionalDirtyboolFix3_NoAnsiAccumulationboolFix6_WidthLimitboolFix7_ClearAreaConditionalboolFix12_ResetAfterLineboolFix13_OptimizeAnsiOutputboolFix15_FixBufferSyncBugboolFix24_DrainInputBeforeRenderboolFix25_DisableMouseDuringRenderboolFix27_PeriodicFullRedrawboolFix27_RedrawIntervalSecondsdoubleEnableDiagnosticsboolDiagnosticsRetainFramesintDiagnosticsLayersDiagnosticsLayersEnableQualityAnalysisboolEnablePerformanceProfilingbool
Properties
Default
Gets the default configuration with frame rate limiting enabled at 60 FPS.
public static ConsoleWindowSystemOptions Default { get; }
Property Value
DiagnosticsLayers
public DiagnosticsLayers DiagnosticsLayers { get; init; }
Property Value
DiagnosticsRetainFrames
public int DiagnosticsRetainFrames { get; init; }
Property Value
EnableDiagnostics
public bool EnableDiagnostics { get; init; }
Property Value
EnableFrameRateLimiting
public bool EnableFrameRateLimiting { get; init; }
Property Value
EnablePerformanceMetrics
public bool EnablePerformanceMetrics { get; init; }
Property Value
EnablePerformanceProfiling
public bool EnablePerformanceProfiling { get; init; }
Property Value
EnableQualityAnalysis
public bool EnableQualityAnalysis { get; init; }
Property Value
Fix12_ResetAfterLine
public bool Fix12_ResetAfterLine { get; init; }
Property Value
Fix13_OptimizeAnsiOutput
public bool Fix13_OptimizeAnsiOutput { get; init; }
Property Value
Fix15_FixBufferSyncBug
public bool Fix15_FixBufferSyncBug { get; init; }
Property Value
Fix1_DisablePreclear
public bool Fix1_DisablePreclear { get; init; }
Property Value
Fix24_DrainInputBeforeRender
public bool Fix24_DrainInputBeforeRender { get; init; }
Property Value
Fix25_DisableMouseDuringRender
public bool Fix25_DisableMouseDuringRender { get; init; }
Property Value
Fix27_PeriodicFullRedraw
public bool Fix27_PeriodicFullRedraw { get; init; }
Property Value
Fix27_RedrawIntervalSeconds
public double Fix27_RedrawIntervalSeconds { get; init; }
Property Value
Fix2_ConditionalDirty
public bool Fix2_ConditionalDirty { get; init; }
Property Value
Fix3_NoAnsiAccumulation
public bool Fix3_NoAnsiAccumulation { get; init; }
Property Value
Fix6_WidthLimit
public bool Fix6_WidthLimit { get; init; }
Property Value
Fix7_ClearAreaConditional
public bool Fix7_ClearAreaConditional { get; init; }
Property Value
MinFrameTime
Gets the minimum time between frames in milliseconds based on TargetFPS.
public int MinFrameTime { get; }
Property Value
StatusBar
Gets the status bar configuration, using defaults if not specified.
public StatusBarOptions StatusBar { get; }
Property Value
StatusBarOptions
public StatusBarOptions? StatusBarOptions { get; init; }
Property Value
TargetFPS
public int TargetFPS { get; init; }
Property Value
WithMetrics
Gets a configuration with performance metrics enabled.
public static ConsoleWindowSystemOptions WithMetrics { get; }
Property Value
WithoutFrameRateLimiting
Gets a configuration with frame rate limiting disabled (renders as fast as possible).
public static ConsoleWindowSystemOptions WithoutFrameRateLimiting { get; }
Property Value
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
enableMetricsbool?Explicit enable flag, or null to check environment variable.
enableFrameRateLimitingbool?Enable frame rate limiting (default: true).
targetFPSint?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
fpsint