TerminalCursor

interface TerminalCursor

Cursor-movement contract for the terminal buffer.

Consumed by the ANSI parser for all cursor positioning, save/restore, and tab stop commands.

Inheritors

Functions

Link copied to clipboard
abstract fun clearAllTabStops()

Clears all tab stops (TBC 3, CSI 3 g).

Link copied to clipboard
abstract fun clearTabStop()

Clears the tab stop at the current cursor column (TBC 0, CSI 0 g).

Link copied to clipboard
abstract fun cursorBackwardTab(count: Int = 1)

Moves the cursor backward by count tab stops (CBT, CSI Ps Z).

Link copied to clipboard
abstract fun cursorDown(n: Int = 1)

Moves the cursor down by n rows (CUD, CSI n B).

Link copied to clipboard
abstract fun cursorForwardTab(count: Int = 1)

Advances the cursor forward by count tab stops (CHT, CSI Ps I).

Link copied to clipboard
abstract fun cursorLeft(n: Int = 1)

Moves the cursor left by n columns (CUB, CSI n D).

Link copied to clipboard
abstract fun cursorRight(n: Int = 1)

Moves the cursor right by n columns (CUF, CSI n C).

Link copied to clipboard
abstract fun cursorUp(n: Int = 1)

Moves the cursor up by n rows (CUU, CSI n A).

Link copied to clipboard
abstract fun horizontalTab()

Advances the cursor to the next tab stop (HT, 0x09).

Link copied to clipboard
abstract fun positionCursor(col: Int, row: Int)

Moves the cursor to an absolute position (CUP / HVP, CSI row ; col H).

Link copied to clipboard
abstract fun resetCursor()

Resets the cursor to the home position (col=0, row=0).

Link copied to clipboard
abstract fun restoreCursor()

Restores the core-owned state saved by saveCursor (DECRC, ESC 8).

Link copied to clipboard
abstract fun saveCursor()

Saves the core-owned cursor state (DECSC, ESC 7).

Link copied to clipboard
abstract fun setTabStop()

Sets a tab stop at the current cursor column (HTS, ESC H).