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, bool, DirtyTrackingMode, float, int, bool, bool, bool, int, DiagnosticsLayers, bool, bool, Func<PanelBuilder, PanelBuilder>?, Func<PanelBuilder, PanelBuilder>?, bool, bool, DesktopBackgroundConfig?, TerminalTransparencyMode, ConsoleKey?, ConsoleKey?)
Configuration options for ConsoleWindowSystem behavior.
public ConsoleWindowSystemOptions(bool EnablePerformanceMetrics = false, bool EnableFrameRateLimiting = true, int TargetFPS = 60, 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, Func<PanelBuilder, PanelBuilder>? TopPanelConfig = null, Func<PanelBuilder, PanelBuilder>? BottomPanelConfig = null, bool ShowTopPanel = true, bool ShowBottomPanel = true, DesktopBackgroundConfig? DesktopBackground = null, TerminalTransparencyMode TerminalTransparencyMode = TerminalTransparencyMode.PreserveWindowColor, ConsoleKey? WindowCycleKey = ConsoleKey.T, ConsoleKey? ExitKey = ConsoleKey.Q)
Parameters
EnablePerformanceMetricsboolEnableFrameRateLimitingboolTargetFPSintClampToWindowWidthboolDirtyTrackingModeDirtyTrackingModeSmartModeCoverageThresholdfloatSmartModeFragmentationThresholdintEnableAnimationsboolClearDestinationOnWindowMoveboolEnableDiagnosticsboolDiagnosticsRetainFramesintDiagnosticsLayersDiagnosticsLayersEnableQualityAnalysisboolEnablePerformanceProfilingboolTopPanelConfigFunc<PanelBuilder, PanelBuilder>BottomPanelConfigFunc<PanelBuilder, PanelBuilder>ShowTopPanelboolShowBottomPanelboolDesktopBackgroundDesktopBackgroundConfigTerminalTransparencyModeTerminalTransparencyModeWindowCycleKeyConsoleKey?ExitKeyConsoleKey?
Properties
BottomPanelConfig
public Func<PanelBuilder, PanelBuilder>? BottomPanelConfig { get; init; }
Property Value
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
DesktopBackground
public DesktopBackgroundConfig? DesktopBackground { get; init; }
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
ExitKey
public ConsoleKey? ExitKey { get; init; }
Property Value
MinFrameTime
Gets the minimum time between frames in milliseconds based on TargetFPS.
public int MinFrameTime { get; }
Property Value
ShowBottomPanel
public bool ShowBottomPanel { get; init; }
Property Value
ShowTopPanel
public bool ShowTopPanel { get; init; }
Property Value
SmartModeCoverageThreshold
public float SmartModeCoverageThreshold { get; init; }
Property Value
SmartModeFragmentationThreshold
public int SmartModeFragmentationThreshold { get; init; }
Property Value
TargetFPS
public int TargetFPS { get; init; }
Property Value
TerminalTransparencyMode
public TerminalTransparencyMode TerminalTransparencyMode { get; init; }
Property Value
TopPanelConfig
public Func<PanelBuilder, PanelBuilder>? TopPanelConfig { get; init; }
Property Value
WindowCycleKey
public ConsoleKey? WindowCycleKey { 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