Unit:
AxTerm
Description:
The TApxTerminalEmulator class is the base class for all terminal emulators. An emulator is designed to work hand-in-hand with a terminal component to provide the look and feel of a particular terminal. The emulator does all the hard work; it interprets the input data stream, looks for terminal control sequences and ordinary text characters and processes them, accepts all keystrokes from the terminal component, and identifies them and converts them to output the correct terminal sequence. It also maintains the buffer that describes what the terminal display looks like (i.e., the text characters, colors, attributes and character sets). It has a character set mapping object that enables it to identify which fonts are used for which glyphs for display. Finally, and possibly the most important, it uses the terminal component's canvas object to draw a representation of the current view of the terminal.
Async Professional CLX provides two descendants of TApxTerminalEmulator. The first is the simplest emulator of all, the teletype or TTY emulator, TApxTTYEmulator. This emulator performs no keystroke conversion, no character set mapping, and no parsing of the input stream. Every character that is received is drawn directly onto the terminal display. All standard keystrokes (alphabetic characters, numeric characters, and control characters) are sent directly to the host computer. All other keystrokes (function keys, cursor movement keys, etc.) are ignored. When you drop a terminal component onto the form and do not use an emulator component, the terminal component will create an internal instance of the TTY emulator and use that instead.
The second emulator provided by Async Professional CLX is the VT100 terminal emulator, TApxVT100Emulator. This emulator provides a complete implementation of a standard VT100 terminal. Features provided by this emulation include:
·Double height and double width characters.
·Support for the keyboard LEDs.
·The ability to switch character sets to use the line draw characters.
·Applying the scrolling region.
·Support for the various VT100 modes, including keyboard modes.
The emulator also provides support for the following features that are not part of the standard VT100 specification, but are nevertheless generally expected to be present in an emulation. These features are extracted from the ANSI specification and the VT220 specification.
·Support for erasing, deleting, and inserting characters.
·Support for the different ANSI color attributes.
Finally, please note that the emulator does not support the following, sometimes optional, hardware characteristics of some VT100 terminals. In fact, in response to a "What Are You?" request (<Esc>[c) the VT100 terminal emulator will respond as a "basic VT100 with no options" (<Esc>[?;0c).
·Interlace mode (switching between 240 & 480 scan lines per frame).
·Smooth scrolling (the emulator performs jump scrolling all the time).
·STP processor option.
·AVO (advanced video option).
·GPO (graphics processor option).
To use an emulator component, drop an emulator component onto the form and then drop a terminal component onto the same form. The terminal component would find the emulator component and link up with it. At that point, the terminal and emulator components will function as one composite component and will perform all the necessary work to make the combination act as an original terminal. There is no extra work to be done on your part.
To alter the behavior of an emulator, you will need to know about its properties, events, and methods, and understand the use of the internal objects the emulator utilizes. To write a different terminal emulator, you would also need to know this extra information, but for general use of the Async Professional CLX terminal component family, it will generally be drop and go.