#include </home/clem/local/src/opie/noncore/apps/opie-console/screen.h>
Collaboration diagram for Screen:

Public Member Functions | |
| Screen (int lines, int columns) | |
| ~Screen () | |
| void | cursorUp (int n) |
| void | cursorDown (int n) |
| void | cursorLeft (int n) |
| void | cursorRight (int n) |
| void | setCursorY (int y) |
| void | setCursorX (int x) |
| void | setCursorYX (int y, int x) |
| void | setMargins (int t, int b) |
| void | NewLine () |
| void | NextLine () |
| void | index () |
| void | reverseIndex () |
| void | Return () |
| void | BackSpace () |
| void | Tabulate () |
| void | eraseChars (int n) |
| void | deleteChars (int n) |
| void | insertChars (int n) |
| void | deleteLines (int n) |
| void | insertLines (int n) |
| void | clearTabStops () |
| void | changeTabStop (bool set) |
| void | resetMode (int n) |
| void | setMode (int n) |
| void | saveMode (int n) |
| void | restoreMode (int n) |
| void | saveCursor () |
| void | restoreCursor () |
| void | clearEntireScreen () |
| void | clearToEndOfScreen () |
| void | clearToBeginOfScreen () |
| void | clearEntireLine () |
| void | clearToEndOfLine () |
| void | clearToBeginOfLine () |
| void | helpAlign () |
| void | setRendition (int rendition) |
| void | resetRendition (int rendition) |
| void | setForeColor (int fgcolor) |
| void | setBackColor (int bgcolor) |
| void | setDefaultRendition () |
| void | setForeColorToDefault () |
| void | setBackColorToDefault () |
| BOOL | getMode (int n) |
| int | getCursorX () |
| int | getCursorY () |
| void | clear () |
| void | home () |
| void | reset () |
| void | ShowCharacter (unsigned short c) |
| void | resizeImage (int new_lines, int new_columns) |
| QArray< Character > | getCookedImage () |
| int | getLines () |
| int | getColumns () |
| void | setHistCursor (int cursor) |
| int | getHistCursor () |
| int | getHistLines () |
| void | setScroll (bool on) |
| bool | hasScroll () |
| void | setSelBeginXY (const int x, const int y) |
| void | setSelExtentXY (const int x, const int y) |
| void | clearSelection () |
| QString | getSelText (const BOOL preserve_line_breaks) |
| void | checkSelection (int from, int to) |
Private Member Functions | |
| void | clearImage (int loca, int loce, char c) |
| void | moveImage (int dst, int loca, int loce) |
| void | scrollUp (int from, int i) |
| void | scrollDown (int from, int i) |
| void | addHistLine () |
| void | initTabStops () |
| void | effectiveRendition () |
| void | reverseRendition (Character *p) |
Private Attributes | |
| int | lines |
| int | columns |
| QArray< Character > | image |
| int | histCursor |
| HistoryScroll | hist |
| int | cuX |
| int | cuY |
| UINT8 | cu_fg |
| UINT8 | cu_bg |
| UINT8 | cu_re |
| int | tmargin |
| int | bmargin |
| ScreenParm | currParm |
| bool * | tabstops |
| int | sel_begin |
| int | sel_TL |
| int | sel_BR |
| UINT8 | ef_fg |
| UINT8 | ef_bg |
| UINT8 | ef_re |
| int | sa_cuX |
| int | sa_cuY |
| UINT8 | sa_cu_re |
| UINT8 | sa_cu_fg |
| UINT8 | sa_cu_bg |
| ScreenParm | saveParm |
This class implements the operations of the terminal emulation framework. It is a complete passive device, driven by the emulation decoder (TEmuVT102). By this it forms in fact an ADT, that defines operations on a rectangular image.
It does neither know how to display its image nor about escape sequences. It is further independent of the underlying toolkit. By this, one can even use this module for an ordinary text surface.
Since the operations are called by a specific emulation decoder, one may collect their different operations here.
The state manipulated by the operations is mainly kept in `image', though it is a little more complex bejond this. See the header file of the class.
VT102Emulation
Definition at line 44 of file screen.h.
|
||||||||||||
|
creates a `Screen' of `lines' lines and `columns' columns. Definition at line 66 of file screen.cpp. References clearSelection(), histCursor, image, initTabStops(), NULL, reset(), and tabstops. |
|
|
Destructor Definition at line 83 of file screen.cpp. |
|
|
Definition at line 1150 of file screen.cpp. References HistoryScroll::addCells(), HistoryScroll::addLine(), assert, columns, end, HistoryScroll::getLines(), hasScroll(), hist, histCursor, and image. Referenced by index(), and resizeImage(). |
|
|
Moves the cursor left one column. Definition at line 589 of file screen.cpp. References BS_CLEARS, cuX, cuY, image, and loc. Referenced by EmulationLayer::onRcvChar(). |
|
|
Definition at line 609 of file screen.cpp. |
|
||||||||||||
|
put `c' literally onto the screen at the current cursor position. VT100 uses the convention to produce an automatic newline (am) with the *first* character that would fall onto the next line (xenl). Definition at line 643 of file screen.cpp. References clearSelection(), HistoryScroll::getLines(), hist, loc, sel_begin, sel_BR, and sel_TL. Referenced by ShowCharacter(). |
|
|
Clear the entire screen and home the cursor. Definition at line 580 of file screen.cpp. References clearEntireScreen(), and home(). Referenced by reset(). |
|
|
clears entire current cursor line Definition at line 874 of file screen.cpp. References clearImage(), columns, cuY, and loc. |
|
|
clear the entire screen. Definition at line 841 of file screen.cpp. References clearImage(), columns, lines, and loc. Referenced by clear(). |
|
||||||||||||||||
|
fill screen between (including) `loca' and `loce' with spaces. This is an internal helper functions. The parameter types are internal addresses of within the screen image and make use of the way how the screen matrix is mapped to the image vector. Definition at line 786 of file screen.cpp. References clearSelection(), ef_bg, ef_fg, ef_re, HistoryScroll::getLines(), hist, i, image, loc, sel_BR, and sel_TL. Referenced by clearEntireLine(), clearEntireScreen(), clearToBeginOfLine(), clearToBeginOfScreen(), clearToEndOfLine(), clearToEndOfScreen(), deleteChars(), eraseChars(), helpAlign(), insertChars(), scrollDown(), and scrollUp(). |
|
|
Definition at line 954 of file screen.cpp. References sel_begin, sel_BR, and sel_TL. Referenced by checkSelection(), clearImage(), EmulationLayer::clearSelection(), resizeImage(), Screen(), EmulationLayer::setConnect(), and setScroll(). |
|
|
Definition at line 604 of file screen.cpp. |
|
|
clear from begin of current cursor line to (including) current cursor position. Definition at line 866 of file screen.cpp. References clearImage(), cuX, cuY, and loc. |
|
|
clear from begin of screen to (including) current cursor position. Definition at line 833 of file screen.cpp. References clearImage(), cuX, cuY, and loc. |
|
|
clear from (including) current cursor position to end of current cursor line. Definition at line 858 of file screen.cpp. References clearImage(), columns, cuX, cuY, and loc. |
|
|
clear from (including) current cursor position to end of screen. Definition at line 825 of file screen.cpp. |
|
|
Move the cursor down. The cursor will not be moved beyond the bottom margin. Definition at line 128 of file screen.cpp. |
|
|
Move the cursor left. The cursor will not move beyond the first column. Definition at line 143 of file screen.cpp. |
|
|
Move the cursor left. The cursor will not move beyond the rightmost column. Definition at line 157 of file screen.cpp. Referenced by Tabulate(). |
|
|
Move the cursor up. The cursor will not be moved beyond the top margin. Definition at line 113 of file screen.cpp. |
|
|
delete `n' characters starting from (including) the cursor position. The line is filled in from the right with spaces. Definition at line 256 of file screen.cpp. References clearImage(), columns, cuX, cuY, loc, moveImage(), and p. |
|
|
delete `n' lines starting from (including) the cursor position. The cursor is not moved by the operation. Definition at line 283 of file screen.cpp. References cuY, and scrollUp(). |
|
|
Definition at line 474 of file screen.cpp. References BASE_COLORS, cu_bg, cu_fg, cu_re, ef_bg, ef_fg, ef_re, RE_BLINK, RE_BOLD, RE_REVERSE, and RE_UNDERLINE. Referenced by resetRendition(), restoreCursor(), setBackColor(), setBackColorToDefault(), setDefaultRendition(), setForeColor(), setForeColorToDefault(), and setRendition(). |
|
|
erase `n' characters starting from (including) the cursor position. The line is filled in from the right with spaces. Definition at line 244 of file screen.cpp. |
|
|
return the number of columns. Definition at line 144 of file screen.h. Referenced by EmulationLayer::showBulk(). |
|
|
returns the image. Get the size of the image by
Definition at line 507 of file screen.cpp. References columns, cuX, cuY, DEFAULT_BACK_COLOR, DEFAULT_FORE_COLOR, DEFAULT_RENDITION, HistoryScroll::getCells(), HistoryScroll::getLineLen(), HistoryScroll::getLines(), getMode(), hist, histCursor, i, image, len, lines, loc, MODE_Cursor, MODE_Screen, p, reverseRendition(), sel_BR, sel_TL, Opie::MM::x, and Opie::MM::y. Referenced by EmulationLayer::showBulk(). |
|
|
returns the current cursor columns. Definition at line 755 of file screen.cpp. References cuX. |
|
|
returns the current cursor line. Definition at line 763 of file screen.cpp. References cuY. |
|
|
return the position of the history cursor. Definition at line 1179 of file screen.cpp. References histCursor. Referenced by EmulationLayer::onKeyPress(), and EmulationLayer::showBulk(). |
|
|
Definition at line 1184 of file screen.cpp. References HistoryScroll::getLines(), and hist. Referenced by EmulationLayer::onKeyPress(), and EmulationLayer::showBulk(). |
|
|
return the number of lines. Definition at line 142 of file screen.h. Referenced by EmulationLayer::showBulk(). |
|
|
Return the setting a specific mode. Definition at line 340 of file screen.cpp. References currParm, and ScreenParm::mode. Referenced by getCookedImage(), NewLine(), setCursorY(), setMargins(), and ShowCharacter(). |
|
|
Definition at line 988 of file screen.cpp. References columns, d, HistoryScroll::getCell(), HistoryScroll::getLineLen(), HistoryScroll::getLines(), hist, i, image, loc, QString::null, s, sel_begin, sel_BR, and sel_TL. |
|
|
Definition at line 1196 of file screen.cpp. References HistoryScroll::hasScroll(), and hist. Referenced by addHistLine(), and EmulationLayer::history(). |
|
|
fill screen with 'E' This is to aid screen alignment Definition at line 850 of file screen.cpp. References clearImage(), columns, lines, and loc. |
|
|
set cursor to the `left upper' corner of the screen (1,1). Definition at line 738 of file screen.cpp. Referenced by clear(). |
|
|
Move the cursor down one line. If cursor is on bottom margin, the region between the actual top and bottom margin is scrolled up instead. Definition at line 193 of file screen.cpp. References addHistLine(), bmargin, cuY, lines, scrollUp(), and tmargin. Referenced by NewLine(), and NextLine(). |
|
|
Definition at line 615 of file screen.cpp. References columns, i, and tabstops. Referenced by resizeImage(), and Screen(). |
|
|
insert `n' spaces at the cursor position. The cursor is not moved by the operation. Definition at line 269 of file screen.cpp. References clearImage(), columns, cuX, cuY, loc, moveImage(), and p. Referenced by ShowCharacter(). |
|
|
insert `n' lines at the cursor position. The cursor is not moved by the operation. Definition at line 294 of file screen.cpp. References cuY, and scrollDown(). |
|
||||||||||||||||
|
move image between (including) `loca' and `loce' to 'dst'. This is an internal helper functions. The parameter types are internal addresses of within the screen image and make use of the way how the screen matrix is mapped to the image vector. Definition at line 812 of file screen.cpp. References image. Referenced by deleteChars(), insertChars(), scrollDown(), and scrollUp(). |
|
|
This behaves either as IND (Screen::Index) or as NEL (Screen::NextLine) depending on the NewLine Mode (LNM). This mode also affects the key sequence returned for newline ([CR]LF). Definition at line 631 of file screen.cpp. References getMode(), index(), MODE_NewLine, and Return(). Referenced by EmulationLayer::onRcvChar(). |
|
|
Move the cursor to the begin of the next line. If cursor is on bottom margin, the region between the actual top and bottom margin is scrolled up. Definition at line 228 of file screen.cpp. References index(), and Return(). Referenced by ShowCharacter(). |
|
|
Definition at line 559 of file screen.cpp. References bmargin, clear(), lines, MODE_Cursor, MODE_Insert, MODE_NewLine, MODE_Origin, MODE_Screen, MODE_Wrap, resetMode(), saveCursor(), saveMode(), setDefaultRendition(), setMode(), and tmargin. Referenced by Screen(). |
|
|
Reset a specific mode. Definition at line 315 of file screen.cpp. References currParm, cuX, cuY, FALSE, ScreenParm::mode, and MODE_Origin. Referenced by reset(). |
|
|
reset rendition mode Definition at line 895 of file screen.cpp. References cu_re, and effectiveRendition(). |
|
||||||||||||
|
Assing a new size to the screen. The topmost left position is maintained, while lower lines or right hand side columns might be removed or filled with spaces to fit the new size. The region setting is reset to the whole screen and the tab positions reinitialized. Definition at line 384 of file screen.cpp. References addHistLine(), bmargin, clearSelection(), columns, cuX, cuY, DEFAULT_BACK_COLOR, DEFAULT_FORE_COLOR, DEFAULT_RENDITION, i, image, initTabStops(), lines, loc, scrollUp(), tmargin, Opie::MM::x, and Opie::MM::y. Referenced by EmulationLayer::onImageSizeChange(). |
|
|
Restore the cursor position and the rendition attribute settings. Definition at line 358 of file screen.cpp. References columns, cu_bg, cu_fg, cu_re, cuX, cuY, effectiveRendition(), lines, sa_cu_bg, sa_cu_fg, sa_cu_re, sa_cuX, and sa_cuY. |
|
|
Restore a specific mode. Definition at line 333 of file screen.cpp. References currParm, ScreenParm::mode, and saveParm. |
|
|
set cursor to the begin of the current line. Definition at line 747 of file screen.cpp. References cuX. Referenced by NewLine(), NextLine(), and EmulationLayer::onRcvChar(). |
|
|
Move the cursor up one line. If cursor is on the top margin, the region between the actual top and bottom margin is scrolled down instead. Definition at line 212 of file screen.cpp. References cuY, scrollDown(), and tmargin. |
|
|
Definition at line 469 of file screen.cpp. References Character::b, Character::f, and f. Referenced by getCookedImage(). |
|
|
Save the cursor position and the rendition attribute settings. Definition at line 347 of file screen.cpp. References cu_bg, cu_fg, cu_re, cuX, cuY, sa_cu_bg, sa_cu_fg, sa_cu_re, sa_cuX, and sa_cuY. Referenced by reset(). |
|
|
Save a specific mode. Definition at line 326 of file screen.cpp. References currParm, ScreenParm::mode, and saveParm. Referenced by reset(). |
|
||||||||||||
|
scroll down `n' lines within current region. The `n' new lines are cleared.
Definition at line 701 of file screen.cpp. References bmargin, clearImage(), columns, loc, and moveImage(). Referenced by insertLines(), and reverseIndex(). |
|
||||||||||||
|
scroll up `n' lines within current region. The `n' new lines are cleared.
Definition at line 688 of file screen.cpp. References bmargin, clearImage(), columns, loc, and moveImage(). Referenced by deleteLines(), index(), and resizeImage(). |
|
|
Definition at line 924 of file screen.cpp. References cu_bg, and effectiveRendition(). |
|
|
Definition at line 933 of file screen.cpp. References cu_bg, DEFAULT_BACK_COLOR, and effectiveRendition(). Referenced by setDefaultRendition(). |
|
|
Set the cursor to x-th line. Definition at line 719 of file screen.cpp. Referenced by setCursorYX(). |
|
|
Set the cursor to y-th line. Definition at line 728 of file screen.cpp. References cuY, getMode(), lines, MODE_Origin, and tmargin. Referenced by setCursorYX(). |
|
||||||||||||
|
position the cursor to a specific line and column. Definition at line 712 of file screen.cpp. References setCursorX(), and setCursorY(). |
|
|
Definition at line 904 of file screen.cpp. References cu_re, DEFAULT_RENDITION, effectiveRendition(), setBackColorToDefault(), and setForeColorToDefault(). Referenced by reset(). |
|
|
Definition at line 915 of file screen.cpp. References cu_fg, and effectiveRendition(). |
|
|
Definition at line 942 of file screen.cpp. References cu_fg, DEFAULT_FORE_COLOR, and effectiveRendition(). Referenced by setDefaultRendition(). |
|
|
set the position of the history cursor. Definition at line 1174 of file screen.cpp. References histCursor. Referenced by EmulationLayer::onHistoryCursorChange(), and EmulationLayer::onKeyPress(). |
|
||||||||||||
|
Set top and bottom margin. Definition at line 168 of file screen.cpp. References bmargin, cuX, cuY, getMode(), lines, MODE_Origin, and tmargin. |
|
|
Set a specific mode. Definition at line 304 of file screen.cpp. References currParm, cuX, cuY, ScreenParm::mode, MODE_Origin, tmargin, and TRUE. Referenced by reset(). |
|
|
set rendition mode Definition at line 885 of file screen.cpp. References cu_re, and effectiveRendition(). |
|
|
Definition at line 1189 of file screen.cpp. References clearSelection(), hist, histCursor, and HistoryScroll::setScroll(). Referenced by EmulationLayer::setHistory(). |
|
||||||||||||
|
Definition at line 961 of file screen.cpp. References histCursor, loc, sel_begin, sel_BR, and sel_TL. Referenced by EmulationLayer::onSelectionBegin(). |
|
||||||||||||
|
Definition at line 968 of file screen.cpp. References columns, histCursor, l, loc, sel_begin, sel_BR, and sel_TL. Referenced by EmulationLayer::onSelectionExtend(). |
|
|
Definition at line 654 of file screen.cpp. References checkSelection(), columns, cuX, cuY, ef_bg, ef_fg, ef_re, getMode(), i, image, insertChars(), loc, MODE_Insert, MODE_Wrap, and NextLine(). Referenced by EmulationLayer::onRcvChar(). |
|
|
Definition at line 598 of file screen.cpp. References columns, cursorRight(), cuX, and tabstops. Referenced by EmulationLayer::onRcvChar(). |
|
|
Definition at line 217 of file screen.h. Referenced by cursorDown(), index(), reset(), resizeImage(), scrollDown(), scrollUp(), and setMargins(). |
|
|
Definition at line 195 of file screen.h. Referenced by addHistLine(), changeTabStop(), clearEntireLine(), clearEntireScreen(), clearTabStops(), clearToEndOfLine(), clearToEndOfScreen(), cursorDown(), cursorLeft(), cursorRight(), cursorUp(), deleteChars(), eraseChars(), getCookedImage(), getSelText(), helpAlign(), initTabStops(), insertChars(), resizeImage(), restoreCursor(), scrollDown(), scrollUp(), setCursorX(), setSelExtentXY(), ShowCharacter(), and Tabulate(). |
|
|
Definition at line 211 of file screen.h. Referenced by effectiveRendition(), restoreCursor(), saveCursor(), setBackColor(), and setBackColorToDefault(). |
|
|
Definition at line 210 of file screen.h. Referenced by effectiveRendition(), restoreCursor(), saveCursor(), setForeColor(), and setForeColorToDefault(). |
|
|
Definition at line 212 of file screen.h. Referenced by effectiveRendition(), resetRendition(), restoreCursor(), saveCursor(), setDefaultRendition(), and setRendition(). |
|
|
Definition at line 221 of file screen.h. Referenced by getMode(), resetMode(), restoreMode(), saveMode(), and setMode(). |
|
|
Definition at line 205 of file screen.h. Referenced by BackSpace(), changeTabStop(), clearToBeginOfLine(), clearToBeginOfScreen(), clearToEndOfLine(), clearToEndOfScreen(), cursorDown(), cursorLeft(), cursorRight(), cursorUp(), deleteChars(), eraseChars(), getCookedImage(), getCursorX(), home(), insertChars(), resetMode(), resizeImage(), restoreCursor(), Return(), saveCursor(), setCursorX(), setMargins(), setMode(), ShowCharacter(), and Tabulate(). |
|
|
Definition at line 206 of file screen.h. Referenced by BackSpace(), clearEntireLine(), clearToBeginOfLine(), clearToBeginOfScreen(), clearToEndOfLine(), clearToEndOfScreen(), cursorDown(), cursorUp(), deleteChars(), deleteLines(), eraseChars(), getCookedImage(), getCursorY(), home(), index(), insertChars(), insertLines(), resetMode(), resizeImage(), restoreCursor(), reverseIndex(), saveCursor(), setCursorY(), setMargins(), setMode(), and ShowCharacter(). |
|
|
Definition at line 236 of file screen.h. Referenced by clearImage(), effectiveRendition(), and ShowCharacter(). |
|
|
Definition at line 235 of file screen.h. Referenced by clearImage(), effectiveRendition(), and ShowCharacter(). |
|
|
Definition at line 237 of file screen.h. Referenced by clearImage(), effectiveRendition(), and ShowCharacter(). |
|
|
Definition at line 201 of file screen.h. Referenced by addHistLine(), checkSelection(), clearImage(), getCookedImage(), getHistLines(), getSelText(), hasScroll(), and setScroll(). |
|
|
Definition at line 200 of file screen.h. Referenced by addHistLine(), getCookedImage(), getHistCursor(), Screen(), setHistCursor(), setScroll(), setSelBeginXY(), and setSelExtentXY(). |
|
|
Definition at line 196 of file screen.h. Referenced by addHistLine(), BackSpace(), clearImage(), getCookedImage(), getSelText(), moveImage(), resizeImage(), Screen(), ShowCharacter(), and ~Screen(). |
|
|
Definition at line 194 of file screen.h. Referenced by clearEntireScreen(), clearToEndOfScreen(), cursorDown(), getCookedImage(), helpAlign(), index(), reset(), resizeImage(), restoreCursor(), setCursorY(), and setMargins(). |
|
|
Definition at line 252 of file screen.h. Referenced by restoreCursor(), and saveCursor(). |
|
|
Definition at line 251 of file screen.h. Referenced by restoreCursor(), and saveCursor(). |
|
|
Definition at line 250 of file screen.h. Referenced by restoreCursor(), and saveCursor(). |
|
|
Definition at line 245 of file screen.h. Referenced by restoreCursor(), and saveCursor(). |
|
|
Definition at line 246 of file screen.h. Referenced by restoreCursor(), and saveCursor(). |
|
|
Definition at line 256 of file screen.h. Referenced by restoreMode(), and saveMode(). |
|
|
Definition at line 229 of file screen.h. Referenced by checkSelection(), clearSelection(), getSelText(), setSelBeginXY(), and setSelExtentXY(). |
|
|
Definition at line 231 of file screen.h. Referenced by checkSelection(), clearImage(), clearSelection(), getCookedImage(), getSelText(), setSelBeginXY(), and setSelExtentXY(). |
|
|
Definition at line 230 of file screen.h. Referenced by checkSelection(), clearImage(), clearSelection(), getCookedImage(), getSelText(), setSelBeginXY(), and setSelExtentXY(). |
|
|
Definition at line 225 of file screen.h. Referenced by changeTabStop(), clearTabStops(), initTabStops(), Screen(), Tabulate(), and ~Screen(). |
|
|
Definition at line 216 of file screen.h. Referenced by cursorUp(), index(), reset(), resizeImage(), reverseIndex(), setCursorY(), setMargins(), and setMode(). |
1.4.2