Skip to content
ConsoleMonster
Interface

IConsoleDriver

ConsoleMonster.Output

Namespace
ConsoleMonster.Output
Assembly
ConsoleMonster
Implements
ITerminalTarget
Modifiers
abstract

A terminal that ConsoleMonster drives: a target (profile, writer, input) that also reports its visible window, so live sessions, apps, prompts and menus redraw at the size the user sees. The process console (ConsoleTarget) is one driver; HeadlessTerminal runs the same code with no terminal at all, for CI, goldens, recordings, the browser host and the debug socket.

Remarks

Output reaches the driver through ITerminalTarget.Writer exactly as it would reach a terminal (VT sequences included), and input comes from ITerminalTarget.Input. A window size change is reported by this method and announced to the reader with a resize input event.

Methods

public abstract bool TryGetWindow(out int left, out int top, out int width, out int height) #

The visible window in cells: its position in the buffer and its size.

Parameters

left int required
The leftmost visible column of the buffer (zero when the driver has no scrollable buffer).
top int required
The topmost visible row of the buffer (zero when the driver has no scrollable buffer).
width int required
The window width in cells.
height int required
The window height in cells.

Returns

bool False when the size is unknown (for example, output is redirected); callers then use the profile's size.