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

FreeBSD Manual Pages

  
 
  

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

NAME
     XmtDialogDo(), XmtDialogDoSync() - transfer data to an automatic dialog and
     display it.

SYNOPSIS
     #include <Xmt/Dialog.h>

     void XmtDialogDo(Widget dialog, XtPointer address)

     Boolean XmtDialogDoSync(Widget dialog, XtPointer address)

ARGUMENTS
     INPUTS

	  dialog The  child of the dialog shell of an automatic dia log box-i.e.
		 the widget returned by a call to XmtBuildDialog() or  XmtBuild-
		 QueryDialog().

	  addressThe address of a data structure from which data is to be trans-
		 ferred  to  the  dialog box, and in which the user's input data
		 will later be stored.

     OUTPUTS

	  addressXmtDialogDo() does not modify this field, but when XmtDialogDo-
		 Sync() returns True, the structure at this address will contain
		 the user's input values.

     RETURNS

	  XmtDialogDoSync() returns True if the user popped the dialog down nor-
	  mally, and returns False if the user cancelled the dialog with a  Can-
	  cel button.

DESCRIPTION
     XmtDialogDo() calls XmtDialogSetDialogValues() to transfer the data pointed
     to  by  address to the widgets in the dialog box dialog. Then it internally
     associates address with dialog for later use, pops up  the  dialog  box  by
     calling XtManageChild() on dialog, and returns.

     XmtDialogDo()  is	designed to be used with a callback procedure that takes
     the opposite actions-pops the dialog box down, and transfers the user's in-
     put values from the dialog widgets back into the specified data  structure.
     You  can write a callback that does this by using XmtDialogGetDataAddress()
     to look up the stored address for a dialog, and then using  XmtDialogGetDi-
     alogValues()  to  transfer  the  dialog data to the structure. Xmt provides
     predefined callbacks that do just this-XmtDialogOkayCallback(),  for  exam-
     ple,  is  designed to be registered on the Okay button of a dialog box man-
     aged with XmtDialogDo().

     XmtDialogDoSync() works like XmtDialogDo(), but is usually more convenient.
     Instead of returning after popping up the dialog box, it enters an internal
     event loop-so that it appears to block-until the user pops the dialog down.

     Like XmtDialogDo(), XmtDialogDoSync() must be used in conjunction with spe-
     cial callback procedures. If the user clicks the Okay button or some  other
     button  that  invokes XmtDialogOkayCallback(), then that callback will copy
     the user's input to the structure at address, and will pop down the  dialog
     box. It will also cause XmtDialogDoSync() to exit its event loop and return
     True.  On	the  other  hand, if the user selects the Cancel button, or some
     other button that invokes the XmtDialogCancelCallback(), then that callback
     will pop down the dialog without modifying data at address, and will  cause
     XmtDialogDoSync() to exit its loop and return False.  If you write your own
     dialog callback procedures, you can tell XmtDialogDoSync() to stop blocking
     and return a value by calling XmtDialogSetReturnValue().

     XmtDialogDoSync()	performs  synchronous input, and to prevent its internal
     event loops from becoming nested arbitrarily deep, it should only	be  used
     with modal dialogs.

SEE ALSO
     Chapter 29, Custom Dialogs and Automatic Dialog Management,
     XmtDialogCancelCallback(), XmtDialogGetDataAddress(),
     XmtDialogGetDefaultValues(), XmtDialogGetDialogValues(),
     XmtDialogOkayCallback(), XmtDialogSetDialogValues(),
     XmtDialogSetReturnValue().

Xmt				   Motif Tools			  XmtDialogDo(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtDialogDo&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help