Table of Contents

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

consoleDriver IConsoleDriver

Console driver for low-level I/O.

renderer Renderer

Renderer for window and content rendering.

windowStateService WindowStateService

Service managing window state and Z-order.

statusBarStateService StatusBarStateService

Service managing status bar state and Start menu.

logService ILogService

Service for debug logging.

windowSystemContext ConsoleWindowSystem

Context providing access to window system properties.

options ConsoleWindowSystemOptions

Configuration options for the window system.

performanceTracker PerformanceTracker

Performance metrics tracker.

Properties

BottomStatusBarBounds

Gets the bottom status bar bounds for mouse hit testing.

public Rectangle BottomStatusBarBounds { get; }

Property Value

Rectangle

StartButtonBounds

Gets the start button bounds for mouse hit testing.

public Rectangle StartButtonBounds { get; }

Property Value

Rectangle

TopStatusBarBounds

Gets the top status bar bounds for mouse hit testing.

public Rectangle TopStatusBarBounds { get; }

Property Value

Rectangle

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

rect Rectangle

The rectangle to clear.

AddWindowNeedingRegionUpdate(Window)

Adds a window to the set of windows needing region update.

public void AddWindowNeedingRegionUpdate(Window window)

Parameters

window Window

The 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

int

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

int

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()