WINDOW CONTROL TOOLS

The Window Control Tools are the third major component of ACCENT R's window development language.  Window Control Tools allow screen-oriented applications to be implemented without concern for the type of video terminal being used.  In other words, there is no need to be concerned with the low-level character sequences required for manipulating the terminal screen.  When this set of tools is used, the current screen display is always remembered by ACCENT R.

ACCENT R does not duplicate what has already been displayed on the screen and eliminates unnecessary terminal output.  This also means that any input/output interfering with the input /output performed by the Window Control Tools can be eliminated from the screen.

The Window Control Tools are a basic and comprehensive package.  The Menu Design Tool and the Form Design Tool are implemented using the Window Control Tools.

Menus and forms are examples of windows.  Thus, text messages, lines, or rectangles in menus or forms may be dynamically updated using the Window Control Tools.

The basic window operations can be separated into four categories:

  1. Creating a window

  2. Input through windows

  3. Output through windows

  4. Manipulating windows

Each of these window operations is described in the following pages.  Each one of the system functions and statements/commands mentioned are described later in this section.

CREATING A WINDOW

Before any of the Window Control Tools are used, a window must be created.  The system function, @CREATE_WINDOW, is used to create a window.  This system function allows the characteristics of the window being created to be specified .  After the window is successfully created, a unique non-zero window ID is returned by this system function.  This window ID must be used by all subsequent Window Control Tools which operate on this window.  The number of windows which can be created is limited only by the available virtual address space.

The @CREATE_WINDOW system function allows the specification of the following window characteristics:

Window attributes are the characteristics that specify whether or not the window:

After the window is created, it stays with ACCENT R until deleted.  Therefore, if the window ID is globally stored (such as in a Global Storage), it can be shared by various Process Modules and Command Modules.  Any operation may be performed on a window at command level.

OUTPUT THROUGH WINDOWS

The Window Control Tools offer a complete set of output operations performed through the window.  Any output written to the window must be performed by using the Window Control Tools.  The output operations are:

Text cannot be written outside the boundary of the window.  Any output to a window is not seen on the screen unless the window is pasted to the part of the drawing board that is visible on the screen.  If the window is not pasted, or the window is pasted in a position that is invisible, such output is only reflected behind the scene.

CURSOR POSITION

There is one cursor associated with each window.  All cursor positions specified during the window output operation are relative to the origin of that window.  When a window is first created, the cursor for that window is positioned at row 1 and column 1 of the window.  Various output operations to the window move the cursor.

The current cursor position can be determined within a window by using two separate system functions, @GET_COLUMN and @GET_ROW.  The former returns the current column position of the cursor.  The latter returns the current row position.

The cursor can also be set to an arbitrary position in the window.  The Window Control Tools offer the following cursor positioning statements/commands.

EDITING OPERATIONS

This section describes the text writing and editing offered by the Window Control Tools.  In the text writing operations, there can be character-oriented output or line-oriented output to the window.  Erasure, deletion, insertion, and changing rendition operations are also part of the text editing.

In character-oriented output operations, the cursor needs to be set to a specific position in the window and display the text.  The character-oriented text output statements/commands are:

Note that these different types of characters cannot be mixed on the same line in a window.

The line-oriented output operation allows the output of one line of text after another.  The line-oriented text output statements/commands are:

The erasure operation erases a portion of the window by filling it with blanks.  No other part of the window is affected.  The Window Control Tools offer the following erasure operations:

The deletion operation deletes a part of a window.  The statements/commands to perform such operations are:

The insertion operation allows text to be inserted into a window.  The insertion statements/commands are:

The rendition can also be changed for all or part of a window by using the SCREEN CHANGE_RENDITION statement/command.  The rendition can be one or any combination of the following attributes:

SCROLLING OPERATION

The statements/commands that allow the window to scroll are:

DRAWING OPERATION

Besides the text output, the Window Control Tools allow the output of lines or rectangles in a window.  Both horizontal and vertical lines are allowed.  The draw statements/commands are:

INPUT THROUGH WINDOWS

The Window Control Tools provide statements/commands for accepting input from a terminal.  Data may be obtained from the keyboard in two ways.

One keystroke may be read at a time without echoing the character.

If echoing the character through the window, it must be used in conjunction with the output tools described in the previous section.  Different types of data may also be read from the keyboard and display it in edited form on the window with a picture format.

The Window Control Tools can read five different types of data provided by ACCENT R.  They are CHAR, INT, FLOAT 5, FULLDATE and DATE.

There is an option of assigning the default value for the input operation if no data is entered through the keyboard.

The picture format can be any of the valid formats provided by ACCENT R.

The system functions that obtain the data from the keyboard are listed below.

Note that the above system functions obtain data from the keyboard through a window.  Therefore, the window specified by the system function must have already been pasted on the drawing board.

The statement/command SCREEN SET_KEYPAD_MODE sets the numeric keypad of the terminal to either numeric or application mode.

MANIPULATING WINDOWS

This section describes the tools used to manipulate windows on the drawing board.  The following statements/commands perform these operations:

ARGUMENTS:

Rendition
(video attributes)
@NORMAL
@BLINK
@BOLD
@REVERSE
@UNDERLINE
Position
(cursor)
@UPPER_LEFT
@LOWER_LEFT
@UPPER_RIGHT
@UPPER_RIGHT
Direction
(scroll)
@UP
@DOWN
wrap_flag
(text)
@WRAP
@NO_WRAP
border_side
@BOR_TOP
@BOR_BOTTOM
@BOR_RIGHT
@BOR_LEFT
erase_flag
@ERASE
@NOERASE
new_mode
(keypad)
@APPL,
@KP_APPL
@KP_NUM
window_attributes
@BORDER
@TRUNC_ICON
@WINDOW_CTRL

Back to page @TERM_LIST    Next Page System Functions - Window Control Tools