head	1.14;
access;
symbols
	core-8-5-9:1.12
	core-8-5-8:1.12
	macosx-cocoa-merge:1.14
	macosx-cocoa-premerge:1.14
	macosx-carbon-freeze:1.14
	core-8-5-7:1.12
	core-8-5-6:1.12
	core-8-6-b1:1.13
	core-8-6-a3:1.13
	core-8-5-5:1.12
	core-8-6-a2:1.13
	core-8-5-4:1.12
	core-8-5-3:1.12
	core-8-6-a1:1.12
	core-8-4-19:1.6
	core-8-5-branch:1.12.0.2
	core-8-5-2:1.12
	core-8-4-18:1.6
	core-8-5-1:1.12
	core-8-4-17:1.6
	core-8-5-0:1.12
	core-8-5-b3:1.11
	core-8-5-b2:1.10
	core-8-4-16:1.6
	core-8-5-b1:1.8
	core-stablilizer-merge:1.8
	core-stabilizer-branch:1.8.0.2
	core-stabilizer-merge:1.12
	core-8-4-15:1.6
	core-8-5-a6:1.8
	core-8-5-a5:1.7
	core-8-4-14:1.6
	core-8-5-a4:1.7
	core-8-4-13:1.6
	core-8-4-12:1.6
	core-8-4-11:1.6
	core-8-5-a3:1.7
	core-8-4-10:1.6
	core-8-4-9-branch:1.6.0.6
	core-8-5-a2:1.6
	core-8-4-9:1.6
	core-8-4-8:1.6
	core-8-4-7:1.6
	core-8-5-a1:1.6
	core-8-4-6:1.6
	core-8-4-5:1.6
	mistachkin-dev-branch:1.6.0.4
	core-8-4-4:1.6
	core-8-4-3:1.6
	core-8-4-branch:1.6.0.2
	core-8-4-2:1.6
	core-8-4-1:1.6
	core-8-3-5:1.4
	core-8-4-0:1.6
	macosx-8-4-merge-2002-08-31-trunk:1.6
	macosx-8-4-premerge-2002-08-31-branch:1.5.6.1
	macosx-8-4-premerge-2002-08-31-trunk:1.6
	macosx-8-4-merge-2002-08-30-branch:1.5.6.1
	macosx-8-4-merge-2002-08-30-trunk:1.6
	macosx-8-4-merge-2002-08-20-branch:1.5.6.1
	macosx-8-4-merge-2002-08-20-trunk:1.6
	core-8-4-b2:1.6
	core-8-4-b1:1.5
	macosx-premerge-6-9-02:1.5
	core-8-4-a4:1.5
	core-8-3-4:1.4
	macosx-8-4-branch:1.5.0.6
	macosx-8-4-branchpoint:1.5
	core-8-4-a3:1.5
	core-8-3-3:1.4
	dgp-privates-into-namespace:1.5.0.4
	tclpro-1-5-0:1.4
	core-8-4-win-speedup:1.5.0.2
	core-8-4-a2:1.5
	tclpro-1-4-1:1.4
	tclpro-1-4-0:1.4
	core-8-3-2:1.4
	ajuba-ajuba2-2-1-base:1.4
	ajuba-ajuba2-2-0:1.4
	core-8-4-a1:1.4
	core-8-3-1-branch:1.4.0.12
	core-8-3-1:1.4
	scriptics-sc-2-0-b5:1.4
	scriptics-sc-2-0-fixed:1.4
	scriptics-sc-2-0-b2:1.4
	scriptics-sc-2-0-b1:1.4
	core-8-3-0:1.4
	core-8-3-b2:1.4
	core-8-3-b1:1.4
	scriptics-sc-1-1:1.4
	scriptics-sc-1-1-b1:1.4
	core-8-2-3:1.4
	scriptics-sc-1-1-branch:1.4.0.10
	scriptics-sc-1-1-base:1.4
	scriptics-sc-1-0:1.4
	scriptics-sc-1-0-branch:1.4.0.8
	scriptics-sc-1-0-base:1.4
	core-8-2-2:1.4
	core-8-2-1:1.4
	scriptics-bc-1-0-b1:1.4
	core-8-2-1-branch:1.4.0.6
	scriptics-tclpro-1-3-0:1.4
	core-8-2-0:1.4
	core-8-2-b3-branch:1.4.0.2
	core-8-2-b3-base:1.4
	scriptics-tclpro-1-3-b4:1.4
	core-8-2-b2:1.4
	scriptics-tclpro-1-3-b3:1.4
	core-8-2-b1:1.4
	scriptics-tclpro-1-3-b2:1.4
	merge-to-mainline-5/21/99:1.4
	scriptics-tclpro-1-3-b2-branch:1.4.0.4
	core-8-1-1:1.4
	scriptics-tclpro-1-3-b1:1.4
	core-8-1-1-base:1.4
	core-8-1-0:1.4
	merge-to-mainline-4-29-99:1.4
	merge-to-mainline-4-23-99:1.4
	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.2
	core-8-1-b2:1.1.4.2
	dev-8-1-stubs-branch:1.1.4.2.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.2
	core-8-0-4:1.2
	core-8-1-a2:1.1.4.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.14
