|
NAMEXmtDisplayMessage(), XmtDisplayMessageAndWait(), Xmt DisplayMessageVaList() - display a message in a dialog box.SYNOPSIS#include <Xmt/Dialogs.h>
void XmtDisplayMessage(Widget w, String msg_name, String msg_class, String msg_default, String title_default, String help_default, Pixmap icon_default, int modality, int type, ...) void XmtDisplayMessageAndWait(Widget w, String msg_name, String msg_class , String msg_default, String title_default, String help_default, Pixmap icon_default, int modality, int type, ...) void XmtDisplayMessageVaList(Widget w, String msg_name, String msg_class, String msg_default, String title_default, String help_default, Pixmap icon_default, int modality, int type, va_list args) ARGUMENTSINPUTS
DESCRIPTIONXmtDisplayMessage() displays a message in an automatically created, cached, and managed XmMessageBox dialog. The message to be displayed is formed by performing a printf()-style substitution of the arguments in the variable-length argument list into the specified message template. The specified title will appear in the title bar of the dialog (if the user's window manager is configured to display a title bar for these dialog widgets), and the specified icon will be displayed in the upper-left corner of the dialog. If any help text is specified then the dialog box will contain a Help button. If the user clicks on this button, the help text will be appended to the displayed message. The modality argument lets you specify whether the dialog should be modal or modeless, and the type argument lets you display dialogs that display the default Motif information, warning, and error icons.For customizability and internationalizability, XmtDisplayMessage() looks up the message text and other resources for the message dialog in the resource database. Thus, the message_default, title_default, icon_default, and help_default arguments are simply default values that can be overridden with resources. The resources are looked up using the message name and class specified by the msg_name and msg_class arguments. You may specify NULL for these arguments, but it will result in a dialog that is not customizable. See the ``Customization'' section below for more details. XmtDisplayMessageAndWait() behaves just like XmtDisplayMessage() but enters an internal event loop after displaying the message so that it appears to ``block'' until the user has seen and responded to the message by clicking the Ok button. XmtDisplayMessageVaList() is identical to XmtDisplayMessage() except that it takes its printf() substitution arguments in the form of a va_list instead of an actual variable-length argument list. va_list is the type initialized by va_start() and passed to vprintf(). XmtDisplayMessageVaList() provides a way for you to write your own printf()-style functions that use Xmt message dialogs internally. Customization If the msg_name argument is specified for a dialog, then the message text, title, help text and icon of the dialog are looked up in the resource database, and any values found there override values specified by the msg_default, title_default, help_default, and icon_default arguments. The resources are looked up as subresources of the shell over which the dialog will be displayed. The name and class of the subpart are given by the msg_name and msg_class arguments. The names and classes of the resources that are looked up are the following:
WIDGETS The first time it is called XmtDisplayMessage() (or any of the related functions based on XmtDisplayMessage()) creates an XmMessageBox widget named ``xmtMessageDialog'' as a child of an XmDialogShell named ``xmtMessageDialogShell''. The XmDialogShell widget is created as a child of the nearest XmDialogShell, TopLevelShell or ApplicationShell ancestor of the widget w. These message dialog widgets are cached for reuse by subsequent calls to XmtDisplayMessage() (or to any related functions.) Dialog Types The type argument to XmtDisplayMessage() serves mainly to provide default values when the msg_class, title_default, or icon_default arguments are omitted. The legal values for type, and the defaults it specifies are shown in the table below: Default Values
SEE ALSOChapter 25, Message Dialogs,XmtDisplayError(), XmtDisplayErrorMsg(), XmtDisplayErrorMsgAndWait(), XmtDisplayInformation(), XmtDisplayInformationMsg(), XmtDisplayWarning(), XmtDisplayWarningMsg(), XmtDisplayWarningMsgAndWait().
Visit the GSP FreeBSD Man Page Interface. |