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. XtManageChildren __libmansuffix__ __xorgversion__ "XT FUNCTIONS"
NAME
XtManageChildren, XtManageChild, XtUnmanageChildren, XtUnmanageChild, XtChangeManagedSet, XtIsManaged - manage and unmanage children
SYNTAX
#include <
X11/
Intrinsic.h>
typedef Widget *WidgetList;
void XtManageChildren(WidgetList children, Cardinal num_children);
void XtManageChild(Widget child);
void XtUnmanageChildren(WidgetList children, Cardinal
num_children);
void XtUnmanageChild(Widget child);
void XtChangeManagedSet(WidgetList unmanage_children,
Cardinal num_unmanage_children, XtDoChangeProc do_change_proc,
XtPointer client_data, WidgetList manage_children,
Cardinal num_manage_children);
Boolean XtIsManaged(Widget widget);
ARGUMENTS
child 1i
Specifies the child.
children 1i
Specifies a list of child widgets.
num_children 1i
Specifies the number of children.
widget 1i
Specifies the widget.
manage_children 1i
Specifies the list of widget children to add to the managed set.
num_manage_children 1i
Specifies the number of entries in the manage_children list.
unmanage_children 1i
Specifies the list of widget children to remove from the managed set.
num_unmanage_children 1i
Specifies the number of entries in the unmanage_children list.
do_change_proc 1i
Specifies the post unmanage, pre manage hook procedure to invoke.
client_data 1i
Specifies the client data to be passed to the hook procedure.
DESCRIPTION
The
XtManageChildren function performs the following:
\(bu 5
Issues an error if the children do not all have the same parent or
if the parent is not a subclass of
compositeWidgetClass . \(bu 5
Returns immediately if the common parent is being destroyed;
otherwise, for each unique child on the list,
XtManageChildren ignores the child if it already is managed or is being destroyed
and marks it if not.
\(bu 5
If the parent is realized and after all children have been marked,
it makes some of the newly managed children viewable:
- 5
Calls the change_managed routine of the widgets' parent.
- 5
Calls
XtRealizeWidget on each previously unmanaged child that is unrealized.
- 5
Maps each previously unmanaged child that has map_when_managed
True .
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
True and should ignore all other children.
Note that some composite widgets, especially fixed boxes, call
XtManageChild from their insert_child procedure.
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
XtMoveWidget , which first updates the x and y fields and then calls
XMoveWindow if the widget is realized.
The
XtManageChild function constructs a
WidgetList of length one and calls
XtManageChildren .
The
XtUnmanageChildren function performs the following:
\(bu 5
Issues an error if the children do not all have the same parent
or if the parent is not a subclass of
compositeWidgetClass . \(bu 5
Returns immediately if the common parent is being destroyed;
otherwise, for each unique child on the list,
XtUnmanageChildren performs the following:
- 5
Ignores the child if it already is unmanaged or is being destroyed
and marks it if not.
- 5
If the child is realized,
it makes it nonvisible by unmapping it.
\(bu 5
Calls the change_managed routine of the widgets' parent
after all children have been marked
if the parent is realized.
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.
The
XtUnmanageChild function constructs a widget list
of length one and calls
XtUnmanageChildren .
The
XtChangeManagedSet function performs the following:
\(bu 5
Issues an error if the widgets specified in the
manage_children
and the
unmanage_children lists to no all have the same parent, or
if that parent is not a subclass of compositeWidgetClass.
\(bu 5
Returns immediately if the common parent is being destroyed.
\(bu 5
If no
CompositeClassExtension is defined, or a
CompositeClassExtension is defined but with an
allows_change_managed_set field with a
value of
False , and
XtChangeManagedSet was invoked with a non-NULL
do_change_proc procedure
then
XtChangeManagedSet performs the following:
- 5
Calls
XtUnmanageChildren (
unmanage_children,
num_unmanage_children).
- 5
Calls the
do_change_proc specified.
- 5
Calls
XtManageChildren (
manage_children,
num_manage_children) and then returns
immediately.
\(bu 5
Otherwise, if a
CompositeClassExtension is defined with an
allows_change_managed_set field with a value of
True , or if no
CompositeClassExtension is defined, and
XtChangeManagedSet was invoked with a NULL
do_change_proc procedure, then the following is
performed:
- 5
For each child on the
unmanage_children 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.
- 5
If the
do_change_proc procedure is non-NULL then
it is invoked as specified.
- 5
For each child on the
manage_children list; if the child is
already managed or it is being destroyed it is ignored, otherwise it
is marked as managed
\(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:
- 5
Calling
XtRealizeWidget on each of the previously unmanaged child that is unrealized.
- 5
Mapping each previously unmanaged child that has
map_when_managed
True .
The
XtIsManaged function returns
True if the specified widget is of class RectObj or any subclass thereof and
is managed, or
False otherwise.
"SEE ALSO"
XtMapWidget(__libmansuffix__),
XtRealizeWidget(__libmansuffix__)
\*(xT
\*(xL