date	2009.05.04.09.12.33;	author dkf;	state Exp;
branches;
next	1.13;

1.13
date	2008.06.30.22.57.01;	author dkf;	state Exp;
branches;
next	1.12;

1.12
date	2007.12.13.15.23.43;	author dgp;	state Exp;
branches;
next	1.11;

1.11
date	2007.10.29.16.04.12;	author dkf;	state Exp;
branches;
next	1.10;

1.10
date	2007.10.26.20.13.22;	author dgp;	state Exp;
branches;
next	1.9;

1.9
date	2007.10.24.14.32.56;	author dkf;	state Exp;
branches;
next	1.8;

1.8
date	2007.01.05.00.00.47;	author nijtmans;	state Exp;
branches
	1.8.2.1;
next	1.7;

1.7
date	2005.04.06.21.11.53;	author dkf;	state Exp;
branches;
next	1.6;

1.6
date	2002.08.05.04.30.38;	author dgp;	state Exp;
branches;
next	1.5;

1.5
date	2000.10.05.18.31.24;	author ericm;	state Exp;
branches
	1.5.6.1;
next	1.4;

1.4
date	99.04.21.21.53.21;	author rjohnson;	state Exp;
branches;
next	1.3;

1.3
date	99.04.16.18.26.12;	author surles;	state Exp;
branches;
next	1.2;

1.2
date	98.09.14.18.22.47;	author stanton;	state Exp;
branches
	1.2.8.1;
next	1.1;

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

1.1.4.1
date	98.09.29.00.25.08;	author stanton;	state Exp;
branches;
next	1.1.4.2;

1.1.4.2
date	98.09.30.02.15.49;	author stanton;	state Exp;
branches;
next	;

1.2.8.1
date	99.04.21.02.32.55;	author rjohnson;	state Exp;
branches;
next	;

1.5.6.1
date	2002.08.20.20.27.00;	author das;	state Exp;
branches;
next	;

