Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtCallbackNone(1)

XtCallbackPopdown(1)

XtCallCallbacks(1)

XtMoveWidget(1)

XtPopdown(1)

XtPopup(1)

XtSetSensitive(1)

Name

XtCallbackExclusive — callback function to pop up a widget. 

Synopsis

void XtCallbackExclusive(w, client_data, call_data)

    Widget w;
    XtPointer client_data;
    XtPointer call_data;

Arguments

wSpecifies the widget. 

client_data
Specifies the pop-up shell.

call_dataSpecifies the callback data, which is not used by this procedure. 

Description

The functions XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive are built-in callback functions that call XtPopup.  You can register any of these callback functions in a callback list.  The pop-up shell is specified by the client_data argument of the callback function, and the grab_kind argument of XtPopup is set according to the name of the callback function:

•XtCallbackNone specifies XtGrabNone. 

•XtCallbackNonexclusive specifies XtGrabNonexclusive. 

•XtCallbackExclusive specifies XtGrabExclusive. 

Each of these callback functions then sets the widget that executed the callback list to be insensitive by using XtSetSensitive. 

These callback functions provide one strategy for popping up widgets--but you are not required to use them.  The built-in action XtMenuPopup can be used for some pop ups.  An application may provide customized code to create pop-up shells dynamically or that must do more than desensitizing the button. 

For example, XtCallbackExclusive does nothing to place the pop-up widget, so it pops up in the upper-left corner of the display.  A custom pop-up routine might move the pop-up shell to the location of the pointer, or the middle of the current window, before calling XtPopup.  This can also be done in a separate callback function, added to the callback list before XtCallback∗. 

An example follows:

f()
{
Widget pshell, button;
  .
  .
pshell = XtCreatePopupShell(...);
button = XtCreateWidget(...);
 XtAddCallback(button,XtNcallback,XtCallbackNone,pshell);
}

When the widget invokes XtCallCallbacks on its XtNcallback resource, the pop-up shell pshell will be popped up. 

A companion example to the one above is presented on the XtCallbackPopdown reference page. 

See Also

XtCallbackNone(1), XtCallbackPopdown(1), XtCallCallbacks(1), XtMoveWidget(1), XtPopdown(1), XtPopup(1), XtSetSensitive(1). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026