Name
XtManageChildren — add widgets to their parent’s list of managed children.
Synopsis
void XtManageChildren(children, num_children)
WidgetList children;
Cardinal num_children;
Arguments
childrenSpecifies an array of child widgets.
num_children
Specifies the number of children in the array.
Description
XtManageChildren brings a list of widgets created with XtCreateWidget under the geometry management of their parent. A widget cannot be made visible until it is managed. (A widget can be created and managed at the same time by calling the convenience function XtCreateManagedWidget.)
XtManageChildren 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. It returns immediately if the common parent is being destroyed.
•Marks each child viewable that is not already under management and not being destroyed.
•For each viewable child, if the parent is realized, XtManageChildren:
−Calls the parent’s change_managed method.
−Calls XtRealizeWidget if the child is unrealized.
−Maps child if map_when_managed is True.
Managing children is independent of their ordering and their creation and deletion. The parent should lay out only children whose managed field is True and ignore all others. Note that some composite widgets, especially fixed boxes, call XtManageChild from their insert_child method.
If the parent widget is realized, its change_managed method 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 XtMoveWidget, which first updates the x and y fields and then calls the Xlib XMoveWindow function if the widget is realized.
If the composite widget wishes to change the size or border width of any of its children, it calls XtResizeWidget, which first updates the Core fields and then calls the Xlib XConfigureWindow function if the widget is realized.
Calling XtManageChild or XtManageChildren explicitly can be bypassed if widgets are created with the convenience function XtCreateManagedWidget. Note that XtManageChild, XtManageChildren, XtUnmanageChild, and XtUnmanageChildren are low-level routines that are used by generic composite widget building routines. In addition, composite widgets can provide widget-specific, high-level convenience procedures to let applications create and manage children more easily.
Structures
typedef Widget ∗WidgetList;
See Also
XtCreateManagedWidget(1), XtIsManaged(1), XtManageChild(1), XtMoveWidget(1), XtRealizeWidget(1), XtResizeWidget(1), XtSetMappedWhenManaged(1), XtUnmanageChild(1), XtUnmanageChildren(1).