[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 Programmer's Guide

Chapter 7. Dialogs

Dialogs are container widgets that provide a means of communicating between the user and the application. A dialog widget usually asks a question or presents some information to the user. In some cases, the application is suspended until the user provides a response.

Dialogs are similar to menus. Both seek input from the user. Like PopupMenus and PulldownMenus, dialogs appear in top-level windows and are more or less transient. Making a selection typically unposts a PopupMenu or PulldownMenu and often pops down a dialog. "PopupMenu" "in DialogBoxes" "PulldownMenu" "in DialogBoxes" There are two chief differences:

  1. Unless torn off, menus are usually modal; that is, the user must make a selection from the menu or unpost it before interacting with other parts of the application. Dialogs can be either modal or modeless. In a modeless dialog, the user can interact with other parts of the application before returning to the dialog.

  2. Menu components are limited to buttons, labels, and separators. Dialogs can contain other, sometimes arbitrary, kinds of widgets, such as List and Text. Dialogs permit more complex interaction with the user and allow the application to solicit a broader range of information.

    Menus are well suited to allowing the user to make a single choice from a constrained set. Dialogs are appropriate for displaying information about a transient or unusual state of the program and for obtaining complex input from the user. Whether to use a dialog or a menu is not always clear. In fact, a TearOffMenu combines aspects of both. For more information on using menus and dialogs, see the Motif Style Guide.

  3. [ Previous | Next | Contents | Glossary | Home | Search ]