Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
XmtDisplayMessage(3)	   Library Functions Manual	  XmtDisplayMessage(3)

       XmtDisplayMessage(), XmtDisplayMessageAndWait(),	Xmt DisplayMessageVaL-
       ist() - 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)


	    w	   Any	widget;	the dialog will	be displayed over the shell of
		   this	widget.

		   The name of this message; used to look up resources for the
		   message. You	may specify NULL.

		   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.

		   The	text of	the message to display,	unless overridden by a
		   value in the	resource database. This	 message  may  contain
		   printf()-style substitutions.

		   The title to	appear in the dialog's title bar, unless over-
		   ridden by a value in	the resource database. If you  specify
		   NULL, the default title will	depend on the type argument.

		   The	help  text  to	display,  when	requested by the user,
		   unless overridden by	a value	in the resource	database.

		   The pixmap to appear	in the message dialog, unless overrid-
		   den	by  a  value  in the resource database.	If you specify
		   None, the default icon will depend on the type argument.

		   The modality	of the dialog; one of the values XmDIALOG_MOD-

	    type   The type of the dialog; one of the values XmDIALOG_MESSAGE,
		   This	argument controls the title and	icon to	 be  used  for
		   the dialog, if they are not specified in the	resource data-
		   base	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 vari-
		   able-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  dia-
       log  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 mode-
       less, 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	 argu-
       ments.  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 mes-
       sage 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(). XmtDis-
       playMessageVaList()  provides  a	 way  for  you	to  write   your   own
       printf()-style functions	that use Xmt message dialogs internally.


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

       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  |

       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

       Dialog Types

       The  type  argument  to	XmtDisplayMessage()  serves  mainly to provide
       default values when the msg_class, title_default, or icon_default argu-
       ments are omitted. The legal values for type, and the defaults it spec-
       ifies 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(),

Xmt				  Motif	Tools		  XmtDisplayMessage(3)


Want to link to this manual page? Use this URL:

home | help