GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
XmtDisplayMessage(3) FreeBSD Library Functions Manual XmtDisplayMessage(3)

XmtDisplayMessage(), XmtDisplayMessageAndWait(), Xmt DisplayMessageVaList() - display a message in a dialog box.

#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)

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 overridden 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_MODELESS, XmDIALOG_PRIMARY_APPLICATION_MODAL, or XmDIALOG_FULL_APPLICATION_MODAL.
type
The type of the dialog; one of the values XmDIALOG_MESSAGE, XmDIALOG_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().

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 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:

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 ``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

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

Chapter 25, Message Dialogs,
XmtDisplayError(), XmtDisplayErrorMsg(), XmtDisplayErrorMsgAndWait(), XmtDisplayInformation(), XmtDisplayInformationMsg(), XmtDisplayWarning(), XmtDisplayWarningMsg(), XmtDisplayWarningMsgAndWait().
Motif Tools Xmt

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.