next up previous contents index
Next: Description of each Up: User Interface Components Previous: Using the Mouse

Using the Forms library

The various menus used in VMD are based on the XForms Library developed by Mark Overmars and T. C. Zhao. In this library, each graphical user interface component window is referred to as a form. A form contains a collection of graphical controls, such as buttons, sliders, browsers, etc, described in the following sections.

Buttons

 

Figure 3.1 shows some of the buttons used by VMD . For example, the button in 3.1 A draws all the loaded files and the one in 3.1 B writes the current screen description for use in a ray-tracing program. Some buttons, as in 3.1 C, indicate if something is turned on or off by turning an indicator light on or off. They can be turned on or off by clicking on the button. Others, shown in 3.1 D, indicate that they are pressed by appearing recessed.

 

One common button usage motif in VMD is shown in figure 3.2. These indicate that the value in the middle can be increased by pressing the button(s) on the right and decreased by pressing the button(s) on the left. If there are two sets of buttons, as in 3.2 B, then the outer set of buttons change the number in larger increments than the inner set.

Sliders

 

Sliders are used somewhat rarely in VMD , typically to control some smoothly varying quantity that should always be set within some definite limits. An example from each is shown in figure 3.3. To use a slider, click and drag on the interior rectangle.

Choosers

 

Choosers look like the items in figure 3.4. They are used to select one of a list of possible choices. There are two ways to change the selection. Clicking with the left mouse button brings up the list of choices. Move the mouse to the correct selection and release the button to pick that item, or release the button outside of the menu to keep the original selection. Clicking with the right mouse button advances the selection through the list by one. If the currently selected item is the last element of the list, the selection loops around to the first item.

Text Entry Areas

 

Figure 3.5 shows an example text entry. These are used for things such as atom selection or for entering filenames. To select a text entry, use the mouse and click on the appropriate field, or press the tab key to move between different text entry areas. The currently active area should have a brighter background. Some emacs-style control keys are allowed, so ^A (control-A) goes to the beginning of the line, ^E goes to the end, ^B moves the cursor back by one without deletion, and ^F moves it forward one. ^H or backspace deletes the previous character, and ^K deletes everything from the cursor to the end of the line. The mouse can be used to select text inside the entry field. If text is selected, pressing any normal key replaces the text, and pressing backspace deletes it. Cut-and-paste operations among XForms text entry regions and other X-Windows applications are allowed.

Browsers

 

 

Another way to view a list of items is to use a browser, as shown in figure 3.6. A browser displays several items on the screen (unlike the chooser which only shows one) and has a slider which is used to scroll though all the available options. Selected items are highlighted. Some browsers only allow one item to be selected, while others allow multiple selections and do not automatically deselect a line when a new item is picked. To turn off a selected item when multiple selections are allowed, click on the item, and the highlight will disappear.

One common browser motif uses coupled browsers to describe two-level hierarchies. Selecting a line in the first browser determines the possible selections in the second. An example is shown in figure 3.6 B.

File Browser

 

This form, as shown in figure 3.7, is used for input or output file selection. The current directory is shown on the line labeled Directory, and is changed by clicking on the current directory name and entering the new name into the text entry field which appears. On the left side of the form is a browser which alphabetically lists all of the available directories and the files which match the Pattern given on the second line. Note that the file selection pattern will use glob-style pattern matching, not regular expression matching.

The browser can be used to traverse the file structure. Clicking once on a directory name changes the current directory to the new one. If you click once on a file name, the name appears in the file name text entry field and can be modified as needed. To select the file name given in the field, press the enter key or click on the Ready button, or else double-clock the file name entry. To cancel this file selection, click on the Cancel button.



next up previous contents index
Next: Description of each Up: User Interface Components Previous: Using the Mouse



Andrew Dalke
Tue May 14 16:49:45 CDT 1996