|
PRAGMA PROGRAM REFERENCE MANUAL
|
Index
|
All Operation
|
|
Expand All ADDENDUM
|
SCROLL SCREEN DOWN
|
SSD
|
Standard Verb
|
Screen Operation
|
Target =
|
When scrolling the screen down, the entire screen image moves down the number of lines selected and new blank lines, in the currently selected color, enter from the top of the screen. The cursor may be anywhere on the screen and is unaffected by the scroll.
|
SCROLL SCREEN DOWN number of lines NUMBER NUMBER must be a number or a noun containing a number.
|
SEE ALSO: SCROLL SCREEN UP / INSERT LINE / DELETE LINE
|
PRAGMA has the ability to scroll the screen up or down, and to insert and delete lines in the middle of a screen. All of these features are provided via both ANSI commands and standard verbs.
Esc[xxM is the command to delete xx lines. Esc[xxL is the command to insert xx lines. Esc[xxT is the command to scroll the screen down xx lines. Esc[xxS is the command to scroll the screen up xx lines. The corresponding standard verb names are DELETE LINE (DLI), INSERT LINE (ILI), SCROLL SCREEN DOWN (SSD), and SCROLL SCREEN UP (SSU). In all cases, the cursor position is NOT affected by the operation. The cursor will remain in the same absolute location after the operation as it was before it began.
When inserting lines, the new lines are inserted BEFORE the line where the cursor currently resides. It does not matter where on the line the cursor is; the new lines inserted will NOT break up a line if the cursor is not at the beginning of it. The newly inserted lines will have the currently selected attributes and colors, and will be filled with spaces. The line the cursor is located on, and all following lines, are moved downward to open up space on the screen to add the new lines. The bottommost lines will fall from the bottom of the screen. The lines above the cursor do not move.
When deleting lines, the line the cursor is on, and multiple lines if chosen, are deleted. The following lines are moved up to fill the gap. New blank lines (filled with spaces in the currently selected attributes and colors) fill the bottom lines of the screen that have become empty. The cursor does not have to be at the beginning of the line; the entire line where the cursor is located will be deleted, regardless of where the cursor currently resides within that line. The lines above the cursor do not move.
When scrolling the screen down, the entire screen image moves down the number of lines selected, bottom lines falling off, and new blank lines (in currently selected color) coming from the top. The cursor does not have to be at the top of the screen in order to scroll down; the cursor may be anywhere, and is unaffected by the scroll.
Scrolling the screen up is similar to scrolling down. The entire image moves, top lines roll off, and new blank lines enter from the bottom, in the currently selected color. The cursor may be anywhere on the screen, and does not have to be on the last line. The cursor does not move.
This new capability of reverse scrolling does NOT affect the current cursor behavior with MOVE CURSOR UP, DISPLAY "_Z", or ANSI relative motion commands with ANSI wrapping enabled. In all of these cases, the cursor will continue to wrap from the top line to the bottom, without scrolling the screen, when you move up from the top line.
Likewise, the new forward scrolling capability does not affect the behavior of MOVE CURSOR DOWN, DISPLAY "_J", and ANSI relative motion commands with ANSI wrap enabled. In all of these cases, the cursor will continue to cause a scrolling if motion downwards from the last line is attempted.
Some terminals have similar scrolling abilities, and if so, these operations can be performed quickly, at the terminal. However, if a certain terminal does not have these abilities, PRAGMA will handle it "the hard way". In this case, PRAGMA will redraw the necessary parts of the screen by sending out line after line of data (except in the case of scrolling up; PRAGMA will temporarily move the cursor to the last line and output a _J, and then restore the cursor position; this is quicker, and PRAGMA expects that all screens can at least do this much...). This may be slow over a modem etc., but at least it will work on any screen.
These capabilities of terminals are described in, of course, TERMINFO.LBS, with new commands. They are "SCRL DN = ", "SCRL UP = ", "INS LINE = ", and "DEL LINE = ". If your terminal does have these capabilities, and if they conform to what PRAGMA expects (as specified above), put the control strings required for your terminal following these commands. If your terminal does not have these abilities, these commands still must be present, and must have a null string given (ex. SCRL DN = ""). If your terminal does not operate in the way PRAGMA expects, you also must null these strings and let PRAGMA do it the hard way; otherwise the terminal and PRAGMA will be at odds as to the contents of the screen.
All of these functions are executed ONE line at a time. Some terminals may allow you to send ONE command to delete multiple lines, for instance. This is not what PRAGMA uses. PRAGMA, when speaking to the terminal, wants to give it a command for a single line operation (ex. delete one line), and PRAGMA will perform that operation multiple times in order to give the intended results. In other words, if you DISPLAY "_[[3M", which means delete 3 lines, PRAGMA will send the string specified in "DEL LINE = " three times to the screen. This was done because not all terminals have multiple line functions; some have only commands that operate on one line. PRAGMA currently uses the least common denominator.
The control string to be used in TERMINFO to cause the screen to scroll up is most probably NOT a simple _J. This will not cause a scroll unless the cursor is on the last line of the screen, and this command must operate regardless of where the cursor is. If your terminal does not have such a command, null this command out, and let PRAGMA do it the hard way (which in this case is not bad at all). The main point is that _J is not the proper command for scroll up.
All of the terminals currently described in TERMINFO.LBS have null strings for all of these new functions. As time permits, each terminal will be tested for compliance with PRAGMA's expectations, and if it has these abilities and they conform, the proper control strings will be added to future versions of TERMINFO.LBS.
The memory mapped screens (for use with DOS) will always have null strings for these features, as in this case they are not needed. Since PRAGMA writes all of screen memory to these type of screens every time any data on screen changes, PRAGMA internally handles all of the details of these functions. Thus, these terminal types are recommended currently for DOS, as they operate very fast.
The DOS ANSI.SYS driver does NOT have these capabilities, and so it will also always have null strings for these functions. When using these terminal types, these functions will always have to be done the hard way, and will thus be slow.
|
|
|
CustomWare® is a registered trademark of CustomWare Designs, Inc. All rights reserved.
CustomWare® is a registered servicemark of CustomWare Designs, Inc. All rights reserved.
All images and designs on this web site are copyrighted© 2021.
v
t
|
|