head	1.6;
access;
symbols
	core-8-5-9:1.5
	core-8-5-8:1.5
	macosx-cocoa-merge:1.6
	macosx-cocoa-premerge:1.6
	macosx-carbon-freeze:1.6
	core-8-5-7:1.5
	core-8-5-6:1.5
	core-8-6-b1:1.6
	core-8-6-a3:1.6
	core-8-5-5:1.5
	core-8-6-a2:1.6
	core-8-5-4:1.5
	core-8-5-3:1.5
	core-8-6-a1:1.5
	core-8-4-19:1.3
	core-8-5-branch:1.5.0.2
	core-8-5-2:1.5
	core-8-4-18:1.3
	core-8-5-1:1.5
	core-8-4-17:1.3
	core-8-5-0:1.5
	core-8-5-b3:1.4
	core-8-5-b2:1.3
	core-8-4-16:1.3
	core-8-5-b1:1.3
	core-stablilizer-merge:1.3
	core-stabilizer-branch:1.3.0.14
	core-stabilizer-merge:1.5
	core-8-4-15:1.3
	core-8-5-a6:1.3
	core-8-5-a5:1.3
	core-8-4-14:1.3
	core-8-5-a4:1.3
	core-8-4-13:1.3
	core-8-4-12:1.3
	core-8-4-11:1.3
	core-8-5-a3:1.3
	core-8-4-10:1.3
	core-8-4-9-branch:1.3.0.12
	core-8-5-a2:1.3
	core-8-4-9:1.3
	core-8-4-8:1.3
	core-8-4-7:1.3
	core-8-5-a1:1.3
	core-8-4-6:1.3
	core-8-4-5:1.3
	mistachkin-dev-branch:1.3.0.10
	core-8-4-4:1.3
	core-8-4-3:1.3
	core-8-4-branch:1.3.0.8
	core-8-4-2:1.3
	core-8-4-1:1.3
	core-8-3-5:1.2.18.1
	core-8-4-0:1.3
	macosx-8-4-merge-2002-08-31-trunk:1.3
	macosx-8-4-premerge-2002-08-31-branch:1.3
	macosx-8-4-premerge-2002-08-31-trunk:1.3
	macosx-8-4-merge-2002-08-30-branch:1.3
	macosx-8-4-merge-2002-08-30-trunk:1.3
	macosx-8-4-merge-2002-08-20-branch:1.3
	macosx-8-4-merge-2002-08-20-trunk:1.3
	core-8-4-b2:1.3
	core-8-4-b1:1.3
	macosx-premerge-6-9-02:1.3
	core-8-4-a4:1.3
	core-8-3-4:1.2.18.1
	macosx-8-4-branch:1.3.0.6
	macosx-8-4-branchpoint:1.3
	core-8-4-a3:1.3
	core-8-3-3:1.2.18.1
	dgp-privates-into-namespace:1.3.0.4
	tclpro-1-5-0:1.2
	core-8-4-win-speedup:1.3.0.2
	core-8-4-a2:1.3
	tclpro-1-4-1:1.2
	tclpro-1-4-0:1.2
	core-8-3-2:1.2
	ajuba-ajuba2-2-1-base:1.2
	ajuba-ajuba2-2-0:1.2
	core-8-4-a1:1.2
	core-8-3-1-branch:1.2.0.18
	core-8-3-1:1.2
	scriptics-sc-2-0-b5:1.2
	scriptics-sc-2-0-fixed:1.2
	scriptics-sc-2-0-b2:1.2
	scriptics-sc-2-0-b1:1.2
	core-8-3-0:1.2
	core-8-3-b2:1.2
	core-8-3-b1:1.2
	scriptics-sc-1-1:1.2
	scriptics-sc-1-1-b1:1.2
	core-8-2-3:1.2
	scriptics-sc-1-1-branch:1.2.0.16
	scriptics-sc-1-1-base:1.2
	scriptics-sc-1-0:1.2
	scriptics-sc-1-0-branch:1.2.0.14
	scriptics-sc-1-0-base:1.2
	core-8-2-2:1.2
	core-8-2-1:1.2
	scriptics-bc-1-0-b1:1.2
	core-8-2-1-branch:1.2.0.12
	scriptics-tclpro-1-3-0:1.2
	core-8-2-0:1.2
	core-8-2-b3-branch:1.2.0.10
	core-8-2-b3-base:1.2
	scriptics-tclpro-1-3-b4:1.2
	core-8-2-b2:1.2
	scriptics-tclpro-1-3-b3:1.2
	core-8-2-b1:1.2
	scriptics-tclpro-1-3-b2:1.2
	merge-to-mainline-5/21/99:1.2
	scriptics-tclpro-1-3-b2-branch:1.2.0.8
	core-8-1-1:1.2
	scriptics-tclpro-1-3-b1:1.2
	core-8-1-1-base:1.2
	core-8-1-0:1.2
	merge-to-mainline-4-29-99:1.2
	merge-to-mainline-4-23-99:1.2
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.2.0.6
	core-8-0-6-base:1.2
	core-8-0-5:1.2
	core-8-1-b3:1.1.4.1
	core-8-1-b2:1.1.4.1
	dev-8-1-stubs-branch:1.1.4.1.0.2
	dev-stubs-branch:1.2.0.4
	scriptics-tclpro-1-2:1.2
	scriptics-tclpro-1-2-b2:1.2
	core-8-1-merge-2/10/99:1.2
	core-8-0-5-branch:1.2.0.2
	core-8-0-5-base:1.2
	scriptics-tclpro-1-2-b1:1.2
	scriptics-tclpro-1-2-a1:1.2
	core-8-1-b1:1.1.4.1
	core-8-0-4:1.2
	core-8-1-a2:1.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.6