1.8.2.1
date	2007.11.01.16.37.12;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.14
log
@Purge mention of interp->result. [Bug 2431507]
@
text
@'\"
'\" Copyright (c) 1990 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: CrtWindow.3,v 1.13 2008/06/30 22:57:01 dkf Exp $
'\" 
.so man.macros
.TH Tk_CreateWindow 3 4.2 Tk "Tk Library Procedures"
.BS
.SH NAME
Tk_CreateWindow, Tk_CreateWindowFromPath, Tk_DestroyWindow, Tk_MakeWindowExist \- create or delete window
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
.sp
Tk_Window
\fBTk_CreateWindow\fR(\fIinterp, parent, name, topLevScreen\fR)
.sp
Tk_Window
\fBTk_CreateAnonymousWindow\fR(\fIinterp, parent, topLevScreen\fR)
.sp
Tk_Window
\fBTk_CreateWindowFromPath\fR(\fIinterp, tkwin, pathName, topLevScreen\fR)
.sp
\fBTk_DestroyWindow\fR(\fItkwin\fR)
.sp
\fBTk_MakeWindowExist\fR(\fItkwin\fR)
.SH ARGUMENTS
.AS Tcl_Interp *topLevScreen
.AP Tcl_Interp *interp out
Tcl interpreter to use for error reporting.  If no error occurs,
then \fI*interp\fR is not modified.
.AP Tk_Window parent in
Token for the window that is to serve as the logical parent of
the new window.
.AP "const char" *name in
Name to use for this window.  Must be unique among all children of
the same \fIparent\fR.
.AP "const char" *topLevScreen in
Has same format as \fIscreenName\fR.  If NULL, then new window is
created as an internal window.  If non-NULL, new window is created as
a top-level window on screen \fItopLevScreen\fR.  If \fItopLevScreen\fR
is an empty string
.PQ ""
then new window is created as top-level window of \fIparent\fR's screen.
.AP Tk_Window tkwin in
Token for window.
.AP "const char" *pathName in
Name of new window, specified as path name within application
(e.g. \fB.a.b.c\fR).
.BE
.SH DESCRIPTION
.PP
The procedures \fBTk_CreateWindow\fR, 
\fBTk_CreateAnonymousWindow\fR, and \fBTk_CreateWindowFromPath\fR
are used to create new windows for
use in Tk-based applications.  Each of the procedures returns a token
that can be used to manipulate the window in other calls to the Tk
library.  If the window could not be created successfully, then NULL
is returned and the result of interpreter \fIinterp\fR is modified to
hold an error message.
.PP
Tk supports two different kinds of windows:  internal
windows and top-level windows.
An internal window is an interior window of a Tk application, such as a
scrollbar or menu bar or button.  A top-level window is one that is
created as a child of a screen's root window, rather than as an
interior window, but which is logically part of some existing main
window.  Examples of top-level windows are pop-up menus and dialog boxes.
.PP
New windows may be created by calling
\fBTk_CreateWindow\fR.  If the \fItopLevScreen\fR argument is
NULL, then the new window will be an internal window.  If
\fItopLevScreen\fR is non-NULL, then the new window will be a
top-level window: \fItopLevScreen\fR indicates the name of
a screen and the new window will be created as a child of the
root window of \fItopLevScreen\fR.  In either case Tk will
consider the new window to be the logical child of \fIparent\fR:
the new window's path name will reflect this fact, options may
be specified for the new window under this assumption, and so on.
The only difference is that new X window for a top-level window
will not be a child of \fIparent\fR's X window.  For example, a pull-down
menu's \fIparent\fR would be the button-like window used to invoke it,
which would in turn be a child of the menu bar window.  A dialog box might
have the application's main window as its parent.
.PP
\fBTk_CreateAnonymousWindow\fR differs from \fBTk_CreateWindow\fR in
that it creates an unnamed window.  This window will be manipulable
only using C interfaces, and will not be visible to Tcl scripts.  Both
interior windows and top-level windows may be created with
\fBTk_CreateAnonymousWindow\fR.
.PP
\fBTk_CreateWindowFromPath\fR offers an alternate way of specifying
new windows.  In \fBTk_CreateWindowFromPath\fR the new
window is specified with a token for any window in the target
application (\fItkwin\fR), plus a path name for the new window.
It produces the same effect as \fBTk_CreateWindow\fR and allows
both top-level and internal windows to be created, depending on
the value of \fItopLevScreen\fR.  In calls to \fBTk_CreateWindowFromPath\fR,
as in calls to \fBTk_CreateWindow\fR, the parent of the new window
must exist at the time of the call, but the new window must not
already exist.
.PP
The window creation procedures do not
actually issue the command to X to create a window.
Instead, they create a local data structure associated with
the window and defer the creation of the X window.
The window will actually be created by the first call to
\fBTk_MapWindow\fR.  Deferred window creation allows various
aspects of the window (such as its size, background color,
etc.) to be modified after its creation without incurring
any overhead in the X server.  When the window is finally
mapped all of the window attributes can be set while creating
the window.
.PP
The value returned by a window-creation procedure is not the
X token for the window (it cannot be, since X has not been
asked to create the window yet).  Instead, it is a token
for Tk's local data structure for the window.  Most
of the Tk library procedures take Tk_Window tokens, rather
than X identifiers.  The actual
X window identifier can be retrieved from the local
data structure using the \fBTk_WindowId\fR macro;  see
the manual entry for \fBTk_WindowId\fR for details.
.PP
\fBTk_DestroyWindow\fR deletes a window and all the data
structures associated with it, including any event handlers
created with \fBTk_CreateEventHandler\fR.  In addition,
\fBTk_DestroyWindow\fR will delete any children of \fItkwin\fR
recursively (where children are defined in the Tk sense, consisting
of all windows that were created with the given window as \fIparent\fR).
If \fItkwin\fR is an internal window, then event
handlers interested in destroy events
are invoked immediately.  If \fItkwin\fR is a top-level or main window,
then the event handlers will be invoked later, after X has seen
the request and returned an event for it.
.PP
If a window has been created
but has not been mapped, so no X window exists, it is
possible to force the creation of the X window by
calling \fBTk_MakeWindowExist\fR.  This procedure issues
the X commands to instantiate the window given by \fItkwin\fR.
.SH KEYWORDS
create, deferred creation, destroy, display, internal window,
screen, top-level window, window
@


