Full-View - Windows for Pick

(C) Copyright 1985-1996 Modular Software Corporation. All rights reserved.

Version 2.0 for AP - February 14, 1996

   Goto:  Table of Contents   Index
Chapter:  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

4: THE FULL-VIEW VIRTUAL TERMINAL

Many of FULL-VIEW's features and functions are by-products of what is referred to as the "FULL-VIEW virtual terminal". The term "virtual terminal" refers to the way in which FULL-VIEW interacts with an application and with the user's physical terminal.

The FULL-VIEW virtual terminal is integrated within FULL-VIEW and within the Pick Operating System. This is done in such a manner as to totally isolate an application from the physical terminal except in those instances where the application explicitly commands the terminal directly. An application executing within the FULL-VIEW environment utilizes the virtual terminal as if it were actual hardware. As such, the FULL-VIEW virtual terminal provides all of the functions that a typical terminal would, including:

In addition, the FULL-VIEW virtual terminal provides other functions which may or may not be found in normal terminals in use on a Pick System. These include:

The FULL-VIEW virtual terminal also supports another function which is possible only when FULL-VIEW is active:

This is a key element, necessary for successful Windowing on a Pick-based system.

What follows are specifications of the FULL-VIEW virtual terminal presented as if it were a physical terminal. These descriptions will help to acquaint you with the capabilities of the FULL-VIEW terminal environment.

4.1: VIRTUAL TERMINAL OUTPUT FUNCTIONS

The FULL-VIEW virtual terminal is the software that processes all terminal input and output functions. The FULL-VIEW virtual terminal is quite idealized, and at times supports functions which the actual terminal may have some difficulty in supporting either in it's entirety, with exactly the same appearance, or with maximum performance. The end of this section describes how physical terminals interface to the virtual terminal, and what limitations may be encountered.

The FULL-VIEW virtual terminal actually supports several sets of terminal control functions simultaneously. In particular, FULL-VIEW supports some of the most common ADDS Regent terminal control sequences. This allows applications which have been hardcoded for these terminals to execute without modification. Of course, applications that utilize the Pick @(x,y) and @(-z) functions will operate without modification.

4.1.1: CURSOR POSITIONING

The virtual terminal performs X,Y and X-only cursor positioning with the following strings:

    @(X,Y) = ESC : '*' : CHAR(X) : CHAR(Y)
    
    @(X)   = ESC : '*' : CHAR(X) : CHAR(127)
Cursor positioning within the virtual terminal is always relative to the upper left hand corner of the active window, which is at position 0,0. If a cursor location is specified outside of the currently defined terminal or window size, the cursor will be positioned to the right-most column or lower-most line or both as appropriate.

4.1.2: CLEAR SCREEN

    @(-1)  = ESC : '*' : CHAR(1) or
             CHAR(12)
This sequence will clear the active window. It also resets all video attributes (both color and monochrome).

4.1.3: CLEAR TO END-OF-PAGE

    @(-3)  = ESC : '*' : CHAR(3)
This sequence will clear the active window from the current cursor location to the end of the window. The cleared area is are also cleared of any video attributes.

4.1.4: CLEAR TO END-OF-LINE

    @(-4)  = ESC : '*' : CHAR(4)
This sequence will clear the active window from the current cursor location to the end of the current line. The cleared ares is also cleared of any active video attributes.

4.1.5: CURSOR BACK

    @(-9)  = ESC : '*' : CHAR(9) or
             CHAR(8)             or
             CHAR(21)
This sequence will move the cursor back a single space non-destructively (no data on the screen is erased). If the cursor is at the beginning of a line (either full-page or within a window), the cursor will move to the end of the previous line. If the cursor is at the beginning of a window, nothing happens.

4.1.6: CURSOR FORWARD

    @(-10) = ESC : '*' : CHAR(10) or
             CHAR(6)
This sequence will move the cursor forward one space non-destructively. If the cursor is at the end of a line, it will move to the beginning of the next line. If the cursor is at the bottom of the active window, the window will scroll unless the scroll supress option has been set.

4.1.7: CURSOR UP

    @(-11) = ESC : '*' : CHAR(11) or
             CHAR(26)
This sequence will move the cursor up a line. If the cursor is already at the top-most line of a window, nothing happens.

4.1.8: CURSOR DOWN

    @(-12) = ESC : '*' : CHAR(12) or
             CHAR(10)
This sequence will move the cursor down a line. A carriage return is not performed. If the cursor is at the bottom line of the active window, the window will scroll.

4.1.9: CARRIAGE RETURN

             CHAR(13)
This sequence will move the cursor to the beginning of the current line.

4.1.10: DON'T SCROLL OPTION (SCROLL SUPPRESS)

             ESC : 'N'
