eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'VT100TerminalView':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: VT100TerminalView


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--View
               |
               +--ListView
                  |
                  +--TextView
                     |
                     +--EditTextView
                        |
                        +--TextCollector
                           |
                           +--TerminalView
                              |
                              +--VT100TerminalView

Package:
stx:libwidg2
Category:
Views-TerminalViews
Version:
rev: 1.73 date: 2019/08/16 22:04:26
user: cg
file: VT100TerminalView.st directory: libwidg2
module: stx stc-classLibrary: libwidg2

Description:


A VT100 terminal emulator.
Most of the functionality is inherited from my superclass,
I redefine/specialize certain methods for VT100 escape sequences
and vt100 keyboard codes

BUGS:
    VT100 wrapMode (at right margin) is not supported
    this may lead to wrong display when a vi is started in a small window.


Related information:

    VT52TerminalView
    TelnetTool
    http://vt100.net/docs/vt220-rm/chapter4.html

Instance protocol:

defaults
o  colorAtIndex: idx bright: bright
black fg: ESC[30m / bg: ESC[40m

o  vt100AlternativeKeyCodes
return the alternative vt100 keyCode table

o  vt100KeyCodes
return a vt100 keyCode table

functions
o  addLines
Add the appropriate number of blank lines (param 1)
at the cursor position.

o  addLines: aNumber
Add aNumber blank lines at the position indicated by the cursor.

o  clearLines: arg
Clear some part of the current line, as indicated by the first parameter:
0 - clear to EOL
1 - clear from beginning to cursorCol
2 - clear entire line

o  deleteCharacters
Delete the appropriate number of characters (param 1)
at the cursor position.

o  deleteLines
Delete the appropriate number of lines (param 1)
at the cursor position.

o  displayMode: p1
ESC-[-<param1>-m
Set the current display mode (emphasis) as specified by param 1.

o  doClearDisplay: arg
Clear some part of the current screen, as indicated by the first parameter.
0 - clear to endOfScreen
1 - clear from beginning of screen to cursorCol
2 - clear entire screen

o  doCursorNextLine: n

o  doCursorPreviousLine: n

o  insertCharacters
Insert the appropriate number of spaces (param 1) at the cursor position.

o  insertLines
Insert the appropriate number of lines (param 1) at the cursor position.

o  move
Move to the locations indicated by the first and second parameters.

o  moveToColumn
Move to the column indicated by the first.

o  moveToLine
Move to the line indicated by the first param.

o  moveToX: xLocation y: yLocation
Position the cursor at the location given by xLocation and yLocation.
Ignore the command if the parameters are outside the allowable range.

o  report
ESC[<p1>n
currently, only cursor position is supported (param 6)

usage example(s):

report device status

usage example(s):

report position

o  reportTerminalType
ESC[<p1>c
currently, only cursor position is supported (param 6)

o  resetDefaults
Reset the default parameters

initialization
o  initialize
(comment from inherited method)
currently unused.

o  initializeKeyboardSequences
setup my keyboard sequences for a vt100

misc
o  traceCSI: char

os functions (xterm)
o  osCommand
this is an xterm escape sequence, which controls
the window's title, icon, or other property

processing-input
o  addToParameter: char
The parameter char is a digit. Add it to the current parameter.

o  endOfSequence
private - reset state-machine at end of escape-sequence

o  evaluateProcessCharacter: char return: aSymbol
evaluate the return value of the process state method except for state 0

o  nextPut: char
process a character (i.e. from the shell's output)

o  processState0: char
next char in initial state
change state or processing character;
return
#waitForNextChar - state was changed and wait for next characters
#sequenceComplete - command processed
#unknown - unknown character for this state

o  processStateGotCSI2: char
next char after 'ESC [ ?' (CSI ?)
change state or processing character;
return
#waitForNextChar - state was changed and wait for next characters
#sequenceComplete - command processed
#unknown - unknown character for this state

o  processStateGotCSI3: char
next char after 'ESC ('
change state or processing character;
return
#waitForNextChar - state was changed and wait for next characters
#sequenceComplete - command processed
#unknown - unknown character for this state

o  processStateGotCSI: char
next char after 'ESC> [' (CSI)
change state or processing character;
return
#waitForNextChar - state was changed and wait for next characters
#sequenceComplete - command processed
#unknown - unknown character for this state

o  processStateGotESC: char
next char after ESC
change state or processing character;
return
#waitForNextChar - state was changed and wait for next characters
#sequenceComplete - command processed
#unknown - unknown character for this state

o  processStateGotReturn: char
next char after CR
change state or processing character;
return
#waitForNextChar - state was changed and wait for next characters
#sequenceComplete - command processed
#unknown - unknown character for this state

o  processStateGotXTERMCSI2: char
next char after 'ESC ] ;'
change state or processing character;
return
#waitForNextChar - state was changed and wait for next characters
#sequenceComplete - command processed
#unknown - unknown character for this state

o  processStateGotXTERMCSI: char
next char after 'ESC ]'
change state or processing character;
return
#waitForNextChar - state was changed and wait for next characters
#sequenceComplete - command processed
#unknown - unknown character for this state

queries
o  getParameter: para withDefault: default

o  terminalType
returns a string describing this terminal (usually, this is
passed down to the shell as TERM environment variable).
Here, 'vt100' is returned.


Demonstration:


    VT100TerminalView openShell



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 28 Mar 2024 15:47:44 GMT