Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ MenuPopup(Xt) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 XtMenuPopup(Xt)   X Version 11 (Release 5) 6 January 1993    XtMenuPopup(Xt)


 Name

    XtMenuPopup - map a pop-up

 Syntax


    void XtPopup(popup_shell, grab_kind)
    Widget popup_shell;
    XtGrabKind grab_kind;

    void XtCallbackNone(w, client_data, call_data)
    Widget w;
    XtPointer client_data;
    XtPointer call_data;

    void XtCallbackNonexclusive(w, client_data, call_data)
    Widget w;
    XtPointer client_data;
    XtPointer call_data;

    void XtCallbackExclusive(w, client_data, call_data)
    Widget w;
    XtPointer client_data;
    XtPointer call_data;

    void XtMenuPopup(shell_name)
    String shell_name;


 Arguments

    calldata Specifies the callback data, which is not used by this pro-
              cedure.

    clientdata
              Specifies the pop-up shell.

    grabkind Specifies the way in which user events should be constrained.

    popupshell
              Specifies the widget shell.

    w         Specifies the widget.

 Description

    The XtPopup function performs the following:

    +  Calls XtCheckSubclass to ensure popupshell is a subclass of Shell.

    +  Generates an error if the shell's popped_up field is already True.

    +  Calls the callback procedures on the shell's popup_callback list.

    +  Sets the shell popped_up field to True, the shell spring_loaded field
       to False, and the shell grab_kind field from grabkind.

    +  If the shell's create_popup_child field is non-NULL, XtPopup calls it
       with popupshell as the parameter.

    +  If grabkind is either XtGrabNonexclusive or XtGrabExclusive, it
       calls:

       XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)


    +  Calls XtRealizeWidget with popupshell specified.

    +  Calls XMapWindow with popupshell specified.

    +  Calls XMapRaised with popupshell specified.

    The XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive func-
    tions call XtPopup with the shell specified by the clientdata argument
    and grabkind set as the name specifies.  XtCallbackNone, XtCallback-
    Nonexclusive, and XtCallbackExclusive specify XtGrabNone, XtGrabNonex-
    clusive, and XtGrabExclusive, respectively.  Each function then sets the
    widget that executed the callback list to be insensitive by using XtSet-
    Sensitive.  Using these functions in callbacks is not required.  In par-
    ticular, an application must provide customized code for callbacks that
    create pop-up shells dynamically or that must do more than desensitizing
    the button.

    XtMenuPopup is known to the translation manager, which must perform spe-
    cial actions for spring-loaded pop-ups.  Calls to XtMenuPopup in a trans-
    lation specification are mapped into calls to a nonexported action pro-
    cedure, and the translation manager fills in parameters based on the
    event specified on the left-hand side of a translation.

    If XtMenuPopup is invoked on ButtonPress (possibly with modifiers), the
    translation manager pops up the shell with grabkind set to XtGrabEx-
    clusive and spring_loaded set to True.  If XtMenuPopup is invoked on
    EnterWindow (possibly with modifiers), the translation manager pops up
    the shell with grabkind set to XtGrabNonexclusive and spring_loaded set
    to False.  Otherwise, the translation manager generates an error.  When
    the widget is popped up, the following actions occur:

    +  Calls XtCheckSubclass to ensure popupshell is a subclass of Shell.

    +  Generates an error if the shell's popped_up field is already True.

    +  Calls the callback procedures on the shell's popup_callback list.

    +  Sets the shell popped_up field to True and the shell grab_kind and
       spring_loaded fields appropriately.

    +  If the shell's create_popup_child field is non-NULL, it is called with
       popupshell as the parameter.

    +  Calls:

       XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)


    +  Calls XtRealizeWidget with popupshell specified.

    +  Calls XMapWindow with popupshell specified.

    +  Calls XMapRaised with popupshell specified.

    (Note that these actions are the same as those for XtPopup.)  XtMenuPopup
    tries to find the shell by searching the widget tree starting at the
    parent of the widget in which it is invoked.  If it finds a shell with
    the specified name in the pop-up children of that parent, it pops up the
    shell with the appropriate parameters.  Otherwise, it moves up the parent
    chain as needed.  If XtMenuPopup gets to the application widget and can-
    not find a matching shell, it generates an error.

 See also

    XtCreatePopupShell(Xt) and XtPopdown(Xt).

    X Toolkit Intrinsics - C Language Interface
    Xlib - C Language X Interface


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