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