1.13
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: CrtWindow.3,v 1.12 2007/12/13 15:23:43 dgp Exp $
d63 2
a64 2
is returned and \fIinterp->result\fR is modified to hold an error
message.
@


1.12
log
@merge stable branch onto HEAD
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: CrtWindow.3,v 1.8.2.1 2007/11/01 16:37:12 dgp Exp $
a145 1

@


1.11
log
@Lots more GOOBE stuff. Now works with 'make html'!
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: CrtWindow.3,v 1.10 2007/10/26 20:13:22 dgp Exp $
@


1.10
log
@        * doc/*.1:              Revert doc changes that broke
        * doc/*.3:              `make html` so we can get the release
        * doc/*.n:              out the door.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: CrtWindow.3,v 1.8 2007/01/05 00:00:47 nijtmans Exp $
d35 1
a35 1
then \fI*interp\fR isn't modified.
d46 3
a48 2
is an empty string (``'') then new
window is created as top-level window of \fIparent\fR's screen.
a54 1

d62 1
a62 1
library.  If the window couldn't be created successfully, then NULL
d107 1
a107 1
The window creation procedures don't
d120 1
a120 1
X token for the window (it can't be, since X hasn't been
d142 1
a142 1
but hasn't been mapped, so no X window exists, it is
@


1.9
log
@Lots of improvements to look and feel of manual pages
@
text
@d46 2
a47 3
is an empty string
.PQ ""
then new window is created as top-level window of \fIparent\fR's screen.
@


1.8
log
@various "const" additions, in line with TIP #27
fix bug #1627732
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: CrtWindow.3,v 1.7 2005/04/06 21:11:53 dkf Exp $
d46 3
a48 2
is an empty string (``'') then new
window is created as top-level window of \fIparent\fR's screen.
@


1.8.2.1
log
@merge updates from HEAD
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: CrtWindow.3,v 1.8 2007/01/05 00:00:47 nijtmans Exp $
d35 1
a35 1
then \fI*interp\fR is not modified.
d46 2
a47 3
is an empty string
.PQ ""
then new window is created as top-level window of \fIparent\fR's screen.
d54 1
d62 1
a62 1
library.  If the window could not be created successfully, then NULL
d107 1
a107 1
The window creation procedures do not
d120 1
a120 1
X token for the window (it cannot be, since X has not been
d142 1
a142 1
but has not been mapped, so no X window exists, it is
@


1.7
log
@Purge old and inaccurate .VS/.VE macros.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: CrtWindow.3,v 1.6 2002/08/05 04:30:38 dgp Exp $
d39 1
a39 1
.AP "CONST char" *name in
d42 1
a42 1
.AP "CONST char" *topLevScreen in
d50 1
a50 1
.AP "CONST char" *pathName in
@


1.6
log
@Applied companion patch for Tcl Patch 585105,
updating Tk to use Tcl 8.4's fully CONST-ified
interface, and fully CONSTifying Tk at the
same time.

This patch includes purging Tk of its last
direct access to interp->result.  [Bug 589853]

The substantial changes include copying
event sequence strings into Tcl_DStrings
in tkBind.c, and copying [text] indices into
Tcl_DStrings because parsing them involved
overwriting them.  If this causes performance
trouble, that can be resolved by further
converting them to Tcl_Obj's.

The #defines USE_NON_CONST and USE_COMPAT_CONST
have the same effect for Tk as they do for Tcl.
(They actually change tcl.h)
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: CrtWindow.3,v 1.5 2000/10/05 18:31:24 ericm Exp $
a57 1
.VS
a67 1
.VE
@


1.5
log
@* generic/tkCmds.c (Tk_WinfoObjCmd): Added check for
TK_ANONYMOUS_WINDOW flag in the [winfo children] subcommand; if
set, the window will not be printed in the list of children.

* doc/CrtWindow.3: Added entry for Tk_CreateAnonymousWindow.

* generic/tkWindow.c
(Tk_CreateAnonymousWindow): New API for creating anonymous
windows.  These windows are manipulable from C, but not from Tcl,
because they have no pathname associated with them.  They are used
initially by widgets that do rubber-band resizing (panedwindow,
multi-column listbox, etc.), and may be useful for other widgets
as well (dropbox, combobox).
(Tk_DestroyWindow): Added check for TK_ANONYMOUS_WINDOW flag when
determining whether to generate a DestroyNotify event.

* generic/tkStubInit.c:
* generic/tkDecls.h: Regen'd from tk.decls.

* generic/tk.decls: Added Tk_CreateAnonymousWindow declaration.

* generic/tk.h: Added TK_ANONYMOUS_WINDOW flag for Tk_Window's.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: CrtWindow.3,v 1.4 1999/04/21 21:53:21 rjohnson Exp $
d39 1
a39 1
.AP char *name in
d42 1
a42 1
.AP char *topLevScreen in
d50 1
a50 1
.AP char *pathName in
@


1.5.6.1
log
@merged with trunk at tag macosx-8-4-merge-2002-08-20-trunk
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id$
d39 1
a39 1
.AP "CONST char" *name in
d42 1
a42 1
.AP "CONST char" *topLevScreen in
d50 1
a50 1
.AP "CONST char" *pathName in
@


1.4
log
@
Merged 8-1-0 into mainline.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: CrtWindow.3,v 1.3 1999/04/16 18:26:12 surles Exp $
d23 3
d57 1
a57 1
The procedures \fBTk_CreateWindow\fR
d59 1
a59 1
and \fBTk_CreateWindowFromPath\fR
d91 6
@


1.3
log
@fixed Tk doc bugs
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: CrtWindow.3,v 1.2 1998/09/14 18:22:47 stanton Exp $
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id$
d128 1
a128 1
If \fItkwin\fR was created by \fBTk_CreateInternalWindow\fR then event
@


1.2.8.1
log
@
Merged with mainline.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: CrtWindow.3,v 1.3 1999/04/16 18:26:12 surles Exp $
d128 1
a128 1
If \fItkwin\fR is an internal window, then event
@


1.1
log
@Initial revision
@
text
@d8 1
a8 1
'\" @@(#) CrtWindow.c 1.21 96/11/01 09:42:20
@


1.1.4.1
log
@initial tk8.1a2 version
@
text
@d8 1
a8 1
'\" @@(#) CrtWindow.3 1.21 96/11/01 09:42:20
@


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


