FreeBSD Manual Pages
XmtDialogOkayCallback(3) Library Functions Manual XmtDialogOkayCallback(3) NAME XmtDialog{Okay,Cancel,Apply,Reset,Done}Callback(), XmtDialogGetDataAd- dress(), XmtDialogSetReturnValue() - predefined callbacks for use with automatic 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 XmtDialogSetReturn- Value(), 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 pre- ceding call to XmtDialogDo() or XmtDialogDoSync() for the dialog specified by dialog. DESCRIPTION The first five of these functions are predefined callback procedures intended to be registered on buttons in automatic dialog boxes created with XmtBuildDialog() or XmtBuildQueryDialog() and managed with XmtDi- alogDo() or XmtDialogDoSync(). The remaining two are lower-level pro- cedures 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 per- forms 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 XmtDialog- DoSync(), 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 modeless 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 procedure that notifies the application that its data struc- ture has been updated. XmtDialogResetCallback() is intended for use with a Reset button in a modeless dialog. It performs the opposite action to XmtDialogApplyCall- back()-it transfers data from the application data structure (specified in the call to XmtDialogDo()) back into the dialog widgets. This gener- ally has the effect 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 but- ton in a modeless dialog that has a separate Apply button. This call- back does not transfer any data to or from the dialog widgets, but sim- ply pops the dialog box down. Although intended for use with XmtDi- alogDo() and a modeless dialog, it may be used with a modal XmtDialog- DoSync() 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 XmtDialogGetDialogVal- ues() or related functions. If a dialog box specified by dialog was popped up with XmtDialogDo- Sync(), 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 DialogDo(). SEE ALSO Chapter 29, Custom Dialogs and Automatic Dialog Management, XmtDialogDo(), XmtDialogDoSync(), XmtDialogGetDefaultValues(), XmtDialogGetDialogValues(), XmtDialogSetDialogValues(). Xmt Motif Tools XmtDialogOkayCallback(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=XmtDialogOkayCallback&sektion=3&manpath=FreeBSD+Ports+15.0>