This sequence, when included in the same PRINT line with other characters, will prevent the other characters from scrolling the active window when the last character of the last line is printed. This function is used by the virtual terminal to permit the lower-right hand corner of a window to be filled without scrolling the window contents. This function is automatically cancelled by processing any cursor positioning, carriage return, or line feed function.

4.1.11: SETUP WINDOW

           ESC : 'W' : CHAR(x0) : CHAR(x1) : CHAR(y0) : CHAR(y1)
This sequence will set up a new active window area on the screen. The new window will have a left edge at column x0, a right edge at column x1, a top-most line at line y0, and a bottom line at line y1. This sequence does not change any characters on the display screen. The cursor will be positioned at location 0,0 within the newly defined active window.

This sequence is used by the START-WINDOW series of utility functions to create windows with borders.

If a window is defined which has boundaries beyond the current screen's limits, an error message will result.

4.1.12: SET VIDEO ATTRIBUTE

                    ESC : 'C' : CHAR(n)
This sequence is used to set the current video attribute, both monochrome and color. The 'n' is actually a bit-map of the attribute that you wish to set. The lower 4 bits on 'n' are used to set monochrome attributes as follows:

EXAMPLE: In order to set DIM and BLINKING, use the string:

    ESC : 'C' : CHAR(9)                     1 (dim) + 8 (blinking)
The high 4 bits on 'n' are used to set up color video attributes. These four bits set from 0000 thru 1111 correspond to FULL-VIEW color definitions 0 through 15. FULL-VIEW defines colors as monochrome and 15 combinations of foreground background colors. While limiting the color selection to only 15 combinations may seem limiting at first, it actually provides a very wide range of pleasing color combinations.

EXAMPLE: In order to set color 4, you would use the sequence:

    ESC : 'C' : CHAR(64)            4 (color) x 16
Both monochrome and color video attributes may be set up at the same time by combining 'n' values above. In this manner, you can design applications which will drive both color and monochrome displays without requiring differentiation between the two types of displays. For example, to display a data entry field as underlined on monochrome displays and as color 3 on color displays, you would use the sequence:

    ESC : 'C' : CHAR(50)            3 (color) x 16 + 2 (underlined)

4.1.13: GRAPHICS CHARACTERS

FULL-VIEW supports line-graphics characters as simple extended character-set characters with ASCII values above 127. These characters can be included anywhere within a printable statement. The line graphics characters are:

    CHAR(128) 
Horizontal line
    CHAR(129) 
Vertical line
    CHAR(130) 
Upper-left corner
    CHAR(131) 
Upper-right corner
    CHAR(132) 
Lower-left corner
    CHAR(133) 
Lower-right corner
    CHAR(134) 
Horizontal line with branch up
    CHAR(135) 
Horizontal line with branch down
    CHAR(136) 
Vertical line with branch left
    CHAR(137) 
Vertical line with branch right
    CHAR(138) 
Crossed lines

4.2: VIRTUAL TERMINAL INPUT FUNCTIONS

The FULL-VIEW virtual terminal not only processes terminal output functions, but also processes terminal keyboard sequences. It does this to allow applications, as well as FULL-VIEW utilities, to more easily utilize terminal control and function keys. The virtual terminal keyboard assignments allow complete single and multiple keystroke keyboard re-mapping, allowing nearly any key on the keyboard to be used for any purpose. It is even possible to re-map "normal" keys and replace the letters with other letters, although this is rarely done unless you are trying to implement a DVORAK layout.

FULL-VIEW has a number of control and function keys for which default values are defined. These include:

    CHAR(6)         
Cursor forward
    CHAR(8)         
Backspace
    CHAR(9)         
Tab
    CHAR(10)        
Cursor down (line feed)
    CHAR(13)        
Carriage return
    CHAR(21)        
Cursor left (different from backspace)
    CHAR(26)        
Cursor up
In addition, a number additional function and control keys are defined. The following characters are defined.

    CHAR(129)-     Function keys 1 through 40
    CHAR(158)               
    CHAR(161)       
Insert character
    CHAR(162)       
Delete character
    CHAR(163)       
Insert line
    CHAR(164)       
Delete line
    CHAR(250)       
Print Screen

4.3: VIRTUAL TERMINAL APPLICATIONS STANDARDS

The presence of the FULL-VIEW virtual terminal allows many aspects of the user interface to become standardized across many different makes and models of terminal hardware while still allowing use of advanced terminal features such as video attributes, windows, graphics characters, function and control keys. What follows is a set of proposed application usage standards for setting up and utilizing applications. While being somewhat arbitrary, these standards do have several advantages including:

4.3.1: TERMINAL KEYBOARD USAGE

The following keyboard usage standard should be used wherever possible by applications.

CURSOR KEYS

