#include </home/clem/local/src/opie/core/apps/embeddedkonsole/TEmulation.h>
Inheritance diagram for TEmulation:


Public Slots | |
| virtual void | onImageSizeChange (int lines, int columns) |
| virtual void | onHistoryCursorChange (int cursor) |
| virtual void | onHorzCursorChange (int cursor) |
| virtual void | onKeyPress (QKeyEvent *) |
| virtual void | clearSelection () |
| virtual void | onSelectionBegin (const int x, const int y) |
| virtual void | onSelectionExtend (const int x, const int y) |
| virtual void | setSelection (const BOOL preserve_line_breaks) |
| void | onRcvBlock (const char *txt, int len) |
| virtual void | onImageSizeChange (int lines, int columns) |
| virtual void | onHistoryCursorChange (int cursor) |
| virtual void | onKeyPress (QKeyEvent *) |
| virtual void | clearSelection () |
| virtual void | onSelectionBegin (const int x, const int y) |
| virtual void | onSelectionExtend (const int x, const int y) |
| virtual void | setSelection (const BOOL preserve_line_breaks) |
| void | onRcvBlock (const char *txt, int len) |
Signals | |
| void | sndBlock (const char *txt, int len) |
| void | ImageSizeChanged (int lines, int columns) |
| void | changeColumns (int columns) |
| void | changeTitle (int arg, const char *str) |
| void | sndBlock (const char *txt, int len) |
| void | ImageSizeChanged (int lines, int columns) |
| void | changeColumns (int columns) |
| void | changeTitle (int arg, const char *str) |
Public Member Functions | |
| TEmulation (TEWidget *gui) | |
| ~TEmulation () | |
| virtual void | setHistory (bool on) |
| virtual bool | history () |
| virtual void | onRcvChar (int) |
| virtual void | setMode (int)=0 |
| virtual void | resetMode (int)=0 |
| virtual void | sendString (const char *)=0 |
| virtual void | setConnect (bool r) |
| void | setColumns (int columns) |
| void | setKeytrans (int no) |
| void | setKeytrans (const char *no) |
| TEmulation (TEWidget *gui) | |
| ~TEmulation () | |
| virtual void | setHistory (bool on) |
| virtual bool | history () |
| virtual void | streamHistory (QTextStream *) |
| virtual void | onRcvChar (int) |
| virtual void | setMode (int)=0 |
| virtual void | resetMode (int)=0 |
| virtual void | sendString (const char *)=0 |
| virtual void | setConnect (bool r) |
| void | setColumns (int columns) |
| void | setKeytrans (int no) |
| void | setKeytrans (const char *no) |
Protected Member Functions | |
| void | setScreen (int n) |
| void | setCodec (int c) |
| void | setScreen (int n) |
| void | setCodec (int c) |
Protected Attributes | |
| TEWidget * | gui |
| TEScreen * | scr |
| TEScreen * | screen [2] |
| bool | connected |
| QTextCodec * | codec |
| QTextCodec * | localeCodec |
| QTextDecoder * | decoder |
| KeyTrans * | keytrans |
| TEWidget * | gui |
| TEScreen * | scr |
| TEScreen * | screen [2] |
| QTextCodec * | codec |
| QTextCodec * | localeCodec |
| QTextDecoder * | decoder |
| KeyTrans * | keytrans |
Private Slots | |
| void | showBulk () |
| void | showBulk () |
Private Member Functions | |
| void | bulkNewline () |
| void | bulkStart () |
| void | bulkEnd () |
| void | bulkNewline () |
| void | bulkStart () |
| void | bulkEnd () |
Private Attributes | |
| QTimer | bulk_timer |
| int | bulk_nlcnt |
| char * | SelectedText |
| int | bulk_incnt |
| char * | SelectedText |
This class is responsible to scan the escapes sequences of the terminal emulation and to map it to their corresponding semantic complements. Thus this module knows mainly about decoding escapes sequences and is a stateless device w.r.t. the semantics.
It is also responsible to refresh the TEWidget by certain rules.
The reason for doing so is twofold.
First, experiments show that directly displaying the operation results in slowing down the overall performance of emulations. Displaying individual characters using X11 creates a lot of overhead.
Second, by using the following refreshing method, the screen operations can be completely separated from the displaying. This greatly simplifies the programmer's task of coding and maintaining the screen operations, since one need not worry about differential modifications on the display affecting the operation of concern.
We use a refreshing algorithm here that has been adoped from rxvt/kvt.
By this, refreshing is driven by a timer, which is (re)started whenever a new bunch of data to be interpreted by the emulation arives at `onRcvBlock'. As soon as no more data arrive for `BULK_TIMEOUT' milliseconds, we trigger refresh. This rule suits both bulk display operation as done by curses as well as individual characters typed. (BULK_TIMEOUT < 1000 / max characters received from keyboard per second).
Additionally, we trigger refreshing by newlines comming in to make visual snapshots of lists as produced by `cat', `ls' and likely programs, thereby producing the illusion of a permanent and immediate display operation.
As a sort of catch-all needed for cases where none of the above conditions catch, the screen refresh is also triggered by a count of incoming bulks (`bulk_incnt').
Definition at line 29 of file TEmulation.h.
|
|
Definition at line 89 of file TEmulation.cpp. References bulk_incnt, bulk_nlcnt, bulk_timer, clearSelection(), TEWidget::Columns(), connected, FALSE, TEWidget::Lines(), onHistoryCursorChange(), onHorzCursorChange(), onImageSizeChange(), onKeyPress(), onSelectionBegin(), onSelectionExtend(), scr, screen, setSelection(), and showBulk(). |
|
|
Definition at line 132 of file TEmulation.cpp. References bulk_timer, and screen. |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 322 of file TEmulation.cpp. References bulk_incnt, bulk_nlcnt, BULK_TIMEOUT, bulk_timer, gui, TEWidget::Lines(), showBulk(), and TRUE. Referenced by onRcvBlock(). |
|
|
|
|
|
called when Definition at line 290 of file TEmulation.cpp. References bulk_incnt, and bulk_nlcnt. Referenced by onRcvBlock(). |
|
|
|
|
|
Definition at line 317 of file TEmulation.cpp. References bulk_timer. Referenced by onRcvBlock(). |
|
|
|
|
|
Referenced by setColumns(). |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
|
|
|
Definition at line 276 of file TEmulation.cpp. References TEScreen::clearSelection(), connected, scr, and showBulk(). Referenced by TEmulation(). |
|
|
|
|
|
Definition at line 154 of file TEmulation.cpp. References TEScreen::hasScroll(), and screen. Referenced by TESession::history(). |
|
||||||||||||
|
|
|
||||||||||||
|
Referenced by onImageSizeChange(). |
|
|
|
|
|
Definition at line 360 of file TEmulation.cpp. References connected, scr, TEScreen::setHistCursor(), and showBulk(). Referenced by TEmulation(). |
|
|
Definition at line 366 of file TEmulation.cpp. References connected, scr, TEScreen::setHorzCursor(), and showBulk(). Referenced by TEmulation(). |
|
||||||||||||
|
|
|
||||||||||||
|
triggered by image size change of the TEWidget `gui'. This event is simply propagated to the attached screens and to the related serial line. Definition at line 352 of file TEmulation.cpp. References connected, ImageSizeChanged(), TEScreen::resizeImage(), screen, and showBulk(). Referenced by setConnect(), and TEmulation(). |
|
|
|
|
|
Reimplemented in TEmuVt102, and TEmuVt102. Definition at line 216 of file TEmulation.cpp. References connected, TEScreen::getHistCursor(), TEScreen::getHistLines(), scr, TEScreen::setHistCursor(), and sndBlock(). Referenced by TEmulation(). |
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 241 of file TEmulation.cpp. References bulk_incnt, bulkEnd(), bulkNewline(), bulkStart(), decoder, i, QString::length(), onRcvChar(), and QTextDecoder::toUnicode(). Referenced by EmulationHandler::recv(). |
|
|
|
|
|
Reimplemented in TEmuVt102, and TEmuVt102. Definition at line 190 of file TEmulation.cpp. References TEScreen::BackSpace(), TEWidget::Bell(), gui, TEScreen::NewLine(), TEScreen::Return(), scr, TEScreen::ShowCharacter(), and TEScreen::Tabulate(). Referenced by onRcvBlock(). |
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 258 of file TEmulation.cpp. References connected, scr, TEScreen::setSelBeginXY(), and showBulk(). Referenced by TEmulation(). |
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 264 of file TEmulation.cpp. References connected, scr, TEScreen::setSelExtentXY(), and showBulk(). Referenced by TEmulation(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 159 of file TEmulation.cpp. References codec, QTextCodec::codecForLocale(), QTextCodec::codecForName(), decoder, and QTextCodec::makeDecoder(). Referenced by TEmuVt102::reset(), and TEmuVt102::tau(). |
|
|
|
|
|
Definition at line 372 of file TEmulation.cpp. References changeColumns(). Referenced by TEmuVt102::tau(). |
|
|
|
|
|
Reimplemented in TEmuVt102, and TEmuVt102. Definition at line 330 of file TEmulation.cpp. References TEScreen::clearSelection(), TEWidget::Columns(), connected, gui, TEWidget::Lines(), onImageSizeChange(), scr, and showBulk(). Referenced by EmulationHandler::EmulationHandler(), TEmuVt102::setConnect(), and TESession::setConnect(). |
|
|
|
|
|
Definition at line 147 of file TEmulation.cpp. References connected, screen, TEScreen::setScroll(), and showBulk(). Referenced by EmulationHandler::EmulationHandler(), and TESession::setHistory(). |
|
|
|
|
|
|
|
|
Definition at line 173 of file TEmulation.cpp. References KeyTrans::find(), and keytrans. |
|
|
Definition at line 168 of file TEmulation.cpp. References KeyTrans::find(), and keytrans. Referenced by EmulationHandler::load(), TEmuVt102::reset(), and TESession::setKeymapNo(). |
|
|
|
|
|
|
|
|
|
|
|
change between primary and alternate screen Definition at line 142 of file TEmulation.cpp. Referenced by TEmuVt102::resetMode(), and TEmuVt102::setMode(). |
|
|
|
|
|
Definition at line 270 of file TEmulation.cpp. References connected, TEScreen::getSelText(), gui, QString::isNull(), scr, TEWidget::setSelection(), and t. Referenced by TEmulation(). |
|
|
|
|
|
Definition at line 299 of file TEmulation.cpp. References bulk_incnt, bulk_nlcnt, connected, TEScreen::getColumns(), TEScreen::getCookedImage(), TEScreen::getHistCursor(), TEScreen::getHistLines(), TEScreen::getLines(), gui, image, scr, TEWidget::setImage(), and TEWidget::setScroll(). Referenced by bulkEnd(), clearSelection(), onHistoryCursorChange(), onHorzCursorChange(), onImageSizeChange(), onSelectionBegin(), onSelectionExtend(), setConnect(), setHistory(), and TEmulation(). |
|
||||||||||||
|
|
|
||||||||||||
|
Referenced by TEmuVt102::onKeyPress(), onKeyPress(), and TEmuVt102::sendString(). |
|
|
Definition at line 272 of file TEmulation.cpp. References TEScreen::getHistory(), and scr. |
|
|
Definition at line 117 of file TEmulation.h. Referenced by bulkEnd(), bulkNewline(), onRcvBlock(), showBulk(), and TEmulation(). |
|
|
Definition at line 115 of file TEmulation.h. Referenced by bulkEnd(), bulkNewline(), showBulk(), and TEmulation(). |
|
|
Definition at line 114 of file TEmulation.h. Referenced by bulkEnd(), bulkStart(), TEmulation(), and ~TEmulation(). |
|
|
Definition at line 94 of file TEmulation.h. |
|
|
Definition at line 90 of file TEmulation.h. Referenced by TEmuVt102::onKeyPress(), and setCodec(). |
|
|
Definition at line 90 of file TEmulation.h. Referenced by clearSelection(), onHistoryCursorChange(), onHorzCursorChange(), onImageSizeChange(), TEmuVt102::onKeyPress(), onKeyPress(), TEmuVt102::onMouse(), onSelectionBegin(), onSelectionExtend(), setConnect(), setHistory(), setSelection(), showBulk(), and TEmulation(). |
|
|
Definition at line 96 of file TEmulation.h. |
|
|
Definition at line 92 of file TEmulation.h. Referenced by onRcvBlock(), and setCodec(). |
|
|
Definition at line 85 of file TEmulation.h. |
|
|
Definition at line 81 of file TEmulation.h. Referenced by bulkEnd(), TEmuVt102::onKeyPress(), onRcvChar(), TEmuVt102::resetMode(), setConnect(), TEmuVt102::setMode(), setSelection(), showBulk(), and TEmuVt102::tau(). |
|
|
Definition at line 98 of file TEmulation.h. |
|
|
Definition at line 94 of file TEmulation.h. Referenced by TEmuVt102::onKeyPress(), and setKeytrans(). |
|
|
Definition at line 95 of file TEmulation.h. |
|
|
Definition at line 91 of file TEmulation.h. |
|
|
Definition at line 86 of file TEmulation.h. |
|
|
Definition at line 82 of file TEmulation.h. Referenced by clearSelection(), onHistoryCursorChange(), onHorzCursorChange(), TEmuVt102::onKeyPress(), onKeyPress(), onRcvChar(), onSelectionBegin(), onSelectionExtend(), TEmuVt102::reportCursorPosition(), TEmuVt102::restoreCursor(), TEmuVt102::saveCursor(), setConnect(), setScreen(), setSelection(), showBulk(), streamHistory(), TEmuVt102::tau(), and TEmulation(). |
|
|
Definition at line 87 of file TEmulation.h. |
|
|
Definition at line 83 of file TEmulation.h. Referenced by history(), onImageSizeChange(), TEmuVt102::reset(), TEmuVt102::resetMode(), setHistory(), TEmuVt102::setMode(), setScreen(), TEmulation(), and ~TEmulation(). |
|
|
Definition at line 116 of file TEmulation.h. |
|
|
Definition at line 112 of file TEmulation.h. |
1.4.2