Table of Contents

Interface ICliTerminal

Namespace
ItTiger.TigerCli.Terminal
Assembly
ItTiger.TigerCli.dll
Terminal abstraction used by interactive rendering and test hosts.
public interface ICliTerminal

Properties

BackgroundColor

Current background colour.
CliColor BackgroundColor { get; set; }

Property Value

CliColor

CursorLeft

Current cursor column.
int CursorLeft { get; }

Property Value

int

CursorTop

Current cursor row.
int CursorTop { get; }

Property Value

int

CursorVisible

Cursor visibility.
bool CursorVisible { get; set; }

Property Value

bool

ForegroundColor

Current foreground colour.
CliColor ForegroundColor { get; set; }

Property Value

CliColor

KeyAvailable

Whether a key press is available without blocking.
bool KeyAvailable { get; }

Property Value

bool

Sink

Render sink used by this terminal.
ICliRenderSink Sink { get; }

Property Value

ICliRenderSink

State

Captures the terminal state needed for later restoration.
ITerminalState State { get; }

Property Value

ITerminalState

WindowHeight

Current terminal window height.
int WindowHeight { get; }

Property Value

int

WindowWidth

Current terminal window width.
int WindowWidth { get; }

Property Value

int

Methods

ClearLines(int, int, CliColor)

Clears a range of terminal rows using the supplied background colour.
void ClearLines(int fromRow, int count, CliColor bgColor)

Parameters

fromRow int
count int
bgColor CliColor

ReadKey(bool)

Reads a key from the terminal.
ConsoleKeyInfo ReadKey(bool intercept)

Parameters

intercept bool

Returns

ConsoleKeyInfo

RenderGrid(int, int, CliGrid)

Renders a grid at a terminal coordinate.
void RenderGrid(int x, int y, CliGrid grid)

Parameters

x int
y int
grid CliGrid

RestoreState(ITerminalState, int, int)

Restores a captured terminal state and clears the rendered region.
void RestoreState(ITerminalState terminalState, int startRow, int height)

Parameters

terminalState ITerminalState
startRow int
height int

SetCursorPosition(int, int)

Moves the cursor.
void SetCursorPosition(int left, int top)

Parameters

left int
top int