Git init
[framework/uifw/xorg/lib/libxt.git] / man / XtManageChildren.man
1 .\" Copyright 1993 X Consortium
2 .\"
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:
10 .\"
11 .\" The above copyright notice and this permission notice shall be
12 .\" included in all copies or substantial portions of the Software.
13 .\"
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.
21 .\"
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.
26 .\"
27 .ds tk X Toolkit
28 .ds xT X Toolkit Intrinsics \- C Language Interface
29 .ds xI Intrinsics
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
33 .ds Rn 3
34 .ds Vn 2.2
35 .hw XtManage-Children XtManage-Child XtUnmanage-Children XtUnmanage-Child XtChange-ManagedSet XtIs-Managed wid-get
36 .na
37 .de Ds
38 .nf
39 .\\$1D \\$2 \\$1
40 .ft 1
41 .ps \\n(PS
42 .\".if \\n(VS>=40 .vs \\n(VSu
43 .\".if \\n(VS<=39 .vs \\n(VSp
44 ..
45 .de De
46 .ce 0
47 .if \\n(BD .DF
48 .nr BD 0
49 .in \\n(OIu
50 .if \\n(TM .ls 2
51 .sp \\n(DDu
52 .fi
53 ..
54 .de FD
55 .LP
56 .KS
57 .TA .5i 3i
58 .ta .5i 3i
59 .nf
60 ..
61 .de FN
62 .fi
63 .KE
64 .LP
65 ..
66 .de IN          \" send an index entry to the stderr
67 ..
68 .de C{
69 .KS
70 .nf
71 .D
72 .\"
73 .\"     choose appropriate monospace font
74 .\"     the imagen conditional, 480,
75 .\"     may be changed to L if LB is too
76 .\"     heavy for your eyes...
77 .\"
78 .ie "\\*(.T"480" .ft L
79 .el .ie "\\*(.T"300" .ft L
80 .el .ie "\\*(.T"202" .ft PO
81 .el .ie "\\*(.T"aps" .ft CW
82 .el .ft R
83 .ps \\n(PS
84 .ie \\n(VS>40 .vs \\n(VSu
85 .el .vs \\n(VSp
86 ..
87 .de C}
88 .DE
89 .R
90 ..
91 .de Pn
92 .ie t \\$1\fB\^\\$2\^\fR\\$3
93 .el \\$1\fI\^\\$2\^\fP\\$3
94 ..
95 .de ZN
96 .ie t \fB\^\\$1\^\fR\\$2
97 .el \fI\^\\$1\^\fP\\$2
98 ..
99 .de NT
100 .ne 7
101 .ds NO Note
102 .if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
103 .if \\n(.$ .if !'\\$1'C' .ds NO \\$1
104 .ie n .sp
105 .el .sp 10p
106 .TB
107 .ce
108 \\*(NO
109 .ie n .sp
110 .el .sp 5p
111 .if '\\$1'C' .ce 99
112 .if '\\$2'C' .ce 99
113 .in +5n
114 .ll -5n
115 .R
116 ..
117 .               \" Note End -- doug kraft 3/85
118 .de NE
119 .ce 0
120 .in -5n
121 .ll +5n
122 .ie n .sp
123 .el .sp 10p
124 ..
125 .ny0
126 .TH XtManageChildren __libmansuffix__ __xorgversion__ "XT FUNCTIONS"
127 .SH NAME
128 XtManageChildren, XtManageChild, XtUnmanageChildren, XtUnmanageChild, XtChangeManagedSet, XtIsManaged \- manage and unmanage children
129 .SH SYNTAX
130 typedef Widget *WidgetList;
131 .HP
132 void XtManageChildren(WidgetList \fIchildren\fP, Cardinal \fInum_children\fP);
133 .HP
134 void XtManageChild(Widget \fIchild\fP); 
135 .HP
136 void XtUnmanageChildren(WidgetList \fIchildren\fP, Cardinal
137 \fInum_children\fP); 
138 .HP
139 void XtUnmanageChild(Widget \fIchild\fP); 
140 .HP
141 void XtChangeManagedSet(WidgetList \fIunmanage_children\fP, 
142 Cardinal \fInum_unmanage_children\fP, XtDoChangeProc \fIdo_change_proc\fP,
143 XtPointer \fIclient_data\fP, WidgetList \fImanage_children\fP, 
144 Cardinal \fInum_manage_children\fP); 
145 .HP
146 Boolean XtIsManaged(Widget \fIwidget\fP); 
147 .SH ARGUMENTS
148 .IP \fIchild\fP 1i
149 Specifies the child.
150 .IP \fIchildren\fP 1i
151 Specifies a list of child widgets.
152 .IP \fInum_children\fP 1i
153 Specifies the number of children.
154 .IP \fIwidget\fP 1i
155 Specifies the widget.
156 .IP \fImanage_children\fP 1i
157 Specifies the list of widget children to add to the managed set.
158 .IP \fInum_manage_children\fP 1i
159 Specifies the number of entries in the manage_children list.
160 .IP \fIunmanage_children\fP 1i
161 Specifies the list of widget children to remove from the managed set.
162 .IP \fInum_unmanage_children\fP 1i
163 Specifies the number of entries in the unmanage_children list.
164 .IP \fIdo_change_proc\fP 1i
165 Specifies the post unmanage, pre manage hook procedure to invoke.
166 .IP \fIclient_data\fP 1i
167 Specifies the client data to be passed to the hook procedure.
168 .SH DESCRIPTION
169 The
170 .ZN XtManageChildren
171 function performs the following:
172 .IP \(bu 5
173 Issues an error if the children do not all have the same parent or
174 if the parent is not a subclass of 
175 .ZN compositeWidgetClass .
176 .IP \(bu 5
177 Returns immediately if the common parent is being destroyed;
178 otherwise, for each unique child on the list,
179 .ZN XtManageChildren
180 ignores the child if it already is managed or is being destroyed
181 and marks it if not.
182 .IP \(bu 5
183 If the parent is realized and after all children have been marked,
184 it makes some of the newly managed children viewable:
185 .RS
186 .IP \- 5
187 Calls the change_managed routine of the widgets' parent.
188 .IP \- 5
189 Calls
190 .ZN XtRealizeWidget
191 on each previously unmanaged child that is unrealized.
192 .IP \- 5
193 Maps each previously unmanaged child that has map_when_managed 
194 .ZN True .
195 .RE
196 .LP
197 Managing children is independent of the ordering of children and
198 independent of creating and deleting children.
199 The layout routine of the parent
200 should consider children whose managed field is
201 .ZN True 
202 and should ignore all other children.
203 Note that some composite widgets, especially fixed boxes, call
204 .ZN XtManageChild
205 from their insert_child procedure.
206 .LP
207 If the parent widget is realized,
208 its change_managed procedure is called to notify it
209 that its set of managed children has changed.
210 The parent can reposition and resize any of its children.
211 It moves each child as needed by calling 
212 .ZN XtMoveWidget ,
213 which first updates the x and y fields and then calls
214 .ZN XMoveWindow
215 if the widget is realized.
216 .LP
217 The
218 .ZN XtManageChild
219 function constructs a
220 .ZN WidgetList
221 of length one and calls
222 .ZN XtManageChildren .
223 .LP
224 The
225 .ZN XtUnmanageChildren
226 function performs the following:
227 .IP \(bu 5
228 Issues an error if the children do not all have the same parent
229 or if the parent is not a subclass of 
230 .ZN compositeWidgetClass .
231 .IP \(bu 5
232 Returns immediately if the common parent is being destroyed;
233 otherwise, for each unique child on the list, 
234 .ZN XtUnmanageChildren
235 performs the following:
236 .RS
237 .IP \- 5
238 Ignores the child if it already is unmanaged or is being destroyed
239 and marks it if not.
240 .IP \- 5
241 If the child is realized,
242 it makes it nonvisible by unmapping it.
243 .RE
244 .IP \(bu 5
245 Calls the change_managed routine of the widgets' parent
246 after all children have been marked
247 if the parent is realized.
248 .LP
249 .ZN XtUnmanageChildren
250 does not destroy the children widgets.
251 Removing widgets from a parent's managed set is often a temporary banishment,
252 and, some time later, you may manage the children again.
253 .LP
254 The
255 .ZN XtUnmanageChild
256 function constructs a widget list
257 of length one and calls
258 .ZN XtUnmanageChildren .
259 .LP
260 The
261 .ZN XtChangeManagedSet
262 function performs the following:
263 .IP \(bu 5
264 Issues an error if the widgets specified in the \fImanage_children\fP
265 and the \fIunmanage_children\fP lists to no all have the same parent, or
266 if that parent is not a subclass of compositeWidgetClass.
267 .IP \(bu 5
268 Returns immediately if the common parent is being destroyed.
269 .IP \(bu 5
270 If no
271 .ZN CompositeClassExtension
272 is defined, or a
273 .ZN CompositeClassExtension
274 is defined but with an \fIallows_change_managed_set\fP field with a
275 value of
276 .ZN False ,
277 and
278 .ZN XtChangeManagedSet 
279 was invoked with a non-NULL \fIdo_change_proc\fP procedure 
280 then
281 .ZN XtChangeManagedSet
282 performs the following:
283 .RS
284 .IP \- 5
285 Calls
286 .ZN XtUnmanageChildren
287 (\fIunmanage_children\fP, \fInum_unmanage_children\fP).
288 .IP \- 5
289 Calls the \fIdo_change_proc\fP specified.
290 .IP \- 5
291 Calls
292 .ZN XtManageChildren
293 (\fImanage_children\fP, \fInum_manage_children\fP) and then returns
294 immediately.
295 .RE
296 .IP \(bu 5
297 Otherwise, if a
298 .ZN CompositeClassExtension
299 is defined with an \fIallows_change_managed_set\fP field with a value of
300 .ZN True ,
301 or if no
302 .ZN CompositeClassExtension
303 is defined, and
304 .ZN XtChangeManagedSet was invoked with a NULL 
305 \fIdo_change_proc\fP procedure, then the following is
306 performed:
307 .RS
308 .IP \- 5
309 For each child on the \fIunmanage_children\fP list; if the child is
310 already unmanaged or is being destroyed it is ignored, otherwise it
311 is marked as being unmanaged and if it is realized it is made nonvisible
312 by being unmapped.
313 .IP \- 5
314 If the \fIdo_change_proc\fP procedure is non-NULL then
315 it is invoked as specified.
316 .IP \- 5
317 For each child on the \fImanage_children\fP list; if the child is
318 already managed or it is being destroyed it is ignored, otherwise it
319 is marked as managed
320 .RE
321 .IP \(bu 5
322 If the parent is realized and after all children have been marked, the
323 change_managed method of the parent is invoked and subsequently some
324 of the newly managed children are made viewable by:
325 .RS
326 .IP \- 5
327 Calling
328 .ZN XtRealizeWidget
329 on each of the previously unmanaged child that is unrealized.
330 .IP \- 5
331 Mapping each previously unmanaged child that has \fImap_when_managed\fP
332 .ZN True .
333 .RE
334 .LP
335 The
336 .ZN XtIsManaged
337 function returns
338 .ZN True
339 if the specified widget is of class RectObj or any subclass thereof and
340 is managed, or
341 .ZN False
342 otherwise.
343 .SH "SEE ALSO"
344 XtMapWidget(3Xt),
345 XtRealizeWidget(3Xt)
346 .br
347 \fI\*(xT\fP
348 .br
349 \fI\*(xL\fP