Top Up Prev Next Bottom Contents Index Search

19.2 Using Dialog Boxes

Some commands require information that cannot be expressed easily using post-fix notation. Examples include destructive commands that require an explicit confirmation and commands that require complex non-graphic information. Vem uses dialog boxes based on the MIT Athena widgets to handle these situations. Dialog boxes are windows that resemble business forms. These windows contain labeled fields for entering text, changing numerical values, and selecting options. This section describes how to use dialog boxes.

All dialog boxes in vem have the same form. An example is shown on page 2-14, and also in figures 19-1 on page 12 and 19-2 on page 14. At the top of all dialogs is a one line title indicating the purpose for the dialog. The middle of the dialog (known as the body) contains fields for displaying and editing information of various kinds. At the bottom of the dialog are a number of control buttons. Each control button represents a command. The arguments to the command are the values of the fields displayed in the body. Thus, operating a dialog consists of editing or changing fields in the body and then selecting a command by activating a control button. Six kinds of fields may appear in the body of a vem dialog: editable text, non-editable text, enumerated value, numerical value, exclusive lists, and non-exclusive lists. A description of each field type is given in the paragraphs that follow.

Editable text fields are used to enter and edit text. Visually, an edit text field consists of a box containing a caret cursor, an optional scrollbar, and a label to the left of the box indicating the purpose for the field. Only one editable text field is active in any one dialog. The active editable text field has a dark border. Typing text with the mouse positioned anywhere in the dialog inserts text into the active editable text field. Most of the basic emacs editing commands can be used to modify the text in the field, as shown in table

19-1.

The insert position in the field may also be changed by pressing the left mouse button when the mouse cursor is over the desired position. Any editable text field can be made active by clicking the left mouse button inside the editable area. Alternatively, one can use the Tab key to make the next text field active and Meta-Tab to make the previous field active. Editable text fields that display large amounts of text have a scrollbar to the left of the text area. Pressing the left and right mouse buttons when the mouse cursor is in a scrollbar will scroll the text down and up respectively in proportion to the distance between the mouse cursor and the top of the scrollbar. As an example, pressing the left mouse button near the bottom of the scrollbar will scroll down the text almost one screen. Pressing and releasing the middle mouse button scrolls the text to a relative position based on how far the mouse cursor is from the top of the scrollbar. Holding down the middle mouse button will interactively scroll through the text.

Non-editable text fields are used to display text messages. They consist of a box containing text and an optional scrollbar. The scrollbar operates just like those used in editable text fields.

Enumerated value fields are used to specify one value out of a small list of values. They consist of a value displayed inside a box and a descriptive label to the left of the value. The border of the value highlights as the mouse cursor moves over it. Depressing and holding the left mouse button inside the value box causes a menu to appear that displays all possible values. The choices will highlight as the mouse cursor moves over them. To select a new value, release the mouse button when the desired choice is highlighted. The new value will appear in the value box. One can leave the value unchanged by releasing the mouse button outside the menu boundary.

A numerical value field is used to specify a magnitude between a predetermined minimum and maximum. Visually, it consists of a box containing a numerical value, a horizontal scrollbar to the right of the box for changing the value, and a label to the left describing the value. The magnitude of the value is changed by operating the scrollbar. Pressing the left and right buttons in the scrollbar decrement and increment the value by one unit. Pressing the middle button changes the value based on the distance between the mouse cursor and the left edge of the scroll bar. The middle button may be pressed and held to interactively modify the value. Most people use the middle button to set the value roughly then use the left and right buttons to make the value precise.

Exclusive lists are used to choose one possible value out of a (possibly quite large) list of values. These values are displayed in a box with a scrollbar on the left edge of the box. Each value consists of a button box on the left and a descriptive label to the right. As the mouse moves over a button box, it will highlight to indicate it can be activated. The button box of the selected item will appear dark while all others will remain light. If there are too many values to display in the box at one time, the scrollbar can be used to scroll through the possible values. The scrollbar operates in the same way as described for editable text fields.

Non-exclusive lists are used to choose zero or more possible values from a (possibly quite large) list of values (see figure 19-2 on page 14). A non-exclusive list resembles an exclusive list both in appearance and operation. However, unlike an exclusive list, one can choose any number of items in a non-exclusive list. Visually, the two lists are distinguished by the appearance of the button boxes. Exclusive button boxes resemble radio buttons. Non-exclusive button boxes resemble check marks. Pressing the left button in a non-exclusive button box causes the value to toggle (i.e., if it was selected it becomes unselected, if it was unselected it becomes selected).

Control buttons cause the dialog to carry out some operation. They consist of a text label surrounded by a box. Control buttons are activated in one of two ways: pressing and releasing the left mouse button when the mouse cursor is positioned inside the button boundary, and through keystrokes. Not all control buttons can be activated using keystrokes. Those that can be activated in this fashion display the key in parentheses under the button label. Although there are exceptions, most dialogs support the keyboard accelerators given in table

19-2.

Dialogs may be both moded and unmoded. Moded dialogs are those requiring a response before processing can proceed. Vem uses these kinds of dialogs to ask for confirmation before proceeding. On the other hand, unmoded dialogs remain active until explicitly dismissed by the user. Other commands may be invoked freely while unmoded dialogs are visible. Most non-confirmation dialogs in vem are unmoded.



Top Up Prev Next Bottom Contents Index Search

Copyright © 1990-1997, University of California. All rights reserved.