handle to a dialog, and if you need to conserve memory and other resources, you should destroy the dialog whenever
you pop it down.
Another method the user might use to close a dialog is to select the Close item from the window menu. This menu can
be pulled down from the title bar of a window. Since the menu belongs to the window manager, rather than the shell
widget or the application, you cannot install any callback routines for its menu items. However, you can use the
XmNdeleteResponse resource to control how the DialogShell responds to a Close action. The Motif VendorShell,
from which the DialogShell is subclassed, is responsible for trapping the notification and determining what to do next,
based on the value of the resource. It can have one of the following values:
XmUNMAP
This value causes the dialog to be unmapped. The dialog disappears from the screen, but it is not destroyed,
nor is it iconified. The dialog widget and its windows are still intact and can be redisplayed using
XtPopup(). This value is the default for DialogShells.
XmDESTROY
This value destroys the DialogShell and calls its XmNdestroyCallback. Note that all of the shell's
children are also destroyed, including the dialog widget and its subwidgets. When the dialog is destroyed, you
cannot redisplay the dialog or reference its handle again. If you need the dialog again, you have to create
another one. Examples of using the XmNdestroyCallback are presented in Chapter 21, Advanced Dialog
Programming.
XmDO_NOTHING
This value ...