Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch tip-449
Excluding Merge-Ins
This is equivalent to a diff from
3fca6d54
to d0aea8f2
2016-08-29
| | |
15:45 |
|
check-in: d4e1f680 user: fvogel tags: core-8-6-branch
|
15:38 |
|
check-in: 177f5ee6 user: fvogel tags: trunk
|
15:28 |
|
Closed-Leaf
check-in: d0aea8f2 user: fvogel tags: tip-449
|
12:31 |
|
check-in: 43f27bfa user: jan.nijtmans tags: rfe-6c0d7aec67
|
2016-08-23
| | |
20:51 |
|
check-in: ca33f109 user: fvogel tags: trunk
|
20:51 |
|
check-in: 3fca6d54 user: fvogel tags: core-8-6-branch
|
2016-08-13
| | |
20:16 |
|
check-in: 48652bed user: fvogel tags: core-8-6-branch
|
20:03 |
|
Closed-Leaf
check-in: 9339d0a4 user: fvogel tags: bug-a2abc45ee6
|
2016-07-07
| | |
06:39 |
|
check-in: aba89761 user: fvogel tags: tip-449
|
| | |
Changes to .project.
1
2
3
4
5
6
7
8
9
10
|
1
2
3
4
5
6
7
8
9
10
|
-
+
|
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tk8.6</name>
<name>tk8.7</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
|
︙ | | |
Changes to README.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
-
+
-
+
-
+
|
README: Tk
This is the Tk 8.6.6 source distribution.
This is the Tk 8.7a0 source distribution.
http://sourceforge.net/projects/tcl/files/Tcl/
You can get any source release of Tk from the URL above.
1. Introduction
---------------
This directory contains the sources and documentation for Tk, an X11
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 at
this release, see the Tcl/Tk 8.7 Web page at
http://www.tcl.tk/software/tcltk/8.6.html
http://www.tcl.tk/software/tcltk/8.7.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:
|
︙ | | |
Changes to changes.
︙ | | |
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
|
7262
7263
7264
7265
7266
7267
7268
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
2016-02-08 (enhance) [option readile] expects utf-8 file (oehlmann,nijtmans)
2016-02-08 (bug) crash in [$text delete] (griffin,vogel)
Tk Cocoa 2.0: More drawing internals refinements (culler,walzer)
--- Released 8.6.5, February 29, 2016 --- http://core.tcl.tk/tk/ for details
2016-03-07 (bug)[3137232] spinbox teardown hygiene (vogel)
2016-03-07 (bug)[2981253] spinbox rapid button action (vogel)
2016-03-07 (bug)[2262543] scale initialization callbacks (vogel)
2016-03-07 (bug)[e9112e] incomplete [wm forget] (vogel)
2016-03-11 (bug)[d95e5d] <Map> from hidden panes (vogel)
2016-03-20 (TIP 443) More configuration options for text tags (vogel)
2016-03-20 (bug)[487861] menu: cascade/accelerator appearance (vogel)
2016-03-27 (bug)[1192095] active index from toplevel menus (vogel)
2016-03-27 (bug)[18c08d] revised final newline behavior in [text] (vogel)
*** POTENTIAL INCOMPATIBILITY ***
2016-04-29 (bug)[fd3a4d] <<Modified>> delivery to text peers (vogel)
2016-05-03 (bug)[b36218,011706] event reentrancy / widget destruction (vogel)
2016-05-12 (bug)[64261b] mouse events after double click (nadmarki,nijtmans)
2016-05-18 (bug)[545f10] Xft color font speed (bonfield,davies,girffin,vogel)
2016-05-25 (bug)[109865] event reentrancy / widget destruction (vogel)
2016-05-30 (TIP 446)[1273358] [$text edit (canundo|canredo)] (vogel)
2016-05-30 (bug)[79549a] crash in mouse pointer warping (vogel)
2016-06-22 (bug)[787adc] Modernize Tk_Init() (porter)
2016-07-06 (bug) Aqua: excess lable padding (lanam,walzer)
2016-07-08 (bug) Aqua: bitmap distortion (culler,walzer)
2016-07-15 (bug) Aqua/Retina: fix alpha rendering of images (culler,walzer)
2016-07-17 (bug)[c84f66] Aqua: crash: overflow in geometry calc (culler,walzer)
2016-07-21 (bug)[450bb0] Aqua: memory corruption from [tk busy] (porter)
--- Released 8.6.6, July 27, 2016 --- http://core.tcl.tk/tk/ for details
|
Changes to doc/3DBorder.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1993 The Regents of the University of California.
'\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
'\"
'\" 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
.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
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/BindTable.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_CreateBindingTable 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.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
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/CanvPsY.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_CanvasPs 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_CanvasPsY, Tk_CanvasPsBitmap, Tk_CanvasPsColor, Tk_CanvasPsFont, Tk_CanvasPsPath, Tk_CanvasPsStipple \- utility procedures for generating Postscript for canvases
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/CanvTkwin.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_CanvasTkwin 3 4.1 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_CanvasTkwin, Tk_CanvasGetCoord, Tk_CanvasDrawableCoords, Tk_CanvasSetStippleOrigin, Tk_CanvasWindowCoords, Tk_CanvasEventuallyRedraw, Tk_CanvasTagsOption \- utility procedures for canvas type managers
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/CanvTxtInfo.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_CanvasTextInfo 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_CanvasTextInfo \- additional information for managing text items in canvases
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/Clipboard.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_ClipboardClear 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_ClipboardClear, Tk_ClipboardAppend \- Manage the clipboard
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/ClrSelect.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1992-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_ClearSelection 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_ClearSelection \- Deselect a selection
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/ConfigWind.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_ConfigureWindow 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.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
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/CoordToWin.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_CoordsToWindow 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_CoordsToWindow \- Find window containing a point
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/CrtCmHdlr.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 2000 Ajuba Solutions.
'\"
'\" 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
.BS
.SH NAME
Tk_CreateClientMessageHandler, Tk_DeleteClientMessageHandler \- associate procedure callback with ClientMessage type X events
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/CrtConsoleChan.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 2007 ActiveState Software Inc.
'\"
'\" 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
.BS
.SH NAME
Tk_InitConsoleChannels \- Install the console channels as standard channels
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/CrtErrHdlr.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_CreateErrorHandler 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_CreateErrorHandler, Tk_DeleteErrorHandler \- handle X protocol errors
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/CrtGenHdlr.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1992-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_CreateGenericHandler 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_CreateGenericHandler, Tk_DeleteGenericHandler \- associate procedure callback with all X events
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/CrtImgType.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\"
'\" 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
.BS
.SH NAME
Tk_CreateImageType, Tk_GetImageMasterData, Tk_InitImageArgs \- define new kind of image
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/CrtItemType.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1994-1995 Sun Microsystems, Inc.
'\"
'\" 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
.BS
.SH NAME
Tk_CreateItemType, Tk_GetItemTypes \- define new kind of canvas item
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/CrtPhImgFmt.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Australian National University
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
'\" Author: Paul Mackerras ([email protected]),
'\" Department of Computer Science,
'\" Australian National University.
'\"
.TH Tk_CreatePhotoImageFormat 3 8.5 Tk "Tk Library Procedures"
.so man.macros
.BS
|
︙ | | |
Changes to doc/DeleteImg.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_DeleteImage 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_DeleteImage \- Destroy an image.
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/DrawFocHlt.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_DrawFocusHighlight 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_DrawFocusHighlight \- draw the traversal highlight ring for a widget
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/EventHndlr.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_CreateEventHandler 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_CreateEventHandler, Tk_DeleteEventHandler \- associate procedure callback with an X event
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/FindPhoto.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Australian National University
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
'\" Author: Paul Mackerras ([email protected]),
'\" Department of Computer Science,
'\" Australian National University.
'\"
.TH Tk_FindPhoto 3 8.0 Tk "Tk Library Procedures"
.so man.macros
.BS
|
︙ | | |
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
-
-
+
+
|
.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.
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
\fIwidth\fR x \fIheight\fR pixels, with its top-left corner at
coordinates (\fIx\fR,\fIy\fR). All of \fIwidth\fR, \fIheight\fR,
\fIx\fR, and \fIy\fR must be non-negative.
If part of this area lies outside the
|
︙ | | |
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
-
+
-
-
-
+
+
+
-
-
-
+
+
+
|
\fBTk_PhotoGetImage\fR can be used to retrieve image data from a photo
image. \fBTk_PhotoGetImage\fR fills
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
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
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.
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
\fBTk_PhotoBlank\fR blanks the entire area of the
photo image. Blank areas of a photo image are transparent.
.PP
|
︙ | | |
Changes to doc/FreeXId.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_FreeXId 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_FreeXId \- make X resource identifier available for reuse
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
.sp
\fBTk_FreeXId(\fIdisplay, id\fB)\fR
.SH ARGUMENTS
.AS Display *display out
.AP Display *display in
Display for which \fIid\fR was allocated.
.AP XID id in
Identifier of X resource (window, font, pixmap, cursor, graphics
context, or colormap) that is no longer in use.
.BE
.SH DESCRIPTION
.PP
The default allocator for resource identifiers provided by Xlib is very
This function is deprecated, it doesn't do anything since 2008-08-19.
simple-minded and does not allow resource identifiers to be re-used.
If a long-running application reaches the end of the resource id
space, it will generate an X protocol error and crash.
Tk replaces the default id allocator with its own allocator, which
allows identifiers to be reused.
In order for this to work, \fBTk_FreeXId\fR must be called to
tell the allocator about resources that have been freed.
Tk automatically calls \fBTk_FreeXId\fR whenever it frees a
resource, so if you use procedures like \fBTk_GetFont\fR,
\fBTk_GetGC\fR, and \fBTk_GetPixmap\fR then you need not call
\fBTk_FreeXId\fR.
However, if you allocate resources directly from Xlib, for example
by calling \fBXCreatePixmap\fR, then you should call \fBTk_FreeXId\fR
when you call the corresponding Xlib free procedure, such as
\fBXFreePixmap\fR.
If you do not call \fBTk_FreeXId\fR then the resource identifier will
be lost, which could cause problems if the application runs long enough
to lose all of the available identifiers.
.SH KEYWORDS
resource identifier
|
Changes to doc/GeomReq.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GeometryRequest 3 "8.4" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GeometryRequest, Tk_SetMinimumRequestSize, Tk_SetInternalBorder, Tk_SetInternalBorderEx \- specify desired geometry or internal border for a window
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetAnchor.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
'\"
'\" 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
.BS
.SH NAME
Tk_GetAnchorFromObj, Tk_GetAnchor, Tk_NameOfAnchor \- translate between strings and anchor positions
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetBitmap.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
'\"
'\" 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
.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
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetCapStyl.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetCapStyle 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetCapStyle, Tk_NameOfCapStyle \- translate between strings and cap styles
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetClrmap.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetColormap 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetColormap, Tk_PreserveColormap, Tk_FreeColormap \- allocate and free colormaps
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetDash.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1989-1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetDash 3 8.3 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetDash \- convert from string to valid dash structure.
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetGC.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetGC 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetGC, Tk_FreeGC \- maintain database of read-only graphics contexts
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetHINSTANCE.3.
1
2
3
4
5
6
7
8
9
10
11
|
1
2
3
4
5
6
7
8
9
10
11
|
-
+
|
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
'\"
'\"
.TH Tk_GetHISTANCE 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetHINSTANCE \- retrieve the global application instance handle
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetHWND.3.
1
2
3
4
5
6
7
8
9
10
11
|
1
2
3
4
5
6
7
8
9
10
11
|
-
+
|
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
'\"
'\"
.TH HWND 3 8.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetHWND, Tk_AttachHWND \- manage interactions between the Windows handle and an X window
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetImage.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetImage 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetImage, Tk_RedrawImage, Tk_SizeOfImage, Tk_FreeImage \- use an image in a widget
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetJoinStl.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetJoinStyle 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetJoinStyle, Tk_NameOfJoinStyle \- translate between strings and join styles
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetJustify.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
'\"
'\" 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
.BS
.SH NAME
Tk_GetJustifyFromObj, Tk_GetJustify, Tk_NameOfJustify \- translate between strings and justification styles
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetOption.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetOption 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetOption \- retrieve an option from the option database
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetPixels.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
'\"
'\" 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
.BS
.SH NAME
Tk_GetPixelsFromObj, Tk_GetPixels, Tk_GetMMFromObj, Tk_GetScreenMM \- translate between strings and screen units
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetPixmap.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetPixmap 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetPixmap, Tk_FreePixmap \- allocate and free pixmaps
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetRelief.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
'\"
'\" 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
.BS
.SH NAME
Tk_GetReliefFromObj, Tk_GetRelief, Tk_NameOfRelief \- translate between strings and relief values
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetRootCrd.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetRootCoords 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetRootCoords \- Compute root-window coordinates of window
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetScroll.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetScrollInfo 3 8.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetScrollInfoObj, Tk_GetScrollInfo \- parse arguments for scrolling commands
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetSelect.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetSelection 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetSelection \- retrieve the contents of a selection
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetUid.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetUid 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetUid, Tk_Uid \- convert from string to unique identifier
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetVRoot.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetVRootGeometry 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetVRootGeometry \- Get location and size of virtual root for window
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/GetVisual.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_GetVisual 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetVisual \- translate from string to visual
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/Grab.3.
1
2
3
4
5
6
7
8
9
10
11
|
1
2
3
4
5
6
7
8
9
10
11
|
-
+
|
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
'\"
'\"
.TH Tk_Grab 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_Grab, Tk_Ungrab \- manipulate grab state in an application
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/HWNDToWindow.3.
1
2
3
4
5
6
7
8
9
10
11
|
1
2
3
4
5
6
7
8
9
10
11
|
-
+
|
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
'\"
'\"
.TH Tk_HWNDToWindow 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_HWNDToWindow \- Find Tk's window information for a Windows window
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/HandleEvent.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_HandleEvent 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_HandleEvent \- invoke event handlers for window system events
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/IdToWindow.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_IdToWindow 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_IdToWindow \- Find Tk's window information for an X window
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/ImgChanged.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_ImageChanged 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_ImageChanged \- notify widgets that image needs to be redrawn
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/Inactive.3.
1
2
3
4
5
6
7
8
9
10
11
|
1
2
3
4
5
6
7
8
9
10
11
|
-
+
|
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
'\"
'\"
.TH Tk_GetUserInactiveTime 3 8.5 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_GetUserInactiveTime, Tk_ResetUserInactiveTime \- discover user inactivity time
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/InternAtom.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_InternAtom 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_InternAtom, Tk_GetAtomName \- manage cache of X atoms
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/MainLoop.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_MainLoop 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_MainLoop \- loop for events until all windows are deleted
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/MainWin.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_MainWindow 3 7.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_MainWindow, Tk_GetNumMainWindows \- functions for querying main window information
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/MaintGeom.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_MaintainGeometry 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_MaintainGeometry, Tk_UnmaintainGeometry \- maintain geometry of one window relative to another
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/ManageGeom.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_ManageGeometry 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_ManageGeometry \- arrange to handle geometry requests for a window
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/MoveToplev.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_MoveToplevelWindow 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_MoveToplevelWindow \- Adjust the position of a top-level window
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/Name.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\"
'\" 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
.BS
.SH NAME
Tk_Name, Tk_PathName, Tk_NameToWindow \- convert between names and window tokens
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/NameOfImg.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_NameOfImage 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_NameOfImage \- Return name of image.
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/OwnSelect.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_OwnSelection 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_OwnSelection \- make a window the owner of the primary selection
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/ParseArgv.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_ParseArgv 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_ParseArgv \- process command-line options
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/QWinEvent.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_QueueWindowEvent 3 7.5 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_CollapseMotionEvents, Tk_QueueWindowEvent \- Add a window event to the Tcl event queue
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/Restack.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_RestackWindow 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_RestackWindow \- Change a window's position in the stacking order
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/RestrictEv.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_RestrictEvents 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_RestrictEvents \- filter and selectively delay X events
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/SetAppName.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\"
'\" 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
.BS
.SH NAME
Tk_SetAppName \- Set the name of an application for 'send' commands
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/SetCaret.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 2002 ActiveState Corporation.
'\"
'\" 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
.BS
.SH NAME
Tk_SetCaretPos \- set the display caret location
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/SetClass.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_SetClass 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_SetClass, Tk_Class \- set or retrieve a window's class
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/SetClassProcs.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 2000 Ajuba Solutions.
'\"
'\" 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
.BS
.SH NAME
Tk_SetClassProcs \- register widget specific procedures
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/SetGrid.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_SetGrid 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_SetGrid, Tk_UnsetGrid \- control the grid for interactive resizing
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/SetOptions.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1998 Sun Microsystems, Inc.
'\"
'\" 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
.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
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/SetVisual.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_SetWindowVisual 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_SetWindowVisual \- change visual characteristics of window
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/StrictMotif.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_StrictMotif 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_StrictMotif \- Return value of tk_strictMotif variable
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/TkInitStubs.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1999 Scriptics Corporation
'\"
'\" 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
.BS
.SH NAME
Tk_InitStubs \- initialize the Tk stubs mechanism
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/Tk_Init.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tk_Init 3 8.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
Tk_Init, Tk_SafeInit \- add Tk to an interpreter and make a new Tk application.
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/bell.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\" Copyright (c) 2000 Ajuba Solutions.
'\"
'\" 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
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
bell \- Ring a display's bell
.SH SYNOPSIS
|
︙ | | |
Changes to doc/bind.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\" Copyright (c) 1998 by Scriptics Corporation.
'\"
'\" 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
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
bind \- Arrange for X events to invoke Tcl scripts
.SH SYNOPSIS
|
︙ | | |
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
|
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
|
-
+
|
there is no reliable way to track changes to a window's
position in the stacking order.
.RE
.SS "EVENT DETAILS"
.PP
The last part of a long event specification is \fIdetail\fR. In the
case of a \fBButtonPress\fR or \fBButtonRelease\fR event, it is the
number of a button (1\-5). If a button number is given, then only an
number of a button (1\-9). If a button number is given, then only an
event on that particular button will match; if no button number is
given, then an event on any button will match. Note: giving a
specific button number is different than specifying a button modifier;
in the first case, it refers to a button being pressed or released,
while in the second it refers to some other button that is already
depressed when the matching event occurs. If a button
number is given then \fItype\fR may be omitted: if will default
|
︙ | | |
Changes to doc/bindtags.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH bindtags n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
bindtags \- Determine which bindings apply to a window, and order of evaluation
.SH SYNOPSIS
|
︙ | | |
Changes to doc/bitmap.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH bitmap n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
bitmap \- Images that display two colors
.SH SYNOPSIS
|
︙ | | |
Changes to doc/chooseColor.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH tk_chooseColor n 4.2 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
tk_chooseColor \- pops up a dialog box for the user to select a color.
.SH SYNOPSIS
|
︙ | | |
Changes to doc/console.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 2001 Donal K. Fellows
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH console n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
console \- Control the console on systems without a real console
.SH SYNOPSIS
|
︙ | | |
Changes to doc/cursors.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
-
+
|
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
'\"
'\"
'\" Copyright (c) 2006-2007 Daniel A. Steffen <[email protected]>
'\"
'\"
.TH cursors n 8.3 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
cursors \- mouse cursors available in Tk
.BE
|
︙ | | |
Changes to doc/destroy.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH destroy n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
destroy \- Destroy one or more windows
.SH SYNOPSIS
|
︙ | | |
Changes to doc/dialog.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH tk_dialog n 4.1 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
tk_dialog \- Create modal dialog and wait for response
.SH SYNOPSIS
|
︙ | | |
Changes to doc/entry.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH entry n 8.3 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
entry \- Create and manipulate 'entry' one-line text entry widgets
.SH SYNOPSIS
|
︙ | | |
Changes to doc/focus.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH focus n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
focus \- Manage the input focus
.SH SYNOPSIS
|
︙ | | |
Changes to doc/focusNext.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH tk_focusNext n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
tk_focusNext, tk_focusPrev, tk_focusFollowsMouse \- Utility procedures for managing the input focus.
.SH SYNOPSIS
|
︙ | | |
Changes to doc/fontchooser.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 2008 Daniel A. Steffen <[email protected]>
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH fontchooser n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
fontchooser \- control font selection dialog
.SH SYNOPSIS
|
︙ | | |
Changes to doc/frame.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH frame n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
frame \- Create and manipulate 'frame' simple container widgets
.SH SYNOPSIS
|
︙ | | |
Changes to doc/grab.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH grab n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
grab \- Confine pointer and keyboard events to a window sub-tree
.SH SYNOPSIS
|
︙ | | |
Changes to doc/grid.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH grid n 8.5 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
grid \- Geometry manager that arranges widgets in a grid
.SH SYNOPSIS
|
︙ | | |
Changes to doc/image.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH image n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
image \- Create and manipulate images
.SH SYNOPSIS
|
︙ | | |
Changes to doc/label.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH label n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
label \- Create and manipulate 'label' non-interactive text or image widgets
.SH SYNOPSIS
|
︙ | | |
Changes to doc/lower.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH lower n 3.3 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
lower \- Change a window's position in the stacking order
.SH SYNOPSIS
|
︙ | | |
Changes to doc/menubar.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH tk_menuBar n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
tk_menuBar, tk_bindForTraversal \- Obsolete support for menu bars
.SH SYNOPSIS
|
︙ | | |
Changes to doc/menubutton.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH menubutton n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
menubutton \- Create and manipulate 'menubutton' pop-up menu indicator widgets
.SH SYNOPSIS
|
︙ | | |
Changes to doc/message.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH message n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
message \- Create and manipulate 'message' non-interactive text widgets
.SH SYNOPSIS
|
︙ | | |
Changes to doc/option.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH option n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
option \- Add/retrieve window options to/from the option database
.SH SYNOPSIS
|
︙ | | |
Changes to doc/optionMenu.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH tk_optionMenu n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
tk_optionMenu \- Create an option menubutton and its menu
.SH SYNOPSIS
|
︙ | | |
Changes to doc/pack-old.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH pack-old n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
pack-old \- Obsolete syntax for packer geometry manager
.SH SYNOPSIS
|
︙ | | |
Changes to doc/pack.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH pack n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
pack \- Geometry manager that packs around edges of cavity
.SH SYNOPSIS
|
︙ | | |
Changes to doc/palette.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH tk_setPalette n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
tk_setPalette, tk_bisque \- Modify the Tk color palette
.SH SYNOPSIS
|
︙ | | |
Changes to doc/photo.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1994 The Australian National University
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
'\" Author: Paul Mackerras ([email protected]),
'\" Department of Computer Science,
'\" Australian National University.
'\"
.TH photo n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
|
︙ | | |
Changes to doc/place.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH place n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
place \- Geometry manager for fixed or rubber-sheet placement
.SH SYNOPSIS
|
︙ | | |
Changes to doc/popup.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH tk_popup n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
tk_popup \- Post a popup menu
.SH SYNOPSIS
|
︙ | | |
Changes to doc/raise.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH raise n 3.3 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
raise \- Change a window's position in the stacking order
.SH SYNOPSIS
|
︙ | | |
Changes to doc/scrollbar.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH scrollbar n 4.1 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
scrollbar \- Create and manipulate 'scrollbar' scrolling control and indicator widgets
.SH SYNOPSIS
|
︙ | | |
Changes to doc/send.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH send n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
send \- Execute a command in a different application
.SH SYNOPSIS
|
︙ | | |
Changes to doc/spinbox.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 2000 Jeffrey Hobbs.
'\" Copyright (c) 2000 Ajuba Solutions.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH spinbox n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
spinbox \- Create and manipulate 'spinbox' value spinner widgets
.SH SYNOPSIS
|
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
-
+
+
|
when using the \fB\-from\fR and \fB\-to\fR range.
This must be a format specifier of the form \fB%<pad>.<pad>f\fR,
as it will format a floating-point number.
.OP \-from from From
A floating-point value corresponding to the lowest value for a spinbox, to
be used in conjunction with \fB\-to\fR and \fB\-increment\fR. When all
are specified correctly, the spinbox will use these values to control its
contents. This value must be less than the \fB\-to\fR option.
contents. If this value is greater than the \fB\-to\fR option, then
\fB\-from\fR and \fB\-to\fR values are automatically swapped.
If \fB\-values\fR is specified, it supersedes this option.
.OP "\-invalidcommand or \-invcmd" invalidCommand InvalidCommand
Specifies a script to eval when \fB\-validatecommand\fR returns 0. Setting
it to an empty string disables this feature (the default). The best use of
this option is to set it to \fIbell\fR. See \fBVALIDATION\fR below for
more information.
.OP \-increment increment Increment
|
︙ | | |
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
-
+
+
|
displayed, the contents will not be selectable, and the spinbox may
be displayed in a different color, depending on the values of the
\fB\-disabledforeground\fR and \fB\-disabledbackground\fR options.
.OP \-to to To
A floating-point value corresponding to the highest value for the spinbox,
to be used in conjunction with \fB\-from\fR and \fB\-increment\fR. When
all are specified correctly, the spinbox will use these values to control
its contents. This value must be greater than the \fB\-from\fR option.
its contents. If this value is less than the \fB\-from\fR option, then
\fB\-from\fR and \fB\-to\fR values are automatically swapped.
If \fB\-values\fR is specified, it supersedes this option.
.OP \-validate validate Validate
Specifies the mode in which validation should operate: \fBnone\fR,
\fBfocus\fR, \fBfocusin\fR, \fBfocusout\fR, \fBkey\fR, or \fBall\fR.
It defaults to \fBnone\fR. When you want validation, you must explicitly
state which mode you wish to use. See \fBVALIDATION\fR below for more.
.OP "\-validatecommand or \-vcmd" validateCommand ValidateCommand
|
︙ | | |
Changes to doc/text.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH text n 8.5 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
text, tk_textCopy, tk_textCut, tk_textPaste \- Create and manipulate 'text' hypertext editing widgets
.SH SYNOPSIS
|
︙ | | |
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
|
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
|
-
-
+
+
+
-
-
-
+
+
+
+
|
The insert, delete, edit undo and edit redo commands or the user can set or
clear the modified flag. If \fIboolean\fR is specified, sets the modified flag
of the widget to \fIboolean\fR.
.TP
\fIpathName \fBedit redo\fR
.
When the \fB\-undo\fR option is true, reapplies the last undone edits provided
no other edits were done since then. Generates an error when the redo stack is
empty. Does nothing when the \fB\-undo\fR option is false.
no other edits were done since then, and returns a list of indices indicating
what ranges were changed by the redo operation. Generates an error when the
redo stack is empty. Does nothing when the \fB\-undo\fR option is false.
.TP
\fIpathName \fBedit reset\fR
.
Clears the undo and redo stacks.
.TP
\fIpathName \fBedit separator\fR
.
Inserts a separator (boundary) on the undo stack. Does nothing when the
\fB\-undo\fR option is false.
.TP
\fIpathName \fBedit undo\fR
.
Undoes the last edit action when the \fB\-undo\fR option is true. An edit
action is defined as all the insert and delete commands that are recorded on
the undo stack in between two separators. Generates an error when the undo
Undoes the last edit action when the \fB\-undo\fR option is true, and returns a
list of indices indicating what ranges were changed by the undo operation. An
edit action is defined as all the insert and delete commands that are recorded
on the undo stack in between two separators. Generates an error when the undo
stack is empty. Does nothing when the \fB\-undo\fR option is false.
.RE
.TP
\fIpathName \fBget\fR ?\fB\-displaychars\fR? ?\fB\-\-\fR? \fIindex1\fR ?\fIindex2 ...\fR?
.
Return a range of characters from the text. The return value will be all the
characters in the text starting with the one whose index is \fIindex1\fR and
|
︙ | | |
Changes to doc/tk.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH tk n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
tk \- Manipulate Tk internal state
.SH SYNOPSIS
|
︙ | | |
Changes to doc/tk4.0.ps.
︙ | | |
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
-
+
|
% FrameMaker.
% NOTE
% This file fixes the problem with NeWS printers dithering color output.
% Any questions should be sent to [email protected]
%
% Known Problems:
% Due to bugs in Transcript, the 'PS-Adobe-' is omitted from line 1
/FMversion (3.0) def
/FMversion (3.0) def
% Set up Color vs. Black-and-White
/FMPrintInColor { % once-thru loop gimmick
% See if we're a NeWSprint printer
/currentcanvas where {
pop systemdict /separationdict known
exit
|
︙ | | |
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
|
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
|
-
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
|
% } if
systemdict /colorimage known
systemdict /currentcolortransfer known and
exit } loop def
% Uncomment the following line to force b&w on color printer
% /FMPrintInColor false def
/FrameDict 195 dict def
/FrameDict 195 dict def
systemdict /errordict known not {/errordict 10 dict def
errordict /rangecheck {stop} put} if
% The readline in 23.0 doesn't recognize cr's as nl's on AppleTalk
FrameDict /tmprangecheck errordict /rangecheck get put
errordict /rangecheck {FrameDict /bug true put} put
FrameDict /bug false put
mark
FrameDict /tmprangecheck errordict /rangecheck get put
errordict /rangecheck {FrameDict /bug true put} put
FrameDict /bug false put
mark
% Some PS machines read past the CR, so keep the following 3 lines together!
currentfile 5 string readline
00
0000000000
cleartomark
errordict /rangecheck FrameDict /tmprangecheck get put
FrameDict /bug get {
cleartomark
errordict /rangecheck FrameDict /tmprangecheck get put
FrameDict /bug get {
/readline {
/gstring exch def
/gfile exch def
/gindex 0 def
{
gfile read pop
dup 10 eq {exit} if
dup 13 eq {exit} if
gstring exch gindex exch put
/gindex gindex 1 add def
gfile read pop
dup 10 eq {exit} if
dup 13 eq {exit} if
gstring exch gindex exch put
/gindex gindex 1 add def
} loop
pop
gstring 0 gindex getinterval true
pop
gstring 0 gindex getinterval true
} def
} if
/FMVERSION {
FMversion ne {
/Times-Roman findfont 18 scalefont setfont
100 100 moveto
(FrameMaker version does not match postscript_prolog!)
dup =
show showpage
} if
} def
} def
/FMLOCAL {
FrameDict begin
0 def
end
} def
0 def
end
} def
/gstring FMLOCAL
/gfile FMLOCAL
/gindex FMLOCAL
/orgxfer FMLOCAL
/orgproc FMLOCAL
/organgle FMLOCAL
/orgfreq FMLOCAL
/yscale FMLOCAL
/xscale FMLOCAL
/manualfeed FMLOCAL
/paperheight FMLOCAL
/paperwidth FMLOCAL
/FMDOCUMENT {
array /FMfonts exch def
/FMDOCUMENT {
array /FMfonts exch def
/#copies exch def
FrameDict begin
0 ne dup {setmanualfeed} if
/manualfeed exch def
/paperheight exch def
/paperwidth exch def
/yscale exch def
/xscale exch def
currenttransfer cvlit /orgxfer exch def
currentscreen cvlit /orgproc exch def
/organgle exch def /orgfreq exch def
setpapername
manualfeed {true} {papersize} ifelse
{manualpapersize} {false} ifelse
setpapername
manualfeed {true} {papersize} ifelse
{manualpapersize} {false} ifelse
{desperatepapersize} if
end
} def
end
} def
/pagesave FMLOCAL
/orgmatrix FMLOCAL
/landscape FMLOCAL
/FMBEGINPAGE {
FrameDict begin
/FMBEGINPAGE {
FrameDict begin
/pagesave save def
3.86 setmiterlimit
/landscape exch 0 ne def
landscape {
90 rotate 0 exch neg translate pop
landscape {
90 rotate 0 exch neg translate pop
}
{pop pop}
ifelse
xscale yscale scale
/orgmatrix matrix def
gsave
} def
gsave
} def
/FMENDPAGE {
grestore
grestore
pagesave restore
end
end
showpage
} def
/FMFONTDEFINE {
} def
/FMFONTDEFINE {
FrameDict begin
findfont
ReEncode
1 index exch
definefont
FMfonts 3 1 roll
findfont
ReEncode
1 index exch
definefont
FMfonts 3 1 roll
put
end
} def
end
} def
/FMFILLS {
FrameDict begin
array /fillvals exch def
end
} def
end
} def
/FMFILL {
FrameDict begin
fillvals 3 1 roll put
end
} def
/FMNORMALIZEGRAPHICS {
end
} def
/FMNORMALIZEGRAPHICS {
newpath
0.0 0.0 moveto
1 setlinewidth
0 setlinecap
0 0 0 sethsbcolor
0 setgray
0 setgray
} bind def
/fx FMLOCAL
/fy FMLOCAL
/fh FMLOCAL
/fw FMLOCAL
/llx FMLOCAL
/lly FMLOCAL
/urx FMLOCAL
/ury FMLOCAL
/FMBEGINEPSF {
end
/FMEPSF save def
/showpage {} def
FMNORMALIZEGRAPHICS
[/fy /fx /fh /fw /ury /urx /lly /llx] {exch def} forall
fx fy translate
/FMBEGINEPSF {
end
/FMEPSF save def
/showpage {} def
FMNORMALIZEGRAPHICS
[/fy /fx /fh /fw /ury /urx /lly /llx] {exch def} forall
fx fy translate
rotate
fw urx llx sub div fh ury lly sub div scale
llx neg lly neg translate
fw urx llx sub div fh ury lly sub div scale
llx neg lly neg translate
} bind def
/FMENDEPSF {
FMEPSF restore
FrameDict begin
FrameDict begin
} bind def
FrameDict begin
FrameDict begin
/setmanualfeed {
%%BeginFeature *ManualFeed True
statusdict /manualfeed true put
%%EndFeature
} def
/max {2 copy lt {exch} if pop} bind def
/min {2 copy gt {exch} if pop} bind def
/inch {72 mul} def
/pagedimen {
paperheight sub abs 16 lt exch
/pagedimen {
paperheight sub abs 16 lt exch
paperwidth sub abs 16 lt and
{/papername exch def} {pop} ifelse
} def
/papersizedict FMLOCAL
/setpapername {
/papersizedict 14 dict def
/setpapername {
/papersizedict 14 dict def
papersizedict begin
/papername /unknown def
/papername /unknown def
/Letter 8.5 inch 11.0 inch pagedimen
/LetterSmall 7.68 inch 10.16 inch pagedimen
/Tabloid 11.0 inch 17.0 inch pagedimen
/Ledger 17.0 inch 11.0 inch pagedimen
/Legal 8.5 inch 14.0 inch pagedimen
/Statement 5.5 inch 8.5 inch pagedimen
/Executive 7.5 inch 10.0 inch pagedimen
|
︙ | | |
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
|
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
|
-
-
-
+
+
+
-
+
-
+
-
+
|
/A4 {a4tray a4} def
/A4Small {a4tray a4small} def
/B4 {b4tray b4} def
/B5 {b5tray b5} def
/unknown {unknown} def
papersizedict dup papername known {papername} {/unknown} ifelse get
end
/FMdicttop countdictstack 1 add def
statusdict begin stopped end
countdictstack -1 FMdicttop {pop end} for
/FMdicttop countdictstack 1 add def
statusdict begin stopped end
countdictstack -1 FMdicttop {pop end} for
} def
/manualpapersize {
papersizedict begin
/Letter {letter} def
/LetterSmall {lettersmall} def
/Tabloid {11x17} def
/Ledger {ledger} def
/Legal {legal} def
/Statement {statement} def
/Executive {executive} def
/A3 {a3} def
/A4 {a4} def
/A4Small {a4small} def
/B4 {b4} def
/B5 {b5} def
/unknown {unknown} def
papersizedict dup papername known {papername} {/unknown} ifelse get
end
stopped
stopped
} def
/desperatepapersize {
statusdict /setpageparams known
{
paperwidth paperheight 0 1
paperwidth paperheight 0 1
statusdict begin
{setpageparams} stopped pop
{setpageparams} stopped pop
end
} if
} def
/savematrix {
orgmatrix currentmatrix pop
} bind def
/restorematrix {
|
︙ | | |
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
|
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
|
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
|
/fraction /currency /guilsinglleft /guilsinglright /fi /fl /daggerdbl
/periodcentered /quotesinglbase /quotedblbase /perthousand
/Acircumflex /Ecircumflex /Aacute /Edieresis /Egrave /Iacute
/Icircumflex /Idieresis /Igrave /Oacute /Ocircumflex /.notdef /Ograve
/Uacute /Ucircumflex /Ugrave /dotlessi /circumflex /tilde /macron
/breve /dotaccent /ring /cedilla /hungarumlaut /ogonek /caron
] def
/ReEncode {
dup
length
dict begin
/ReEncode {
dup
length
dict begin
{
1 index /FID ne
{def}
{pop pop} ifelse
} forall
0 eq {/Encoding DiacriticEncoding def} if
currentdict
end
1 index /FID ne
{def}
{pop pop} ifelse
} forall
0 eq {/Encoding DiacriticEncoding def} if
currentdict
end
} bind def
/graymode true def
/bwidth FMLOCAL
/bpside FMLOCAL
/bstring FMLOCAL
/onbits FMLOCAL
/offbits FMLOCAL
/xindex FMLOCAL
/yindex FMLOCAL
/x FMLOCAL
/y FMLOCAL
/setpattern {
/bwidth exch def
/bpside exch def
/bstring exch def
/onbits 0 def /offbits 0 def
freq sangle landscape {90 add} if
freq sangle landscape {90 add} if
{/y exch def
/x exch def
/xindex x 1 add 2 div bpside mul cvi def
/yindex y 1 add 2 div bpside mul cvi def
bstring yindex bwidth mul xindex 8 idiv add get
1 7 xindex 8 mod sub bitshift and 0 ne
{/onbits onbits 1 add def 1}
|
︙ | | |
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
|
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
|
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
-
-
+
+
+
+
-
+
|
orgfreq organgle orgproc cvx setscreen
} if
} bind def
/HUE FMLOCAL
/SAT FMLOCAL
/BRIGHT FMLOCAL
/Colors FMLOCAL
FMPrintInColor
FMPrintInColor
{
/HUE 0 def
/SAT 0 def
/BRIGHT 0 def
% array of arrays Hue and Sat values for the separations [HUE BRIGHT]
/Colors
/Colors
[[0 0 ] % black
[0 0 ] % white
[0.00 1.0] % red
[0.37 1.0] % green
[0.60 1.0] % blue
[0.50 1.0] % cyan
[0.83 1.0] % magenta
[0.16 1.0] % comment / yellow
] def
/BEGINBITMAPCOLOR {
/BEGINBITMAPCOLOR {
BITMAPCOLOR} def
/BEGINBITMAPCOLORc {
/BEGINBITMAPCOLORc {
BITMAPCOLORc} def
/BEGINBITMAPTRUECOLOR {
/BEGINBITMAPTRUECOLOR {
BITMAPTRUECOLOR } def
/BEGINBITMAPTRUECOLORc {
/BEGINBITMAPTRUECOLORc {
BITMAPTRUECOLORc } def
/K {
/K {
Colors exch get dup
0 get /HUE exch store
0 get /HUE exch store
1 get /BRIGHT exch store
HUE 0 eq BRIGHT 0 eq and
{1.0 SAT sub setgray}
{HUE SAT BRIGHT sethsbcolor}
{HUE SAT BRIGHT sethsbcolor}
ifelse
} def
/FMsetgray {
/SAT exch 1.0 exch sub store
/FMsetgray {
/SAT exch 1.0 exch sub store
HUE 0 eq BRIGHT 0 eq and
{1.0 SAT sub setgray}
{HUE SAT BRIGHT sethsbcolor}
{HUE SAT BRIGHT sethsbcolor}
ifelse
} bind def
}
{
/BEGINBITMAPCOLOR {
/BEGINBITMAPCOLOR {
BITMAPGRAY} def
/BEGINBITMAPCOLORc {
/BEGINBITMAPCOLORc {
BITMAPGRAYc} def
/BEGINBITMAPTRUECOLOR {
/BEGINBITMAPTRUECOLOR {
BITMAPTRUEGRAY } def
/BEGINBITMAPTRUECOLORc {
/BEGINBITMAPTRUECOLORc {
BITMAPTRUEGRAYc } def
/FMsetgray {setgray} bind def
/K {
/K {
pop
} def
}
ifelse
/normalize {
transform round exch round exch itransform
} bind def
/dnormalize {
dtransform round exch round exch idtransform
} bind def
/lnormalize {
/lnormalize {
0 dtransform exch cvi 2 idiv 2 mul 1 add exch idtransform pop
} bind def
/H {
/H {
lnormalize setlinewidth
} bind def
/Z {
setlinecap
} bind def
/fillvals FMLOCAL
/X {
/X {
fillvals exch get
dup type /stringtype eq
{8 1 setpattern}
{8 1 setpattern}
{grayness}
ifelse
} bind def
/V {
/V {
gsave eofill grestore
} bind def
/N {
/N {
stroke
} bind def
/M {newpath moveto} bind def
/E {lineto} bind def
/D {curveto} bind def
/O {closepath} bind def
/n FMLOCAL
/L {
/L {
/n exch def
newpath
normalize
moveto
moveto
2 1 n {pop normalize lineto} for
} bind def
/Y {
L
/Y {
L
closepath
} bind def
/x1 FMLOCAL
/x2 FMLOCAL
/y1 FMLOCAL
/y2 FMLOCAL
/rad FMLOCAL
/R {
/R {
/y2 exch def
/x2 exch def
/y1 exch def
/x1 exch def
x1 y1
x2 y1
x2 y2
x1 y2
4 Y
4 Y
} bind def
/RR {
/RR {
/rad exch def
normalize
/y2 exch def
/x2 exch def
normalize
/y1 exch def
/x1 exch def
newpath
x1 y1 rad add moveto
x1 y2 x2 y2 rad arcto
x2 y2 x2 y1 rad arcto
x2 y1 x1 y1 rad arcto
x1 y1 x1 y2 rad arcto
closepath
16 {pop} repeat
} bind def
/C {
/C {
grestore
gsave
R
R
clip
} bind def
/FMpointsize FMLOCAL
/F {
/F {
FMfonts exch get
FMpointsize scalefont
setfont
} bind def
/Q {
/Q {
/FMpointsize exch def
F
F
} bind def
/T {
/T {
moveto show
} bind def
/RF {
/RF {
rotate
0 ne {-1 1 scale} if
} bind def
/TF {
/TF {
gsave
moveto
moveto
RF
show
grestore
} bind def
/P {
/P {
moveto
0 32 3 2 roll widthshow
} bind def
/PF {
/PF {
gsave
moveto
moveto
RF
0 32 3 2 roll widthshow
grestore
} bind def
/S {
/S {
moveto
0 exch ashow
} bind def
/SF {
/SF {
gsave
moveto
RF
0 exch ashow
grestore
} bind def
/B {
/B {
moveto
0 32 4 2 roll 0 exch awidthshow
} bind def
/BF {
/BF {
gsave
moveto
RF
0 32 4 2 roll 0 exch awidthshow
grestore
} bind def
/G {
/G {
gsave
newpath
normalize translate 0.0 0.0 moveto
dnormalize scale
0.0 0.0 1.0 5 3 roll arc
normalize translate 0.0 0.0 moveto
dnormalize scale
0.0 0.0 1.0 5 3 roll arc
closepath fill
grestore
} bind def
/A {
/A {
gsave
savematrix
newpath
2 index 2 div add exch 3 index 2 div sub exch
normalize 2 index 2 div sub exch 3 index 2 div add exch
translate
scale
0.0 0.0 1.0 5 3 roll arc
2 index 2 div add exch 3 index 2 div sub exch
normalize 2 index 2 div sub exch 3 index 2 div add exch
translate
scale
0.0 0.0 1.0 5 3 roll arc
restorematrix
stroke
grestore
} bind def
/x FMLOCAL
/y FMLOCAL
/w FMLOCAL
/h FMLOCAL
/xx FMLOCAL
/yy FMLOCAL
/ww FMLOCAL
/hh FMLOCAL
/FMsaveobject FMLOCAL
/FMoptop FMLOCAL
/FMdicttop FMLOCAL
/BEGINPRINTCODE {
/FMdicttop countdictstack 1 add def
/FMoptop count 4 sub def
/BEGINPRINTCODE {
/FMdicttop countdictstack 1 add def
/FMoptop count 4 sub def
/FMsaveobject save def
userdict begin
/showpage {} def
FMNORMALIZEGRAPHICS
userdict begin
/showpage {} def
FMNORMALIZEGRAPHICS
3 index neg 3 index neg translate
} bind def
/ENDPRINTCODE {
count -1 FMoptop {pop pop} for
countdictstack -1 FMdicttop {pop end} for
FMsaveobject restore
count -1 FMoptop {pop pop} for
countdictstack -1 FMdicttop {pop end} for
FMsaveobject restore
} bind def
/gn {
0
{ 46 mul
cf read pop
32 sub
dup 46 lt {exit} if
46 sub add
/gn {
0
{ 46 mul
cf read pop
32 sub
dup 46 lt {exit} if
46 sub add
} loop
add
add
} bind def
/str FMLOCAL
/cfs {
/str sl string def
0 1 sl 1 sub {str exch val put} for
str def
/cfs {
/str sl string def
0 1 sl 1 sub {str exch val put} for
str def
} bind def
/ic [
/ic [
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223
0
{0 hx} {1 hx} {2 hx} {3 hx} {4 hx} {5 hx} {6 hx} {7 hx} {8 hx} {9 hx}
{10 hx} {11 hx} {12 hx} {13 hx} {14 hx} {15 hx} {16 hx} {17 hx} {18 hx}
{19 hx} {gn hx} {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12}
{13} {14} {15} {16} {17} {18} {19} {gn} {0 wh} {1 wh} {2 wh} {3 wh}
|
︙ | | |
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
|
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
|
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
|
/val FMLOCAL
/ws FMLOCAL
/im FMLOCAL
/bs FMLOCAL
/cs FMLOCAL
/len FMLOCAL
/pos FMLOCAL
/ms {
/sl exch def
/val 255 def
/ws cfs
/im cfs
/val 0 def
/bs cfs
/cs cfs
/ms {
/sl exch def
/val 255 def
/ws cfs
/im cfs
/val 0 def
/bs cfs
/cs cfs
} bind def
400 ms
/ip {
is
0
cf cs readline pop
{ ic exch get exec
add
} forall
pop
400 ms
/ip {
is
0
cf cs readline pop
{ ic exch get exec
add
} forall
pop
} bind def
/wh {
/len exch def
/pos exch def
/wh {
/len exch def
/pos exch def
ws 0 len getinterval im pos len getinterval copy pop
pos len
pos len
} bind def
/bl {
/len exch def
/pos exch def
/bl {
/len exch def
/pos exch def
bs 0 len getinterval im pos len getinterval copy pop
pos len
pos len
} bind def
/s1 1 string def
/fl {
/len exch def
/pos exch def
/fl {
/len exch def
/pos exch def
/val cf s1 readhexstring pop 0 get def
pos 1 pos len add 1 sub {im exch val put} for
pos len
pos len
} bind def
/hx {
3 copy getinterval
cf exch readhexstring pop pop
/hx {
3 copy getinterval
cf exch readhexstring pop pop
} bind def
/h FMLOCAL
/w FMLOCAL
/d FMLOCAL
/lb FMLOCAL
/bitmapsave FMLOCAL
/is FMLOCAL
/cf FMLOCAL
/wbytes {
dup
/wbytes {
dup
8 eq {pop} {1 eq {7 add 8 idiv} {3 add 4 idiv} ifelse} ifelse
} bind def
/BEGINBITMAPBWc {
/BEGINBITMAPBWc {
1 {} COMMONBITMAPc
} bind def
/BEGINBITMAPGRAYc {
/BEGINBITMAPGRAYc {
8 {} COMMONBITMAPc
} bind def
/BEGINBITMAP2BITc {
/BEGINBITMAP2BITc {
2 {} COMMONBITMAPc
} bind def
/COMMONBITMAPc {
/COMMONBITMAPc {
/r exch def
/d exch def
gsave
translate rotate scale /h exch def /w exch def
/lb w d wbytes def
sl lb lt {lb ms} if
/bitmapsave save def
r
/is im 0 lb getinterval def
ws 0 lb getinterval is copy pop
/cf currentfile def
w h d [w 0 0 h neg 0 h]
{ip} image
bitmapsave restore
/lb w d wbytes def
sl lb lt {lb ms} if
/bitmapsave save def
r
/is im 0 lb getinterval def
ws 0 lb getinterval is copy pop
/cf currentfile def
w h d [w 0 0 h neg 0 h]
{ip} image
bitmapsave restore
grestore
} bind def
/BEGINBITMAPBW {
/BEGINBITMAPBW {
1 {} COMMONBITMAP
} bind def
/BEGINBITMAPGRAY {
/BEGINBITMAPGRAY {
8 {} COMMONBITMAP
} bind def
/BEGINBITMAP2BIT {
/BEGINBITMAP2BIT {
2 {} COMMONBITMAP
} bind def
/COMMONBITMAP {
/COMMONBITMAP {
/r exch def
/d exch def
gsave
translate rotate scale /h exch def /w exch def
/bitmapsave save def
r
/bitmapsave save def
r
/is w d wbytes string def
/cf currentfile def
w h d [w 0 0 h neg 0 h]
/cf currentfile def
w h d [w 0 0 h neg 0 h]
{cf is readhexstring pop} image
bitmapsave restore
bitmapsave restore
grestore
} bind def
/proc1 FMLOCAL
/proc2 FMLOCAL
/newproc FMLOCAL
/Fmcc {
/proc2 exch cvlit def
|
︙ | | |
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
|
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
|
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
+
-
+
-
-
+
+
-
-
-
-
+
+
+
+
-
+
-
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
-
-
+
+
+
+
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
+
-
+
-
+
-
+
|
setcolortransfer
{pop 0} setundercolorremoval
{} setblackgeneration
} bind def
/tran FMLOCAL
/fakecolorsetup {
/tran 256 string def
0 1 255 {/indx exch def
0 1 255 {/indx exch def
tran indx
red indx get 77 mul
green indx get 151 mul
blue indx get 28 mul
add add 256 idiv put} for
currenttransfer
{255 mul cvi tran exch get 255.0 div}
exch Fmcc settransfer
} bind def
/BITMAPCOLOR {
/BITMAPCOLOR {
/d 8 def
gsave
translate rotate scale /h exch def /w exch def
/bitmapsave save def
/bitmapsave save def
colorsetup
/is w d wbytes string def
/cf currentfile def
w h d [w 0 0 h neg 0 h]
{cf is readhexstring pop} {is} {is} true 3 colorimage
bitmapsave restore
/cf currentfile def
w h d [w 0 0 h neg 0 h]
{cf is readhexstring pop} {is} {is} true 3 colorimage
bitmapsave restore
grestore
} bind def
/BITMAPCOLORc {
/BITMAPCOLORc {
/d 8 def
gsave
translate rotate scale /h exch def /w exch def
/lb w d wbytes def
sl lb lt {lb ms} if
/bitmapsave save def
/lb w d wbytes def
sl lb lt {lb ms} if
/bitmapsave save def
colorsetup
/is im 0 lb getinterval def
ws 0 lb getinterval is copy pop
/cf currentfile def
w h d [w 0 0 h neg 0 h]
/is im 0 lb getinterval def
ws 0 lb getinterval is copy pop
/cf currentfile def
w h d [w 0 0 h neg 0 h]
{ip} {is} {is} true 3 colorimage
bitmapsave restore
bitmapsave restore
grestore
} bind def
/BITMAPTRUECOLORc {
/BITMAPTRUECOLORc {
gsave
translate rotate scale /h exch def /w exch def
/bitmapsave save def
/bitmapsave save def
/is w string def
ws 0 w getinterval is copy pop
/cf currentfile def
w h 8 [w 0 0 h neg 0 h]
ws 0 w getinterval is copy pop
/cf currentfile def
w h 8 [w 0 0 h neg 0 h]
{ip} {gip} {bip} true 3 colorimage
bitmapsave restore
bitmapsave restore
grestore
} bind def
/BITMAPTRUECOLOR {
/BITMAPTRUECOLOR {
gsave
translate rotate scale /h exch def /w exch def
/bitmapsave save def
/bitmapsave save def
/is w string def
/gis w string def
/bis w string def
/cf currentfile def
w h 8 [w 0 0 h neg 0 h]
{ cf is readhexstring pop }
{ cf gis readhexstring pop }
{ cf bis readhexstring pop }
true 3 colorimage
bitmapsave restore
/cf currentfile def
w h 8 [w 0 0 h neg 0 h]
{ cf is readhexstring pop }
{ cf gis readhexstring pop }
{ cf bis readhexstring pop }
true 3 colorimage
bitmapsave restore
grestore
} bind def
/BITMAPTRUEGRAYc {
/BITMAPTRUEGRAYc {
gsave
translate rotate scale /h exch def /w exch def
/bitmapsave save def
/bitmapsave save def
/is w string def
ws 0 w getinterval is copy pop
/cf currentfile def
w h 8 [w 0 0 h neg 0 h]
ws 0 w getinterval is copy pop
/cf currentfile def
w h 8 [w 0 0 h neg 0 h]
{ip gip bip w gray} image
bitmapsave restore
bitmapsave restore
grestore
} bind def
/ww FMLOCAL
/r FMLOCAL
/g FMLOCAL
/b FMLOCAL
/i FMLOCAL
/gray {
/gray {
/ww exch def
/b exch def
/g exch def
/r exch def
0 1 ww 1 sub { /i exch def r i get .299 mul g i get .587 mul
b i get .114 mul add add r i 3 -1 roll floor cvi put } for
r
} bind def
/BITMAPTRUEGRAY {
/BITMAPTRUEGRAY {
gsave
translate rotate scale /h exch def /w exch def
/bitmapsave save def
/bitmapsave save def
/is w string def
/gis w string def
/bis w string def
/cf currentfile def
w h 8 [w 0 0 h neg 0 h]
{ cf is readhexstring pop
cf gis readhexstring pop
/cf currentfile def
w h 8 [w 0 0 h neg 0 h]
{ cf is readhexstring pop
cf gis readhexstring pop
cf bis readhexstring pop w gray} image
bitmapsave restore
bitmapsave restore
grestore
} bind def
/BITMAPGRAY {
/BITMAPGRAY {
8 {fakecolorsetup} COMMONBITMAP
} bind def
/BITMAPGRAYc {
/BITMAPGRAYc {
8 {fakecolorsetup} COMMONBITMAPc
} bind def
/ENDBITMAP {
} bind def
end
end
/ALDsave FMLOCAL
/ALDmatrix matrix def ALDmatrix currentmatrix pop
/StartALD {
/ALDsave save def
savematrix
ALDmatrix setmatrix
} bind def
|
︙ | | |
Changes to doc/tk_mac.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 2011 Kevin Walzer.
'\" Copyright (c) 2011 Donal K. Fellows.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH tk::mac n 8.6 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
tk::mac \- Access Mac-Specific Functionality on OS X from Tk
.SH SYNOPSIS
|
︙ | | |
Changes to doc/tkvars.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH tkvars n 4.1 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
geometry, tk_library, tk_patchLevel, tk_strictMotif, tk_version \- Variables used or set by Tk
.BE
|
︙ | | |
Changes to doc/tkwait.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH tkwait n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
tkwait \- Wait for variable to change or window to be destroyed
.SH SYNOPSIS
|
︙ | | |
Changes to doc/toplevel.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH toplevel n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
toplevel \- Create and manipulate 'toplevel' main and popup window widgets
.SH SYNOPSIS
|
︙ | | |
Changes to doc/ttk_Theme.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 2003 Joe English
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Ttk_CreateTheme 3 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
.SH NAME
Ttk_CreateTheme, Ttk_GetTheme, Ttk_GetDefaultTheme, Ttk_GetCurrentTheme \- create and use Tk themes.
.SH SYNOPSIS
.nf
|
︙ | | |
Changes to doc/ttk_sizegrip.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
'\"
'\" Copyright (c) 2006 Joe English
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH ttk::sizegrip n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
.SH NAME
ttk::sizegrip \- Bottom-right corner resize widget
.SH SYNOPSIS
\fBttk::sizegrip\fR \fIpathName \fR?\fIoptions\fR?
|
︙ | | |
Changes to doc/winfo.n.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH winfo n 4.3 Tk "Tk Built-In Commands"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
winfo \- Return window-related information
.SH SYNOPSIS
|
︙ | | |
Changes to doc/wish.1.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
'\"
'\" Copyright (c) 1991-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH wish 1 8.0 Tk "Tk Applications"
.so man.macros
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
wish \- Simple windowing shell
.SH SYNOPSIS
|
︙ | | |
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
-
+
|
It will continue processing commands until all windows have been
deleted or until end-of-file is reached on standard input.
If there exists a file
.QW \fB.wishrc\fR
in the home directory of the user, \fBwish\fR evaluates the file as a
Tcl script just before reading the first command from standard input.
.PP
If arguments to \fBwish\fR do specify a \fIfileName\fR, then
If arguments to \fBwish\fR do specify a \fIfileName\fR, then
\fIfileName\fR is treated as the name of a script file.
\fBWish\fR will evaluate the script in \fIfileName\fR (which
presumably creates a user interface), then it will respond to events
until all windows have been deleted.
Commands will not be read from standard input.
There is no automatic evaluation of
.QW \fB.wishrc\fR
|
︙ | | |
Changes to generic/tk.h.
︙ | | |
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
-
-
+
+
|
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
#ifndef _TK
#define _TK
#include <tcl.h>
#if (TCL_MAJOR_VERSION != 8) || (TCL_MINOR_VERSION < 6)
# error Tk 8.6 must be compiled with tcl.h from Tcl 8.6 or better
#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
# error Tk 8.7 must be compiled with tcl.h from Tcl 8.6 or better
#endif
#ifndef CONST84
# define CONST84 const
# define CONST84_RETURN const
#endif
#ifndef CONST86
|
︙ | | |
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
-
-
+
+
-
-
-
+
+
+
-
-
+
+
|
#endif
/*
* When version numbers change here, you must also go into the following files
* and update the version numbers:
*
* library/tk.tcl (1 LOC patch)
* unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
* win/configure.in (as above)
* unix/configure.ac (2 LOC Major, 2 LOC minor, 1 LOC patch)
* win/configure.ac (as above)
* README (sections 0 and 1)
* macosx/Tk-Common.xcconfig (not patchlevel) 1 LOC
* win/README (not patchlevel)
* unix/README (not patchlevel)
* unix/tk.spec (1 LOC patch)
* win/tcl.m4 (not patchlevel)
*
* You may also need to update some of these files when the numbers change for
* the version of Tcl that this release of Tk is compiled against.
*/
#define TK_MAJOR_VERSION 8
#define TK_MINOR_VERSION 6
#define TK_RELEASE_LEVEL TCL_FINAL_RELEASE
#define TK_RELEASE_SERIAL 6
#define TK_MINOR_VERSION 7
#define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE
#define TK_RELEASE_SERIAL 0
#define TK_VERSION "8.6"
#define TK_PATCH_LEVEL "8.6.6"
#define TK_VERSION "8.7"
#define TK_PATCH_LEVEL "8.7a0"
/*
* A special definition used to allow this header file to be included from
* windows or mac resource files so that they can obtain version information.
* RC_INVOKED is defined by default by the windows RC tool and manually set
* for macintosh.
*
|
︙ | | |
Changes to generic/tkBind.c.
︙ | | |
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
|
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
|
-
+
|
* When constructing the event,
* event.xany.serial is filled with the current X serial number.
* event.xany.window is filled with the target window.
* event.xany.display is filled with the target window's display.
* Any other fields in eventPtr which are not specified by the pattern
* string or the optional arguments, are set to 0.
*
* The event may be handled sychronously or asynchronously, depending on
* The event may be handled synchronously or asynchronously, depending on
* the value specified by the optional "-when" option. The default
* setting is synchronous.
*
*---------------------------------------------------------------------------
*/
static int
|
︙ | | |
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
|
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
|
-
+
|
eventMask = eiPtr->eventMask;
while ((*p == '-') || isspace(UCHAR(*p))) {
p++;
}
p = GetField(p, field, FIELD_SIZE);
}
if (*field != '\0') {
if ((*field >= '1') && (*field <= '5') && (field[1] == '\0')) {
if ((*field >= '1') && (*field <= '9') && (field[1] == '\0')) {
if (eventFlags == 0) {
patPtr->eventType = ButtonPress;
eventMask = ButtonPressMask;
} else if (eventFlags & KEY) {
goto getKeysym;
} else if (!(eventFlags & BUTTON)) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
︙ | | |
Changes to generic/tkDecls.h.
︙ | | |
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
|
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
|
+
+
+
|
/* Functions that don't belong in the stub table */
#undef Tk_MainEx
#undef Tk_Init
#undef Tk_SafeInit
#undef Tk_CreateConsoleWindow
#undef Tk_FreeXId
#define Tk_FreeXId(display,xid)
#if defined(_WIN32) && defined(UNICODE)
# define Tk_MainEx Tk_MainExW
EXTERN void Tk_MainExW(int argc, wchar_t **argv,
Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
#endif
#undef TCL_STORAGE_CLASS
|
︙ | | |
Changes to generic/tkEntry.c.
︙ | | |
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
|
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
|
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
|
}
if (entryPtr->insertBorderWidth > entryPtr->insertWidth/2) {
entryPtr->insertBorderWidth = entryPtr->insertWidth/2;
}
if (entryPtr->type == TK_SPINBOX) {
if (sbPtr->fromValue > sbPtr->toValue) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"-to value must be greater than -from value",
-1));
Tcl_SetErrorCode(interp, "TK", "SPINBOX", "RANGE_SANITY",
/*
* Swap -from and -to values.
*/
double tmpFromTo = sbPtr->fromValue;
NULL);
continue;
}
sbPtr->fromValue = sbPtr->toValue;
sbPtr->toValue = tmpFromTo;
}
if (sbPtr->reqFormat && (oldFormat != sbPtr->reqFormat)) {
/*
* Make sure that the given format is somewhat correct, and
* calculate the minimum space we'll need for the values as
* strings.
*/
|
︙ | | |
Changes to generic/tkFont.c.
︙ | | |
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
|
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
|
-
+
|
switch ((enum options) index) {
case FONT_ACTUAL: {
int skip, result, n;
const char *s;
Tk_Font tkfont;
Tcl_Obj *optPtr, *charPtr, *resultPtr;
Tcl_UniChar uniChar = 0;
int uniChar = 0;
const TkFontAttributes *faPtr;
TkFontAttributes fa;
/*
* Params 0 and 1 are 'font actual'. Param 2 is the font name. 3-4 may
* be '-displayof $window'
*/
|
︙ | | |
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
|
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
|
-
+
-
+
|
for (; *src != '\0'; ) {
while (isspace(UCHAR(*src))) { /* INTL: ISO space */
src++;
upper = 1;
}
src += Tcl_UtfToUniChar(src, &ch);
if (upper) {
ch = Tcl_UniCharToUpper(ch);
ch = (Tcl_UniChar) Tcl_UniCharToUpper(ch);
upper = 0;
} else {
ch = Tcl_UniCharToLower(ch);
ch = (Tcl_UniChar) Tcl_UniCharToLower(ch);
}
dest += Tcl_UniCharToUtf(ch, dest);
}
*dest = '\0';
Tcl_DStringSetLength(dsPtr, dest - Tcl_DStringValue(dsPtr));
family = Tcl_DStringValue(dsPtr) + len;
}
|
︙ | | |
Changes to generic/tkFrame.c.
︙ | | |
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
|
454
455
456
457
458
459
460
461
462
463
464
465
466
467
|
-
|
Tcl_Obj *listObj, /* List of arguments. */
int toplevel, /* Non-zero means create a toplevel window,
* zero means create a frame. */
Tcl_Obj *nameObj) /* Should only be non-NULL if there is no main
* window associated with the interpreter.
* Gives the base name to use for the new
* application. */
{
int objc;
Tcl_Obj **objv;
if (TCL_OK != Tcl_ListObjGetElements(interp, listObj, &objc, &objv)) {
return TCL_ERROR;
}
|
︙ | | |
Changes to generic/tkGC.c.
︙ | | |
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
|
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
-
|
idHashPtr = Tcl_FindHashEntry(&dispPtr->gcIdTable, (char *) gc);
if (idHashPtr == NULL) {
Tcl_Panic("Tk_FreeGC received unknown gc argument");
}
gcPtr = Tcl_GetHashValue(idHashPtr);
gcPtr->refCount--;
if (gcPtr->refCount == 0) {
Tk_FreeXId(gcPtr->display, (XID) XGContextFromGC(gcPtr->gc));
XFreeGC(gcPtr->display, gcPtr->gc);
Tcl_DeleteHashEntry(gcPtr->valueHashPtr);
Tcl_DeleteHashEntry(idHashPtr);
ckfree(gcPtr);
}
}
|
︙ | | |
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
|
346
347
348
349
350
351
352
353
354
355
356
357
358
359
|
-
-
-
-
-
-
|
Tcl_HashSearch search;
TkGC *gcPtr;
for (entryPtr = Tcl_FirstHashEntry(&dispPtr->gcIdTable, &search);
entryPtr != NULL; entryPtr = Tcl_NextHashEntry(&search)) {
gcPtr = Tcl_GetHashValue(entryPtr);
/*
* This call is not needed, as it is only used on Unix to restore the
* Id to the stack pool, and we don't want to use them anymore.
* Tk_FreeXId(gcPtr->display, (XID) XGContextFromGC(gcPtr->gc));
*/
XFreeGC(gcPtr->display, gcPtr->gc);
Tcl_DeleteHashEntry(gcPtr->valueHashPtr);
Tcl_DeleteHashEntry(entryPtr);
ckfree(gcPtr);
}
Tcl_DeleteHashTable(&dispPtr->gcValueTable);
Tcl_DeleteHashTable(&dispPtr->gcIdTable);
|
︙ | | |
Changes to generic/tkInt.h.
︙ | | |
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
|
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
|
-
+
|
int rangeLength, int maxLength, int flags,
int *lengthPtr);
MODULE_SCOPE void TkUnderlineCharsInContext(Display *display,
Drawable drawable, GC gc, Tk_Font tkfont,
const char *string, int numBytes, int x, int y,
int firstByte, int lastByte);
MODULE_SCOPE void TkpGetFontAttrsForChar(Tk_Window tkwin, Tk_Font tkfont,
Tcl_UniChar c, struct TkFontAttributes *faPtr);
int c, struct TkFontAttributes *faPtr);
MODULE_SCOPE Tcl_Obj * TkNewWindowObj(Tk_Window tkwin);
MODULE_SCOPE void TkpShowBusyWindow(TkBusy busy);
MODULE_SCOPE void TkpHideBusyWindow(TkBusy busy);
MODULE_SCOPE void TkpMakeTransparentWindowExist(Tk_Window tkwin,
Window parent);
MODULE_SCOPE void TkpCreateBusy(Tk_FakeWin *winPtr, Tk_Window tkRef,
Window *parentPtr, Tk_Window tkParent,
|
︙ | | |
Changes to generic/tkMenu.c.
︙ | | |
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
-
+
|
* the Macintosh, the platform specific menu handle for cascades attached to a
* menu bar must have a title that matches the label for the cascade menu.
*
* To handle all of the constraints, Tk menubars and tearoff menus are
* implemented using menu clones. Menu clones are full menus in their own
* right; they have a Tk window and pathname associated with them; they have a
* TkMenu structure and array of entries. However, they are linked with the
* original menu that they were cloned from. The reflect the attributes of the
* original menu that they were cloned from. They reflect the attributes of the
* original, or "master", menu. So if an item is added to a menu, and that
* menu has clones, then the item must be added to all of its clones also.
* Menus are cloned when a menu is torn-off or when a menu is assigned as a
* menubar using the "-menu" option of the toplevel's pathname configure
* subcommand. When a clone is destroyed, only the clone is destroyed, but
* when the master menu is destroyed, all clones are also destroyed. This
* allows the developer to just deal with one set of menus when creating and
|
︙ | | |
Changes to generic/tkStubInit.c.
︙ | | |
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
+
+
+
+
+
+
+
+
+
|
MODULE_SCOPE const TkStubs tkStubs;
/*
* Remove macro that might interfere with the definition below.
*/
#undef Tk_MainEx
#undef Tk_FreeXId
static void
doNothing(void)
{
/* dummy implementation, no need to do anything */
}
#define Tk_FreeXId ((void (*)(Display *, XID)) doNothing)
#ifdef _WIN32
int
TkpCmapStressed(Tk_Window tkwin, Colormap colormap)
{
/* dummy implementation, no need to do anything */
|
︙ | | |
Changes to generic/tkTest.c.
︙ | | |
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
|
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
|
-
+
-
+
|
int
Tktest_Init(
Tcl_Interp *interp) /* Interpreter for application. */
{
static int initialized = 0;
if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
if (Tcl_InitStubs(interp, "8.6", 0) == NULL) {
return TCL_ERROR;
}
if (Tk_InitStubs(interp, TK_VERSION, 0) == NULL) {
return TCL_ERROR;
}
/*
* Create additional commands for testing Tk.
*/
if (Tcl_PkgProvideEx(interp, "Tktest", TK_PATCH_LEVEL, NULL) == TCL_ERROR) {
return TCL_ERROR;
return TCL_ERROR;
}
Tcl_CreateObjCommand(interp, "square", SquareObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "testbitmap", TestbitmapObjCmd,
(ClientData) Tk_MainWindow(interp), NULL);
Tcl_CreateObjCommand(interp, "testborder", TestborderObjCmd,
(ClientData) Tk_MainWindow(interp), NULL);
|
︙ | | |
Changes to generic/tkText.c.
︙ | | |
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
|
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
|
+
+
+
+
+
+
+
|
const TkTextIndex *index1Ptr,
/* Index describing first location. */
const TkTextIndex *index2Ptr)
/* Index describing second location. */
{
TkUndoSubAtom *iAtom, *dAtom;
int canUndo, canRedo;
char lMarkName[20] = "tk::undoMarkL";
char rMarkName[20] = "tk::undoMarkR";
char stringUndoMarkId[7] = "";
/*
* Create the helpers.
*/
Tcl_Obj *seeInsertObj = Tcl_NewObj();
Tcl_Obj *markSet1InsertObj = Tcl_NewObj();
Tcl_Obj *markSet2InsertObj = NULL;
Tcl_Obj *insertCmdObj = Tcl_NewObj();
Tcl_Obj *deleteCmdObj = Tcl_NewObj();
Tcl_Obj *markSetLUndoMarkCmdObj = Tcl_NewObj();
Tcl_Obj *markSetRUndoMarkCmdObj = NULL;
Tcl_Obj *markGravityLUndoMarkCmdObj = Tcl_NewObj();
Tcl_Obj *markGravityRUndoMarkCmdObj = NULL;
/*
* Get the index positions.
*/
Tcl_Obj *index1Obj = TkTextNewIndexObj(NULL, index1Ptr);
Tcl_Obj *index2Obj = TkTextNewIndexObj(NULL, index2Ptr);
|
︙ | | |
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
|
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
Tcl_ListObjAppendElement(NULL, insertCmdObj, undoString);
Tcl_ListObjAppendElement(NULL, deleteCmdObj,
Tcl_NewStringObj("delete", 6));
Tcl_ListObjAppendElement(NULL, deleteCmdObj, index1Obj);
Tcl_ListObjAppendElement(NULL, deleteCmdObj, index2Obj);
Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
Tcl_NewStringObj(Tk_PathName(textPtr->tkwin), -1));
Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
Tcl_NewStringObj("mark", 4));
Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
Tcl_NewStringObj("set", 3));
markSetRUndoMarkCmdObj = Tcl_DuplicateObj(markSetLUndoMarkCmdObj);
textPtr->sharedTextPtr->undoMarkId++;
sprintf(stringUndoMarkId, "%d", textPtr->sharedTextPtr->undoMarkId);
strcat(lMarkName, stringUndoMarkId);
strcat(rMarkName, stringUndoMarkId);
Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
Tcl_NewStringObj(lMarkName, -1));
Tcl_ListObjAppendElement(NULL, markSetRUndoMarkCmdObj,
Tcl_NewStringObj(rMarkName, -1));
Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj, index1Obj);
Tcl_ListObjAppendElement(NULL, markSetRUndoMarkCmdObj, index2Obj);
Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
Tcl_NewStringObj(Tk_PathName(textPtr->tkwin), -1));
Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
Tcl_NewStringObj("mark", 4));
Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
Tcl_NewStringObj("gravity", 7));
markGravityRUndoMarkCmdObj = Tcl_DuplicateObj(markGravityLUndoMarkCmdObj);
Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
Tcl_NewStringObj(lMarkName, -1));
Tcl_ListObjAppendElement(NULL, markGravityRUndoMarkCmdObj,
Tcl_NewStringObj(rMarkName, -1));
Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
Tcl_NewStringObj("left", 4));
Tcl_ListObjAppendElement(NULL, markGravityRUndoMarkCmdObj,
Tcl_NewStringObj("right", 5));
/*
* Note: we don't wish to use textPtr->widgetCmd in these callbacks
* because if we delete the textPtr, but peers still exist, we will then
* have references to a non-existent Tcl_Command in the undo stack, which
* will lead to crashes later. Also, the behaviour of the widget w.r.t.
* bindings (%W substitutions) always uses the widget path name, so there
* is no good reason the undo stack should do otherwise.
*
* For the 'insert' and 'delete' actions, we have to register a functional
* callback, because these actions are defined to operate on the
* underlying data shared by all peers.
*/
iAtom = TkUndoMakeSubAtom(&TextUndoRedoCallback, textPtr->sharedTextPtr,
insertCmdObj, NULL);
TkUndoMakeCmdSubAtom(NULL, markSet2InsertObj, iAtom);
TkUndoMakeCmdSubAtom(NULL, seeInsertObj, iAtom);
TkUndoMakeCmdSubAtom(NULL, markSetLUndoMarkCmdObj, iAtom);
TkUndoMakeCmdSubAtom(NULL, markSetRUndoMarkCmdObj, iAtom);
TkUndoMakeCmdSubAtom(NULL, markGravityLUndoMarkCmdObj, iAtom);
TkUndoMakeCmdSubAtom(NULL, markGravityRUndoMarkCmdObj, iAtom);
dAtom = TkUndoMakeSubAtom(&TextUndoRedoCallback, textPtr->sharedTextPtr,
deleteCmdObj, NULL);
TkUndoMakeCmdSubAtom(NULL, markSet1InsertObj, dAtom);
TkUndoMakeCmdSubAtom(NULL, seeInsertObj, dAtom);
TkUndoMakeCmdSubAtom(NULL, markSetLUndoMarkCmdObj, dAtom);
TkUndoMakeCmdSubAtom(NULL, markSetRUndoMarkCmdObj, dAtom);
TkUndoMakeCmdSubAtom(NULL, markGravityLUndoMarkCmdObj, dAtom);
TkUndoMakeCmdSubAtom(NULL, markGravityRUndoMarkCmdObj, dAtom);
Tcl_DecrRefCount(seeInsertObj);
Tcl_DecrRefCount(index1Obj);
Tcl_DecrRefCount(index2Obj);
canUndo = TkUndoCanUndo(textPtr->sharedTextPtr->undoStack);
canRedo = TkUndoCanRedo(textPtr->sharedTextPtr->undoStack);
|
︙ | | |
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
|
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
|
-
+
|
* Side effects:
* Characters and other entities (windows, images) get deleted from the
* text.
*
* If 'viewUpdate' is true, we may adjust the window contents'
* y-position, and scrollbar setting.
*
* If 'viewUpdate' is false, true we can guarantee that textPtr->topIndex
* If 'viewUpdate' is true we can guarantee that textPtr->topIndex
* points to a valid TkTextLine after this function returns. However, if
* 'viewUpdate' is false, then there is no such guarantee (since
* topIndex.linePtr can be garbage). The caller is expected to take
* actions to ensure the topIndex is validated before laying out the
* window again.
*
*----------------------------------------------------------------------
|
︙ | | |
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
|
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
|
+
+
|
*/
static int
TextEditUndo(
TkText *textPtr) /* Overall information about text widget. */
{
int status;
Tcl_Obj *cmdObj;
int code;
if (!textPtr->sharedTextPtr->undo) {
return TCL_OK;
}
/*
* Turn off the undo feature while we revert a compound action, setting
|
︙ | | |
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
|
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
status = TkUndoRevert(textPtr->sharedTextPtr->undoStack);
if (textPtr->sharedTextPtr->dirtyMode != TK_TEXT_DIRTY_FIXED) {
textPtr->sharedTextPtr->dirtyMode = TK_TEXT_DIRTY_NORMAL;
}
textPtr->sharedTextPtr->undo = 1;
/*
* Convert undo/redo temporary marks set by TkUndoRevert() into
* indices left in the interp result.
*/
cmdObj = Tcl_ObjPrintf("::tk::TextUndoRedoProcessMarks %s",
Tk_PathName(textPtr->tkwin));
Tcl_IncrRefCount(cmdObj);
code = Tcl_EvalObjEx(textPtr->interp, cmdObj, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
Tcl_AddErrorInfo(textPtr->interp,
"\n (on undoing)");
Tcl_BackgroundException(textPtr->interp, code);
}
Tcl_DecrRefCount(cmdObj);
return status;
}
/*
*----------------------------------------------------------------------
*
* TextEditRedo --
|
︙ | | |
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
|
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
|
+
+
|
*/
static int
TextEditRedo(
TkText *textPtr) /* Overall information about text widget. */
{
int status;
Tcl_Obj *cmdObj;
int code;
if (!textPtr->sharedTextPtr->undo) {
return TCL_OK;
}
/*
* Turn off the undo feature temporarily while we revert a previously
|
︙ | | |
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
|
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
status = TkUndoApply(textPtr->sharedTextPtr->undoStack);
if (textPtr->sharedTextPtr->dirtyMode != TK_TEXT_DIRTY_FIXED) {
textPtr->sharedTextPtr->dirtyMode = TK_TEXT_DIRTY_NORMAL;
}
textPtr->sharedTextPtr->undo = 1;
/*
* Convert undo/redo temporary marks set by TkUndoApply() into
* indices left in the interp result.
*/
cmdObj = Tcl_ObjPrintf("::tk::TextUndoRedoProcessMarks %s",
Tk_PathName(textPtr->tkwin));
Tcl_IncrRefCount(cmdObj);
code = Tcl_EvalObjEx(textPtr->interp, cmdObj, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
Tcl_AddErrorInfo(textPtr->interp,
"\n (on undoing)");
Tcl_BackgroundException(textPtr->interp, code);
}
Tcl_DecrRefCount(cmdObj);
return status;
}
/*
*----------------------------------------------------------------------
*
* TextEditCmd --
|
︙ | | |
Changes to generic/tkText.h.
︙ | | |
576
577
578
579
580
581
582
583
584
585
586
587
588
589
|
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
|
+
+
|
int undo; /* Non-zero means the undo/redo behaviour is
* enabled. */
int maxUndo; /* The maximum depth of the undo stack
* expressed as the maximum number of compound
* statements. */
int autoSeparators; /* Non-zero means the separators will be
* inserted automatically. */
int undoMarkId; /* Counts undo marks temporarily used during
undo and redo operations. */
int isDirty; /* Flag indicating the 'dirtyness' of the
* text widget. If the flag is not zero,
* unsaved modifications have been applied to
* the text widget. */
TkTextDirtyMode dirtyMode; /* The nature of the dirtyness characterized
* by the isDirty flag. */
TkTextEditMode lastEditMode;/* Keeps track of what the last edit mode
|
︙ | | |
Changes to generic/tkTextDisp.c.
︙ | | |
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
|
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
|
-
+
|
TkText *textPtr, int objc,
Tcl_Obj *const objv[], double *dblPtr,
int *intPtr);
static void AsyncUpdateLineMetrics(ClientData clientData);
static void GenerateWidgetViewSyncEvent(TkText *textPtr, Bool InSync);
static void AsyncUpdateYScrollbar(ClientData clientData);
static int IsStartOfNotMergedLine(TkText *textPtr,
CONST TkTextIndex *indexPtr);
const TkTextIndex *indexPtr);
/*
* Result values returned by TextGetScrollInfoObj:
*/
#define TKTEXT_SCROLL_MOVETO 1
#define TKTEXT_SCROLL_PAGES 2
|
︙ | | |
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
|
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
|
-
+
|
*
*----------------------------------------------------------------------
*/
static int
IsStartOfNotMergedLine(
TkText *textPtr, /* Widget record for text widget. */
CONST TkTextIndex *indexPtr) /* Index to check. */
const TkTextIndex *indexPtr) /* Index to check. */
{
TkTextIndex indexPtr2;
if (indexPtr->byteIndex != 0) {
/*
* Not the start of a logical line.
*/
|
︙ | | |
Changes to generic/tkTextIndex.c.
︙ | | |
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
-
-
-
+
+
+
|
static const char * ForwBack(TkText *textPtr, const char *string,
TkTextIndex *indexPtr);
static const char * StartEnd(TkText *textPtr, const char *string,
TkTextIndex *indexPtr);
static int GetIndex(Tcl_Interp *interp, TkSharedText *sharedPtr,
TkText *textPtr, const char *string,
TkTextIndex *indexPtr, int *canCachePtr);
static int IndexCountBytesOrdered(CONST TkText *textPtr,
CONST TkTextIndex *indexPtr1,
CONST TkTextIndex *indexPtr2);
static int IndexCountBytesOrdered(const TkText *textPtr,
const TkTextIndex *indexPtr1,
const TkTextIndex *indexPtr2);
/*
* The "textindex" Tcl_Obj definition:
*/
static void DupTextIndexInternalRep(Tcl_Obj *srcPtr,
Tcl_Obj *copyPtr);
|
︙ | | |
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
|
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
|
-
-
-
+
+
+
-
-
+
+
-
+
|
* None.
*
*---------------------------------------------------------------------------
*/
int
TkTextIndexCountBytes(
CONST TkText *textPtr,
CONST TkTextIndex *indexPtr1, /* Index describing one location. */
CONST TkTextIndex *indexPtr2) /* Index describing second location. */
const TkText *textPtr,
const TkTextIndex *indexPtr1, /* Index describing one location. */
const TkTextIndex *indexPtr2) /* Index describing second location. */
{
int compare = TkTextIndexCmp(indexPtr1, indexPtr2);
if (compare == 0) {
return 0;
} else if (compare > 0) {
return IndexCountBytesOrdered(textPtr, indexPtr2, indexPtr1);
} else {
return IndexCountBytesOrdered(textPtr, indexPtr1, indexPtr2);
}
}
static int
IndexCountBytesOrdered(
CONST TkText *textPtr,
CONST TkTextIndex *indexPtr1,
const TkText *textPtr,
const TkTextIndex *indexPtr1,
/* Index describing location of character from
* which to count. */
CONST TkTextIndex *indexPtr2)
const TkTextIndex *indexPtr2)
/* Index describing location of last character
* at which to stop the count. */
{
int byteCount, offset;
TkTextSegment *segPtr, *segPtr1;
TkTextLine *linePtr;
|
︙ | | |
Changes to generic/tkUtil.c.
︙ | | |
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
|
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
|
-
+
|
event.general.xany.type = VirtualEvent;
event.general.xany.serial = NextRequest(Tk_Display(target));
event.general.xany.send_event = False;
event.general.xany.window = Tk_WindowId(target);
event.general.xany.display = Tk_Display(target);
event.virtual.name = Tk_GetUid(eventName);
if (detail != NULL) {
event.virtual.user_data = detail;
event.virtual.user_data = detail;
}
Tk_QueueWindowEvent(&event.general, TCL_QUEUE_TAIL);
}
/*
* Local Variables:
* mode: c
|
︙ | | |
Changes to generic/tkWindow.c.
︙ | | |
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
|
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
|
-
+
|
* Build the command to eval in trusted master.
*/
cmd = Tcl_NewListObj(2, NULL);
Tcl_ListObjAppendElement(NULL, cmd,
Tcl_NewStringObj("::safe::TkInit", -1));
Tcl_ListObjAppendElement(NULL, cmd, Tcl_GetObjResult(master));
/*
* Step 2 : Eval in the master. The argument is the *reversed* interp
* path of the slave.
*/
Tcl_IncrRefCount(cmd);
code = Tcl_EvalObjEx(master, cmd, 0);
|
︙ | | |
Changes to generic/ttk/ttkClamTheme.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
-
-
+
+
|
/*
* Copyright (C) 2004 Joe English
*
* "clam" theme; inspired by the XFCE family of Gnome themes.
*/
#include <tk.h>
#include "ttkTheme.h"
/*
* Under windows, the Tk-provided XDrawLine and XDrawArc have an
/*
* Under windows, the Tk-provided XDrawLine and XDrawArc have an
* off-by-one error in the end point. This is especially apparent with this
* theme. Defining this macro as true handles this case.
*/
#if defined(_WIN32) && !defined(WIN32_XDRAWLINE_HACK)
# define WIN32_XDRAWLINE_HACK 1
#else
# define WIN32_XDRAWLINE_HACK 0
|
︙ | | |
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
-
-
+
+
|
Tk_Offset(BorderElement,borderWidthObj), "2" },
{ NULL, 0, 0, NULL }
};
/*
* <<NOTE-BORDERWIDTH>>: -borderwidth is only partially supported:
* in this theme, borders are always exactly 2 pixels thick.
* With -borderwidth 0, border is not drawn at all;
* otherwise a 2-pixel border is used. For -borderwidth > 2,
* With -borderwidth 0, border is not drawn at all;
* otherwise a 2-pixel border is used. For -borderwidth > 2,
* the excess is used as padding.
*/
static void BorderElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
|
︙ | | |
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
|
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
|
-
+
|
Tcl_Obj *colorObj;
Tcl_Obj *paddingObj;
} MenuIndicatorElement;
static Ttk_ElementOptionSpec MenuIndicatorElementOptions[] =
{
{ "-arrowsize", TK_OPTION_PIXELS,
Tk_Offset(MenuIndicatorElement,sizeObj),
Tk_Offset(MenuIndicatorElement,sizeObj),
STR(MENUBUTTON_ARROW_SIZE)},
{ "-arrowcolor",TK_OPTION_COLOR,
Tk_Offset(MenuIndicatorElement,colorObj),
"black" },
{ "-arrowpadding",TK_OPTION_STRING,
Tk_Offset(MenuIndicatorElement,paddingObj),
"3" },
|
︙ | | |
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
|
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
|
-
+
|
/*
* Draw grip:
*/
Ttk_GetOrientFromObj(NULL, sb->orientObj, &orient);
Tcl_GetIntFromObj(NULL, sb->gripCountObj, &gripCount);
lightGC = Ttk_GCForColor(tkwin,sb->lightColorObj,d);
darkGC = Ttk_GCForColor(tkwin,sb->borderColorObj,d);
if (orient == TTK_ORIENT_HORIZONTAL) {
dx = 1; dy = 0;
x1 = x2 = b.x + b.width / 2 - gripCount;
y1 = b.y + 2;
y2 = b.y + b.height - 3 + w;
} else {
dx = 0; dy = 1;
|
︙ | | |
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
|
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
|
-
+
-
+
|
}
static void PbarElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned state)
{
ScrollbarElement *sb = elementRecord;
b = Ttk_PadBox(b, Ttk_UniformPadding(2));
if (b.width > 4 && b.height > 4) {
DrawSmoothBorder(tkwin, d, b,
sb->borderColorObj, sb->lightColorObj, sb->darkColorObj);
XFillRectangle(Tk_Display(tkwin), d,
XFillRectangle(Tk_Display(tkwin), d,
BackgroundGC(tkwin, sb->backgroundObj),
b.x+2, b.y+2, b.width-4, b.height-4);
}
}
static Ttk_ElementSpec PbarElementSpec = {
TK_STYLE_VERSION_2,
|
︙ | | |
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
|
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
|
-
-
+
+
|
ArrowElementSize,
ArrowElementDraw
};
/*------------------------------------------------------------------------
* +++ Notebook elements.
*
* Note: Tabs, except for the rightmost, overlap the neighbor to
*
* Note: Tabs, except for the rightmost, overlap the neighbor to
* their right by one pixel.
*/
typedef struct {
Tcl_Obj *backgroundObj;
Tcl_Obj *borderColorObj;
Tcl_Obj *lightColorObj;
|
︙ | | |
Changes to generic/ttk/ttkClassicTheme.c.
︙ | | |
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
-
+
-
+
-
+
-
+
-
+
|
HighlightElementOptions,
HighlightElementSize,
HighlightElementDraw
};
/*------------------------------------------------------------------------
* +++ Button Border element:
*
*
* The Motif-style button border on X11 consists of (from outside-in):
*
* + focus indicator (controlled by -highlightcolor and -highlightthickness),
* + default ring (if -default active; blank if -default normal)
* + shaded border (controlled by -background, -borderwidth, and -relief)
*/
typedef struct {
Tcl_Obj *borderObj;
Tcl_Obj *borderWidthObj;
Tcl_Obj *reliefObj;
Tcl_Obj *defaultStateObj;
} ButtonBorderElement;
static Ttk_ElementOptionSpec ButtonBorderElementOptions[] =
{
{ "-background", TK_OPTION_BORDER,
{ "-background", TK_OPTION_BORDER,
Tk_Offset(ButtonBorderElement,borderObj), DEFAULT_BACKGROUND },
{ "-borderwidth", TK_OPTION_PIXELS,
{ "-borderwidth", TK_OPTION_PIXELS,
Tk_Offset(ButtonBorderElement,borderWidthObj), DEFAULT_BORDERWIDTH },
{ "-relief", TK_OPTION_RELIEF,
{ "-relief", TK_OPTION_RELIEF,
Tk_Offset(ButtonBorderElement,reliefObj), "flat" },
{ "-default", TK_OPTION_ANY,
{ "-default", TK_OPTION_ANY,
Tk_Offset(ButtonBorderElement,defaultStateObj), "disabled" },
{ NULL, 0, 0, NULL }
};
static void ButtonBorderElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
|
︙ | | |
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
-
+
|
borderWidth += 5;
}
*paddingPtr = Ttk_UniformPadding((short)borderWidth);
}
/*
* (@@@ Note: ButtonBorderElement still still still buggy:
* padding for default ring is drawn in the wrong color
* padding for default ring is drawn in the wrong color
* when the button is active.)
*/
static void ButtonBorderElementDraw(
void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
ButtonBorderElement *bd = elementRecord;
|
︙ | | |
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
|
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
|
-
+
-
+
-
+
-
+
-
+
-
+
|
ArrowElementDraw
};
/*------------------------------------------------------------------------
* +++ Sash element (for ttk::panedwindow)
*
* NOTES:
* NOTES:
*
* panedwindows with -orient horizontal use vertical sashes, and vice versa.
*
* Interpretation of -sashrelief 'groove' and 'ridge' are
* swapped wrt. the core panedwindow, which (I think) has them backwards.
*
* Default -sashrelief is sunken; the core panedwindow has default
* Default -sashrelief is sunken; the core panedwindow has default
* -sashrelief raised, but that looks wrong to me.
*/
static Ttk_Orient SashClientData[] = {
TTK_ORIENT_HORIZONTAL, TTK_ORIENT_VERTICAL
TTK_ORIENT_HORIZONTAL, TTK_ORIENT_VERTICAL
};
typedef struct {
Tcl_Obj *borderObj; /* background color */
Tcl_Obj *sashReliefObj; /* sash relief */
Tcl_Obj *sashThicknessObj; /* overall thickness of sash */
Tcl_Obj *sashPadObj; /* padding on either side of handle */
Tcl_Obj *handleSizeObj; /* handle width and height */
Tcl_Obj *handlePadObj; /* handle's distance from edge */
} SashElement;
static Ttk_ElementOptionSpec SashOptions[] = {
{ "-background", TK_OPTION_BORDER,
{ "-background", TK_OPTION_BORDER,
Tk_Offset(SashElement,borderObj), DEFAULT_BACKGROUND },
{ "-sashrelief", TK_OPTION_RELIEF,
{ "-sashrelief", TK_OPTION_RELIEF,
Tk_Offset(SashElement,sashReliefObj), "sunken" },
{ "-sashthickness", TK_OPTION_PIXELS,
Tk_Offset(SashElement,sashThicknessObj), "6" },
{ "-sashpad", TK_OPTION_PIXELS,
{ "-sashpad", TK_OPTION_PIXELS,
Tk_Offset(SashElement,sashPadObj), "2" },
{ "-handlesize", TK_OPTION_PIXELS,
Tk_Offset(SashElement,handleSizeObj), "8" },
{ "-handlepad", TK_OPTION_PIXELS,
Tk_Offset(SashElement,handlePadObj), "8" },
{ NULL, 0, 0, NULL }
};
|
︙ | | |
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
|
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
|
-
+
-
+
|
gc1 = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC);
gc2 = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
break;
case TK_RELIEF_SUNKEN: case TK_RELIEF_GROOVE:
gc1 = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
gc2 = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC);
break;
case TK_RELIEF_SOLID:
case TK_RELIEF_SOLID:
gc1 = gc2 = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
break;
case TK_RELIEF_FLAT:
case TK_RELIEF_FLAT:
default:
gc1 = gc2 = Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC);
break;
}
/* Draw sash line:
*/
|
︙ | | |
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
|
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
|
-
+
|
if (horizontal) {
hb = Ttk_StickBox(b, handleSize, handleSize, TTK_STICK_W);
hb.x += handlePad;
} else {
hb = Ttk_StickBox(b, handleSize, handleSize, TTK_STICK_N);
hb.y += handlePad;
}
Tk_Fill3DRectangle(tkwin, d, border,
Tk_Fill3DRectangle(tkwin, d, border,
hb.x, hb.y, hb.width, hb.height, 1, TK_RELIEF_RAISED);
}
}
static Ttk_ElementSpec SashElementSpec = {
TK_STYLE_VERSION_2,
sizeof(SashElement),
|
︙ | | |
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
|
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
|
-
+
|
Ttk_RegisterElement(interp, theme, "leftarrow",
&ArrowElementSpec, &ArrowElements[2]);
Ttk_RegisterElement(interp, theme, "rightarrow",
&ArrowElementSpec, &ArrowElements[3]);
Ttk_RegisterElement(interp, theme, "arrow",
&ArrowElementSpec, &ArrowElements[0]);
Ttk_RegisterElement(interp, theme, "hsash",
Ttk_RegisterElement(interp, theme, "hsash",
&SashElementSpec, &SashClientData[0]);
Ttk_RegisterElement(interp, theme, "vsash",
&SashElementSpec, &SashClientData[1]);
/*
* Register layouts:
*/
|
︙ | | |
Changes to generic/ttk/ttkLabel.c.
︙ | | |
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
-
+
|
gcValues.font = Tk_FontId(text->tkfont);
gcValues.foreground = color->pixel;
gc1 = Tk_GetGC(tkwin, GCFont | GCForeground, &gcValues);
gcValues.foreground = WhitePixelOfScreen(Tk_Screen(tkwin));
gc2 = Tk_GetGC(tkwin, GCFont | GCForeground, &gcValues);
/*
/*
* Place text according to -anchor:
*/
Tk_GetAnchorFromObj(NULL, text->anchorObj, &anchor);
b = Ttk_AnchorBox(b, text->width, text->height, anchor);
/*
* Clip text if it's too wide:
|
︙ | | |
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
|
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
|
-
+
-
+
-
+
|
/* Completely clipped - bail out.
*/
return;
}
Tk_RedrawImage(image->tkimg, 0,0, width, height, d, b.x, b.y);
/* If we're disabled there's no state-specific 'disabled' image,
/* If we're disabled there's no state-specific 'disabled' image,
* stipple the image.
* @@@ Possibly: Don't do disabled-stippling at all;
* @@@ it's ugly and out of fashion.
* Do not stipple at all under Aqua, just draw the image: it shows up
* Do not stipple at all under Aqua, just draw the image: it shows up
* as a white rectangle otherwise.
*/
if (state & TTK_STATE_DISABLED) {
if (TtkSelectImage(image->imageSpec, 0ul) == image->tkimg) {
#ifndef MAC_OSX_TK
StippleOver(image, tkwin, d, b.x,b.y);
#endif
}
}
|
︙ | | |
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
|
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
|
-
+
-
+
-
+
|
*heightPtr = label->totalHeight;
/* Requested width based on -width option, not actual text width:
*/
if (label->compound != TTK_COMPOUND_IMAGE)
textReqWidth = TextReqWidth(&label->text);
switch (label->compound)
switch (label->compound)
{
case TTK_COMPOUND_TEXT:
*widthPtr = textReqWidth;
break;
case TTK_COMPOUND_IMAGE:
*widthPtr = label->image.width;
break;
case TTK_COMPOUND_TOP:
case TTK_COMPOUND_BOTTOM:
case TTK_COMPOUND_CENTER:
*widthPtr = MAX(label->image.width, textReqWidth);
*widthPtr = MAX(label->image.width, textReqWidth);
break;
case TTK_COMPOUND_LEFT:
case TTK_COMPOUND_RIGHT:
*widthPtr = label->image.width + textReqWidth + label->space;
*widthPtr = label->image.width + textReqWidth + label->space;
break;
case TTK_COMPOUND_NONE:
break; /* Can't happen */
}
LabelCleanup(label);
}
|
︙ | | |
Changes to generic/ttk/ttkManager.c.
︙ | | |
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
|
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
|
-
+
|
{
Ttk_Manager *mgr = clientData;
int slaveIndex = Ttk_SlaveIndex(mgr, slaveWindow);
int reqWidth = Tk_ReqWidth(slaveWindow);
int reqHeight= Tk_ReqHeight(slaveWindow);
if (mgr->managerSpec->SlaveRequest(
mgr->managerData, slaveIndex, reqWidth, reqHeight))
mgr->managerData, slaveIndex, reqWidth, reqHeight))
{
ScheduleUpdate(mgr, MGR_RESIZE_REQUIRED);
}
}
void Ttk_LostSlaveProc(ClientData clientData, Tk_Window slaveWindow)
{
|
︙ | | |
Changes to generic/ttk/ttkManager.h.
︙ | | |
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
-
+
|
*
* PlaceSlaves sets the position and size of all managed slaves
* by calling Ttk_PlaceSlave().
*
* SlaveRemoved() is called immediately before a slave is removed.
* NB: the associated slave window may have been destroyed when this
* routine is called.
*
*
* SlaveRequest() is called when a slave requests a size change.
* It should return 1 if the request should propagate, 0 otherwise.
*/
typedef struct { /* Manager hooks */
Tk_GeomMgr tkGeomMgr; /* "real" Tk Geometry Manager */
int (*RequestedSize)(void *managerData, int *widthPtr, int *heightPtr);
|
︙ | | |
Changes to generic/ttk/ttkProgress.c.
︙ | | |
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
|
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
|
-
+
|
/* $sb step ?amount?
*/
static int ProgressbarStepCommand(
void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
Progressbar *pb = recordPtr;
double value = 0.0, stepAmount = 1.0;
Tcl_Obj *newValueObj;
Tcl_Obj *newValueObj;
if (objc == 3) {
if (Tcl_GetDoubleFromObj(interp, objv[2], &stepAmount) != TCL_OK) {
return TCL_ERROR;
}
} else if (objc != 2) {
Tcl_WrongNumArgs(interp, 2,objv, "?stepAmount?");
|
︙ | | |
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
|
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
|
-
+
-
+
|
value = fmod(value, maximum);
}
newValueObj = Tcl_NewDoubleObj(value);
TtkRedisplayWidget(&pb->core);
/* Update value by setting the linked -variable, if there is one:
/* Update value by setting the linked -variable, if there is one:
*/
if (pb->progress.variableTrace) {
return Tcl_ObjSetVar2(
interp, pb->progress.variableObj, 0, newValueObj,
TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG)
? TCL_OK : TCL_ERROR;
}
/* Otherwise, change the -value directly:
*/
Tcl_IncrRefCount(newValueObj);
Tcl_DecrRefCount(pb->progress.valueObj);
pb->progress.valueObj = newValueObj;
CheckAnimation(pb);
return TCL_OK;
}
/* $sb start|stop ?args? --
* Change [$sb $cmd ...] to [ttk::progressbar::$cmd ...]
* Change [$sb $cmd ...] to [ttk::progressbar::$cmd ...]
* and pass to interpreter.
*/
static int ProgressbarStartStopCommand(
Tcl_Interp *interp, const char *cmdName, int objc, Tcl_Obj *const objv[])
{
Tcl_Obj *cmd = Tcl_NewListObj(objc, objv);
Tcl_Obj *prefix[2];
|
︙ | | |
Changes to generic/ttk/ttkScale.c.
︙ | | |
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
-
+
-
+
-
+
-
+
-
+
|
WidgetCore core;
ScalePart scale;
} Scale;
static Tk_OptionSpec ScaleOptionSpecs[] =
{
{TK_OPTION_STRING, "-command", "command", "Command", "",
Tk_Offset(Scale,scale.commandObj), -1,
Tk_Offset(Scale,scale.commandObj), -1,
TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-variable", "variable", "Variable", "",
Tk_Offset(Scale,scale.variableObj), -1,
Tk_Offset(Scale,scale.variableObj), -1,
0,0,0},
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "horizontal",
Tk_Offset(Scale,scale.orientObj),
Tk_Offset(Scale,scale.orient), 0,
Tk_Offset(Scale,scale.orient), 0,
(ClientData)ttkOrientStrings, STYLE_CHANGED },
{TK_OPTION_DOUBLE, "-from", "from", "From", "0",
Tk_Offset(Scale,scale.fromObj), -1, 0, 0, 0},
{TK_OPTION_DOUBLE, "-to", "to", "To", "1.0",
Tk_Offset(Scale,scale.toObj), -1, 0, 0, 0},
{TK_OPTION_DOUBLE, "-value", "value", "Value", "0",
Tk_Offset(Scale,scale.valueObj), -1, 0, 0, 0},
{TK_OPTION_PIXELS, "-length", "length", "Length",
DEF_SCALE_LENGTH, Tk_Offset(Scale,scale.lengthObj), -1, 0, 0,
DEF_SCALE_LENGTH, Tk_Offset(Scale,scale.lengthObj), -1, 0, 0,
GEOMETRY_CHANGED},
WIDGET_TAKEFOCUS_TRUE,
WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs)
};
static XPoint ValueToPoint(Scale *scalePtr, double value);
static double PointToValue(Scale *scalePtr, int x, int y);
/* ScaleVariableChanged --
* Variable trace procedure for scale -variable;
* Updates the scale's value.
* If the linked variable is not a valid double,
* If the linked variable is not a valid double,
* sets the 'invalid' state.
*/
static void ScaleVariableChanged(void *recordPtr, const char *value)
{
Scale *scale = recordPtr;
double v;
|
︙ | | |
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
-
+
|
return status;
}
/* ScaleGetLayout --
* getLayout hook.
*/
static Ttk_Layout
static Ttk_Layout
ScaleGetLayout(Tcl_Interp *interp, Ttk_Theme theme, void *recordPtr)
{
Scale *scalePtr = recordPtr;
return TtkWidgetGetOrientedLayout(
interp, theme, recordPtr, scalePtr->scale.orientObj);
}
|
︙ | | |
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
-
+
|
fraction = (value - from) / (to - from);
return fraction < 0 ? 0 : fraction > 1 ? 1 : fraction;
}
/* $scale get ?x y? --
* Returns the current value of the scale widget, or if $x and
* Returns the current value of the scale widget, or if $x and
* $y are specified, the value represented by point @x,y.
*/
static int
ScaleGetCommand(
void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
Scale *scalePtr = recordPtr;
|
︙ | | |
Changes to generic/ttk/ttkScrollbar.c.
︙ | | |
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
-
+
|
int orient;
Tcl_Obj *orientObj;
double first; /* top fraction */
double last; /* bottom fraction */
Ttk_Box troughBox; /* trough parcel */
Ttk_Box troughBox; /* trough parcel */
int minSize; /* minimum size of thumb */
} ScrollbarPart;
typedef struct
{
WidgetCore core;
ScrollbarPart scrollbar;
|
︙ | | |
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
-
+
|
WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs)
};
/*------------------------------------------------------------------------
* +++ Widget hooks.
*/
static void
static void
ScrollbarInitialize(Tcl_Interp *interp, void *recordPtr)
{
Scrollbar *sb = recordPtr;
sb->scrollbar.first = 0.0;
sb->scrollbar.last = 1.0;
TtkTrackElementState(&sb->core);
|
︙ | | |
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
|
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
|
-
+
|
Tcl_SetObjResult(interp, Tcl_NewDoubleObj(delta));
return TCL_OK;
}
/* $sb fraction $x $y --
* Returns a real number between 0 and 1 indicating where the
* point given by x and y lies in the trough area of the scrollbar.
* point given by x and y lies in the trough area of the scrollbar.
*/
static int
ScrollbarFractionCommand(
void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
Scrollbar *sb = recordPtr;
Ttk_Box b = sb->scrollbar.troughBox;
|
︙ | | |
Changes to generic/ttk/ttkSquare.c.
︙ | | |
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
-
+
-
+
-
+
-
+
-
+
-
+
|
{
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
DEFAULT_BORDERWIDTH, Tk_Offset(Square,square.borderWidthObj), -1,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_BORDER, "-foreground", "foreground", "Foreground",
DEFAULT_BACKGROUND, Tk_Offset(Square,square.foregroundObj),
-1, 0, 0, 0},
{TK_OPTION_PIXELS, "-width", "width", "Width",
"50", Tk_Offset(Square,square.widthObj), -1, 0, 0,
GEOMETRY_CHANGED},
{TK_OPTION_PIXELS, "-height", "height", "Height",
"50", Tk_Offset(Square,square.heightObj), -1, 0, 0,
GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-padding", "padding", "Pad", NULL,
Tk_Offset(Square,square.paddingObj), -1,
Tk_Offset(Square,square.paddingObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
NULL, Tk_Offset(Square,square.reliefObj), -1, TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
NULL, Tk_Offset(Square,square.anchorObj), -1, TK_OPTION_NULL_OK, 0, 0},
WIDGET_TAKEFOCUS_TRUE,
WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs)
};
/*
* Almost all of the widget functionality is handled by the default Ttk
* widget code and the contained element. The one thing that we must handle
|
︙ | | |
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
-
+
-
+
-
+
|
{ "identify", TtkWidgetIdentifyCommand,0 },
{ "instate", TtkWidgetInstateCommand,0 },
{ "state", TtkWidgetStateCommand,0 },
{ 0,0,0 }
};
/*
* The Widget specification structure holds all the implementation
* The Widget specification structure holds all the implementation
* information about this widget and this is what must be registered
* with Tk in the package initialization code (see bottom).
*/
static WidgetSpec SquareWidgetSpec =
{
"TSquare", /* className */
sizeof(Square), /* recordSize */
SquareOptionSpecs, /* optionSpecs */
SquareCommands, /* subcommands */
TtkNullInitialize, /* initializeProc */
TtkNullCleanup, /* cleanupProc */
TtkCoreConfigure, /* configureProc */
TtkNullPostConfigure, /* postConfigureProc */
TtkWidgetGetLayout, /* getLayoutProc */
TtkWidgetSize, /* sizeProc */
SquareDoLayout, /* layoutProc */
TtkWidgetDisplay /* displayProc */
};
/* ----------------------------------------------------------------------
/* ----------------------------------------------------------------------
* Square element
*
* In this section we demonstrate what is required to create a new themed
* element.
*/
typedef struct
{
Tcl_Obj *borderObj;
Tcl_Obj *foregroundObj;
Tcl_Obj *borderWidthObj;
Tcl_Obj *reliefObj;
Tcl_Obj *widthObj;
Tcl_Obj *heightObj;
} SquareElement;
static Ttk_ElementOptionSpec SquareElementOptions[] =
static Ttk_ElementOptionSpec SquareElementOptions[] =
{
{ "-background", TK_OPTION_BORDER, Tk_Offset(SquareElement,borderObj),
DEFAULT_BACKGROUND },
{ "-foreground", TK_OPTION_BORDER, Tk_Offset(SquareElement,foregroundObj),
DEFAULT_BACKGROUND },
{ "-borderwidth", TK_OPTION_PIXELS, Tk_Offset(SquareElement,borderWidthObj),
DEFAULT_BORDERWIDTH },
|
︙ | | |
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
-
+
-
+
-
+
|
* Layout section.
*
* Every widget class needs a layout style that specifies which elements
* are part of the widget and how they should be placed. The element layout
* engine is similar to the Tk pack geometry manager. Read the documentation
* for the details. In this example we just need to have the square element
* that has been defined for this widget placed on a background. We will
* also need some padding to keep it away from the edges.
* also need some padding to keep it away from the edges.
*/
TTK_BEGIN_LAYOUT(SquareLayout)
TTK_NODE("Square.background", TTK_FILL_BOTH)
TTK_GROUP("Square.padding", TTK_FILL_BOTH,
TTK_NODE("Square.square", 0))
TTK_END_LAYOUT
/* ----------------------------------------------------------------------
/* ----------------------------------------------------------------------
*
* Widget initialization.
*
* This file defines a new element and a new widget. We need to register
* the element with the themes that will need it. In this case we will
* the element with the themes that will need it. In this case we will
* register with the default theme that is the root of the theme inheritance
* tree. This means all themes will find this element.
* We then need to register the widget class style. This is the layout
* specification. If a different theme requires an alternative layout, we
* could register that here. For instance, in some themes the scrollbars have
* one uparrow, in other themes there are two uparrow elements.
* Finally we register the widget itself. This step creates a tcl command so
|
︙ | | |
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
-
+
-
+
|
/* public */ MODULE_SCOPE int
TtkSquareWidget_Init(Tcl_Interp *interp)
{
Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
/* register the new elements for this theme engine */
Ttk_RegisterElement(interp, theme, "square", &SquareElementSpec, NULL);
/* register the layout for this theme */
Ttk_RegisterLayout(theme, "TSquare", SquareLayout);
/* register the widget */
RegisterWidget(interp, "ttk::square", &SquareWidgetSpec);
return TCL_OK;
}
#endif /* TTK_SQUARE_WIDGET */
|
Changes to generic/ttk/ttkStubLib.c.
︙ | | |
63
64
65
66
67
68
69
70
71
72
73
74
|
63
64
65
66
67
68
69
70
71
72
73
74
|
-
+
|
error:
Tcl_ResetResult(interp);
Tcl_AppendResult(interp,
"Error loading ", packageName, " package",
" (requested version '", version,
"', loaded version '", actualVersion, "'): ",
errMsg,
errMsg,
NULL);
return NULL;
}
|
Changes to generic/ttk/ttkTagSet.c.
︙ | | |
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
-
+
|
{
int i;
for (i = 0; i < tagset->nTags; ++i) {
if (tagset->tags[i] == tag) {
return 0;
}
}
tagset->tags = ckrealloc(tagset->tags,
tagset->tags = ckrealloc(tagset->tags,
(tagset->nTags+1)*sizeof(tagset->tags[0]));
tagset->tags[tagset->nTags++] = tag;
return 1;
}
/* Ttk_TagSetRemove -- remove a tag from a tag set.
*
|
︙ | | |
Changes to generic/ttk/ttkTrace.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
/*
* Copyright 2003, Joe English
*
* Simplified interface to Tcl_TraceVariable.
*
* PROBLEM: Can't distinguish "variable does not exist" (which is OK)
* PROBLEM: Can't distinguish "variable does not exist" (which is OK)
* from other errors (which are not).
*/
#include <tk.h>
#include "ttkTheme.h"
#include "ttkWidget.h"
|
︙ | | |
Changes to generic/ttk/ttkWidget.h.
︙ | | |
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
-
-
+
+
|
#define RegisterWidget(interp, name, specPtr) \
Tcl_CreateObjCommand(interp, name, \
TtkWidgetConstructorObjCmd, (ClientData)specPtr,NULL)
/* WIDGET_TAKEFOCUS_TRUE --
* WIDGET_TAKEFOCUS_FALSE --
* Add one or the other of these to each OptionSpecs table
* to indicate whether the widget should take focus
* Add one or the other of these to each OptionSpecs table
* to indicate whether the widget should take focus
* during keyboard traversal.
*/
#define WIDGET_TAKEFOCUS_TRUE \
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", \
"ttk::takefocus", Tk_Offset(WidgetCore, takeFocusPtr), -1, 0,0,0 }
#define WIDGET_TAKEFOCUS_FALSE \
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", \
|
︙ | | |
Changes to library/images/logo.eps.
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
-
+
|
%AI5_NumLayers: 1
%AI5_OpenToView: 90 576 2 938 673 18 1 1 2 40
%AI5_OpenViewLayers: 7
%%EndComments
%%BeginProlog
%%BeginResource: procset Adobe_level2_AI5 1.0 0
%%Title: (Adobe Illustrator (R) Version 5.0 Level 2 Emulation)
%%Version: 1.0
%%Version: 1.0
%%CreationDate: (04/10/93) ()
%%Copyright: ((C) 1987-1993 Adobe Systems Incorporated All Rights Reserved)
userdict /Adobe_level2_AI5 21 dict dup begin
put
/packedarray where not
{
userdict begin
|
︙ | | |
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
-
+
|
4 index mul 4 1 roll
} repeat
5 -1 roll pop
setcmykcolor
}
def
} if
/gt38? mark {version cvx exec} stopped {cleartomark true} {38 gt exch pop} ifelse def
userdict /deviceDPI 72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt put
userdict /level2?
systemdict /languagelevel known dup
{
pop systemdict /languagelevel get 2 ge
} if
|
︙ | | |
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
-
+
|
/customColor? isCMYKSep? not def
end
} if
end defaultpacking setpacking
%%EndResource
%%BeginResource: procset Adobe_IllustratorA_AI5 1.1 0
%%Title: (Adobe Illustrator (R) Version 5.0 Abbreviated Prolog)
%%Version: 1.1
%%Version: 1.1
%%CreationDate: (3/7/1994) ()
%%Copyright: ((C) 1987-1994 Adobe Systems Incorporated All Rights Reserved)
currentpacking true setpacking
userdict /Adobe_IllustratorA_AI5_vars 70 dict dup begin
put
/_lp /none def
/_pf
|
︙ | | |
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
|
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
|
-
+
|
{
0 eq
{
(%AI5_BeginLayer) 1 (%AI5_EndLayer--) discard
}
{
/clipForward? true def
/Tx /pop load def
/Tj /pop load def
currentdict end clipRenderOff begin begin
} ifelse
}
{
0 eq
|
︙ | | |
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
|
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
|
-
+
|
pop
clipForward?
{
currentdict
end
end
begin
/clipForward? false ddef
} if
} ifelse
} bind def
/Pb
{
pop pop
|
︙ | | |
Changes to library/images/pwrdLogo.eps.
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
-
+
|
%AI5_NumLayers: 1
%AI5_OpenToView: 102 564 2 938 673 18 1 1 2 40
%AI5_OpenViewLayers: 7
%%EndComments
%%BeginProlog
%%BeginResource: procset Adobe_level2_AI5 1.0 0
%%Title: (Adobe Illustrator (R) Version 5.0 Level 2 Emulation)
%%Version: 1.0
%%Version: 1.0
%%CreationDate: (04/10/93) ()
%%Copyright: ((C) 1987-1993 Adobe Systems Incorporated All Rights Reserved)
userdict /Adobe_level2_AI5 21 dict dup begin
put
/packedarray where not
{
userdict begin
|
︙ | | |
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
-
+
|
4 index mul 4 1 roll
} repeat
5 -1 roll pop
setcmykcolor
}
def
} if
/gt38? mark {version cvx exec} stopped {cleartomark true} {38 gt exch pop} ifelse def
userdict /deviceDPI 72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt put
userdict /level2?
systemdict /languagelevel known dup
{
pop systemdict /languagelevel get 2 ge
} if
|
︙ | | |
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
-
+
|
/customColor? isCMYKSep? not def
end
} if
end defaultpacking setpacking
%%EndResource
%%BeginResource: procset Adobe_IllustratorA_AI5 1.1 0
%%Title: (Adobe Illustrator (R) Version 5.0 Abbreviated Prolog)
%%Version: 1.1
%%Version: 1.1
%%CreationDate: (3/7/1994) ()
%%Copyright: ((C) 1987-1994 Adobe Systems Incorporated All Rights Reserved)
currentpacking true setpacking
userdict /Adobe_IllustratorA_AI5_vars 70 dict dup begin
put
/_lp /none def
/_pf
|
︙ | | |
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
|
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
|
-
+
|
{
0 eq
{
(%AI5_BeginLayer) 1 (%AI5_EndLayer--) discard
}
{
/clipForward? true def
/Tx /pop load def
/Tj /pop load def
currentdict end clipRenderOff begin begin
} ifelse
}
{
0 eq
|
︙ | | |
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
|
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
|
-
+
|
pop
clipForward?
{
currentdict
end
end
begin
/clipForward? false ddef
} if
} ifelse
} bind def
/Pb
{
pop pop
|
︙ | | |
Changes to library/text.tcl.
︙ | | |
1198
1199
1200
1201
1202
1203
1204
|
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
if {($x != $Priv(x)) || ($y != $Priv(y))} {
set Priv(mouseMoved) 1
}
if {[info exists Priv(mouseMoved)] && $Priv(mouseMoved)} {
$w scan dragto $x $y
}
}
# ::tk::TextUndoRedoProcessMarks --
#
# This proc is executed after an undo or redo action.
# It processes the list of undo/redo marks temporarily set in the
# text widget to positions delimiting where changes happened, and
# returns a flat list of ranges. The temporary marks are removed
# from the text widget.
#
# Arguments:
# w - The text widget
proc ::tk::TextUndoRedoProcessMarks {w} {
set indices {}
set undoMarks {}
# only consider the temporary marks set by an undo/redo action
foreach mark [$w mark names] {
if {[string range $mark 0 11] eq "tk::undoMark"} {
lappend undoMarks $mark
}
}
# transform marks into indices
# the number of undo/redo marks is always even, each right mark
# completes a left mark to give a range
# this is true because:
# - undo/redo only deals with insertions and deletions of text
# - insertions may move marks but not delete them
# - when deleting text, marks located inside the deleted range
# are not erased but moved to the start of the deletion range
# . this is done in TkBTreeDeleteIndexRange ("This segment
# refuses to die...")
# . because MarkDeleteProc does nothing else than returning
# a value indicating that marks are not deleted by this
# deleteProc
# . mark deletion rather happen through [.text mark unset xxx]
# which was not used _up to this point of the code_ (it
# is a bit later just before exiting the present proc)
set nUndoMarks [llength $undoMarks]
set n [expr {$nUndoMarks / 2}]
set undoMarks [lsort -dictionary $undoMarks]
set Lmarks [lrange $undoMarks 0 [expr {$n - 1}]]
set Rmarks [lrange $undoMarks $n [llength $undoMarks]]
foreach Lmark $Lmarks Rmark $Rmarks {
lappend indices [$w index $Lmark] [$w index $Rmark]
$w mark unset $Lmark $Rmark
}
# process ranges to:
# - remove those already fully included in another range
# - merge overlapping ranges
set ind [lsort -dictionary -stride 2 $indices]
set indices {}
for {set i 0} {$i < $nUndoMarks} {incr i 2} {
set il1 [lindex $ind $i]
set ir1 [lindex $ind [expr {$i + 1}]]
lappend indices $il1 $ir1
for {set j [expr {$i + 2}]} {$j < $nUndoMarks} {incr j 2} {
set il2 [lindex $ind $j]
set ir2 [lindex $ind [expr {$j + 1}]]
if {[$w compare $il2 > $ir1]} {
# second range starts after the end of first range
# -> further second ranges do not need to be considered
# because ranges were sorted by increasing first index
set j $nUndoMarks
} else {
if {[$w compare $ir2 > $ir1]} {
# second range overlaps first range
# -> merge them into a single range
set indices [lreplace $indices end-1 end]
lappend indices $il1 $ir2
} else {
# second range is fully included in first range
# -> ignore it
}
# in both cases above, the second range shall be
# trimmed out from the list of ranges
set ind [lreplace $ind $j [expr {$j + 1}]]
incr j -2
incr nUndoMarks -2
}
}
}
return $indices
}
|
Changes to library/tk.tcl.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
-
+
|
# tk.tcl --
#
# Initialization script normally executed in the interpreter for each Tk-based
# application. Arranges class bindings for widgets.
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
# Verify that we have Tk binary and script components from the same release
package require -exact Tk 8.6.6
package require -exact Tk 8.7a0
# Create a ::tk namespace
namespace eval ::tk {
# Set up the msgcat commands
namespace eval msgcat {
namespace export mc mcmax
if {[interp issafe] || [catch {package require msgcat}]} {
|
︙ | | |
Changes to library/ttk/button.tcl.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
-
+
|
#
# Bindings for Buttons, Checkbuttons, and Radiobuttons.
#
# Notes: <Button1-Leave>, <Button1-Enter> only control the "pressed"
# state; widgets remain "active" if the pointer is dragged out.
# This doesn't seem to be conventional, but it's a nice way
# to provide extra feedback while the grab is active.
# (If the button is released off the widget, the grab deactivates and
# we get a <Leave> event then, which turns off the "active" state)
#
# Normally, <ButtonRelease> and <ButtonN-Enter/Leave> events are
# Normally, <ButtonRelease> and <ButtonN-Enter/Leave> events are
# delivered to the widget which received the initial <ButtonPress>
# event. However, Tk [grab]s (#1223103) and menu interactions
# (#1222605) can interfere with this. To guard against spurious
# <Button1-Enter> events, the <Button1-Enter> binding only sets
# the pressed state if the button is currently active.
#
|
︙ | | |
Changes to library/ttk/clamTheme.tcl.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
-
+
|
#
# "Clam" theme.
#
# Inspired by the XFCE family of Gnome themes.
#
namespace eval ttk::theme::clam {
variable colors
variable colors
array set colors {
-disabledfg "#999999"
-frame "#dcdad5"
-window "#ffffff"
-dark "#cfcdc8"
-darker "#bab5ab"
-darkest "#9e9a91"
|
︙ | | |
Changes to library/ttk/defaults.tcl.
︙ | | |
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
|
[list disabled $colors(-frame) active $colors(-activebg)]
ttk::style map "." -foreground \
[list disabled $colors(-disabledfg)]
ttk::style configure TButton \
-anchor center -padding "3 3" -width -9 \
-relief raised -shiftrelief 1
ttk::style map TButton -relief [list {!disabled pressed} sunken]
ttk::style map TButton -relief [list {!disabled pressed} sunken]
ttk::style configure TCheckbutton \
-indicatorcolor "#ffffff" -indicatorrelief sunken -padding 1
ttk::style map TCheckbutton -indicatorcolor \
[list pressed $colors(-activebg) selected $colors(-indicator)]
ttk::style configure TRadiobutton \
|
︙ | | |
Changes to library/ttk/entry.tcl.
︙ | | |
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
|
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
|
-
+
-
+
|
}
}
## <B1-Enter> binding
# Suspend autoscroll.
#
proc ttk::entry::DragIn {w} {
ttk::CancelRepeat
ttk::CancelRepeat
}
## <ButtonRelease-1> binding
#
proc ttk::entry::Release {w} {
variable State
set State(selectMode) none
ttk::CancelRepeat ;# suspend autoscroll
}
## AutoScroll
# Called repeatedly when the mouse is outside an entry window
# with Button 1 down. Scroll the window left or right,
# depending on where the mouse left the window, and extend
# depending on where the mouse left the window, and extend
# the selection according to the current selection mode.
#
# TODO: AutoScroll should repeat faster (50ms) than normal autorepeat.
# TODO: Need a way for Repeat scripts to cancel themselves.
#
proc ttk::entry::AutoScroll {w} {
variable State
|
︙ | | |
Changes to library/ttk/menubutton.tcl.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
-
+
-
+
-
+
-
+
|
#
# Bindings for Menubuttons.
#
# Menubuttons have three interaction modes:
#
# Pulldown: Press menubutton, drag over menu, release to activate menu entry
# Popdown: Click menubutton to post menu
# Keyboard: <Key-space> or accelerator key to post menu
#
# (In addition, when menu system is active, "dropdown" -- menu posts
# on mouse-over. Ttk menubuttons don't implement this).
#
# For keyboard and popdown mode, we hand off to tk_popup and let
# For keyboard and popdown mode, we hand off to tk_popup and let
# the built-in Tk bindings handle the rest of the interaction.
#
# ON X11:
#
# Standard Tk menubuttons use a global grab on the menubutton.
# This won't work for Ttk menubuttons in pulldown mode,
# since we need to process the final <ButtonRelease> event,
# and this might be delivered to the menu. So instead we
# rely on the passive grab that occurs on <ButtonPress> events,
# and transition to popdown mode when the mouse is released
# or dragged outside the menubutton.
#
#
# ON WINDOWS:
#
# I'm not sure what the hell is going on here. [$menu post] apparently
# I'm not sure what the hell is going on here. [$menu post] apparently
# sets up some kind of internal grab for native menus.
# On this platform, just use [tk_popup] for all menu actions.
#
#
# ON MACOS:
#
# Same probably applies here.
#
namespace eval ttk {
namespace eval menubutton {
|
︙ | | |
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
-
+
|
bind TMenubutton <ButtonPress-1> \
{ %W state pressed ; ttk::menubutton::Popdown %W }
bind TMenubutton <ButtonRelease-1> \
{ if {[winfo exists %W]} { %W state !pressed } }
}
# PostPosition --
# Returns the x and y coordinates where the menu
# Returns the x and y coordinates where the menu
# should be posted, based on the menubutton and menu size
# and -direction option.
#
# TODO: adjust menu width to be at least as wide as the button
# for -direction above, below.
#
proc ttk::menubutton::PostPosition {mb menu} {
|
︙ | | |
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
-
+
|
set sh [expr {[winfo screenheight $menu] - $bh - $mh}]
switch -- $dir {
above { if {$y >= $mh} { incr y -$mh } { incr y $bh } }
below { if {$y <= $sh} { incr y $bh } { incr y -$mh } }
left { if {$x >= $mw} { incr x -$mw } { incr x $bw } }
right { if {$x <= $sw} { incr x $bw } { incr x -$mw } }
flush {
flush {
# post menu atop menubutton.
# If there's a menu entry whose label matches the
# menubutton -text, assume this is an optionmenu
# and place that entry over the menubutton.
set index [FindMenuEntry $menu [$mb cget -text]]
if {$index ne ""} {
incr y -[$menu yposition $index]
|
︙ | | |
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
-
+
|
}
foreach {x y} [PostPosition $mb $menu] { break }
tk_popup $menu $x $y
}
# Pulldown (X11 only) --
# Called when Button1 is pressed on a menubutton.
# Posts the menu; a subsequent ButtonRelease
# Posts the menu; a subsequent ButtonRelease
# or Leave event will set a grab on the menu.
#
proc ttk::menubutton::Pulldown {mb} {
variable State
if {[$mb instate disabled] || [set menu [$mb cget -menu]] eq ""} {
return
}
|
︙ | | |
Changes to library/ttk/notebook.tcl.
︙ | | |
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
-
+
|
if {$select != $current} {
ActivateTab $w $select
}
}
}
# MnemonicTab $nb $key --
# Scan all tabs in the specified notebook for one with the
# Scan all tabs in the specified notebook for one with the
# specified mnemonic. If found, returns path name of tab;
# otherwise returns ""
#
proc ttk::notebook::MnemonicTab {nb key} {
set key [string toupper $key]
foreach tab [$nb tabs] {
set label [$nb tab $tab -text]
|
︙ | | |
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
-
-
+
+
|
# +++ Toplevel keyboard traversal.
#
# enableTraversal --
# Enable keyboard traversal for a notebook widget
# by adding bindings to the containing toplevel window.
#
# TLNotebooks($top) keeps track of the list of all traversal-enabled
# notebooks contained in the toplevel
# TLNotebooks($top) keeps track of the list of all traversal-enabled
# notebooks contained in the toplevel
#
proc ttk::notebook::enableTraversal {nb} {
variable TLNotebooks
set top [winfo toplevel $nb]
if {![info exists TLNotebooks($top)]} {
|
︙ | | |
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
-
+
|
set top [winfo toplevel $nb]
if {[info exists TLNotebooks($top)]} {
set index [lsearch -exact $TLNotebooks($top) $nb]
set TLNotebooks($top) [lreplace $TLNotebooks($top) $index $index]
}
}
# EnclosingNotebook $w --
# EnclosingNotebook $w --
# Return the nearest traversal-enabled notebook widget
# that contains $w.
#
# BUGS: this only works properly for tabs that are direct children
# of the notebook widget. This routine should follow the
# geometry manager hierarchy, not window ancestry, but that
# information is not available in Tk.
|
︙ | | |
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
-
+
|
set w [winfo parent $w]
}
return ""
}
# TLCycleTab --
# toplevel binding procedure for Control-Tab / Control-Shift-Tab
# Select the next/previous tab in the nearest ancestor notebook.
# Select the next/previous tab in the nearest ancestor notebook.
#
proc ttk::notebook::TLCycleTab {w dir} {
set nb [EnclosingNotebook $w]
if {$nb ne ""} {
CycleTab $nb $dir
return -code break
}
|
︙ | | |
Changes to library/ttk/scrollbar.tcl.
︙ | | |
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
-
+
|
}
}
}
proc ttk::scrollbar::Drag {w x y} {
variable State
if {![info exists State(first)]} {
# Initial buttonpress was not on the thumb,
# Initial buttonpress was not on the thumb,
# or something screwy has happened. In either case, ignore:
return;
}
set xDelta [expr {$x - $State(xPress)}]
set yDelta [expr {$y - $State(yPress)}]
Moveto $w [expr {$State(first) + [$w delta $xDelta $yDelta]}]
}
|
︙ | | |
Changes to library/ttk/treeview.tcl.
︙ | | |
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
-
+
|
bind Treeview <KeyPress-space> { ttk::treeview::ToggleFocus %W }
bind Treeview <Shift-ButtonPress-1> \
{ ttk::treeview::Select %W %x %y extend }
bind Treeview <<ToggleSelection>> \
{ ttk::treeview::Select %W %x %y toggle }
ttk::copyBindings TtkScrollable Treeview
ttk::copyBindings TtkScrollable Treeview
### Binding procedures.
#
## Keynav -- Keyboard navigation
#
# @@@ TODO: verify/rewrite up and down code.
|
︙ | | |
Changes to library/ttk/ttk.tcl.
︙ | | |
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
-
+
|
### Load settings for built-in themes:
#
proc ttk::LoadThemes {} {
variable library
# "default" always present:
uplevel #0 [list source [file join $library defaults.tcl]]
uplevel #0 [list source [file join $library defaults.tcl]]
set builtinThemes [style theme names]
foreach {theme scripts} {
classic classicTheme.tcl
alt altTheme.tcl
clam clamTheme.tcl
winnative winTheme.tcl
|
︙ | | |
Changes to library/ttk/vistaTheme.tcl.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
+
|
#
# Settings for Microsoft Windows Vista and Server 2008
#
# The Vista theme can only be defined on Windows Vista and above. The theme
# is created in C due to the need to assign a theme-enabled function for
# is created in C due to the need to assign a theme-enabled function for
# detecting when themeing is disabled. On systems that cannot support the
# Vista theme, there will be no such theme created and we must not
# evaluate this script.
if {"vista" ni [ttk::style theme names]} {
return
}
|
︙ | | |
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
-
+
|
}
}
ttk::style map TSpinbox \
-selectbackground [list !focus SystemWindow] \
-selectforeground [list !focus SystemWindowText] \
;
# SCROLLBAR elements (Vista includes a state for 'hover')
ttk::style element create Vertical.Scrollbar.uparrow vsapi \
SCROLLBAR 1 {disabled 4 pressed 3 active 2 hover 17 {} 1} \
-syssize {SM_CXVSCROLL SM_CYVSCROLL}
ttk::style element create Vertical.Scrollbar.downarrow vsapi \
SCROLLBAR 1 {disabled 8 pressed 7 active 6 hover 18 {} 5} \
-syssize {SM_CXVSCROLL SM_CYVSCROLL}
|
︙ | | |
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
-
+
|
ttk::style element create Vertical.Progressbar.pbar vsapi \
PROGRESS 3 {{} 1} -padding 8
ttk::style layout Vertical.TProgressbar {
Vertical.Progressbar.trough -sticky nswe -children {
Vertical.Progressbar.pbar -side bottom -sticky we
}
}
# Scale
ttk::style element create Horizontal.Scale.slider vsapi \
TRACKBAR 3 {disabled 5 focus 4 pressed 3 active 2 {} 1} \
-width 6 -height 12
ttk::style layout Horizontal.TScale {
Scale.focus -expand 1 -sticky nswe -children {
Horizontal.Scale.trough -expand 1 -sticky nswe -children {
|
︙ | | |
211
212
213
214
215
216
217
218
219
220
221
222
223
224
|
211
212
213
214
215
216
217
218
219
220
221
222
223
224
|
-
+
-
+
|
Scale.focus -expand 1 -sticky nswe -children {
Vertical.Scale.trough -expand 1 -sticky nswe -children {
Vertical.Scale.track -sticky ns
Vertical.Scale.slider -side top -sticky {}
}
}
}
# Treeview
ttk::style configure Item -padding {4 0 0 0}
package provide ttk::theme::vista 1.0
}
}
|
Changes to macosx/GNUmakefile.
︙ | | |
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
-
+
|
#-------------------------------------------------------------------------------------------------------
# project specific settings
PROJECT := tk
PRODUCT_NAME := Tk
UNIX_DIR := ${CURDIR}/../unix
VERSION := $(shell awk -F= '/^TK_VERSION/ {print $$2; nextfile}' ${UNIX_DIR}/configure.in)
VERSION := $(shell awk -F= '/^TK_VERSION/ {print $$2; nextfile}' ${UNIX_DIR}/configure.ac)
TCL_VERSION := ${VERSION}
wish := wish
WISH = wish${VERSION}
BUILD_TARGET := all tktest
INSTALL_TARGET := install
|
︙ | | |
Changes to macosx/Tk-Common.xcconfig.
︙ | | |
39
40
41
42
43
44
45
46
|
39
40
41
42
43
44
45
46
|
-
+
|
TCL_CONFIGURE_ARGS = --enable-threads --enable-dtrace
TCL_FRAMEWORK_DIR = $(SYMROOT)/../tcl/$(CONFIGURATION)
TCL_LIBRARY = $(LIBDIR)/tcl$(VERSION)
TCL_PACKAGE_PATH = "$(LIBDIR)"
TCL_DEFS = HAVE_TCL_CONFIG_H
TK_LIBRARY = $(LIBDIR)/tk$(VERSION)
TK_DEFS = HAVE_TK_CONFIG_H TCL_NO_DEPRECATED
VERSION = 8.6
VERSION = 8.7
|
Changes to macosx/Tk.xcode/project.pbxproj.
︙ | | |
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
|
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
|
-
+
|
F966BC6608F27A3D005CB29B /* winMenu.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winMenu.test; sourceTree = "<group>"; };
F966BC6708F27A3D005CB29B /* winSend.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winSend.test; sourceTree = "<group>"; };
F966BC6808F27A3D005CB29B /* winWm.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winWm.test; sourceTree = "<group>"; };
F966BC6908F27A3D005CB29B /* wm.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = wm.test; sourceTree = "<group>"; };
F966BC6A08F27A3D005CB29B /* xmfbox.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = xmfbox.test; sourceTree = "<group>"; };
F966BC6C08F27A3D005CB29B /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F966BC6D08F27A3D005CB29B /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
F966BC6E08F27A3D005CB29B /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
F966BC6E08F27A3D005CB29B /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F966BC6F08F27A3D005CB29B /* install-sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "install-sh"; sourceTree = "<group>"; };
F966BC7008F27A3D005CB29B /* installManPage */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = installManPage; sourceTree = "<group>"; };
F966BC7108F27A3D005CB29B /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F966BC7208F27A3D005CB29B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
F966BC7308F27A3D005CB29B /* tcl.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tcl.m4; sourceTree = "<group>"; };
F966BC7408F27A3D005CB29B /* tk.spec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk.spec; sourceTree = "<group>"; };
F966BC7508F27A3D005CB29B /* tkAppInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkAppInit.c; sourceTree = "<group>"; };
|
︙ | | |
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
|
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
|
-
+
|
F966BC8E08F27A3D005CB29B /* tkUnixSelect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixSelect.c; sourceTree = "<group>"; };
F966BC8F08F27A3D005CB29B /* tkUnixSend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixSend.c; sourceTree = "<group>"; };
F966BC9008F27A3D005CB29B /* tkUnixWm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixWm.c; sourceTree = "<group>"; };
F966BC9108F27A3D005CB29B /* tkUnixXId.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixXId.c; sourceTree = "<group>"; };
F966BC9408F27A3D005CB29B /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F966BC9508F27A3D005CB29B /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F966BC9608F27A3E005CB29B /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
F966BC9708F27A3E005CB29B /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
F966BC9708F27A3E005CB29B /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F966BC9808F27A3E005CB29B /* makefile.bc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.bc; sourceTree = "<group>"; };
F966BC9908F27A3E005CB29B /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F966BC9A08F27A3E005CB29B /* makefile.vc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.vc; sourceTree = "<group>"; };
F966BC9B08F27A3E005CB29B /* mkd.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mkd.bat; sourceTree = "<group>"; };
F966BC9C08F27A3E005CB29B /* nmakehlp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nmakehlp.c; sourceTree = "<group>"; };
F966BCEE08F27A3E005CB29B /* tk.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk.rc; sourceTree = "<group>"; };
F966BCEF08F27A3E005CB29B /* tk_base.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk_base.rc; sourceTree = "<group>"; };
|
︙ | | |
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
|
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
|
-
+
|
F96D43CB08F272B7004A47F5 /* winFCmd.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winFCmd.test; sourceTree = "<group>"; };
F96D43CC08F272B7004A47F5 /* winFile.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winFile.test; sourceTree = "<group>"; };
F96D43CD08F272B7004A47F5 /* winNotify.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winNotify.test; sourceTree = "<group>"; };
F96D43CE08F272B7004A47F5 /* winPipe.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winPipe.test; sourceTree = "<group>"; };
F96D43CF08F272B7004A47F5 /* winTime.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winTime.test; sourceTree = "<group>"; };
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = checkLibraryDoc.tcl; sourceTree = "<group>"; };
F96D43D208F272B8004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
F96D43D308F272B8004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
F96D43D308F272B8004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D442208F272B8004A47F5 /* eolFix.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = eolFix.tcl; sourceTree = "<group>"; };
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fix_tommath_h.tcl; sourceTree = "<group>"; };
F96D442508F272B8004A47F5 /* genStubs.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = genStubs.tcl; sourceTree = "<group>"; };
F96D442708F272B8004A47F5 /* index.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = index.tcl; sourceTree = "<group>"; };
F96D442808F272B8004A47F5 /* installData.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = installData.tcl; sourceTree = "<group>"; };
F96D442908F272B8004A47F5 /* loadICU.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = loadICU.tcl; sourceTree = "<group>"; };
F96D442A08F272B8004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
|
︙ | | |
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
|
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
|
-
+
|
F96D443608F272B8004A47F5 /* tcl.wse.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.wse.in; sourceTree = "<group>"; };
F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "tcltk-man2html.tcl"; sourceTree = "<group>"; };
F96D443A08F272B9004A47F5 /* tclZIC.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclZIC.tcl; sourceTree = "<group>"; };
F96D443B08F272B9004A47F5 /* uniClass.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uniClass.tcl; sourceTree = "<group>"; };
F96D443C08F272B9004A47F5 /* uniParse.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uniParse.tcl; sourceTree = "<group>"; };
F96D444008F272B9004A47F5 /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F96D444108F272B9004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
F96D444208F272B9004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
F96D444208F272B9004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D444408F272B9004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D444508F272B9004A47F5 /* pkga.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkga.c; sourceTree = "<group>"; };
F96D444608F272B9004A47F5 /* pkgb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkgb.c; sourceTree = "<group>"; };
F96D444708F272B9004A47F5 /* pkgc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkgc.c; sourceTree = "<group>"; };
F96D444808F272B9004A47F5 /* pkgd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkgd.c; sourceTree = "<group>"; };
F96D444908F272B9004A47F5 /* pkge.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkge.c; sourceTree = "<group>"; };
F96D444B08F272B9004A47F5 /* pkgua.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkgua.c; sourceTree = "<group>"; };
|
︙ | | |
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
|
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
|
-
+
|
F96D446C08F272B9004A47F5 /* tclXtNotify.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclXtNotify.c; sourceTree = "<group>"; };
F96D446D08F272B9004A47F5 /* tclXtTest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclXtTest.c; sourceTree = "<group>"; };
F96D447008F272BA004A47F5 /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F96D447108F272BA004A47F5 /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F96D447208F272BA004A47F5 /* cat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cat.c; sourceTree = "<group>"; };
F96D447308F272BA004A47F5 /* coffbase.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = coffbase.txt; sourceTree = "<group>"; };
F96D447408F272BA004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
F96D447508F272BA004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
F96D447508F272BA004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D447608F272BA004A47F5 /* makefile.bc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.bc; sourceTree = "<group>"; };
F96D447708F272BA004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D447808F272BA004A47F5 /* makefile.vc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.vc; sourceTree = "<group>"; };
F96D447908F272BA004A47F5 /* nmakehlp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nmakehlp.c; sourceTree = "<group>"; };
F96D447A08F272BA004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
F96D447C08F272BA004A47F5 /* rules.vc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rules.vc; sourceTree = "<group>"; };
F96D447D08F272BA004A47F5 /* stub16.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stub16.c; sourceTree = "<group>"; };
|
︙ | | |
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
|
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
|
-
+
|
sourceTree = "<group>";
};
F966BC6B08F27A3D005CB29B /* unix */ = {
isa = PBXGroup;
children = (
F966BC6C08F27A3D005CB29B /* aclocal.m4 */,
F966BC6D08F27A3D005CB29B /* configure */,
F966BC6E08F27A3D005CB29B /* configure.in */,
F966BC6E08F27A3D005CB29B /* configure.ac */,
F966BC6F08F27A3D005CB29B /* install-sh */,
F966BC7008F27A3D005CB29B /* installManPage */,
F966BC7108F27A3D005CB29B /* Makefile.in */,
F966BC7208F27A3D005CB29B /* README */,
F966BC7308F27A3D005CB29B /* tcl.m4 */,
F974D57B0FBE7EC000BF728B /* tk.pc.in */,
F966BC7408F27A3D005CB29B /* tk.spec */,
|
︙ | | |
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
|
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
|
-
+
|
};
F966BC9208F27A3D005CB29B /* win */ = {
isa = PBXGroup;
children = (
F966BC9408F27A3D005CB29B /* aclocal.m4 */,
F966BC9508F27A3D005CB29B /* buildall.vc.bat */,
F966BC9608F27A3E005CB29B /* configure */,
F966BC9708F27A3E005CB29B /* configure.in */,
F966BC9708F27A3E005CB29B /* configure.ac */,
F966BC9808F27A3E005CB29B /* makefile.bc */,
F966BC9908F27A3E005CB29B /* Makefile.in */,
F966BC9A08F27A3E005CB29B /* makefile.vc */,
F966BC9B08F27A3E005CB29B /* mkd.bat */,
F966BC9C08F27A3E005CB29B /* nmakehlp.c */,
F966BC9D08F27A3E005CB29B /* rc */,
F966BCF308F27A3E005CB29B /* README */,
|
︙ | | |
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
|
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
|
-
+
|
sourceTree = "<group>";
};
F96D43D008F272B8004A47F5 /* tools */ = {
isa = PBXGroup;
children = (
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */,
F96D43D208F272B8004A47F5 /* configure */,
F96D43D308F272B8004A47F5 /* configure.in */,
F96D43D308F272B8004A47F5 /* configure.ac */,
F96D442208F272B8004A47F5 /* eolFix.tcl */,
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */,
F96D442508F272B8004A47F5 /* genStubs.tcl */,
F96D442708F272B8004A47F5 /* index.tcl */,
F96D442808F272B8004A47F5 /* installData.tcl */,
F96D442908F272B8004A47F5 /* loadICU.tcl */,
F96D442A08F272B8004A47F5 /* Makefile.in */,
|
︙ | | |
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
|
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
|
-
+
|
sourceTree = "<group>";
};
F96D443E08F272B9004A47F5 /* unix */ = {
isa = PBXGroup;
children = (
F96D444008F272B9004A47F5 /* aclocal.m4 */,
F96D444108F272B9004A47F5 /* configure */,
F96D444208F272B9004A47F5 /* configure.in */,
F96D444208F272B9004A47F5 /* configure.ac */,
F96D444308F272B9004A47F5 /* dltest */,
F96D444D08F272B9004A47F5 /* install-sh */,
F96D444E08F272B9004A47F5 /* installManPage */,
F96D444F08F272B9004A47F5 /* ldAix */,
F96D445008F272B9004A47F5 /* Makefile.in */,
F96D445208F272B9004A47F5 /* README */,
F96D445308F272B9004A47F5 /* tcl.m4 */,
|
︙ | | |
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
|
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
|
-
+
|
isa = PBXGroup;
children = (
F96D447008F272BA004A47F5 /* aclocal.m4 */,
F96D447108F272BA004A47F5 /* buildall.vc.bat */,
F96D447208F272BA004A47F5 /* cat.c */,
F96D447308F272BA004A47F5 /* coffbase.txt */,
F96D447408F272BA004A47F5 /* configure */,
F96D447508F272BA004A47F5 /* configure.in */,
F96D447508F272BA004A47F5 /* configure.ac */,
F96D447608F272BA004A47F5 /* makefile.bc */,
F96D447708F272BA004A47F5 /* Makefile.in */,
F96D447808F272BA004A47F5 /* makefile.vc */,
F96D447908F272BA004A47F5 /* nmakehlp.c */,
F96D447A08F272BA004A47F5 /* README */,
F96D447C08F272BA004A47F5 /* rules.vc */,
F96D447D08F272BA004A47F5 /* stub16.c */,
|
︙ | | |
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
|
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
F9A5C5F508F651A2008AE941 /* Configure Tcl */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(TCL_SRCROOT)/macosx/configure.ac",
"$(TCL_SRCROOT)/unix/configure.in",
"$(TCL_SRCROOT)/unix/configure.ac",
"$(TCL_SRCROOT)/unix/tcl.m4",
"$(TCL_SRCROOT)/unix/aclocal.m4",
"$(TCL_SRCROOT)/unix/tclConfig.sh.in",
"$(TCL_SRCROOT)/unix/Makefile.in",
"$(TCL_SRCROOT)/unix/dltest/Makefile.in",
);
name = "Configure Tcl";
outputPaths = (
"$(DERIVED_FILE_DIR)/tcl/tclConfig.sh",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9A5C5F608F651AB008AE941 /* Configure Tk */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(TK_SRCROOT)/macosx/configure.ac",
"$(TK_SRCROOT)/unix/configure.in",
"$(TK_SRCROOT)/unix/configure.ac",
"$(TK_SRCROOT)/unix/tcl.m4",
"$(TK_SRCROOT)/unix/aclocal.m4",
"$(TK_SRCROOT)/unix/tkConfig.sh.in",
);
name = "Configure Tk";
outputPaths = (
"$(DERIVED_FILE_DIR)/tk/tkConfig.sh",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-aqua --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-aqua --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9FD30B40CC1AD070073837D /* Configure Tcl */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(TCL_SRCROOT)/macosx/configure.ac",
"$(TCL_SRCROOT)/unix/configure.in",
"$(TCL_SRCROOT)/unix/configure.ac",
"$(TCL_SRCROOT)/unix/tcl.m4",
"$(TCL_SRCROOT)/unix/aclocal.m4",
"$(TCL_SRCROOT)/unix/tclConfig.sh.in",
"$(TCL_SRCROOT)/unix/Makefile.in",
"$(TCL_SRCROOT)/unix/dltest/Makefile.in",
);
name = "Configure Tcl";
outputPaths = (
"$(DERIVED_FILE_DIR)/tcl/tclConfig.sh",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9FD30B50CC1AD070073837D /* Configure Tk */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(TK_SRCROOT)/macosx/configure.ac",
"$(TK_SRCROOT)/unix/configure.in",
"$(TK_SRCROOT)/unix/configure.ac",
"$(TK_SRCROOT)/unix/tcl.m4",
"$(TK_SRCROOT)/unix/aclocal.m4",
"$(TK_SRCROOT)/unix/tkConfig.sh.in",
);
name = "Configure Tk";
outputPaths = (
"$(DERIVED_FILE_DIR)/tk/tkConfig.sh",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n PATH=\"${PATH}:/usr/X11R6/bin\" \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-xft --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi";
shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n PATH=\"${PATH}:/usr/X11R6/bin\" \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-xft --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8DD76FAB0486AB0100D96B5E /* Sources */ = {
isa = PBXSourcesBuildPhase;
|
︙ | | |
Changes to macosx/Tk.xcodeproj/project.pbxproj.
︙ | | |
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
|
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
|
-
+
|
F966BC6608F27A3D005CB29B /* winMenu.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winMenu.test; sourceTree = "<group>"; };
F966BC6708F27A3D005CB29B /* winSend.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winSend.test; sourceTree = "<group>"; };
F966BC6808F27A3D005CB29B /* winWm.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winWm.test; sourceTree = "<group>"; };
F966BC6908F27A3D005CB29B /* wm.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = wm.test; sourceTree = "<group>"; };
F966BC6A08F27A3D005CB29B /* xmfbox.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = xmfbox.test; sourceTree = "<group>"; };
F966BC6C08F27A3D005CB29B /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F966BC6D08F27A3D005CB29B /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
F966BC6E08F27A3D005CB29B /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
F966BC6E08F27A3D005CB29B /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F966BC6F08F27A3D005CB29B /* install-sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "install-sh"; sourceTree = "<group>"; };
F966BC7008F27A3D005CB29B /* installManPage */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = installManPage; sourceTree = "<group>"; };
F966BC7108F27A3D005CB29B /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F966BC7208F27A3D005CB29B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
F966BC7308F27A3D005CB29B /* tcl.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tcl.m4; sourceTree = "<group>"; };
F966BC7408F27A3D005CB29B /* tk.spec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk.spec; sourceTree = "<group>"; };
F966BC7508F27A3D005CB29B /* tkAppInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkAppInit.c; sourceTree = "<group>"; };
|
︙ | | |
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
|
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
|
-
+
|
F966BC8E08F27A3D005CB29B /* tkUnixSelect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixSelect.c; sourceTree = "<group>"; };
F966BC8F08F27A3D005CB29B /* tkUnixSend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixSend.c; sourceTree = "<group>"; };
F966BC9008F27A3D005CB29B /* tkUnixWm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixWm.c; sourceTree = "<group>"; };
F966BC9108F27A3D005CB29B /* tkUnixXId.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixXId.c; sourceTree = "<group>"; };
F966BC9408F27A3D005CB29B /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F966BC9508F27A3D005CB29B /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F966BC9608F27A3E005CB29B /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
F966BC9708F27A3E005CB29B /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
F966BC9708F27A3E005CB29B /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F966BC9808F27A3E005CB29B /* makefile.bc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.bc; sourceTree = "<group>"; };
F966BC9908F27A3E005CB29B /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F966BC9A08F27A3E005CB29B /* makefile.vc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.vc; sourceTree = "<group>"; };
F966BC9B08F27A3E005CB29B /* mkd.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mkd.bat; sourceTree = "<group>"; };
F966BC9C08F27A3E005CB29B /* nmakehlp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nmakehlp.c; sourceTree = "<group>"; };
F966BCEE08F27A3E005CB29B /* tk.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk.rc; sourceTree = "<group>"; };
F966BCEF08F27A3E005CB29B /* tk_base.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk_base.rc; sourceTree = "<group>"; };
|
︙ | | |
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
|
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
|
-
+
|
F96D43CB08F272B7004A47F5 /* winFCmd.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winFCmd.test; sourceTree = "<group>"; };
F96D43CC08F272B7004A47F5 /* winFile.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winFile.test; sourceTree = "<group>"; };
F96D43CD08F272B7004A47F5 /* winNotify.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winNotify.test; sourceTree = "<group>"; };
F96D43CE08F272B7004A47F5 /* winPipe.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winPipe.test; sourceTree = "<group>"; };
F96D43CF08F272B7004A47F5 /* winTime.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winTime.test; sourceTree = "<group>"; };
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = checkLibraryDoc.tcl; sourceTree = "<group>"; };
F96D43D208F272B8004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
F96D43D308F272B8004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
F96D43D308F272B8004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D442208F272B8004A47F5 /* eolFix.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = eolFix.tcl; sourceTree = "<group>"; };
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fix_tommath_h.tcl; sourceTree = "<group>"; };
F96D442508F272B8004A47F5 /* genStubs.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = genStubs.tcl; sourceTree = "<group>"; };
F96D442708F272B8004A47F5 /* index.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = index.tcl; sourceTree = "<group>"; };
F96D442808F272B8004A47F5 /* installData.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = installData.tcl; sourceTree = "<group>"; };
F96D442908F272B8004A47F5 /* loadICU.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = loadICU.tcl; sourceTree = "<group>"; };
F96D442A08F272B8004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
|
︙ | | |
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
|
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
|
-
+
|
F96D443608F272B8004A47F5 /* tcl.wse.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.wse.in; sourceTree = "<group>"; };
F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "tcltk-man2html.tcl"; sourceTree = "<group>"; };
F96D443A08F272B9004A47F5 /* tclZIC.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclZIC.tcl; sourceTree = "<group>"; };
F96D443B08F272B9004A47F5 /* uniClass.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uniClass.tcl; sourceTree = "<group>"; };
F96D443C08F272B9004A47F5 /* uniParse.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uniParse.tcl; sourceTree = "<group>"; };
F96D444008F272B9004A47F5 /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F96D444108F272B9004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
F96D444208F272B9004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
F96D444208F272B9004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D444408F272B9004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D444508F272B9004A47F5 /* pkga.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkga.c; sourceTree = "<group>"; };
F96D444608F272B9004A47F5 /* pkgb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkgb.c; sourceTree = "<group>"; };
F96D444708F272B9004A47F5 /* pkgc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkgc.c; sourceTree = "<group>"; };
F96D444808F272B9004A47F5 /* pkgd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkgd.c; sourceTree = "<group>"; };
F96D444908F272B9004A47F5 /* pkge.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkge.c; sourceTree = "<group>"; };
F96D444B08F272B9004A47F5 /* pkgua.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkgua.c; sourceTree = "<group>"; };
|
︙ | | |
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
|
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
|
-
+
|
F96D446C08F272B9004A47F5 /* tclXtNotify.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclXtNotify.c; sourceTree = "<group>"; };
F96D446D08F272B9004A47F5 /* tclXtTest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclXtTest.c; sourceTree = "<group>"; };
F96D447008F272BA004A47F5 /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F96D447108F272BA004A47F5 /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F96D447208F272BA004A47F5 /* cat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cat.c; sourceTree = "<group>"; };
F96D447308F272BA004A47F5 /* coffbase.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = coffbase.txt; sourceTree = "<group>"; };
F96D447408F272BA004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
F96D447508F272BA004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
F96D447508F272BA004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D447608F272BA004A47F5 /* makefile.bc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.bc; sourceTree = "<group>"; };
F96D447708F272BA004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D447808F272BA004A47F5 /* makefile.vc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.vc; sourceTree = "<group>"; };
F96D447908F272BA004A47F5 /* nmakehlp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nmakehlp.c; sourceTree = "<group>"; };
F96D447A08F272BA004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
F96D447C08F272BA004A47F5 /* rules.vc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rules.vc; sourceTree = "<group>"; };
F96D447D08F272BA004A47F5 /* stub16.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stub16.c; sourceTree = "<group>"; };
|
︙ | | |
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
|
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
|
-
+
|
sourceTree = "<group>";
};
F966BC6B08F27A3D005CB29B /* unix */ = {
isa = PBXGroup;
children = (
F966BC6C08F27A3D005CB29B /* aclocal.m4 */,
F966BC6D08F27A3D005CB29B /* configure */,
F966BC6E08F27A3D005CB29B /* configure.in */,
F966BC6E08F27A3D005CB29B /* configure.ac */,
F966BC6F08F27A3D005CB29B /* install-sh */,
F966BC7008F27A3D005CB29B /* installManPage */,
F966BC7108F27A3D005CB29B /* Makefile.in */,
F966BC7208F27A3D005CB29B /* README */,
F966BC7308F27A3D005CB29B /* tcl.m4 */,
F974D57B0FBE7EC000BF728B /* tk.pc.in */,
F966BC7408F27A3D005CB29B /* tk.spec */,
|
︙ | | |
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
|
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
|
-
+
|
};
F966BC9208F27A3D005CB29B /* win */ = {
isa = PBXGroup;
children = (
F966BC9408F27A3D005CB29B /* aclocal.m4 */,
F966BC9508F27A3D005CB29B /* buildall.vc.bat */,
F966BC9608F27A3E005CB29B /* configure */,
F966BC9708F27A3E005CB29B /* configure.in */,
F966BC9708F27A3E005CB29B /* configure.ac */,
F966BC9808F27A3E005CB29B /* makefile.bc */,
F966BC9908F27A3E005CB29B /* Makefile.in */,
F966BC9A08F27A3E005CB29B /* makefile.vc */,
F966BC9B08F27A3E005CB29B /* mkd.bat */,
F966BC9C08F27A3E005CB29B /* nmakehlp.c */,
F966BC9D08F27A3E005CB29B /* rc */,
F966BCF308F27A3E005CB29B /* README */,
|
︙ | | |
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
|
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
|
-
+
|
sourceTree = "<group>";
};
F96D43D008F272B8004A47F5 /* tools */ = {
isa = PBXGroup;
children = (
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */,
F96D43D208F272B8004A47F5 /* configure */,
F96D43D308F272B8004A47F5 /* configure.in */,
F96D43D308F272B8004A47F5 /* configure.ac */,
F96D442208F272B8004A47F5 /* eolFix.tcl */,
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */,
F96D442508F272B8004A47F5 /* genStubs.tcl */,
F96D442708F272B8004A47F5 /* index.tcl */,
F96D442808F272B8004A47F5 /* installData.tcl */,
F96D442908F272B8004A47F5 /* loadICU.tcl */,
F96D442A08F272B8004A47F5 /* Makefile.in */,
|
︙ | | |
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
|
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
|
-
+
|
sourceTree = "<group>";
};
F96D443E08F272B9004A47F5 /* unix */ = {
isa = PBXGroup;
children = (
F96D444008F272B9004A47F5 /* aclocal.m4 */,
F96D444108F272B9004A47F5 /* configure */,
F96D444208F272B9004A47F5 /* configure.in */,
F96D444208F272B9004A47F5 /* configure.ac */,
F96D444308F272B9004A47F5 /* dltest */,
F96D444D08F272B9004A47F5 /* install-sh */,
F96D444E08F272B9004A47F5 /* installManPage */,
F96D444F08F272B9004A47F5 /* ldAix */,
F96D445008F272B9004A47F5 /* Makefile.in */,
F96D445208F272B9004A47F5 /* README */,
F96D445308F272B9004A47F5 /* tcl.m4 */,
|
︙ | | |
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
|
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
|
-
+
|
isa = PBXGroup;
children = (
F96D447008F272BA004A47F5 /* aclocal.m4 */,
F96D447108F272BA004A47F5 /* buildall.vc.bat */,
F96D447208F272BA004A47F5 /* cat.c */,
F96D447308F272BA004A47F5 /* coffbase.txt */,
F96D447408F272BA004A47F5 /* configure */,
F96D447508F272BA004A47F5 /* configure.in */,
F96D447508F272BA004A47F5 /* configure.ac */,
F96D447608F272BA004A47F5 /* makefile.bc */,
F96D447708F272BA004A47F5 /* Makefile.in */,
F96D447808F272BA004A47F5 /* makefile.vc */,
F96D447908F272BA004A47F5 /* nmakehlp.c */,
F96D447A08F272BA004A47F5 /* README */,
F96D447C08F272BA004A47F5 /* rules.vc */,
F96D447D08F272BA004A47F5 /* stub16.c */,
|
︙ | | |
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
|
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
F9A5C5F508F651A2008AE941 /* Configure Tcl */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(TCL_SRCROOT)/macosx/configure.ac",
"$(TCL_SRCROOT)/unix/configure.in",
"$(TCL_SRCROOT)/unix/configure.ac",
"$(TCL_SRCROOT)/unix/tcl.m4",
"$(TCL_SRCROOT)/unix/aclocal.m4",
"$(TCL_SRCROOT)/unix/tclConfig.sh.in",
"$(TCL_SRCROOT)/unix/Makefile.in",
"$(TCL_SRCROOT)/unix/dltest/Makefile.in",
);
name = "Configure Tcl";
outputPaths = (
"$(DERIVED_FILE_DIR)/tcl/tclConfig.sh",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9A5C5F608F651AB008AE941 /* Configure Tk */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(TK_SRCROOT)/macosx/configure.ac",
"$(TK_SRCROOT)/unix/configure.in",
"$(TK_SRCROOT)/unix/configure.ac",
"$(TK_SRCROOT)/unix/tcl.m4",
"$(TK_SRCROOT)/unix/aclocal.m4",
"$(TK_SRCROOT)/unix/tkConfig.sh.in",
);
name = "Configure Tk";
outputPaths = (
"$(DERIVED_FILE_DIR)/tk/tkConfig.sh",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-aqua --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-aqua --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9FD30B40CC1AD070073837D /* Configure Tcl */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(TCL_SRCROOT)/macosx/configure.ac",
"$(TCL_SRCROOT)/unix/configure.in",
"$(TCL_SRCROOT)/unix/configure.ac",
"$(TCL_SRCROOT)/unix/tcl.m4",
"$(TCL_SRCROOT)/unix/aclocal.m4",
"$(TCL_SRCROOT)/unix/tclConfig.sh.in",
"$(TCL_SRCROOT)/unix/Makefile.in",
"$(TCL_SRCROOT)/unix/dltest/Makefile.in",
);
name = "Configure Tcl";
outputPaths = (
"$(DERIVED_FILE_DIR)/tcl/tclConfig.sh",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9FD30B50CC1AD070073837D /* Configure Tk */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(TK_SRCROOT)/macosx/configure.ac",
"$(TK_SRCROOT)/unix/configure.in",
"$(TK_SRCROOT)/unix/configure.ac",
"$(TK_SRCROOT)/unix/tcl.m4",
"$(TK_SRCROOT)/unix/aclocal.m4",
"$(TK_SRCROOT)/unix/tkConfig.sh.in",
);
name = "Configure Tk";
outputPaths = (
"$(DERIVED_FILE_DIR)/tk/tkConfig.sh",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n PATH=\"${PATH}:/usr/X11R6/bin\" \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-xft --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi";
shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n PATH=\"${PATH}:/usr/X11R6/bin\" \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-xft --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8DD76FAB0486AB0100D96B5E /* Sources */ = {
isa = PBXSourcesBuildPhase;
|
︙ | | |
Changes to macosx/configure.ac.
1
2
3
4
5
6
7
8
9
10
11
|
1
2
3
4
5
6
7
8
9
10
11
|
-
+
|
#! /bin/bash -norc
dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tk installation
dnl to configure the system for the local environment.
dnl Ensure that the config (auto)headers support is used, then just
dnl include the configure sources from ../unix:
m4_include(../unix/aclocal.m4)
m4_define(SC_USE_CONFIG_HEADERS)
m4_include(../unix/configure.in)
m4_include(../unix/configure.ac)
|
Changes to macosx/tkMacOSXEmbed.c.
︙ | | |
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
-
+
|
*
*----------------------------------------------------------------------
*/
int
TkpScanWindowId(
Tcl_Interp *interp,
CONST char * string,
const char * string,
Window *idPtr)
{
int code;
Tcl_Obj obj;
obj.refCount = 1;
obj.bytes = (char *) string; /* DANGER?! */
|
︙ | | |
Changes to macosx/tkMacOSXFont.c.
︙ | | |
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
|
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
|
-
+
-
+
|
*----------------------------------------------------------------------
*/
void
TkpGetFontAttrsForChar(
Tk_Window tkwin, /* Window on the font's display */
Tk_Font tkfont, /* Font to query */
Tcl_UniChar c, /* Character of interest */
int c, /* Character of interest */
TkFontAttributes* faPtr) /* Output: Font attributes */
{
MacFont *fontPtr = (MacFont *) tkfont;
NSFont *nsFont = fontPtr->nsFont;
*faPtr = fontPtr->font.fa;
if (nsFont && ![[nsFont coveredCharacterSet] characterIsMember:c]) {
UTF16Char ch = c;
UTF16Char ch = (UTF16Char) c;
nsFont = [nsFont bestMatchingFontForCharacters:&ch
length:1 attributes:nil actualCoveredLength:NULL];
if (nsFont) {
GetTkFontAttributesForNSFont(nsFont, faPtr);
}
}
|
︙ | | |
Changes to macosx/tkMacOSXSubwindows.c.
︙ | | |
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
|
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
|
-
+
|
* surprised (again) by what happens when you do arithmetic with
* unsigned ints.
*/
CGFloat X = (CGFloat)x;
CGFloat Y = (CGFloat)y;
CGFloat Width = (CGFloat)width;
CGFloat Height = (CGFloat)height;
CGFloat XOff = (CGFloat)macWin->winPtr->wmInfoPtr->xInParent;
CGFloat XOff = (CGFloat)macWin->winPtr->wmInfoPtr->xInParent;
CGFloat YOff = (CGFloat)macWin->winPtr->wmInfoPtr->yInParent;
NSRect r = NSMakeRect(X + XOff,
tkMacOSXZeroScreenHeight - Y - YOff - Height,
Width, Height);
[w setFrame:[w frameRectForContentRect:r] display:YES];
}
} else {
|
︙ | | |
Changes to macosx/tkMacOSXXStubs.c.
︙ | | |
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
|
677
678
679
680
681
682
683
684
685
686
687
688
689
690
|
-
-
-
-
-
-
-
-
|
* However, there is no real way to do this on a Mac. Let me know if there
* is!
*/
display->request++;
}
void
Tk_FreeXId(
Display *display,
XID xid)
{
/* no-op function needed for stubs implementation. */
}
int
XSync(
Display *display,
Bool flag)
{
TkMacOSXFlushWindows();
display->request++;
|
︙ | | |
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
|
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
|
-
+
|
MacDrawable *macDraw = (MacDrawable *) d;
NSWindow *win = TkMacOSXDrawableWindow(d);
/* This code assumes that backing scale factors are integers. Currently
* Retina displays use a scale factor of 2.0 and normal displays use 1.0.
* We do not support any other values here.
*/
int scalefactor = 1;
if (win && [win respondsToSelector:@selector(backingScaleFactor)]) {
if (win && [win respondsToSelector:@selector(backingScaleFactor)]) {
scalefactor = ([win backingScaleFactor] == 2.0) ? 2 : 1;
}
int scaled_height = height * scalefactor;
int scaled_width = width * scalefactor;
if (format == ZPixmap) {
if (width == 0 || height == 0) {
|
︙ | | |
Changes to tests/bell.test.
︙ | | |
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
-
+
|
tcltest::loadTestedCommands
test bell-1.1 {bell command} -body {
bell a
} -returnCodes {error} -result {bad option "a": must be -displayof or -nice}
test bell-1.2 {bell command} -body {
bell a b
bell a b
} -returnCodes {error} -result {bad option "a": must be -displayof or -nice}
test bell-1.3 {bell command} -body {
bell -displayof gorp
} -returnCodes {error} -result {bad window path name "gorp"}
test bell-1.4 {bell command} -body {
|
︙ | | |
Changes to tests/bind.test.
︙ | | |
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
-
+
-
+
|
bind .t.f <Enter> {+more text}
bind .t.f <Enter>
} -cleanup {
destroy .t.f
} -result {test script
more text}
test bind-1.8 {bind command} -body {
bind .t <gorp-> {test script}
bind .t <gorp-> {test script}
} -returnCodes error -result {bad event type or keysym "gorp"}
test bind-1.9 {bind command} -body {
catch {bind .t <gorp-> {test script}}
catch {bind .t <gorp-> {test script}}
bind .t
} -result {}
test bind-1.10 {bind command} -body {
bind .t <gorp->
} -returnCodes ok -result {}
test bind-1.11 {bind command} -body {
frame .t.f
|
︙ | | |
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
-
+
-
+
-
+
-
+
|
bindtags .t.f
} -cleanup {
destroy .t.f
} -result {a b c d}
test bind-2.9 {bindtags command} -body {
frame .t.f
bindtags .t.f {a b c}
bindtags .t.f "\{"
bindtags .t.f "\{"
} -cleanup {
destroy .t.f
} -returnCodes error -result {unmatched open brace in list}
} -returnCodes error -result {unmatched open brace in list}
test bind-2.10 {bindtags command} -body {
frame .t.f
bindtags .t.f {a b c}
catch {bindtags .t.f "\{"}
bindtags .t.f
} -cleanup {
destroy .t.f
} -result {.t.f Frame .t all}
test bind-2.11 {bindtags command} -body {
frame .t.f
bindtags .t.f {a b c}
bindtags .t.f "a .gorp b"
bindtags .t.f "a .gorp b"
} -cleanup {
destroy .t.f
} -returnCodes ok
} -returnCodes ok
test bind-2.12 {bindtags command} -body {
frame .t.f
bindtags .t.f {a b c}
catch {bindtags .t.f "a .gorp b"}
bindtags .t.f
} -cleanup {
destroy .t.f
|
︙ | | |
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
-
+
-
+
-
+
-
+
-
+
|
bind all <Enter> {lappend x "%W enter all"}
bind Test <Enter> {lappend x "%W enter frame"}
bind Toplevel <Enter> {lappend x "%W enter toplevel"}
bind xyz <Enter> {lappend x "%W enter xyz"}
bind {a b} <Enter> {lappend x "%W enter {a b}"}
bind .t <Enter> {lappend x "%W enter .t"}
bind .t.f <Enter> {lappend x "%W enter .t.f"}
event generate .t.f <Enter>
return $x
} -cleanup {
destroy .t.f
unsetBindings
} -result {{.t.f enter .t.f} {.t.f enter frame} {.t.f enter .t} {.t.f enter all}}
test bind-4.2 {TkBindEventProc procedure} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
update
set x {}
} -body {
bind all <Enter> {lappend x "%W enter all"}
bind Test <Enter> {lappend x "%W enter frame"}
bind Toplevel <Enter> {lappend x "%W enter toplevel"}
bind xyz <Enter> {lappend x "%W enter xyz"}
bind {a b} <Enter> {lappend x "%W enter {a b}"}
bind .t <Enter> {lappend x "%W enter .t"}
bind .t.f <Enter> {lappend x "%W enter .t.f"}
bindtags .t.f {.t.f {a b} xyz}
event generate .t.f <Enter>
event generate .t.f <Enter>
return $x
} -cleanup {
destroy .t.f
unsetBindings
} -result {{.t.f enter .t.f} {.t.f enter {a b}} {.t.f enter xyz}}
test bind-4.3 {TkBindEventProc procedure} -body {
set x {}
bind all <Enter> {lappend x "%W enter all"}
bind Test <Enter> {lappend x "%W enter frame"}
bind Toplevel <Enter> {lappend x "%W enter toplevel"}
bind xyz <Enter> {lappend x "%W enter xyz"}
bind {a b} <Enter> {lappend x "%W enter {a b}"}
bind .t <Enter> {lappend x "%W enter .t"}
event generate .t <Enter>
return $x
} -cleanup {
unsetBindings
} -result {{.t enter .t} {.t enter toplevel} {.t enter all}}
test bind-4.4 {TkBindEventProc procedure} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
frame .t.f3 -width 50 -height 50
pack .t.f3
update
set x {}
} -body {
bind all <Enter> {lappend x "%W enter all"}
bind Test <Enter> {lappend x "%W enter frame"}
bind Toplevel <Enter> {lappend x "%W enter toplevel"}
bind xyz <Enter> {lappend x "%W enter xyz"}
bind {a b} <Enter> {lappend x "%W enter {a b}"}
bind .t <Enter> {lappend x "%W enter .t"}
bindtags .t.f {.t.f .t.f2 .t.f3}
bind .t.f <Enter> {lappend x "%W enter .t.f"}
bind .t.f3 <Enter> {lappend x "%W enter .t.f3"}
event generate .t.f <Enter>
return $x
} -cleanup {
destroy .t.f .t.f3
|
︙ | | |
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
|
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
|
-
+
|
bind all <Enter> {lappend x "%W enter all"}
bind Test <Enter> {lappend x "%W enter frame"}
bind Toplevel <Enter> {lappend x "%W enter toplevel"}
bind xyz <Enter> {lappend x "%W enter xyz"}
bind {a b} <Enter> {lappend x "%W enter {a b}"}
bind .t <Enter> {lappend x "%W enter .t"}
bindtags .t.f {a b c d e f g h i j k l m n o p q r s t u v w x y z}
event generate .t.f <Enter>
} -cleanup {
destroy .t.f
unsetBindings
} -result {}
|
︙ | | |
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
|
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
|
-
+
-
+
-
+
|
.t.c bind foo a Test
.t.c bind foo a
} -cleanup {
destroy .t.c
} -result {Test}
test bind-11.1 {Tk_GetAllBindings procedure} -body {
frame .t.f
frame .t.f
foreach i "! a \\\{ ~ <Delete> <space> <<Paste>> <Tab> <Linefeed> <less> <Meta-a> <Acircumflex>" {
bind .t.f $i Test
}
lsort [bind .t.f]
} -cleanup {
destroy .t.f
} -result {! <<Paste>> <Key-Acircumflex> <Key-Delete> <Key-Linefeed> <Key-Tab> <Key-less> <Key-space> <Meta-Key-a> a \{ ~}
test bind-11.2 {Tk_GetAllBindings procedure} -body {
frame .t.f
frame .t.f
foreach i "<Double-1> <Triple-1> <Meta-Control-a> <Double-Alt-Enter> <1>" {
bind .t.f $i Test
}
lsort [bind .t.f]
} -cleanup {
destroy .t.f
} -result {<Button-1> <Control-Meta-Key-a> <Double-Alt-Enter> <Double-Button-1> <Triple-Button-1>}
test bind-11.3 {Tk_GetAllBindings procedure} -body {
frame .t.f
frame .t.f
foreach i "<Double-Triple-1> abcd a<Leave>b" {
bind .t.f $i Test
}
lsort [bind .t.f]
} -cleanup {
destroy .t.f
} -result {<Triple-Button-1> a<Leave>b abcd}
|
︙ | | |
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
|
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
|
-
+
|
set x {}
} -body {
bind Test <KeyPress> {lappend x "%W %K Test KeyPress"}
bind all <KeyPress> {lappend x "%W %K all KeyPress"}
bind Test : {lappend x "%W %K Test :"}
bind all _ {lappend x "%W %K all _"}
bind .t.f : {lappend x "%W %K .t.f :"}
event generate .t.f <Key-colon>
event generate .t.f <Key-plus>
event generate .t.f <Key-underscore>
return $x
} -cleanup {
destroy .t.f
bind all <KeyPress> {}
|
︙ | | |
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
|
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
|
-
+
|
focus -force .t.f
update
set x {}
} -body {
bind Test <KeyPress> {lappend x "%W %K Test press any"; break}
bind all <KeyPress> {continue; lappend x "%W %K all press any"}
bind .t.f : {lappend x "%W %K .t.f pressed colon"}
event generate .t.f <Key-colon>
return $x
} -cleanup {
destroy .t.f
bind all <KeyPress> {}
bind Test <KeyPress> {}
} -result {{.t.f colon .t.f pressed colon} {.t.f colon Test press any}}
|
︙ | | |
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
|
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
|
-
+
-
+
|
test bind-13.5 {Tk_BindEvent procedure} -body {
bind all <Destroy> {lappend x "%W destroyed"}
set x {}
frame .t.g -gorp foo
} -cleanup {
bind all <Destroy> {}
} -returnCodes error -result {unknown option "-gorp"}
} -returnCodes error -result {unknown option "-gorp"}
test bind-13.6 {Tk_BindEvent procedure} -body {
bind all <Destroy> {lappend x "%W destroyed"}
set x {}
catch {frame .t.g -gorp foo}
catch {frame .t.g -gorp foo}
return $x
} -cleanup {
bind all <Destroy> {}
} -result {{.t.g destroyed}}
test bind-13.7 {Tk_BindEvent procedure} -setup {
frame .t.f -class Test -width 150 -height 100
|
︙ | | |
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
|
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
|
-
+
-
+
-
-
-
-
+
+
+
+
|
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Motion> "lappend x Motion%#(%x,%y)"
event generate .t.f <Motion> -serial 100 -x 100 -y 200 -when tail
event generate .t.f <Motion> -serial 100 -x 100 -y 200 -when tail
update
event generate .t.f <Motion> -serial 101 -x 200 -y 300 -when tail
event generate .t.f <Motion> -serial 102 -x 300 -y 400 -when tail
event generate .t.f <Motion> -serial 102 -x 300 -y 400 -when tail
update
return $x
} -cleanup {
destroy .t.f
} -result {Motion100(100,200) Motion102(300,400)}
test bind-13.12 {Tk_BindEvent procedure: collapse repeating modifiers} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Key> "lappend x %K%#"
bind .t.f <KeyRelease> "lappend x %K%#"
event generate .t.f <Key-Shift_L> -serial 100 -when tail
event generate .t.f <KeyRelease-Shift_L> -serial 101 -when tail
event generate .t.f <Key-Shift_L> -serial 102 -when tail
event generate .t.f <KeyRelease-Shift_L> -serial 103 -when tail
event generate .t.f <Key-Shift_L> -serial 100 -when tail
event generate .t.f <KeyRelease-Shift_L> -serial 101 -when tail
event generate .t.f <Key-Shift_L> -serial 102 -when tail
event generate .t.f <KeyRelease-Shift_L> -serial 103 -when tail
update
} -cleanup {
destroy .t.f
} -result {}
test bind-13.13 {Tk_BindEvent procedure: valid key detail} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
|
︙ | | |
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
|
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
|
-
+
|
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Button-2> {set x Button-2}
event generate .t.f <Button-2>
event generate .t.f <Button-2>
return $x
} -cleanup {
destroy .t.f
} -result {Button-2}
test bind-13.28 {Tk_BindEvent procedure: detail virtual pattern list} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
|
︙ | | |
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
|
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
|
-
+
|
return $x
} -cleanup {
destroy .t.f
bind Test <Button-2> {}
} -result {b1}
test bind-13.45 {Tk_BindEvent procedure: error in script} -setup {
proc bgerror msg {
global x
global x
lappend x $msg
}
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
|
︙ | | |
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
|
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
|
-
+
|
bind .t.f <M1-M2-Key> {set x 1}
set x 0
event generate .t.f <Key-a> -state 0x8
return $x
} -cleanup {
destroy .t.f
} -result {0}
test bind-15.12 {MatchPatterns procedure, ignore modifier presses and releases} -constraints {
test bind-15.12 {MatchPatterns procedure, ignore modifier presses and releases} -constraints {
nonPortable
} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
|
︙ | | |
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
|
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
event generate .t.f <Button-2>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -x 30 -y 40
event generate .t.f <Button-1> -x 31 -y 39
event generate .t.f <ButtonRelease-1>
return $x
} -cleanup {
destroy .t.f
} -result {1}
test bind-15.15 {MatchPatterns procedure, checking "nearby"} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
event generate .t.f <Button-2>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -x 30 -y 40
event generate .t.f <Button-1> -x 29 -y 41
event generate .t.f <ButtonRelease-1>
return $x
} -cleanup {
destroy .t.f
} -result {1}
test bind-15.16 {MatchPatterns procedure, checking "nearby"} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
event generate .t.f <Button-2>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -x 30 -y 40
event generate .t.f <Button-1> -x 40 -y 40
event generate .t.f <ButtonRelease-2>
return $x
} -cleanup {
destroy .t.f
} -result {0}
test bind-15.17 {MatchPatterns procedure, checking "nearby"} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
event generate .t.f <Button-2>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -x 30 -y 40
event generate .t.f <Button-1> -x 20 -y 40
event generate .t.f <ButtonRelease-1>
return $x
} -cleanup {
destroy .t.f
} -result {0}
test bind-15.18 {MatchPatterns procedure, checking "nearby"} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
event generate .t.f <Button-2>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -x 30 -y 40
event generate .t.f <Button-1> -x 30 -y 30
event generate .t.f <ButtonRelease-1>
return $x
} -cleanup {
destroy .t.f
} -result {0}
test bind-15.19 {MatchPatterns procedure, checking "nearby"} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
event generate .t.f <Button-2>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -x 30 -y 40
event generate .t.f <Button-1> -x 30 -y 50
event generate .t.f <ButtonRelease-1>
return $x
} -cleanup {
destroy .t.f
} -result {0}
test bind-15.20 {MatchPatterns procedure, checking "nearby"} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
event generate .t.f <Button-2>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -time 300
event generate .t.f <Button-1> -time 700
event generate .t.f <ButtonRelease-1>
return $x
} -cleanup {
destroy .t.f
} -result {1}
test bind-15.21 {MatchPatterns procedure, checking "nearby"} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
event generate .t.f <Button-2>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -time 300
event generate .t.f <Button-1> -time 900
event generate .t.f <ButtonRelease-1>
return $x
} -cleanup {
destroy .t.f
|
︙ | | |
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
|
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
|
-
+
|
set x none
event generate .t.f <Enter> -x 781 -y 632
set x
} -cleanup {
destroy .t.f
} -result {781 632}
test bind-16.35 {ExpandPercents procedure} -constraints {
nonPortable
nonPortable
} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
|
︙ | | |
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
|
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
|
-
+
|
event delete <<Paste>> <Control-v> <Button-2>
} -result {<Button-2> <Control-Key-v>}
test bind-17.6 {event command: add with error} -body {
event add <<Paste>> <Control-v> <Button-2> abc <xyz> <1>
} -cleanup {
event delete <<Paste>>
} -returnCodes error -result {bad event type or keysym "xyz"}
} -returnCodes error -result {bad event type or keysym "xyz"}
test bind-17.7 {event command: add with error} -body {
event delete <<Paste>>
catch {event add <<Paste>> <Control-v> <Button-2> abc <xyz> <1>}
lsort [event info <<Paste>>]
} -cleanup {
event delete <<Paste>>
} -result {<Button-2> <Control-Key-v> abc}
|
︙ | | |
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
|
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
|
-
+
-
+
|
test bind-18.1 {CreateVirtualEvent procedure: GetVirtualEventUid} -body {
event add asd <Ctrl-v>
} -returnCodes error -result {virtual event "asd" is badly formed}
test bind-18.2 {CreateVirtualEvent procedure: FindSequence} -body {
event add <<asd>> <Ctrl-v>
} -returnCodes error -result {bad event type or keysym "Ctrl"}
test bind-18.3 {CreateVirtualEvent procedure: new physical} -body {
test bind-18.3 {CreateVirtualEvent procedure: new physical} -body {
event delete <<xyz>>
event add <<xyz>> <Control-v>
event info <<xyz>>
} -cleanup {
event delete <<xyz>>
} -result {<Control-Key-v>}
test bind-18.4 {CreateVirtualEvent procedure: duplicate physical} -body {
event delete <<xyz>>
event add <<xyz>> <Control-v>
event add <<xyz>> <Control-v>
event add <<xyz>> <Control-v>
event info <<xyz>>
} -cleanup {
event delete <<xyz>>
} -result {<Control-Key-v>}
test bind-18.5 {CreateVirtualEvent procedure: existing physical} -body {
foreach p [event info] {event delete $p}
|
︙ | | |
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
|
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
|
-
+
-
+
|
} -cleanup {
event delete <<xyz>>
} -returnCodes error -result {virtual event not allowed in definition of another virtual event}
test bind-19.7 {DeleteVirtualEvent procedure: owns 1, delete all} -body {
foreach p [event info] {event delete $p}
event add <<xyz>> <Control-v>
event delete <<xyz>>
event info
event info
} -result {}
test bind-19.8 {DeleteVirtualEvent procedure: owns 1, delete 1} -body {
foreach p [event info] {event delete $p}
event add <<xyz>> <Control-v>
event delete <<xyz>> <Control-v>
event info
event info
} -result {}
test bind-19.9 {DeleteVirtualEvent procedure: owns many, delete all} -body {
foreach p [event info] {event delete $p}
event add <<xyz>> <Control-v> <Control-w> <Control-x>
event delete <<xyz>>
event info
} -result {}
|
︙ | | |
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
|
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
|
-
+
|
event add <<xyz>> <Button-2>
bind .t.f <<xyz>> {lappend x xyz}
bind .t.f <<abc>> {lappend x abc}
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Control-Button-2>
event generate .t.f <Control-ButtonRelease-2>
event delete <<xyz>>
event delete <<xyz>>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Control-Button-2>
event generate .t.f <Control-ButtonRelease-2>
list $x [event info <<abc>>]
} -cleanup {
destroy .t.f
|
︙ | | |
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
|
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
|
-
+
|
bind .t.f <<def>> {lappend x def}
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Control-Button-2>
event generate .t.f <Control-ButtonRelease-2>
event generate .t.f <Shift-Button-2>
event generate .t.f <Shift-ButtonRelease-2>
event delete <<xyz>>
event delete <<xyz>>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Control-Button-2>
event generate .t.f <Control-ButtonRelease-2>
event generate .t.f <Shift-Button-2>
event generate .t.f <Shift-ButtonRelease-2>
list $x [event info <<xyz>>] [event info <<abc>>] [event info <<def>>]
|
︙ | | |
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
|
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
|
-
+
|
bind .t.h <<def>> {lappend x def}
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.g <Button-2>
event generate .t.g <ButtonRelease-2>
event generate .t.h <Button-2>
event generate .t.h <ButtonRelease-2>
event delete <<xyz>>
event delete <<xyz>>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.g <Button-2>
event generate .t.g <ButtonRelease-2>
event generate .t.h <Button-2>
event generate .t.h <ButtonRelease-2>
list $x [event info <<xyz>>] [event info <<abc>>] [event info <<def>>]
|
︙ | | |
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
|
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
|
-
+
|
bind .t.h <<def>> {lappend x def}
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.g <Button-2>
event generate .t.g <ButtonRelease-2>
event generate .t.h <Button-2>
event generate .t.h <ButtonRelease-2>
event delete <<def>>
event delete <<def>>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.g <Button-2>
event generate .t.g <ButtonRelease-2>
event generate .t.h <Button-2>
event generate .t.h <ButtonRelease-2>
list $x [event info <<xyz>>] [event info <<abc>>] [event info <<def>>]
|
︙ | | |
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
|
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Map> "lappend x %o"
event generate .t.f <Map> -override xyz
event generate .t.f <Map> -override xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {expected boolean value but got "xyz"}
test bind-22.56 {HandleEventGenerate: options <Map> -override 1} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Map> "lappend x %o"
event generate .t.f <Map> -override 1
event generate .t.f <Map> -override 1
return $x
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.57 {HandleEventGenerate: options <Reparent> -override 1} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Reparent> "lappend x %o"
event generate .t.f <Reparent> -override 1
event generate .t.f <Reparent> -override 1
return $x
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.58 {HandleEventGenerate: options <Configure> -override 1} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Configure> "lappend x %o"
event generate .t.f <Configure> -override 1
event generate .t.f <Configure> -override 1
return $x
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.59 {HandleEventGenerate: options <Key> -override 1} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %k"
event generate .t.f <Key> -override 1
event generate .t.f <Key> -override 1
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Key> event doesn't accept "-override" option}
test bind-22.60 {HandleEventGenerate: options <Circulate> -place xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Circulate> "lappend x %p"
event generate .t.f <Circulate> -place xyz
event generate .t.f <Circulate> -place xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad -place value "xyz": must be PlaceOnTop, or PlaceOnBottom}
test bind-22.61 {HandleEventGenerate: options <Circulate> -place PlaceOnTop} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Circulate> "lappend x %p"
event generate .t.f <Circulate> -place PlaceOnTop
event generate .t.f <Circulate> -place PlaceOnTop
return $x
} -cleanup {
destroy .t.f
} -result {PlaceOnTop}
test bind-22.62 {HandleEventGenerate: options <Key> -place PlaceOnTop} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %k"
event generate .t.f <Key> -place PlaceOnTop
event generate .t.f <Key> -place PlaceOnTop
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Key> event doesn't accept "-place" option}
test bind-22.63 {HandleEventGenerate: options <Key> -root .xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %R"
event generate .t.f <Key> -root .xyz
event generate .t.f <Key> -root .xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad window path name ".xyz"}
test bind-22.64 {HandleEventGenerate: options <Key> -root .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %R"
event generate .t.f <Key> -root .t
event generate .t.f <Key> -root .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.65 {HandleEventGenerate: options <Key> -root xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %R"
event generate .t.f <Key> -root xyz
event generate .t.f <Key> -root xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad window name/identifier "xyz"}
test bind-22.66 {HandleEventGenerate: options <Key> -root [winfo id .t]} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %R"
event generate .t.f <Key> -root [winfo id .t]
event generate .t.f <Key> -root [winfo id .t]
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.67 {HandleEventGenerate: options <Button> -root .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Button> "lappend x %R"
event generate .t.f <Button> -root .t
event generate .t.f <Button> -root .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.68 {HandleEventGenerate: options <ButtonRelease> -root .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %R"
event generate .t.f <ButtonRelease> -root .t
event generate .t.f <ButtonRelease> -root .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.69 {HandleEventGenerate: options <Motion> -root .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Motion> "lappend x %R"
event generate .t.f <Motion> -root .t
event generate .t.f <Motion> -root .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.70 {HandleEventGenerate: options <<Paste>> -root .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %R"
event generate .t.f <<Paste>> -root .t
event generate .t.f <<Paste>> -root .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.71 {HandleEventGenerate: options <Enter> -root .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Enter> "lappend x %R"
event generate .t.f <Enter> -root .t
event generate .t.f <Enter> -root .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.72 {HandleEventGenerate: options <Configure> -root .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Configure> "lappend x %R"
event generate .t.f <Configure> -root .t
event generate .t.f <Configure> -root .t
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Configure> event doesn't accept "-root" option}
test bind-22.73 {HandleEventGenerate: options <Key> -rootx xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %X"
event generate .t.f <Key> -rootx xyz
event generate .t.f <Key> -rootx xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad screen distance "xyz"}
test bind-22.74 {HandleEventGenerate: options <Key> -rootx 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %X"
event generate .t.f <Key> -rootx 2i
event generate .t.f <Key> -rootx 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.75 {HandleEventGenerate: options <Button> -rootx 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Button> "lappend x %X"
event generate .t.f <Button> -rootx 2i
event generate .t.f <Button> -rootx 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.76 {HandleEventGenerate: options <ButtonRelease> -rootx 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %X"
event generate .t.f <ButtonRelease> -rootx 2i
event generate .t.f <ButtonRelease> -rootx 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.77 {HandleEventGenerate: options <Motion> -rootx 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Motion> "lappend x %X"
event generate .t.f <Motion> -rootx 2i
event generate .t.f <Motion> -rootx 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.78 {HandleEventGenerate: options <<Paste>> -rootx 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %X"
event generate .t.f <<Paste>> -rootx 2i
event generate .t.f <<Paste>> -rootx 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.79 {HandleEventGenerate: options <Enter> -rootx 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Enter> "lappend x %X"
event generate .t.f <Enter> -rootx 2i
event generate .t.f <Enter> -rootx 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.80 {HandleEventGenerate: options <Configure> -rootx 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Configure> "lappend x %X"
event generate .t.f <Configure> -rootx 2i
event generate .t.f <Configure> -rootx 2i
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Configure> event doesn't accept "-rootx" option}
test bind-22.81 {HandleEventGenerate: options <Key> -rooty xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %Y"
event generate .t.f <Key> -rooty xyz
event generate .t.f <Key> -rooty xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad screen distance "xyz"}
test bind-22.82 {HandleEventGenerate: options <Key> -rooty 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %Y"
event generate .t.f <Key> -rooty 2i
event generate .t.f <Key> -rooty 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.83 {HandleEventGenerate: options <Button> -rooty 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Button> "lappend x %Y"
event generate .t.f <Button> -rooty 2i
event generate .t.f <Button> -rooty 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.84 {HandleEventGenerate: options <ButtonRelease> -rooty 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %Y"
event generate .t.f <ButtonRelease> -rooty 2i
event generate .t.f <ButtonRelease> -rooty 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.85 {HandleEventGenerate: options <Motion> -rooty 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Motion> "lappend x %Y"
event generate .t.f <Motion> -rooty 2i
event generate .t.f <Motion> -rooty 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.86 {HandleEventGenerate: options <<Paste>> -rooty 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %Y"
event generate .t.f <<Paste>> -rooty 2i
event generate .t.f <<Paste>> -rooty 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.87 {HandleEventGenerate: options <Enter> -rooty 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Enter> "lappend x %Y"
event generate .t.f <Enter> -rooty 2i
event generate .t.f <Enter> -rooty 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.88 {HandleEventGenerate: options <Configure> -rooty 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Configure> "lappend x %Y"
event generate .t.f <Configure> -rooty 2i
event generate .t.f <Configure> -rooty 2i
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Configure> event doesn't accept "-rooty" option}
test bind-22.89 {HandleEventGenerate: options <Key> -sendevent xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %E"
event generate .t.f <Key> -sendevent xyz
event generate .t.f <Key> -sendevent xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {expected boolean value but got "xyz"}
test bind-22.90 {HandleEventGenerate: options <Key> -sendevent 1} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %E"
event generate .t.f <Key> -sendevent 1
event generate .t.f <Key> -sendevent 1
return $x
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.91 {HandleEventGenerate: options <Key> -sendevent yes} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %E"
event generate .t.f <Key> -sendevent yes
event generate .t.f <Key> -sendevent yes
return $x
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.92 {HandleEventGenerate: options <Key> -sendevent 43} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %E"
event generate .t.f <Key> -sendevent 43
event generate .t.f <Key> -sendevent 43
return $x
} -cleanup {
destroy .t.f
} -result {43}
test bind-22.93 {HandleEventGenerate: options <Key> -serial xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %#"
event generate .t.f <Key> -serial xyz
event generate .t.f <Key> -serial xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {expected integer but got "xyz"}
test bind-22.94 {HandleEventGenerate: options <Key> -serial 100} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %#"
event generate .t.f <Key> -serial 100
event generate .t.f <Key> -serial 100
return $x
} -cleanup {
destroy .t.f
} -result {100}
test bind-22.95 {HandleEventGenerate: options <Key> -state xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %s"
event generate .t.f <Key> -state xyz
event generate .t.f <Key> -state xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {expected integer but got "xyz"}
test bind-22.96 {HandleEventGenerate: options <Key> -state 1} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %s"
event generate .t.f <Key> -state 1
event generate .t.f <Key> -state 1
return $x
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.97 {HandleEventGenerate: options <Button> -state 1025} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Button> "lappend x %s"
event generate .t.f <Button> -state 1025
event generate .t.f <Button> -state 1025
return $x
} -cleanup {
destroy .t.f
} -result {1025}
test bind-22.98 {HandleEventGenerate: options <ButtonRelease> -state 1025} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %s"
event generate .t.f <ButtonRelease> -state 1025
event generate .t.f <ButtonRelease> -state 1025
return $x
} -cleanup {
destroy .t.f
} -result {1025}
test bind-22.99 {HandleEventGenerate: options <Motion> -state 1} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Motion> "lappend x %s"
event generate .t.f <Motion> -state 1
event generate .t.f <Motion> -state 1
return $x
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.100 {HandleEventGenerate: options <<Paste>> -state 1} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %s"
event generate .t.f <<Paste>> -state 1
event generate .t.f <<Paste>> -state 1
return $x
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.101 {HandleEventGenerate: options <Enter> -state 1} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Enter> "lappend x %s"
event generate .t.f <Enter> -state 1
event generate .t.f <Enter> -state 1
return $x
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.102 {HandleEventGenerate: options <Visibility> -state xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Visibility> "lappend x %s"
event generate .t.f <Visibility> -state xyz
event generate .t.f <Visibility> -state xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad -state value "xyz": must be VisibilityUnobscured, VisibilityPartiallyObscured, or VisibilityFullyObscured}
test bind-22.103 {HandleEventGenerate: options <Visibility> -state VisibilityUnobscured} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Visibility> "lappend x %s"
event generate .t.f <Visibility> -state VisibilityUnobscured
event generate .t.f <Visibility> -state VisibilityUnobscured
return $x
} -cleanup {
destroy .t.f
} -result {VisibilityUnobscured}
test bind-22.104 {HandleEventGenerate: options <Configure> -state xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Configure> "lappend x %s"
event generate .t.f <Configure> -state xyz
event generate .t.f <Configure> -state xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Configure> event doesn't accept "-state" option}
test bind-22.105 {HandleEventGenerate: options <Key> -subwindow .xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %S"
event generate .t.f <Key> -subwindow .xyz
event generate .t.f <Key> -subwindow .xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad window path name ".xyz"}
test bind-22.106 {HandleEventGenerate: options <Key> -subwindow .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %S"
event generate .t.f <Key> -subwindow .t
event generate .t.f <Key> -subwindow .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.107 {HandleEventGenerate: options <Key> -subwindow xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %S"
event generate .t.f <Key> -subwindow xyz
event generate .t.f <Key> -subwindow xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad window name/identifier "xyz"}
test bind-22.108 {HandleEventGenerate: options <Key> -subwindow [winfo id .t]} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %S"
event generate .t.f <Key> -subwindow [winfo id .t]
event generate .t.f <Key> -subwindow [winfo id .t]
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.109 {HandleEventGenerate: options <Button> -subwindow .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Button> "lappend x %S"
event generate .t.f <Button> -subwindow .t
event generate .t.f <Button> -subwindow .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.110 {HandleEventGenerate: options <ButtonRelease> -subwindow .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %S"
event generate .t.f <ButtonRelease> -subwindow .t
event generate .t.f <ButtonRelease> -subwindow .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.111 {HandleEventGenerate: options <Motion> -subwindow .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Motion> "lappend x %S"
event generate .t.f <Motion> -subwindow .t
event generate .t.f <Motion> -subwindow .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.112 {HandleEventGenerate: options <<Paste>> -subwindow .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %S"
event generate .t.f <<Paste>> -subwindow .t
event generate .t.f <<Paste>> -subwindow .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.113 {HandleEventGenerate: options <Enter> -subwindow .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Enter> "lappend x %S"
event generate .t.f <Enter> -subwindow .t
event generate .t.f <Enter> -subwindow .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.114 {HandleEventGenerate: options <Configure> -subwindow .t} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Configure> "lappend x %S"
event generate .t.f <Configure> -subwindow .t
event generate .t.f <Configure> -subwindow .t
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Configure> event doesn't accept "-subwindow" option}
test bind-22.115 {HandleEventGenerate: options <Key> -time xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %t"
event generate .t.f <Key> -time xyz
event generate .t.f <Key> -time xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {expected integer but got "xyz"}
test bind-22.116 {HandleEventGenerate: options <Key> -time 100} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %t"
event generate .t.f <Key> -time 100
event generate .t.f <Key> -time 100
return $x
} -cleanup {
destroy .t.f
} -result {100}
test bind-22.117 {HandleEventGenerate: options <Button> -time 100} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Button> "lappend x %t"
event generate .t.f <Button> -time 100
event generate .t.f <Button> -time 100
return $x
} -cleanup {
destroy .t.f
} -result {100}
test bind-22.118 {HandleEventGenerate: options <ButtonRelease> -time 100} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %t"
event generate .t.f <ButtonRelease> -time 100
event generate .t.f <ButtonRelease> -time 100
return $x
} -cleanup {
destroy .t.f
} -result {100}
test bind-22.119 {HandleEventGenerate: options <Motion> -time 100} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Motion> "lappend x %t"
event generate .t.f <Motion> -time 100
event generate .t.f <Motion> -time 100
return $x
} -cleanup {
destroy .t.f
} -result {100}
test bind-22.120 {HandleEventGenerate: options <<Paste>> -time 100} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %t"
event generate .t.f <<Paste>> -time 100
event generate .t.f <<Paste>> -time 100
return $x
} -cleanup {
destroy .t.f
} -result {100}
test bind-22.121 {HandleEventGenerate: options <Enter> -time 100} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Enter> "lappend x %t"
event generate .t.f <Enter> -time 100
event generate .t.f <Enter> -time 100
return $x
} -cleanup {
destroy .t.f
} -result {100}
test bind-22.122 {HandleEventGenerate: options <Property> -time 100} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Property> "lappend x %t"
event generate .t.f <Property> -time 100
event generate .t.f <Property> -time 100
return $x
} -cleanup {
destroy .t.f
} -result {100}
test bind-22.123 {HandleEventGenerate: options <Configure> -time 100} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Configure> "lappend x %t"
event generate .t.f <Configure> -time 100
event generate .t.f <Configure> -time 100
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Configure> event doesn't accept "-time" option}
test bind-22.124 {HandleEventGenerate: options <Expose> -width xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Expose> "lappend x %w"
event generate .t.f <Expose> -width xyz
event generate .t.f <Expose> -width xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad screen distance "xyz"}
test bind-22.125 {HandleEventGenerate: options <Expose> -width 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Expose> "lappend x %w"
event generate .t.f <Expose> -width 2i
event generate .t.f <Expose> -width 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.126 {HandleEventGenerate: options <Configure> -width 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Configure> "lappend x %w"
event generate .t.f <Configure> -width 2i
event generate .t.f <Configure> -width 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.127 {HandleEventGenerate: options <Key> -width 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %k"
event generate .t.f <Key> -width 2i
event generate .t.f <Key> -width 2i
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Key> event doesn't accept "-width" option}
test bind-22.128 {HandleEventGenerate: options <Unmap> -window .xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Unmap> "lappend x %W"
event generate .t.f <Unmap> -window .xyz
event generate .t.f <Unmap> -window .xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad window path name ".xyz"}
test bind-22.129 {HandleEventGenerate: options <Unmap> -window .t.f} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Unmap> "lappend x %W"
event generate .t.f <Unmap> -window .t.f
event generate .t.f <Unmap> -window .t.f
return $x
} -cleanup {
destroy .t.f
} -result {.t.f}
test bind-22.130 {HandleEventGenerate: options <Unmap> -window xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Unmap> "lappend x %W"
event generate .t.f <Unmap> -window xyz
event generate .t.f <Unmap> -window xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad window name/identifier "xyz"}
test bind-22.131 {HandleEventGenerate: options <Unmap> -window [winfo id .t.f]} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Unmap> "lappend x %W"
event generate .t.f <Unmap> -window [winfo id .t.f]
event generate .t.f <Unmap> -window [winfo id .t.f]
return $x
} -cleanup {
destroy .t.f
} -result {.t.f}
test bind-22.132 {HandleEventGenerate: options <Unmap> -window .t.f} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Unmap> "lappend x %W"
event generate .t.f <Unmap> -window .t.f
event generate .t.f <Unmap> -window .t.f
return $x
} -cleanup {
destroy .t.f
} -result {.t.f}
test bind-22.133 {HandleEventGenerate: options <Map> -window .t.f} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Map> "lappend x %W"
event generate .t.f <Map> -window .t.f
event generate .t.f <Map> -window .t.f
return $x
} -cleanup {
destroy .t.f
} -result {.t.f}
test bind-22.134 {HandleEventGenerate: options <Reparent> -window .t.f} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Reparent> "lappend x %W"
event generate .t.f <Reparent> -window .t.f
event generate .t.f <Reparent> -window .t.f
return $x
} -cleanup {
destroy .t.f
} -result {.t.f}
test bind-22.135 {HandleEventGenerate: options <Configure> -window .t.f} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Configure> "lappend x %W"
event generate .t.f <Configure> -window .t.f
event generate .t.f <Configure> -window .t.f
return $x
} -cleanup {
destroy .t.f
} -result {.t.f}
test bind-22.136 {HandleEventGenerate: options <Gravity> -window .t.f} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Gravity> "lappend x %W"
event generate .t.f <Gravity> -window .t.f
event generate .t.f <Gravity> -window .t.f
return $x
} -cleanup {
destroy .t.f
} -result {.t.f}
test bind-22.137 {HandleEventGenerate: options <Circulate> -window .t.f} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Circulate> "lappend x %W"
event generate .t.f <Circulate> -window .t.f
event generate .t.f <Circulate> -window .t.f
return $x
} -cleanup {
destroy .t.f
} -result {.t.f}
test bind-22.138 {HandleEventGenerate: options <Key> -window .t.f} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %W"
event generate .t.f <Key> -window .t.f
event generate .t.f <Key> -window .t.f
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Key> event doesn't accept "-window" option}
test bind-22.139 {HandleEventGenerate: options <Key> -x xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %x"
event generate .t.f <Key> -x xyz
event generate .t.f <Key> -x xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad screen distance "xyz"}
test bind-22.140 {HandleEventGenerate: options <Key> -x 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %x"
event generate .t.f <Key> -x 2i
event generate .t.f <Key> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.141 {HandleEventGenerate: options <Button> -x 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Button> "lappend x %x"
event generate .t.f <Button> -x 2i
event generate .t.f <Button> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.142 {HandleEventGenerate: options <ButtonRelease> -x 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %x"
event generate .t.f <ButtonRelease> -x 2i
event generate .t.f <ButtonRelease> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.143 {HandleEventGenerate: options <Motion> -x 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Motion> "lappend x %x"
event generate .t.f <Motion> -x 2i
event generate .t.f <Motion> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.144 {HandleEventGenerate: options <<Paste>> -x 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %x"
event generate .t.f <<Paste>> -x 2i
event generate .t.f <<Paste>> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.145 {HandleEventGenerate: options <Enter> -x 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Enter> "lappend x %x"
event generate .t.f <Enter> -x 2i
event generate .t.f <Enter> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.146 {HandleEventGenerate: options <Expose> -x 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Expose> "lappend x %x"
event generate .t.f <Expose> -x 2i
event generate .t.f <Expose> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.147 {HandleEventGenerate: options <Configure> -x 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Configure> "lappend x %x"
event generate .t.f <Configure> -x 2i
event generate .t.f <Configure> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.148 {HandleEventGenerate: options <Gravity> -x 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Gravity> "lappend x %x"
event generate .t.f <Gravity> -x 2i
event generate .t.f <Gravity> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.149 {HandleEventGenerate: options <Reparent> -x 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Reparent> "lappend x %x"
event generate .t.f <Reparent> -x 2i
event generate .t.f <Reparent> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.150 {HandleEventGenerate: options <Map> -x 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Map> "lappend x %x"
event generate .t.f <Map> -x 2i
event generate .t.f <Map> -x 2i
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Map> event doesn't accept "-x" option}
test bind-22.151 {HandleEventGenerate: options <Key> -y xyz} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %y"
event generate .t.f <Key> -y xyz
event generate .t.f <Key> -y xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad screen distance "xyz"}
test bind-22.152 {HandleEventGenerate: options <Key> -y 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %y"
event generate .t.f <Key> -y 2i
event generate .t.f <Key> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.153 {HandleEventGenerate: options <Button> -y 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Button> "lappend x %y"
event generate .t.f <Button> -y 2i
event generate .t.f <Button> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.154 {HandleEventGenerate: options <ButtonRelease> -y 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %y"
event generate .t.f <ButtonRelease> -y 2i
event generate .t.f <ButtonRelease> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.155 {HandleEventGenerate: options <Motion> -y 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Motion> "lappend x %y"
event generate .t.f <Motion> -y 2i
event generate .t.f <Motion> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.156 {HandleEventGenerate: options <<Paste>> -y 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %y"
event generate .t.f <<Paste>> -y 2i
event generate .t.f <<Paste>> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.157 {HandleEventGenerate: options <Enter> -y 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Enter> "lappend x %y"
event generate .t.f <Enter> -y 2i
event generate .t.f <Enter> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.158 {HandleEventGenerate: options <Expose> -y 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Expose> "lappend x %y"
event generate .t.f <Expose> -y 2i
event generate .t.f <Expose> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.159 {HandleEventGenerate: options <Configure> -y 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Configure> "lappend x %y"
event generate .t.f <Configure> -y 2i
event generate .t.f <Configure> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.160 {HandleEventGenerate: options <Gravity> -y 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Gravity> "lappend x %y"
event generate .t.f <Gravity> -y 2i
event generate .t.f <Gravity> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.161 {HandleEventGenerate: options <Reparent> -y 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Reparent> "lappend x %y"
event generate .t.f <Reparent> -y 2i
event generate .t.f <Reparent> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
} -result {1}
test bind-22.162 {HandleEventGenerate: options <Map> -y 2i} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Map> "lappend x %y"
event generate .t.f <Map> -y 2i
event generate .t.f <Map> -y 2i
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Map> event doesn't accept "-y" option}
test bind-22.163 {HandleEventGenerate: options <Key> -xyz 1} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
set x {}
} -body {
bind .t.f <Key> "lappend x %k"
event generate .t.f <Key> -xyz 1
event generate .t.f <Key> -xyz 1
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad option "-xyz": must be -when, -above, -borderwidth, -button, -count, -data, -delta, -detail, -focus, -height, -keycode, -keysym, -mode, -override, -place, -root, -rootx, -rooty, -sendevent, -serial, -state, -subwindow, -time, -warp, -width, -window, -x, or -y}
# Note that the -data option is tested in bind-32.* because it has
# more demanding requirements in memory handling
|
︙ | | |
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
|
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
|
-
-
+
+
|
} -result {{event Unmap} <Unmap>}
test bind-27.1 {button names} -body {
bind .t <Expose-1> foo
} -returnCodes error -result {specified button "1" for non-button event}
test bind-27.2 {button names} -body {
bind .t <Button-6> foo
} -returnCodes error -result {specified keysym "6" for non-key event}
bind .t <Button-10> foo
} -returnCodes error -result {bad event type or keysym "10"}
test bind-27.3 {button names} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Button-1> {lappend x "button 1"}
|
︙ | | |
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
|
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
set x [bind .t.f]
event generate .t.f <Button-5>
event generate .t.f <ButtonRelease-5>
set x
} -cleanup {
destroy .t.f
} -result {<Button-5> {button 5}}
test bind-27.8 {button names} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Button-6> {lappend x "button 6"}
set x [bind .t.f]
event generate .t.f <Button-6>
event generate .t.f <ButtonRelease-6>
set x
} -cleanup {
destroy .t.f
} -result {<Button-6> {button 6}}
test bind-27.9 {button names} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Button-7> {lappend x "button 7"}
set x [bind .t.f]
event generate .t.f <Button-7>
event generate .t.f <ButtonRelease-7>
set x
} -cleanup {
destroy .t.f
} -result {<Button-7> {button 7}}
test bind-27.10 {button names} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Button-8> {lappend x "button 8"}
set x [bind .t.f]
event generate .t.f <Button-8>
event generate .t.f <ButtonRelease-8>
set x
} -cleanup {
destroy .t.f
} -result {<Button-8> {button 8}}
test bind-27.11 {button names} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
update
} -body {
bind .t.f <Button-9> {lappend x "button 9"}
set x [bind .t.f]
event generate .t.f <Button-9>
event generate .t.f <ButtonRelease-9>
set x
} -cleanup {
destroy .t.f
} -result {<Button-9> {button 9}}
test bind-28.1 {keysym names} -body {
bind .t <Expose-a> foo
} -returnCodes error -result {specified keysym "a" for non-key event}
test bind-28.2 {keysym names} -body {
bind .t <Gorp> foo
} -returnCodes error -result {bad event type or keysym "Gorp"}
|
︙ | | |
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
|
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
|
-
+
|
} -cleanup {
destroy .t.f
rename bgerror {}
} -result {{This is a test} {This is a test
while executing
"error "This is a test""
(command bound to event)}}
test bind-29.2 {Tk_BackgroundError procedure} -setup {
proc do {} {
event generate .t.f <Button>
event generate .t.f <ButtonRelease>
}
proc bgerror msg {
global x errorInfo
|
︙ | | |
Changes to tests/bitmap.test.
︙ | | |
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
-
+
|
eval tcltest::configure $argv
tcltest::loadTestedCommands
test bitmap-1.1 {Tk_AllocBitmapFromObj - converting internal reps} -constraints {
testbitmap
} -body {
set x gray25
lindex $x 0
lindex $x 0
button .b -bitmap $x
lindex $x 0
testbitmap gray25
} -cleanup {
destroy .b
} -result {{1 0}}
test bitmap-1.2 {Tk_AllocBitmapFromObj - discard stale bitmap} -constraints {
|
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
-
+
-
+
|
} -cleanup {
destroy .b1 .b2
} -result {{{1 1}} {{2 1}}}
test bitmap-2.1 {Tk_GetBitmap procedure} -body {
button .b1 -bitmap bad_name
} -cleanup {
destroy .b1
destroy .b1
} -returnCodes error -result {bitmap "bad_name" not defined}
test bitmap-2.2 {Tk_GetBitmap procedure} -body {
button .b1 -bitmap @xyzzy
} -cleanup {
destroy .b1
destroy .b1
} -returnCodes error -result {error reading bitmap file "xyzzy"}
test bitmap-3.1 {Tk_FreeBitmapFromObj - reference counts} -constraints {
testbitmap
} -setup {
set result {}
} -body {
|
︙ | | |
Changes to tests/border.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
|
# This file is a Tcl script to test out the procedures in the file
# tkBorder.c. It is organized in the standard fashion for Tcl tests.
#
# Copyright (c) 1998 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
namespace import ::tcltest::*
eval tcltest::configure $argv
tcltest::loadTestedCommands
test border-1.1 {Tk_AllocBorderFromObj - converting internal reps} -constraints {
testborder
test border-1.1 {Tk_AllocBorderFromObj - converting internal reps} -constraints {
testborder
} -body {
set x orange
lindex $x 0
button .b1 -bg $x -text .b1
lindex $x 0
testborder orange
} -cleanup {
destroy .b1
} -result {{1 0}}
test border-1.2 {Tk_AllocBorderFromObj - discard stale border} -constraints {
testborder
test border-1.2 {Tk_AllocBorderFromObj - discard stale border} -constraints {
testborder
} -setup {
set result {}
} -body {
set x orange
button .b1 -bg $x -text First
destroy .b1
lappend result [testborder orange]
button .b2 -bg $x -text Second
lappend result [testborder orange]
} -cleanup {
destroy .b1 .b2
} -result {{} {{1 1}}}
test border-1.3 {Tk_AllocBorderFromObj - reuse existing border} -constraints {
testborder
test border-1.3 {Tk_AllocBorderFromObj - reuse existing border} -constraints {
testborder
} -setup {
set result {}
} -body {
set x orange
button .b1 -bg $x -text First
lappend result [testborder orange]
button .b2 -bg $x -text Second
pack .b1 .b2 -side top
lappend result [testborder orange]
} -cleanup {
destroy .b1 .b2
} -result {{{1 1}} {{2 1}}}
test border-1.4 {Tk_AllocBorderFromObj - try other borders in list} -constraints {
test border-1.4 {Tk_AllocBorderFromObj - try other borders in list} -constraints {
testborder pseudocolor8
} -setup {
toplevel .t -visual {pseudocolor 8} -colormap new
wm geom .t +0+0
set result {}
} -body {
set x purple
button .b1 -bg $x -text First
pack .b1 -side top
lappend result [testborder purple]
button .t.b -bg $x -text Second
pack .t.b -side top
lappend result [testborder purple]
button .b2 -bg $x -text Third
pack .b2 -side top
lappend result [testborder purple]
} -cleanup {
destroy .b1 .b2 .t
} -result {{{1 1}} {{1 1} {1 0}} {{1 0} {2 1}}}
test border-2.1 {Tk_Free3DBorder - reference counts} -constraints {
test border-2.1 {Tk_Free3DBorder - reference counts} -constraints {
testborder pseudocolor8
} -setup {
toplevel .t -visual {pseudocolor 8} -colormap new
wm geom .t +0+0
set result {}
} -body {
set x purple
|
︙ | | |
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
-
+
|
destroy .b2
lappend result [testborder purple]
destroy .t.b
lappend result [testborder purple]
} -cleanup {
destroy .b1 .b2 .t
} -result {{{1 0} {2 1}} {{1 0} {1 1}} {{1 0}} {}}
test border-2.2 {Tk_Free3DBorder - unlinking from list} -constraints {
test border-2.2 {Tk_Free3DBorder - unlinking from list} -constraints {
testborder pseudocolor8
} -setup {
toplevel .t -visual {pseudocolor 8} -colormap new
wm geom .t +0+0
toplevel .t2 -visual {pseudocolor 8} -colormap new
toplevel .t3 -visual {pseudocolor 8} -colormap new
set result {}
|
︙ | | |
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
-
-
+
+
|
lappend result [testborder purple]
destroy .t
lappend result [testborder purple]
} -cleanup {
destroy .b .t2 .t3 .t
} -result {{{4 1} {3 0} {2 0} {1 0}} {{4 1} {2 0} {1 0}} {{4 1} {2 0}} {{2 0}} {}}
test border-3.1 {FreeBorderObjProc} -constraints {
testborder
test border-3.1 {FreeBorderObjProc} -constraints {
testborder
} -setup {
set result {}
} -body {
set x [join purple]
button .b -bg $x -text .b1
set y [join purple]
.b configure -bg $y
|
︙ | | |
Changes to tests/button.test.
︙ | | |
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
|
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
|
-
+
-
+
-
+
-
+
|
test button-1.57 {configuration option: "borderwidth" for label} -setup {
label .l -highlightthickness 2 -font {Helvetica -12 bold}
pack .l
update
} -body {
.l configure -borderwidth 1.3
.l cget -borderwidth
.l cget -borderwidth
} -cleanup {
destroy .l
} -result {1.3}
test button-1.58 {configuration option: "borderwidth" for label} -setup {
label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .l
update
} -body {
.l configure -borderwidth badValue
} -cleanup {
destroy .l
} -returnCodes {error} -result {bad screen distance "badValue"}
test button-1.59 {configuration option: "borderwidth" for button} -setup {
button .b -highlightthickness 2 -font {Helvetica -12 bold}
pack .b
update
} -body {
.b configure -borderwidth 1.3
.b cget -borderwidth
.b cget -borderwidth
} -cleanup {
destroy .b
} -result {1.3}
test button-1.60 {configuration option: "borderwidth" for button} -setup {
button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .b
update
} -body {
.b configure -borderwidth badValue
} -cleanup {
destroy .b
} -returnCodes {error} -result {bad screen distance "badValue"}
test button-1.61 {configuration option: "borderwidth" for checkbutton} -setup {
checkbutton .c -highlightthickness 2 -font {Helvetica -12 bold}
pack .c
update
} -body {
.c configure -borderwidth 1.3
.c cget -borderwidth
.c cget -borderwidth
} -cleanup {
destroy .c
} -result {1.3}
test button-1.62 {configuration option: "borderwidth" for checkbutton} -setup {
checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .c
update
} -body {
.c configure -borderwidth badValue
} -cleanup {
destroy .c
} -returnCodes {error} -result {bad screen distance "badValue"}
test button-1.63 {configuration option: "borderwidth" for radiobutton} -setup {
radiobutton .r -highlightthickness 2 -font {Helvetica -12 bold}
pack .r
update
} -body {
.r configure -borderwidth 1.3
.r cget -borderwidth
.r cget -borderwidth
} -cleanup {
destroy .r
} -result {1.3}
test button-1.64 {configuration option: "borderwidth" for radiobutton} -setup {
radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .r
update
|
︙ | | |
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
|
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
} -body {
.r configure -fg non-existent
} -cleanup {
destroy .r
} -returnCodes {error} -result {unknown color name "non-existent"}
test button-1.103 {configuration option: "font" for label} -setup {
label .l -borderwidth 2 -highlightthickness 2
label .l -borderwidth 2 -highlightthickness 2
pack .l
update
} -body {
.l configure -font {Helvetica -12}
.l cget -font
} -cleanup {
destroy .l
} -result {Helvetica -12}
test button-1.104 {configuration option: "activebackground" for label} -setup {
label .l -borderwidth 2 -highlightthickness 2
label .l -borderwidth 2 -highlightthickness 2
pack .l
update
} -body {
.l configure -font {}
} -cleanup {
destroy .l
} -returnCodes {error} -result {font "" doesn't exist}
test button-1.105 {configuration option: "font" for button} -setup {
button .b -borderwidth 2 -highlightthickness 2
button .b -borderwidth 2 -highlightthickness 2
pack .b
update
} -body {
.b configure -font {Helvetica -12}
.b cget -font
} -cleanup {
destroy .b
} -result {Helvetica -12}
test button-1.106 {configuration option: "activebackground" for button} -setup {
button .b -borderwidth 2 -highlightthickness 2
button .b -borderwidth 2 -highlightthickness 2
pack .b
update
} -body {
.b configure -font {}
} -cleanup {
destroy .b
} -returnCodes {error} -result {font "" doesn't exist}
test button-1.107 {configuration option: "font" for checkbutton} -setup {
checkbutton .c -borderwidth 2 -highlightthickness 2
checkbutton .c -borderwidth 2 -highlightthickness 2
pack .c
update
} -body {
.c configure -font {Helvetica -12}
.c cget -font
} -cleanup {
destroy .c
} -result {Helvetica -12}
test button-1.108 {configuration option: "activebackground" for checkbutton} -setup {
checkbutton .c -borderwidth 2 -highlightthickness 2
checkbutton .c -borderwidth 2 -highlightthickness 2
pack .c
update
} -body {
.c configure -font {}
} -cleanup {
destroy .c
} -returnCodes {error} -result {font "" doesn't exist}
test button-1.109 {configuration option: "font" for radiobutton} -setup {
radiobutton .r -borderwidth 2 -highlightthickness 2
radiobutton .r -borderwidth 2 -highlightthickness 2
pack .r
update
} -body {
.r configure -font {Helvetica -12}
.r cget -font
} -cleanup {
destroy .r
} -result {Helvetica -12}
test button-1.110 {configuration option: "activebackground" for radiobutton} -setup {
radiobutton .r -borderwidth 2 -highlightthickness 2
radiobutton .r -borderwidth 2 -highlightthickness 2
pack .r
update
} -body {
.r configure -font {}
} -cleanup {
destroy .r
} -returnCodes {error} -result {font "" doesn't exist}
|
︙ | | |
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
|
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
|
-
+
|
checkbutton .c
.c configure -selectcolor {}
} -cleanup {
destroy .c
} -result {}
# ex-tests 3.*
test button-2.1 {ButtonCreate - not enough arguments} -body {
test button-2.1 {ButtonCreate - not enough arguments} -body {
button
} -returnCodes {error} -result {wrong # args: should be "button pathName ?-option value ...?"}
test button-2.2 {ButtonCreate procedure - setting label class} -body {
label .x
winfo class .x
} -cleanup {
|
︙ | | |
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
|
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
|
-
+
-
-
+
+
-
+
-
+
-
+
-
+
|
destroy .x
rename gorp button
} -result {Button}
test button-2.7 {ButtonCreate - bad window name} -body {
button foo
} -cleanup {
destroy foo
destroy foo
} -returnCodes {error} -result {bad window path name "foo"}
######### test ex 3.8
test button-2.8 {ButtonCreate procedure - error in default option value} -body {
######### test ex 3.8
test button-2.8 {ButtonCreate procedure - error in default option value} -body {
option add *funny.background bogus
button .funny
} -cleanup {
option clear
destroy .funny
} -returnCodes {error} -result {unknown color name "bogus"}
} -returnCodes {error} -result {unknown color name "bogus"}
test button-2.9 {ButtonCreate procedure - error in default option value} -body {
option add *funny.background bogus
catch {button .funny}
return $errorInfo
} -cleanup {
option clear
destroy .funny
} -result {unknown color name "bogus"
(database entry for "-background" in widget ".funny")
invoked from within
"button .funny"}
test button-2.10 {ButtonCreate procedure - option error} -body {
test button-2.10 {ButtonCreate procedure - option error} -body {
button .x -gorp foo
} -cleanup {
destroy .x
} -returnCodes {error} -result {unknown option "-gorp"}
} -returnCodes {error} -result {unknown option "-gorp"}
test button-2.11 {ButtonCreate procedure - option error} -body {
catch {button .x -gorp foo}
catch {button .x -gorp foo}
winfo exists .x
} -cleanup {
destroy .x
} -result 0
######### ex 3.10
test button-2.12 {ButtonCreate procedure - return value} -body {
set x [button .abcd]
|
︙ | | |
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
|
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
|
-
+
-
+
-
+
-
+
-
+
|
#ex 4.7
test button-3.6 {ButtonWidgetCmd procedure, "cget" option} -body {
label .l
.l cget -disabledforeground
} -cleanup {
destroy .l
} -returnCodes {ok} -match {glob} -result {*}
} -returnCodes {ok} -match {glob} -result {*}
test button-3.7 {ButtonWidgetCmd procedure, "cget" option} -body {
button .b
.b cget -disabledforeground
} -cleanup {
destroy .b
} -returnCodes {ok} -match {glob} -result {*}
} -returnCodes {ok} -match {glob} -result {*}
test button-3.8 {ButtonWidgetCmd procedure, "cget" option} -body {
button .b
.b cget -variable
} -cleanup {
destroy .b
} -returnCodes {error} -result {unknown option "-variable"}
test button-3.9 {ButtonWidgetCmd procedure, "cget" option} -body {
checkbutton .c
.c cget -variable
} -cleanup {
destroy .c
} -returnCodes {ok} -match {glob} -result {*}
} -returnCodes {ok} -match {glob} -result {*}
test button-3.10 {ButtonWidgetCmd procedure, "cget" option} -body {
checkbutton .c
.c cget -value
} -cleanup {
destroy .c
} -returnCodes {error} -result {unknown option "-value"}
test button-3.11 {ButtonWidgetCmd procedure, "cget" option} -body {
radiobutton .r
.r cget -value
} -cleanup {
destroy .r
} -returnCodes {ok} -match {glob} -result {*}
} -returnCodes {ok} -match {glob} -result {*}
test button-3.12 {ButtonWidgetCmd procedure, "cget" option} -body {
radiobutton .r
.r cget -onvalue
} -cleanup {
destroy .r
} -returnCodes {error} -result {unknown option "-onvalue"}
# ex 4.6
test button-3.13 {ButtonWidgetCmd procedure, "configure" option} -body {
button .b -highlightthickness 3
lindex [.b configure -highlightthickness] 4
} -cleanup {
destroy .b
} -result {3}
test button-3.14 {ButtonWidgetCmd procedure, "configure" option} -body {
checkbutton .c
llength [.c configure]
} -cleanup {
destroy .c
} -result {41}
} -result {41}
test button-3.15 {ButtonWidgetCmd procedure, "configure" option} -body {
button .b
.b configure -gorp
} -cleanup {
destroy .b
} -returnCodes {error} -result {unknown option "-gorp"}
test button-3.16 {ButtonWidgetCmd procedure, "configure" option} -setup {
|
︙ | | |
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
|
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
|
-
+
-
+
-
+
-
+
-
+
|
test button-3.21 {ButtonWidgetCmd procedure, "deselect" option} -body {
checkbutton .c -variable checkvar -onvalue 1 -offvalue 0
set checkvar 1
.c d
return $checkvar
} -cleanup {
destroy .c
} -result {0}
} -result {0}
test button-3.22 {ButtonWidgetCmd procedure, "deselect" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar green
.r deselect
return $radiovar
} -cleanup {
destroy .r
} -result {green}
} -result {green}
test button-3.23 {ButtonWidgetCmd procedure, "deselect" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar red
.r deselect
return $radiovar
} -cleanup {
destroy .r
} -result {}
} -result {}
test button-3.24 {ButtonWidgetCmd procedure, "deselect" option} -body {
test button-3.24 {ButtonWidgetCmd procedure, "deselect" option} -body {
checkbutton .c -variable checkvar -onvalue 1 -offvalue 0
set checkvar 1
trace variable checkvar w bogusTrace
.c deselect
} -cleanup {
destroy .c
trace vdelete checkvar w bogusTrace
} -returnCodes {error} -result {can't set "checkvar": trace aborted}
} -returnCodes {error} -result {can't set "checkvar": trace aborted}
test button-3.25 {ButtonWidgetCmd procedure, "deselect" option} -body {
checkbutton .c -variable checkvar -onvalue 1 -offvalue 0
set checkvar 1
trace variable checkvar w bogusTrace
catch {.c deselect}
list $errorInfo $checkvar
} -cleanup {
|
︙ | | |
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
|
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
|
-
+
|
radiobutton .r -variable radiovar -value red
set radiovar red
trace variable radiovar w bogusTrace
.r deselect
} -cleanup {
destroy .r
trace vdelete radiovar w bogusTrace
} -match {glob} -returnCodes {error} -result {can't set "radiovar": trace aborted}
} -match {glob} -returnCodes {error} -result {can't set "radiovar": trace aborted}
test button-3.27 {ButtonWidgetCmd procedure, "deselect" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar red
trace variable radiovar w bogusTrace
catch {.r deselect}
list $errorInfo $radiovar
} -cleanup {
|
︙ | | |
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
|
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
|
-
+
-
+
-
+
|
} -returnCodes {error} -result {wrong # args: should be ".b flash"}
test button-3.29 {ButtonWidgetCmd procedure, "flash" option} -body {
label .l
.l flash
} -cleanup {
destroy .l
} -returnCodes {error} -result {bad option "flash": must be cget or configure}
test button-3.30 {ButtonWidgetCmd procedure, "flash" option} -body {
test button-3.30 {ButtonWidgetCmd procedure, "flash" option} -body {
button .b
catch {.b flash}
} -cleanup {
destroy .b
} -returnCodes {ok} -match {glob} -result {*}
test button-3.31 {ButtonWidgetCmd procedure, "flash" option} -body {
test button-3.31 {ButtonWidgetCmd procedure, "flash" option} -body {
checkbutton .c
catch {.c flash}
} -cleanup {
destroy .c
} -returnCodes {ok} -match {glob} -result {*}
test button-3.32 {ButtonWidgetCmd procedure, "flash" option} -body {
test button-3.32 {ButtonWidgetCmd procedure, "flash" option} -body {
radiobutton .r
catch {.r f}
} -cleanup {
destroy .r
} -returnCodes {ok} -match {glob} -result {*}
test button-3.33 {ButtonWidgetCmd procedure, "invoke" option} -body {
|
︙ | | |
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
|
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
|
-
+
-
+
-
+
|
set checkvar bogus
.c s
return $checkvar
} -cleanup {
destroy .c
} -result {lovely}
test button-3.43 {ButtonWidgetCmd procedure, "select" option} -body {
radiobutton .r -variable radiovar -value red
radiobutton .r -variable radiovar -value red
set radiovar green
.r select
return $radiovar
} -cleanup {
destroy .r
} -result {red}
test button-3.44 {ButtonWidgetCmd procedure, "select" option} -body {
test button-3.44 {ButtonWidgetCmd procedure, "select" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar yellow
trace variable radiovar w bogusTrace
.r select
} -cleanup {
destroy .r
trace vdelete radiovar w bogusTrace
} -returnCodes {error} -result {can't set "radiovar": trace aborted}
} -returnCodes {error} -result {can't set "radiovar": trace aborted}
test button-3.45 {ButtonWidgetCmd procedure, "select" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar yellow
trace variable radiovar w bogusTrace
catch {.r select}
list $errorInfo $radiovar
} -cleanup {
|
︙ | | |
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
|
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
lappend result $checkvar
.c toggle
lappend result $checkvar
return $result
} -cleanup {
destroy .c
} -result {sunshine rain sunshine}
test button-3.51 {ButtonWidgetCmd procedure, "toggle" option} -body {
test button-3.51 {ButtonWidgetCmd procedure, "toggle" option} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
set checkvar xyz
trace variable checkvar w bogusTrace
.c toggle
} -cleanup {
destroy .c
trace vdelete checkvar w bogusTrace
} -returnCodes {error} -result {can't set "checkvar": trace aborted}
} -returnCodes {error} -result {can't set "checkvar": trace aborted}
test button-3.52 {ButtonWidgetCmd procedure, "toggle" option} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
set checkvar xyz
trace variable checkvar w bogusTrace
catch {.c toggle}
catch {.c toggle}
list $errorInfo $checkvar
} -cleanup {
trace vdelete checkvar w bogusTrace
destroy .c
} -match {glob} -result {{*trace aborted
while executing
*
".c toggle"} abc}
test button-3.53 {ButtonWidgetCmd procedure, "toggle" option} -body {
test button-3.53 {ButtonWidgetCmd procedure, "toggle" option} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
set checkvar abc
trace variable checkvar w bogusTrace
.c toggle
} -cleanup {
trace vdelete checkvar w bogusTrace
destroy .c
} -returnCodes {error} -result {can't set "checkvar": trace aborted}
} -returnCodes {error} -result {can't set "checkvar": trace aborted}
test button-3.54 {ButtonWidgetCmd procedure, "toggle" option} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
set checkvar abc
trace variable checkvar w bogusTrace
catch {.c toggle}
catch {.c toggle}
list $errorInfo $checkvar
} -cleanup {
trace vdelete checkvar w bogusTrace
destroy .c
} -match {glob} -result {{*trace aborted
while executing
*
".c toggle"} xyz}
test button-3.55 {ButtonWidgetCmd procedure, "toggle" option} -setup {
unset -nocomplain checkvar
} -body {
} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
unset checkvar
set checkvar(1) 1
.c toggle
} -cleanup {
destroy .c
} -returnCodes {error} -result {can't set "checkvar": variable is array}
} -returnCodes {error} -result {can't set "checkvar": variable is array}
test button-3.56 {ButtonWidgetCmd procedure, "toggle" option} -setup {
unset -nocomplain checkvar
} -body {
} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
unset checkvar
set checkvar(1) 1
catch {.c toggle}
return $errorInfo
} -cleanup {
destroy .c
|
︙ | | |
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
|
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
|
-
-
+
+
-
+
-
+
-
+
|
button .b1 -image image1
button .b2 -fg #ff0000 -text "Button 2"
button .b3 -state active -text "Button 3"
button .b4 -disabledforeground #0000ff -state disabled -text "Button 4"
checkbutton .b5 -variable x -text "Checkbutton 5"
set x 1
pack .b1 .b2 .b3 .b4 .b5
update
deleteWindows
update
deleteWindows
} -cleanup {
destroy .b1 .b2 .b3 .b4 .b5
image delete image1
} -result {}
} -result {}
test button-5.1 {ConfigureButton - textvariable trace} -body {
button .b -bd 4 -bg green
.b configure -bd 7 -bg red -fg bogus
} -cleanup {
destroy .b
} -returnCodes {error} -result {unknown color name "bogus"}
} -returnCodes {error} -result {unknown color name "bogus"}
test button-5.2 {ConfigureButton - textvariable trace} -body {
button .b -bd 4 -bg green
catch {.b configure -bd 7 -bg red -fg bogus}
catch {.b configure -bd 7 -bg red -fg bogus}
list [.b cget -bd] [.b cget -bg]
} -cleanup {
destroy .b
} -result {4 green}
test button-5.3 {ConfigureButton - textvariable trace} -body {
button .b -textvariable x
set x From-x
|
︙ | | |
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
|
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
|
-
+
|
imageCleanup
} -result {image2}
test button-5.6 {ConfigureButton - default value for variable} -body {
checkbutton .c
.c cget -variable
} -cleanup {
destroy .c
destroy .c
} -result {c}
test button-5.7 {ConfigureButton - setting selected state from variable} -body {
set x 0
set y Shiny
checkbutton .c -variable x
.c configure -variable y -onvalue Shiny
.c toggle
|
︙ | | |
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
|
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
|
-
+
|
destroy .r
} -result {}
test button-5.10 {ConfigureButton - error in setting variable} -setup {
unset -nocomplain x
} -body {
trace variable x w bogusTrace
radiobutton .r -variable x
radiobutton .r -variable x
} -cleanup {
destroy .r
trace vdelete x w bogusTrace
} -returnCodes {error} -result {can't set "x": trace aborted}
test button-5.11 {ConfigureButton - bad image name} -body {
button .b -image bogus
|
︙ | | |
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
|
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
|
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
|
unset -nocomplain x
} -body {
trace variable x w bogusTrace
radiobutton .r -text foo -textvariable x
} -cleanup {
trace vdelete x w bogusTrace
destroy .r
} -returnCodes {error} -result {can't set "x": trace aborted}
} -returnCodes {error} -result {can't set "x": trace aborted}
test button-5.15 {ConfigureButton - variable handling} -setup {
unset -nocomplain x
} -body {
trace variable x w bogusTrace
catch {radiobutton .r -text foo -textvariable x}
return $x
} -cleanup {
trace vdelete x w bogusTrace
destroy .r
} -result {foo}
#ex 6.14
test button-5.16 {ConfigureButton - -width option} -body {
test button-5.16 {ConfigureButton - -width option} -body {
button .b -text "Button 1"
.b configure -width 1i
} -cleanup {
destroy .b
} -returnCodes {error} -result {expected integer but got "1i"}
} -returnCodes {error} -result {expected integer but got "1i"}
test button-5.17 {ConfigureButton - -width option} -body {
button .b -text "Button 1"
catch {.b configure -width 1i}
return $errorInfo
} -cleanup {
destroy .b
} -result {expected integer but got "1i"
(processing -width option)
invoked from within
".b configure -width 1i"}
test button-5.18 {ConfigureButton - -height option} -body {
test button-5.18 {ConfigureButton - -height option} -body {
button .b -text "Button 1"
.b configure -height 0.5c
} -cleanup {
destroy .b
} -returnCodes {error} -result {expected integer but got "0.5c"}
test button-5.19 {ConfigureButton - -height option} -body {
} -returnCodes {error} -result {expected integer but got "0.5c"}
test button-5.19 {ConfigureButton - -height option} -body {
button .b -text "Button 1"
catch {.b configure -height 0.5c}
catch {.b configure -height 0.5c}
return $errorInfo
} -cleanup {
destroy .b
} -result {expected integer but got "0.5c"
(processing -height option)
invoked from within
".b configure -height 0.5c"}
#ex 6.16
test button-5.20 {ConfigureButton - -width option} -body {
button .b -bitmap questhead
.b configure -width abc
} -cleanup {
destroy .b
} -returnCodes {error} -result {bad screen distance "abc"}
} -returnCodes {error} -result {bad screen distance "abc"}
test button-5.21 {ConfigureButton - -width option} -body {
button .b -bitmap questhead
catch {.b configure -width abc}
catch {.b configure -width abc}
return $errorInfo
} -cleanup {
destroy .b
} -result {bad screen distance "abc"
(processing -width option)
invoked from within
".b configure -width abc"}
test button-5.22 {ConfigureButton - -height option} -constraints {
testImageType
} -setup {
image create test image1
} -body {
button .b -image image1
.b configure -height 0.5x
} -cleanup {
destroy .b
image delete image1
} -returnCodes {error} -result {bad screen distance "0.5x"}
} -returnCodes {error} -result {bad screen distance "0.5x"}
test button-5.23 {ConfigureButton - -height option} -constraints {
testImageType
} -setup {
image create test image1
} -body {
#ztestImageType
button .b -image image1
catch {.b configure -height 0.5x}
catch {.b configure -height 0.5x}
return $errorInfo
} -cleanup {
destroy .b
image delete image1
} -result {bad screen distance "0.5x"
(processing -height option)
invoked from within
|
︙ | | |
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
|
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
list [info command .b*] [winfo children .]
} -cleanup {
destroy .b
} -result {{} {}}
test button-8.1 {TkInvokeButton procedure} -setup {
set x 0
} -body {
} -body {
checkbutton .c -variable x
set result $x
.c invoke
lappend result $x
.c invoke
lappend result $x
} -cleanup {
destroy .c
} -result {0 1 0}
test button-8.2 {TkInvokeButton procedure} -setup {
test button-8.2 {TkInvokeButton procedure} -setup {
set x 0
} -body {
} -body {
checkbutton .c -variable x
trace variable x w bogusTrace
.c invoke
} -cleanup {
destroy .c
trace vdelete x w bogusTrace
} -returnCodes {error} -result {can't set "x": trace aborted}
test button-8.3 {TkInvokeButton procedure} -setup {
set x 0
} -body {
} -body {
checkbutton .c -variable x
trace variable x w bogusTrace
catch {.c invoke}
return $x
} -cleanup {
destroy .c
trace vdelete x w bogusTrace
} -result {1}
test button-8.4 {TkInvokeButton procedure} -setup {
test button-8.4 {TkInvokeButton procedure} -setup {
set x 1
} -body {
} -body {
checkbutton .c -variable x
trace variable x w bogusTrace
.c invoke
} -cleanup {
destroy .c
trace vdelete x w bogusTrace
} -returnCodes {error} -result {can't set "x": trace aborted}
test button-8.5 {TkInvokeButton procedure} -setup {
set x 1
} -body {
} -body {
checkbutton .c -variable x
trace variable x w bogusTrace
catch {.c invoke}
return $x
} -cleanup {
destroy .c
trace vdelete x w bogusTrace
} -result {0}
test button-8.6 {TkInvokeButton procedure} -setup {
set x 0
} -body {
} -body {
radiobutton .r -variable x -value red
set result $x
.r invoke
lappend result $x
.r invoke
lappend result $x
} -cleanup {
destroy .r
} -result {0 red red}
test button-8.7 {TkInvokeButton procedure} -body {
test button-8.7 {TkInvokeButton procedure} -body {
radiobutton .r -variable x -value red
set x green
trace variable x w bogusTrace
.r invoke
} -cleanup {
destroy .r
trace vdelete x w bogusTrace
} -returnCodes {error} -result {can't set "x": trace aborted}
test button-8.8 {TkInvokeButton procedure} -body {
test button-8.8 {TkInvokeButton procedure} -body {
radiobutton .r -variable x -value red
set x green
trace variable x w bogusTrace
catch {.r invoke}
list $errorInfo $x
} -cleanup {
destroy .r
|
︙ | | |
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
|
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
|
-
+
|
set new [winfo reqwidth .b]
expr {$old == $new}
} -cleanup {
destroy .b
} -result {0}
test button-11.1 {ButtonImageProc procedure} -constraints {
testImageType
testImageType
} -setup {
label .l -highlightthickness 0 -font {Helvetica -12 bold}
image create test image1
} -body {
.l configure -image image1 -padx 0 -pady 0 -bd 0
pack .l
set result "[winfo reqwidth .l] [winfo reqheight .l]"
|
︙ | | |
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
|
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
|
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
-
-
-
-
+
+
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
+
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
|
test button-13.1 {size behavior: label} -setup {
label .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
label .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
label .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
set result {}
} -body {
.a configure -text Hej
.a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
# With -width, width should not be affected by text change
lappend result [expr {[winfo reqwidth .b] == [winfo reqwidth .c]}]
# With -height, height should not be affected by text change
lappend result [expr {[winfo reqheight .b] == [winfo reqheight .c]}]
# A one line text should be as high as -height 1
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
} -result {1 1 1}
test button-13.2 {size behavior: label} -setup {
label .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
label .b -borderwidth 2 -highlightthickness 2 -font {Arial 20}
label .c -borderwidth 2 -highlightthickness 2 -font {Arial 20}
set result {}
} -body {
.a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
# With -width, width should not be affected by text change
lappend result [expr {[winfo reqwidth .b] == [winfo reqwidth .c]}]
# With -height, height should not be affected by text change
lappend result [expr {[winfo reqheight .b] == [winfo reqheight .c]}]
# A one line text should be as high as -height 1
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
} -result {1 1 1}
test button-13.3 {size behavior: button} -setup {
button .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
button .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
set result {}
} -body {
.a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
# With -width, width should not be affected by text change
lappend result [expr {[winfo reqwidth .b] == [winfo reqwidth .c]}]
# With -height, height should not be affected by text change
lappend result [expr {[winfo reqheight .b] == [winfo reqheight .c]}]
# A one line text should be as high as -height 1
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
} -result {1 1 1}
test button-13.4 {size behavior: button} -setup {
button .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
button .b -borderwidth 2 -highlightthickness 2 -font {Arial 20}
button .c -borderwidth 2 -highlightthickness 2 -font {Arial 20}
set result {}
} -body {
.a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
# With -width, width should not be affected by text change
lappend result [expr {[winfo reqwidth .b] == [winfo reqwidth .c]}]
# With -height, height should not be affected by text change
lappend result [expr {[winfo reqheight .b] == [winfo reqheight .c]}]
# A one line text should be as high as -height 1
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
} -result {1 1 1}
test button-13.5 {size behavior: radiobutton} -setup {
radiobutton .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
radiobutton .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
radiobutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
set result {}
} -body {
.a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
# With -width, width should not be affected by text change
lappend result [expr {[winfo reqwidth .b] == [winfo reqwidth .c]}]
# With -height, height should not be affected by text change
lappend result [expr {[winfo reqheight .b] == [winfo reqheight .c]}]
# A one line text should be as high as -height 1
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
} -result {1 1 1}
test button-13.2 {size behavior: label} -setup {
label .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
label .b -borderwidth 2 -highlightthickness 2 -font {Arial 20}
label .c -borderwidth 2 -highlightthickness 2 -font {Arial 20}
} -result {1 1 1}
test button-13.6 {size behavior: radiobutton} -setup {
radiobutton .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
radiobutton .b -borderwidth 2 -highlightthickness 2 -font {Arial 20}
radiobutton .c -borderwidth 2 -highlightthickness 2 -font {Arial 20}
set result {}
} -body {
.a configure -text Hej
.a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
# With -width, width should not be affected by text change
lappend result [expr {[winfo reqwidth .b] == [winfo reqwidth .c]}]
# With -height, height should not be affected by text change
lappend result [expr {[winfo reqheight .b] == [winfo reqheight .c]}]
# A one line text should be as high as -height 1
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
} -result {1 1 1}
} -result {1 1 1}
test button-13.3 {size behavior: button} -setup {
button .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
button .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
test button-13.7 {size behavior: checkbutton} -setup {
checkbutton .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
checkbutton .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
set result {}
} -body {
.a configure -text Hej
.a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
# With -width, width should not be affected by text change
lappend result [expr {[winfo reqwidth .b] == [winfo reqwidth .c]}]
# With -height, height should not be affected by text change
lappend result [expr {[winfo reqheight .b] == [winfo reqheight .c]}]
# A one line text should be as high as -height 1
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
} -result {1 1 1}
} -result {1 1 1}
test button-13.4 {size behavior: button} -setup {
button .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
button .b -borderwidth 2 -highlightthickness 2 -font {Arial 20}
button .c -borderwidth 2 -highlightthickness 2 -font {Arial 20}
set result {}
} -body {
.a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
# With -width, width should not be affected by text change
lappend result [expr {[winfo reqwidth .b] == [winfo reqwidth .c]}]
# With -height, height should not be affected by text change
lappend result [expr {[winfo reqheight .b] == [winfo reqheight .c]}]
# A one line text should be as high as -height 1
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
} -result {1 1 1}
test button-13.8 {size behavior: checkbutton} -setup {
test button-13.5 {size behavior: radiobutton} -setup {
radiobutton .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
radiobutton .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
radiobutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
checkbutton .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
checkbutton .b -borderwidth 2 -highlightthickness 2 -font {Arial 20}
checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Arial 20}
set result {}
} -body {
.a configure -text Hej
.a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
# With -width, width should not be affected by text change
lappend result [expr {[winfo reqwidth .b] == [winfo reqwidth .c]}]
# With -height, height should not be affected by text change
lappend result [expr {[winfo reqheight .b] == [winfo reqheight .c]}]
# A one line text should be as high as -height 1
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
} -result {1 1 1}
} -result {1 1 1}
test button-13.6 {size behavior: radiobutton} -setup {
radiobutton .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
radiobutton .b -borderwidth 2 -highlightthickness 2 -font {Arial 20}
radiobutton .c -borderwidth 2 -highlightthickness 2 -font {Arial 20}
set result {}
} -body {
.a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
# With -width, width should not be affected by text change
lappend result [expr {[winfo reqwidth .b] == [winfo reqwidth .c]}]
# With -height, height should not be affected by text change
lappend result [expr {[winfo reqheight .b] == [winfo reqheight .c]}]
# A one line text should be as high as -height 1
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
} -result {1 1 1}
test button-13.7 {size behavior: checkbutton} -setup {
checkbutton .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
checkbutton .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
set result {}
} -body {
.a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
# With -width, width should not be affected by text change
lappend result [expr {[winfo reqwidth .b] == [winfo reqwidth .c]}]
# With -height, height should not be affected by text change
lappend result [expr {[winfo reqheight .b] == [winfo reqheight .c]}]
# A one line text should be as high as -height 1
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
} -result {1 1 1}
test button-13.8 {size behavior: checkbutton} -setup {
checkbutton .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
checkbutton .b -borderwidth 2 -highlightthickness 2 -font {Arial 20}
checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Arial 20}
set result {}
} -body {
.a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
# With -width, width should not be affected by text change
lappend result [expr {[winfo reqwidth .b] == [winfo reqwidth .c]}]
# With -height, height should not be affected by text change
lappend result [expr {[winfo reqheight .b] == [winfo reqheight .c]}]
# A one line text should be as high as -height 1
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
} -result {1 1 1}
test button-14.1 {bug fix: [011706ec42] tk::ButtonInvoke unsafe wrt widget destruction} -body {
proc destroy_button {} {
if {[winfo exists .top.b]} {
destroy .top.b
}
}
toplevel .top
button .top.b -text Foo -command destroy_button
bind .top.b <space> destroy_button
pack .top.b
focus -force .top.b
update
event generate .top.b <space>
update ; # shall not trigger error invalid command name ".top.b"
} -cleanup {
destroy .top.b .top
} -result {}
} -result {}
imageFinish
cleanupTests
return
# Local variables:
# mode: tcl
# End:
|
Changes to tests/canvImg.test.
︙ | | |
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
|
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
|
-
+
-
+
-
+
|
.c create image 20 30 -image foo -tags i1 -anchor s
.c bbox i1
} -cleanup {
.c delete all
imageCleanup
} -result {5 15 35 30}
test canvImg-6.10 {ComputeImageBbox procedure} -constraints {
testImageType
testImageType
} -setup {
image create test foo
.c delete all
} -body {
.c delete all
.c create image 20 30 -image foo -tags i1 -anchor sw
.c bbox i1
} -cleanup {
.c delete all
image delete foo
} -result {20 15 50 30}
test canvImg-6.11 {ComputeImageBbox procedure} -constraints {
testImageType
testImageType
} -setup {
image create test foo
.c delete all
} -body {
.c delete all
.c create image 20 30 -image foo -tags i1 -anchor w
.c bbox i1
} -cleanup {
.c delete all
image delete foo
} -result {20 23 50 38}
test canvImg-6.12 {ComputeImageBbox procedure} -constraints {
testImageType
testImageType
} -setup {
image create test foo
.c delete all
} -body {
.c delete all
.c create image 20 30 -image foo -tags i1 -anchor center
.c bbox i1
|
︙ | | |
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
|
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
|
-
+
-
+
|
update
return $x
} -cleanup {
.c delete all
image delete foo
} -result {{foo display 0 0 40 50 30 30}}
test canvImg-11.2 {ImageChangedProc procedure} -constraints {
testImageType
testImageType
} -setup {
.c delete all
} -body {
image create test foo -variable x
.c create image 50 100 -image foo -tags image -anchor center
update
set x {}
foo changed 0 0 0 0 40 50
.c bbox image
} -cleanup {
.c delete all
image delete foo
} -result {30 75 70 125}
test canvImg-11.3 {ImageChangedProc procedure} -constraints {
testImageType
testImageType
} -setup {
.c delete all
} -body {
image create test foo -variable x
image create test foo2 -variable y
foo changed 0 0 0 0 40 50
foo2 changed 0 0 0 0 80 60
|
︙ | | |
Changes to tests/canvMoveto.test.
︙ | | |
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
+
|
test canvMoveto-1.5 {Bad args handling for "moveto" command} -body {
.c moveto test 12 20 -anchor
} -returnCodes error -result {wrong # args: should be ".c moveto tagOrId x y"}
test canvMoveto-2.1 {Canvas "moveto" command coordinates} {
.c moveto test 200 150
.c bbox test
} {200 150 272 232}
} {200 150 272 232}
test canvMoveto-2.2 {Canvas "moveto" command, blank y coordinate} {
.c moveto test 200 150
.c moveto test 150 {}
.c bbox test
} {150 150 222 232}
test canvMoveto-2.3 {Canvas "moveto" command, blank x coordinate} {
.c moveto test 200 150
|
︙ | | |
Changes to tests/canvRect.test.
︙ | | |
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
|
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
|
-
+
|
set xId [.c create rectangle 10 20 30 35 -tags x -fill green]
set yId [.c create rectangle 15 25 25 30 -tags y -fill red]
.c itemconfigure y -outline {}
list [expr {[.c find closest 20 24.9] eq $xId}] \
[expr {[.c find closest 20 25.1] eq $yId}] \
[expr {[.c find closest 20 29.9] eq $yId}] \
[expr {[.c find closest 20 30.1] eq $xId}]
} -cleanup {
.c delete all
} -result {1 1 1 1}
test canvRect-6.3 {RectToPoint procedure} -body {
set xId [.c create rectangle 10 20 30 35 -tags x -fill green]
set yId [.c create rectangle 15 25 25 30 -tags y -fill red]
.c itemconfigure y -width 1 -outline black
|
︙ | | |
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
|
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
|
-
+
|
test canvRect-6.4 {RectToPoint procedure} -body {
set xId [.c create rectangle 10 20 30 35 -tags x -fill green]
set yId [.c create rectangle 15 25 25 30 -tags y -fill red]
.c itemconfigure y -width 1 -outline black
list [expr {[.c find closest 20 24.4] eq $xId}] \
[expr {[.c find closest 20 24.6] eq $yId}] \
[expr {[.c find closest 20 30.4] eq $yId}] \
[expr {[.c find closest 20 30.6] eq $xId}]
[expr {[.c find closest 20 30.6] eq $xId}]
} -cleanup {
.c delete all
} -result {1 1 1 1}
test canvRect-6.5 {RectToPoint procedure} -body {
set xId [.c create rectangle 10 20 30 35 -tags x -fill green]
set yId [.c create rectangle 15 25 25 30 -tags y -fill red]
|
︙ | | |
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
|
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
|
-
+
-
+
-
+
-
+
|
set xId [.c create rectangle 10 20 30 35 -tags x -fill green]
set yId [.c create rectangle 15 25 25 30 -tags y -fill red]
.c itemconfigure x -fill {} -outline black -width 3
.c itemconfigure y -outline {}
list [expr {[.c find closest 20 23.2] eq $xId}] \
[expr {[.c find closest 20 23.3] eq $yId}] \
[expr {[.c find closest 20 31.7] eq $yId}] \
[expr {[.c find closest 20 31.8] eq $xId}]
[expr {[.c find closest 20 31.8] eq $xId}]
} -cleanup {
.c delete all
} -result {1 1 1 1}
test canvRect-6.7 {RectToPoint procedure} -body {
set xId [.c create rectangle 10 20 30 40 -outline {} -fill black]
set xId [.c create rectangle 10 20 30 40 -outline {} -fill black]
set yId [.c create rectangle 40 40 50 50 -outline {} -fill black]
list [expr {[.c find closest 35 35] eq $xId}] \
[expr {[.c find closest 36 36] eq $yId}] \
[expr {[.c find closest 37 37] eq $yId}] \
[expr {[.c find closest 38 38] eq $yId}]
[expr {[.c find closest 38 38] eq $yId}]
} -cleanup {
.c delete all
} -result {1 1 1 1}
test canvRect-7.1 {RectToArea procedure} -body {
set xId [.c create rectangle 10 20 30 35 -fill green -outline {}]
|
︙ | | |
Changes to tests/canvas.test.
︙ | | |
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
|
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
|
-
-
+
+
-
+
-
+
-
+
|
.c coords 1
} {}
test canvas-12.1 {canvas mm obj, patch SF-403327, 102471} -setup {
destroy .c
pack [canvas .c]
} -body {
set qx [expr {1.+1.}]
# qx has type double and no string representation
set qx [expr {1.+1.}]
# qx has type double and no string representation
.c scale all $qx 0 1. 1.
# qx has now type MMRep and no string representation
# qx has now type MMRep and no string representation
list $qx [string length $qx]
} -result {2.0 3}
test canvas-12.2 {canvas mm obj, patch SF-403327, 102471} -setup {
destroy .c
pack [canvas .c]
} -body {
set val 10
incr val
# qx has type double and no string representation
# qx has type double and no string representation
.c scale all $val 0 1 1
# qx has now type MMRep and no string representation
# qx has now type MMRep and no string representation
incr val
} -result 12
# procedure used in 13.1 test case
proc kill_canvas {w} {
destroy $w
pack [canvas $w -height 200 -width 200] -fill both -expand yes
|
︙ | | |
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
|
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
|
-
+
|
} -returnCodes error -body {
.c create window 0
} -result {wrong # coordinates: expected 2, got 1}
test canvas-15.19 "basic coords check: centimeters are larger than pixels" -setup {
destroy .c
canvas .c
} -body {
set id [.c create rect 0 0 1cm 1cm]
set id [.c create rect 0 0 1cm 1cm]
expr {[lindex [.c coords $id] 2]>1}
} -result {1}
destroy .c
test canvas-16.1 {arc coords check} -setup {
canvas .c
} -body {
|
︙ | | |
Changes to tests/clipboard.test.
︙ | | |
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
-
+
|
clipboard append "Test"
clipboard append -t TEST "Test2"
clipboard append "Test3"
selection clear -s CLIPBOARD
clipboard get
} -cleanup {
clipboard clear
} -returnCodes error -result {CLIPBOARD selection doesn't exist or form "STRING" not defined}
} -returnCodes error -result {CLIPBOARD selection doesn't exist or form "STRING" not defined}
test clipboard-4.5 {ClipboardLostSel procedure} -setup {
clipboard clear
} -body {
clipboard append "Test"
clipboard append -t TEST "Test2"
clipboard append "Test3"
selection clear -s CLIPBOARD
|
︙ | | |
Changes to tests/clrpick.test.
︙ | | |
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
-
+
|
tk_chooseColor -initialcolor ##badbadbaadcolor
} -returnCodes error -result {invalid color name "##badbadbaadcolor"}
# tests 3.1 and 3.2 fail when individually run
# if there is no catch {tk_chooseColor -foo 1} msg
# before settin isNative
catch {tk_chooseColor -foo 1} msg
catch {tk_chooseColor -foo 1} msg
set isNative [expr {[info commands tk::dialog::color::] eq ""}]
proc ToPressButton {parent btn} {
global isNative
if {!$isNative} {
after 200 "SendButtonPress . $btn mouse"
}
|
︙ | | |
Changes to tests/cmds.test.
︙ | | |
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
-
+
|
frame .f
button .f.b -text "Test"
pack .f.b
set x init
} -body {
after 100 {set x deleted; destroy .f}
tkwait visibility .f.b
} -returnCodes {error} -result {window ".f.b" was deleted before its visibility changed}
} -returnCodes {error} -result {window ".f.b" was deleted before its visibility changed}
test cmds-1.6 {tkwait visibility, window gets deleted} -setup {
frame .f
button .f.b -text "Test"
pack .f.b
set x init
} -body {
after 100 {set x deleted; destroy .f}
|
︙ | | |
Changes to tests/color.test.
︙ | | |
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
-
+
|
set result {}
while {[gets $fd line] != -1} {
if {[string index $line 0] == "!"} continue
set rgb [c255 [winfo rgb . [lrange $line 3 end]]]
if {$rgb != [lrange $line 0 2] } {
append result $line\n
}
}
return $result
} {}
test color-2.1 {Tk_GetColor procedure} colorsFree {
c255 [winfo rgb .t #FF0000]
} {255 0 0}
|
︙ | | |
Changes to tests/config.test.
︙ | | |
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
-
+
|
killTables
option clear
} -returnCodes error -result {unknown color name "non-existent"}
test config-3.7 {Tk_InitOptions - bad initial value} -constraints {
testobjconfig
} -body {
option add *a.color non-existent
catch {testobjconfig alltypes .a}
catch {testobjconfig alltypes .a}
return $errorInfo
} -cleanup {
killTables
option clear
} -result {unknown color name "non-existent"
(database entry for "-color" in widget ".a")
invoked from within
|
︙ | | |
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
|
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
|
-
+
-
+
-
+
|
testobjconfig alltypes .foo -color {}
.foo cget -color
rename .foo {}
} -cleanup {
killTables
} -returnCodes ok
test config-4.42 {DoObjConfig - getting rid of old color} -constraints {
testobjconfig
testobjconfig
} -body {
testobjconfig alltypes .foo -color #333333
.foo configure -color #444444
} -cleanup {
killTables
} -returnCodes ok -result {32}
test config-4.43 {DoObjConfig - getting rid of old color} -constraints {
testobjconfig
testobjconfig
} -body {
testobjconfig alltypes .foo -color #333333
.foo configure -color #444444
.foo cget -color
} -cleanup {
killTables
} -returnCodes ok -result {#444444}
test config-4.44 {DoObjConfig - getting rid of old color} -constraints {
testobjconfig
testobjconfig
} -body {
testobjconfig alltypes .foo -color #333333
.foo configure -color #444444
.foo cget -color
rename .foo {}
} -cleanup {
killTables
|
︙ | | |
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
|
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
|
-
+
-
+
|
testobjconfig alltypes .foo -bitmap gray75
.foo cget -bitmap
} -cleanup {
killTables
} -returnCodes ok -result {gray75}
test config-4.55 {DoObjConfig - new bitmap} -constraints testobjconfig -body {
testobjconfig alltypes .foo -bitmap gray75
.foo configure -bitmap gray50
.foo configure -bitmap gray50
} -cleanup {
killTables
} -returnCodes ok -result {128}
test config-4.56 {DoObjConfig - new bitmap} -constraints testobjconfig -body {
testobjconfig alltypes .foo -bitmap gray75
.foo configure -bitmap gray50
.foo configure -bitmap gray50
.foo cget -bitmap
} -cleanup {
killTables
} -returnCodes ok -result {gray50}
test config-4.57 {DoObjConfig - invalid bitmap} -constraints {
testobjconfig
} -body {
|
︙ | | |
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
|
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
|
-
+
-
+
|
} -body {
testobjconfig internal .foo -border #123456
.foo cget -border
} -cleanup {
killTables
} -result {#123456}
test config-4.67 {DoObjConfig - getting rid of old border} -constraints {
testobjconfig
testobjconfig
} -body {
testobjconfig alltypes .foo -border #333333
.foo configure -border #444444
} -cleanup {
killTables
} -returnCodes ok -result {256}
test config-4.68 {DoObjConfig - getting rid of old border} -constraints {
testobjconfig
testobjconfig
} -body {
testobjconfig alltypes .foo -border #333333
.foo configure -border #444444
.foo cget -border
} -cleanup {
killTables
} -returnCodes ok -result {#444444}
|
︙ | | |
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
|
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
|
-
+
-
+
|
testobjconfig internal .foo -relief ridge
.foo cget -relief
} -cleanup {
killTables
} -result {ridge}
test config-4.73 {DoObjConfig - new relief} -constraints testobjconfig -body {
testobjconfig alltypes .foo -relief raised
.foo configure -relief flat
.foo configure -relief flat
} -cleanup {
killTables
} -returnCodes ok -result {512}
test config-4.74 {DoObjConfig - new relief} -constraints testobjconfig -body {
testobjconfig alltypes .foo -relief raised
.foo configure -relief flat
.foo configure -relief flat
.foo cget -relief
} -cleanup {
killTables
} -returnCodes ok -result {flat}
test config-4.75 {DoObjConfig - cursor} -constraints testobjconfig -body {
testobjconfig alltypes .foo -cursor arrow
|
︙ | | |
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
|
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
|
-
+
|
test config-4.91 {DoObjConfig - invalid anchor} -constraints testobjconfig -body {
testobjconfig alltypes .foo -anchor foo
} -cleanup {
killTables
} -returnCodes error -result {bad anchor "foo": must be n, ne, e, se, s, sw, w, nw, or center}
test config-4.92 {DoObjConfig - new anchor} -constraints testobjconfig -body {
testobjconfig alltypes .foo -anchor e
.foo configure -anchor n
.foo configure -anchor n
} -cleanup {
killTables
} -returnCodes ok -result {4096}
test config-4.93 {DoObjConfig - new anchor} -constraints testobjconfig -body {
testobjconfig alltypes .foo -anchor e
.foo configure -anchor n
.foo cget -anchor
|
︙ | | |
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
|
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
|
-
+
|
testobjconfig twowindows .foo -window .bar
.foo cget -window
} -cleanup {
killTables
} -returnCodes ok -result {.bar}
test config-4.103 {DoObjConfig - invalid window} -constraints testobjconfig -body {
toplevel .bar
testobjconfig twowindows .foo -window foo
testobjconfig twowindows .foo -window foo
} -cleanup {
killTables
} -returnCodes error -result {bad window path name "foo"}
test config-4.104 {DoObjConfig - null window} -constraints testobjconfig -body {
toplevel .bar
testobjconfig twowindows .foo -window {}
} -cleanup {
|
︙ | | |
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
|
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
|
-
+
-
+
-
+
-
+
|
test config-7.3 {Tk_SetOptions - synonym} -constraints testobjconfig -body {
.a configure -synonym blue
.a cget -color
} -result {blue}
test config-7.4 {Tk_SetOptions - missing value} -constraints {
testobjconfig
} -body {
.a configure -color green -relief
.a configure -color green -relief
} -returnCodes error -result {value for "-relief" missing}
test config-7.5 {Tk_SetOptions - missing value} -constraints {
testobjconfig
} -body {
catch {.a configure -color green -relief}
catch {.a configure -color green -relief}
.a cget -color
} -result {green}
test config-7.6 {Tk_SetOptions - saving old values} -constraints {
testobjconfig
} -body {
.a configure -color red -int 7 -relief raised -double 3.14159
.a csave -color green -int 432 -relief sunken -double 2.0 -color bogus
.a csave -color green -int 432 -relief sunken -double 2.0 -color bogus
} -returnCodes error -result {unknown color name "bogus"}
test config-7.7 {Tk_SetOptions - saving old values} -constraints {
testobjconfig
} -body {
.a configure -color red -int 7 -relief raised -double 3.14159
catch {.a csave -color green -int 432 -relief sunken -double 2.0 -color bogus}
list [.a cget -color] [.a cget -int] [.a cget -relief] [.a cget -double]
} -result {red 7 raised 3.14159}
test config-7.8 {Tk_SetOptions - error in DoObjConfig call} -constraints {
testobjconfig
} -body {
.a configure -color bogus
.a configure -color bogus
} -returnCodes error -result {unknown color name "bogus"}
test config-7.9 {Tk_SetOptions - error in DoObjConfig call} -constraints {
testobjconfig
} -body {
catch {.a configure -color bogus}
return $errorInfo
} -result {unknown color name "bogus"
|
︙ | | |
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
|
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
|
-
+
|
".a configure -synonym bogus"}
test config-7.12 {Tk_SetOptions - returning mask} -constraints testobjconfig -body {
format %x [.a configure -color red -int 7 -relief raised -double 3.14159]
} -result {226}
test config-7.13 {Tk_SetOptions - error in DoObjConfig with custom option} -constraints {
testobjconfig
} -body {
.a configure -custom bad
.a configure -custom bad
} -returnCodes error -result {expected good value, got "BAD"}
test config-7.14 {Tk_SetOptions - error in DoObjConfig with custom option} -constraints {
testobjconfig
} -body {
catch {.a configure -custom bad}
return $errorInfo
} -result {expected good value, got "BAD"
|
︙ | | |
Changes to tests/cursor.test.
︙ | | |
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
-
+
|
set wincur(file) ""
} -body {
setWincur wincur
button .b -cursor [list @$wincur(file)]
} -cleanup {
destroy .b
removeDirectory $wincur(dir)
unset wincur
unset wincur
} -result {.b}
test cursor-2.4 {Tk_GetCursor procedure: cursor specs are lists} -constraints {
win
} -setup {
unset -nocomplain wincur
set wincur(file) ""
} -body {
|
︙ | | |
Changes to tests/entry.test.
︙ | | |
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
-
+
|
tcltest::loadTestedCommands
# For xscrollcommand
proc scroll args {
global scrollInfo
set scrollInfo $args
}
# For trace variable
# For trace variable
proc override args {
global x
set x 12345
}
# Procedures used in widget VALIDATION tests
proc doval {W d i P s S v V} {
|
︙ | | |
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
-
+
|
test entry-1.7 {configuration option: "borderwidth" for entry} -setup {
entry .e -highlightthickness 2 -font {Helvetica -12 bold}
pack .e
update
} -body {
.e configure -borderwidth 1.3
.e cget -borderwidth
.e cget -borderwidth
} -cleanup {
destroy .e
} -result {1}
test entry-1.8 {configuration option: "borderwidth" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .e
update
|
︙ | | |
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
-
+
-
+
|
} -body {
.e configure -fg non-existent
} -cleanup {
destroy .e
} -returnCodes {error} -result {unknown color name "non-existent"}
test entry-1.19 {configuration option: "font" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2
entry .e -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e configure -font {Helvetica -12}
.e cget -font
} -cleanup {
destroy .e
} -result {Helvetica -12}
test entry-1.20 {configuration option: "font" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2
entry .e -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e configure -font {}
} -cleanup {
destroy .e
} -returnCodes {error} -result {font "" doesn't exist}
|
︙ | | |
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
|
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
entry .e
} -cleanup {
destroy .e
} -result {.e}
test entry-3.1 {EntryWidgetCmd procedure} -setup {
entry .e
entry .e
pack .e
update
} -body {
.e
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e option ?arg ...?"}
test entry-3.2 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e bbox
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e bbox index"}
test entry-3.3 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e bbox a b
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e bbox index"}
test entry-3.4 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
entry .e
entry .e
pack .e
update
} -body {
.e bbox bogus
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "bogus"}
test entry-3.5 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e bbox 0
} -cleanup {
destroy .e
} -result [list 5 5 0 $cy]
# Previously the result was count using previousli counted font measurements
# Previously the result was count using previousli counted font measurements
# and metrics. It was changed to less verbose solution - the result is the one
# that passes fonts constraint (this concerns tests 3.6, 3.7, 3.8, 3.10)
test entry-3.6 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
# Tcl_UtfAtIndex(): no utf chars
.e insert 0 "abc"
list [.e bbox 3] [.e bbox end]
} -cleanup {
destroy .e
} -result {{19 5 7 13} {19 5 7 13}}
test entry-3.7 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
# Tcl_UtfAtIndex(): utf at end
.e insert 0 "ab\u4e4e"
.e bbox end
} -cleanup {
destroy .e
} -result {19 5 12 13}
test entry-3.8 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
# Tcl_UtfAtIndex(): utf before index
.e insert 0 "ab\u4e4ec"
.e bbox 3
} -cleanup {
destroy .e
} -result {31 5 7 13}
test entry-3.9 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
# Tcl_UtfAtIndex(): no chars
.e bbox end
} -cleanup {
destroy .e
} -result "5 5 0 $cy"
test entry-3.10 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert 0 "abcdefghij\u4e4eklmnop"
list [.e bbox 0] [.e bbox 1] [.e bbox 10] [.e bbox end]
} -cleanup {
destroy .e
} -result {{5 5 7 13} {12 5 7 13} {75 5 12 13} {122 5 7 13}}
test entry-3.11 {EntryWidgetCmd procedure, "cget" widget command} -setup {
entry .e
entry .e
} -body {
.e cget
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e cget option"}
test entry-3.12 {EntryWidgetCmd procedure, "cget" widget command} -setup {
entry .e
entry .e
} -body {
.e cget a b
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e cget option"}
test entry-3.13 {EntryWidgetCmd procedure, "cget" widget command} -setup {
entry .e
entry .e
} -body {
.e cget -gorp
} -cleanup {
destroy .e
} -returnCodes error -result {unknown option "-gorp"}
test entry-3.14 {EntryWidgetCmd procedure, "cget" widget command} -setup {
entry .e
entry .e
} -body {
.e configure -bd 4
.e cget -bd
} -cleanup {
destroy .e
} -result {4}
test entry-3.15 {EntryWidgetCmd procedure, "configure" widget command} -setup {
entry .e
entry .e
pack .e
update
} -body {
llength [.e configure]
} -cleanup {
destroy .e
} -result {36}
test entry-3.16 {EntryWidgetCmd procedure, "configure" widget command} -setup {
entry .e
entry .e
} -body {
.e configure -foo
} -cleanup {
destroy .e
} -returnCodes error -result {unknown option "-foo"}
test entry-3.17 {EntryWidgetCmd procedure, "configure" widget command} -setup {
entry .e
entry .e
} -body {
.e configure -bd 4
.e configure -bg #ffffff
lindex [.e configure -bd] 4
} -cleanup {
destroy .e
} -result {4}
test entry-3.18 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
entry .e
} -body {
.e delete
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e delete firstIndex ?lastIndex?"}
test entry-3.19 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
entry .e
} -body {
.e delete a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e delete firstIndex ?lastIndex?"}
test entry-3.20 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
entry .e
} -body {
.e delete foo
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "foo"}
test entry-3.21 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
entry .e
} -body {
.e delete 0 bar
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "bar"}
test entry-3.22 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e delete 2 4
.e get
} -cleanup {
destroy .e
} -result {014567890}
test entry-3.23 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
entry .e
} -body {
.e insert end "01234567890"
.e delete 6
.e get
} -cleanup {
destroy .e
} -result {0123457890}
test entry-3.24 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
pack .e
update
update
set x {}
} -body {
# UTF
.e insert end "01234\u4e4e67890"
.e delete 6
lappend x [.e get]
.e delete 0 end
.e insert end "012345\u4e4e7890"
.e delete 6
lappend x [.e get]
.e delete 0 end
.e insert end "0123456\u4e4e890"
.e delete 6
lappend x [.e get]
} -cleanup {
destroy .e
} -result [list "01234\u4e4e7890" "0123457890" "012345\u4e4e890"]
test entry-3.25 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e delete 6 5
.e get
} -cleanup {
destroy .e
} -result {01234567890}
test entry-3.26 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e configure -state disabled
.e delete 2 8
.e configure -state normal
.e get
} -cleanup {
destroy .e
} -result {01234567890}
test entry-3.26a {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e configure -state readonly
.e delete 2 8
.e configure -state normal
.e get
} -cleanup {
destroy .e
} -result {01234567890}
test entry-3.27 {EntryWidgetCmd procedure, "get" widget command} -setup {
entry .e
entry .e
} -body {
.e get foo
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e get"}
test entry-3.28 {EntryWidgetCmd procedure, "icursor" widget command} -setup {
entry .e
entry .e
} -body {
.e icursor
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e icursor pos"}
test entry-3.29 {EntryWidgetCmd procedure, "icursor" widget command} -setup {
entry .e
entry .e
} -body {
.e icursor foo
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "foo"}
test entry-3.30 {EntryWidgetCmd procedure, "icursor" widget command} -setup {
entry .e
entry .e
} -body {
.e insert end "01234567890"
.e icursor 4
.e index insert
} -cleanup {
destroy .e
} -result {4}
test entry-3.31 {EntryWidgetCmd procedure, "index" widget command} -setup {
entry .e
entry .e
} -body {
.e in
} -cleanup {
destroy .e
} -returnCodes error -result {ambiguous option "in": must be bbox, cget, configure, delete, get, icursor, index, insert, scan, selection, validate, or xview}
test entry-3.32 {EntryWidgetCmd procedure, "index" widget command} -setup {
entry .e
entry .e
} -body {
.e index
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e index string"}
test entry-3.33 {EntryWidgetCmd procedure, "index" widget command} -setup {
entry .e
entry .e
} -body {
.e index foo
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "foo"}
test entry-3.34 {EntryWidgetCmd procedure, "index" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e index 0
} -cleanup {
destroy .e
} -returnCodes {ok} -match glob -result {*}
test entry-3.35 {EntryWidgetCmd procedure, "index" widget command} -setup {
entry .e
pack .e
update
update
} -body {
# UTF
.e insert 0 abc\u4e4e\u0153def
list [.e index 3] [.e index 4] [.e index end]
} -cleanup {
destroy .e
} -result {3 4 8}
test entry-3.36 {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
entry .e
} -body {
.e insert a
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test entry-3.37 {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
entry .e
} -body {
.e insert a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test entry-3.38 {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
entry .e
} -body {
.e insert foo Text
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "foo"}
test entry-3.39 {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e insert 3 xxx
.e get
} -cleanup {
destroy .e
} -result {012xxx34567890}
test entry-3.40 {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e configure -state disabled
.e insert 3 xxx
.e configure -state normal
.e get
} -cleanup {
destroy .e
} -result {01234567890}
test entry-3.40a {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e configure -state readonly
.e insert 3 xxx
.e configure -state normal
.e get
} -cleanup {
destroy .e
} -result {01234567890}
test entry-3.41 {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
entry .e
} -body {
.e insert a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test entry-3.42 {EntryWidgetCmd procedure, "scan" widget command} -setup {
entry .e
entry .e
pack .e
update
} -body {
.e scan a
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e scan mark|dragto x"}
test entry-3.43 {EntryWidgetCmd procedure, "scan" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e scan a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e scan mark|dragto x"}
test entry-3.44 {EntryWidgetCmd procedure, "scan" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e scan foobar 20
} -cleanup {
destroy .e
} -returnCodes error -result {bad scan option "foobar": must be mark or dragto}
test entry-3.45 {EntryWidgetCmd procedure, "scan" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e scan mark 20.1
} -cleanup {
destroy .e
} -returnCodes error -result {expected integer but got "20.1"}
# This test is non-portable because character sizes vary.
test entry-3.46 {EntryWidgetCmd procedure, "scan" widget command} -constraints {
fonts
} -setup {
entry .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long string, in fact a "
.e insert end "very very long string"
.e scan mark 30
.e scan dragto 28
.e index @0
} -cleanup {
destroy .e
} -result {2}
test entry-3.47 {EntryWidgetCmd procedure, "select" widget command} -setup {
entry .e
entry .e
} -body {
.e select
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e selection option ?index?"}
test entry-3.48 {EntryWidgetCmd procedure, "select" widget command} -setup {
entry .e
entry .e
} -body {
.e select foo
} -cleanup {
destroy .e
} -returnCodes error -result {bad selection option "foo": must be adjust, clear, from, present, range, or to}
test entry-3.49 {EntryWidgetCmd procedure, "select clear" widget command} -setup {
entry .e
entry .e
} -body {
.e select clear gorp
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e selection clear"}
test entry-3.50 {EntryWidgetCmd procedure, "select clear" widget command} -setup {
entry .e
entry .e
} -body {
.e insert end "0123456789"
.e select from 1
.e select to 4
update
.e select clear
selection get
selection get
} -cleanup {
destroy .e
} -returnCodes error -result {PRIMARY selection doesn't exist or form "STRING" not defined}
test entry-3.50.1 {EntryWidgetCmd procedure, "select clear" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e insert end "0123456789"
.e select from 1
.e select to 4
update
.e select clear
catch {selection get}
selection own
} -cleanup {
destroy .e
} -result {.e}
test entry-3.51 {EntryWidgetCmd procedure, "selection present" widget command} -setup {
entry .e
entry .e
} -body {
.e selection present foo
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e selection present"}
test entry-3.52 {EntryWidgetCmd procedure, "selection present" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e insert end 0123456789
.e select from 3
.e select to 6
.e selection present
} -cleanup {
destroy .e
} -result {1}
test entry-3.53 {EntryWidgetCmd procedure, "selection present" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e insert end 0123456789
.e select from 3
.e select to 6
.e configure -exportselection false
.e selection present
} -cleanup {
destroy .e
} -result {1}
test entry-3.54 {EntryWidgetCmd procedure, "selection present" widget command} -setup {
entry .e
pack .e
update
update
} -body {
.e insert end 0123456789
.e select from 3
.e select to 6
.e delete 0 end
.e selection present
} -cleanup {
|
︙ | | |
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
|
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
} -body {
.e select to 2 3
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e selection to index"}
test entry-3.65 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview 5
format {%.7f %.7f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.0537634 0.2688172}
test entry-3.66 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e xview gorp
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "gorp"}
test entry-3.67 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview 0
.e icursor 10
.e xview insert
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.107527 0.322581}
test entry-3.68 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e xview moveto foo bar
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e xview moveto fraction"}
test entry-3.69 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e xview moveto foo
} -cleanup {
destroy .e
} -returnCodes error -result {expected floating-point number but got "foo"}
test entry-3.70 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview moveto 0.5
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.505376 0.720430}
test entry-3.71 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview scroll 24
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e xview scroll number units|pages"}
test entry-3.72 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview scroll gorp units
} -cleanup {
destroy .e
} -returnCodes error -result {expected integer but got "gorp"}
test entry-3.73 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview moveto 0
.e xview scroll 1 pages
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.193548 0.408602}
test entry-3.74 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview moveto .9
update
.e xview scroll -2 p
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.397849 0.612903}
test entry-3.75 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview 30
update
.e xview scroll 2 units
.e xview scroll 2 units
.e index @0
} -cleanup {
destroy .e
} -result {32}
test entry-3.76 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview 30
update
.e xview scroll -1 units
.e xview scroll -1 units
.e index @0
} -cleanup {
destroy .e
} -result {29}
test entry-3.77 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview scroll 23 foobars
} -cleanup {
destroy .e
} -returnCodes error -result {bad argument "foobars": must be units or pages}
test entry-3.78 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview eat 23 hamburgers
} -cleanup {
destroy .e
} -returnCodes error -result {unknown option "eat": must be moveto or scroll}
test entry-3.79 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview 0
update
.e xview -4
.e index @0
} -cleanup {
destroy .e
} -result {0}
test entry-3.80 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview 300
.e index @0
} -cleanup {
destroy .e
} -result {73}
test entry-3.86 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e insert 10 \u4e4e
update
# UTF
|
︙ | | |
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
|
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
|
-
+
|
.e xview moveto .12
lappend x [format {%.6f} [lindex [.e xview] 0]]
} -cleanup {
destroy .e
} -result {0.095745 0.106383 0.117021}
test entry-3.82 {EntryWidgetCmd procedure} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e gorp
} -cleanup {
destroy .e
} -returnCodes error -result {bad option "gorp": must be bbox, cget, configure, delete, get, icursor, index, insert, scan, selection, validate, or xview}
|
︙ | | |
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
|
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
|
-
+
|
trace variable x w override
.e insert 0 "Some text"
.e configure -textvariable x
list $x [.e get]
} -cleanup {
destroy .e
trace vdelete x w override
unset x;
unset x;
} -result {12345 12345}
test entry-5.5 {ConfigureEntry procedure} -setup {
set x {}
entry .e1
entry .e2
} -body {
|
︙ | | |
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
|
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
|
-
+
-
+
-
+
-
+
-
+
|
.e1 configure -exportselection 1
lappend x [selection get]
return $x
} -cleanup {
destroy .e1 .e2
} -result {{This is so} {This is so} 1234}
test entry-5.6 {ConfigureEntry procedure} -setup {
entry .e
entry .e
pack .e
} -body {
.e insert end "0123456789"
.e select from 1
.e select to 5
.e configure -exportselection 0
selection get
selection get
} -cleanup {
destroy .e
} -returnCodes error -result {PRIMARY selection doesn't exist or form "STRING" not defined}
test entry-5.6.1 {ConfigureEntry procedure} -setup {
entry .e
pack .e
} -body {
.e insert end "0123456789"
.e select from 1
.e select to 5
.e configure -exportselection 0
catch {selection get}
catch {selection get}
list [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {1 5}
test entry-5.7 {ConfigureEntry procedure} -setup {
entry .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
entry .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e configure -font {Courier -12} -width 4 -xscrollcommand scroll
.e insert end "01234567890"
update
.e configure -width 5
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
} -result {0.000000 0.363636}
test entry-5.8 {ConfigureEntry procedure} -constraints {
fonts
} -setup {
entry .e -borderwidth 2 -highlightthickness 2
entry .e -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e configure -width 0 -font {Helvetica -12}
.e insert end "0123"
update
.e configure -font {Helvetica -24}
update
|
︙ | | |
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
|
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
|
-
+
-
+
-
+
-
+
-
+
-
+
|
} -result {}
# No tests for DisplayEntry.
test entry-6.1 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
entry .e
entry .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 \
-highlightthickness 3
.e insert end 012\t45
update
list [.e index @61] [.e index @62]
} -cleanup {
destroy .e
} -result {3 4}
test entry-6.2 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
entry .e
entry .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 \
-justify center -highlightthickness 3
.e insert end 012\t45
update
list [.e index @96] [.e index @97]
} -cleanup {
destroy .e
} -result {3 4}
test entry-6.3 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
entry .e
entry .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 \
-justify right -highlightthickness 3
.e insert end 012\t45
update
list [.e index @131] [.e index @132]
} -cleanup {
destroy .e
} -result {3 4}
test entry-6.4 {EntryComputeGeometry procedure} -setup {
entry .e
entry .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 5
.e insert end "01234567890"
update
.e xview 6
.e index @0
} -cleanup {
destroy .e
} -result {6}
test entry-6.5 {EntryComputeGeometry procedure} -setup {
entry .e -highlightthickness 2
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 5
.e configure -font {Courier -12} -bd 2 -relief raised -width 5
.e insert end "01234567890"
update
.e xview 7
.e index @0
} -cleanup {
destroy .e
} -result {6}
test entry-6.6 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
entry .e -highlightthickness 2
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 10
.e configure -font {Courier -12} -bd 2 -relief raised -width 10
.e insert end "01234\t67890"
update
.e xview 3
list [.e index @39] [.e index @40]
} -cleanup {
destroy .e
} -result {5 6}
|
︙ | | |
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
|
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
|
-
+
-
+
|
} -result {116 39}
test entry-6.9 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
entry .e -highlightthickness 2
pack .e
} -body {
.e configure -font {Helvetica -24} -bd 3 -relief raised -width 0
.e configure -font {Helvetica -24} -bd 3 -relief raised -width 0
update
list [winfo reqwidth .e] [winfo reqheight .e]
} -cleanup {
destroy .e
} -result {25 39}
test entry-6.10 {EntryComputeGeometry procedure} -constraints {
unix fonts
unix fonts
} -setup {
entry .e -highlightthickness 2 -font {Helvetica -12}
pack .e
} -body {
.e configure -bd 1 -relief raised -width 0 -show .
.e insert 0 12345
update
|
︙ | | |
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
|
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
|
-
+
-
-
+
+
|
list [.e index @80] [.e index @81] [.e index @115] [.e index @116]
} -cleanup {
destroy .e
} -result {6 7 7 8}
test entry-7.1 {InsertChars procedure} -setup {
unset -nocomplain contents
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e insert 2 XXX
update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
} -result {abXXXcde abXXXcde {0.000000 1.000000}}
test entry-7.2 {InsertChars procedure} -setup {
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e insert 500 XXX
update
|
︙ | | |
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
|
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
set x "[.e index sel.first] [.e index sel.last]"
.e select to 5
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {2 6 2 5}
test entry-7.7 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -xscrollcommand scroll
.e insert 0 0123456789
.e icursor 4
.e insert 4 XXX
.e index insert
} -cleanup {
destroy .e
} -result {7}
test entry-7.8 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 0123456789
.e icursor 4
.e insert 5 XXX
.e index insert
} -cleanup {
destroy .e
} -result {4}
test entry-7.9 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 "This is a very long string"
update
.e xview 4
.e insert 3 XXX
.e index @0
} -cleanup {
destroy .e
} -result {7}
test entry-7.10 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 "This is a very long string"
update
.e xview 4
.e insert 4 XXX
.e index @0
} -cleanup {
destroy .e
} -result {4}
test entry-7.11 {InsertChars procedure} -constraints {
fonts
} -setup {
entry .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 "xyzzy"
update
.e insert 2 00
winfo reqwidth .e
} -cleanup {
destroy .e
} -result {59}
test entry-8.1 {DeleteChars procedure} -setup {
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e delete 2 4
update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
} -result {abe abe {0.000000 1.000000}}
test entry-8.2 {DeleteChars procedure} -setup {
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e delete -2 2
update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
} -result {cde cde {0.000000 1.000000}}
test entry-8.3 {DeleteChars procedure} -setup {
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e delete 3 1000
update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
} -result {abc abc {0.000000 1.000000}}
test entry-8.4 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 3
.e select to 8
.e delete 1 3
update
set x "[.e index sel.first] [.e index sel.last]"
.e select to 5
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {1 6 1 5}
test entry-8.5 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 3
.e select to 8
.e delete 1 4
update
set x "[.e index sel.first] [.e index sel.last]"
.e select to 4
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {1 5 1 4}
test entry-8.6 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 3
.e select to 8
.e delete 1 7
update
set x "[.e index sel.first] [.e index sel.last]"
.e select to 5
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {1 2 1 5}
test entry-8.7 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 3
.e select to 8
.e delete 1 8
update
.e index sel.first
} -cleanup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
test entry-8.8 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 3
.e select to 8
.e delete 3 7
update
set x "[.e index sel.first] [.e index sel.last]"
.e select to 8
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {3 4 3 8}
test entry-8.9 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 0123456789abcde
.e select from 3
.e select to 8
.e delete 3 8
update
.e index sel.first
} -cleanup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
test entry-8.10 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 8
.e select to 3
.e delete 5 8
update
set x "[.e index sel.first] [.e index sel.last]"
.e select to 8
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {3 5 5 8}
test entry-8.11 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 8
.e select to 3
.e delete 8 10
update
set x "[.e index sel.first] [.e index sel.last]"
.e select to 4
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {3 8 4 8}
test entry-8.12 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e icursor 4
.e delete 1 4
update
.e index insert
} -cleanup {
destroy .e
} -result {1}
test entry-8.13 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e icursor 4
.e delete 1 5
update
.e index insert
} -cleanup {
destroy .e
} -result {1}
test entry-8.14 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e icursor 4
.e delete 4 6
update
.e index insert
} -cleanup {
destroy .e
} -result {4}
test entry-8.15 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 "This is a very long string"
.e xview 4
.e delete 1 4
update
.e index @0
} -cleanup {
destroy .e
} -result {1}
test entry-8.16 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 "This is a very long string"
.e xview 4
.e delete 1 5
update
.e index @0
} -cleanup {
destroy .e
} -result {1}
test entry-8.17 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 "This is a very long string"
.e xview 4
.e delete 4 6
update
.e index @0
} -cleanup {
destroy .e
} -result {4}
test entry-8.18 {DeleteChars procedure} -setup {
entry .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
entry .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 "xyzzy"
update
.e delete 2 4
winfo reqwidth .e
|
︙ | | |
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
|
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
test entry-10.1 {EntrySetValue procedure} -constraints fonts -body {
set x abcde
set y ab
entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2 -width 0
pack .e
.e configure -textvariable x
.e configure -textvariable x
.e configure -textvariable y
update
list [.e get] [winfo reqwidth .e]
} -cleanup {
destroy .e
} -result {ab 24}
test entry-10.2 {EntrySetValue procedure, updating selection} -setup {
unset -nocomplain x
entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -textvariable x
.e insert 0 "abcdefghjklmnopqrstu"
.e selection range 4 10
set x "a"
.e index sel.first
} -cleanup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
test entry-10.3 {EntrySetValue procedure, updating selection} -setup {
unset -nocomplain x
entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -textvariable x
.e insert 0 "abcdefghjklmnopqrstu"
.e selection range 4 10
set x "abcdefg"
list [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {4 7}
test entry-10.4 {EntrySetValue procedure, updating selection} -setup {
unset -nocomplain x
entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -textvariable x
.e insert 0 "abcdefghjklmnopqrstu"
.e selection range 4 10
set x "abcdefghijklmn"
list [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {4 10}
test entry-10.5 {EntrySetValue procedure, updating display position} -setup {
unset -nocomplain x
entry .e -highlightthickness 2 -bd 2
entry .e -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
.e insert 0 "abcdefghjklmnopqrstuvwxyz"
.e xview 10
update
set x "abcdefg"
update
.e index @0
} -cleanup {
destroy .e
} -result {0}
test entry-10.6 {EntrySetValue procedure, updating display position} -setup {
unset -nocomplain x
entry .e -highlightthickness 2 -bd 2
entry .e -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
pack .e
.e insert 0 "abcdefghjklmnopqrstuvwxyz"
.e xview 10
update
set x "1234567890123456789012"
update
.e index @0
} -cleanup {
destroy .e
} -result {10}
test entry-10.7 {EntrySetValue procedure, updating insertion cursor} -setup {
unset -nocomplain x
entry .e -highlightthickness 2 -bd 2
entry .e -highlightthickness 2 -bd 2
pack .e
update
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
pack .e
.e insert 0 "abcdefghjklmnopqrstuvwxyz"
.e icursor 5
set x "123"
.e index insert
} -cleanup {
destroy .e
} -result {3}
test entry-10.8 {EntrySetValue procedure, updating insertion cursor} -setup {
unset -nocomplain x
entry .e -highlightthickness 2 -bd 2
entry .e -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
pack .e
.e insert 0 "abcdefghjklmnopqrstuvwxyz"
.e icursor 5
set x "123456"
|
︙ | | |
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
|
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
|
-
+
|
.e xview 4
update
.e index end
} -cleanup {
destroy .e
} -result {21}
test entry-13.2 {GetEntryIndex procedure} -body {
entry .e
entry .e
.e index abogus
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "abogus"}
test entry-13.3 {GetEntryIndex procedure} -setup {
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
|
︙ | | |
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
|
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
|
-
+
-
+
-
+
-
+
|
test entry-13.10 {GetEntryIndex procedure} -constraints unix -body {
# On unix, when selection is cleared, entry widget's internal
# On unix, when selection is cleared, entry widget's internal
# selection range is reset.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e select from 1
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
.e index sel.first
} -cleanup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
test entry-13.11 {GetEntryIndex procedure} -constraints win -body {
# On mac and pc, when selection is cleared, entry widget remembers
# last selected range. When selection ownership is restored to
# last selected range. When selection ownership is restored to
# entry, the old range will be rehighlighted.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e select from 1
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
catch {selection get}
.e index sel.first
} -cleanup {
destroy .e
} -result {1}
} -result {1}
test entry-13.12 {GetEntryIndex procedure} -constraints unix -body {
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e select from 1
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
.e index sbogus
} -cleanup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
# why when string in .e index changed to not beginning with s,
# why when string in .e index changed to not beginning with s,
# it behaves differently?
test entry-13.12.1 {GetEntryIndex procedure} -constraints unix -body {
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
|
︙ | | |
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
|
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
|
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
|
.e index sbogus
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "sbogus"}
test entry-13.14 {GetEntryIndex procedure} -constraints win -body {
# On mac and pc, when selection is cleared, entry widget remembers
# last selected range. When selection ownership is restored to
# last selected range. When selection ownership is restored to
# entry, the old range will be rehighlighted.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e select from 1
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
selection get
} -cleanup {
destroy .e
} -returnCodes error -match glob -result {*}
test entry-13.14.1 {GetEntryIndex procedure} -constraints win -body {
# On mac and pc, when selection is cleared, entry widget remembers
# last selected range. When selection ownership is restored to
# entry, the old range will be rehighlighted.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e select from 1
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
selection get
} -cleanup {
destroy .e
} -returnCodes error -match glob -result {*}
test entry-13.14.1 {GetEntryIndex procedure} -constraints win -body {
# On mac and pc, when selection is cleared, entry widget remembers
# last selected range. When selection ownership is restored to
# entry, the old range will be rehighlighted.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e select from 1
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
catch {selection get}
.e index sbogus
catch {selection get}
.e index sbogus
} -cleanup {
destroy .e
} -returnCodes error -match glob -result {*}
test entry-13.15 {GetEntryIndex procedure} -body {
entry .e
selection clear .e
.e index @xyz
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "@xyz"}
test entry-13.16 {GetEntryIndex procedure} -constraints fonts -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index @4
} -cleanup {
destroy .e
|
︙ | | |
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
|
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
|
-
+
|
update
.e index @12
} -cleanup {
destroy .e
} -result {5}
test entry-13.19 {GetEntryIndex procedure} -constraints fonts -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index @[expr {[winfo width .e] - 6}]
} -cleanup {
destroy .e
|
︙ | | |
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
|
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
|
-
+
-
+
-
+
-
+
|
.e xview 4
update
.e index @1000
} -cleanup {
destroy .e
} -result {9}
test entry-13.22 {GetEntryIndex procedure} -setup {
entry .e
entry .e
pack .e
update
} -body {
.e index 1xyz
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "1xyz"}
test entry-13.23 {GetEntryIndex procedure} -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index -10
} -cleanup {
destroy .e
} -result {0}
test entry-13.24 {GetEntryIndex procedure} -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index 12
} -cleanup {
destroy .e
} -result {12}
test entry-13.25 {GetEntryIndex procedure} -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index 49
} -cleanup {
destroy .e
|
︙ | | |
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
|
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
|
-
+
|
test entry-14.3 {EntryFetchSelection procedure} -setup {
set x {}
for {set i 1} {$i <= 500} {incr i} {
append x "This is line $i, out of 500\n"
}
} -body {
entry .e
.e insert end $x
.e insert end $x
.e select from 0
.e select to end
string compare [selection get] $x
} -cleanup {
destroy .e
} -result {0}
|
︙ | | |
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
|
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
|
-
+
|
} -result {Text Text}
# is scrollcommand needed here??
test entry-16.1 {EntryVisibleRange procedure} -constraints fonts -body {
entry .e -width 10 -font {Helvetica -12}
pack .e
update
.e insert 0 "............................."
.e insert 0 "............................."
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.000000 0.827586}
test entry-16.2 {EntryVisibleRange procedure} -constraints {
unix fonts
} -body {
|
︙ | | |
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
|
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
|
-
+
|
} -body {
set l [interp hidden]
interp hide {} .e
destroy .e
set res1 [list [winfo children .] [interp hidden]]
set res2 [list {} $l]
expr {$res1 == $res2}
} -result {1}
} -result {1}
##
## Entry widget VALIDATION tests
##
# The validation tests build each one upon the previous, so cascading
# failures aren't good
#
|
︙ | | |
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
|
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
|
-
+
|
entry .e -validate all \
-validatecommand [list doval3 %W %d %i %P %s %S %v %V] \
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
pack .e
set ::e nextdata ;# previous settings
.e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V]
.e validate
list [.e cget -validate] [.e get] $::vVals
} -cleanup {
destroy .e
} -result {none mydata {.e -1 -1 nextdata nextdata {} all forced}}
|
︙ | | |
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
|
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
|
-
+
|
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
pack .e
set ::e nextdata ;# previous settings
.e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V] ;# prev
.e validate ;# previous settings
.e configure -validate all
set ::e testdata
list [.e cget -validate] [.e get] $::e $::vVals
} -cleanup {
destroy .e
} -result {all testdata mydata {.e -1 -1 testdata mydata {} all forced}}
##
|
︙ | | |
Changes to tests/event.test.
︙ | | |
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
|
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
|
-
+
|
# Click down to set the insert cursor position
event generate $e <Enter>
event generate $e <ButtonPress-1> -x $anchor_x -y $anchor_y
# Save the position of the insert cursor
lappend result [$e index insert]
# Now drag until selend is highlighted, then click up
set current $anchor
while {[$e compare $current <= $selend]} {
foreach {current_x current_y} [_text_ind_to_x_y $e $current] break
event generate $e <B1-Motion> -x $current_x -y $current_y
set current [$e index [list $current + 1 char]]
|
︙ | | |
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
|
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
|
-
+
|
# Click down to set the insert cursor position
event generate $e <Enter>
event generate $e <ButtonPress-1> -x $anchor_x -y $anchor_y
# Save the position of the insert cursor
lappend result [$e index insert]
# Now drag until selend is highlighted, then click up
set current $anchor
while {$current <= $selend} {
foreach {current_x current_y} [_text_ind_to_x_y $e $current] break
event generate $e <B1-Motion> -x $current_x -y $current_y
incr current
|
︙ | | |
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
|
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
|
-
+
|
lappend result [$e index insert]
return $result
} -cleanup {
deleteWindows
} -result {select 11 7 select 4 { select} {Word select} 2}
test event-5.1(triple-click-drag) {Triple click and drag across lines in a
test event-5.1(triple-click-drag) {Triple click and drag across lines in a
text widget, this should extend the selection to the new line} -setup {
deleteWindows
} -body {
set t [toplevel .t]
set e [text $t.e]
pack $e
tkwait visibility $e
|
︙ | | |
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
|
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
|
-
+
|
_pause 50
event generate $e <ButtonRelease-1> -x $left_x -y $left_y
_pause 50
set result [list]
lappend result [$e index insert]
lappend result [_get_selection $e]
# Clear selection by clicking at 0,0
event generate $e <ButtonPress-1> -x 0 -y 0
_pause 50
event generate $e <ButtonRelease-1> -x 0 -y 0
_pause 50
|
︙ | | |
Changes to tests/filebox.test.
︙ | | |
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
-
+
|
test filebox-1.1-$mode "tk_getOpenFile command" -body {
tk_getOpenFile -foo
} -returnCodes error -result $unknownOptionsMsg(tk_getOpenFile)
catch {tk_getOpenFile -foo 1} msg
regsub -all , $msg "" options
regsub \"-foo\" $options "" options
foreach option $options {
if {[string index $option 0] eq "-"} {
test filebox-1.2-$mode$option "tk_getOpenFile command" -body {
tk_getOpenFile $option
} -returnCodes error -result "value for \"$option\" missing"
}
}
|
︙ | | |
Changes to tests/focus.test.
︙ | | |
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
-
+
|
test focus-1.6 {Tk_FocusCmd procedure} -constraints unix -body {
focus .gorp
} -returnCodes error -result {bad window path name ".gorp"}
test focus-1.7 {Tk_FocusCmd procedure} -constraints unix -body {
focus .gorp a
} -returnCodes error -result {bad option ".gorp": must be -displayof, -force, or -lastfor}
test focus-1.8 {Tk_FocusCmd procedure, focussing on dead window} -constraints {
unix
unix
} -setup {
destroy .t2
} -body {
focusClear
toplevel .t2
wm geom .t2 +10+10
frame .t2.f -width 200 -height 100 -bd 2 -relief raised
|
︙ | | |
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
-
+
-
+
-
+
-
+
-
+
|
lappend x [focus]
destroy .t2
return $x
} -cleanup {
destroy .t2
} -result {.t2.f2 .t2 .t2}
test focus-1.9 {Tk_FocusCmd procedure, -displayof option} -constraints {
unix
unix
} -body {
focus -displayof
} -returnCodes error -result {wrong # args: should be "focus -displayof window"}
test focus-1.10 {Tk_FocusCmd procedure, -displayof option} -constraints {
unix
unix
} -body {
focus -displayof a b
} -returnCodes error -result {wrong # args: should be "focus -displayof window"}
test focus-1.11 {Tk_FocusCmd procedure, -displayof option} -constraints {
unix
unix
} -body {
focus -displayof .lousy
} -returnCodes error -result {bad window path name ".lousy"}
test focus-1.12 {Tk_FocusCmd procedure, -displayof option} -constraints {
unix
unix
} -body {
focusClear
focus .t
focus -displayof .t.b3
} -result {}
test focus-1.13 {Tk_FocusCmd procedure, -displayof option} -constraints {
unix
unix
} -body {
focusClear
focus -force .t
focus -displayof .t.b3
} -result {.t}
test focus-1.14 {Tk_FocusCmd procedure, -displayof option} -constraints {
unix altDisplay
|
︙ | | |
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
-
+
-
+
-
+
-
+
-
+
|
focusClear
focus .t.b1
set x [list [focus]]
focus -force .t.b1
lappend x [focus]
} -result {{} .t.b1}
test focus-1.20 {Tk_FocusCmd procedure, -lastfor option} -constraints {
unix
unix
} -body {
focus -lastfor
} -returnCodes error -result {wrong # args: should be "focus -lastfor window"}
test focus-1.21 {Tk_FocusCmd procedure, -lastfor option} -constraints {
unix
unix
} -body {
focus -lastfor 1 2
} -returnCodes error -result {wrong # args: should be "focus -lastfor window"}
test focus-1.22 {Tk_FocusCmd procedure, -lastfor option} -constraints {
unix
unix
} -body {
focus -lastfor who_knows?
} -returnCodes error -result {bad window path name "who_knows?"}
test focus-1.23 {Tk_FocusCmd procedure, -lastfor option} -constraints {
unix
unix
} -body {
focusClear
focusSetup
focus .b
focus .t.b1
list [focus -lastfor .] [focus -lastfor .t.b3]
} -result {.b .t.b1}
test focus-1.24 {Tk_FocusCmd procedure, -lastfor option} -constraints {
unix
unix
} -body {
focusClear
focusSetup
update
focus -lastfor .t.b2
} -result {.t}
test focus-1.25 {Tk_FocusCmd procedure} -constraints unix -body {
|
︙ | | |
Changes to tests/font.test.
︙ | | |
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
-
+
|
test font-4.1 {font command: actual: arguments} -body {
# (skip < 0)
font actual xyz -displayof
} -returnCodes error -result {value for "-displayof" missing}
test font-4.2 {font command: actual: arguments} -body {
# (objc < 3)
# (objc < 3)
font actual
} -returnCodes error -result {wrong # args: should be "font actual font ?-displayof window? ?option? ?--? ?char?"}
test font-4.3 {font command: actual: arguments} -body {
# (objc - skip > 4) when skip == 0
font actual xyz abc def
} -returnCodes error -result {wrong # args: should be "font actual font ?-displayof window? ?option? ?--? ?char?"}
test font-4.4 {font command: actual: displayof specified, so skip to next} -body {
|
︙ | | |
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
-
+
-
+
|
} -result {Times New Roman}
test font-4.11 {font command: bad option} -body {
font actual xyz -style
} -returnCodes error -result {bad option "-style": must be -family, -size, -weight, -slant, -underline, or -overstrike}
test font-5.1 {font command: configure} -body {
# (objc < 3)
# (objc < 3)
font configure
} -returnCodes error -result {wrong # args: should be "font configure fontname ?-option value ...?"}
test font-5.2 {font command: configure: non-existent font} -body {
# (namedHashPtr == NULL)
font configure xyz
} -returnCodes error -result {named font "xyz" doesn't exist}
test font-5.3 {font command: configure: "deleted" font} -setup {
destroy .t.f
catch {font delete xyz}
pack [label .t.f]
update
} -body {
# (nfPtr->deletePending != 0)
# (nfPtr->deletePending != 0)
font create xyz
.t.f configure -font xyz
font delete xyz
font configure xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {named font "xyz" doesn't exist}
|
︙ | | |
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
|
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
|
-
+
-
+
-
+
-
+
|
font configure font2 -family
} -cleanup {
font delete font1 font2 font3
} -result {four}
test font-6.5 {font command: create: bad option creating new font} -setup {
catch {font delete xyz}
} -body {
# name was specified so skip = 3
# name was specified so skip = 3
font create xyz -xyz times
} -returnCodes error -result {bad option "-xyz": must be -family, -size, -weight, -slant, -underline, or -overstrike}
test font-6.6 {font command: create: bad option creating new font} -setup {
clearnondefaultfonts
} -body {
# name was not specified so skip = 2
# name was not specified so skip = 2
font create -xyz times
} -returnCodes error -result {bad option "-xyz": must be -family, -size, -weight, -slant, -underline, or -overstrike}
test font-6.7 {font command: create: already exists} -setup {
catch {font delete xyz}
} -body {
# (CreateNamedFont() != TCL_OK)
font create xyz
font create xyz
} -cleanup {
font delete xyz
} -returnCodes error -result {named font "xyz" already exists}
test font-7.1 {font command: delete: arguments} -body {
# (objc < 3)
# (objc < 3)
font delete
} -returnCodes error -result {wrong # args: should be "font delete fontname ?fontname ...?"}
test font-7.2 {font command: delete: loop test} -setup {
clearnondefaultfonts
set x {}
} -body {
# for (i = 2; i < objc; i++)
# for (i = 2; i < objc; i++)
font create a -underline 1
font create b -underline 1
font create c -underline 1
font create d -underline 1
font create e -underline 1
lappend x [lsort [getnondefaultfonts]]
font delete a e c b
|
︙ | | |
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
-
+
|
lappend x [lsort [getnondefaultfonts]]
} -cleanup {
clearnondefaultfonts
} -result {{a b c d e} {b c e}}
test font-7.4 {font command: delete: non-existent} -setup {
catch {font delete xyz}
} -body {
# (namedHashPtr == NULL)
# (namedHashPtr == NULL)
font delete xyz
} -returnCodes error -result {named font "xyz" doesn't exist}
test font-7.5 {font command: delete: mark for later deletion} -setup {
destroy .t.f
catch {font delete xyz}
pack [label .t.f]
update
|
︙ | | |
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
|
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
|
-
+
-
+
|
test font-9.1 {font command: measure: arguments} -body {
# (skip < 0)
expr {[font measure xyz -displayof] > 0}
} -returnCodes ok -result 1
test font-9.2 {font command: measure: arguments} -body {
# (objc - skip != 4)
# (objc - skip != 4)
font measure
} -returnCodes error -result {wrong # args: should be "font measure font ?-displayof window? text"}
test font-9.3 {font command: measure: arguments} -body {
# (objc - skip != 4)
# (objc - skip != 4)
font measure xyz abc def
} -returnCodes error -result {wrong # args: should be "font measure font ?-displayof window? text"}
test font-9.4 {font command: measure: arguments} -constraints noExceed -body {
# (tkfont == NULL)
font measure "\{xyz" abc
} -returnCodes error -result "font \"{xyz\" doesn't exist"
test font-9.5 {font command: measure} -body {
|
︙ | | |
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
|
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
|
-
+
|
font metrics xyz -displayof
} -returnCodes error -result {value for "-displayof" missing}
test font-10.2 {font command: metrics: arguments} -body {
# (skip < 0)
font metrics xyz -displayof
} -returnCodes error -result {value for "-displayof" missing}
test font-10.3 {font command: metrics: arguments} -body {
# (objc < 3)
# (objc < 3)
font metrics
} -returnCodes error -result {wrong # args: should be "font metrics font ?-displayof window? ?option?"}
test font-10.4 {font command: metrics: arguments} -body {
# (objc - skip) > 4) when skip == 0
font metrics xyz abc def
} -returnCodes error -result {wrong # args: should be "font metrics font ?-displayof window? ?option?"}
test font-10.5 {font command: metrics: arguments} -body {
|
︙ | | |
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
|
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
|
-
+
-
+
-
+
|
test font-14.1 {Tk_GetFont procedure} -body {
} -result {}
test font-15.1 {Tk_AllocFontFromObj - converting internal reps} -constraints {
testfont
testfont
} -setup {
destroy .b1 .b2
} -body {
set x {Times 16}
lindex $x 0
button .b1 -font $x
lindex $x 0
testfont counts {Times 16}
} -cleanup {
destroy .b1 .b2
} -result {{1 0}}
test font-15.2 {Tk_AllocFontFromObj - discard stale font} -constraints {
testfont
testfont
} -setup {
destroy .b1 .b2
set result {}
} -body {
set x {Times 16}
button .b1 -font $x
destroy .b1
lappend result [testfont counts {Times 16}]
button .b2 -font $x
lappend result [testfont counts {Times 16}]
} -cleanup {
destroy .b2
} -result {{} {{1 1}}}
test font-15.3 {Tk_AllocFontFromObj - reuse existing font} -constraints {
testfont
testfont
} -setup {
destroy .b1 .b2
set result {}
} -body {
set x {Times 16}
button .b1 -font $x
lappend result [testfont counts {Times 16}]
|
︙ | | |
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
|
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
|
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
|
} -result {-family}
test font-15.5 {Tk_AllocFontFromObj procedure: get named font} -setup {
destroy .t.f
catch {font delete xyz}
pack [label .t.f]
update
} -body {
# (namedHashPtr != NULL)
font create xyz
.t.f config -font xyz
# (namedHashPtr != NULL)
font create xyz
.t.f config -font xyz
} -cleanup {
destroy .t.f
font delete xyz
} -result {}
test font-15.6 {Tk_AllocFontFromObj procedure: not a named font} -setup {
destroy .t.f
pack [label .t.f]
update
} -body {
# not (namedHashPtr != NULL)
.t.f config -font {times 20}
} -cleanup {
destroy .t.f
} -result {-family} -result {}
test font-15.7 {Tk_AllocFontFromObj procedure: get native font} -constraints {
unix
unix
} -setup {
destroy .t.f
pack [label .t.f]
update
} -body {
# not (fontPtr == NULL)
# not (fontPtr == NULL)
.t.f config -font fixed
} -result {}
test font-15.8 {Tk_AllocFontFromObj procedure: get native font} -constraints {
win
win
} -setup {
destroy .t.f
clearnondefaultfonts
pack [label .t.f]
update
} -body {
# not (fontPtr == NULL)
# not (fontPtr == NULL)
.t.f config -font oemfixed
} -cleanup {
destroy .t.f
} -result {}
test font-15.9 {Tk_AllocFontFromObj procedure: get attribute font} -setup {
destroy .t.f
pack [label .t.f]
update
} -body {
# (fontPtr == NULL)
# (fontPtr == NULL)
.t.f config -font {xxx yyy zzz}
} -cleanup {
destroy .t.f
} -returnCodes error -result {expected integer but got "yyy"}
test font-15.10 {Tk_AllocFontFromObj procedure: no match} -constraints noExceed -body {
# (ParseFontNameObj() != TCL_OK)
font actual "\{xyz"
|
︙ | | |
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
|
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
|
-
+
-
+
|
update
} -body {
# (fontPtr->underlineHeight == 0) because size was < 10
.t.f config -text "underline" -font "times -8 underline"
update
} -cleanup {
destroy .t.f
} -result {}
} -result {}
test font-16.1 {Tk_NameOfFont procedure} -setup {
destroy .t.f
pack [label .t.f]
update
} -body {
.t.f config -font -family\ fixed
.t.f cget -font
} -cleanup {
destroy .t.f
} -result {-family fixed}
test font-17.1 {Tk_FreeFontFromObj - reference counts} -constraints {
testfont
testfont
} -setup {
destroy .b1 .b2 .b3
set result {}
} -body {
set x {Courier 12}
button .b1 -font $x
button .b3 -font $x
|
︙ | | |
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
|
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
|
-
+
-
+
-
+
|
} -result {-family fixed}
test font-17.4 {Tk_FreeFont procedure: named font} -setup {
destroy .t.f
clearnondefaultfonts
pack [label .t.f]
update
} -body {
# (fontPtr->namedHashPtr != NULL)
# (fontPtr->namedHashPtr != NULL)
font create xyz
.t.f config -font xyz
destroy .t.f
getnondefaultfonts
} -result {xyz}
test font-17.5 {Tk_FreeFont procedure: named font} -setup {
destroy .t.f
catch {font delete xyz}
pack [label .t.f]
update
} -body {
# not (fontPtr->refCount == 0)
# not (fontPtr->refCount == 0)
font create xyz -underline 1
.t.f config -font xyz
font delete xyz
set x [font actual xyz -underline]
destroy .t.f
list [font actual xyz -underline] $x
} -result {0 1}
test font-17.6 {Tk_FreeFont procedure: named font not deleted yet} -setup {
destroy .t.f .t.b
catch {font delete xyz}
pack [label .t.f]
update
} -body {
font create xyz
font create xyz
.t.f config -font xyz
button .t.b -font xyz
font delete xyz
set x [font actual xyz]
destroy .t.b
list [lindex [font actual xyz] 0] [lindex $x 0]
} -cleanup {
|
︙ | | |
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
|
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
|
-
+
|
destroy .t.w1 .t.w2
} -result {}
# Procedure used in 21.* tests
proc psfontname {name} {
destroy .t.c
canvas .t.c -closeenough 0
canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
set a [.t.c itemcget text -font]
.t.c itemconfig text -text "We need text" -font $name
set post [.t.c postscript]
.t.c itemconfig text -font $a
|
︙ | | |
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
|
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
if {[string match *avant*garde $x]} {
psfontname "{itc avant garde} 10"
} else {
set x {AvantGarde-Book}
}
} -result {AvantGarde-Book}
test font-21.2 {Tk_PostscriptFontName procedure: native} -constraints {
win
win
} -body {
psfontname "arial 10"
} -result {Helvetica}
test font-21.3 {Tk_PostscriptFontName procedure: native} -constraints {
win
win
} -body {
psfontname "{times new roman} 10"
} -result {Times-Roman}
test font-21.4 {Tk_PostscriptFontName procedure: native} -constraints {
win
win
} -body {
psfontname "{courier new} 10"
} -result {Courier}
test font-21.5 {Tk_PostscriptFontName procedure: spaces} -constraints {
unix
unix
} -body {
set x [font actual {{lucida bright} 10} -family]
if {[string match lucida*bright $x]} {
psfontname "{lucida bright} 10"
} else {
set x {LucidaBright}
}
} -result {LucidaBright}
test font-21.6 {Tk_PostscriptFontName procedure: spaces} -constraints {
unix
unix
} -body {
psfontname "{new century schoolbook} 10"
} -result {NewCenturySchlbk-Roman}
test font-21.7 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {avantgarde 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "avantgarde"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x AvantGarde-Book
}
} -result {AvantGarde-Book}
test font-21.8 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {avantgarde 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "avantgarde"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x AvantGarde-Demi
}
} -result {AvantGarde-Demi}
test font-21.9 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {avantgarde 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "avantgarde"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x AvantGarde-BookOblique
}
} -result {AvantGarde-BookOblique}
test font-21.10 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {avantgarde 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "avantgarde"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x AvantGarde-DemiOblique
}
} -result {AvantGarde-DemiOblique}
test font-21.11 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {bookman 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "bookman"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Bookman-Light
}
} -result {Bookman-Light}
test font-21.12 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {bookman 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "bookman"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Bookman-Demi
}
} -result {Bookman-Demi}
test font-21.13 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {bookman 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "bookman"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Bookman-LightItalic
}
} -result {Bookman-LightItalic}
test font-21.14 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {bookman 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "bookman"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Bookman-DemiItalic
}
} -result {Bookman-DemiItalic}
test font-21.15 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {courier 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "courier"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Courier
}
} -result {Courier}
test font-21.16 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {courier 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "courier"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Courier-Bold
}
} -result {Courier-Bold}
test font-21.17 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {courier 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "courier"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Courier-Oblique
}
} -result {Courier-Oblique}
test font-21.18 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {courier 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "courier"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Courier-BoldOblique
}
} -result {Courier-BoldOblique}
test font-21.19 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {helvetica 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "helvetica"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Helvetica
}
} -result {Helvetica}
test font-21.20 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {helvetica 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "helvetica"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Helvetica-Bold
}
} -result {Helvetica-Bold}
test font-21.21 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {helvetica 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "helvetica"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Helvetica-Oblique
}
} -result {Helvetica-Oblique}
test font-21.22 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {helvetica 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "helvetica"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Helvetica-BoldOblique
}
} -result {Helvetica-BoldOblique}
test font-21.23 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {{new century schoolbook} 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "new century schoolbook"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x NewCenturySchlbk-Roman
}
} -result {NewCenturySchlbk-Roman}
test font-21.24 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {{new century schoolbook} 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "new century schoolbook"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x NewCenturySchlbk-Bold
}
} -result {NewCenturySchlbk-Bold}
test font-21.25 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {{new century schoolbook} 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "new century schoolbook"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x NewCenturySchlbk-Italic
}
} -result {NewCenturySchlbk-Italic}
test font-21.26 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {{new century schoolbook} 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "new century schoolbook"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x NewCenturySchlbk-BoldItalic
}
} -result {NewCenturySchlbk-BoldItalic}
test font-21.27 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {palatino 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "palatino"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Palatino-Roman
}
} -result {Palatino-Roman}
test font-21.28 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {palatino 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "palatino"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Palatino-Bold
}
} -result {Palatino-Bold}
test font-21.29 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {palatino 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "palatino"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Palatino-Italic
}
} -result {Palatino-Italic}
test font-21.30 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {palatino 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "palatino"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Palatino-BoldItalic
}
} -result {Palatino-BoldItalic}
test font-21.31 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {symbol 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "symbol"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Symbol
}
} -result {Symbol}
test font-21.32 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {symbol 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "symbol"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Symbol
}
} -result {Symbol}
test font-21.33 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {symbol 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "symbol"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Symbol
}
} -result {Symbol}
test font-21.34 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {symbol 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "symbol"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Symbol
}
} -result {Symbol}
test font-21.35 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {times 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "times"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Times-Roman
}
} -result {Times-Roman}
test font-21.36 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {times 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "times"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Times-Bold
}
} -result {Times-Bold}
test font-21.37 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {times 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "times"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Times-Italic
}
} -result {Times-Italic}
test font-21.38 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {times 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "times"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x Times-BoldItalic
}
} -result {Times-BoldItalic}
test font-21.39 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {zapfchancery 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfchancery"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x ZapfChancery-MediumItalic
}
} -result {ZapfChancery-MediumItalic}
test font-21.40 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {zapfchancery 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfchancery"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x ZapfChancery-MediumItalic
}
} -result {ZapfChancery-MediumItalic}
test font-21.41 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {zapfchancery 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfchancery"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x ZapfChancery-MediumItalic
}
} -result {ZapfChancery-MediumItalic}
test font-21.42 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {zapfchancery 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfchancery"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x ZapfChancery-MediumItalic
}
} -result {ZapfChancery-MediumItalic}
test font-21.43 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {zapfdingbats 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfdingbats"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x ZapfDingbats
}
} -result {ZapfDingbats}
test font-21.44 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {zapfdingbats 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfdingbats"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x ZapfDingbats
}
} -result {ZapfDingbats}
test font-21.45 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {zapfdingbats 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfdingbats"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x ZapfDingbats
}
} -result {ZapfDingbats}
test font-21.46 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
unix
unix
} -body {
set name {zapfdingbats 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfdingbats"} {
set x [psfontname avantgarde 12 roman normal]
} else {
set x ZapfDingbats
}
|
︙ | | |
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
|
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
|
-
+
|
win
} -body {
set x [psfontname {{times new roman} 12 italic bold}]
} -result {Times-BoldItalic}
test font-22.1 {Tk_TextWidth procedure} -setup {
destroy .t.l
destroy .t.l
} -body {
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font "Courier -12"
pack .t.l
set ax [winfo reqwidth .t.l]
expr {[font measure [.t.l cget -font] "000"] eq $ax*3}
} -cleanup {
|
︙ | | |
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
|
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
|
-
+
|
update
} -cleanup {
destroy .t.t
} -result {}
# Data used in 24.* tests
destroy .t.l
destroy .t.l
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font "Courier -12"
pack .t.l
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
test font-24.1 {Tk_ComputeTextLayout: empty string} -body {
|
︙ | | |
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
|
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
|
-
+
-
+
|
lappend x [expr {[winfo reqheight .t.l] eq $ay}]
.t.l config -text "0000\n"
update
lappend x [expr {[winfo reqwidth .t.l] eq [expr {$ax * 4}]}]
lappend x [expr {[winfo reqheight .t.l] eq [expr {$ay * 2}]}]
return $x
} -result {1 1 1 1}
destroy .t.l
destroy .t.l
test font-24.15 {Tk_ComputeTextLayout: justification} -setup {
set x {}
destroy .t.c
canvas .t.c -closeenough 0
canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
} -body {
csetup "000\n00000"
.t.c itemconfig text -just left
lappend x [.t.c index text @[expr $ax*2],0]
|
︙ | | |
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
|
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
|
-
+
-
+
|
update
} -body {
.t.f config -text foo
.t.f config -text boo
} -cleanup {
destroy .t.f
} -result {}
# Canvas created for tests: 26.*
destroy .t.c
canvas .t.c -closeenough 0
canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
test font-26.1 {Tk_DrawTextLayout procedure: auto-detect last char} -setup {
destroy .t.f
pack [label .t.f]
update
|
︙ | | |
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
|
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
|
-
+
|
} -result {}
destroy .t.f
# Canvas created for tests: 28.*
destroy .t.c
canvas .t.c -closeenough 0
canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
test font-28.1 {Tk_PointToChar procedure: above all lines} -body {
csetup "000"
.t.c index text @-1,0
} -result {0}
|
︙ | | |
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
|
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
|
-
+
|
} -result {}
destroy .t.f
# Canvas created for tests: 30.*
destroy .t.c
canvas .t.c -closeenough 0
canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
test font-30.1 {Tk_DistanceToTextLayout procedure: loop once} -body {
csetup "000\n000\n000"
.t.c bind all <Enter> {lappend x [.t.c index current @%x,%y]}
set x {}
|
︙ | | |
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
|
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
|
-
+
|
bind all <Enter> {}
} -result {1}
destroy .t.c
# Canvas created for tests 31.*
destroy .t.c
canvas .t.c -closeenough 0
canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
test font-31.1 {Tk_IntersectTextLayout procedure: loop once} -body {
csetup "000\n000\n000"
.t.c find overlapping 0 0 0 0
} -result [.t.c find withtag text]
|
︙ | | |
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
|
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
|
-
+
-
+
|
return $x
} -result {}
destroy .t.c
test font-32.1 {Tk_TextLayoutToPostscript: ensure buffer doesn't overflow} -setup {
destroy .t.c
canvas .t.c -closeenough 0
canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
} -body {
# If there were a whole bunch of returns or tabs in a row, then the
# temporary buffer could overflow and write on the stack.
csetup "qwertyuiopasdfghjklzxcvbnm1234qwertyuiopasdfghjklzxcvbnm\n"
.t.c itemconfig text -width 800
.t.c insert text end "qwertyuiopasdfghjklzxcvbnm1234qwertyuiopasdfghjklzxcvbnm\n"
.t.c insert text end "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
.t.c insert text end "end"
set x [.t.c postscript]
set i [string first "(qwerty" $x]
set i [string first "(qwerty" $x]
string range $x $i [expr {$i + 278}]
} -cleanup {
destroy .t.c
} -result {(qwertyuiopasdfghjklzxcvbnm1234qwertyuiopasdfghjklzxcvbnm)]
[(qwertyuiopasdfghjklzxcvbnm1234qwertyuiopasdfghjklzxcvbnm)]
[()]
[()]
|
︙ | | |
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
|
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
|
-
+
-
+
|
font delete xyz
} -result {italic}
test font-37.6 {GetAttributeInfo procedure: underline} -setup {
catch {font delete xyz}
set x {}
} -body {
font create xyz -underline yes
font config xyz -underline
font config xyz -underline
} -cleanup {
font delete xyz
} -result {1}
test font-37.7 {GetAttributeInfo procedure: overstrike} -setup {
catch {font delete xyz}
set x {}
} -body {
font create xyz -overstrike no
font config xyz -overstrike
font config xyz -overstrike
} -cleanup {
font delete xyz
} -result {0}
# In tests below, one field is set to "xyz" so that font name doesn't
# look like a native X font, so that ParseFontNameObj or TkParseXLFD will
|
︙ | | |
Changes to tests/frame.test.
︙ | | |
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
-
+
|
test frame-1.1 {frame configuration options} -setup {
deleteWindows
} -body {
frame .f -class NewFrame
.f configure -class
} -cleanup {
deleteWindows
} -result {-class class Class Frame NewFrame}
} -result {-class class Class Frame NewFrame}
test frame-1.2 {frame configuration options} -setup {
deleteWindows
} -body {
frame .f -class NewFrame
.f configure -class Different
} -cleanup {
deleteWindows
|
︙ | | |
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
|
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
|
-
+
|
deleteWindows
} -result {1}
test frame-3.18 {TkCreateFrame procedure} -constraints {
defaultPseudocolor8 haveGrayscale8 nonPortable
} -setup {
deleteWindows
} -body {
toplevel .t -visual {grayscale 8} -width 300 -height 200 -bg #434343
toplevel .t -visual {grayscale 8} -width 300 -height 200 -bg #434343
wm geometry .t +0+0
update
colorsFree .t 131 131 131
} -cleanup {
deleteWindows
} -result {1}
test frame-3.19 {TkCreateFrame procedure} -constraints {
|
︙ | | |
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
|
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
|
-
+
|
} -result {1 {grayscale 8}}
test frame-3.21 {TkCreateFrame procedure} -constraints {
defaultPseudocolor8 haveGrayscale8 nonPortable
} -setup {
deleteWindows
} -body {
set x ok
toplevel .t -visual {grayscale 8} -width 300 -height 200 -bg #434343
toplevel .t -visual {grayscale 8} -width 300 -height 200 -bg #434343
wm geometry .t +0+0
update
colorsFree .t 131 131 131
} -cleanup {
deleteWindows
} -result {1}
if {[testConstraint defaultPseudocolor8]} {
|
︙ | | |
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
|
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
|
-
+
|
set fh [expr {[font metrics $font -linespace] + 2 - 3}]
set fw [expr {[font measure $font "Mupp"] + 2 - 3}]
if {$fw < 0} {set fw 0}
if {$fh < 0} {set fh 0}
place .f -x 0 -y 0 -width 100 -height 100
pack [frame .f.f] -fill both -expand 1
set result {}
set result {}
foreach lp {nw n ne en e es se s sw ws w wn} {
.f configure -labelanchor $lp
update
set expx 5
set expy 6
set expw 90
set exph 88
|
︙ | | |
Changes to tests/geometry.test.
︙ | | |
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
|
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
|
-
+
|
}
destroy .t
} -body {
toplevel .t
wm geometry .t +0+0
tkwait visibility .t
update
pack [frame .t.f]
pack [frame .t.f]
button .t.quit -text Quit -command exit
pack .t.quit -in .t.f
wm iconify .t
set x 0
after 500 {set x 1}
tkwait variable x
wm deiconify .t
|
︙ | | |
Changes to tests/image.test.
︙ | | |
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
-
+
-
+
-
+
-
+
-
+
-
+
|
test image-1.3 {Tk_ImageCmd procedure, "create" option} -body {
image create
} -returnCodes error -result {wrong # args: should be "image create type ?name? ?-option value ...?"}
test image-1.4 {Tk_ImageCmd procedure, "create" option} -body {
image c bad_type
} -returnCodes error -result {image type "bad_type" doesn't exist}
test image-1.5 {Tk_ImageCmd procedure, "create" option} -constraints {
testImageType
testImageType
} -body {
list [image create test myimage] [imageNames]
} -cleanup {
imageCleanup
} -result {myimage myimage}
test image-1.6 {Tk_ImageCmd procedure, "create" option} -constraints {
testImageType
testImageType
} -setup {
imageCleanup
} -body {
scan [image create test] image%d first
image create test myimage
scan [image create test -variable x] image%d second
expr $second-$first
} -cleanup {
imageCleanup
} -result {1}
test image-1.7 {Tk_ImageCmd procedure, "create" option} -constraints {
testImageType
testImageType
} -setup {
imageCleanup
} -body {
image create test myimage -variable x
.c create image 100 50 -image myimage
.c create image 100 150 -image myimage
update
set x {}
image create test myimage -variable x
update
return $x
} -cleanup {
imageCleanup
} -result {{myimage free} {myimage free} {myimage delete} {myimage get} {myimage get} {myimage display 0 0 30 15 30 30} {myimage display 0 0 30 15 30 130}}
test image-1.8 {Tk_ImageCmd procedure, "create" option} -constraints {
testImageType
testImageType
} -setup {
.c delete all
imageCleanup
} -body {
image create test myimage -variable x
.c create image 100 50 -image myimage
.c create image 100 150 -image myimage
image delete myimage
update
set x {}
image create test myimage -variable x
update
return $x
} -cleanup {
.c delete all
imageCleanup
} -result {{myimage get} {myimage get} {myimage display 0 0 30 15 30 30} {myimage display 0 0 30 15 30 130}}
test image-1.9 {Tk_ImageCmd procedure, "create" option} -constraints {
testImageType
testImageType
} -body {
image create test -badName foo
} -returnCodes error -result {bad option name "-badName"}
test image-1.10 {Tk_ImageCmd procedure, "create" option} -constraints {
testImageType
testImageType
} -body {
catch {image create test -badName foo}
imageNames
} -result {}
test image-1.11 {Tk_ImageCmd procedure, "create" option with same name as main window} -body {
set code [loadTkCommand]
append code {
|
︙ | | |
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
-
+
-
+
-
+
|
image delete $i $j
} -result works
test image-2.1 {Tk_ImageCmd procedure, "delete" option} -body {
image delete
} -result {}
test image-2.2 {Tk_ImageCmd procedure, "delete" option} -constraints {
testImageType
testImageType
} -setup {
imageCleanup
set result {}
} -body {
image create test myimage
image create test img2
lappend result [lsort [imageNames]]
image d myimage img2
lappend result [imageNames]
} -cleanup {
imageCleanup
} -result {{img2 myimage} {}}
test image-2.3 {Tk_ImageCmd procedure, "delete" option} -constraints {
testImageType
testImageType
} -setup {
imageCleanup
} -body {
image create test myimage
image create test img2
image delete myimage gorp img2
} -cleanup {
imageCleanup
} -returnCodes error -result {image "gorp" doesn't exist}
test image-2.4 {Tk_ImageCmd procedure, "delete" option} -constraints {
testImageType
testImageType
} -setup {
imageCleanup
} -body {
image create test myimage
image create test img2
catch {image delete myimage gorp img2}
imageNames
|
︙ | | |
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
-
+
-
+
|
test image-3.2 {Tk_ImageCmd procedure, "height" option} -body {
image height a b
} -returnCodes error -result {wrong # args: should be "image height name"}
test image-3.3 {Tk_ImageCmd procedure, "height" option} -body {
image height foo
} -returnCodes error -result {image "foo" doesn't exist}
test image-3.4 {Tk_ImageCmd procedure, "height" option} -constraints {
testImageType
testImageType
} -setup {
imageCleanup
} -body {
image create test myimage
set x [image h myimage]
myimage changed 0 0 0 0 60 50
list $x [image height myimage]
} -cleanup {
imageCleanup
} -result {15 50}
test image-4.1 {Tk_ImageCmd procedure, "names" option} -body {
image names x
} -returnCodes error -result {wrong # args: should be "image names"}
test image-4.2 {Tk_ImageCmd procedure, "names" option} -constraints {
testImageType
testImageType
} -setup {
catch {interp delete testinterp}
} -body {
interp create testinterp
load {} Tk testinterp
interp eval testinterp {
image delete {*}[image names]
|
︙ | | |
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
|
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
image type a b
} -returnCodes error -result {wrong # args: should be "image type name"}
test image-5.3 {Tk_ImageCmd procedure, "type" option} -body {
image type foo
} -returnCodes error -result {image "foo" doesn't exist}
test image-5.4 {Tk_ImageCmd procedure, "type" option} -constraints {
testImageType
testImageType
} -setup {
imageCleanup
} -body {
image create test myimage
image type myimage
} -cleanup {
imageCleanup
} -result {test}
test image-5.5 {Tk_ImageCmd procedure, "type" option} -constraints {
testImageType
testImageType
} -setup {
imageCleanup
} -body {
image create test myimage
.c create image 50 50 -image myimage
image delete myimage
image type myimage
} -cleanup {
imageCleanup
} -returnCodes error -result {image "myimage" doesn't exist}
test image-5.6 {Tk_ImageCmd procedure, "type" option} -constraints {
testOldImageType
testOldImageType
} -setup {
imageCleanup
} -body {
image create oldtest myimage
image type myimage
} -cleanup {
imageCleanup
} -result {oldtest}
test image-5.7 {Tk_ImageCmd procedure, "type" option} -constraints {
testOldImageType
testOldImageType
} -setup {
.c delete all
imageCleanup
} -body {
image create oldtest myimage
.c create image 50 50 -image myimage
image delete myimage
image type myimage
} -cleanup {
.c delete all
imageCleanup
} -returnCodes error -result {image "myimage" doesn't exist}
test image-6.1 {Tk_ImageCmd procedure, "types" option} -body {
image types x
} -returnCodes error -result {wrong # args: should be "image types"}
test image-6.2 {Tk_ImageCmd procedure, "types" option} -constraints {
testImageType
testImageType
} -body {
lsort [image types]
} -result {bitmap oldtest photo test}
test image-7.1 {Tk_ImageCmd procedure, "width" option} -body {
image width
} -returnCodes error -result {wrong # args: should be "image width name"}
test image-7.2 {Tk_ImageCmd procedure, "width" option} -body {
image width a b
} -returnCodes error -result {wrong # args: should be "image width name"}
test image-7.3 {Tk_ImageCmd procedure, "width" option} -body {
image width foo
} -returnCodes error -result {image "foo" doesn't exist}
test image-7.4 {Tk_ImageCmd procedure, "width" option} -constraints {
testImageType
testImageType
} -setup {
imageCleanup
} -body {
image create test myimage
set x [image w myimage]
myimage changed 0 0 0 0 60 50
list $x [image width myimage]
} -cleanup {
imageCleanup
} -result {30 60}
test image-8.1 {Tk_ImageCmd procedure, "inuse" option} -constraints {
testImageType
testImageType
} -setup {
imageCleanup
set res {}
destroy .b
} -body {
image create test myimage2
lappend res [image inuse myimage2]
button .b -image myimage2
lappend res [image inuse myimage2]
} -cleanup {
imageCleanup
catch {destroy .b}
} -result [list 0 1]
test image-9.1 {Tk_ImageChanged procedure} -constraints testImageType -setup {
.c delete all
imageCleanup
} -body {
image create test foo -variable x
.c create image 50 50 -image foo
|
︙ | | |
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
|
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
|
-
+
|
lappend x [imageNames]
image create photo foo -width 20 -height 20
lappend x [.c bbox i1] [imageNames]
} -cleanup {
.c delete all
imageCleanup
} -result {10 10 20 20 foo {} {10 10 30 30} foo}
destroy .c
imageFinish
# cleanup
cleanupTests
return
# Local variables:
# mode: tcl
# End:
|
Changes to tests/imgPhoto.test.
︙ | | |
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
-
+
-
+
-
+
|
# image create photo photo2 -width 10 -height 10
# catch {image create photo photo2 -file bogus.img} msg
# photo1 copy photo2
# set msg
# } {couldn't open "bogus.img": no such file or directory}
test imgPhoto-3.1 {ImgPhotoConfigureMaster procedure} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -body {
image create photo photo1 -file $teapotPhotoFile
photo1 configure -file $teapotPhotoFile
} -cleanup {
image delete photo1
} -result {}
test imgPhoto-3.2 {ImgPhotoConfigureMaster procedure} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -body {
image create photo photo1 -file $teapotPhotoFile
list [catch {photo1 configure -file bogus} err] [string tolower $err] \
[image width photo1] [image height photo1]
} -cleanup {
image delete photo1
} -result {1 {couldn't open "bogus": no such file or directory} 256 256}
test imgPhoto-3.3 {ImgPhotoConfigureMaster procedure} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
destroy .c
pack [canvas .c]
update
} -body {
image create photo photo1
.c create image 10 10 -image photo1 -tags photo1.1 -anchor nw
|
︙ | | |
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
-
+
|
image create photo photo1
} -body {
photo1 configure -palette {} -gamma
} -cleanup {
image delete photo1
} -returnCodes error -result {value for "-gamma" missing}
test imgPhoto-4.10 {ImgPhotoCmd procedure: copy option} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -width 25 -height 30
} -body {
image create photo photo2 -file $teapotPhotoFile
photo1 configure -width 0 -height 0 -palette {} -gamma 1
photo1 copy photo2
|
︙ | | |
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
|
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
|
-
+
-
+
-
+
-
+
|
image create photo photo2
} -body {
photo1 copy photo2 -from -to
} -returnCodes error -cleanup {
image delete photo1 photo2
} -result {the "-from" option requires one to four integer values}
test imgPhoto-4.15 {ImgPhotoCmd procedure: copy option} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -file $teapotPhotoFile
} -body {
photo1 copy photo2
photo1 copy photo2 -from 0 70 60 120 -shrink
list [image width photo1] [image height photo1] [photo1 get 20 10]
} -cleanup {
image delete photo1 photo2
} -result {60 50 {215 154 120}}
test imgPhoto-4.16 {ImgPhotoCmd procedure: copy option} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -file $teapotPhotoFile
} -body {
photo1 copy photo2 -from 60 120 0 70 -to 20 50
list [image width photo1] [image height photo1] [photo1 get 40 80]
} -cleanup {
image delete photo1 photo2
} -result {80 100 {19 92 192}}
test imgPhoto-4.17 {ImgPhotoCmd procedure: copy option} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -file $teapotPhotoFile
} -body {
photo1 copy photo2 -from 0 120 60 70 -to 0 0 100 100
list [image width photo1] [image height photo1] [photo1 get 80 60]
} -cleanup {
image delete photo1 photo2
} -result {100 100 {215 154 120}}
test imgPhoto-4.18 {ImgPhotoCmd procedure: copy option} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -file $teapotPhotoFile
} -body {
photo1 copy photo2 -from 60 70 0 120 -zoom 2
list [image width photo1] [image height photo1] [photo1 get 100 50]
} -cleanup {
|
︙ | | |
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
|
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
|
-
+
-
+
|
} -body {
photo1 copy photo2 -from 0 70 60 120 -zoom 2
list [image width photo1] [image height photo1] [photo1 get 100 50]
} -cleanup {
image delete photo1 photo2
} -result {120 100 {169 99 47}}
test imgPhoto-4.20 {ImgPhotoCmd procedure: copy option} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -file $teapotPhotoFile
} -body {
photo1 copy photo2 -from 20 20 200 180 -subsample 2 -shrink
list [image width photo1] [image height photo1] [photo1 get 50 30]
} -cleanup {
image delete photo1 photo2
} -result {90 80 {207 146 112}}
test imgPhoto-4.21 {ImgPhotoCmd procedure: copy option} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -file $teapotPhotoFile
} -body {
photo1 copy photo2
set result [list [image width photo1] [image height photo1]]
photo1 conf -width 49 -height 51
|
︙ | | |
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
|
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
|
-
+
|
photo1 conf -height 0
photo1 copy photo2 -from 0 0 10 10 -shrink
lappend result [image width photo1] [image height photo1]
} -cleanup {
image delete photo1 photo2
} -result {256 256 49 51 49 51 49 51 10 51 10 10}
test imgPhoto-4.22 {ImgPhotoCmd procedure: get option} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
image create photo photo1
} -body {
photo1 read $teapotPhotoFile
list [photo1 get 100 100] [photo1 get 150 100] [photo1 get 100 150]
} -cleanup {
image delete photo1
|
︙ | | |
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
|
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
|
-
+
-
+
-
+
-
+
|
image create photo photo1
} -body {
photo1 read
} -returnCodes error -cleanup {
image delete photo1
} -result {wrong # args: should be "photo1 read fileName ?-option value ...?"}
test imgPhoto-4.31 {ImgPhotoCmd procedure: read option} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
image create photo photo1
} -body {
photo1 read $teapotPhotoFile -zoom 2
} -returnCodes error -cleanup {
image delete photo1
} -result {unrecognized option "-zoom": must be -format, -from, -shrink, or -to}
test imgPhoto-4.32 {ImgPhotoCmd procedure: read option} -setup {
image create photo photo1
} -body {
list [catch {photo1 read bogus} err] [string tolower $err]
} -cleanup {
image delete photo1
} -result {1 {couldn't open "bogus": no such file or directory}}
test imgPhoto-4.33 {ImgPhotoCmd procedure: read option} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
image create photo photo1
} -body {
photo1 read $teapotPhotoFile -format bogus
} -cleanup {
image delete photo1
} -returnCodes error -result {image file format "bogus" is not supported}
test imgPhoto-4.34 {ImgPhotoCmd procedure: read option} -setup {
image create photo photo1
} -body {
photo1 read $README
} -returnCodes error -cleanup {
image delete photo1
} -result [subst {couldn't recognize data in image file "$README"}]
test imgPhoto-4.35 {ImgPhotoCmd procedure: read option} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
image create photo photo1
} -body {
photo1 read $teapotPhotoFile
list [image width photo1] [image height photo1] [photo1 get 120 120]
} -cleanup {
image delete photo1
} -result {256 256 {161 109 82}}
test imgPhoto-4.36 {ImgPhotoCmd procedure: read option} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
image create photo photo1
} -body {
photo1 read $teapotPhotoFile -from 0 70 60 120 -to 10 10 -shrink
list [image width photo1] [image height photo1] [photo1 get 29 19]
} -cleanup {
image delete photo1
|
︙ | | |
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
|
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
|
-
+
|
photo1 copy photo2 -to 1 1 -compositingrule set
checkImgTrans photo1
} -cleanup {
image delete photo1 photo2
} -result {0,2 1,1 2,0}
test imgPhoto-5.1 {ImgPhotoGet/Free procedures, shared instances} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
destroy .c
pack [canvas .c]
imageCleanup
} -body {
image create photo photo1 -file $teapotPhotoFile
.c create image 0 0 -image photo1 -tags photo1.1
|
︙ | | |
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
|
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
|
-
+
-
+
|
update
} -cleanup {
destroy .c
image delete photo1
} -result {}
test imgPhoto-7.1 {ImgPhotoFree procedure, resource freeing} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
destroy .c
pack [canvas .c]
imageCleanup
} -body {
image create photo photo1 -file $teapotPhotoFile
.c create image 0 0 -image photo1 -anchor nw
update
.c delete all
image delete photo1
} -cleanup {
destroy .c
} -result {}
test imgPhoto-7.2 {ImgPhotoFree procedures, unlinking} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
deleteWindows
imageCleanup
} -body {
image create photo photo1 -file $teapotPhotoFile
pack [canvas .c]
.c create image 10 10 -image photo1 -anchor nw
|
︙ | | |
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
|
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
|
-
+
|
update
.c delete all
} -cleanup {
destroy .c
image delete photo1
} -result {}
test imgPhoto-7.3 {ImgPhotoFree procedures, multiple visuals} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
deleteWindows
imageCleanup
} -body {
image create photo photo1 -file $teapotPhotoFile
button .b1 -image photo1
frame .f -visual best
|
︙ | | |
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
|
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
|
-
+
-
+
|
} -result {}
test imgPhoto-8.1 {ImgPhotoDelete procedure} -constraints hasTeapotPhoto -body {
image create photo photo2 -file $teapotPhotoFile
image delete photo2
} -result {}
test imgPhoto-8.2 {ImgPhotoDelete procedure} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -setup {
set x {}
} -body {
image create photo photo2 -file $teapotPhotoFile
rename photo2 newphoto2
lappend x [info command photo2] [info command new*] [newphoto2 cget -file]
image delete photo2
lappend x [info command new*]
} -result [list {} newphoto2 $teapotPhotoFile {}]
test imgPhoto-8.3 {ImgPhotoDelete procedure, name cleanup} -body {
image create photo photo1
image create photo photo2 -width 10 -height 10
image delete photo2
photo1 copy photo2
} -returnCodes error -cleanup {
imageCleanup
} -result {image "photo2" doesn't exist or is not a photo image}
test imgPhoto-9.1 {ImgPhotoCmdDeletedProc procedure} -constraints {
hasTeapotPhoto
hasTeapotPhoto
} -body {
image create photo photo2 -file $teapotPhotoFile
rename photo2 {}
list [lsearch -exact [imageNames] photo2] [catch {photo2 foo} msg] $msg
} -result {-1 1 {invalid command name "photo2"}}
test imgPhoto-10.1 {Tk_ImgPhotoPutBlock procedure} -setup {
|
︙ | | |
Changes to tests/listbox.test.
︙ | | |
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
|
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
|
-
+
|
destroy .l2
} -result [list [list a b c d] [list a b c d 1 2 3 4]]
test listbox-4.12 {ConfigureListbox procedure, listvar -> different listvar} -setup {
destroy .l2
} -body {
set x [list a b c d]
set y [list 1 2 3 4]
listbox .l2
listbox .l2
.l2 configure -listvar x
.l2 configure -listvar y
.l2 insert end 5 6 7 8
list $x $y
} -cleanup {
destroy .l2
} -result [list [list a b c d] [list 1 2 3 4 5 6 7 8]]
|
︙ | | |
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
|
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
|
-
+
|
# If "0" in selected font had 0 width, caused divide-by-zero error.
pack [listbox .l -font {{open look glyph}}]
update
} -cleanup {
destroy .l
} -result {}
# Listbox used in 6.*, 7.* tests
destroy .l
listbox .l -height 2 -xscrollcommand "record x" -yscrollcommand "record y"
pack .l
update
test listbox-6.1 {InsertEls procedure} -body {
|
︙ | | |
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
|
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
|
-
+
|
listbox .l1
rename .l1 {}
list [info command .l*] [winfo children .]
} -cleanup {
deleteWindows
} -result {{} {}}
test listbox-9.2 {ListboxCmdDeletedProc procedure, disabling -setgrid} -constraints {
fonts
fonts
} -setup {
destroy .top
} -body {
toplevel .top
wm geom .top +0+0
listbox .top.l -setgrid 1 -width 20 -height 10
pack .top.l
|
︙ | | |
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
|
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
|
-
+
|
.l insert end a b c
.l itemconfigure 0 -fg red
.l insert 0 1 2 3 4
list [.l itemcget 0 -fg] [.l itemcget 4 -fg]
} -cleanup {
destroy .l
} -result {{} red}
# state issues
test listbox-26.1 {listbox disabled state disallows inserts} -setup {
destroy .l
} -body {
listbox .l
.l insert end a b c
|
︙ | | |
Changes to tests/main.test.
︙ | | |
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
-
+
|
} -body {
read $f
} -cleanup {
close $f
removeFile script
} -result "script {} 0\n0\n"
# Procedure to simulate interactive typing of commands, line by line,
# Procedure to simulate interactive typing of commands, line by line,
# for test 2.3
proc type {chan script} {
foreach line [split $script \n] {
if {[catch {
puts $chan $line
flush $chan
}]} {
|
︙ | | |
Changes to tests/menu.test.
︙ | | |
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
|
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
|
-
+
|
.m1 cget -tearoffcommand
} -result {any old string}
destroy .m1
# We need to test all of the options with all of the different types of
# menu entries. The following code sets up .m1 with 6 items. It then
# runs through the 2.31 - 2.228 tests below
# index 0 is tearoff, 1 command, 2 cascade, 3 separator, 4 checkbutton,
# index 0 is tearoff, 1 command, 2 cascade, 3 separator, 4 checkbutton,
# 5 radiobutton
deleteWindows
menu .m1
.m1 add command -label "command"
menu .m2
.m2 add command -label "test"
.m1 add cascade -label "cascade" -menu .m2
|
︙ | | |
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
|
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
|
-
+
-
+
-
+
-
+
-
+
-
+
|
} -returnCodes error -result {image "bogus" doesn't exist}
test menu-2.132 {entry configuration options 5 -image bogus radiobutton} -body {
.m1 entryconfigure 5 -image bogus
} -returnCodes error -result {image "bogus" doesn't exist}
test menu-2.133 {entry configuration options 0 -image {} tearoff} -body {
.m1 entryconfigure 0 -image
.m1 entryconfigure 0 -image
} -returnCodes error -result {unknown option "-image"}
test menu-2.134 {entry configuration options 1 -image {} command} -setup {
.m1 entryconfigure 1 -image {}
} -body {
.m1 entryconfigure 1 -image
.m1 entryconfigure 1 -image
lindex [.m1 entryconfigure 1 -image] 4
} -result {}
test menu-2.135 {entry configuration options 2 -image {} cascade} -setup {
.m1 entryconfigure 2 -image {}
} -body {
.m1 entryconfigure 2 -image
.m1 entryconfigure 2 -image
lindex [.m1 entryconfigure 2 -image] 4
} -result {}
test menu-2.136 {entry configuration options 3 -image {} separator} -body {
.m1 entryconfigure 3 -image
.m1 entryconfigure 3 -image
} -returnCodes error -result {unknown option "-image"}
test menu-2.137 {entry configuration options 4 -image {} checkbutton} -body {
.m1 entryconfigure 4 -image
.m1 entryconfigure 4 -image
lindex [.m1 entryconfigure 4 -image] 4
} -result {}
test menu-2.138 {entry configuration options 5 -image {} radiobutton} -body {
.m1 entryconfigure 5 -image
.m1 entryconfigure 5 -image
lindex [.m1 entryconfigure 5 -image] 4
} -result {}
test menu-2.139 {entry configuration options 0 -indicatoron 1 tearoff} -body {
.m1 entryconfigure 0 -indicatoron 1
} -returnCodes error -result {unknown option "-indicatoron"}
|
︙ | | |
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
|
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
|
-
+
-
+
-
+
-
+
-
+
-
+
|
} -returnCodes error -result {image "bogus" doesn't exist}
test menu-2.192 {entry configuration options 5 -selectimage bogus radiobutton} -body {
.m1 entryconfigure 5 -selectimage bogus
} -returnCodes error -result {image "bogus" doesn't exist}
test menu-2.193 {entry configuration options 0 -selectimage {} tearoff} -body {
.m1 entryconfigure 0 -selectimage
.m1 entryconfigure 0 -selectimage
} -returnCodes error -result {unknown option "-selectimage"}
test menu-2.194 {entry configuration options 1 -selectimage {} command} -body {
.m1 entryconfigure 1 -selectimage
.m1 entryconfigure 1 -selectimage
} -returnCodes error -result {unknown option "-selectimage"}
test menu-2.195 {entry configuration options 2 -selectimage {} cascade} -body {
.m1 entryconfigure 2 -selectimage
.m1 entryconfigure 2 -selectimage
} -returnCodes error -result {unknown option "-selectimage"}
test menu-2.196 {entry configuration options 3 -selectimage {} separator} -body {
.m1 entryconfigure 3 -selectimage
.m1 entryconfigure 3 -selectimage
} -returnCodes error -result {unknown option "-selectimage"}
test menu-2.197 {entry configuration options 4 -selectimage {} checkbutton} -body {
.m1 entryconfigure 4 -selectimage
.m1 entryconfigure 4 -selectimage
lindex [.m1 entryconfigure 4 -selectimage] 4
} -result {}
test menu-2.198 {entry configuration options 5 -selectimage {} radiobutton} -body {
.m1 entryconfigure 5 -selectimage
.m1 entryconfigure 5 -selectimage
lindex [.m1 entryconfigure 5 -selectimage] 4
} -result {}
test menu-2.199 {entry configuration options 0 -state normal tearoff} -body {
.m1 entryconfigure 0 -state normal
lindex [.m1 entryconfigure 0 -state] 4
} -result {normal}
|
︙ | | |
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
|
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
|
-
+
-
+
|
} -body {
menu .m1
.m1
} -cleanup {
destroy .m1
} -returnCodes error -result {wrong # args: should be ".m1 option ?arg ...?"}
test menu-3.2 {MenuWidgetCmd, Tcl_Preserve and Tcl_Release} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -setup {
destroy .m1
} -body {
menu .m1 -postcommand "destroy .m1"
.m1 add command -label "menu-3.2: Hit Escape"
.m1 post 40 40
} -cleanup {
destroy .m1
} -returnCodes ok -result {}
test menu-3.3 {MenuWidgetCmd procedure, "activate" option} -setup {
destroy .m1
} -body {
} -body {
menu .m1
.m1 add command -label "test"
.m1 activate
} -cleanup {
destroy .m1
} -returnCodes error -result {wrong # args: should be ".m1 activate index"}
test menu-3.4 {MenuWidgetCmd procedure, "activate" option} -setup {
|
︙ | | |
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
|
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
|
-
+
|
destroy .m1
} -result {}
test menu-3.26 {MenuWidgetCmd procedure, "delete" option} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label "foo"
.m1 delete 1 0
.m1 delete 1 0
} -cleanup {
destroy .m1
} -result {}
test menu-3.27 {MenuWidgetCmd procedure, "delete" option} -setup {
destroy .m1
} -body {
menu .m1
|
︙ | | |
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
|
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
|
-
+
|
} -cleanup {
destroy .m1
} -returnCodes error -result {expected integer but got "bar"}
test menu-3.50 {MenuWidgetCmd procedure, "post" option} -constraints {
nonUnixUserInteraction
} -setup {
destroy .m1
} -body {
} -body {
menu .m1
.m1 add command -label "menu-3.53: hit Escape" -command "puts hello"
.m1 post 40 40
} -cleanup {
destroy .m1
} -result {}
test menu-3.51 {MenuWidgetCmd procedure, "postcascade" option} -setup {
|
︙ | | |
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
|
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
|
-
+
|
} -cleanup {
destroy .m1
} -returnCodes error -result {bad menu entry index "foo"}
test menu-3.53 {MenuWidgetCmd procedure, "postcascade" option} -constraints {
nonUnixUserInteraction
} -setup {
destroy .m1 .m2
} -body {
} -body {
menu .m1
.m1 add command -label "menu-3.56 - hit Escape"
menu .m2
.m1 post 40 40
.m1 add cascade -menu .m2
.m1 postcascade 1
} -cleanup {
|
︙ | | |
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
|
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
|
-
+
-
+
|
} -cleanup {
destroy .m1
} -returnCodes error -result {wrong # args: should be ".m1 unpost"}
test menu-3.64 {MenuWidgetCmd procedure, "unpost" option} -constraints {
nonUnixUserInteraction
} -setup {
destroy .m1
} -body {
} -body {
menu .m1
.m1 add command -label "menu-3.68 - hit Escape"
.m1 post 40 40
.m1 post 40 40
.m1 unpost
} -cleanup {
destroy .m1
} -result {}
test menu-3.65 {MenuWidgetCmd procedure, "yposition" option} -setup {
destroy .m1
} -body {
|
︙ | | |
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
|
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
|
-
+
|
destroy .m1
} -result {0 {} 0 off 0 {}}
test menu-4.5 {TkInvokeMenu: checkbutton array element} -setup {
destroy .m1
} -body {
catch {unset foo}
menu .m1
.m1 add checkbutton -label "test" -variable foo(1) -onvalue on
.m1 add checkbutton -label "test" -variable foo(1) -onvalue on
list [catch {.m1 invoke 1} msg] $msg [catch {set foo(1)} msg2] $msg2 [catch {unset foo} msg3] $msg3
} -cleanup {
destroy .m1
} -result {0 {} 0 on 0 {}}
test menu-4.6 {TkInvokeMenu: radiobutton} -setup {
destroy .m1
} -body {
|
︙ | | |
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
|
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
|
-
+
|
destroy .m1
} -result {0 menu-4.8 0 menu-4.8 0 {}}
test menu-4.11 {TkInvokeMenu} -setup {
destroy .m1
} -body {
menu .m1
.m1 add cascade -label "test" -menu .m1.m2
list [catch {.m1 invoke 1} msg] $msg
list [catch {.m1 invoke 1} msg] $msg
} -cleanup {
destroy .m1
} -result {0 {}}
test menu-4.12 {TkInvokeMenu} -setup {
destroy .m1
} -body {
menu .m1
|
︙ | | |
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
|
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
|
-
+
|
} -body {
menu .m1
.m1 clone .m2
.m1 clone .m1.m3
destroy .m1
} -cleanup {
deleteWindows
} -returnCodes ok
} -returnCodes ok
test menu-6.5 {TkDestroyMenu} -setup {
destroy .m1 .m2
} -body {
menu .m1
.m1 clone .m2
destroy .m1
winfo exists .m2
|
︙ | | |
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
|
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
|
-
+
|
} -result {{} {}}
test menu-8.4 {DestroyMenuEntry} -setup {
destroy .m1
} -body {
menu .m1
.m1 add checkbutton -variable foo
list [.m1 delete 1] [destroy .m1]
} -result {{} {}}
} -result {{} {}}
test menu-8.5 {DestroyMenuEntry} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label "test"
list [.m1 delete 1] [destroy .m1]
} -result {{} {}}
|
︙ | | |
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
|
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
|
-
+
|
# test menu-9 - Can only change when fonts change on system, which cannot
# be done from tcl.
test menu-9.1 {ConfigureMenu} -setup {
destroy .m1
} -body {
menu .m1
list [.m1 configure -postcommand "beep"] [.m1 cget -postcommand]
list [.m1 configure -postcommand "beep"] [.m1 cget -postcommand]
} -cleanup {
deleteWindows
} -result {{} beep}
test menu-9.2 {ConfigureMenu} -setup {
destroy .m1
} -body {
menu .m1
|
︙ | | |
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
|
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
|
-
+
|
list [.m1 entryconfigure 1 -label "test"] [.m1 entrycget 1 -label]
} -cleanup {
deleteWindows
} -result {{} test}
test menu-11.4 {ConfigureMenuEntry} -setup {
deleteWindows
} -body {
menu .m1
menu .m1
.m1 add command
list [.m1 entryconfigure 1 -accel "S"] [.m1 entrycget 1 -accel]
} -cleanup {
deleteWindows
} -result {{} S}
test menu-11.5 {ConfigureMenuEntry} -setup {
deleteWindows
|
︙ | | |
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
|
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
} -cleanup {
deleteWindows
} -result {}
test menu-11.12 {ConfigureMenuEntry} -setup {
deleteWindows
} -body {
menu .m1
menu .m2
menu .m2
.m2 add cascade -menu .m1
menu .m3
menu .m3
.m3 add cascade -menu .m1
menu .m4
menu .m4
.m4 add cascade -menu .m1
menu .m5
menu .m5
.m5 add cascade
.m5 entryconfigure 1 -label "test" -menu .m1
} -cleanup {
deleteWindows
} -result {}
test menu-11.13 {ConfigureMenuEntry} -setup {
deleteWindows
} -body {
menu .m1
menu .m2
menu .m2
.m2 add cascade -menu .m1
menu .m3
menu .m3
.m3 add cascade -menu .m1
menu .m4
menu .m4
.m4 add cascade -menu .m1
.m3 entryconfigure 1 -label "test" -menu .m1
} -cleanup {
deleteWindows
} -result {}
test menu-11.14 {ConfigureMenuEntry} -setup {
deleteWindows
|
︙ | | |
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
|
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
|
-
+
-
+
|
} -cleanup {
deleteWindows
} -result {}
test menu-19.1 {TkPostCommand} -constraints nonUnixUserInteraction -setup {
deleteWindows
} -body {
} -body {
menu .m1 -postcommand "set menu_test menu-19.1"
.m1 add command -label "menu-19.1 - hit Escape"
list [.m1 post 40 40] [.m1 unpost] [set menu_test]
} -cleanup {
deleteWindows
} -result {menu-19.1 {} menu-19.1}
test menu-19.2 {TkPostCommand} -constraints nonUnixUserInteraction -setup {
deleteWindows
} -body {
} -body {
menu .m1
.m1 add command -label "menu-19.2 - hit Escape"
list [.m1 post 40 40] [.m1 unpost]
} -cleanup {
deleteWindows
} -result {{} {}}
|
︙ | | |
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
|
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
|
-
+
|
.m1 delete 1
} -cleanup {
deleteWindows
} -result {}
test menu-32.2 {DeleteMenuCloneEntries} -setup {
deleteWindows
} -body {
menu .m1
.m1 add command -label one
.m1 add command -label two
.m1 add command -label three
.m1 add command -label four
.m1 clone .m2
.m1 delete 2 3
|
︙ | | |
Changes to tests/menuDraw.test.
︙ | | |
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
-
+
|
} -result {}
test menuDraw-5.3 {TkMenuConfigureDrawOptions - no disabledFg} -setup {
deleteWindows
} -body {
menu .m1 -disabledforeground ""
} -cleanup {
deleteWindows
} -result {.m1}
} -result {.m1}
test menuDraw-6.1 {TkMenuConfigureEntryDrawOptions - no tkfont specified} -setup {
deleteWindows
} -body {
menu .m1
.m1 add command -label "foo"
|
︙ | | |
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
|
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
|
-
+
-
+
-
+
|
update idletasks
} -cleanup {
deleteWindows
} -result {}
test menuDraw-11.1 {TkMenuSelectImageProc - entry selected; redraw not pending} -constraints {
testImageType
testImageType
} -setup {
deleteWindows
imageCleanup
} -body {
image create test image1
image create test image2
menu .m1
.m1 add checkbutton -image image1 -selectimage image2
.m1 invoke 1
set tearoff [tk::TearOffMenu .m1 40 40]
update idletasks
list [image delete image2] [destroy .m1]
} -cleanup {
imageCleanup
} -result {{} {}}
test menuDraw-11.2 {TkMenuSelectImageProc - entry selected; redraw pending} -constraints {
testImageType
testImageType
} -setup {
deleteWindows
imageCleanup
} -body {
image create test image1
image create test image2
menu .m1
.m1 add checkbutton -image image1 -selectimage image2
.m1 invoke 1
set tearoff [tk::TearOffMenu .m1 40 40]
list [image delete image2] [destroy .m1]
} -cleanup {
imageCleanup
} -result {{} {}}
test menuDraw-11.3 {TkMenuSelectImageProc - entry not selected} -constraints {
testImageType
testImageType
} -setup {
deleteWindows
imageCleanup
} -body {
image create test image1
image create test image2
menu .m1
|
︙ | | |
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
|
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
|
-
+
|
.m1 add command -label "six"
set tearoff [tk::TearOffMenu .m1 40 40]
update
} -cleanup {
deleteWindows
} -result {}
test menuDraw-12.6 {Display menu - testing for extra space and menubars} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
menu .m1
.m1 add cascade -label foo
. configure -menu .m1
update
|
︙ | | |
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
|
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
|
-
+
|
deleteWindows
} -body {
menu .m1
.m1 add cascade -label test -menu .m2
menu .m2
.m2 add command -label "Hit ESCAPE to get rid of this menu"
set tearoff [tk::TearOffMenu .m1 40 40]
$tearoff postcascade 0
$tearoff postcascade 0
} -cleanup {
deleteWindows
} -result {}
test menuDraw-17.1 {AdjustMenuCoords - menubar} -constraints unix -setup {
deleteWindows
|
︙ | | |
Changes to tests/menubut.test.
︙ | | |
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
|
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
|
-
+
|
test menubutton-4.1 {ConfigureMenuButton procedure} -setup {
deleteWindows
} -body {
button .mb1 -text "Menubutton 1"
.mb1 configure -width 1i
} -cleanup {
deleteWindows
} -returnCodes error -result {expected integer but got "1i"}
} -returnCodes error -result {expected integer but got "1i"}
test menubutton-4.2 {ConfigureMenuButton procedure} -setup {
deleteWindows
} -body {
button .mb1 -text "Menubutton 1"
catch {.mb1 configure -width 1i}
return $errorInfo
} -cleanup {
|
︙ | | |
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
|
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
|
-
+
-
+
|
deleteWindows
} -result {bad screen distance "abc"
(processing -width option)
invoked from within
".mb1 configure -width abc"}
test menubutton-4.7 {ConfigureMenuButton procedure} -constraints {
testImageType
testImageType
} -setup {
deleteWindows
imageCleanup
} -body {
image create test image1
button .mb1 -image image1
.mb1 configure -height 0.5x
} -cleanup {
deleteWindows
imageCleanup
} -returnCodes error -result {bad screen distance "0.5x"}
test menubutton-4.8 {ConfigureMenuButton procedure} -constraints {
testImageType
testImageType
} -setup {
deleteWindows
imageCleanup
} -body {
image create test image1
button .mb1 -image image1
catch {.mb1 configure -height 0.5x}
|
︙ | | |
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
|
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
|
-
+
|
deleteWindows
} -result {102 46 20 12}
test menubutton-4.10 {ConfigureMenuButton procedure - bad direction} -setup {
deleteWindows
} -body {
menubutton .mb -text "Test"
.mb configure -direction badValue
.mb configure -direction badValue
} -cleanup {
deleteWindows
} -returnCodes error -result {bad direction "badValue": must be above, below, flush, left, or right}
test menubutton-4.11 {ConfigureMenuButton procedure - bad direction} -setup {
deleteWindows
} -body {
menubutton .mb -text "Test"
|
︙ | | |
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
|
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
|
-
+
-
+
-
+
-
+
-
+
|
list [info command .mb*] [winfo children .]
} -cleanup {
deleteWindows
} -result {{} {}}
test menubutton-7.1 {ComputeMenuButtonGeometry procedure} -constraints {
testImageType
testImageType
} -setup {
deleteWindows
image create test image1
} -body {
menubutton .mb -image image1 -bd 4 -highlightthickness 0
pack .mb
list [winfo reqwidth .mb] [winfo reqheight .mb]
} -cleanup {
deleteWindows
imageCleanup
} -result {38 23}
test menubutton-7.2 {ComputeMenuButtonGeometry procedure} -constraints {
testImageType
testImageType
} -setup {
deleteWindows
image create test image1
} -body {
menubutton .mb -image image1 -bd 1 -highlightthickness 2
pack .mb
list [winfo reqwidth .mb] [winfo reqheight .mb]
} -cleanup {
deleteWindows
imageCleanup
} -result {36 21}
test menubutton-7.3 {ComputeMenuButtonGeometry procedure} -constraints {
testImageType
testImageType
} -setup {
deleteWindows
image create test image1
} -body {
menubutton .mb -image image1 -bd 0 -highlightthickness 2 -padx 5 -pady 5
pack .mb
list [winfo reqwidth .mb] [winfo reqheight .mb]
} -cleanup {
deleteWindows
imageCleanup
} -result {34 19}
test menubutton-7.4 {ComputeMenuButtonGeometry procedure} -constraints {
testImageType
testImageType
} -setup {
deleteWindows
image create test image1
} -body {
menubutton .mb -image image1 -bd 2 -relief raised -width 40 \
-highlightthickness 2
pack .mb
list [winfo reqwidth .mb] [winfo reqheight .mb]
} -cleanup {
deleteWindows
imageCleanup
} -result {48 23}
test menubutton-7.5 {ComputeMenuButtonGeometry procedure} -constraints {
testImageType
testImageType
} -setup {
deleteWindows
image create test image1
} -body {
menubutton .mb -image image1 -bd 2 -relief raised -height 30 \
-highlightthickness 2
pack .mb
|
︙ | | |
Changes to tests/message.test.
︙ | | |
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
|
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
package require tcltest 2.2
namespace import ::tcltest::*
tcltest::loadTestedCommands
eval tcltest::configure $argv
test message-1.1 {configuration option: "anchor"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
test message-1.1 {configuration option: "anchor"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -anchor w
.m cget -anchor
} -cleanup {
destroy .m
} -result {w}
test message-1.2 {configuration option: "anchor"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -anchor bogus
} -cleanup {
destroy .m
} -returnCodes {error} -result {bad anchor "bogus": must be n, ne, e, se, s, sw, w, nw, or center}
test message-1.3 {configuration option: "aspect"} -setup {
test message-1.3 {configuration option: "aspect"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -aspect 3
.m cget -aspect
} -cleanup {
destroy .m
} -result {3}
test message-1.4 {configuration option: "aspect"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -aspect bogus
} -cleanup {
destroy .m
} -returnCodes {error} -result {expected integer but got "bogus"}
test message-1.5 {configuration option: "background"} -setup {
test message-1.5 {configuration option: "background"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -background #ff0000
.m cget -background
} -cleanup {
destroy .m
} -result {#ff0000}
test message-1.6 {configuration option: "background"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -background non-existent
} -cleanup {
destroy .m
} -returnCodes {error} -result {unknown color name "non-existent"}
test message-1.7 {configuration option: "bd"} -setup {
test message-1.7 {configuration option: "bd"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -bd 4
.m cget -bd
} -cleanup {
destroy .m
} -result {4}
test message-1.8 {configuration option: "bd"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -bd badValue
} -cleanup {
destroy .m
} -returnCodes {error} -result {bad screen distance "badValue"}
test message-1.9 {configuration option: "bg"} -setup {
test message-1.9 {configuration option: "bg"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -bg #ff0000
.m configure -bg #ff0000
.m cget -bg
} -cleanup {
destroy .m
} -result {#ff0000}
test message-1.10 {configuration option: "bg"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -bg non-existent
} -cleanup {
destroy .m
} -returnCodes {error} -result {unknown color name "non-existent"}
test message-1.11 {configuration option: "borderwidth"} -setup {
test message-1.11 {configuration option: "borderwidth"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -borderwidth 1.3
.m cget -borderwidth
} -cleanup {
destroy .m
} -result {1}
test message-1.12 {configuration option: "borderwidth"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -borderwidth badValue
} -cleanup {
destroy .m
} -returnCodes {error} -result {bad screen distance "badValue"}
test message-1.13 {configuration option: "cursor"} -setup {
test message-1.13 {configuration option: "cursor"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -cursor arrow
.m cget -cursor
} -cleanup {
destroy .m
} -result {arrow}
test message-1.14 {configuration option: "cursor"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -cursor badValue
} -cleanup {
destroy .m
} -returnCodes {error} -result {bad cursor spec "badValue"}
test message-1.15 {configuration option: "fg"} -setup {
test message-1.15 {configuration option: "fg"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -fg #00ff00
.m cget -fg
} -cleanup {
destroy .m
} -result {#00ff00}
test message-1.16 {configuration option: "fg"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -fg badValue
} -cleanup {
destroy .m
} -returnCodes {error} -result {unknown color name "badValue"}
test message-1.17 {configuration option: "font"} -setup {
test message-1.17 {configuration option: "font"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -font fixed
.m cget -font
} -cleanup {
destroy .m
} -result {fixed}
test message-1.18 {configuration option: "font"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -font {}
} -cleanup {
destroy .m
} -returnCodes {error} -result {font "" doesn't exist}
test message-1.19 {configuration option: "-foreground"} -setup {
test message-1.19 {configuration option: "-foreground"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -foreground green
.m cget -foreground
.m cget -foreground
} -cleanup {
destroy .m
} -result {green}
test message-1.20 {configuration option: "-foreground"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -foreground badValue
} -cleanup {
destroy .m
} -returnCodes {error} -result {unknown color name "badValue"}
test message-1.21 {configuration option: "highlightbackground"} -setup {
test message-1.21 {configuration option: "highlightbackground"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -highlightbackground #112233
.m cget -highlightbackground
} -cleanup {
destroy .m
} -result {#112233}
test message-1.22 {configuration option: "highlightbackground"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -highlightbackground ugly
} -cleanup {
destroy .m
} -returnCodes {error} -result {unknown color name "ugly"}
test message-1.23 {configuration option: "highlightcolor"} -setup {
test message-1.23 {configuration option: "highlightcolor"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -highlightcolor #123456
.m cget -highlightcolor
.m cget -highlightcolor
} -cleanup {
destroy .m
} -result {#123456}
test message-1.24 {configuration option: "highlightcolor"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -highlightcolor non-existent
} -cleanup {
destroy .m
} -returnCodes {error} -result {unknown color name "non-existent"}
test message-1.25 {configuration option: "highlightthickness"} -setup {
test message-1.25 {configuration option: "highlightthickness"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -highlightthickness 2
.m cget -highlightthickness
.m cget -highlightthickness
} -cleanup {
destroy .m
} -result {2}
test message-1.26 {configuration option: "highlightthickness"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -highlightthickness badValue
} -cleanup {
destroy .m
} -returnCodes {error} -result {bad screen distance "badValue"}
test message-1.27 {configuration option: "justify"} -setup {
test message-1.27 {configuration option: "justify"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -justify right
.m cget -justify
} -cleanup {
destroy .m
} -result {right}
test message-1.28 {configuration option: "justify"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -justify bogus
} -cleanup {
destroy .m
} -returnCodes {error} -result {bad justification "bogus": must be left, right, or center}
test message-1.29 {configuration option: "padx"} -setup {
test message-1.29 {configuration option: "padx"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -padx 12m
.m cget -padx
.m cget -padx
} -cleanup {
destroy .m
} -result {12m}
test message-1.30 {configuration option: "padx"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -padx 420x
} -cleanup {
destroy .m
} -returnCodes {error} -result {bad screen distance "420x"}
test message-1.31 {configuration option: "pady"} -setup {
test message-1.31 {configuration option: "pady"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -pady 12m
.m cget -pady
} -cleanup {
destroy .m
} -result {12m}
test message-1.32 {configuration option: "pady"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -pady 420x
} -cleanup {
destroy .m
} -returnCodes {error} -result {bad screen distance "420x"}
test message-1.33 {configuration option: "relief"} -setup {
test message-1.33 {configuration option: "relief"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -relief ridge
.m cget -relief
.m cget -relief
} -cleanup {
destroy .m
} -result {ridge}
test message-1.34 {configuration option: "relief"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
.m configure -relief badValue
} -cleanup {
destroy .m
} -returnCodes {error} -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}
test message-1.35 {configuration options: "text"} -setup {
test message-1.35 {configuration options: "text"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -text "Sample text"
.m cget -text
} -cleanup {
destroy .m
} -result {Sample text}
test message-1.36 {configuration option: "textvariable"} -setup {
test message-1.36 {configuration option: "textvariable"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -textvariable i
.m cget -textvariable
.m cget -textvariable
} -cleanup {
destroy .m
} -result {i}
test message-1.37 {configuration option: "width"} -setup {
test message-1.37 {configuration option: "width"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
update
} -body {
.m configure -width 2
.m cget -width
.m cget -width
} -cleanup {
destroy .m
} -result {2}
test message-1.38 {configuration option: "width"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
|
︙ | | |
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
|
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
|
-
+
-
+
-
+
-
+
|
message
} -returnCodes {error} -result {wrong # args: should be "message pathName ?-option value ...?"}
test message-2.2 {Tk_MessageObjCmd procedure} -body {
message foo
} -returnCodes {error} -result {bad window path name "foo"}
test message-2.3 {Tk_MessageObjCmd procedure} -body {
catch {message foo}
catch {message foo}
winfo child .
} -result {}
test message-2.4 {Tk_MessageObjCmd procedure} -body {
message .s -gorp dump
} -returnCodes {error} -result {unknown option "-gorp"}
test message-2.5 {Tk_MessageObjCmd procedure} -body {
catch {message .s -gorp dump}
catch {message .s -gorp dump}
winfo child .
} -result {}
} -result {}
test message-3.1 {MessageWidgetObjCmd procedure} -setup {
message .m
} -body {
.m
.m
} -cleanup {
destroy .m
} -returnCodes error -result {wrong # args: should be ".m option ?arg ...?"}
test message-3.2 {MessageWidgetObjCmd procedure, "cget"} -setup {
message .m
} -body {
.m cget
|
︙ | | |
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
|
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
|
-
+
|
destroy .m
} -returnCodes error -result {unknown option "-gorp"}
test message-3.4 {MessageWidgetObjCmd procedure, "configure"} -setup {
message .m
} -body {
.m configure -text foobar
lindex [.m configure -text] 4
lindex [.m configure -text] 4
} -cleanup {
destroy .m
} -result {foobar}
test message-3.5 {MessageWidgetObjCmd procedure, "configure"} -setup {
message .m
} -body {
llength [.m configure]
|
︙ | | |
Changes to tests/msgbox.test.
︙ | | |
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
|
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
}
}
#
# Try out all combinations of (type) x (default button) and
# (type) x (icon).
#
test msgbox-2.1 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . abort
tk_messageBox -title Hi -message "Please press abort" -type abortretryignore
} -result {abort}
test msgbox-2.2 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . abort
tk_messageBox -title Hi -message "Please press abort" \
-type abortretryignore -icon warning
} -result {abort}
test msgbox-2.3 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . abort
tk_messageBox -title Hi -message "Please press abort" \
-type abortretryignore -icon error
} -result {abort}
test msgbox-2.4 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . abort
tk_messageBox -title Hi -message "Please press abort" \
-type abortretryignore -icon info
} -result {abort}
test msgbox-2.5 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . abort
tk_messageBox -title Hi -message "Please press abort" \
-type abortretryignore -icon question
} -result {abort}
test msgbox-2.6 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . abort
tk_messageBox -title Hi -message "Please press abort" \
-type abortretryignore -default abort
} -result {abort}
test msgbox-2.7 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" \
-type abortretryignore -default retry
} -result {retry}
test msgbox-2.8 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ignore
tk_messageBox -title Hi -message "Please press ignore" \
-type abortretryignore -default ignore
} -result {ignore}
test msgbox-2.9 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" -type ok
} -result {ok}
test msgbox-2.10 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type ok -icon warning
} -result {ok}
test msgbox-2.11 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type ok -icon error
} -result {ok}
test msgbox-2.12 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type ok -icon info
} -result {ok}
test msgbox-2.13 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type ok -icon question
} -result {ok}
test msgbox-2.14 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type ok -default ok
} -result {ok}
test msgbox-2.15 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" -type okcancel
} -result {ok}
test msgbox-2.16 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type okcancel -icon warning
} -result {ok}
test msgbox-2.17 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type okcancel -icon error
} -result {ok}
test msgbox-2.18 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type okcancel -icon info
} -result {ok}
test msgbox-2.19 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type okcancel -icon question
} -result {ok}
test msgbox-2.20 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type okcancel -default ok
} -result {ok}
test msgbox-2.21 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . cancel
tk_messageBox -title Hi -message "Please press cancel" \
-type okcancel -default cancel
} -result {cancel}
test msgbox-2.22 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" -type retrycancel
} -result {retry}
test msgbox-2.23 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" \
-type retrycancel -icon warning
} -result {retry}
test msgbox-2.24 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" \
-type retrycancel -icon error
} -result {retry}
test msgbox-2.25 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" \
-type retrycancel -icon info
} -result {retry}
test msgbox-2.26 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" \
-type retrycancel -icon question
} -result {retry}
test msgbox-2.27 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" \
-type retrycancel -default retry
} -result {retry}
test msgbox-2.28 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . cancel
tk_messageBox -title Hi -message "Please press cancel" \
-type retrycancel -default cancel
} -result {cancel}
test msgbox-2.29 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" -type yesno
} -result {yes}
test msgbox-2.30 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesno -icon warning
} -result {yes}
test msgbox-2.31 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesno -icon error
} -result {yes}
test msgbox-2.32 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesno -icon info
} -result {yes}
test msgbox-2.33 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesno -icon question
} -result {yes}
test msgbox-2.34 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesno -default yes
} -result {yes}
test msgbox-2.35 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . no
tk_messageBox -title Hi -message "Please press no" \
-type yesno -default no
} -result {no}
test msgbox-2.36 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" -type yesnocancel
} -result {yes}
test msgbox-2.37 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesnocancel -icon warning
} -result {yes}
test msgbox-2.38 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesnocancel -icon error
} -result {yes}
test msgbox-2.39 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesnocancel -icon info
} -result {yes}
test msgbox-2.40 {tk_messageBox command -icon option} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesnocancel -icon question
} -result {yes}
test msgbox-2.41 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesnocancel -default yes
} -result {yes}
test msgbox-2.42 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . no
tk_messageBox -title Hi -message "Please press no" \
-type yesnocancel -default no
} -result {no}
test msgbox-2.43 {tk_messageBox command} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
ChooseMsg . cancel
tk_messageBox -title Hi -message "Please press cancel" \
-type yesnocancel -default cancel
} -result {cancel}
# These tests will hang your test suite if they fail.
test msgbox-3.1 {tk_messageBox handles withdrawn parent} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
wm withdraw .
ChooseMsg . "ok"
tk_messageBox -title Hi -message "Please press ok" \
-type ok -default ok
} -cleanup {
wm deiconify .
} -result {ok}
test msgbox-3.2 {tk_messageBox handles iconified parent} -constraints {
nonUnixUserInteraction
nonUnixUserInteraction
} -body {
wm iconify .
ChooseMsg . "ok"
tk_messageBox -title Hi -message "Please press ok" \
-type ok -default ok
} -cleanup {
wm deiconify .
|
︙ | | |
Changes to tests/option.file1.
︙ | | |
9
10
11
12
13
14
15
16
17
18
|
9
10
11
12
13
14
15
16
17
18
|
-
+
|
*\
x3 \
: pur\
ple
*x 4: brown
# More comments, this time delimited by hash-marks.
# Comment-line with space.
*x6:
*x6:
*x9: \ \ \\\101\n
# comment line as last line of file.
|
Changes to tests/option.file3.
︙ | | |
9
10
11
12
13
14
15
16
17
18
|
9
10
11
12
13
14
15
16
17
18
|
-
+
|
*\
x3 \
: pur\
ple
*x 4: brówn
# More comments, this time delimited by hash-marks.
# Comment-line with space.
*x6:
*x6:
*x9: \ \ \\\101\n
# comment line as last line of file.
|
Changes to tests/option.test.
︙ | | |
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
-
+
|
} -result {}
test option-12.6 {stack pushing/popping} -body {
option get .op1 z Color2
} -result {}
# Test the major priority levels (widgetDefault, etc.)
# Configurations for tests 13.*
# Configurations for tests 13.*
option clear
option add $appName.op1.a 100 100
option add $appName.op1.A interactive interactive
option add $appName.op1.b userDefault userDefault
option add $appName.op1.B startupFile startupFile
option add $appName.op1.c widgetDefault widgetDefault
option add $appName.op1.C 0 0
|
︙ | | |
Changes to tests/pack.test.
︙ | | |
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
|
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
|
-
+
|
# adjust the position of .pack before test to avoid a screen switch
# that occurs with window managers that have desktops four times as big
# as the screen (screen switch causes scale and other tests to fail).
wm geometry .pack +100+100
# On the PC, when the width/height is configured while the window is
# On the PC, when the width/height is configured while the window is
# unmapped, the changes don't take effect until the window is remapped.
# Who knows why?
eval destroy [winfo child .pack]
frame .pack.a -width 100 -height 50 -relief raised -bd 2
pack .pack.a
update
|
︙ | | |
Changes to tests/panedwindow.test.
︙ | | |
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
|
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
|
-
+
-
+
|
deleteWindows
} -body {
# There are no sashes until you have 2 panes
panedwindow .p
.p add [frame .p.f]
list [catch {.p sash coord -1} msg] $msg \
[catch {.p sash coord 0} msg] $msg \
[catch {.p sash coord 1} msg] $msg
[catch {.p sash coord 1} msg] $msg
} -cleanup {
deleteWindows
} -result [list 1 "invalid sash index" 1 "invalid sash index" 1 "invalid sash index"]
test panedwindow-6.10 {sash coord subcommand, errors} -setup {
deleteWindows
} -body {
# There are no sashes until you have 2 panes
panedwindow .p
.p add [frame .p.f] [frame .p.f2]
list [catch {.p sash coord -1} msg] $msg \
[catch {.p sash coord 0} msg] \
[catch {.p sash coord 1} msg] $msg \
[catch {.p sash coord 2} msg] $msg
[catch {.p sash coord 2} msg] $msg
} -cleanup {
deleteWindows
} -result [list 1 "invalid sash index" 0 1 "invalid sash index" 1 "invalid sash index"]
test panedwindow-7.1 {sash mark subcommand, errors} -setup {
deleteWindows
|
︙ | | |
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
|
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
|
-
+
|
} -body {
panedwindow .p
.p add [button .b] [button .c]
.p sash dragto 0 0 bar
} -cleanup {
deleteWindows
} -returnCodes error -result {expected integer but got "bar"}
test panedwindow-9.1 {sash mark/sash dragto interaction} -setup {
deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 4 -showhandle false
.p add [frame .f -width 20 -height 20] [button .c -text foobar]
.p sash mark 0 10 10
|
︙ | | |
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
|
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
|
-
+
|
update
.p sash place 1 200 0
update
lappend result [winfo reqwidth .p]
} -cleanup {
deleteWindows
} -result {68 100}
test panedwindow-12.1 {horizontal panedwindow lays out widgets properly} -setup {
deleteWindows
set result {}
} -body {
panedwindow .p -showhandle false -borderwidth 2 -sashpad 2 -sashwidth 2
foreach win {.p.f .p.f2 .p.f3} {.p add [frame $win -width 20 -height 10]}
|
︙ | | |
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
|
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
|
-
+
|
set result ""
} -result {}
test panedwindow-13.2 {PanedWindowLostSlaveProc, widget yields management} -setup {
deleteWindows
} -body {
# Check that the paned window correctly yields geometry management of
# a slave when some other geometry manager steals the slave from us.
# This test should not cause a core dump, and it should not cause a
# memory leak.
panedwindow .p
.p add [button .b]
pack .p
update
pack .b
|
︙ | | |
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
|
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
|
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Get the requested width of the paned window
lappend result [winfo reqwidth .p]
.p sash place 0 30 0
# Get the reqwidth again, to make sure it hasn't changed
lappend result [winfo reqwidth .p]
# Check that the sash moved
lappend result [.p sash coord 0]
} -cleanup {
deleteWindows
} -result [list 42 42 {30 0}]
test panedwindow-17.2 {MoveSash, move right (unmapped) clipped by reqwidth} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 0 100 0
# Get the new sash coord; it should be clipped by the reqwidth of
# the panedwindow.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 40 0]
test panedwindow-17.3 {MoveSash, move right (mapped, width < reqwidth) clipped by width} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Put the panedwindow up on the display and give it a width < reqwidth
place .p -x 0 -y 0 -width 32
update
.p sash place 0 100 0
# Get the new sash coord; it should be clipped by the visible width of
# the panedwindow.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 30 0]
test panedwindow-17.4 {MoveSash, move right (mapped, width > reqwidth) clipped by width} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Put the panedwindow up on the display and give it a width > reqwidth
place .p -x 0 -y 0 -width 102
update
.p sash place 0 200 0
# Get the new sash coord; it should be clipped by the visible width of
# the panedwindow.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 100 0]
test panedwindow-17.5 {MoveSash, move right respects minsize} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 100 0
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 30 0]
test panedwindow-17.6 {MoveSash, move right respects minsize} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 100 0
# Get the new sash coord; it should have moved as far as possible.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 40 0]
test panedwindow-17.7 {MoveSash, move right pushes other sashes} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 0 100 0
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 1
} -cleanup {
deleteWindows
} -result [list 62 0]
test panedwindow-17.8 {MoveSash, move right pushes other sashes, respects minsize} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 100 0
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 1
} -cleanup {
deleteWindows
} -result [list 52 0]
test panedwindow-17.9 {MoveSash, move right respects minsize, exludes pad} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] \
-sticky nsew -minsize 10 -padx 5
}
.p sash place 0 100 0
# Get the new sash coord; it should have moved as far as possible,
# Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 50 0]
test panedwindow-17.10 {MoveSash, move right, negative minsize becomes 0} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] \
-sticky nsew -minsize -50
}
.p sash place 0 50 0
# Get the new sash coord; it should have moved as far as possible,
# Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
deleteWindows
} -result [list [list 50 0] [list 52 0]]
test panedwindow-17.11 {MoveSash, move left} -setup {
deleteWindows
} -body {
set result {}
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Get the requested width of the paned window
lappend result [winfo reqwidth .p]
.p sash place 0 10 0
# Get the reqwidth again, to make sure it hasn't changed
lappend result [winfo reqwidth .p]
# Check that the sash moved
lappend result [.p sash coord 0]
} -cleanup {
deleteWindows
} -result [list 42 42 {10 0}]
test panedwindow-17.12 {MoveSash, move left, can't move outside of window} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 0 -100 0
# Get the new sash coord; it should be clipped by the reqwidth of
# the panedwindow.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 0 0]
test panedwindow-17.13 {MoveSash, move left respects minsize} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 0 0
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 10 0]
test panedwindow-17.14 {MoveSash, move left respects minsize} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 1 0 0
# Get the new sash coord; it should have moved as far as possible.
.p sash coord 1
} -cleanup {
deleteWindows
} -result [list 22 0]
test panedwindow-17.15 {MoveSash, move left pushes other sashes} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 1 0 0
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 0 0]
test panedwindow-17.16 {MoveSash, move left pushes other sashes, respects minsize} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 1 0 0
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 10 0]
test panedwindow-17.17 {MoveSash, move left respects minsize, exludes pad} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] \
-sticky nsew -minsize 10 -padx 5
}
.p sash place 1 0 0
# Get the new sash coord; it should have moved as far as possible,
# Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
.p sash coord 1
} -cleanup {
deleteWindows
} -result [list 42 0]
test panedwindow-17.18 {MoveSash, move left, negative minsize becomes 0} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue green} {
.p add [frame $w -height 20 -width 20 -bg $c] \
-sticky nsew -minsize -50
}
.p sash place 1 10 0
# Get the new sash coord; it should have moved as far as possible,
# Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
deleteWindows
} -result [list [list 8 0] [list 10 0]]
test panedwindow-18.1 {MoveSash, move down} -setup {
deleteWindows
} -body {
set result {}
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Get the requested width of the paned window
lappend result [winfo reqheight .p]
.p sash place 0 0 30
# Get the reqwidth again, to make sure it hasn't changed
lappend result [winfo reqheight .p]
# Check that the sash moved
lappend result [.p sash coord 0]
} -cleanup {
deleteWindows
} -result [list 42 42 {0 30}]
test panedwindow-18.2 {MoveSash, move down (unmapped) clipped by reqheight} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 0 0 100
# Get the new sash coord; it should be clipped by the reqheight of
# the panedwindow.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 0 40]
test panedwindow-18.3 {MoveSash, move down (mapped, height < reqheight) clipped by height} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Put the panedwindow up on the display and give it a height < reqheight
place .p -x 0 -y 0 -height 32
update
.p sash place 0 0 100
# Get the new sash coord; it should be clipped by the visible height of
# the panedwindow.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 0 30]
test panedwindow-18.4 {MoveSash, move down (mapped, height > reqheight) clipped by height} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Put the panedwindow up on the display and give it a width > reqwidth
place .p -x 0 -y 0 -height 102
update
.p sash place 0 0 200
# Get the new sash coord; it should be clipped by the visible width of
# the panedwindow.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 0 100]
test panedwindow-18.5 {MoveSash, move down respects minsize} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 0 100
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 0 30]
test panedwindow-18.6 {MoveSash, move down respects minsize} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 0 100
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 0 40]
test panedwindow-18.7 {MoveSash, move down pushes other sashes} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 0 0 100
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 1
} -cleanup {
deleteWindows
} -result [list 0 62]
test panedwindow-18.8 {MoveSash, move down pushes other sashes, respects minsize} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 0 100
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 1
} -cleanup {
deleteWindows
} -result [list 0 52]
test panedwindow-18.9 {MoveSash, move down respects minsize, exludes pad} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] \
-sticky nsew -minsize 10 -pady 5
}
.p sash place 0 0 100
# Get the new sash coord; it should have moved as far as possible,
# Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 0 50]
test panedwindow-18.10 {MoveSash, move right, negative minsize becomes 0} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] \
-sticky nsew -minsize -50
}
.p sash place 0 0 50
# Get the new sash coord; it should have moved as far as possible,
# Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
deleteWindows
} -result [list [list 0 50] [list 0 52]]
test panedwindow-18.11 {MoveSash, move up} -setup {
deleteWindows
} -body {
set result {}
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Get the requested width of the paned window
lappend result [winfo reqheight .p]
.p sash place 0 0 10
# Get the reqwidth again, to make sure it hasn't changed
lappend result [winfo reqheight .p]
# Check that the sash moved
lappend result [.p sash coord 0]
} -cleanup {
deleteWindows
} -result [list 42 42 {0 10}]
test panedwindow-18.12 {MoveSash, move up, can't move outside of window} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 0 0 -100
# Get the new sash coord; it should be clipped by the reqwidth of
# the panedwindow.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 0 0]
test panedwindow-18.13 {MoveSash, move up respects minsize} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 0 0
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 0 10]
test panedwindow-18.14 {MoveSash, move up respects minsize} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 1 0 0
# Get the new sash coord; it should have moved as far as possible.
.p sash coord 1
} -cleanup {
deleteWindows
} -result [list 0 22]
test panedwindow-18.15 {MoveSash, move up pushes other sashes} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 1 0 0
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 0 0]
test panedwindow-18.16 {MoveSash, move up pushes other sashes, respects minsize} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 1 0 0
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
} -cleanup {
deleteWindows
} -result [list 0 10]
test panedwindow-18.17 {MoveSash, move up respects minsize, exludes pad} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] \
-sticky nsew -minsize 10 -pady 5
}
.p sash place 1 0 0
# Get the new sash coord; it should have moved as far as possible,
# Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
.p sash coord 1
} -cleanup {
deleteWindows
} -result [list 0 42]
test panedwindow-18.18 {MoveSash, move up, negative minsize becomes 0} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue green} {
.p add [frame $w -height 20 -width 20 -bg $c] \
-sticky nsew -minsize -50
}
.p sash place 1 0 10
# Get the new sash coord; it should have moved as far as possible,
# Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
deleteWindows
} -result [list [list 0 8] [list 0 10]]
|
︙ | | |
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
|
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
|
-
+
|
.p add [frame .f -width 20 -height 20 -bg blue] \
[frame .f2 -width 20 -height 20 -bg red]
destroy .f
winfo reqwidth .p
} -cleanup {
deleteWindows
} -result 20
test panedwindow-21.1 {ArrangePanes, extra space is given to the last pane} -setup {
deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
.p add [frame .f1 -width 20 -height 20 -bg blue] \
[frame .f2 -width 20 -height 20 -bg red] -sticky nsew
|
︙ | | |
Changes to tests/place.test.
︙ | | |
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
|
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
|
-
+
|
destroy .foo
} -body {
frame .foo
place configure .foo -x 0 -y
} -cleanup {
destroy .foo
} -returnCodes error -result {value for "-y" missing}
test place-11.1 {PlaceObjCmd, slaves command} -setup {
destroy .foo
} -body {
frame .foo
place slaves .foo
} -cleanup {
|
︙ | | |
Changes to tests/raise.test.
︙ | | |
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
-
+
-
+
-
+
|
test raise-3.1 {raise internal windows after creation} -body {
raise_setup
update
raise .raise.a .raise.d
raise_getOrder
} -result {a d d a c e e e}
test raise-3.2 {raise internal windows after creation} -constraints {
testmakeexist
testmakeexist
} -body {
raise_setup
testmakeexist .raise.a .raise.b
raise .raise.a .raise.b
update
raise_getOrder
} -result {d d d a c e e e}
test raise-3.3 {raise internal windows after creation} -constraints {
testmakeexist
testmakeexist
} -body {
raise_setup
testmakeexist .raise.a .raise.d
raise .raise.a .raise.b
update
raise_getOrder
} -result {d d d a c e e e}
test raise-3.4 {raise internal windows after creation} -constraints {
testmakeexist
testmakeexist
} -body {
raise_setup
testmakeexist .raise.a .raise.c .raise.d
raise .raise.a .raise.b
update
raise_getOrder
} -result {d d d a c e e e}
|
︙ | | |
Changes to tests/safe.test.
︙ | | |
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
-
+
-
-
+
+
|
tcltest::loadTestedCommands
namespace import -force tcltest::test
## NOTE: Any time tests fail here with an error like:
# Can't find a usable tk.tcl in the following directories:
# {$p(:26:)}
#
#
# $p(:26:)/tk.tcl: script error
# script error
# invoked from within
# "source {$p(:26:)/tk.tcl}"
# ("uplevel" body line 1)
# invoked from within
# "uplevel #0 [list source $file]"
#
#
#
#
# This probably means that tk wasn't installed properly.
## it indicates that something went wrong sourcing tk.tcl.
## Ensure that any changes that occured to tk.tcl will work or are properly
## prevented in a safe interpreter. -- hobbs
# The set of hidden commands is platform dependent:
|
︙ | | |
Changes to tests/scale.test.
︙ | | |
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
|
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
|
-
+
|
destroy .s
test scale-2.1 {Tk_ScaleCmd procedure} -body {
scale
} -returnCodes error -result {wrong # args: should be "scale pathName ?-option value ...?"}
test scale-2.2 {Tk_ScaleCmd procedure} -body {
scale foo
scale foo
} -returnCodes error -result {bad window path name "foo"}
test scale-2.3 {Tk_ScaleCmd procedure} -body {
catch {scale foo}
winfo child .
} -result {}
test scale-2.4 {Tk_ScaleCmd procedure} -body {
scale .s -gorp dumb
|
︙ | | |
Changes to tests/scrollbar.test.
︙ | | |
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
-
+
|
proc getTroughSize {w} {
if {[testConstraint testmetrics]} {
if [string match v* [$w cget -orient]] {
return [expr [winfo height $w] - 2*[testmetrics cyvscroll $w]]
} else {
return [expr [winfo width $w] - 2*[testmetrics cxhscroll $w]]
}
}
} else {
if [string match v* [$w cget -orient]] {
return [expr [winfo height $w] \
- ([winfo width $w] \
- [$w cget -highlightthickness] \
- [$w cget -bd] + 1)*2]
} else {
|
︙ | | |
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
-
+
|
# XXX Note: this test file is woefully incomplete. Right now there are
# only bits and pieces of tests. Please make this file more complete
# as you fix bugs and add features.
foreach {width height} [wm minsize .] {
set height [expr ($height < 200) ? 200 : $height]
set width [expr ($width < 1) ? 1 : $width]
}
}
frame .f -height $height -width $width
pack .f -side left
scrollbar .s
pack .s -side right -fill y
update
set i 1
|
︙ | | |
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
|
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
|
-
+
-
+
-
+
|
set result {}
foreach element [.s get] {
lappend result [format %.1f $element]
}
set result
} {0.0 0.3}
test scrollbar-3.60 {ScrollbarWidgetCmd procedure, "set" option} {
.s set 1.1 .4
.s set 1.1 .4
.s get
} {1.0 1.0}
test scrollbar-3.61 {ScrollbarWidgetCmd procedure, "set" option} {
.s set .5 -.3
.s set .5 -.3
.s get
} {0.5 0.5}
test scrollbar-3.62 {ScrollbarWidgetCmd procedure, "set" option} {
.s set .5 87
.s set .5 87
.s get
} {0.5 1.0}
test scrollbar-3.63 {ScrollbarWidgetCmd procedure, "set" option} {
.s set .4 .3
set result {}
foreach element [.s get] {
lappend result [format %.1f $element]
|
︙ | | |
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
|
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
|
-
+
-
+
-
+
|
test scrollbar-3.66 {ScrollbarWidgetCmd procedure, "set" option} {
list [catch {.s set 1 2 ghi jkl} msg] $msg
} {1 {expected integer but got "ghi"}}
test scrollbar-3.67 {ScrollbarWidgetCmd procedure, "set" option} {
list [catch {.s set 1 2 3 jkl} msg] $msg
} {1 {expected integer but got "jkl"}}
test scrollbar-3.68 {ScrollbarWidgetCmd procedure, "set" option} {
.s set -10 50 20 30
.s set -10 50 20 30
.s get
} {0 50 0 0}
test scrollbar-3.69 {ScrollbarWidgetCmd procedure, "set" option} {
.s set 100 -10 20 30
.s set 100 -10 20 30
.s get
} {100 0 20 30}
test scrollbar-3.70 {ScrollbarWidgetCmd procedure, "set" option} {
.s set 100 50 30 20
.s set 100 50 30 20
.s get
} {100 50 30 30}
test scrollbar-3.71 {ScrollbarWidgetCmd procedure, "set" option} {
list [catch {.s set 1 2 3} msg] $msg
} {1 {wrong # args: should be ".s set firstFraction lastFraction" or ".s set totalUnits windowUnits firstUnit lastUnit"}}
test scrollbar-3.72 {ScrollbarWidgetCmd procedure, "set" option} {
list [catch {.s set 1 2 3 4 5} msg] $msg
|
︙ | | |
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
|
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
|
-
+
|
test scrollbar-6.11 {ScrollbarPosition procedure} unix {
.s identify 8 4
} {arrow1}
test scrollbar-6.12 {ScrollbarPosition procedure} unix {
.s identify 8 19
} {arrow1}
test scrollbar-6.14 {ScrollbarPosition procedure} win {
.s identify [expr [winfo width .s] / 2] 0
.s identify [expr [winfo width .s] / 2] 0
} {arrow1}
test scrollbar-6.15 {ScrollbarPosition procedure} {testmetrics win} {
.s identify [expr [winfo width .s] / 2] [expr [testmetrics cyvscroll .s] - 1]
} {arrow1}
test scrollbar-6.16 {ScrollbarPosition procedure} unix {
.s identify 8 20
} {trough1}
|
︙ | | |
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
|
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
|
-
+
|
.t.s identify 0 [expr [winfo height .t.s] / 2]
} {arrow1}
test scrollbar-6.41 {ScrollbarPosition procedure} unix {
.t.s identify 82 8
} {slider}
test scrollbar-6.43 {ScrollbarPosition procedure} {testmetrics win} {
.t.s identify [expr int(.4 / [.t.s delta 1 0]) + [testmetrics cxhscroll .t.s] \
- 1] [expr [winfo height .t.s] / 2]
- 1] [expr [winfo height .t.s] / 2]
} {slider}
test scrollbar-6.44 {ScrollbarPosition procedure} unix {
.t.s identify 100 18
} {trough2}
test scrollbar-6.46 {ScrollbarPosition procedure} win {
.t.s identify 100 [expr [winfo height .t.s] - 1]
} {trough2}
|
︙ | | |
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
|
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
|
-
+
-
+
|
pack .top.s
focus -force .top.s
update
event generate .top.s <2>
update ; # shall not trigger error invalid command name ".top.s"
} -cleanup {
destroy .top.s .top
} -result {}
} -result {}
test scrollbar-11.2 {bug fix: [011706ec42] Scrollbar unsafe wrt widget destruction} -body {
proc destroy_scrollbar {{y 0}} {
if {[winfo exists .top.s]} {
destroy .top.s
}
}
toplevel .top
wm minsize .top 50 400
update
scrollbar .top.s
bind .top.s <2> {after idle destroy_scrollbar}
pack .top.s -expand true -fill y
focus -force .top.s
update
event generate .top.s <2> -x 2 -y [expr {[winfo height .top.s] / 2}]
update ; # shall not trigger error invalid command name ".top.s"
} -cleanup {
destroy .top.s .top
} -result {}
} -result {}
catch {destroy .s}
catch {destroy .t}
# cleanup
cleanupTests
return
|
Changes to tests/select.test.
︙ | | |
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
|
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
|
-
+
|
} -result {MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW {text/x-tk-test;detail="foo bar"}}
##############################################################################
# note, we are not testing MULTIPLE style selections
# most control paths have been exercised above
test select-10.1 {ConvertSelection procedure, race with selection clear} -constraints {
unix
unix
} -setup {
setup
} -body {
proc Ready {fd} {
variable x
lappend x [gets $fd]
}
|
︙ | | |
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
|
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
|
-
+
-
+
|
set result ""
set pass 0
lappend result [dobg {selection get}]
cleanupbg
lappend result $selInfo
} -result {{selection owner didn't respond} {STRING 0 4000 STRING 4000 4000 STRING 8000 4000 STRING 12000 4000 STRING 16000 4000 STRING 0 4000 STRING 4000 4000}}
test select-10.5 {ConvertSelection procedure, reentrancy issues} -constraints {
unix
unix
} -setup {
setup
setupbg
} -body {
set selValue "Test value"
set selInfo ""
selection handle -type TEST .f1 { handler TEST }
selection handle -type STRING .f1 { badHandler .f1 STRING }
set result ""
lappend result [dobg {selection get}]
cleanupbg
lappend result $selInfo
} -result {{PRIMARY selection doesn't exist or form "STRING" not defined} {.f1 STRING 0 4000}}
test select-10.6 {ConvertSelection procedure, reentrancy issues} -constraints {
unix
unix
} -setup {
setup
setupbg
} -body {
proc weirdHandler {type offset count} {
destroy .f1
handler $type $offset $count
|
︙ | | |
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
|
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
|
-
+
|
set selInfo ""
set result [list [selection get TARGETS] $selInfo]
selection handle .f1 {} TARGETS
lappend result [selection get TARGETS]
} -result {{Targets value} {TARGETS.f1 0 4000} {MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW}}
test select-13.1 {SelectionSize procedure, handler deleted} -constraints {
unix
unix
} -setup {
setup
setupbg
} -body {
proc badHandler {path type offset count} {
global selValue selInfo abortCount
incr abortCount -1
|
︙ | | |
Changes to tests/spinbox.test.
︙ | | |
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
-
+
|
tcltest::loadTestedCommands
# For xscrollcommand
proc scroll args {
global scrollInfo
set scrollInfo $args
}
# For trace variable
# For trace variable
proc override args {
global x
set x 12345
}
# Procedures used in widget VALIDATION tests
proc doval {W d i P s S v V} {
|
︙ | | |
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
|
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
spinbox .e
} -cleanup {
destroy .e
} -result {.e}
test spinbox-3.1 {SpinboxWidgetCmd procedure} -setup {
spinbox .e
spinbox .e
pack .e
update
} -body {
.e
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e option ?arg ...?"}
test spinbox-3.2 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e bbox
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e bbox index"}
test spinbox-3.3 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e bbox a b
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e bbox index"}
test spinbox-3.4 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
spinbox .e
spinbox .e
pack .e
update
} -body {
.e bbox bogus
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "bogus"}
test spinbox-3.5 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e bbox 0
} -cleanup {
destroy .e
} -result [list 5 5 0 $cy]
# Oryginaly the result was count using measurements
# Oryginaly the result was count using measurements
# and metrics. It was changed to less verbose solution - the result is the one
# that passes fonts constraint (this concerns tests 3.6, 3.7, 3.8, 3.10)
test spinbox-3.6 {SpinboxWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
# Tcl_UtfAtIndex(): no utf chars
.e insert 0 "abc"
list [.e bbox 3] [.e bbox end]
} -cleanup {
destroy .e
} -result {{19 5 7 13} {19 5 7 13}}
test spinbox-3.7 {SpinboxWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
# Tcl_UtfAtIndex(): utf at end
.e insert 0 "ab\u4e4e"
.e bbox end
} -cleanup {
destroy .e
} -result {19 5 12 13}
test spinbox-3.8 {SpinboxWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
# Tcl_UtfAtIndex(): utf before index
.e insert 0 "ab\u4e4ec"
.e bbox 3
} -cleanup {
destroy .e
} -result {31 5 7 13}
test spinbox-3.9 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
# Tcl_UtfAtIndex(): no chars
.e bbox end
} -cleanup {
destroy .e
} -result "5 5 0 $cy"
test spinbox-3.10 {SpinboxWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert 0 "abcdefghij\u4e4eklmnop"
list [.e bbox 0] [.e bbox 1] [.e bbox 10] [.e bbox end]
} -cleanup {
destroy .e
} -result {{5 5 7 13} {12 5 7 13} {75 5 12 13} {122 5 7 13}}
test spinbox-3.11 {SpinboxWidgetCmd procedure, "cget" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e cget
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e cget option"}
test spinbox-3.12 {SpinboxWidgetCmd procedure, "cget" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e cget a b
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e cget option"}
test spinbox-3.13 {SpinboxWidgetCmd procedure, "cget" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e cget -gorp
} -cleanup {
destroy .e
} -returnCodes error -result {unknown option "-gorp"}
test spinbox-3.14 {SpinboxWidgetCmd procedure, "cget" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e configure -bd 4
.e cget -bd
} -cleanup {
destroy .e
} -result {4}
test spinbox-3.15 {SpinboxWidgetCmd procedure, "configure" widget command} -setup {
spinbox .e
spinbox .e
pack .e
update
} -body {
llength [.e configure]
} -cleanup {
destroy .e
} -result {49}
test spinbox-3.16 {SpinboxWidgetCmd procedure, "configure" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e configure -foo
} -cleanup {
destroy .e
} -returnCodes error -result {unknown option "-foo"}
test spinbox-3.17 {SpinboxWidgetCmd procedure, "configure" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e configure -bd 4
.e configure -bg #ffffff
lindex [.e configure -bd] 4
} -cleanup {
destroy .e
} -result {4}
test spinbox-3.18 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e delete
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e delete firstIndex ?lastIndex?"}
test spinbox-3.19 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e delete a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e delete firstIndex ?lastIndex?"}
test spinbox-3.20 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e delete foo
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "foo"}
test spinbox-3.21 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e delete 0 bar
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "bar"}
test spinbox-3.22 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e delete 2 4
.e get
} -cleanup {
destroy .e
} -result {014567890}
test spinbox-3.23 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e insert end "01234567890"
.e delete 6
.e get
} -cleanup {
destroy .e
} -result {0123457890}
test spinbox-3.24 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
pack .e
update
update
set x {}
} -body {
# UTF
.e insert end "01234\u4e4e67890"
.e delete 6
lappend x [.e get]
.e delete 0 end
.e insert end "012345\u4e4e7890"
.e delete 6
lappend x [.e get]
.e delete 0 end
.e insert end "0123456\u4e4e890"
.e delete 6
lappend x [.e get]
} -cleanup {
destroy .e
} -result [list "01234\u4e4e7890" "0123457890" "012345\u4e4e890"]
test spinbox-3.25 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e delete 6 5
.e get
} -cleanup {
destroy .e
} -result {01234567890}
test spinbox-3.26 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e configure -state disabled
.e delete 2 8
.e configure -state normal
.e get
} -cleanup {
destroy .e
} -result {01234567890}
test spinbox-3.26.1 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e configure -state readonly
.e delete 2 8
.e configure -state normal
.e get
} -cleanup {
destroy .e
} -result {01234567890}
test spinbox-3.27 {SpinboxWidgetCmd procedure, "get" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e get foo
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e get"}
test spinbox-3.28 {SpinboxWidgetCmd procedure, "icursor" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e icursor
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e icursor pos"}
test spinbox-3.29 {SpinboxWidgetCmd procedure, "icursor" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e icursor foo
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "foo"}
test spinbox-3.30 {SpinboxWidgetCmd procedure, "icursor" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e insert end "01234567890"
.e icursor 4
.e index insert
} -cleanup {
destroy .e
} -result {4}
test spinbox-3.31 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e in
} -cleanup {
destroy .e
} -returnCodes error -result {ambiguous option "in": must be bbox, cget, configure, delete, get, icursor, identify, index, insert, invoke, scan, selection, set, validate, or xview}
test spinbox-3.32 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e index
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e index string"}
test spinbox-3.33 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e index foo
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "foo"}
test spinbox-3.34 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e index 0
} -cleanup {
destroy .e
} -returnCodes {ok} -match glob -result {*}
test spinbox-3.35 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
# UTF
.e insert 0 abc\u4e4e\u0153def
list [.e index 3] [.e index 4] [.e index end]
} -cleanup {
destroy .e
} -result {3 4 8}
test spinbox-3.36 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e insert a
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test spinbox-3.37 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e insert a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test spinbox-3.38 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e insert foo Text
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "foo"}
test spinbox-3.39 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e insert 3 xxx
.e get
} -cleanup {
destroy .e
} -result {012xxx34567890}
test spinbox-3.40 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e configure -state disabled
.e insert 3 xxx
.e configure -state normal
.e get
} -cleanup {
destroy .e
} -result {01234567890}
test spinbox-3.40.1 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e insert end "01234567890"
.e configure -state readonly
.e insert 3 xxx
.e configure -state normal
.e get
} -cleanup {
destroy .e
} -result {01234567890}
test spinbox-3.41 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e insert a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test spinbox-3.42 {SpinboxWidgetCmd procedure, "scan" widget command} -setup {
spinbox .e
spinbox .e
pack .e
update
} -body {
.e scan a
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e scan mark|dragto x"}
test spinbox-3.43 {SpinboxWidgetCmd procedure, "scan" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e scan a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e scan mark|dragto x"}
test spinbox-3.44 {SpinboxWidgetCmd procedure, "scan" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e scan foobar 20
} -cleanup {
destroy .e
} -returnCodes error -result {bad scan option "foobar": must be mark or dragto}
test spinbox-3.45 {SpinboxWidgetCmd procedure, "scan" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e scan mark 20.1
} -cleanup {
destroy .e
} -returnCodes error -result {expected integer but got "20.1"}
# This test is non-portable because character sizes vary.
test spinbox-3.46 {SpinboxWidgetCmd procedure, "scan" widget command} -constraints {
fonts
} -setup {
spinbox .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long string, in fact a "
.e insert end "very very long string"
.e scan mark 30
.e scan dragto 28
.e index @0
} -cleanup {
destroy .e
} -result {2}
test spinbox-3.47 {SpinboxWidgetCmd procedure, "select" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e select
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e selection option ?index?"}
test spinbox-3.48 {SpinboxWidgetCmd procedure, "select" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e select foo
} -cleanup {
destroy .e
} -returnCodes error -result {bad selection option "foo": must be adjust, clear, element, from, present, range, or to}
test spinbox-3.49 {SpinboxWidgetCmd procedure, "select clear" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e select clear gorp
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e selection clear"}
test spinbox-3.50 {SpinboxWidgetCmd procedure, "select clear" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e insert end "0123456789"
.e select from 1
.e select to 4
update
.e select clear
selection get
selection get
} -cleanup {
destroy .e
} -returnCodes error -result {PRIMARY selection doesn't exist or form "STRING" not defined}
test spinbox-3.50.1 {SpinboxWidgetCmd procedure, "select clear" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e insert end "0123456789"
.e select from 1
.e select to 4
update
.e select clear
catch {selection get}
selection own
} -cleanup {
destroy .e
} -result {.e}
test spinbox-3.51 {SpinboxWidgetCmd procedure, "selection present" widget command} -setup {
spinbox .e
spinbox .e
} -body {
.e selection present foo
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e selection present"}
test spinbox-3.52 {SpinboxWidgetCmd procedure, "selection present" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e insert end 0123456789
.e select from 3
.e select to 6
.e selection present
} -cleanup {
destroy .e
} -result {1}
test spinbox-3.53 {SpinboxWidgetCmd procedure, "selection present" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e insert end 0123456789
.e select from 3
.e select to 6
.e configure -exportselection false
.e selection present
} -cleanup {
destroy .e
} -result {1}
test spinbox-3.54 {SpinboxWidgetCmd procedure, "selection present" widget command} -setup {
spinbox .e
pack .e
update
update
} -body {
.e insert end 0123456789
.e select from 3
.e select to 6
.e delete 0 end
.e selection present
} -cleanup {
|
︙ | | |
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
|
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
.e configure -state normal
list [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {2 4}
test spinbox-3.65 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview 5
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.053763 0.268817}
test spinbox-3.66 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e xview gorp
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "gorp"}
test spinbox-3.67 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview 0
.e icursor 10
.e xview insert
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.107527 0.322581}
test spinbox-3.68 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e xview moveto foo bar
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e xview moveto fraction"}
test spinbox-3.69 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e xview moveto foo
} -cleanup {
destroy .e
} -returnCodes error -result {expected floating-point number but got "foo"}
test spinbox-3.70 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview moveto 0.5
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.505376 0.720430}
test spinbox-3.71 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview scroll 24
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e xview scroll number units|pages"}
test spinbox-3.72 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview scroll gorp units
} -cleanup {
destroy .e
} -returnCodes error -result {expected integer but got "gorp"}
test spinbox-3.73 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview moveto 0
.e xview scroll 1 pages
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.193548 0.408602}
test spinbox-3.74 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview moveto .9
update
.e xview scroll -2 p
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.397849 0.612903}
test spinbox-3.75 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview 30
update
.e xview scroll 2 units
.e xview scroll 2 units
.e index @0
} -cleanup {
destroy .e
} -result {32}
test spinbox-3.76 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview 30
update
.e xview scroll -1 units
.e xview scroll -1 units
.e index @0
} -cleanup {
destroy .e
} -result {29}
test spinbox-3.77 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview scroll 23 foobars
} -cleanup {
destroy .e
} -returnCodes error -result {bad argument "foobars": must be units or pages}
test spinbox-3.78 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview eat 23 hamburgers
} -cleanup {
destroy .e
} -returnCodes error -result {unknown option "eat": must be moveto or scroll}
test spinbox-3.79 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview 0
update
.e xview -4
.e index @0
} -cleanup {
destroy .e
} -result {0}
test spinbox-3.80 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
update
.e xview 300
.e index @0
} -cleanup {
destroy .e
} -result {73}
test spinbox-3.81 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e insert 10 \u4e4e
update
# UTF
|
︙ | | |
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
|
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
|
-
+
|
.e xview moveto .12
lappend x [format {%.6f} [lindex [.e xview] 0]]
} -cleanup {
destroy .e
} -result {0.095745 0.106383 0.117021}
test spinbox-3.82 {SpinboxWidgetCmd procedure} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
.e gorp
} -cleanup {
destroy .e
} -returnCodes error -result {bad option "gorp": must be bbox, cget, configure, delete, get, icursor, identify, index, insert, invoke, scan, selection, set, validate, or xview}
|
︙ | | |
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
|
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
|
-
+
-
+
-
+
-
+
-
+
|
.e1 configure -exportselection 1
lappend x [selection get]
set x
} -cleanup {
destroy .e1 .e2
} -result {{This is so} {This is so} 1234}
test spinbox-5.6 {ConfigureSpinbox procedure} -setup {
spinbox .e
spinbox .e
pack .e
} -body {
.e insert end "0123456789"
.e select from 1
.e select to 5
.e configure -exportselection 0
selection get
selection get
} -cleanup {
destroy .e
} -returnCodes error -result {PRIMARY selection doesn't exist or form "STRING" not defined}
test spinbox-5.6.1 {ConfigureSpinbox procedure} -setup {
spinbox .e
pack .e
} -body {
.e insert end "0123456789"
.e select from 1
.e select to 5
.e configure -exportselection 0
catch {selection get}
catch {selection get}
list [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {1 5}
test spinbox-5.7 {ConfigureSpinbox procedure} -setup {
spinbox .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
spinbox .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e configure -font {Courier -12} -width 4 -xscrollcommand scroll
.e insert end "01234567890"
update
.e configure -width 5
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
} -result {0.000000 0.363636}
test spinbox-5.8 {ConfigureSpinbox procedure} -constraints {
fonts
} -setup {
spinbox .e -borderwidth 2 -highlightthickness 2
spinbox .e -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e configure -width 0 -font {Helvetica -12}
.e insert end "0123"
update
.e configure -font {Helvetica -24}
update
|
︙ | | |
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
|
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
|
# If "0" in selected font had 0 width, caused divide-by-zero error.
.e configure -font {{open look glyph}}
.e scan dragto 30
update
} -cleanup {
destroy .e
} -result {}
test spinbox-5.12 {ConfigureSpinbox procedure, -from and -to swapping} -setup {
spinbox .e
} -body {
# this statement used to trigger error "-to value must be greater than -from value"
# because default value for -to is zero (bug [841280ffff])
set res [catch {.e configure -from 10}]
.e configure -from 1971 -to 2016 ; # standard case
lappend res [.e cget -from] [.e cget -to]
.e configure -from 2016 -to 1971 ; # auto-swapping happens
lappend res [.e cget -from] [.e cget -to]
.e configure -to 1971 -from 2016 ; # auto-swapping, order of options does not matter
lappend res [.e cget -from] [.e cget -to]
} -cleanup {
destroy .e
} -result {0 1971.0 2016.0 1971.0 2016.0 1971.0 2016.0}
# No tests for DisplaySpinbox.
test spinbox-6.1 {SpinboxComputeGeometry procedure} -constraints {
fonts
} -setup {
spinbox .e
spinbox .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 -highlightthickness 3
.e insert end 012\t45
update
list [.e index @61] [.e index @62]
} -cleanup {
destroy .e
} -result {3 4}
test spinbox-6.2 {SpinboxComputeGeometry procedure} -constraints {
fonts
} -setup {
spinbox .e
spinbox .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 -justify center \
-highlightthickness 3
.e insert end 012\t45
update
list [.e index @96] [.e index @97]
} -cleanup {
destroy .e
} -result {3 4}
test spinbox-6.3 {SpinboxComputeGeometry procedure} -constraints {
fonts
} -setup {
spinbox .e
spinbox .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 -justify right \
-highlightthickness 3
.e insert end 012\t45
update
list [.e index @131] [.e index @132]
} -cleanup {
destroy .e
} -result {3 4}
test spinbox-6.4 {SpinboxComputeGeometry procedure} -setup {
spinbox .e
spinbox .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 5
.e insert end "01234567890"
update
.e xview 6
.e index @0
} -cleanup {
destroy .e
} -result {6}
test spinbox-6.5 {SpinboxComputeGeometry procedure} -setup {
spinbox .e -highlightthickness 2
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 5
.e configure -font {Courier -12} -bd 2 -relief raised -width 5
.e insert end "01234567890"
update
.e xview 7
.e index @0
} -cleanup {
destroy .e
} -result {6}
test spinbox-6.6 {SpinboxComputeGeometry procedure} -constraints {
fonts
} -setup {
spinbox .e -highlightthickness 2
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 10
.e configure -font {Courier -12} -bd 2 -relief raised -width 10
.e insert end "01234\t67890"
update
.e xview 3
list [.e index @39] [.e index @40]
} -cleanup {
destroy .e
} -result {5 6}
|
︙ | | |
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
|
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
|
-
+
-
+
-
-
+
+
|
} -result {133 39}
test spinbox-6.9 {SpinboxComputeGeometry procedure} -constraints {
fonts
} -setup {
spinbox .e -highlightthickness 2
pack .e
} -body {
.e configure -font {Helvetica -24} -bd 3 -relief raised -width 0
.e configure -font {Helvetica -24} -bd 3 -relief raised -width 0
update
list [winfo reqwidth .e] [winfo reqheight .e]
} -cleanup {
destroy .e
} -result {42 39}
test spinbox-7.1 {InsertChars procedure} -setup {
unset -nocomplain contents
unset -nocomplain contents
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e insert 2 XXX
update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
} -result {abXXXcde abXXXcde {0.000000 1.000000}}
test spinbox-7.2 {InsertChars procedure} -setup {
unset -nocomplain contents
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
unset -nocomplain contents
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e insert 500 XXX
update
|
︙ | | |
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
|
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
|
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
set x "[.e index sel.first] [.e index sel.last]"
.e select to 5
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {2 6 2 5}
test spinbox-7.7 {InsertChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -xscrollcommand scroll
.e insert 0 0123456789
.e icursor 4
.e insert 4 XXX
.e index insert
} -cleanup {
destroy .e
} -result {7}
test spinbox-7.8 {InsertChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 0123456789
.e icursor 4
.e insert 5 XXX
.e index insert
} -cleanup {
destroy .e
} -result {4}
test spinbox-7.9 {InsertChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 "This is a very long string"
update
.e xview 4
.e insert 3 XXX
.e index @0
} -cleanup {
destroy .e
} -result {7}
test spinbox-7.10 {InsertChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 "This is a very long string"
update
.e xview 4
.e insert 4 XXX
.e index @0
} -cleanup {
destroy .e
} -result {4}
test spinbox-7.11 {InsertChars procedure} -constraints {
fonts
} -setup {
spinbox .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 "xyzzy"
update
.e insert 2 00
winfo reqwidth .e
} -cleanup {
destroy .e
} -result {70}
test spinbox-8.1 {DeleteChars procedure} -setup {
unset -nocomplain contents
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
unset -nocomplain contents
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e delete 2 4
update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
} -result {abe abe {0.000000 1.000000}}
test spinbox-8.2 {DeleteChars procedure} -setup {
unset -nocomplain contents
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
unset -nocomplain contents
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e delete -2 2
update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
} -result {cde cde {0.000000 1.000000}}
test spinbox-8.3 {DeleteChars procedure} -setup {
unset -nocomplain contents
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
unset -nocomplain contents
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
.e delete 3 1000
update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
} -result {abc abc {0.000000 1.000000}}
test spinbox-8.4 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 3
.e select to 8
.e delete 1 3
update
set x "[.e index sel.first] [.e index sel.last]"
.e select to 5
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {1 6 1 5}
test spinbox-8.5 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 3
.e select to 8
.e delete 1 4
update
set x "[.e index sel.first] [.e index sel.last]"
.e select to 4
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {1 5 1 4}
test spinbox-8.6 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 3
.e select to 8
.e delete 1 7
update
set x "[.e index sel.first] [.e index sel.last]"
.e select to 5
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {1 2 1 5}
test spinbox-8.7 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 3
.e select to 8
.e delete 1 8
update
.e index sel.first
} -cleanup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
test spinbox-8.8 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 3
.e select to 8
.e delete 3 7
update
set x "[.e index sel.first] [.e index sel.last]"
.e select to 8
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {3 4 3 8}
test spinbox-8.9 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 0123456789abcde
.e select from 3
.e select to 8
.e delete 3 8
update
.e index sel.first
} -cleanup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
test spinbox-8.10 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 8
.e select to 3
.e delete 5 8
update
set x "[.e index sel.first] [.e index sel.last]"
.e select to 8
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {3 5 5 8}
test spinbox-8.11 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e select from 8
.e select to 3
.e delete 8 10
update
set x "[.e index sel.first] [.e index sel.last]"
.e select to 4
lappend x [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {3 8 4 8}
test spinbox-8.12 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e icursor 4
.e delete 1 4
update
.e index insert
} -cleanup {
destroy .e
} -result {1}
test spinbox-8.13 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e icursor 4
.e delete 1 5
update
.e index insert
} -cleanup {
destroy .e
} -result {1}
test spinbox-8.14 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 0123456789abcde
.e icursor 4
.e delete 4 6
update
.e index insert
} -cleanup {
destroy .e
} -result {4}
test spinbox-8.15 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 "This is a very long string"
.e xview 4
.e delete 1 4
update
.e index @0
} -cleanup {
destroy .e
} -result {1}
test spinbox-8.16 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 "This is a very long string"
.e xview 4
.e delete 1 5
update
.e index @0
} -cleanup {
destroy .e
} -result {1}
test spinbox-8.17 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 "This is a very long string"
.e xview 4
.e delete 4 6
update
.e index @0
} -cleanup {
destroy .e
} -result {4}
test spinbox-8.18 {DeleteChars procedure} -setup {
spinbox .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
spinbox .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 "xyzzy"
update
.e delete 2 4
winfo reqwidth .e
|
︙ | | |
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
|
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
test spinbox-10.1 {SpinboxSetValue procedure} -constraints fonts -body {
set x abcde
set y ab
spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2 -width 0
pack .e
.e configure -textvariable x
.e configure -textvariable x
.e configure -textvariable y
update
list [.e get] [winfo reqwidth .e]
} -cleanup {
destroy .e
} -result {ab 35}
test spinbox-10.2 {SpinboxSetValue procedure, updating selection} -setup {
unset -nocomplain x
spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2
spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -textvariable x
.e insert 0 "abcdefghjklmnopqrstu"
.e selection range 4 10
set x "a"
.e index sel.first
} -cleanup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
test spinbox-10.3 {SpinboxSetValue procedure, updating selection} -setup {
unset -nocomplain x
spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2
spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -textvariable x
.e insert 0 "abcdefghjklmnopqrstu"
.e selection range 4 10
set x "abcdefg"
list [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {4 7}
test spinbox-10.4 {SpinboxSetValue procedure, updating selection} -setup {
unset -nocomplain x
spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2
spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -textvariable x
.e insert 0 "abcdefghjklmnopqrstu"
.e selection range 4 10
set x "abcdefghijklmn"
list [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {4 10}
test spinbox-10.5 {SpinboxSetValue procedure, updating display position} -setup {
unset -nocomplain x
spinbox .e -highlightthickness 2 -bd 2
spinbox .e -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
.e insert 0 "abcdefghjklmnopqrstuvwxyz"
.e xview 10
update
set x "abcdefg"
update
.e index @0
} -cleanup {
destroy .e
} -result {0}
test spinbox-10.6 {SpinboxSetValue procedure, updating display position} -setup {
unset -nocomplain x
spinbox .e -highlightthickness 2 -bd 2
spinbox .e -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
pack .e
.e insert 0 "abcdefghjklmnopqrstuvwxyz"
.e xview 10
update
set x "1234567890123456789012"
update
.e index @0
} -cleanup {
destroy .e
} -result {10}
test spinbox-10.7 {SpinboxSetValue procedure, updating insertion cursor} -setup {
unset -nocomplain x
spinbox .e -highlightthickness 2 -bd 2
spinbox .e -highlightthickness 2 -bd 2
pack .e
update
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
pack .e
.e insert 0 "abcdefghjklmnopqrstuvwxyz"
.e icursor 5
set x "123"
.e index insert
} -cleanup {
destroy .e
} -result {3}
test spinbox-10.8 {SpinboxSetValue procedure, updating insertion cursor} -setup {
unset -nocomplain x
spinbox .e -highlightthickness 2 -bd 2
spinbox .e -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
pack .e
.e insert 0 "abcdefghjklmnopqrstuvwxyz"
.e icursor 5
set x "123456"
|
︙ | | |
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
|
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
|
-
+
|
.e xview 4
update
.e index end
} -cleanup {
destroy .e
} -result {21}
test spinbox-13.2 {GetSpinboxIndex procedure} -body {
spinbox .e
spinbox .e
.e index abogus
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "abogus"}
test spinbox-13.3 {GetSpinboxIndex procedure} -setup {
spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
|
︙ | | |
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
|
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
|
-
+
-
+
-
+
|
.e select to 6
list [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {1 6}
test spinbox-13.10 {GetSpinboxIndex procedure} -constraints unix -body {
# On unix, when selection is cleared, spinbox widget's internal
# On unix, when selection is cleared, spinbox widget's internal
# selection range is reset.
# Previous settings:
spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e select from 1
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
.e index sel.first
} -cleanup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
test spinbox-13.11 {GetSpinboxIndex procedure} -constraints win -body {
# On mac and pc, when selection is cleared, spinbox widget remembers
# last selected range. When selection ownership is restored to
# last selected range. When selection ownership is restored to
# spinbox, the old range will be rehighlighted.
# Previous settings:
spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e select from 1
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
catch {selection get}
.e index sel.first
} -cleanup {
destroy .e
} -result {1}
} -result {1}
test spinbox-13.12 {GetSpinboxIndex procedure} -constraints unix -body {
# Previous settings:
spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
|
︙ | | |
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
|
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
|
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
.e index sbogus
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "sbogus"}
test spinbox-13.14 {GetSpinboxIndex procedure} -constraints win -body {
# On mac and pc, when selection is cleared, spinbox widget remembers
# last selected range. When selection ownership is restored to
# last selected range. When selection ownership is restored to
# spinbox, the old range will be rehighlighted.
# Previous settings:
spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e select from 1
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
selection get
} -cleanup {
destroy .e
} -returnCodes error -match glob -result {*}
test spinbox-13.14.1 {GetSpinboxIndex procedure} -constraints win -body {
# On mac and pc, when selection is cleared, spinbox widget remembers
# last selected range. When selection ownership is restored to
# spinbox, the old range will be rehighlighted.
# Previous settings:
spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e select from 1
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
selection get
} -cleanup {
destroy .e
} -returnCodes error -match glob -result {*}
test spinbox-13.14.1 {GetSpinboxIndex procedure} -constraints win -body {
# On mac and pc, when selection is cleared, spinbox widget remembers
# last selected range. When selection ownership is restored to
# spinbox, the old range will be rehighlighted.
# Previous settings:
spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e select from 1
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
catch {selection get}
.e index sbogus
catch {selection get}
.e index sbogus
} -cleanup {
destroy .e
} -returnCodes error -match glob -result {*}
test spinbox-13.15 {GetSpinboxIndex procedure} -body {
spinbox .e
selection clear .e
.e index @xyz
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "@xyz"}
test spinbox-13.16 {GetSpinboxIndex procedure} -constraints fonts -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index @4
} -cleanup {
destroy .e
} -result {4}
test spinbox-13.17 {GetSpinboxIndex procedure} -constraints fonts -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index @11
} -cleanup {
destroy .e
} -result {4}
test spinbox-13.18 {GetSpinboxIndex procedure} -constraints fonts -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index @12
} -cleanup {
destroy .e
} -result {5}
test spinbox-13.19 {GetSpinboxIndex procedure} -constraints fonts -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index @[expr {[winfo width .e] - 6-11}]
} -cleanup {
destroy .e
} -result {8}
test spinbox-13.20 {GetSpinboxIndex procedure} -constraints fonts -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index @[expr {[winfo width .e] - 5}]
} -cleanup {
destroy .e
} -result {9}
test spinbox-13.21 {GetSpinboxIndex procedure} -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index @1000
} -cleanup {
destroy .e
} -result {9}
test spinbox-13.22 {GetSpinboxIndex procedure} -setup {
spinbox .e
spinbox .e
pack .e
update
} -body {
.e index 1xyz
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "1xyz"}
test spinbox-13.23 {GetSpinboxIndex procedure} -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index -10
} -cleanup {
destroy .e
} -result {0}
test spinbox-13.24 {GetSpinboxIndex procedure} -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index 12
} -cleanup {
destroy .e
} -result {12}
test spinbox-13.25 {GetSpinboxIndex procedure} -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
-font {Courier -12}
-font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
update
.e index 49
} -cleanup {
destroy .e
|
︙ | | |
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
|
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
|
-
+
|
test spinbox-14.3 {SpinboxFetchSelection procedure} -setup {
set x {}
for {set i 1} {$i <= 500} {incr i} {
append x "This is line $i, out of 500\n"
}
} -body {
spinbox .e
.e insert end $x
.e insert end $x
.e select from 0
.e select to end
string compare [selection get] $x
} -cleanup {
destroy .e
} -result {0}
|
︙ | | |
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
|
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
|
-
+
|
} -result {Text Text}
test spinbox-16.1 {SpinboxVisibleRange procedure} -constraints fonts -body {
spinbox .e -width 10 -font {Helvetica -12}
pack .e
update
.e insert 0 "............................."
.e insert 0 "............................."
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.000000 0.827586}
test spinbox-16.2 {SpinboxVisibleRange procedure} -body {
spinbox .e
format {%.6f %.6f} {*}[.e xview]
|
︙ | | |
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
|
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
|
-
+
|
} -body {
set l [interp hidden]
interp hide {} .e
destroy .e
set res1 [list [winfo children .] [interp hidden]]
set res2 [list {} $l]
expr {$res1 == $res2}
} -result {1}
} -result {1}
##
## Spinbox widget VALIDATION tests
##
# The validation tests build each one upon the previous, so cascading
# failures aren't good
#
|
︙ | | |
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
|
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
|
-
+
|
spinbox .e -validate all \
-validatecommand [list doval3 %W %d %i %P %s %S %v %V] \
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
pack .e
set ::e nextdata ;# previous settings
.e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V]
.e validate
list [.e cget -validate] [.e get] $::vVals
} -cleanup {
destroy .e
} -result {none mydata {.e -1 -1 nextdata nextdata {} all forced}}
|
︙ | | |
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
|
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
|
-
+
|
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
pack .e
set ::e nextdata ;# previous settings
.e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V] ;# prev
.e validate ;# previous settings
.e configure -validate all
set ::e testdata
list [.e cget -validate] [.e get] $::e $::vVals
} -cleanup {
destroy .e
} -result {all testdata mydata {.e -1 -1 testdata mydata {} all forced}}
##
|
︙ | | |
Changes to tests/text.test.
︙ | | |
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
|
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
|
-
+
-
+
-
+
|
destroy .t
} -result {2 red}
test text-2.7 {Tk_TextCmd procedure} -constraints {
win
} -body {
catch {destroy .t}
text .t
.t tag cget sel -relief
.t tag cget sel -relief
} -cleanup {
destroy .t
} -result {flat}
test text-2.8 {Tk_TextCmd procedure} -constraints {
aqua
} -body {
catch {destroy .t}
text .t
.t tag cget sel -relief
.t tag cget sel -relief
} -cleanup {
destroy .t
} -result {solid}
test text-2.9 {Tk_TextCmd procedure} -constraints {
unix
} -body {
catch {destroy .t}
text .t
.t tag cget sel -relief
.t tag cget sel -relief
} -cleanup {
destroy .t
} -result {raised}
test text-2.10 {Tk_TextCmd procedure} -body {
list [text .t] [winfo class .t]
} -cleanup {
destroy .t
|
︙ | | |
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
|
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
|
-
+
+
+
+
+
+
+
+
+
+
+
+
+
|
proc .t {args} { lappend ::res $args ; uplevel 1 test.t $args }
.t edit undo
return $res
} -cleanup {
rename .t {}
rename test.t .t
destroy .t
} -result {{edit undo} {delete 2.1 2.4} {mark set insert 2.1} {see insert} {insert 2.1 ef} {mark set insert 2.3} {see insert}}
} -result [list {edit undo} {delete 2.1 2.4} {mark set insert 2.1} {see insert} \
{mark set tk::undoMarkL3 2.1} {mark set tk::undoMarkR3 2.4} \
{mark gravity tk::undoMarkL3 left} {mark gravity tk::undoMarkR3 right} \
{insert 2.1 ef} {mark set insert 2.3} {see insert} \
{mark set tk::undoMarkL2 2.1} {mark set tk::undoMarkR2 2.3} \
{mark gravity tk::undoMarkL2 left} {mark gravity tk::undoMarkR2 right} \
{mark names} \
{index tk::undoMarkL2} {index tk::undoMarkR2} \
{mark unset tk::undoMarkL2 tk::undoMarkR2} \
{index tk::undoMarkL3} {index tk::undoMarkR3} \
{mark unset tk::undoMarkL3 tk::undoMarkR3} \
{compare 2.1 > 2.3} {compare 2.6 > 2.3} ]
test text-8.23 {TextWidgetCmd procedure, "replace" option with undo} -setup {
text .t
} -body {
.t insert 1.0 "Line 1
aefghijklm
12345
Line 4
|
︙ | | |
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
|
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
|
-
+
|
Line 4
bOy GIrl .#@? x_yz
!@#$%
Line 7"
.t tag configure elide -elide 1
.t tag add elide 5.2 5.4
.t window create 5.4
.t delete 5.4
.t delete 5.4
.t tag add elide 5.5 5.6
.t get -displaychars 5.2 5.8
} -cleanup {
destroy .t
} -result {Grl}
|
︙ | | |
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
|
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
|
-
+
|
lappend res [.t count -displaychars 1.0 end-1c]
lappend res [.t count -displaychars 1.0 1.2]
lappend res [.t count -displaychars 2.0 end]
lappend res [.t count -displaychars 2.0 end-1c]
lappend res [.t index "1.0 +1 indices"]
lappend res [.t index "1.0 +1 display indices"]
lappend res [.t index "1.0 +1 display chars"]
lappend res [.t index end]
lappend res [.t index end]
lappend res [.t index "end -1 indices"]
lappend res [.t index "end -1 display indices"]
lappend res [.t index "end -1 display chars"]
lappend res [.t index "end -2 indices"]
lappend res [.t index "end -2 display indices"]
lappend res [.t index "end -2 display chars"]
} -cleanup {
|
︙ | | |
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
|
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
|
-
+
-
+
|
append content [string repeat "$i " 50] \n
}
bind .top.yt <<WidgetViewSync>> {lappend res Sync:%d}
.top.yt insert 1.0 $content
vwait res ; # event dealt with by the event loop, with %d==0 i.e. we're out of sync
# ensure the test is relevant
lappend res "Pending:[.top.yt pendingsync]"
# - <<WidgetViewSync>> fires when sync returns if there was pending syncs
# - <<WidgetViewSync>> fires when sync returns if there was pending syncs
# - there is no more any pending sync after running 'sync'
.top.yt sync
vwait res ; # event dealt with by the event loop, with %d==1 i.e. we're in sync again
lappend res "Pending:[.top.yt pendingsync]"
set res
} -cleanup {
destroy .top.yt .top
} -result {Sync:0 Pending:1 Sync:1 Pending:0}
test text-11a.51 {<<WidgetViewSync>> calls TkSendVirtualEvent(),
NOT Tk_HandleEvent().
Bug [b362182e45704dd7bbd6aed91e48122035ea3d16]} -setup {
destroy .top.t .top
} -body {
set res {}
toplevel .top
pack [text .top.t]
for {set i 1} {$i < 10000} {incr i} {
.top.t insert end "Hello world!\n"
.top.t insert end "Hello world!\n"
}
bind .top.t <<WidgetViewSync>> {destroy .top.t}
.top.t tag add mytag 1.5 8000.8 ; # shall not crash
update
set res "Still doing fine!"
} -cleanup {
destroy .top.t .top
|
︙ | | |
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
|
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
|
-
+
-
+
-
+
|
} -result {1 1 0}
test text-14.5 {ConfigureText procedure} -setup {
text .t
} -body {
.t configure -tabs {30 foo}
} -cleanup {
destroy .t
} -returnCodes {error} -result {bad tab alignment "foo": must be left, right, center, or numeric}
} -returnCodes {error} -result {bad tab alignment "foo": must be left, right, center, or numeric}
test text-14.6 {ConfigureText procedure} -setup {
text .t
} -body {
catch {.t configure -tabs {30 foo}}
catch {.t configure -tabs {30 foo}}
.t configure -tabs {10 20 30}
return $errorInfo
} -cleanup {
destroy .t
} -result {bad tab alignment "foo": must be left, right, center, or numeric
(while processing -tabs option)
invoked from within
".t configure -tabs {30 foo}"}
test text-14.7 {ConfigureText procedure} -setup {
text .t
} -body {
.t configure -tabs {10 20 30}
.t configure -tabs {}
.t cget -tabs
} -cleanup {
destroy .t
} -result {}
test text-14.8 {ConfigureText procedure} -setup {
text .t
text .t
} -body {
.t configure -wrap bogus
} -cleanup {
destroy .t
} -returnCodes {error} -result {bad wrap "bogus": must be char, none, or word}
test text-14.9 {ConfigureText procedure} -setup {
text .t -font {Courier -12} -borderwidth 2 -highlightthickness 2
|
︙ | | |
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
|
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
|
-
+
|
} -body {
.t configure -selectborderwidth {}
.t tag cget sel -borderwidth
} -cleanup {
destroy .t
} -result {}
test text-14.11 {ConfigureText procedure} -setup {
text .t
text .t
} -body {
.t configure -selectborderwidth foo
} -cleanup {
destroy .t
} -returnCodes {error} -result {bad screen distance "foo"}
test text-14.12 {ConfigureText procedure} -body {
text .t
|
︙ | | |
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
|
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
|
-
+
|
} -cleanup {
destroy .t .t2
} -result {1234}
test text-14.18 {ConfigureText procedure} -constraints fonts -setup {
toplevel .top
text .top.t -font {Courier -12} -borderwidth 2 -highlightthickness 2
} -body {
.top.t configure -width 20 -height 10
.top.t configure -width 20 -height 10
pack append .top .top.t top
update
set geom [wm geometry .top]
set x [string range $geom 0 [string first + $geom]]
} -cleanup {
destroy .top
} -result {150x140+}
|
︙ | | |
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
|
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
|
-
+
|
list [info command .tx*] [winfo exists .tx1]
} -cleanup {
destroy .txt1
} -result {{} 0}
test text-17.2 {TextCmdDeletedProc procedure, disabling -setgrid} -constraints {
fonts
} -body {
toplevel .top
toplevel .top
text .top.t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} \
-setgrid 1 -width 20 -height 10
pack .top.t
update
set geom [wm geometry .top]
set x [string range $geom 0 [string first + $geom]]
rename .top.t {}
|
︙ | | |
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
|
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
|
-
+
-
+
-
+
|
.t search -backwards "\n\n" 1.0
} -cleanup {
destroy .t
} -result {}
test text-22.119 {TextSearchCmd, multiline regexp matching} -body {
pack [text .t]
.t insert 1.0 { Tcl_Obj *objPtr));
static Tcl_Obj* FSNormalizeAbsolutePath
static Tcl_Obj* FSNormalizeAbsolutePath
_ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj *pathPtr));}
set markExpr "^(\[A-Za-z0-9~_\]+\[ \t\n\r\]*\\(|(\[^ \t\(#\n\r/@:\*\]\[^=\(\r\n\]*\[ \t\]+\\*?)?"
append markExpr "(\[A-Za-z0-9~_\]+(<\[^>\]*>)?(::)?(\[A-Za-z0-9~_\]+::)*\[-A-Za-z0-9~_+ <>\|\\*/\]+|\[A-Za-z0-9~_\]+)"
append markExpr "\[ \n\t\r\]*\\()"
.t search -forwards -regexp $markExpr 1.41 end
} -cleanup {
destroy .t
} -result {}
test text-22.120 {TextSearchCmd, multiline regexp matching} -body {
# Practical example which used to crash Tk, but only after the
# search is complete. This is memory corruption caused by
# a bug in Tcl's handling of string objects.
# (Tcl bug 635200)
pack [text .t]
.t insert 1.0 {static int SetFsPathFromAny _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj *objPtr));
static Tcl_Obj* FSNormalizeAbsolutePath
static Tcl_Obj* FSNormalizeAbsolutePath
_ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj *pathPtr));}
set markExpr "^(\[A-Za-z0-9~_\]+\[ \t\n\r\]*\\(|(\[^ \t\(#\n\r/@:\*\]\[^=\(\r\n\]*\[ \t\]+\\*?)?"
append markExpr "(\[A-Za-z0-9~_\]+(<\[^>\]*>)?(::)?(\[A-Za-z0-9~_\]+::)*\[-A-Za-z0-9~_+ <>\|\\*/\]+|\[A-Za-z0-9~_\]+)"
append markExpr "\[ \n\t\r\]*\\()"
.t search -forwards -regexp $markExpr 1.41 end
} -cleanup {
destroy .t
} -result {}
test text-22.121 {TextSearchCmd, multiline regexp matching} -body {
pack [text .t]
.t insert 1.0 {
static int SetFsPathFromAny _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj *objPtr));
static Tcl_Obj* FSNormalizeAbsolutePath
static Tcl_Obj* FSNormalizeAbsolutePath
_ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj *pathPtr));}
set markExpr "^(\[A-Za-z0-9~_\]+\[ \t\n\r\]*\\(|(\[^ \t\(#\n\r/@:\*\]\[^=\(\r\n\]*\[ \t\]+\\*?)?"
append markExpr "(\[A-Za-z0-9~_\]+(<\[^>\]*>)?(::)?(\[A-Za-z0-9~_\]+::)*\[-A-Za-z0-9~_+ <>\|\\*/\]+|\[A-Za-z0-9~_\]+)"
append markExpr "\[ \n\t\r\]*\\()"
.t search -backwards -all -regexp $markExpr end
} -cleanup {
destroy .t
|
︙ | | |
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
|
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
|
-
+
-
+
-
+
-
+
-
+
|
destroy .t
} -returnCodes {error} -result {bad screen distance "!44"}
test text-24.1 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
.t mark set insert 1.0
.t mark set insert 1.0
.t dump
} -cleanup {
destroy .t
} -returnCodes {error} -result {Usage: .t dump ?-all -image -text -mark -tag -window? ?-command script? index ?index2?}
test text-24.2 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
.t mark set insert 1.0
.t mark set insert 1.0
.t dump -all
} -cleanup {
destroy .t
} -returnCodes {error} -result {Usage: .t dump ?-all -image -text -mark -tag -window? ?-command script? index ?index2?}
test text-24.3 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
.t mark set insert 1.0
.t mark set insert 1.0
.t dump -command
} -cleanup {
destroy .t
} -returnCodes {error} -result {Usage: .t dump ?-all -image -text -mark -tag -window? ?-command script? index ?index2?}
test text-24.4 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
.t mark set insert 1.0
.t mark set insert 1.0
.t dump -bogus
} -cleanup {
destroy .t
} -returnCodes {error} -result {bad option "-bogus": must be -all, -command, -image, -mark, -tag, -text, or -window}
test text-24.5 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
.t mark set insert 1.0
.t mark set insert 1.0
.t dump bogus
} -cleanup {
destroy .t
} -returnCodes {error} -result {bad text index "bogus"}
test text-24.6 {TextDumpCmd procedure, one index} -body {
pack [text .t]
.t insert 1.0 "One Line"
|
︙ | | |
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
|
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
|
-
+
|
.t dump 1.5 1.5
} -cleanup {
destroy .t
} -result {}
test text-24.10 {TextDumpCmd procedure, negative range} -body {
pack [text .t]
.t insert 1.0 "One Line"
.t mark set insert 1.0
.t mark set insert 1.0
.t dump 1.5 1.0
} -cleanup {
destroy .t
} -result {}
test text-24.11 {TextDumpCmd procedure, stop at begin-line} -body {
pack [text .t]
.t insert end "Line One\nLine Two\nLine Three\nLine Four"
|
︙ | | |
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
|
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
.t edit undo
update ; lappend res $nbUS
.t edit reset
update ; lappend res $nbUS
} -cleanup {
destroy .t
} -result {0 0 1 2 3 4 4 5 6 6 7 8 8 9}
test text-27.26 {edit undo and edit redo return ranges} -setup {
destroy .t
set res {}
} -body {
text .t -undo true -autoseparators false
.t insert end "Hello "
.t edit separator
.t insert end "World!\n"
.t insert 1.6 "GREAT "
.t insert end "Another edit here!!"
lappend res [.t edit undo]
lappend res [.t edit redo]
.t edit separator
.t delete 1.6
.t delete 1.9 1.10
.t insert 1.9 L
lappend res [.t edit undo]
lappend res [.t edit redo]
.t replace 1.6 1.10 Tcl/Tk
.t replace 2.8 2.12 "one bites the dust"
lappend res [.t edit undo]
lappend res [.t edit redo]
} -cleanup {
destroy .t
} -result [list {1.6 2.0} \
{1.6 2.19} \
{1.6 1.7 1.10 1.12} \
{1.6 1.7 1.9 1.11} \
{1.6 1.16 2.8 2.19} \
{1.6 1.16 2.8 2.30} ]
test text-27.27 {edit undo and edit redo return ranges} -setup {
destroy .t
set res {}
} -body {
text .t -undo true -autoseparators false
for {set i 3} {$i >= 1} {incr i -1} {
.t insert 1.0 "Line $i\n"
}
lappend res [.t edit undo]
lappend res [.t edit redo]
} -cleanup {
destroy .t
} -result [list {1.0 2.0} \
{1.0 4.0} ]
test text-27.28 {edit undo and edit redo do not leave \
spurious temporary marks behind them} -setup {
destroy .t
set res {}
} -body {
pack [text .t -undo true -autoseparators false]
.t insert end "Hello World.\n"
.t edit separator
.t insert end "Again hello.\n"
.t edit undo
lappend res [lsearch [.t mark names] tk::undoMark*]
.t edit redo
lappend res [lsearch [.t mark names] tk::undoMark*]
} -cleanup {
destroy .t
} -result [list -1 -1]
test text-28.1 {bug fix - 624372, ControlUtfProc long lines} -body {
pack [text .t -wrap none]
.t insert end [string repeat "\1" 500]
} -cleanup {
destroy .t
|
︙ | | |
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
|
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
|
-
+
-
+
-
+
|
test text-31.14 {peer widgets} -setup {
pack [text .t]
set res {}
} -body {
for {set i 1} {$i < 20} {incr i} {
.t insert end "Line $i\n"
}
.t tag add sel 1.0 3.0 5.0 7.0 9.0 11.0 13.0 15.0 17.0 19.0
.t tag add sel 1.0 3.0 5.0 7.0 9.0 11.0 13.0 15.0 17.0 19.0
lappend res [.t tag prevrange sel 1.0]
.t configure -start 6 -end 12
lappend res [.t tag ranges sel]
lappend res "next" [.t tag nextrange sel 4.0] \
[.t tag nextrange sel 5.0] [.t tag nextrange sel 6.0] \
[.t tag nextrange sel 7.0]
lappend res "prev" [.t tag prevrange sel 1.0] \
[.t tag prevrange sel 2.0] [.t tag prevrange sel 3.0] \
[.t tag prevrange sel 4.0]
return $res
} -cleanup {
destroy .t
} -result {{} {1.0 2.0 4.0 6.0} next {4.0 6.0} {} {} {} prev {} {1.0 2.0} {1.0 2.0} {1.0 2.0}}
test text-31.15 {peer widgets} -setup {
pack [text .t]
set res {}
} -body {
for {set i 1} {$i < 20} {incr i} {
.t insert end "Line $i\n"
}
.t tag add sel 1.0 3.0 9.0 11.0 13.0 15.0 17.0 19.0
.t tag add sel 1.0 3.0 9.0 11.0 13.0 15.0 17.0 19.0
.t configure -start 6 -end 12
lappend res [.t tag ranges sel]
lappend res "next" [.t tag nextrange sel 4.0] \
[.t tag nextrange sel 5.0] [.t tag nextrange sel 6.0] \
[.t tag nextrange sel 7.0]
lappend res "prev" [.t tag prevrange sel 1.0] \
[.t tag prevrange sel 2.0] [.t tag prevrange sel 3.0] \
[.t tag prevrange sel 4.0]
return $res
} -cleanup {
destroy .t
} -result {{4.0 6.0} next {4.0 6.0} {} {} {} prev {} {} {} {}}
test text-31.16 {peer widgets} -setup {
pack [text .t]
set res {}
} -body {
for {set i 1} {$i < 20} {incr i} {
.t insert end "Line $i\n"
}
.t tag add sel 1.0 7.0 9.0 11.0 13.0 15.0 17.0 19.0
.t tag add sel 1.0 7.0 9.0 11.0 13.0 15.0 17.0 19.0
.t configure -start 6 -end 12
lappend res [.t tag ranges sel]
lappend res "next" [.t tag nextrange sel 4.0] \
[.t tag nextrange sel 5.0] [.t tag nextrange sel 6.0] \
[.t tag nextrange sel 7.0]
lappend res "prev" [.t tag prevrange sel 1.0] \
[.t tag prevrange sel 2.0] [.t tag prevrange sel 3.0] \
|
︙ | | |
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
|
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
|
-
+
|
}
.t tag add sel 1.0 11.0
lappend res [.t index sel.first]
lappend res [.t index sel.last]
return $res
} -cleanup {
destroy .t
} -result {1.0 11.0}
} -result {1.0 11.0}
test text-31.19 {peer widgets} -body {
pack [text .t]
for {set i 1} {$i < 20} {incr i} {
.t insert end "Line $i\n"
}
.t tag delete sel
.t index sel.first
|
︙ | | |
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
|
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
|
-
+
|
set w [makeText]
update ; after 1000 ; update
set before [$w count -ypixels 1.0 2.0]
$w insert 1.0 "a"
update
set after [$w count -ypixels 1.0 2.0]
destroy .g
expr {$before eq $after}
expr {$before eq $after}
} -cleanup {
destroy .t
} -result {1}
test text-33.1 {TextWidgetCmd procedure, "peer" option} -setup {
text .t
|
︙ | | |
Changes to tests/textDisp.test.
︙ | | |
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
|
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
|
-
+
|
} [list [list 5 [expr {$fixedDiff + 18}] 1 $fixedHeight] {} [list 5 [expr {2*$fixedDiff + 31}] 1 $fixedHeight] {1.0 2.0 3.0}]
if {$tcl_platform(platform) == "windows"} {
wm overrideredirect . 0
}
test textDisp-4.6 {UpdateDisplayInfo, tiny window} {
# This test was failing on Windows because the title bar on .
# was a certain minimum size and it was interfering with the size
# requested. The "overrideredirect" gets rid of the titlebar so
# requested. The "overrideredirect" gets rid of the titlebar so
# the toplevel can shrink to the appropriate size. On Unix, setting
# the overrideredirect on "." confuses the window manager and
# causes subsequent tests to fail.
if {$tcl_platform(platform) == "windows"} {
wm overrideredirect . 1
}
|
︙ | | |
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
|
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
|
-
+
-
+
|
set bw [.t cget -borderwidth]
set px [.t cget -padx]
set py [.t cget -pady]
set hlth [.t cget -highlightthickness]
test textDisp-4.7 {UpdateDisplayInfo, filling in extra vertical space} {
# This test was failing on Windows because the title bar on .
# was a certain minimum size and it was interfering with the size
# requested. The "overrideredirect" gets rid of the titlebar so
# requested. The "overrideredirect" gets rid of the titlebar so
# the toplevel can shrink to the appropriate size. On Unix, setting
# the overrideredirect on "." confuses the window manager and
# causes subsequent tests to fail.
if {$tcl_platform(platform) == "windows"} {
wm overrideredirect . 1
}
.t delete 1.0 end
.t insert end "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
.t yview 1.0
update
.t yview 16.0
update
set x [list [.t index @0,0] $tk_textRelayout $tk_textRedraw]
wm overrideredirect . 0
update
update
set x
} {8.0 {16.0 17.0 15.0 14.0 13.0 12.0 11.0 10.0 9.0 8.0} {8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0}}
test textDisp-4.8 {UpdateDisplayInfo, filling in extra vertical space} {
.t delete 1.0 end
.t insert end "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
.t yview 16.0
update
|
︙ | | |
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
|
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
|
-
+
|
} {2.36 2.18 2.0}
test textDisp-14.14 {TkTextXviewCmd procedure} {
.t delete 1.0 end
.t insert end xxxxxxxxx\n
.t insert end "a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9\n"
.t insert end "xxxx xxxxxxxxx xxxxxxxxxxxxx"
.t xview moveto 0
.t xview scroll 21 u
.t xview scroll 21 u
set x [.t index @0,22]
.t xview scroll -1 u
lappend x [.t index @0,22]
.t xview scroll 100 units
lappend x [.t index @0,22]
.t xview scroll -15 units
lappend x [.t index @0,22]
|
︙ | | |
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
|
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
|
-
+
|
list $x [.t index @0,0]
} {6.12 2.5}
test textDisp-17.8 {TkTextScanCmd procedure} {textfonts} {
.t yview 1.0
.t xview moveto 0
.t scan mark 0 60
.t scan dragto 30 100
.t scan dragto 25 95
.t scan dragto 25 95
.t index @0,0
} {4.7}
test textDisp-17.9 {TkTextScanCmd procedure} {textfonts} {
.t yview end
.t xview moveto 0
.t xview scroll 100 units
.t scan mark 90 60
|
︙ | | |
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
|
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
|
-
+
|
test textDisp-21.4 {count -displaylines regression} {
set message {
QOTW: "C/C++, which is used by 16% of users, is the most popular programming language, but Tcl, used by 0%, seems to be the language of choice for the highest scoring users."
(new line)
Use the Up (cursor) key to scroll up one line at a time. At the second press, the cursor either gets locked or jumps several lines.
Connect with Tkcon. The command
.u count -displaylines \
.u count -displaylines \
3.10 2.173
should give answer -1; it gives me 5.
Using 8.5a4 (ActiveState beta 4) under Linux. No problem with ActiveState beta 3.
}
toplevel .tt
|
︙ | | |
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
|
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
|
-
+
|
update ; update
set xv [.t2.t xview]
set xd [expr {[lindex $xv 1] - [lindex $xv 0]}]
.t2.t xview moveto [expr {1.0-$xd}]
set iWidth [lindex [.t2.t bbox end-2c] 2]
.t2.t xview scroll 2 units
set iWidth2 [lindex [.t2.t bbox end-2c] 2]
if {($iWidth == $iWidth2) && $iWidth >= 2} {
set result "correct"
} else {
set result "last character is not completely visible when it should be"
}
} {correct}
test textDisp-29.3 {miscellaneous: lines wrap but are still too long} {textfonts} {
|
︙ | | |
Changes to tests/textImage.test.
︙ | | |
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
-
+
-
+
-
+
-
+
|
} -returnCodes error -result {no embedded image at index "1.1"}
test textImage-1.6 {configure argument checking} -setup {
destroy .t
} -body {
text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
pack .t
.t image configure
.t image configure
} -cleanup {
destroy .t
} -returnCodes error -result {wrong # args: should be ".t image configure index ?-option value ...?"}
test textImage-1.7 {configure argument checking} -setup {
destroy .t
} -body {
text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
pack .t
.t image configure blurf
.t image configure blurf
} -cleanup {
destroy .t
} -returnCodes error -result {bad text index "blurf"}
test textImage-1.8 {configure argument checking} -setup {
destroy .t
} -body {
text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
pack .t
.t image configure 1.1
.t image configure 1.1
} -cleanup {
destroy .t
} -returnCodes error -result {no embedded image at index "1.1"}
test textImage-1.9 {create argument checking} -setup {
destroy .t
} -body {
text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
pack .t
.t image create
} -cleanup {
destroy .t
} -returnCodes error -result {wrong # args: should be ".t image create index ?-option value ...?"}
test textImage-1.10 {create argument checking} -setup {
destroy .t
} -body {
text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
pack .t
.t image create blurf
.t image create blurf
} -cleanup {
destroy .t
} -returnCodes error -result {bad text index "blurf"}
test textImage-1.11 {basic argument checking} -setup {
destroy .t
} -body {
|
︙ | | |
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
-
+
|
small put red -to 0 0 4 4
}
text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
pack .t
.t image create end -image small
foreach i {align padx pady image name} {
lappend result $i:[.t image cget small -$i]
}
}
return $result
} -cleanup {
destroy .t
image delete small
} -result {align:center padx:0 pady:0 image:small name:}
test textImage-1.18 {basic configure options} -setup {
|
︙ | | |
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
-
+
|
large put green -to 0 0 50 50
}
text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
pack .t
.t image create end -image small
foreach {option value} {align top padx 5 pady 7 image large name none} {
.t image configure small -$option $value
}
}
update
.t image configure small
} -cleanup {
destroy .t
image delete small large
} -result {{-align {} {} center top} {-padx {} {} 0 5} {-pady {} {} 0 7} {-image {} {} {} large} {-name {} {} {} none}}
|
︙ | | |
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
-
+
|
.t image create end -image vary -align top
update
lappend result base:[.t bbox vary]
foreach i {10 20 40} {
vary configure -width $i -height $i
update
lappend result $i:[.t bbox vary]
}
}
return $result
} -cleanup {
destroy .t
image delete vary
} -result {{base:0 0 5 5} {10:0 0 10 10} {20:0 0 20 20} {40:0 0 40 40}}
test textImage-3.2 {delayed image management, see also bug 1591493} -setup {
|
︙ | | |
Changes to tests/textIndex.test.
︙ | | |
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
-
+
|
catch {destroy .t}
text .t -font {Courier -12} -width 20 -height 10
pack append . .t {top expand fill}
update
.t debug on
wm geometry . {}
# The statements below reset the main window; it's needed if the window
# manager is mwm to make mwm forget about a previous minimum size setting.
wm withdraw .
wm minsize . 1 1
wm positionfrom . user
wm deiconify .
|
︙ | | |
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
-
+
-
+
|
testtext .t byteindex 1 0
} {1.0 0}
test textIndex-1.9 {TkTextMakeByteIndex: shortcut for 0} {testtext} {
# not (byteIndex == 0)
testtext .t byteindex 3 80
} {3.5 5}
test textIndex-1.10 {TkTextMakeByteIndex: verify index is in range} {testtext} {
# for (segPtr = indexPtr->linePtr->segPtr; ; segPtr = segPtr->nextPtr)
# for (segPtr = indexPtr->linePtr->segPtr; ; segPtr = segPtr->nextPtr)
# one segment
testtext .t byteindex 3 5
} {3.5 5}
test textIndex-1.11 {TkTextMakeByteIndex: verify index is in range} {testtext} {
# for (segPtr = indexPtr->linePtr->segPtr; ; segPtr = segPtr->nextPtr)
# index += segPtr->size
# Multiple segments, make sure add segment size to index.
.t mark set foo 3.2
.t mark set foo 3.2
set x [testtext .t byteindex 3 7]
.t mark unset foo
set x
} {3.5 5}
test textIndex-1.12 {TkTextMakeByteIndex: verify index is in range} {testtext} {
# (segPtr == NULL)
testtext .t byteindex 3 7
|
︙ | | |
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
-
+
-
+
|
set x
} {3.4 4}
test textIndex-1.16 {TkTextMakeByteIndex: UTF-8 characters} {testtext} {
testtext .t byteindex 5 100
} {5.18 20}
test textIndex-1.17 {TkTextMakeByteIndex: prevent splitting UTF-8 character} \
{testtext} {
# ((byteIndex > index) && (segPtr->typePtr == &tkTextCharType))
# ((byteIndex > index) && (segPtr->typePtr == &tkTextCharType))
# Wrong answer would be \xb9 (the 2nd byte of UTF rep of 0x4e4f).
set x [testtext .t byteindex 5 2]
list $x [.t get insert]
} {{5.2 4} y}
test textIndex-1.18 {TkTextMakeByteIndex: prevent splitting UTF-8 character} \
{testtext} {
# ((byteIndex > index) && (segPtr->typePtr == &tkTextCharType))
# ((byteIndex > index) && (segPtr->typePtr == &tkTextCharType))
testtext .t byteindex 5 1
.t get insert
} "\u4e4f"
test textIndex-2.1 {TkTextMakeCharIndex} {
# (lineIndex < 0)
.t index -1.3
|
︙ | | |
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
-
+
|
.t index 3.5
} 3.5
test textIndex-2.9 {TkTextMakeCharIndex: verify index is in range} {
# for (segPtr = indexPtr->linePtr->segPtr; ; segPtr = segPtr->nextPtr)
# Multiple segments, make sure add segment size to index.
.t mark set foo 3.2
.t mark set foo 3.2
set x [.t index 3.7]
.t mark unset foo
set x
} 3.5
test textIndex-2.10 {TkTextMakeCharIndex: verify index is in range} {
# (segPtr == NULL)
.t index 3.7
|
︙ | | |
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
|
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
|
-
+
-
+
|
# border condition: last char
.t index {2.3 + 10 chars}
} 2.13
test textIndex-12.6 {TkTextIndexForwChars: find index} {
# for ( ; segPtr != NULL; segPtr = segPtr->nextPtr)
# border condition: segPtr == NULL -> beginning of next line
.t index {2.3 + 11 chars}
} 3.0
test textIndex-12.7 {TkTextIndexForwChars: find index} {
# (segPtr->typePtr == &tkTextCharType)
.t index {2.3 + 2 chars}
} 2.5
test textIndex-12.8 {TkTextIndexForwChars: find index} {
# (charCount == 0)
# No more chars, so we found byte offset.
.t index {2.3 + 2 chars}
} 2.5
test textIndex-12.9 {TkTextIndexForwChars: find index} {
# not (segPtr->typePtr == &tkTextCharType)
.t image create 2.4 -image textimage
set x [.t get {2.3 + 3 chars}]
.t delete 2.4
set x
set x
} "f"
test textIndex-12.10 {TkTextIndexForwChars: find index} {
# dstPtr->byteIndex += segPtr->size - byteOffset
# When moving to next segment, account for bytes in last segment.
# Wrong answer would be 2.4
.t mark set foo 2.4
|
︙ | | |
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
|
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
|
-
+
-
+
|
.t mark set foo 3.4
set x [.t index {3.5 - 10 chars}]
.t mark unset foo
set x
} 2.9
test textIndex-14.12 {TkTextIndexBackChars: move to previous line} {
# (lineIndex == 0)
# (lineIndex == 0)
.t index {1.5 - 10 chars}
} 1.0
test textIndex-14.13 {TkTextIndexBackChars: move to previous line} {
# not (lineIndex == 0)
# not (lineIndex == 0)
.t index {2.5 - 10 chars}
} 1.2
test textIndex-14.14 {TkTextIndexBackChars: move to previous line} {
# for (segPtr = oldPtr; segPtr != NULL; segPtr = segPtr->nextPtr)
# Set byteIndex to end of previous line so we can subtract more
# bytes from it. Otherwise we get an TkTextIndex with a negative
# byteIndex.
|
︙ | | |
Changes to tests/textMark.test.
︙ | | |
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
-
+
|
.t insert 1.0 "Line 1
abcdefghijklm
12345
Line 4
bOy GIrl .#@? x_yz
!@#$%
Line 7"
# The statements below reset the main window; it's needed if the window
# manager is mwm to make mwm forget about a previous minimum size setting.
wm withdraw .
wm minsize . 1 1
wm positionfrom . user
wm deiconify .
|
︙ | | |
Changes to tests/textTag.test.
︙ | | |
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
-
-
-
-
+
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
|
package require tcltest 2.2
namespace import ::tcltest::*
eval tcltest::configure $argv
tcltest::loadTestedCommands
destroy .t
text .t -width 20 -height 10
testConstraint haveCourier12 [expr {[catch {
.t configure -font {Courier 12}
}] == 0}]
pack append . .t {top expand fill}
update
.t debug on
wm geometry . {}
set bigFont {Helvetica 24}
# The statements below reset the main window; it's needed if the window
# manager is mwm, to make mwm forget about a previous minimum size setting.
wm withdraw .
wm minsize . 1 1
wm positionfrom . user
wm deiconify .
.t insert 1.0 "Line 1
abcdefghijklm
12345
Line 4
bOy GIrl .#@? x_yz
!@#$%
Line 7"
test textTag-1.1 {tag configuration options} -constraints {
test textTag-1.1 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -background #012345
.t tag cget x -background
} -cleanup {
.t tag configure x -background [lindex [.t tag configure x -background] 3]
} -result {#012345}
test textTag-1.2 {configuration options} -constraints {
test textTag-1.2 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -background non-existent
} -cleanup {
.t tag configure x -background [lindex [.t tag configure x -background] 3]
} -returnCodes error -result {unknown color name "non-existent"}
test textTag-1.3 {tag configuration options} -constraints {
test textTag-1.3 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -bgstipple gray50
.t tag cget x -bgstipple
} -cleanup {
.t tag configure x -bgstipple [lindex [.t tag configure x -bgstipple] 3]
} -result {gray50}
test textTag-1.4 {configuration options} -constraints {
test textTag-1.4 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -bgstipple badStipple
} -cleanup {
.t tag configure x -bgstipple [lindex [.t tag configure x -bgstipple] 3]
} -returnCodes error -result {bitmap "badStipple" not defined}
test textTag-1.5 {tag configuration options} -constraints {
test textTag-1.5 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -borderwidth 2
.t tag cget x -borderwidth
} -cleanup {
.t tag configure x -borderwidth [lindex [.t tag configure x -borderwidth] 3]
} -result {2}
test textTag-1.6 {configuration options} -constraints {
test textTag-1.6 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -borderwidth 46q
} -cleanup {
.t tag configure x -borderwidth [lindex [.t tag configure x -borderwidth] 3]
} -returnCodes error -result {bad screen distance "46q"}
test textTag-1.7 {tag configuration options} -constraints {
test textTag-1.7 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -fgstipple gray25
.t tag cget x -fgstipple
} -cleanup {
.t tag configure x -fgstipple [lindex [.t tag configure x -fgstipple] 3]
} -result {gray25}
test textTag-1.8 {configuration options} -constraints {
test textTag-1.8 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -fgstipple bogus
} -cleanup {
.t tag configure x -fgstipple [lindex [.t tag configure x -fgstipple] 3]
} -returnCodes error -result {bitmap "bogus" not defined}
test textTag-1.9 {tag configuration options} -constraints {
test textTag-1.9 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -font fixed
.t tag cget x -font
} -cleanup {
.t tag configure x -font [lindex [.t tag configure x -font] 3]
} -result {fixed}
test textTag-1.10 {tag configuration options} -constraints {
test textTag-1.10 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -foreground #001122
.t tag cget x -foreground
} -cleanup {
.t tag configure x -foreground [lindex [.t tag configure x -foreground] 3]
} -result {#001122}
test textTag-1.11 {configuration options} -constraints {
test textTag-1.11 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -foreground {silly color}
} -cleanup {
.t tag configure x -foreground [lindex [.t tag configure x -foreground] 3]
} -returnCodes error -result {unknown color name "silly color"}
test textTag-1.12 {tag configuration options} -constraints {
test textTag-1.12 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -justify left
.t tag cget x -justify
} -cleanup {
.t tag configure x -justify [lindex [.t tag configure x -justify] 3]
} -result {left}
test textTag-1.13 {configuration options} -constraints {
test textTag-1.13 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -justify middle
} -cleanup {
.t tag configure x -justify [lindex [.t tag configure x -justify] 3]
} -returnCodes error -result {bad justification "middle": must be left, right, or center}
test textTag-1.14 {tag configuration options} -constraints {
test textTag-1.14 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -lmargin1 10
.t tag cget x -lmargin1
} -cleanup {
.t tag configure x -lmargin1 [lindex [.t tag configure x -lmargin1] 3]
} -result {10}
test textTag-1.15 {configuration options} -constraints {
test textTag-1.15 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -lmargin1 bad
} -cleanup {
.t tag configure x -lmargin1 [lindex [.t tag configure x -lmargin1] 3]
} -returnCodes error -result {bad screen distance "bad"}
test textTag-1.16 {tag configuration options} -constraints {
test textTag-1.16 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -lmargin2 10
.t tag cget x -lmargin2
} -cleanup {
.t tag configure x -lmargin2 [lindex [.t tag configure x -lmargin2] 3]
} -result {10}
test textTag-1.17 {configuration options} -constraints {
test textTag-1.17 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -lmargin2 bad
} -cleanup {
.t tag configure x -lmargin2 [lindex [.t tag configure x -lmargin2] 3]
} -returnCodes error -result {bad screen distance "bad"}
test textTag-1.17a {tag configuration options} -body {
.t tag configure x -lmargincolor lightgreen
.t tag cget x -lmargincolor
} -cleanup {
.t tag configure x -lmargincolor [lindex [.t tag configure x -lmargincolor] 3]
} -result {lightgreen}
test textTag-1.17b {configuration options} -body {
.t tag configure x -lmargincolor non-existent
} -cleanup {
.t tag configure x -lmargincolor [lindex [.t tag configure x -lmargincolor] 3]
} -returnCodes error -result {unknown color name "non-existent"}
test textTag-1.18 {tag configuration options} -constraints {
test textTag-1.18 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -offset 2
.t tag cget x -offset
} -cleanup {
.t tag configure x -offset [lindex [.t tag configure x -offset] 3]
} -result {2}
test textTag-1.19 {configuration options} -constraints {
test textTag-1.19 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -offset 100xyz
} -cleanup {
.t tag configure x -offset [lindex [.t tag configure x -offset] 3]
} -returnCodes error -result {bad screen distance "100xyz"}
test textTag-1.20 {tag configuration options} -constraints {
test textTag-1.20 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -overstrike on
.t tag cget x -overstrike
} -cleanup {
.t tag configure x -overstrike [lindex [.t tag configure x -overstrike] 3]
} -result {on}
test textTag-1.21 {configuration options} -constraints {
test textTag-1.21 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -overstrike stupid
} -cleanup {
.t tag configure x -overstrike [lindex [.t tag configure x -overstrike] 3]
} -returnCodes error -result {expected boolean value but got "stupid"}
test textTag-1.21a {tag configuration options} -body {
.t tag configure x -overstrikefg red
.t tag cget x -overstrikefg
} -cleanup {
.t tag configure x -overstrikefg [lindex [.t tag configure x -overstrikefg] 3]
} -result {red}
test textTag-1.21b {configuration options} -body {
.t tag configure x -overstrikefg stupid
} -cleanup {
.t tag configure x -overstrikefg [lindex [.t tag configure x -overstrikefg] 3]
} -returnCodes error -result {unknown color name "stupid"}
test textTag-1.22 {tag configuration options} -constraints {
test textTag-1.22 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -relief raised
.t tag cget x -relief
} -cleanup {
.t tag configure x -relief [lindex [.t tag configure x -relief] 3]
} -result {raised}
test textTag-1.23 {configuration options} -constraints {
test textTag-1.23 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -relief stupid
} -cleanup {
.t tag configure x -relief [lindex [.t tag configure x -relief] 3]
} -returnCodes error -result {bad relief "stupid": must be flat, groove, raised, ridge, solid, or sunken}
test textTag-1.24 {tag configuration options} -constraints {
test textTag-1.24 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -rmargin 10
.t tag cget x -rmargin
} -cleanup {
.t tag configure x -rmargin [lindex [.t tag configure x -rmargin] 3]
} -result {10}
test textTag-1.25 {configuration options} -constraints {
test textTag-1.25 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -rmargin bad
} -cleanup {
.t tag configure x -rmargin [lindex [.t tag configure x -rmargin] 3]
} -returnCodes error -result {bad screen distance "bad"}
test textTag-1.25a {tag configuration options} -body {
.t tag configure x -rmargincolor darkblue
.t tag cget x -rmargincolor
|
︙ | | |
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
|
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
|
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
+
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
|
.t tag configure x -selectforeground [lindex [.t tag configure x -selectforeground] 3]
} -result {#012345}
test textTag-1.25f {configuration options} -body {
.t tag configure x -selectforeground non-existent
} -cleanup {
.t tag configure x -selectforeground [lindex [.t tag configure x -selectforeground] 3]
} -returnCodes error -result {unknown color name "non-existent"}
test textTag-1.26 {tag configuration options} -constraints {
test textTag-1.26 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -spacing1 10
.t tag cget x -spacing1
} -cleanup {
.t tag configure x -spacing1 [lindex [.t tag configure x -spacing1] 3]
} -result {10}
test textTag-1.27 {configuration options} -constraints {
test textTag-1.27 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -spacing1 bad
} -cleanup {
.t tag configure x -spacing1 [lindex [.t tag configure x -spacing1] 3]
} -returnCodes error -result {bad screen distance "bad"}
test textTag-1.28 {tag configuration options} -constraints {
test textTag-1.28 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -spacing2 10
.t tag cget x -spacing2
} -cleanup {
.t tag configure x -spacing2 [lindex [.t tag configure x -spacing2] 3]
} -result {10}
test textTag-1.29 {configuration options} -constraints {
test textTag-1.29 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -spacing2 bad
} -cleanup {
.t tag configure x -spacing2 [lindex [.t tag configure x -spacing2] 3]
} -returnCodes error -result {bad screen distance "bad"}
test textTag-1.30 {tag configuration options} -constraints {
test textTag-1.30 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -spacing3 10
.t tag cget x -spacing3
} -cleanup {
.t tag configure x -spacing3 [lindex [.t tag configure x -spacing3] 3]
} -result {10}
test textTag-1.31 {configuration options} -constraints {
test textTag-1.31 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -spacing3 bad
} -cleanup {
.t tag configure x -spacing3 [lindex [.t tag configure x -spacing3] 3]
} -returnCodes error -result {bad screen distance "bad"}
test textTag-1.32 {tag configuration options} -constraints {
test textTag-1.32 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -tabs {10 20 30}
.t tag cget x -tabs
} -cleanup {
.t tag configure x -tabs [lindex [.t tag configure x -tabs] 3]
} -result {10 20 30}
test textTag-1.33 {configuration options} -constraints {
test textTag-1.33 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -tabs {10 fork}
} -cleanup {
.t tag configure x -tabs [lindex [.t tag configure x -tabs] 3]
} -returnCodes error -result {bad tab alignment "fork": must be left, right, center, or numeric}
test textTag-1.34 {tag configuration options} -constraints {
test textTag-1.34 {tag configuration options} -body {
haveCourier12
} -body {
.t tag configure x -underline no
.t tag cget x -underline
} -cleanup {
.t tag configure x -underline [lindex [.t tag configure x -underline] 3]
} -result {no}
test textTag-1.35 {configuration options} -constraints {
test textTag-1.35 {configuration options} -body {
haveCourier12
} -body {
.t tag configure x -underline stupid
} -cleanup {
.t tag configure x -underline [lindex [.t tag configure x -underline] 3]
} -returnCodes error -result {expected boolean value but got "stupid"}
test textTag-1.36 {tag configuration options} -body {
.t tag configure x -underlinefg red
.t tag cget x -underlinefg
} -cleanup {
.t tag configure x -underlinefg [lindex [.t tag configure x -underlinefg] 3]
} -result {red}
test textTag-1.37 {configuration options} -body {
.t tag configure x -underlinefg stupid
} -cleanup {
.t tag configure x -underlinefg [lindex [.t tag configure x -underlinefg] 3]
} -returnCodes error -result {unknown color name "stupid"}
test textTag-2.1 {TkTextTagCmd - "add" option} -constraints {
test textTag-2.1 {TkTextTagCmd - "add" option} -body {
haveCourier12
} -body {
.t tag
} -returnCodes error -result {wrong # args: should be ".t tag option ?arg ...?"}
test textTag-2.2 {TkTextTagCmd - "add" option} -constraints {
test textTag-2.2 {TkTextTagCmd - "add" option} -body {
haveCourier12
} -body {
.t tag gorp
} -returnCodes error -result {bad tag option "gorp": must be add, bind, cget, configure, delete, lower, names, nextrange, prevrange, raise, ranges, or remove}
test textTag-2.3 {TkTextTagCmd - "add" option} -constraints {
test textTag-2.3 {TkTextTagCmd - "add" option} -body {
haveCourier12
} -body {
.t tag add foo
} -returnCodes error -result {wrong # args: should be ".t tag add tagName index1 ?index2 index1 index2 ...?"}
test textTag-2.4 {TkTextTagCmd - "add" option} -constraints {
test textTag-2.4 {TkTextTagCmd - "add" option} -body {
haveCourier12
} -body {
.t tag add x gorp
} -returnCodes error -result {bad text index "gorp"}
test textTag-2.5 {TkTextTagCmd - "add" option} -constraints {
test textTag-2.5 {TkTextTagCmd - "add" option} -body {
haveCourier12
} -body {
.t tag add x 1.2 gorp
} -returnCodes error -result {bad text index "gorp"}
test textTag-2.6 {TkTextTagCmd - "add" option} -constraints {
test textTag-2.6 {TkTextTagCmd - "add" option} -setup {
haveCourier12
} -setup {
.t tag delete sel
} -body {
.t tag add sel 3.2 3.4
.t tag add sel 3.2 3.0
.t tag ranges sel
} -result {3.2 3.4}
test textTag-2.7 {TkTextTagCmd - "add" option} -constraints {
test textTag-2.7 {TkTextTagCmd - "add" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 1.0 1.end
.t tag ranges x
} -cleanup {
.t tag delete x
} -result {1.0 1.6}
test textTag-2.8 {TkTextTagCmd - "add" option} -constraints {
test textTag-2.8 {TkTextTagCmd - "add" option} -setup {
haveCourier12
} -setup {
.t tag remove x 1.0 end
} -body {
.t tag add x 1.2
.t tag ranges x
} -cleanup {
.t tag delete x
} -result {1.2 1.3}
test textTag-2.9 {TkTextTagCmd - "add" option} -constraints {
test textTag-2.9 {TkTextTagCmd - "add" option} -setup {
haveCourier12
} -setup {
destroy .t.e
} -body {
entry .t.e
.t.e insert 0 "Text"
.t.e select from 0
.t.e select to 4
.t tag add sel 3.2 3.4
selection get
} -cleanup {
destroy .t.e
} -result 34
test textTag-2.10 {TkTextTagCmd - "add" option} -constraints {
test textTag-2.10 {TkTextTagCmd - "add" option} -setup {
haveCourier12
} -setup {
destroy .t.e
} -body {
entry .t.e
.t.e insert 0 "Text"
.t.e select from 0
.t.e select to 4
.t configure -exportselection 0
.t tag add sel 3.2 3.4
selection get
} -cleanup {
destroy .t.e
} -result {Text}
test textTag-2.11 {TkTextTagCmd - "add" option} -constraints {
test textTag-2.11 {TkTextTagCmd - "add" option} -body {
haveCourier12
} -body {
.t tag remove sel 1.0 end
.t tag add sel 1.1 1.5 2.4 3.1 4.2 4.4
.t tag ranges sel
} -result {1.1 1.5 2.4 3.1 4.2 4.4}
test textTag-2.12 {TkTextTagCmd - "add" option} -constraints {
test textTag-2.12 {TkTextTagCmd - "add" option} -body {
haveCourier12
} -body {
.t tag remove sel 1.0 end
.t tag add sel 1.1 1.5 2.4
.t tag ranges sel
} -cleanup {
.t tag remove sel 1.0 end
} -result {1.1 1.5 2.4 2.5}
test textTag-2.14 {tag add before -startline - Bug 1615425} haveCourier12 {
test textTag-2.14 {tag add before -startline - Bug 1615425} -body {
text .tt
for {set i 1} {$i <10} {incr i} {
.tt insert end "Line $i\n"
}
.tt tag configure mytag -font {Courier 12 bold}
.tt peer create .ptt
.ptt configure -startline 3 -endline 7
# the test succeeds if next line does not crash
.tt tag add mytag 1.0 1.end
destroy .ptt .tt
set res 1
} {1}
} -result {1}
test textTag-3.1 {TkTextTagCmd - "bind" option} -constraints {
test textTag-3.1 {TkTextTagCmd - "bind" option} -body {
haveCourier12
} -body {
.t tag bind
} -returnCodes error -result {wrong # args: should be ".t tag bind tagName ?sequence? ?command?"}
test textTag-3.2 {TkTextTagCmd - "bind" option} -constraints {
test textTag-3.2 {TkTextTagCmd - "bind" option} -body {
haveCourier12
} -body {
.t tag bind 1 2 3 4
} -returnCodes error -result {wrong # args: should be ".t tag bind tagName ?sequence? ?command?"}
test textTag-3.3 {TkTextTagCmd - "bind" option} -constraints {
test textTag-3.3 {TkTextTagCmd - "bind" option} -body {
haveCourier12
} -body {
.t tag bind x <Enter> script1
.t tag bind x <Enter>
} -cleanup {
.t tag delete x
} -result {script1}
test textTag-3.4 {TkTextTagCmd - "bind" option} -constraints {
test textTag-3.4 {TkTextTagCmd - "bind" option} -body {
haveCourier12
} -body {
.t tag bind x <Gorp> script2
} -returnCodes error -result {bad event type or keysym "Gorp"}
test textTag-3.5 {TkTextTagCmd - "bind" option} -constraints {
test textTag-3.5 {TkTextTagCmd - "bind" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag bind x <Enter> script1
.t tag bind x <FocusIn> script2
} -cleanup {
.t tag delete x
} -returnCodes error -result {requested illegal events; only key, button, motion, enter, leave, and virtual events may be used}
test textTag-3.6 {TkTextTagCmd - "bind" option} -constraints {
test textTag-3.6 {TkTextTagCmd - "bind" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag bind x <Enter> script1
catch {.t tag bind x <FocusIn> script2}
catch {.t tag bind x <FocusIn> script2}
.t tag bind x
} -cleanup {
.t tag delete x
} -result {<Enter>}
test textTag-3.7 {TkTextTagCmd - "bind" option} -constraints {
test textTag-3.7 {TkTextTagCmd - "bind" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag bind x <Enter> script1
.t tag bind x <Leave> script2
.t tag bind x a xyzzy
list [lsort [.t tag bind x]] [.t tag bind x <Enter>] [.t tag bind x a]
} -cleanup {
.t tag delete x
} -result {{<Enter> <Leave> a} script1 xyzzy}
test textTag-3.8 {TkTextTagCmd - "bind" option} -constraints {
test textTag-3.8 {TkTextTagCmd - "bind" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag bind x <Enter> script1
.t tag bind x <Enter> +script2
.t tag bind x <Enter>
} -cleanup {
.t tag delete x
} -result {script1
script2}
test textTag-3.9 {TkTextTagCmd - "bind" option} -constraints {
test textTag-3.9 {TkTextTagCmd - "bind" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag bind x <Enter>
} -cleanup {
.t tag delete x
} -returnCodes ok -result {}
test textTag-3.10 {TkTextTagCmd - "bind" option} -constraints {
test textTag-3.10 {TkTextTagCmd - "bind" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag bind x <
} -cleanup {
.t tag delete x
} -returnCodes error -result {no event type or button # or keysym}
test textTag-4.1 {TkTextTagCmd - "cget" option} -constraints {
test textTag-4.1 {TkTextTagCmd - "cget" option} -body {
haveCourier12
} -body {
.t tag cget a
} -returnCodes error -result {wrong # args: should be ".t tag cget tagName option"}
test textTag-4.2 {TkTextTagCmd - "cget" option} -constraints {
test textTag-4.2 {TkTextTagCmd - "cget" option} -body {
haveCourier12
} -body {
.t tag cget a b c
} -returnCodes error -result {wrong # args: should be ".t tag cget tagName option"}
test textTag-4.3 {TkTextTagCmd - "cget" option} -constraints {
test textTag-4.3 {TkTextTagCmd - "cget" option} -body {
haveCourier12
} -body {
.t tag delete foo
.t tag cget foo bar
} -returnCodes error -result {tag "foo" isn't defined in text widget}
test textTag-4.4 {TkTextTagCmd - "cget" option} -constraints {
test textTag-4.4 {TkTextTagCmd - "cget" option} -body {
haveCourier12
} -body {
.t tag cget sel bogus
} -returnCodes error -result {unknown option "bogus"}
test textTag-4.5 {TkTextTagCmd - "cget" option} -constraints {
test textTag-4.5 {TkTextTagCmd - "cget" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -background red
.t tag cget x -background
} -cleanup {
.t tag delete x
} -result {red}
test textTag-5.1 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.1 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag configure
} -returnCodes error -result {wrong # args: should be ".t tag configure tagName ?-option? ?value? ?-option value ...?"}
test textTag-5.2 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.2 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag configure x -foo
} -returnCodes error -result {unknown option "-foo"}
test textTag-5.3 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.3 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag configure x -background red -underline
} -cleanup {
.t tag delete x
} -returnCodes error -result {value for "-underline" missing}
test textTag-5.4 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.4 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -underline yes
.t tag configure x -underline
} -cleanup {
.t tag delete x
} -result {-underline {} {} {} yes}
test textTag-5.4a {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -underlinefg lightgreen
.t tag configure x -underlinefg
} -cleanup {
.t tag delete x
} -result {-underlinefg {} {} {} lightgreen}
test textTag-5.5 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.5 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -overstrike on
.t tag cget x -overstrike
} -cleanup {
.t tag delete x
} -result {on}
test textTag-5.5a {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -overstrikefg lightgreen
.t tag configure x -overstrikefg
} -cleanup {
.t tag delete x
} -result {-overstrikefg {} {} {} lightgreen}
test textTag-5.6 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.6 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag configure x -overstrike foo
} -cleanup {
.t tag delete x
} -returnCodes error -result {expected boolean value but got "foo"}
test textTag-5.7 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.7 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -underline stupid
} -cleanup {
.t tag delete x
} -returnCodes error -result {expected boolean value but got "stupid"}
test textTag-5.8 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.8 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -justify left
.t tag configure x -justify
} -cleanup {
.t tag delete x
} -result {-justify {} {} {} left}
test textTag-5.9 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.9 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -justify bogus
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad justification "bogus": must be left, right, or center}
test textTag-5.10 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.10 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -justify fill
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad justification "fill": must be left, right, or center}
test textTag-5.11 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.11 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -offset 2
.t tag configure x -offset
} -cleanup {
.t tag delete x
} -result {-offset {} {} {} 2}
test textTag-5.12 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.12 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -offset 1.0q
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad screen distance "1.0q"}
test textTag-5.13 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -lmargin1 2 -lmargin2 4 -rmargin 5 \
-lmargincolor darkblue -rmargincolor lightgreen
list [.t tag configure x -lmargin1] [.t tag configure x -lmargin2] \
[.t tag configure x -rmargin] [.t tag configure x -lmargincolor] \
[.t tag configure x -rmargincolor]
} -cleanup {
.t tag delete x
} -result [list {-lmargin1 {} {} {} 2} {-lmargin2 {} {} {} 4} \
{-rmargin {} {} {} 5} \
{-lmargincolor {} {} {} darkblue} {-rmargincolor {} {} {} lightgreen} \
]
test textTag-5.14 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.14 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -lmargin1 2.0x
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad screen distance "2.0x"}
test textTag-5.15 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.15 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -lmargin2 gorp
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad screen distance "gorp"}
test textTag-5.15a {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -lmargincolor rainbow
} -cleanup {
.t tag delete x
} -returnCodes error -result {unknown color name "rainbow"}
test textTag-5.16 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.16 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -rmargin 140.1.1
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad screen distance "140.1.1"}
test textTag-5.16a {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -rmargincolor rainbow
} -cleanup {
.t tag delete x
} -returnCodes error -result {unknown color name "rainbow"}
.t tag delete x
test textTag-5.17 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.17 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -spacing1 2 -spacing2 4 -spacing3 6
list [.t tag configure x -spacing1] [.t tag configure x -spacing2] \
[.t tag configure x -spacing3]
} -cleanup {
.t tag delete x
} -result {{-spacing1 {} {} {} 2} {-spacing2 {} {} {} 4} {-spacing3 {} {} {} 6}}
test textTag-5.18 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.18 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -spacing1 2.0x
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad screen distance "2.0x"}
test textTag-5.19 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.19 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -spacing1 lousy
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad screen distance "lousy"}
test textTag-5.20 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.20 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag configure x -spacing1 4.2.3
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad screen distance "4.2.3"}
test textTag-5.21 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.21 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t configure -selectborderwidth 2 -selectforeground blue \
-selectbackground black
.t tag configure sel -borderwidth 4 -foreground green -background yellow
set x {}
foreach i {-selectborderwidth -selectforeground -selectbackground} {
lappend x [lindex [.t configure $i] 4]
}
return $x
} -result {4 green yellow}
test textTag-5.22 {TkTextTagCmd - "configure" option} -constraints {
test textTag-5.22 {TkTextTagCmd - "configure" option} -body {
haveCourier12
} -body {
.t configure -selectborderwidth 20
.t tag configure sel -borderwidth {}
.t cget -selectborderwidth
} -result {}
test textTag-5.23 {TkTextTagCmd - "configure" option} -body {
set x {}
# when [.t tag cget sel -selectbackground] == "", mirroring happens between
|
︙ | | |
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
|
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
|
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
+
-
+
-
+
|
lappend x [.t tag cget sel -selectforeground]
.t configure -selectforeground black
.t tag configure sel -selectforeground white
lappend x [.t cget -selectforeground]
return $x
} -result {yellow blue red white}
test textTag-6.1 {TkTextTagCmd - "delete" option} -constraints {
test textTag-6.1 {TkTextTagCmd - "delete" option} -body {
haveCourier12
} -body {
.t tag delete
} -returnCodes error -result {wrong # args: should be ".t tag delete tagName ?tagName ...?"}
test textTag-6.2 {TkTextTagCmd - "delete" option} -constraints {
test textTag-6.2 {TkTextTagCmd - "delete" option} -body {
haveCourier12
} -body {
.t tag delete zork
} -returnCodes ok -result {}
test textTag-6.3 {TkTextTagCmd - "delete" option} -constraints {
test textTag-6.3 {TkTextTagCmd - "delete" option} -setup {
haveCourier12
} -setup {
.t tag delete {*}[.t tag names]
} -body {
.t tag config x -background black
.t tag config y -foreground white
.t tag config z -background black
.t tag delete y z
lsort [.t tag names]
} -cleanup {
.t tag delete x
} -result {sel x}
test textTag-6.4 {TkTextTagCmd - "delete" option} -constraints {
test textTag-6.4 {TkTextTagCmd - "delete" option} -setup {
haveCourier12
} -setup {
.t tag delete {*}[.t tag names]
} -body {
.t tag config x -background black
.t tag config y -foreground white
.t tag config z -background black
eval .t tag delete [.t tag names]
.t tag names
} -result {sel}
test textTag-6.5 {TkTextTagCmd - "delete" option} -constraints {
test textTag-6.5 {TkTextTagCmd - "delete" option} -body {
haveCourier12
} -body {
.t tag bind x <Enter> foo
.t tag delete x
.t tag configure x -background black
.t tag bind x
} -cleanup {
.t tag delete x
} -result {}
test textTag-7.1 {TkTextTagCmd - "lower" option} -constraints {
test textTag-7.1 {TkTextTagCmd - "lower" option} -body {
haveCourier12
} -body {
.t tag lower
} -returnCodes error -result {wrong # args: should be ".t tag lower tagName ?belowThis?"}
test textTag-7.2 {TkTextTagCmd - "lower" option} -constraints {
test textTag-7.2 {TkTextTagCmd - "lower" option} -body {
haveCourier12
} -body {
.t tag lower foo
} -returnCodes error -result {tag "foo" isn't defined in text widget}
test textTag-7.3 {TkTextTagCmd - "lower" option} -constraints {
test textTag-7.3 {TkTextTagCmd - "lower" option} -body {
haveCourier12
} -body {
.t tag lower sel bar
} -returnCodes error -result {tag "bar" isn't defined in text widget}
test textTag-7.4 {TkTextTagCmd - "lower" option} -constraints {
test textTag-7.4 {TkTextTagCmd - "lower" option} -setup {
haveCourier12
} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
.t tag configure $i -background black
}
} -body {
.t tag lower c
.t tag names
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {c sel a b d}
test textTag-7.5 {TkTextTagCmd - "lower" option} -constraints {
test textTag-7.5 {TkTextTagCmd - "lower" option} -setup {
haveCourier12
} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
.t tag configure $i -background black
}
} -body {
.t tag lower d b
.t tag names
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {sel a d b c}
test textTag-7.6 {TkTextTagCmd - "lower" option} -constraints {
test textTag-7.6 {TkTextTagCmd - "lower" option} -setup {
haveCourier12
} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
.t tag configure $i -background black
}
} -body {
.t tag lower a c
.t tag names
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {sel b a c d}
test textTag-8.1 {TkTextTagCmd - "names" option} -constraints {
test textTag-8.1 {TkTextTagCmd - "names" option} -body {
haveCourier12
} -body {
.t tag names a b
} -cleanup {
.t tag delete {*}[.t tag names]
} -returnCodes error -result {wrong # args: should be ".t tag names ?index?"}
test textTag-8.2 {TkTextTagCmd - "names" option} -constraints {
test textTag-8.2 {TkTextTagCmd - "names" option} -setup {
haveCourier12
} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
.t tag configure $i -background black
}
} -body {
.t tag names
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {sel a b c d}
test textTag-8.3 {TkTextTagCmd - "names" option} -constraints {
test textTag-8.3 {TkTextTagCmd - "names" option} -setup {
haveCourier12
} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
.t tag configure $i -background black
}
} -body {
.t tag add "a b" 2.1 2.6
.t tag add c 2.4 2.7
.t tag names 2.5
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {c {a b}}
test textTag-9.1 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.1 {TkTextTagCmd - "nextrange" option} -body {
haveCourier12
} -body {
.t tag nextrange x
} -returnCodes error -result {wrong # args: should be ".t tag nextrange tagName index1 ?index2?"}
test textTag-9.2 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.2 {TkTextTagCmd - "nextrange" option} -body {
haveCourier12
} -body {
.t tag nextrange x 1 2 3
} -returnCodes error -result {wrong # args: should be ".t tag nextrange tagName index1 ?index2?"}
test textTag-9.3 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.3 {TkTextTagCmd - "nextrange" option} -body {
haveCourier12
} -body {
.t tag nextrange foo 1.0
} -returnCodes ok -result {}
test textTag-9.4 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.4 {TkTextTagCmd - "nextrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag nextrange x foo
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad text index "foo"}
test textTag-9.5 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.5 {TkTextTagCmd - "nextrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag nextrange x 1.0 bar
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad text index "bar"}
test textTag-9.6 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.6 {TkTextTagCmd - "nextrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag nextrange x 1.0
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
test textTag-9.7 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.7 {TkTextTagCmd - "nextrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag nextrange x 2.2
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
test textTag-9.8 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.8 {TkTextTagCmd - "nextrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag nextrange x 2.3
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
test textTag-9.9 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.9 {TkTextTagCmd - "nextrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag nextrange x 2.4
} -cleanup {
.t tag delete x
} -result {2.9 3.1}
test textTag-9.10 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.10 {TkTextTagCmd - "nextrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag nextrange x 2.4 2.9
} -cleanup {
.t tag delete x
} -result {}
test textTag-9.11 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.11 {TkTextTagCmd - "nextrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag nextrange x 2.4 2.10
} -cleanup {
.t tag delete x
} -result {2.9 3.1}
test textTag-9.12 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.12 {TkTextTagCmd - "nextrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag nextrange x 2.4 2.11
} -cleanup {
.t tag delete x
} -result {2.9 3.1}
test textTag-9.13 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.13 {TkTextTagCmd - "nextrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag nextrange x 7.0
} -cleanup {
.t tag delete x
} -result {7.2 7.3}
test textTag-9.14 {TkTextTagCmd - "nextrange" option} -constraints {
test textTag-9.14 {TkTextTagCmd - "nextrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag nextrange x 7.3
} -cleanup {
.t tag delete x
} -result {}
test textTag-10.1 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.1 {TkTextTagCmd - "prevrange" option} -body {
haveCourier12
} -body {
.t tag prevrange x
} -returnCodes error -result {wrong # args: should be ".t tag prevrange tagName index1 ?index2?"}
test textTag-10.2 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.2 {TkTextTagCmd - "prevrange" option} -body {
haveCourier12
} -body {
.t tag prevrange x 1 2 3
} -returnCodes error -result {wrong # args: should be ".t tag prevrange tagName index1 ?index2?"}
test textTag-10.3 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.3 {TkTextTagCmd - "prevrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag prevrange foo end
} -cleanup {
.t tag delete x
} -returnCodes ok -result {}
test textTag-10.4 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.4 {TkTextTagCmd - "prevrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag prevrange x foo
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad text index "foo"}
test textTag-10.5 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.5 {TkTextTagCmd - "prevrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag prevrange x end bar
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad text index "bar"}
test textTag-10.6 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.6 {TkTextTagCmd - "prevrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag prevrange x end
} -cleanup {
.t tag delete x
} -result {7.2 7.3}
test textTag-10.7 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.7 {TkTextTagCmd - "prevrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag prevrange x 2.4
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
test textTag-10.8 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.8 {TkTextTagCmd - "prevrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag prevrange x 2.5
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
test textTag-10.9 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.9 {TkTextTagCmd - "prevrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag prevrange x 2.9
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
test textTag-10.10 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.10 {TkTextTagCmd - "prevrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag prevrange x 2.9 2.6
} -cleanup {
.t tag delete x
} -result {}
test textTag-10.11 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.11 {TkTextTagCmd - "prevrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag prevrange x 2.9 2.5
} -cleanup {
.t tag delete x
} -result {}
test textTag-10.12 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.12 {TkTextTagCmd - "prevrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag prevrange x 2.9 2.3
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
test textTag-10.13 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.13 {TkTextTagCmd - "prevrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag prevrange x 7.0
} -cleanup {
.t tag delete x
} -result {2.9 3.1}
test textTag-10.14 {TkTextTagCmd - "prevrange" option} -constraints {
test textTag-10.14 {TkTextTagCmd - "prevrange" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
.t tag add x 2.9 3.1
.t tag add x 7.2
.t tag prevrange x 2.3
} -cleanup {
.t tag delete x
} -result {}
test textTag-11.1 {TkTextTagCmd - "raise" option} -constraints {
test textTag-11.1 {TkTextTagCmd - "raise" option} -body {
haveCourier12
} -body {
.t tag raise
} -returnCodes error -result {wrong # args: should be ".t tag raise tagName ?aboveThis?"}
test textTag-11.2 {TkTextTagCmd - "raise" option} -constraints {
test textTag-11.2 {TkTextTagCmd - "raise" option} -body {
haveCourier12
} -body {
.t tag raise foo
} -returnCodes error -result {tag "foo" isn't defined in text widget}
test textTag-11.3 {TkTextTagCmd - "raise" option} -constraints {
test textTag-11.3 {TkTextTagCmd - "raise" option} -body {
haveCourier12
} -body {
.t tag raise sel bar
} -returnCodes error -result {tag "bar" isn't defined in text widget}
test textTag-11.4 {TkTextTagCmd - "raise" option} -constraints {
test textTag-11.4 {TkTextTagCmd - "raise" option} -setup {
haveCourier12
} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
.t tag configure $i -background black
}
} -body {
.t tag raise c
.t tag names
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {sel a b d c}
test textTag-11.5 {TkTextTagCmd - "raise" option} -constraints {
test textTag-11.5 {TkTextTagCmd - "raise" option} -setup {
haveCourier12
} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
.t tag configure $i -background black
}
} -body {
.t tag raise d b
.t tag names
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {sel a b d c}
test textTag-11.6 {TkTextTagCmd - "raise" option} -constraints {
test textTag-11.6 {TkTextTagCmd - "raise" option} -setup {
haveCourier12
} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
.t tag configure $i -background black
}
} -body {
.t tag raise a c
.t tag names
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {sel b c a d}
test textTag-12.1 {TkTextTagCmd - "ranges" option} -constraints {
test textTag-12.1 {TkTextTagCmd - "ranges" option} -body {
haveCourier12
} -body {
.t tag ranges
} -returnCodes error -result {wrong # args: should be ".t tag ranges tagName"}
test textTag-12.2 {TkTextTagCmd - "ranges" option} -constraints {
test textTag-12.2 {TkTextTagCmd - "ranges" option} -body {
haveCourier12
} -body {
.t tag delete x
.t tag ranges x
} -result {}
test textTag-12.3 {TkTextTagCmd - "ranges" option} -constraints {
test textTag-12.3 {TkTextTagCmd - "ranges" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.2
.t tag add x 2.7 4.15
.t tag add x 5.2 5.5
.t tag ranges x
} -cleanup {
.t tag delete x
} -result {2.2 2.3 2.7 4.6 5.2 5.5}
test textTag-12.4 {TkTextTagCmd - "ranges" option} -constraints {
test textTag-12.4 {TkTextTagCmd - "ranges" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 1.0 3.0
.t tag add x 4.0 end
.t tag ranges x
} -cleanup {
.t tag delete x
} -result {1.0 3.0 4.0 8.0}
test textTag-13.1 {TkTextTagCmd - "remove" option} -constraints {
test textTag-13.1 {TkTextTagCmd - "remove" option} -body {
haveCourier12
} -body {
.t tag remove
} -returnCodes error -result {wrong # args: should be ".t tag remove tagName index1 ?index2 index1 index2 ...?"}
test textTag-13.2 {TkTextTagCmd - "remove" option} -constraints {
test textTag-13.2 {TkTextTagCmd - "remove" option} -setup {
haveCourier12
} -setup {
.t tag delete x
} -body {
.t tag add x 2.2 2.11
.t tag remove x 2.3 2.7
.t tag ranges x
} -cleanup {
.t tag delete x
} -result {2.2 2.3 2.7 2.11}
test textTag-13.3 {TkTextTagCmd - "remove" option} -constraints {
test textTag-13.3 {TkTextTagCmd - "remove" option} -setup {
haveCourier12
} -setup {
destroy .t.e
} -body {
entry .t.e
.t.e insert 0 "Text"
.t configure -exportselection 1
.t tag remove sel 1.0 end
.t tag add sel 2.4 3.3
.t.e select to 4
.t tag remove sel 2.7 3.1
selection get
} -cleanup {
destroy .t.e
} -result {Text}
test textTag-14.1 {SortTags} -constraints haveCourier12 -setup {
test textTag-14.1 {SortTags} -setup {
.t tag delete a b c d
} -body {
foreach i {a b c d} {
.t tag add $i 2.0 2.2
}
.t tag names 2.1
} -cleanup {
.t tag delete a b c d
} -result {a b c d}
.t tag delete a b c d
test textTag-14.2 {SortTags} -constraints haveCourier12 -setup {
test textTag-14.2 {SortTags} -setup {
.t tag delete a b c d
} -body {
foreach i {a b c d} {
.t tag configure $i -background black
}
foreach i {d c b a} {
.t tag add $i 2.0 2.2
}
.t tag names 2.1
} -cleanup {
.t tag delete a b c d
} -result {a b c d}
test textTag-14.3 {SortTags} -constraints haveCourier12 -setup {
test textTag-14.3 {SortTags} -setup {
.t tag delete {*}[.t tag names]
} -body {
for {set i 0} {$i < 30} {incr i} {
.t tag add x$i 2.0 2.2
}
.t tag names 2.1
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29}
test textTag-14.4 {SortTags} -constraints haveCourier12 -setup {
test textTag-14.4 {SortTags} -setup {
.t tag delete {*}[.t tag names]
} -body {
for {set i 0} {$i < 30} {incr i} {
.t tag configure x$i -background black
}
for {set i 29} {$i >= 0} {incr i -1} {
.t tag add x$i 2.0 2.2
|
︙ | | |
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
|
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
|
-
+
|
set c [.t bbox 3.2]
set x2 [expr [lindex $c 0] + [lindex $c 2]/2]
set y2 [expr [lindex $c 1] + [lindex $c 3]/2]
set c [.t bbox 4.3]
set x3 [expr [lindex $c 0] + [lindex $c 2]/2]
set y3 [expr [lindex $c 1] + [lindex $c 3]/2]
test textTag-15.1 {TkTextBindProc} -constraints haveCourier12 -setup {
test textTag-15.1 {TkTextBindProc} -setup {
.t tag delete x y
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
bind .t <ButtonRelease> {lappend x up}
.t tag bind x <ButtonRelease> {lappend x x-up}
.t tag bind y <ButtonRelease> {lappend x y-up}
set x {}
|
︙ | | |
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
|
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
|
-
+
|
event gen .t <ButtonRelease> -x $x3 -y $y3
return $x
} -cleanup {
.t tag delete x y
bind .t <ButtonRelease> {}
} -result {x-up up up y-up up}
test textTag-15.2 {TkTextBindProc} -constraints haveCourier12 -setup {
test textTag-15.2 {TkTextBindProc} -setup {
.t tag delete x y
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
.t tag bind x <Enter> {lappend x x-enter}
.t tag bind x <ButtonPress> {lappend x x-down}
.t tag bind x <ButtonRelease> {lappend x x-up}
.t tag bind x <Leave> {lappend x x-leave}
|
︙ | | |
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
|
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
|
-
+
|
lappend x |
event gen .t <ButtonRelease> -x $x3 -y $y3
return $x
} -cleanup {
.t tag delete x y
} -result {x-enter | x-down | | x-up x-leave y-enter}
test textTag-15.3 {TkTextBindProc} -constraints haveCourier12 -setup {
test textTag-15.3 {TkTextBindProc} -setup {
.t tag delete x y
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
.t tag bind x <Enter> {lappend x x-enter}
.t tag bind x <Any-ButtonPress-1> {lappend x x-down}
.t tag bind x <Any-ButtonRelease-1> {lappend x x-up}
.t tag bind x <Leave> {lappend x x-leave}
|
︙ | | |
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
|
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
|
-
+
-
-
-
+
-
-
-
+
-
-
|
event gen .t <ButtonRelease-2> -x $x3 -y $y3 -state 0x200
return $x
} -cleanup {
.t tag delete x y
} -result {x-enter | x-down | | | x-up | x-leave y-enter}
test textTag-16.1 {TkTextPickCurrent procedure} -constraints {
test textTag-16.1 {TkTextPickCurrent procedure} -setup {
haveCourier12
} -setup {
.t tag delete {*}[.t tag names]
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
event gen .t <ButtonRelease-1> -state 0x100 -x $x1 -y $y1
set x [.t index current]
event gen .t <Motion> -x $x2 -y $y2
lappend x [.t index current]
event gen .t <Button-1> -x $x2 -y $y2
lappend x [.t index current]
event gen .t <Motion> -x $x3 -y $y3 -state 0x100
lappend x [.t index current]
event gen .t <Button-3> -state 0x100 -x $x3 -y $y3
lappend x [.t index current]
event gen .t <ButtonRelease-3> -state 0x300 -x $x3 -y $y3
lappend x [.t index current]
event gen .t <ButtonRelease-1> -state 0x100 -x $x3 -y $y3
lappend x [.t index current]
} -result {2.1 3.2 3.2 3.2 3.2 3.2 4.3}
test textTag-16.2 {TkTextPickCurrent procedure} -constraints {
test textTag-16.2 {TkTextPickCurrent procedure} -setup {
haveCourier12
} -setup {
.t tag delete {*}[.t tag names]
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
.t tag configure big -font $bigFont
event gen .t <ButtonRelease-1> -state 0x100 -x $x1 -y $y1
event gen .t <Motion> -x $x2 -y $y2
set x [.t index current]
.t tag add big 3.0
update
lappend x [.t index current]
} -cleanup {
.t tag delete big
} -result {3.2 3.1}
test textTag-16.3 {TkTextPickCurrent procedure} -constraints {
test textTag-16.3 {TkTextPickCurrent procedure} -setup {
haveCourier12
} -setup {
foreach i {a b c d} {
.t tag remove $i 1.0 end
}
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
foreach i {a b c d} {
.t tag bind $i <Enter> "lappend x enter-$i"
|
︙ | | |
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
|
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
|
-
+
-
-
|
lappend x |
event gen .t <Motion> -x $x3 -y $y3
return $x
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {enter-a enter-b | leave-b enter-c | leave-a leave-c}
test textTag-16.4 {TkTextPickCurrent procedure} -constraints {
test textTag-16.4 {TkTextPickCurrent procedure} -setup {
haveCourier12
} -setup {
foreach i {a b c d} {
.t tag remove $i 1.0 end
}
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
foreach i {a b c d} {
.t tag bind $i <Enter> "lappend x enter-$i"
|
︙ | | |
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
|
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
|
-
+
-
-
-
+
-
-
-
+
-
-
|
.t tag lower c
event gen .t <Motion> -x $x2 -y $y2
return $x
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {enter-a enter-b enter-c | leave-c leave-b}
test textTag-16.5 {TkTextPickCurrent procedure} -constraints {
test textTag-16.5 {TkTextPickCurrent procedure} -setup {
haveCourier12
} -setup {
foreach i {big a b c d} {
.t tag remove $i 1.0 end
}
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
.t tag configure big -font $bigFont
event gen .t <Motion> -x $x1 -y $y1
.t tag bind a <Enter> {.t tag add big 3.0 3.2}
.t tag add a 3.2
event gen .t <Motion> -x $x2 -y $y2
.t index current
} -cleanup {
.t tag delete a big
} -result {3.2}
test textTag-16.6 {TkTextPickCurrent procedure} -constraints {
test textTag-16.6 {TkTextPickCurrent procedure} -setup {
haveCourier12
} -setup {
foreach i {big a b c d} {
.t tag remove $i 1.0 end
}
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
.t tag configure big -font $bigFont
event gen .t <Motion> -x $x1 -y $y1
.t tag bind a <Enter> {.t tag add big 3.0 3.2}
.t tag add a 3.2
event gen .t <Motion> -x $x2 -y $y2
update
.t index current
} -cleanup {
.t tag delete a big
} -result {3.1}
test textTag-16.7 {TkTextPickCurrent procedure} -constraints {
test textTag-16.7 {TkTextPickCurrent procedure} -setup {
haveCourier12
} -setup {
foreach i {big a b c d} {
.t tag remove $i 1.0 end
}
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
.t tag configure big -font $bigFont
.t tag bind a <Enter> {.t tag add big 3.0 3.2}
|
︙ | | |
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
|
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
|
-
+
|
test textTag-18.1 {TkTextPickCurrent tag bindings} -setup {
destroy .t
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
text .t -width 30 -height 4 -relief sunken -borderwidth 10 \
-highlightthickness 10 -pady 2
pack .t
.t insert end " Tag here " TAG " no tag here"
.t tag configure TAG -borderwidth 4 -relief raised
.t tag bind TAG <Enter> {lappend res "%x %y tag-Enter"}
.t tag bind TAG <Leave> {lappend res "%x %y tag-Leave"}
bind .t <Enter> {lappend res Enter}
bind .t <Leave> {lappend res Leave}
|
︙ | | |
Changes to tests/textWind.test.
︙ | | |
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
-
+
|
# 15 on XP, 13 on Solaris 8
set fixedHeight [font metrics {Courier -12} -linespace]
set fixedDiff [expr {$fixedHeight - 13}] ;# 2 on XP
set color [expr {[winfo depth .t] > 1 ? "green" : "black"}]
wm geometry . {}
# The statements below reset the main window; it's needed if the window
# manager is mwm to make mwm forget about a previous minimum size setting.
wm withdraw .
wm minsize . 1 1
wm positionfrom . user
wm deiconify .
|
︙ | | |
Changes to tests/ttk/combobox.test.
︙ | | |
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
-
+
|
} -result 2
test combobox-2.3 "current -- change value" -body {
.cb set "b"
.cb current
} -result 1
test combobox-2.4 "current -- value not in list" -body {
test combobox-2.4 "current -- value not in list" -body {
.cb set "z"
.cb current
} -result -1
test combobox-2.end "Cleanup" -body { destroy .cb }
|
︙ | | |
Changes to tests/ttk/image.test.
︙ | | |
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
-
+
|
pack [set w [ttk::label .ttk_image20 -image test.image]]
tkwait visibility $w
image delete test.image
update
} -cleanup {
destroy .ttk_image20
} -result {}
test image-2.1 "Deletion of displayed image (checkbutton)" -setup {
image create photo test.image -width 10 -height 10
} -body {
pack [set w [ttk::checkbutton .ttk_image21 -image test.image]]
tkwait visibility $w
image delete test.image
update
|
︙ | | |
Changes to tests/ttk/labelframe.test.
︙ | | |
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
-
+
|
# Re-run series labelframe-3.x with nonchild slaves.
#
# @@@ ODDITY, 14 Nov 2005:
# @@@ labelframe-4.1 fails if .cb is a [checkbutton],
# @@@ but seems to succeed if it's some other widget class.
# @@@ I suspect a race condition; unable to track it down ATM.
#
# @@@ FOLLOWUP: This *may* have been caused by a bug in ManagerIdleProc
# @@@ FOLLOWUP: This *may* have been caused by a bug in ManagerIdleProc
# @@@ (see manager.c r1.11). There's still probably a race condition in here.
#
test labelframe-4.1 "Add nonchild slave" -body {
checkbutton .cb -text "abcde"
.lf configure -labelwidget .cb
update
list [winfo ismapped .cb] [winfo viewable .cb] [winfo manager .cb]
|
︙ | | |
Changes to tests/ttk/panedwindow.test.
︙ | | |
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
-
-
+
+
|
test panedwindow-2.end "Cleanup" -body { destroy .pw }
#
# ...
#
test panedwindow-3.0 "configure pane" -body {
ttk::panedwindow .pw
.pw add [listbox .pw.lb1]
.pw add [listbox .pw.lb2]
.pw add [listbox .pw.lb1]
.pw add [listbox .pw.lb2]
.pw pane 1 -weight 2
.pw pane 1 -weight
} -result 2
test panedwindow-3.1 "configure pane -- errors" -body {
.pw pane 1 -weight -4
} -returnCodes 1 -match glob -result "-weight must be nonnegative"
|
︙ | | |
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
|
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
|
-
+
|
wm geometry . {}
ttk::panedwindow .pw -orient vertical
frame .pw.f1 -width 100 -height 50
frame .pw.f2 -width 100 -height 50
list [winfo reqwidth .pw.f1] [winfo reqheight .pw.f1]
} -result [list 100 50]
} -result [list 100 50]
test paned-propagation-1 "Initial request size" -body {
.pw add .pw.f1
.pw add .pw.f2
propagate-geometry
list [winfo reqwidth .pw] [winfo reqheight .pw]
} -result [list 100 105]
|
︙ | | |
Changes to tests/ttk/scrollbar.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
-
-
+
+
-
+
-
+
|
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
testConstraint coreScrollbar [expr {[tk windowingsystem] eq "aqua"}]
test scrollbar-swapout-1 "Use core scrollbars on OSX..." -constraints {
coreScrollbar
} -body {
ttk::scrollbar .sb -command "yadda"
list [winfo class .sb] [.sb cget -command]
} -result [list Scrollbar yadda] -cleanup {
destroy .sb
} -result [list Scrollbar yadda] -cleanup {
destroy .sb
}
test scrollbar-swapout-2 "... unless -style is specified ..." -constraints {
coreScrollbar
} -body {
ttk::style layout Vertical.Custom.TScrollbar \
[ttk::style layout Vertical.TScrollbar] ; # See #1833339
ttk::scrollbar .sb -command "yadda" -style Custom.TScrollbar
ttk::scrollbar .sb -command "yadda" -style Custom.TScrollbar
list [winfo class .sb] [.sb cget -command] [.sb cget -style]
} -result [list TScrollbar yadda Custom.TScrollbar] -cleanup {
destroy .sb
}
test scrollbar-swapout-3 "... or -class." -constraints {
coreScrollbar
} -body {
ttk::scrollbar .sb -command "yadda" -class Custom.TScrollbar
ttk::scrollbar .sb -command "yadda" -class Custom.TScrollbar
list [winfo class .sb] [.sb cget -command]
} -result [list Custom.TScrollbar yadda] -cleanup {
destroy .sb
}
test scrollbar-1.0 "Setup" -body {
ttk::scrollbar .tsb
|
︙ | | |
Changes to tests/ttk/spinbox.test.
︙ | | |
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
|
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
|
-
+
|
} -cleanup {
unset SBV
destroy .sb
} -result [list 55 55]
test spinbox-nostomp-4 "don't stomp on -variable (configure; -values)" -body {
set SBV Apr
ttk::spinbox .sb
ttk::spinbox .sb
.sb configure -textvariable SBV -values {Jan Feb Mar Apr May Jun Jul Aug}
list $SBV [.sb get]
} -cleanup {
unset SBV
destroy .sb
} -result [list Apr Apr]
|
︙ | | |
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
|
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
|
-
+
|
event generate .sb <<Decrement>>; lappend result $secs
event generate .sb <<Decrement>>; lappend result $secs
event generate .sb <<Decrement>>; lappend result $secs
event generate .sb <<Decrement>>; lappend result $secs
set result
} -result [list 07 08 09 10 11 10 09 08 07] -cleanup {
} -result [list 07 08 09 10 11 10 09 08 07] -cleanup {
destroy .sb
unset secs
}
test spinbox-dieoctaldie-2 "Cope with general bad input" -body {
set result [list]
ttk::spinbox .sb -from 0 -to 100 -format %03.0f
|
︙ | | |
Changes to tests/ttk/treetags.test.
︙ | | |
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
-
+
|
} -result [list [list] [list item2] [list]]
test treetags-1.8 "tag names" -body {
lsort [$tv tag names]
} -result [list tag1 tag2 tag3]
test treetags-1.9 "tag names - tag added to item" -body {
$tv item item1 -tags tag4
$tv item item1 -tags tag4
lsort [$tv tag names]
} -result [list tag1 tag2 tag3 tag4]
test treetags-1.10 "tag names - tag configured" -body {
$tv tag configure tag5
lsort [$tv tag names]
} -result [list tag1 tag2 tag3 tag4 tag5]
|
︙ | | |
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
-
+
-
+
|
$tv tag configure tag2 -font {times 20}
}
test treetags-3.4 "stomp tags in tag binding procedure" -body {
set result [list]
$tv tag bind rm1 <<Remove>> { lappend ::result rm1 [%W focus] <<Remove>> }
$tv tag bind rm2 <<Remove>> {
lappend ::result rm2 [%W focus] <<Remove>>
lappend ::result rm2 [%W focus] <<Remove>>
%W item [%W focus] -tags {tag1}
}
$tv tag bind rm3 <<Remove>> { lappend ::result rm3 [%W focus] <<Remove>> }
$tv item item1 -tags {rm1 rm2 rm3}
$tv item item1 -tags {rm1 rm2 rm3}
$tv focus item1
event generate $tv <<Remove>>
set result
} -cleanup {
treeConstraints $tv
} -result [list rm1 item1 <<Remove>> rm2 item1 <<Remove>> rm3 item1 <<Remove>>]
#
test treetags-end "Cleanup" -body { destroy $tv }
tcltest::cleanupTests
|
Changes to tests/ttk/ttk.test.
︙ | | |
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
-
+
|
set x
} -result 1
test ttk-2.8 "bug 3223850: button state disabled during click" -setup {
destroy .b
set ttk28 {}
pack [ttk::button .b -command {set ::ttk28 failed}]
} -body {
} -body {
bind .b <ButtonPress-1> {after 0 {.b configure -state disabled}}
after 1 {event generate .b <ButtonPress-1>}
after 20 {event generate .b <ButtonRelease-1>}
set aid [after 100 {set ::ttk28 [.b instate {disabled !pressed}]}]
vwait ::ttk28
after cancel $aid
set ttk28
|
︙ | | |
Changes to tests/ttk/validate.test.
︙ | | |
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
-
+
|
test validate-1.18 {entry widget validation} -constraints coreEntry -body {
.e configure -validate all
set ::e nextdata
list [.e cget -validate] $::vVals
} -result {none {.e -1 -1 nextdata newdata {} all forced}}
# DIFFERENCE: ttk::entry doesn't validate when setting linked -variable
# DIFFERENCE: ttk::entry doesn't disable validation
# DIFFERENCE: ttk::entry doesn't disable validation
proc doval {W d i P s S v V} {
set ::vVals [list $W $d $i $P $s $S $v $V]
set ::e mydata
return 1
}
|
︙ | | |
Changes to tests/unixButton.test.
︙ | | |
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
-
+
|
eval tcltest::configure $argv
tcltest::loadTestedCommands
namespace import -force tcltest::test
imageInit
# Create entries in the option database to be sure that geometry options
# like border width have predictable values.
option add *Label.borderWidth 2
option add *Label.highlightThickness 0
option add *Label.font {Helvetica -12 bold}
option add *Button.borderWidth 2
option add *Button.highlightThickness 2
option add *Button.font {Helvetica -12 bold}
option add *Checkbutton.borderWidth 2
|
︙ | | |
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
-
+
-
+
|
[winfo reqwidth .b3] [winfo reqheight .b3] \
[winfo reqwidth .b4] [winfo reqheight .b4]
} -cleanup {
deleteWindows
image delete image1
} -result {68 48 74 54 112 52 112 52}
test unixbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
label .b1 -bitmap question -bd 3 -padx 0 -pady 2
button .b2 -bitmap question -bd 3 -padx 0 -pady 2
checkbutton .b3 -bitmap question -bd 3 -padx 1 -pady 1
radiobutton .b4 -bitmap question -bd 3 -padx 2 -pady 0
pack .b1 .b2 .b3 .b4
update
list [winfo reqwidth .b1] [winfo reqheight .b1] \
[winfo reqwidth .b2] [winfo reqheight .b2] \
[winfo reqwidth .b3] [winfo reqheight .b3] \
[winfo reqwidth .b4] [winfo reqheight .b4]
} -cleanup {
deleteWindows
} -result {23 33 29 39 54 37 54 37}
test unixbutton-1.3 {TkpComputeButtonGeometry procedure} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
label .b1 -bitmap question -bd 3 -highlightthickness 4
button .b2 -bitmap question -bd 3 -highlightthickness 0
checkbutton .b3 -bitmap question -bd 3 -highlightthickness 1 \
-indicatoron 0
|
︙ | | |
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
-
+
-
+
-
+
-
+
|
[winfo reqwidth .b2] [winfo reqheight .b2] \
[winfo reqwidth .b3] [winfo reqheight .b3] \
[winfo reqwidth .b4] [winfo reqheight .b4]
} -cleanup {
deleteWindows
} -result {62 30 56 24 58 22 62 22}
test unixbutton-1.9 {TkpComputeButtonGeometry procedure} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
button .b2 -bitmap question -default active
list [winfo reqwidth .b2] [winfo reqheight .b2]
} -cleanup {
deleteWindows
} -result {37 47}
test unixbutton-1.10 {TkpComputeButtonGeometry procedure} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
button .b2 -bitmap question -default normal
list [winfo reqwidth .b2] [winfo reqheight .b2]
} -cleanup {
deleteWindows
} -result {37 47}
test unixbutton-1.11 {TkpComputeButtonGeometry procedure} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
button .b2 -bitmap question -default disabled
list [winfo reqwidth .b2] [winfo reqheight .b2]
} -cleanup {
deleteWindows
} -result {27 37}
test unixbutton-2.1 {disabled coloring check, bug 669595} -constraints {
unix
unix
} -setup {
deleteWindows
catch {unset value}
} -body {
# this was just a visual bug, but at least this shows the visual
set on 1
set off 0
|
︙ | | |
Changes to tests/unixEmbed.test.
1
2
3
4
5
6
7
8
|
1
2
3
4
5
6
7
8
|
-
+
|
# This file is a Tcl script to test out the procedures in the file
# This file is a Tcl script to test out the procedures in the file
# tkUnixEmbed.c. It is organized in the standard fashion for Tcl
# tests.
#
# Copyright (c) 1996-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
|
︙ | | |
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
-
+
-
+
|
proc colorsFree {w {red 31} {green 245} {blue 192}} {
set vals [winfo rgb $w [format #%02x%02x%02x $red $green $blue]]
expr ([lindex $vals 0]/256 == $red) && ([lindex $vals 1]/256 == $green) \
&& ([lindex $vals 2]/256 == $blue)
}
test unixEmbed-1.1 {TkpUseWindow procedure, bad window identifier} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
toplevel .t -use xyz
} -returnCodes error -result {expected integer but got "xyz"}
test unixEmbed-1.2 {TkpUseWindow procedure, bad window identifier} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
toplevel .t -use 47
} -returnCodes error -result {couldn't create child of window "47"}
test unixEmbed-1.3 {TkpUseWindow procedure, inheriting colormap} -constraints {
unix nonPortable
|
︙ | | |
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
-
+
-
+
-
+
-
+
-
+
|
wm withdraw .t1
}
list $x [testembed]
} -cleanup {
deleteWindows
} -result {{{XXX .f1 {} {}}} {{XXX .f1 XXX {}}}}
test unixEmbed-3.2 {ContainerEventProc procedure, set size on creation} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
toplevel .t1 -container 1
wm geometry .t1 +0+0
toplevel .t2 -use [winfo id .t1] -bg red
update
wm geometry .t2
} -cleanup {
deleteWindows
} -result {200x200+0+0}
test unixEmbed-3.3 {ContainerEventProc procedure, disallow position changes} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
eval destroy [winfo child .]
toplevel .t1 -use $w1 -bd 2 -relief raised
update
wm geometry .t1 +30+40
}
update
dobg {
wm geometry .t1
}
} -cleanup {
deleteWindows
} -result {200x200+0+0}
test unixEmbed-3.4 {ContainerEventProc procedure, disallow position changes} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
eval destroy [winfo child .]
toplevel .t1 -use $w1
update
wm geometry .t1 300x100+30+40
}
update
dobg {
wm geometry .t1
}
} -cleanup {
deleteWindows
} -result {300x100+0+0}
test unixEmbed-3.5 {ContainerEventProc procedure, geometry requests} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
eval destroy [winfo child .]
toplevel .t1 -use $w1
}
update
dobg {
.t1 configure -width 300 -height 80
}
update
list [winfo width .f1] [winfo height .f1] [dobg {wm geometry .t1}]
} -cleanup {
deleteWindows
} -result {300 80 300x80+0+0}
test unixEmbed-3.6 {ContainerEventProc procedure, map requests} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
|
︙ | | |
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
|
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
|
-
+
|
update
set x
}
} -cleanup {
deleteWindows
} -result {mapped}
test unixEmbed-3.7 {ContainerEventProc procedure, destroy events} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
bind .f1 <Destroy> {set x dead}
|
︙ | | |
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
-
+
|
list $x [winfo exists .f1]
} -cleanup {
deleteWindows
} -result {dead 0}
test unixEmbed-4.1 {EmbedStructureProc procedure, configure events} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
|
︙ | | |
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
|
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
|
-
+
-
+
|
list $x [testembed]
} -cleanup {
deleteWindows
} -result {{{XXX .f1 XXX {}}} {}}
test unixEmbed-5.1 {EmbedFocusProc procedure, FocusIn events} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
eval destroy [winfo child .]
toplevel .t1 -use $w1
bind .t1 <FocusIn> {lappend x "focus in %W"}
bind .t1 <FocusOut> {lappend x "focus out %W"}
set x {}
}
focus -force .f1
update
dobg {set x}
} -cleanup {
deleteWindows
} -result {{focus in .t1}}
test unixEmbed-5.2 {EmbedFocusProc procedure, focusing on dead window} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
|
︙ | | |
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
|
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
|
-
+
|
after 400
focus -force .f1
update
} -cleanup {
deleteWindows
} -result {}
test unixEmbed-5.3 {EmbedFocusProc procedure, FocusOut events} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
|
︙ | | |
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
|
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
|
-
+
|
list $x [dobg {update; set x}]
} -cleanup {
deleteWindows
} -result {{{focus in .t1}} {{focus in .t1} {focus out .t1}}}
test unixEmbed-6.1 {EmbedGeometryRequest procedure, window changes size} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
|
︙ | | |
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
|
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
|
-
+
|
update
list $x [winfo geom .t1]
}
} -cleanup {
deleteWindows
} -result {{{configure .t1 300 120}} 300x120+0+0}
test unixEmbed-6.2 {EmbedGeometryRequest procedure, window changes size} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
place .f1 -width 200 -height 200
dobg "set w1 [winfo id .f1]"
dobg {
|
︙ | | |
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
|
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
|
-
+
|
deleteWindows
} -result {{{configure .t1 200 200}} 200x200+0+0}
# Can't think up any tests for TkpGetOtherWindow procedure.
test unixEmbed-7.1 {TkpRedirectKeyEvent procedure, forward keystroke} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
deleteWindows
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
|
︙ | | |
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
|
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
|
-
+
|
update
list $x $y
} -cleanup {
deleteWindows
bind . <KeyPress> {}
} -result {{{key a 1}} {}}
test unixEmbed-7.2 {TkpRedirectKeyEvent procedure, don't forward keystroke width} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
|
︙ | | |
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
|
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
|
-
+
-
+
|
}
} -cleanup {
deleteWindows
} -result {{{XXX {} {} .t1}} {}}
test unixEmbed-10.1 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
toplevel .t1 -use [winfo id .f1] -width 150 -height 80
update
wm geometry .t1 +40+50
update
wm geometry .t1
} -cleanup {
deleteWindows
} -result {150x80+0+0}
test unixEmbed-10.2 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -constraints {
unix
unix
} -setup {
deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
toplevel .t1 -use [winfo id .f1] -width 150 -height 80
update
|
︙ | | |
Changes to tests/unixFont.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
-
+
-
+
|
# This file is a Tcl script to test out the procedures in tkUnixFont.c.
# This file is a Tcl script to test out the procedures in tkUnixFont.c.
# It is organized in the standard fashion for Tcl tests.
#
# Many of these tests are visually oriented and cannot be checked
# programmatically (such as "does an underlined font appear to be
# underlined?"); these tests attempt to exercise the code in question,
# but there are no results that can be checked. Some tests depend on the
# fonts having or not having certain properties, which may not be valid
# at all sites.
# at all sites.
#
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
package require tcltest 2.1
eval tcltest::configure $argv
|
︙ | | |
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
-
+
|
test unixfont-2.11 {TkpGetFontFromAttributes: font cannot be loaded} unix {
# On Linux, XListFonts() was returning names for fonts that do not
# actually exist, causing the subsequent XLoadQueryFont() to fail
# unexpectedly. Now falls back to another font if that happens.
font actual {-size 14}
set x {}
} {}
} {}
test unixfont-3.1 {TkpDeleteFont procedure} unix {
font actual {-family xyz}
set x {}
} {}
test unixfont-4.1 {TkpGetFontFamilies procedure} unix {
|
︙ | | |
Changes to tests/unixMenu.test.
︙ | | |
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-
+
-
+
|
test unixMenu-2.1 {TkpDestroyMenu - nothing to do} -constraints unix -body {}
test unixMenu-3.1 {TkpDestroymenuEntry - nothing to do} -constraints unix -body {}
test unixMenu-4.1 {TkpConfigureMenuEntry - non-cascade entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add command -label test
list [.m1 entryconfigure test -label foo] [destroy .m1]
} -returnCodes ok -result {{} {}}
test unixMenu-4.2 {TkpConfigureMenuEntry - cascade entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add cascade -menu .m2 -label test
menu .m1.foo -tearoff 0
list [.m1 entryconfigure test -menu .m1.foo] [destroy .m1]
|
︙ | | |
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
-
+
-
+
|
} -returnCodes ok -result {{} {} {}}
test unixMenu-7.1 {TkpSetMainMenubar - nothing to do} -constraints unix -body {}
test unixMenu-8.1 {GetMenuIndicatorGeometry - indicator off} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add checkbutton -label foo -indicatoron 0
tk::TearOffMenu .m1 40 40
destroy .m1
} -returnCodes ok
test unixMenu-8.2 {GetMenuIndicatorGeometry - not checkbutton or radio} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo
tk::TearOffMenu .m1 40 40
destroy .m1
|
︙ | | |
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
-
+
-
+
-
+
|
image create test image1
.m1 add checkbutton -image image1 -label foo
.m1 invoke foo
tk::TearOffMenu .m1 40 40
destroy .m1
} -cleanup {
image delete image1
} -returnCodes ok
} -returnCodes ok
test unixMenu-8.4 {GetMenuIndicatorGeometry - checkbutton bitmap} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add checkbutton -bitmap questhead -label foo
.m1 invoke foo
tk::TearOffMenu .m1 40 40
destroy .m1
} -returnCodes ok
test unixMenu-8.5 {GetMenuIndicatorGeometry - checkbutton} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add checkbutton -label foo
.m1 invoke foo
tk::TearOffMenu .m1 40 40
|
︙ | | |
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
|
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
.m1 add radiobutton -image image1 -label foo
.m1 invoke foo
tk::TearOffMenu .m1 40 40
destroy .m1
image delete image1
} -returnCodes ok
test unixMenu-8.7 {GetMenuIndicatorGeometry - radiobutton bitmap} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add radiobutton -bitmap questhead -label foo
.m1 invoke foo
tk::TearOffMenu .m1 40 40
destroy .m1
} -returnCodes ok
} -returnCodes ok
test unixMenu-8.8 {GetMenuIndicatorGeometry - radiobutton} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add radiobutton -label foo
.m1 invoke foo
tk::TearOffMenu .m1 40 40
destroy .m1
} -returnCodes ok
test unixMenu-8.9 {GetMenuIndicatorGeometry - hideMargin} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add radiobutton -label foo -hidemargin 1
.m1 invoke foo
tk::TearOffMenu .m1 40 40
destroy .m1
} -returnCodes ok
} -returnCodes ok
test unixMenu-9.1 {GetMenuAccelGeometry - cascade entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add cascade -label foo
tk::TearOffMenu .m1 40 40
destroy .m1
} -returnCodes ok
test unixMenu-9.2 {GetMenuAccelGeometry - non-null label} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo -accel "Ctrl+S"
tk::TearOffMenu .m1 40 40
destroy .m1
} -returnCodes ok
test unixMenu-9.3 {GetMenuAccelGeometry - null label} -constraints unix -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo
tk::TearOffMenu .m1 40 40
destroy .m1
} -returnCodes ok
test unixMenu-10.1 {DrawMenuEntryBackground - active menubar} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add cascade -label foo
. configure -menu .m1
.m1 activate 1
list [update] [. configure -menu ""] [destroy .m1]
} -returnCodes ok -result {{} {} {}}
test unixMenu-10.2 {DrawMenuEntryBackground - active} -constraints unix -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
$tearoff activate 0
list [update] [destroy .m1]
} -returnCodes ok -result {{} {}}
test unixMenu-10.3 {DrawMenuEntryBackground - non-active} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -returnCodes ok -result {{} {}}
test unixMenu-11.1 {DrawMenuEntryAccelerator - menubar} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo -accel "Ctrl+U"
. configure -menu .m1
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
# drawArrow parameter is never false under Unix
test unixMenu-11.2 {DrawMenuEntryAccelerator - cascade entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add cascade -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-11.3 {DrawMenuEntryAccelerator - normal entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo -accel "Ctrl+U"
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-11.4 {DrawMenuEntryAccelerator - null entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.1 {DrawMenuEntryIndicator - non-check or radio} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.2 {DrawMenuEntryIndicator - checkbutton - indicator off} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add checkbutton -label foo -indicatoron 0
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.3 {DrawMenuEntryIndicator - checkbutton - not selected} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add checkbutton -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.4 {DrawMenuEntryIndicator - checkbutton - selected} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add checkbutton -label foo
.m1 invoke 1
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.5 {DrawMenuEntryIndicator - radiobutton - indicator off} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add radiobutton -label foo -indicatoron 0
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.6 {DrawMenuEntryIndicator - radiobutton - not selected} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add radiobutton -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.7 {DrawMenuEntryIndicator - radiobutton - selected} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add radiobutton -label foo
.m1 invoke 1
set tearoff [tk::TearOffMenu .m1 40 40]
|
︙ | | |
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
|
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
list [tk::MbPost .mb] [tk::MenuUnpost .mb.m] [destroy .mb]
} -result {{} {} {}}
# Don't know how to reproduce the case where the tkwin has been deleted.
test unixMenu-19.1 {TkpComputeMenubarGeometry - zero entries} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
. configure -menu .m1
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
# Don't know how to generate one width windows
test unixMenu-19.2 {TkpComputeMenubarGeometry - one entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add cascade -label File
. configure -menu .m1
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.3 {TkpComputeMenubarGeometry - entry with different font} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -font "Courier 24"
.m1 add cascade -label File -font "Helvetica 18"
. configure -menu .m1
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.4 {TkpComputeMenubarGeometry - separator} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add separator
. configure -menu .m1
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.5 {TkpComputeMenubarGeometry - First entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add cascade -label File
. configure -menu .m1
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.6 {TkpComputeMenubarGeometry - First entry too wide} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add cascade -label File -font "Times 72"
. configure -menu .m1
wm geometry . 10x10
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.7 {TkpComputeMenubarGeometry - two entries fit} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add cascade -label File
.m1 add cascade -label Edit
. configure -menu .m1
wm geometry . 200x200
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.8 {TkpComputeMenubarGeometry - two entries; 2nd don't fit} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add cascade -label File
.m1 add cascade -label Edit -font "Times 72"
. configure -menu .m1
wm geometry . 100x100
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.9 {TkpComputeMenubarGeometry - two entries; 1st dont fit} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add cascade -label File -font "Times 72"
.m1 add cascade -label Edit
. configure -menu .m1
wm geometry . 100x100
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.10 {TkpComputeMenubarGeometry - two entries; neither fit} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0 -font "Times 72"
.m1 add cascade -label File
.m1 add cascade -label Edit
. configure -menu .m1
|
︙ | | |
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
|
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
|
-
+
-
+
-
+
-
+
-
+
-
+
|
.m1 add cascade -label "B"
.m1 add cascade -label "C"
. configure -menu .m1
wm geometry . 100x10
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.19 {TkpComputeMenubarGeometry - help menu in first position} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add cascade -label Help -menu .m1.help
menu .m1.help -tearoff 0
.m1 add cascade -label File -menu .m1.file
menu .m1.file -tearoff 0
.m1 add cascade -label Edit -menu .m1.edit
menu .m1.edit -tearoff 0
. configure -menu .m1
wm geometry . 100x10
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.20 {TkpComputeMenubarGeometry - help menu in middle} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add cascade -label Edit -menu .m1.edit
menu .m1.edit -tearoff 0
.m1 add cascade -label Help -menu .m1.help
menu .m1.help -tearoff 0
.m1 add cascade -label File -menu .m1.file
menu .m1.file -tearoff 0
. configure -menu .m1
wm geometry . 100x10
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.21 {TkpComputeMenubarGeometry - help menu in first position} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add cascade -label File -menu .m1.file
menu .m1.file -tearoff 0
.m1 add cascade -label Edit -menu .m1.edit
menu .m1.edit -tearoff 0
.m1 add cascade -label Help -menu .m1.help
menu .m1.help -tearoff 0
. configure -menu .m1
wm geometry . 100x10
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.22 {TkpComputeMenubarGeometry - help item fits} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add cascade -label File -menu .m1.file
menu .m1.file -tearoff 0
.m1 add cascade -label Help -menu .m1.help
menu .m1.help -tearoff 0
. configure -menu .m1
wm geometry . 100x10
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.23 {TkpComputeMenubarGeometry - help item does not fit} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add cascade -label File -menu .m1.file
menu .m1.file -tearoff 0
.m1 add cascade -label Help -menu .m1.help -font "Helvetica 72"
menu .m1.help -tearoff 0
. configure -menu .m1
wm geometry . 100x10
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.24 {TkpComputeMenubarGeometry - help item only one} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add cascade -label Help -menu .m1.help
menu .m1.help -tearoff 0
. configure -menu .m1
|
︙ | | |
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
|
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
} -body {
menu .m1 -tearoff 0
.m1 add cascade -label test -menu .m1.test
list [menu .m1.test] [destroy .m1]
} -result {.m1.test {}}
# Don't know how to automate missing tkwins
test unixMenu-22.2 {SetHelpMenu - menubar but no help menu} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
. configure -menu .m1
.m1 add cascade -label .m1.file
list [menu .m1.file] [. configure -menu ""] [destroy .m1]
} -result {.m1.file {} {}}
test unixMenu-22.3 {SetHelpMenu - menubar with help menu} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
. configure -menu .m1
.m1 add cascade -label .m1.help
list [menu .m1.help] [. configure -menu ""] [destroy .m1]
} -result {.m1.help {} {}}
test unixMenu-22.4 {SetHelpMenu - multiple menubars with same help menu} -constraints {
unix
unix
} -setup {
destroy .m1 .t2
} -body {
toplevel .t2
wm geometry .t2 +40+40
menu .m1 -tearoff 0
. configure -menu .m1
.t2 configure -menu .m1
.m1 add cascade -label .m1.help
list [menu .m1.help] [. configure -menu ""] [destroy .m1] [destroy .t2]
} -result {.m1.help {} {} {}}
test unixMenu-23.1 {TkpDrawMenuEntry - gc for active and not strict motif} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
.m1 entryconfigure 1 -state active
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.2 {TkpDrawMenuEntry - gc for active menu item with its own gc} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo -activeforeground red
set tearoff [tk::TearOffMenu .m1 40 40]
.m1 entryconfigure 1 -state active
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.3 {TkpDrawMenuEntry - gc for active and strict motif} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
set tk_strictMotif 1
.m1 add command -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
.m1 entryconfigure 1 -state active
list [update] [destroy .m1] [set tk_strictMotif 0]
} -result {{} {} 0}
test unixMenu-23.4 {TkpDrawMenuEntry - gc for disabled with disabledfg and custom entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -disabledforeground blue
.m1 add command -label foo -state disabled -background red
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.5 {TkpDrawMenuEntry - gc for disabled with disabledFg} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -disabledforeground blue
.m1 add command -label foo -state disabled
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.6 {TkpDrawMenuEntry - gc for disabled - no disabledFg} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -disabledforeground ""
.m1 add command -label foo -state disabled
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.7 {TkpDrawMenuEntry - gc for normal - custom entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo -foreground red
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.8 {TkpDrawMenuEntry - gc for normal} -constraints unix -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.9 {TkpDrawMenuEntry - gc for indicator - custom entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add checkbutton -label foo -selectcolor orange
.m1 invoke 1
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.10 {TkpDrawMenuEntry - gc for indicator} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add checkbutton -label foo
.m1 invoke 1
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.11 {TkpDrawMenuEntry - border - custom entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo -activebackground green
set tearoff [tk::TearOffMenu .m1 40 40]
.m1 entryconfigure 1 -state active
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.12 {TkpDrawMenuEntry - border} -constraints unix -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
.m1 entryconfigure 1 -state active
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.13 {TkpDrawMenuEntry - active border - strict motif} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
set tk_strictMotif 1
menu .m1
.m1 add command -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
.m1 entryconfigure 1 -state active
list [update] [destroy .m1] [set tk_strictMotif 0]
} -result {{} {} 0}
test unixMenu-23.14 {TkpDrawMenuEntry - active border - custom entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo -activeforeground yellow
set tearoff [tk::TearOffMenu .m1 40 40]
.m1 entryconfigure 1 -state active
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.15 {TkpDrawMenuEntry - active border} -constraints unix -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
.m1 entryconfigure 1 -state active
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.16 {TkpDrawMenuEntry - font - custom entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo -font "Helvectica 72"
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
|
︙ | | |
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
|
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
|
-
+
|
} -body {
menu .m1
.m1 add command -label foo
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.20 {TkpDrawMenuEntry - disabled cascade item} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add cascade -label File -menu .m1.file
menu .m1.file
.m1.file add command -label foo
|
︙ | | |
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
|
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
menu .m1
.m1 add command -label "This is a test."
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.1 {TkpComputeStandardMenuGeometry - no entries} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.2 {TkpComputeStandardMenuGeometry - one entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label "one"
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.3 {TkpComputeStandardMenuGeometry - more than one entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label "one"
.m1 add command -label "two"
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.4 {TkpComputeStandardMenuGeometry - separator} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add separator
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.5 {TkpComputeStandardMenuGeometry - tearoff entry} -constraints {
unix nonUnixUserInteraction
} -setup {
destroy .mb
} -body {
menubutton .mb -text "test" -menu .mb.m
menu .mb.m
.mb.m add command -label test
pack .mb
catch {tk::MbPost .mb}
list [update] [tk::MenuUnpost .mb.m] [destroy .mb]
} -result {{} {} {}}
test unixMenu-25.6 {TkpComputeStandardMenuGeometry - standard label geometry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label "test"
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.7 {TkpComputeStandardMenuGeometry - different font for entry} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -font "Helvetica 12"
.m1 add command -label "test" -font "Courier 12"
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.8 {TkpComputeStandardMenuGeometry - second entry larger} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label "test"
.m1 add command -label "test test"
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.9 {TkpComputeStandardMenuGeometry - first entry larger} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label "test test"
.m1 add command -label "test"
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.10 {TkpComputeStandardMenuGeometry - accelerator} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label "test" -accel "Ctrl+S"
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.11 {TkpComputeStandardMenuGeometry - second accel larger} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label "test" -accel "1"
.m1 add command -label "test" -accel "1 1"
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.12 {TkpComputeStandardMenuGeometry - second accel smaller} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label "test" -accel "1 1"
.m1 add command -label "test" -accel "1"
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.13 {TkpComputeStandardMenuGeometry - indicator} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add checkbutton -label test
.m1 invoke 1
list [update idletasks] [destroy .m1]
|
︙ | | |
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
|
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
|
-
+
-
+
-
+
-
+
-
+
-
+
|
.m1 add checkbutton -image image1
.m1 invoke 1
.m1 add checkbutton -label test
.m1 invoke 2
list [update idletasks] [destroy .m1] [image delete image1]
} -result {{} {} {}}
test unixMenu-25.16 {TkpComputeStandardMenuGeometry - zero sized menus} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.17 {TkpComputeStandardMenuGeometry - first column bigger} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label one
.m1 add command -label two
.m1 add command -label three -columnbreak 1
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.18 {TkpComputeStandardMenuGeometry - second column bigger} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add command -label one
.m1 add command -label two -columnbreak 1
.m1 add command -label three
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.19 {TkpComputeStandardMenuGeometry - three columns} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add command -label one
.m1 add command -label two -columnbreak 1
.m1 add command -label three
.m1 add command -label four
.m1 add command -label five -columnbreak 1
.m1 add command -label six
list [update idletasks] [destroy .m1]
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.20 {TkpComputeStandardMenuGeometry - hide margin} -constraints {
unix
unix
} -setup {
destroy .m1
} -body {
menu .m1 -tearoff 0
.m1 add checkbutton -label one -hidemargin 1
list [update idletasks] [destroy .m1]
} -result {{} {}}
|
︙ | | |
Changes to tests/unixWm.test.
︙ | | |
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
|
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
|
-
+
|
test unixWm-17.1 {Tk_WmCmd procedure, "focusmodel" option} unix {
list [catch {wm focusmodel .t 12 13} msg] $msg
} {1 {wrong # args: should be "wm focusmodel window ?active|passive?"}}
test unixWm-17.2 {Tk_WmCmd procedure, "focusmodel" option} unix {
list [catch {wm focusmodel .t bogus} msg] $msg
} {1 {bad argument "bogus": must be active or passive}}
test unixWm-17.3 {Tk_WmCmd procedure, "focusmodel" option} unix {
set result {}
set result {}
lappend result [wm focusmodel .t]
wm focusmodel .t active
lappend result [wm focusmodel .t]
wm focusmodel .t passive
lappend result [wm focusmodel .t]
set result
} {passive active passive}
|
︙ | | |
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
|
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
|
-
+
-
+
|
destroy .t .icon
test unixWm-40.1 {Tk_SetGrid procedure, set grid dimensions before turning on grid} {unix nonPortable} {
destroy .t
toplevel .t
wm geometry .t 30x10+0+0
listbox .t.l -height 20 -width 20 -setgrid 1
listbox .t.l -height 20 -width 20 -setgrid 1
pack .t.l -fill both -expand 1
update
wm geometry .t
} {30x10+0+0}
test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already set} unix {
destroy .t
toplevel .t
wm geometry .t 200x100+0+0
listbox .t.l -height 20 -width 20
listbox .t.l -height 20 -width 20
pack .t.l -fill both -expand 1
update
.t.l configure -setgrid 1
update
wm geometry .t
} {20x20+0+0}
|
︙ | | |
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
|
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
|
-
+
|
frame .t.m.f -width 20 -height 10 -bd 2 -relief raised
place .t.m.f -x 50 -y 5
frame .t.f -width 20 -height 30 -bd 2 -relief raised
place .t.f -x 10 -y 30
testmenubar window .t .t.m
update
list [expr [winfo rootx .t.m.f] - $x] [expr [winfo rooty .t.m.f] - $y] \
[expr [winfo rootx .t.f] - $x] [expr [winfo rooty .t.f] - $y]
[expr [winfo rootx .t.f] - $x] [expr [winfo rooty .t.f] - $y]
} {52 7 12 62}
deleteWindows
wm iconify .
test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords} unix {
deleteWindows
toplevel .t -width 300 -height 400 -bg green
|
︙ | | |
Changes to tests/visual_bb.test.
︙ | | |
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
-
+
-
+
-
+
-
+
-
+
-
+
|
# menu bar and a message explaining the basic operation
# of the program.
#-------------------------------------------------------
frame .menu -relief raised -borderwidth 1
message .msg -font {Times 18} -relief raised -width 4i \
-borderwidth 1 -text "This application provides a collection of visual tests for the Tk toolkit. Each menu entry invokes a test, which displays information on the screen. You can then verify visually that the information is being displayed in the correct way. The tests under the \"Postscript\" menu exercise the Postscript-generation capabilities of canvas widgets."
pack .menu -side top -fill x
pack .msg -side bottom -expand yes -fill both
#-------------------------------------------------------
# The code below creates all the menus, which invoke procedures
# to create particular demonstrations of various widgets.
#-------------------------------------------------------
menubutton .menu.file -text "File" -menu .menu.file.m
menu .menu.file.m
.menu.file.m add command -label "Quit" -command end
menubutton .menu.group1 -text "Group 1" -menu .menu.group1.m
menu .menu.group1.m
.menu.group1.m add command -label "Canvas arcs" -command {runTest arc.tcl}
.menu.group1.m add command -label "Beveled borders in text widgets" \
-command {runTest bevel.tcl}
.menu.group1.m add command -label "Colormap management" \
-command {runTest cmap.tcl}
.menu.group1.m add command -label "Label/button geometry" \
-command {runTest butGeom.tcl}
.menu.group1.m add command -label "Label/button colors" \
-command {runTest butGeom2.tcl}
menubutton .menu.ps -text "Canvas Postscript" -menu .menu.ps.m
menu .menu.ps.m
.menu.ps.m add command -label "Rectangles and other graphics" \
-command {runTest canvPsGrph.tcl}
.menu.ps.m add command -label "Text" \
-command {runTest canvPsText.tcl}
.menu.ps.m add command -label "Bitmaps" \
-command {runTest canvPsBmap.tcl}
.menu.ps.m add command -label "Images" \
-command {runTest canvPsImg.tcl}
.menu.ps.m add command -label "Arcs" \
-command {runTest canvPsArc.tcl}
pack .menu.file .menu.group1 .menu.ps -side left -padx 1m
# Set up for keyboard-based menu traversal
bind . <Any-FocusIn> {
if {("%d" == "NotifyVirtual") && ("%m" == "NotifyNormal")} {
focus .menu
}
}
tk_menuBar .menu .menu.file .menu.group1 .menu.ps
|
︙ | | |
Changes to tests/winDialog.test.
︙ | | |
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
-
+
|
test winDialog-5.5 {GetFileName: Tcl_GetIndexFromObj() == TCL_OK} -constraints {
nt testwinevent
} -body {
start {set x [tk_getOpenFile -title bar]}
set y [then {
Click cancel
}]
# Note this also tests fix for
# Note this also tests fix for
# http://core.tcl.tk/tk/tktview/4a0451f5291b3c9168cc560747dae9264e1d2ef6
# $x is expected to be empty
append x $y
} -result {0}
test winDialog-5.6 {GetFileName: valid option, but missing value} -constraints {
nt
} -body {
|
︙ | | |
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
|
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
|
-
+
|
} -cleanup {
unset msg
} -result bar.foo
test winDialog-5.9 {GetFileName: file types} -constraints {
nt testwinevent
} -body {
# case FILE_TYPES:
start {tk_getSaveFile -filetypes {{"foo files" .foo FOOF}} -title Foo}
# XXX - currently disabled for vista style dialogs because the file
# types control has no control ID and we don't have a mechanism to
# locate it.
if {[vista?]} {
then {
Click cancel
|
︙ | | |
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
|
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
|
-
+
|
}
return $x
} -result [file normalize [file join ~ "5 12 1"]]
test winDialog-5.12.2 {tk_getSaveFile: initial directory: ~user} -constraints {
nt testwinevent
} -body {
# Note: this test will fail on Tcl versions 8.6.4 and earlier due
# to a bug in file normalize for names of the form ~xxx that
# returns the wrong dir on Windows. In particular (in Win8 at
# least) it returned /users/Default instead of /users/USERNAME...
unset -nocomplain x
start {set x [tk_getSaveFile \
|
︙ | | |
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
|
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
|
-
+
|
}
return $x
} -result {1}
test winDialog-5.17 {GetFileName: title} -constraints {
nt testwinevent
} -body {
# case FILE_TITLE:
start {tk_getOpenFile -title Narf}
then {
Click cancel
}
} -result {0}
if {[vista?]} {
# In the newer file dialogs, the file type widget does not even exist
|
︙ | | |
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
|
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
|
-
+
|
destroy .t
}
} -result {}
test winDialog-5.21 {GetFileName: call GetOpenFileName} -constraints {
nt testwinevent english
} -body {
# winCode = GetOpenFileName(&ofn);
start {tk_getOpenFile -title Open}
then {
set x [GetText ok]
Click cancel
}
return $x
} -result {&Open}
|
︙ | | |
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
|
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
|
-
+
|
string tolower [set x]
} -result [string tolower [initialdir]]
test winDialog-9.8 {Tk_ChooseDirectoryObjCmd: initial directory: Tcl_TranslateFilename()} -constraints {
nt
} -body {
# if (Tcl_TranslateFileName(interp, string,
# &utfDirString) == NULL)
tk_chooseDirectory -initialdir ~12x/455
} -returnCodes error -result {user "12x" doesn't exist}
test winDialog-10.1 {Tk_FontchooserObjCmd: no arguments} -constraints {
nt testwinevent
} -body {
|
︙ | | |
Changes to tests/winFont.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-
+
|
# This file is a Tcl script to test out the procedures in tkWinFont.c.
# It is organized in the standard fashion for Tcl tests.
#
# Many of these tests are visually oriented and cannot be checked
# programmatically (such as "does an underlined font appear to be
# underlined?"); these tests attempt to exercise the code in question,
# but there are no results that can be checked.
# but there are no results that can be checked.
#
# Copyright (c) 1996-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
namespace import ::tcltest::*
|
︙ | | |
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
-
+
-
+
-
+
-
+
|
} -body {
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font systemfixed
pack .t.l
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
.t.l config -wrap 0 -text "000000"
list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \
[expr {[winfo reqheight .t.l] eq $ay}]
} -cleanup {
destroy .t.l
} -result {1 1}
test winfont-5.2 {Tk_MeasureChars procedure: static width buffer exceeded} -constraints {
win
} -setup {
destroy .t.l
} -body {
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font systemfixed
pack .t.l
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
.t.l config -wrap 100000 -text "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
list [expr {[winfo reqwidth .t.l] eq 256*$ax}] \
[expr {[winfo reqheight .t.l] eq $ay}]
} -cleanup {
destroy .t.l
} -result {1 1}
test winfont-5.3 {Tk_MeasureChars procedure: all chars did fit} -constraints {
win
} -setup {
destroy .t.l
} -body {
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font systemfixed
pack .t.l
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
.t.l config -wrap [expr $ax*10] -text "00000000"
list [expr {[winfo reqwidth .t.l] eq 8*$ax}] \
[expr {[winfo reqheight .t.l] eq $ay}]
} -cleanup {
destroy .t.l
} -result {1 1}
test winfont-5.4 {Tk_MeasureChars procedure: not all chars fit} -constraints {
win
} -setup {
destroy .t.l
} -body {
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font systemfixed
pack .t.l
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
.t.l config -wrap [expr $ax*6] -text "00000000"
list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \
[expr {[winfo reqheight .t.l] eq 2*$ay}]
} -cleanup {
destroy .t.l
} -result {1 1}
|
︙ | | |
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
|
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
|
-
+
-
+
-
+
-
+
-
+
-
+
|
} -body {
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font systemfixed
pack .t.l
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
.t.l config -text "000000" -wrap 1
list [expr {[winfo reqwidth .t.l] eq $ax}] \
[expr {[winfo reqheight .t.l] eq 6*$ay}]
} -cleanup {
destroy .t.l
} -result {1 1}
test winfont-5.7 {Tk_MeasureChars procedure: whole words} -constraints {
win
} -setup {
destroy .t.l
} -body {
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font systemfixed
pack .t.l
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
.t.l config -wrap [expr $ax*8] -text "000000 0000"
list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \
[expr {[winfo reqheight .t.l] eq 2*$ay}]
} -cleanup {
destroy .t.l
} -result {1 1}
test winfont-5.8 {Tk_MeasureChars procedure: already saw space in line} -constraints {
win
} -setup {
destroy .t.l
} -body {
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font systemfixed
pack .t.l
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
.t.l config -wrap [expr $ax*12] -text "000000 0000000"
list [expr {[winfo reqwidth .t.l] eq 7*$ax}] \
[expr {[winfo reqheight .t.l] eq 2*$ay}]
} -cleanup {
destroy .t.l
} -result {1 1}
test winfont-5.9 {Tk_MeasureChars procedure: internal spaces significant} -constraints {
win
} -setup {
destroy .t.l
} -body {
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font systemfixed
pack .t.l
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
.t.l config -wrap [expr $ax*12] -text "000 00 00000"
list [expr {[winfo reqwidth .t.l] eq 7*$ax}] \
[expr {[winfo reqheight .t.l] eq 2*$ay}]
} -cleanup {
destroy .t.l
} -result {1 1}
test winfont-5.10 {Tk_MeasureChars procedure: make first part of word fit} -constraints {
win
} -setup {
destroy .t.l
} -body {
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font systemfixed
pack .t.l
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
.t.l config -wrap [expr $ax*12] -text "0000000000000000"
list [expr {[winfo reqwidth .t.l] eq 12*$ax}] \
[expr {[winfo reqheight .t.l] eq 2*$ay}]
} -cleanup {
destroy .t.l
} -result {1 1}
test winfont-5.11 {Tk_MeasureChars procedure: check for kerning} -constraints {
win nonPortable
} -setup {
destroy .t.l
} -body {
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font systemfixed
pack .t.l
update
set font [.t.l cget -font]
.t.l config -font {{MS Sans Serif} 8} -text "W"
set width [winfo reqwidth .t.l]
.t.l config -text "XaYoYaKaWx"
set x [lindex [getsize] 0]
.t.l config -font $font
expr $x < ($width*10)
|
︙ | | |
Changes to tests/winMenu.test.
︙ | | |
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
|
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
|
-
+
|
.m1 add command -command {error 1} -label "winMenu-11.2: Please select this menu item."
list [.m1 post 40 40] [update] [set foo] [unset foo] [destroy .m1]
} -result {{} {} {1 {1
while executing
"error 1"
(menu invoke)}} {} {}}
# Can't test WM_MENUCHAR
test winMenu-11.4 {TkWinHandleMenuEvent - WM_MEASUREITEM} -constraints {
win userInteraction
} -setup {
destroy .m1
} -body {
|
︙ | | |
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
|
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
|
-
+
|
test winMenu-22.1 {DrawMenuUnderline} -constraints win -setup {
destroy .m1
} -body {
menu .m1
.m1 add command -label foo -underline 0
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} -result {{} {}}
} -result {{} {}}
test winMenu-23.1 {Don't know how to test MenuKeyBindProc} -constraints {
win emptyTest
} -body {}
|
︙ | | |
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
|
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
|
-
+
|
menu .m1 -tearoff 0
.m1 add command -label one
.m1 add command -label two -columnbreak 1
.m1 add command -label three
.m1 add command -label four
.m1 add command -label five -columnbreak 1
.m1 add command -label six
list [update idletasks] [destroy .m1]
list [update idletasks] [destroy .m1]
} -result {{} {}}
test winMenu-33.1 {TkpNotifyTopLevelCreate - no menu yet} -constraints {
win
} -setup {
destroy .m1 .t2
|
︙ | | |
Changes to tests/winWm.test.
︙ | | |
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
|
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
|
-
+
-
+
|
toplevel $w
pack [button $w.b -text "Do dialog" -command [list winwm90proc2 $w]]
bind $w.b <Map> {bind %W <Map> {}; after idle {winwm90click %W}}
}
global winwm90done
set winwm90done wait
toplevel .t
} -body {
} -body {
pack [button .t.b -text "Show" -command {winwm90proc1 .tx}]
bind .t.b <Map> {bind %W <Map> {}; after idle {winwm90click %W}}
after 5000 {set winwm90done timeout}
vwait winwm90done
set winwm90done
} -cleanup {
foreach cmd {proc1 proc2 proc3 click} {
rename winwm90$cmd {}
}
destroy .tx .t .sd
} -result {ok}
} -result {ok}
test winWm-9.1 "delayed activation of grabbed destroyed window" -constraints win -setup {
proc winwm91click {w} {
if {![winfo ismapped $w]} { update }
event generate $w <Enter>
focus -force $w
event generate $w <ButtonPress-1> -x 5 -y 5
|
︙ | | |
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
|
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
|
-
+
|
pack [button $w.b -text "Do dialog" -command [list winwm91proc2 $w]]
bind $w.b <Map> {bind %W <Map> {}; after idle {winwm91click %W}}
}
destroy .t
global winwm91done
set winwm91done wait
toplevel .t
} -body {
} -body {
pack [button .t.b -text "Show" -command {winwm91proc1 .tx}]
bind .t.b <Map> {bind %W <Map> {}; after idle {winwm91click %W}}
after 5000 {set winwm91done timeout}
vwait winwm91done
set winwm91done
} -cleanup {
foreach cmd {proc1 proc2 proc3 click} {
|
︙ | | |
Changes to unix/Makefile.in.
︙ | | |
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
|
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
|
-
+
|
INSTALL = $(SHELL) $(UNIX_DIR)/install-sh -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_LIBRARY = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_DATA_DIR = ${INSTALL} -d -m 755
# The symbol below provides support for dynamic loading and shared
# libraries. See configure.in for a description of what it means.
# libraries. See configure.ac for a description of what it means.
# The value of the symbol is normally set by the configure script.
SHLIB_CFLAGS = @SHLIB_CFLAGS@ -DBUILD_tk
# To enable support for stubs in Tcl.
STUB_LIB_FILE = @TK_STUB_LIB_FILE@
|
︙ | | |
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
|
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
|
-
+
|
# Libraries to use when linking. This definition is determined by the
# configure script.
LIBS = @LIBS@ $(X11_LIB_SWITCHES) @TCL_LIBS@
WISH_LIBS = $(TCL_LIB_SPEC) @LIBS@ $(X11_LIB_SWITCHES) @TCL_LIBS@ @EXTRA_WISH_LIBS@
# The symbols below provide support for dynamic loading and shared
# libraries. See configure.in for a description of what the
# libraries. See configure.ac for a description of what the
# symbols mean. The values of the symbols are normally set by the
# configure script. You shouldn't normally need to modify any of
# these definitions by hand.
STLIB_LD = @STLIB_LD@
SHLIB_LD = @SHLIB_LD@
SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
|
︙ | | |
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
|
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
|
-
+
-
+
-
+
-
+
|
#
DISTROOT = /tmp/dist
DISTNAME = tk${VERSION}${PATCH_LEVEL}
ZIPNAME = tk${MAJOR_VERSION}${MINOR_VERSION}${PATCH_LEVEL}-src.zip
DISTDIR = $(DISTROOT)/$(DISTNAME)
TCLDIR = @TCL_SRC_DIR@
$(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in $(UNIX_DIR)/tcl.m4 \
$(UNIX_DIR)/configure: $(UNIX_DIR)/configure.ac $(UNIX_DIR)/tcl.m4 \
$(UNIX_DIR)/aclocal.m4
cd $(UNIX_DIR); autoconf
$(MAC_OSX_DIR)/configure: $(MAC_OSX_DIR)/configure.ac $(UNIX_DIR)/configure
cd $(MAC_OSX_DIR); autoconf
$(UNIX_DIR)/tkConfig.h.in: $(MAC_OSX_DIR)/configure
cd $(MAC_OSX_DIR); autoheader; touch $@
dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tkConfig.h.in $(UNIX_DIR)/tk.pc.in $(MAC_OSX_DIR)/configure genstubs
rm -rf $(DISTDIR)
mkdir -p $(DISTDIR)/unix
cp -p $(UNIX_DIR)/*.c $(UNIX_DIR)/*.h $(DISTDIR)/unix
cp $(TOP_DIR)/license.terms $(UNIX_DIR)/Makefile.in $(DISTDIR)/unix
chmod 664 $(DISTDIR)/unix/Makefile.in
cp $(UNIX_DIR)/configure $(UNIX_DIR)/configure.in $(UNIX_DIR)/tk.spec \
cp $(UNIX_DIR)/configure $(UNIX_DIR)/configure.ac $(UNIX_DIR)/tk.spec \
$(UNIX_DIR)/aclocal.m4 $(UNIX_DIR)/tcl.m4 \
$(UNIX_DIR)/tkConfig.sh.in $(TCLDIR)/unix/install-sh \
$(UNIX_DIR)/README $(UNIX_DIR)/installManPage \
$(UNIX_DIR)/tkConfig.h.in $(UNIX_DIR)/tk.pc.in $(DISTDIR)/unix
chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.in
chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.ac
mkdir $(DISTDIR)/bitmaps
@(cd $(TOP_DIR); for i in bitmaps/* ; do \
if [ -f $$i ] ; then \
sed -e 's/static char/static unsigned char/' \
$$i > $(DISTDIR)/$$i; \
fi; \
done;)
mkdir $(DISTDIR)/generic
cp -p $(GENERIC_DIR)/*.[ch] $(DISTDIR)/generic
cp -p $(GENERIC_DIR)/*.decls $(DISTDIR)/generic
cp -p $(GENERIC_DIR)/README $(DISTDIR)/generic
cp -p $(TOP_DIR)/changes $(TOP_DIR)/ChangeLog \
$(TOP_DIR)/ChangeLog.2??? $(TOP_DIR)/README \
$(TOP_DIR)/license.terms $(DISTDIR)
rm -f $(DISTDIR)/generic/blt*.[ch]
mkdir $(DISTDIR)/generic/ttk
cp -p $(TTK_DIR)/*.[ch] $(TTK_DIR)/ttk.decls \
$(TTK_DIR)/ttkGenStubs.tcl $(DISTDIR)/generic/ttk
mkdir $(DISTDIR)/win
cp $(TOP_DIR)/win/Makefile.in $(DISTDIR)/win
cp $(TOP_DIR)/win/configure.in \
cp $(TOP_DIR)/win/configure.ac \
$(TOP_DIR)/win/configure \
$(TOP_DIR)/win/tkConfig.sh.in \
$(TOP_DIR)/win/aclocal.m4 $(TOP_DIR)/win/tcl.m4 \
$(DISTDIR)/win
cp -p $(TOP_DIR)/win/*.[ch] $(TOP_DIR)/win/*.bat $(DISTDIR)/win
cp -p $(TOP_DIR)/win/makefile.* $(DISTDIR)/win
cp -p $(TOP_DIR)/win/rules.vc $(DISTDIR)/win
|
︙ | | |
Changes to unix/configure.
more than 10,000 changes
Added unix/configure.ac.