FreeBSD Manual Pages
XmtDisplayMessage(3) Library Functions Manual XmtDisplayMessage(3) NAME XmtDisplayMessage(), 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_de- fault, 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_de- fault, Pixmap icon_default, int modality, int type, va_list args) ARGUMENTS INPUTS w Any widget; the dialog will be displayed over the shell of this widget. msg_name The name of this message; used to look up resources for the message. You may specify NULL. msg_class The class of this message; use to look up resources for the message. If you specify NULL the class will be based on the value of the type argument. msg_default The text of the message to display, unless overridden by a value in the resource database. This message may contain printf()-style substitutions. title_default The title to appear in the dialog's title bar, unless overrid- den by a value in the resource database. If you specify NULL, the default title will depend on the type argument. help_default The help text to display, when requested by the user, unless overridden by a value in the resource database. icon_default The pixmap to appear in the message dialog, unless overridden by a value in the resource database. If you specify None, the default icon will depend on the type argument. modality The modality of the dialog; one of the values XmDIALOG_MODE- LESS, XmDIALOG_PRIMARY_APPLICATION_MODAL, or XmDIALOG_FULL_AP- PLICATION_MODAL. type The type of the dialog; one of the values XmDIALOG_MESSAGE, Xm- DIALOG_INFORMATION, XmDIALOG_WARNING, and XmDIALOG_ERROR. This argument controls the title and icon to be used for the dialog, if they are not specified in the resource database or by the title_default and icon_default arguments. ... A printf()-style variable-length argument list of values to be substituted into the message. args For XmtDisplayMessageVaList() only, a printf()-style variable- length argument list converted to a va_list as you would when calling vprintf(). DESCRIPTION XmtDisplayMessage() 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 ti- tle will appear in the title bar of the dialog (if the user's window man- ager 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 dia- log. 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 dis- play 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 re- source 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 cus- tomizable. 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 in- stead of an actual variable-length argument list. va_list is the type ini- tialized 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 data- base, and any values found there override values specified by the msg_de- fault, title_default, help_default, and icon_default arguments. The resources are looked up as subresources of the shell over which the di- alog 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: +----------+--------+----------+--------------------------------------+---------------+ | Name | Type | Class | Purpose | Default | +----------+--------+----------+--------------------------------------+---------------+ +----------+--------+----------+--------------------------------------+---------------+ | message | String | Message | The text of the message to display. | msg_default | +----------+--------+----------+--------------------------------------+---------------+ | helpText | String | HelpText | The help text to display. | help_default | +----------+--------+----------+--------------------------------------+---------------+ | title | String | Title | The name to appear in the title bar. | title_default | +----------+--------+----------+--------------------------------------+---------------+ | icon | Pixmap | Icon | The icon to display. | icon_default | +----------+--------+----------+--------------------------------------+---------------+ 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 ``xmtMes- sageDialogShell''. 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 +----------------------+----------------------+---------+----------------+ | Dialog Type | Class | Title | Icon | +----------------------+----------------------+---------+----------------+ +----------------------+----------------------+---------+----------------+ | XmDIALOG_MESSAGE | XmtMessageDialog | Message | none | +----------------------+----------------------+---------+----------------+ | XmDIALOG_INFORMATION | XmtInformationDialog | Help | standard Motif | +----------------------+----------------------+---------+----------------+ | XmDIALOG_WARNING | XmtWarningDialog | Warning | standard Motif | +----------------------+----------------------+---------+----------------+ | XmDIALOG_ERROR | XmtErrorDialog | Error | standard Motif | +----------------------+----------------------+---------+----------------+ SEE ALSO Chapter 25, Message Dialogs, XmtDisplayError(), XmtDisplayErrorMsg(), XmtDisplayErrorMsgAndWait(), XmtDisplayInformation(), XmtDisplayInformationMsg(), XmtDisplayWarning(), XmtDisplayWarningMsg(), XmtDisplayWarningMsgAndWait(). Xmt Motif Tools XmtDisplayMessage(3)
NAME | SYNOPSIS | ARGUMENTS | DESCRIPTION | SEE ALSO
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtDisplayMessageVaList&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>
