XtManageChildren()XtManageChildren()Name
XtManageChildren - bring an array of widgets under their parent's geom‐
etry management.
Synopsis
void XtManageChildren(children, num_children)
WidgetList children;
Cardinal num_children;
Inputs
children Specifies an array of child widgets. The widgets must all
be siblings and must be of class RectObj or any subclass
thereof.
num_children
Specifies the number of children in the array.
DescriptionXtManageChildren() brings a list of widgets created with XtCreateWid‐
get() under the geometry management of their parent. All widgets
(except shell widgets) must be managed in order to be visible. Manag‐
ing a widget will generally make it visible, unless its
XtNmappedWhenManaged resource is False.
The "Algorithm" section below details the procedure followed by XtMan‐
ageChildren().
Usage
To manage a single widget, you can use XtManageChild(). To unmanage
widgets, use XtUnmanageChild() and XtUnmanageChildren().
If you are going to manage multiple children of the same managed and
realized parent, it is more efficient to place those children widget
into an array and call XtManageChildren() just once than it is to man‐
age them individually. The former technique results in only a single
call to the parent's change_managed() method. If you are creating wid‐
gets before the widget tree has been realized, however, managing them
one at a time is fine.
AlgorithmXtManageChildren() performs the following:
· Issues an error if the children do not all have the same parent or
if the parent is not a subclass of compositeWidgetClass.
· Returns immediately if the common parent is being destroyed; other‐
wise, for each unique child on the list, XtManageChildren() ignores
the child if it already is managed or is being destroyed, and marks
it otherwise.
· If the parent is realized XtManageChildren() does the following:
- Calls the change_managed() method of the widgets' parent.
- Calls XtRealizeWidget() on each marked child that is unrealized.
- Maps each marked child that has its XtNmappedWhenManaged resource
True.
The management of children is independent of the creation and ordering
of the children. There is no special list of managed children; the
layout routine of the parent should loop through the list of all chil‐
dren and simply ignore those that are not managed (see XtIsManaged()).
Structures
typedef Widget *WidgetList;
See AlsoXtCreateManagedWidget(1), XtIsManaged(1), XtManageChild(1), XtMoveWid‐
get(1), XtRealizeWidget(1), XtSetMappedWhenManaged(1), XtUnman‐
ageChild(1), XtUnmanageChildren(1).
Xt - Widget Lifecycle XtManageChildren()