Etermal
Embeddable Terminal and shell for OpenGL
Public Member Functions | List of all members
etm::ETerminal Class Referenceabstract

Base interface for an Etermal frontend. More...

#include <ETerminal.h>

Inheritance diagram for etm::ETerminal:
etm::Terminal

Public Member Functions

virtual void setTakeInput (bool value)=0
 Sets whether the shell wants input. More...
 
virtual void clear ()=0
 Clears the screen. More...
 
virtual void requestInput (TermInput &callback)=0
 Each call adds callback to the input queue. More...
 
virtual void cancelInputRequest (TermInput *callback)=0
 Removes all instances of a callback from the input queue. More...
 
virtual void clearInputRequests ()=0
 Deletes all input requests. More...
 
virtual void clearInput ()=0
 Clears the input area (the area after the cursor lock).
 
virtual std::string pollInput ()=0
 Get the current input text. More...
 
virtual void dispText (const std::string &str)=0
 Append text to the display buffer. More...
 
virtual void flush ()=0
 Pushes the display buffer to the display. More...
 
virtual void softFlush ()=0
 Pushes the display buffer to the display. More...
 

Detailed Description

Base interface for an Etermal frontend.

Handles the displaying of text.

See also
Terminal
EShell

Member Function Documentation

◆ cancelInputRequest()

virtual void etm::ETerminal::cancelInputRequest ( TermInput callback)
pure virtual

Removes all instances of a callback from the input queue.

Parameters
[in]callbackpointer to the callback to be removed
See also
requestInput(TermInput &callback)

Implemented in etm::Terminal.

◆ clear()

virtual void etm::ETerminal::clear ( )
pure virtual

Clears the screen.

Causes all caches and other data related to the text and screen to be cleared.

Warning
Will also clear the display buffer [dispText(const std::string &str)]
See also
dispText(const std::string &str)
flush()

Implemented in etm::Terminal.

◆ clearInputRequests()

virtual void etm::ETerminal::clearInputRequests ( )
pure virtual

◆ dispText()

virtual void etm::ETerminal::dispText ( const std::string &  str)
pure virtual

Append text to the display buffer.

The buffer will not be displayed until flush() is called.

Parameters
[in]strUTF-8 encoded string to be appended to the display buffer
See also
flush()

Implemented in etm::Terminal.

◆ flush()

virtual void etm::ETerminal::flush ( )
pure virtual

Pushes the display buffer to the display.

Note
Pushes the cursor with it.
See also
dispText(const std::string &str)

Implemented in etm::Terminal.

◆ pollInput()

virtual std::string etm::ETerminal::pollInput ( )
pure virtual

Get the current input text.

Note
This is only a get operation. Nothing is changed as a result of this call.
Returns
The input text, UTF-8 encoded

Implemented in etm::Terminal.

◆ requestInput()

virtual void etm::ETerminal::requestInput ( TermInput callback)
pure virtual

Each call adds callback to the input queue.

Each time input is entered, the callback is called and removed. Be careful of multible calls to this, for you could become locked in.

Parameters
[in]callbackThe callback to recieve the input text as a UTF-8 encoded string
See also
cancelInputRequest(TermInput *callback)

Implemented in etm::Terminal.

◆ setTakeInput()

virtual void etm::ETerminal::setTakeInput ( bool  value)
pure virtual

Sets whether the shell wants input.

If this is false and there are no queued input requests, the terminal will ignore input.

Parameters
[in]valueWhether the shell wants input
See also
requestInput(TermInput &callback)
EShell

Implemented in etm::Terminal.

◆ softFlush()

virtual void etm::ETerminal::softFlush ( )
pure virtual

Pushes the display buffer to the display.

Unlike flush(), does not move the cursor.

See also
dispText(const std::string &str)

Implemented in etm::Terminal.


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