Compare commits
2 Commits
tk-8.6.10.
...
tk-8.5.15.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27e7dfc7da | ||
|
|
4b29e0458f |
@@ -5218,7 +5218,7 @@
|
||||
2000-05-31 Eric Melski <ericm@scriptics.com>
|
||||
|
||||
* library/bgerror.tcl: Improved bgerror based on work by Donal
|
||||
K. Fellows; no longer dependent on tk_dialog; features a
|
||||
K. Fellows; no longer dependant on tk_dialog; features a
|
||||
Windows-esque "Details" button, and a customizable extra function
|
||||
button that allows the user to (for example) save the stack trace
|
||||
to a file.
|
||||
|
||||
5283
ChangeLog.2007
5283
ChangeLog.2007
File diff suppressed because it is too large
Load Diff
@@ -1,37 +1,41 @@
|
||||
# README: Tk
|
||||
README: Tk
|
||||
This is the Tk 8.5.15 source distribution.
|
||||
http://sourceforge.net/projects/tcl/files/Tcl/
|
||||
You can get any source release of Tk from the URL above.
|
||||
|
||||
This is the **Tk 8.6.10** source distribution.
|
||||
|
||||
You can get any source release of Tk from [our distribution
|
||||
site](https://sourceforge.net/projects/tcl/files/Tcl/).
|
||||
|
||||
|
||||
## <a id="intro">1.</a> Introduction
|
||||
1. Introduction
|
||||
---------------
|
||||
|
||||
This directory contains the sources and documentation for Tk, a
|
||||
cross-platform GUI toolkit implemented with the Tcl scripting language.
|
||||
|
||||
For details on features, incompatibilities, and potential problems with
|
||||
this release, see [the Tcl/Tk 8.6 Web page](https://www.tcl.tk/software/tcltk/8.6.html)
|
||||
this release, see the Tcl/Tk 8.5 Web page at
|
||||
|
||||
http://www.tcl.tk/software/tcltk/8.5.html
|
||||
|
||||
or refer to the "changes" file in this directory, which contains a
|
||||
historical record of all changes to Tk.
|
||||
|
||||
Tk is maintained, enhanced, and distributed freely by the Tcl community.
|
||||
Source code development and tracking of bug reports and feature requests
|
||||
takes place at [core.tcl-lang.org](https://core.tcl-lang.org/).
|
||||
Tcl/Tk release and mailing list services are [hosted by
|
||||
SourceForge](https://sourceforge.net/projects/tcl/)
|
||||
with the Tcl Developer Xchange hosted at
|
||||
[www.tcl-lang.org](https://www.tcl-lang.org).
|
||||
takes place at:
|
||||
|
||||
http://core.tcl.tk/tk/
|
||||
|
||||
with the Tcl Developer Xchange at:
|
||||
|
||||
http://www.tcl.tk/
|
||||
|
||||
Tk is a freely available open source package. You can do virtually
|
||||
anything you like with it, such as modifying it, redistributing it,
|
||||
and selling it either in whole or in part. See the file
|
||||
`license.terms` for complete information.
|
||||
"license.terms" for complete information.
|
||||
|
||||
## <a id="tcl">2.</a> See Tcl README.md
|
||||
2. See Tcl README
|
||||
-----------------
|
||||
|
||||
Please see the README.md file that comes with the associated Tcl release
|
||||
Please see the README file that comes with the associated Tcl release
|
||||
for more information. There are pointers there to extensive
|
||||
documentation. In addition, there are additional README files
|
||||
in the subdirectories of this distribution.
|
||||
@@ -1,8 +1,7 @@
|
||||
This software is copyrighted by the Regents of the University of
|
||||
California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
|
||||
Corporation, Apple Inc. and other parties. The following terms apply to
|
||||
all files associated with the software unless explicitly disclaimed in
|
||||
individual files.
|
||||
California, Sun Microsystems, Inc., and other parties. The following
|
||||
terms apply to all files associated with the software unless explicitly
|
||||
disclaimed in individual files.
|
||||
|
||||
The authors hereby grant permission to use, copy, modify, distribute,
|
||||
and license this software and its documentation for any purpose, provided
|
||||
|
||||
22
compat/limits.h
Normal file
22
compat/limits.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* limits.h --
|
||||
*
|
||||
* This is a dummy header file to #include in Tcl when there
|
||||
* is no limits.h in /usr/include. There are only a few
|
||||
* definitions here; also see tclPort.h, which already
|
||||
* #defines some of the things here if they're not arleady
|
||||
* defined.
|
||||
*
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
* Copyright (c) 1994 Sun Microsystems, Inc.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*/
|
||||
|
||||
#define LONG_MIN 0x80000000
|
||||
#define LONG_MAX 0x7fffffff
|
||||
#define INT_MIN 0x80000000
|
||||
#define INT_MAX 0x7fffffff
|
||||
#define SHRT_MIN 0x8000
|
||||
#define SHRT_MAX 0x7fff
|
||||
@@ -29,6 +29,7 @@ extern char * malloc(unsigned int numBytes);
|
||||
extern void qsort(void *base, int n, int size, int (*compar)(
|
||||
const void *element1, const void *element2));
|
||||
extern char * realloc(char *ptr, unsigned int numBytes);
|
||||
extern double strtod(const char *string, char **endPtr);
|
||||
extern long strtol(const char *string, char **endPtr, int base);
|
||||
extern unsigned long strtoul(const char *string, char **endPtr, int base);
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_Alloc3DBorderFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_Alloc3DBorderFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_Alloc3DBorderFromObj, Tk_Get3DBorder, Tk_Get3DBorderFromObj, Tk_Draw3DRectangle, Tk_Fill3DRectangle, Tk_Draw3DPolygon, Tk_Fill3DPolygon, Tk_3DVerticalBevel, Tk_3DHorizontalBevel, Tk_SetBackgroundFromBorder, Tk_NameOf3DBorder, Tk_3DBorderColor, Tk_3DBorderGC, Tk_Free3DBorderFromObj, Tk_Free3DBorder \- draw borders with three-dimensional appearance
|
||||
@@ -64,12 +64,12 @@ Interpreter to use for error reporting.
|
||||
Token for window (for all procedures except \fBTk_Get3DBorder\fR,
|
||||
must be the window for which the border was allocated).
|
||||
.AP Tcl_Obj *objPtr in
|
||||
Pointer to value whose value describes color corresponding to
|
||||
Pointer to object whose value describes color corresponding to
|
||||
background (flat areas). Illuminated edges will be brighter than
|
||||
this and shadowed edges will be darker than this.
|
||||
.AP char *colorName in
|
||||
Same as \fIobjPtr\fR except value is supplied as a string rather
|
||||
than a value.
|
||||
than an object.
|
||||
.AP Drawable drawable in
|
||||
X token for window or pixmap; indicates where graphics are to be drawn.
|
||||
Must either be the X window for \fItkwin\fR or a pixmap with the
|
||||
@@ -91,7 +91,7 @@ Width of border in pixels. Positive means border is inside rectangle
|
||||
given by \fIx\fR, \fIy\fR, \fIwidth\fR, \fIheight\fR, negative means
|
||||
border is outside rectangle.
|
||||
.AP int relief in
|
||||
Indicates 3-D position of interior of value relative to exterior;
|
||||
Indicates 3-D position of interior of object relative to exterior;
|
||||
should be \fBTK_RELIEF_RAISED\fR, \fBTK_RELIEF_SUNKEN\fR, \fBTK_RELIEF_GROOVE\fR,
|
||||
\fBTK_RELIEF_SOLID\fR, or \fBTK_RELIEF_RIDGE\fR (may also be \fBTK_RELIEF_FLAT\fR
|
||||
for \fBTk_Fill3DRectangle\fR).
|
||||
@@ -114,7 +114,7 @@ should appear higher;
|
||||
For \fBTk_Fill3DPolygon\fR, \fBTK_RELIEF_FLAT\fR may also be specified to
|
||||
indicate no difference in height.
|
||||
.AP int leftBevel in
|
||||
Non-zero means this bevel forms the left side of the value; zero means
|
||||
Non-zero means this bevel forms the left side of the object; zero means
|
||||
it forms the right side.
|
||||
.AP int leftIn in
|
||||
Non-zero means that the left edge of the horizontal bevel angles in,
|
||||
@@ -128,12 +128,13 @@ so that the bottom of the edge is farther to the left than the top.
|
||||
Zero means the edge angles out, so that the bottom is farther to the
|
||||
right than the top.
|
||||
.AP int topBevel in
|
||||
Non-zero means this bevel forms the top side of the value; zero means
|
||||
Non-zero means this bevel forms the top side of the object; zero means
|
||||
it forms the bottom side.
|
||||
.AP int which in
|
||||
Specifies which of the border's graphics contexts is desired.
|
||||
Must be \fBTK_3D_FLAT_GC\fR, \fBTK_3D_LIGHT_GC\fR, or \fBTK_3D_DARK_GC\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures provide facilities for drawing window borders in a
|
||||
@@ -152,15 +153,14 @@ darker than \fIobjPtr\fR.
|
||||
\fBTk_Alloc3DBorderFromObj\fR returns a token that may be used in later calls
|
||||
to \fBTk_Draw3DRectangle\fR. If an error occurs in allocating information
|
||||
for the border (e.g. a bogus color name was given)
|
||||
then NULL is returned and an error message is left as the result of
|
||||
interpreter \fIinterp\fR.
|
||||
then NULL is returned and an error message is left in \fIinterp->result\fR.
|
||||
If it returns successfully, \fBTk_Alloc3DBorderFromObj\fR caches
|
||||
information about the return value in \fIobjPtr\fR, which speeds up
|
||||
future calls to \fBTk_Alloc3DBorderFromObj\fR with the same \fIobjPtr\fR
|
||||
and \fItkwin\fR.
|
||||
.PP
|
||||
\fBTk_Get3DBorder\fR is identical to \fBTk_Alloc3DBorderFromObj\fR except
|
||||
that the color is specified with a string instead of a value. This
|
||||
that the color is specified with a string instead of an object. This
|
||||
prevents \fBTk_Get3DBorder\fR from caching the return value, so
|
||||
\fBTk_Get3DBorder\fR is less efficient than \fBTk_Alloc3DBorderFromObj\fR.
|
||||
.PP
|
||||
@@ -238,8 +238,8 @@ arguments that describe the rectangular area of the beveled edge
|
||||
The \fIleftBorder\fR and \fItopBorder\fR arguments indicate the
|
||||
position of the border relative to the
|
||||
.QW inside
|
||||
of the value, and
|
||||
\fIrelief\fR indicates the relief of the inside of the value relative
|
||||
of the object, and
|
||||
\fIrelief\fR indicates the relief of the inside of the object relative
|
||||
to the outside.
|
||||
\fBTk_3DVerticalBevel\fR just draws a rectangular region.
|
||||
\fBTk_3DHorizontalBevel\fR draws a trapezoidal region to generate
|
||||
@@ -290,5 +290,6 @@ with the Tk_3DBorder token for the border.
|
||||
There should be exactly one call to \fBTk_Free3DBorderFromObj\fR or
|
||||
\fBTk_Free3DBorder\fR for each call to \fBTk_Alloc3DBorderFromObj\fR
|
||||
or \fBTk_Get3DBorder\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
3D, background, border, color, depressed, illumination, value, polygon, raised, shadow, three-dimensional effect
|
||||
3D, background, border, color, depressed, illumination, object, polygon, raised, shadow, three-dimensional effect
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
|
||||
'\" All rights reserved.
|
||||
'\"
|
||||
.TH Tk_AddOption 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_AddOption 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_AddOption \- Add an option to the option database
|
||||
@@ -23,6 +23,7 @@ Value of option.
|
||||
.AP int priority in
|
||||
Overall priority level to use for option.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
This procedure is invoked to add an option to the database
|
||||
@@ -46,5 +47,6 @@ user-specific startup files.
|
||||
.IP 80
|
||||
Used for options specified interactively after the application starts
|
||||
running.
|
||||
|
||||
.SH KEYWORDS
|
||||
class, name, option, add
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CreateBindingTable 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CreateBindingTable 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CreateBindingTable, Tk_DeleteBindingTable, Tk_CreateBinding, Tk_DeleteBinding, Tk_GetBinding, Tk_GetAllBindings, Tk_DeleteAllBindings, Tk_BindEvent \- invoke scripts in response to X events
|
||||
@@ -45,7 +45,7 @@ call to \fBTk_CreateBindingTable\fR.
|
||||
Identifies object with which binding is associated.
|
||||
.AP "const char" *eventString in
|
||||
String describing event sequence.
|
||||
.AP "const char" *script in
|
||||
.AP char *script in
|
||||
Tcl script to invoke when binding triggers.
|
||||
.AP int append in
|
||||
Non-zero means append \fIscript\fR to existing script for binding,
|
||||
@@ -61,6 +61,7 @@ Number of object identifiers pointed to by \fIobjectPtr\fR.
|
||||
Points to an array of object identifiers: bindings will be considered
|
||||
for each of these objects in order from first to last.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures provide a general-purpose mechanism for creating
|
||||
@@ -111,25 +112,25 @@ select relevant events, or to disallow the use of certain events
|
||||
in bindings.
|
||||
If an error occurred while creating the binding (e.g., \fIeventString\fR
|
||||
refers to a non-existent event), then 0 is returned and an error
|
||||
message is left as the result of interpreter \fIinterp\fR.
|
||||
message is left in \fIinterp->result\fR.
|
||||
.PP
|
||||
\fBTk_DeleteBinding\fR removes from \fIbindingTable\fR the
|
||||
binding given by \fIobject\fR and \fIeventString\fR, if
|
||||
such a binding exists.
|
||||
\fBTk_DeleteBinding\fR always returns \fBTCL_OK\fR.
|
||||
In some cases it may reset the interpreter result to the default
|
||||
In some cases it may reset \fIinterp->result\fR to the default
|
||||
empty value.
|
||||
.PP
|
||||
\fBTk_GetBinding\fR returns a pointer to the script associated
|
||||
with \fIeventString\fR and \fIobject\fR in \fIbindingTable\fR.
|
||||
If no such binding exists then NULL is returned and an error
|
||||
message is left as the result of interpreter \fIinterp\fR.
|
||||
message is left in \fIinterp->result\fR.
|
||||
.PP
|
||||
\fBTk_GetAllBindings\fR returns in \fIinterp\fR's result a list
|
||||
\fBTk_GetAllBindings\fR returns in \fIinterp->result\fR a list
|
||||
of all the event strings for which there are bindings in
|
||||
\fIbindingTable\fR associated with \fIobject\fR.
|
||||
If there are no bindings for \fIobject\fR, the result will be an empty
|
||||
string.
|
||||
If there are no bindings for \fIobject\fR then an empty
|
||||
string is returned in \fIinterp->result\fR.
|
||||
.PP
|
||||
\fBTk_DeleteAllBindings\fR deletes all of the bindings in
|
||||
\fIbindingTable\fR that are associated with \fIobject\fR.
|
||||
@@ -149,5 +150,6 @@ the object is skipped.
|
||||
\fBTk_BindEvent\fR continues through all of the objects, handling
|
||||
exceptions such as errors, \fBbreak\fR, and \fBcontinue\fR as
|
||||
described in the documentation for \fBbind\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
binding, event, object, script
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CanvasPs 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CanvasPs 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CanvasPsY, Tk_CanvasPsBitmap, Tk_CanvasPsColor, Tk_CanvasPsFont, Tk_CanvasPsPath, Tk_CanvasPsStipple \- utility procedures for generating Postscript for canvases
|
||||
@@ -61,6 +61,7 @@ and so on.
|
||||
.AP int numPoints in
|
||||
Number of points at \fIcoordPtr\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures are called by canvas type managers to carry out
|
||||
@@ -82,40 +83,38 @@ transformation.
|
||||
of a bitmap.
|
||||
The Postscript is generated in proper image data format for Postscript,
|
||||
i.e., as data between angle brackets, one bit per pixel.
|
||||
The Postscript is appended to the result of interpreter \fIinterp\fR
|
||||
and \fBTCL_OK\fR is returned unless an error occurs, in which case
|
||||
\fBTCL_ERROR\fR is returned and the interpreter result is overwritten
|
||||
with an error message.
|
||||
The Postscript is appended to \fIinterp->result\fR and \fBTCL_OK\fR is returned
|
||||
unless an error occurs, in which case \fBTCL_ERROR\fR is returned and
|
||||
\fIinterp->result\fR is overwritten with an error message.
|
||||
.PP
|
||||
\fBTk_CanvasPsColor\fR generates Postscript to set the current color
|
||||
to correspond to its \fIcolorPtr\fR argument, taking into account any
|
||||
color map specified in the \fBpostscript\fR command.
|
||||
It appends the Postscript to the interpreter \fIinterp\fR's result and returns
|
||||
\fBTCL_OK\fR unless an error occurs, in which case \fBTCL_ERROR\fR is
|
||||
returned and the interpreter's result is overwritten with an error message.
|
||||
It appends the Postscript to \fIinterp->result\fR and returns
|
||||
\fBTCL_OK\fR unless an error occurs, in which case \fBTCL_ERROR\fR is returned and
|
||||
\fIinterp->result\fR is overwritten with an error message.
|
||||
.PP
|
||||
\fBTk_CanvasPsFont\fR generates Postscript that sets the current font
|
||||
to match \fItkFont\fR as closely as possible.
|
||||
\fBTk_CanvasPsFont\fR takes into account any font map specified
|
||||
in the \fBpostscript\fR command, and it does
|
||||
the best it can at mapping X fonts to Postscript fonts.
|
||||
It appends the Postscript to interpreter \fIinterp\fR's result and
|
||||
returns \fBTCL_OK\fR unless an error occurs, in which case
|
||||
\fBTCL_ERROR\fR is returned and the interpreter's result is
|
||||
overwritten with an error message.
|
||||
It appends the Postscript to \fIinterp->result\fR and returns \fBTCL_OK\fR
|
||||
unless an error occurs, in which case \fBTCL_ERROR\fR is returned and
|
||||
\fIinterp->result\fR is overwritten with an error message.
|
||||
.PP
|
||||
\fBTk_CanvasPsPath\fR generates Postscript to set the current path
|
||||
to the set of points given by \fIcoordPtr\fR and \fInumPoints\fR.
|
||||
It appends the resulting Postscript to the result of interpreter \fIinterp\fR.
|
||||
It appends the resulting Postscript to \fIinterp->result\fR.
|
||||
.PP
|
||||
\fBTk_CanvasPsStipple\fR generates Postscript that will fill the
|
||||
current path in stippled fashion.
|
||||
It uses \fIbitmap\fR as the stipple pattern and the current Postscript
|
||||
color; ones in the stipple bitmap are drawn in the current color, and
|
||||
zeroes are not drawn at all.
|
||||
The Postscript is appended to interpreter \fIinterp\fR's result and
|
||||
\fBTCL_OK\fR is returned, unless an error occurs, in which case
|
||||
\fBTCL_ERROR\fR is returned and the interpreter's result is
|
||||
overwritten with an error message.
|
||||
The Postscript is appended to \fIinterp->result\fR and \fBTCL_OK\fR is
|
||||
returned, unless an error occurs, in which case \fBTCL_ERROR\fR is returned and
|
||||
\fIinterp->result\fR is overwritten with an error message.
|
||||
|
||||
.SH KEYWORDS
|
||||
bitmap, canvas, color, font, path, Postscript, stipple
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CanvasTkwin 3 4.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CanvasTkwin 3 4.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CanvasTkwin, Tk_CanvasGetCoord, Tk_CanvasDrawableCoords, Tk_CanvasSetStippleOrigin, Tk_CanvasWindowCoords, Tk_CanvasEventuallyRedraw, Tk_CanvasTagsOption \- utility procedures for canvas type managers
|
||||
@@ -71,6 +71,7 @@ the left of this coordinate need to be redisplayed.
|
||||
Bottom edge of the region that needs redisplay. Only pixels above
|
||||
this coordinate need to be redisplayed.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures are called by canvas type managers to perform various
|
||||
@@ -85,7 +86,7 @@ canvas coordinate.
|
||||
If \fIstring\fR is a valid coordinate description then \fBTk_CanvasGetCoord\fR
|
||||
stores the corresponding canvas coordinate at *\fIdoublePtr\fR
|
||||
and returns \fBTCL_OK\fR.
|
||||
Otherwise it stores an error message in the interpreter result and
|
||||
Otherwise it stores an error message in \fIinterp->result\fR and
|
||||
returns \fBTCL_ERROR\fR.
|
||||
.PP
|
||||
\fBTk_CanvasDrawableCoords\fR is called by type managers during
|
||||
@@ -141,18 +142,18 @@ The code of a canvas type manager will not call these procedures
|
||||
directly, but will use their addresses to create a \fBTk_CustomOption\fR
|
||||
structure for the \fB\-tags\fR option. The code typically looks
|
||||
like this:
|
||||
.PP
|
||||
.CS
|
||||
static const Tk_CustomOption tagsOption = {Tk_CanvasTagsParseProc,
|
||||
Tk_CanvasTagsPrintProc, NULL
|
||||
static Tk_CustomOption tagsOption = {Tk_CanvasTagsParseProc,
|
||||
Tk_CanvasTagsPrintProc, (ClientData) NULL
|
||||
};
|
||||
|
||||
static const Tk_ConfigSpec configSpecs[] = {
|
||||
static Tk_ConfigSpec configSpecs[] = {
|
||||
...
|
||||
{TK_CONFIG_CUSTOM, "\-tags", NULL, NULL,
|
||||
NULL, 0, TK_CONFIG_NULL_OK, &tagsOption},
|
||||
{TK_CONFIG_CUSTOM, "\-tags", (char *) NULL, (char *) NULL,
|
||||
(char *) NULL, 0, TK_CONFIG_NULL_OK, &tagsOption},
|
||||
...
|
||||
};
|
||||
.CE
|
||||
|
||||
.SH KEYWORDS
|
||||
canvas, focus, item type, redisplay, selection, type manager
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CanvasTextInfo 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CanvasTextInfo 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CanvasTextInfo \- additional information for managing text items in canvases
|
||||
@@ -20,6 +20,7 @@ Tk_CanvasTextInfo *
|
||||
.AP Tk_Canvas canvas in
|
||||
A token that identifies a particular canvas widget.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Textual canvas items are somewhat more complicated to manage than
|
||||
@@ -46,7 +47,7 @@ typedef struct Tk_CanvasTextInfo {
|
||||
Tk_Item *\fIfocusItemPtr\fR;
|
||||
int \fIgotFocus\fR;
|
||||
int \fIcursorOn\fR;
|
||||
} \fBTk_CanvasTextInfo\fR;
|
||||
} Tk_CanvasTextInfo;
|
||||
.CE
|
||||
The \fBselBorder\fR field identifies a Tk_3DBorder that should be
|
||||
used for drawing the background under selected text.
|
||||
@@ -96,5 +97,6 @@ anchor, as determined by \fIselItemPtr\fR or \fIanchorItemPtr\fR).
|
||||
If all of the selected text in the item is deleted, the item should
|
||||
set \fIselItemPtr\fR to NULL to indicate that there is no longer a
|
||||
selection.
|
||||
|
||||
.SH KEYWORDS
|
||||
canvas, focus, insertion cursor, selection, selection anchor, text
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_ClipboardClear 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_ClipboardClear 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_ClipboardClear, Tk_ClipboardAppend \- Manage the clipboard
|
||||
@@ -31,9 +31,10 @@ Conversion type for this clipboard item; has same meaning as
|
||||
.AP Atom format in
|
||||
Representation to use when data is retrieved; has same meaning as
|
||||
\fIformat\fR argument to \fBTk_CreateSelHandler\fR.
|
||||
.AP "const char" *buffer in
|
||||
.AP char *buffer in
|
||||
Null terminated string containing the data to be appended to the clipboard.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These two procedures manage the clipboard for Tk.
|
||||
@@ -44,8 +45,7 @@ number of targets.
|
||||
\fBTk_ClipboardClear\fR claims the CLIPBOARD selection and frees any
|
||||
data items previously stored on the clipboard in this application.
|
||||
It normally returns \fBTCL_OK\fR, but if an error occurs it returns
|
||||
\fBTCL_ERROR\fR and leaves an error message in interpreter
|
||||
\fIinterp\fR's result.
|
||||
\fBTCL_ERROR\fR and leaves an error message in \fIinterp->result\fR.
|
||||
\fBTk_ClipboardClear\fR must be called before a sequence of
|
||||
\fBTk_ClipboardAppend\fR calls can be issued.
|
||||
.PP
|
||||
@@ -60,8 +60,8 @@ currently owned by the application, either
|
||||
because \fBTk_ClipboardClear\fR has not been called or because
|
||||
ownership of the clipboard has changed since the last call to
|
||||
\fBTk_ClipboardClear\fR,
|
||||
\fBTk_ClipboardAppend\fR returns \fBTCL_ERROR\fR and leaves an error
|
||||
message in the result of interpreter \fIinterp\fR.
|
||||
\fBTk_ClipboardAppend\fR returns \fBTCL_ERROR\fR and leaves an error message in
|
||||
\fIinterp->result\fR.
|
||||
.PP
|
||||
In order to guarantee atomicity, no event handling should occur
|
||||
between \fBTk_ClipboardClear\fR and the following
|
||||
@@ -71,7 +71,8 @@ this application).
|
||||
.PP
|
||||
\fBTk_ClipboardClear\fR may invoke callbacks, including arbitrary
|
||||
Tcl scripts, as a result of losing the CLIPBOARD selection, so
|
||||
any calling function should take care to be re-entrant at the point
|
||||
any calling function should take care to be reentrant at the point
|
||||
\fBTk_ClipboardClear\fR is invoked.
|
||||
|
||||
.SH KEYWORDS
|
||||
append, clipboard, clear, format, type
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_ClearSelection 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_ClearSelection 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_ClearSelection \- Deselect a selection
|
||||
@@ -23,6 +23,7 @@ window.
|
||||
.AP Atom selection in
|
||||
The name of selection to be cleared.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_ClearSelection\fR cancels the selection specified by the atom
|
||||
@@ -34,5 +35,6 @@ owns \fIselection\fR, the window will be notified and the
|
||||
selection will be cleared.
|
||||
If there is no owner for \fIselection\fR on the display, then the
|
||||
procedure has no effect.
|
||||
|
||||
.SH KEYWORDS
|
||||
clear, selection
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_ConfigureWidget 3 4.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_ConfigureWidget 3 4.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_ConfigureWidget, Tk_ConfigureInfo, Tk_ConfigureValue, Tk_FreeOptions \- process configuration options for widgets
|
||||
@@ -25,12 +25,12 @@ int
|
||||
.sp
|
||||
\fBTk_FreeOptions(\fIspecs, widgRec, display, flags\fB)\fR
|
||||
.SH ARGUMENTS
|
||||
.AS char *widgRec in/out
|
||||
.AS Tk_ConfigSpec *widgRec in/out
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter to use for returning error messages.
|
||||
.AP Tk_Window tkwin in
|
||||
Window used to represent widget (needed to set up X resources).
|
||||
.AP "const Tk_ConfigSpec" *specs in
|
||||
.AP Tk_ConfigSpec *specs in
|
||||
Pointer to table specifying legal configuration options for this
|
||||
widget.
|
||||
.AP int argc in
|
||||
@@ -89,7 +89,7 @@ to fill in fields of \fIwidgRec\fR that are not specified in \fIargv\fR.
|
||||
case it does not modify \fIinterp\fR.
|
||||
If an error
|
||||
occurs then \fBTCL_ERROR\fR is returned and \fBTk_ConfigureWidget\fR will
|
||||
leave an error message in interpreter \fIinterp\fR's result in the standard Tcl
|
||||
leave an error message in \fIinterp->result\fR in the standard Tcl
|
||||
fashion.
|
||||
In the event of an error return, some of the fields of \fIwidgRec\fR
|
||||
could already have been set, if configuration information for them
|
||||
@@ -103,14 +103,14 @@ option and has the following structure:
|
||||
.CS
|
||||
typedef struct {
|
||||
int \fItype\fR;
|
||||
const char *\fIargvName\fR;
|
||||
const char *\fIdbName\fR;
|
||||
const char *\fIdbClass\fR;
|
||||
const char *\fIdefValue\fR;
|
||||
char *\fIargvName\fR;
|
||||
char *\fIdbName\fR;
|
||||
char *\fIdbClass\fR;
|
||||
char *\fIdefValue\fR;
|
||||
int \fIoffset\fR;
|
||||
int \fIspecFlags\fR;
|
||||
const Tk_CustomOption *\fIcustomPtr\fR;
|
||||
} \fBTk_ConfigSpec\fR;
|
||||
Tk_CustomOption *\fIcustomPtr\fR;
|
||||
} Tk_ConfigSpec;
|
||||
.CE
|
||||
The \fItype\fR field indicates what type of configuration option this is
|
||||
(e.g. \fBTK_CONFIG_COLOR\fR for a color value, or \fBTK_CONFIG_INT\fR for
|
||||
@@ -356,6 +356,7 @@ is an empty string then the target will be set to NULL.
|
||||
\fBTK_CONFIG_WINDOW\fR
|
||||
The value must be a window path name. It is translated to a
|
||||
\fBTk_Window\fR token and the token is stored in the target.
|
||||
|
||||
.SH "GROUPED ENTRIES"
|
||||
.PP
|
||||
In some cases it is useful to generate multiple resources from
|
||||
@@ -373,6 +374,7 @@ Each of the entries after the first must have a NULL value in its
|
||||
\fIargvName\fR field; this indicates that the entry is to be grouped
|
||||
with the entry that precedes it. Only the \fItype\fR and \fIoffset\fR
|
||||
fields are used from these follow-on entries.
|
||||
|
||||
.SH "FLAGS"
|
||||
.PP
|
||||
The \fIflags\fR argument passed to \fBTk_ConfigureWidget\fR is used
|
||||
@@ -432,11 +434,13 @@ once, save the value, and provide it before calling
|
||||
.TP
|
||||
\fBTK_CONFIG_OPTION_SPECIFIED\fR
|
||||
This bit is
|
||||
.VS 8.5
|
||||
deprecated. It used to be set and cleared by \fBTk_ConfigureWidget\fR
|
||||
so that callers could detect what entries were specified in
|
||||
\fIargv\fR, but it was removed because it was inherently
|
||||
thread-unsafe. Code that wishes to detect what options were specified
|
||||
should use \fBTk_SetOptions\fR instead.
|
||||
.VE 8.5
|
||||
.PP
|
||||
The \fBTK_CONFIG_MONO_ONLY\fR and \fBTK_CONFIG_COLOR_ONLY\fR flags are typically
|
||||
used to specify different default values for
|
||||
@@ -469,6 +473,7 @@ for which this entry is valid. When calling \fBTk_ConfigureWidget\fR,
|
||||
\fIflags\fR will have a single one of these bits set to select the
|
||||
entries for the desired widget type. For a working example of
|
||||
this feature, see the code in tkButton.c.
|
||||
|
||||
.SH TK_OFFSET
|
||||
.PP
|
||||
The \fBTk_Offset\fR macro is provided as a safe way of generating
|
||||
@@ -476,6 +481,7 @@ the \fIoffset\fR values for entries in Tk_ConfigSpec structures.
|
||||
It takes two arguments: the name of a type of record, and the
|
||||
name of a field in that record. It returns the byte offset of
|
||||
the named field in records of the given type.
|
||||
|
||||
.SH TK_CONFIGUREINFO
|
||||
.PP
|
||||
The \fBTk_ConfigureInfo\fR procedure may be used to obtain
|
||||
@@ -486,12 +492,12 @@ pointer to a widget record containing the current information for
|
||||
a widget (\fIwidgRec\fR), and a NULL \fIargvName\fR argument,
|
||||
\fBTk_ConfigureInfo\fR generates a string describing all of the
|
||||
configuration options for the window. The string is placed
|
||||
in interpreter \fIinterp\fR's result. Under normal circumstances
|
||||
in \fIinterp->result\fR. Under normal circumstances
|
||||
it returns \fBTCL_OK\fR; if an error occurs then it returns \fBTCL_ERROR\fR
|
||||
and the interpreter's result will contain an error message.
|
||||
and \fIinterp->result\fR contains an error message.
|
||||
.PP
|
||||
If \fIargvName\fR is NULL, then the value left in
|
||||
the interpreter's result by \fBTk_ConfigureInfo\fR
|
||||
\fIinterp->result\fR by \fBTk_ConfigureInfo\fR
|
||||
consists of a list of one or more entries, each of which describes
|
||||
one configuration option (i.e. one entry in \fIspecs\fR). Each
|
||||
entry in the list will contain either two or five values. If the
|
||||
@@ -504,25 +510,27 @@ field of \fIwidgRec\fR by calling procedures like \fBTk_NameOfColor\fR.
|
||||
.PP
|
||||
If the \fIargvName\fR argument to \fBTk_ConfigureInfo\fR is non-NULL,
|
||||
then it indicates a single option, and information is returned only
|
||||
for that option. The string placed in the interpreter's result will be
|
||||
for that option. The string placed in \fIinterp->result\fR will be
|
||||
a list containing two or five values as described above; this will
|
||||
be identical to the corresponding sublist that would have been returned
|
||||
if \fIargvName\fR had been NULL.
|
||||
.PP
|
||||
The \fIflags\fR argument to \fBTk_ConfigureInfo\fR is used to restrict
|
||||
the \fIspecs\fR entries to consider, just as for \fBTk_ConfigureWidget\fR.
|
||||
|
||||
.SH TK_CONFIGUREVALUE
|
||||
.PP
|
||||
\fBTk_ConfigureValue\fR takes arguments similar to \fBTk_ConfigureInfo\fR;
|
||||
instead of returning a list of values, it just returns the current value
|
||||
of the option given by \fIargvName\fR (\fIargvName\fR must not be NULL).
|
||||
The value is returned in interpreter \fIinterp\fR's result and \fBTCL_OK\fR is
|
||||
The value is returned in \fIinterp->result\fR and \fBTCL_OK\fR is
|
||||
normally returned as the procedure's result.
|
||||
If an error occurs in \fBTk_ConfigureValue\fR (e.g., \fIargvName\fR is
|
||||
not a valid option name), \fBTCL_ERROR\fR is returned and an error message
|
||||
is left in the interpreter's result.
|
||||
is left in \fIinterp->result\fR.
|
||||
This procedure is typically called to implement \fBcget\fR widget
|
||||
commands.
|
||||
|
||||
.SH TK_FREEOPTIONS
|
||||
.PP
|
||||
The \fBTk_FreeOptions\fR procedure may be invoked during widget cleanup
|
||||
@@ -535,6 +543,7 @@ it contains a null pointer) then no resource is freed for that
|
||||
entry.
|
||||
After freeing a resource, \fBTk_FreeOptions\fR sets the
|
||||
corresponding field of the widget record to null.
|
||||
|
||||
.SH "CUSTOM OPTION TYPES"
|
||||
.PP
|
||||
Applications can extend the built-in configuration types with additional
|
||||
@@ -545,9 +554,9 @@ typedef struct Tk_CustomOption {
|
||||
Tk_OptionParseProc *\fIparseProc\fR;
|
||||
Tk_OptionPrintProc *\fIprintProc\fR;
|
||||
ClientData \fIclientData\fR;
|
||||
} \fBTk_CustomOption\fR;
|
||||
} Tk_CustomOption;
|
||||
|
||||
typedef int \fBTk_OptionParseProc\fR(
|
||||
typedef int Tk_OptionParseProc(
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tk_Window \fItkwin\fR,
|
||||
@@ -555,7 +564,7 @@ typedef int \fBTk_OptionParseProc\fR(
|
||||
char *\fIwidgRec\fR,
|
||||
int \fIoffset\fR);
|
||||
|
||||
typedef const char *\fBTk_OptionPrintProc\fR(
|
||||
typedef char *Tk_OptionPrintProc(
|
||||
ClientData \fIclientData\fR,
|
||||
Tk_Window \fItkwin\fR,
|
||||
char *\fIwidgRec\fR,
|
||||
@@ -590,7 +599,7 @@ be placed. The procedure should translate the string to whatever
|
||||
form is appropriate for the option and store the value in the widget
|
||||
record. It should normally return \fBTCL_OK\fR, but if an error occurs
|
||||
in translating the string to a value then it should return \fBTCL_ERROR\fR
|
||||
and store an error message in interpreter \fIinterp\fR's result.
|
||||
and store an error message in \fIinterp->result\fR.
|
||||
.PP
|
||||
The \fIprintProc\fR procedure is called
|
||||
by \fBTk_ConfigureInfo\fR to produce a string value describing an
|
||||
@@ -613,6 +622,7 @@ Tk_CustomOption structure has been created for them, options of this
|
||||
new type may be manipulated with Tk_ConfigSpec entries whose \fItype\fR
|
||||
fields are \fBTK_CONFIG_CUSTOM\fR and whose \fIcustomPtr\fR fields point
|
||||
to the Tk_CustomOption structure.
|
||||
|
||||
.SH EXAMPLES
|
||||
.PP
|
||||
Although the explanation of \fBTk_ConfigureWidget\fR is fairly
|
||||
@@ -623,8 +633,10 @@ The library implementation of frames
|
||||
(tkFrame.c) has a simple configuration table, and the library
|
||||
implementation of buttons (tkButton.c) has a much more complex
|
||||
table that uses many of the fancy \fIspecFlags\fR mechanisms.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
Tk_SetOptions(3)
|
||||
|
||||
.SH KEYWORDS
|
||||
anchor, bitmap, boolean, border, cap style, color, configuration options,
|
||||
cursor, custom, double, font, integer, join style, justify, millimeters,
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_ConfigureWindow 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_ConfigureWindow 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_ConfigureWindow, Tk_MoveWindow, Tk_ResizeWindow, Tk_MoveResizeWindow, Tk_SetWindowBorderWidth, Tk_ChangeWindowAttributes, Tk_SetWindowBackground, Tk_SetWindowBackgroundPixmap, Tk_SetWindowBorder, Tk_SetWindowBorderPixmap, Tk_SetWindowColormap, Tk_DefineCursor, Tk_UndefineCursor \- change window configuration or attributes
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CoordsToWindow 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CoordsToWindow 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CoordsToWindow \- Find window containing a point
|
||||
@@ -25,6 +25,7 @@ Y-coordinate (in root window coordinates).
|
||||
.AP Tk_Window tkwin in
|
||||
Token for window that identifies application.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_CoordsToWindow\fR locates the window that contains a given point.
|
||||
@@ -43,5 +44,6 @@ which window contains the mouse cursor: if a parent and a child both
|
||||
contain the point then the child gets preference, and if two siblings
|
||||
both contain the point then the highest one in the stacking order
|
||||
(i.e. the one that's visible on the screen) gets preference.
|
||||
|
||||
.SH KEYWORDS
|
||||
containing, coordinates, root window
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CreateClientMessageHandler 3 "8.4" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CreateClientMessageHandler 3 "8.4" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CreateClientMessageHandler, Tk_DeleteClientMessageHandler \- associate procedure callback with ClientMessage type X events
|
||||
@@ -20,8 +20,10 @@ Tk_CreateClientMessageHandler, Tk_DeleteClientMessageHandler \- associate proced
|
||||
.AP Tk_ClientMessageProc *proc in
|
||||
Procedure to invoke whenever a ClientMessage X event occurs on any display.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
|
||||
\fBTk_CreateClientMessageHandler\fR arranges for \fIproc\fR to be invoked
|
||||
in the future whenever a ClientMessage X event occurs that is not handled by
|
||||
\fBWM_PROTOCOL\fR. \fBTk_CreateClientMessageHandler\fR is intended for use
|
||||
@@ -31,13 +33,13 @@ drop applications.
|
||||
The callback to \fIproc\fR will be made by \fBTk_HandleEvent\fR;
|
||||
this mechanism only works in programs that dispatch events
|
||||
through \fBTk_HandleEvent\fR (or through other Tk procedures that
|
||||
call \fBTk_HandleEvent\fR, such as \fBTcl_DoOneEvent\fR or
|
||||
call \fBTk_HandleEvent\fR, such as \fBTk_DoOneEvent\fR or
|
||||
\fBTk_MainLoop\fR).
|
||||
.PP
|
||||
\fIProc\fR should have arguments and result that match the
|
||||
type \fBTk_ClientMessageProc\fR:
|
||||
.CS
|
||||
typedef int \fBTk_ClientMessageProc\fR(
|
||||
typedef int Tk_ClientMessageProc(
|
||||
Tk_Window \fItkwin\fR,
|
||||
XEvent *\fIeventPtr\fR);
|
||||
.CE
|
||||
@@ -60,5 +62,6 @@ finds that matches the \fIproc\fR argument. If no such handler exists,
|
||||
then \fBTk_DeleteClientMessageHandler\fR returns without doing anything.
|
||||
Although Tk supports it, it's probably a bad idea to have more than one
|
||||
callback with the same \fIproc\fR argument.
|
||||
|
||||
.SH KEYWORDS
|
||||
bind, callback, event, handler
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_InitConsoleChannels 3 8.5 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_InitConsoleChannels 3 8.5 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_InitConsoleChannels \- Install the console channels as standard channels
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CreateErrorHandler 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CreateErrorHandler 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CreateErrorHandler, Tk_DeleteErrorHandler \- handle X protocol errors
|
||||
@@ -72,7 +72,7 @@ made when the handler was active (see below for more information).
|
||||
\fIProc\fR should have arguments and result that match the
|
||||
following type:
|
||||
.CS
|
||||
typedef int \fBTk_ErrorProc\fR(
|
||||
typedef int Tk_ErrorProc(
|
||||
ClientData \fIclientData\fR,
|
||||
XErrorEvent *\fIerrEventPtr\fR);
|
||||
.CE
|
||||
@@ -136,5 +136,6 @@ handlers deleted before the \fBXSync\fR call.
|
||||
For the Tk error handling mechanism to work properly, it is essential
|
||||
that application code never calls \fBXSetErrorHandler\fR directly;
|
||||
applications should use only \fBTk_CreateErrorHandler\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
callback, error, event, handler
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CreateGenericHandler 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CreateGenericHandler 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CreateGenericHandler, Tk_DeleteGenericHandler \- associate procedure callback with all X events
|
||||
@@ -24,6 +24,7 @@ Procedure to invoke whenever any X event occurs on any display.
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_CreateGenericHandler\fR arranges for \fIproc\fR to be
|
||||
@@ -38,13 +39,13 @@ use with Tk, and so on.
|
||||
The callback to \fIproc\fR will be made by \fBTk_HandleEvent\fR;
|
||||
this mechanism only works in programs that dispatch events
|
||||
through \fBTk_HandleEvent\fR (or through other Tk procedures that
|
||||
call \fBTk_HandleEvent\fR, such as \fBTcl_DoOneEvent\fR or
|
||||
call \fBTk_HandleEvent\fR, such as \fBTk_DoOneEvent\fR or
|
||||
\fBTk_MainLoop\fR).
|
||||
.PP
|
||||
\fIProc\fR should have arguments and result that match the
|
||||
type \fBTk_GenericProc\fR:
|
||||
.CS
|
||||
typedef int \fBTk_GenericProc\fR(
|
||||
typedef int Tk_GenericProc(
|
||||
ClientData \fIclientData\fR,
|
||||
XEvent *\fIeventPtr\fR);
|
||||
.CE
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CreateImageType 3 8.5 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CreateImageType 3 8.5 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CreateImageType, Tk_GetImageMasterData, Tk_InitImageArgs \- define new kind of image
|
||||
@@ -21,12 +21,11 @@ ClientData
|
||||
.sp
|
||||
\fBTk_InitImageArgs\fR(\fIinterp, argc, argvPtr\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS "const Tk_ImageType" *typePtrPtr
|
||||
.AP "const Tk_ImageType" *typePtr in
|
||||
.AS Tk_ImageType *typePtrPtr
|
||||
.AP Tk_ImageType *typePtr in
|
||||
Structure that defines the new type of image.
|
||||
For Tk 8.4 and earlier this must be static: a
|
||||
Must be static: a
|
||||
pointer to this structure is retained by the image code.
|
||||
In Tk 8.5, this limitation was relaxed.
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter in which image was created.
|
||||
.AP "const char" *name in
|
||||
@@ -39,6 +38,7 @@ Number of arguments
|
||||
.AP char ***argvPtr in/out
|
||||
Pointer to argument list
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_CreateImageType\fR is invoked to define a new kind of image.
|
||||
@@ -59,13 +59,13 @@ the name of the image type and pointers to five procedures provided
|
||||
by the image manager to deal with images of this type:
|
||||
.CS
|
||||
typedef struct Tk_ImageType {
|
||||
const char *\fIname\fR;
|
||||
char *\fIname\fR;
|
||||
Tk_ImageCreateProc *\fIcreateProc\fR;
|
||||
Tk_ImageGetProc *\fIgetProc\fR;
|
||||
Tk_ImageDisplayProc *\fIdisplayProc\fR;
|
||||
Tk_ImageFreeProc *\fIfreeProc\fR;
|
||||
Tk_ImageDeleteProc *\fIdeleteProc\fR;
|
||||
} \fBTk_ImageType\fR;
|
||||
} Tk_ImageType;
|
||||
.CE
|
||||
The fields of this structure will be described in later subsections
|
||||
of this entry.
|
||||
@@ -92,6 +92,7 @@ option specified for a widget or canvas item.
|
||||
.PP
|
||||
The following subsections describe the fields of a Tk_ImageType
|
||||
in more detail.
|
||||
|
||||
.SS NAME
|
||||
.PP
|
||||
\fItypePtr->name\fR provides a name for the image type.
|
||||
@@ -100,19 +101,19 @@ in \fBimage create\fR commands to create images of the new
|
||||
type.
|
||||
If there already existed an image type by this name then
|
||||
the new image type replaces the old one.
|
||||
|
||||
.SS CREATEPROC
|
||||
.PP
|
||||
\fItypePtr->createProc\fR provides the address of a procedure for
|
||||
Tk to call whenever \fBimage create\fR is invoked to create
|
||||
an image of the new type.
|
||||
\fItypePtr->createProc\fR must match the following prototype:
|
||||
.CS
|
||||
typedef int \fBTk_ImageCreateProc\fR(
|
||||
typedef int Tk_ImageCreateProc(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
const char *\fIname\fR,
|
||||
char *\fIname\fR,
|
||||
int \fIobjc\fR,
|
||||
Tcl_Obj *const \fIobjv\fR[],
|
||||
const Tk_ImageType *\fItypePtr\fR,
|
||||
Tk_ImageType *\fItypePtr\fR,
|
||||
Tk_ImageMaster \fImaster\fR,
|
||||
ClientData *\fImasterDataPtr\fR);
|
||||
.CE
|
||||
@@ -140,13 +141,14 @@ it should return \fBTCL_OK\fR.
|
||||
.PP
|
||||
\fIcreateProc\fR should call \fBTk_ImageChanged\fR in order to set the
|
||||
size of the image and request an initial redisplay.
|
||||
|
||||
.SS GETPROC
|
||||
.PP
|
||||
\fItypePtr->getProc\fR is invoked by Tk whenever a widget
|
||||
calls \fBTk_GetImage\fR to use a particular image.
|
||||
This procedure must match the following prototype:
|
||||
.CS
|
||||
typedef ClientData \fBTk_ImageGetProc\fR(
|
||||
typedef ClientData Tk_ImageGetProc(
|
||||
Tk_Window \fItkwin\fR,
|
||||
ClientData \fImasterData\fR);
|
||||
.CE
|
||||
@@ -160,13 +162,14 @@ display the image in the given window.
|
||||
is typically the address of the instance data structure.
|
||||
Tk will pass this value back to the image manager when invoking
|
||||
its \fIdisplayProc\fR and \fIfreeProc\fR procedures.
|
||||
|
||||
.SS DISPLAYPROC
|
||||
.PP
|
||||
\fItypePtr->displayProc\fR is invoked by Tk whenever an image needs
|
||||
to be displayed (i.e., whenever a widget calls \fBTk_RedrawImage\fR).
|
||||
\fIdisplayProc\fR must match the following prototype:
|
||||
.CS
|
||||
typedef void \fBTk_ImageDisplayProc\fR(
|
||||
typedef void Tk_ImageDisplayProc(
|
||||
ClientData \fIinstanceData\fR,
|
||||
Display *\fIdisplay\fR,
|
||||
Drawable \fIdrawable\fR,
|
||||
@@ -192,6 +195,7 @@ as specified in the most recent call to \fBTk_ImageChanged\fR.
|
||||
the image should be displayed; \fIdisplayProc\fR should display
|
||||
the given region of the image so that point (\fIimageX\fR, \fIimageY\fR)
|
||||
in the image appears at (\fIdrawableX\fR, \fIdrawableY\fR) in \fIdrawable\fR.
|
||||
|
||||
.SS FREEPROC
|
||||
.PP
|
||||
\fItypePtr->freeProc\fR contains the address of a procedure that
|
||||
@@ -202,7 +206,7 @@ in a canvas is deleted, or when the image displayed in a widget or
|
||||
canvas item is changed.
|
||||
\fIfreeProc\fR must match the following prototype:
|
||||
.CS
|
||||
typedef void \fBTk_ImageFreeProc\fR(
|
||||
typedef void Tk_ImageFreeProc(
|
||||
ClientData \fIinstanceData\fR,
|
||||
Display *\fIdisplay\fR);
|
||||
.CE
|
||||
@@ -211,6 +215,7 @@ The \fIinstanceData\fR will be the same as the value returned by
|
||||
is the display containing the window for the instance.
|
||||
\fIfreeProc\fR should release any resources associated with the
|
||||
image instance, since the instance will never be used again.
|
||||
|
||||
.SS DELETEPROC
|
||||
.PP
|
||||
\fItypePtr->deleteProc\fR is a procedure that Tk invokes when an
|
||||
@@ -220,7 +225,7 @@ Before invoking \fIdeleteProc\fR Tk will invoke \fIfreeProc\fR for
|
||||
each of the image's instances.
|
||||
\fIdeleteProc\fR must match the following prototype:
|
||||
.CS
|
||||
typedef void \fBTk_ImageDeleteProc\fR(
|
||||
typedef void Tk_ImageDeleteProc(
|
||||
ClientData \fImasterData\fR);
|
||||
.CE
|
||||
The \fImasterData\fR argument will be the same as the value
|
||||
@@ -228,6 +233,7 @@ stored in \fI*masterDataPtr\fR by \fIcreateProc\fR when the
|
||||
image was created.
|
||||
\fIdeleteProc\fR should release any resources associated with
|
||||
the image.
|
||||
|
||||
.SH TK_GETIMAGEMASTERDATA
|
||||
.PP
|
||||
The procedure \fBTk_GetImageMasterData\fR may be invoked to retrieve
|
||||
@@ -241,12 +247,12 @@ and the return value is the ClientData value returned by the
|
||||
\fIcreateProc\fR when the image was created (this is typically a
|
||||
pointer to the image master data structure). If no such image exists
|
||||
then NULL is returned and NULL is stored at \fI*typePtrPtr\fR.
|
||||
|
||||
.SH "LEGACY INTERFACE SUPPORT"
|
||||
.PP
|
||||
In Tk 8.2 and earlier, the definition of \fBTk_ImageCreateProc\fR
|
||||
was incompatibly different, with the following prototype:
|
||||
.CS
|
||||
typedef int \fBTk_ImageCreateProc\fR(
|
||||
typedef int Tk_ImageCreateProc(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
char *\fIname\fR,
|
||||
int \fIargc\fR,
|
||||
@@ -277,7 +283,9 @@ use Tk 8.4 headers and stub libraries to do so.
|
||||
.PP
|
||||
Any new code written today should not make use of the legacy
|
||||
interfaces. Expect their support to go away in Tk 9.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
Tk_ImageChanged, Tk_GetImage, Tk_FreeImage, Tk_RedrawImage, Tk_SizeOfImage
|
||||
|
||||
.SH KEYWORDS
|
||||
image manager, image type, instance, master
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CreateItemType 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CreateItemType 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CreateItemType, Tk_GetItemTypes \- define new kind of canvas item
|
||||
@@ -44,7 +44,7 @@ NULL \fInextPtr\fR.
|
||||
.PP
|
||||
You may find it easier to understand the rest of this manual entry
|
||||
by looking at the code for an existing canvas item type such as
|
||||
bitmap (in the file tkCanvBmap.c) or text (tkCanvText.c).
|
||||
bitmap (file tkCanvBmap.c) or text (tkCanvText.c).
|
||||
The easiest way to create a new type manager is to copy the code
|
||||
for an existing type and modify it for the new type.
|
||||
.PP
|
||||
@@ -60,13 +60,12 @@ structures.
|
||||
The first data structure is a Tk_ItemType; it contains
|
||||
information such as the name of the type and pointers to
|
||||
the standard procedures implemented by the type manager:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tk_ItemType {
|
||||
const char *\fIname\fR;
|
||||
char *\fIname\fR;
|
||||
int \fIitemSize\fR;
|
||||
Tk_ItemCreateProc *\fIcreateProc\fR;
|
||||
const Tk_ConfigSpec *\fIconfigSpecs\fR;
|
||||
Tk_ConfigSpec *\fIconfigSpecs\fR;
|
||||
Tk_ItemConfigureProc *\fIconfigProc\fR;
|
||||
Tk_ItemCoordProc *\fIcoordProc\fR;
|
||||
Tk_ItemDeleteProc *\fIdeleteProc\fR;
|
||||
@@ -83,7 +82,7 @@ typedef struct Tk_ItemType {
|
||||
Tk_ItemInsertProc *\fIinsertProc\fR;
|
||||
Tk_ItemDCharsProc *\fIdCharsProc\fR;
|
||||
Tk_ItemType *\fInextPtr\fR;
|
||||
} \fBTk_ItemType\fR;
|
||||
} Tk_ItemType;
|
||||
.CE
|
||||
.PP
|
||||
The fields of a Tk_ItemType structure are described in more detail
|
||||
@@ -108,7 +107,6 @@ record is defined by the type manager.
|
||||
A type manager must define its item records with a Tk_Item as
|
||||
the first field.
|
||||
For example, the item record for bitmap items is defined as follows:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct BitmapItem {
|
||||
Tk_Item \fIheader\fR;
|
||||
@@ -118,9 +116,8 @@ typedef struct BitmapItem {
|
||||
XColor *\fIfgColor\fR;
|
||||
XColor *\fIbgColor\fR;
|
||||
GC \fIgc\fR;
|
||||
} \fBBitmapItem\fR;
|
||||
} BitmapItem;
|
||||
.CE
|
||||
.PP
|
||||
The \fIheader\fR substructure contains information used by Tk
|
||||
to manage the item, such as its identifier, its tags, its type,
|
||||
and its bounding box.
|
||||
@@ -153,7 +150,6 @@ A Tk_Canvas handle is typically passed in to the
|
||||
procedures of a type manager, and the type manager can pass the
|
||||
handle back to library procedures such as Tk_CanvasTkwin
|
||||
to fetch information about the canvas.
|
||||
.SH "TK_ITEMTYPE FIELDS"
|
||||
.SS NAME
|
||||
.PP
|
||||
This section and the ones that follow describe each of the fields
|
||||
@@ -164,37 +160,8 @@ in \fBcreate\fR widget commands to create items of the new
|
||||
type.
|
||||
If there already existed an item type by this name then
|
||||
the new item type replaces the old one.
|
||||
.SS "FLAGS (IN ALWAYSREDRAW)"
|
||||
.PP
|
||||
The \fItypePtr\->alwaysRedraw\fR field (so named for historic reasons)
|
||||
contains a collection of flag bits that modify how the canvas core interacts
|
||||
with the item. The following bits are defined:
|
||||
.TP
|
||||
\fB1\fR
|
||||
.
|
||||
Indicates that the item should always be redrawn when any part of the canvas
|
||||
is redrawn, rather than only when the bounding box of the item overlaps the
|
||||
area being redrawn. This is used by window items, for example, which need to
|
||||
unmap subwindows that are not on the screen.
|
||||
.TP
|
||||
\fBTK_CONFIG_OBJS\fR
|
||||
.
|
||||
Indicates that operations which would otherwise take a string (or array of
|
||||
strings) actually take a Tcl_Obj reference (or an array of such references).
|
||||
The operations to which this applies are the \fIconfigProc\fR, the
|
||||
\fIcoordProc\fR, the \fIcreateProc\fR, the \fIindexProc\fR and the
|
||||
\fIinsertProc\fR.
|
||||
.TP
|
||||
\fBTK_MOVABLE_POINTS\fR
|
||||
.VS 8.6
|
||||
Indicates that the item supports the \fIdCharsProc\fR, \fIindexProc\fR and
|
||||
\fIinsertProc\fR with the same semantics as Tk's built-in line and polygon
|
||||
types, and that hence individual coordinate points can be moved. Must not be
|
||||
set if any of the above methods is NULL.
|
||||
.VE 8.6
|
||||
.SS ITEMSIZE
|
||||
.PP
|
||||
\fItypePtr\->itemSize\fR gives the size in bytes of item records
|
||||
\fItypePtr->itemSize\fR gives the size in bytes of item records
|
||||
of this type, including the Tk_Item header.
|
||||
Tk uses this size to allocate memory space for items of the type.
|
||||
All of the item records for a given type must have the same size.
|
||||
@@ -203,38 +170,31 @@ of points for a polygon), the type manager can allocate a separate
|
||||
object of variable length and keep a pointer to it in the item record.
|
||||
.SS CREATEPROC
|
||||
.PP
|
||||
\fItypePtr\->createProc\fR points to a procedure for
|
||||
\fItypePtr->createProc\fR points to a procedure for
|
||||
Tk to call whenever a new item of this type is created.
|
||||
\fItypePtr\->createProc\fR must match the following prototype:
|
||||
.PP
|
||||
\fItypePtr->createProc\fR must match the following prototype:
|
||||
.CS
|
||||
typedef int \fBTk_ItemCreateProc\fR(
|
||||
typedef int Tk_ItemCreateProc(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
int \fIobjc\fR,
|
||||
Tcl_Obj *const \fIobjv\fR[]);
|
||||
Tcl_Obj* const \fIobjv\fR[]);
|
||||
.CE
|
||||
.PP
|
||||
The \fIinterp\fR argument is the interpreter in which the canvas's
|
||||
\fBcreate\fR widget command was invoked, and \fIcanvas\fR is a
|
||||
handle for the canvas widget.
|
||||
\fIitemPtr\fR is a pointer to a newly-allocated item of
|
||||
size \fItypePtr\->itemSize\fR.
|
||||
size \fItypePtr->itemSize\fR.
|
||||
Tk has already initialized the item's header (the first
|
||||
\fBsizeof(Tk_ItemType)\fR bytes).
|
||||
The \fIobjc\fR and \fIobjv\fR arguments describe all of the
|
||||
arguments to the \fBcreate\fR command after the \fItype\fR
|
||||
argument.
|
||||
Note that if \fBTK_CONFIG_OBJS\fR is not set in the
|
||||
\fItypePtr\->alwaysRedraw\fR field, the \fIobjv\fR parameter will actually
|
||||
contain a pointer to an array of constant strings.
|
||||
For example, in the widget command:
|
||||
.PP
|
||||
For example, in the widget command
|
||||
.CS
|
||||
\fB\&.c create rectangle 10 20 50 50 \-fill black\fR
|
||||
.CE
|
||||
.PP
|
||||
\fIobjc\fR will be \fB6\fR and \fIobjv\fR[0] will contain the
|
||||
integer object \fB10\fR.
|
||||
.PP
|
||||
@@ -242,7 +202,7 @@ integer object \fB10\fR.
|
||||
the type-specific parts of the item record and set an initial value
|
||||
for the bounding box in the item's header.
|
||||
It should return a standard Tcl completion code and leave an
|
||||
error message in the interpreter result if an error occurs.
|
||||
error message in \fIinterp->result\fR if an error occurs.
|
||||
If an error occurs Tk will free the item record, so \fIcreateProc\fR
|
||||
must be sure to leave the item record in a clean state if it returns an error
|
||||
(e.g., it must free any additional memory that it allocated for
|
||||
@@ -252,84 +212,70 @@ the item).
|
||||
Each type manager must provide a standard table describing its
|
||||
configuration options, in a form suitable for use with
|
||||
\fBTk_ConfigureWidget\fR.
|
||||
This table will normally be used by \fItypePtr\->createProc\fR
|
||||
and \fItypePtr\->configProc\fR, but Tk also uses it directly
|
||||
This table will normally be used by \fItypePtr->createProc\fR
|
||||
and \fItypePtr->configProc\fR, but Tk also uses it directly
|
||||
to retrieve option information in the \fBitemcget\fR and
|
||||
\fBitemconfigure\fR widget commands.
|
||||
\fItypePtr\->configSpecs\fR must point to the configuration table
|
||||
\fItypePtr->configSpecs\fR must point to the configuration table
|
||||
for this type.
|
||||
Note: Tk provides a custom option type \fBtk_CanvasTagsOption\fR
|
||||
for implementing the \fB\-tags\fR option; see an existing type
|
||||
manager for an example of how to use it in \fIconfigSpecs\fR.
|
||||
.SS CONFIGPROC
|
||||
.PP
|
||||
\fItypePtr\->configProc\fR is called by Tk whenever the
|
||||
\fItypePtr->configProc\fR is called by Tk whenever the
|
||||
\fBitemconfigure\fR widget command is invoked to change the
|
||||
configuration options for a canvas item.
|
||||
This procedure must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTk_ItemConfigureProc\fR(
|
||||
typedef int Tk_ItemConfigureProc(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
int \fIobjc\fR,
|
||||
Tcl_Obj *const \fIobjv\fR[],
|
||||
Tcl_Obj* const \fIobjv\fR[],
|
||||
int \fIflags\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIinterp\fR argument identifies the interpreter in which the
|
||||
The \fIinterp\fR objument identifies the interpreter in which the
|
||||
widget command was invoked, \fIcanvas\fR is a handle for the canvas
|
||||
widget, and \fIitemPtr\fR is a pointer to the item being configured.
|
||||
\fIobjc\fR and \fIobjv\fR contain the configuration options.
|
||||
Note that if \fBTK_CONFIG_OBJS\fR is not set in the
|
||||
\fItypePtr\->alwaysRedraw\fR field, the \fIobjv\fR parameter will actually
|
||||
contain a pointer to an array of constant strings.
|
||||
For example, if the following command is invoked:
|
||||
.PP
|
||||
\fIobjc\fR and \fIobjv\fR contain the configuration options. For
|
||||
example, if the following command is invoked:
|
||||
.CS
|
||||
\fB\&.c itemconfigure 2 \-fill red \-outline black\fR
|
||||
.CE
|
||||
.PP
|
||||
\fIobjc\fR is \fB4\fR and \fIobjv\fR contains the string objects \fB\-fill\fR
|
||||
through \fBblack\fR.
|
||||
\fIobjc\fR will always be an even value.
|
||||
The \fIflags\fR argument contains flags to pass to \fBTk_ConfigureWidget\fR;
|
||||
currently this value is always \fBTK_CONFIG_ARGV_ONLY\fR when Tk
|
||||
invokes \fItypePtr\->configProc\fR, but the type manager's \fIcreateProc\fR
|
||||
invokes \fItypePtr->configProc\fR, but the type manager's \fIcreateProc\fR
|
||||
procedure will usually invoke \fIconfigProc\fR with different flag values.
|
||||
.PP
|
||||
\fItypePtr\->configProc\fR returns a standard Tcl completion code and
|
||||
leaves an error message in the interpreter result if an error occurs.
|
||||
\fItypePtr->configProc\fR returns a standard Tcl completion code and
|
||||
leaves an error message in \fIinterp->result\fR if an error occurs.
|
||||
It must update the item's bounding box to reflect the new configuration
|
||||
options.
|
||||
.SS COORDPROC
|
||||
.PP
|
||||
\fItypePtr\->coordProc\fR is invoked by Tk to implement the \fBcoords\fR
|
||||
\fItypePtr->coordProc\fR is invoked by Tk to implement the \fBcoords\fR
|
||||
widget command for an item.
|
||||
It must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTk_ItemCoordProc\fR(
|
||||
typedef int Tk_ItemCoordProc(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
int \fIobjc\fR,
|
||||
Tcl_Obj *const \fIobjv\fR[]);
|
||||
Tcl_Obj* const \fIobjv\fR[]);
|
||||
.CE
|
||||
.PP
|
||||
The arguments \fIinterp\fR, \fIcanvas\fR, and \fIitemPtr\fR
|
||||
all have the standard meanings, and \fIobjc\fR and \fIobjv\fR
|
||||
describe the coordinate arguments.
|
||||
Note that if \fBTK_CONFIG_OBJS\fR is not set in the
|
||||
\fItypePtr\->alwaysRedraw\fR field, the \fIobjv\fR parameter will actually
|
||||
contain a pointer to an array of constant strings.
|
||||
For example, if the following widget command is invoked:
|
||||
.PP
|
||||
.CS
|
||||
\fB\&.c coords 2 30 90\fR
|
||||
.CE
|
||||
.PP
|
||||
\fIobjc\fR will be \fB2\fR and \fBobjv\fR will contain the integer objects
|
||||
\fB30\fR and \fB90\fR.
|
||||
.PP
|
||||
@@ -338,20 +284,18 @@ update the item appropriately (e.g., it must reset the bounding
|
||||
box in the item's header), and return a standard Tcl completion
|
||||
code.
|
||||
If an error occurs, \fIcoordProc\fR must leave an error message in
|
||||
the interpreter result.
|
||||
\fIinterp->result\fR.
|
||||
.SS DELETEPROC
|
||||
.PP
|
||||
\fItypePtr\->deleteProc\fR is invoked by Tk to delete an item
|
||||
\fItypePtr->deleteProc\fR is invoked by Tk to delete an item
|
||||
and free any resources allocated to it.
|
||||
It must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTk_ItemDeleteProc\fR(
|
||||
typedef void Tk_ItemDeleteProc(
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
Display *\fIdisplay\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIcanvas\fR and \fIitemPtr\fR arguments have the usual
|
||||
interpretations, and \fIdisplay\fR identifies the X display containing
|
||||
the canvas.
|
||||
@@ -359,14 +303,13 @@ the canvas.
|
||||
so that Tk can free the item record.
|
||||
\fIdeleteProc\fR should not actually free the item record; this will
|
||||
be done by Tk when \fIdeleteProc\fR returns.
|
||||
.SS "DISPLAYPROC"
|
||||
.SS "DISPLAYPROC AND ALWAYSREDRAW"
|
||||
.PP
|
||||
\fItypePtr\->displayProc\fR is invoked by Tk to redraw an item
|
||||
\fItypePtr->displayProc\fR is invoked by Tk to redraw an item
|
||||
on the screen.
|
||||
It must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTk_ItemDisplayProc\fR(
|
||||
typedef void Tk_ItemDisplayProc(
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
Display *\fIdisplay\fR,
|
||||
@@ -376,7 +319,6 @@ typedef void \fBTk_ItemDisplayProc\fR(
|
||||
int \fIwidth\fR,
|
||||
int \fIheight\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIcanvas\fR and \fIitemPtr\fR arguments have the usual meaning.
|
||||
\fIdisplay\fR identifies the display containing the canvas, and
|
||||
\fIdst\fR specifies a drawable in which the item should be rendered;
|
||||
@@ -398,28 +340,25 @@ of \fIdst\fR.
|
||||
.PP
|
||||
Normally an item's \fIdisplayProc\fR is only invoked if the item
|
||||
overlaps the area being displayed.
|
||||
However, if bit zero of \fItypePtr\->alwaysRedraw\fR is 1,
|
||||
(i.e.\|
|
||||
.QW "\fItypePtr\->alwaysRedraw & 1 == 1\fR" )
|
||||
then \fIdisplayProc\fR is invoked during every redisplay operation,
|
||||
even if the item does not overlap the area of redisplay; this is useful for
|
||||
cases such as window items, where the subwindow needs to be unmapped when it
|
||||
is off the screen.
|
||||
However, if \fItypePtr->alwaysRedraw\fR has a non-zero value, then
|
||||
\fIdisplayProc\fR is invoked during every redisplay operation,
|
||||
even if the item does not overlap the area of redisplay.
|
||||
\fIalwaysRedraw\fR should normally be set to 0; it is only
|
||||
set to 1 in special cases such as window items that need to be
|
||||
unmapped when they are off-screen.
|
||||
.SS POINTPROC
|
||||
.PP
|
||||
\fItypePtr\->pointProc\fR is invoked by Tk to find out how close
|
||||
\fItypePtr->pointProc\fR is invoked by Tk to find out how close
|
||||
a given point is to a canvas item.
|
||||
Tk uses this procedure for purposes such as locating the item
|
||||
under the mouse or finding the closest item to a given point.
|
||||
The procedure must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef double \fBTk_ItemPointProc\fR(
|
||||
typedef double Tk_ItemPointProc(
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
double *\fIpointPtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
\fIcanvas\fR and \fIitemPtr\fR have the usual meaning.
|
||||
\fIpointPtr\fR points to an array of two numbers giving
|
||||
the x and y coordinates of a point.
|
||||
@@ -428,17 +367,15 @@ from the point to the item, or 0 if the point lies inside
|
||||
the item.
|
||||
.SS AREAPROC
|
||||
.PP
|
||||
\fItypePtr\->areaProc\fR is invoked by Tk to find out the relationship
|
||||
\fItypePtr->areaProc\fR is invoked by Tk to find out the relationship
|
||||
between an item and a rectangular area.
|
||||
It must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTk_ItemAreaProc\fR(
|
||||
typedef int Tk_ItemAreaProc(
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
double *\fIrectPtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
\fIcanvas\fR and \fIitemPtr\fR have the usual meaning.
|
||||
\fIrectPtr\fR points to an array of four real numbers;
|
||||
the first two give the x and y coordinates of the upper left
|
||||
@@ -449,24 +386,22 @@ the given area, 0 if it lies partially inside and partially
|
||||
outside the area, and 1 if it lies entirely inside the area.
|
||||
.SS POSTSCRIPTPROC
|
||||
.PP
|
||||
\fItypePtr\->postscriptProc\fR is invoked by Tk to generate
|
||||
\fItypePtr->postscriptProc\fR is invoked by Tk to generate
|
||||
Postscript for an item during the \fBpostscript\fR widget command.
|
||||
If the type manager is not capable of generating Postscript then
|
||||
\fItypePtr\->postscriptProc\fR should be NULL.
|
||||
\fItypePtr->postscriptProc\fR should be NULL.
|
||||
The procedure must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTk_ItemPostscriptProc\fR(
|
||||
typedef int Tk_ItemPostscriptProc(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
int \fIprepass\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIinterp\fR, \fIcanvas\fR, and \fIitemPtr\fR arguments all have
|
||||
standard meanings; \fIprepass\fR will be described below.
|
||||
If \fIpostscriptProc\fR completes successfully, it should append
|
||||
Postscript for the item to the information in the interpreter result
|
||||
Postscript for the item to the information in \fIinterp->result\fR
|
||||
(e.g. by calling \fBTcl_AppendResult\fR, not \fBTcl_SetResult\fR)
|
||||
and return \fBTCL_OK\fR.
|
||||
If an error occurs, \fIpostscriptProc\fR should clear the result
|
||||
@@ -500,13 +435,11 @@ all Postscript generation except for calls to \fBTk_CanvasPsFont\fR.
|
||||
During the second pass \fIprepass\fR will be 0, so the type manager
|
||||
must generate complete Postscript.
|
||||
.SS SCALEPROC
|
||||
.PP
|
||||
\fItypePtr\->scaleProc\fR is invoked by Tk to rescale a canvas item
|
||||
\fItypePtr->scaleProc\fR is invoked by Tk to rescale a canvas item
|
||||
during the \fBscale\fR widget command.
|
||||
The procedure must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTk_ItemScaleProc\fR(
|
||||
typedef void Tk_ItemScaleProc(
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
double \fIoriginX\fR,
|
||||
@@ -514,7 +447,6 @@ typedef void \fBTk_ItemScaleProc\fR(
|
||||
double \fIscaleX\fR,
|
||||
double \fIscaleY\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIcanvas\fR and \fIitemPtr\fR arguments have the usual meaning.
|
||||
\fIoriginX\fR and \fIoriginY\fR specify an origin relative to which
|
||||
the item is to be scaled, and \fIscaleX\fR and \fIscaleY\fR give the
|
||||
@@ -522,108 +454,93 @@ x and y scale factors.
|
||||
The item should adjust its coordinates so that a point in the item
|
||||
that used to have coordinates \fIx\fR and \fIy\fR will have new
|
||||
coordinates \fIx\(fm\fR and \fIy\(fm\fR, where
|
||||
.PP
|
||||
.CS
|
||||
\fIx\(fm\fR = \fIoriginX\fR + \fIscaleX\fR \(mu (\fIx\fR \(mi \fIoriginX\fR)
|
||||
\fIy\(fm\fR = \fIoriginY\fR + \fIscaleY\fR \(mu (\fIy\fR \(mi \fIoriginY\fR)
|
||||
\fIx\(fm = originX + scaleX*(x-originX)
|
||||
y\(fm = originY + scaleY*(y-originY)\fR
|
||||
.CE
|
||||
.PP
|
||||
\fIscaleProc\fR must also update the bounding box in the item's
|
||||
header.
|
||||
.SS TRANSLATEPROC
|
||||
.PP
|
||||
\fItypePtr\->translateProc\fR is invoked by Tk to translate a canvas item
|
||||
\fItypePtr->translateProc\fR is invoked by Tk to translate a canvas item
|
||||
during the \fBmove\fR widget command.
|
||||
The procedure must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTk_ItemTranslateProc\fR(
|
||||
typedef void Tk_ItemTranslateProc(
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
double \fIdeltaX\fR,
|
||||
double \fIdeltaY\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIcanvas\fR and \fIitemPtr\fR arguments have the usual meaning,
|
||||
and \fIdeltaX\fR and \fIdeltaY\fR give the amounts that should be
|
||||
added to each x and y coordinate within the item.
|
||||
The type manager should adjust the item's coordinates and
|
||||
update the bounding box in the item's header.
|
||||
.SS INDEXPROC
|
||||
.PP
|
||||
\fItypePtr\->indexProc\fR is invoked by Tk to translate a string
|
||||
\fItypePtr->indexProc\fR is invoked by Tk to translate a string
|
||||
index specification into a numerical index, for example during the
|
||||
\fBindex\fR widget command.
|
||||
It is only relevant for item types that support indexable text or coordinates;
|
||||
\fItypePtr\->indexProc\fR may be specified as NULL for non-textual
|
||||
item types if they do not support detailed coordinate addressing.
|
||||
It is only relevant for item types that support indexable text;
|
||||
\fItypePtr->indexProc\fR may be specified as NULL for non-textual
|
||||
item types.
|
||||
The procedure must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTk_ItemIndexProc\fR(
|
||||
typedef int Tk_ItemIndexProc(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
Tcl_Obj *\fIindexObj\fR,
|
||||
char \fIindexString\fR,
|
||||
int *\fIindexPtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIinterp\fR, \fIcanvas\fR, and \fIitemPtr\fR arguments all
|
||||
have the usual meaning.
|
||||
\fIindexObj\fR contains a textual description of an index,
|
||||
\fIindexString\fR contains a textual description of an index,
|
||||
and \fIindexPtr\fR points to an integer value that should be
|
||||
filled in with a numerical index.
|
||||
Note that if \fBTK_CONFIG_OBJS\fR is not set in the
|
||||
\fItypePtr\->alwaysRedraw\fR field, the \fIindexObj\fR parameter will
|
||||
actually contain a pointer to a constant string.
|
||||
It is up to the type manager to decide what forms of index
|
||||
are supported (e.g., numbers, \fBinsert\fR, \fBsel.first\fR,
|
||||
\fBend\fR, etc.).
|
||||
\fIindexProc\fR should return a Tcl completion code and set
|
||||
the interpreter result in the event of an error.
|
||||
\fIinterp->result\fR in the event of an error.
|
||||
.SS ICURSORPROC
|
||||
.PP
|
||||
\fItypePtr\->icursorProc\fR is invoked by Tk during
|
||||
\fItypePtr->icursorProc\fR is invoked by Tk during
|
||||
the \fBicursor\fR widget command to set the position of the
|
||||
insertion cursor in a textual item.
|
||||
It is only relevant for item types that support an insertion cursor;
|
||||
\fItypePtr\->icursorProc\fR may be specified as NULL for item types
|
||||
\fItypePtr->icursorProc\fR may be specified as NULL for item types
|
||||
that do not support an insertion cursor.
|
||||
The procedure must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTk_ItemCursorProc\fR(
|
||||
typedef void Tk_ItemCursorProc(
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
int \fIindex\fR);
|
||||
.CE
|
||||
.PP
|
||||
\fIcanvas\fR and \fIitemPtr\fR have the usual meanings, and
|
||||
\fIindex\fR is an index into the item's text, as returned by a
|
||||
previous call to \fItypePtr\->insertProc\fR.
|
||||
previous call to \fItypePtr->insertProc\fR.
|
||||
The type manager should position the insertion cursor in the
|
||||
item just before the character given by \fIindex\fR.
|
||||
Whether or not to actually display the insertion cursor is
|
||||
determined by other information provided by \fBTk_CanvasGetTextInfo\fR.
|
||||
.SS SELECTIONPROC
|
||||
.PP
|
||||
\fItypePtr\->selectionProc\fR is invoked by Tk during selection
|
||||
\fItypePtr->selectionProc\fR is invoked by Tk during selection
|
||||
retrievals; it must return part or all of the selected text in
|
||||
the item (if any).
|
||||
It is only relevant for item types that support text;
|
||||
\fItypePtr\->selectionProc\fR may be specified as NULL for non-textual
|
||||
\fItypePtr->selectionProc\fR may be specified as NULL for non-textual
|
||||
item types.
|
||||
The procedure must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTk_ItemSelectionProc\fR(
|
||||
typedef int Tk_ItemSelectionProc(
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
int \fIoffset\fR,
|
||||
char *\fIbuffer\fR,
|
||||
int \fImaxBytes\fR);
|
||||
.CE
|
||||
.PP
|
||||
\fIcanvas\fR and \fIitemPtr\fR have the usual meanings.
|
||||
\fIoffset\fR is an offset in bytes into the selection where 0 refers
|
||||
to the first byte of the selection; it identifies
|
||||
@@ -638,55 +555,45 @@ be less than \fImaxBytes\fR if there are not \fIoffset+maxBytes\fR bytes
|
||||
in the selection.
|
||||
.SS INSERTPROC
|
||||
.PP
|
||||
\fItypePtr\->insertProc\fR is invoked by Tk during
|
||||
the \fBinsert\fR widget command to insert new text or coordinates into a
|
||||
\fItypePtr->insertProc\fR is invoked by Tk during
|
||||
the \fBinsert\fR widget command to insert new text into a
|
||||
canvas item.
|
||||
It is only relevant for item types that support the \fBinsert\fR method;
|
||||
\fItypePtr\->insertProc\fR may be specified as NULL for other
|
||||
It is only relevant for item types that support text;
|
||||
\fItypePtr->insertProc\fR may be specified as NULL for non-textual
|
||||
item types.
|
||||
The procedure must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTk_ItemInsertProc\fR(
|
||||
typedef void Tk_ItemInsertProc(
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
int \fIindex\fR,
|
||||
Tcl_Obj *\fIobj\fR);
|
||||
char *\fIstring\fR);
|
||||
.CE
|
||||
.PP
|
||||
\fIcanvas\fR and \fIitemPtr\fR have the usual meanings.
|
||||
\fIindex\fR is an index into the item's text, as returned by a
|
||||
previous call to \fItypePtr\->insertProc\fR, and \fIobj\fR
|
||||
previous call to \fItypePtr->insertProc\fR, and \fIstring\fR
|
||||
contains new text to insert just before the character given
|
||||
by \fIindex\fR.
|
||||
Note that if \fBTK_CONFIG_OBJS\fR is not set in the
|
||||
\fItypePtr\->alwaysRedraw\fR field, the \fIobj\fR parameter will
|
||||
actually contain a pointer to a constant string to be inserted.
|
||||
If the item supports modification of the coordinates list by this
|
||||
.PP
|
||||
The type manager should insert the text and recompute the bounding
|
||||
box in the item's header.
|
||||
.SS DCHARSPROC
|
||||
.PP
|
||||
\fItypePtr\->dCharsProc\fR is invoked by Tk during the \fBdchars\fR
|
||||
widget command to delete a range of text from a canvas item or a range of
|
||||
coordinates from a pathed item.
|
||||
\fItypePtr->dCharsProc\fR is invoked by Tk during the \fBdchars\fR
|
||||
widget command to delete a range of text from a canvas item.
|
||||
It is only relevant for item types that support text;
|
||||
\fItypePtr\->dCharsProc\fR may be specified as NULL for non-textual
|
||||
item types that do not want to support coordinate deletion.
|
||||
\fItypePtr->dCharsProc\fR may be specified as NULL for non-textual
|
||||
item types.
|
||||
The procedure must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTk_ItemDCharsProc\fR(
|
||||
typedef void Tk_ItemDCharsProc(
|
||||
Tk_Canvas \fIcanvas\fR,
|
||||
Tk_Item *\fIitemPtr\fR,
|
||||
int \fIfirst\fR,
|
||||
int \fIlast\fR);
|
||||
.CE
|
||||
.PP
|
||||
\fIcanvas\fR and \fIitemPtr\fR have the usual meanings.
|
||||
\fIfirst\fR and \fIlast\fR give the indices of the first and last bytes
|
||||
to be deleted, as returned by previous calls to \fItypePtr\->indexProc\fR.
|
||||
to be deleted, as returned by previous calls to \fItypePtr->indexProc\fR.
|
||||
The type manager should delete the specified characters and update
|
||||
the bounding box in the item's header.
|
||||
.SH "SEE ALSO"
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
'\" Department of Computer Science,
|
||||
'\" Australian National University.
|
||||
'\"
|
||||
.TH Tk_CreatePhotoImageFormat 3 8.5 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CreatePhotoImageFormat 3 8.5 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CreatePhotoImageFormat \- define new file format for photo images
|
||||
@@ -20,10 +20,11 @@ Tk_CreatePhotoImageFormat \- define new file format for photo images
|
||||
.sp
|
||||
\fBTk_CreatePhotoImageFormat\fR(\fIformatPtr\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS "const Tk_PhotoImageFormat" *formatPtr
|
||||
.AP "const Tk_PhotoImageFormat" *formatPtr in
|
||||
.AS Tk_PhotoImageFormat *formatPtr
|
||||
.AP Tk_PhotoImageFormat *formatPtr in
|
||||
Structure that defines the new file format.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_CreatePhotoImageFormat\fR is invoked to define a new file format
|
||||
@@ -45,14 +46,14 @@ handler to deal with files and strings in this format. The
|
||||
Tk_PhotoImageFormat structure contains the following fields:
|
||||
.CS
|
||||
typedef struct Tk_PhotoImageFormat {
|
||||
const char *\fIname\fR;
|
||||
char *\fIname\fR;
|
||||
Tk_ImageFileMatchProc *\fIfileMatchProc\fR;
|
||||
Tk_ImageStringMatchProc *\fIstringMatchProc\fR;
|
||||
Tk_ImageFileReadProc *\fIfileReadProc\fR;
|
||||
Tk_ImageStringReadProc *\fIstringReadProc\fR;
|
||||
Tk_ImageFileWriteProc *\fIfileWriteProc\fR;
|
||||
Tk_ImageStringWriteProc *\fIstringWriteProc\fR;
|
||||
} \fBTk_PhotoImageFormat\fR;
|
||||
} Tk_PhotoImageFormat;
|
||||
.CE
|
||||
.PP
|
||||
The handler need not provide implementations of all six procedures.
|
||||
@@ -64,7 +65,8 @@ structure should be set to NULL. The handler must provide the
|
||||
\fIfileMatchProc\fR procedure if it provides the \fIfileReadProc\fR
|
||||
procedure, and the \fIstringMatchProc\fR procedure if it provides the
|
||||
\fIstringReadProc\fR procedure.
|
||||
.SS NAME
|
||||
|
||||
.SH NAME
|
||||
.PP
|
||||
\fIformatPtr->name\fR provides a name for the image type.
|
||||
Once \fBTk_CreatePhotoImageFormat\fR returns, this name may be used
|
||||
@@ -75,14 +77,14 @@ the \fB\-format\fR option. The first character of \fIformatPtr->name\fR
|
||||
must not be an uppercase character from the ASCII character set
|
||||
(that is, one of the characters \fBA\fR-\fBZ\fR). Such names are used
|
||||
only for legacy interface support (see below).
|
||||
.SS FILEMATCHPROC
|
||||
.PP
|
||||
|
||||
.SH FILEMATCHPROC
|
||||
\fIformatPtr->fileMatchProc\fR provides the address of a procedure for
|
||||
Tk to call when it is searching for an image file format handler
|
||||
suitable for reading data in a given file.
|
||||
\fIformatPtr->fileMatchProc\fR must match the following prototype:
|
||||
.CS
|
||||
typedef int \fBTk_ImageFileMatchProc\fR(
|
||||
typedef int Tk_ImageFileMatchProc(
|
||||
Tcl_Channel \fIchan\fR,
|
||||
const char *\fIfileName\fR,
|
||||
Tcl_Obj *\fIformat\fR,
|
||||
@@ -98,14 +100,14 @@ If the data in the file appears to be in the format supported by this
|
||||
handler, the \fIformatPtr->fileMatchProc\fR procedure should store the
|
||||
width and height of the image in *\fIwidthPtr\fR and *\fIheightPtr\fR
|
||||
respectively, and return 1. Otherwise it should return 0.
|
||||
.SS STRINGMATCHPROC
|
||||
.PP
|
||||
|
||||
.SH STRINGMATCHPROC
|
||||
\fIformatPtr->stringMatchProc\fR provides the address of a procedure for
|
||||
Tk to call when it is searching for an image file format handler for
|
||||
suitable for reading data from a given string.
|
||||
\fIformatPtr->stringMatchProc\fR must match the following prototype:
|
||||
.CS
|
||||
typedef int \fBTk_ImageStringMatchProc\fR(
|
||||
typedef int Tk_ImageStringMatchProc(
|
||||
Tcl_Obj *\fIdata\fR,
|
||||
Tcl_Obj *\fIformat\fR,
|
||||
int *\fIwidthPtr\fR,
|
||||
@@ -120,13 +122,13 @@ this handler, the \fIformatPtr->stringMatchProc\fR procedure should
|
||||
store the width and height of the image in *\fIwidthPtr\fR and
|
||||
*\fIheightPtr\fR respectively, and return 1. Otherwise it should
|
||||
return 0.
|
||||
.SS FILEREADPROC
|
||||
.PP
|
||||
|
||||
.SH FILEREADPROC
|
||||
\fIformatPtr->fileReadProc\fR provides the address of a procedure for
|
||||
Tk to call to read data from an image file into a photo image.
|
||||
\fIformatPtr->fileReadProc\fR must match the following prototype:
|
||||
.CS
|
||||
typedef int \fBTk_ImageFileReadProc\fR(
|
||||
typedef int Tk_ImageFileReadProc(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tcl_Channel \fIchan\fR,
|
||||
const char *\fIfileName\fR,
|
||||
@@ -149,13 +151,13 @@ coordinates (\fIsrcX\fR,\fIsrcY\fR). It is to be stored in the photo
|
||||
image with its top-left corner at coordinates
|
||||
(\fIdestX\fR,\fIdestY\fR) using the \fBTk_PhotoPutBlock\fR procedure.
|
||||
The return value is a standard Tcl return value.
|
||||
.SS STRINGREADPROC
|
||||
.PP
|
||||
|
||||
.SH STRINGREADPROC
|
||||
\fIformatPtr->stringReadProc\fR provides the address of a procedure for
|
||||
Tk to call to read data from a string into a photo image.
|
||||
\fIformatPtr->stringReadProc\fR must match the following prototype:
|
||||
.CS
|
||||
typedef int \fBTk_ImageStringReadProc\fR(
|
||||
typedef int Tk_ImageStringReadProc(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tcl_Obj *\fIdata\fR,
|
||||
Tcl_Obj *\fIformat\fR,
|
||||
@@ -177,13 +179,13 @@ coordinates (\fIsrcX\fR,\fIsrcY\fR). It is to be stored in the photo
|
||||
image with its top-left corner at coordinates
|
||||
(\fIdestX\fR,\fIdestY\fR) using the \fBTk_PhotoPutBlock\fR procedure.
|
||||
The return value is a standard Tcl return value.
|
||||
.SS FILEWRITEPROC
|
||||
.PP
|
||||
|
||||
.SH FILEWRITEPROC
|
||||
\fIformatPtr->fileWriteProc\fR provides the address of a procedure for
|
||||
Tk to call to write data from a photo image to a file.
|
||||
\fIformatPtr->fileWriteProc\fR must match the following prototype:
|
||||
.CS
|
||||
typedef int \fBTk_ImageFileWriteProc\fR(
|
||||
typedef int Tk_ImageFileWriteProc(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
const char *\fIfileName\fR,
|
||||
Tcl_Obj *\fIformat\fR,
|
||||
@@ -202,13 +204,13 @@ after the name of the format. If appropriate, the
|
||||
\fIformatPtr->fileWriteProc\fR procedure may interpret these
|
||||
characters to specify further details about the image file.
|
||||
The return value is a standard Tcl return value.
|
||||
.SS STRINGWRITEPROC
|
||||
.PP
|
||||
|
||||
.SH STRINGWRITEPROC
|
||||
\fIformatPtr->stringWriteProc\fR provides the address of a procedure for
|
||||
Tk to call to translate image data from a photo image into a string.
|
||||
\fIformatPtr->stringWriteProc\fR must match the following prototype:
|
||||
.CS
|
||||
typedef int \fBTk_ImageStringWriteProc\fR(
|
||||
typedef int Tk_ImageStringWriteProc(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tcl_Obj *\fIformat\fR,
|
||||
Tk_PhotoImageBlock *\fIblockPtr\fR);
|
||||
@@ -226,8 +228,8 @@ after the name of the format. If appropriate, the
|
||||
\fIformatPtr->stringWriteProc\fR procedure may interpret these
|
||||
characters to specify further details about the image file.
|
||||
The return value is a standard Tcl return value.
|
||||
|
||||
.SH "LEGACY INTERFACE SUPPORT"
|
||||
.PP
|
||||
In Tk 8.2 and earlier, the definition of all the function pointer
|
||||
types stored in fields of a \fBTk_PhotoImageFormat\fR struct were
|
||||
incompatibly different. Legacy programs and libraries dating from
|
||||
@@ -264,7 +266,9 @@ use Tk 8.4 headers and stub libraries to do so.
|
||||
.PP
|
||||
Any new code written today should not make use of the legacy
|
||||
interfaces. Expect their support to go away in Tk 9.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
Tk_FindPhoto, Tk_PhotoPutBlock
|
||||
|
||||
.SH KEYWORDS
|
||||
photo image, image file
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CreateSelHandler 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CreateSelHandler 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CreateSelHandler, Tk_DeleteSelHandler \- arrange to handle requests for a selection
|
||||
@@ -54,7 +54,7 @@ the selection. The most common form is STRING.
|
||||
\fIProc\fR should have arguments and result that match the
|
||||
type \fBTk_SelectionProc\fR:
|
||||
.CS
|
||||
typedef int \fBTk_SelectionProc\fR(
|
||||
typedef int Tk_SelectionProc(
|
||||
ClientData \fIclientData\fR,
|
||||
int \fIoffset\fR,
|
||||
char *\fIbuffer\fR,
|
||||
@@ -112,5 +112,6 @@ existing handler is replaced with a new one.
|
||||
\fBTk_DeleteSelHandler\fR removes the handler given by \fItkwin\fR,
|
||||
\fIselection\fR, and \fItarget\fR, if such a handler exists.
|
||||
If there is no such handler then it has no effect.
|
||||
|
||||
.SH KEYWORDS
|
||||
format, handler, selection, target
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CreateWindow 3 4.2 Tk "Tk Library Procedures"
|
||||
.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
|
||||
@@ -58,8 +58,8 @@ 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.
|
||||
is returned and \fIinterp->result\fR is modified to hold an error
|
||||
message.
|
||||
.PP
|
||||
Tk supports two different kinds of windows: internal
|
||||
windows and top-level windows.
|
||||
@@ -86,7 +86,7 @@ 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 manipulatable
|
||||
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.
|
||||
@@ -141,6 +141,7 @@ 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
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_DeleteImage 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_DeleteImage 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_DeleteImage \- Destroy an image.
|
||||
@@ -21,11 +21,13 @@ Interpreter for which the image was created.
|
||||
.AP "const char" *name in
|
||||
Name of the image.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_DeleteImage\fR deletes the image given by \fIinterp\fR
|
||||
and \fIname\fR, if there is one. All instances of that image
|
||||
will redisplay as empty regions. If the given image does not
|
||||
exist then the procedure has no effect.
|
||||
|
||||
.SH KEYWORDS
|
||||
delete image, image manager
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_DrawFocusHighlight 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_DrawFocusHighlight 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_DrawFocusHighlight \- draw the traversal highlight ring for a widget
|
||||
@@ -27,10 +27,12 @@ Width of the highlight ring, in pixels.
|
||||
Drawable in which to draw the highlight; usually an offscreen
|
||||
pixmap for double buffering.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_DrawFocusHighlight\fR is a utility procedure that draws the
|
||||
traversal highlight ring for a widget.
|
||||
It is typically invoked by widgets during redisplay.
|
||||
|
||||
.SH KEYWORDS
|
||||
focus, traversal highlight
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_CreateEventHandler 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_CreateEventHandler 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CreateEventHandler, Tk_DeleteEventHandler \- associate procedure callback with an X event
|
||||
@@ -30,6 +30,7 @@ in the window given by \fItkwin\fR.
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_CreateEventHandler\fR arranges for \fIproc\fR to be
|
||||
@@ -38,13 +39,13 @@ by \fImask\fR occurs in the window specified by \fItkwin\fR.
|
||||
The callback to \fIproc\fR will be made by \fBTk_HandleEvent\fR;
|
||||
this mechanism only works in programs that dispatch events
|
||||
through \fBTk_HandleEvent\fR (or through other Tk procedures that
|
||||
call \fBTk_HandleEvent\fR, such as \fBTcl_DoOneEvent\fR or
|
||||
call \fBTk_HandleEvent\fR, such as \fBTk_DoOneEvent\fR or
|
||||
\fBTk_MainLoop\fR).
|
||||
.PP
|
||||
\fIProc\fR should have arguments and result that match the
|
||||
type \fBTk_EventProc\fR:
|
||||
.CS
|
||||
typedef void \fBTk_EventProc\fR(
|
||||
typedef void Tk_EventProc(
|
||||
ClientData \fIclientData\fR,
|
||||
XEvent *\fIeventPtr\fR);
|
||||
.CE
|
||||
@@ -71,5 +72,6 @@ automatically; in this case there is no need to call
|
||||
If multiple handlers are declared for the same type of X event
|
||||
on the same window, then the handlers will be invoked in the
|
||||
order they were created.
|
||||
|
||||
.SH KEYWORDS
|
||||
bind, callback, event, handler
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
'\" Department of Computer Science,
|
||||
'\" Australian National University.
|
||||
'\"
|
||||
.TH Tk_FindPhoto 3 8.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_FindPhoto 3 8.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_FindPhoto, Tk_PhotoPutBlock, Tk_PhotoPutZoomedBlock, Tk_PhotoGetImage, Tk_PhotoBlank, Tk_PhotoExpand, Tk_PhotoGetSize, Tk_PhotoSetSize \- manipulate the image data stored in a photo image.
|
||||
@@ -21,6 +21,7 @@ Tk_FindPhoto, Tk_PhotoPutBlock, Tk_PhotoPutZoomedBlock, Tk_PhotoGetImage, Tk_Pho
|
||||
Tk_PhotoHandle
|
||||
\fBTk_FindPhoto\fR(\fIinterp, imageName\fR)
|
||||
.sp
|
||||
.VS 8.5
|
||||
int
|
||||
\fBTk_PhotoPutBlock\fR(\fIinterp, handle, blockPtr, x, y, width, height,\
|
||||
compRule\fR)
|
||||
@@ -28,6 +29,7 @@ compRule\fR)
|
||||
int
|
||||
\fBTk_PhotoPutZoomedBlock\fR(\fIinterp, handle, blockPtr, x, y, width, height,\
|
||||
zoomX, zoomY, subsampleX, subsampleY, compRule\fR)
|
||||
.VE 8.5
|
||||
.sp
|
||||
int
|
||||
\fBTk_PhotoGetImage\fR(\fIhandle, blockPtr\fR)
|
||||
@@ -35,14 +37,18 @@ int
|
||||
void
|
||||
\fBTk_PhotoBlank\fR(\fIhandle\fR)
|
||||
.sp
|
||||
.VS 8.5
|
||||
int
|
||||
\fBTk_PhotoExpand\fR(\fIinterp, handle, width, height\fR)
|
||||
.VE 8.5
|
||||
.sp
|
||||
void
|
||||
\fBTk_PhotoGetSize\fR(\fIhandle, widthPtr, heightPtr\fR)
|
||||
.sp
|
||||
.VS 8.5
|
||||
int
|
||||
\fBTk_PhotoSetSize\fR(\fIinterp. handle, width, height\fR)
|
||||
.VE 8.5
|
||||
.SH ARGUMENTS
|
||||
.AS Tk_PhotoImageBlock window_path
|
||||
.AP Tcl_Interp *interp in
|
||||
@@ -93,14 +99,13 @@ being written to the photo image.
|
||||
Specifies the zoom factor to be applied in the Y direction to pixels
|
||||
being written to the photo image.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_FindPhoto\fR returns an opaque handle that is used to identify a
|
||||
particular photo image to the other procedures. The parameter is the
|
||||
name of the image, that is, the name specified to the \fBimage create
|
||||
photo\fR command, or assigned by that command if no name was specified.
|
||||
If \fIimageName\fR does not exist or is not a photo image,
|
||||
\fBTk_FindPhoto\fR returns NULL.
|
||||
.PP
|
||||
\fBTk_PhotoPutBlock\fR is used to supply blocks of image data to be
|
||||
displayed. The call affects an area of the image of size
|
||||
@@ -123,30 +128,21 @@ typedef struct {
|
||||
int \fIheight\fR;
|
||||
int \fIpitch\fR;
|
||||
int \fIpixelSize\fR;
|
||||
int \fIoffset\fR[4];
|
||||
} \fBTk_PhotoImageBlock\fR;
|
||||
int \fIoffset[4]\fR;
|
||||
} Tk_PhotoImageBlock;
|
||||
.CE
|
||||
The \fIpixelPtr\fR field points to the first pixel, that is, the
|
||||
top-left pixel in the block.
|
||||
The \fIwidth\fR and \fIheight\fR fields specify the dimensions of the
|
||||
block of pixels. The \fIpixelSize\fR field specifies the address
|
||||
difference between two horizontally adjacent pixels. It should be 4 for
|
||||
RGB and 2 for grayscale image data. Other values are possible, if the
|
||||
offsets in the \fIoffset\fR array are adjusted accordingly (e.g. for
|
||||
red, green and blue data stored in different planes). Using such a
|
||||
layout is strongly discouraged, though. Due to a bug, it might not work
|
||||
correctly if an alpha channel is provided. (see the \fBBUGS\fR section
|
||||
below). The \fIpitch\fR field specifies the
|
||||
difference between two horizontally adjacent pixels. Often it is 3
|
||||
or 4, but it can have any value. The \fIpitch\fR field specifies the
|
||||
address difference between two vertically adjacent pixels. The
|
||||
\fIoffset\fR array contains the offsets from the address of a pixel
|
||||
to the addresses of the bytes containing the red, green, blue and alpha
|
||||
(transparency) components. If the offsets for red, green and blue are
|
||||
equal, the image is interpreted as grayscale. If they differ, RGB data
|
||||
is assumed. Normally the offsets will be 0, 1, 2, 3 for RGB data
|
||||
and 0, 0, 0, 1 for grayscale. It is possible to provide image data
|
||||
without an alpha channel by setting the offset for alpha to a negative
|
||||
value and adjusting the \fIpixelSize\fR field accordingly. This use is
|
||||
discouraged, though (see the \fBBUGS\fR section below).
|
||||
(transparency) components. These are normally 0, 1, 2 and 3, but can
|
||||
have other values, e.g., for images that are stored as separate red,
|
||||
green and blue planes.
|
||||
.PP
|
||||
The \fIcompRule\fR parameter to \fBTk_PhotoPutBlock\fR specifies a
|
||||
compositing rule that says what to do with transparent pixels. The
|
||||
@@ -165,10 +161,12 @@ given are replicated (in a tiled fashion) to fill the specified area.
|
||||
These rules operate independently in the horizontal and vertical
|
||||
directions.
|
||||
.PP
|
||||
.VS 8.5
|
||||
\fBTk_PhotoPutBlock\fR normally returns \fBTCL_OK\fR, though if it cannot
|
||||
allocate sufficient memory to hold the resulting image, \fBTCL_ERROR\fR is
|
||||
returned instead and, if the \fIinterp\fR argument is non-NULL, an
|
||||
error message is placed in the interpreter's result.
|
||||
.VE 8.5
|
||||
.PP
|
||||
\fBTk_PhotoPutZoomedBlock\fR works like \fBTk_PhotoPutBlock\fR except that
|
||||
the image can be reduced or enlarged for display. The
|
||||
@@ -192,18 +190,6 @@ in the structure pointed to by the \fIblockPtr\fR parameter with values
|
||||
that describe the address and layout of the image data that the
|
||||
photo image has stored internally. The values are valid
|
||||
until the image is destroyed or its size is changed.
|
||||
.PP
|
||||
It is possible to modify an image by writing directly to the data
|
||||
the \fIpixelPtr\fR field points to. The size of the image cannot be
|
||||
changed this way, though.
|
||||
Also, changes made by writing directly to \fIpixelPtr\fR will not be
|
||||
immediately visible, but only after a call to
|
||||
\fBTk_ImageChanged\fR or after an event that causes the interested
|
||||
widgets to redraw themselves.
|
||||
For these reasons usually it is preferable to make changes to
|
||||
a copy of the image data and write it back with
|
||||
\fBTk_PhotoPutBlock\fR or \fBTk_PhotoPutZoomedBlock\fR.
|
||||
.PP
|
||||
\fBTk_PhotoGetImage\fR returns 1 for compatibility with the
|
||||
corresponding procedure in the old photo widget.
|
||||
.PP
|
||||
@@ -221,10 +207,12 @@ are being supplied in many small blocks, it is more efficient to use
|
||||
allowing the image to expand in many small increments as image blocks
|
||||
are supplied.
|
||||
.PP
|
||||
.VS 8.5
|
||||
\fBTk_PhotoExpand\fR normally returns \fBTCL_OK\fR, though if it cannot
|
||||
allocate sufficient memory to hold the resulting image, \fBTCL_ERROR\fR is
|
||||
returned instead and, if the \fIinterp\fR argument is non-NULL, an
|
||||
error message is placed in the interpreter's result.
|
||||
.VE 8.5
|
||||
.PP
|
||||
\fBTk_PhotoSetSize\fR specifies the size of the image, as if the user
|
||||
had specified the given \fIwidth\fR and \fIheight\fR values to the
|
||||
@@ -234,13 +222,16 @@ or height, but allows the width or height to be changed by subsequent
|
||||
calls to \fBTk_PhotoPutBlock\fR, \fBTk_PhotoPutZoomedBlock\fR or
|
||||
\fBTk_PhotoExpand\fR.
|
||||
.PP
|
||||
.VS 8.5
|
||||
\fBTk_PhotoSetSize\fR normally returns \fBTCL_OK\fR, though if it cannot
|
||||
allocate sufficient memory to hold the resulting image, \fBTCL_ERROR\fR is
|
||||
returned instead and, if the \fIinterp\fR argument is non-NULL, an
|
||||
error message is placed in the interpreter's result.
|
||||
.VE 8.5
|
||||
.PP
|
||||
\fBTk_PhotoGetSize\fR returns the dimensions of the image in
|
||||
*\fIwidthPtr\fR and *\fIheightPtr\fR.
|
||||
|
||||
.SH PORTABILITY
|
||||
.PP
|
||||
In Tk 8.3 and earlier, \fBTk_PhotoPutBlock\fR and
|
||||
@@ -250,6 +241,7 @@ your code, compile it with the flag
|
||||
-DUSE_COMPOSITELESS_PHOTO_PUT_BLOCK. Code linked using Stubs against
|
||||
older versions of Tk will continue to work.
|
||||
.PP
|
||||
.VS 8.5
|
||||
In Tk 8.4, \fBTk_PhotoPutBlock\fR, \fBTk_PhotoPutZoomedBlock\fR,
|
||||
\fBTk_PhotoExpand\fR and \fBTk_PhotoSetSize\fR did not take an
|
||||
\fIinterp\fR argument or return any result code. If insufficient
|
||||
@@ -257,27 +249,12 @@ memory was available for an image, Tk would panic. This behaviour is
|
||||
still supported if you compile your extension with the additional flag
|
||||
-DUSE_PANIC_ON_PHOTO_ALLOC_FAILURE. Code linked using Stubs against
|
||||
older versions of Tk will continue to work.
|
||||
.SH BUGS
|
||||
The \fBTk_PhotoImageBlock\fR structure used to provide image data to
|
||||
\fBTk_PhotoPutBlock\fR promises great flexibility in the layout of the
|
||||
data (e.g. separate planes for the red, green, blue and alpha
|
||||
channels). Unfortunately, the implementation fails to hold this
|
||||
promise. The problem is that the \fIpixelSize\fR field is
|
||||
(incorrectly) used to determine whether the image has an alpha channel.
|
||||
Currently, if the offset for the alpha channel is greater or equal than
|
||||
\fIpixelSize\fR, \fBtk_PhotoPutblock\fR assumes no alpha data is
|
||||
present and makes the image fully opaque. This means that for layouts
|
||||
where the channels are separate (or any other exotic layout where
|
||||
\fIpixelSize\fR has to be smaller than the alpha offset), the alpha
|
||||
channel will not be read correctly. In order to be on the safe side
|
||||
if this issue will be corrected in a future release, it is strongly
|
||||
recommended you always provide alpha data - even if the image has no
|
||||
transparency - and only use the "standard" layout with a
|
||||
\fIpixelSize\fR of 2 for grayscale and 4 for RGB data with
|
||||
\fIoffset\fRs of 0, 0, 0, 1 or 0, 1, 2, 3 respectively.
|
||||
.VE 8.5
|
||||
|
||||
.SH CREDITS
|
||||
.PP
|
||||
The code for the photo image type was developed by Paul Mackerras,
|
||||
based on his earlier photo widget code.
|
||||
|
||||
.SH KEYWORDS
|
||||
photo, image
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_FontId 3 8.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_FontId 3 8.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_FontId, Tk_GetFontMetrics, Tk_PostscriptFontName \- accessor functions for
|
||||
@@ -65,7 +65,6 @@ following screen font families should print correctly:
|
||||
Any other font families may not print correctly because the computed
|
||||
Postscript font name may be incorrect or not exist on the printer.
|
||||
.SH "DATA STRUCTURES"
|
||||
.PP
|
||||
The \fBTk_FontMetrics\fR data structure is used by \fBTk_GetFontMetrics\fR to
|
||||
return information about a font and is defined as follows:
|
||||
.CS
|
||||
@@ -73,7 +72,7 @@ typedef struct Tk_FontMetrics {
|
||||
int \fIascent\fR;
|
||||
int \fIdescent\fR;
|
||||
int \fIlinespace\fR;
|
||||
} \fBTk_FontMetrics\fR;
|
||||
} Tk_FontMetrics;
|
||||
.CE
|
||||
.PP
|
||||
The \fIascent\fR field is the amount in pixels that the tallest
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_FreeXId 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_FreeXId 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_FreeXId \- make X resource identifier available for reuse
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GeometryRequest 3 "8.4" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GeometryRequest 3 "8.4" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GeometryRequest, Tk_SetMinimumRequestSize, Tk_SetInternalBorder, Tk_SetInternalBorderEx \- specify desired geometry or internal border for a window
|
||||
@@ -44,6 +44,7 @@ Space to leave for top side of internal border for \fItkwin\fR, in pixel units.
|
||||
.AP int bottom in
|
||||
Space to leave for bottom side of internal border for \fItkwin\fR, in pixel units.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_GeometryRequest\fR is called by widget code to indicate its
|
||||
@@ -88,5 +89,6 @@ The information specified in calls to \fBTk_GeometryRequest\fR,
|
||||
\fBTk_InternalBorderRight\fR, \fBTk_InternalBorderTop\fR and
|
||||
\fBTk_InternalBorderBottom\fR.
|
||||
See the \fBTk_WindowId\fR manual entry for details.
|
||||
|
||||
.SH KEYWORDS
|
||||
geometry, request
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetAnchorFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetAnchorFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetAnchorFromObj, Tk_GetAnchor, Tk_NameOfAnchor \- translate between strings and anchor positions
|
||||
@@ -28,20 +28,17 @@ const char *
|
||||
Interpreter to use for error reporting, or NULL.
|
||||
.AP Tcl_Obj *objPtr in/out
|
||||
String value contains name of anchor point:
|
||||
.QW \fBn\fR ,
|
||||
.QW \fBne\fR ,
|
||||
.QW \fBe\fR ,
|
||||
.QW \fBse\fR ,
|
||||
.QW \fBs\fR ,
|
||||
.QW \fBsw\fR ,
|
||||
.QW \fBw\fR ,
|
||||
.QW \fBnw\fR ,
|
||||
.QW n ,
|
||||
.QW ne ,
|
||||
.QW e ,
|
||||
.QW se ,
|
||||
.QW s ,
|
||||
.QW sw ,
|
||||
.QW w ,
|
||||
.QW nw ,
|
||||
or
|
||||
.QW \fBcenter\fR ;
|
||||
internal rep will be modified to cache corresponding Tk_Anchor. In the
|
||||
case of
|
||||
.QW \fBcenter\fR
|
||||
on input, a non-empty abbreviation of it may also be used on input.
|
||||
.QW center ;
|
||||
internal rep will be modified to cache corresponding Tk_Anchor.
|
||||
.AP "const char" *string in
|
||||
Same as \fIobjPtr\fR except description of anchor point is passed as
|
||||
a string.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_AllocBitmapFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_AllocBitmapFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_AllocBitmapFromObj, Tk_GetBitmap, Tk_GetBitmapFromObj, Tk_DefineBitmap, Tk_NameOfBitmap, Tk_SizeOfBitmap, Tk_FreeBitmapFromObj, Tk_FreeBitmap \- maintain database of single-plane pixmaps
|
||||
@@ -49,7 +49,7 @@ Same as \fIobjPtr\fR except description of bitmap is passed as a string and
|
||||
resulting Pixmap is not cached.
|
||||
.AP "const char" *name in
|
||||
Name for new bitmap to be defined.
|
||||
.AP "const void" *source in
|
||||
.AP "const char" *source in
|
||||
Data for bitmap, in standard bitmap format.
|
||||
Must be stored in static memory whose value will never change.
|
||||
.AP "int" width in
|
||||
@@ -66,6 +66,7 @@ Display for which \fIbitmap\fR was allocated.
|
||||
Identifier for a bitmap allocated by \fBTk_AllocBitmapFromObj\fR or
|
||||
\fBTk_GetBitmap\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures manage a collection of bitmaps (one-plane pixmaps)
|
||||
@@ -81,7 +82,7 @@ of the following forms:
|
||||
.TP 20
|
||||
\fB@\fIfileName\fR
|
||||
\fIFileName\fR must be the name of a file containing a bitmap
|
||||
description in the standard X11 format.
|
||||
description in the standard X11 or X10 format.
|
||||
.TP 20
|
||||
\fIname\fR
|
||||
\fIName\fR must be the name of a bitmap defined previously with
|
||||
@@ -209,7 +210,7 @@ describe the bitmap.
|
||||
\fBTk_DefineBitmap\fR normally returns \fBTCL_OK\fR; if an error occurs
|
||||
(e.g. a bitmap named \fInameId\fR has already been defined) then
|
||||
\fBTCL_ERROR\fR is returned and an error message is left in
|
||||
interpreter \fIinterp\fR's result.
|
||||
\fIinterp->result\fR.
|
||||
Note: \fBTk_DefineBitmap\fR expects the memory pointed to by
|
||||
\fIsource\fR to be static: \fBTk_DefineBitmap\fR does not make
|
||||
a private copy of this memory, but uses the bytes pointed to
|
||||
@@ -281,8 +282,8 @@ with its Pixmap token.
|
||||
There should be exactly one call to \fBTk_FreeBitmapFromObj\fR
|
||||
or \fBTk_FreeBitmap\fR for each call to \fBTk_AllocBitmapFromObj\fR or
|
||||
\fBTk_GetBitmap\fR.
|
||||
|
||||
.SH BUGS
|
||||
.PP
|
||||
In determining whether an existing bitmap can be used to satisfy
|
||||
a new request, \fBTk_AllocBitmapFromObj\fR and \fBTk_GetBitmap\fR
|
||||
consider only the immediate value of the string description. For
|
||||
@@ -292,5 +293,6 @@ bitmap created from the same file name: it will not check to
|
||||
see whether the file itself has changed, or whether the current
|
||||
directory has changed, thereby causing the name to refer to
|
||||
a different file.
|
||||
|
||||
.SH KEYWORDS
|
||||
bitmap, pixmap
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetCapStyle 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetCapStyle 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetCapStyle, Tk_NameOfCapStyle \- translate between strings and cap styles
|
||||
@@ -24,18 +24,18 @@ const char *
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter to use for error reporting.
|
||||
.AP "const char" *string in
|
||||
String containing name of cap style \- one of
|
||||
.QW \fBbutt\fR ,
|
||||
.QW \fBprojecting\fR ,
|
||||
String containing name of cap style: one of
|
||||
.QW butt ,
|
||||
.QW projecting ,
|
||||
or
|
||||
.QW \fBround\fR
|
||||
\- or a unique abbreviation of one.
|
||||
.QW round .
|
||||
.AP int *capPtr out
|
||||
Pointer to location in which to store X cap style corresponding to
|
||||
\fIstring\fR.
|
||||
.AP int cap in
|
||||
Cap style: one of \fBCapButt\fR, \fBCapProjecting\fR, or \fBCapRound\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_GetCapStyle\fR places in \fI*capPtr\fR the X cap style
|
||||
@@ -51,7 +51,7 @@ Under normal circumstances the return value is \fBTCL_OK\fR and
|
||||
\fIinterp\fR is unused.
|
||||
If \fIstring\fR does not contain a valid cap style
|
||||
or an abbreviation of one of these names, then an error message is
|
||||
stored in interpreter \fIinterp\fR's result, \fBTCL_ERROR\fR is returned, and
|
||||
stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and
|
||||
\fI*capPtr\fR is unmodified.
|
||||
.PP
|
||||
\fBTk_NameOfCapStyle\fR is the logical inverse of \fBTk_GetCapStyle\fR.
|
||||
@@ -60,5 +60,6 @@ statically-allocated string corresponding to \fIcap\fR.
|
||||
If \fIcap\fR is not a legal cap style, then
|
||||
.QW "unknown cap style"
|
||||
is returned.
|
||||
|
||||
.SH KEYWORDS
|
||||
butt, cap style, projecting, round
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetColormap 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetColormap 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetColormap, Tk_PreserveColormap, Tk_FreeColormap \- allocate and free colormaps
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_AllocColorFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_AllocColorFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_AllocColorFromObj, Tk_GetColor, Tk_GetColorFromObj, Tk_GetColorByValue, Tk_NameOfColor, Tk_FreeColorFromObj, Tk_FreeColor \- maintain database of colors
|
||||
@@ -58,6 +58,7 @@ call to \fBTk_AllocColorFromObj\fR, \fBTk_GetColor\fR or
|
||||
Drawable in which the result graphics context will be used. Must have
|
||||
same screen and depth as the window for which the color was allocated.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures manage the colors being used by a Tk application.
|
||||
@@ -67,8 +68,8 @@ colormap space is exhausted.
|
||||
.PP
|
||||
Given a textual description of a color, \fBTk_AllocColorFromObj\fR
|
||||
locates a pixel value that may be used to render the color
|
||||
in a particular window. The desired color is specified with a
|
||||
value whose string value must have one of the following forms:
|
||||
in a particular window. The desired color is specified with an
|
||||
object whose string value must have one of the following forms:
|
||||
.TP 20
|
||||
\fIcolorname\fR
|
||||
Any of the valid textual names for a color defined in the
|
||||
@@ -106,7 +107,7 @@ such as \fBTk_AllocColorFromObj\fR and \fBTk_GetColorFromObj\fR.
|
||||
.PP
|
||||
\fBTk_GetColor\fR is identical to \fBTk_AllocColorFromObj\fR except
|
||||
that the description of the color is specified with a string instead
|
||||
of a value. This prevents \fBTk_GetColor\fR from caching the
|
||||
of an object. This prevents \fBTk_GetColor\fR from caching the
|
||||
return value, so \fBTk_GetColor\fR is less efficient than
|
||||
\fBTk_AllocColorFromObj\fR.
|
||||
.PP
|
||||
@@ -173,4 +174,4 @@ There should be exactly one call to \fBTk_FreeColorFromObj\fR
|
||||
or \fBTk_FreeColor\fR for each call to \fBTk_AllocColorFromObj\fR,
|
||||
\fBTk_GetColor\fR, or \fBTk_GetColorByValue\fR.
|
||||
.SH KEYWORDS
|
||||
color, intensity, value, pixel value
|
||||
color, intensity, object, pixel value
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_AllocCursorFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_AllocCursorFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_AllocCursorFromObj, Tk_GetCursor, Tk_GetCursorFromObj, Tk_GetCursorFromData, Tk_NameOfCursor, Tk_FreeCursorFromObj, Tk_FreeCursor \- maintain database of cursors
|
||||
@@ -67,6 +67,7 @@ Opaque Tk identifier for cursor. If passed to \fBTk_FreeCursor\fR, must
|
||||
have been returned by some previous call to \fBTk_GetCursor\fR or
|
||||
\fBTk_GetCursorFromData\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures manage a collection of cursors
|
||||
@@ -117,7 +118,7 @@ in preference to black and white cursors.
|
||||
\fB@\fIsourceName\0maskName\0fgColor\0bgColor\fR
|
||||
In this form, \fIsourceName\fR and \fImaskName\fR are the names of
|
||||
files describing cursors for the cursor's source bits and mask.
|
||||
Each file must be in standard X11 cursor format.
|
||||
Each file must be in standard X11 or X10 cursor format.
|
||||
\fIFgColor\fR and \fIbgColor\fR
|
||||
indicate the colors to use for the
|
||||
cursor, in any of the forms acceptable to \fBTk_GetColor\fR. This
|
||||
@@ -212,8 +213,8 @@ with its Tk_Cursor token.
|
||||
There should be exactly one call to \fBTk_FreeCursor\fR for
|
||||
each call to \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR,
|
||||
or \fBTk_GetCursorFromData\fR.
|
||||
|
||||
.SH BUGS
|
||||
.PP
|
||||
In determining whether an existing cursor can be used to satisfy
|
||||
a new request, \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR,
|
||||
and \fBTk_GetCursorFromData\fR
|
||||
@@ -227,5 +228,6 @@ a different file. Similarly, \fBTk_GetCursorFromData\fR assumes
|
||||
that if the same \fIsource\fR pointer is used in two different calls,
|
||||
then the pointers refer to the same data; it does not check to
|
||||
see if the actual data values have changed.
|
||||
|
||||
.SH KEYWORDS
|
||||
cursor
|
||||
|
||||
@@ -5,38 +5,36 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetDash 3 8.3 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetDash 3 8.3 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetDash \- convert from string to valid dash structure.
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tk.h>\fR
|
||||
|
||||
.sp
|
||||
int
|
||||
\fBTk_GetDash\fR(\fIinterp, string, dashPtr\fR)
|
||||
.fi
|
||||
.SH ARGUMENTS
|
||||
.AS Tk_Dash *dashPtr
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter to use for error reporting.
|
||||
.AP "const char" *string in
|
||||
.AP "const char *" string in
|
||||
Textual value to be converted.
|
||||
.AP Tk_Dash *dashPtr out
|
||||
Points to place to store the dash pattern
|
||||
value converted from \fIstring\fR. Must not be NULL.
|
||||
value converted from \fIstring\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedure parses the string and fills in the result in the
|
||||
Tk_Dash structure. The string can be a list of integers or a
|
||||
character string containing only
|
||||
.QW \fB.,-_\fR
|
||||
and spaces. If all
|
||||
goes well, \fBTCL_OK\fR is returned and a dash descriptor is stored
|
||||
in the variable pointed to by \fIdashPtr\fR.
|
||||
If \fIstring\fR does not have the
|
||||
.QW \fB.,\-_\fR
|
||||
or spaces. If all
|
||||
goes well, \fBTCL_OK\fR is returned. If \fIstring\fR does not have the
|
||||
proper syntax then \fBTCL_ERROR\fR is returned, an error message is left
|
||||
in the interpreter's result, and nothing is stored at *\fIdashPtr\fR.
|
||||
.PP
|
||||
@@ -48,35 +46,33 @@ color. The other segments are drawn transparent.
|
||||
.PP
|
||||
The second possible syntax is a character list containing only
|
||||
5 possible characters
|
||||
.QW "\fB.,-_ \fR" .
|
||||
.QW "\fB.,\-_ \fR" .
|
||||
The space can be used
|
||||
to enlarge the space between other line elements, and can not
|
||||
occur in the first position of the string. Some examples:
|
||||
.PP
|
||||
occur as the first position in the string. Some examples:
|
||||
.CS
|
||||
\-dash . = \-dash {2 4}
|
||||
\-dash - = \-dash {6 4}
|
||||
\-dash -. = \-dash {6 4 2 4}
|
||||
\-dash -.. = \-dash {6 4 2 4 2 4}
|
||||
\-dash \- = \-dash {6 4}
|
||||
\-dash \-. = \-dash {6 4 2 4}
|
||||
\-dash \-.. = \-dash {6 4 2 4 2 4}
|
||||
\-dash {. } = \-dash {2 8}
|
||||
\-dash , = \-dash {4 4}
|
||||
.CE
|
||||
.PP
|
||||
The main difference between this syntax and the numeric is that it
|
||||
The main difference of this syntax with the previous is that it
|
||||
is shape-conserving. This means that all values in the dash
|
||||
list will be multiplied by the line width before display. This
|
||||
ensures that
|
||||
assures that
|
||||
.QW .
|
||||
will always be displayed as a dot and
|
||||
.QW -
|
||||
.QW \-
|
||||
always as a dash regardless of the line width.
|
||||
.PP
|
||||
On systems where only a limited set of dash patterns, the dash
|
||||
pattern will be displayed as the most close dash pattern that
|
||||
is available. For example, on Windows only the first 4 of the
|
||||
above examples are available; the last 2 examples will be
|
||||
displayed identically to the first one.
|
||||
.SH "SEE ALSO"
|
||||
canvas(n), Tk_CreateItemType(3)
|
||||
above examples are available. The last 2 examples will be
|
||||
displayed identically as the first one.
|
||||
|
||||
.SH KEYWORDS
|
||||
dash, conversion
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_AllocFontFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_AllocFontFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_AllocFontFromObj, Tk_GetFont, Tk_GetFontFromObj, Tk_NameOfFont, Tk_FreeFontFromObj, Tk_FreeFont \- maintain database of fonts
|
||||
@@ -31,6 +31,7 @@ Tk_Font
|
||||
.sp
|
||||
void
|
||||
\fBTk_FreeFont(\fItkfont\fB)\fR
|
||||
|
||||
.SH ARGUMENTS
|
||||
.AS "const char" *tkfont
|
||||
.AP "Tcl_Interp" *interp in
|
||||
@@ -104,6 +105,7 @@ with the same information used to create it; for
|
||||
with its Tk_Font token. There should be
|
||||
exactly one call to \fBTk_FreeFontFromObj\fR or \fBTk_FreeFont\fR
|
||||
for each call to \fBTk_AllocFontFromObj\fR or \fBTk_GetFont\fR.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
Tk_FontId(3)
|
||||
.SH KEYWORDS
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetGC 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetGC 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetGC, Tk_FreeGC \- maintain database of read-only graphics contexts
|
||||
@@ -34,6 +34,7 @@ Display for which \fIgc\fR was allocated.
|
||||
X identifier for graphics context that is no longer needed.
|
||||
Must have been allocated by \fBTk_GetGC\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_GetGC\fR and \fBTk_FreeGC\fR manage a collection of graphics contexts
|
||||
@@ -66,5 +67,6 @@ each call to \fBTk_GetGC\fR.
|
||||
When a graphics context is no longer in use anywhere (i.e. it has
|
||||
been freed as many times as it has been gotten) \fBTk_FreeGC\fR
|
||||
will release it to the X server and delete it from the database.
|
||||
|
||||
.SH KEYWORDS
|
||||
graphics context
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
|
||||
'\" All rights reserved.
|
||||
'\"
|
||||
.TH Tk_GetHISTANCE 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetHISTANCE 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetHINSTANCE \- retrieve the global application instance handle
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
|
||||
'\" All rights reserved.
|
||||
'\"
|
||||
.TH HWND 3 8.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH HWND 3 8.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetHWND, Tk_AttachHWND \- manage interactions between the Windows handle and an X window
|
||||
@@ -32,5 +32,6 @@ window given by \fIwindow\fR.
|
||||
\fBTk_AttachHWND\fR binds the Windows HWND identifier to the
|
||||
specified Tk_Window given by \fItkwin\fR. It returns an X Windows
|
||||
window that encapsulates the HWND.
|
||||
|
||||
.SH KEYWORDS
|
||||
identifier, window
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetImage 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetImage 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetImage, Tk_RedrawImage, Tk_SizeOfImage, Tk_FreeImage \- use an image in a widget
|
||||
@@ -63,6 +63,7 @@ Store width of \fIimage\fR (in pixels) here.
|
||||
.AP "int" heightPtr out
|
||||
Store height of \fIimage\fR (in pixels) here.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures are invoked by widgets that wish to display images.
|
||||
@@ -73,7 +74,7 @@ identifies the window where the image will be displayed.
|
||||
\fBTk_GetImage\fR looks up the image in the table of existing
|
||||
images and returns a token for a new instance of the image.
|
||||
If the image does not exist then \fBTk_GetImage\fR returns NULL
|
||||
and leaves an error message in interpreter \fIinterp\fR's result.
|
||||
and leaves an error message in \fIinterp->result\fR.
|
||||
.PP
|
||||
When a widget wishes to actually display an image it must
|
||||
call \fBTk_RedrawImage\fR, identifying the image (\fIimage\fR),
|
||||
@@ -105,7 +106,7 @@ The \fIchangeProc\fR and \fIclientData\fR arguments to
|
||||
\fIchangeProc\fR will be called by Tk whenever a change occurs
|
||||
in the image; it must match the following prototype:
|
||||
.CS
|
||||
typedef void \fBTk_ImageChangedProc\fR(
|
||||
typedef void Tk_ImageChangedProc(
|
||||
ClientData \fIclientData\fR,
|
||||
int \fIx\fR,
|
||||
int \fIy\fR,
|
||||
@@ -124,7 +125,9 @@ they are specified in pixels measured from the upper-left
|
||||
corner of the image.
|
||||
The arguments \fIimageWidth\fR and \fIimageHeight\fR give
|
||||
the image's (new) size.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
Tk_CreateImageType
|
||||
|
||||
.SH KEYWORDS
|
||||
images, redisplay
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetJoinStyle 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetJoinStyle 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetJoinStyle, Tk_NameOfJoinStyle \- translate between strings and join styles
|
||||
@@ -24,18 +24,18 @@ const char *
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter to use for error reporting.
|
||||
.AP "const char" *string in
|
||||
String containing name of join style \- one of
|
||||
.QW \fBbevel\fR ,
|
||||
.QW \fBmiter\fR ,
|
||||
String containing name of join style: one of
|
||||
.QW bevel ,
|
||||
.QW miter ,
|
||||
or
|
||||
.QW \fBround\fR
|
||||
\- or a unique abbreviation of one.
|
||||
.QW round .
|
||||
.AP int *joinPtr out
|
||||
Pointer to location in which to store X join style corresponding to
|
||||
\fIstring\fR.
|
||||
.AP int join in
|
||||
Join style: one of \fBJoinBevel\fR, \fBJoinMiter\fR, \fBJoinRound\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_GetJoinStyle\fR places in \fI*joinPtr\fR the X join style
|
||||
@@ -50,7 +50,7 @@ Under normal circumstances the return value is \fBTCL_OK\fR and
|
||||
\fIinterp\fR is unused.
|
||||
If \fIstring\fR does not contain a valid join style
|
||||
or an abbreviation of one of these names, then an error message is
|
||||
stored in interpreter \fIinterp\fR's result, \fBTCL_ERROR\fR is returned, and
|
||||
stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and
|
||||
\fI*joinPtr\fR is unmodified.
|
||||
.PP
|
||||
\fBTk_NameOfJoinStyle\fR is the logical inverse of \fBTk_GetJoinStyle\fR.
|
||||
@@ -59,5 +59,6 @@ statically-allocated string corresponding to \fIjoin\fR.
|
||||
If \fIjoin\fR is not a legal join style, then
|
||||
.QW "unknown join style"
|
||||
is returned.
|
||||
|
||||
.SH KEYWORDS
|
||||
bevel, join style, miter, round
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetJustifyFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetJustifyFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetJustifyFromObj, Tk_GetJustify, Tk_NameOfJustify \- translate between strings and justification styles
|
||||
@@ -27,12 +27,11 @@ const char *
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter to use for error reporting, or NULL.
|
||||
.AP Tcl_Obj *objPtr in/out
|
||||
String value contains name of justification style \- one of
|
||||
.QW \fBleft\fR ,
|
||||
.QW \fBright\fR ,
|
||||
String value contains name of justification style, one of
|
||||
.QW left ,
|
||||
.QW right ,
|
||||
or
|
||||
.QW \fBcenter\fR
|
||||
\- or a unique abbreviation of one.
|
||||
.QW center .
|
||||
The internal rep will be modified to cache corresponding justify value.
|
||||
.AP "const char" *string in
|
||||
Same as \fIobjPtr\fR except description of justification style is passed as
|
||||
@@ -83,5 +82,6 @@ corresponding to \fIjustify\fR.
|
||||
If \fIjustify\fR is not a legal justify value, then
|
||||
.QW "unknown justification style"
|
||||
is returned.
|
||||
|
||||
.SH KEYWORDS
|
||||
center, fill, justification, string
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetOption 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetOption 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetOption \- retrieve an option from the option database
|
||||
@@ -26,6 +26,7 @@ Name of desired option.
|
||||
Class of desired option. Null means there is no class for
|
||||
this option; do lookup based on name only.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
This procedure is invoked to retrieve an option from the database
|
||||
@@ -38,5 +39,6 @@ is returned. If no option matches, then NULL is returned.
|
||||
\fBTk_GetOption\fR caches options related to \fItkwin\fR so that
|
||||
successive calls for the same \fItkwin\fR will execute much more
|
||||
quickly than successive calls for different windows.
|
||||
|
||||
.SH KEYWORDS
|
||||
class, name, option, retrieve
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetPixelsFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetPixelsFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetPixelsFromObj, Tk_GetPixels, Tk_GetMMFromObj, Tk_GetScreenMM \- translate between strings and screen units
|
||||
@@ -43,6 +43,7 @@ Pointer to location in which to store converted distance in pixels.
|
||||
.AP double *doublePtr out
|
||||
Pointer to location in which to store converted distance in millimeters.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures take as argument a specification of distance on
|
||||
@@ -84,12 +85,13 @@ value in \fIobjPtr\fR, which speeds up future calls to
|
||||
\fBTk_GetPixels\fR is identical to \fBTk_GetPixelsFromObj\fR except
|
||||
that the screen distance is specified with a string instead
|
||||
of an object. This prevents \fBTk_GetPixels\fR from caching the
|
||||
return value, so \fBTk_GetPixels\fR is less efficient than
|
||||
return value, so \fBTk_GetAnchor\fR is less efficient than
|
||||
\fBTk_GetPixelsFromObj\fR.
|
||||
.PP
|
||||
\fBTk_GetMMFromObj\fR and \fBTk_GetScreenMM\fR are similar to
|
||||
\fBTk_GetPixelsFromObj\fR and \fBTk_GetPixels\fR (respectively) except
|
||||
that they convert the screen distance to millimeters and
|
||||
store a double-precision floating-point result at \fI*doublePtr\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
centimeters, convert, inches, millimeters, pixels, points, screen units
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetPixmap 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetPixmap 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetPixmap, Tk_FreePixmap \- allocate and free pixmaps
|
||||
@@ -33,6 +33,7 @@ Number of bits per pixel in pixmap.
|
||||
.AP Pixmap pixmap in
|
||||
Pixmap to destroy.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures are identical to the Xlib procedures \fBXCreatePixmap\fR
|
||||
@@ -48,5 +49,6 @@ with dimensions given by \fIwidth\fR, \fIheight\fR, and \fIdepth\fR,
|
||||
and returns its identifier.
|
||||
\fBTk_FreePixmap\fR destroys the pixmap given by \fIpixmap\fR and makes
|
||||
its resource identifier available for reuse.
|
||||
|
||||
.SH KEYWORDS
|
||||
pixmap, resource identifier
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetReliefFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetReliefFromObj 3 8.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetReliefFromObj, Tk_GetRelief, Tk_NameOfRelief \- translate between strings and relief values
|
||||
@@ -28,14 +28,13 @@ const char *
|
||||
Interpreter to use for error reporting.
|
||||
.AP Tcl_Obj *objPtr in/out
|
||||
String value contains name of relief, one of
|
||||
.QW \fBflat\fR ,
|
||||
.QW \fBgroove\fR ,
|
||||
.QW \fBraised\fR ,
|
||||
.QW \fBridge\fR ,
|
||||
.QW \fBsolid\fR ,
|
||||
.QW flat ,
|
||||
.QW groove ,
|
||||
.QW raised ,
|
||||
.QW ridge ,
|
||||
.QW solid ,
|
||||
or
|
||||
.QW \fBsunken\fR
|
||||
(or any unique abbreviation thereof on input);
|
||||
.QW sunken ;
|
||||
the internal rep will be modified to cache corresponding relief value.
|
||||
.AP char *string in
|
||||
Same as \fIobjPtr\fR except description of relief is passed as
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetRootCoords 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetRootCoords 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetRootCoords \- Compute root-window coordinates of window
|
||||
|
||||
@@ -5,49 +5,50 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetScrollInfo 3 8.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetScrollInfo 3 8.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetScrollInfoObj, Tk_GetScrollInfo \- parse arguments for scrolling commands
|
||||
Tk_GetScrollInfo, Tk_GetScrollInfoObj \- parse arguments for scrolling commands
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tk.h>\fR
|
||||
.sp
|
||||
int
|
||||
\fBTk_GetScrollInfoObj(\fIinterp, objc, objv, fractionPtr, stepsPtr\fB)\fR
|
||||
\fBTk_GetScrollInfo(\fIinterp, argc, argv, dblPtr, intPtr\fB)\fR
|
||||
.sp
|
||||
int
|
||||
\fBTk_GetScrollInfo(\fIinterp, argc, argv, fractionPtr, stepsPtr\fB)\fR
|
||||
\fBTk_GetScrollInfoObj(\fIinterp, objc, objv, dblPtr, intPtr\fB)\fR
|
||||
.SH ARGUMENTS
|
||||
.AS "Tcl_Interp" *fractionPtr
|
||||
.AS "Tcl_Interp" *dblPtr
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter to use for error reporting.
|
||||
.AP int objc in
|
||||
Number of Tcl_Obj's in \fIobjv\fR array.
|
||||
.AP "Tcl_Obj *const" objv[] in
|
||||
Argument objects. These represent the entire widget command, of
|
||||
which the first word is typically the widget name and the second
|
||||
word is typically \fBxview\fR or \fByview\fR.
|
||||
.AP int argc in
|
||||
Number of strings in \fIargv\fR array.
|
||||
.AP "const char" *argv[] in
|
||||
Argument strings. These represent the entire widget command, of
|
||||
which the first word is typically the widget name and the second
|
||||
word is typically \fBxview\fR or \fByview\fR.
|
||||
.AP double *fractionPtr out
|
||||
.AP int objc in
|
||||
Number of Tcl_Obj's in \fIobjv\fR array.
|
||||
.AP "Tcl_Obj *const" objv[] in
|
||||
Argument objects. These represent the entire widget command, of
|
||||
which the first word is typically the widget name and the second
|
||||
word is typically \fBxview\fR or \fByview\fR.
|
||||
.AP double *dblPtr out
|
||||
Filled in with fraction from \fBmoveto\fR option, if any.
|
||||
.AP int *stepsPtr out
|
||||
.AP int *intPtr out
|
||||
Filled in with line or page count from \fBscroll\fR option, if any.
|
||||
The value may be negative.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_GetScrollInfoObj\fR parses the arguments expected by widget
|
||||
\fBTk_GetScrollInfo\fR parses the arguments expected by widget
|
||||
scrolling commands such as \fBxview\fR and \fByview\fR.
|
||||
It receives the entire list of words that make up a widget command
|
||||
and parses the words starting with \fIobjv\fR[2].
|
||||
The words starting with \fIobjv\fR[2] must have one of the following forms:
|
||||
and parses the words starting with \fIargv\fR[2].
|
||||
The words starting with \fIargv\fR[2] must have one of the following forms:
|
||||
.CS
|
||||
\fBmoveto \fIfraction\fR
|
||||
\fBscroll \fInumber\fB units\fR
|
||||
@@ -56,20 +57,20 @@ The words starting with \fIobjv\fR[2] must have one of the following forms:
|
||||
.LP
|
||||
Any of the \fBmoveto\fR, \fBscroll\fR, \fBunits\fR, and \fBpages\fR
|
||||
keywords may be abbreviated.
|
||||
If \fIobjv\fR has the \fBmoveto\fR form, \fBTK_SCROLL_MOVETO\fR
|
||||
is returned as result and \fI*fractionPtr\fR is filled in with the
|
||||
If \fIargv\fR has the \fBmoveto\fR form, \fBTK_SCROLL_MOVETO\fR
|
||||
is returned as result and \fI*dblPtr\fR is filled in with the
|
||||
\fIfraction\fR argument to the command, which must be a proper real
|
||||
value.
|
||||
If \fIobjv\fR has the \fBscroll\fR form, \fBTK_SCROLL_UNITS\fR
|
||||
or \fBTK_SCROLL_PAGES\fR is returned and \fI*stepsPtr\fR is filled
|
||||
If \fIargv\fR has the \fBscroll\fR form, \fBTK_SCROLL_UNITS\fR
|
||||
or \fBTK_SCROLL_PAGES\fR is returned and \fI*intPtr\fR is filled
|
||||
in with the \fInumber\fR value, which must be a proper integer.
|
||||
If an error occurs in parsing the arguments, \fBTK_SCROLL_ERROR\fR
|
||||
is returned and an error message is left in interpreter
|
||||
\fIinterp\fR's result.
|
||||
is returned and an error message is left in \fIinterp->result\fR.
|
||||
.PP
|
||||
\fBTk_GetScrollInfo\fR is identical in function to
|
||||
\fBTk_GetScrollInfoObj\fR. However, \fBTk_GetScrollInfo\fR accepts
|
||||
string arguments, making it more appropriate for use with legacy
|
||||
widgets.
|
||||
\fBTk_GetScrollInfoObj\fR is identical in function to
|
||||
\fBTk_GetScrollInfo\fR. However, \fBTk_GetScrollInfoObj\fR accepts
|
||||
Tcl_Obj style arguments, making it more appropriate for use with new
|
||||
development.
|
||||
|
||||
.SH KEYWORDS
|
||||
parse, scrollbar, scrolling command, xview, yview
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetSelection 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetSelection 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetSelection \- retrieve the contents of a selection
|
||||
@@ -33,6 +33,7 @@ are retrieved.
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_GetSelection\fR retrieves the selection specified by the atom
|
||||
@@ -41,14 +42,12 @@ selection may actually be retrieved in several pieces; as each piece
|
||||
is retrieved, \fIproc\fR is called to process the piece. \fIProc\fR
|
||||
should have arguments and result that match the type
|
||||
\fBTk_GetSelProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTk_GetSelProc\fR(
|
||||
typedef int Tk_GetSelProc(
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
char *\fIportion\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR and \fIinterp\fR parameters to \fIproc\fR
|
||||
will be copies of the corresponding arguments to
|
||||
\fBTk_GetSelection\fR. \fIPortion\fR will be a pointer to
|
||||
@@ -69,10 +68,10 @@ been completely retrieved and processed by \fIproc\fR, or when a
|
||||
fatal error has occurred (e.g. the selection owner did not respond
|
||||
promptly). \fBTk_GetSelection\fR normally returns \fBTCL_OK\fR; if
|
||||
an error occurs, it returns \fBTCL_ERROR\fR and leaves an error message
|
||||
in interpreter \fIinterp\fR's result. \fIProc\fR should also return either
|
||||
\fBTCL_OK\fR or \fBTCL_ERROR\fR. If \fIproc\fR encounters an error in
|
||||
dealing with the selection, it should leave an error message in the
|
||||
interpreter result and return \fBTCL_ERROR\fR; this will abort the
|
||||
selection retrieval.
|
||||
in \fIinterp->result\fR. \fIProc\fR should also return either
|
||||
\fBTCL_OK\fR or \fBTCL_ERROR\fR. If \fIproc\fR encounters an error in dealing with the
|
||||
selection, it should leave an error message in \fIinterp->result\fR
|
||||
and return \fBTCL_ERROR\fR; this will abort the selection retrieval.
|
||||
|
||||
.SH KEYWORDS
|
||||
format, get, selection retrieval
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetUid 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetUid 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetUid, Tk_Uid \- convert from string to unique identifier
|
||||
@@ -21,6 +21,7 @@ Tk_Uid
|
||||
String for which the corresponding unique identifier is
|
||||
desired.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_GetUid\fR returns the unique identifier corresponding
|
||||
@@ -41,5 +42,6 @@ Tk_Uid may be compared directly (x == y) without having to call
|
||||
\fBstrcmp\fR.
|
||||
In addition, the return value from \fBTk_GetUid\fR will have the
|
||||
same string value as its argument (strcmp(Tk_GetUid(a), a) == 0).
|
||||
|
||||
.SH KEYWORDS
|
||||
atom, unique identifier
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetVRootGeometry 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetVRootGeometry 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetVRootGeometry \- Get location and size of virtual root for window
|
||||
@@ -28,6 +28,7 @@ Points to word in which to store width of virtual root.
|
||||
.AP "int" heightPtr out
|
||||
Points to word in which to store height of virtual root.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_GetVRootGeometry\fR returns geometry information about the virtual
|
||||
@@ -42,5 +43,6 @@ If \fItkwin\fR is not associated with a virtual root (e.g.
|
||||
because the window manager does not use virtual roots) then *\fIxPtr\fR and
|
||||
*\fIyPtr\fR will be set to 0 and *\fIwidthPtr\fR and *\fIheightPtr\fR
|
||||
will be set to the dimensions of the screen containing \fItkwin\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
geometry, height, location, virtual root, width, window manager
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_GetVisual 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetVisual 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetVisual \- translate from string to visual
|
||||
@@ -39,7 +39,7 @@ It returns a pointer to the X Visual structure for the visual
|
||||
and stores the number of bits per pixel for it at \fI*depthPtr\fR.
|
||||
If \fIstring\fR is unrecognizable or if no suitable visual could
|
||||
be found, then NULL is returned and \fBTk_GetVisual\fR leaves
|
||||
an error message in interpreter \fIinterp\fR's result.
|
||||
an error message in \fIinterp->result\fR.
|
||||
If \fIcolormap\fR is non-NULL then \fBTk_GetVisual\fR
|
||||
also locates an appropriate colormap for use with the result visual
|
||||
and stores its X identifier at \fI*colormapPtr\fR.
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
|
||||
'\" All rights reserved.
|
||||
'\"
|
||||
.TH Tk_Grab 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_Grab 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_Grab, Tk_Ungrab \- manipulate grab state in an application
|
||||
@@ -16,6 +16,7 @@ int
|
||||
.sp
|
||||
void
|
||||
\fBTk_Ungrab\fR(\fItkwin\fR)
|
||||
|
||||
.SH ARGUMENTS
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter to use for error reporting
|
||||
@@ -24,6 +25,7 @@ Window on whose behalf the pointer is to be grabbed or released
|
||||
.AP int grabGlobal in
|
||||
Boolean indicating whether the grab is global or application local
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These functions are used to set or release a global or
|
||||
@@ -37,6 +39,7 @@ intended for windows in other applications) will be redirected to
|
||||
\fItkwin\fR. If the grab is application local, only mouse and
|
||||
keyboard events intended for a windows within the same application
|
||||
(but outside the tree rooted at \fItkwin\fR) will be redirected.
|
||||
|
||||
.PP
|
||||
\fBTk_Grab\fR sets a grab on a particular window. \fITkwin\fR
|
||||
specifies the window on whose behalf the pointer is to be grabbed.
|
||||
@@ -49,10 +52,12 @@ successfully, no window outside the tree rooted at \fItkwin\fR will
|
||||
receive pointer- or keyboard-related events until the next call to
|
||||
Tk_Ungrab. If a previous grab was in effect within the application,
|
||||
then it is replaced with a new one.
|
||||
|
||||
.PP
|
||||
\fBTk_Ungrab\fR releases a grab on the mouse pointer and keyboard, if
|
||||
\fBTcl_Ungrab\fR releases a grab on the mouse pointer and keyboard, if
|
||||
there is one set on the window given by \fItkwin\fR. Once a grab is
|
||||
released, pointer and keyboard events will start being delivered to
|
||||
other windows again.
|
||||
|
||||
.SH KEYWORDS
|
||||
grab, window
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
|
||||
'\" All rights reserved.
|
||||
'\"
|
||||
.TH Tk_HWNDToWindow 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_HWNDToWindow 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_HWNDToWindow \- Find Tk's window information for a Windows window
|
||||
@@ -17,10 +17,12 @@ Tk_Window
|
||||
.AP HWND hwnd in
|
||||
Windows handle for the window.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Given a Windows HWND window identifier, this procedure returns the
|
||||
corresponding Tk_Window handle. If there is no Tk_Window corresponding
|
||||
to \fIhwnd\fR then NULL is returned.
|
||||
|
||||
.SH KEYWORDS
|
||||
Windows window id
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_HandleEvent 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_HandleEvent 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_HandleEvent \- invoke event handlers for window system events
|
||||
@@ -21,6 +21,7 @@ Tk_HandleEvent \- invoke event handlers for window system events
|
||||
Pointer to X event to dispatch to relevant handler(s). It is important
|
||||
that all unused fields of the structure be set to zero.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_HandleEvent\fR is a lower-level procedure that deals with window
|
||||
@@ -42,5 +43,6 @@ as when a
|
||||
notifier has been popped up and an application wishes to
|
||||
wait for the user to click a button in the notifier before
|
||||
doing anything else.
|
||||
|
||||
.SH KEYWORDS
|
||||
callback, event, handler, window
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_IdToWindow 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_IdToWindow 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_IdToWindow \- Find Tk's window information for an X window
|
||||
@@ -22,11 +22,13 @@ X display containing the window.
|
||||
.AP Window window in
|
||||
X id for window.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Given an X window identifier and the X display it corresponds to,
|
||||
this procedure returns the corresponding Tk_Window handle.
|
||||
If there is no Tk_Window corresponding to \fIwindow\fR then
|
||||
NULL is returned.
|
||||
|
||||
.SH KEYWORDS
|
||||
X window id
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_ImageChanged 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_ImageChanged 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_ImageChanged \- notify widgets that image needs to be redrawn
|
||||
@@ -35,6 +35,7 @@ Current width of image, in pixels.
|
||||
.AP "int" imageHeight in
|
||||
Current height of image, in pixels.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
An image manager calls \fBTk_ImageChanged\fR for an image
|
||||
@@ -58,7 +59,9 @@ that changed.
|
||||
If the size of the image should change, then \fBTk_ImageChanged\fR
|
||||
must be called to indicate the new size, even if no pixels
|
||||
need to be redisplayed.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
Tk_CreateImageType
|
||||
|
||||
.SH KEYWORDS
|
||||
images, redisplay, image size changes
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
|
||||
'\" All rights reserved.
|
||||
'\"
|
||||
.TH Tk_GetUserInactiveTime 3 8.5 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_GetUserInactiveTime 3 8.5 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_GetUserInactiveTime, Tk_ResetUserInactiveTime \- discover user inactivity time
|
||||
@@ -14,21 +14,23 @@ Tk_GetUserInactiveTime, Tk_ResetUserInactiveTime \- discover user inactivity tim
|
||||
long
|
||||
\fBTk_GetUserInactiveTime(\fIdisplay\fB)\fR
|
||||
.sp
|
||||
\fBTk_ResetUserInactiveTime(\fIdisplay\fB)\fR
|
||||
\fBTk_GetUserInactiveTime(\fIdisplay\fB)\fR
|
||||
.SH ARGUMENTS
|
||||
.AS Display *display
|
||||
.AP Display *display in
|
||||
The display on which the user inactivity timer is to be queried or
|
||||
reset.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_GetUserInactiveTime\fR returns the number of milliseconds that
|
||||
have passed since the last user interaction (usually via keyboard or
|
||||
mouse) with the respective display. On systems and displays that do not
|
||||
support querying the user inactivity time, \fB\-1\fR is returned.
|
||||
\fBTk_ResetUserInactiveTime\fR resets the user inactivity timer of the
|
||||
support querying the user inactiviy time, \fB\-1\fR is returned.
|
||||
\fBTk_GetUserInactiveTime\fR resets the user inactivity timer of the
|
||||
given display to zero. On windowing systems that do not support
|
||||
multiple displays \fIdisplay\fR can be passed as \fBNULL\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
idle, inactive
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_InternAtom 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_InternAtom 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_InternAtom, Tk_GetAtomName \- manage cache of X atoms
|
||||
@@ -28,6 +28,7 @@ String name for which atom is desired.
|
||||
.AP Atom atom in
|
||||
Atom for which corresponding string name is desired.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures are similar to the Xlib procedures
|
||||
@@ -51,5 +52,6 @@ for the same information can be serviced from the cache without
|
||||
contacting the server. Thus \fBTk_InternAtom\fR and \fBTk_GetAtomName\fR
|
||||
are generally much faster than their Xlib counterparts, and they
|
||||
should be used in place of the Xlib procedures.
|
||||
|
||||
.SH KEYWORDS
|
||||
atom, cache, display
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_MainLoop 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_MainLoop 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_MainLoop \- loop for events until all windows are deleted
|
||||
@@ -16,6 +16,7 @@ Tk_MainLoop \- loop for events until all windows are deleted
|
||||
.sp
|
||||
\fBTk_MainLoop\fR()
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_MainLoop\fR is a procedure that loops repeatedly calling
|
||||
@@ -24,5 +25,6 @@ left in this process (i.e. no main windows exist anymore). Most
|
||||
windowing applications will call \fBTk_MainLoop\fR after
|
||||
initialization; the main execution of the application will consist
|
||||
entirely of callbacks invoked via \fBTcl_DoOneEvent\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
application, event, main loop
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_MainWindow 3 7.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_MainWindow 3 7.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_MainWindow, Tk_GetNumMainWindows \- functions for querying main window information
|
||||
Tk_MainWindow, Tk_GetNumMainWindows \- functions for querying main
|
||||
window information
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tk.h>\fR
|
||||
@@ -19,11 +20,13 @@ Tk_Window
|
||||
.sp
|
||||
int
|
||||
\fBTk_GetNumMainWindows\fR()
|
||||
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_Interp *pathName
|
||||
.AP Tcl_Interp *interp in/out
|
||||
Interpreter associated with the application.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
A main window is a special kind of toplevel window used as the
|
||||
@@ -32,9 +35,10 @@ outermost window in an application.
|
||||
If \fIinterp\fR is associated with a Tk application then \fBTk_MainWindow\fR
|
||||
returns the application's main window. If there is no Tk application
|
||||
associated with \fIinterp\fR then \fBTk_MainWindow\fR returns NULL and
|
||||
leaves an error message in interpreter \fIinterp\fR's result.
|
||||
leaves an error message in \fIinterp->result\fR.
|
||||
.PP
|
||||
\fBTk_GetNumMainWindows\fR returns a count of the number of main
|
||||
windows currently open in the current thread.
|
||||
windows currently open in the process.
|
||||
|
||||
.SH KEYWORDS
|
||||
application, main window
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_MaintainGeometry 3 4.0 Tk "Tk Library Procedures"
|
||||
.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
|
||||
@@ -36,6 +36,7 @@ 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
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_ManageGeometry 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_ManageGeometry 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_ManageGeometry \- arrange to handle geometry requests for a window
|
||||
@@ -45,7 +45,7 @@ typedef struct {
|
||||
const char *\fIname\fR;
|
||||
Tk_GeomRequestProc *\fIrequestProc\fR;
|
||||
Tk_GeomLostSlaveProc *\fIlostSlaveProc\fR;
|
||||
} \fBTk_GeomMgr\fR;
|
||||
} Tk_GeomMgr;
|
||||
.CE
|
||||
The \fIname\fR field is the textual name for the geometry manager,
|
||||
such as \fBpack\fR or \fBplace\fR; this value will be returned
|
||||
@@ -57,7 +57,7 @@ slave to change its desired geometry.
|
||||
\fIrequestProc\fR should have arguments and results that match the
|
||||
type \fBTk_GeomRequestProc\fR:
|
||||
.CS
|
||||
typedef void \fBTk_GeomRequestProc\fR(
|
||||
typedef void Tk_GeomRequestProc(
|
||||
ClientData \fIclientData\fR,
|
||||
Tk_Window \fItkwin\fR);
|
||||
.CE
|
||||
@@ -80,11 +80,12 @@ is the same as the window's current geometry manager.
|
||||
\fIlostSlaveProc\fR should have
|
||||
arguments and results that match the following prototype:
|
||||
.CS
|
||||
typedef void \fBTk_GeomLostSlaveProc\fR(
|
||||
typedef void Tk_GeomLostSlaveProc(
|
||||
ClientData \fIclientData\fR,
|
||||
Tk_Window \fItkwin\fR);
|
||||
.CE
|
||||
The parameters to \fIlostSlaveProc\fR will be identical to the
|
||||
corresponding parameters passed to \fBTk_ManageGeometry\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
callback, geometry, managed, request, unmanaged
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_MapWindow 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_MapWindow 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_MapWindow, Tk_UnmapWindow \- map or unmap a window
|
||||
@@ -23,6 +23,7 @@ Tk_Window
|
||||
.AP Tk_Window tkwin in
|
||||
Token for window.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These procedures may be used to map and unmap windows
|
||||
@@ -45,5 +46,6 @@ These procedures should be used in place of the X procedures
|
||||
Tk's local data structure for \fItkwin\fR. Applications
|
||||
using Tk should not invoke \fBXMapWindow\fR and \fBXUnmapWindow\fR
|
||||
directly.
|
||||
|
||||
.SH KEYWORDS
|
||||
map, unmap, window
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_MeasureChars 3 8.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_MeasureChars 3 8.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_MeasureChars, Tk_TextWidth, Tk_DrawChars, Tk_UnderlineChars \- routines to measure and display simple single-line strings.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_MoveToplevelWindow 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_MoveToplevelWindow 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_MoveToplevelWindow \- Adjust the position of a top-level window
|
||||
@@ -28,6 +28,7 @@ New y-coordinate for the top-left pixel of \fItkwin\fR's border, or the
|
||||
top-left pixel of the decorative border supplied for \fItkwin\fR by the
|
||||
window manager, if there is one.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
In general, a window should never set its own position; this should be
|
||||
@@ -46,6 +47,7 @@ menus that want to appear at a particular place on the screen.
|
||||
When \fBTk_MoveToplevelWindow\fR is called it does not immediately
|
||||
pass on the new desired location to the window manager; it defers
|
||||
this action until all other outstanding work has been completed,
|
||||
using the \fBTcl_DoWhenIdle\fR mechanism.
|
||||
using the \fBTk_DoWhenIdle\fR mechanism.
|
||||
|
||||
.SH KEYWORDS
|
||||
position, top-level window, window manager
|
||||
|
||||
10
doc/Name.3
10
doc/Name.3
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_Name 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_Name 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_Name, Tk_PathName, Tk_NameToWindow \- convert between names and window tokens
|
||||
@@ -31,6 +31,7 @@ Interpreter to use for error reporting.
|
||||
.AP "const char" *pathName in
|
||||
Character string containing path name of window.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Each window managed by Tk has two names, a short name that identifies
|
||||
@@ -48,7 +49,8 @@ as a Tk_Uid, which may be used just like a string pointer but also has
|
||||
the properties of a unique identifier (see the manual entry for
|
||||
\fBTk_GetUid\fR for details).
|
||||
.PP
|
||||
The \fBTk_PathName\fR macro returns a hierarchical name for \fItkwin\fR.
|
||||
The \fBTk_PathName\fR macro returns a
|
||||
hierarchical name for \fItkwin\fR.
|
||||
Path names have a structure similar to file names in Unix but with
|
||||
dots between elements instead of slashes: the main window for
|
||||
an application has the path name
|
||||
@@ -73,8 +75,7 @@ The procedure \fBTk_NameToWindow\fR returns the token for a window
|
||||
given its path name (the \fIpathName\fR argument) and another window
|
||||
belonging to the same main window (\fItkwin\fR). It normally
|
||||
returns a token for the named window, but if no such window exists
|
||||
\fBTk_NameToWindow\fR leaves an error message in interpreter
|
||||
\fIinterp\fR's result
|
||||
\fBTk_NameToWindow\fR leaves an error message in \fIinterp->result\fR
|
||||
and returns NULL. The \fItkwin\fR argument to \fBTk_NameToWindow\fR
|
||||
is needed because path names are only unique within a single
|
||||
application hierarchy. If, for example, a single process has opened
|
||||
@@ -82,5 +83,6 @@ two main windows, each will have a separate naming hierarchy and the
|
||||
same path name might appear in each of the hierarchies. Normally
|
||||
\fItkwin\fR is the main window of the desired hierarchy, but this
|
||||
need not be the case: any window in the desired hierarchy may be used.
|
||||
|
||||
.SH KEYWORDS
|
||||
name, path name, token, window
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_NameOfImage 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_NameOfImage 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_NameOfImage \- Return name of image.
|
||||
@@ -14,17 +14,19 @@ Tk_NameOfImage \- Return name of image.
|
||||
\fB#include <tk.h>\fR
|
||||
.sp
|
||||
const char *
|
||||
\fBTk_NameOfImage\fR(\fIimageMaster\fR)
|
||||
\fBTk_NameOfImage\fR(\fItypePtr\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tk_ImageMaster imageMaster
|
||||
.AP Tk_ImageMaster imageMaster in
|
||||
.AS Tk_ImageMaster *masterPtr
|
||||
.AP Tk_ImageMaster *masterPtr in
|
||||
Token for image, which was passed to image manager's \fIcreateProc\fR when
|
||||
the image was created.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
This procedure is invoked by image managers to find out the name
|
||||
of an image. Given the token for the image, it returns the
|
||||
string name for the image.
|
||||
|
||||
.SH KEYWORDS
|
||||
image manager, image name
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_OwnSelection 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_OwnSelection 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_OwnSelection \- make a window the owner of the primary selection
|
||||
@@ -26,6 +26,7 @@ Procedure to invoke when \fItkwin\fR loses selection ownership later.
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_OwnSelection\fR arranges for \fItkwin\fR to become the
|
||||
@@ -38,12 +39,12 @@ invoked so that the window can clean itself up (e.g. by
|
||||
unhighlighting the selection). \fIProc\fR should have arguments and
|
||||
result that match the type \fBTk_LostSelProc\fR:
|
||||
.CS
|
||||
typedef void \fBTk_LostSelProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
typedef void Tk_LostSelProc(ClientData \fIclientData\fR);
|
||||
.CE
|
||||
The \fIclientData\fR parameter to \fIproc\fR is a copy of the
|
||||
\fIclientData\fR argument given to \fBTk_OwnSelection\fR, and is
|
||||
usually a pointer to a data structure containing application-specific
|
||||
information about \fItkwin\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
own, selection owner
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_ParseArgv 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_ParseArgv 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_ParseArgv \- process command-line options
|
||||
@@ -60,8 +60,8 @@ elements of \fIargv\fR.
|
||||
.PP
|
||||
\fBTk_ParseArgv\fR normally returns the value \fBTCL_OK\fR. If an error
|
||||
occurs while parsing the arguments, then \fBTCL_ERROR\fR is returned and
|
||||
\fBTk_ParseArgv\fR will leave an error message in the result of
|
||||
interpreter \fIinterp\fR in the standard Tcl fashion. In
|
||||
\fBTk_ParseArgv\fR will leave an error message in \fIinterp->result\fR
|
||||
in the standard Tcl fashion. In
|
||||
the event of an error return, \fI*argvPtr\fR will not have been
|
||||
modified, but \fIargv\fR could have been partially modified. The
|
||||
possible causes of errors are explained below.
|
||||
@@ -70,12 +70,12 @@ The \fIargTable\fR array specifies the kinds of arguments that are
|
||||
expected; each of its entries has the following structure:
|
||||
.CS
|
||||
typedef struct {
|
||||
const char *\fIkey\fR;
|
||||
char *\fIkey\fR;
|
||||
int \fItype\fR;
|
||||
char *\fIsrc\fR;
|
||||
char *\fIdst\fR;
|
||||
const char *\fIhelp\fR;
|
||||
} \fBTk_ArgvInfo\fR;
|
||||
char *\fIhelp\fR;
|
||||
} Tk_ArgvInfo;
|
||||
.CE
|
||||
The \fIkey\fR field is a string such as
|
||||
.QW \-display
|
||||
@@ -186,8 +186,7 @@ specifiers of this type are ignored (as if they did not exist).
|
||||
\fBTK_ARGV_HELP\fR
|
||||
When this kind of option is encountered, \fBTk_ParseArgv\fR uses the
|
||||
\fIhelp\fR fields of \fIargTable\fR to format a message describing
|
||||
all the valid arguments. The message is placed in interpreter
|
||||
\fIinterp\fR's result
|
||||
all the valid arguments. The message is placed in \fIinterp->result\fR
|
||||
and \fBTk_ParseArgv\fR returns \fBTCL_ERROR\fR. When this happens, the
|
||||
caller normally prints the help message and aborts. If the \fIkey\fR
|
||||
field of a \fBTK_ARGV_HELP\fR specifier is NULL, then the specifier will
|
||||
@@ -260,12 +259,11 @@ then return any that are left by compacting them to the beginning of
|
||||
\fIargv\fR (starting at \fIargv\fR[0]). \fIGenfunc\fR
|
||||
should return a count of how many arguments are left in \fIargv\fR;
|
||||
\fBTk_ParseArgv\fR will process them. If \fIgenfunc\fR encounters
|
||||
an error then it should leave an error message in interpreter
|
||||
\fIinterp\fR's result,
|
||||
an error then it should leave an error message in \fIinterp->result\fR,
|
||||
in the usual Tcl fashion, and return \-1; when this happens
|
||||
\fBTk_ParseArgv\fR will abort its processing and return \fBTCL_ERROR\fR.
|
||||
.RE
|
||||
.SS "FLAGS"
|
||||
.SH "FLAGS"
|
||||
.TP
|
||||
\fBTK_ARGV_DONT_SKIP_FIRST_ARG\fR
|
||||
\fBTk_ParseArgv\fR normally treats \fIargv[0]\fR as a program
|
||||
@@ -314,14 +312,14 @@ Boolean exec = FALSE;
|
||||
Tk_ArgvInfo argTable[] = {
|
||||
{"\-X", TK_ARGV_CONSTANT, (char *) 1, (char *) &debugFlag,
|
||||
"Turn on debugging printfs"},
|
||||
{"\-N", TK_ARGV_INT, NULL, (char *) &numReps,
|
||||
{"\-N", TK_ARGV_INT, (char *) NULL, (char *) &numReps,
|
||||
"Number of repetitions"},
|
||||
{"\-of", TK_ARGV_STRING, NULL, (char *) &fileName,
|
||||
{"\-of", TK_ARGV_STRING, (char *) NULL, (char *) &fileName,
|
||||
"Name of file for output"},
|
||||
{"x", TK_ARGV_REST, NULL, (char *) &exec,
|
||||
{"x", TK_ARGV_REST, (char *) NULL, (char *) &exec,
|
||||
"File to exec, followed by any arguments (must be last argument)."},
|
||||
{NULL, TK_ARGV_END, NULL, NULL,
|
||||
NULL}
|
||||
{(char *) NULL, TK_ARGV_END, (char *) NULL, (char *) NULL,
|
||||
(char *) NULL}
|
||||
};
|
||||
|
||||
main(argc, argv)
|
||||
@@ -331,7 +329,7 @@ main(argc, argv)
|
||||
\&...
|
||||
|
||||
if (Tk_ParseArgv(interp, tkwin, &argc, argv, argTable, 0) != TCL_OK) {
|
||||
fprintf(stderr, "%s\en", Tcl_GetString(Tcl_GetObjResult(interp)));
|
||||
fprintf(stderr, "%s\en", interp->result);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_QueueWindowEvent 3 7.5 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_QueueWindowEvent 3 7.5 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CollapseMotionEvents, Tk_QueueWindowEvent \- Add a window event to the Tcl event queue
|
||||
@@ -30,6 +30,7 @@ that all unused fields of the structure be set to zero.
|
||||
Where to add the new event in the queue: \fBTCL_QUEUE_TAIL\fR,
|
||||
\fBTCL_QUEUE_HEAD\fR, or \fBTCL_QUEUE_MARK\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_QueueWindowEvent\fR places a window event on Tcl's internal event
|
||||
@@ -46,5 +47,6 @@ returns the previous value for collapse behavior on the \fIdisplay\fR.
|
||||
The \fIposition\fR argument to \fBTk_QueueWindowEvent\fR has
|
||||
the same significance as for \fBTcl_QueueEvent\fR; see the
|
||||
documentation for \fBTcl_QueueEvent\fR for details.
|
||||
|
||||
.SH KEYWORDS
|
||||
callback, clock, handler, modal timeout, events
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_RestackWindow 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_RestackWindow 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_RestackWindow \- Change a window's position in the stacking order
|
||||
@@ -28,6 +28,7 @@ must be \fBAbove\fR or \fBBelow\fR.
|
||||
Must be a sibling of \fItkwin\fR or a descendant of a sibling.
|
||||
If NULL then \fItkwin\fR is restacked above or below all siblings.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_RestackWindow\fR changes the stacking order of \fIwindow\fR relative
|
||||
@@ -41,5 +42,6 @@ just above or below \fIother\fR.
|
||||
The \fIaboveBelow\fR argument must have one of the symbolic values
|
||||
\fBAbove\fR or \fBBelow\fR.
|
||||
Both of these values are defined by the include file <X11/Xlib.h>.
|
||||
|
||||
.SH KEYWORDS
|
||||
above, below, obscure, stacking order
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_RestrictEvents 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_RestrictEvents 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_RestrictEvents \- filter and selectively delay X events
|
||||
@@ -15,22 +15,23 @@ Tk_RestrictEvents \- filter and selectively delay X events
|
||||
\fB#include <tk.h>\fR
|
||||
.sp
|
||||
Tk_RestrictProc *
|
||||
\fBTk_RestrictEvents\fR(\fIproc, arg, prevArgPtr\fR)
|
||||
\fBTk_RestrictEvents\fR(\fIproc, clientData, prevClientDataPtr\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tk_RestrictProc **prevArgPtr
|
||||
.AS Tk_RestrictProc **prevClientDataPtr
|
||||
.AP Tk_RestrictProc *proc in
|
||||
Predicate procedure to call to filter incoming X events.
|
||||
NULL means do not restrict events at all.
|
||||
.AP ClientData arg in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary argument to pass to \fIproc\fR.
|
||||
.AP ClientData *prevArgPtr out
|
||||
.AP ClientData *prevClientDataPtr out
|
||||
Pointer to place to save argument to previous restrict procedure.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
This procedure is useful in certain situations where applications
|
||||
are only prepared to receive certain X events. After
|
||||
\fBTk_RestrictEvents\fR is called, \fBTcl_DoOneEvent\fR (and
|
||||
\fBTk_RestrictEvents\fR is called, \fBTk_DoOneEvent\fR (and
|
||||
hence \fBTk_MainLoop\fR) will filter X input events through
|
||||
\fIproc\fR. \fIProc\fR indicates whether a
|
||||
given event is to be processed immediately, deferred until some
|
||||
@@ -39,23 +40,23 @@ later time (e.g. when the event restriction is lifted), or discarded.
|
||||
is a procedure with arguments and result that match
|
||||
the type \fBTk_RestrictProc\fR:
|
||||
.CS
|
||||
typedef Tk_RestrictAction \fBTk_RestrictProc\fR(
|
||||
ClientData \fIarg\fR,
|
||||
typedef Tk_RestrictAction Tk_RestrictProc(
|
||||
ClientData \fIclientData\fR,
|
||||
XEvent *\fIeventPtr\fR);
|
||||
.CE
|
||||
The \fIarg\fR argument is a copy of the \fIarg\fR passed
|
||||
The \fIclientData\fR argument is a copy of the \fIclientData\fR passed
|
||||
to \fBTk_RestrictEvents\fR; it may be used to provide \fIproc\fR with
|
||||
information it needs to filter events. The \fIeventPtr\fR points to
|
||||
an event under consideration. \fIProc\fR returns a restrict action
|
||||
(enumerated type \fBTk_RestrictAction\fR) that indicates what
|
||||
\fBTcl_DoOneEvent\fR should do with the event. If the return value is
|
||||
\fBTk_DoOneEvent\fR should do with the event. If the return value is
|
||||
\fBTK_PROCESS_EVENT\fR, then the event will be handled immediately.
|
||||
If the return value is \fBTK_DEFER_EVENT\fR, then the event will be
|
||||
left on the event queue for later processing. If the return value is
|
||||
\fBTK_DISCARD_EVENT\fR, then the event will be removed from the event
|
||||
queue and discarded without being processed.
|
||||
.PP
|
||||
\fBTk_RestrictEvents\fR uses its return value and \fIprevArgPtr\fR
|
||||
\fBTk_RestrictEvents\fR uses its return value and \fIprevClientDataPtr\fR
|
||||
to return information about the current event restriction procedure
|
||||
(a NULL return value means there are currently no restrictions).
|
||||
These values may be used to restore the previous restriction state
|
||||
@@ -74,6 +75,6 @@ solution in these situations is to call \fBXNextEvent\fR or
|
||||
\fBXWindowEvent\fR, but these procedures cannot be used because
|
||||
Tk keeps its own event queue that is separate from the X event
|
||||
queue. Instead, call \fBTk_RestrictEvents\fR to set up a filter,
|
||||
then call \fBTcl_DoOneEvent\fR to retrieve the desired event(s).
|
||||
then call \fBTk_DoOneEvent\fR to retrieve the desired event(s).
|
||||
.SH KEYWORDS
|
||||
delay, event, filter, restriction
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_SetAppName 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_SetAppName 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_SetAppName \- Set the name of an application for 'send' commands
|
||||
@@ -24,6 +24,7 @@ application.
|
||||
.AP "const char" *name in
|
||||
Name under which to register the application.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_SetAppName\fR associates a name with a given application and
|
||||
@@ -58,5 +59,6 @@ so applications do not normally need to call it explicitly.
|
||||
.PP
|
||||
The command \fBtk appname\fR provides Tcl-level access to the
|
||||
functionality of \fBTk_SetAppName\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
application, name, register, send command
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_SetCaretPos 3 8.4 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_SetCaretPos 3 8.4 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_SetCaretPos \- set the display caret location
|
||||
@@ -25,6 +25,7 @@ Window-relative y coordinate.
|
||||
.AP int h in
|
||||
Height of the caret in the window.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_SetCaretPos\fR sets the caret location for the display of the
|
||||
@@ -32,5 +33,6 @@ specified Tk_Window \fItkwin\fR. The caret is the per-display cursor
|
||||
location used for indicating global focus (e.g. to comply with Microsoft
|
||||
Accessibility guidelines), as well as for location of the over-the-spot XIM
|
||||
(X Input Methods) or Windows IME windows.
|
||||
|
||||
.SH KEYWORDS
|
||||
caret, cursor
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_SetClass 3 "" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_SetClass 3 "" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_SetClass, Tk_Class \- set or retrieve a window's class
|
||||
@@ -25,6 +25,7 @@ Token for window.
|
||||
.AP char *class in
|
||||
New class name for window.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_SetClass\fR is called to associate a class with a particular
|
||||
@@ -53,5 +54,6 @@ the properties of a unique identifier (see the manual entry for
|
||||
\fBTk_GetUid\fR for details).
|
||||
If \fItkwin\fR has not yet been given a class, then
|
||||
\fBTk_Class\fR will return NULL.
|
||||
|
||||
.SH KEYWORDS
|
||||
class, unique identifier, window, window manager
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_SetClassProcs 3 8.4 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_SetClassProcs 3 8.4 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_SetClassProcs \- register widget specific procedures
|
||||
@@ -18,13 +18,14 @@ Tk_SetClassProcs \- register widget specific procedures
|
||||
.AS Tk_ClassProc instanceData
|
||||
.AP Tk_Window tkwin in
|
||||
Token for window to modify.
|
||||
.AP "const Tk_ClassProcs" *procs in
|
||||
.AP Tk_ClassProcs *procs in
|
||||
Pointer to data structure containing widget specific procedures.
|
||||
The data structure pointed to by \fIprocs\fR must be static:
|
||||
Tk keeps a reference to it as long as the window exists.
|
||||
.AP ClientData instanceData in
|
||||
Arbitrary one-word value to pass to widget callbacks.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_SetClassProcs\fR is called to register a set of procedures that
|
||||
@@ -37,7 +38,7 @@ typedef struct Tk_ClassProcs {
|
||||
Tk_ClassWorldChangedProc *\fIworldChangedProc\fR;
|
||||
Tk_ClassCreateProc *\fIcreateProc\fR;
|
||||
Tk_ClassModalProc *\fImodalProc\fR;
|
||||
} \fBTk_ClassProcs\fR;
|
||||
} Tk_ClassProcs;
|
||||
.CE
|
||||
The \fIsize\fR field is used to simplify future expansion of the
|
||||
structure. It should always be set to (literally) \fBsizeof(Tk_ClassProcs)\fR.
|
||||
@@ -49,18 +50,18 @@ widgets configured to use that font alias must update their display
|
||||
accordingly. \fIworldChangedProc\fR should have arguments and results
|
||||
that match the type \fBTk_ClassWorldChangedProc\fR:
|
||||
.CS
|
||||
typedef void \fBTk_ClassWorldChangedProc\fR(
|
||||
typedef void Tk_ClassWorldChangedProc(
|
||||
ClientData \fIinstanceData\fR);
|
||||
.CE
|
||||
The \fIinstanceData\fR parameter passed to the \fIworldChangedProc\fR
|
||||
will be identical to the \fIinstanceData\fR parameter passed to
|
||||
\fBTk_SetClassProcs\fR.
|
||||
.PP
|
||||
\fIcreateProc\fR is used to create platform-dependent windows. It is
|
||||
\fIcreateProc\fR is used to create platform-dependant windows. It is
|
||||
invoked by \fBTk_MakeWindowExist\fR. \fIcreateProc\fR should have
|
||||
arguments and results that match the type \fBTk_ClassCreateProc\fR:
|
||||
.CS
|
||||
typedef Window \fBTk_ClassCreateProc\fR(
|
||||
typedef Window Tk_ClassCreateProc(
|
||||
Tk_Window \fItkwin\fR,
|
||||
Window \fIparent\fR,
|
||||
ClientData \fIinstanceData\fR);
|
||||
@@ -75,7 +76,7 @@ created window.
|
||||
triggered in order to handle a modal loop. \fImodalProc\fR should
|
||||
have arguments and results that match the type \fBTk_ClassModalProc\fR:
|
||||
.CS
|
||||
typedef void \fBTk_ClassModalProc\fR(
|
||||
typedef void Tk_ClassModalProc(
|
||||
Tk_Window \fItkwin\fR,
|
||||
XEvent *\fIeventPtr\fR);
|
||||
.CE
|
||||
@@ -83,5 +84,6 @@ The \fItkwin\fR parameter to \fImodalProc\fR will be identical to the
|
||||
\fItkwin\fR parameter passed to \fBTk_SetClassProcs\fR. The
|
||||
\fIeventPtr\fR parameter will be a pointer to an XEvent structure
|
||||
describing the event being processed.
|
||||
|
||||
.SH KEYWORDS
|
||||
callback, class
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_SetGrid 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_SetGrid 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_SetGrid, Tk_UnsetGrid \- control the grid for interactive resizing
|
||||
@@ -32,6 +32,7 @@ Width of one grid unit, in pixels.
|
||||
.AP int heightInc in
|
||||
Height of one grid unit, in pixels.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_SetGrid\fR turns on gridded geometry management for \fItkwin\fR's
|
||||
@@ -59,5 +60,6 @@ toplevel, the calls for the new window have no effect.
|
||||
.PP
|
||||
See the \fBwm\fR manual entry for additional information on gridded geometry
|
||||
management.
|
||||
|
||||
.SH KEYWORDS
|
||||
grid, window, window manager
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_SetOptions 3 8.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_SetOptions 3 8.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_CreateOptionTable, Tk_DeleteOptionTable, Tk_InitOptions, Tk_SetOptions, Tk_FreeSavedOptions, Tk_RestoreSavedOptions, Tk_GetOptionValue, Tk_GetOptionInfo, Tk_FreeConfigOptions, Tk_Offset \- process configuration options
|
||||
@@ -129,21 +129,19 @@ option table is no longer needed \fBTk_DeleteOptionTable\fR should be
|
||||
called to free all of its resources. All of the option tables
|
||||
for a Tcl interpreter are freed automatically if the interpreter is deleted.
|
||||
.PP
|
||||
\fBTk_InitOptions\fR is invoked when a new widget is created to set the
|
||||
default values for all of the widget's configuration options that do not
|
||||
have \fBTK_OPTION_DONT_SET_DEFAULT\fR set in their \fIflags\fR field.
|
||||
\fBTk_InitOptions\fR is passed a token for an option table
|
||||
(\fIoptionTable\fR) and a pointer to a widget record (\fIrecordPtr\fR),
|
||||
which is the C structure that holds information about this widget.
|
||||
\fBTk_InitOptions\fR uses the information in the option table to choose an
|
||||
appropriate default for each option, except those having
|
||||
\fBTK_OPTION_DONT_SET_DEFAULT\fR set, then it stores the default value
|
||||
directly into the widget record, overwriting any information that was
|
||||
already present in the widget record. \fBTk_InitOptions\fR normally
|
||||
returns \fBTCL_OK\fR. If an error occurred while setting the default
|
||||
values (e.g., because a default value was erroneous) then \fBTCL_ERROR\fR
|
||||
is returned and an error message is left in \fIinterp\fR's result if
|
||||
\fIinterp\fR is not NULL.
|
||||
\fBTk_InitOptions\fR is invoked when a new widget is created to set
|
||||
the default values for all of the widget's configuration options.
|
||||
\fBTk_InitOptions\fR is passed a token for an option table (\fIoptionTable\fR)
|
||||
and a pointer to a widget record (\fIrecordPtr\fR), which is the C
|
||||
structure that holds information about this widget. \fBTk_InitOptions\fR
|
||||
uses the information in the option table to
|
||||
choose an appropriate default for each option, then it stores the default
|
||||
value directly into the widget record, overwriting any information that
|
||||
was already present in the widget record. \fBTk_InitOptions\fR normally
|
||||
returns \fBTCL_OK\fR. If an error occurred while setting the default values
|
||||
(e.g., because a default value was erroneous) then \fBTCL_ERROR\fR is returned
|
||||
and an error message is left in \fIinterp\fR's result if \fIinterp\fR
|
||||
is not NULL.
|
||||
.PP
|
||||
\fBTk_SetOptions\fR is invoked to modify configuration options based
|
||||
on information specified in a Tcl command. The command might be one that
|
||||
@@ -261,7 +259,7 @@ typedef struct {
|
||||
int \fIobjOffset\fR;
|
||||
int \fIinternalOffset\fR;
|
||||
int \fIflags\fR;
|
||||
const void *\fIclientData\fR;
|
||||
ClientData \fIclientData\fR;
|
||||
int \fItypeMask\fR;
|
||||
} \fBTk_OptionSpec\fR;
|
||||
.CE
|
||||
@@ -308,27 +306,19 @@ given by \fIinternalOffset\fR. For example, if the option's type is
|
||||
value is not stored in that form. At least one of the offsets must be
|
||||
greater than or equal to zero.
|
||||
.PP
|
||||
The \fIflags\fR field consists of one or more bits ORed together. The
|
||||
following flags are supported:
|
||||
.TP
|
||||
\fBTK_OPTION_NULL_OK\fR
|
||||
If this bit is set for an option then an empty string will be accepted as
|
||||
the value for the option and the resulting internal form will be a NULL
|
||||
pointer, a zero value, or \fBNone\fR, depending on the type of the option.
|
||||
If the flag is not set then empty strings will result in errors.
|
||||
The \fIflags\fR field consists of one or more bits ORed together. At
|
||||
present only a single flag is supported: \fBTK_OPTION_NULL_OK\fR. If
|
||||
this bit is set for an option then an empty string will be accepted as
|
||||
the value for the option and the resulting internal form will be a
|
||||
NULL pointer, a zero value, or \fBNone\fR, depending on the type of
|
||||
the option. If the flag is not set then empty strings will result
|
||||
in errors.
|
||||
\fBTK_OPTION_NULL_OK\fR is typically used to allow a
|
||||
feature to be turned off entirely, e.g. set a cursor value to
|
||||
\fBNone\fR so that a window simply inherits its parent's cursor.
|
||||
Not all option types support the \fBTK_OPTION_NULL_OK\fR
|
||||
flag; for those that do, there is an explicit indication of that fact
|
||||
in the descriptions below.
|
||||
.TP
|
||||
\fBTK_OPTION_DONT_SET_DEFAULT\fR
|
||||
If this bit is set for an option then no default value will be set in
|
||||
\fBTk_InitOptions\fR for this option. Neither the option database, nor any
|
||||
system default value, nor \fIoptionTable\fR are used to give a default
|
||||
value to this option. Instead it is assumed that the caller has already
|
||||
supplied a default value in the widget code.
|
||||
.PP
|
||||
The \fItype\fR field of each Tk_OptionSpec structure determines
|
||||
how to parse the value of that configuration option. The
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_SetWindowVisual 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_SetWindowVisual 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_SetWindowVisual \- change visual characteristics of window
|
||||
@@ -28,6 +28,7 @@ Number of bits per pixel desired for \fItkwin\fR.
|
||||
New colormap for \fItkwin\fR, which must be compatible with
|
||||
\fIvisual\fR and \fIdepth\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
When Tk creates a new window it assigns it the default visual
|
||||
@@ -46,5 +47,6 @@ completed successfully.
|
||||
Note: \fBTk_SetWindowVisual\fR should not be called if you just want
|
||||
to change a window's colormap without changing its visual or depth;
|
||||
call \fBTk_SetWindowColormap\fR instead.
|
||||
|
||||
.SH KEYWORDS
|
||||
colormap, depth, visual
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_StrictMotif 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_StrictMotif 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_StrictMotif \- Return value of tk_strictMotif variable
|
||||
@@ -20,6 +20,7 @@ int
|
||||
.AP Tk_Window tkwin in
|
||||
Token for window.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
This procedure returns the current value of the \fBtk_strictMotif\fR
|
||||
@@ -34,5 +35,6 @@ is good enough, and extra features are welcome.
|
||||
This procedure uses a link to the Tcl variable to provide much
|
||||
faster access to the variable's value than could be had by calling
|
||||
\fBTcl_GetVar\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
Motif compliance, tk_strictMotif variable
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_ComputeTextLayout 3 8.1 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_ComputeTextLayout 3 8.1 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_ComputeTextLayout, Tk_FreeTextLayout, Tk_DrawTextLayout, Tk_UnderlineTextLayout, Tk_PointToChar, Tk_CharBbox, Tk_DistanceToTextLayout, Tk_IntersectTextLayout, Tk_TextLayoutToPostscript \- routines to measure and display single-font, multi-line, justified text.
|
||||
@@ -39,6 +39,7 @@ int
|
||||
.sp
|
||||
void
|
||||
\fBTk_TextLayoutToPostscript(\fIinterp, layout\fB)\fR
|
||||
|
||||
.SH ARGUMENTS
|
||||
.AS Tk_TextLayout "*xPtr, *yPtr"
|
||||
.AP Tk_Font tkfont in
|
||||
@@ -123,8 +124,9 @@ Specifies the width and height, in pixels, of the rectangular area to
|
||||
compare for intersection against the text layout.
|
||||
.AP Tcl_Interp *interp out
|
||||
Postscript code that will print the text layout is appended to
|
||||
the result of interpreter \fIinterp\fR.
|
||||
\fIinterp->result\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
These routines are for measuring and displaying single-font, multi-line,
|
||||
@@ -182,11 +184,9 @@ whose \fIx\fR-value is less than 0 will be considered closest to the first
|
||||
character on that line; any point whose \fIx\fR-value is greater than the
|
||||
width of the text layout will be considered closest to the last character on
|
||||
that line. The return value is the index of the character that was closest
|
||||
to the point, or one more than the index of any character (to indicate that
|
||||
the point was after the end of the string and that the corresponding caret
|
||||
would be at the end of the string). Given a \fIlayout\fR with no characters,
|
||||
the value 0 will always be returned, referring to a hypothetical zero-width
|
||||
placeholder character.
|
||||
to the point. Given a \fIlayout\fR with no characters, the value 0 will
|
||||
always be returned, referring to a hypothetical zero-width placeholder
|
||||
character.
|
||||
.PP
|
||||
\fBTk_CharBbox\fR uses the information in \fIlayout\fR to return the
|
||||
bounding box for the character specified by \fIindex\fR. The width of the
|
||||
@@ -231,9 +231,8 @@ array of strings that represent the individual lines in \fIlayout\fR. It
|
||||
is the responsibility of the caller to take the Postscript array of
|
||||
strings and add some Postscript function operate on the array to render
|
||||
each of the lines. The code that represents the Postscript array of
|
||||
strings is appended to interpreter \fIinterp\fR's result.
|
||||
strings is appended to \fIinterp->result\fR.
|
||||
.SH "DISPLAY MODEL"
|
||||
.PP
|
||||
When measuring a text layout, space characters that occur at the end of a
|
||||
line are ignored. The space characters still exist and the insertion point
|
||||
can be positioned amongst them, but their additional width is ignored when
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_InitStubs 3 8.4 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_InitStubs 3 8.4 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_InitStubs \- initialize the Tk stubs mechanism
|
||||
@@ -34,7 +34,7 @@ as \fIversion\fR.
|
||||
The Tcl stubs mechanism defines a way to dynamically bind
|
||||
extensions to a particular Tcl implementation at run time.
|
||||
the stubs mechanism requires no changes to applications
|
||||
incorporating Tcl/Tk interpreters. Only developers creating
|
||||
incoporating Tcl/Tk interpreters. Only developers creating
|
||||
C-based Tcl/Tk extensions need to take steps to use the
|
||||
stubs mechanism with their extensions.
|
||||
See the \fBTcl_InitStubs\fR page for more information.
|
||||
@@ -48,19 +48,15 @@ Tcl functions.
|
||||
Call \fBTk_InitStubs\fR if the extension before calling any other
|
||||
Tk functions.
|
||||
.IP 2) 5
|
||||
Define the \fBUSE_TCL_STUBS\fR and the \fBUSE_TK_STUBS\fR
|
||||
symbols. Typically, you would include the \fB\-DUSE_TCL_STUBS\fR and
|
||||
the \fB\-DUSE_TK_STUBS\fR flags when compiling the extension.
|
||||
Define the \fBUSE_TCL_STUBS\fR symbol. Typically, you would include the
|
||||
\fB\-DUSE_TCL_STUBS\fR flag when compiling the extension.
|
||||
.IP 3) 5
|
||||
Link the extension with the Tcl and Tk stubs libraries instead of the
|
||||
standard Tcl and Tk libraries. On Unix platforms, the library names
|
||||
are \fIlibtclstub8.4.a\fR and \fIlibtkstub8.4.a\fR; on Windows
|
||||
platforms, the library names are \fItclstub84.lib\fR and
|
||||
\fItkstub84.lib\fR. Adjust the library names with appropriate version
|
||||
number but note that the extension may only be used with versions of
|
||||
Tcl/Tk that have that version number or higher.
|
||||
Link the extension with the Tcl and Tk stubs libraries instead of
|
||||
the standard Tcl and Tk libraries. On Unix platforms, the library
|
||||
names are \fIlibtclstub8.4.a\fR and \fIlibtkstub8.4.a\fR; on Windows
|
||||
platforms, the library names are \fItclstub84.lib\fR and \fItkstub84.lib\fR
|
||||
(adjust names with appropriate version number).
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_InitStubs\fR attempts to initialize the Tk stub table pointers
|
||||
and ensure that the correct version of Tk is loaded. In addition
|
||||
to an interpreter handle, it accepts as arguments a version number
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_Init 3 8.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_Init 3 8.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_Init, Tk_SafeInit \- add Tk to an interpreter and make a new Tk application.
|
||||
@@ -23,6 +23,7 @@ int
|
||||
Interpreter in which to load Tk. Tk should not already be loaded
|
||||
in this interpreter.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_Init\fR is the package initialization procedure for Tk.
|
||||
@@ -33,7 +34,7 @@ and creates a new Tk application, including its main window.
|
||||
If the initialization is successful \fBTk_Init\fR returns
|
||||
\fBTCL_OK\fR; if there is an error it returns \fBTCL_ERROR\fR.
|
||||
\fBTk_Init\fR also leaves a result or error message
|
||||
in interpreter \fIinterp\fR's result.
|
||||
in \fIinterp->result\fR.
|
||||
.PP
|
||||
If there is a variable \fBargv\fR in \fIinterp\fR, \fBTk_Init\fR
|
||||
treats the contents of this variable as a list of options for the
|
||||
@@ -81,5 +82,6 @@ from the user.
|
||||
\fBwm\fR
|
||||
If toplevels are ever allowed, wm can be used to remove decorations,
|
||||
move windows around, etc.
|
||||
|
||||
.SH KEYWORDS
|
||||
safe, application, initialization, load, main window
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_Main 3 4.0 Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_Main 3 4.0 Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_Main \- main program for Tk-based applications
|
||||
@@ -20,12 +20,12 @@ Tk_Main \- main program for Tk-based applications
|
||||
.AP int argc in
|
||||
Number of elements in \fIargv\fR.
|
||||
.AP char *argv[] in
|
||||
Array of strings containing command-line arguments. On Windows, when
|
||||
using -DUNICODE, the parameter type changes to wchar_t *.
|
||||
Array of strings containing command-line arguments.
|
||||
.AP Tcl_AppInitProc *appInitProc in
|
||||
Address of an application-specific initialization procedure.
|
||||
The value for this argument is usually \fBTcl_AppInit\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_Main\fR acts as the main program for most Tk-based applications.
|
||||
@@ -50,21 +50,11 @@ for the application to perform its own initialization, such as defining
|
||||
application-specific commands. The procedure must have an interface
|
||||
that matches the type \fBTcl_AppInitProc\fR:
|
||||
.CS
|
||||
typedef int \fBTcl_AppInitProc\fR(
|
||||
Tcl_Interp *\fIinterp\fR);
|
||||
typedef int Tcl_AppInitProc(Tcl_Interp *\fIinterp\fR);
|
||||
.CE
|
||||
\fIAppInitProc\fR is almost always a pointer to \fBTcl_AppInit\fR;
|
||||
for more details on this procedure, see the documentation
|
||||
for \fBTcl_AppInit\fR.
|
||||
.PP
|
||||
\fBTk_Main\fR functions much the same as \fBTcl_Main\fR. In particular,
|
||||
\fBTk_Main\fR supports both an interactive mode and a startup script
|
||||
mode, with the file name and encoding of a startup script under the
|
||||
control of the \fBTcl_SetStartupScript\fR and \fBTcl_GetStartupScript\fR
|
||||
routines. However it calls \fBTk_MainLoop\fR after processing any
|
||||
supplied script, and in interactive uses events registered with
|
||||
\fBTcl_CreateFileHandler\fR to process user input.
|
||||
.SH "SEE ALSO"
|
||||
Tcl_DoOneEvent(3)
|
||||
|
||||
.SH KEYWORDS
|
||||
application-specific initialization, command-line arguments, main program
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tk_WindowId 3 "8.4" Tk "Tk Library Procedures"
|
||||
.so man.macros
|
||||
.TH Tk_WindowId 3 "8.4" Tk "Tk Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tk_WindowId, Tk_Parent, Tk_Display, Tk_DisplayName, Tk_ScreenNumber, Tk_Screen, Tk_X, Tk_Y, Tk_Width, Tk_Height, Tk_Changes, Tk_Attributes, Tk_IsContainer, Tk_IsEmbedded, Tk_IsMapped, Tk_IsTopLevel, Tk_ReqWidth, Tk_ReqHeight, Tk_MinReqWidth, Tk_MinReqHeight, Tk_InternalBorderLeft, Tk_InternalBorderRight, Tk_InternalBorderTop, Tk_InternalBorderBottom, Tk_Visual, Tk_Depth, Tk_Colormap, Tk_Interp \- retrieve information from Tk's local data structure
|
||||
@@ -102,6 +102,7 @@ Tcl_Interp *
|
||||
.AP Tk_Window tkwin in
|
||||
Token for window.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTk_WindowId\fR and the other names listed above are
|
||||
@@ -182,6 +183,7 @@ and \fBTk_Colormap\fR returns the current
|
||||
colormap for the window. The visual characteristics are
|
||||
normally set from the defaults for the window's screen, but
|
||||
they may be overridden by calling \fBTk_SetWindowVisual\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
attributes, colormap, depth, display, height, geometry manager,
|
||||
identifier, mapped, requested size, screen, top-level,
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH bell n 8.4 Tk "Tk Built-In Commands"
|
||||
.so man.macros
|
||||
.TH bell n 8.4 Tk "Tk Built-In Commands"
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
@@ -15,6 +15,7 @@ bell \- Ring a display's bell
|
||||
.SH SYNOPSIS
|
||||
\fBbell \fR?\fB\-displayof \fIwindow\fR? ?\fB\-nice\fR?
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
This command rings the bell on the display for \fIwindow\fR and
|
||||
@@ -27,8 +28,6 @@ may be modified with programs such as \fBxset\fR.
|
||||
If \fB\-nice\fR is not specified, this command also resets the screen saver
|
||||
for the screen. Some screen savers will ignore this, but others will reset
|
||||
so that the screen becomes visible again.
|
||||
|
||||
.SH KEYWORDS
|
||||
beep, bell, ring
|
||||
'\" Local Variables:
|
||||
'\" mode: nroff
|
||||
'\" End:
|
||||
|
||||
58
doc/bind.n
58
doc/bind.n
@@ -6,8 +6,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH bind n 8.0 Tk "Tk Built-In Commands"
|
||||
.so man.macros
|
||||
.TH bind n 8.0 Tk "Tk Built-In Commands"
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
@@ -19,10 +19,9 @@ bind \- Arrange for X events to invoke Tcl scripts
|
||||
.PP
|
||||
The \fBbind\fR command associates Tcl scripts with X events.
|
||||
If all three arguments are specified, \fBbind\fR will
|
||||
arrange for \fIscript\fR (a Tcl script called the
|
||||
.QW "binding script")
|
||||
to be evaluated whenever the event(s) given by \fIsequence\fR
|
||||
occur in the window(s) identified by \fItag\fR.
|
||||
arrange for \fIscript\fR (a Tcl script) to be evaluated whenever
|
||||
the event(s) given by \fIsequence\fR occur in the window(s)
|
||||
identified by \fItag\fR.
|
||||
If \fIscript\fR is prefixed with a
|
||||
.QW + ,
|
||||
then it is appended to
|
||||
@@ -152,6 +151,7 @@ requirement.
|
||||
The \fBCommand\fR and \fBOption\fR modifiers are equivalents of \fBMod1\fR
|
||||
resp. \fBMod2\fR, they correspond to Macintosh-specific modifier keys.
|
||||
.PP
|
||||
.VS 8.5
|
||||
The \fBExtended\fR modifier is, at present, specific to Windows. It
|
||||
appears on events that are associated with the keys on the
|
||||
.QW "extended keyboard" .
|
||||
@@ -160,6 +160,7 @@ and \fBControl\fR keys at the right of the keyboard, the cursor keys
|
||||
in the cluster to the left of the numeric pad, the \fBNumLock\fR key,
|
||||
the \fBBreak\fR key, the \fBPrintScreen\fR key, and the \fB/\fR and
|
||||
\fBEnter\fR keys in the numeric keypad.
|
||||
.VE 8.5
|
||||
.SS "EVENT TYPES"
|
||||
.PP
|
||||
The \fItype\fR field may be any of the standard X event types, with a
|
||||
@@ -206,7 +207,9 @@ always routed to the window that currently has focus. When the event
|
||||
is received you can use the \fB%D\fR substitution to get the
|
||||
\fIdelta\fR field for the event, which is a integer value describing how
|
||||
the mouse wheel has moved. The smallest value for which the
|
||||
system will report is defined by the OS. The sign of the
|
||||
system will report is defined by the OS. On Windows 95 & 98 machines
|
||||
this value is at least 120 before it is reported. However, higher
|
||||
resolution devices may be available in the future. The sign of the
|
||||
value determines which direction your widget should scroll. Positive
|
||||
values should scroll up and negative values should scroll down.
|
||||
.IP "\fBKeyPress\fR, \fBKeyRelease\fR" 5
|
||||
@@ -388,8 +391,7 @@ For example, \fB<Control\-comma>\fR is equivalent to
|
||||
\fB<Control\-KeyPress\-comma>\fR.
|
||||
.SH "BINDING SCRIPTS AND SUBSTITUTIONS"
|
||||
.PP
|
||||
The \fIscript\fR argument to \fBbind\fR is a Tcl script, called the
|
||||
.QW "binding script",
|
||||
The \fIscript\fR argument to \fBbind\fR is a Tcl script,
|
||||
which will be executed whenever the given event sequence occurs.
|
||||
\fICommand\fR will be executed in the same interpreter that the
|
||||
\fBbind\fR command was executed in, and it will run at global
|
||||
@@ -427,7 +429,10 @@ The \fIcount\fR field from the event. Valid only for \fBExpose\fR events.
|
||||
Indicates that there are \fIcount\fR pending \fBExpose\fR events which have not
|
||||
yet been delivered to the window.
|
||||
.IP \fB%d\fR 5
|
||||
The \fIdetail\fR or \fIuser_data\fR
|
||||
The \fIdetail\fR
|
||||
.VS 8.5
|
||||
or \fIuser_data\fR
|
||||
.VE 8.5
|
||||
field from the event. The \fB%d\fR is replaced by
|
||||
a string identifying the detail. For \fBEnter\fR,
|
||||
\fBLeave\fR, \fBFocusIn\fR, and \fBFocusOut\fR events,
|
||||
@@ -447,11 +452,13 @@ For \fBConfigureRequest\fR events, the string will be one of:
|
||||
\fBBelow\fR \fBNone\fR
|
||||
\fBBottomIf\fR \fBTopIf\fR
|
||||
.DE
|
||||
.VS 8.5
|
||||
For virtual events, the string will be whatever value is stored in the
|
||||
\fIuser_data\fR field when the event was created (typically with
|
||||
\fBevent generate\fR), or the empty string if the field is NULL.
|
||||
Virtual events corresponding to key sequence presses (see \fBevent
|
||||
add\fR for details) set the \fIuser_data\fR to NULL.
|
||||
.VE 8.5
|
||||
For events other than these, the substituted string is undefined.
|
||||
.RE
|
||||
.IP \fB%f\fR 5
|
||||
@@ -527,7 +534,9 @@ The \fIborder_width\fR field from the event. Valid only for
|
||||
.IP \fB%D\fR 5
|
||||
This reports the \fIdelta\fR value of a \fBMouseWheel\fR event. The
|
||||
\fIdelta\fR value represents the rotation units the mouse wheel has
|
||||
been moved. The sign of the value represents the direction the mouse
|
||||
been moved. On Windows 95 & 98 systems the smallest value for the
|
||||
delta is 120. Future systems may support higher resolution values for
|
||||
the delta. The sign of the value represents the direction the mouse
|
||||
wheel was scrolled.
|
||||
.IP \fB%E\fR 5
|
||||
The \fIsend_event\fR field from the event. Valid for all event types.
|
||||
@@ -539,9 +548,6 @@ event generated by \fBSendEvent\fR.
|
||||
.IP \fB%K\fR 5
|
||||
The keysym corresponding to the event, substituted as a textual
|
||||
string. Valid only for \fBKeyPress\fR and \fBKeyRelease\fR events.
|
||||
.IP \fB%M\fR 5
|
||||
The number of script-based binding patterns matched so far for the
|
||||
event. Valid for all event types.
|
||||
.IP \fB%N\fR 5
|
||||
The keysym corresponding to the event, substituted as a decimal
|
||||
number. Valid only for \fBKeyPress\fR and \fBKeyRelease\fR events.
|
||||
@@ -566,8 +572,8 @@ The \fIx_root\fR and \fIy_root\fR fields from the event.
|
||||
If a virtual-root window manager is being used then the substituted
|
||||
values are the corresponding x-coordinate and y-coordinate in the virtual root.
|
||||
Valid only for
|
||||
\fBButtonPress\fR, \fBButtonRelease\fR, \fBEnter\fR, \fBKeyPress\fR,
|
||||
\fBKeyRelease\fR, \fBLeave\fR and \fBMotion\fR events.
|
||||
\fBButtonPress\fR, \fBButtonRelease\fR, \fBKeyPress\fR, \fBKeyRelease\fR,
|
||||
and \fBMotion\fR events.
|
||||
Same meaning as \fB%x\fR and \fB%y\fR, except relative to the (virtual) root
|
||||
window.
|
||||
.LP
|
||||
@@ -608,21 +614,13 @@ the window.
|
||||
.PP
|
||||
The \fBcontinue\fR and \fBbreak\fR commands may be used inside a
|
||||
binding script to control the processing of matching scripts.
|
||||
If \fBcontinue\fR is invoked within a binding script, then this
|
||||
binding script, including all other
|
||||
.QW +
|
||||
appended scripts, is terminated but Tk will continue processing
|
||||
binding scripts associated with other \fItag\fR's.
|
||||
If \fBcontinue\fR is invoked, then the current binding script
|
||||
is terminated but Tk will continue processing binding scripts
|
||||
associated with other \fItag\fR's.
|
||||
If the \fBbreak\fR command is invoked within a binding script,
|
||||
then that script terminates and no other scripts will be invoked
|
||||
for the event.
|
||||
.PP
|
||||
Within a script called from the binding script, \fBreturn\fR
|
||||
\fB-code ok\fR may be used to continue processing (including
|
||||
.QW +
|
||||
appended scripts), or \fBreturn\fR \fB-code break\fR may be used to
|
||||
stop processing all other binding scripts.
|
||||
.PP
|
||||
If more than one binding matches a particular event and they
|
||||
have the same \fItag\fR, then the most specific binding
|
||||
is chosen and its script is evaluated.
|
||||
@@ -638,11 +636,11 @@ of events matched) is more specific than a shorter sequence;
|
||||
.IP (c)
|
||||
if the modifiers specified in one pattern are a subset of the
|
||||
modifiers in another pattern, then the pattern with more modifiers
|
||||
is more specific;
|
||||
is more specific.
|
||||
.IP (d)
|
||||
a virtual event whose physical pattern matches the sequence is less
|
||||
specific than the same physical pattern that is not associated with a
|
||||
virtual event;
|
||||
virtual event.
|
||||
.IP (e)
|
||||
given a sequence that matches two or more virtual events, one
|
||||
of the virtual events will be chosen, but the order is undefined.
|
||||
@@ -703,7 +701,6 @@ If an error occurs in executing the script for a binding then the
|
||||
The \fBbgerror\fR command will be executed at global level
|
||||
(outside the context of any Tcl procedure).
|
||||
.SH "EXAMPLES"
|
||||
.PP
|
||||
Arrange for a string describing the motion of the mouse to be printed
|
||||
out when the mouse is double-clicked:
|
||||
.CS
|
||||
@@ -725,6 +722,3 @@ pack [label .l \-textvariable keysym \-padx 2m \-pady 1m]
|
||||
bgerror(n), bindtags(n), event(n), focus(n), grab(n), keysyms(n)
|
||||
.SH KEYWORDS
|
||||
binding, event
|
||||
'\" Local Variables:
|
||||
'\" mode: nroff
|
||||
'\" End:
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH bindtags n 4.0 Tk "Tk Built-In Commands"
|
||||
.so man.macros
|
||||
.TH bindtags n 4.0 Tk "Tk Built-In Commands"
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
@@ -14,6 +14,7 @@ bindtags \- Determine which bindings apply to a window, and order of evaluation
|
||||
.SH SYNOPSIS
|
||||
\fBbindtags \fIwindow \fR?\fItagList\fR?
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
When a binding is created with the \fBbind\fR command, it is
|
||||
@@ -72,7 +73,6 @@ associated with the \fBButton\fR tag, will no longer apply to \fB.b\fR,
|
||||
but any bindings associated with \fBTrickyButton\fR (perhaps some
|
||||
new button behavior) will apply.
|
||||
.SH EXAMPLE
|
||||
.PP
|
||||
If you have a set of nested \fBframe\fR widgets and you want events
|
||||
sent to a \fBbutton\fR widget to also be delivered to all the widgets
|
||||
up to the current \fBtoplevel\fR (in contrast to Tk's default
|
||||
@@ -93,10 +93,9 @@ proc setupBindtagsForTreeDelivery {widget} {
|
||||
\fBbindtags\fR $widget $tags
|
||||
}
|
||||
.CE
|
||||
|
||||
.SH "SEE ALSO"
|
||||
bind(n)
|
||||
|
||||
.SH KEYWORDS
|
||||
binding, event, tag
|
||||
'\" Local Variables:
|
||||
'\" mode: nroff
|
||||
'\" End:
|
||||
|
||||
26
doc/bitmap.n
26
doc/bitmap.n
@@ -5,20 +5,16 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH bitmap n 4.0 Tk "Tk Built-In Commands"
|
||||
.so man.macros
|
||||
.TH bitmap n 4.0 Tk "Tk Built-In Commands"
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
bitmap \- Images that display two colors
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fBimage create bitmap \fR?\fIname\fR? ?\fIoptions\fR?
|
||||
|
||||
\fIimageName \fBcget\fR \fIoption\fR
|
||||
\fIimageName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
|
||||
.fi
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
A bitmap is an image whose pixels can display either of two colors
|
||||
@@ -34,6 +30,7 @@ producing a transparent effect.
|
||||
For other pixels, the image displays the foreground color if
|
||||
the source data is one and the background color if the source
|
||||
data is zero.
|
||||
|
||||
.SH "CREATING BITMAPS"
|
||||
.PP
|
||||
Like all images, bitmaps are created using the \fBimage create\fR
|
||||
@@ -41,7 +38,6 @@ command.
|
||||
Bitmaps support the following \fIoptions\fR:
|
||||
.TP
|
||||
\fB\-background \fIcolor\fR
|
||||
.
|
||||
Specifies a background color for the image in any of the standard
|
||||
ways accepted by Tk. If this option is set to an empty string
|
||||
then the background pixels will be transparent. This effect
|
||||
@@ -49,7 +45,6 @@ is achieved by using the source bitmap as the mask bitmap, ignoring
|
||||
any \fB\-maskdata\fR or \fB\-maskfile\fR options.
|
||||
.TP
|
||||
\fB\-data \fIstring\fR
|
||||
.
|
||||
Specifies the contents of the source bitmap as a string.
|
||||
The string must adhere to X11 bitmap format (e.g., as generated
|
||||
by the \fBbitmap\fR program).
|
||||
@@ -57,19 +52,16 @@ If both the \fB\-data\fR and \fB\-file\fR options are specified,
|
||||
the \fB\-data\fR option takes precedence.
|
||||
.TP
|
||||
\fB\-file \fIname\fR
|
||||
.
|
||||
\fIname\fR gives the name of a file whose contents define the
|
||||
source bitmap.
|
||||
The file must adhere to X11 bitmap format (e.g., as generated
|
||||
by the \fBbitmap\fR program).
|
||||
.TP
|
||||
\fB\-foreground \fIcolor\fR
|
||||
.
|
||||
Specifies a foreground color for the image in any of the standard
|
||||
ways accepted by Tk.
|
||||
.TP
|
||||
\fB\-maskdata \fIstring\fR
|
||||
.
|
||||
Specifies the contents of the mask as a string.
|
||||
The string must adhere to X11 bitmap format (e.g., as generated
|
||||
by the \fBbitmap\fR program).
|
||||
@@ -77,11 +69,11 @@ If both the \fB\-maskdata\fR and \fB\-maskfile\fR options are specified,
|
||||
the \fB\-maskdata\fR option takes precedence.
|
||||
.TP
|
||||
\fB\-maskfile \fIname\fR
|
||||
.
|
||||
\fIname\fR gives the name of a file whose contents define the
|
||||
mask.
|
||||
The file must adhere to X11 bitmap format (e.g., as generated
|
||||
by the \fBbitmap\fR program).
|
||||
|
||||
.SH "IMAGE COMMAND"
|
||||
.PP
|
||||
When a bitmap image is created, Tk also creates a new command
|
||||
@@ -97,14 +89,12 @@ determine the exact behavior of the command. The following
|
||||
commands are possible for bitmap images:
|
||||
.TP
|
||||
\fIimageName \fBcget\fR \fIoption\fR
|
||||
.
|
||||
Returns the current value of the configuration option given
|
||||
by \fIoption\fR.
|
||||
\fIOption\fR may have any of the values accepted by the
|
||||
\fBimage create\fR \fBbitmap\fR command.
|
||||
\fBimage create bitmap\fR command.
|
||||
.TP
|
||||
\fIimageName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
|
||||
.
|
||||
Query or modify the configuration options for the image.
|
||||
If no \fIoption\fR is specified, returns a list describing all of
|
||||
the available options for \fIimageName\fR (see \fBTk_ConfigureInfo\fR for
|
||||
@@ -116,9 +106,7 @@ one or more \fIoption\-value\fR pairs are specified, then the command
|
||||
modifies the given option(s) to have the given value(s); in
|
||||
this case the command returns an empty string.
|
||||
\fIOption\fR may have any of the values accepted by the
|
||||
\fBimage create\fR \fBbitmap\fR command.
|
||||
\fBimage create bitmap\fR command.
|
||||
|
||||
.SH KEYWORDS
|
||||
bitmap, image
|
||||
'\" Local Variables:
|
||||
'\" mode: nroff
|
||||
'\" End:
|
||||
|
||||
275
doc/busy.n
275
doc/busy.n
@@ -1,275 +0,0 @@
|
||||
'\"
|
||||
'\" Copyright (c) 1993-1998 Lucent Technologies, Inc.
|
||||
'\" Copyright (c) 2008 Jos Decoster
|
||||
'\"
|
||||
'\" Permission to use, copy, modify, and distribute this software and its
|
||||
'\" documentation for any purpose and without fee is hereby granted, provided
|
||||
'\" that the above copyright notice appear in all copies and that both that
|
||||
'\" the copyright notice and warranty disclaimer appear in supporting
|
||||
'\" documentation, and that the names of Lucent Technologies any of their
|
||||
'\" entities not be used in advertising or publicity pertaining to
|
||||
'\" distribution of the software without specific, written prior permission.
|
||||
'\"
|
||||
'\" Lucent Technologies disclaims all warranties with regard to this software,
|
||||
'\" including all implied warranties of merchantability and fitness. In no
|
||||
'\" event shall Lucent Technologies be liable for any special, indirect or
|
||||
'\" consequential damages or any damages whatsoever resulting from loss of
|
||||
'\" use, data or profits, whether in an action of contract, negligence or
|
||||
'\" other tortuous action, arising out of or in connection with the use or
|
||||
'\" performance of this software.
|
||||
'\"
|
||||
'\" BLT::busy command created by George Howlett.
|
||||
'\"
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH busy n "" Tk "Tk Built-In Commands"
|
||||
.so man.macros
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
busy \- confine pointer events to a window sub-tree
|
||||
.SH SYNOPSIS
|
||||
\fBtk busy\fR \fIwindow \fR?\fIoptions\fR?
|
||||
.sp
|
||||
\fBtk busy hold\fR \fIwindow \fR?\fIoptions\fR?
|
||||
.sp
|
||||
\fBtk busy configure \fIwindow\fR ?\fIoption value\fR?...
|
||||
.sp
|
||||
\fBtk busy forget\fR \fIwindow \fR?\fIwindow \fR?...
|
||||
.sp
|
||||
\fBtk busy current\fR ?\fIpattern\fR?
|
||||
.sp
|
||||
\fBtk busy status \fIwindow\fR
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The \fBtk busy\fR command provides a simple means to block pointer events from
|
||||
Tk widgets, while overriding the widget's cursor with a configurable busy
|
||||
cursor. Note this command does not prevent keyboard events from being sent to
|
||||
the widgets made busy.
|
||||
.SH INTRODUCTION
|
||||
.PP
|
||||
There are many times in applications where you want to temporarily restrict
|
||||
what actions the user can take. For example, an application could have a
|
||||
.QW Run
|
||||
button that when pressed causes some processing to occur. However, while the
|
||||
application is busy processing, you probably don't want the user to be
|
||||
able to click the
|
||||
.QW Run
|
||||
button again. You may also want restrict the user from other tasks such as
|
||||
clicking a
|
||||
.QW Print
|
||||
button.
|
||||
.PP
|
||||
The \fBtk busy\fR command lets you make Tk widgets busy. This means that user
|
||||
interactions such as button clicks, moving the mouse, typing at the keyboard,
|
||||
etc.\0are ignored by the widget. You can set a special cursor (like a watch)
|
||||
that overrides the widget's normal cursor, providing feedback that the
|
||||
application (widget) is temporarily busy.
|
||||
.PP
|
||||
When a widget is made busy, the widget and all of its descendants will ignore
|
||||
pointer events. It's easy to make an entire panel of widgets busy. You can
|
||||
simply make the toplevel widget (such as
|
||||
.QW . )
|
||||
busy. This is easier and far much more efficient than recursively traversing
|
||||
the widget hierarchy, disabling each widget and re-configuring its cursor.
|
||||
.PP
|
||||
Often, the \fBtk busy\fR command can be used instead of Tk's \fBgrab\fR
|
||||
command. Unlike \fBgrab\fR which restricts all user interactions to one
|
||||
widget, with the \fBtk busy\fR command you can have more than one widget
|
||||
active (for example, a
|
||||
.QW Cancel
|
||||
dialog and a
|
||||
.QW Help
|
||||
button).
|
||||
.SS EXAMPLE
|
||||
.PP
|
||||
You can make several widgets busy by simply making its ancestor widget busy
|
||||
using the \fBhold\fR operation.
|
||||
.PP
|
||||
.CS
|
||||
frame .top
|
||||
button .top.button; canvas .top.canvas
|
||||
pack .top.button .top.canvas
|
||||
pack .top
|
||||
# . . .
|
||||
\fBtk busy\fR hold .top
|
||||
update
|
||||
.CE
|
||||
.PP
|
||||
All the widgets within \fB.top\fR (including \fB.top\fR) are now busy. Using
|
||||
\fBupdate\fR insures that \fBtk busy\fR command will take effect before any
|
||||
other user events can occur.
|
||||
.PP
|
||||
When the application is no longer busy processing, you can allow user
|
||||
interactions again and free any resources it allocated by the \fBforget\fR
|
||||
operation.
|
||||
.PP
|
||||
.CS
|
||||
\fBtk busy\fR forget .top
|
||||
.CE
|
||||
.PP
|
||||
The busy window has a configurable cursor. You can change the busy cursor
|
||||
using the \fBconfigure\fR operation.
|
||||
.PP
|
||||
.CS
|
||||
\fBtk busy\fR configure .top \-cursor "watch"
|
||||
.CE
|
||||
.PP
|
||||
Destroying the widget will also clean up any resources allocated by the \fBtk
|
||||
busy\fR command.
|
||||
.PP
|
||||
.SH OPERATIONS
|
||||
.PP
|
||||
The following operations are available for the \fBtk busy\fR command:
|
||||
.TP
|
||||
\fBtk busy \fIwindow\fR ?\fIoption value\fR?...
|
||||
.
|
||||
Shortcut for \fBtk busy hold\fR command.
|
||||
.TP
|
||||
\fBtk busy hold \fIwindow\fR ?\fIoption value\fR?...
|
||||
.
|
||||
Makes the specified \fIwindow\fR (and its descendants in the Tk window
|
||||
hierarchy) appear busy. \fIWindow\fR must be a valid path name of a Tk widget.
|
||||
A transparent window is put in front of the specified window. This transparent
|
||||
window is mapped the next time idle tasks are processed, and the specified
|
||||
window and its descendants will be blocked from user interactions. Normally
|
||||
\fBupdate\fR should be called immediately afterward to insure that the hold
|
||||
operation is in effect before the application starts its processing. The
|
||||
following configuration options are valid:
|
||||
.RS
|
||||
.TP
|
||||
\fB\-cursor \fIcursorName\fR
|
||||
.
|
||||
Specifies the cursor to be displayed when the widget is made busy.
|
||||
\fICursorName\fR can be in any form accepted by \fBTk_GetCursor\fR. The
|
||||
default cursor is \fBwait\fR on Windows and \fBwatch\fR on other platforms.
|
||||
.RE
|
||||
.TP
|
||||
\fBtk busy cget \fIwindow\fR \fIoption\fR
|
||||
.
|
||||
Queries the \fBtk busy\fR command configuration options for \fIwindow\fR.
|
||||
\fIWindow\fR must be the path name of a widget previously made busy by the
|
||||
\fBhold\fR operation. The command returns the present value of the specified
|
||||
\fIoption\fR. \fIOption\fR may have any of the values accepted by the
|
||||
\fBhold\fR operation.
|
||||
.TP
|
||||
\fBtk busy configure \fIwindow\fR ?\fIoption value\fR?...
|
||||
.
|
||||
Queries or modifies the \fBtk busy\fR command configuration options for
|
||||
\fIwindow\fR. \fIWindow\fR must be the path name of a widget previously made
|
||||
busy by the \fBhold\fR operation. If no options are specified, a list
|
||||
describing all of the available options for \fIwindow\fR (see
|
||||
\fBTk_ConfigureInfo\fR for information on the format of this list) is
|
||||
returned. If \fIoption\fR is specified with no \fIvalue\fR, then the command
|
||||
returns a list describing the one named option (this list will be identical to
|
||||
the corresponding sublist of the value returned if no \fIoption\fR is
|
||||
specified). If one or more \fIoption\-value\fR pairs are specified, then the
|
||||
command modifies the given widget option(s) to have the given value(s); in
|
||||
this case the command returns the empty string. \fIOption\fR may have any of
|
||||
the values accepted by the \fBhold\fR operation.
|
||||
.RS
|
||||
.PP
|
||||
Please note that the option database is referenced through \fIwindow\fR. For
|
||||
example, if the widget \fB.frame\fR is to be made busy, the busy cursor can be
|
||||
specified for it by either \fBoption\fR command:
|
||||
.PP
|
||||
.CS
|
||||
option add *frame.busyCursor gumby
|
||||
option add *Frame.BusyCursor gumby
|
||||
.CE
|
||||
.RE
|
||||
.TP
|
||||
\fBtk busy forget \fIwindow\fR ?\fIwindow\fR?...
|
||||
.
|
||||
Releases resources allocated by the \fBtk busy\fR command for \fIwindow\fR,
|
||||
including the transparent window. User events will again be received by
|
||||
\fIwindow\fR. Resources are also released when \fIwindow\fR is destroyed.
|
||||
\fIWindow\fR must be the name of a widget specified in the \fBhold\fR
|
||||
operation, otherwise an error is reported.
|
||||
.TP
|
||||
\fBtk busy current \fR?\fIpattern\fR?
|
||||
.
|
||||
Returns the pathnames of all widgets that are currently busy. If a
|
||||
\fIpattern\fR is given, only the path names of busy widgets matching
|
||||
\fIpattern\fR are returned.
|
||||
.TP
|
||||
\fBtk busy status \fIwindow\fR
|
||||
.
|
||||
Returns the status of a widget \fIwindow\fR. If \fIwindow\fR presently can not
|
||||
receive user interactions, \fB1\fR is returned, otherwise \fB0\fR.
|
||||
.SH "EVENT HANDLING"
|
||||
.SS BINDINGS
|
||||
.PP
|
||||
The event blocking feature is implemented by creating and mapping a
|
||||
transparent window that completely covers the widget. When the busy window is
|
||||
mapped, it invisibly shields the widget and its hierarchy from all events that
|
||||
may be sent. Like Tk widgets, busy windows have widget names in the Tk window
|
||||
hierarchy. This means that you can use the \fBbind\fR command, to handle
|
||||
events in the busy window.
|
||||
.PP
|
||||
.CS
|
||||
\fBtk busy\fR hold .frame.canvas
|
||||
bind .frame.canvas_Busy <Enter> { ... }
|
||||
.CE
|
||||
.PP
|
||||
Normally the busy window is a sibling of the widget. The name of the busy
|
||||
window is
|
||||
.QW \fIwidget\fB_Busy\fR
|
||||
where \fIwidget\fR is the name of the widget to be made busy. In the previous
|
||||
example, the pathname of the busy window is
|
||||
.QW \fB.frame.canvas_Busy\fR .
|
||||
The exception is when the widget is a toplevel widget (such as
|
||||
.QW . )
|
||||
where the busy window can't be made a sibling. The busy window is then a child
|
||||
of the widget named
|
||||
.QW \fIwidget\fB._Busy\fR
|
||||
where \fIwidget\fR is the name of the toplevel widget. In the following
|
||||
example, the pathname of the busy window is
|
||||
.QW \fB._Busy\fR .
|
||||
.PP
|
||||
.CS
|
||||
\fBtk busy\fR hold .
|
||||
bind ._Busy <Enter> { ... }
|
||||
.CE
|
||||
.SS "ENTER/LEAVE EVENTS"
|
||||
.PP
|
||||
Mapping and unmapping busy windows generates Enter/Leave events for all
|
||||
widgets they cover. Please note this if you are tracking Enter/Leave events in
|
||||
widgets.
|
||||
.SS "KEYBOARD EVENTS"
|
||||
.PP
|
||||
When a widget is made busy, the widget is prevented from gaining the keyboard
|
||||
focus by a user clicking on it by the busy window. But if the widget already had
|
||||
focus, it still may receive keyboard events. The widget can also still receive
|
||||
focus through keyboard traversal. To prevent this, you must move
|
||||
focus to another window and make sure the focus can not go back to the widgets
|
||||
made busy (e.g. but restricting focus to a cancel button).
|
||||
.PP
|
||||
.CS
|
||||
pack [frame .frame]
|
||||
pack [text .frame.text]
|
||||
\fBtk busy\fR hold .frame
|
||||
pack [button .cancel -text "Cancel" -command exit]
|
||||
focus .cancel
|
||||
bind .cancel <Tab> {break}
|
||||
bind .cancel <Shift-Tab> {break}
|
||||
update
|
||||
.CE
|
||||
.PP
|
||||
The above example moves the focus from .frame immediately after invoking the
|
||||
\fBhold\fR so that no keyboard events will be sent to \fB.frame\fR or any of
|
||||
its descendants. It also makes sure it's not possible to leave button
|
||||
\fB.cancel\fR using the keyboard.
|
||||
.SH PORTABILITY
|
||||
.PP
|
||||
Note that the \fBtk busy\fR command does not currently have any effect on OSX
|
||||
when Tk is built using Aqua support.
|
||||
.SH "SEE ALSO"
|
||||
grab(n)
|
||||
.SH KEYWORDS
|
||||
busy, keyboard events, pointer events, window
|
||||
'\" Local Variables:
|
||||
'\" mode: nroff
|
||||
'\" End:
|
||||
56
doc/button.n
56
doc/button.n
@@ -5,12 +5,12 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH button n 4.4 Tk "Tk Built-In Commands"
|
||||
.so man.macros
|
||||
.TH button n 4.4 Tk "Tk Built-In Commands"
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
button \- Create and manipulate 'button' action widgets
|
||||
button \- Create and manipulate button widgets
|
||||
.SH SYNOPSIS
|
||||
\fBbutton\fR \fIpathName \fR?\fIoptions\fR?
|
||||
.SO
|
||||
@@ -57,14 +57,14 @@ The empty string is the default value.
|
||||
.OP \-state state State
|
||||
Specifies one of three states for the button: \fBnormal\fR, \fBactive\fR,
|
||||
or \fBdisabled\fR. In normal state the button is displayed using the
|
||||
\fB\-foreground\fR and \fB\-background\fR options. The active state is
|
||||
\fBforeground\fR and \fBbackground\fR options. The active state is
|
||||
typically used when the pointer is over the button. In active state
|
||||
the button is displayed using the \fB\-activeforeground\fR and
|
||||
\fB\-activebackground\fR options. Disabled state means that the button
|
||||
the button is displayed using the \fBactiveForeground\fR and
|
||||
\fBactiveBackground\fR options. Disabled state means that the button
|
||||
should be insensitive: the default bindings will refuse to activate
|
||||
the widget and will ignore mouse button presses.
|
||||
In this state the \fB\-disabledforeground\fR and
|
||||
\fB\-background\fR options determine how the button is displayed.
|
||||
In this state the \fBdisabledForeground\fR and
|
||||
\fBbackground\fR options determine how the button is displayed.
|
||||
.OP \-width width Width
|
||||
Specifies a desired width for the button.
|
||||
If an image or bitmap is being displayed in the button then the value is in
|
||||
@@ -75,6 +75,7 @@ If the width is negative then this specifies a minimum width.
|
||||
If this option is not specified, the button's desired width is computed
|
||||
from the size of the image or bitmap or text being displayed in it.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The \fBbutton\fR command creates a new window (given by the
|
||||
@@ -91,17 +92,18 @@ there must not exist a window named \fIpathName\fR, but
|
||||
A button is a widget that displays a textual string, bitmap or image.
|
||||
If text is displayed, it must all be in a single font, but it
|
||||
can occupy multiple lines on the screen (if it contains newlines
|
||||
or if wrapping occurs because of the \fB\-wraplength\fR option) and
|
||||
or if wrapping occurs because of the \fBwrapLength\fR option) and
|
||||
one of the characters may optionally be underlined using the
|
||||
\fB\-underline\fR option.
|
||||
\fBunderline\fR option.
|
||||
It can display itself in either of three different ways, according
|
||||
to
|
||||
the \fB\-state\fR option;
|
||||
the \fBstate\fR option;
|
||||
it can be made to appear raised, sunken, or flat;
|
||||
and it can be made to flash. When a user invokes the
|
||||
button (by pressing mouse button 1 with the cursor over the
|
||||
button), then the Tcl command specified in the \fB\-command\fR
|
||||
option is invoked.
|
||||
|
||||
.SH "WIDGET COMMAND"
|
||||
.PP
|
||||
The \fBbutton\fR command creates a new Tcl command whose
|
||||
@@ -137,9 +139,9 @@ command.
|
||||
.TP
|
||||
\fIpathName \fBflash\fR
|
||||
Flash the button. This is accomplished by redisplaying the button
|
||||
several times, alternating between the configured activebackground
|
||||
and background colors. At the end of the flash the button is left
|
||||
in the same normal/active state as when the command was invoked.
|
||||
several times, alternating between active and normal colors. At
|
||||
the end of the flash the button is left in the same normal/active
|
||||
state as when the command was invoked.
|
||||
This command is ignored if the button's state is \fBdisabled\fR.
|
||||
.TP
|
||||
\fIpathName \fBinvoke\fR
|
||||
@@ -147,6 +149,7 @@ Invoke the Tcl command associated with the button, if there is one.
|
||||
The return value is the return value from the Tcl command, or an
|
||||
empty string if there is no command associated with the button.
|
||||
This command is ignored if the button's state is \fBdisabled\fR.
|
||||
|
||||
.SH "DEFAULT BINDINGS"
|
||||
.PP
|
||||
Tk automatically creates class bindings for buttons that give them
|
||||
@@ -173,38 +176,27 @@ actions occur: the button is completely non-responsive.
|
||||
.PP
|
||||
The behavior of buttons can be changed by defining new bindings for
|
||||
individual widgets or by redefining the class bindings.
|
||||
.SH "PLATFORM NOTES"
|
||||
.PP
|
||||
On Aqua/Mac OS X, some configuration options are ignored for the purpose of
|
||||
drawing of the widget because they would otherwise conflict with platform
|
||||
guidelines. The \fBconfigure\fR and \fBcget\fR subcommands can still
|
||||
manipulate the values, but do not cause any variation to the look of the
|
||||
widget. The options affected notably include \fB\-background\fR and
|
||||
\fB\-relief\fR.
|
||||
|
||||
.SH EXAMPLES
|
||||
.PP
|
||||
This is the classic Tk
|
||||
.QW "Hello, World!"
|
||||
demonstration:
|
||||
.PP
|
||||
.CS
|
||||
\fBbutton\fR .b \-text "Hello, World!" \-command exit
|
||||
pack .b
|
||||
\fBbutton\fR .b \-text "Hello, World!" \-command exit
|
||||
pack .b
|
||||
.CE
|
||||
.PP
|
||||
This example demonstrates how to handle button accelerators:
|
||||
.PP
|
||||
.CS
|
||||
\fBbutton\fR .b1 \-text Hello \-underline 0
|
||||
\fBbutton\fR .b2 \-text World \-underline 0
|
||||
bind . <Key\-h> {.b1 flash; .b1 invoke}
|
||||
bind . <Key\-w> {.b2 flash; .b2 invoke}
|
||||
pack .b1 .b2
|
||||
\fBbutton\fR .b1 \-text Hello \-underline 0
|
||||
\fBbutton\fR .b2 \-text World \-underline 0
|
||||
bind . <Key\-h> {.b1 flash; .b1 invoke}
|
||||
bind . <Key\-w> {.b2 flash; .b2 invoke}
|
||||
pack .b1 .b2
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
ttk::button(n)
|
||||
.SH KEYWORDS
|
||||
button, widget
|
||||
'\" Local Variables:
|
||||
'\" mode: nroff
|
||||
'\" End:
|
||||
|
||||
611
doc/canvas.n
611
doc/canvas.n
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user