Class RenderCoordinator
- Namespace
- SharpConsoleUI.Rendering
- Assembly
- SharpConsoleUI.dll
Coordinates all rendering operations for the console window system. Handles window rendering, status bar display, caching, and performance metrics. Extracted from ConsoleWindowSystem as part of Phase 1.2 refactoring.
public class RenderCoordinator
- Inheritance
-
RenderCoordinator
- Inherited Members
Constructors
RenderCoordinator(IConsoleDriver, Renderer, WindowStateService, StatusBarStateService, ILogService, ConsoleWindowSystem, ConsoleWindowSystemOptions, PerformanceTracker)
Initializes a new instance of the RenderCoordinator class.
public RenderCoordinator(IConsoleDriver consoleDriver, Renderer renderer, WindowStateService windowStateService, StatusBarStateService statusBarStateService, ILogService logService, ConsoleWindowSystem windowSystemContext, ConsoleWindowSystemOptions options, PerformanceTracker performanceTracker)
Parameters
consoleDriverIConsoleDriverConsole driver for low-level I/O.
rendererRendererRenderer for window and content rendering.
windowStateServiceWindowStateServiceService managing window state and Z-order.
statusBarStateServiceStatusBarStateServiceService managing status bar state and Start menu.
logServiceILogServiceService for debug logging.
windowSystemContextConsoleWindowSystemContext providing access to window system properties.
optionsConsoleWindowSystemOptionsConfiguration options for the window system.
performanceTrackerPerformanceTrackerPerformance metrics tracker.
Properties
BottomStatusBarBounds
Gets the bottom status bar bounds for mouse hit testing.
public Rectangle BottomStatusBarBounds { get; }
Property Value
StartButtonBounds
Gets the start button bounds for mouse hit testing.
public Rectangle StartButtonBounds { get; }
Property Value
TopStatusBarBounds
Gets the top status bar bounds for mouse hit testing.
public Rectangle TopStatusBarBounds { get; }
Property Value
Methods
AddPendingDesktopClear(Rectangle)
Adds a desktop area to be cleared on the next render. Used for atomic clearing of old window positions.
public void AddPendingDesktopClear(Rectangle rect)
Parameters
rectRectangleThe rectangle to clear.
AddWindowNeedingRegionUpdate(Window)
Adds a window to the set of windows needing region update.
public void AddWindowNeedingRegionUpdate(Window window)
Parameters
windowWindowThe window needing a region update.
GetBottomStatusHeight()
Gets the height occupied by the bottom status bar (0 or 1). Accounts for both status text and Start button.
public int GetBottomStatusHeight()
Returns
GetTopStatusHeight()
Gets the height occupied by the top status bar (0 or 1). Accounts for both status text and performance metrics.
public int GetTopStatusHeight()
Returns
InvalidateAllWindows()
Invalidates all windows and status bars, forcing a complete redraw. Call this after theme changes, status bar visibility changes, or other global UI updates.
public void InvalidateAllWindows()
InvalidateStatusCache()
Invalidates all status bar caches, forcing them to be rebuilt on next render. Call this when window state, titles, or themes change.
public void InvalidateStatusCache()
UpdateDisplay()
Main rendering orchestrator. Renders all dirty windows, status bars, and flushes to console.
public void UpdateDisplay()
UpdateStatusBarBounds()
Updates the status bar bounds based on current screen size and configuration. Call this after screen resizes or configuration changes.
public void UpdateStatusBarBounds()