Table of Contents

Class OutputBase

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

Abstract base class to assist with implementing IOutput.

public abstract class OutputBase
Inheritance
OutputBase
Derived
Inherited Members

Properties

Force16Colors
IsLegacyConsole

Methods

AppendCellAnsi(Cell, StringBuilder, ref Attribute?, ref TextStyle, int, ref int, ref int)

Appends ANSI sequences for a single cell to the output.

AppendOrWriteAttribute(StringBuilder, Attribute, TextStyle)

Changes the color and text style of the console to the given attr and redrawTextStyle. If command can be buffered in line with other output (e.g. CSI sequence) then it should be appended to output otherwise the relevant output state should be flushed directly (e.g. by calling relevant win 32 API method)

BuildAnsiForRegion(IOutputBuffer, int, int, int, int, StringBuilder, ref Attribute?, Func<int, int, bool>?, bool)

Builds ANSI escape sequences for the specified rectangular region of the buffer.

GetLastOutput()

Gets a string containing the ANSI escape sequences and content most recently written to the terminal via Write(IOutputBuffer)

GetSixels()
SetCursorPositionImpl(int, int)

When overriden in derived class, positions the terminal output cursor to the specified point on the screen.

SetCursorVisibility(CursorVisibility)

Changes the visibility of the cursor in the terminal to the specified visibility e.g. the flashing indicator, invisible, box indicator etc.

ToAnsi(IOutputBuffer)

Generates an ANSI escape sequence string representation of the given buffer contents. This is the same output that would be written to the terminal to recreate the current screen contents.

Write(StringBuilder)

Output the contents of the output to the console.

Write(IOutputBuffer)

Writes dirty cells from the buffer to the console. Hides cursor, iterates rows/cols, skips clean cells, batches dirty cells into ANSI sequences, wraps URLs with OSC 8, then renders sixel images. Cursor visibility is managed by ApplicationMainLoop.SetCursor().