FabGL
ESP32 Display Controller and Graphics Library
TerminalController Class Reference

TerminalController allows direct controlling of the Terminal object without using escape sequences. More...

#include <terminal.h>

Public Member Functions

 TerminalController (Terminal *terminal=nullptr)
 Object constructor. More...
 
void clear ()
 Clears screen. More...
 
void cursorLeft (int count)
 Moves cursor to the left. More...
 
void cursorRight (int count)
 Moves cursor to the right. More...
 
void disableFabGLSequences ()
 Disables FabGL specific sequences. More...
 
void enableCursor (bool value)
 Enables/disables cursor. More...
 
int getCursorCol ()
 Gets current cursor column. More...
 
void getCursorPos (int *col, int *row)
 Gets current cursor position. More...
 
int getCursorRow ()
 Gets current cursor row. More...
 
bool isVKDown (VirtualKey vk)
 Checks if a virtual key is currently down. More...
 
void multilineDeleteChar (int charsToMove)
 Deletes a character moving specified amount of characters to the left. More...
 
bool multilineInsertChar (int charsToMove)
 Inserts a blank character and move specified amount of characters to the right. More...
 
void setBackgroundColor (Color value)
 Sets background color. More...
 
bool setChar (uint8_t c)
 Sets a raw character at current cursor position. More...
 
void setCharStyle (CharStyle style, bool enabled)
 Enables or disables specified character style. More...
 
void setCursorPos (int col, int row)
 Sets current cursor position. More...
 
void setForegroundColor (Color value)
 Sets foreground color. More...
 
void setTerminal (Terminal *terminal=nullptr)
 Sets destination terminal. More...
 
void setTerminalType (TermType value)
 Sets the terminal type to emulate. More...
 

Public Attributes

Delegate< int * > onRead
 Read character delegate. More...
 
Delegate< int > onWrite
 Write character delegate. More...
 

Detailed Description

TerminalController allows direct controlling of the Terminal object without using escape sequences.

TerminalController needs FabGL specific sequences to be enabled (this is the default), and always works despite the selected terminal emulation.

Example:

// Writes "Hello" at 10, 10
TerminalController termctrl(&Terminal);
termctrl.setCursorPos(10, 10);
Terminal.write("Hello");

Definition at line 1814 of file terminal.h.


The documentation for this class was generated from the following files: