1.7. Dialog Widgets   

Dialog widgets are container widgets that provide applications with layout functionality typically used for popup "dialogs". These widgets are used for interaction tasks such as displaying messages, setting properties, and providing selection from a list of items. Dialog widgets are thus used primarily as an interface between the user and the application. A Dialog widget will normally ask a question or present the user with some information that requires a response. In some cases the application will be suspended until the user provides the response.

A Dialog is a collection of widgets, including a DialogShell, a BulletinBoard (or subclass of BulletinBoard or some other container widget) plus various children of the BulletinBoard, such as Label, PushButton and Text widgets. All of the dialog widgets are built from the Core, Composite, Constraint, and Manager widget classes.


 
Example of dialogs.
Fig. 1.10 : Example of dialogs.
The collection of widgets that compose a Dialog can be built from scratch by building up the necessary argument lists and creating each individual widget in the Dialog. For common interaction tasks, convenience functions are defined that create the collection of widgets that comprise a particular Dialog. The collections of widgets created by Dialog convenience functions are referred to as Convenience Dialogs . Convenience Dialogs are either modal or modeless. A modal dialog stops the work session and solicits input from the user. A modeless dialog solicits input from the user, but doesn't interrupt interaction with any application.

Each dialog has one or more convenience functions that create any of the subwidgets in that dialog. For example, MessageBox has several convenience functions:



XmCreateMessageDialog. XmCreateErrorDialog.
XmCreateInformationDialog. XmCreateQuestionDialog.
XmCreate WarningDialog. XmCreate WorkingDialog.