Name
XtCallbackPopdown — pop down a widget from a callback routine.
Synopsis
void XtCallbackPopdown(w, client_data, call_data)
Widget w;
XtPointer client_data;
XtPointer call_data;
Arguments
wSpecifies the widget.
client_data
Specifies a pointer to the XtPopdownID structure.
call_dataSpecifies the callback data, which is not used by this procedure.
Description
XtCallbackPopdown is a built-in callback function for popping down a pop-up shell widget. This function is suitable for popping down shells that were previously popped up with XtCallbackNone, XtCallbackNonexclusive, or XtCallbackExclusive. An XtPopdownID in the client_ data field indicates which widget is to be popped down.
Structures
XtCallbackPopdown casts the client data parameter to an XtPopdownID pointer:
typedef struct {
Widget shell_widget;
Widget enable_widget;
} XtPopdownIDRec, ∗XtPopdownID;
shell_widget is the pop-up shell to pop down, and enable_widget is the widget that was used to pop it up.
XtCallbackPopdown calls XtPopdown with the specified shell_widget and then calls XtSetSensitive to resensitize the enable_widget.
Here is an example:
Widget pshell, confirm;
XtPopdownIDRec pop_rec;
main() {
confirm = XtCreateWidget(...);
pshell = XtCreatePopupShell(...);
pop_rec.shell_widget = pshell;
pop_rec.enable_widget = confirm;
XtAddCallback(confirm,XtNcallback,XtCallbackPopdown,pop_rec);
}
When the widget invokes XtCallCallbacks on its resource XtNcallback, the pop-up shell pshell will be popped down. See the companion example in XtCallbackExclusive.
See Also
XtCallbackExclusive(1), XtCallCallbacks(1), XtPopdown(1), XtSetSensitive(1).