contents.gifprev1.gifnext1.gif

ADJUST_WINDOW

Description:

ADJUST_WINDOW adjusts the size of an existing window and makes the adjusted window current. This command requires three parameters. The first parameter is the window to be adjusted. The second parameter is the number of lines to adjust on top. The third parameter is the number of lines to adjust on the bottom. Negative numbers used for the second (top) parameter will add new lines to the top of the window. Negative numbers used for the third (bottom) parameter will delete lines from the bottom of the window. If the adjustment passes screen boundaries, a warning is issued and the adjustment is stopped at the screen boundary. All windows must be at least one line long. If an adjustment would force the window to less than one line, a warning is issued and the window is left with 1 line. An optional fourth argument, left or right, can be used just like the top and bottom parameters.

The window position can be changed without adjusting the size by using the same size adjustment for both the top and bottom arguments. ADJUST_ WINDOW (window, -2, -2) will slide the window up 2 lines on the screen.

Note that window adjustments made by ADJUST_WINDOW may occlude other windows. The screen update is not made until the screen manager or the UPDATE or REFRESH function is called. Scrolling margins are maintained unless the window size becomes small enough to force margin overlap.

Syntax:

ADJUST_WINDOW (window, top, bottom [, left, right] )

Examples:

The following statement adds 2 lines to the top of the current window and 2 lines to the bottom:

ADJUST_WINDOW (CURRENT_WINDOW, -2, +2);

The following statement deletes the top 5 lines from the current window:

ADJUST_WINDOW (CURRENT_WINDOW, 5, 0);

Errors:

TPU$_ADJSCROLLING Refitting the scroll region to screen size.

TPU$_BADWINDADJUST New length too small.

TPU$_BOTLINETRUNC Adjustment goes below end of screen.

TPU$_TOPLINETRUNC Adjustment goes above top of screen.

TPU$_WINDNOTVIS Window currently occluded.

TPU$_WINDOWNOTMAPPED Window must be mapped to adjust.

Related Builtins:

CREATE_WINDOW

DELETE

MAP

UNMAP

UPDATE