Wherever possible, applications should permit cursor keys to be used to navigate through the application. This is particularily important for menus and data entry functions since cursor keys are the obvious way of moving around the screen. The cursor keys defined within FULL-VIEW are:

    UP                      CHAR(26)
    DOWN            CHAR(10)
    LEFT            CHAR(21)
    RIGHT           CHAR(6)
Note that the cursor-left key is different than the backspace key ( CHAR(8) ). This allows the backspace key to be destructive within the application (erase characters as the cursor moves left) while allowing the cursor-left key to simply move the cursor to the left.

CR and TAB

The CR and TAB keys are used to move logically forward [TAB] and backward [RETURN] from field to field within a data entry screen. These keys allow an operator to quickly move forward and back, allowing quick data edits. The control characters for these keys are:

    CR                      CHAR(13)
    TAB             CHAR(9)
INSERT CHARACTER

Insert a space at the current cursor position in this field. This will push the rest of the field to the right. Characters at the end of the field may be pushed off of the end and wiil be lost.

     INSERT         CHAR(161)
DELETE CHARACTER

Delete the character at the current cursor position in this field. This command will pull the rest of the field to the left, inserting spaces at the end of fixed length fields.

    DELETE  CHAR(162)
PROCESS SCREEN DATA

This command is used to as a quick method of processing an entire screen's data without having to press ENTER through all of the fields in the data entry screen.

    SEND or CHAR(129)
    F1
Note that this command is often assigned to more than one keyboard character. This allows for maximum data entry performance.

ABANDON SCREEN DATA

This command is used as a quick method of exiting and abandoning the current screen entry function.

    F2              CHAR(130)
FUNCTION HELP

This key is used to invoke function sensitive help text. Function help is general information relevant to the current function and not specific to the current data entry field.

    F3              CHAR(131)
FIELD HELP

This key is used to invoke help text which is specific to the current field.

    F4              CHAR(132)
FIELD LOOKUP

This key is used to invoke data lookup relating to the current field.

    F5              CHAR(133)

4.4: VIRTUAL TERMINAL AND PHYSICAL TERMINAL CONSIDERATIONS

The FULL-VIEW virtual terminal has a number of features which may not be directly available on every physical terminal that is in use. Wherever possible, FULL-VIEW will emulate the feature desired in the most appropriate manner to provide a pleasing and correct display. The following areas may be impacted by physical terminal characteristics and limitations:

4.4.1: EMBEDDED VIDEO ATTRIBUTES

Some terminals deal with video attributes in a manner which is quite different from the FULL-VIEW virtual terminal. In particular, many terminals employ what is referred to as "embedded" video attributes. These attribute tags are actually non-printing characters which cause the specified video attribute to be active for all characters to the end of the screen or until the next attribute tag character is found. What is important for these terminals is that setting (or resetting) a video attribute requires a space on the terminal screen. FULL-VIEW supports these terminals transparently wherever possible by computing and automatically placing these attribute tag characters in the locations best suited for the particular screen display.

Please note, however, that some display layouts are not possible on these terminals because of the terminal hardware's inability to display two fields next to each other with different video attributes unless there is an intervening space between the fields. If you are using this type of terminal, you should take this hardware limitation into consideration and avoid screen layouts and designs which place fields with different video attributes directly adjacent to each other.

In addition to taking up space on the screen, embedded attributes can also cause terminal output functions to execute somewhat more slowely because of the increased complexity and quantity of terminal output required to support them.

4.4.2: COLOR

The FULL-VIEW virtual terminal supports both color and monochrome video attributes. Typical terminals, on the other hand are usually either color or monochrome. This is why the FULL-VIEW virtual terminal permits you to set both attributes at the same time. When video attributes are translated by FULL-VIEW into terminal commands, monochrome terminals will receive monochrome attributes and color terminals will receive color attributes.

4.4.3: GRAPHICS CHARACTERS

Not all terminals have functions to uniquely display all defined line-graphics and extended characters. Your application should take the terminal's capabilities into consideration whenever you are relying on these extended character sets.

4.4.4: DON'T SCROLL OPTION (SCROLL SUPPRESS)

The "Don't Scroll" option may not be supported by some terminal hardware. On these terminals, utilizing the lower right hand corner of the screen is not possible. FULL-VIEW will still continue to function, but it will leave this space blank, even if data was to be displayed there.

4.4.5: PERFORMANCE CONSIDERATIONS

Many windowed functions can involve singnificant amounts of terminal I/O above what would be required if the same function were executed on a full-sized window. For example, clearing a window covering only a portion of the screen requires that the system paint over any existing information with spaces. Scrolling a window of this type is even worse in that the entire window must be re-painted, one line up, for each line scrolled.


   Goto:  Table of Contents   Index
Chapter:  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15