1XtPopup(3)                       XT FUNCTIONS                       XtPopup(3)
2
3
4

NAME

6       XtPopup, XtPopupSpringLoaded, XtCallbackNone, XtCallbackNonexclusive,
7       XtCallbackExclusive - map a pop-up
8

SYNTAX

10       void XtPopup(Widget popup_shell, XtGrabKind grab_kind);
11
12       void XtPopupSpringLoaded(Widget popup_shell);
13
14       void XtCallbackNone(Widget w, XtPointer client_data, XtPointer
15              call_data):
16
17       void XtCallbackNonexclusive(Widget w, XtPointer client_data, XtPointer
18              call_data);
19
20       void XtCallbackExclusive(Widget w, XtPointer client_data, XtPointer
21              call_data);
22
23       void MenuPopup(String shell_name);
24

ARGUMENTS

26       call_data Specifies the callback data, which is not used by this proce‐
27                 dure.
28
29       client_data
30                 Specifies the pop-up shell.
31
32       grab_kind Specifies the way in which user events should be constrained.
33
34       popup_shell
35                 Specifies the widget shell.
36
37       w         Specifies the widget.
38

DESCRIPTION

40       The XtPopup function performs the following:
41
42       ·    Calls XtCheckSubclass to ensure popup_shell is a subclass of
43            Shell.
44
45       ·    Generates an error if the shell's popped_up field is already True.
46
47       ·    Calls the callback procedures on the shell's popup_callback list.
48
49       ·    Sets the shell popped_up field to True, the shell spring_loaded
50            field to False, and the shell grab_kind field from grab_kind.
51
52       ·    If the shell's create_popup_child field is non-NULL, XtPopup calls
53            it with popup_shell as the parameter.
54
55       ·    If grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it
56            calls:
57
58       XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)
59
60       ·    Calls XtRealizeWidget with popup_shell specified.
61
62       ·    Calls XMapWindow with popup_shell specified.
63
64       The XtPopupSpringLoaded function performs exactly as XtPopup except
65       that it sets the shell spring_loaded field to True and always calls
66       XtAddGrab with exclusive True and spring_loaded True.
67
68       The XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive
69       functions call XtPopup with the shell specified by the client data
70       argument and grab_kind set as the name specifies.  XtCallbackNone,
71       XtCallbackNonexclusive, and XtCallbackExclusive specify XtGrabNone,
72       XtGrabNonexclusive, and XtGrabExclusive, respectively.  Each function
73       then sets the widget that executed the callback list to be insensitive
74       by using XtSetSensitive.  Using these functions in callbacks is not
75       required.  In particular, an application must provide customized code
76       for callbacks that create pop-up shells dynamically or that must do
77       more than desensitizing the button.
78
79       MenuPopup is known to the translation manager, which must perform spe‐
80       cial actions for spring-loaded pop-ups.  Calls to MenuPopup in a trans‐
81       lation specification are mapped into calls to a nonexported action pro‐
82       cedure, and the translation manager fills in parameters based on the
83       event specified on the left-hand side of a translation.
84
85       If MenuPopup is invoked on ButtonPress (possibly with modifiers), the
86       translation manager pops up the shell with grab_kind set to XtGrabEx‐
87       clusive and spring_loaded set to True.  If MenuPopup is invoked on
88       EnterWindow (possibly with modifiers), the translation manager pops up
89       the shell with grab_kind set to XtGrabNonexclusive and spring_loaded
90       set to False.  Otherwise, the translation manager generates an error.
91       When the widget is popped up, the following actions occur:
92
93       ·    Calls XtCheckSubclass to ensure popup_shell is a subclass of
94            Shell.
95
96       ·    Generates an error if the shell's popped_up field is already True.
97
98       ·    Calls the callback procedures on the shell's popup_callback list.
99
100       ·    Sets the shell popped_up field to True and the shell grab_kind and
101            spring_loaded fields appropriately.
102
103       ·    If the shell's create_popup_child field is non-NULL, it is called
104            with popup_shell as the parameter.
105
106       ·    Calls:
107
108       XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)
109
110       ·    Calls XtRealizeWidget with popup_shell specified.
111
112       ·    Calls XMapWindow with popup_shell specified.
113
114       (Note that these actions are the same as those for XtPopup.)  MenuPopup
115       tries to find the shell by searching the widget tree starting at the
116       parent of the widget in which it is invoked.  If it finds a shell with
117       the specified name in the pop-up children of that parent, it pops up
118       the shell with the appropriate parameters.  Otherwise, it moves up the
119       parent chain as needed.  If MenuPopup gets to the application widget
120       and cannot find a matching shell, it generates an error.
121

SEE ALSO

123       XtCreatePopupShell(3), XtPopdown(3)
124       X Toolkit Intrinsics - C Language Interface
125       Xlib - C Language X Interface
126
127
128
129X Version 11                      libXt 1.1.5                       XtPopup(3)
Impressum