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

FreeBSD Manual Pages

  
 
  

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

NAME
     XmtDialog{Okay,Cancel,Apply,Reset,Done}Callback(),      XmtDialogGetDataAd-
     dress(), XmtDialogSetReturnValue() - predefined callbacks for use with  au-
     tomatic dialogs and functions for writing custom dialog callbacks.

SYNOPSIS
     #include <Xmt/Dialog.h>

     void XmtDialogOkayCallback(Widget w, XtPointer client_data, XtPointer data)

     void XmtDialogCancelCallback(Widget w, XtPointer client_data, XtPointer
		    data)

     void XmtDialogApplyCallback(Widget w, XtPointer client_data, XtPointer
		    data)

     void XmtDialogResetCallback(Widget w, XtPointer client_data, XtPointer
		    data)

     void XmtDialogDoneCallback(Widget w, XtPointer client_data, XtPointer data)

     XtPointer XmtDialogGetDataAddress(Widget dialog)

     void XmtDialogSetReturnValue(Widget dialog, Boolean value)

ARGUMENTS
     INPUTS

	  w	 The widget on which the callback was registered.

	  client_data
		 This  argument  is  unused;  register these callbacks with NULL
		 client_data.

	  data	 This argument is also unused.

	  dialog For  XmtDialogGetDataAddress()  and  XmtDialogSetReturnValue(),
		 any widget in an Xmt automatic dialog.

	  value  For  XmtDialogSetReturnValue() the Boolean value to be returned
		 by XmtDialogDoSync().

     RETURNS

	  XmtDialogGetDataAddress() returns the address passed in the  preceding
	  call to XmtDialogDo() or XmtDialogDoSync() for the dialog specified by
	  dialog.

DESCRIPTION
     The  first  five  of these functions are predefined callback procedures in-
     tended to be registered on buttons in automatic dialog boxes  created  with
     XmtBuildDialog() or XmtBuildQueryDialog() and managed with XmtDialogDo() or
     XmtDialogDoSync().   The  remaining two are lower-level procedures that you
     can use to write your own custom callbacks for use with  XmtDialogDo()  and
     XmtDialogDoSync().

     XmtDialogOkayCallback()  is intended for use on an Okay button. It performs
     three tasks: (1) Transfers data from the widgets of the dialog box  to  the
     data  structure that was passed when the dialog was popped up. (2) Pops the
     dialog down. (3) If used with XmtDialogDoSync(), it sets an  internal  flag
     that causes XmtDialogDoSync() to exit its event loop and return True to its
     caller.

     XmtDialogCancelCallback()	is  intended for use on a Cancel button. It does
     two things: (1) Pops the dialog down. (2) If used	with  XmtDialogDoSync(),
     it  sets  an  internal flag that causes XmtDialogDoSync() to exit its event
     loop and return False to its caller. Note that this callback does not cause
     any data to be transferred.

     XmtDialogApplyCallback() is intended for use with an Apply button in a mod-
     eless dialog. It does not pop down the dialog, but  simply  transfers  data
     from  the dialog widgets into the data structure specified in the preceding
     call to XmtDialogDo(). Usually, it must be used with another callback  pro-
     cedure  that  notifies the application that its data structure has been up-
     dated.

     XmtDialogResetCallback() is intended for use with a Reset button in a mode-
     less dialog. It performs the opposite action to XmtDialogApplyCallback()-it
     transfers data from the application data structure (specified in  the  call
     to  XmtDialogDo()) back into the dialog widgets. This generally has the ef-
     fect of undoing any user edits since the dialog was popped up or since  the
     Apply button was last pressed.

     XmtDialogDoneCallback()  is  intended for use with a Dismiss or Done button
     in a modeless dialog that has a separate Apply button. This  callback  does
     not  transfer  any  data to or from the dialog widgets, but simply pops the
     dialog box down.  Although intended for use with XmtDialogDo() and a  mode-
     less dialog, it may be used with a modal XmtDialogDoSync() dialog.  In this
     case it will cause XmtDialogDoSync() to stop blocking and return True.

     XmtDialogGetDataAddress()	returns  the  address  that was passed to XmtDi-
     alogDo() or XmtDialogDoSync() when  the  dialog  specified  by  dialog  was
     popped up. You can use this address in a call to XmtDialogGetDialogValues()
     or related functions.

     If  a  dialog box specified by dialog was popped up with XmtDialogDoSync(),
     XmtDialogSetReturnValue() will cause that function  to  exit  its	internal
     event  loop, and to return the value specified by value. It is safe to call
     XmtDialogSet ReturnValue() even when a dialog was popped up  with	Xmt  Di-
     alogDo().

SEE ALSO
     Chapter 29, Custom Dialogs and Automatic Dialog Management, XmtDialogDo(),
     XmtDialogDoSync(), XmtDialogGetDefaultValues(), XmtDialogGetDialogValues(),
     XmtDialogSetDialogValues().

Xmt				   Motif Tools		XmtDialogOkayCallback(3)

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

home | help