date	2008.06.30.22.57.01;	author dkf;	state Exp;
branches;
next	1.5;

1.5
date	2007.12.13.15.23.43;	author dgp;	state Exp;
branches;
next	1.4;

1.4
date	2007.10.29.16.04.12;	author dkf;	state Exp;
branches;
next	1.3;

1.3
date	2000.10.05.00.50.00;	author ericm;	state Exp;
branches
	1.3.14.1;
next	1.2;

1.2
date	98.09.14.18.22.52;	author stanton;	state Exp;
branches
	1.2.18.1;
next	1.1;

1.1
date	98.04.01.09.40.09;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.30.02.16.02;	author stanton;	state Exp;
branches;
next	;

1.2.18.1
date	2001.04.04.07.23.48;	author hobbs;	state Exp;
branches;
next	;

1.3.14.1
date	2007.11.01.16.37.13;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.6
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @@(#) $Id: MaintGeom.3,v 1.5 2007/12/13 15:23:43 dgp Exp $
'\" 
.so man.macros
.TH Tk_MaintainGeometry 3 4.0 Tk "Tk Library Procedures"
.BS
.SH NAME
Tk_MaintainGeometry, Tk_UnmaintainGeometry \- maintain geometry of one window relative to another
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
.sp
\fBTk_MaintainGeometry\fR(\fIslave, master, x, y, width, height\fR)
.sp
\fBTk_UnmaintainGeometry\fR(\fIslave, master\fR)
.SH ARGUMENTS
.AS Tk_Window master
.AP Tk_Window slave in
Window whose geometry is to be controlled.
.AP Tk_Window master in
Window relative to which \fIslave\fR's geometry will be controlled.
.AP int x in
Desired x-coordinate of \fIslave\fR in \fImaster\fR, measured in pixels
from the inside of \fImaster\fR's left border to the outside of
\fIslave\fR's left border.
.AP int y in
Desired y-coordinate of \fIslave\fR in \fImaster\fR, measured in pixels
from the inside of \fImaster\fR's top border to the outside of
\fIslave\fR's top border.
.AP int width in
Desired width for \fIslave\fR, in pixels.
.AP int height in
Desired height for \fIslave\fR, in pixels.
.BE
.SH DESCRIPTION
.PP
\fBTk_MaintainGeometry\fR and \fBTk_UnmaintainGeometry\fR make it
easier for geometry managers to deal with slaves whose masters are not
their parents.
Three problems arise if the master for a slave is not its parent:
.IP [1]
The x- and y-position of the slave must be translated from the
coordinate system of the master to that of the parent before
positioning the slave.
.IP [2]
If the master window, or any of its ancestors up to the slave's
parent, is moved, then the slave must be repositioned within its
parent in order to maintain the correct position relative to the
master.
.IP [3]
If the master or one of its ancestors is mapped or unmapped, then
the slave must be mapped or unmapped to correspond.
.LP
None of these problems is an issue if the parent and master are
the same.  For example, if the master or one of its ancestors
is unmapped, the slave is automatically removed by the screen
by X.
.PP
\fBTk_MaintainGeometry\fR deals with these problems for slaves
whose masters are not their parents, as well as handling the simpler
case of slaves whose masters are their parents.
\fBTk_MaintainGeometry\fR is typically called by a window manager
once it has decided where a slave should be positioned relative
to its master.
\fBTk_MaintainGeometry\fR translates the coordinates to the
coordinate system of \fIslave\fR's parent and then moves and
resizes the slave appropriately.
Furthermore, it remembers the desired position and creates event
handlers to monitor the master and all of its ancestors up
to (but not including) the slave's parent.
If any of these windows is moved, mapped, or unmapped,
the slave will be adjusted so that it is mapped only when the
master is mapped and its geometry relative to the master
remains as specified by \fIx\fR, \fIy\fR, \fIwidth\fR, and
\fIheight\fR.
.PP
When a window manager relinquishes control over a window, or
if it decides that it does not want the window to appear on the
screen under any conditions, it calls \fBTk_UnmaintainGeometry\fR.
\fBTk_UnmaintainGeometry\fR unmaps the window and cancels any
previous calls to \fBTk_MaintainGeometry\fR for the
\fImaster\fR\-\fIslave\fR pair, so that the slave's
geometry and mapped state are no longer maintained
automatically.
\fBTk_UnmaintainGeometry\fR need not be called by a geometry
manager if the slave, the master, or any of the master's ancestors
is destroyed:  Tk will call it automatically.
.PP
If \fBTk_MaintainGeometry\fR is called repeatedly for the same
\fImaster\fR\-\fIslave\fR pair, the information from the most
recent call supersedes any older information.
If \fBTk_UnmaintainGeometry\fR is called for a \fImaster\fR\-\fIslave\fR
pair that is is not currently managed, the call has no effect.
.SH KEYWORDS
geometry manager, map, master, parent, position, slave, unmap
@


1.5
log
@merge stable branch onto HEAD
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: MaintGeom.3,v 1.3.14.1 2007/11/01 16:37:13 dgp Exp $
a40 1

@


1.4
log
@Lots more GOOBE stuff. Now works with 'make html'!
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: MaintGeom.3,v 1.3 2000/10/05 00:50:00 ericm Exp $
@


1.3
log
@* doc/MaintGeom.3: Noted that Tk_MaintainGeometry handles direct
descendants properly.

* generic/tkGeometry.c (Tk_MaintainGeometry): Added a check for
the case in which the slave window is a direct descendant of the
master window.  In this case, we need not set up the additional
infrastructure normally provide by Tk_MaintainGeometry, because we
can rely on the parent/child relationship to handle it for us
implicitly.  In this case, Tk_MaintainGeometry just calls directly
to Tk_MoveResizeWindow.  This allows geometry managers to simply
always use Tk_MaintainGeometry to maintain geometry for slaves,
and avoid doing the direct descendant check themselves.
(Tk_UnmaintainGeometry): Added a matching check for the direct
descendant case; in this case, Tk_UnmaintainGeometry simply
returns immediately.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: MaintGeom.3,v 1.2 1998/09/14 18:22:52 stanton Exp $
d67 1
a67 1
whose masters aren't their parents, as well as handling the simpler
d100 1
a100 2
pair that is isn't currently managed, the call has no effect.

@


1.3.14.1
log
@merge updates from HEAD
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: MaintGeom.3,v 1.3 2000/10/05 00:50:00 ericm Exp $
d67 1
a67 1
whose masters are not their parents, as well as handling the simpler
d100 2
a101 1
pair that is is not currently managed, the call has no effect.
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id$
d67 2
a68 1
whose masters aren't their parents.
@


1.2.18.1
log
@doc cleanup and clarifications from 8.4aCVS backport
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: MaintGeom.3,v 1.3 2000/10/05 00:50:00 ericm Exp $
d67 1
a67 2
whose masters aren't their parents, as well as handling the simpler
case of slaves whose masters are their parents.
@


1.1
log
@Initial revision
@
text
@d8 1
a8 1
'\" SCCS: @@(#) MaintGeom.3 1.7 96/03/26 18:15:30
@


1.1.4.1
log
@Merged 8.0.3 changes into 8.1
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: MaintGeom.3,v 1.2 1998/09/14 18:22:52 stanton Exp $
@


