1 .\" Copyright 1993 X Consortium
3 .\" Permission is hereby granted, free of charge, to any person obtaining
4 .\" a copy of this software and associated documentation files (the
5 .\" "Software"), to deal in the Software without restriction, including
6 .\" without limitation the rights to use, copy, modify, merge, publish,
7 .\" distribute, sublicense, and/or sell copies of the Software, and to
8 .\" permit persons to whom the Software is furnished to do so, subject to
9 .\" the following conditions:
11 .\" The above copyright notice and this permission notice shall be
12 .\" included in all copies or substantial portions of the Software.
14 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 .\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 .\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 .\" OTHER DEALINGS IN THE SOFTWARE.
22 .\" Except as contained in this notice, the name of the X Consortium shall
23 .\" not be used in advertising or otherwise to promote the sale, use or
24 .\" other dealings in this Software without prior written authorization
25 .\" from the X Consortium.
28 .ds xT X Toolkit Intrinsics \- C Language Interface
30 .ds xW X Toolkit Athena Widgets \- C Language Interface
31 .ds xL Xlib \- C Language X Interface
32 .ds xC Inter-Client Communication Conventions Manual
35 .hw XtPopup-Spring-Loaded XtCallback-None XtCallback-Nonexclusive XtCallback-Exclusive wid-get
42 .\".if \\n(VS>=40 .vs \\n(VSu
43 .\".if \\n(VS<=39 .vs \\n(VSp
54 .de IN \" send an index entry to the stderr
57 .ie t \\$1\fB\^\\$2\^\fR\\$3
58 .el \\$1\fI\^\\$2\^\fP\\$3
61 .ie t \fB\^\\$1\^\fR\\$2
62 .el \fI\^\\$1\^\fP\\$2
65 .TH XtPopup __libmansuffix__ __xorgversion__ "XT FUNCTIONS"
67 XtPopup, XtPopupSpringLoaded, XtCallbackNone, XtCallbackNonexclusive, XtCallbackExclusive \- map a pop-up
70 void XtPopup(Widget \fIpopup_shell\fP, XtGrabKind \fIgrab_kind\fP);
72 void XtPopupSpringLoaded(Widget \fIpopup_shell\fP);
74 void XtCallbackNone(Widget \fIw\fP, XtPointer \fIclient_data\fP, XtPointer
77 void XtCallbackNonexclusive(Widget \fIw\fP, XtPointer \fIclient_data\fP,
78 XtPointer \fIcall_data\fP);
80 void XtCallbackExclusive(Widget \fIw\fP, XtPointer \fIclient_data\fP,
81 XtPointer \fIcall_data\fP);
83 void MenuPopup(String \fIshell_name\fP);
85 .IP \fIcall_data\fP 1i
86 Specifies the callback data,
87 which is not used by this procedure.
88 .IP \fIclient_data\fP 1i
89 Specifies the pop-up shell.
90 .IP \fIgrab_kind\fP 1i
91 Specifies the way in which user events should be constrained.
92 .IP \fIpopup_shell\fP 1i
93 Specifies the widget shell\*(Ps.
99 function performs the following:
103 .\".ZN XtCheckSubclass(popup_shell, popupShellWidgetClass)
104 to ensure popup_shell is a subclass of
107 Generates an error if the shell's popped_up field is already
110 Calls the callback procedures on the shell's popup_callback list.
112 Sets the shell popped_up field to
114 the shell spring_loaded field to
116 and the shell grab_kind field from grab_kind.
118 If the shell's create_popup_child field is non-NULL,
120 calls it with popup_shell as the parameter.
122 If grab_kind is either
123 .ZN XtGrabNonexclusive
125 .ZN XtGrabExclusive ,
129 XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)
134 with popup_shell specified.
138 with popup_shell specified.
141 .ZN XtPopupSpringLoaded
142 function performs exactly as
144 except that it sets the shell \fIspring_loaded\fP field to
150 and \fIspring_loaded\fP
155 .ZN XtCallbackNonexclusive ,
157 .ZN XtCallbackExclusive
160 with the shell specified by the client data argument
161 and grab_kind set as the name specifies.
163 .ZN XtCallbackNonexclusive ,
165 .ZN XtCallbackExclusive
168 .ZN XtGrabNonexclusive ,
170 .ZN XtGrabExclusive ,
172 Each function then sets the widget that executed the callback list
173 to be insensitive by using
175 Using these functions in callbacks is not required.
177 an application must provide customized code for
178 callbacks that create pop-up shells dynamically or that must do more than
179 desensitizing the button.
182 is known to the translation manager,
183 which must perform special actions for spring-loaded pop-ups.
186 in a translation specification are mapped into calls to a
187 nonexported action procedure,
188 and the translation manager fills in parameters
189 based on the event specified on the left-hand side of a translation.
195 (possibly with modifiers),
196 the translation manager pops up the shell with grab_kind set to
198 and spring_loaded set to
204 (possibly with modifiers),
205 the translation manager pops up the shell with grab_kind set to
206 .ZN XtGrabNonexclusive
207 and spring_loaded set to
209 Otherwise, the translation manager generates an error.
210 When the widget is popped up,
211 the following actions occur:
215 .\".ZN XtCheckSubclass(popup_shell, popupShellWidgetClass)
216 to ensure popup_shell is a subclass of
219 Generates an error if the shell's popped_up field is already
222 Calls the callback procedures on the shell's popup_callback list.
224 Sets the shell popped_up field to
226 and the shell grab_kind and spring_loaded fields appropriately.
228 If the shell's create_popup_child field is non-NULL,
229 it is called with popup_shell as the parameter.
234 XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)
239 with popup_shell specified.
243 with popup_shell specified.
245 (Note that these actions are the same as those for
248 tries to find the shell by searching the widget tree starting at
249 the parent of the widget in which it is invoked.
250 If it finds a shell with the specified name in the pop-up children of
251 that parent, it pops up the shell with the appropriate parameters.
252 Otherwise, it moves up the parent chain as needed.
255 gets to the application widget and cannot find a matching shell,
256 it generates an error.
258 XtCreatePopupShell(__libmansuffix__),
259 XtPopdown(__libmansuffix__)