xenocara/lib/libXt/man/XtManageChildren.man

264 lines
8.2 KiB
Groff
Raw Normal View History

2006-11-25 11:01:46 -07:00
.\" 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.
.\"
.ds tk X Toolkit
.ds xT X Toolkit Intrinsics \- C Language Interface
.ds xI Intrinsics
.ds xW X Toolkit Athena Widgets \- C Language Interface
.ds xL Xlib \- C Language X Interface
.ds xC Inter-Client Communication Conventions Manual
.ds Rn 3
.ds Vn 2.2
2020-01-14 13:48:59 -07:00
.hw XtManage-Children XtManage-Child XtUnmanage-Children XtUnmanage-Child
.hw XtChange-ManagedSet XtIs-Managed wid-get
2006-11-25 11:01:46 -07:00
.na
.TH XtManageChildren __libmansuffix__ __xorgversion__ "XT FUNCTIONS"
.SH NAME
XtManageChildren, XtManageChild, XtUnmanageChildren, XtUnmanageChild, XtChangeManagedSet, XtIsManaged \- manage and unmanage children
.SH SYNTAX
2020-01-14 13:48:59 -07:00
#include <X11/Intrinsic.h>
.HP
2006-11-25 11:01:46 -07:00
typedef Widget *WidgetList;
.HP
void XtManageChildren(WidgetList \fIchildren\fP, Cardinal \fInum_children\fP);
.HP
2012-03-10 09:45:48 -07:00
void XtManageChild(Widget \fIchild\fP);
2006-11-25 11:01:46 -07:00
.HP
void XtUnmanageChildren(WidgetList \fIchildren\fP, Cardinal
2012-03-10 09:45:48 -07:00
\fInum_children\fP);
2006-11-25 11:01:46 -07:00
.HP
2012-03-10 09:45:48 -07:00
void XtUnmanageChild(Widget \fIchild\fP);
2006-11-25 11:01:46 -07:00
.HP
2012-03-10 09:45:48 -07:00
void XtChangeManagedSet(WidgetList \fIunmanage_children\fP,
2006-11-25 11:01:46 -07:00
Cardinal \fInum_unmanage_children\fP, XtDoChangeProc \fIdo_change_proc\fP,
2012-03-10 09:45:48 -07:00
XtPointer \fIclient_data\fP, WidgetList \fImanage_children\fP,
Cardinal \fInum_manage_children\fP);
2006-11-25 11:01:46 -07:00
.HP
2012-03-10 09:45:48 -07:00
Boolean XtIsManaged(Widget \fIwidget\fP);
2006-11-25 11:01:46 -07:00
.SH ARGUMENTS
.IP \fIchild\fP 1i
Specifies the child.
.IP \fIchildren\fP 1i
Specifies a list of child widgets.
.IP \fInum_children\fP 1i
Specifies the number of children.
.IP \fIwidget\fP 1i
Specifies the widget.
.IP \fImanage_children\fP 1i
Specifies the list of widget children to add to the managed set.
.IP \fInum_manage_children\fP 1i
Specifies the number of entries in the manage_children list.
.IP \fIunmanage_children\fP 1i
Specifies the list of widget children to remove from the managed set.
.IP \fInum_unmanage_children\fP 1i
Specifies the number of entries in the unmanage_children list.
.IP \fIdo_change_proc\fP 1i
Specifies the post unmanage, pre manage hook procedure to invoke.
.IP \fIclient_data\fP 1i
Specifies the client data to be passed to the hook procedure.
.SH DESCRIPTION
The
2020-01-14 13:48:59 -07:00
.B XtManageChildren
2006-11-25 11:01:46 -07:00
function performs the following:
.IP \(bu 5
Issues an error if the children do not all have the same parent or
2012-03-10 09:45:48 -07:00
if the parent is not a subclass of
2020-01-14 13:48:59 -07:00
.BR compositeWidgetClass .
2006-11-25 11:01:46 -07:00
.IP \(bu 5
Returns immediately if the common parent is being destroyed;
otherwise, for each unique child on the list,
2020-01-14 13:48:59 -07:00
.B XtManageChildren
2006-11-25 11:01:46 -07:00
ignores the child if it already is managed or is being destroyed
and marks it if not.
.IP \(bu 5
If the parent is realized and after all children have been marked,
it makes some of the newly managed children viewable:
.RS
.IP \- 5
Calls the change_managed routine of the widgets' parent.
.IP \- 5
Calls
2020-01-14 13:48:59 -07:00
.B XtRealizeWidget
2006-11-25 11:01:46 -07:00
on each previously unmanaged child that is unrealized.
.IP \- 5
2012-03-10 09:45:48 -07:00
Maps each previously unmanaged child that has map_when_managed
2020-01-14 13:48:59 -07:00
.BR True .
2006-11-25 11:01:46 -07:00
.RE
.LP
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
2020-01-14 13:48:59 -07:00
.B True
2006-11-25 11:01:46 -07:00
and should ignore all other children.
Note that some composite widgets, especially fixed boxes, call
2020-01-14 13:48:59 -07:00
.B XtManageChild
2006-11-25 11:01:46 -07:00
from their insert_child procedure.
.LP
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.
2012-03-10 09:45:48 -07:00
It moves each child as needed by calling
2020-01-14 13:48:59 -07:00
.BR XtMoveWidget ,
2006-11-25 11:01:46 -07:00
which first updates the x and y fields and then calls
2020-01-14 13:48:59 -07:00
.B XMoveWindow
2006-11-25 11:01:46 -07:00
if the widget is realized.
.LP
The
2020-01-14 13:48:59 -07:00
.B XtManageChild
2006-11-25 11:01:46 -07:00
function constructs a
2020-01-14 13:48:59 -07:00
.B WidgetList
2006-11-25 11:01:46 -07:00
of length one and calls
2020-01-14 13:48:59 -07:00
.BR XtManageChildren .
2006-11-25 11:01:46 -07:00
.LP
The
2020-01-14 13:48:59 -07:00
.B XtUnmanageChildren
2006-11-25 11:01:46 -07:00
function performs the following:
.IP \(bu 5
Issues an error if the children do not all have the same parent
2012-03-10 09:45:48 -07:00
or if the parent is not a subclass of
2020-01-14 13:48:59 -07:00
.BR compositeWidgetClass .
2006-11-25 11:01:46 -07:00
.IP \(bu 5
Returns immediately if the common parent is being destroyed;
2012-03-10 09:45:48 -07:00
otherwise, for each unique child on the list,
2020-01-14 13:48:59 -07:00
.B XtUnmanageChildren
2006-11-25 11:01:46 -07:00
performs the following:
.RS
.IP \- 5
Ignores the child if it already is unmanaged or is being destroyed
and marks it if not.
.IP \- 5
If the child is realized,
it makes it nonvisible by unmapping it.
.RE
.IP \(bu 5
Calls the change_managed routine of the widgets' parent
after all children have been marked
if the parent is realized.
.LP
2020-01-14 13:48:59 -07:00
.B XtUnmanageChildren
2006-11-25 11:01:46 -07:00
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.
.LP
The
2020-01-14 13:48:59 -07:00
.B XtUnmanageChild
2006-11-25 11:01:46 -07:00
function constructs a widget list
of length one and calls
2020-01-14 13:48:59 -07:00
.BR XtUnmanageChildren .
2006-11-25 11:01:46 -07:00
.LP
The
2020-01-14 13:48:59 -07:00
.B XtChangeManagedSet
2006-11-25 11:01:46 -07:00
function performs the following:
.IP \(bu 5
Issues an error if the widgets specified in the \fImanage_children\fP
and the \fIunmanage_children\fP lists to no all have the same parent, or
if that parent is not a subclass of compositeWidgetClass.
.IP \(bu 5
Returns immediately if the common parent is being destroyed.
.IP \(bu 5
If no
2020-01-14 13:48:59 -07:00
.B CompositeClassExtension
2006-11-25 11:01:46 -07:00
is defined, or a
2020-01-14 13:48:59 -07:00
.B CompositeClassExtension
2006-11-25 11:01:46 -07:00
is defined but with an \fIallows_change_managed_set\fP field with a
value of
2020-01-14 13:48:59 -07:00
.BR False ,
2006-11-25 11:01:46 -07:00
and
2020-01-14 13:48:59 -07:00
.B XtChangeManagedSet
2012-03-10 09:45:48 -07:00
was invoked with a non-NULL \fIdo_change_proc\fP procedure
2006-11-25 11:01:46 -07:00
then
2020-01-14 13:48:59 -07:00
.B XtChangeManagedSet
2006-11-25 11:01:46 -07:00
performs the following:
.RS
.IP \- 5
Calls
2020-01-14 13:48:59 -07:00
.B XtUnmanageChildren
2006-11-25 11:01:46 -07:00
(\fIunmanage_children\fP, \fInum_unmanage_children\fP).
.IP \- 5
Calls the \fIdo_change_proc\fP specified.
.IP \- 5
Calls
2020-01-14 13:48:59 -07:00
.B XtManageChildren
2006-11-25 11:01:46 -07:00
(\fImanage_children\fP, \fInum_manage_children\fP) and then returns
immediately.
.RE
.IP \(bu 5
Otherwise, if a
2020-01-14 13:48:59 -07:00
.B CompositeClassExtension
2006-11-25 11:01:46 -07:00
is defined with an \fIallows_change_managed_set\fP field with a value of
2020-01-14 13:48:59 -07:00
.BR True ,
2006-11-25 11:01:46 -07:00
or if no
2020-01-14 13:48:59 -07:00
.B CompositeClassExtension
2006-11-25 11:01:46 -07:00
is defined, and
2020-01-14 13:48:59 -07:00
.B XtChangeManagedSet
was invoked with a NULL \fIdo_change_proc\fP procedure, then the following is
2006-11-25 11:01:46 -07:00
performed:
.RS
.IP \- 5
For each child on the \fIunmanage_children\fP 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.
.IP \- 5
If the \fIdo_change_proc\fP procedure is non-NULL then
it is invoked as specified.
.IP \- 5
For each child on the \fImanage_children\fP list; if the child is
already managed or it is being destroyed it is ignored, otherwise it
is marked as managed
.RE
.IP \(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:
.RS
.IP \- 5
Calling
2020-01-14 13:48:59 -07:00
.B XtRealizeWidget
2006-11-25 11:01:46 -07:00
on each of the previously unmanaged child that is unrealized.
.IP \- 5
Mapping each previously unmanaged child that has \fImap_when_managed\fP
2020-01-14 13:48:59 -07:00
.BR True .
2006-11-25 11:01:46 -07:00
.RE
.LP
The
2020-01-14 13:48:59 -07:00
.B XtIsManaged
2006-11-25 11:01:46 -07:00
function returns
2020-01-14 13:48:59 -07:00
.B True
2006-11-25 11:01:46 -07:00
if the specified widget is of class RectObj or any subclass thereof and
is managed, or
2020-01-14 13:48:59 -07:00
.B False
2006-11-25 11:01:46 -07:00
otherwise.
.SH "SEE ALSO"
2011-09-10 03:36:19 -06:00
XtMapWidget(__libmansuffix__),
XtRealizeWidget(__libmansuffix__)
2006-11-25 11:01:46 -07:00
.br
\fI\*(xT\fP
.br
\fI\*(xL\fP