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

NAME

6       XtManageChildren, XtManageChild, XtUnmanageChildren, XtUnmanageChild,
7       XtChangeManagedSet, XtIsManaged - manage and unmanage children
8

SYNTAX

10       #include <X11/Intrinsic.h>
11
12       typedef Widget *WidgetList;
13
14       void XtManageChildren(WidgetList children, Cardinal num_children);
15
16       void XtManageChild(Widget child);
17
18       void XtUnmanageChildren(WidgetList children, Cardinal num_children);
19
20       void XtUnmanageChild(Widget child);
21
22       void XtChangeManagedSet(WidgetList unmanage_children, Cardinal
23              num_unmanage_children, XtDoChangeProc do_change_proc, XtPointer
24              client_data, WidgetList manage_children, Cardinal num_man‐
25              age_children);
26
27       Boolean XtIsManaged(Widget widget);
28

ARGUMENTS

30       child     Specifies the child.
31
32       children  Specifies a list of child widgets.
33
34       num_children
35                 Specifies the number of children.
36
37       widget    Specifies the widget.
38
39       manage_children
40                 Specifies the list of widget children to add to the managed
41                 set.
42
43       num_manage_children
44                 Specifies the number of entries in the manage_children list.
45
46       unmanage_children
47                 Specifies the list of widget children to remove from the man‐
48                 aged set.
49
50       num_unmanage_children
51                 Specifies the number of entries in the unmanage_children
52                 list.
53
54       do_change_proc
55                 Specifies the post unmanage, pre manage hook procedure to
56                 invoke.
57
58       client_data
59                 Specifies the client data to be passed to the hook procedure.
60

DESCRIPTION

62       The XtManageChildren function performs the following:
63
64       ·    Issues an error if the children do not all have the same parent or
65            if the parent is not a subclass of compositeWidgetClass.
66
67       ·    Returns immediately if the common parent is being destroyed; oth‐
68            erwise, for each unique child on the list, XtManageChildren
69            ignores the child if it already is managed or is being destroyed
70            and marks it if not.
71
72       ·    If the parent is realized and after all children have been marked,
73            it makes some of the newly managed children viewable:
74
75            -    Calls the change_managed routine of the widgets' parent.
76
77            -    Calls XtRealizeWidget on each previously unmanaged child that
78                 is unrealized.
79
80            -    Maps each previously unmanaged child that has map_when_man‐
81                 aged True.
82
83       Managing children is independent of the ordering of children and inde‐
84       pendent of creating and deleting children.  The layout routine of the
85       parent should consider children whose managed field is True and should
86       ignore all other children.  Note that some composite widgets, espe‐
87       cially fixed boxes, call XtManageChild from their insert_child proce‐
88       dure.
89
90       If the parent widget is realized, its change_managed procedure is
91       called to notify it that its set of managed children has changed.  The
92       parent can reposition and resize any of its children.  It moves each
93       child as needed by calling XtMoveWidget, which first updates the x and
94       y fields and then calls XMoveWindow if the widget is realized.
95
96       The XtManageChild function constructs a WidgetList of length one and
97       calls XtManageChildren.
98
99       The XtUnmanageChildren function performs the following:
100
101       ·    Issues an error if the children do not all have the same parent or
102            if the parent is not a subclass of compositeWidgetClass.
103
104       ·    Returns immediately if the common parent is being destroyed; oth‐
105            erwise, for each unique child on the list, XtUnmanageChildren per‐
106            forms the following:
107
108            -    Ignores the child if it already is unmanaged or is being
109                 destroyed and marks it if not.
110
111            -    If the child is realized, it makes it nonvisible by unmapping
112                 it.
113
114       ·    Calls the change_managed routine of the widgets' parent after all
115            children have been marked if the parent is realized.
116
117       XtUnmanageChildren does not destroy the children widgets.  Removing
118       widgets from a parent's managed set is often a temporary banishment,
119       and, some time later, you may manage the children again.
120
121       The XtUnmanageChild function constructs a widget list of length one and
122       calls XtUnmanageChildren.
123
124       The XtChangeManagedSet function performs the following:
125
126       ·    Issues an error if the widgets specified in the manage_children
127            and the unmanage_children lists to no all have the same parent, or
128            if that parent is not a subclass of compositeWidgetClass.
129
130       ·    Returns immediately if the common parent is being destroyed.
131
132       ·    If no CompositeClassExtension is defined, or a CompositeClassEx‐
133            tension is defined but with an allows_change_managed_set field
134            with a value of False, and XtChangeManagedSet was invoked with a
135            non-NULL do_change_proc procedure then XtChangeManagedSet performs
136            the following:
137
138            -    Calls XtUnmanageChildren (unmanage_children, num_unman‐
139                 age_children).
140
141            -    Calls the do_change_proc specified.
142
143            -    Calls XtManageChildren (manage_children, num_manage_children)
144                 and then returns immediately.
145
146       ·    Otherwise, if a CompositeClassExtension is defined with an
147            allows_change_managed_set field with a value of True, or if no
148            CompositeClassExtension is defined, and XtChangeManagedSet was
149            invoked with a NULL do_change_proc procedure, then the following
150            is performed:
151
152            -    For each child on the unmanage_children list; if the child is
153                 already unmanaged or is being destroyed it is ignored, other‐
154                 wise it is marked as being unmanaged and if it is realized it
155                 is made nonvisible by being unmapped.
156
157            -    If the do_change_proc procedure is non-NULL then it is
158                 invoked as specified.
159
160            -    For each child on the manage_children list; if the child is
161                 already managed or it is being destroyed it is ignored, oth‐
162                 erwise it is marked as managed
163
164       ·    If the parent is realized and after all children have been marked,
165            the change_managed method of the parent is invoked and subse‐
166            quently some of the newly managed children are made viewable by:
167
168            -    Calling XtRealizeWidget on each of the previously unmanaged
169                 child that is unrealized.
170
171            -    Mapping each previously unmanaged child that has
172                 map_when_managed True.
173
174       The XtIsManaged function returns True if the specified widget is of
175       class RectObj or any subclass thereof and is managed, or False other‐
176       wise.
177

SEE ALSO

179       XtMapWidget(3), XtRealizeWidget(3)
180       X Toolkit Intrinsics - C Language Interface
181       Xlib - C Language X Interface
182
183
184
185X Version 11                      libXt 1.2.0              XtManageChildren(3)
Impressum