|
Class: VT100TerminalView
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
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.
VT52TerminalView
TelnetTool
http://vt100.net/docs/vt220-rm/chapter4.html
defaults
-
colorAtIndex: idx bright: bright
-
black fg: ESC[30m / bg: ESC[40m
-
vt100AlternativeKeyCodes
-
return the alternative vt100 keyCode table
-
vt100KeyCodes
-
return a vt100 keyCode table
functions
-
addLines
-
Add the appropriate number of blank lines (param 1)
at the cursor position.
-
addLines: aNumber
-
Add aNumber blank lines at the position indicated by the cursor.
-
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
-
deleteCharacters
-
Delete the appropriate number of characters (param 1)
at the cursor position.
-
deleteLines
-
Delete the appropriate number of lines (param 1)
at the cursor position.
-
displayMode: p1
-
ESC-[-<param1>-m
Set the current display mode (emphasis) as specified by param 1.
-
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
-
doCursorNextLine: n
-
-
doCursorPreviousLine: n
-
-
insertCharacters
-
Insert the appropriate number of spaces (param 1) at the cursor position.
-
insertLines
-
Insert the appropriate number of lines (param 1) at the cursor position.
-
move
-
Move to the locations indicated by the first and second parameters.
-
moveToColumn
-
Move to the column indicated by the first.
-
moveToLine
-
Move to the line indicated by the first param.
-
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.
-
report
-
ESC[<p1>n
currently, only cursor position is supported (param 6)
usage example(s):
usage example(s):
-
reportTerminalType
-
ESC[<p1>c
currently, only cursor position is supported (param 6)
-
resetDefaults
-
Reset the default parameters
initialization
-
initialize
-
(comment from inherited method)
currently unused.
-
initializeKeyboardSequences
-
setup my keyboard sequences for a vt100
misc
-
traceCSI: char
-
os functions (xterm)
-
osCommand
-
this is an xterm escape sequence, which controls
the window's title, icon, or other property
processing-input
-
addToParameter: char
-
The parameter char is a digit. Add it to the current parameter.
-
endOfSequence
-
private - reset state-machine at end of escape-sequence
-
evaluateProcessCharacter: char return: aSymbol
-
evaluate the return value of the process state method except for state 0
-
nextPut: char
-
process a character (i.e. from the shell's output)
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
getParameter: para withDefault: default
-
-
terminalType
-
returns a string describing this terminal (usually, this is
passed down to the shell as TERM environment variable).
Here, 'vt100' is returned.
VT100TerminalView openShell
|