Abstract terminal interface. More...
#include <senf/Utils/Termlib/AbstractTerminal.hh>
Classes | |
struct | Callbacks |
AbstractTerminal callbacks. More... | |
Public Member Functions | |
virtual | ~AbstractTerminal () |
virtual void | setCallbacks (Callbacks &cb)=0 |
Register terminal callbacks. More... | |
virtual std::string | terminalType ()=0 |
Get the terminal type. More... | |
virtual unsigned | width () const =0 |
Get current terminal window width. More... | |
virtual unsigned | height () const =0 |
Get current terminal window height. More... | |
virtual void | write (char ch)=0 |
Write character to terminal. More... | |
Abstract terminal interface.
This abstract interface base class provides an abstract interface to a terminal. There are two parts to this interface:
The first part is implemented by providing abstract virtual members in AbstractTerminal. To allow the terminal to send messages to the terminal user, the terminal user implements the AbstractTerminal::Callbacks interface. The terminal user must register himself with the AbstractTerminal by calling setCallbacks(). Afterwards, the AbstractTerminal implementation will send calls to the terminal user via the AbstractTerminal::Callbacks API.
Definition at line 43 of file AbstractTerminal.hh.
|
inlinevirtual |
Definition at line 58 of file AbstractTerminal.hh.
|
pure virtual |
Get current terminal window height.
Implemented in senf::term::TelnetTerminal.
|
pure virtual |
Register terminal callbacks.
Implemented in senf::term::TelnetTerminal.
|
pure virtual |
Get the terminal type.
Implemented in senf::term::TelnetTerminal.
|
pure virtual |
Get current terminal window width.
Implemented in senf::term::TelnetTerminal.
|
pure virtual |
Write character to terminal.
Implemented in senf::term::TelnetTerminal.