1XtManageChildren(3) XT FUNCTIONS XtManageChildren(3)
2
3
4
6 XtManageChildren, XtManageChild, XtUnmanageChildren, XtUnmanageChild,
7 XtChangeManagedSet, XtIsManaged - manage and unmanage children
8
10 typedef Widget *WidgetList;
11
12 void XtManageChildren(WidgetList children, Cardinal num_children);
13
14 void XtManageChild(Widget child);
15
16 void XtUnmanageChildren(WidgetList children, Cardinal num_children);
17
18 void XtUnmanageChild(Widget child);
19
20 void XtChangeManagedSet(WidgetList unmanage_children, Cardinal
21 num_unmanage_children, XtDoChangeProc do_change_proc, XtPointer
22 client_data, WidgetList manage_children, Cardinal num_man‐
23 age_children);
24
25 Boolean XtIsManaged(Widget widget);
26
28 child Specifies the child.
29
30 children Specifies a list of child widgets.
31
32 num_children
33 Specifies the number of children.
34
35 widget Specifies the widget.
36
37 manage_children
38 Specifies the list of widget children to add to the managed
39 set.
40
41 num_manage_children
42 Specifies the number of entries in the manage_children list.
43
44 unmanage_children
45 Specifies the list of widget children to remove from the man‐
46 aged set.
47
48 num_unmanage_children
49 Specifies the number of entries in the unmanage_children
50 list.
51
52 do_change_proc
53 Specifies the post unmanage, pre manage hook procedure to
54 invoke.
55
56 client_data
57 Specifies the client data to be passed to the hook procedure.
58
60 The XtManageChildren function performs the following:
61
62 · Issues an error if the children do not all have the same parent or
63 if the parent is not a subclass of compositeWidgetClass.
64
65 · Returns immediately if the common parent is being destroyed; oth‐
66 erwise, for each unique child on the list, XtManageChildren
67 ignores the child if it already is managed or is being destroyed
68 and marks it if not.
69
70 · If the parent is realized and after all children have been marked,
71 it makes some of the newly managed children viewable:
72
73 - Calls the change_managed routine of the widgets' parent.
74
75 - Calls XtRealizeWidget on each previously unmanaged child that
76 is unrealized.
77
78 - Maps each previously unmanaged child that has map_when_man‐
79 aged True.
80
81 Managing children is independent of the ordering of children and inde‐
82 pendent of creating and deleting children. The layout routine of the
83 parent should consider children whose managed field is True and should
84 ignore all other children. Note that some composite widgets, espe‐
85 cially fixed boxes, call XtManageChild from their insert_child proce‐
86 dure.
87
88 If the parent widget is realized, its change_managed procedure is
89 called to notify it that its set of managed children has changed. The
90 parent can reposition and resize any of its children. It moves each
91 child as needed by calling XtMoveWidget, which first updates the x and
92 y fields and then calls XMoveWindow if the widget is realized.
93
94 The XtManageChild function constructs a WidgetList of length one and
95 calls XtManageChildren.
96
97 The XtUnmanageChildren function performs the following:
98
99 · Issues an error if the children do not all have the same parent or
100 if the parent is not a subclass of compositeWidgetClass.
101
102 · Returns immediately if the common parent is being destroyed; oth‐
103 erwise, for each unique child on the list, XtUnmanageChildren per‐
104 forms the following:
105
106 - Ignores the child if it already is unmanaged or is being
107 destroyed and marks it if not.
108
109 - If the child is realized, it makes it nonvisible by unmapping
110 it.
111
112 · Calls the change_managed routine of the widgets' parent after all
113 children have been marked if the parent is realized.
114
115 XtUnmanageChildren does not destroy the children widgets. Removing
116 widgets from a parent's managed set is often a temporary banishment,
117 and, some time later, you may manage the children again.
118
119 The XtUnmanageChild function constructs a widget list of length one and
120 calls XtUnmanageChildren.
121
122 The XtChangeManagedSet function performs the following:
123
124 · Issues an error if the widgets specified in the manage_children
125 and the unmanage_children lists to no all have the same parent, or
126 if that parent is not a subclass of compositeWidgetClass.
127
128 · Returns immediately if the common parent is being destroyed.
129
130 · If no CompositeClassExtension is defined, or a CompositeClassEx‐
131 tension is defined but with an allows_change_managed_set field
132 with a value of False, and XtChangeManagedSet was invoked with a
133 non-NULL do_change_proc procedure then XtChangeManagedSet performs
134 the following:
135
136 - Calls XtUnmanageChildren (unmanage_children, num_unman‐
137 age_children).
138
139 - Calls the do_change_proc specified.
140
141 - Calls XtManageChildren (manage_children, num_manage_children)
142 and then returns immediately.
143
144 · Otherwise, if a CompositeClassExtension is defined with an
145 allows_change_managed_set field with a value of True, or if no
146 CompositeClassExtension is defined, and XtChangeManagedSetwas
147 do_change_proc procedure, then the following is performed:
148
149 - For each child on the unmanage_children list; if the child is
150 already unmanaged or is being destroyed it is ignored, other‐
151 wise it is marked as being unmanaged and if it is realized it
152 is made nonvisible by being unmapped.
153
154 - If the do_change_proc procedure is non-NULL then it is
155 invoked as specified.
156
157 - For each child on the manage_children list; if the child is
158 already managed or it is being destroyed it is ignored, oth‐
159 erwise it is marked as managed
160
161 · If the parent is realized and after all children have been marked,
162 the change_managed method of the parent is invoked and subse‐
163 quently some of the newly managed children are made viewable by:
164
165 - Calling XtRealizeWidget on each of the previously unmanaged
166 child that is unrealized.
167
168 - Mapping each previously unmanaged child that has
169 map_when_managed True.
170
171 The XtIsManaged function returns True if the specified widget is of
172 class RectObj or any subclass thereof and is managed, or False other‐
173 wise.
174
176 XtMapWidget(3), XtRealizeWidget(3)
177 X Toolkit Intrinsics - C Language Interface
178 Xlib - C Language X Interface
179
180
181
182X Version 11 libXt 1.1.4 XtManageChildren(3)