Compaq AA-PWCBD-TE Computer Accessories User Manual


 
DEC Text Processing Utility Data Types
3.14 Window Data Type
3.14.1 Defining Window Dimensions
Windows are defined in lines and columns. In EVE, all windows extend the full
width of the screen or terminal emulator. In DECTPU, you can set the window
width to be narrower than the width of the screen or terminal emulator.
The allowable dimensions of a window often depend on whether the window has
a status line, a horizontal scroll bar, or both. A status line occupies the last line
of a window. By default, a status line contains information about the buffer and
the file associated with the window. You can turn a status line on or off with the
SET (STATUS_LINE) built-in procedure.
A horizontal scroll bar is a one-line widget at the bottom of a window that you
can use to shift the window to the right or left, controlling what text in the buffer
can be seen through the window. You can turn a horizontal scroll bar on or off
with the SET (SCROLL_BAR) built-in procedure.
Lines on the screen are counted from 1 to the number of lines on the screen; lines
in a window are counted from 1 to the number of lines in the window. Columns
on the screen are counted from 1 to the physical width of the screen; columns in a
window are counted from 1 to the number of columns in the window.
The minimum length for a window is one line if you do not include a status line
or horizontal scroll bar, two lines if you include either a status line or a horizontal
scroll bar, and three lines if you include both a status line and scroll bar.
The maximum length of a window is the number of lines on your screen. For
example, if your screen is 24 lines long, the maximum size for a single window
is 24 lines. On the same size screen, you can have a maximum of 24 visible
windows if you do not use status lines or horizontal scroll bars. If you use a
status line and a horizontal scroll bar for each window, the maximum number of
visible windows is 8.
3.14.2 Creating Windows
When you use a device that supports windows (see Appendix B for information
on terminals that DECTPU supports), you or the section file that initializes your
application must create and map windows. In most instances, it is also advisable
to map a buffer to the window. To map a buffer to a window, use the MAP built-in
procedure. If you do not associate a buffer with a window and map the window to
the screen, the only items displayed on the screen are messages that are written
to the screen at the cursor position.
The CREATE_WINDOW built-in procedure defines the size and location of
a window and specifies whether a status line is to be displayed. CREATE_
WINDOW also adds the window to DECTPU’s internal list of windows available
for mapping. At creation, a window is marked as being not visible and not
mapped and the following values for the window are calculated and stored:
Original_top—Screen line number of the top of the window when it was
created.
Original_bottom—Screen line number of the bottom of the window when it
was created (not including the status line).
Original_length—Number of lines in the window (including the status line).
Later calls to ADJUST_WINDOW may change these values.
DEC Text Processing Utility Data Types 3–23