Table of Contents

Interface ISizeMonitor

Namespace
Terminal.Gui.Drivers
Assembly
Terminal.Gui.dll

Interface for classes responsible for reporting the current size of the terminal window.

public interface ISizeMonitor

Properties

InitialCursorRow

Gets the terminal row (0-indexed) where the cursor was when the application started. Used by inline mode to position the inline region at the cursor's starting row. Returns 0 by default (top of screen).

InitialSizeReceived

Gets whether the initial terminal size has been determined. Returns true for size monitors that know the size synchronously (e.g. via native APIs). For ANSI-based monitors that query size asynchronously via CSI escape sequences, returns false until the first size response is received from the terminal.

Methods

Initialize(IDriver?)

Called after the driver is fully initialized to allow the size monitor to perform any setup that requires access to the driver (e.g., queuing ANSI requests, setting up signal handlers, registering for console events).

Poll()

Examines the current size of the terminal and raises SizeChanged if it is different from last inspection.

Events

SizeChanged

Invoked when the terminal's size changed. The new size of the terminal is provided.