contents.gifprev1.gifnext1.gif

Screen Management

(Note: The term “display” for the purposes of this manual means the area of the computer screen controlled by nu/TPU. For ASCII terminals and MS-DOS, the nu/TPU display area is the entire screen. For Motif and MS Windows or other window applications, the display is the area inside the window in which nu/TPU is executed.)

nu/TPU’s window manager controls all output to the user display. The window manager is invoked when either the UPDATE or REFRESH built-in is called, or control is passed to nu/TPU’s main processing loop. The main processing loop is reached only after all user-defined procedures have completed execution. The major functions included in the window manager are listed and detailed below.

tpu90000.gif Splitting the display horizontally into 2 or more windows

tpu90000.gif Text scrolling in vertical and horizontal directions

tpu90000.gif Cursor motion

tpu90000.gif Character attributes: normal, bold, blink, reverse, and underline

tpu90000.gif Color definitions

tpu90000.gif Mouse, pull-down and pop-up menus, and scroll bar support

A nu/TPU screen can range in size from 1x1 character to 2(32-1) -1 characters wide and 2(32-1) -1 lines long. Each nu/TPU window can have an optional status line. Every window must be at least one line long, two lines if the status line is included. The number of possible visible windows is equal to the number of display lines. It is not possible to split windows vertically in any fashion.

Text scrolling is allowed in both the vertical and horizontal direction. Vertical scrolling is done automatically in the window manager if previous calls to user procedure or built-in functions move the current editing position outside of the current window. Horizontal scrolling is managed through the SHIFT built-in. Normally horizontal scrolling is not done automatically, but can be programmed as an extension by the user.

Cursor motion has two attributes: SOUND/FREE and CROSS_WINDOW_ BOUNDS. FREE cursor movement allows the cursor to be moved anywhere in the current window regardless of whether any text exists at that screen location, including beyond the end of line, end of buffer, before the left margin, and into the middle of a tab. These positions are not possible if the cursor is BOUND. If there is no text at the cursor position, the text being edited is padded with spaces to create a position to match the current cursor position. When the second attribute, CROSS_WINDOW_ BOUNDS, is set to ON, the cursor can move from one window to another when a window boundary is reached. Normal operation is to scroll the text when a window boundary is reached and not jump to the next window.

nu/TPU supports color and the attributes: normal, bold, blink, reverse, and underline. All of these are not available for all computers. For the definitive set of attributes available, please review your site documentation.

For details on mouse support, please review your hardware specific documentation or the on-line help text. Generally, mice can provide powerful alternative accelerators to standard functions along with the ability to cut and paste text to and from other application windows. Text positioning, command line actions, cursor movement, text selection, and other operations can all be accomplished with the mouse.

Windows are created by CREATE_WINDOW, altered by ADJUST_ WINDOW, and removed by the built-in DELETE. Please review the appropriate built-in functions for complete details. Windows, when created or adjusted, may overlap existing windows. The current window is always fully visible. When a window is completely covered by other windows, it is said to be occluded. A buffer may have multiple windows mapped to it, but each window can only be mapped to a single buffer. A window cannot display text until it has been mapped to a buffer with the built-in MAP.