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
EnablePerformanceMetricsboolEnableFrameRateLimitingboolTargetFPSintStatusBarOptionsStatusBarOptionsClampToWindowWidthboolDirtyTrackingModeDirtyTrackingModeSmartModeCoverageThresholdfloatSmartModeFragmentationThresholdintEnableAnimationsboolClearDestinationOnWindowMoveboolEnableDiagnosticsboolDiagnosticsRetainFramesintDiagnosticsLayersDiagnosticsLayersEnableQualityAnalysisboolEnablePerformanceProfilingbool
Properties
ClampToWindowWidth
public bool ClampToWindowWidth { get; init; }
Property Value
ClearDestinationOnWindowMove
public bool ClearDestinationOnWindowMove { get; init; }
Property Value
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
DirtyTrackingMode
public DirtyTrackingMode DirtyTrackingMode { get; init; }
Property Value
EnableAnimations
public bool EnableAnimations { 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
MinFrameTime
Gets the minimum time between frames in milliseconds based on TargetFPS.
public int MinFrameTime { get; }
Property Value
SmartModeCoverageThreshold
public float SmartModeCoverageThreshold { get; init; }
Property Value
SmartModeFragmentationThreshold
public int SmartModeFragmentationThreshold { get; init; }
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