diff options
368 files changed, 13570 insertions, 17658 deletions
diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 5247b73..aba54a3 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -13,7 +13,7 @@ env: ERROR_ON_FAILURES: 1 jobs: xcode: - runs-on: macos-11 + runs-on: macos-14 defaults: run: shell: bash @@ -57,7 +57,7 @@ jobs: fi timeout-minutes: 30 clang: - runs-on: macos-11 + runs-on: macos-14 strategy: matrix: symbols: diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 3419a63..ad32849 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -76,7 +76,7 @@ jobs: working-directory: ${{ env.INST_DIR }} macos: name: macOS - runs-on: macos-11 + runs-on: macos-13 defaults: run: shell: bash @@ -1,23 +1,19 @@ # README: Tk -This is the **Tk 9.0b3** source distribution. +This is the **Tk 9.0.1** source distribution. You can get any source release of Tk from [our distribution site](https://sourceforge.net/projects/tcl/files/Tcl/). -8.6 (production release, daily build) -[](https://github.com/tcltk/tk/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-6-branch) -[](https://github.com/tcltk/tk/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-6-branch) -[](https://github.com/tcltk/tk/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-6-branch) +9.0 (production release, daily build) +[](https://github.com/tcltk/tk/actions/workflows/linux-build.yml?query=branch%3Amain) +[](https://github.com/tcltk/tk/actions/workflows/win-build.yml?query=branch%3Amain) +[](https://github.com/tcltk/tk/actions/workflows/mac-build.yml?query=branch%3Amain) <br> -8.7 (in development, daily build)) -[](https://github.com/tcltk/tk/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-branch) -[](https://github.com/tcltk/tk/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-branch) -[](https://github.com/tcltk/tk/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-branch) -9.0 (in development, daily build)) -[](https://github.com/tcltk/tk/actions?query=workflow%3A%22Linux%22+branch%3Amain) -[](https://github.com/tcltk/tk/actions?query=workflow%3A%22Windows%22+branch%3Amain) -[](https://github.com/tcltk/tk/actions?query=workflow%3A%22macOS%22+branch%3Amain) +8.7 (in development, daily build) +[](https://github.com/tcltk/tk/actions/workflows/linux-build.yml?query=branch%3Acore-8-branch) +[](https://github.com/tcltk/tk/actions/workflows/win-build.yml?query=branch%3Acore-8-branch) +[](https://github.com/tcltk/tk/actions/workflows/mac-build.yml?query=branch%3Acore-8-branch) ## <a id="intro">1.</a> Introduction @@ -4,7 +4,13 @@ changes to the Tk source code at > [Tk Source Code](https://core.tcl-lang.org/tk/) -Release Tk 9.0b3 arises from the check-in with tag core-9-0-b3. +Release Tk 9.0.1 arises from the check-in with tag `core-9-0-1`. + +## Changes since Tk 9.0.0 + - [Canvas widget handles pixel objects incorrectly in Tk 9.0](https://core.tcl-lang.org/tk/tktview/610a73) + - [SIGABRT from Tk_DeleteErrorHandler()](https://core.tcl-lang.org/tk/tktview/f52986) + +Release Tk 9.0.0 arises from the check-in with tag `core-9-0-0`. Highlighted differences between Tk 9.0 and Tk 8.6 are summarized below, with focus on changes important to programmers using the Tk library and @@ -13,12 +19,12 @@ writing Tcl scripts containing Tk commands. ## Many improvements to use of platform features and conventions. - Built-in widgets and themes are scaling-aware. - Improved support of two-finger gestures, where available - - The `tk windowingsystem` "aqua" needs macOS 10.10 or later + - The `tk windowingsystem` "aqua" needs macOS 10.9 or later ## New commands and options - - `tk sysnotify`: access to the OS notifications system - - `tk systray`: access to the OS tray facility - - `tk print`: access to the OS printing facility + - `tk sysnotify` — Access to the OS notifications system + - `tk systray` — Access to the OS tray facility + - `tk print` — Access to the OS printing facility ## Widget options - New `ttk::progressbar` option: **-text** @@ -34,3 +40,16 @@ writing Tcl scripts containing Tk commands. - Partial SVG support - Read/write access to photo image metadata +## Known bugs + - [Use of Tcl_Obj vs char * in Widget storage](https://core.tcl-lang.org/tk/tktview/f91aa2) + - [Tilde file syntax not available on 9.0 but used by "~/.Xdefaults"](https://core.tcl-lang.org/tk/tktview/fcfddc) + - [many PIXEL options don't keep their configured value](https://core.tcl-lang.org/tk/tktview/29ba53) + - [Inconsistent reporting of child geometry changes to grid container](https://core.tcl-lang.org/tk/tktview/beaa8e) + - [Inconsistency in whether widgets allow negative borderwidths](https://core.tcl-lang.org/tk/tktview/5f739d) + - [Enter key works differently in Windows and Linux](https://core.tcl-lang.org/tk/tktview/b3a1b9) + - [slow widget creation if default font is not used](https://core.tcl-lang.org/tk/tktview/8da7af) + - [The wm manage command does not work on current macOS versions](https://core.tcl-lang.org/tk/tktview/8a6012) + - [Slow processing irregular transparencies](https://core.tcl-lang.org/tk/tktview/919066) + - [text's cursor width on 0th column](https://core.tcl-lang.org/tk/tktview/47fbfc) + - [text widget breaks graphemes with combining diacritical marks](https://core.tcl-lang.org/tk/tktview/442208) + diff --git a/doc/3DBorder.3 b/doc/3DBorder.3 index d609d6d..dbe88e2 100644 --- a/doc/3DBorder.3 +++ b/doc/3DBorder.3 @@ -67,7 +67,7 @@ must be the window for which the border was allocated). Pointer to value whose value describes color corresponding to background (flat areas). Illuminated edges will be brighter than this and shadowed edges will be darker than this. -.AP char *colorName in +.AP "const char" *colorName in Same as \fIobjPtr\fR except value is supplied as a string rather than a value. .AP Drawable drawable in @@ -185,7 +185,7 @@ compile time. a widget to indicate that it has received the input focus. On the Macintosh, this puts a 1 pixel border in the bgGC color between the widget and the focus ring, except in the case where highlightWidth -is 1, in which case the border is left out. +is 0 or 1, in which case the border is left out. For proper Mac L&F, use highlightWidth of 3. .PP \fBTk_Get3DBorder\fR is identical to \fBTk_Alloc3DBorderFromObj\fR except diff --git a/doc/CanvTxtInfo.3 b/doc/CanvTxtInfo.3 index 9bc280b..b8dd1bf 100644 --- a/doc/CanvTxtInfo.3 +++ b/doc/CanvTxtInfo.3 @@ -37,10 +37,10 @@ typedef struct { int \fIselBorderWidth\fR; XColor *\fIselFgColorPtr\fR; Tk_Item *\fIselItemPtr\fR; - int \fIselectFirst\fR; - int \fIselectLast\fR; + Tcl_Size \fIselectFirst\fR; + Tcl_Size \fIselectLast\fR; Tk_Item *\fIanchorItemPtr\fR; - int \fIselectAnchor\fR; + Tcl_Size \fIselectAnchor\fR; Tk_3DBorder \fIinsertBorder\fR; int \fIinsertWidth\fR; int \fIinsertBorderWidth\fR; diff --git a/doc/CrtPhImgFmt.3 b/doc/CrtPhImgFmt.3 index ff6f839..6f89ef7 100644 --- a/doc/CrtPhImgFmt.3 +++ b/doc/CrtPhImgFmt.3 @@ -9,7 +9,7 @@ '\" Department of Computer Science, '\" Australian National University. '\" -.TH Tk_CreatePhotoImageFormat 3 8.7 Tk "Tk Library Procedures" +.TH Tk_CreatePhotoImageFormat 3 9.0 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME diff --git a/doc/GetColor.3 b/doc/GetColor.3 index bfb7ac0..4dce903 100644 --- a/doc/GetColor.3 +++ b/doc/GetColor.3 @@ -45,7 +45,7 @@ Token for window in which color will be used. .AP Tcl_Obj *objPtr in/out String value describes desired color; internal rep will be modified to cache pointer to corresponding (XColor *). -.AP char *name in +.AP "const char" *name in Same as \fIobjPtr\fR except description of color is passed as a string and resulting (XColor *) is not cached. .AP XColor *prefPtr in diff --git a/doc/GetCursor.3 b/doc/GetCursor.3 index 6f8e34f..6bfad3f 100644 --- a/doc/GetCursor.3 +++ b/doc/GetCursor.3 @@ -42,7 +42,7 @@ Token for window in which the cursor will be used. .AP Tcl_Obj *objPtr in/out Description of cursor; see below for possible values. Internal rep will be modified to cache pointer to corresponding Tk_Cursor. -.AP char *name in +.AP "const char" *name in Same as \fIobjPtr\fR except description of cursor is passed as a string and resulting Tk_Cursor is not cached. .AP "const char" *source in @@ -57,9 +57,9 @@ Height of \fIsource\fR and \fImask\fR. X-location of cursor hot-spot. .AP "int" yHot in Y-location of cursor hot-spot. -.AP Tk_Uid fg in +.AP "const char" *fg in Textual description of foreground color for cursor. -.AP Tk_Uid bg in +.AP "const char" *bg in Textual description of background color for cursor. .AP Display *display in Display for which \fIcursor\fR was allocated. @@ -174,7 +174,7 @@ Tk_Cursor cursor; #include "mask.cursor" cursor = Tk_GetCursorFromData(interp, tkwin, source_bits, mask_bits, source_width, source_height, source_x_hot, - source_y_hot, Tk_GetUid("red"), Tk_GetUid("blue")); + source_y_hot, "red", "blue"); .CE .PP Under normal conditions \fBTk_GetCursorFromData\fR diff --git a/doc/GetRelief.3 b/doc/GetRelief.3 index 528e1ba..d9ecb13 100644 --- a/doc/GetRelief.3 +++ b/doc/GetRelief.3 @@ -38,14 +38,12 @@ or .QW \fBsunken\fR (or any unique abbreviation thereof on input); the internal rep will be modified to cache corresponding relief value. -.AP char *string in +.AP "const char" *name in Same as \fIobjPtr\fR except description of relief is passed as a string. .AP int *reliefPtr out Pointer to location in which to store relief value corresponding to \fIobjPtr\fR or \fIname\fR. -.AP "const char" *name -Name of the relief. .AP int relief in Relief value (one of \fBTK_RELIEF_FLAT\fR, \fBTK_RELIEF_RAISED\fR, \fBTK_RELIEF_SUNKEN\fR, \fBTK_RELIEF_GROOVE\fR, \fBTK_RELIEF_SOLID\fR, diff --git a/doc/SetOptions.3 b/doc/SetOptions.3 index cc206d4..2dc9450 100644 --- a/doc/SetOptions.3 +++ b/doc/SetOptions.3 @@ -505,11 +505,13 @@ integer pixel value corresponding to \fB2m\fR. Unfortunately, this loses the original screen-independent value. Thus for \fBTK_OPTION_PIXELS\fR options it is better to use the \fIobjOffset\fR field. In this case the original value of the option is retained in the object and can be returned when -the option is retrieved. In most cases it is convenient to use the +the option is retrieved. It might seem convenient to use the \fIinternalOffset\fR field as well, so that the integer value is -immediately available for use in the widget code (alternatively, -\fBTk_GetPixelsFromObj\fR can be used to extract the integer value from -the object whenever it is needed). Note that the problem of losing +immediately available for use in the widget code. But if scaling is +involved, \fIinternalOffset\fR won't change value when the scaling +changes. Therefore it is better always to use +\fBTk_GetPixelsFromObj\fR to extract the integer value from +the object whenever it is needed. Note: the problem of losing information on retrievals exists only for \fBTK_OPTION_PIXELS\fR options. .PP The second reason to use the \fIobjOffset\fR field is in order to @@ -530,7 +532,7 @@ free, and restore saved copies of the type and creating a structure pointing to those procedures: .CS typedef struct { - char *name; + const char *\fIname\fR; Tk_CustomOptionSetProc *\fIsetProc\fR; Tk_CustomOptionGetProc *\fIgetProc\fR; Tk_CustomOptionRestoreProc *\fIrestoreProc\fR; @@ -264,7 +264,7 @@ its descendants. It also makes sure it's not possible to leave button \fB.cancel\fR using the keyboard. .SH PORTABILITY .PP -Note that the \fBtk busy\fR command does not currently have any effect on OSX +Note that the \fBtk busy\fR command does not currently have any effect on macOS when Tk is built using Aqua support. .SH "SEE ALSO" grab(n) diff --git a/doc/button.n b/doc/button.n index 9850670..cbbd704 100644 --- a/doc/button.n +++ b/doc/button.n @@ -183,7 +183,7 @@ The behavior of buttons can be changed by defining new bindings for individual widgets or by redefining the class bindings. .SH "PLATFORM NOTES" .PP -On Aqua/Mac OS X, some configuration options are ignored for the purpose of +On Aqua/macOS, some configuration options are ignored for the purpose of drawing of the widget because they would otherwise conflict with platform guidelines. The \fBconfigure\fR and \fBcget\fR subcommands can still manipulate the values, but do not cause any variation to the look of the diff --git a/doc/chooseDirectory.n b/doc/chooseDirectory.n index 44e9530..a12207b 100644 --- a/doc/chooseDirectory.n +++ b/doc/chooseDirectory.n @@ -24,7 +24,7 @@ Specifies the prefix of a Tcl command to invoke when the user closes the dialog after having selected an item. This callback is not called if the user cancelled the dialog. The actual command consists of \fIstring\fR followed by a space and the value selected by the user in the dialog. This -is only available on Mac OS X. +is only available on macOS. .\" OPTION: -initialdir .TP \fB\-initialdir\fI dirname\fR @@ -42,7 +42,7 @@ relative path to an absolute path. \fB\-message\fI string\fR . Specifies a message to include in the client area of the dialog. -This is only available on Mac OS X. +This is only available on macOS. .\" OPTION: -mustexist .TP \fB\-mustexist\fI boolean\fR @@ -55,7 +55,7 @@ already exist. The default value is \fIfalse\fR. \fB\-parent\fI window\fR . Makes \fIwindow\fR the logical parent of the dialog. The dialog -is displayed on top of its parent window. On Mac OS X, this +is displayed on top of its parent window. On macOS, this turns the file dialog into a sheet attached to the parent window. .\" OPTION: -title .TP diff --git a/doc/colors.n b/doc/colors.n index 09c2289..1150956 100644 --- a/doc/colors.n +++ b/doc/colors.n @@ -782,7 +782,7 @@ YellowGreen 154 205 50 .DE .SH "PORTABILITY ISSUES" .TP -\fBMac OS X\fR +\fBmacOS\fR . On macOS, the following additional system colors are available. This first group contains all of the HIBrush colors available in the @@ -870,7 +870,7 @@ systemWindowBody . Tk supports all of the NSColors in the macOS System ColorList. The convention for naming these colors is that the Tk name is generated by -capitalizing the macOS name and adding the prefix "system". On OSX +capitalizing the macOS name and adding the prefix "system". On macOS 10.14 (Mojave) and later many of these "semantic" colors will appear differently depending on whether the NSWindow in which they are used has the Aqua or DarkAqua appearance. The System ColorList differs between diff --git a/doc/cursors.n b/doc/cursors.n index 7a757f5..df60ea3 100644 --- a/doc/cursors.n +++ b/doc/cursors.n @@ -131,9 +131,9 @@ wait .CE .RE .TP -\fBMac OS X\fR +\fBmacOS\fR . -On Mac OS X systems, the following cursors are mapped to native cursors: +On macOS, the following cursors are mapped to native cursors: .RS .CS arrow @@ -54,7 +54,7 @@ new attributes for the font. See \fBFONT OPTIONS\fR below for a list of the possible attributes. .RS .PP -Note that on Aqua/Mac OS X, the system fonts (see +Note that on Aqua/macOS, the system fonts (see \fBPLATFORM SPECIFIC FONTS\fR below) may not be actually altered because they are implemented by the system theme. To achieve the effect of modification, use \fBfont actual\fR to get their configuration and \fBfont create\fR to @@ -362,7 +362,7 @@ style defaults. .DE .RE .TP -\fBMac OS X\fR +\fBmacOS\fR . The following fonts are supported, and are mapped to the user's style defaults. diff --git a/doc/fontchooser.n b/doc/fontchooser.n index 4e667e5..3dbafa2 100644 --- a/doc/fontchooser.n +++ b/doc/fontchooser.n @@ -24,7 +24,7 @@ the native platform font selection dialog where available, or a dialog implemented in Tcl otherwise. .PP Unlike most of the other Tk dialog commands, \fBtk fontchooser\fR does not -return an immediate result, as on some platforms (Mac OS X) the standard font +return an immediate result, as on some platforms (macOS) the standard font dialog is modeless while on others (Windows) it is modal. To accommodate this difference, all user interaction with the dialog will be communicated to the caller via callbacks or virtual events. @@ -121,7 +121,7 @@ It is implementation dependent which exact user actions result in the callback being called resp. the virtual events being sent. Where an Apply or OK button is present in the dialog, that button will trigger the \fB\-command\fR callback and \fB<<TkFontchooserFontChanged>>\fR virtual event. On some implementations -other user actions may also have that effect; on Mac OS X for instance, the +other user actions may also have that effect; on macOS for instance, the standard font selection dialog immediately reflects all user choices to the caller. .PP diff --git a/doc/getOpenFile.n b/doc/getOpenFile.n index 757d91f..70adf70 100644 --- a/doc/getOpenFile.n +++ b/doc/getOpenFile.n @@ -42,7 +42,7 @@ Specifies the prefix of a Tcl command to invoke when the user closes the dialog after having selected an item. This callback is not called if the user cancelled the dialog. The actual command consists of \fIstring\fR followed by a space and the value selected by the user in the dialog. This -is only available on Mac OS X. +is only available on macOS. .\" OPTION: -confirmoverwrite .TP \fB\-confirmoverwrite\fI boolean\fR @@ -58,7 +58,7 @@ that the overwrite take place without confirmation. Default value is true. Specifies a string that will be appended to the filename if the user enters a filename without an extension. The default value is the empty string, which means no extension will be appended to the filename in -any case. This option is ignored on Mac OS X, which +any case. This option is ignored on macOS, which does not require extensions to filenames, and the UNIX implementation guesses reasonable values for this from the \fB\-filetypes\fR option when this is not supplied. @@ -96,7 +96,7 @@ Specifies a filename to be displayed in the dialog when it pops up. \fB\-message\fI string\fR . Specifies a message to include in the client area of the dialog. -This is only available on Mac OS X. +This is only available on macOS. .\" OPTION: -multiple .TP \fB\-multiple\fI boolean\fR @@ -107,7 +107,7 @@ Allows the user to choose multiple files from the Open dialog. \fB\-parent\fI window\fR . Makes \fIwindow\fR the logical parent of the file dialog. The file -dialog is displayed on top of its parent window. On Mac OS X, this +dialog is displayed on top of its parent window. On macOS, this turns the file dialog into a sheet attached to the parent window. .\" OPTION: -title .TP diff --git a/doc/keysyms.n b/doc/keysyms.n index b9ccd84..c10923c 100644 --- a/doc/keysyms.n +++ b/doc/keysyms.n @@ -573,7 +573,7 @@ Greek_ETA 1991 0x7C7 Greek_THETA 1992 0x7C8 Greek_IOTA 1993 0x7C9 Greek_KAPPA 1994 0x7CA -Greek_LAMDA 1995 0x7CB +Greek_LAMBDA 1995 0x7CB Greek_MU 1996 0x7CC Greek_NU 1997 0x7CD Greek_XI 1998 0x7CE @@ -597,7 +597,7 @@ Greek_eta 2023 0x7E7 Greek_theta 2024 0x7E8 Greek_iota 2025 0x7E9 Greek_kappa 2026 0x7EA -Greek_lamda 2027 0x7EB +Greek_lambda 2027 0x7EB Greek_mu 2028 0x7EC Greek_nu 2029 0x7ED Greek_xi 2030 0x7EE @@ -1096,6 +1096,7 @@ dead_U 65161 0xFE89 dead_schwa 65162 0xFE8A dead_SCHWA 65163 0xFE8B dead_greek 65164 0xFE8C +dead_hamza 65165 0xFE8D dead_lowline 65168 0xFE90 dead_aboveverticalline 65169 0xFE91 dead_belowverticalline 65170 0xFE92 @@ -1155,7 +1156,7 @@ Escape 65307 0xFF1B Multi_key 65312 0xFF20 Kanji 65313 0xFF21 Muhenkan 65314 0xFF22 -Henkan_Mode 65315 0xFF23 +Henkan 65315 0xFF23 Romaji 65316 0xFF24 Hiragana 65317 0xFF25 Katakana 65318 0xFF26 @@ -41,7 +41,7 @@ entry at the top. If so, it will exist as entry 0 of the menu and the other entries will number starting at 1. The default menu bindings arrange for the menu to be torn off when the tear-off entry is invoked. -This option is ignored under Aqua/MacOS, where menus cannot +This option is ignored under Aqua/macOS, where menus cannot be torn off. .OP \-tearoffcommand tearOffCommand TearOffCommand If this option has a non-empty value, then it specifies a Tcl command @@ -55,7 +55,7 @@ and menu \fB.x.y\fR is torn off to create a new menu \fB.x.tearoff1\fR, then the command .QW "\fBa b .x.y .x.tearoff1\fR" will be invoked. -This option is ignored under Aqua/MacOS, where menus cannot +This option is ignored under Aqua/macOS, where menus cannot be torn off. .OP \-title title Title The string will be used to title the window created when this menu is @@ -263,7 +263,7 @@ becoming the Application menu. When Tk sees a .menubar.window menu on the Macintosh, the menu's contents are inserted into the standard Window menu of the user's menubar whenever the window's menubar is in front. The first items in -the menu are provided by Mac OS X, and the names of the current +the menu are provided by macOS, and the names of the current toplevels are automatically appended after all the Tk-defined items and a separator. The Window menu on the Mac also allows toggling the window into a fullscreen state, and managing a tabbed window interface @@ -273,7 +273,7 @@ version of the operating system. When Tk sees a .menubar.help menu on the Macintosh, the menu's contents are appended to the standard Help menu of the user's menubar whenever the window's menubar is in front. The first items in the menu -are provided by Mac OS X. +are provided by macOS. .PP When Tk sees a System menu on Windows, its items are appended to the system menu that the menubar is attached to. This menu is tied to the @@ -285,8 +285,7 @@ system menu. When Tk sees a Help menu on X Windows and Motif menu compatibility is enabled the menu is moved to be last in the menubar and is right justified. Motif menu compatibility is enabled by setting the Tk option -\fB*Menu.useMotifHelp\fR to true or by calling -\fBtk::classic::restore menu\fR. +\fB*Menu.useMotifHelp\fR to true. .SH "CLONES" .PP When a menu is set as a menubar for a toplevel window, or when a menu @@ -545,7 +544,7 @@ supported by all entry types. \fB\-activebackground \fIvalue\fR . Specifies a background color to use for displaying this entry when it -is active. This option is ignored on Aqua/MacOS. +is active. This option is ignored on Aqua/macOS. If it is specified as an empty string (the default), then the \fB\-activebackground\fR option for the overall menu is used. If the \fBtk_strictMotif\fR variable has been set to request strict diff --git a/doc/menubutton.n b/doc/menubutton.n index 375b69a..6252374 100644 --- a/doc/menubutton.n +++ b/doc/menubutton.n @@ -95,7 +95,7 @@ is released, the menu is unposted. .PP Menubuttons are used to construct a \fBtk_optionMenu\fR, which is the preferred mechanism for allowing a user to select one item from a list -on Mac OS X. +on macOS. .PP Menubuttons were also typically organized into groups called menu bars that allow scanning: diff --git a/doc/messageBox.n b/doc/messageBox.n index 33825dc..cf878e1 100644 --- a/doc/messageBox.n +++ b/doc/messageBox.n @@ -30,7 +30,7 @@ The following option-value pairs are supported: Specifies the prefix of a Tcl command to invoke when the user closes the dialog. The actual command consists of \fIstring\fR followed by a space and the name of the button clicked by the user to close the dialog. This -is only available on Mac OS X. +is only available on macOS. .\" OPTION: -default .TP \fB\-default\fI name\fR @@ -87,7 +87,7 @@ following values are possible for \fIpredefinedType\fR: Displays three buttons whose symbolic names are \fBabort\fR, \fBretry\fR and \fBignore\fR. .IP \fBok\fR 18 -Displays one button whose symbolic name is \fBok\fR. +Displays one button whose symbolic name is \fBok\fR. This is the default. .IP \fBokcancel\fR 18 Displays two buttons whose symbolic names are \fBok\fR and \fBcancel\fR. .IP \fBretrycancel\fR 18 diff --git a/doc/nsimage.n b/doc/nsimage.n index d62416f..76e5c9a 100644 --- a/doc/nsimage.n +++ b/doc/nsimage.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -.TH nsimage n 8.7 Tk "Tk Built-In Commands" +.TH nsimage n 9.0 Tk "Tk Built-In Commands" .so man.macros .BS '\" Note: do not modify the .SH NAME line immediately below! diff --git a/doc/options.n b/doc/options.n index 41bf565..141f4cb 100644 --- a/doc/options.n +++ b/doc/options.n @@ -169,7 +169,7 @@ milliseconds the insertion cursor should remain .QW on in each blink cycle. .OP \-insertwidth insertWidth InsertWidth -Specifies a value indicating the total width of the insertion cursor. +Specifies a non-negative value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. If a border has been specified for the insertion cursor (using the \fB\-insertborderwidth\fR option), the border diff --git a/doc/scrollbar.n b/doc/scrollbar.n index b7e177e..a19b6e8 100644 --- a/doc/scrollbar.n +++ b/doc/scrollbar.n @@ -320,7 +320,7 @@ grid columnconfigure .tl 0 -weight 1 grid rowconfigure .tl 0 -weight 1 .CE .SH "SEE ALSO" -ttk:scrollbar(n) +ttk::scrollbar(n) .SH KEYWORDS scrollbar, widget '\" Local Variables: @@ -156,7 +156,7 @@ state is returned. This is turned on by default for the main display. . Returns the current Tk windowing system, one of \fBx11\fR (X11-based), \fBwin32\fR (MS Windows), -or \fBaqua\fR (Mac OS X Aqua). +or \fBaqua\fR (macOS Aqua). .SH "SEE ALSO" busy(n), fontchooser(n), print(n), send(n), sysnotify(n), systray(n), winfo(n) .SH KEYWORDS diff --git a/doc/tk_mac.n b/doc/tk_mac.n index 18b6336..7af9606 100644 --- a/doc/tk_mac.n +++ b/doc/tk_mac.n @@ -10,7 +10,7 @@ .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME -tk::mac \- Access Mac-Specific Functionality on OS X from Tk +tk::mac \- Access Mac-Specific Functionality on macOS from Tk .SH SYNOPSIS .nf \fB::tk::mac::DoScriptFile\fR @@ -40,7 +40,7 @@ tk::mac \- Access Mac-Specific Functionality on OS X from Tk .BE .SH "EVENT HANDLER CALLBACKS" .PP -The Aqua/Mac OS X application environment defines a number of additional +The Aqua/macOS application environment defines a number of additional events that applications should respond to. These events are mapped by Tk to calls to commands in the \fB::tk::mac\fR namespace; unless otherwise noted, if the command is absent, no action will be taken. @@ -223,7 +223,7 @@ Returns the current applications's file path. .PP .SH "ADDITIONAL DIALOGS" .PP -The Aqua/Mac OS X defines additional dialogs that applications should +Aqua/macOS defines additional dialogs that applications should support. .\" COMMAND: standardAboutPanel .TP diff --git a/doc/ttk_notebook.n b/doc/ttk_notebook.n index b7844a7..a53bb43 100644 --- a/doc/ttk_notebook.n +++ b/doc/ttk_notebook.n @@ -292,6 +292,9 @@ you will have to adapt the above settings as follows: ttk::style configure $nbStyle -tabmargins {2 0 2 2} ttk::style map $nbStyle.Tab -expand {selected {2 2 2 2}} .CE +The easiest way to do this is to invoke the library procedure +\fBttk::configureNotebookStyle\fP with \fB$nbStyle\fP as argument, after +setting the style's \fB\-tabposition\fP option. .RE \fB\-font\fP \fIfont\fP .br @@ -299,9 +302,8 @@ ttk::style map $nbStyle.Tab -expand {selected {2 2 2 2}} .br \fB\-padding\fP \fIpadding\fP .RS -Some themes (e.g., \fBclam\fP) use a different \fIpadding\fP for the -selected tab. For example, the Ttk library file \fBclamTheme.tcl\fP -contains the lines +Some themes use a different \fIpadding\fP for the selected tab. For example, +the Ttk library file \fBclamTheme.tcl\fP contains the lines .CS ttk::style configure TNotebook.Tab \\ -padding {4.5p 1.5p 4.5p 1.5p} @@ -309,8 +311,11 @@ ttk::style map TNotebook.Tab \\ -padding {selected {4.5p 3p 4.5p 1.5p}} .CE which are valid for the default value \fBnw\fP of the \fB\-tabposition\fP -style option. Again, for a different tab position you will have to adapt -the above settings accordingly. +style option. For a \fBttk::notebook\fP style having a different tab position +you will have to adapt the above settings accordingly. Again, the easiest way +to do this is to invoke the library procedure \fBttk::configureNotebookStyle\fP +with the style name as argument, after setting the style's \fB\-tabposition\fP +option. .RE .PP Some options are only available for specific themes. diff --git a/doc/ttk_sizegrip.n b/doc/ttk_sizegrip.n index 050d0bf..9992234 100644 --- a/doc/ttk_sizegrip.n +++ b/doc/ttk_sizegrip.n @@ -29,7 +29,7 @@ Sizegrip widgets support the standard commands (see \fBttk::widget\fR). .SH "PLATFORM-SPECIFIC NOTES" .PP -On Mac OSX, toplevel windows automatically include a built-in +On macOS, toplevel windows automatically include a built-in size grip by default. Adding a \fBttk::sizegrip\fR there is harmless, since the built-in grip will just mask the widget. diff --git a/doc/ttk_treeview.n b/doc/ttk_treeview.n index 404f95e..e8e3ebd 100644 --- a/doc/ttk_treeview.n +++ b/doc/ttk_treeview.n @@ -164,6 +164,8 @@ The rectangle defined is removed from the cell selection. \fIpathname \fBcellselection toggle \fIcellList\fR . Toggle the cell selection state of each cell in \fIcellList\fR. +If the element is partially visible, the result gives the full area of the +element, including any parts that are not visible. .TP \fIpathname \fBcellselection toggle \fIfirstCell lastCell\fR . @@ -74,7 +74,7 @@ remains at \fB1.0\fR. . Places the window in a mode that takes up the entire screen, has no borders, and covers the general use area (i.e. Start menu and taskbar on -Windows, dock and menubar on OSX, general window decorations on X11). +Windows, dock and menubar on macOS, general window decorations on X11). .\" OPTION: -topmost .TP \fB\-topmost\fR @@ -102,7 +102,7 @@ value accepted by \fBTk_GetColor\fR. If the empty string is specified 2000/XP+. Where not supported, the \fB\-transparentcolor\fR value remains at \fB{}\fR. .PP -On MacOS, the following attributes may be set. +On macOS, the following attributes may be set. .\" OPTION: -appearance .TP \fB\-appearance\fR @@ -261,7 +261,7 @@ indicates a window that has no special interpretation. \fB\-zoomed\fR . Requests that the window should be maximized. This is the same as \fBwm state -zoomed\fR on Windows and Mac OS X. +zoomed\fR on Windows and macOS. .PP On X11, changes to window attributes are performed asynchronously. Querying the value of an attribute returns the current state, which will not be the @@ -592,7 +592,7 @@ simultaneously. It is recommended to use not more than 2 icons, placing the larger icon first. This command also sets the panel icon for the application if the window manager or desktop environment supports it. .PP -On Macintosh, the first image called is loaded into an OSX-native icon +On Macintosh, the first image called is loaded into an OS-native icon format, and becomes the application icon in dialogs, the Dock, and other contexts. At the script level the command will accept only the first image passed in the @@ -821,8 +821,8 @@ window in the stacking order. . If \fInewstate\fR is specified, the window will be set to the new state, otherwise it returns the current state of \fIwindow\fR: either -\fBnormal\fR, \fBiconic\fR, \fBwithdrawn\fR, \fBicon\fR, or (Windows and Mac -OS X only) \fBzoomed\fR. +\fBnormal\fR, \fBiconic\fR, \fBwithdrawn\fR, \fBicon\fR, or (Windows and macOS +only) \fBzoomed\fR. The difference between \fBiconic\fR and \fBicon\fR is that \fBiconic\fR refers to a window that has been iconified (e.g., with the \fBwm iconify\fR command) while \fBicon\fR refers to a window whose only diff --git a/generic/ks_names.h b/generic/ks_names.h index 6978f03..571da64 100644 --- a/generic/ks_names.h +++ b/generic/ks_names.h @@ -23,8 +23,8 @@ { "Multi_key", 0xFF20 }, { "Kanji", 0xFF21 }, { "Muhenkan", 0xFF22 }, -{ "Henkan_Mode", 0xFF23 }, { "Henkan", 0xFF23 }, +{ "Henkan_Mode", 0xFF23 }, { "Romaji", 0xFF24 }, { "Hiragana", 0xFF25 }, { "Katakana", 0xFF26 }, @@ -1067,8 +1067,8 @@ { "Greek_THETA", 0x7C8 }, { "Greek_IOTA", 0x7C9 }, { "Greek_KAPPA", 0x7CA }, -{ "Greek_LAMDA", 0x7CB }, { "Greek_LAMBDA", 0x7CB }, +{ "Greek_LAMDA", 0x7CB }, { "Greek_MU", 0x7CC }, { "Greek_NU", 0x7CD }, { "Greek_XI", 0x7CE }, @@ -1092,8 +1092,8 @@ { "Greek_theta", 0x7E8 }, { "Greek_iota", 0x7E9 }, { "Greek_kappa", 0x7EA }, -{ "Greek_lamda", 0x7EB }, { "Greek_lambda", 0x7EB }, +{ "Greek_lamda", 0x7EB }, { "Greek_mu", 0x7EC }, { "Greek_nu", 0x7ED }, { "Greek_xi", 0x7EE }, diff --git a/generic/tk.decls b/generic/tk.decls index d1b5ffb..c776715 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -334,7 +334,7 @@ declare 79 { } declare 80 { Tk_3DBorder Tk_Get3DBorder(Tcl_Interp *interp, Tk_Window tkwin, - Tk_Uid colorName) + const char *colorName) } declare 81 { void Tk_GetAllBindings(Tcl_Interp *interp, @@ -363,7 +363,7 @@ declare 87 { int Tk_GetCapStyle(Tcl_Interp *interp, const char *str, int *capPtr) } declare 88 { - XColor *Tk_GetColor(Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid name) + XColor *Tk_GetColor(Tcl_Interp *interp, Tk_Window tkwin, const char *name) } declare 89 { XColor *Tk_GetColorByValue(Tk_Window tkwin, XColor *colorPtr) @@ -374,13 +374,13 @@ declare 90 { } declare 91 { Tk_Cursor Tk_GetCursor(Tcl_Interp *interp, Tk_Window tkwin, - Tk_Uid str) + const char *str) } declare 92 { Tk_Cursor Tk_GetCursorFromData(Tcl_Interp *interp, Tk_Window tkwin, const char *source, const char *mask, int width, int height, int xHot, int yHot, - Tk_Uid fg, Tk_Uid bg) + const char *fg, const char *bg) } declare 93 { Tk_Font Tk_GetFont(Tcl_Interp *interp, diff --git a/generic/tk.h b/generic/tk.h index 016ea26..c2896aa 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -17,7 +17,7 @@ #define _TK #include <tcl.h> -#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 7) +#if (TCL_MAJOR_VERSION < 9) && defined(TCL_MINOR_VERSION) && (TCL_MINOR_VERSION < 7) # error Tk 9.0 must be compiled with tcl.h from Tcl 8.7 or better #endif @@ -54,8 +54,7 @@ extern "C" { * library/tk.tcl (1 LOC patch) * 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 + * README.md (sections 0 and 1) * win/README (not patchlevel) * unix/README (not patchlevel) * unix/tk.spec (1 LOC patch) @@ -70,11 +69,11 @@ extern "C" { #endif #if TK_MAJOR_VERSION == 9 # define TK_MINOR_VERSION 0 -# define TK_RELEASE_LEVEL TCL_BETA_RELEASE -# define TK_RELEASE_SERIAL 3 +# define TK_RELEASE_LEVEL TCL_FINAL_RELEASE +# define TK_RELEASE_SERIAL 1 # define TK_VERSION "9.0" -# define TK_PATCH_LEVEL "9.0b3" +# define TK_PATCH_LEVEL "9.0.1" #endif /* TK_MAJOR_VERSION */ /* @@ -729,9 +728,9 @@ typedef XActivateDeactivateEvent XDeactivateEvent; #define Tk_Depth(tkwin) (((Tk_FakeWin *) (tkwin))->depth) #define Tk_Visual(tkwin) (((Tk_FakeWin *) (tkwin))->visual) #define Tk_WindowId(tkwin) (((Tk_FakeWin *) (tkwin))->window) -#define Tk_PathName(tkwin) (((Tk_FakeWin *) (tkwin))->pathName) +#define Tk_PathName(tkwin) (((Tk_FakeWin *) (tkwin))->pathName) #define Tk_Name(tkwin) (((Tk_FakeWin *) (tkwin))->nameUid) -#define Tk_Class(tkwin) (((Tk_FakeWin *) (tkwin))->classUid) +#define Tk_Class(tkwin) (((Tk_FakeWin *) (tkwin))->classUid) #define Tk_X(tkwin) (((Tk_FakeWin *) (tkwin))->changes.x) #define Tk_Y(tkwin) (((Tk_FakeWin *) (tkwin))->changes.y) #define Tk_Width(tkwin) (((Tk_FakeWin *) (tkwin))->changes.width) @@ -978,7 +977,7 @@ typedef struct Tk_Item { * this canvas. Later items in list are drawn * just below earlier ones. */ Tk_State state; /* State of item. */ - char *reserved1; /* reserved for future use */ + void *reserved1; /* reserved for future use */ int redraw_flags; /* Some flags used in the canvas */ /* @@ -996,7 +995,7 @@ typedef struct Tk_Item { * * TK_ITEM_STATE_DEPENDANT - 1 means that object needs to be redrawn if the * canvas state changes. - * TK_ITEM_DONT_REDRAW - 1 means that the object redraw is already been + * TK_ITEM_DONT_REDRAW - 1 means that the object redraw is already been * prepared, so the general canvas code doesn't * need to do that any more. */ @@ -1155,6 +1154,9 @@ typedef struct Tk_CanvasTextInfo { int cursorOn; /* Non-zero means that an insertion cursor * should be displayed in focusItemPtr. * Read-only to items.*/ + void *reserved1; /* reserved for future use */ + void *reserved2; + void *reserved3; } Tk_CanvasTextInfo; /* @@ -1197,8 +1199,8 @@ typedef struct Tk_Outline { Tk_Dash dash; /* Dash pattern. */ Tk_Dash activeDash; /* Dash pattern if state is active. */ Tk_Dash disabledDash; /* Dash pattern if state is disabled. */ - void *reserved1; /* Reserved for future expansion. */ - void *reserved2; + Tcl_Obj *offsetObj; /* Dash offset. */ + void *reserved2; /* Reserved for future expansion. */ void *reserved3; Tk_TSOffset tsoffset; /* Stipple offset for outline. */ XColor *color; /* Outline color. */ diff --git a/generic/tk3d.c b/generic/tk3d.c index be7ba9b..66c8575 100644 --- a/generic/tk3d.c +++ b/generic/tk3d.c @@ -184,7 +184,7 @@ Tk_Get3DBorder( Tcl_Interp *interp, /* Place to store an error message. */ Tk_Window tkwin, /* Token for window in which border will be * drawn. */ - Tk_Uid colorName) /* String giving name of color for window + const char *colorName) /* String giving name of color for window * background. */ { Tcl_HashEntry *hashPtr; @@ -677,9 +677,10 @@ Tk_GetRelief( relief = TK_RELIEF_SUNKEN; } else { if (interp) { + int ambigeous = (c == 'r' || c == 's') && (name[1] == '\0'); Tcl_SetObjResult(interp, - Tcl_ObjPrintf("bad relief \"%.50s\": must be %s", - name, "flat, groove, raised, ridge, solid, or sunken")); + Tcl_ObjPrintf("%s relief \"%.50s\": must be %s", + ambigeous ? "ambigeous" : "bad", name, "flat, groove, raised, ridge, solid, or sunken")); Tcl_SetErrorCode(interp, "TK", "VALUE", "RELIEF", (char *)NULL); } return TCL_ERROR; diff --git a/generic/tkBind.c b/generic/tkBind.c index cdf868d..7e1f3bd 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -3939,7 +3939,7 @@ HandleEventGenerate( mainPtr = (TkWindow *) mainWin; if (!tkwin || mainPtr->mainPtr != ((TkWindow *) tkwin)->mainPtr) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "window id \"%s\" doesn't exist in this application", + "window id \"%s\" does not exist in this application", Tcl_GetString(objv[0]))); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "WINDOW", Tcl_GetString(objv[0]), (char *)NULL); return TCL_ERROR; diff --git a/generic/tkBusy.c b/generic/tkBusy.c index 65e1fc7..8c7a956 100644 --- a/generic/tkBusy.c +++ b/generic/tkBusy.c @@ -697,7 +697,7 @@ GetBusy( hPtr = Tcl_FindHashEntry(busyTablePtr, tkwin); if (hPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "can't find busy window \"%s\"", Tcl_GetString(windowObj))); + "cannot find busy window \"%s\"", Tcl_GetString(windowObj))); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "BUSY", Tcl_GetString(windowObj), (char *)NULL); return NULL; @@ -770,7 +770,7 @@ HoldBusy( TkpHideBusyWindow(busyPtr); } if (result == TCL_OK) { - Tcl_SetObjResult(interp, Tcl_NewStringObj(Tk_PathName(busyPtr->tkBusy), TCL_INDEX_NONE)); + Tcl_SetObjResult(interp, Tcl_NewStringObj(Tk_PathName(busyPtr->tkBusy), TCL_INDEX_NONE)); } return result; } @@ -806,7 +806,7 @@ Tk_BusyObjCmd( int index, result = TCL_OK; static const char *const optionStrings[] = { "busywindow", "cget", "configure", "current", "forget", "hold", - "status", NULL + "status", NULL }; enum options { BUSY_BUSYWINDOW, BUSY_CGET, BUSY_CONFIGURE, BUSY_CURRENT, BUSY_FORGET, @@ -843,10 +843,10 @@ Tk_BusyObjCmd( busyPtr = GetBusy(interp, busyTablePtr, objv[2]); if (busyPtr == NULL) { Tcl_ResetResult(interp); - return TCL_OK; + return TCL_OK; } - Tcl_SetObjResult(interp, Tcl_NewStringObj(Tk_PathName(busyPtr->tkBusy), TCL_INDEX_NONE)); - return TCL_OK; + Tcl_SetObjResult(interp, Tcl_NewStringObj(Tk_PathName(busyPtr->tkBusy), TCL_INDEX_NONE)); + return TCL_OK; case BUSY_CGET: if (objc != 4) { diff --git a/generic/tkButton.c b/generic/tkButton.c index b496ab5..a401158 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -79,8 +79,8 @@ static const Tk_OptionSpec labelOptionSpecs[] = { DEF_BUTTON_BITMAP, TCL_INDEX_NONE, offsetof(TkButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - tkDefButtonBorderWidth, offsetof(TkButton, borderWidthPtr), - offsetof(TkButton, borderWidth), 0, 0, 0}, + tkDefButtonBorderWidth, offsetof(TkButton, borderWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound", DEF_BUTTON_COMPOUND, TCL_INDEX_NONE, offsetof(TkButton, compound), 0, tkCompoundStrings, 0}, @@ -98,7 +98,7 @@ static const Tk_OptionSpec labelOptionSpecs[] = { {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", DEF_LABEL_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0}, {TK_OPTION_STRING, "-height", "height", "Height", - DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_INDEX_NONE, 0, 0, 0}, + DEF_BUTTON_HEIGHT, offsetof(TkButton, heightObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_BORDER, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, highlightBorder), 0, @@ -108,19 +108,19 @@ static const Tk_OptionSpec labelOptionSpecs[] = { 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", tkDefLabelHighlightWidth, - offsetof(TkButton, highlightWidthPtr), - offsetof(TkButton, highlightWidth), 0, 0, 0}, + offsetof(TkButton, highlightWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-image", "image", "Image", DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_BUTTON_JUSTIFY, TCL_INDEX_NONE, offsetof(TkButton, justify), TK_OPTION_ENUM_VAR, 0, 0}, {TK_OPTION_PIXELS, "-padx", "padX", "Pad", - tkDefLabelPadx, offsetof(TkButton, padXPtr), - offsetof(TkButton, padX), 0, 0, 0}, + tkDefLabelPadx, offsetof(TkButton, padXObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-pady", "padY", "Pad", - tkDefLabelPady, offsetof(TkButton, padYPtr), - offsetof(TkButton, padY), 0, 0, 0}, + tkDefLabelPady, offsetof(TkButton, padYObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_LABCHKRAD_RELIEF, TCL_INDEX_NONE, offsetof(TkButton, relief), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", @@ -137,10 +137,10 @@ static const Tk_OptionSpec labelOptionSpecs[] = { {TK_OPTION_INDEX, "-underline", "underline", "Underline", TK_OPTION_UNDERLINE_DEF(TkButton, underline), 0}, {TK_OPTION_STRING, "-width", "width", "Width", - DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), TCL_INDEX_NONE, 0, 0, 0}, + DEF_BUTTON_WIDTH, offsetof(TkButton, widthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength", - DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthPtr), - offsetof(TkButton, wrapLength), 0, 0, 0}, + DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0} }; @@ -164,8 +164,8 @@ static const Tk_OptionSpec buttonOptionSpecs[] = { DEF_BUTTON_BITMAP, TCL_INDEX_NONE, offsetof(TkButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - tkDefButtonBorderWidth, offsetof(TkButton, borderWidthPtr), - offsetof(TkButton, borderWidth), 0, 0, 0}, + tkDefButtonBorderWidth, offsetof(TkButton, borderWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-command", "command", "Command", DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, @@ -189,7 +189,7 @@ static const Tk_OptionSpec buttonOptionSpecs[] = { {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", DEF_BUTTON_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0}, {TK_OPTION_STRING, "-height", "height", "Height", - DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_INDEX_NONE, 0, 0, 0}, + DEF_BUTTON_HEIGHT, offsetof(TkButton, heightObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_BORDER, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, highlightBorder), 0, @@ -199,8 +199,8 @@ static const Tk_OptionSpec buttonOptionSpecs[] = { 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", tkDefButtonHighlightWidth, - offsetof(TkButton, highlightWidthPtr), - offsetof(TkButton, highlightWidth), 0, 0, 0}, + offsetof(TkButton, highlightWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-image", "image", "Image", DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, @@ -210,11 +210,11 @@ static const Tk_OptionSpec buttonOptionSpecs[] = { DEF_BUTTON_OVER_RELIEF, TCL_INDEX_NONE, offsetof(TkButton, overRelief), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-padx", "padX", "Pad", - tkDefButtonPadx, offsetof(TkButton, padXPtr), - offsetof(TkButton, padX), 0, 0, 0}, + tkDefButtonPadx, offsetof(TkButton, padXObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-pady", "padY", "Pad", - tkDefButtonPady, offsetof(TkButton, padYPtr), - offsetof(TkButton, padY), 0, 0, 0}, + tkDefButtonPady, offsetof(TkButton, padYObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_BUTTON_RELIEF, TCL_INDEX_NONE, offsetof(TkButton, relief), 0, 0, 0}, @@ -238,10 +238,10 @@ static const Tk_OptionSpec buttonOptionSpecs[] = { {TK_OPTION_INDEX, "-underline", "underline", "Underline", TK_OPTION_UNDERLINE_DEF(TkButton, underline), 0}, {TK_OPTION_STRING, "-width", "width", "Width", - DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), TCL_INDEX_NONE, 0, 0, 0}, + DEF_BUTTON_WIDTH, offsetof(TkButton, widthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength", - DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthPtr), - offsetof(TkButton, wrapLength), 0, 0, 0}, + DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, 0, 0} }; @@ -265,8 +265,8 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = { DEF_BUTTON_BITMAP, TCL_INDEX_NONE, offsetof(TkButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - tkDefButtonBorderWidth, offsetof(TkButton, borderWidthPtr), - offsetof(TkButton, borderWidth), 0, 0, 0}, + tkDefButtonBorderWidth, offsetof(TkButton, borderWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-command", "command", "Command", DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, @@ -287,7 +287,7 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = { {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", DEF_CHKRAD_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0}, {TK_OPTION_STRING, "-height", "height", "Height", - DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_INDEX_NONE, 0, 0, 0}, + DEF_BUTTON_HEIGHT, offsetof(TkButton, heightObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_BORDER, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, highlightBorder), 0, @@ -297,8 +297,8 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = { 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", tkDefButtonHighlightWidth, - offsetof(TkButton, highlightWidthPtr), - offsetof(TkButton, highlightWidth), 0, 0, 0}, + offsetof(TkButton, highlightWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-image", "image", "Image", DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, @@ -316,11 +316,11 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = { DEF_BUTTON_OVER_RELIEF, TCL_INDEX_NONE, offsetof(TkButton, overRelief), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-padx", "padX", "Pad", - tkDefLabelPadx, offsetof(TkButton, padXPtr), - offsetof(TkButton, padX), 0, 0, 0}, + tkDefLabelPadx, offsetof(TkButton, padXObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-pady", "padY", "Pad", - tkDefLabelPady, offsetof(TkButton, padYPtr), - offsetof(TkButton, padY), 0, 0, 0}, + tkDefLabelPady, offsetof(TkButton, padYObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_LABCHKRAD_RELIEF, TCL_INDEX_NONE, offsetof(TkButton, relief), 0, 0, 0}, {TK_OPTION_BORDER, "-selectcolor", "selectColor", "Background", @@ -351,10 +351,10 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = { DEF_CHECKBUTTON_VARIABLE, offsetof(TkButton, selVarNamePtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-width", "width", "Width", - DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), TCL_INDEX_NONE, 0, 0, 0}, + DEF_BUTTON_WIDTH, offsetof(TkButton, widthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength", - DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthPtr), - offsetof(TkButton, wrapLength), 0, 0, 0}, + DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, 0, 0} }; @@ -378,8 +378,8 @@ static const Tk_OptionSpec radiobuttonOptionSpecs[] = { DEF_BUTTON_BITMAP, TCL_INDEX_NONE, offsetof(TkButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - tkDefButtonBorderWidth, offsetof(TkButton, borderWidthPtr), - offsetof(TkButton, borderWidth), 0, 0, 0}, + tkDefButtonBorderWidth, offsetof(TkButton, borderWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-command", "command", "Command", DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, @@ -400,7 +400,7 @@ static const Tk_OptionSpec radiobuttonOptionSpecs[] = { {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", DEF_CHKRAD_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0}, {TK_OPTION_STRING, "-height", "height", "Height", - DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_INDEX_NONE, 0, 0, 0}, + DEF_BUTTON_HEIGHT, offsetof(TkButton, heightObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_BORDER, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, highlightBorder), 0, @@ -410,8 +410,8 @@ static const Tk_OptionSpec radiobuttonOptionSpecs[] = { 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", tkDefButtonHighlightWidth, - offsetof(TkButton, highlightWidthPtr), - offsetof(TkButton, highlightWidth), 0, 0, 0}, + offsetof(TkButton, highlightWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-image", "image", "Image", DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, @@ -426,11 +426,11 @@ static const Tk_OptionSpec radiobuttonOptionSpecs[] = { DEF_BUTTON_OVER_RELIEF, TCL_INDEX_NONE, offsetof(TkButton, overRelief), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-padx", "padX", "Pad", - tkDefLabelPadx, offsetof(TkButton, padXPtr), - offsetof(TkButton, padX), 0, 0, 0}, + tkDefLabelPadx, offsetof(TkButton, padXObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-pady", "padY", "Pad", - tkDefLabelPady, offsetof(TkButton, padYPtr), - offsetof(TkButton, padY), 0, 0, 0}, + tkDefLabelPady, offsetof(TkButton, padYObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_LABCHKRAD_RELIEF, TCL_INDEX_NONE, offsetof(TkButton, relief), 0, 0, 0}, {TK_OPTION_BORDER, "-selectcolor", "selectColor", "Background", @@ -463,10 +463,10 @@ static const Tk_OptionSpec radiobuttonOptionSpecs[] = { DEF_RADIOBUTTON_VARIABLE, offsetof(TkButton, selVarNamePtr), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-width", "width", "Width", - DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), TCL_INDEX_NONE, 0, 0, 0}, + DEF_BUTTON_WIDTH, offsetof(TkButton, widthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength", - DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthPtr), - offsetof(TkButton, wrapLength), 0, 0, 0}, + DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, 0, 0} }; @@ -687,11 +687,9 @@ ButtonCreate( butPtr->state = STATE_NORMAL; butPtr->normalBorder = NULL; butPtr->activeBorder = NULL; - butPtr->borderWidthPtr = NULL; - butPtr->borderWidth = 0; + butPtr->borderWidthObj = NULL; butPtr->relief = TK_RELIEF_FLAT; - butPtr->highlightWidthPtr = NULL; - butPtr->highlightWidth = 0; + butPtr->highlightWidthObj = NULL; butPtr->highlightBorder = NULL; butPtr->highlightColorPtr = NULL; butPtr->inset = 0; @@ -705,16 +703,11 @@ ButtonCreate( butPtr->stippleGC = NULL; butPtr->gray = None; butPtr->copyGC = NULL; - butPtr->widthPtr = NULL; - butPtr->width = 0; - butPtr->heightPtr = NULL; - butPtr->height = 0; - butPtr->wrapLengthPtr = NULL; - butPtr->wrapLength = 0; - butPtr->padXPtr = NULL; - butPtr->padX = 0; - butPtr->padYPtr = NULL; - butPtr->padY = 0; + butPtr->widthObj = NULL; + butPtr->heightObj = NULL; + butPtr->wrapLengthObj = NULL; + butPtr->padXObj = NULL; + butPtr->padYObj = NULL; butPtr->anchor = TK_ANCHOR_CENTER; butPtr->justify = TK_JUSTIFY_CENTER; butPtr->indicatorOn = 0; @@ -1034,6 +1027,8 @@ ConfigureButton( Tcl_Obj *errorResult = NULL; int error, haveImage; Tk_Image image; + int wrapLength, borderWidth, highlightWidth, padX, padY; + int butPtrWidth, butPtrHeight; /* * Eliminate any existing trace on variables monitored by the button. @@ -1097,45 +1092,40 @@ ConfigureButton( } else { Tk_SetBackgroundFromBorder(butPtr->tkwin, butPtr->normalBorder); } - if (butPtr->wrapLength < 0) { - butPtr->wrapLength = 0; - if (butPtr->wrapLengthPtr) { - Tcl_DecrRefCount(butPtr->wrapLengthPtr); - } - butPtr->wrapLengthPtr = Tcl_NewIntObj(0); - Tcl_IncrRefCount(butPtr->wrapLengthPtr); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->wrapLengthObj, &wrapLength); + if (wrapLength < 0) { + wrapLength = 0; + Tcl_DecrRefCount(butPtr->wrapLengthObj); + butPtr->wrapLengthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(butPtr->wrapLengthObj); } - if (butPtr->borderWidth < 0) { - butPtr->borderWidth = 0; - if (butPtr->borderWidthPtr) { - Tcl_DecrRefCount(butPtr->borderWidthPtr); - } - butPtr->borderWidthPtr = Tcl_NewIntObj(0); - Tcl_IncrRefCount(butPtr->borderWidthPtr); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthObj, &borderWidth); + if (borderWidth < 0) { + borderWidth = 0; + Tcl_DecrRefCount(butPtr->borderWidthObj); + butPtr->borderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(butPtr->borderWidthObj); } - if (butPtr->highlightWidth < 0) { - butPtr->highlightWidth = 0; - if (butPtr->highlightWidthPtr) { - Tcl_DecrRefCount(butPtr->highlightWidthPtr); - } - butPtr->highlightWidthPtr = Tcl_NewIntObj(0); - Tcl_IncrRefCount(butPtr->highlightWidthPtr); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth < 0) { + highlightWidth = 0; + Tcl_DecrRefCount(butPtr->highlightWidthObj); + butPtr->highlightWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(butPtr->highlightWidthObj); } - if (butPtr->padX < 0) { - butPtr->padX = 0; - if (butPtr->padXPtr) { - Tcl_DecrRefCount(butPtr->padXPtr); - } - butPtr->padXPtr = Tcl_NewIntObj(0); - Tcl_IncrRefCount(butPtr->padXPtr); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padXObj, &padX); + if (padX < 0) { + padX = 0; + Tcl_DecrRefCount(butPtr->padXObj); + butPtr->padXObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(butPtr->padXObj); } - if (butPtr->padY < 0) { - butPtr->padY = 0; - if (butPtr->padYPtr) { - Tcl_DecrRefCount(butPtr->padYPtr); - } - butPtr->padYPtr = Tcl_NewIntObj(0); - Tcl_IncrRefCount(butPtr->padYPtr); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padYObj, &padY); + if (padY < 0) { + padY = 0; + Tcl_DecrRefCount(butPtr->padYObj); + butPtr->padYObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(butPtr->padYObj); } if (butPtr->type >= TYPE_CHECK_BUTTON) { @@ -1191,7 +1181,7 @@ ConfigureButton( * selected. */ - if ((butPtr->type == TYPE_RADIO_BUTTON) && + if ((butPtr->type == TYPE_RADIO_BUTTON) && (*Tcl_GetString(butPtr->onValuePtr) == '\0')) { butPtr->flags |= SELECTED; } @@ -1283,14 +1273,14 @@ ConfigureButton( * The button must display the contents of an image or bitmap. */ - if (Tk_GetPixelsFromObj(interp, butPtr->tkwin, butPtr->widthPtr, - &butPtr->width) != TCL_OK) { + if (Tk_GetPixelsFromObj(interp, butPtr->tkwin, butPtr->widthObj, + &butPtrWidth) != TCL_OK) { widthError: Tcl_AddErrorInfo(interp, "\n (processing \"-width\" option)"); continue; } - if (Tk_GetPixelsFromObj(interp, butPtr->tkwin, butPtr->heightPtr, - &butPtr->height) != TCL_OK) { + if (Tk_GetPixelsFromObj(interp, butPtr->tkwin, butPtr->heightObj, + &butPtrHeight) != TCL_OK) { heightError: Tcl_AddErrorInfo(interp, "\n (processing \"-height\" option)"); continue; @@ -1300,11 +1290,11 @@ ConfigureButton( * The button displays an ordinary text string. */ - if (Tcl_GetIntFromObj(interp, butPtr->widthPtr, &butPtr->width) + if (Tcl_GetIntFromObj(interp, butPtr->widthObj, &butPtrWidth) != TCL_OK) { goto widthError; } - if (Tcl_GetIntFromObj(interp, butPtr->heightPtr, &butPtr->height) + if (Tcl_GetIntFromObj(interp, butPtr->heightObj, &butPtrHeight) != TCL_OK) { goto heightError; } @@ -1477,6 +1467,8 @@ ButtonEventProc( XEvent *eventPtr) /* Information about event. */ { TkButton *butPtr = (TkButton *)clientData; + int highlightWidth; + if ((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) { goto redraw; } else if (eventPtr->type == ConfigureNotify) { @@ -1491,16 +1483,16 @@ ButtonEventProc( } else if (eventPtr->type == FocusIn) { if (eventPtr->xfocus.detail != NotifyInferior) { butPtr->flags |= GOT_FOCUS; - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthPtr, &butPtr->highlightWidth); - if (butPtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { goto redraw; } } } else if (eventPtr->type == FocusOut) { if (eventPtr->xfocus.detail != NotifyInferior) { butPtr->flags &= ~GOT_FOCUS; - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthPtr, &butPtr->highlightWidth); - if (butPtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { goto redraw; } } @@ -1735,14 +1727,12 @@ static char * ButtonTextVarProc( void *clientData, /* Information about button. */ Tcl_Interp *interp, /* Interpreter containing variable. */ - const char *name1, /* Not used. */ - const char *name2, /* Not used. */ + TCL_UNUSED(const char *), /* name1 */ + TCL_UNUSED(const char *), /* name2 */ int flags) /* Information about what happened. */ { TkButton *butPtr = (TkButton *)clientData; Tcl_Obj *valuePtr; - (void)name1; - (void)name2; if (butPtr->flags & BUTTON_DELETED) { return NULL; @@ -1830,19 +1820,14 @@ ButtonTextVarProc( static void ButtonImageProc( void *clientData, /* Pointer to widget record. */ - int x, int y, /* Upper left pixel (within image) that must - * be redisplayed. */ - int width, int height, /* Dimensions of area to redisplay (might be - * <= 0). */ - int imgWidth, int imgHeight)/* New dimensions of image. */ + TCL_UNUSED(int), /* x, Upper left pixel (within image) that must */ + TCL_UNUSED(int), /* y, be redisplayed. */ + TCL_UNUSED(int), /* width, Dimensions of area to redisplay (might be */ + TCL_UNUSED(int), /* height, <= 0). */ + TCL_UNUSED(int), /* imgWidth, New dimensions of image. */ + TCL_UNUSED(int)) /* imgHeight */ { TkButton *butPtr = (TkButton *)clientData; - (void)x; - (void)y; - (void)width; - (void)height; - (void)imgWidth; - (void)imgHeight; if (butPtr->tkwin != NULL) { TkpComputeButtonGeometry(butPtr); @@ -1874,19 +1859,14 @@ ButtonImageProc( static void ButtonSelectImageProc( void *clientData, /* Pointer to widget record. */ - int x, int y, /* Upper left pixel (within image) that must - * be redisplayed. */ - int width, int height, /* Dimensions of area to redisplay (might be - * <= 0). */ - int imgWidth, int imgHeight)/* New dimensions of image. */ + TCL_UNUSED(int), /* x, Upper left pixel (within image) that must */ + TCL_UNUSED(int), /* y, be redisplayed. */ + TCL_UNUSED(int), /* width, Dimensions of area to redisplay (might be */ + TCL_UNUSED(int), /* height, <= 0). */ + TCL_UNUSED(int), /* imgWidth, New dimensions of image. */ + TCL_UNUSED(int)) /* imgHeight */ { TkButton *butPtr = (TkButton *)clientData; - (void)x; - (void)y; - (void)width; - (void)height; - (void)imgWidth; - (void)imgHeight; #ifdef MAC_OSX_TK if (butPtr->tkwin != NULL) { @@ -1927,19 +1907,14 @@ ButtonSelectImageProc( static void ButtonTristateImageProc( void *clientData, /* Pointer to widget record. */ - int x, int y, /* Upper left pixel (within image) that must - * be redisplayed. */ - int width, int height, /* Dimensions of area to redisplay (might be - * <= 0). */ - int imgWidth, int imgHeight)/* New dimensions of image. */ + TCL_UNUSED(int), /* x, Upper left pixel (within image) that must */ + TCL_UNUSED(int), /* y, be redisplayed. */ + TCL_UNUSED(int), /* width, Dimensions of area to redisplay (might be */ + TCL_UNUSED(int), /* height, <= 0). */ + TCL_UNUSED(int), /* imgWidth, New dimensions of image. */ + TCL_UNUSED(int)) /* imgHeight */ { TkButton *butPtr = (TkButton *)clientData; - (void)x; - (void)y; - (void)width; - (void)height; - (void)imgWidth; - (void)imgHeight; #ifdef MAC_OSX_TK if (butPtr->tkwin != NULL) { diff --git a/generic/tkButton.h b/generic/tkButton.h index 52e861a..0d18ad9 100644 --- a/generic/tkButton.h +++ b/generic/tkButton.h @@ -110,10 +110,8 @@ typedef struct { Tk_3DBorder activeBorder; /* Value of -activebackground option: this is * the color used to draw 3-D border and * background when widget is active. */ - Tcl_Obj *borderWidthPtr; /* Value of -borderWidth option: specifies + Tcl_Obj *borderWidthObj; /* Value of -borderWidth option: specifies * width of border in pixels. */ - int borderWidth; /* Integer value corresponding to - * borderWidthPtr. Always >= 0. */ int relief; /* Value of -relief option: specifies 3-d * effect for border, such as * TK_RELIEF_RAISED. */ @@ -126,12 +124,10 @@ typedef struct { * TK_RELIEF_RAISED, to be used when a * checkbutton or radiobutton without * indicator is off. */ - Tcl_Obj *highlightWidthPtr; /* Value of -highlightthickness option: + Tcl_Obj *highlightWidthObj; /* Value of -highlightthickness option: * specifies width in pixels of highlight to * draw around widget when it has the focus. * <= 0 means don't draw a highlight. */ - int highlightWidth; /* Integer value corresponding to - * highlightWidthPtr. Always >= 0. */ Tk_3DBorder highlightBorder;/* Value of -highlightbackground option: * specifies background with which to draw 3-D * default ring and focus highlight area when @@ -166,26 +162,20 @@ typedef struct { * disabledFg is NULL. */ GC copyGC; /* Used for copying information from an * off-screen pixmap to the screen. */ - Tcl_Obj *widthPtr; /* Value of -width option. */ - int width; /* Integer value corresponding to widthPtr. */ - Tcl_Obj *heightPtr; /* Value of -height option. */ - int height; /* Integer value corresponding to heightPtr. */ - Tcl_Obj *wrapLengthPtr; /* Value of -wraplength option: specifies line + Tcl_Obj *widthObj; /* Value of -width option. */ + Tcl_Obj *heightObj; /* Value of -height option. */ + Tcl_Obj *wrapLengthObj; /* Value of -wraplength option: specifies line * length (in pixels) at which to wrap onto * next line. <= 0 means don't wrap except at * newlines. */ - int wrapLength; /* Integer value corresponding to - * wrapLengthPtr. */ - Tcl_Obj *padXPtr; /* Value of -padx option: specifies how many + Tcl_Obj *padXObj; /* Value of -padx option: specifies how many * pixels of extra space to leave on left and * right of text. Ignored for bitmaps and * images. */ - int padX; /* Integer value corresponding to padXPtr. */ - Tcl_Obj *padYPtr; /* Value of -padx option: specifies how many + Tcl_Obj *padYObj; /* Value of -padx option: specifies how many * pixels of extra space to leave above and * below text. Ignored for bitmaps and * images. */ - int padY; /* Integer value corresponding to padYPtr. */ Tk_Anchor anchor; /* Value of -anchor option: specifies where * text/bitmap should be displayed inside * button region. */ @@ -312,7 +302,7 @@ MODULE_SCOPE void TkButtonWorldChanged(void *instanceData); MODULE_SCOPE void TkpComputeButtonGeometry(TkButton *butPtr); MODULE_SCOPE TkButton *TkpCreateButton(Tk_Window tkwin); #ifndef TkpDestroyButton -MODULE_SCOPE void TkpDestroyButton(TkButton *butPtr); +MODULE_SCOPE void TkpDestroyButton(TkButton *butPtr); #endif #ifndef TkpDisplayButton MODULE_SCOPE void TkpDisplayButton(void *clientData); diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c index 03a3b99..8a873b8 100644 --- a/generic/tkCanvArc.c +++ b/generic/tkCanvArc.c @@ -130,7 +130,7 @@ static const Tk_ConfigSpec configSpecs[] = { NULL, offsetof(ArcItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, - "0", offsetof(ArcItem, outline.offset), TK_CONFIG_DONT_SET_DEFAULT, NULL}, + "0", offsetof(ArcItem, outline.offsetObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL, NULL, offsetof(ArcItem, outline.disabledDash), TK_CONFIG_NULL_OK, &dashOption}, @@ -381,7 +381,7 @@ ArcCoords( } } if ((Tk_CanvasGetCoordFromObj(interp, canvas, objv[0], - &arcPtr->bbox[0]) != TCL_OK) + &arcPtr->bbox[0]) != TCL_OK) || (Tk_CanvasGetCoordFromObj(interp, canvas, objv[1], &arcPtr->bbox[1]) != TCL_OK) || (Tk_CanvasGetCoordFromObj(interp, canvas, objv[2], @@ -619,7 +619,7 @@ ComputeArcParametersFromHeight( */ if (arcPtr->height == 0) - return; + return; /* * Calculate the chord length, return early if it is too small. @@ -629,8 +629,8 @@ ComputeArcParametersFromHeight( arcPtr->startPoint[0] - arcPtr->endPoint[0]); if (chordLen < DBL_EPSILON) { - arcPtr->start = arcPtr->extent = arcPtr->height = 0; - return; + arcPtr->start = arcPtr->extent = arcPtr->height = 0; + return; } chordDir[0] = (arcPtr->endPoint[0] - arcPtr->startPoint[0]) / chordLen; diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c index 38f758f..6d9fe79 100644 --- a/generic/tkCanvImg.c +++ b/generic/tkCanvImg.c @@ -24,12 +24,11 @@ typedef struct ImageItem { double x, y; /* Coordinates of positioning point for * image. */ Tk_Anchor anchor; /* Where to anchor image relative to (x,y). */ - char *imageString; /* String describing -image option - * (malloc-ed). NULL means no image right - * now. */ - char *activeImageString; /* String describing -activeimage option. + Tcl_Obj *imageObj; /* -image option. * NULL means no image right now. */ - char *disabledImageString; /* String describing -disabledimage option. + Tcl_Obj *activeImageObj; /* -activeimage option. + * NULL means no image right now. */ + Tcl_Obj *disabledImageObj; /* -disabledimage option. * NULL means no image right now. */ Tk_Image image; /* Image to display in window, or NULL if no * image at present. */ @@ -52,13 +51,13 @@ static const Tk_CustomOption tagsOption = { static const Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_STRING, "-activeimage", NULL, NULL, - NULL, offsetof(ImageItem, activeImageString), TK_CONFIG_NULL_OK, NULL}, + NULL, offsetof(ImageItem, activeImageObj), TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_ANCHOR, "-anchor", NULL, NULL, "center", offsetof(ImageItem, anchor), TK_CONFIG_DONT_SET_DEFAULT, NULL}, {TK_CONFIG_STRING, "-disabledimage", NULL, NULL, - NULL, offsetof(ImageItem, disabledImageString), TK_CONFIG_NULL_OK, NULL}, + NULL, offsetof(ImageItem, disabledImageObj), TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_STRING, "-image", NULL, NULL, - NULL, offsetof(ImageItem, imageString), TK_CONFIG_NULL_OK, NULL}, + NULL, offsetof(ImageItem, imageObj), TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_CUSTOM, "-state", NULL, NULL, NULL, offsetof(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption}, {TK_CONFIG_CUSTOM, "-tags", NULL, NULL, @@ -173,9 +172,9 @@ CreateImage( imgPtr->canvas = canvas; imgPtr->anchor = TK_ANCHOR_CENTER; - imgPtr->imageString = NULL; - imgPtr->activeImageString = NULL; - imgPtr->disabledImageString = NULL; + imgPtr->imageObj = NULL; + imgPtr->activeImageObj = NULL; + imgPtr->disabledImageObj = NULL; imgPtr->image = NULL; imgPtr->activeImage = NULL; imgPtr->disabledImage = NULL; @@ -256,7 +255,7 @@ ImageCoords( if ((Tk_CanvasGetCoordFromObj(interp, canvas, objv[0], &imgPtr->x) != TCL_OK) || (Tk_CanvasGetCoordFromObj(interp, canvas, objv[1], - &imgPtr->y) != TCL_OK)) { + &imgPtr->y) != TCL_OK)) { return TCL_ERROR; } ComputeImageBbox(canvas, imgPtr); @@ -313,13 +312,13 @@ ConfigureImage( * changed. */ - if (imgPtr->activeImageString != NULL) { + if (imgPtr->activeImageObj != NULL) { itemPtr->redraw_flags |= TK_ITEM_STATE_DEPENDANT; } else { itemPtr->redraw_flags &= ~TK_ITEM_STATE_DEPENDANT; } - if (imgPtr->imageString != NULL) { - image = Tk_GetImage(interp, tkwin, imgPtr->imageString, + if (imgPtr->imageObj != NULL) { + image = Tk_GetImage(interp, tkwin, Tcl_GetString(imgPtr->imageObj), ImageChangedProc, imgPtr); if (image == NULL) { return TCL_ERROR; @@ -331,8 +330,8 @@ ConfigureImage( Tk_FreeImage(imgPtr->image); } imgPtr->image = image; - if (imgPtr->activeImageString != NULL) { - image = Tk_GetImage(interp, tkwin, imgPtr->activeImageString, + if (imgPtr->activeImageObj != NULL) { + image = Tk_GetImage(interp, tkwin, Tcl_GetString(imgPtr->activeImageObj), ImageChangedProc, imgPtr); if (image == NULL) { return TCL_ERROR; @@ -344,8 +343,8 @@ ConfigureImage( Tk_FreeImage(imgPtr->activeImage); } imgPtr->activeImage = image; - if (imgPtr->disabledImageString != NULL) { - image = Tk_GetImage(interp, tkwin, imgPtr->disabledImageString, + if (imgPtr->disabledImageObj != NULL) { + image = Tk_GetImage(interp, tkwin, Tcl_GetString(imgPtr->disabledImageObj), ImageChangedProc, imgPtr); if (image == NULL) { return TCL_ERROR; @@ -386,14 +385,14 @@ DeleteImage( { ImageItem *imgPtr = (ImageItem *) itemPtr; - if (imgPtr->imageString != NULL) { - ckfree(imgPtr->imageString); + if (imgPtr->imageObj != NULL) { + Tcl_DecrRefCount(imgPtr->imageObj); } - if (imgPtr->activeImageString != NULL) { - ckfree(imgPtr->activeImageString); + if (imgPtr->activeImageObj != NULL) { + Tcl_DecrRefCount(imgPtr->activeImageObj); } - if (imgPtr->disabledImageString != NULL) { - ckfree(imgPtr->disabledImageString); + if (imgPtr->disabledImageObj != NULL) { + Tcl_DecrRefCount(imgPtr->disabledImageObj); } if (imgPtr->image != NULL) { Tk_FreeImage(imgPtr->image); @@ -526,7 +525,7 @@ static void DisplayImage( Tk_Canvas canvas, /* Canvas that contains item. */ Tk_Item *itemPtr, /* Item to be displayed. */ - Display *display, /* Display on which to draw item. */ + TCL_UNUSED(Display *), /* Display on which to draw item. */ Drawable drawable, /* Pixmap or window in which to draw item. */ int x, int y, int width, int height) /* Describes region of canvas that must be @@ -536,7 +535,6 @@ DisplayImage( short drawableX, drawableY; Tk_Image image; Tk_State state = itemPtr->state; - (void)display; if (state == TK_STATE_NULL) { state = Canvas(canvas)->canvas_state; @@ -722,7 +720,7 @@ ImageToPostscript( * Image item without actual image specified. */ - return TCL_OK; + return TCL_OK; } Tk_SizeOfImage(image, &width, &height); diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index d03d364..0b04353 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -187,7 +187,7 @@ static const Tk_ConfigSpec configSpecs[] = { NULL, offsetof(LineItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, - "0", offsetof(LineItem, outline.offset), TK_CONFIG_DONT_SET_DEFAULT, NULL}, + "0", offsetof(LineItem, outline.offsetObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL, NULL, offsetof(LineItem, outline.disabledDash), TK_CONFIG_NULL_OK, &dashOption}, @@ -704,10 +704,10 @@ ComputeLineBbox( width = 1.0; } if (linePtr->arrow != ARROWS_NONE) { - if (linePtr->arrow != ARROWS_LAST) { + if (linePtr->arrow != ARROWS_LAST && linePtr->firstArrowPtr) { TkIncludePoint((Tk_Item *) linePtr, linePtr->firstArrowPtr); } - if (linePtr->arrow != ARROWS_FIRST) { + if (linePtr->arrow != ARROWS_FIRST && linePtr->lastArrowPtr) { TkIncludePoint((Tk_Item *) linePtr, linePtr->lastArrowPtr); } } @@ -1018,7 +1018,7 @@ LineInsert( newCoordPtr[i+objc] = linePtr->coordPtr[i]; } if (linePtr->coordPtr) { - ckfree(linePtr->coordPtr); + ckfree(linePtr->coordPtr); } linePtr->coordPtr = newCoordPtr; length += objc ; diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c index f40a922..dfb0c75 100644 --- a/generic/tkCanvPoly.c +++ b/generic/tkCanvPoly.c @@ -95,8 +95,7 @@ static const Tk_ConfigSpec configSpecs[] = { NULL, offsetof(PolygonItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, - "0", offsetof(PolygonItem, outline.offset), - TK_CONFIG_DONT_SET_DEFAULT, NULL}, + "0", offsetof(PolygonItem, outline.offsetObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL, NULL, offsetof(PolygonItem, outline.disabledDash), TK_CONFIG_NULL_OK, &dashOption}, @@ -680,7 +679,7 @@ ComputePolygonBbox( if (index < 0) { index += (polyPtr->numPoints - polyPtr->autoClosed) * 2; } - tsoffset->xoffset = (int) (polyPtr->coordPtr[index] + 0.5); + tsoffset->xoffset = (int) (polyPtr->coordPtr[index] + 0.5); tsoffset->yoffset = (int) (polyPtr->coordPtr[index+1] + 0.5); } else { if (tsoffset->flags & TK_OFFSET_LEFT) { @@ -1100,7 +1099,7 @@ PolygonInsert( * [5fb8145997]. */ - double width; + double width; int j; itemPtr->redraw_flags |= TK_ITEM_DONT_REDRAW; diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c index 856bb4e..a47dfce 100644 --- a/generic/tkCanvPs.c +++ b/generic/tkCanvPs.c @@ -44,33 +44,30 @@ typedef struct TkPostscriptInfo { int x, y, width, height; /* Area to print, in canvas pixel * coordinates. */ int x2, y2; /* x+width and y+height. */ - char *pageXString; /* String value of "-pagex" option or NULL. */ - char *pageYString; /* String value of "-pagey" option or NULL. */ + Tcl_Obj *pageXObj; /* Value of "-pagex" option or NULL. */ + Tcl_Obj *pageYObj; /* Value of "-pagey" option or NULL. */ double pageX, pageY; /* Postscript coordinates (in points) * corresponding to pageXString and * pageYString. Don't forget that y-values * grow upwards for Postscript! */ - char *pageWidthString; /* Printed width of output. */ - char *pageHeightString; /* Printed height of output. */ + Tcl_Obj *pageWidthObj; /* Printed width of output. */ + Tcl_Obj *pageHeightObj; /* Printed height of output. */ double scale; /* Scale factor for conversion: each pixel * maps into this many points. */ Tk_Anchor pageAnchor; /* How to anchor bbox on Postscript page. */ int rotate; /* Non-zero means output should be rotated on * page (landscape mode). */ - char *fontVar; /* If non-NULL, gives name of global variable - * containing font mapping information. - * Malloc'ed. */ - char *colorVar; /* If non-NULL, give name of global variable - * containing color mapping information. - * Malloc'ed. */ - char *colorMode; /* Mode for handling colors: "monochrome", - * "gray", or "color". Malloc'ed. */ + Tcl_Obj *fontVarObj; /* If non-NULL, gives name of global variable + * containing font mapping information. */ + Tcl_Obj *colorVarObj; /* If non-NULL, give name of global variable + * containing color mapping information. */ + Tcl_Obj *colorModeObj; /* Mode for handling colors: "monochrome", + * "gray", or "color". */ int colorLevel; /* Numeric value corresponding to colorMode: 0 * for mono, 1 for gray, 2 for color. */ - char *fileName; /* Name of file in which to write Postscript; - * NULL means return Postscript info as - * result. Malloc'ed. */ - char *channelName; /* If -channel is specified, the name of the + Tcl_Obj *fileNameObj; /* Name of file in which to write Postscript; + * NULL means return Postscript info as result. */ + Tcl_Obj *channelNameObj; /* If -channel is specified, the name of the * channel to use. */ Tcl_Channel chan; /* Open channel corresponding to fileName. */ Tcl_HashTable fontTable; /* Hash table containing names of all font @@ -94,27 +91,27 @@ typedef struct TkPostscriptInfo { static const Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_STRING, "-colormap", NULL, NULL, - "", offsetof(TkPostscriptInfo, colorVar), 0, NULL}, + "", offsetof(TkPostscriptInfo, colorVarObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_STRING, "-colormode", NULL, NULL, - "", offsetof(TkPostscriptInfo, colorMode), 0, NULL}, + "", offsetof(TkPostscriptInfo, colorModeObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_STRING, "-file", NULL, NULL, - "", offsetof(TkPostscriptInfo, fileName), 0, NULL}, + "", offsetof(TkPostscriptInfo, fileNameObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_STRING, "-channel", NULL, NULL, - "", offsetof(TkPostscriptInfo, channelName), 0, NULL}, + "", offsetof(TkPostscriptInfo, channelNameObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_STRING, "-fontmap", NULL, NULL, - "", offsetof(TkPostscriptInfo, fontVar), 0, NULL}, + "", offsetof(TkPostscriptInfo, fontVarObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_PIXELS, "-height", NULL, NULL, "", offsetof(TkPostscriptInfo, height), 0, NULL}, {TK_CONFIG_ANCHOR, "-pageanchor", NULL, NULL, "", offsetof(TkPostscriptInfo, pageAnchor), 0, NULL}, {TK_CONFIG_STRING, "-pageheight", NULL, NULL, - "", offsetof(TkPostscriptInfo, pageHeightString), 0, NULL}, + "", offsetof(TkPostscriptInfo, pageHeightObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_STRING, "-pagewidth", NULL, NULL, - "", offsetof(TkPostscriptInfo, pageWidthString), 0, NULL}, + "", offsetof(TkPostscriptInfo, pageWidthObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_STRING, "-pagex", NULL, NULL, - "", offsetof(TkPostscriptInfo, pageXString), 0, NULL}, + "", offsetof(TkPostscriptInfo, pageXObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_STRING, "-pagey", NULL, NULL, - "", offsetof(TkPostscriptInfo, pageYString), 0, NULL}, + "", offsetof(TkPostscriptInfo, pageYObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_BOOLEAN, "-prolog", NULL, NULL, "", offsetof(TkPostscriptInfo, prolog), 0, NULL}, {TK_CONFIG_BOOLEAN, "-rotate", NULL, NULL, @@ -133,7 +130,7 @@ static const Tk_ConfigSpec configSpecs[] = { */ static int GetPostscriptPoints(Tcl_Interp *interp, - char *string, double *doublePtr); + Tcl_Obj *value, double *doublePtr); static void PostscriptBitmap(Tk_Window tkwin, Pixmap bitmap, int startX, int startY, int width, int height, Tcl_Obj *psObj); @@ -216,21 +213,21 @@ TkCanvPostscriptObjCmd( psInfo.y = canvasPtr->yOrigin; psInfo.width = -1; psInfo.height = -1; - psInfo.pageXString = NULL; - psInfo.pageYString = NULL; + psInfo.pageXObj = NULL; + psInfo.pageYObj = NULL; psInfo.pageX = 72*4.25; psInfo.pageY = 72*5.5; - psInfo.pageWidthString = NULL; - psInfo.pageHeightString = NULL; + psInfo.pageWidthObj = NULL; + psInfo.pageHeightObj = NULL; psInfo.scale = 1.0; psInfo.pageAnchor = TK_ANCHOR_CENTER; psInfo.rotate = 0; - psInfo.fontVar = NULL; - psInfo.colorVar = NULL; - psInfo.colorMode = NULL; + psInfo.fontVarObj = NULL; + psInfo.colorVarObj = NULL; + psInfo.colorModeObj = NULL; psInfo.colorLevel = 0; - psInfo.fileName = NULL; - psInfo.channelName = NULL; + psInfo.fileNameObj = NULL; + psInfo.channelNameObj = NULL; psInfo.chan = NULL; psInfo.prepass = 0; psInfo.prolog = 1; @@ -251,26 +248,26 @@ TkCanvPostscriptObjCmd( psInfo.x2 = psInfo.x + psInfo.width; psInfo.y2 = psInfo.y + psInfo.height; - if (psInfo.pageXString != NULL) { - if (GetPostscriptPoints(interp, psInfo.pageXString, + if (psInfo.pageXObj != NULL) { + if (GetPostscriptPoints(interp, psInfo.pageXObj, &psInfo.pageX) != TCL_OK) { goto cleanup; } } - if (psInfo.pageYString != NULL) { - if (GetPostscriptPoints(interp, psInfo.pageYString, + if (psInfo.pageYObj != NULL) { + if (GetPostscriptPoints(interp, psInfo.pageYObj, &psInfo.pageY) != TCL_OK) { goto cleanup; } } - if (psInfo.pageWidthString != NULL) { - if (GetPostscriptPoints(interp, psInfo.pageWidthString, + if (psInfo.pageWidthObj != NULL) { + if (GetPostscriptPoints(interp, psInfo.pageWidthObj, &psInfo.scale) != TCL_OK) { goto cleanup; } psInfo.scale /= psInfo.width; - } else if (psInfo.pageHeightString != NULL) { - if (GetPostscriptPoints(interp, psInfo.pageHeightString, + } else if (psInfo.pageHeightObj != NULL) { + if (GetPostscriptPoints(interp, psInfo.pageHeightObj, &psInfo.scale) != TCL_OK) { goto cleanup; } @@ -310,32 +307,32 @@ TkCanvPostscriptObjCmd( break; } - if (psInfo.colorMode == NULL) { + if (psInfo.colorModeObj == NULL) { psInfo.colorLevel = 2; } else { - length = strlen(psInfo.colorMode); - if (strncmp(psInfo.colorMode, "monochrome", length) == 0) { + length = strlen(Tcl_GetString(psInfo.colorModeObj)); + if (strncmp(Tcl_GetString(psInfo.colorModeObj), "monochrome", length) == 0) { psInfo.colorLevel = 0; - } else if (strncmp(psInfo.colorMode, "gray", length) == 0) { + } else if (strncmp(Tcl_GetString(psInfo.colorModeObj), "gray", length) == 0) { psInfo.colorLevel = 1; - } else if (strncmp(psInfo.colorMode, "color", length) == 0) { + } else if (strncmp(Tcl_GetString(psInfo.colorModeObj), "color", length) == 0) { psInfo.colorLevel = 2; } else { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad color mode \"%s\": must be monochrome, gray, or color", - psInfo.colorMode)); + Tcl_GetString(psInfo.colorModeObj))); Tcl_SetErrorCode(interp, "TK", "CANVAS", "PS", "COLORMODE", (char *)NULL); result = TCL_ERROR; goto cleanup; } } - if (psInfo.fileName != NULL) { + if (psInfo.fileNameObj != NULL) { /* * Check that -file and -channel are not both specified. */ - if (psInfo.channelName != NULL) { + if (psInfo.channelNameObj != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't specify both -file and -channel", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TK", "CANVAS", "PS", "USAGE", (char *)NULL); @@ -356,7 +353,7 @@ TkCanvPostscriptObjCmd( goto cleanup; } - p = Tcl_TranslateFileName(interp, psInfo.fileName, &buffer); + p = Tcl_TranslateFileName(interp, Tcl_GetString(psInfo.fileNameObj), &buffer); if (p == NULL) { goto cleanup; } @@ -367,7 +364,7 @@ TkCanvPostscriptObjCmd( } } - if (psInfo.channelName != NULL) { + if (psInfo.channelNameObj != NULL) { int mode; /* @@ -375,7 +372,7 @@ TkCanvPostscriptObjCmd( * open for writing. */ - psInfo.chan = Tcl_GetChannel(interp, psInfo.channelName, &mode); + psInfo.chan = Tcl_GetChannel(interp, Tcl_GetString(psInfo.channelNameObj), &mode); if (psInfo.chan == NULL) { result = TCL_ERROR; goto cleanup; @@ -383,7 +380,7 @@ TkCanvPostscriptObjCmd( if (!(mode & TCL_WRITABLE)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "channel \"%s\" wasn't opened for writing", - psInfo.channelName)); + Tcl_GetString(psInfo.channelNameObj))); Tcl_SetErrorCode(interp, "TK", "CANVAS", "PS", "UNWRITABLE", (char *)NULL); result = TCL_ERROR; goto cleanup; @@ -619,35 +616,35 @@ TkCanvPostscriptObjCmd( */ cleanup: - if (psInfo.pageXString != NULL) { - ckfree(psInfo.pageXString); + if (psInfo.pageXObj != NULL) { + Tcl_DecrRefCount(psInfo.pageXObj); } - if (psInfo.pageYString != NULL) { - ckfree(psInfo.pageYString); + if (psInfo.pageYObj != NULL) { + Tcl_DecrRefCount(psInfo.pageYObj); } - if (psInfo.pageWidthString != NULL) { - ckfree(psInfo.pageWidthString); + if (psInfo.pageWidthObj != NULL) { + Tcl_DecrRefCount(psInfo.pageWidthObj); } - if (psInfo.pageHeightString != NULL) { - ckfree(psInfo.pageHeightString); + if (psInfo.pageHeightObj != NULL) { + Tcl_DecrRefCount(psInfo.pageHeightObj); } - if (psInfo.fontVar != NULL) { - ckfree(psInfo.fontVar); + if (psInfo.fontVarObj != NULL) { + Tcl_DecrRefCount(psInfo.fontVarObj); } - if (psInfo.colorVar != NULL) { - ckfree(psInfo.colorVar); + if (psInfo.colorVarObj != NULL) { + Tcl_DecrRefCount(psInfo.colorVarObj); } - if (psInfo.colorMode != NULL) { - ckfree(psInfo.colorMode); + if (psInfo.colorModeObj != NULL) { + Tcl_DecrRefCount(psInfo.colorModeObj); } - if (psInfo.fileName != NULL) { - ckfree(psInfo.fileName); + if (psInfo.fileNameObj != NULL) { + Tcl_DecrRefCount(psInfo.fileNameObj); } - if ((psInfo.chan != NULL) && (psInfo.channelName == NULL)) { + if ((psInfo.chan != NULL) && (psInfo.channelNameObj == NULL)) { Tcl_Close(interp, psInfo.chan); } - if (psInfo.channelName != NULL) { - ckfree(psInfo.channelName); + if (psInfo.channelNameObj != NULL) { + Tcl_DecrRefCount(psInfo.channelNameObj); } Tcl_DeleteHashTable(&psInfo.fontTable); canvasPtr->psInfo = (Tk_PostscriptInfo) oldInfoPtr; @@ -708,8 +705,8 @@ Tk_PostscriptColor( * map and use the Postscript commands found there, if there are any. */ - if (psInfoPtr->colorVar != NULL) { - const char *cmdString = Tcl_GetVar2(interp, psInfoPtr->colorVar, + if (psInfoPtr->colorVarObj != NULL) { + const char *cmdString = Tcl_GetVar2(interp, Tcl_GetString(psInfoPtr->colorVarObj), Tk_NameOfColor(colorPtr), 0); if (cmdString != NULL) { @@ -780,12 +777,12 @@ Tk_PostscriptFont( * name and size. Use this information. */ - if (psInfoPtr->fontVar != NULL) { + if (psInfoPtr->fontVarObj != NULL) { const char *name = Tk_NameOfFont(tkfont); Tcl_Obj **objv; Tcl_Size objc; double size; - Tcl_Obj *list = Tcl_GetVar2Ex(interp, psInfoPtr->fontVar, name, 0); + Tcl_Obj *list = Tcl_GetVar2Ex(interp, Tcl_GetString(psInfoPtr->fontVarObj), name, 0); if (list != NULL) { if (Tcl_ListObjGetElements(interp, list, &objc, &objv) != TCL_OK @@ -907,7 +904,7 @@ PostscriptBitmap( * syntactically correct. */ - Tcl_AppendToObj(psObj, "<>", TCL_INDEX_NONE); + Tcl_AppendToObj(psObj, "<>", TCL_INDEX_NONE); return; } @@ -1101,14 +1098,14 @@ Tk_PostscriptPath( static int GetPostscriptPoints( Tcl_Interp *interp, /* Use this for error reporting. */ - char *string, /* String describing a screen distance. */ + Tcl_Obj *value, /* Describing a screen distance. */ double *doublePtr) /* Place to store converted result. */ { - const char *rest; + const char *rest, *string = Tcl_GetString(value); double d; Tcl_DString ds; - if (Tcl_GetDouble(NULL, string, &d) == TCL_OK) { + if (Tcl_GetDoubleFromObj(NULL, value, &d) == TCL_OK) { *doublePtr = d; return TCL_OK; } diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index 285adcd..e3dbe66 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -54,7 +54,7 @@ typedef struct TextItem { Pixmap activeStipple; /* Stipple bitmap for text, or None. */ Pixmap disabledStipple; /* Stipple bitmap for text, or None. */ char *text; /* Text for item (malloc-ed). */ - int width; /* Width of lines for word-wrap, pixels. Zero + Tcl_Obj *widthObj; /* Width of lines for word-wrap, pixels. Zero * means no word-wrap. */ int underline; /* Index of character to put underline beneath * or INT_MIN for no underlining. */ @@ -209,7 +209,7 @@ static const Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_CUSTOM, "-underline", NULL, NULL, NULL, offsetof(TextItem, underline), TK_CONFIG_NULL_OK, &underlineOption}, {TK_CONFIG_PIXELS, "-width", NULL, NULL, - "0", offsetof(TextItem, width), TK_CONFIG_DONT_SET_DEFAULT, NULL}, + "0", offsetof(TextItem, widthObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL} }; @@ -346,7 +346,7 @@ CreateText( textPtr->activeStipple = None; textPtr->disabledStipple = None; textPtr->text = NULL; - textPtr->width = 0; + textPtr->widthObj = NULL; textPtr->underline = INT_MIN; textPtr->angle = 0.0; @@ -724,8 +724,12 @@ ComputeTextBbox( } Tk_FreeTextLayout(textPtr->textLayout); + width = 0; + if (textPtr->widthObj) { + Tk_GetPixelsFromObj(NULL, Tk_CanvasTkwin(canvas), textPtr->widthObj, &width); + } textPtr->textLayout = Tk_ComputeTextLayout(textPtr->tkfont, - textPtr->text, textPtr->numChars, textPtr->width, + textPtr->text, textPtr->numChars, width, textPtr->justify, 0, &width, &height); if (state == TK_STATE_HIDDEN || textPtr->color == NULL) { @@ -795,6 +799,8 @@ ComputeTextBbox( */ textInfoPtr = textPtr->textInfoPtr; + Tk_GetPixelsFromObj(NULL, Tk_CanvasTkwin(canvas), (Tcl_Obj *)textInfoPtr->reserved2, &textInfoPtr->insertWidth); + Tk_GetPixelsFromObj(NULL, Tk_CanvasTkwin(canvas), (Tcl_Obj *)textInfoPtr->reserved3, &textInfoPtr->selBorderWidth); fudge = (textInfoPtr->insertWidth + 1) / 2; if (textInfoPtr->selBorderWidth > fudge) { fudge = textInfoPtr->selBorderWidth; @@ -943,6 +949,7 @@ DisplayCanvText( x = xFirst; height = hFirst; + Tk_GetPixelsFromObj(NULL, Tk_CanvasTkwin(canvas), (Tcl_Obj *)textInfoPtr->reserved3, &textInfoPtr->selBorderWidth); for (y = yFirst ; y <= yLast; y += height) { int dx1, dy1, dx2, dy2; double s = textPtr->sine, c = textPtr->cosine; @@ -989,6 +996,7 @@ DisplayCanvText( double s = textPtr->sine, c = textPtr->cosine; XPoint points[4]; + Tk_GetPixelsFromObj(NULL, Tk_CanvasTkwin(canvas), (Tcl_Obj *)textInfoPtr->reserved2, &textInfoPtr->insertWidth); dx1 = x - (textInfoPtr->insertWidth / 2); dy1 = y; dx2 = textInfoPtr->insertWidth; @@ -1005,6 +1013,7 @@ DisplayCanvText( Tk_SetCaretPos(Tk_CanvasTkwin(canvas), points[0].x, points[0].y, height); if (textInfoPtr->cursorOn) { + Tk_GetPixelsFromObj(NULL, Tk_CanvasTkwin(canvas), (Tcl_Obj *)textInfoPtr->reserved1, &textInfoPtr->insertBorderWidth); Tk_Fill3DPolygon(Tk_CanvasTkwin(canvas), drawable, textInfoPtr->insertBorder, points, 4, textInfoPtr->insertBorderWidth, TK_RELIEF_RAISED); diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c index 252bfb8..aabba2b 100644 --- a/generic/tkCanvUtil.c +++ b/generic/tkCanvUtil.c @@ -971,6 +971,9 @@ Tk_CreateOutline( outline->activeWidth = 0.0; outline->disabledWidth = 0.0; outline->offset = 0; + outline->offsetObj = NULL; + outline->reserved2 = NULL; + outline->reserved3 = NULL; outline->dash.number = 0; outline->activeDash.number = 0; outline->disabledDash.number = 0; @@ -1140,6 +1143,10 @@ Tk_ConfigOutlineGC( } if (mask && (dash->number != 0)) { gcValues->line_style = LineOnOffDash; + if (outline->offsetObj && Tk_GetPixelsFromObj(NULL, Canvas(canvas)->tkwin, + outline->offsetObj, &outline->offset) != TCL_OK) { + outline->offset = 0; + } gcValues->dash_offset = outline->offset; if ((unsigned int)ABS(dash->number) > sizeof(char *)) { gcValues->dashes = dash->pattern.pt[0]; @@ -1188,6 +1195,10 @@ Tk_ChangeOutlineGC( if (width < 1.0) { width = 1.0; } + if (outline->offsetObj && Tk_GetPixelsFromObj(NULL, Canvas(canvas)->tkwin, + outline->offsetObj, &outline->offset) != TCL_OK) { + outline->offset = 0; + } dash = &(outline->dash); color = outline->color; stipple = outline->stipple; @@ -1306,6 +1317,10 @@ Tk_ResetOutlineGC( if (width < 1.0) { width = 1.0; } + if (outline->offsetObj && Tk_GetPixelsFromObj(NULL, Canvas(canvas)->tkwin, + outline->offsetObj, &outline->offset) != TCL_OK) { + outline->offset = 0; + } dash = &(outline->dash); color = outline->color; stipple = outline->stipple; @@ -1430,6 +1445,10 @@ Tk_CanvasPsOutline( } } + if (outline->offsetObj && Tk_GetPixelsFromObj(NULL, Canvas(canvas)->tkwin, + outline->offsetObj, &outline->offset) != TCL_OK) { + outline->offset = 0; + } Tcl_AppendPrintfToObj(psObj, "%.15g setlinewidth\n", width); ptr = ((unsigned) ABS(dash->number) > sizeof(char *)) ? diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c index 1187613..e1cfe10 100644 --- a/generic/tkCanvWind.c +++ b/generic/tkCanvWind.c @@ -803,7 +803,7 @@ WinItemToPostscript( Tk_Window tkwin = winItemPtr->tkwin; if (prepass || winItemPtr->tkwin == NULL) { - return TCL_OK; + return TCL_OK; } width = Tk_Width(tkwin); diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 6796ddd..3cb66fe 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -101,7 +101,7 @@ static const Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_SYNONYM, "-bd", "borderWidth", NULL, NULL, 0, 0, NULL}, {TK_CONFIG_SYNONYM, "-bg", "background", NULL, NULL, 0, 0, NULL}, {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_CANVAS_BORDER_WIDTH, offsetof(TkCanvas, borderWidth), 0, NULL}, + DEF_CANVAS_BORDER_WIDTH, offsetof(TkCanvas, borderWidthObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_DOUBLE, "-closeenough", "closeEnough", "CloseEnough", DEF_CANVAS_CLOSE_ENOUGH, offsetof(TkCanvas, closeEnough), 0, NULL}, {TK_CONFIG_BOOLEAN, "-confine", "confine", "Confine", @@ -109,7 +109,7 @@ static const Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor", DEF_CANVAS_CURSOR, offsetof(TkCanvas, cursor), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_PIXELS, "-height", "height", "Height", - DEF_CANVAS_HEIGHT, offsetof(TkCanvas, height), 0, NULL}, + DEF_CANVAS_HEIGHT, offsetof(TkCanvas, heightObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_CANVAS_HIGHLIGHT_BG, offsetof(TkCanvas, highlightBgColorPtr), 0, NULL}, @@ -117,29 +117,29 @@ static const Tk_ConfigSpec configSpecs[] = { DEF_CANVAS_HIGHLIGHT, offsetof(TkCanvas, highlightColorPtr), 0, NULL}, {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", - DEF_CANVAS_HIGHLIGHT_WIDTH, offsetof(TkCanvas, highlightWidth), 0, NULL}, + DEF_CANVAS_HIGHLIGHT_WIDTH, offsetof(TkCanvas, highlightWidthObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_BORDER, "-insertbackground", "insertBackground", "Foreground", DEF_CANVAS_INSERT_BG, offsetof(TkCanvas, textInfo.insertBorder), 0, NULL}, {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth", - DEF_CANVAS_INSERT_BD_COLOR, - offsetof(TkCanvas, textInfo.insertBorderWidth), TK_CONFIG_COLOR_ONLY, NULL}, + DEF_CANVAS_INSERT_BD_COLOR, offsetof(TkCanvas, textInfo.reserved1), + TK_CONFIG_OBJS|TK_CONFIG_COLOR_ONLY, NULL}, {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth", - DEF_CANVAS_INSERT_BD_MONO, - offsetof(TkCanvas, textInfo.insertBorderWidth), TK_CONFIG_MONO_ONLY, NULL}, + DEF_CANVAS_INSERT_BD_MONO, offsetof(TkCanvas, textInfo.reserved1), + TK_CONFIG_OBJS|TK_CONFIG_MONO_ONLY, NULL}, {TK_CONFIG_INT, "-insertofftime", "insertOffTime", "OffTime", DEF_CANVAS_INSERT_OFF_TIME, offsetof(TkCanvas, insertOffTime), 0, NULL}, {TK_CONFIG_INT, "-insertontime", "insertOnTime", "OnTime", DEF_CANVAS_INSERT_ON_TIME, offsetof(TkCanvas, insertOnTime), 0, NULL}, {TK_CONFIG_PIXELS, "-insertwidth", "insertWidth", "InsertWidth", - DEF_CANVAS_INSERT_WIDTH, offsetof(TkCanvas, textInfo.insertWidth), 0, NULL}, + DEF_CANVAS_INSERT_WIDTH, offsetof(TkCanvas, textInfo.reserved2), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_CUSTOM, "-offset", "offset", "Offset", "0,0", offsetof(TkCanvas, tsoffset),TK_CONFIG_DONT_SET_DEFAULT, &offsetOption}, {TK_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_CANVAS_RELIEF, offsetof(TkCanvas, relief), 0, NULL}, {TK_CONFIG_STRING, "-scrollregion", "scrollRegion", "ScrollRegion", - DEF_CANVAS_SCROLL_REGION, offsetof(TkCanvas, regionString), - TK_CONFIG_NULL_OK, NULL}, + DEF_CANVAS_SCROLL_REGION, offsetof(TkCanvas, regionObj), + TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground", DEF_CANVAS_SELECT_COLOR, offsetof(TkCanvas, textInfo.selBorder), TK_CONFIG_COLOR_ONLY, NULL}, @@ -147,11 +147,11 @@ static const Tk_ConfigSpec configSpecs[] = { DEF_CANVAS_SELECT_MONO, offsetof(TkCanvas, textInfo.selBorder), TK_CONFIG_MONO_ONLY, NULL}, {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", - DEF_CANVAS_SELECT_BD_COLOR, - offsetof(TkCanvas, textInfo.selBorderWidth), TK_CONFIG_COLOR_ONLY, NULL}, + DEF_CANVAS_SELECT_BD_COLOR, offsetof(TkCanvas, textInfo.reserved3), + TK_CONFIG_OBJS|TK_CONFIG_COLOR_ONLY, NULL}, {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", - DEF_CANVAS_SELECT_BD_MONO, offsetof(TkCanvas, textInfo.selBorderWidth), - TK_CONFIG_MONO_ONLY, NULL}, + DEF_CANVAS_SELECT_BD_MONO, offsetof(TkCanvas, textInfo.reserved3), + TK_CONFIG_OBJS|TK_CONFIG_MONO_ONLY, NULL}, {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background", DEF_CANVAS_SELECT_FG_COLOR, offsetof(TkCanvas, textInfo.selFgColorPtr), TK_CONFIG_COLOR_ONLY|TK_CONFIG_NULL_OK, NULL}, @@ -162,24 +162,24 @@ static const Tk_ConfigSpec configSpecs[] = { "normal", offsetof(TkCanvas, canvas_state), TK_CONFIG_DONT_SET_DEFAULT, &stateOption}, {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus", - DEF_CANVAS_TAKE_FOCUS, offsetof(TkCanvas, takeFocus), - TK_CONFIG_NULL_OK, NULL}, + DEF_CANVAS_TAKE_FOCUS, offsetof(TkCanvas, takeFocusObj), + TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_PIXELS, "-width", "width", "Width", - DEF_CANVAS_WIDTH, offsetof(TkCanvas, width), 0, NULL}, + DEF_CANVAS_WIDTH, offsetof(TkCanvas, widthObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand", - DEF_CANVAS_X_SCROLL_CMD, offsetof(TkCanvas, xScrollCmd), - TK_CONFIG_NULL_OK, NULL}, + DEF_CANVAS_X_SCROLL_CMD, offsetof(TkCanvas, xScrollCmdObj), + TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_PIXELS, "-xscrollincrement", "xScrollIncrement", "ScrollIncrement", - DEF_CANVAS_X_SCROLL_INCREMENT, offsetof(TkCanvas, xScrollIncrement), - 0, NULL}, + DEF_CANVAS_X_SCROLL_INCREMENT, offsetof(TkCanvas, xScrollIncrementObj), + TK_CONFIG_OBJS, NULL}, {TK_CONFIG_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand", - DEF_CANVAS_Y_SCROLL_CMD, offsetof(TkCanvas, yScrollCmd), - TK_CONFIG_NULL_OK, NULL}, + DEF_CANVAS_Y_SCROLL_CMD, offsetof(TkCanvas, yScrollCmdObj), + TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_PIXELS, "-yscrollincrement", "yScrollIncrement", "ScrollIncrement", - DEF_CANVAS_Y_SCROLL_INCREMENT, offsetof(TkCanvas, yScrollIncrement), - 0, NULL}, + DEF_CANVAS_Y_SCROLL_INCREMENT, offsetof(TkCanvas, yScrollIncrementObj), + TK_CONFIG_OBJS, NULL}, {TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL} }; @@ -266,7 +266,7 @@ static Tcl_Obj * ScrollFractions(int screen1, int screen2, int object1, int object2); static int RelinkItems(TkCanvas *canvasPtr, Tcl_Obj *tag, Tk_Item *prevPtr, TagSearch **searchPtrPtr); -static void TagSearchExprInit(TagSearchExpr **exprPtrPtr); +static void TagSearchExprInit(TagSearchExpr **exprPtrPtr); static void TagSearchExprDestroy(TagSearchExpr *expr); static void TagSearchDestroy(TagSearch *searchPtr); static int TagSearchScan(TkCanvas *canvasPtr, @@ -678,19 +678,20 @@ Tk_CanvasObjCmd( CanvasCmdDeletedProc); canvasPtr->firstItemPtr = NULL; canvasPtr->lastItemPtr = NULL; - canvasPtr->borderWidth = 0; + canvasPtr->borderWidthObj = NULL; canvasPtr->bgBorder = NULL; canvasPtr->relief = TK_RELIEF_FLAT; - canvasPtr->highlightWidth = 0; + canvasPtr->highlightWidthObj = NULL; canvasPtr->highlightBgColorPtr = NULL; canvasPtr->highlightColorPtr = NULL; canvasPtr->inset = 0; canvasPtr->pixmapGC = NULL; - canvasPtr->width = None; - canvasPtr->height = None; + canvasPtr->widthObj = NULL; + canvasPtr->heightObj = NULL; canvasPtr->confine = 0; canvasPtr->textInfo.selBorder = NULL; canvasPtr->textInfo.selBorderWidth = 0; + canvasPtr->textInfo.reserved3 = NULL; canvasPtr->textInfo.selFgColorPtr = NULL; canvasPtr->textInfo.selItemPtr = NULL; canvasPtr->textInfo.selectFirst = TCL_INDEX_NONE; @@ -699,7 +700,9 @@ Tk_CanvasObjCmd( canvasPtr->textInfo.selectAnchor = 0; canvasPtr->textInfo.insertBorder = NULL; canvasPtr->textInfo.insertWidth = 0; + canvasPtr->textInfo.reserved2 = NULL; canvasPtr->textInfo.insertBorderWidth = 0; + canvasPtr->textInfo.reserved1 = NULL; canvasPtr->textInfo.focusItemPtr = NULL; canvasPtr->textInfo.gotFocus = 0; canvasPtr->textInfo.cursorOn = 0; @@ -716,15 +719,15 @@ Tk_CanvasObjCmd( canvasPtr->pickEvent.xcrossing.x = 0; canvasPtr->pickEvent.xcrossing.y = 0; canvasPtr->state = 0; - canvasPtr->xScrollCmd = NULL; - canvasPtr->yScrollCmd = NULL; + canvasPtr->xScrollCmdObj = NULL; + canvasPtr->yScrollCmdObj = NULL; canvasPtr->scrollX1 = 0; canvasPtr->scrollY1 = 0; canvasPtr->scrollX2 = 0; canvasPtr->scrollY2 = 0; - canvasPtr->regionString = NULL; - canvasPtr->xScrollIncrement = 0; - canvasPtr->yScrollIncrement = 0; + canvasPtr->regionObj = NULL; + canvasPtr->xScrollIncrementObj = NULL; + canvasPtr->yScrollIncrementObj = NULL; canvasPtr->scanX = 0; canvasPtr->scanXOrigin = 0; canvasPtr->scanY = 0; @@ -732,7 +735,7 @@ Tk_CanvasObjCmd( canvasPtr->hotPtr = NULL; canvasPtr->hotPrevPtr = NULL; canvasPtr->cursor = NULL; - canvasPtr->takeFocus = NULL; + canvasPtr->takeFocusObj = NULL; canvasPtr->pixelsPerMM = WidthOfScreen(Tk_Screen(newWin)); canvasPtr->pixelsPerMM /= WidthMMOfScreen(Tk_Screen(newWin)); canvasPtr->flags = 0; @@ -806,7 +809,7 @@ CanvasWidgetCmd( "canvasy", "cget", "configure", "coords", "create", "dchars", "delete", "dtag", "find", "focus", "gettags", "icursor", - "image", "imove", "index", "insert", + "image", "imove", "index", "insert", "itemcget", "itemconfigure", "lower", "move", "moveto", "postscript", "raise", "rchars", "rotate", "scale", @@ -818,7 +821,7 @@ CanvasWidgetCmd( CANV_CANVASY, CANV_CGET, CANV_CONFIGURE, CANV_COORDS, CANV_CREATE, CANV_DCHARS, CANV_DELETE, CANV_DTAG, CANV_FIND, CANV_FOCUS, CANV_GETTAGS, CANV_ICURSOR, - CANV_IMAGE, CANV_IMOVE, CANV_INDEX, CANV_INSERT, + CANV_IMAGE, CANV_IMOVE, CANV_INDEX, CANV_INSERT, CANV_ITEMCGET, CANV_ITEMCONFIGURE, CANV_LOWER, CANV_MOVE, CANV_MOVETO, CANV_POSTSCRIPT, CANV_RAISE, CANV_RCHARS, CANV_ROTATE, CANV_SCALE, @@ -963,7 +966,7 @@ CanvasWidgetCmd( * If new tag expression, then insert in linked list. */ - TagSearchExpr *expr, **lastPtr; + TagSearchExpr *expr, **lastPtr; lastPtr = &(canvasPtr->bindTagExprs); while ((expr = *lastPtr) != NULL) { @@ -1420,21 +1423,21 @@ CanvasWidgetCmd( for (i = itemPtr->numTags-1; i != TCL_INDEX_NONE; i--) { if (itemPtr->tagPtr[i] == tag) { - /* - * Don't shuffle the tags sequence: memmove the tags. - */ + /* + * Don't shuffle the tags sequence: memmove the tags. + */ - memmove((void *)(itemPtr->tagPtr + i), - itemPtr->tagPtr + i + 1, - (itemPtr->numTags - (i+1)) * sizeof(Tk_Uid)); + memmove((void *)(itemPtr->tagPtr + i), + itemPtr->tagPtr + i + 1, + (itemPtr->numTags - (i+1)) * sizeof(Tk_Uid)); itemPtr->numTags--; - /* - * There must be no break here: all tags with the same name must - * be deleted. - */ + /* + * There must be no break here: all tags with the same name must + * be deleted. + */ - } + } } } break; @@ -1798,15 +1801,15 @@ CanvasWidgetCmd( x1 = itemPtr->x1; y1 = itemPtr->y1; x2 = itemPtr->x2; y2 = itemPtr->y2; - itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW; + itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW; ItemDelChars(canvasPtr, itemPtr, first, last); dontRedraw1 = itemPtr->redraw_flags & TK_ITEM_DONT_REDRAW; - itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW; + itemPtr->redraw_flags &= ~TK_ITEM_DONT_REDRAW; ItemInsert(canvasPtr, itemPtr, first, objv[5]); dontRedraw2 = itemPtr->redraw_flags & TK_ITEM_DONT_REDRAW; - if (!(dontRedraw1 && dontRedraw2)) { + if (!(dontRedraw1 && dontRedraw2)) { Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr, x1, y1, x2, y2); EventuallyRedrawItem(canvasPtr, itemPtr); @@ -2054,16 +2057,19 @@ CanvasWidgetCmd( break; case TK_SCROLL_PAGES: newX = (int) (canvasPtr->xOrigin + count * .9 - * (Tk_Width(canvasPtr->tkwin) - 2*canvasPtr->inset)); + * (Tk_Width(canvasPtr->tkwin) - 2 * canvasPtr->inset)); break; - case TK_SCROLL_UNITS: - if (canvasPtr->xScrollIncrement > 0) { - newX = canvasPtr->xOrigin + count*canvasPtr->xScrollIncrement; + case TK_SCROLL_UNITS: { + int xScrollIncrement; + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->xScrollIncrementObj, &xScrollIncrement); + if (xScrollIncrement > 0) { + newX = canvasPtr->xOrigin + count * xScrollIncrement; } else { newX = (int) (canvasPtr->xOrigin + count * .1 - * (Tk_Width(canvasPtr->tkwin) - 2*canvasPtr->inset)); + * (Tk_Width(canvasPtr->tkwin) - 2 * canvasPtr->inset)); } break; + } default: result = TCL_ERROR; goto done; @@ -2094,16 +2100,19 @@ CanvasWidgetCmd( break; case TK_SCROLL_PAGES: newY = (int) (canvasPtr->yOrigin + count * .9 - * (Tk_Height(canvasPtr->tkwin) - 2*canvasPtr->inset)); + * (Tk_Height(canvasPtr->tkwin) - 2 * canvasPtr->inset)); break; - case TK_SCROLL_UNITS: - if (canvasPtr->yScrollIncrement > 0) { - newY = canvasPtr->yOrigin + count*canvasPtr->yScrollIncrement; + case TK_SCROLL_UNITS: { + int yScrollIncrement; + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->yScrollIncrementObj, &yScrollIncrement); + if (yScrollIncrement > 0) { + newY = canvasPtr->yOrigin + count * yScrollIncrement; } else { newY = (int) (canvasPtr->yOrigin + count * .1 - * (Tk_Height(canvasPtr->tkwin) - 2*canvasPtr->inset)); + * (Tk_Height(canvasPtr->tkwin) - 2 * canvasPtr->inset)); } break; + } default: result = TCL_ERROR; goto done; @@ -2112,44 +2121,44 @@ CanvasWidgetCmd( break; } case CANV_IMAGE: { - Tk_PhotoHandle photohandle; - int subsample = 1, zoom = 1; + Tk_PhotoHandle photohandle; + int subsample = 1, zoom = 1; - if (objc < 3 || objc > 5) { - Tcl_WrongNumArgs(interp, 2, objv, "imagename ?subsample? ?zoom?"); - result = TCL_ERROR; - goto done; - } + if (objc < 3 || objc > 5) { + Tcl_WrongNumArgs(interp, 2, objv, "imagename ?subsample? ?zoom?"); + result = TCL_ERROR; + goto done; + } - if ((photohandle = Tk_FindPhoto(interp, Tcl_GetString(objv[2]) )) == 0) { - result = TCL_ERROR; - goto done; - } + if ((photohandle = Tk_FindPhoto(interp, Tcl_GetString(objv[2]) )) == 0) { + result = TCL_ERROR; + goto done; + } - /* - * If we are given a subsample or a zoom then grab them. - */ + /* + * If we are given a subsample or a zoom then grab them. + */ - if (objc >= 4 && Tcl_GetIntFromObj(interp, objv[3], &subsample) != TCL_OK) { - result = TCL_ERROR; - goto done; - } - if (objc >= 5 && Tcl_GetIntFromObj(interp, objv[4], &zoom) != TCL_OK) { - result = TCL_ERROR; - goto done; - } + if (objc >= 4 && Tcl_GetIntFromObj(interp, objv[3], &subsample) != TCL_OK) { + result = TCL_ERROR; + goto done; + } + if (objc >= 5 && Tcl_GetIntFromObj(interp, objv[4], &zoom) != TCL_OK) { + result = TCL_ERROR; + goto done; + } - /* - * Set the image size to zero, which allows the DrawCanvas() function - * to expand the image automatically when it copies the pixmap into it. - */ + /* + * Set the image size to zero, which allows the DrawCanvas() function + * to expand the image automatically when it copies the pixmap into it. + */ - if (Tk_PhotoSetSize(interp, photohandle, 0, 0) != TCL_OK) { - result = TCL_ERROR; - goto done; - } + if (Tk_PhotoSetSize(interp, photohandle, 0, 0) != TCL_OK) { + result = TCL_ERROR; + goto done; + } - result = DrawCanvas(interp, clientData, photohandle, subsample, zoom); + result = DrawCanvas(interp, clientData, photohandle, subsample, zoom); } } @@ -2259,6 +2268,8 @@ ConfigureCanvas( XGCValues gcValues; GC newGC; Tk_State old_canvas_state=canvasPtr->canvas_state; + int width, height, borderWidth, highlightWidth; + int xScrollIncrement, yScrollIncrement; if (Tk_ConfigureWidget(interp, canvasPtr->tkwin, configSpecs, objc, objv, canvasPtr, @@ -2273,10 +2284,70 @@ ConfigureCanvas( Tk_SetBackgroundFromBorder(canvasPtr->tkwin, canvasPtr->bgBorder); - if (canvasPtr->highlightWidth < 0) { - canvasPtr->highlightWidth = 0; + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->heightObj, &height); + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->highlightWidthObj, &highlightWidth); + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, (Tcl_Obj *)canvasPtr->textInfo.reserved1, &canvasPtr->textInfo.insertBorderWidth); + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, (Tcl_Obj *)canvasPtr->textInfo.reserved2, &canvasPtr->textInfo.insertWidth); + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, (Tcl_Obj *)canvasPtr->textInfo.reserved3, &canvasPtr->textInfo.selBorderWidth); + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->widthObj, &width); + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->xScrollIncrementObj, &xScrollIncrement); + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->yScrollIncrementObj, &yScrollIncrement); + if (borderWidth < 0) { + borderWidth = 0; + Tcl_DecrRefCount(canvasPtr->borderWidthObj); + canvasPtr->borderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(canvasPtr->borderWidthObj); + } + if (height < 0) { + height = 0; + Tcl_DecrRefCount(canvasPtr->heightObj); + canvasPtr->heightObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(canvasPtr->heightObj); + } + if (highlightWidth < 0) { + highlightWidth = 0; + Tcl_DecrRefCount(canvasPtr->highlightWidthObj); + canvasPtr->highlightWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(canvasPtr->highlightWidthObj); + } + if (width < 0) { + width = 0; + Tcl_DecrRefCount(canvasPtr->widthObj); + canvasPtr->widthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(canvasPtr->widthObj); + } + if (xScrollIncrement < 0) { + xScrollIncrement = 0; + Tcl_DecrRefCount(canvasPtr->xScrollIncrementObj); + canvasPtr->xScrollIncrementObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(canvasPtr->xScrollIncrementObj); + } + if (yScrollIncrement < 0) { + yScrollIncrement = 0; + Tcl_DecrRefCount(canvasPtr->yScrollIncrementObj); + canvasPtr->yScrollIncrementObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(canvasPtr->yScrollIncrementObj); + } + canvasPtr->inset = borderWidth + highlightWidth; + if (canvasPtr->textInfo.insertBorderWidth < 0) { + canvasPtr->textInfo.insertBorderWidth = 0; + Tcl_DecrRefCount((Tcl_Obj *)canvasPtr->textInfo.reserved1); + canvasPtr->textInfo.reserved1 = Tcl_NewIntObj(0); + Tcl_IncrRefCount((Tcl_Obj *)canvasPtr->textInfo.reserved1); + } + if (canvasPtr->textInfo.insertWidth < 0) { + canvasPtr->textInfo.insertWidth = 0; + Tcl_DecrRefCount((Tcl_Obj *)canvasPtr->textInfo.reserved2); + canvasPtr->textInfo.reserved2 = Tcl_NewIntObj(0); + Tcl_IncrRefCount((Tcl_Obj *)canvasPtr->textInfo.reserved2); + } + if (canvasPtr->textInfo.selBorderWidth < 0) { + canvasPtr->textInfo.selBorderWidth = 0; + Tcl_DecrRefCount((Tcl_Obj *)canvasPtr->textInfo.reserved3); + canvasPtr->textInfo.reserved3 = Tcl_NewIntObj(0); + Tcl_IncrRefCount((Tcl_Obj *)canvasPtr->textInfo.reserved3); } - canvasPtr->inset = canvasPtr->borderWidth + canvasPtr->highlightWidth; gcValues.function = GXcopy; gcValues.graphics_exposures = False; @@ -2297,7 +2368,7 @@ ConfigureCanvas( int result; for ( itemPtr = canvasPtr->firstItemPtr; itemPtr != NULL; - itemPtr = itemPtr->nextPtr) { + itemPtr = itemPtr->nextPtr) { if ( itemPtr->state == TK_STATE_NULL ) { result = (*itemPtr->typePtr->configProc)(canvasPtr->interp, (Tk_Canvas) canvasPtr, itemPtr, 0, NULL, @@ -2313,8 +2384,8 @@ ConfigureCanvas( * Reset the desired dimensions for the window. */ - Tk_GeometryRequest(canvasPtr->tkwin, canvasPtr->width + 2*canvasPtr->inset, - canvasPtr->height + 2*canvasPtr->inset); + Tk_GeometryRequest(canvasPtr->tkwin, width + 2 * canvasPtr->inset, + height + 2 * canvasPtr->inset); /* * Restart the cursor timing sequence in case the on-time or off-time just @@ -2333,22 +2404,22 @@ ConfigureCanvas( canvasPtr->scrollY1 = 0; canvasPtr->scrollX2 = 0; canvasPtr->scrollY2 = 0; - if (canvasPtr->regionString != NULL) { + if (canvasPtr->regionObj != NULL) { Tcl_Size argc2; const char **argv2; - if (Tcl_SplitList(canvasPtr->interp, canvasPtr->regionString, + if (Tcl_SplitList(canvasPtr->interp, Tcl_GetString(canvasPtr->regionObj), &argc2, &argv2) != TCL_OK) { return TCL_ERROR; } if (argc2 != 4) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "bad scrollRegion \"%s\"", canvasPtr->regionString)); + "bad scrollRegion \"%s\"", Tcl_GetString(canvasPtr->regionObj))); Tcl_SetErrorCode(interp, "TK", "CANVAS", "SCROLL_REGION", (char *)NULL); badRegion: - ckfree(canvasPtr->regionString); + Tcl_DecrRefCount(canvasPtr->regionObj); ckfree(argv2); - canvasPtr->regionString = NULL; + canvasPtr->regionObj = NULL; return TCL_ERROR; } if ((Tk_GetPixels(canvasPtr->interp, canvasPtr->tkwin, @@ -2368,16 +2439,16 @@ ConfigureCanvas( if (flags & TK_OFFSET_LEFT) { canvasPtr->tsoffset.xoffset = 0; } else if (flags & TK_OFFSET_CENTER) { - canvasPtr->tsoffset.xoffset = canvasPtr->width/2; + canvasPtr->tsoffset.xoffset = width / 2; } else if (flags & TK_OFFSET_RIGHT) { - canvasPtr->tsoffset.xoffset = canvasPtr->width; + canvasPtr->tsoffset.xoffset = width; } if (flags & TK_OFFSET_TOP) { canvasPtr->tsoffset.yoffset = 0; } else if (flags & TK_OFFSET_MIDDLE) { - canvasPtr->tsoffset.yoffset = canvasPtr->height/2; + canvasPtr->tsoffset.yoffset = height / 2; } else if (flags & TK_OFFSET_BOTTOM) { - canvasPtr->tsoffset.yoffset = canvasPtr->height; + canvasPtr->tsoffset.yoffset = height; } /* @@ -2421,6 +2492,10 @@ CanvasWorldChanged( TkCanvas *canvasPtr = (TkCanvas *)instanceData; Tk_Item *itemPtr; + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, (Tcl_Obj *)canvasPtr->textInfo.reserved1, &canvasPtr->textInfo.insertBorderWidth); + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, (Tcl_Obj *)canvasPtr->textInfo.reserved2, &canvasPtr->textInfo.insertWidth); + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, (Tcl_Obj *)canvasPtr->textInfo.reserved3, &canvasPtr->textInfo.selBorderWidth); + itemPtr = canvasPtr->firstItemPtr; for ( ; itemPtr != NULL; itemPtr = itemPtr->nextPtr) { if (ItemConfigure(canvasPtr, itemPtr, 0, NULL) != TCL_OK) { @@ -2466,31 +2541,31 @@ DecomposeMaskToShiftAndBits( */ for (i = 0; i < 32; ++i) { - if (mask & 1 << i) - break; + if (mask & 1 << i) + break; } if (i < 32) { - *shift = i; + *shift = i; - /* - * Now find the next '0' bit and the width of the mask. - */ + /* + * Now find the next '0' bit and the width of the mask. + */ - for ( ; i < 32; ++i) { - if ((mask & 1 << i) == 0) - break; - else - ++*bits; - } + for ( ; i < 32; ++i) { + if ((mask & 1 << i) == 0) + break; + else + ++*bits; + } - /* - * Limit to the top 8 bits if the mask was wider than 8. - */ + /* + * Limit to the top 8 bits if the mask was wider than 8. + */ - if (*bits > 8) { - *shift += *bits - 8; - *bits = 8; - } + if (*bits > 8) { + *shift += *bits - 8; + *bits = 8; + } } } @@ -2515,7 +2590,7 @@ DecomposeMaskToShiftAndBits( */ #define OVERDRAW_PIXELS 32 /* How much larger we make the pixmap - * that the canvas objects are drawn into */ + * that the canvas objects are drawn into */ #ifdef WORDS_BIGENDIAN #define IS_BIG_ENDIAN 1 @@ -2546,18 +2621,18 @@ DrawCanvas( GC xgc = 0; XGCValues xgcValues; int canvasX1, canvasY1, canvasX2, canvasY2, cWidth, cHeight, - pixmapX1, pixmapY1, pixmapX2, pixmapY2, pmWidth, pmHeight, - bitsPerPixel, bytesPerPixel, x, y, result = TCL_OK, - rshift, gshift, bshift, rbits, gbits, bbits; + pixmapX1, pixmapY1, pixmapX2, pixmapY2, pmWidth, pmHeight, + bitsPerPixel, bytesPerPixel, x, y, result = TCL_OK, + rshift, gshift, bshift, rbits, gbits, bbits; #ifdef DEBUG_DRAWCANVAS char buffer[128]; #endif if ((tkwin = canvasPtr->tkwin) == NULL) { - Tcl_AppendResult(interp, "canvas tkwin is NULL!", (char *)NULL); - result = TCL_ERROR; - goto done; + Tcl_AppendResult(interp, "canvas tkwin is NULL!", (char *)NULL); + result = TCL_ERROR; + goto done; } /* @@ -2568,21 +2643,21 @@ DrawCanvas( do { - if ((displayPtr = Tk_Display(tkwin)) == NULL) { - Tcl_AppendResult(interp, "canvas (or parent) display is NULL!", (char *)NULL); - result = TCL_ERROR; - goto done; - } + if ((displayPtr = Tk_Display(tkwin)) == NULL) { + Tcl_AppendResult(interp, "canvas (or parent) display is NULL!", (char *)NULL); + result = TCL_ERROR; + goto done; + } - if ((wid = Tk_WindowId(tkwin)) != 0) { - continue; - } + if ((wid = Tk_WindowId(tkwin)) != 0) { + continue; + } - if ((tkwin = Tk_Parent(tkwin)) == NULL) { - Tcl_AppendResult(interp, "canvas has no parent with a valid window id! Is the toplevel window mapped?", (char *)NULL); - result = TCL_ERROR; - goto done; - } + if ((tkwin = Tk_Parent(tkwin)) == NULL) { + Tcl_AppendResult(interp, "canvas has no parent with a valid window id! Is the toplevel window mapped?", (char *)NULL); + result = TCL_ERROR; + goto done; + } } while (wid == 0); @@ -2590,9 +2665,9 @@ DrawCanvas( visualPtr = Tk_Visual(tkwin); if (subsample == 0) { - Tcl_AppendResult(interp, "subsample cannot be zero", (char *)NULL); - result = TCL_ERROR; - goto done; + Tcl_AppendResult(interp, "subsample cannot be zero", (char *)NULL); + result = TCL_ERROR; + goto done; } /* @@ -2602,12 +2677,12 @@ DrawCanvas( */ for (itemPtr = canvasPtr -> firstItemPtr; itemPtr != NULL; - itemPtr = itemPtr -> nextPtr) { - if (itemPtr -> redraw_flags & FORCE_REDRAW) { - itemPtr -> redraw_flags &= ~FORCE_REDRAW; - EventuallyRedrawItem(canvasPtr, itemPtr); - itemPtr -> redraw_flags &= ~FORCE_REDRAW; - } + itemPtr = itemPtr -> nextPtr) { + if (itemPtr -> redraw_flags & FORCE_REDRAW) { + itemPtr -> redraw_flags &= ~FORCE_REDRAW; + EventuallyRedrawItem(canvasPtr, itemPtr); + itemPtr -> redraw_flags &= ~FORCE_REDRAW; + } } /* @@ -2618,23 +2693,23 @@ DrawCanvas( * of 0,0. */ if (canvasPtr->scrollX1 != 0 || canvasPtr->scrollY1 != 0 || - canvasPtr->scrollX2 != 0 || canvasPtr->scrollY2 != 0) { + canvasPtr->scrollX2 != 0 || canvasPtr->scrollY2 != 0) { - canvasX1 = canvasPtr->scrollX1; - canvasY1 = canvasPtr->scrollY1; - canvasX2 = canvasPtr->scrollX2; - canvasY2 = canvasPtr->scrollY2; - cWidth = canvasX2 - canvasX1 + 1; - cHeight = canvasY2 - canvasY1 + 1; + canvasX1 = canvasPtr->scrollX1; + canvasY1 = canvasPtr->scrollY1; + canvasX2 = canvasPtr->scrollX2; + canvasY2 = canvasPtr->scrollY2; + cWidth = canvasX2 - canvasX1 + 1; + cHeight = canvasY2 - canvasY1 + 1; } else { - cWidth = Tk_Width(tkwin); - cHeight = Tk_Height(tkwin); - canvasX1 = 0; - canvasY1 = 0; - canvasX2 = canvasX1 + cWidth - 1; - canvasY2 = canvasY1 + cHeight - 1; + cWidth = Tk_Width(tkwin); + cHeight = Tk_Height(tkwin); + canvasX1 = 0; + canvasY1 = 0; + canvasX2 = canvasX1 + cWidth - 1; + canvasY2 = canvasY1 + cHeight - 1; } /* @@ -2650,10 +2725,10 @@ DrawCanvas( pmWidth = pixmapX2 - pixmapX1 + 1; pmHeight = pixmapY2 - pixmapY1 + 1; if ((pixmap = Tk_GetPixmap(displayPtr, Tk_WindowId(tkwin), pmWidth, pmHeight, - bitsPerPixel)) == 0) { - Tcl_AppendResult(interp, "failed to create drawing Pixmap", (char *)NULL); - result = TCL_ERROR; - goto done; + bitsPerPixel)) == 0) { + Tcl_AppendResult(interp, "failed to create drawing Pixmap", (char *)NULL); + result = TCL_ERROR; + goto done; } /* @@ -2673,20 +2748,20 @@ DrawCanvas( canvasPtr->drawableXOrigin = pixmapX1; canvasPtr->drawableYOrigin = pixmapY1; for (itemPtr = canvasPtr->firstItemPtr; itemPtr != NULL; - itemPtr = itemPtr->nextPtr) { - if ((itemPtr->x1 >= pixmapX2) || (itemPtr->y1 >= pixmapY2) || - (itemPtr->x2 < pixmapX1) || (itemPtr->y2 < pixmapY1)) { - if (!AlwaysRedraw(itemPtr)) { - continue; - } - } - if (itemPtr->state == TK_STATE_HIDDEN || - (itemPtr->state == TK_STATE_NULL && canvasPtr->canvas_state - == TK_STATE_HIDDEN)) { - continue; - } - ItemDisplay(canvasPtr, itemPtr, pixmap, pixmapX1, pixmapY1, pmWidth, - pmHeight); + itemPtr = itemPtr->nextPtr) { + if ((itemPtr->x1 >= pixmapX2) || (itemPtr->y1 >= pixmapY2) || + (itemPtr->x2 < pixmapX1) || (itemPtr->y2 < pixmapY1)) { + if (!AlwaysRedraw(itemPtr)) { + continue; + } + } + if (itemPtr->state == TK_STATE_HIDDEN || + (itemPtr->state == TK_STATE_NULL && canvasPtr->canvas_state + == TK_STATE_HIDDEN)) { + continue; + } + ItemDisplay(canvasPtr, itemPtr, pixmap, pixmapX1, pixmapY1, pmWidth, + pmHeight); } /* @@ -2697,10 +2772,10 @@ DrawCanvas( */ if ((ximagePtr = XGetImage(displayPtr, pixmap, -pixmapX1, -pixmapY1, cWidth, - cHeight, AllPlanes, ZPixmap)) == NULL) { - Tcl_AppendResult(interp, "failed to copy Pixmap to XImage", (char *)NULL); - result = TCL_ERROR; - goto done; + cHeight, AllPlanes, ZPixmap)) == NULL) { + Tcl_AppendResult(interp, "failed to copy Pixmap to XImage", (char *)NULL); + result = TCL_ERROR; + goto done; } #ifdef DEBUG_DRAWCANVAS @@ -2713,18 +2788,18 @@ DrawCanvas( if (ximagePtr->data != NULL) { int ix, iy; - Tcl_AppendResult(interp, " {", (char *)NULL); + Tcl_AppendResult(interp, " {", (char *)NULL); for (iy = 0; iy < ximagePtr->height; ++ iy) { Tcl_AppendResult(interp, " {", (char *)NULL); for (ix = 0; ix < ximagePtr->bytes_per_line; ++ ix) { - if (ix > 0) { - if (ix % 4 == 0) - Tcl_AppendResult(interp, "-", (char *)NULL); - else - Tcl_AppendResult(interp, " ", (char *)NULL); - } - snprintf(buffer,sizeof(buffer),"%2.2x",ximagePtr->data[ximagePtr->bytes_per_line * iy + ix]&0xFF); - Tcl_AppendResult(interp, buffer, (char *)NULL); + if (ix > 0) { + if (ix % 4 == 0) + Tcl_AppendResult(interp, "-", (char *)NULL); + else + Tcl_AppendResult(interp, " ", (char *)NULL); + } + snprintf(buffer,sizeof(buffer),"%2.2x",ximagePtr->data[ximagePtr->bytes_per_line * iy + ix]&0xFF); + Tcl_AppendResult(interp, buffer, (char *)NULL); } Tcl_AppendResult(interp, " }", (char *)NULL); } @@ -2806,62 +2881,62 @@ DrawCanvas( for (y = 0; y < blockPtr.height; ++y) { #ifdef DEBUG_DRAWCANVAS - Tcl_AppendResult(interp, " {", (char *)NULL); + Tcl_AppendResult(interp, " {", (char *)NULL); #endif - for(x = 0; x < blockPtr.width; ++x) { - unsigned int pixel = 0; + for(x = 0; x < blockPtr.width; ++x) { + unsigned int pixel = 0; int pixel_offset = blockPtr.pitch * y + blockPtr.pixelSize * x; - switch (ximagePtr->bits_per_pixel) { - - /* - * Get an 8 bit pixel from the XImage. - */ - - case 8 : - pixel = *((unsigned char *)(ximagePtr->data + bytesPerPixel * x - + ximagePtr->bytes_per_line * y)); - break; - - /* - * Get a 16 bit pixel from the XImage, and correct the - * byte order as necessary. - */ - - case 16 : - pixel = *((unsigned short *)(ximagePtr->data + bytesPerPixel * x - + ximagePtr->bytes_per_line * y)); - if ((IS_BIG_ENDIAN && ximagePtr->byte_order == LSBFirst) - || (!IS_BIG_ENDIAN && ximagePtr->byte_order == MSBFirst)) - pixel = BYTE_SWAP16(pixel); - break; - - /* - * Grab a 32 bit pixel from the XImage, and correct the - * byte order as necessary. - */ - - case 32 : - pixel = *((unsigned int *)(ximagePtr->data + bytesPerPixel * x - + ximagePtr->bytes_per_line * y)); - if ((IS_BIG_ENDIAN && ximagePtr->byte_order == LSBFirst) - || (!IS_BIG_ENDIAN && ximagePtr->byte_order == MSBFirst)) - pixel = BYTE_SWAP32(pixel); - break; - } - - /* - * We have a pixel with the correct byte order, so pull out the - * colours and place them in the photo block. Perhaps we could - * just not bother with the alpha byte because we are using - * TK_PHOTO_COMPOSITE_SET later? - * ***Windows: We have to swap the red and blue values. The - * XImage storage is B - G - R - A which becomes a 32bit ARGB - * quad. However the visual mask is a 32bit ABGR quad. And - * Tk_PhotoPutBlock() wants R-G-B-A which is a 32bit ABGR quad. - * If the visual mask was correct there would be no need to - * swap anything here. - */ + switch (ximagePtr->bits_per_pixel) { + + /* + * Get an 8 bit pixel from the XImage. + */ + + case 8 : + pixel = *((unsigned char *)(ximagePtr->data + bytesPerPixel * x + + ximagePtr->bytes_per_line * y)); + break; + + /* + * Get a 16 bit pixel from the XImage, and correct the + * byte order as necessary. + */ + + case 16 : + pixel = *((unsigned short *)(ximagePtr->data + bytesPerPixel * x + + ximagePtr->bytes_per_line * y)); + if ((IS_BIG_ENDIAN && ximagePtr->byte_order == LSBFirst) + || (!IS_BIG_ENDIAN && ximagePtr->byte_order == MSBFirst)) + pixel = BYTE_SWAP16(pixel); + break; + + /* + * Grab a 32 bit pixel from the XImage, and correct the + * byte order as necessary. + */ + + case 32 : + pixel = *((unsigned int *)(ximagePtr->data + bytesPerPixel * x + + ximagePtr->bytes_per_line * y)); + if ((IS_BIG_ENDIAN && ximagePtr->byte_order == LSBFirst) + || (!IS_BIG_ENDIAN && ximagePtr->byte_order == MSBFirst)) + pixel = BYTE_SWAP32(pixel); + break; + } + + /* + * We have a pixel with the correct byte order, so pull out the + * colours and place them in the photo block. Perhaps we could + * just not bother with the alpha byte because we are using + * TK_PHOTO_COMPOSITE_SET later? + * ***Windows: We have to swap the red and blue values. The + * XImage storage is B - G - R - A which becomes a 32bit ARGB + * quad. However the visual mask is a 32bit ABGR quad. And + * Tk_PhotoPutBlock() wants R-G-B-A which is a 32bit ABGR quad. + * If the visual mask was correct there would be no need to + * swap anything here. + */ #ifdef _WIN32 #define R_OFFSET blockPtr.offset[2] @@ -2888,11 +2963,11 @@ DrawCanvas( *((unsigned int *) (blockPtr.pixelPtr + pixel_offset)) = pixel; } else { blockPtr.pixelPtr[pixel_offset + R_OFFSET] = - (unsigned char)((pixel & visualPtr->red_mask) >> rshift); + (unsigned char)((pixel & visualPtr->red_mask) >> rshift); blockPtr.pixelPtr[pixel_offset + G_OFFSET] = - (unsigned char)((pixel & visualPtr->green_mask) >> gshift); + (unsigned char)((pixel & visualPtr->green_mask) >> gshift); blockPtr.pixelPtr[pixel_offset + B_OFFSET] = - (unsigned char)((pixel & visualPtr->blue_mask) >> bshift); + (unsigned char)((pixel & visualPtr->blue_mask) >> bshift); blockPtr.pixelPtr[pixel_offset + A_OFFSET] = 0xFF; } @@ -2903,25 +2978,25 @@ DrawCanvas( blockPtr.pixelPtr[pixel_offset + 1], blockPtr.pixelPtr[pixel_offset + 2], blockPtr.pixelPtr[pixel_offset + 3]); - { + { int ix; - if (x > 0) - Tcl_AppendResult(interp, "-", (char *)NULL); - for (ix = 0; ix < 4; ++ix) { - if (ix > 0) - Tcl_AppendResult(interp, " ", (char *)NULL); + if (x > 0) + Tcl_AppendResult(interp, "-", (char *)NULL); + for (ix = 0; ix < 4; ++ix) { + if (ix > 0) + Tcl_AppendResult(interp, " ", (char *)NULL); snprintf(buffer,sizeof(buffer),"%2.2x", - blockPtr.pixelPtr[blockPtr.pitch * y - + blockPtr.pixelSize * x + ix]&0xFF); - Tcl_AppendResult(interp, buffer, (char *)NULL); - } - } + blockPtr.pixelPtr[blockPtr.pitch * y + + blockPtr.pixelSize * x + ix]&0xFF); + Tcl_AppendResult(interp, buffer, (char *)NULL); + } + } #endif - } + } #ifdef DEBUG_DRAWCANVAS - Tcl_AppendResult(interp, " }", (char *)NULL); + Tcl_AppendResult(interp, " }", (char *)NULL); #endif } @@ -2936,17 +3011,17 @@ DrawCanvas( */ if (subsample != 1 || zoom != 1) { - if ((result = Tk_PhotoPutZoomedBlock(interp, photohandle, &blockPtr, - 0, 0, cWidth * zoom / subsample, cHeight * zoom / subsample, - zoom, zoom, subsample, subsample, TK_PHOTO_COMPOSITE_SET)) - != TCL_OK) { - goto done; - } + if ((result = Tk_PhotoPutZoomedBlock(interp, photohandle, &blockPtr, + 0, 0, cWidth * zoom / subsample, cHeight * zoom / subsample, + zoom, zoom, subsample, subsample, TK_PHOTO_COMPOSITE_SET)) + != TCL_OK) { + goto done; + } } else { - if ((result = Tk_PhotoPutBlock(interp, photohandle, &blockPtr, 0, 0, - cWidth, cHeight, TK_PHOTO_COMPOSITE_SET)) != TCL_OK) { - goto done; - } + if ((result = Tk_PhotoPutBlock(interp, photohandle, &blockPtr, 0, 0, + cWidth, cHeight, TK_PHOTO_COMPOSITE_SET)) != TCL_OK) { + goto done; + } } /* @@ -2955,13 +3030,13 @@ DrawCanvas( done: if (blockPtr.pixelPtr) - ckfree(blockPtr.pixelPtr); + ckfree(blockPtr.pixelPtr); if (pixmap) - Tk_FreePixmap(Tk_Display(tkwin), pixmap); + Tk_FreePixmap(Tk_Display(tkwin), pixmap); if (ximagePtr) - XDestroyImage(ximagePtr); + XDestroyImage(ximagePtr); if (xgc) - XFreeGC(displayPtr,xgc); + XFreeGC(displayPtr,xgc); return result; } @@ -2992,10 +3067,7 @@ DisplayCanvas( Tk_Item *itemPtr; Pixmap pixmap; int screenX1, screenX2, screenY1, screenY2, width, height; -#ifdef MAC_OSX_TK - TkWindow *winPtr; - MacDrawable *macWin; -#endif + int borderWidth, highlightWidth; if (canvasPtr->tkwin == NULL) { return; @@ -3005,19 +3077,6 @@ DisplayCanvas( goto done; } -#ifdef MAC_OSX_TK - /* - * If drawing is disabled, all we need to do is - * clear the REDRAW_PENDING flag. - */ - winPtr = (TkWindow *)(canvasPtr->tkwin); - macWin = winPtr->privatePtr; - if (macWin && (macWin->flags & TK_DO_NOT_DRAW)){ - canvasPtr->flags &= ~REDRAW_PENDING; - return; - } -#endif - /* * Choose a new current item if that is needed (this could cause event * handlers to be invoked). @@ -3186,17 +3245,18 @@ DisplayCanvas( */ borders: + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->highlightWidthObj, &highlightWidth); if (canvasPtr->flags & REDRAW_BORDERS) { canvasPtr->flags &= ~REDRAW_BORDERS; - if (canvasPtr->borderWidth > 0) { + if (borderWidth > 0) { Tk_Draw3DRectangle(tkwin, Tk_WindowId(tkwin), - canvasPtr->bgBorder, canvasPtr->highlightWidth, - canvasPtr->highlightWidth, - Tk_Width(tkwin) - 2*canvasPtr->highlightWidth, - Tk_Height(tkwin) - 2*canvasPtr->highlightWidth, - canvasPtr->borderWidth, canvasPtr->relief); + canvasPtr->bgBorder, highlightWidth, highlightWidth, + Tk_Width(tkwin) - 2 * highlightWidth, + Tk_Height(tkwin) - 2 * highlightWidth, + borderWidth, canvasPtr->relief); } - if (canvasPtr->highlightWidth > 0) { + if (highlightWidth > 0) { GC fgGC, bgGC; bgGC = Tk_GCForColor(canvasPtr->highlightBgColorPtr, @@ -3204,11 +3264,11 @@ DisplayCanvas( if (canvasPtr->textInfo.gotFocus) { fgGC = Tk_GCForColor(canvasPtr->highlightColorPtr, Tk_WindowId(tkwin)); - Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, - canvasPtr->highlightWidth, Tk_WindowId(tkwin)); + Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, + highlightWidth, Tk_WindowId(tkwin)); } else { - Tk_DrawHighlightBorder(tkwin, bgGC, bgGC, - canvasPtr->highlightWidth, Tk_WindowId(tkwin)); + Tk_DrawHighlightBorder(tkwin, bgGC, bgGC, + highlightWidth, Tk_WindowId(tkwin)); } } } @@ -3388,7 +3448,7 @@ Tk_CanvasEventuallyRedraw( } if ((x1 >= x2) || (y1 >= y2) || - (x2 < canvasPtr->xOrigin) || (y2 < canvasPtr->yOrigin) || + (x2 < canvasPtr->xOrigin) || (y2 < canvasPtr->yOrigin) || (x1 >= canvasPtr->xOrigin + Tk_Width(canvasPtr->tkwin)) || (y1 >= canvasPtr->yOrigin + Tk_Height(canvasPtr->tkwin))) { return; @@ -3446,7 +3506,7 @@ EventuallyRedrawItem( return; } if ((itemPtr->x1 >= itemPtr->x2) || (itemPtr->y1 >= itemPtr->y2) || - (itemPtr->x2 < canvasPtr->xOrigin) || + (itemPtr->x2 < canvasPtr->xOrigin) || (itemPtr->y2 < canvasPtr->yOrigin) || (itemPtr->x1 >= canvasPtr->xOrigin+Tk_Width(canvasPtr->tkwin)) || (itemPtr->y1 >= canvasPtr->yOrigin+Tk_Height(canvasPtr->tkwin))) { @@ -3694,7 +3754,7 @@ TagSearchExprDestroy( TagSearchExpr *expr) { if (expr != NULL) { - if (expr->uids) { + if (expr->uids) { ckfree(expr->uids); } ckfree(expr); @@ -5302,9 +5362,9 @@ PickCurrentItem( for (i = itemPtr->numTags-1; i != TCL_INDEX_NONE; i--) { if (itemPtr->tagPtr[i] == searchUids->currentUid) /* then */ { - memmove((void *)(itemPtr->tagPtr + i), - itemPtr->tagPtr + i + 1, - (itemPtr->numTags - (i+1)) * sizeof(Tk_Uid)); + memmove((void *)(itemPtr->tagPtr + i), + itemPtr->tagPtr + i + 1, + (itemPtr->numTags - (i+1)) * sizeof(Tk_Uid)); itemPtr->numTags--; break; } @@ -5473,7 +5533,7 @@ CanvasDoEvent( expr = canvasPtr->bindTagExprs; while (expr) { expr->index = 0; - expr->match = TagSearchEvalExpr(expr, itemPtr); + expr->match = TagSearchEvalExpr(expr, itemPtr); if (expr->match) { numExprs++; } @@ -5499,7 +5559,7 @@ CanvasDoEvent( i = itemPtr->numTags+2; expr = canvasPtr->bindTagExprs; while (expr) { - if (expr->match) { + if (expr->match) { objectPtr[i++] = (int *) expr->uid; } expr = expr->next; @@ -5582,6 +5642,8 @@ CanvasFocusProc( int gotFocus) /* 1 means window is getting focus, 0 means * it's losing it. */ { + int highlightWidth; + Tcl_DeleteTimerHandler(canvasPtr->insertBlinkHandler); if (gotFocus) { canvasPtr->textInfo.gotFocus = 1; @@ -5596,7 +5658,8 @@ CanvasFocusProc( canvasPtr->insertBlinkHandler = NULL; } EventuallyRedrawItem(canvasPtr, canvasPtr->textInfo.focusItemPtr); - if (canvasPtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { canvasPtr->flags |= REDRAW_BORDERS; if (!(canvasPtr->flags & REDRAW_PENDING)) { Tcl_DoWhenIdle(DisplayCanvas, canvasPtr); @@ -5843,7 +5906,7 @@ CanvasUpdateScrollbars( Tcl_Interp *interp; int xOrigin, yOrigin, inset, width, height; int scrollX1, scrollX2, scrollY1, scrollY2; - char *xScrollCmd, *yScrollCmd; + Tcl_Obj *xScrollCmdObj, *yScrollCmdObj; Tcl_DString buf; /* @@ -5853,13 +5916,13 @@ CanvasUpdateScrollbars( interp = canvasPtr->interp; Tcl_Preserve(interp); - xScrollCmd = canvasPtr->xScrollCmd; - if (xScrollCmd != NULL) { - Tcl_Preserve(xScrollCmd); + xScrollCmdObj = canvasPtr->xScrollCmdObj; + if (xScrollCmdObj != NULL) { + Tcl_IncrRefCount(xScrollCmdObj); } - yScrollCmd = canvasPtr->yScrollCmd; - if (yScrollCmd != NULL) { - Tcl_Preserve(yScrollCmd); + yScrollCmdObj = canvasPtr->yScrollCmdObj; + if (yScrollCmdObj != NULL) { + Tcl_IncrRefCount(yScrollCmdObj); } xOrigin = canvasPtr->xOrigin; yOrigin = canvasPtr->yOrigin; @@ -5871,12 +5934,12 @@ CanvasUpdateScrollbars( scrollY1 = canvasPtr->scrollY1; scrollY2 = canvasPtr->scrollY2; canvasPtr->flags &= ~UPDATE_SCROLLBARS; - if (canvasPtr->xScrollCmd != NULL) { + if (canvasPtr->xScrollCmdObj != NULL) { Tcl_Obj *fractions = ScrollFractions(xOrigin + inset, xOrigin + width - inset, scrollX1, scrollX2); Tcl_DStringInit(&buf); - Tcl_DStringAppend(&buf, xScrollCmd, TCL_INDEX_NONE); + Tcl_DStringAppend(&buf, Tcl_GetString(xScrollCmdObj), TCL_INDEX_NONE); Tcl_DStringAppend(&buf, " ", TCL_INDEX_NONE); Tcl_DStringAppend(&buf, Tcl_GetString(fractions), TCL_INDEX_NONE); result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), TCL_INDEX_NONE, TCL_EVAL_GLOBAL); @@ -5886,15 +5949,15 @@ CanvasUpdateScrollbars( Tcl_BackgroundException(interp, result); } Tcl_ResetResult(interp); - Tcl_Release(xScrollCmd); + Tcl_DecrRefCount(xScrollCmdObj); } - if (yScrollCmd != NULL) { + if (yScrollCmdObj != NULL) { Tcl_Obj *fractions = ScrollFractions(yOrigin + inset, yOrigin + height - inset, scrollY1, scrollY2); Tcl_DStringInit(&buf); - Tcl_DStringAppend(&buf, yScrollCmd, TCL_INDEX_NONE); + Tcl_DStringAppend(&buf, Tcl_GetString(yScrollCmdObj), TCL_INDEX_NONE); Tcl_DStringAppend(&buf, " ", TCL_INDEX_NONE); Tcl_DStringAppend(&buf, Tcl_GetString(fractions), TCL_INDEX_NONE); result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), TCL_INDEX_NONE, TCL_EVAL_GLOBAL); @@ -5904,7 +5967,7 @@ CanvasUpdateScrollbars( Tcl_BackgroundException(interp, result); } Tcl_ResetResult(interp); - Tcl_Release(yScrollCmd); + Tcl_DecrRefCount(yScrollCmdObj); } Tcl_Release(interp); } @@ -5938,6 +6001,7 @@ CanvasSetOrigin( * window). */ { int left, right, top, bottom, delta; + int xScrollIncrement, yScrollIncrement; /* * If scroll increments have been set, round the window origin to the @@ -5945,26 +6009,28 @@ CanvasSetOrigin( * just inside the borders, not the upper left corner. */ - if (canvasPtr->xScrollIncrement > 0) { + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->xScrollIncrementObj, &xScrollIncrement); + Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->yScrollIncrementObj, &yScrollIncrement); + if (xScrollIncrement > 0) { if (xOrigin >= 0) { - xOrigin += canvasPtr->xScrollIncrement/2; + xOrigin += xScrollIncrement/2; xOrigin -= (xOrigin + canvasPtr->inset) - % canvasPtr->xScrollIncrement; + % xScrollIncrement; } else { - xOrigin = (-xOrigin) + canvasPtr->xScrollIncrement/2; + xOrigin = (-xOrigin) + xScrollIncrement/2; xOrigin = -(xOrigin - (xOrigin - canvasPtr->inset) - % canvasPtr->xScrollIncrement); + % xScrollIncrement); } } - if (canvasPtr->yScrollIncrement > 0) { + if (yScrollIncrement > 0) { if (yOrigin >= 0) { - yOrigin += canvasPtr->yScrollIncrement/2; + yOrigin += yScrollIncrement/2; yOrigin -= (yOrigin + canvasPtr->inset) - % canvasPtr->yScrollIncrement; + % yScrollIncrement; } else { - yOrigin = (-yOrigin) + canvasPtr->yScrollIncrement/2; + yOrigin = (-yOrigin) + yScrollIncrement/2; yOrigin = -(yOrigin - (yOrigin - canvasPtr->inset) - % canvasPtr->yScrollIncrement); + % yScrollIncrement); } } @@ -5979,7 +6045,7 @@ CanvasSetOrigin( * full increments. */ - if ((canvasPtr->confine) && (canvasPtr->regionString != NULL)) { + if ((canvasPtr->confine) && (canvasPtr->regionObj != NULL)) { left = xOrigin + canvasPtr->inset - canvasPtr->scrollX1; right = canvasPtr->scrollX2 - (xOrigin + Tk_Width(canvasPtr->tkwin) - canvasPtr->inset); @@ -5988,27 +6054,27 @@ CanvasSetOrigin( - (yOrigin + Tk_Height(canvasPtr->tkwin) - canvasPtr->inset); if ((left < 0) && (right > 0)) { delta = (right > -left) ? -left : right; - if (canvasPtr->xScrollIncrement > 0) { - delta -= delta % canvasPtr->xScrollIncrement; + if (xScrollIncrement > 0) { + delta -= delta % xScrollIncrement; } xOrigin += delta; } else if ((right < 0) && (left > 0)) { delta = (left > -right) ? -right : left; - if (canvasPtr->xScrollIncrement > 0) { - delta -= delta % canvasPtr->xScrollIncrement; + if (xScrollIncrement > 0) { + delta -= delta % xScrollIncrement; } xOrigin -= delta; } if ((top < 0) && (bottom > 0)) { delta = (bottom > -top) ? -top : bottom; - if (canvasPtr->yScrollIncrement > 0) { - delta -= delta % canvasPtr->yScrollIncrement; + if (yScrollIncrement > 0) { + delta -= delta % yScrollIncrement; } yOrigin += delta; } else if ((bottom < 0) && (top > 0)) { delta = (top > -bottom) ? -bottom : top; - if (canvasPtr->yScrollIncrement > 0) { - delta -= delta % canvasPtr->yScrollIncrement; + if (yScrollIncrement > 0) { + delta -= delta % yScrollIncrement; } yOrigin -= delta; } diff --git a/generic/tkCanvas.h b/generic/tkCanvas.h index 4adde33..4542ec1 100644 --- a/generic/tkCanvas.h +++ b/generic/tkCanvas.h @@ -60,11 +60,11 @@ typedef struct TkCanvas { * Information used when displaying widget: */ - int borderWidth; /* Width of 3-D border around window. */ + Tcl_Obj *borderWidthObj; /* Width of 3-D border around window. */ Tk_3DBorder bgBorder; /* Used for canvas background. */ int relief; /* Indicates whether window as a whole is * raised, sunken, or flat. */ - int highlightWidth; /* Width in pixels of highlight to draw around + Tcl_Obj *highlightWidthObj; /* Width in pixels of highlight to draw around * widget when it has the focus. <= 0 means * don't draw a highlight. */ XColor *highlightBgColorPtr; @@ -78,7 +78,7 @@ typedef struct TkCanvas { * borders. */ GC pixmapGC; /* Used to copy bits from a pixmap to the * screen and also to clear the pixmap. */ - int width, height; /* Dimensions to request for canvas window, + Tcl_Obj *widthObj, *heightObj; /* Dimensions to request for canvas window, * specified in pixels. */ int redrawX1, redrawY1; /* Upper left corner of area to redraw, in * pixel coordinates. Border pixels are @@ -155,25 +155,25 @@ typedef struct TkCanvas { * Information used for managing scrollbars: */ - char *xScrollCmd; /* Command prefix for communicating with + Tcl_Obj *xScrollCmdObj; /* Command prefix for communicating with * horizontal scrollbar. NULL means no - * horizontal scrollbar. Malloc'ed. */ - char *yScrollCmd; /* Command prefix for communicating with + * horizontal scrollbar. */ + Tcl_Obj *yScrollCmdObj; /* Command prefix for communicating with * vertical scrollbar. NULL means no vertical - * scrollbar. Malloc'ed. */ + * scrollbar. */ int scrollX1, scrollY1, scrollX2, scrollY2; /* These four coordinates define the region * that is the 100% area for scrolling (i.e. * these numbers determine the size and * location of the sliders on scrollbars). * Units are pixels in canvas coords. */ - char *regionString; /* The option string from which scrollX1 etc. - * are derived. Malloc'ed. */ - int xScrollIncrement; /* If >0, defines a grid for horizontal + Tcl_Obj *regionObj; /* The option string from which scrollX1 etc. + * are derived. */ + Tcl_Obj *xScrollIncrementObj; /* If >0, defines a grid for horizontal * scrolling. This is the size of the "unit", * and the left edge of the screen will always * lie on an even unit boundary. */ - int yScrollIncrement; /* If >0, defines a grid for horizontal + Tcl_Obj *yScrollIncrementObj; /* If >0, defines a grid for horizontal * scrolling. This is the size of the "unit", * and the left edge of the screen will always * lie on an even unit boundary. */ @@ -207,9 +207,9 @@ typedef struct TkCanvas { */ Tk_Cursor cursor; /* Current cursor for window, or NULL. */ - char *takeFocus; /* Value of -takefocus option; not used in the + Tcl_Obj *takeFocusObj; /* Value of -takefocus option; not used in the * C code, but used by keyboard traversal - * scripts. Malloc'ed, but may be NULL. */ + * scripts. May be NULL. */ double pixelsPerMM; /* Scale factor between MM and pixels; used * when converting coordinates. */ int flags; /* Various flags; see below for @@ -241,7 +241,7 @@ typedef struct TkCanvas { * * REDRAW_PENDING - 1 means a DoWhenIdle handler has already been * created to redraw some or all of the canvas. - * REDRAW_BORDERS - 1 means that the borders need to be redrawn + * REDRAW_BORDERS - 1 means that the borders need to be redrawn * during the next redisplay operation. * REPICK_NEEDED - 1 means DisplayCanvas should pick a new * current item before redrawing the canvas. @@ -292,7 +292,7 @@ typedef struct TkCanvas { MODULE_SCOPE int TkCanvPostscriptObjCmd(TkCanvas *canvasPtr, Tcl_Interp *interp, Tcl_Size argc, Tcl_Obj *const objv[]); -MODULE_SCOPE int TkCanvTranslatePath(TkCanvas *canvPtr, +MODULE_SCOPE int TkCanvTranslatePath(TkCanvas *canvPtr, int numVertex, double *coordPtr, int closed, XPoint *outPtr); /* diff --git a/generic/tkCmds.c b/generic/tkCmds.c index 0f1771f..d8532f7 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -1678,7 +1678,7 @@ Tk_WinfoObjCmd( if ((winPtr == NULL) || (winPtr->mainPtr != ((TkWindow *) tkwin)->mainPtr)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "window id \"%s\" doesn't exist in this application", + "window id \"%s\" does not exist in this application", string)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "WINDOW", string, (char *)NULL); return TCL_ERROR; @@ -1776,11 +1776,11 @@ Tk_WinfoObjCmd( { Colormap temp = Tk_Colormap(tkwin); Tk_Colormap(tkwin) = TK_DYNAMIC_COLORMAP; - colorPtr = Tk_GetColor(interp, tkwin, Tcl_GetString(objv[3])); + colorPtr = Tk_AllocColorFromObj(interp, tkwin, objv[3]); Tk_Colormap(tkwin) = temp; } #else - colorPtr = Tk_GetColor(interp, tkwin, Tcl_GetString(objv[3])); + colorPtr = Tk_AllocColorFromObj(interp, tkwin, objv[3]); #endif if (colorPtr == NULL) { return TCL_ERROR; @@ -1936,7 +1936,7 @@ TkDeadAppObjCmd( Tcl_Obj *const objv[]) /* Argument strings. */ { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "can't invoke \"%s\" command: application has been destroyed", + "cannot invoke \"%s\" command: application has been destroyed", Tcl_GetString(objv[0]))); return TCL_ERROR; } diff --git a/generic/tkColor.c b/generic/tkColor.c index b23255e..feaf93c 100644 --- a/generic/tkColor.c +++ b/generic/tkColor.c @@ -62,7 +62,7 @@ const TkObjType tkColorObjType = { DupColorObjProc, /* dupIntRepProc */ NULL, /* updateStringProc */ NULL, /* setFromAnyProc */ - TCL_OBJTYPE_V0}, + TCL_OBJTYPE_V1(TkLengthOne)}, 0 }; @@ -117,7 +117,6 @@ Tk_AllocColorFromObj( * This is a stale reference: it refers to a TkColor that's no * longer in use. Clear the reference. */ - FreeColorObj(objPtr); tkColPtr = NULL; } else if ((Tk_Screen(tkwin) == tkColPtr->screen) @@ -129,7 +128,7 @@ Tk_AllocColorFromObj( /* * The object didn't point to the TkColor that we wanted. Search the list - * of TkColors with the same name to see if one of the other TkColors is + * of TkColors with the same name to see if one of the saved TkColors is * the right one. */ @@ -156,6 +155,7 @@ Tk_AllocColorFromObj( tkColPtr = (TkColor *) Tk_GetColor(interp, tkwin, Tcl_GetString(objPtr)); objPtr->internalRep.twoPtrValue.ptr1 = tkColPtr; if (tkColPtr != NULL) { + /* The resourceRefCount is incremented by Tk_GetColor. */ tkColPtr->objRefCount++; } return (XColor *) tkColPtr; @@ -190,7 +190,7 @@ Tk_GetColor( Tcl_Interp *interp, /* Place to leave error message if color can't * be found. */ Tk_Window tkwin, /* Window in which color will be used. */ - Tk_Uid name) /* Name of color to be allocated (in form + const char *name) /* Name of color to be allocated (in form * suitable for passing to XParseColor). */ { Tcl_HashEntry *nameHashPtr; diff --git a/generic/tkConfig.c b/generic/tkConfig.c index 3336467..0402bd5 100644 --- a/generic/tkConfig.c +++ b/generic/tkConfig.c @@ -70,7 +70,7 @@ typedef struct TkOption { const Tk_OptionSpec *specPtr; /* The original spec from the template passed * to Tk_CreateOptionTable.*/ - Tk_Uid dbNameUID; /* The Uid form of the option database + Tk_Uid dbNameUID; /* The Uid form of the option database * name. */ Tk_Uid dbClassUID; /* The Uid form of the option database class * name. */ @@ -1397,7 +1397,7 @@ int Tk_SetOptions( Tcl_Interp *interp, /* Interpreter for error reporting. If NULL, * then no error message is returned.*/ - void *recordPtr, /* The record to configure. */ + void *recordPtr, /* The record to configure. */ Tk_OptionTable optionTable, /* Describes valid options. */ Tcl_Size objc, /* The number of elements in objv. */ Tcl_Obj *const objv[], /* Contains one or more name-value pairs. */ @@ -2111,7 +2111,7 @@ GetObjectForOption( internalPtr = (char *)recordPtr + optionPtr->specPtr->internalOffset; switch (optionPtr->specPtr->type) { case TK_OPTION_BOOLEAN: { - int value; + int value = -1; if (optionPtr->specPtr->flags & TYPE_MASK) { if ((optionPtr->specPtr->flags & TYPE_MASK) == TK_OPTION_VAR(char)) { value = *((signed char *)internalPtr); @@ -2129,7 +2129,7 @@ GetObjectForOption( break; } case TK_OPTION_INT: { - Tcl_WideInt value; + Tcl_WideInt value = LLONG_MIN; int nullOK = (optionPtr->specPtr->flags & (TK_OPTION_NULL_OK|TCL_NULL_OK|1)); if (optionPtr->specPtr->flags & TYPE_MASK) { if ((optionPtr->specPtr->flags & TYPE_MASK) == TYPE_MASK) { @@ -2236,7 +2236,7 @@ GetObjectForOption( break; } case TK_OPTION_RELIEF: { - int value; + int value = TK_RELIEF_NULL; if (optionPtr->specPtr->flags & TYPE_MASK) { if ((optionPtr->specPtr->flags & TYPE_MASK) == TK_OPTION_VAR(char)) { value = *((signed char *)internalPtr); @@ -2263,7 +2263,7 @@ GetObjectForOption( break; } case TK_OPTION_JUSTIFY: { - Tk_Justify value; + Tk_Justify value = TK_JUSTIFY_NULL; if (optionPtr->specPtr->flags & TYPE_MASK) { if ((optionPtr->specPtr->flags & TYPE_MASK) == TK_OPTION_VAR(char)) { value = (Tk_Justify)*((signed char *)internalPtr); @@ -2281,7 +2281,7 @@ GetObjectForOption( break; } case TK_OPTION_ANCHOR: { - Tk_Anchor value; + Tk_Anchor value = TK_ANCHOR_NULL; if (optionPtr->specPtr->flags & TYPE_MASK) { if ((optionPtr->specPtr->flags & TYPE_MASK) == TK_OPTION_VAR(char)) { value = (Tk_Anchor)*((signed char *)internalPtr); diff --git a/generic/tkConsole.c b/generic/tkConsole.c index 46cca36..4b36501 100644 --- a/generic/tkConsole.c +++ b/generic/tkConsole.c @@ -223,7 +223,7 @@ Tk_InitConsoleChannels( */ if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) { - return; + return; } consoleInitPtr = (int *)Tcl_GetThreadData(&consoleInitKey, (int) sizeof(int)); diff --git a/generic/tkCursor.c b/generic/tkCursor.c index 9785470..f2d3af0 100644 --- a/generic/tkCursor.c +++ b/generic/tkCursor.c @@ -65,7 +65,7 @@ const TkObjType tkCursorObjType = { DupCursorObjProc, /* dupIntRepProc */ NULL, /* updateStringProc */ NULL, /* setFromAnyProc */ - TCL_OBJTYPE_V0}, + TCL_OBJTYPE_V1(TkLengthOne)}, 0 }; @@ -190,7 +190,7 @@ Tk_Cursor Tk_GetCursor( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ Tk_Window tkwin, /* Window in which cursor will be used. */ - Tk_Uid string) /* Description of cursor. See manual entry for + const char *string) /* Description of cursor. See manual entry for * details on legal syntax. */ { TkCursor *cursorPtr = TkcGetCursor(interp, tkwin, string); @@ -321,8 +321,8 @@ Tk_GetCursorFromData( const char *mask, /* Bitmap data for cursor mask. */ int width, int height, /* Dimensions of cursor. */ int xHot, int yHot, /* Location of hot-spot in cursor. */ - Tk_Uid fg, /* Foreground color for cursor. */ - Tk_Uid bg) /* Background color for cursor. */ + const char *fg, /* Foreground color for cursor. */ + const char *bg) /* Background color for cursor. */ { DataKey dataKey; Tcl_HashEntry *dataHashPtr; @@ -341,8 +341,8 @@ Tk_GetCursorFromData( dataKey.height = height; dataKey.xHot = xHot; dataKey.yHot = yHot; - dataKey.fg = fg; - dataKey.bg = bg; + dataKey.fg = Tk_GetUid(fg); + dataKey.bg = Tk_GetUid(bg); dataKey.display = Tk_Display(tkwin); dataHashPtr = Tcl_CreateHashEntry(&dispPtr->cursorDataTable, (char *) &dataKey, &isNew); diff --git a/generic/tkDecls.h b/generic/tkDecls.h index 8695993..00ad267 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -296,7 +296,7 @@ EXTERN void Tk_GeometryRequest(Tk_Window tkwin, int reqWidth, int reqHeight); /* 80 */ EXTERN Tk_3DBorder Tk_Get3DBorder(Tcl_Interp *interp, Tk_Window tkwin, - Tk_Uid colorName); + const char *colorName); /* 81 */ EXTERN void Tk_GetAllBindings(Tcl_Interp *interp, Tk_BindingTable bindingTable, void *object); @@ -321,7 +321,7 @@ EXTERN int Tk_GetCapStyle(Tcl_Interp *interp, const char *str, int *capPtr); /* 88 */ EXTERN XColor * Tk_GetColor(Tcl_Interp *interp, Tk_Window tkwin, - Tk_Uid name); + const char *name); /* 89 */ EXTERN XColor * Tk_GetColorByValue(Tk_Window tkwin, XColor *colorPtr); /* 90 */ @@ -329,12 +329,13 @@ EXTERN Colormap Tk_GetColormap(Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 91 */ EXTERN Tk_Cursor Tk_GetCursor(Tcl_Interp *interp, Tk_Window tkwin, - Tk_Uid str); + const char *str); /* 92 */ EXTERN Tk_Cursor Tk_GetCursorFromData(Tcl_Interp *interp, Tk_Window tkwin, const char *source, const char *mask, int width, int height, - int xHot, int yHot, Tk_Uid fg, Tk_Uid bg); + int xHot, int yHot, const char *fg, + const char *bg); /* 93 */ EXTERN Tk_Font Tk_GetFont(Tcl_Interp *interp, Tk_Window tkwin, const char *str); @@ -979,7 +980,7 @@ typedef struct TkStubs { void (*reserved77)(void); GC (*tk_GCForColor) (XColor *colorPtr, Drawable drawable); /* 78 */ void (*tk_GeometryRequest) (Tk_Window tkwin, int reqWidth, int reqHeight); /* 79 */ - Tk_3DBorder (*tk_Get3DBorder) (Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid colorName); /* 80 */ + Tk_3DBorder (*tk_Get3DBorder) (Tcl_Interp *interp, Tk_Window tkwin, const char *colorName); /* 80 */ void (*tk_GetAllBindings) (Tcl_Interp *interp, Tk_BindingTable bindingTable, void *object); /* 81 */ int (*tk_GetAnchor) (Tcl_Interp *interp, const char *str, Tk_Anchor *anchorPtr); /* 82 */ const char * (*tk_GetAtomName) (Tk_Window tkwin, Atom atom); /* 83 */ @@ -987,11 +988,11 @@ typedef struct TkStubs { Pixmap (*tk_GetBitmap) (Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 85 */ Pixmap (*tk_GetBitmapFromData) (Tcl_Interp *interp, Tk_Window tkwin, const void *source, int width, int height); /* 86 */ int (*tk_GetCapStyle) (Tcl_Interp *interp, const char *str, int *capPtr); /* 87 */ - XColor * (*tk_GetColor) (Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid name); /* 88 */ + XColor * (*tk_GetColor) (Tcl_Interp *interp, Tk_Window tkwin, const char *name); /* 88 */ XColor * (*tk_GetColorByValue) (Tk_Window tkwin, XColor *colorPtr); /* 89 */ Colormap (*tk_GetColormap) (Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 90 */ - Tk_Cursor (*tk_GetCursor) (Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid str); /* 91 */ - Tk_Cursor (*tk_GetCursorFromData) (Tcl_Interp *interp, Tk_Window tkwin, const char *source, const char *mask, int width, int height, int xHot, int yHot, Tk_Uid fg, Tk_Uid bg); /* 92 */ + Tk_Cursor (*tk_GetCursor) (Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 91 */ + Tk_Cursor (*tk_GetCursorFromData) (Tcl_Interp *interp, Tk_Window tkwin, const char *source, const char *mask, int width, int height, int xHot, int yHot, const char *fg, const char *bg); /* 92 */ Tk_Font (*tk_GetFont) (Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 93 */ Tk_Font (*tk_GetFontFromObj) (Tk_Window tkwin, Tcl_Obj *objPtr); /* 94 */ void (*tk_GetFontMetrics) (Tk_Font font, Tk_FontMetrics *fmPtr); /* 95 */ diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 3271cc5..120a524 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -74,7 +74,7 @@ static const Tk_OptionSpec entryOptSpec[] = { {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_ENTRY_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Entry, borderWidth), 0, 0, 0}, + DEF_ENTRY_BORDER_WIDTH, offsetof(Entry, borderWidthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_ENTRY_CURSOR, TCL_INDEX_NONE, offsetof(Entry, cursor), TK_OPTION_NULL_OK, 0, 0}, @@ -100,13 +100,13 @@ static const Tk_OptionSpec entryOptSpec[] = { {TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", DEF_ENTRY_HIGHLIGHT, TCL_INDEX_NONE, offsetof(Entry, highlightColorPtr), 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", - "HighlightThickness", DEF_ENTRY_HIGHLIGHT_WIDTH, TCL_INDEX_NONE, - offsetof(Entry, highlightWidth), 0, 0, 0}, + "HighlightThickness", DEF_ENTRY_HIGHLIGHT_WIDTH, offsetof(Entry, highlightWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_BORDER, "-insertbackground", "insertBackground", "Foreground", DEF_ENTRY_INSERT_BG, TCL_INDEX_NONE, offsetof(Entry, insertBorder), 0, 0, 0}, {TK_OPTION_PIXELS, "-insertborderwidth", "insertBorderWidth", - "BorderWidth", DEF_ENTRY_INSERT_BD_COLOR, TCL_INDEX_NONE, - offsetof(Entry, insertBorderWidth), 0, + "BorderWidth", DEF_ENTRY_INSERT_BD_COLOR, offsetof(Entry, insertBorderWidthObj), + TCL_INDEX_NONE, 0, DEF_ENTRY_INSERT_BD_MONO, 0}, {TK_OPTION_INT, "-insertofftime", "insertOffTime", "OffTime", DEF_ENTRY_INSERT_OFF_TIME, TCL_INDEX_NONE, offsetof(Entry, insertOffTime), @@ -114,16 +114,16 @@ static const Tk_OptionSpec entryOptSpec[] = { {TK_OPTION_INT, "-insertontime", "insertOnTime", "OnTime", DEF_ENTRY_INSERT_ON_TIME, TCL_INDEX_NONE, offsetof(Entry, insertOnTime), 0, 0, 0}, {TK_OPTION_PIXELS, "-insertwidth", "insertWidth", "InsertWidth", - DEF_ENTRY_INSERT_WIDTH, TCL_INDEX_NONE, offsetof(Entry, insertWidth), 0, 0, 0}, + DEF_ENTRY_INSERT_WIDTH, offsetof(Entry, insertWidthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-invalidcommand", "invalidCommand", "InvalidCommand", - DEF_ENTRY_INVALIDCMD, TCL_INDEX_NONE, offsetof(Entry, invalidCmd), + DEF_ENTRY_INVALIDCMD, offsetof(Entry, invalidCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_SYNONYM, "-invcmd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-invalidcommand", 0}, {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_ENTRY_JUSTIFY, TCL_INDEX_NONE, offsetof(Entry, justify), TK_OPTION_ENUM_VAR, 0, 0}, {TK_OPTION_STRING, "-placeholder", "placeHolder", "PlaceHolder", - DEF_ENTRY_PLACEHOLDER, TCL_INDEX_NONE, offsetof(Entry, placeholderString), + DEF_ENTRY_PLACEHOLDER, offsetof(Entry, placeholderObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_COLOR, "-placeholderforeground", "placeholderForeground", "PlaceholderForeground", DEF_ENTRY_PLACEHOLDERFG, TCL_INDEX_NONE, @@ -138,35 +138,34 @@ static const Tk_OptionSpec entryOptSpec[] = { DEF_ENTRY_SELECT_COLOR, TCL_INDEX_NONE, offsetof(Entry, selBorder), 0, DEF_ENTRY_SELECT_MONO, 0}, {TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth", - "BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, TCL_INDEX_NONE, - offsetof(Entry, selBorderWidth), - 0, DEF_ENTRY_SELECT_BD_MONO, 0}, + "BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, offsetof(Entry, selBorderWidthObj), + TCL_INDEX_NONE, 0, DEF_ENTRY_SELECT_BD_MONO, 0}, {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", DEF_ENTRY_SELECT_FG_COLOR, TCL_INDEX_NONE, offsetof(Entry, selFgColorPtr), TK_OPTION_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0}, {TK_OPTION_STRING, "-show", "show", "Show", - DEF_ENTRY_SHOW, TCL_INDEX_NONE, offsetof(Entry, showChar), + DEF_ENTRY_SHOW, offsetof(Entry, showCharObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_ENTRY_STATE, TCL_INDEX_NONE, offsetof(Entry, state), 0, stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", - DEF_ENTRY_TAKE_FOCUS, TCL_INDEX_NONE, offsetof(Entry, takeFocus), + DEF_ENTRY_TAKE_FOCUS, offsetof(Entry, takeFocusObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-textvariable", "textVariable", "Variable", - DEF_ENTRY_TEXT_VARIABLE, TCL_INDEX_NONE, offsetof(Entry, textVarName), + DEF_ENTRY_TEXT_VARIABLE, offsetof(Entry, textVarNameObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-validate", "validate", "Validate", DEF_ENTRY_VALIDATE, TCL_INDEX_NONE, offsetof(Entry, validate), 0, validateStrings, 0}, {TK_OPTION_STRING, "-validatecommand", "validateCommand","ValidateCommand", - NULL, TCL_INDEX_NONE, offsetof(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0}, + NULL, offsetof(Entry, validateCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_SYNONYM, "-vcmd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-validatecommand", 0}, {TK_OPTION_INT, "-width", "width", "Width", DEF_ENTRY_WIDTH, TCL_INDEX_NONE, offsetof(Entry, prefWidth), 0, 0, 0}, {TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand", - DEF_ENTRY_SCROLL_COMMAND, TCL_INDEX_NONE, offsetof(Entry, scrollCmd), + DEF_ENTRY_SCROLL_COMMAND, offsetof(Entry, scrollCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, 0, 0} }; @@ -200,7 +199,7 @@ static const Tk_OptionSpec sbOptSpec[] = { {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_ENTRY_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Entry, borderWidth), 0, 0, 0}, + DEF_ENTRY_BORDER_WIDTH, offsetof(Entry, borderWidthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_BORDER, "-buttonbackground", "buttonBackground", "Background", DEF_BUTTON_BG_COLOR, TCL_INDEX_NONE, offsetof(Spinbox, buttonBorder), 0, DEF_BUTTON_BG_MONO, 0}, @@ -212,7 +211,7 @@ static const Tk_OptionSpec sbOptSpec[] = { {TK_OPTION_RELIEF, "-buttonuprelief", "buttonUpRelief", "Relief", DEF_BUTTON_RELIEF, TCL_INDEX_NONE, offsetof(Spinbox, buRelief), 0, 0, 0}, {TK_OPTION_STRING, "-command", "command", "Command", - DEF_SPINBOX_CMD, TCL_INDEX_NONE, offsetof(Spinbox, command), + DEF_SPINBOX_CMD, offsetof(Spinbox, commandObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_ENTRY_CURSOR, TCL_INDEX_NONE, offsetof(Entry, cursor), @@ -234,7 +233,7 @@ static const Tk_OptionSpec sbOptSpec[] = { {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", DEF_ENTRY_FG, TCL_INDEX_NONE, offsetof(Entry, fgColorPtr), 0, 0, 0}, {TK_OPTION_STRING, "-format", "format", "Format", - DEF_SPINBOX_FORMAT, TCL_INDEX_NONE, offsetof(Spinbox, reqFormat), + DEF_SPINBOX_FORMAT, offsetof(Spinbox, reqFormatObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_DOUBLE, "-from", "from", "From", DEF_SPINBOX_FROM, TCL_INDEX_NONE, offsetof(Spinbox, fromValue), 0, 0, 0}, @@ -244,36 +243,35 @@ static const Tk_OptionSpec sbOptSpec[] = { {TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", DEF_ENTRY_HIGHLIGHT, TCL_INDEX_NONE, offsetof(Entry, highlightColorPtr), 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", - "HighlightThickness", DEF_ENTRY_HIGHLIGHT_WIDTH, TCL_INDEX_NONE, - offsetof(Entry, highlightWidth), 0, 0, 0}, + "HighlightThickness", DEF_ENTRY_HIGHLIGHT_WIDTH, offsetof(Entry, highlightWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_DOUBLE, "-increment", "increment", "Increment", DEF_SPINBOX_INCREMENT, TCL_INDEX_NONE, offsetof(Spinbox, increment), 0, 0, 0}, {TK_OPTION_BORDER, "-insertbackground", "insertBackground", "Foreground", DEF_ENTRY_INSERT_BG, TCL_INDEX_NONE, offsetof(Entry, insertBorder), 0, 0, 0}, {TK_OPTION_PIXELS, "-insertborderwidth", "insertBorderWidth", - "BorderWidth", DEF_ENTRY_INSERT_BD_COLOR, TCL_INDEX_NONE, - offsetof(Entry, insertBorderWidth), 0, - DEF_ENTRY_INSERT_BD_MONO, 0}, + "BorderWidth", DEF_ENTRY_INSERT_BD_COLOR, offsetof(Entry, insertBorderWidthObj), + TCL_INDEX_NONE, 0, DEF_ENTRY_INSERT_BD_MONO, 0}, {TK_OPTION_INT, "-insertofftime", "insertOffTime", "OffTime", DEF_ENTRY_INSERT_OFF_TIME, TCL_INDEX_NONE, offsetof(Entry, insertOffTime), 0, 0, 0}, {TK_OPTION_INT, "-insertontime", "insertOnTime", "OnTime", DEF_ENTRY_INSERT_ON_TIME, TCL_INDEX_NONE, offsetof(Entry, insertOnTime), 0, 0, 0}, {TK_OPTION_PIXELS, "-insertwidth", "insertWidth", "InsertWidth", - DEF_ENTRY_INSERT_WIDTH, TCL_INDEX_NONE, offsetof(Entry, insertWidth), 0, 0, 0}, + DEF_ENTRY_INSERT_WIDTH, offsetof(Entry, insertWidthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-invalidcommand", "invalidCommand", "InvalidCommand", - DEF_ENTRY_INVALIDCMD, TCL_INDEX_NONE, offsetof(Entry, invalidCmd), + DEF_ENTRY_INVALIDCMD, offsetof(Entry, invalidCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_SYNONYM, "-invcmd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-invalidcommand", 0}, {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_ENTRY_JUSTIFY, TCL_INDEX_NONE, offsetof(Entry, justify), TK_OPTION_ENUM_VAR, 0, 0}, {TK_OPTION_STRING, "-placeholder", "placeHolder", "PlaceHolder", - DEF_ENTRY_PLACEHOLDER, TCL_INDEX_NONE, offsetof(Entry, placeholderString), + DEF_ENTRY_PLACEHOLDER, offsetof(Entry, placeholderObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_COLOR, "-placeholderforeground", "placeholderForeground", - "PlaceholderForeground", DEF_ENTRY_PLACEHOLDERFG, TCL_INDEX_NONE, - offsetof(Entry, placeholderColorPtr), 0, 0, 0}, + "PlaceholderForeground", DEF_ENTRY_PLACEHOLDERFG, TCL_INDEX_NONE, + offsetof(Entry, placeholderColorPtr), 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_ENTRY_RELIEF, TCL_INDEX_NONE, offsetof(Entry, relief), 0, 0, 0}, {TK_OPTION_BORDER, "-readonlybackground", "readonlyBackground", @@ -290,9 +288,8 @@ static const Tk_OptionSpec sbOptSpec[] = { DEF_ENTRY_SELECT_COLOR, TCL_INDEX_NONE, offsetof(Entry, selBorder), 0, DEF_ENTRY_SELECT_MONO, 0}, {TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth", - "BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, TCL_INDEX_NONE, - offsetof(Entry, selBorderWidth), - 0, DEF_ENTRY_SELECT_BD_MONO, 0}, + "BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, offsetof(Entry, selBorderWidthObj), + TCL_INDEX_NONE, 0, DEF_ENTRY_SELECT_BD_MONO, 0}, {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", DEF_ENTRY_SELECT_FG_COLOR, TCL_INDEX_NONE, offsetof(Entry, selFgColorPtr), TK_OPTION_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0}, @@ -300,10 +297,10 @@ static const Tk_OptionSpec sbOptSpec[] = { DEF_ENTRY_STATE, TCL_INDEX_NONE, offsetof(Entry, state), 0, stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", - DEF_ENTRY_TAKE_FOCUS, TCL_INDEX_NONE, offsetof(Entry, takeFocus), + DEF_ENTRY_TAKE_FOCUS, offsetof(Entry, takeFocusObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-textvariable", "textVariable", "Variable", - DEF_ENTRY_TEXT_VARIABLE, TCL_INDEX_NONE, offsetof(Entry, textVarName), + DEF_ENTRY_TEXT_VARIABLE, offsetof(Entry, textVarNameObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_DOUBLE, "-to", "to", "To", DEF_SPINBOX_TO, TCL_INDEX_NONE, offsetof(Spinbox, toValue), 0, 0, 0}, @@ -311,9 +308,9 @@ static const Tk_OptionSpec sbOptSpec[] = { DEF_ENTRY_VALIDATE, TCL_INDEX_NONE, offsetof(Entry, validate), 0, validateStrings, 0}, {TK_OPTION_STRING, "-validatecommand", "validateCommand","ValidateCommand", - NULL, TCL_INDEX_NONE, offsetof(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0}, + NULL, offsetof(Entry, validateCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-values", "values", "Values", - DEF_SPINBOX_VALUES, TCL_INDEX_NONE, offsetof(Spinbox, valueStr), + DEF_SPINBOX_VALUES, offsetof(Spinbox, valueObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_SYNONYM, "-vcmd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-validatecommand", 0}, @@ -322,7 +319,7 @@ static const Tk_OptionSpec sbOptSpec[] = { {TK_OPTION_BOOLEAN, "-wrap", "wrap", "Wrap", DEF_SPINBOX_WRAP, TCL_INDEX_NONE, offsetof(Spinbox, wrap), 0, 0, 0}, {TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand", - DEF_ENTRY_SCROLL_COMMAND, TCL_INDEX_NONE, offsetof(Entry, scrollCmd), + DEF_ENTRY_SCROLL_COMMAND, offsetof(Entry, scrollCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, 0, 0} }; @@ -698,9 +695,9 @@ EntryWidgetObjCmd( } if ((last >= first) && (entryPtr->state == STATE_NORMAL)) { code = DeleteChars(entryPtr, first, last - first); - if (code != TCL_OK) { - goto error; - } + if (code != TCL_OK) { + goto error; + } } break; } @@ -754,9 +751,9 @@ EntryWidgetObjCmd( } if (entryPtr->state == STATE_NORMAL) { code = InsertChars(entryPtr, index, Tcl_GetString(objv[3])); - if (code != TCL_OK) { - goto error; - } + if (code != TCL_OK) { + goto error; + } } break; } @@ -1048,8 +1045,8 @@ DestroyEntry( */ ckfree((void *)entryPtr->string); - if (entryPtr->textVarName != NULL) { - Tcl_UntraceVar2(entryPtr->interp, entryPtr->textVarName, + if (entryPtr->textVarNameObj != NULL) { + Tcl_UntraceVar2(entryPtr->interp, Tcl_GetString(entryPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, EntryTextVarProc, entryPtr); entryPtr->flags &= ~ENTRY_VAR_TRACED; @@ -1118,8 +1115,8 @@ ConfigureEntry( Spinbox *sbPtr = (Spinbox *) entryPtr; /* Only used when this widget is of type * TK_SPINBOX */ - char *oldValues = NULL; - char *oldFormat = NULL; + Tcl_Obj *oldValues = NULL; + Tcl_Obj *oldFormat = NULL; int error; int oldExport = 0; int valuesChanged = 0; @@ -1127,14 +1124,16 @@ ConfigureEntry( double oldTo = 0.0; int code; size_t formatSpace = TCL_DOUBLE_SPACE; + int borderWidth, highlightWidth, insertWidth; + int insertBorderWidth, selBorderWidth; /* * Eliminate any existing trace on a variable monitored by the entry. */ - if ((entryPtr->textVarName != NULL) + if ((entryPtr->textVarNameObj != NULL) && (entryPtr->flags & ENTRY_VAR_TRACED)) { - Tcl_UntraceVar2(interp, entryPtr->textVarName, NULL, + Tcl_UntraceVar2(interp, Tcl_GetString(entryPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, EntryTextVarProc, entryPtr); entryPtr->flags &= ~ENTRY_VAR_TRACED; @@ -1147,8 +1146,8 @@ ConfigureEntry( oldExport = (entryPtr->exportSelection) && (!Tcl_IsSafe(entryPtr->interp)); if (entryPtr->type == TK_SPINBOX) { - oldValues = sbPtr->valueStr; - oldFormat = sbPtr->reqFormat; + oldValues = sbPtr->valueObj; + oldFormat = sbPtr->reqFormatObj; oldFrom = sbPtr->fromValue; oldTo = sbPtr->toValue; } @@ -1190,26 +1189,55 @@ ConfigureEntry( } Tk_SetBackgroundFromBorder(entryPtr->tkwin, border); - if (entryPtr->insertWidth <= 0) { - entryPtr->insertWidth = 2; - } - if (entryPtr->insertBorderWidth > entryPtr->insertWidth/2) { - entryPtr->insertBorderWidth = entryPtr->insertWidth/2; + Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->borderWidthObj, &borderWidth); + if (borderWidth < 0) { + borderWidth = 0; + Tcl_DecrRefCount(entryPtr->borderWidthObj); + entryPtr->borderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(entryPtr->borderWidthObj); + } + Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth < 0) { + highlightWidth = 0; + Tcl_DecrRefCount(entryPtr->highlightWidthObj); + entryPtr->highlightWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(entryPtr->highlightWidthObj); + } + Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->insertBorderWidthObj, &insertBorderWidth); + if (insertBorderWidth < 0) { + insertBorderWidth = 0; + Tcl_DecrRefCount(entryPtr->insertBorderWidthObj); + entryPtr->insertBorderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(entryPtr->insertBorderWidthObj); + } + Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->insertWidthObj, &insertWidth); + if (insertWidth < 0) { + insertWidth = 0; + Tcl_DecrRefCount(entryPtr->insertWidthObj); + entryPtr->insertWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(entryPtr->insertWidthObj); + } + Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->selBorderWidthObj, &selBorderWidth); + if (selBorderWidth < 0) { + selBorderWidth = 0; + Tcl_DecrRefCount(entryPtr->selBorderWidthObj); + entryPtr->selBorderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(entryPtr->selBorderWidthObj); } if (entryPtr->type == TK_SPINBOX) { if (sbPtr->fromValue > sbPtr->toValue) { - /* - * Swap -from and -to values. - */ + /* + * Swap -from and -to values. + */ - double tmpFromTo = sbPtr->fromValue; + double tmpFromTo = sbPtr->fromValue; - sbPtr->fromValue = sbPtr->toValue; - sbPtr->toValue = tmpFromTo; - } + sbPtr->fromValue = sbPtr->toValue; + sbPtr->toValue = tmpFromTo; + } - if (sbPtr->reqFormat && (oldFormat != sbPtr->reqFormat)) { + if (sbPtr->reqFormatObj && (oldFormat != sbPtr->reqFormatObj)) { /* * Make sure that the given format is somewhat correct, and * calculate the minimum space we'll need for the values as @@ -1218,14 +1246,14 @@ ConfigureEntry( int min, max; size_t formatLen; - char fbuf[4], *fmt = sbPtr->reqFormat; + char fbuf[4], *fmt = Tcl_GetString(sbPtr->reqFormatObj); formatLen = strlen(fmt); if ((fmt[0] != '%') || (fmt[formatLen-1] != 'f')) { badFormatOpt: Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad spinbox format specifier \"%s\"", - sbPtr->reqFormat)); + Tcl_GetString(sbPtr->reqFormatObj))); Tcl_SetErrorCode(interp, "TK", "SPINBOX", "FORMAT_SANITY", NULL); continue; @@ -1258,16 +1286,16 @@ ConfigureEntry( * See if we have to rearrange our listObj data. */ - if (oldValues != sbPtr->valueStr) { + if (oldValues != sbPtr->valueObj) { if (sbPtr->listObj != NULL) { Tcl_DecrRefCount(sbPtr->listObj); } sbPtr->listObj = NULL; - if (sbPtr->valueStr != NULL) { + if (sbPtr->valueObj != NULL) { Tcl_Obj *newObjPtr; Tcl_Size nelems; - newObjPtr = Tcl_NewStringObj(sbPtr->valueStr, TCL_INDEX_NONE); + newObjPtr = sbPtr->valueObj; if (Tcl_ListObjLength(interp, newObjPtr, &nelems) != TCL_OK) { valuesChanged = -1; @@ -1315,12 +1343,9 @@ ConfigureEntry( */ Tk_SetInternalBorder(entryPtr->tkwin, - entryPtr->borderWidth + entryPtr->highlightWidth); - if (entryPtr->highlightWidth < 0) { - entryPtr->highlightWidth = 0; - } - entryPtr->inset = entryPtr->highlightWidth - + entryPtr->borderWidth + XPAD; + borderWidth + highlightWidth); + entryPtr->inset = highlightWidth + + borderWidth + XPAD; break; } if (!error) { @@ -1332,21 +1357,21 @@ ConfigureEntry( * it doesn't exist, and set the entry's value from the variable's value. */ - if (entryPtr->textVarName != NULL) { + if (entryPtr->textVarNameObj != NULL) { const char *value; - value = Tcl_GetVar2(interp, entryPtr->textVarName, NULL, TCL_GLOBAL_ONLY); + value = Tcl_GetVar2(interp, Tcl_GetString(entryPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY); if (value == NULL) { - /* - * Since any trace on the textvariable was eliminated above, - * the only possible reason for EntryValueChanged to return - * an error is that the textvariable lives in a namespace - * that does not (yet) exist. Indeed, namespaces are not - * automatically created as needed. Don't trap this error - * here, better do it below when attempting to trace the - * variable. - */ + /* + * Since any trace on the textvariable was eliminated above, + * the only possible reason for EntryValueChanged to return + * an error is that the textvariable lives in a namespace + * that does not (yet) exist. Indeed, namespaces are not + * automatically created as needed. Don't trap this error + * here, better do it below when attempting to trace the + * variable. + */ EntryValueChanged(entryPtr, NULL); } else { @@ -1367,13 +1392,13 @@ ConfigureEntry( Tcl_ListObjIndex(interp, sbPtr->listObj, 0, &objPtr); - /* + /* * No check for error return here as well, because any possible * error will be trapped below when attempting tracing. */ - EntryValueChanged(entryPtr, Tcl_GetString(objPtr)); - } else if ((sbPtr->valueStr == NULL) + EntryValueChanged(entryPtr, Tcl_GetString(objPtr)); + } else if ((sbPtr->valueObj == NULL) && !DOUBLES_EQ(sbPtr->fromValue, sbPtr->toValue) && (!DOUBLES_EQ(sbPtr->fromValue, oldFrom) || !DOUBLES_EQ(sbPtr->toValue, oldTo))) { @@ -1410,15 +1435,15 @@ ConfigureEntry( * the value according to new -from/-to values. */ - if ((entryPtr->textVarName != NULL) + if ((entryPtr->textVarNameObj != NULL) && !(entryPtr->flags & ENTRY_VAR_TRACED)) { - code = Tcl_TraceVar2(interp, entryPtr->textVarName, + code = Tcl_TraceVar2(interp, Tcl_GetString(entryPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, EntryTextVarProc, entryPtr); - if (code != TCL_OK) { - return TCL_ERROR; - } - entryPtr->flags |= ENTRY_VAR_TRACED; + if (code != TCL_OK) { + return TCL_ERROR; + } + entryPtr->flags |= ENTRY_VAR_TRACED; } EntryWorldChanged(entryPtr); @@ -1524,7 +1549,7 @@ EntryWorldChanged( if (entryPtr->selFgColorPtr != NULL) { gcValues.foreground = entryPtr->selFgColorPtr->pixel; } else { - gcValues.foreground = colorPtr->pixel; + gcValues.foreground = colorPtr->pixel; } gcValues.font = Tk_FontId(entryPtr->tkfont); mask = GCForeground | GCFont; @@ -1625,6 +1650,7 @@ DisplayEntry( Tk_FontMetrics fm; Pixmap pixmap; Tk_3DBorder border; + int borderWidth, selBorderWidth, insertWidth, highlightWidth; entryPtr->flags &= ~REDRAW_PENDING; if ((entryPtr->flags & ENTRY_DELETED) || !Tk_IsMapped(tkwin)) { @@ -1704,6 +1730,7 @@ DisplayEntry( } Tk_Fill3DRectangle(tkwin, pixmap, border, 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), 0, TK_RELIEF_FLAT); + Tk_GetPixelsFromObj(NULL, tkwin, entryPtr->selBorderWidthObj, &selBorderWidth); if (showSelection && (entryPtr->state != STATE_DISABLED) && (entryPtr->selectLast > entryPtr->leftIndex)) { @@ -1714,16 +1741,16 @@ DisplayEntry( &selStartX, NULL, NULL, NULL); selStartX += entryPtr->layoutX; } - if ((selStartX - entryPtr->selBorderWidth) < xBound) { + if ((selStartX - selBorderWidth) < xBound) { Tk_CharBbox(entryPtr->textLayout, entryPtr->selectLast, &selEndX, NULL, NULL, NULL); selEndX += entryPtr->layoutX; Tk_Fill3DRectangle(tkwin, pixmap, entryPtr->selBorder, - selStartX - entryPtr->selBorderWidth, - baseY - fm.ascent - entryPtr->selBorderWidth, - (selEndX - selStartX) + 2*entryPtr->selBorderWidth, - (fm.ascent + fm.descent) + 2*entryPtr->selBorderWidth, - entryPtr->selBorderWidth, + selStartX - selBorderWidth, + baseY - fm.ascent - selBorderWidth, + (selEndX - selStartX) + 2 * selBorderWidth, + (fm.ascent + fm.descent) + 2 * selBorderWidth, + selBorderWidth, #ifndef MAC_OSX_TK TK_RELIEF_RAISED #else @@ -1742,22 +1769,29 @@ DisplayEntry( * hide the cursor. */ + Tk_GetPixelsFromObj(NULL, tkwin, entryPtr->insertWidthObj, &insertWidth); if ((entryPtr->state == STATE_NORMAL) && (entryPtr->flags & GOT_FOCUS)) { Tk_CharBbox(entryPtr->textLayout, entryPtr->insertPos, &cursorX, NULL, NULL, NULL); cursorX += entryPtr->layoutX; - cursorX -= (entryPtr->insertWidth == 1) ? 1 : (entryPtr->insertWidth)/2; + cursorX -= (insertWidth <= 1) ? 1 : (insertWidth)/2; Tk_SetCaretPos(entryPtr->tkwin, cursorX, baseY - fm.ascent, fm.ascent + fm.descent); if ((entryPtr->insertPos >= entryPtr->leftIndex) && cursorX < xBound) { if (entryPtr->flags & CURSOR_ON) { + /* Take minimum of given insertBorderWidth and insertWidth/2 */ + int insertBorderWidth; + Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->insertBorderWidthObj, &insertBorderWidth); + if (insertBorderWidth > insertWidth/2) { + insertBorderWidth = insertWidth/2; + } Tk_Fill3DRectangle(tkwin, pixmap, entryPtr->insertBorder, - cursorX, baseY - fm.ascent, entryPtr->insertWidth, - fm.ascent + fm.descent, entryPtr->insertBorderWidth, + cursorX, baseY - fm.ascent, insertWidth, + fm.ascent + fm.descent, insertBorderWidth, TK_RELIEF_RAISED); } else if (entryPtr->insertBorder == entryPtr->selBorder) { Tk_Fill3DRectangle(tkwin, pixmap, border, cursorX, - baseY - fm.ascent, entryPtr->insertWidth, + baseY - fm.ascent, insertWidth, fm.ascent + fm.descent, 0, TK_RELIEF_FLAT); } } @@ -1765,19 +1799,19 @@ DisplayEntry( if ((entryPtr->numChars == 0) && (entryPtr->placeholderChars != 0)) { - /* - * Draw the placeholder text. - */ + /* + * Draw the placeholder text. + */ - Tk_DrawTextLayout(entryPtr->display, pixmap, entryPtr->placeholderGC, + Tk_DrawTextLayout(entryPtr->display, pixmap, entryPtr->placeholderGC, entryPtr->placeholderLayout, entryPtr->placeholderX, entryPtr->layoutY, entryPtr->placeholderLeftIndex, entryPtr->placeholderChars); } else { - if (showSelection && (entryPtr->state != STATE_DISABLED) - && (entryPtr->selTextGC != entryPtr->textGC) - && (entryPtr->selectFirst < entryPtr->selectLast)) { + if (showSelection && (entryPtr->state != STATE_DISABLED) + && (entryPtr->selTextGC != entryPtr->textGC) + && (entryPtr->selectFirst < entryPtr->selectLast)) { /* * Draw the selected and unselected portions separately. @@ -1786,33 +1820,33 @@ DisplayEntry( Tcl_Size selFirst; if (entryPtr->selectFirst < entryPtr->leftIndex) { - selFirst = entryPtr->leftIndex; + selFirst = entryPtr->leftIndex; } else { - selFirst = entryPtr->selectFirst; + selFirst = entryPtr->selectFirst; } if (entryPtr->leftIndex < selFirst) { - Tk_DrawTextLayout(entryPtr->display, pixmap, entryPtr->textGC, - entryPtr->textLayout, entryPtr->layoutX, entryPtr->layoutY, - entryPtr->leftIndex, selFirst); + Tk_DrawTextLayout(entryPtr->display, pixmap, entryPtr->textGC, + entryPtr->textLayout, entryPtr->layoutX, entryPtr->layoutY, + entryPtr->leftIndex, selFirst); } Tk_DrawTextLayout(entryPtr->display, pixmap, entryPtr->selTextGC, entryPtr->textLayout, entryPtr->layoutX, entryPtr->layoutY, selFirst, entryPtr->selectLast); if (entryPtr->selectLast < entryPtr->numChars) { - Tk_DrawTextLayout(entryPtr->display, pixmap, entryPtr->textGC, - entryPtr->textLayout, entryPtr->layoutX, entryPtr->layoutY, - entryPtr->selectLast, entryPtr->numChars); + Tk_DrawTextLayout(entryPtr->display, pixmap, entryPtr->textGC, + entryPtr->textLayout, entryPtr->layoutX, entryPtr->layoutY, + entryPtr->selectLast, entryPtr->numChars); } - } else { + } else { - /* - * Draw the entire visible text - */ + /* + * Draw the entire visible text + */ Tk_DrawTextLayout(entryPtr->display, pixmap, entryPtr->textGC, entryPtr->textLayout, entryPtr->layoutX, entryPtr->layoutY, entryPtr->leftIndex, entryPtr->numChars); - } + } } if (entryPtr->type == TK_SPINBOX) { @@ -1909,14 +1943,16 @@ DisplayEntry( * text that extends past the viewable part of the window. */ + Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->highlightWidthObj, &highlightWidth); if (!TkpDrawEntryBorderAndFocus(entryPtr, pixmap, (entryPtr->type == TK_SPINBOX))) { - xBound = entryPtr->highlightWidth; + xBound = highlightWidth; if (entryPtr->relief != TK_RELIEF_FLAT) { Tk_Draw3DRectangle(tkwin, pixmap, border, xBound, xBound, Tk_Width(tkwin) - 2 * xBound, Tk_Height(tkwin) - 2 * xBound, - entryPtr->borderWidth, entryPtr->relief); + borderWidth, entryPtr->relief); } if (xBound > 0) { GC fgGC, bgGC; @@ -1986,7 +2022,7 @@ EntryComputeGeometry( * entry, recompute the displayString. */ - if (entryPtr->showChar != NULL) { + if (entryPtr->showCharObj != NULL) { int ch; char buf[6]; int size; @@ -1998,7 +2034,7 @@ EntryComputeGeometry( * resulting string. */ - Tcl_UtfToUniChar(entryPtr->showChar, &ch); + Tcl_UtfToUniChar(Tcl_GetString(entryPtr->showCharObj), &ch); size = Tcl_UniCharToUtf(ch, buf); entryPtr->numDisplayBytes = entryPtr->numChars * size; @@ -2018,23 +2054,23 @@ EntryComputeGeometry( */ Tk_FreeTextLayout(entryPtr->placeholderLayout); - if (entryPtr->placeholderString) { - entryPtr->placeholderChars = strlen(entryPtr->placeholderString); - entryPtr->placeholderLayout = Tk_ComputeTextLayout(entryPtr->tkfont, - entryPtr->placeholderString, entryPtr->placeholderChars, 0, - entryPtr->justify, TK_IGNORE_NEWLINES, &totalLength, NULL); + if (entryPtr->placeholderObj) { + entryPtr->placeholderChars = strlen(Tcl_GetString(entryPtr->placeholderObj)); + entryPtr->placeholderLayout = Tk_ComputeTextLayout(entryPtr->tkfont, + Tcl_GetString(entryPtr->placeholderObj), entryPtr->placeholderChars, 0, + entryPtr->justify, TK_IGNORE_NEWLINES, &totalLength, NULL); overflow = totalLength - - (Tk_Width(entryPtr->tkwin) - 2*entryPtr->inset - entryPtr->xWidth); + (Tk_Width(entryPtr->tkwin) - 2*entryPtr->inset - entryPtr->xWidth); if (overflow <= 0) { entryPtr->placeholderLeftIndex = 0; if (entryPtr->justify == TK_JUSTIFY_LEFT) { entryPtr->placeholderX = entryPtr->inset; } else if (entryPtr->justify == TK_JUSTIFY_RIGHT) { entryPtr->placeholderX = Tk_Width(entryPtr->tkwin) - entryPtr->inset - - entryPtr->xWidth - totalLength; + - entryPtr->xWidth - totalLength; } else { entryPtr->placeholderX = (Tk_Width(entryPtr->tkwin) - - entryPtr->xWidth - totalLength)/2; + - entryPtr->xWidth - totalLength)/2; } } else { @@ -2055,12 +2091,12 @@ EntryComputeGeometry( Tk_CharBbox(entryPtr->placeholderLayout, entryPtr->placeholderLeftIndex, &rightX, NULL, NULL, NULL); entryPtr->placeholderX = entryPtr->inset -rightX; - } + } } else { - entryPtr->placeholderChars = 0; - entryPtr->placeholderLayout = Tk_ComputeTextLayout(entryPtr->tkfont, - entryPtr->placeholderString, 0, 0, - entryPtr->justify, TK_IGNORE_NEWLINES, NULL, NULL); + entryPtr->placeholderChars = 0; + entryPtr->placeholderLayout = Tk_ComputeTextLayout(entryPtr->tkfont, + (entryPtr->placeholderObj ? Tcl_GetString(entryPtr->placeholderObj) : NULL), 0, 0, + entryPtr->justify, TK_IGNORE_NEWLINES, NULL, NULL); entryPtr->placeholderX = entryPtr->inset; } @@ -2377,10 +2413,10 @@ EntryValueChanged( EntrySetValue(entryPtr, newValue); } - if (entryPtr->textVarName == NULL) { + if (entryPtr->textVarNameObj == NULL) { newValue = NULL; } else { - newValue = Tcl_SetVar2(entryPtr->interp, entryPtr->textVarName, + newValue = Tcl_SetVar2(entryPtr->interp, Tcl_GetString(entryPtr->textVarNameObj), NULL, entryPtr->string, TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG); } @@ -2412,8 +2448,8 @@ EntryValueChanged( * Signal this error. */ - if ((entryPtr->textVarName != NULL) && (newValue == NULL)) { - return TCL_ERROR; + if ((entryPtr->textVarNameObj != NULL) && (newValue == NULL)) { + return TCL_ERROR; } return TCL_OK; } @@ -3102,7 +3138,7 @@ EntryUpdateScrollbar( Tcl_Interp *interp; Tcl_DString buf; - if (entryPtr->scrollCmd == NULL) { + if (entryPtr->scrollCmdObj == NULL) { return; } @@ -3112,7 +3148,7 @@ EntryUpdateScrollbar( Tcl_PrintDouble(NULL, first, firstStr); Tcl_PrintDouble(NULL, last, lastStr); Tcl_DStringInit(&buf); - Tcl_DStringAppend(&buf, entryPtr->scrollCmd, TCL_INDEX_NONE); + Tcl_DStringAppend(&buf, Tcl_GetString(entryPtr->scrollCmdObj), TCL_INDEX_NONE); Tcl_DStringAppend(&buf, " ", TCL_INDEX_NONE); Tcl_DStringAppend(&buf, firstStr, TCL_INDEX_NONE); Tcl_DStringAppend(&buf, " ", TCL_INDEX_NONE); @@ -3261,34 +3297,34 @@ EntryTextVarProc( */ if (flags & TCL_TRACE_UNSETS) { - if (!Tcl_InterpDeleted(interp) && entryPtr->textVarName) { - void *probe = NULL; - - do { - probe = Tcl_VarTraceInfo(interp, - entryPtr->textVarName, - TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, - EntryTextVarProc, probe); - if (probe == entryPtr) { - break; - } - } while (probe); - if (probe) { - /* - * We were able to fetch the unset trace for our - * textVarName, which means it is not unset and not - * the cause of this unset trace. Instead some outdated - * former variable must be, and we should ignore it. - */ - return NULL; - } - Tcl_SetVar2(interp, entryPtr->textVarName, NULL, + if (!Tcl_InterpDeleted(interp) && entryPtr->textVarNameObj) { + void *probe = NULL; + + do { + probe = Tcl_VarTraceInfo(interp, + Tcl_GetString(entryPtr->textVarNameObj), + TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, + EntryTextVarProc, probe); + if (probe == entryPtr) { + break; + } + } while (probe); + if (probe) { + /* + * We were able to fetch the unset trace for our + * textVarName, which means it is not unset and not + * the cause of this unset trace. Instead some outdated + * former variable must be, and we should ignore it. + */ + return NULL; + } + Tcl_SetVar2(interp, Tcl_GetString(entryPtr->textVarNameObj), NULL, entryPtr->string, TCL_GLOBAL_ONLY); - Tcl_TraceVar2(interp, entryPtr->textVarName, NULL, + Tcl_TraceVar2(interp, Tcl_GetString(entryPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, EntryTextVarProc, clientData); entryPtr->flags |= ENTRY_VAR_TRACED; - } + } return NULL; } @@ -3298,7 +3334,7 @@ EntryTextVarProc( * value because we changed it because someone typed in the entry). */ - value = Tcl_GetVar2(interp, entryPtr->textVarName, NULL, TCL_GLOBAL_ONLY); + value = Tcl_GetVar2(interp, Tcl_GetString(entryPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY); if (value == NULL) { value = ""; } @@ -3400,11 +3436,11 @@ EntryValidateChange( char *p; Tcl_DString script; - if (entryPtr->validateCmd == NULL || + if (entryPtr->validateCmdObj == NULL || entryPtr->validate == VALIDATE_NONE) { - if (entryPtr->flags & VALIDATING) { - entryPtr->flags |= VALIDATE_ABORT; - } + if (entryPtr->flags & VALIDATING) { + entryPtr->flags |= VALIDATE_ABORT; + } return (varValidate ? TCL_ERROR : TCL_OK); } @@ -3416,7 +3452,7 @@ EntryValidateChange( if (entryPtr->flags & VALIDATING) { entryPtr->validate = VALIDATE_NONE; - entryPtr->flags |= VALIDATE_ABORT; + entryPtr->flags |= VALIDATE_ABORT; return (varValidate ? TCL_ERROR : TCL_OK); } @@ -3427,7 +3463,7 @@ EntryValidateChange( */ Tcl_DStringInit(&script); - ExpandPercents(entryPtr, entryPtr->validateCmd, + ExpandPercents(entryPtr, (entryPtr->validateCmdObj ? Tcl_GetString(entryPtr->validateCmdObj) : NULL), change, newValue, index, type, &script); Tcl_DStringAppend(&script, "", 1); @@ -3475,11 +3511,11 @@ EntryValidateChange( if (varValidate) { entryPtr->validate = VALIDATE_NONE; - } else if (entryPtr->invalidCmd != NULL) { + } else if (entryPtr->invalidCmdObj != NULL) { int result; Tcl_DStringInit(&script); - ExpandPercents(entryPtr, entryPtr->invalidCmd, + ExpandPercents(entryPtr, Tcl_GetString(entryPtr->invalidCmdObj), change, newValue, index, type, &script); Tcl_DStringAppend(&script, "", 1); p = Tcl_DStringValue(&script); @@ -3932,9 +3968,9 @@ SpinboxWidgetObjCmd( } if ((last >= first) && (entryPtr->state == STATE_NORMAL)) { code = DeleteChars(entryPtr, first, last - first); - if (code != TCL_OK) { - goto error; - } + if (code != TCL_OK) { + goto error; + } } break; } @@ -4007,9 +4043,9 @@ SpinboxWidgetObjCmd( } if (entryPtr->state == STATE_NORMAL) { code = InsertChars(entryPtr, index, Tcl_GetString(objv[3])); - if (code != TCL_OK) { - goto error; - } + if (code != TCL_OK) { + goto error; + } } break; } @@ -4229,9 +4265,9 @@ SpinboxWidgetObjCmd( } if (objc == 3) { code = EntryValueChanged(entryPtr, Tcl_GetString(objv[2])); - if (code != TCL_OK) { - goto error; - } + if (code != TCL_OK) { + goto error; + } } Tcl_SetObjResult(interp, Tcl_NewStringObj(entryPtr->string, TCL_INDEX_NONE)); break; @@ -4505,12 +4541,12 @@ SpinboxInvoke( } } if (code != TCL_OK) { - return TCL_ERROR; + return TCL_ERROR; } - if (sbPtr->command != NULL) { + if (sbPtr->commandObj != NULL) { Tcl_DStringInit(&script); - ExpandPercents(entryPtr, sbPtr->command, type, "", 0, + ExpandPercents(entryPtr, Tcl_GetString(sbPtr->commandObj), type, "", 0, VALIDATE_BUTTON, &script); Tcl_DStringAppend(&script, "", 1); @@ -4567,8 +4603,8 @@ ComputeFormat( * required for any number in the dial's range. */ - if (sbPtr->reqFormat) { - sbPtr->valueFormat = sbPtr->reqFormat; + if (sbPtr->reqFormatObj) { + sbPtr->valueFormat = Tcl_GetString(sbPtr->reqFormatObj); return TCL_OK; } diff --git a/generic/tkEntry.h b/generic/tkEntry.h index fbebdaa..387b9e2 100644 --- a/generic/tkEntry.h +++ b/generic/tkEntry.h @@ -81,7 +81,11 @@ typedef struct { Tk_3DBorder readonlyBorder; /* Used for drawing border around whole window * in readonly state, plus used for * background. */ - int borderWidth; /* Width of 3-D border around window. */ +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *borderWidthObj; /* Width of 3-D border around window. */ +#else + int borderWidth; +#endif Tk_Cursor cursor; /* Current cursor for window, or NULL. */ int exportSelection; /* Non-zero means tie internal entry selection * to X selection. */ @@ -91,57 +95,59 @@ typedef struct { XColor *highlightBgColorPtr;/* Color for drawing traversal highlight area * when highlight is off. */ XColor *highlightColorPtr; /* Color for drawing traversal highlight. */ - int highlightWidth; /* Width in pixels of highlight to draw around +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *highlightWidthObj; /* Width in pixels of highlight to draw around * widget when it has the focus. <= 0 means * don't draw a highlight. */ +#else + int highlightWidth; +#endif Tk_3DBorder insertBorder; /* Used to draw vertical bar for insertion * cursor. */ - int insertBorderWidth; /* Width of 3-D border around insert cursor. */ +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *insertBorderWidthObj; /* Width of 3-D border around insert cursor. */ +#else + int insertBorderWidth; +#endif int insertOffTime; /* Number of milliseconds cursor should spend * in "off" state for each blink. */ int insertOnTime; /* Number of milliseconds cursor should spend * in "on" state for each blink. */ - int insertWidth; /* Total width of insert cursor. */ +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *insertWidthObj; /* Total width of insert cursor. */ +#else + int insertWidth; +#endif Tk_Justify justify; /* Justification to use for text within * window. */ int relief; /* 3-D effect: TK_RELIEF_RAISED, etc. */ Tk_3DBorder selBorder; /* Border and background for selected * characters. */ - int selBorderWidth; /* Width of border around selection. */ +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *selBorderWidthObj; /* Width of border around selection. */ +#else + int selBorderWidth; +#endif XColor *selFgColorPtr; /* Foreground color for selected text. */ int state; /* Normal or disabled. Entry is read-only when * disabled. */ - char *textVarName; /* Name of variable (malloc'ed) or NULL. If + Tcl_Obj *textVarNameObj; /* Name of variable (malloc'ed) or NULL. If * non-NULL, entry's string tracks the * contents of this variable and vice * versa. */ - char *takeFocus; /* Value of -takefocus option; not used in the + Tcl_Obj *takeFocusObj; /* Value of -takefocus option; not used in the * C code, but used by keyboard traversal - * scripts. Malloc'ed, but may be NULL. */ + * scripts. May be NULL. */ int prefWidth; /* Desired width of window, measured in * average characters. */ - char *scrollCmd; /* Command prefix for communicating with - * scrollbar(s). Malloc'ed. NULL means no - * command to issue. */ - char *showChar; /* Value of -show option. If non-NULL, first + Tcl_Obj *scrollCmdObj; /* Command prefix for communicating with + * scrollbar(s). NULL means no command to issue. */ + Tcl_Obj *showCharObj; /* Value of -show option. If non-NULL, first * character is used for displaying all - * characters in entry. Malloc'ed. This is + * characters in entry. This is * only used by the Entry widget. */ /* - * Fields used in displaying help text if entry value is empty - */ - - Tk_TextLayout placeholderLayout;/* Cached placeholder text layout information. */ - char *placeholderString; /* String value of placeholder. */ - Tcl_Size placeholderChars; /* Number of chars in placeholder. */ - XColor *placeholderColorPtr;/* Color value of placeholder foreground. */ - GC placeholderGC; /* For drawing placeholder text. */ - int placeholderX; /* Origin for layout. */ - int placeholderLeftIndex; /* Character index of left-most character - * visible in window. */ - - /* * Fields whose values are derived from the current values of the * configuration settings above. */ @@ -181,11 +187,22 @@ typedef struct { * definitions. */ int validate; /* Non-zero means try to validate */ - char *validateCmd; /* Command prefix to use when invoking - * validate command. NULL means don't invoke - * commands. Malloc'ed. */ - char *invalidCmd; /* Command called when a validation returns 0 + Tcl_Obj *validateCmdObj; /* Command prefix to use when invoking + * validate command. NULL means don't invoke commands. */ + Tcl_Obj *invalidCmdObj; /* Command called when a validation returns 0 * (successfully fails), defaults to {}. */ + /* + * Fields used in displaying help text if entry value is empty + */ + + Tk_TextLayout placeholderLayout;/* Cached placeholder text layout information. */ + Tcl_Obj *placeholderObj; /* String value of placeholder. */ + Tcl_Size placeholderChars; /* Number of chars in placeholder. */ + XColor *placeholderColorPtr;/* Color value of placeholder foreground. */ + GC placeholderGC; /* For drawing placeholder text. */ + int placeholderX; /* Origin for layout. */ + int placeholderLeftIndex; /* Character index of left-most character + * visible in window. */ } Entry; /* @@ -208,7 +225,7 @@ typedef struct { Tk_Cursor bCursor; /* cursor for buttons, or NULL. */ int bdRelief; /* 3-D effect: TK_RELIEF_RAISED, etc. */ int buRelief; /* 3-D effect: TK_RELIEF_RAISED, etc. */ - char *command; /* Command to invoke for spin buttons. NULL + Tcl_Obj *commandObj; /* Command to invoke for spin buttons. NULL * means no command to issue. */ /* @@ -230,7 +247,7 @@ typedef struct { * multiple of this value. */ char *formatBuf; /* string into which to format value. * Malloc'ed. */ - char *reqFormat; /* Snprintf conversion specifier used for the + Tcl_Obj *reqFormatObj; /* Snprintf conversion specifier used for the * value that the users requests. Malloc'ed */ char *valueFormat; /* Snprintf conversion specifier used for the * value. */ @@ -238,7 +255,7 @@ typedef struct { * digits and other information; used for the * value. */ - char *valueStr; /* Values List. Malloc'ed. */ + Tcl_Obj *valueObj; /* Values List. */ Tcl_Obj *listObj; /* Pointer to the list object being used */ int eIndex; /* Holds the current index into elements */ int nElements; /* Holds the current count of elements */ diff --git a/generic/tkError.c b/generic/tkError.c index bffcbe5..8ea6d3d 100644 --- a/generic/tkError.c +++ b/generic/tkError.c @@ -153,6 +153,11 @@ Tk_DeleteErrorHandler( errorPtr->lastRequest = NextRequest(dispPtr->display) - 1; /* + * Ensure that no user callback for this handler is invoked any further. + */ + errorPtr->errorProc = NULL; + + /* * Every once-in-a-while, cleanup handlers that are no longer active. We * probably won't be able to free the handler that was just deleted (need * to wait for any outstanding requests to be processed by server), but diff --git a/generic/tkFont.c b/generic/tkFont.c index 6c47150..ab080e1 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -634,7 +634,7 @@ Tk_FontObjCmd( } if ((namedHashPtr == NULL) || nfPtr->deletePending) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "named font \"%s\" doesn't exist", string)); + "named font \"%s\" does not exist", string)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "FONT", string, NULL); return TCL_ERROR; } @@ -890,17 +890,6 @@ TheWorldHasChanged( { TkFontInfo *fiPtr = (TkFontInfo *)clientData; - /* - * On macOS it is catastrophic to recompute all widgets while the - * [NSView drawRect] method is drawing. The best that we can do in - * that situation is to abort the recomputation and hope for the best. - * This is ignored on other platforms. - */ - - if (TkpWillDrawWidget(NULL)) { - return; - } - fiPtr->updatePending = 0; RecomputeWidgets(fiPtr->mainPtr->winPtr); } @@ -1042,7 +1031,7 @@ TkDeleteNamedFont( if (namedHashPtr == NULL) { if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "named font \"%s\" doesn't exist", name)); + "named font \"%s\" does not exist", name)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "FONT", name, NULL); } return TCL_ERROR; @@ -3218,8 +3207,8 @@ TkIntersectAngledTextLayout( PointInQuadrilateral(cx, cy, rx[1], ry[1]) && PointInQuadrilateral(cx, cy, rx[2], ry[2]) && PointInQuadrilateral(cx, cy, rx[3], ry[3])) { - return 0; - } + return 0; + } } /* @@ -3757,7 +3746,7 @@ ParseFontNameObj( || (objc < 1)) { if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "font \"%s\" doesn't exist", string)); + "font \"%s\" does not exist", string)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "FONT", string, NULL); } return TCL_ERROR; diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 8e4bb93..27dab9d 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -41,19 +41,16 @@ typedef struct { Tcl_Command widgetCmd; /* Token for frame's widget command. */ Tk_OptionTable optionTable; /* Table that defines configuration options * available for this widget. */ - char *className; /* Class name for widget (from configuration - * option). Malloc-ed. */ + Tcl_Obj *classNameObj; /* Class name for widget (from configuration + * option). May be NULL. */ int type; /* Type of widget, such as TYPE_FRAME. */ - char *screenName; /* Screen on which widget is created. Non-null - * only for top-levels. Malloc-ed, may be - * NULL. */ - char *visualName; /* Textual description of visual for window, - * from -visual option. Malloc-ed, may be - * NULL. */ - char *colormapName; /* Textual description of colormap for window, - * from -colormap option. Malloc-ed, may be - * NULL. */ - char *menuName; /* Textual description of menu to use for + Tcl_Obj *screenNameObj; /* Screen on which widget is created. Non-null + * only for top-levels. May be NULL. */ + Tcl_Obj *visualNameObj; /* Textual description of visual for window, + * from -visual option. May be NULL. */ + Tcl_Obj *colormapNameObj; /* Textual description of colormap for window, + * from -colormap option. May be NULL. */ + Tcl_Obj *menuNameObj; /* Textual description of menu to use for * menubar. Malloc-ed, may be NULL. */ Colormap colormap; /* If not None, identifies a colormap * allocated for this window, which must be @@ -61,39 +58,36 @@ typedef struct { Tk_3DBorder border; /* Structure used to draw 3-D border and * background. NULL means no background or * border. */ - int borderWidth; /* Width of 3-D border (if any). */ + Tcl_Obj *borderWidthObj; /* Width of 3-D border (if any). */ int relief; /* 3-d effect: TK_RELIEF_RAISED etc. */ - int highlightWidth; /* Width in pixels of highlight to draw around + Tcl_Obj *highlightWidthObj; /* Width in pixels of highlight to draw around * widget when it has the focus. 0 means don't * draw a highlight. */ XColor *highlightBgColorPtr; /* Color for drawing traversal highlight area * when highlight is off. */ XColor *highlightColorPtr; /* Color for drawing traversal highlight. */ - int width; /* Width to request for window. <= 0 means + Tcl_Obj *widthObj; /* Width to request for window. <= 0 means * don't request any size. */ - int height; /* Height to request for window. <= 0 means + Tcl_Obj *heightObj; /* Height to request for window. <= 0 means * don't request any size. */ Tk_Cursor cursor; /* Current cursor for window, or None. */ - char *takeFocus; /* Value of -takefocus option; not used in the + Tcl_Obj *takeFocusObj; /* Value of -takefocus option; not used in the * C code, but used by keyboard traversal - * scripts. Malloc'ed, but may be NULL. */ + * scripts. May be NULL. */ int isContainer; /* 1 means this window is a container, 0 means * that it isn't. */ - char *useThis; /* If the window is embedded, this points to + Tcl_Obj *useThisObj; /* If the window is embedded, this points to * the name of the window in which it is - * embedded (malloc'ed). For non-embedded - * windows this is NULL. */ + * embedded. For non-embedded windows this is NULL. */ int flags; /* Various flags; see below for * definitions. */ - Tcl_Obj *padXPtr; /* Value of -padx option: specifies how many + Tcl_Obj *padXObj; /* Value of -padx option: specifies how many * pixels of extra space to leave on left and * right of child area. */ - int padX; /* Integer value corresponding to padXPtr. */ - Tcl_Obj *padYPtr; /* Value of -padx option: specifies how many + Tcl_Obj *padYObj; /* Value of -padx option: specifies how many * pixels of extra space to leave above and * below child area. */ - int padY; /* Integer value corresponding to padYPtr. */ Tcl_Obj *bgimgPtr; /* Value of -backgroundimage option: specifies * image to display on window's background, or * NULL if none. */ @@ -189,7 +183,7 @@ static const Tk_OptionSpec commonOptSpec[] = { {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, {TK_OPTION_STRING, "-colormap", "colormap", "Colormap", - DEF_FRAME_COLORMAP, TCL_INDEX_NONE, offsetof(Frame, colormapName), + DEF_FRAME_COLORMAP, offsetof(Frame, colormapNameObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, /* * Having -container is useless in a labelframe since a container has @@ -201,7 +195,7 @@ static const Tk_OptionSpec commonOptSpec[] = { DEF_FRAME_CURSOR, TCL_INDEX_NONE, offsetof(Frame, cursor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-height", "height", "Height", - DEF_FRAME_HEIGHT, TCL_INDEX_NONE, offsetof(Frame, height), 0, 0, 0}, + DEF_FRAME_HEIGHT, offsetof(Frame, heightObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_FRAME_HIGHLIGHT_BG, TCL_INDEX_NONE, offsetof(Frame, highlightBgColorPtr), 0, 0, 0}, @@ -209,22 +203,20 @@ static const Tk_OptionSpec commonOptSpec[] = { DEF_FRAME_HIGHLIGHT, TCL_INDEX_NONE, offsetof(Frame, highlightColorPtr), 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", - "HighlightThickness", DEF_FRAME_HIGHLIGHT_WIDTH, TCL_INDEX_NONE, - offsetof(Frame, highlightWidth), 0, 0, 0}, + "HighlightThickness", DEF_FRAME_HIGHLIGHT_WIDTH, offsetof(Frame, highlightWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-padx", "padX", "Pad", - DEF_FRAME_PADX, offsetof(Frame, padXPtr), - offsetof(Frame, padX), 0, 0, 0}, + DEF_FRAME_PADX, offsetof(Frame, padXObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-pady", "padY", "Pad", - DEF_FRAME_PADY, offsetof(Frame, padYPtr), - offsetof(Frame, padY), 0, 0, 0}, + DEF_FRAME_PADY, offsetof(Frame, padYObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", - DEF_FRAME_TAKE_FOCUS, TCL_INDEX_NONE, offsetof(Frame, takeFocus), + DEF_FRAME_TAKE_FOCUS, offsetof(Frame, takeFocusObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-visual", "visual", "Visual", - DEF_FRAME_VISUAL, TCL_INDEX_NONE, offsetof(Frame, visualName), + DEF_FRAME_VISUAL, offsetof(Frame, visualNameObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-width", "width", "Width", - DEF_FRAME_WIDTH, TCL_INDEX_NONE, offsetof(Frame, width), 0, 0, 0}, + DEF_FRAME_WIDTH, offsetof(Frame, widthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0} }; @@ -237,9 +229,9 @@ static const Tk_OptionSpec frameOptSpec[] = { {TK_OPTION_SYNONYM, "-bgimg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-backgroundimage", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_FRAME_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Frame, borderWidth), 0, 0, 0}, + DEF_FRAME_BORDER_WIDTH, offsetof(Frame, borderWidthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-class", "class", "Class", - DEF_FRAME_CLASS, TCL_INDEX_NONE, offsetof(Frame, className), 0, 0, 0}, + DEF_FRAME_CLASS, offsetof(Frame, classNameObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_FRAME_RELIEF, TCL_INDEX_NONE, offsetof(Frame, relief), 0, 0, 0}, {TK_OPTION_BOOLEAN, "-tile", "tile", "Tile", @@ -257,21 +249,21 @@ static const Tk_OptionSpec toplevelOptSpec[] = { {TK_OPTION_SYNONYM, "-bgimg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-backgroundimage", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_FRAME_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Frame, borderWidth), 0, 0, 0}, + DEF_FRAME_BORDER_WIDTH, offsetof(Frame, borderWidthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-class", "class", "Class", - DEF_TOPLEVEL_CLASS, TCL_INDEX_NONE, offsetof(Frame, className), 0, 0, 0}, + DEF_TOPLEVEL_CLASS, offsetof(Frame, classNameObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-menu", "menu", "Menu", - DEF_TOPLEVEL_MENU, TCL_INDEX_NONE, offsetof(Frame, menuName), + DEF_TOPLEVEL_MENU, offsetof(Frame, menuNameObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_FRAME_RELIEF, TCL_INDEX_NONE, offsetof(Frame, relief), 0, 0, 0}, {TK_OPTION_STRING, "-screen", "screen", "Screen", - DEF_TOPLEVEL_SCREEN, TCL_INDEX_NONE, offsetof(Frame, screenName), + DEF_TOPLEVEL_SCREEN, offsetof(Frame, screenNameObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_BOOLEAN, "-tile", "tile", "Tile", DEF_FRAME_BG_TILE, TCL_INDEX_NONE, offsetof(Frame, tile), 0, 0, 0}, {TK_OPTION_STRING, "-use", "use", "Use", - DEF_TOPLEVEL_USE, TCL_INDEX_NONE, offsetof(Frame, useThis), + DEF_TOPLEVEL_USE, offsetof(Frame, useThisObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, commonOptSpec, 0} @@ -281,10 +273,10 @@ static const Tk_OptionSpec labelframeOptSpec[] = { {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_LABELFRAME_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Frame, borderWidth), + DEF_LABELFRAME_BORDER_WIDTH, offsetof(Frame, borderWidthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-class", "class", "Class", - DEF_LABELFRAME_CLASS, TCL_INDEX_NONE, offsetof(Frame, className), 0, 0, 0}, + DEF_LABELFRAME_CLASS, offsetof(Frame, classNameObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", @@ -441,6 +433,7 @@ Tk_LabelframeObjCmd( * *-------------------------------------------------------------- */ + int TkCreateFrame( TCL_UNUSED(void *), @@ -561,7 +554,7 @@ TkCreateFrame( * Mark Tk frames as suitable candidates for [wm manage]. */ - ((TkWindow *) newWin)->flags |= TK_WM_MANAGEABLE; + ((TkWindow *)newWin)->flags |= TK_WM_MANAGEABLE; if (className == NULL) { className = Tk_GetOption(newWin, "class", "Class"); @@ -660,7 +653,7 @@ TkCreateFrame( goto error; } if (framePtr->isContainer) { - if (framePtr->useThis != NULL) { + if (framePtr->useThisObj != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "windows cannot have both the -use and the -container" " option set", TCL_INDEX_NONE)); @@ -927,20 +920,20 @@ ConfigureFrame( Tcl_Obj *const objv[]) /* Arguments. */ { Tk_SavedOptions savedOptions; - char *oldMenuName; + Tcl_Obj *oldMenuNameObj; Tk_Window oldWindow = NULL; Labelframe *labelframePtr = (Labelframe *) framePtr; Tk_Image image = NULL; + int padX, padY, width, height; + int borderWidth, highlightWidth; /* * Need the old menubar name for the menu code to delete it. */ - if (framePtr->menuName == NULL) { - oldMenuName = NULL; - } else { - oldMenuName = (char *)ckalloc(strlen(framePtr->menuName) + 1); - strcpy(oldMenuName, framePtr->menuName); + oldMenuNameObj = framePtr->menuNameObj; + if (oldMenuNameObj) { + Tcl_IncrRefCount(oldMenuNameObj); } if (framePtr->type == TYPE_LABELFRAME) { @@ -949,8 +942,8 @@ ConfigureFrame( if (Tk_SetOptions(interp, framePtr, framePtr->optionTable, objc, objv, framePtr->tkwin, &savedOptions, NULL) != TCL_OK) { - if (oldMenuName != NULL) { - ckfree(oldMenuName); + if (oldMenuNameObj != NULL) { + Tcl_DecrRefCount(oldMenuNameObj); } return TCL_ERROR; } @@ -974,17 +967,17 @@ ConfigureFrame( * A few of the options require additional processing. */ - if ((((oldMenuName == NULL) && (framePtr->menuName != NULL)) - || ((oldMenuName != NULL) && (framePtr->menuName == NULL)) - || ((oldMenuName != NULL) && (framePtr->menuName != NULL) - && strcmp(oldMenuName, framePtr->menuName) != 0)) + if ((((oldMenuNameObj == NULL) && (framePtr->menuNameObj != NULL)) + || ((oldMenuNameObj != NULL) && (framePtr->menuNameObj == NULL)) + || ((oldMenuNameObj != NULL) && (framePtr->menuNameObj != NULL) + && strcmp(Tcl_GetString(oldMenuNameObj), Tcl_GetString(framePtr->menuNameObj)) != 0)) && framePtr->type == TYPE_TOPLEVEL) { - Tk_SetWindowMenubar(interp, framePtr->tkwin, oldMenuName, - framePtr->menuName); + Tk_SetWindowMenubar(interp, framePtr->tkwin, (oldMenuNameObj ? Tcl_GetString(oldMenuNameObj) : NULL), + (framePtr->menuNameObj ? Tcl_GetString(framePtr->menuNameObj) : NULL)); } - if (oldMenuName != NULL) { - ckfree(oldMenuName); + if (oldMenuNameObj != NULL) { + Tcl_DecrRefCount(oldMenuNameObj); } if (framePtr->border != NULL) { @@ -993,14 +986,41 @@ ConfigureFrame( Tk_SetWindowBackgroundPixmap(framePtr->tkwin, None); } - if (framePtr->highlightWidth < 0) { - framePtr->highlightWidth = 0; + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->widthObj, &width); + if (width < 0) { + Tcl_DecrRefCount(framePtr->widthObj); + framePtr->widthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(framePtr->widthObj); + } + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->heightObj, &height); + if (height < 0) { + Tcl_DecrRefCount(framePtr->heightObj); + framePtr->heightObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(framePtr->heightObj); + } + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->borderWidthObj, &borderWidth); + if (borderWidth < 0) { + Tcl_DecrRefCount(framePtr->borderWidthObj); + framePtr->borderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(framePtr->borderWidthObj); + } + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->highlightWidthObj, &highlightWidth); + if (highlightWidth < 0) { + Tcl_DecrRefCount(framePtr->highlightWidthObj); + framePtr->highlightWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(framePtr->highlightWidthObj); } - if (framePtr->padX < 0) { - framePtr->padX = 0; + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->padXObj, &padX); + if (padX < 0) { + Tcl_DecrRefCount(framePtr->padXObj); + framePtr->padXObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(framePtr->padXObj); } - if (framePtr->padY < 0) { - framePtr->padY = 0; + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->padYObj, &padY); + if (padY < 0) { + Tcl_DecrRefCount(framePtr->padYObj); + framePtr->padYObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(framePtr->padYObj); } /* @@ -1102,6 +1122,8 @@ FrameWorldChanged( int anyTextLabel, anyWindowLabel; int bWidthLeft, bWidthRight, bWidthTop, bWidthBottom; const char *labelText; + int padX, padY, width, height; + int borderWidth, highlightWidth; anyTextLabel = (framePtr->type == TYPE_LABELFRAME) && (labelframePtr->textPtr != NULL) && @@ -1117,6 +1139,7 @@ FrameWorldChanged( } framePtr->copyGC = gc; #endif /* TK_NO_DOUBLE_BUFFERING */ + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->borderWidthObj, &borderWidth); if (framePtr->type == TYPE_LABELFRAME) { /* @@ -1164,12 +1187,12 @@ FrameWorldChanged( if ((labelframePtr->labelAnchor >= LABELANCHOR_N) && (labelframePtr->labelAnchor <= LABELANCHOR_SW)) { - if (labelframePtr->labelReqHeight < framePtr->borderWidth) { - labelframePtr->labelReqHeight = framePtr->borderWidth; + if (labelframePtr->labelReqHeight < borderWidth) { + labelframePtr->labelReqHeight = borderWidth; } } else { - if (labelframePtr->labelReqWidth < framePtr->borderWidth) { - labelframePtr->labelReqWidth = framePtr->borderWidth; + if (labelframePtr->labelReqWidth < borderWidth) { + labelframePtr->labelReqWidth = borderWidth; } } } @@ -1178,35 +1201,36 @@ FrameWorldChanged( * Calculate individual border widths. */ + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->highlightWidthObj, &highlightWidth); bWidthBottom = bWidthTop = bWidthRight = bWidthLeft = - framePtr->borderWidth + framePtr->highlightWidth; + borderWidth + highlightWidth; - bWidthLeft += framePtr->padX; - bWidthRight += framePtr->padX; - bWidthTop += framePtr->padY; - bWidthBottom += framePtr->padY; + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->padYObj, &padY); + bWidthLeft += padX; + bWidthRight += padX; + bWidthTop += padY; + bWidthBottom += padY; if (anyTextLabel || anyWindowLabel) { switch (labelframePtr->labelAnchor) { case LABELANCHOR_E: case LABELANCHOR_EN: case LABELANCHOR_ES: - bWidthRight += labelframePtr->labelReqWidth - - framePtr->borderWidth; + bWidthRight += labelframePtr->labelReqWidth - borderWidth; break; case LABELANCHOR_N: case LABELANCHOR_NE: case LABELANCHOR_NW: - bWidthTop += labelframePtr->labelReqHeight - framePtr->borderWidth; + bWidthTop += labelframePtr->labelReqHeight - borderWidth; break; case LABELANCHOR_S: case LABELANCHOR_SE: case LABELANCHOR_SW: - bWidthBottom += labelframePtr->labelReqHeight - - framePtr->borderWidth; + bWidthBottom += labelframePtr->labelReqHeight - borderWidth; break; default: - bWidthLeft += labelframePtr->labelReqWidth - framePtr->borderWidth; + bWidthLeft += labelframePtr->labelReqWidth - borderWidth; break; } } @@ -1223,25 +1247,27 @@ FrameWorldChanged( if (framePtr->type == TYPE_LABELFRAME) { int minwidth = labelframePtr->labelReqWidth; int minheight = labelframePtr->labelReqHeight; - int padding = framePtr->highlightWidth; + int padding = highlightWidth; - if (framePtr->borderWidth > 0) { - padding += framePtr->borderWidth + LABELMARGIN; + if (borderWidth > 0) { + padding += borderWidth + LABELMARGIN; } padding *= 2; if ((labelframePtr->labelAnchor >= LABELANCHOR_N) && (labelframePtr->labelAnchor <= LABELANCHOR_SW)) { minwidth += padding; - minheight += framePtr->borderWidth + framePtr->highlightWidth; + minheight += borderWidth + highlightWidth; } else { minheight += padding; - minwidth += framePtr->borderWidth + framePtr->highlightWidth; + minwidth += borderWidth + highlightWidth; } Tk_SetMinimumRequestSize(tkwin, minwidth, minheight); } - if ((framePtr->width > 0) || (framePtr->height > 0)) { - Tk_GeometryRequest(tkwin, framePtr->width, framePtr->height); + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->widthObj, &width); + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->heightObj, &height); + if ((width > 0) || (height > 0)) { + Tk_GeometryRequest(tkwin, width, height); } if (Tk_IsMapped(tkwin)) { @@ -1277,6 +1303,7 @@ ComputeFrameGeometry( int otherWidth, otherHeight, otherWidthT, otherHeightT, padding; int maxWidth, maxHeight; Tk_Window tkwin; + int borderWidth, highlightWidth; Labelframe *labelframePtr = (Labelframe *) framePtr; /* @@ -1299,9 +1326,11 @@ ComputeFrameGeometry( labelframePtr->labelBox.width = labelframePtr->labelReqWidth; labelframePtr->labelBox.height = labelframePtr->labelReqHeight; - padding = framePtr->highlightWidth; - if (framePtr->borderWidth > 0) { - padding += framePtr->borderWidth + LABELMARGIN; + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->highlightWidthObj, &highlightWidth); + padding = highlightWidth; + if (borderWidth > 0) { + padding += borderWidth + LABELMARGIN; } padding *= 2; @@ -1337,7 +1366,7 @@ ComputeFrameGeometry( otherHeight = Tk_Height(tkwin) - labelframePtr->labelBox.height; otherWidthT = Tk_Width(tkwin) - labelframePtr->labelReqWidth; otherHeightT = Tk_Height(tkwin) - labelframePtr->labelReqHeight; - padding = framePtr->highlightWidth; + padding = highlightWidth; switch (labelframePtr->labelAnchor) { case LABELANCHOR_E: @@ -1364,8 +1393,8 @@ ComputeFrameGeometry( break; } - if (framePtr->borderWidth > 0) { - padding += framePtr->borderWidth + LABELMARGIN; + if (borderWidth > 0) { + padding += borderWidth + LABELMARGIN; } switch (labelframePtr->labelAnchor) { @@ -1423,9 +1452,10 @@ DisplayFrame( { Frame *framePtr = (Frame *)clientData; Tk_Window tkwin = framePtr->tkwin; - int bdX1, bdY1, bdX2, bdY2, hlWidth; + int bdX1, bdY1, bdX2, bdY2; Pixmap pixmap; Bool useClipping = False; + int borderWidth, highlightWidth; framePtr->flags &= ~REDRAW_PENDING; if ((framePtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { @@ -1436,9 +1466,9 @@ DisplayFrame( * Highlight shall always be drawn if it exists, so do that first. */ - hlWidth = framePtr->highlightWidth; + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->highlightWidthObj, &highlightWidth); - if (hlWidth != 0) { + if (highlightWidth > 0) { GC fgGC, bgGC; bgGC = Tk_GCForColor(framePtr->highlightBgColorPtr, @@ -1446,10 +1476,10 @@ DisplayFrame( if (framePtr->flags & GOT_FOCUS) { fgGC = Tk_GCForColor(framePtr->highlightColorPtr, Tk_WindowId(tkwin)); - Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, hlWidth, + Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, highlightWidth, Tk_WindowId(tkwin)); } else { - Tk_DrawHighlightBorder(tkwin, bgGC, bgGC, hlWidth, + Tk_DrawHighlightBorder(tkwin, bgGC, bgGC, highlightWidth, Tk_WindowId(tkwin)); } } @@ -1478,7 +1508,10 @@ DisplayFrame( Tk_Depth(tkwin)); #else pixmap = Tk_WindowId(tkwin); + Tk_ClipDrawableToRect(Tk_Display(tkwin), pixmap, 0, 0, + Tk_Width(tkwin), Tk_Height(tkwin)); #endif /* TK_NO_DOUBLE_BUFFERING */ + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->borderWidthObj, &borderWidth); if (framePtr->type != TYPE_LABELFRAME) { /* @@ -1487,10 +1520,10 @@ DisplayFrame( */ noLabel: - TkpDrawFrameEx(tkwin, pixmap, framePtr->border, hlWidth, - framePtr->borderWidth, framePtr->relief); + TkpDrawFrameEx(tkwin, pixmap, framePtr->border, highlightWidth, + borderWidth, framePtr->relief); if (framePtr->bgimg) { - DrawFrameBackground(tkwin, pixmap, hlWidth, framePtr->borderWidth, + DrawFrameBackground(tkwin, pixmap, highlightWidth, borderWidth, framePtr->bgimg, framePtr->tile); } } else { @@ -1512,15 +1545,15 @@ DisplayFrame( * Calculate how the label affects the border's position. */ - bdX1 = bdY1 = hlWidth; - bdX2 = Tk_Width(tkwin) - hlWidth; - bdY2 = Tk_Height(tkwin) - hlWidth; + bdX1 = bdY1 = highlightWidth; + bdX2 = Tk_Width(tkwin) - highlightWidth; + bdY2 = Tk_Height(tkwin) - highlightWidth; switch (labelframePtr->labelAnchor) { case LABELANCHOR_E: case LABELANCHOR_EN: case LABELANCHOR_ES: - bdX2 -= (labelframePtr->labelBox.width-framePtr->borderWidth) / 2; + bdX2 -= (labelframePtr->labelBox.width-borderWidth) / 2; break; case LABELANCHOR_N: case LABELANCHOR_NE: @@ -1530,15 +1563,15 @@ DisplayFrame( * favor a lower border position by rounding up. */ - bdY1 += (labelframePtr->labelBox.height-framePtr->borderWidth+1)/2; + bdY1 += (labelframePtr->labelBox.height - borderWidth+1)/2; break; case LABELANCHOR_S: case LABELANCHOR_SE: case LABELANCHOR_SW: - bdY2 -= (labelframePtr->labelBox.height-framePtr->borderWidth) / 2; + bdY2 -= (labelframePtr->labelBox.height - borderWidth) / 2; break; default: - bdX1 += (labelframePtr->labelBox.width-framePtr->borderWidth) / 2; + bdX1 += (labelframePtr->labelBox.width - borderWidth) / 2; break; } @@ -1547,7 +1580,7 @@ DisplayFrame( */ Tk_Draw3DRectangle(tkwin, pixmap, framePtr->border, bdX1, bdY1, - bdX2 - bdX1, bdY2 - bdY1, framePtr->borderWidth, + bdX2 - bdX1, bdY2 - bdY1, borderWidth, framePtr->relief); if (labelframePtr->labelWin == NULL) { @@ -1618,10 +1651,10 @@ DisplayFrame( */ XCopyArea(framePtr->display, pixmap, Tk_WindowId(tkwin), - framePtr->copyGC, hlWidth, hlWidth, - (unsigned) (Tk_Width(tkwin) - 2 * hlWidth), - (unsigned) (Tk_Height(tkwin) - 2 * hlWidth), - hlWidth, hlWidth); + framePtr->copyGC, highlightWidth, highlightWidth, + (unsigned) (Tk_Width(tkwin) - 2 * highlightWidth), + (unsigned) (Tk_Height(tkwin) - 2 * highlightWidth), + highlightWidth, highlightWidth); Tk_FreePixmap(framePtr->display, pixmap); #endif /* TK_NO_DOUBLE_BUFFERING */ } @@ -1691,11 +1724,11 @@ FrameEventProc( ComputeFrameGeometry(framePtr); goto redraw; } else if (eventPtr->type == DestroyNotify) { - if (framePtr->menuName != NULL) { + if (framePtr->menuNameObj != NULL) { Tk_SetWindowMenubar(framePtr->interp, framePtr->tkwin, - framePtr->menuName, NULL); - ckfree(framePtr->menuName); - framePtr->menuName = NULL; + Tcl_GetString(framePtr->menuNameObj), NULL); + Tcl_DecrRefCount(framePtr->menuNameObj); + framePtr->menuNameObj = NULL; } if (framePtr->tkwin != NULL) { /* @@ -1728,21 +1761,25 @@ FrameEventProc( Tcl_EventuallyFree(framePtr, DestroyFrame); } else if (eventPtr->type == FocusIn) { if (eventPtr->xfocus.detail != NotifyInferior) { + int highlightWidth; framePtr->flags |= GOT_FOCUS; - if (framePtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { goto redraw; } } } else if (eventPtr->type == FocusOut) { if (eventPtr->xfocus.detail != NotifyInferior) { + int highlightWidth; framePtr->flags &= ~GOT_FOCUS; - if (framePtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, framePtr->tkwin, framePtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { goto redraw; } } } else if (eventPtr->type == ActivateNotify) { - Tk_SetMainMenubar(framePtr->interp, framePtr->tkwin, - framePtr->menuName); + Tk_SetMainMenubar(framePtr->interp, framePtr->tkwin, + (framePtr->menuNameObj ? Tcl_GetString(framePtr->menuNameObj) : NULL)); } return; @@ -1778,11 +1815,11 @@ FrameCmdDeletedProc( Frame *framePtr = (Frame *)clientData; Tk_Window tkwin = framePtr->tkwin; - if (framePtr->menuName != NULL) { + if (framePtr->menuNameObj != NULL) { Tk_SetWindowMenubar(framePtr->interp, framePtr->tkwin, - framePtr->menuName, NULL); - ckfree(framePtr->menuName); - framePtr->menuName = NULL; + Tcl_GetString(framePtr->menuNameObj), NULL); + Tcl_DecrRefCount(framePtr->menuNameObj); + framePtr->menuNameObj = NULL; } /* @@ -1878,7 +1915,7 @@ void TkInstallFrameMenu( Tk_Window tkwin) /* The window that was just created. */ { - TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *)tkwin; if (winPtr->mainPtr != NULL) { Frame *framePtr = (Frame *)winPtr->instanceData; @@ -1887,7 +1924,7 @@ TkInstallFrameMenu( Tcl_Panic("TkInstallFrameMenu couldn't get frame pointer"); } TkpMenuNotifyToplevelCreate(winPtr->mainPtr->interp, - framePtr->menuName); + (framePtr->menuNameObj ? Tcl_GetString(framePtr->menuNameObj) : NULL)); } } @@ -1976,7 +2013,7 @@ FrameRequestProc( static void FrameLostContentProc( - void *clientData, /* Frame structure for content window window that was + void *clientData, /* Frame structure for content window that was * stolen away. */ TCL_UNUSED(Tk_Window)) /* Tk's handle for the content window window. */ { @@ -2004,15 +2041,15 @@ void TkMapTopFrame( Tk_Window tkwin) { - Frame *framePtr = (Frame *)((TkWindow *) tkwin)->instanceData; + Frame *framePtr = (Frame *)((TkWindow *)tkwin)->instanceData; Tk_OptionTable optionTable; if (Tk_IsTopLevel(tkwin) && framePtr->type == TYPE_FRAME) { framePtr->type = TYPE_TOPLEVEL; Tcl_DoWhenIdle(MapFrame, framePtr); - if (framePtr->menuName != NULL) { + if (framePtr->menuNameObj != NULL) { Tk_SetWindowMenubar(framePtr->interp, framePtr->tkwin, NULL, - framePtr->menuName); + Tcl_GetString(framePtr->menuNameObj)); } } else if (!Tk_IsTopLevel(tkwin) && framePtr->type == TYPE_TOPLEVEL) { framePtr->type = TYPE_FRAME; diff --git a/generic/tkGeometry.c b/generic/tkGeometry.c index b34e3ba..bf35916 100644 --- a/generic/tkGeometry.c +++ b/generic/tkGeometry.c @@ -333,8 +333,8 @@ TkSetGeometryContainer( if (winPtr->geomMgrName != NULL) { if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "cannot use geometry manager %s inside %s because" - " %s is already managing it's content windows", + "cannot use geometry manager \"%s\" inside \"%s\":" + " %s is already managing its content windows", name, Tk_PathName(tkwin), winPtr->geomMgrName)); Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "FIGHT", (char *)NULL); } diff --git a/generic/tkGet.c b/generic/tkGet.c index f109582..1994697 100644 --- a/generic/tkGet.c +++ b/generic/tkGet.c @@ -153,7 +153,7 @@ Tk_GetAnchor( error: Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "bad anchor position \"%s\": must be" + "bad anchor \"%s\": must be" " n, ne, e, se, s, sw, w, nw, or center", string)); Tcl_SetErrorCode(interp, "TK", "VALUE", "ANCHOR", (char *)NULL); return TCL_ERROR; diff --git a/generic/tkGrab.c b/generic/tkGrab.c index a2be57b..f234161 100644 --- a/generic/tkGrab.c +++ b/generic/tkGrab.c @@ -524,24 +524,24 @@ Tk_Grab( if (grabResult == GrabNotViewable) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "grab failed: window not viewable", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "GRAB", "UNVIEWABLE", NULL); + Tcl_SetErrorCode(interp, "TK", "GRAB", "UNVIEWABLE", (char *)NULL); } else if (grabResult == AlreadyGrabbed) { alreadyGrabbed: Tcl_SetObjResult(interp, Tcl_NewStringObj( "grab failed: another application has grab", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "GRAB", "GRABBED", NULL); + Tcl_SetErrorCode(interp, "TK", "GRAB", "GRABBED", (char *)NULL); } else if (grabResult == GrabFrozen) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "grab failed: keyboard or pointer frozen", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "GRAB", "FROZEN", NULL); + Tcl_SetErrorCode(interp, "TK", "GRAB", "FROZEN", (char *)NULL); } else if (grabResult == GrabInvalidTime) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "grab failed: invalid time", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "GRAB", "BAD_TIME", NULL); + Tcl_SetErrorCode(interp, "TK", "GRAB", "BAD_TIME", (char *)NULL); } else { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "grab failed for unknown reason (code %d)", grabResult)); - Tcl_SetErrorCode(interp, "TK", "GRAB", "UNKNOWN", NULL); + Tcl_SetErrorCode(interp, "TK", "GRAB", "UNKNOWN", (char *)NULL); } return TCL_ERROR; } @@ -781,12 +781,12 @@ TkPointerEvent( if ((eventPtr->type == MotionNotify) && !appGrabbed) { - /* - * Warp the mouse pointer with respect to window dispPtr->warpWindow - * if such a window was set in HandleEventGenerate. - */ + /* + * Warp the mouse pointer with respect to window dispPtr->warpWindow + * if such a window was set in HandleEventGenerate. + */ - TkDoWarpWrtWin(dispPtr); + TkDoWarpWrtWin(dispPtr); } if (!appGrabbed) { @@ -820,12 +820,12 @@ TkPointerEvent( return 0; } - /* - * Warp the mouse pointer with respect to window dispPtr->warpWindow - * if such a window was set in HandleEventGenerate. - */ + /* + * Warp the mouse pointer with respect to window dispPtr->warpWindow + * if such a window was set in HandleEventGenerate. + */ - TkDoWarpWrtWin(dispPtr); + TkDoWarpWrtWin(dispPtr); return 1; } diff --git a/generic/tkGrid.c b/generic/tkGrid.c index 59d1363..3496ab7 100644 --- a/generic/tkGrid.c +++ b/generic/tkGrid.c @@ -417,7 +417,7 @@ Tk_GridObjCmd( /* This should not happen */ Tcl_SetObjResult(interp, Tcl_NewStringObj("internal error in grid", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "API_ABUSE", NULL); + Tcl_SetErrorCode(interp, "TK", "API_ABUSE", (char *)NULL); return TCL_ERROR; } @@ -458,7 +458,9 @@ GridAnchorCommand( if (TkGetWindowFromObj(interp, tkwin, objv[2], &container) != TCL_OK) { return TCL_ERROR; } - containerPtr = GetGrid(container); + if (!(containerPtr = GetGrid(container))) { + return TCL_OK; + } if (objc == 3) { gridPtr = containerPtr->containerDataPtr; @@ -531,7 +533,9 @@ GridBboxCommand( if (TkGetWindowFromObj(interp, tkwin, objv[2], &container) != TCL_OK) { return TCL_ERROR; } - containerPtr = GetGrid(container); + if (!(containerPtr = GetGrid(container))) { + return TCL_OK; + } if (objc >= 5) { if (Tcl_GetIntFromObj(interp, objv[3], &column) != TCL_OK) { @@ -655,7 +659,9 @@ GridForgetRemoveCommand( return TCL_ERROR; } - contentPtr = GetGrid(content); + if (!(contentPtr = GetGrid(content))) { + continue; + } if (contentPtr->containerPtr != NULL) { /* * For "forget", reset all the settings to their defaults @@ -745,7 +751,9 @@ GridInfoCommand( if (TkGetWindowFromObj(interp, tkwin, objv[2], &content) != TCL_OK) { return TCL_ERROR; } - contentPtr = GetGrid(content); + if (!(contentPtr = GetGrid(content))) { + return TCL_OK; + } if (contentPtr->containerPtr == NULL) { Tcl_ResetResult(interp); return TCL_OK; @@ -820,7 +828,9 @@ GridLocationCommand( return TCL_ERROR; } - containerPtr = GetGrid(container); + if (!(containerPtr = GetGrid(container))) { + return TCL_OK; + } if (containerPtr->containerDataPtr == NULL) { Tcl_SetObjResult(interp, NewPairObj(-1, TCL_INDEX_NONE)); return TCL_OK; @@ -901,7 +911,9 @@ GridPropagateCommand( if (TkGetWindowFromObj(interp, tkwin, objv[2], &container) != TCL_OK) { return TCL_ERROR; } - containerPtr = GetGrid(container); + if (!(containerPtr = GetGrid(container))) { + return TCL_OK; + } if (objc == 3) { Tcl_SetObjResult(interp, Tcl_NewBooleanObj(!(containerPtr->flags & DONT_PROPAGATE))); @@ -1018,12 +1030,14 @@ GridRowColumnConfigureCommand( if (lObjc == 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf("no %s indices specified", (slotType == COLUMN) ? "column" : "row")); - Tcl_SetErrorCode(interp, "TK", "GRID", "NO_INDEX", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "NO_INDEX", (char *)NULL); Tcl_DecrRefCount(listCopy); return TCL_ERROR; } - containerPtr = GetGrid(container); + if (!(containerPtr = GetGrid(container))) { + return TCL_OK; + } first = 0; last = 0; @@ -1031,7 +1045,7 @@ GridRowColumnConfigureCommand( if (lObjc != 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "must specify a single element on retrieval", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "GRID", "USAGE", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "USAGE", (char *)NULL); Tcl_DecrRefCount(listCopy); return TCL_ERROR; } @@ -1039,7 +1053,7 @@ GridRowColumnConfigureCommand( Tcl_AppendResult(interp, " (when retrieving options only integer indices are " "allowed)", NULL); - Tcl_SetErrorCode(interp, "TK", "GRID", "INDEX_FORMAT", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "INDEX_FORMAT", (char *)NULL); Tcl_DecrRefCount(listCopy); return TCL_ERROR; } @@ -1139,19 +1153,21 @@ GridRowColumnConfigureCommand( * Is it gridded in this container? */ - contentPtr = GetGrid(content); + if (!(contentPtr = GetGrid(content))) { + continue; + } if (contentPtr->containerPtr != containerPtr) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "the window \"%s\" is not managed by \"%s\"", Tcl_GetString(lObjv[j]), Tcl_GetString(objv[2]))); - Tcl_SetErrorCode(interp, "TK", "GRID", "NOT_MANAGED", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "NOT_MANAGED", (char *)NULL); Tcl_DecrRefCount(listCopy); return TCL_ERROR; } } else { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "illegal index \"%s\"", Tcl_GetString(lObjv[j]))); - Tcl_SetErrorCode(interp, "TK", "VALUE", "GRID_INDEX", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "GRID_INDEX", (char *)NULL); Tcl_DecrRefCount(listCopy); return TCL_ERROR; } @@ -1175,7 +1191,7 @@ GridRowColumnConfigureCommand( "\"%s\" is out of range", Tcl_GetString(lObjv[j]))); Tcl_SetErrorCode(interp, "TK", "GRID", "INDEX_RANGE", - NULL); + (char *)NULL); Tcl_DecrRefCount(listCopy); return TCL_ERROR; } @@ -1282,7 +1298,7 @@ GridRowColumnConfigureCommand( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid arg \"%s\": should be non-negative", Tcl_GetString(objv[i]))); - Tcl_SetErrorCode(interp, "TK", "GRID", "NEG_INDEX", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "NEG_INDEX", (char *)NULL); return TCL_ERROR; } @@ -1322,7 +1338,9 @@ GridSizeCommand( if (TkGetWindowFromObj(interp, tkwin, objv[2], &container) != TCL_OK) { return TCL_ERROR; } - containerPtr = GetGrid(container); + if (!(containerPtr = GetGrid(container))) { + return TCL_OK; + } if (containerPtr->containerDataPtr != NULL) { SetGridSize(containerPtr); @@ -1388,7 +1406,7 @@ GridContentCommand( if (value < 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%d is an invalid value: should NOT be < 0", value)); - Tcl_SetErrorCode(interp, "TK", "GRID", "NEG_INDEX", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "NEG_INDEX", (char *)NULL); return TCL_ERROR; } if (index == CONTENT_COLUMN) { @@ -1401,7 +1419,9 @@ GridContentCommand( if (TkGetWindowFromObj(interp, tkwin, objv[2], &container) != TCL_OK) { return TCL_ERROR; } - containerPtr = GetGrid(container); + if (!(containerPtr = GetGrid(container))) { + return TCL_OK; + } res = Tcl_NewListObj(0, NULL); for (contentPtr = containerPtr->contentPtr; contentPtr != NULL; @@ -2417,11 +2437,12 @@ ResolveConstraints( * GetGrid -- * * This internal procedure is used to locate a Grid structure for a given - * window, creating one if one doesn't exist already. + * window, creating one if one doesn't exist already, except if the window + * is already dead. * * Results: * The return value is a pointer to the Grid structure corresponding to - * tkwin. + * tkwin, or NULL when tkwin is already dead. * * Side effects: * A new grid structure may be created. If so, then a callback is set up @@ -2440,6 +2461,10 @@ GetGrid( int isNew; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; + if (((TkWindow *) tkwin)->flags & TK_ALREADY_DEAD) { + return NULL; + } + if (!dispPtr->gridInit) { Tcl_InitHashTable(&dispPtr->gridHashTable, TCL_ONE_WORD_KEYS); dispPtr->gridInit = 1; @@ -2479,7 +2504,6 @@ GetGrid( gridPtr->sticky = 0; gridPtr->size = 0; gridPtr->in = NULL; - gridPtr->containerDataPtr = NULL; Tcl_SetHashValue(hPtr, gridPtr); Tk_CreateEventHandler(tkwin, StructureNotifyMask, GridStructureProc, gridPtr); @@ -2553,8 +2577,8 @@ SetContentColumn( lastCol = ((newColumn >= 0) ? newColumn : 0) + newNumCols; if (lastCol >= MAX_ELEMENT) { - Tcl_SetObjResult(interp, Tcl_NewStringObj("column out of bounds",-1)); - Tcl_SetErrorCode(interp, "TK", "GRID", "BAD_COLUMN", NULL); + Tcl_SetObjResult(interp, Tcl_NewStringObj("column out of bounds", TCL_INDEX_NONE)); + Tcl_SetErrorCode(interp, "TK", "GRID", "BAD_COLUMN", (char *)NULL); return TCL_ERROR; } @@ -2595,7 +2619,7 @@ SetContentRow( lastRow = ((newRow >= 0) ? newRow : 0) + newNumRows; if (lastRow >= MAX_ELEMENT) { Tcl_SetObjResult(interp, Tcl_NewStringObj("row out of bounds", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "GRID", "BAD_ROW", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "BAD_ROW", (char *)NULL); return TCL_ERROR; } @@ -3011,11 +3035,15 @@ ConfigureContent( * If the stored container does not exist, just ignore it. */ - contentPtr = GetGrid(content); + if (!(contentPtr = GetGrid(content))) { + continue; + } if (contentPtr->in != NULL) { if (TkGetWindowFromObj(interp, content, contentPtr->in, &parent) == TCL_OK) { - containerPtr = GetGrid(parent); + if (!(containerPtr = GetGrid(parent))) { + continue; + } InitContainerData(containerPtr); } } @@ -3023,7 +3051,9 @@ ConfigureContent( if (containerPtr == NULL) { parent = Tk_Parent(content); if (parent != NULL) { - containerPtr = GetGrid(parent); + if (!(containerPtr = GetGrid(parent))) { + continue; + } InitContainerData(containerPtr); } } @@ -3033,7 +3063,7 @@ ConfigureContent( if (length > 1 && i == 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad argument \"%s\": must be name of window", string)); - Tcl_SetErrorCode(interp, "TK", "GRID", "BAD_PARAMETER", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "BAD_PARAMETER", (char *)NULL); return TCL_ERROR; } if (length > 1 && firstChar == '-') { @@ -3043,7 +3073,7 @@ ConfigureContent( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unexpected parameter \"%s\" in configure list:" " should be window name or option", string)); - Tcl_SetErrorCode(interp, "TK", "GRID", "BAD_PARAMETER", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "BAD_PARAMETER", (char *)NULL); return TCL_ERROR; } @@ -3051,7 +3081,7 @@ ConfigureContent( (prevChar == REL_SKIP) || (prevChar == REL_VERT))) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "must specify window before shortcut '-'", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "GRID", "SHORTCUT_USAGE", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "SHORTCUT_USAGE", (char *)NULL); return TCL_ERROR; } @@ -3063,7 +3093,7 @@ ConfigureContent( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "invalid window shortcut, \"%s\" should be '-', 'x', or '^'", string)); - Tcl_SetErrorCode(interp, "TK", "GRID", "SHORTCUT_USAGE", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "SHORTCUT_USAGE", (char *)NULL); return TCL_ERROR; } numWindows = i; @@ -3071,7 +3101,7 @@ ConfigureContent( if ((objc - numWindows) & 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "extra option or option with no value", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "GRID", "BAD_PARAMETER", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "BAD_PARAMETER", (char *)NULL); return TCL_ERROR; } @@ -3092,7 +3122,9 @@ ConfigureContent( TCL_OK) { return TCL_ERROR; } - containerPtr = GetGrid(other); + if (!(containerPtr = GetGrid(other))) { + continue; + } InitContainerData(containerPtr); } else if (index == CONF_ROW) { if (Tcl_GetIntFromObj(interp, objv[i+1], &tmp) != TCL_OK @@ -3100,7 +3132,7 @@ ConfigureContent( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad row value \"%s\": must be a non-negative integer", Tcl_GetString(objv[i+1]))); - Tcl_SetErrorCode(interp, "TK", "VALUE", "POSITIVE_INT", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "POSITIVE_INT", (char *)NULL); return TCL_ERROR; } defaultRow = tmp; @@ -3166,10 +3198,12 @@ ConfigureContent( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't manage \"%s\": it's a top-level window", Tcl_GetString(objv[j]))); - Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "TOPLEVEL", NULL); + Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "TOPLEVEL", (char *)NULL); return TCL_ERROR; } - contentPtr = GetGrid(content); + if (!(contentPtr = GetGrid(content))) { + continue; + } /* * The following statement is taken from tkPack.c: @@ -3196,7 +3230,7 @@ ConfigureContent( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad column value \"%s\": must be a non-negative integer", Tcl_GetString(objv[i+1]))); - Tcl_SetErrorCode(interp, "TK", "VALUE", "COLUMN", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "COLUMN", (char *)NULL); return TCL_ERROR; } if (SetContentColumn(interp, contentPtr, tmp, -1) != TCL_OK) { @@ -3209,7 +3243,7 @@ ConfigureContent( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad columnspan value \"%s\": must be a positive integer", Tcl_GetString(objv[i+1]))); - Tcl_SetErrorCode(interp, "TK", "VALUE", "SPAN", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "SPAN", (char *)NULL); return TCL_ERROR; } if (SetContentColumn(interp, contentPtr, -1, tmp) != TCL_OK) { @@ -3224,11 +3258,13 @@ ConfigureContent( if (other == content) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "window can't be managed in itself", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "SELF", NULL); + Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "SELF", (char *)NULL); return TCL_ERROR; } positionGiven = 1; - containerPtr = GetGrid(other); + if (!(containerPtr = GetGrid(other))) { + continue; + } InitContainerData(containerPtr); break; case CONF_STICKY: { @@ -3239,7 +3275,7 @@ ConfigureContent( "bad stickyness value \"%s\": must be" " a string containing n, e, s, and/or w", Tcl_GetString(objv[i+1]))); - Tcl_SetErrorCode(interp, "TK", "VALUE", "STICKY", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "STICKY", (char *)NULL); return TCL_ERROR; } contentPtr->sticky = sticky; @@ -3251,7 +3287,7 @@ ConfigureContent( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad ipadx value \"%s\": must be positive screen distance", Tcl_GetString(objv[i+1]))); - Tcl_SetErrorCode(interp, "TK", "VALUE", "INT_PAD", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "INT_PAD", (char *)NULL); return TCL_ERROR; } contentPtr->iPadX = tmp * 2; @@ -3262,7 +3298,7 @@ ConfigureContent( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad ipady value \"%s\": must be positive screen distance", Tcl_GetString(objv[i+1]))); - Tcl_SetErrorCode(interp, "TK", "VALUE", "INT_PAD", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "INT_PAD", (char *)NULL); return TCL_ERROR; } contentPtr->iPadY = tmp * 2; @@ -3285,7 +3321,7 @@ ConfigureContent( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad row value \"%s\": must be a non-negative integer", Tcl_GetString(objv[i+1]))); - Tcl_SetErrorCode(interp, "TK", "VALUE", "COLUMN", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "COLUMN", (char *)NULL); return TCL_ERROR; } if (SetContentRow(interp, contentPtr, tmp, -1) != TCL_OK) { @@ -3298,7 +3334,7 @@ ConfigureContent( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad rowspan value \"%s\": must be a positive integer", Tcl_GetString(objv[i+1]))); - Tcl_SetErrorCode(interp, "TK", "VALUE", "SPAN", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "SPAN", (char *)NULL); return TCL_ERROR; } if (SetContentRow(interp, contentPtr, -1, tmp) != TCL_OK) { @@ -3335,14 +3371,16 @@ ConfigureContent( parent = Tk_Parent(content); if (containerPtr == NULL) { - containerPtr = GetGrid(parent); + if (!(containerPtr = GetGrid(parent))) { + continue; + } InitContainerData(containerPtr); - } + } if (contentPtr->containerPtr != NULL && contentPtr->containerPtr != containerPtr) { - if (contentPtr->containerPtr->tkwin != Tk_Parent(contentPtr->tkwin)) { - Tk_UnmaintainGeometry(contentPtr->tkwin, contentPtr->containerPtr->tkwin); - } + if (contentPtr->containerPtr->tkwin != Tk_Parent(contentPtr->tkwin)) { + Tk_UnmaintainGeometry(contentPtr->tkwin, contentPtr->containerPtr->tkwin); + } Unlink(contentPtr); contentPtr->containerPtr = NULL; } @@ -3369,7 +3407,7 @@ ConfigureContent( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't put \"%s\" inside \"%s\"", Tcl_GetString(objv[j]), Tk_PathName(containerPtr->tkwin))); - Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "HIERARCHY", NULL); + Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "HIERARCHY", (char *)NULL); Unlink(contentPtr); return TCL_ERROR; } @@ -3384,8 +3422,8 @@ ConfigureContent( if (container == (TkWindow *)content) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't put \"%s\" inside \"%s\": would cause management loop", - Tcl_GetString(objv[j]), Tk_PathName(containerPtr->tkwin))); - Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "LOOP", NULL); + Tcl_GetString(objv[j]), Tk_PathName(containerPtr->tkwin))); + Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "LOOP", (char *)NULL); Unlink(contentPtr); return TCL_ERROR; } @@ -3469,7 +3507,7 @@ ConfigureContent( if (containerPtr == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't use '^', can't find container window", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "GRID", "SHORTCUT_USAGE", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "SHORTCUT_USAGE", (char *)NULL); return TCL_ERROR; } @@ -3494,7 +3532,9 @@ ConfigureContent( lastColumn = 0; } else { other = Tk_NameToWindow(interp, lastWindow, tkwin); - otherPtr = GetGrid(other); + if (!(otherPtr = GetGrid(other))) { + continue; + } lastRow = otherPtr->row + otherPtr->numRows - 2; lastColumn = otherPtr->column + otherPtr->numCols; } @@ -3523,7 +3563,7 @@ ConfigureContent( if (!match) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't find content to extend with \"^\"", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "GRID", "SHORTCUT_USAGE", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "SHORTCUT_USAGE", (char *)NULL); return TCL_ERROR; } } @@ -3531,7 +3571,7 @@ ConfigureContent( if (containerPtr == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't determine container window", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "GRID", "SHORTCUT_USAGE", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "SHORTCUT_USAGE", (char *)NULL); return TCL_ERROR; } SetGridSize(containerPtr); diff --git a/generic/tkImage.c b/generic/tkImage.c index 2d52873..646f2a3 100644 --- a/generic/tkImage.c +++ b/generic/tkImage.c @@ -259,7 +259,7 @@ Tk_ImageObjCmd( } if (typePtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "image type \"%s\" doesn't exist", arg)); + "image type \"%s\" does not exist", arg)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE_TYPE", arg, (char *)NULL); return TCL_ERROR; } @@ -490,7 +490,7 @@ Tk_ImageObjCmd( return TCL_OK; alreadyDeleted: - Tcl_SetObjResult(interp, Tcl_ObjPrintf("image \"%s\" doesn't exist",arg)); + Tcl_SetObjResult(interp, Tcl_ObjPrintf("image \"%s\" does not exist",arg)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE", arg, (char *)NULL); return TCL_ERROR; } @@ -636,7 +636,7 @@ Tk_GetImage( noSuchImage: if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "image \"%s\" doesn't exist", name)); + "image \"%s\" does not exist", name)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE", name, (char *)NULL); } return NULL; diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c index 17a3449..969c6e7 100644 --- a/generic/tkImgBmap.c +++ b/generic/tkImgBmap.c @@ -32,8 +32,8 @@ typedef struct { * no data. Malloc'ed. */ char *maskData; /* Data for bitmap's mask (suitable for input * to XCreateBitmapFromData). Malloc'ed. */ - Tk_Uid fgUid; /* Value of -foreground option (malloc'ed). */ - Tk_Uid bgUid; /* Value of -background option (malloc'ed). */ + Tk_Uid fgUid; /* Value of -foreground option. */ + Tk_Uid bgUid; /* Value of -background option. */ char *fileString; /* Value of -file option (malloc'ed). */ char *dataString; /* Value of -data option (malloc'ed). */ char *maskFileString; /* Value of -maskfile option (malloc'ed). */ @@ -269,9 +269,9 @@ ImgBmapConfigureModel( || (modelPtr->maskDataString != NULL)) { if (modelPtr->data == NULL) { Tcl_SetObjResult(modelPtr->interp, Tcl_NewStringObj( - "can't have mask without bitmap", TCL_INDEX_NONE)); + "cannot have a mask without a bitmap", TCL_INDEX_NONE)); Tcl_SetErrorCode(modelPtr->interp, "TK", "IMAGE", "BITMAP", - "NO_BITMAP", NULL); + "NO_BITMAP", (char *)NULL); return TCL_ERROR; } modelPtr->maskData = TkGetBitmapData(modelPtr->interp, @@ -287,7 +287,7 @@ ImgBmapConfigureModel( Tcl_SetObjResult(modelPtr->interp, Tcl_NewStringObj( "bitmap and mask have different sizes", TCL_INDEX_NONE)); Tcl_SetErrorCode(modelPtr->interp, "TK", "IMAGE", "BITMAP", - "MASK_SIZE", NULL); + "MASK_SIZE", (char *)NULL); return TCL_ERROR; } } @@ -488,7 +488,7 @@ TkGetBitmapData( Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't get bitmap data from a file in a safe interpreter", -1)); - Tcl_SetErrorCode(interp, "TK", "SAFE", "BITMAP_FILE", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "BITMAP_FILE", (char *)NULL); return NULL; } expandedFileName = Tcl_TranslateFileName(NULL, fileName, &buffer); @@ -593,7 +593,7 @@ TkGetBitmapData( "format error in bitmap data; looks like it's an" " obsolete X10 bitmap file", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TK", "IMAGE", "BITMAP", "OBSOLETE", - NULL); + (char *)NULL); } goto errorCleanup; } @@ -637,7 +637,7 @@ TkGetBitmapData( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "format error in bitmap data", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "BITMAP", "FORMAT", NULL); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "BITMAP", "FORMAT", (char *)NULL); } errorCleanup: @@ -1210,7 +1210,7 @@ ImgBmapPostscript( Tcl_SetObjResult(interp, Tcl_NewStringObj( "unable to generate postscript for bitmaps larger than 60000" " pixels", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "CANVAS", "PS", "MEMLIMIT", NULL); + Tcl_SetErrorCode(interp, "TK", "CANVAS", "PS", "MEMLIMIT", (char *)NULL); return TCL_ERROR; } diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c index 32b01e4..a04196d 100644 --- a/generic/tkImgGIF.c +++ b/generic/tkImgGIF.c @@ -468,7 +468,8 @@ FileReadGIF( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "no value given for \"%s\" option", Tcl_GetString(objv[i]))); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "OPT_VALUE", NULL); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "OPT_VALUE", + (char *)NULL); return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, objv[++i], &index) != TCL_OK) { @@ -483,13 +484,15 @@ FileReadGIF( if (!ReadGIFHeader(gifConfPtr, chan, &fileWidth, &fileHeight)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "couldn't read GIF header from file \"%s\"", fileName)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "HEADER", NULL); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "HEADER", + (char *)NULL); return TCL_ERROR; } if ((fileWidth <= 0) || (fileHeight <= 0)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "GIF image file \"%s\" has dimension(s) <= 0", fileName)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "BOGUS_SIZE", NULL); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "BOGUS_SIZE", + (char *)NULL); return TCL_ERROR; } @@ -503,7 +506,8 @@ FileReadGIF( */ Tcl_SetObjResult(interp, Tcl_NewStringObj( "GIF file truncated", -1)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "TRUNCATED", NULL); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "TRUNCATED", + (char *)NULL); return TCL_ERROR; } bitPixel = 2 << (buf[0] & 0x07); @@ -512,7 +516,8 @@ FileReadGIF( if (!ReadColorMap(gifConfPtr, chan, bitPixel, colorMap)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "error reading color map", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "COLOR_MAP", NULL); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "COLOR_MAP", + (char *)NULL); return TCL_ERROR; } } @@ -557,7 +562,8 @@ FileReadGIF( case GIF_TERMINATOR: Tcl_SetObjResult(interp, Tcl_NewStringObj( "no image data for this index", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "NO_DATA", NULL); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "NO_DATA", + (char *)NULL); goto error; case GIF_EXTENSION: @@ -575,7 +581,7 @@ FileReadGIF( Tcl_SetObjResult(interp, Tcl_NewStringObj( "error reading extension in GIF image", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "BAD_EXT", - NULL); + (char *)NULL); goto error; } continue; @@ -585,7 +591,7 @@ FileReadGIF( "couldn't read left/top/width/height in GIF image", -1)); Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "DIMENSIONS", - NULL); + (char *)NULL); goto error; } break; @@ -616,7 +622,7 @@ FileReadGIF( Tcl_SetObjResult(interp, Tcl_NewStringObj( "error reading color map", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", - "COLOR_MAP", NULL); + "COLOR_MAP", (char *)NULL); goto error; } } @@ -678,7 +684,8 @@ FileReadGIF( if (!ReadColorMap(gifConfPtr, chan, bitPixel, colorMap)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "error reading color map", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "COLOR_MAP", NULL); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "COLOR_MAP", + (char *)NULL); goto error; } } @@ -922,11 +929,11 @@ ReadOneByte( { unsigned char buf[2]; if (Fread(gifConfPtr, buf, 1, 1, chan) != 1) { - /* - * Premature end of image. - */ + /* + * Premature end of image. + */ - Tcl_SetObjResult(interp, Tcl_NewStringObj( + Tcl_SetObjResult(interp, Tcl_NewStringObj( "premature end of image data", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "PREMATURE_END", NULL); return -1; @@ -1211,7 +1218,7 @@ DoExtension( break; case 0xfe: /* Comment Extension */ strcpy(extensionStreamName,"comment"); - /* copy the extension data below */ + /* copy the extension data below */ break; } /* Add extension to dict */ @@ -1341,7 +1348,8 @@ ReadImage( if (initialCodeSize > MAX_LWZ_BITS) { Tcl_SetObjResult(interp, Tcl_NewStringObj("malformed image", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "MALFORMED", NULL); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "MALFORMED", + (char *)NULL); return TCL_ERROR; } @@ -1460,24 +1468,24 @@ ReadImage( } firstCode = append[code]; - /* - * Push the head of the code onto the stack. - */ + /* + * Push the head of the code onto the stack. + */ - *top++ = firstCode; + *top++ = firstCode; - if (maxCode < (1 << MAX_LWZ_BITS)) { + if (maxCode < (1 << MAX_LWZ_BITS)) { /* * If there's still room in our codes table, add a new entry. * Otherwise don't, and keep using the current table. - * See DEFERRED CLEAR CODE IN LZW COMPRESSION in the GIF89a - * specification. + * See DEFERRED CLEAR CODE IN LZW COMPRESSION in the GIF89a + * specification. */ prefix[maxCode] = oldCode; append[maxCode] = firstCode; maxCode++; - } + } /* * maxCode tells us the maximum code value we can accept. If @@ -1859,7 +1867,7 @@ Fread( Tcl_Channel chan) { if (hunk < 0 || count < 0) { - return -1; + return -1; } if (gifConfPtr->fromData == INLINE_DATA_BASE64) { @@ -2038,7 +2046,8 @@ CommonWriteGIF( SaveMap(&state, blockPtr); if (state.num >= MAXCOLORMAPSIZE) { Tcl_SetObjResult(interp, Tcl_NewStringObj("too many colors", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "COLORFUL", NULL); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "COLORFUL", + (char *)NULL); return TCL_ERROR; } if (state.num<2) { diff --git a/generic/tkImgListFormat.c b/generic/tkImgListFormat.c index d2a674d..ab2e271 100644 --- a/generic/tkImgListFormat.c +++ b/generic/tkImgListFormat.c @@ -40,7 +40,7 @@ */ #define TK_PHOTO_ALLOC_FAILURE_MESSAGE \ - "not enough free memory for image buffer" + "not enough free memory for image buffer" /* @@ -87,11 +87,11 @@ static const char *const colorFormatNames[] = { struct FormatOptions { int options; /* Individual bits indicate which options were - * specified - see below. */ + * specified - see below. */ Tcl_Obj *formatName; /* Name specified without an option. */ enum ColorFormatType colorFormat; - /* The color format type given with the - * -colorformat option */ + /* The color format type given with the + * -colorformat option */ }; /* @@ -121,34 +121,34 @@ static const char *const formatOptionNames[] = { */ static int ParseFormatOptions(Tcl_Interp *interp, int allowedOptions, - Tcl_Size objc, Tcl_Obj *const objv[], Tcl_Size *indexPtr, - struct FormatOptions *optPtr); + Tcl_Size objc, Tcl_Obj *const objv[], Tcl_Size *indexPtr, + struct FormatOptions *optPtr); static Tcl_Obj *GetBadOptMsg(const char *badValue, int allowedOpts); static int StringMatchDef(Tcl_Obj *data, Tcl_Obj *formatString, - int *widthPtr, int *heightPtr, Tcl_Interp *interp); + int *widthPtr, int *heightPtr, Tcl_Interp *interp); static int StringReadDef(Tcl_Interp *interp, Tcl_Obj *data, - Tcl_Obj *formatString, Tk_PhotoHandle imageHandle, - int destX, int destY, int width, int height, - int srcX, int srcY); + Tcl_Obj *formatString, Tk_PhotoHandle imageHandle, + int destX, int destY, int width, int height, + int srcX, int srcY); static int StringWriteDef(Tcl_Interp *interp, - Tcl_Obj *formatString, - Tk_PhotoImageBlock *blockPtr); + Tcl_Obj *formatString, + Tk_PhotoImageBlock *blockPtr); static int ParseColor(Tcl_Interp *interp, Tcl_Obj *specObj, - Display *display, Colormap colormap, unsigned char *redPtr, - unsigned char *greenPtr, unsigned char *bluePtr, - unsigned char *alphaPtr); + Display *display, Colormap colormap, unsigned char *redPtr, + unsigned char *greenPtr, unsigned char *bluePtr, + unsigned char *alphaPtr); static int ParseColorAsList(const char *colorString, unsigned char *redPtr, - unsigned char *greenPtr, unsigned char *bluePtr, - unsigned char *alphaPtr); + unsigned char *greenPtr, unsigned char *bluePtr, + unsigned char *alphaPtr); static int ParseColorAsHex(Tcl_Interp *interp, const char *colorString, - int colorStrLen, Display *display, Colormap colormap, - unsigned char *redPtr, unsigned char *greenPtr, - unsigned char *bluePtr, unsigned char *alphaPtr); + int colorStrLen, Display *display, Colormap colormap, + unsigned char *redPtr, unsigned char *greenPtr, + unsigned char *bluePtr, unsigned char *alphaPtr); static int ParseColorAsStandard(Tcl_Interp *interp, - const char *colorString, int colorStrLen, - Display *display, Colormap colormap, - unsigned char *redPtr, unsigned char *greenPtr, - unsigned char *bluePtr, unsigned char *alphaPtr); + const char *colorString, int colorStrLen, + Display *display, Colormap colormap, + unsigned char *redPtr, unsigned char *greenPtr, + unsigned char *bluePtr, unsigned char *alphaPtr); /* * The format record for the default image handler @@ -189,14 +189,14 @@ static int ParseFormatOptions( Tcl_Interp *interp, /* For error messages */ int allowedOptions, /* Bitfield specifying which options are - * to be considered allowed */ + * to be considered allowed */ Tcl_Size objc, /* Number of elements in argv[] */ Tcl_Obj *const objv[], /* The arguments to parse */ Tcl_Size *indexPtr, /* Index giving the first element to - * parse. The value is updated to the - * index where parsing ended */ + * parse. The value is updated to the + * index where parsing ended */ struct FormatOptions *optPtr) /* Parsed option values are written to - * this struct */ + * this struct */ { Tcl_Size optIndex, index; @@ -212,76 +212,76 @@ ParseFormatOptions( optPtr->formatName = NULL; optPtr->colorFormat = COLORFORMAT_RGB2; for (index = *indexPtr; index < objc; *indexPtr = ++index) { - int optionExists; - - /* - * The first value can be the format handler's name. It goes to - * optPtr->name. - */ - option = Tcl_GetString(objv[index]); - if (option[0] != '-') { - if (first) { - optPtr->formatName = objv[index]; - first = 0; - continue; - } else { - break; - } - } - first = 0; - - /* - * Check if option is known and allowed - */ - - optionExists = 1; - if (Tcl_GetIndexFromObj(NULL, objv[index], formatOptionNames, - "format option", 0, &optIndex) != TCL_OK) { - optionExists = 0; - } - if (!optionExists || !((1 << optIndex) & allowedOptions)) { - Tcl_SetObjResult(interp, GetBadOptMsg(Tcl_GetString(objv[index]), - allowedOptions)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "BAD_OPTION", NULL); - return TCL_ERROR; - } - - /* - * Option-specific checks - */ - - switch (1 << optIndex) { - case OPT_COLORFORMAT: - *indexPtr = ++index; - if (index >= objc) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf("the \"%s\" option " - "requires a value", Tcl_GetString(objv[index - 1]))); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "MISSING_VALUE", NULL); - return TCL_ERROR; - } - if (Tcl_GetIndexFromObj(NULL, objv[index], colorFormatNames, "", - TCL_EXACT, &typeIndex) != TCL_OK - || (typeIndex != COLORFORMAT_LIST - && typeIndex != COLORFORMAT_RGB2 - && typeIndex != COLORFORMAT_RGBA2) ) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad color format " - "\"%s\": must be rgb, rgba, or list", - Tcl_GetString(objv[index]))); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "BAD_COLOR_FORMAT", NULL); - return TCL_ERROR; - } - optPtr->colorFormat = (enum ColorFormatType)typeIndex; - break; - default: - Tcl_Panic("ParseFormatOptions: unexpected switch fallthrough"); - } - - /* - * Add option to bitfield in optPtr - */ - optPtr->options |= (1 << optIndex); + int optionExists; + + /* + * The first value can be the format handler's name. It goes to + * optPtr->name. + */ + option = Tcl_GetString(objv[index]); + if (option[0] != '-') { + if (first) { + optPtr->formatName = objv[index]; + first = 0; + continue; + } else { + break; + } + } + first = 0; + + /* + * Check if option is known and allowed + */ + + optionExists = 1; + if (Tcl_GetIndexFromObj(NULL, objv[index], formatOptionNames, + "format option", 0, &optIndex) != TCL_OK) { + optionExists = 0; + } + if (!optionExists || !((1 << optIndex) & allowedOptions)) { + Tcl_SetObjResult(interp, GetBadOptMsg(Tcl_GetString(objv[index]), + allowedOptions)); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "BAD_OPTION", (char *)NULL); + return TCL_ERROR; + } + + /* + * Option-specific checks + */ + + switch (1 << optIndex) { + case OPT_COLORFORMAT: + *indexPtr = ++index; + if (index >= objc) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf("the \"%s\" option " + "requires a value", Tcl_GetString(objv[index - 1]))); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", + "MISSING_VALUE", (char *)NULL); + return TCL_ERROR; + } + if (Tcl_GetIndexFromObj(NULL, objv[index], colorFormatNames, "", + TCL_EXACT, &typeIndex) != TCL_OK + || (typeIndex != COLORFORMAT_LIST + && typeIndex != COLORFORMAT_RGB2 + && typeIndex != COLORFORMAT_RGBA2) ) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad color format " + "\"%s\": must be rgb, rgba, or list", + Tcl_GetString(objv[index]))); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", + "BAD_COLOR_FORMAT", (char *)NULL); + return TCL_ERROR; + } + optPtr->colorFormat = (enum ColorFormatType)typeIndex; + break; + default: + Tcl_Panic("ParseFormatOptions: unexpected switch fallthrough"); + } + + /* + * Add option to bitfield in optPtr + */ + optPtr->options |= (1 << optIndex); } return TCL_OK; @@ -311,29 +311,29 @@ GetBadOptMsg( Tcl_Obj *resObj = Tcl_ObjPrintf("bad format option \"%s\": ", badValue); if (allowedOpts == 0) { - Tcl_AppendToObj(resObj, "no options allowed", TCL_INDEX_NONE); + Tcl_AppendToObj(resObj, "no options allowed", TCL_INDEX_NONE); } else { - Tcl_AppendToObj(resObj, "must be ", TCL_INDEX_NONE); - bit = 1; - for (i = 0; formatOptionNames[i] != NULL; i++) { - if (allowedOpts & bit) { - if (allowedOpts & (bit -1)) { - /* - * not the first option - */ - if (allowedOpts & ~((bit << 1) - 1)) { - /* - * not the last option - */ - Tcl_AppendToObj(resObj, ", ", TCL_INDEX_NONE); - } else { - Tcl_AppendToObj(resObj, ", or ", TCL_INDEX_NONE); - } - } - Tcl_AppendToObj(resObj, formatOptionNames[i], TCL_INDEX_NONE); - } - bit <<=1; - } + Tcl_AppendToObj(resObj, "must be ", TCL_INDEX_NONE); + bit = 1; + for (i = 0; formatOptionNames[i] != NULL; i++) { + if (allowedOpts & bit) { + if (allowedOpts & (bit -1)) { + /* + * not the first option + */ + if (allowedOpts & ~((bit << 1) - 1)) { + /* + * not the last option + */ + Tcl_AppendToObj(resObj, ", ", TCL_INDEX_NONE); + } else { + Tcl_AppendToObj(resObj, ", or ", TCL_INDEX_NONE); + } + } + Tcl_AppendToObj(resObj, formatOptionNames[i], TCL_INDEX_NONE); + } + bit <<=1; + } } return resObj; } @@ -377,34 +377,34 @@ StringMatchDef( */ if (Tcl_ListObjGetElements(interp, data, &rowCount, &rowListPtr) - != TCL_OK) { - return 0; + != TCL_OK) { + return 0; } if (rowCount == 0) { - /* - * empty list is valid data - */ + /* + * empty list is valid data + */ - *widthPtr = 0; - *heightPtr = 0; - return 1; + *widthPtr = 0; + *heightPtr = 0; + return 1; } colCount = -1; for (y = 0; y < rowCount; y++) { - if (Tcl_ListObjLength(interp, rowListPtr[y], &curColCount) != TCL_OK) { - return 0; - } - if (colCount < 0) { - colCount = curColCount; - } else if (curColCount != colCount) { - if (interp != NULL) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid row # %" TCL_SIZE_MODIFIER "d: " - "all rows must have the same number of elements", y)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "INVALID_DATA", NULL); - } - return 0; - } + if (Tcl_ListObjLength(interp, rowListPtr[y], &curColCount) != TCL_OK) { + return 0; + } + if (colCount < 0) { + colCount = curColCount; + } else if (curColCount != colCount) { + if (interp != NULL) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid row # %" TCL_SIZE_MODIFIER "d: " + "all rows must have the same number of elements", y)); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", + "INVALID_DATA", (char *)NULL); + } + return 0; + } } /* @@ -413,16 +413,16 @@ StringMatchDef( * pixel for validity. */ if (Tcl_ListObjIndex(interp, rowListPtr[0], 0, &pixelData) != TCL_OK) { - return 0; + return 0; } (void)Tcl_GetString(pixelData); if (pixelData->length > TK_PHOTO_MAX_COLOR_LENGTH) { - return 0; + return 0; } if (ParseColor(interp, pixelData, Tk_Display(Tk_MainWindow(interp)), - Tk_Colormap(Tk_MainWindow(interp)), &dummy, &dummy, &dummy, &dummy) - != TCL_OK) { - return 0; + Tk_Colormap(Tk_MainWindow(interp)), &dummy, &dummy, &dummy, &dummy) + != TCL_OK) { + return 0; } /* @@ -464,10 +464,10 @@ StringReadDef( Tcl_Obj *formatString, /* value of the -format option */ Tk_PhotoHandle imageHandle, /* write data to this image */ int destX, int destY, /* start writing data at this point - * in destination image*/ + * in destination image*/ int width, int height, /* dimensions of area to write to */ int srcX, int srcY) /* start reading source data at these - * coordinates */ + * coordinates */ { Tcl_Obj **rowListPtr, **colListPtr; Tcl_Obj **objv; @@ -488,21 +488,21 @@ StringReadDef( memset(&opts, 0, sizeof(opts)); if (formatString != NULL) { - if (Tcl_ListObjGetElements(interp, formatString, &objc, &objv) - != TCL_OK) { - return TCL_ERROR; - } - optIndex = 0; - if (ParseFormatOptions(interp, 0, objc, objv, &optIndex, &opts) - != TCL_OK) { - return TCL_ERROR; - } - if (optIndex < objc) { - Tcl_SetObjResult(interp, - GetBadOptMsg(Tcl_GetString(objv[optIndex]), 0)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "BAD_OPTION", NULL); - return TCL_ERROR; - } + if (Tcl_ListObjGetElements(interp, formatString, &objc, &objv) + != TCL_OK) { + return TCL_ERROR; + } + optIndex = 0; + if (ParseFormatOptions(interp, 0, objc, objv, &optIndex, &opts) + != TCL_OK) { + return TCL_ERROR; + } + if (optIndex < objc) { + Tcl_SetObjResult(interp, + GetBadOptMsg(Tcl_GetString(objv[optIndex]), 0)); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "BAD_OPTION", (char *)NULL); + return TCL_ERROR; + } } /* @@ -510,24 +510,24 @@ StringReadDef( */ if (Tcl_ListObjGetElements(interp, data, &rowCount, &rowListPtr) - != TCL_OK ) { - return TCL_ERROR; + != TCL_OK ) { + return TCL_ERROR; } if ( rowCount > 0 && Tcl_ListObjLength(interp, rowListPtr[0], &colCount) - != TCL_OK) { - return TCL_ERROR; + != TCL_OK) { + return TCL_ERROR; } if (width <= 0 || height <= 0 || rowCount == 0 || colCount == 0) { - /* - * No changes with zero sized input or zero sized output region - */ + /* + * No changes with zero sized input or zero sized output region + */ - return TCL_OK; + return TCL_OK; } if (srcX < 0 || srcY < 0 || srcX >= rowCount || srcY >= colCount) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf("source coordinates out of range")); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "COORDINATES", NULL); - return TCL_ERROR; + Tcl_SetObjResult(interp, Tcl_ObjPrintf("source coordinates out of range")); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "COORDINATES", (char *)NULL); + return TCL_ERROR; } /* @@ -536,11 +536,11 @@ StringReadDef( */ if (colCount > (int)(UINT_MAX / 4 / rowCount)) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "photo image dimensions exceed Tcl memory limits")); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "OVERFLOW", NULL); - return TCL_OK; + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "photo image dimensions exceed Tcl memory limits")); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", + "OVERFLOW", (char *)NULL); + return TCL_OK; } /* @@ -557,39 +557,39 @@ StringReadDef( srcBlock.offset[3] = 3; srcBlock.pixelPtr = (unsigned char *)attemptckalloc(srcBlock.pitch * srcBlock.height); if (srcBlock.pixelPtr == NULL) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf(TK_PHOTO_ALLOC_FAILURE_MESSAGE)); - Tcl_SetErrorCode(interp, "TK", "MALLOC", NULL); - return TCL_ERROR; + Tcl_SetObjResult(interp, Tcl_ObjPrintf(TK_PHOTO_ALLOC_FAILURE_MESSAGE)); + Tcl_SetErrorCode(interp, "TK", "MALLOC", (char *)NULL); + return TCL_ERROR; } curPixelPtr = srcBlock.pixelPtr; display = Tk_Display(Tk_MainWindow(interp)); colormap = Tk_Colormap(Tk_MainWindow(interp)); for (y = srcY; y < rowCount; y++) { - /* - * We don't test the length of row, as that's been done in - * ImgStringMatch() - */ - - if (Tcl_ListObjGetElements(interp, rowListPtr[y], &curColCount, - &colListPtr) != TCL_OK) { - goto errorExit; - } - for (x = srcX; x < colCount; x++) { - if (ParseColor(interp, colListPtr[x], display, colormap, - curPixelPtr, curPixelPtr + 1, curPixelPtr + 2, - curPixelPtr + 3) != TCL_OK) { - goto errorExit; - } - curPixelPtr += 4; - } + /* + * We don't test the length of row, as that's been done in + * ImgStringMatch() + */ + + if (Tcl_ListObjGetElements(interp, rowListPtr[y], &curColCount, + &colListPtr) != TCL_OK) { + goto errorExit; + } + for (x = srcX; x < colCount; x++) { + if (ParseColor(interp, colListPtr[x], display, colormap, + curPixelPtr, curPixelPtr + 1, curPixelPtr + 2, + curPixelPtr + 3) != TCL_OK) { + goto errorExit; + } + curPixelPtr += 4; + } } /* * Write image data to destHandle */ if (Tk_PhotoPutBlock(interp, imageHandle, &srcBlock, destX, destY, - width, height, TK_PHOTO_COMPOSITE_SET) != TCL_OK) { - goto errorExit; + width, height, TK_PHOTO_COMPOSITE_SET) != TCL_OK) { + goto errorExit; } ckfree(srcBlock.pixelPtr); @@ -635,20 +635,20 @@ StringWriteDef( * Parse format suboptions */ if (Tcl_ListObjGetElements(interp, formatString, &objc, &objv) - != TCL_OK) { - return TCL_ERROR; + != TCL_OK) { + return TCL_ERROR; } allowedOpts = OPT_COLORFORMAT; optIndex = 0; if (ParseFormatOptions(interp, allowedOpts, objc, objv, &optIndex, &opts) - != TCL_OK) { - return TCL_ERROR; + != TCL_OK) { + return TCL_ERROR; } if (optIndex < objc) { - Tcl_SetObjResult(interp, - GetBadOptMsg(Tcl_GetString(objv[optIndex]), allowedOpts)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "BAD_OPTION", NULL); - return TCL_ERROR; + Tcl_SetObjResult(interp, + GetBadOptMsg(Tcl_GetString(objv[optIndex]), allowedOpts)); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "BAD_OPTION", (char *)NULL); + return TCL_ERROR; } greenOffset = blockPtr->offset[1] - blockPtr->offset[0]; @@ -660,84 +660,84 @@ StringWriteDef( */ if (blockPtr->offset[3] < 0) { - hasAlpha = 0; - alphaOffset = 0; + hasAlpha = 0; + alphaOffset = 0; } else { - hasAlpha = 1; - alphaOffset = blockPtr->offset[3] - blockPtr->offset[0]; + hasAlpha = 1; + alphaOffset = blockPtr->offset[3] - blockPtr->offset[0]; } if ((blockPtr->width > 0) && (blockPtr->height > 0)) { - int row, col; - Tcl_DString data, line; - char colorBuf[11]; - unsigned char *pixelPtr; - unsigned char alphaVal = 255; - - Tcl_DStringInit(&data); - for (row=0; row<blockPtr->height; row++) { - pixelPtr = blockPtr->pixelPtr + blockPtr->offset[0] - + row * blockPtr->pitch; - Tcl_DStringInit(&line); - for (col=0; col<blockPtr->width; col++) { - if (hasAlpha) { - alphaVal = pixelPtr[alphaOffset]; - } - - /* - * We don't build lines as a list for #RGBA and #RGB. Since - * these color formats look like comments, the first element - * of the list would get quoted with an additional {} . - * While this is not a problem if the data is used as - * a list, it would cause problems if someone decides to parse - * it as a string (and it looks kinda strange) - */ - - switch (opts.colorFormat) { - case COLORFORMAT_RGB2: - snprintf(colorBuf, sizeof(colorBuf), "#%02x%02x%02x ", pixelPtr[0], - pixelPtr[greenOffset], pixelPtr[blueOffset]); - Tcl_DStringAppend(&line, colorBuf, TCL_INDEX_NONE); - break; - case COLORFORMAT_RGBA2: - snprintf(colorBuf, sizeof(colorBuf), "#%02x%02x%02x%02x ", - pixelPtr[0], pixelPtr[greenOffset], - pixelPtr[blueOffset], alphaVal); - Tcl_DStringAppend(&line, colorBuf, TCL_INDEX_NONE); - break; - case COLORFORMAT_LIST: - Tcl_DStringStartSublist(&line); - snprintf(colorBuf, sizeof(colorBuf), "%d", pixelPtr[0]); - Tcl_DStringAppendElement(&line, colorBuf); - snprintf(colorBuf, sizeof(colorBuf), "%d", pixelPtr[greenOffset]); - Tcl_DStringAppendElement(&line, colorBuf); - snprintf(colorBuf, sizeof(colorBuf), "%d", pixelPtr[blueOffset]); - Tcl_DStringAppendElement(&line, colorBuf); - snprintf(colorBuf, sizeof(colorBuf), "%d", alphaVal); - Tcl_DStringAppendElement(&line, colorBuf); - Tcl_DStringEndSublist(&line); - break; - default: - Tcl_Panic("unexpected switch fallthrough"); - } - pixelPtr += blockPtr->pixelSize; - } - if (opts.colorFormat != COLORFORMAT_LIST) { - /* - * For the #XXX formats, we need to remove the last - * whitespace. - */ - - *(Tcl_DStringValue(&line) + Tcl_DStringLength(&line) - 1) - = '\0'; - } - Tcl_DStringAppendElement(&data, Tcl_DStringValue(&line)); - Tcl_DStringFree(&line); - } - result = Tcl_NewStringObj(Tcl_DStringValue(&data), TCL_INDEX_NONE); - Tcl_DStringFree(&data); + int row, col; + Tcl_DString data, line; + char colorBuf[11]; + unsigned char *pixelPtr; + unsigned char alphaVal = 255; + + Tcl_DStringInit(&data); + for (row=0; row<blockPtr->height; row++) { + pixelPtr = blockPtr->pixelPtr + blockPtr->offset[0] + + row * blockPtr->pitch; + Tcl_DStringInit(&line); + for (col=0; col<blockPtr->width; col++) { + if (hasAlpha) { + alphaVal = pixelPtr[alphaOffset]; + } + + /* + * We don't build lines as a list for #RGBA and #RGB. Since + * these color formats look like comments, the first element + * of the list would get quoted with an additional {} . + * While this is not a problem if the data is used as + * a list, it would cause problems if someone decides to parse + * it as a string (and it looks kinda strange) + */ + + switch (opts.colorFormat) { + case COLORFORMAT_RGB2: + snprintf(colorBuf, sizeof(colorBuf), "#%02x%02x%02x ", pixelPtr[0], + pixelPtr[greenOffset], pixelPtr[blueOffset]); + Tcl_DStringAppend(&line, colorBuf, TCL_INDEX_NONE); + break; + case COLORFORMAT_RGBA2: + snprintf(colorBuf, sizeof(colorBuf), "#%02x%02x%02x%02x ", + pixelPtr[0], pixelPtr[greenOffset], + pixelPtr[blueOffset], alphaVal); + Tcl_DStringAppend(&line, colorBuf, TCL_INDEX_NONE); + break; + case COLORFORMAT_LIST: + Tcl_DStringStartSublist(&line); + snprintf(colorBuf, sizeof(colorBuf), "%d", pixelPtr[0]); + Tcl_DStringAppendElement(&line, colorBuf); + snprintf(colorBuf, sizeof(colorBuf), "%d", pixelPtr[greenOffset]); + Tcl_DStringAppendElement(&line, colorBuf); + snprintf(colorBuf, sizeof(colorBuf), "%d", pixelPtr[blueOffset]); + Tcl_DStringAppendElement(&line, colorBuf); + snprintf(colorBuf, sizeof(colorBuf), "%d", alphaVal); + Tcl_DStringAppendElement(&line, colorBuf); + Tcl_DStringEndSublist(&line); + break; + default: + Tcl_Panic("unexpected switch fallthrough"); + } + pixelPtr += blockPtr->pixelSize; + } + if (opts.colorFormat != COLORFORMAT_LIST) { + /* + * For the #XXX formats, we need to remove the last + * whitespace. + */ + + *(Tcl_DStringValue(&line) + Tcl_DStringLength(&line) - 1) + = '\0'; + } + Tcl_DStringAppendElement(&data, Tcl_DStringValue(&line)); + Tcl_DStringFree(&line); + } + result = Tcl_NewStringObj(Tcl_DStringValue(&data), TCL_INDEX_NONE); + Tcl_DStringFree(&data); } else { - result = Tcl_NewObj(); + result = Tcl_NewObj(); } Tcl_SetObjResult(interp, result); @@ -770,7 +770,7 @@ ParseColor( Tcl_Interp *interp, /* error messages go there */ Tcl_Obj *specObj, /* the color data to parse */ Display *display, /* display of main window, needed to parse - * standard Tk colors */ + * standard Tk colors */ Colormap colormap, /* colormap of current display */ unsigned char *redPtr, /* the result is written to these pointers */ unsigned char *greenPtr, @@ -787,23 +787,23 @@ ParseColor( specString = Tcl_GetStringFromObj(specObj, &length); if (length == 0) { - /* Empty string */ - *redPtr = *greenPtr = *bluePtr = *alphaPtr = 0; - return TCL_OK; + /* Empty string */ + *redPtr = *greenPtr = *bluePtr = *alphaPtr = 0; + return TCL_OK; } if (length > TK_PHOTO_MAX_COLOR_LENGTH) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid color")); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "INVALID_COLOR", NULL); - return TCL_ERROR; + Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid color")); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", + "INVALID_COLOR", (char *)NULL); + return TCL_ERROR; } if (specString[0] == '#') { - return ParseColorAsHex(interp, specString, length, display, - colormap, redPtr, greenPtr, bluePtr, alphaPtr); + return ParseColorAsHex(interp, specString, length, display, + colormap, redPtr, greenPtr, bluePtr, alphaPtr); } if (ParseColorAsList(specString, - redPtr, greenPtr, bluePtr, alphaPtr) == TCL_OK) { - return TCL_OK; + redPtr, greenPtr, bluePtr, alphaPtr) == TCL_OK) { + return TCL_OK; } /* @@ -813,7 +813,7 @@ ParseColor( Tcl_ResetResult(interp); return ParseColorAsStandard(interp, specString, length, display, - colormap, redPtr, greenPtr, bluePtr, alphaPtr); + colormap, redPtr, greenPtr, bluePtr, alphaPtr); } @@ -863,24 +863,24 @@ ParseColorAsList( */ while(isspace(UCHAR(*curPos))) { - ++curPos; + ++curPos; } while (i < 4 && *curPos != '\0') { - values[i] = strtol(curPos, (char **)&curPos, 0); - if (values[i] < 0 || values[i] > 255) { - return TCL_ERROR; - } - while(isspace(UCHAR(*curPos))) { - ++curPos; - } - ++i; + values[i] = strtol(curPos, (char **)&curPos, 0); + if (values[i] < 0 || values[i] > 255) { + return TCL_ERROR; + } + while(isspace(UCHAR(*curPos))) { + ++curPos; + } + ++i; } if (i < 3 || *curPos != '\0') { - return TCL_ERROR; + return TCL_ERROR; } if (i < 4) { - values[3] = 255; + values[3] = 255; } *redPtr = (unsigned char) values[0]; @@ -897,7 +897,7 @@ ParseColorAsList( * ParseColorAsHex -- * * This function extracts color and alpha values from a string - * starting with '#', followed by hex digits. It undestands both + * starting with '#', followed by hex digits. It understands both * the #RGBA form and the #RBG (with optional suffix) * * Results: @@ -927,39 +927,39 @@ ParseColorAsHex( unsigned long int colorValue = 0; if (colorStrLen - 1 != 4 && colorStrLen - 1 != 8) { - return ParseColorAsStandard(interp, colorString, colorStrLen, - display, colormap, redPtr, greenPtr, bluePtr, alphaPtr); + return ParseColorAsStandard(interp, colorString, colorStrLen, + display, colormap, redPtr, greenPtr, bluePtr, alphaPtr); } for (i = 1; i < colorStrLen; i++) { - if (!isxdigit(UCHAR(colorString[i]))) { - /* - * There still is a chance that this is a Tk color with - * an alpha suffix - */ - - return ParseColorAsStandard(interp, colorString, colorStrLen, - display, colormap, redPtr, greenPtr, bluePtr, alphaPtr); - } + if (!isxdigit(UCHAR(colorString[i]))) { + /* + * There still is a chance that this is a Tk color with + * an alpha suffix + */ + + return ParseColorAsStandard(interp, colorString, colorStrLen, + display, colormap, redPtr, greenPtr, bluePtr, alphaPtr); + } } colorValue = strtoul(colorString + 1, NULL, 16); switch (colorStrLen - 1) { case 4: - /* #RGBA format */ - *redPtr = (unsigned char) ((colorValue >> 12) * 0x11); - *greenPtr = (unsigned char) (((colorValue >> 8) & 0xf) * 0x11); - *bluePtr = (unsigned char) (((colorValue >> 4) & 0xf) * 0x11); - *alphaPtr = (unsigned char) ((colorValue & 0xf) * 0x11); - return TCL_OK; + /* #RGBA format */ + *redPtr = (unsigned char) ((colorValue >> 12) * 0x11); + *greenPtr = (unsigned char) (((colorValue >> 8) & 0xf) * 0x11); + *bluePtr = (unsigned char) (((colorValue >> 4) & 0xf) * 0x11); + *alphaPtr = (unsigned char) ((colorValue & 0xf) * 0x11); + return TCL_OK; case 8: - /* #RRGGBBAA format */ - *redPtr = (unsigned char) (colorValue >> 24); - *greenPtr = (unsigned char) ((colorValue >> 16) & 0xff); - *bluePtr = (unsigned char) ((colorValue >> 8) & 0xff); - *alphaPtr = (unsigned char) (colorValue & 0xff); - return TCL_OK; + /* #RRGGBBAA format */ + *redPtr = (unsigned char) (colorValue >> 24); + *greenPtr = (unsigned char) ((colorValue >> 16) & 0xff); + *bluePtr = (unsigned char) ((colorValue >> 8) & 0xff); + *alphaPtr = (unsigned char) (colorValue & 0xff); + return TCL_OK; default: - Tcl_Panic("unexpected switch fallthrough"); + Tcl_Panic("unexpected switch fallthrough"); } /* Shouldn't get here */ @@ -971,7 +971,7 @@ ParseColorAsHex( * * ParseColorAsStandard -- * - * This function tries to split a color stirng in a color and a + * This function tries to split a color string in a color and a * suffix part and to extract color and alpha values from them. The * color part is treated as regular Tk color. * @@ -1010,31 +1010,31 @@ ParseColorAsStandard( */ if ((suffixString = strrchr(specString, '@')) == NULL - && ((suffixString = strrchr(specString, '#')) == NULL - || suffixString == specString)) { - suffixString = specString + specStrLen; - colorString = specString; + && ((suffixString = strrchr(specString, '#')) == NULL + || suffixString == specString)) { + suffixString = specString + specStrLen; + colorString = specString; } else { - strncpy(colorBuffer, specString, suffixString - specString); - colorBuffer[suffixString - specString] = '\0'; - colorString = (const char*)colorBuffer; + strncpy(colorBuffer, specString, suffixString - specString); + colorBuffer[suffixString - specString] = '\0'; + colorString = (const char*)colorBuffer; } /* * Try to parse as standard Tk color. * * We don't use Tk_GetColor() et al. here, as those functions - * migth return a color that does not exaxtly match the given name + * might return a color that does not exactly match the given name * if the colormap is full. Also, we don't really want the color to be * added to the colormap. */ if ( ! TkParseColor(display, colormap, colorString, &parsedColor)) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "invalid color name \"%s\"", specString)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "INVALID_COLOR", NULL); - return TCL_ERROR; + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "invalid color name \"%s\"", specString)); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", + "INVALID_COLOR", (char *)NULL); + return TCL_ERROR; } /* @@ -1043,54 +1043,54 @@ ParseColorAsStandard( switch (suffixString[0]) { case '\0': - suffixAlpha = 255; - break; + suffixAlpha = 255; + break; case '@': - if (Tcl_GetDouble(NULL, suffixString + 1, &fracAlpha) != TCL_OK) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid alpha " - "suffix \"%s\": expected floating-point value", - suffixString)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "INVALID COLOR", NULL); - return TCL_ERROR; - } - if (fracAlpha < 0 || fracAlpha > 1) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid alpha suffix" - " \"%s\": value must be in the range from 0 to 1", - suffixString)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "INVALID_COLOR", NULL); - return TCL_ERROR; - } - suffixAlpha = (unsigned int) floor(fracAlpha * 255 + 0.5); - break; + if (Tcl_GetDouble(NULL, suffixString + 1, &fracAlpha) != TCL_OK) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid alpha " + "suffix \"%s\": expected floating-point value", + suffixString)); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", + "INVALID COLOR", (char *)NULL); + return TCL_ERROR; + } + if (fracAlpha < 0 || fracAlpha > 1) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid alpha suffix" + " \"%s\": value must be in the range from 0 to 1", + suffixString)); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", + "INVALID_COLOR", (char *)NULL); + return TCL_ERROR; + } + suffixAlpha = (unsigned int) floor(fracAlpha * 255 + 0.5); + break; case '#': - if (strlen(suffixString + 1) < 1 || strlen(suffixString + 1)> 2) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "invalid alpha suffix \"%s\"", suffixString)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "INVALID_COLOR", NULL); - return TCL_ERROR; - } - for (i = 1; i <= (int)strlen(suffixString + 1); i++) { - if ( ! isxdigit(UCHAR(suffixString[i]))) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "invalid alpha suffix \"%s\": expected hex digit", - suffixString)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "INVALID_COLOR", NULL); - return TCL_ERROR; - } - } - if (strlen(suffixString + 1) == 1) { - sscanf(suffixString, "#%1x", &suffixAlpha); - suffixAlpha *= 0x11; - } else { - sscanf(suffixString, "#%2x", &suffixAlpha); - } - break; + if (strlen(suffixString + 1) < 1 || strlen(suffixString + 1)> 2) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "invalid alpha suffix \"%s\"", suffixString)); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", + "INVALID_COLOR", (char *)NULL); + return TCL_ERROR; + } + for (i = 1; i <= (int)strlen(suffixString + 1); i++) { + if ( ! isxdigit(UCHAR(suffixString[i]))) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "invalid alpha suffix \"%s\": expected hex digit", + suffixString)); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", + "INVALID_COLOR", (char *)NULL); + return TCL_ERROR; + } + } + if (strlen(suffixString + 1) == 1) { + sscanf(suffixString, "#%1x", &suffixAlpha); + suffixAlpha *= 0x11; + } else { + sscanf(suffixString, "#%2x", &suffixAlpha); + } + break; default: - Tcl_Panic("unexpected switch fallthrough"); + Tcl_Panic("unexpected switch fallthrough"); } *redPtr = (unsigned char) (parsedColor.red >> 8); diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index fe2682b..2fa0494 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -162,17 +162,17 @@ static Tcl_ThreadDataKey dataKey; static const Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_STRING, "-data", NULL, NULL, - NULL, TCL_INDEX_NONE, TK_CONFIG_NULL_OK, NULL}, + NULL, TCL_INDEX_NONE, TK_CONFIG_NULL_OK|TK_CONFIG_OBJS, NULL}, {TK_CONFIG_STRING, "-file", NULL, NULL, - NULL, offsetof(PhotoModel, fileString), TK_CONFIG_NULL_OK, NULL}, + NULL, offsetof(PhotoModel, fileObj), TK_CONFIG_NULL_OK|TK_CONFIG_OBJS, NULL}, {TK_CONFIG_STRING, "-format", NULL, NULL, - NULL, TCL_INDEX_NONE, TK_CONFIG_NULL_OK, NULL}, + NULL, TCL_INDEX_NONE, TK_CONFIG_NULL_OK|TK_CONFIG_OBJS, NULL}, {TK_CONFIG_DOUBLE, "-gamma", NULL, NULL, DEF_PHOTO_GAMMA, offsetof(PhotoModel, gamma), 0, NULL}, {TK_CONFIG_INT, "-height", NULL, NULL, DEF_PHOTO_HEIGHT, offsetof(PhotoModel, userHeight), 0, NULL}, {TK_CONFIG_STRING, "-metadata", NULL, NULL, - NULL, TCL_INDEX_NONE, TK_CONFIG_NULL_OK, NULL}, + NULL, TCL_INDEX_NONE, TK_CONFIG_NULL_OK|TK_CONFIG_OBJS, NULL}, {TK_CONFIG_UID, "-palette", NULL, NULL, DEF_PHOTO_PALETTE, offsetof(PhotoModel, palette), 0, NULL}, {TK_CONFIG_INT, "-width", NULL, NULL, @@ -473,8 +473,8 @@ ImgPhotoCmd( } arg = Tcl_GetStringFromObj(objv[2], &length); if (strncmp(arg,"-data", length) == 0) { - if (modelPtr->dataString) { - Tcl_SetObjResult(interp, modelPtr->dataString); + if (modelPtr->dataObj) { + Tcl_SetObjResult(interp, modelPtr->dataObj); } } else if (strncmp(arg,"-format", length) == 0) { if (modelPtr->format) { @@ -506,8 +506,8 @@ ImgPhotoCmd( } obj = Tcl_NewObj(); subobj = Tcl_NewStringObj("-data {} {} {}", 14); - if (modelPtr->dataString) { - Tcl_ListObjAppendElement(NULL, subobj, modelPtr->dataString); + if (modelPtr->dataObj) { + Tcl_ListObjAppendElement(NULL, subobj, modelPtr->dataObj); } else { Tcl_AppendStringsToObj(subobj, " {}", (char *)NULL); } @@ -535,13 +535,13 @@ ImgPhotoCmd( if (length > 1 && !strncmp(arg, "-data", length)) { Tcl_AppendResult(interp, "-data {} {} {}", (char *)NULL); - if (modelPtr->dataString) { + if (modelPtr->dataObj) { /* * TODO: Modifying result is bad! */ Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - modelPtr->dataString); + modelPtr->dataObj); } else { Tcl_AppendResult(interp, " {}", (char *)NULL); } @@ -613,7 +613,7 @@ ImgPhotoCmd( srcHandle = Tk_FindPhoto(interp, Tcl_GetString(options.name)); if (srcHandle == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "image \"%s\" doesn't exist or is not a photo image", + "image \"%s\" does not exist or is not a photo image", Tcl_GetString(options.name))); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO", Tcl_GetString(options.name), (char *)NULL); @@ -1347,6 +1347,7 @@ readCleanup: } Tcl_Panic("unexpected fallthrough"); + break; } case PHOTO_WRITE: { @@ -1667,8 +1668,8 @@ ParseSubcommandOptions( goto oneValueRequired; } *optIndexPtr = ++index; - optPtr->background = Tk_GetColor(interp, Tk_MainWindow(interp), - Tk_GetUid(Tcl_GetString(objv[index]))); + optPtr->background = Tk_AllocColorFromObj(interp, Tk_MainWindow(interp), + objv[index]); if (!optPtr->background) { return TCL_ERROR; } @@ -1889,7 +1890,8 @@ ImgPhotoConfigureModel( * as TK_CONFIG_ARGV_ONLY. */ { PhotoInstance *instancePtr; - const char *oldFileString, *oldPaletteString; + Tcl_Obj *oldFileObj; + const char *oldPaletteString; Tcl_Obj *oldData, *data = NULL, *oldFormat, *format = NULL, *metadataInObj = NULL, *metadataOutObj = NULL; Tcl_Obj *tempdata, *tempformat; @@ -1947,9 +1949,9 @@ ImgPhotoConfigureModel( * the format string influences how "-data" or "-file" is interpreted. */ - oldFileString = modelPtr->fileString; - if (oldFileString == NULL) { - oldData = modelPtr->dataString; + oldFileObj = modelPtr->fileObj; + if (oldFileObj == NULL) { + oldData = modelPtr->dataObj; if (oldData != NULL) { Tcl_IncrRefCount(oldData); } @@ -1976,9 +1978,9 @@ ImgPhotoConfigureModel( * Regard the empty string for -file, -data, -format or -metadata as the null value. */ - if ((modelPtr->fileString != NULL) && (modelPtr->fileString[0] == 0)) { - ckfree(modelPtr->fileString); - modelPtr->fileString = NULL; + if ((modelPtr->fileObj != NULL) && (Tcl_GetString(modelPtr->fileObj)[0] == 0)) { + Tcl_DecrRefCount(modelPtr->fileObj); + modelPtr->fileObj = NULL; } if (data) { /* @@ -1993,10 +1995,10 @@ ImgPhotoConfigureModel( } else { data = NULL; } - if (modelPtr->dataString) { - Tcl_DecrRefCount(modelPtr->dataString); + if (modelPtr->dataObj) { + Tcl_DecrRefCount(modelPtr->dataObj); } - modelPtr->dataString = data; + modelPtr->dataObj = data; } if (format) { /* @@ -2059,8 +2061,8 @@ ImgPhotoConfigureModel( * -file or -data option. */ - if ((modelPtr->fileString != NULL) - && ((modelPtr->fileString != oldFileString) + if ((modelPtr->fileObj != NULL) + && ((modelPtr->fileObj != oldFileObj) || (modelPtr->format != oldFormat))) { /* * Prevent file system access in a safe interpreter. @@ -2075,7 +2077,7 @@ ImgPhotoConfigureModel( goto errorExit; } - chan = Tcl_OpenFileChannel(interp, modelPtr->fileString, "r", 0); + chan = Tcl_OpenFileChannel(interp, Tcl_GetString(modelPtr->fileObj), "rb", 0); if (chan == NULL) { goto errorExit; } @@ -2087,9 +2089,7 @@ ImgPhotoConfigureModel( metadataOutObj = Tcl_NewDictObj(); Tcl_IncrRefCount(metadataOutObj); - if ((Tcl_SetChannelOption(interp, chan, "-translation", "binary") - != TCL_OK) || - (MatchFileFormat(interp, chan, modelPtr->fileString, + if ((MatchFileFormat(interp, chan, (modelPtr->fileObj ? Tcl_GetString(modelPtr->fileObj) : NULL), modelPtr->format, modelPtr->metadata, metadataOutObj, &imageFormat, &imageFormatVersion3, &imageWidth, &imageHeight, &oldformat) != TCL_OK)) { @@ -2110,12 +2110,12 @@ ImgPhotoConfigureModel( } if (imageFormat != NULL) { result = imageFormat->fileReadProc(interp, chan, - modelPtr->fileString, tempformat, + (modelPtr->fileObj ? Tcl_GetString(modelPtr->fileObj) : NULL), tempformat, (Tk_PhotoHandle) modelPtr, 0, 0, imageWidth, imageHeight, 0, 0); } else { result = imageFormatVersion3->fileReadProc(interp, chan, - modelPtr->fileString, tempformat, modelPtr->metadata, + (modelPtr->fileObj ? Tcl_GetString(modelPtr->fileObj) : NULL), tempformat, modelPtr->metadata, (Tk_PhotoHandle) modelPtr, 0, 0, imageWidth, imageHeight, 0, 0, metadataOutObj); @@ -2130,8 +2130,8 @@ ImgPhotoConfigureModel( modelPtr->flags |= IMAGE_CHANGED; } - if ((modelPtr->fileString == NULL) && (modelPtr->dataString != NULL) - && ((modelPtr->dataString != oldData) + if ((modelPtr->fileObj == NULL) && (modelPtr->dataObj != NULL) + && ((modelPtr->dataObj != oldData) || (modelPtr->format != oldFormat))) { /* @@ -2141,7 +2141,7 @@ ImgPhotoConfigureModel( metadataOutObj = Tcl_NewDictObj(); Tcl_IncrRefCount(metadataOutObj); - if (MatchStringFormat(interp, modelPtr->dataString, + if (MatchStringFormat(interp, modelPtr->dataObj, modelPtr->format, modelPtr->metadata, metadataOutObj, &imageFormat, &imageFormatVersion3, &imageWidth, &imageHeight, &oldformat) != TCL_OK) { @@ -2154,7 +2154,7 @@ ImgPhotoConfigureModel( goto errorExit; } tempformat = modelPtr->format; - tempdata = modelPtr->dataString; + tempdata = modelPtr->dataObj; if (oldformat) { if (tempformat) { tempformat = (Tcl_Obj *) Tcl_GetString(tempformat); @@ -2321,7 +2321,7 @@ ToggleComplexAlphaIfNeeded( c += 3; /* Start at first alpha byte. */ for (; c < end; c += 4) { if (*c && *c != 255) { - mPtr->flags |= COMPLEX_ALPHA; + mPtr->flags |= COMPLEX_ALPHA; break; } } @@ -2370,8 +2370,8 @@ ImgPhotoDelete( if (modelPtr->validRegion != NULL) { TkDestroyRegion(modelPtr->validRegion); } - if (modelPtr->dataString != NULL) { - Tcl_DecrRefCount(modelPtr->dataString); + if (modelPtr->dataObj != NULL) { + Tcl_DecrRefCount(modelPtr->dataObj); } if (modelPtr->format != NULL) { Tcl_DecrRefCount(modelPtr->format); @@ -3686,7 +3686,7 @@ Tk_PhotoPutZoomedBlock( *destPtr++ = srcPtr[blueOffset]; *destPtr++ = 255; continue; - } + } if (compRule==TK_PHOTO_COMPOSITE_SET || !destPtr[3]) { /* @@ -4257,7 +4257,7 @@ ImgGetPhoto( blockPtr->width * blockPtr->pixelSize; } } else { - int gray = (unsigned char) (((optPtr->background->red>>8) * 11 + int gray = (unsigned char) (((optPtr->background->red>>8) * 11 + (optPtr->background->green>>8) * 16 + (optPtr->background->blue>>8) * 5 + 16) >> 5); diff --git a/generic/tkImgPhoto.h b/generic/tkImgPhoto.h index a65b971..16d1509 100644 --- a/generic/tkImgPhoto.h +++ b/generic/tkImgPhoto.h @@ -155,8 +155,8 @@ struct PhotoModel { Tk_Uid palette; /* User-specified default palette for * instances of this image. */ double gamma; /* Display gamma value to correct for. */ - char *fileString; /* Name of file to read into image. */ - Tcl_Obj *dataString; /* Object to use as contents of image. */ + Tcl_Obj *fileObj; /* Name of file to read into image. */ + Tcl_Obj *dataObj; /* Object to use as contents of image. */ Tcl_Obj *format; /* User-specified format of data in image file * or string value. */ Tcl_Obj *metadata; /* User-specified metadata dict or read from diff --git a/generic/tkImgSVGnano.c b/generic/tkImgSVGnano.c index 73bbbf8..de70733 100644 --- a/generic/tkImgSVGnano.c +++ b/generic/tkImgSVGnano.c @@ -194,15 +194,15 @@ FileMatchSVG( nsvgImage = ParseSVGWithOptions(interp, data, length, formatObj, &ropts); Tcl_DecrRefCount(dataObj); if (nsvgImage != NULL) { - GetScaleFromParameters(nsvgImage, &ropts, widthPtr, heightPtr); - if ((*widthPtr <= 0.0) || (*heightPtr <= 0.0)) { + GetScaleFromParameters(nsvgImage, &ropts, widthPtr, heightPtr); + if ((*widthPtr <= 0.0) || (*heightPtr <= 0.0)) { nsvgDelete(nsvgImage); return 0; - } - if (!CacheSVG(interp, chan, formatObj, nsvgImage, &ropts)) { + } + if (!CacheSVG(interp, chan, formatObj, nsvgImage, &ropts)) { nsvgDelete(nsvgImage); - } - return 1; + } + return 1; } return 0; } @@ -243,7 +243,7 @@ FileReadSVG( NSVGimage *nsvgImage = GetCachedSVG(interp, chan, formatObj, &ropts); if (nsvgImage == NULL) { - Tcl_Obj *dataObj = Tcl_NewObj(); + Tcl_Obj *dataObj = Tcl_NewObj(); if (Tcl_ReadChars(chan, dataObj, TCL_INDEX_NONE, 0) == TCL_IO_FAILURE) { /* in case of an error reading the file */ @@ -304,15 +304,15 @@ StringMatchSVG( } nsvgImage = ParseSVGWithOptions(interp, data, length, formatObj, &ropts); if (nsvgImage != NULL) { - GetScaleFromParameters(nsvgImage, &ropts, widthPtr, heightPtr); - if ((*widthPtr <= 0.0) || (*heightPtr <= 0.0)) { + GetScaleFromParameters(nsvgImage, &ropts, widthPtr, heightPtr); + if ((*widthPtr <= 0.0) || (*heightPtr <= 0.0)) { nsvgDelete(nsvgImage); return 0; - } - if (!CacheSVG(interp, dataObj, formatObj, nsvgImage, &ropts)) { + } + if (!CacheSVG(interp, dataObj, formatObj, nsvgImage, &ropts)) { nsvgDelete(nsvgImage); - } - return 1; + } + return 1; } return 0; } @@ -392,7 +392,7 @@ ParseSVGWithOptions( NSVGimage *nsvgImage; int parameterScaleSeen = 0; static const char *const fmtOptions[] = { - "-dpi", "-scale", "-scaletoheight", "-scaletowidth", NULL + "-dpi", "-scale", "-scaletoheight", "-scaletowidth", NULL }; enum fmtOptionsEnum { OPT_DPI, OPT_SCALE, OPT_SCALE_TO_HEIGHT, OPT_SCALE_TO_WIDTH @@ -421,7 +421,7 @@ ParseSVGWithOptions( ropts->scaleToWidth = 0; if ((formatObj != NULL) && Tcl_ListObjGetElements(interp, formatObj, &objc, &objv) != TCL_OK) { - goto error; + goto error; } for (; objc > 0 ; objc--, objv++) { int optIndex; @@ -475,7 +475,7 @@ ParseSVGWithOptions( switch ((enum fmtOptionsEnum) optIndex) { case OPT_DPI: if (Tcl_GetDoubleFromObj(interp, objv[0], &dpi) == TCL_ERROR) { - goto error; + goto error; } if (dpi < 0.0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( @@ -488,7 +488,7 @@ ParseSVGWithOptions( case OPT_SCALE: if (Tcl_GetDoubleFromObj(interp, objv[0], &ropts->scale) == TCL_ERROR) { - goto error; + goto error; } if (ropts->scale <= 0.0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( @@ -501,7 +501,7 @@ ParseSVGWithOptions( case OPT_SCALE_TO_HEIGHT: if (Tcl_GetIntFromObj(interp, objv[0], &ropts->scaleToHeight) == TCL_ERROR) { - goto error; + goto error; } if (ropts->scaleToHeight <= 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( @@ -514,7 +514,7 @@ ParseSVGWithOptions( case OPT_SCALE_TO_WIDTH: if (Tcl_GetIntFromObj(interp, objv[0], &ropts->scaleToWidth) == TCL_ERROR) { - goto error; + goto error; } if (ropts->scaleToWidth <= 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( @@ -538,7 +538,7 @@ ParseSVGWithOptions( error: if (inputCopy != NULL) { - ckfree(inputCopy); + ckfree(inputCopy); } return NULL; } @@ -669,8 +669,8 @@ GetScaleFromParameters( int width, height; if ((nsvgImage->width == 0.0) || (nsvgImage->height == 0.0)) { - width = height = 0; - scale = 1.0; + width = height = 0; + scale = 1.0; } else if (ropts->scaleToHeight > 0) { /* * Fixed height @@ -759,7 +759,7 @@ CacheSVG( NSVGcache *cachePtr = GetCachePtr(interp); if (cachePtr != NULL) { - cachePtr->dataOrChan = dataOrChan; + cachePtr->dataOrChan = dataOrChan; if (formatObj != NULL) { data = Tcl_GetStringFromObj(formatObj, &length); Tcl_DStringAppend(&cachePtr->formatString, data, length); @@ -801,10 +801,10 @@ GetCachedSVG( if ((cachePtr != NULL) && (cachePtr->nsvgImage != NULL) && (cachePtr->dataOrChan == dataOrChan)) { - if (formatObj != NULL) { + if (formatObj != NULL) { data = Tcl_GetStringFromObj(formatObj, &length); if (strcmp(data, Tcl_DStringValue(&cachePtr->formatString)) == 0) { - nsvgImage = cachePtr->nsvgImage; + nsvgImage = cachePtr->nsvgImage; *ropts = cachePtr->ropts; cachePtr->nsvgImage = NULL; } @@ -838,8 +838,8 @@ CleanCache(Tcl_Interp *interp) NSVGcache *cachePtr = GetCachePtr(interp); if (cachePtr != NULL) { - cachePtr->dataOrChan = NULL; - Tcl_DStringSetLength(&cachePtr->formatString, 0); + cachePtr->dataOrChan = NULL; + Tcl_DStringSetLength(&cachePtr->formatString, 0); if (cachePtr->nsvgImage != NULL) { nsvgDelete(cachePtr->nsvgImage); cachePtr->nsvgImage = NULL; @@ -869,7 +869,7 @@ FreeCache(void *clientData, TCL_UNUSED(Tcl_Interp *)) Tcl_DStringFree(&cachePtr->formatString); if (cachePtr->nsvgImage != NULL) { - nsvgDelete(cachePtr->nsvgImage); + nsvgDelete(cachePtr->nsvgImage); } ckfree(cachePtr); } diff --git a/generic/tkInt.decls b/generic/tkInt.decls index c1ffd10..d99a69f 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -407,7 +407,7 @@ declare 136 { } declare 137 { void TkpSetKeycodeAndState(Tk_Window tkwin, KeySym keySym, - XEvent *eventPtr) + XEvent *eventPtr) } declare 138 { KeySym TkpGetKeySym(TkDisplay *dispPtr, XEvent *eventPtr) @@ -610,7 +610,7 @@ declare 186 { # Debugging / testing functions for photo images declare 187 { int TkDebugPhotoStringMatchDef(Tcl_Interp *inter, Tcl_Obj *data, - Tcl_Obj *formatString, int *widthPtr, int *heightPtr) + Tcl_Obj *formatString, int *widthPtr, int *heightPtr) } @@ -948,9 +948,9 @@ declare 50 aqua { declare 51 aqua { void TkGenWMDestroyEvent(Tk_Window tkwin) } -declare 52 aqua { - void TkMacOSXSetDrawingEnabled(TkWindow *winPtr, int flag) -} +# +# Slot 52 unused (WAS: TkMacOSXSetDrawingEnabled) +# # Made public as Tk_MacOSXGetNSWindowForDrawable #declare 54 aqua { # void *TkMacOSXDrawable(Drawable drawable) @@ -1249,7 +1249,7 @@ declare 81 win { } declare 82 win { Status XParseColor(Display *display, Colormap map, - _Xconst char *spec, XColor *colorPtr) + _Xconst char *spec, XColor *colorPtr) } declare 83 win { GC XCreateGC(Display *display, Drawable d, @@ -1755,7 +1755,7 @@ declare 81 macosx { } declare 82 macosx { Status XParseColor(Display *display, Colormap map, - _Xconst char *spec, XColor *colorPtr) + _Xconst char *spec, XColor *colorPtr) } declare 83 macosx { GC XCreateGC(Display *display, Drawable d, diff --git a/generic/tkInt.h b/generic/tkInt.h index cc9dd88..d5888da 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -699,9 +699,9 @@ typedef struct TkMainInfo { * down, in case it's a Tcl_ObjCmdProc2 */ #endif unsigned int ttkNbTabsStickBit; - /* Information used by ttk::notebook. */ + /* Information used by ttk::notebook. */ int troughInnerX, troughInnerY, troughInnerWidth, troughInnerHeight; - /* Information used by ttk::scale. */ + /* Information used by ttk::scale. */ } TkMainInfo; /* @@ -714,7 +714,7 @@ typedef struct { const void *source; /* Bits for bitmap. */ int width, height; /* Dimensions of bitmap. */ int native; /* 0 means generic (X style) bitmap, 1 means - * native style bitmap. */ + * native style bitmap. */ } TkPredefBitmap; /* @@ -1070,10 +1070,6 @@ typedef struct { size_t version; } TkObjType; -#ifndef TCL_OBJTYPE_V0 -# define TCL_OBJTYPE_V0 /* just empty */ -#endif - MODULE_SCOPE const TkObjType tkBorderObjType; MODULE_SCOPE const TkObjType tkBitmapObjType; MODULE_SCOPE const TkObjType tkColorObjType; @@ -1265,6 +1261,7 @@ MODULE_SCOPE void TkpDrawFrameEx(Tk_Window tkwin, Drawable drawable, int borderWidth, int relief); MODULE_SCOPE void TkpShowBusyWindow(TkBusy busy); MODULE_SCOPE void TkpHideBusyWindow(TkBusy busy); +MODULE_SCOPE Tcl_Size TkLengthOne(Tcl_Obj *); MODULE_SCOPE void TkpMakeTransparentWindowExist(Tk_Window tkwin, Window parent); MODULE_SCOPE void TkpCreateBusy(Tk_FakeWin *winPtr, Tk_Window tkRef, @@ -1272,6 +1269,8 @@ MODULE_SCOPE void TkpCreateBusy(Tk_FakeWin *winPtr, Tk_Window tkRef, TkBusy busy); MODULE_SCOPE int TkBackgroundEvalObjv(Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const *objv, int flags); +MODULE_SCOPE void TkDrawDottedRect(Display *disp, Drawable d, GC gc, + int x, int y, int width, int height); MODULE_SCOPE Tcl_Command TkMakeEnsemble(Tcl_Interp *interp, const char *nsname, const char *name, void *clientData, const TkEnsemble *map); @@ -1332,7 +1331,7 @@ MODULE_SCOPE void TkpCopyRegion(TkRegion dst, TkRegion src); # define c_class class #endif -#if defined(_WIN32) && !defined(STATIC_BUILD) && TCL_MAJOR_VERSION < 9 +#if defined(_WIN32) && !defined(STATIC_BUILD) && (TCL_MAJOR_VERSION < 9) && defined(TCL_MINOR_VERSION) # define tcl_CreateFileHandler reserved9 #endif diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index 4b93ab9..7d55a30 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -246,8 +246,6 @@ EXTERN int TkGenerateButtonEvent(int x, int y, Window window, unsigned int state); /* 51 */ EXTERN void TkGenWMDestroyEvent(Tk_Window tkwin); -/* 52 */ -EXTERN void TkMacOSXSetDrawingEnabled(TkWindow *winPtr, int flag); #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ /* 0 */ @@ -420,7 +418,6 @@ typedef struct TkIntPlatStubs { Tk_Window (*tkMacOSXGetContainer) (TkWindow *winPtr); /* 49 */ int (*tkGenerateButtonEvent) (int x, int y, Window window, unsigned int state); /* 50 */ void (*tkGenWMDestroyEvent) (Tk_Window tkwin); /* 51 */ - void (*tkMacOSXSetDrawingEnabled) (TkWindow *winPtr, int flag); /* 52 */ #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ void (*tkCreateXEventSource) (void); /* 0 */ @@ -673,8 +670,6 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkGenerateButtonEvent) /* 50 */ #define TkGenWMDestroyEvent \ (tkIntPlatStubsPtr->tkGenWMDestroyEvent) /* 51 */ -#define TkMacOSXSetDrawingEnabled \ - (tkIntPlatStubsPtr->tkMacOSXSetDrawingEnabled) /* 52 */ #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ #define TkCreateXEventSource \ diff --git a/generic/tkListbox.c b/generic/tkListbox.c index 8d4f8db..059d482 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -15,10 +15,6 @@ #include "tkInt.h" #include "default.h" -#ifdef _WIN32 -#include "tkWinInt.h" -#endif - typedef struct { Tk_OptionTable listboxOptionTable; /* Table defining configuration options @@ -48,7 +44,7 @@ typedef struct { Tk_OptionTable itemAttrOptionTable; /* Table that defines configuration options * available for listbox items. */ - char *listVarName; /* List variable name */ + Tcl_Obj *listVarNameObj; /* List variable name */ Tcl_Obj *listObj; /* Pointer to the list object being used */ Tcl_Size nElements; /* Holds the current count of elements */ Tcl_HashTable *selection; /* Tracks selection */ @@ -61,9 +57,9 @@ typedef struct { Tk_3DBorder normalBorder; /* Used for drawing border around whole * window, plus used for background. */ - int borderWidth; /* Width of 3-D border around window. */ + Tcl_Obj *borderWidthObj; /* Width of 3-D border around window. */ int relief; /* 3-D effect: TK_RELIEF_RAISED, etc. */ - int highlightWidth; /* Width in pixels of highlight to draw around + Tcl_Obj *highlightWidthObj; /* Width in pixels of highlight to draw around * widget when it has the focus. <= 0 means * don't draw a highlight. */ XColor *highlightBgColorPtr; @@ -81,7 +77,7 @@ typedef struct { GC textGC; /* For drawing normal text. */ Tk_3DBorder selBorder; /* Borders and backgrounds for selected * elements. */ - int selBorderWidth; /* Width of border around selection. */ + Tcl_Obj *selBorderWidthObj; /* Width of border around selection. */ XColor *selFgColorPtr; /* Foreground color for selected elements. */ GC selTextGC; /* For drawing selected text. */ int width; /* Desired width of window, in characters. */ @@ -121,7 +117,7 @@ typedef struct { * Information about what's selected or active, if any. */ - Tk_Uid selectMode; /* Selection style: single, browse, multiple, + Tcl_Obj *selectModeObj; /* Selection style: single, browse, multiple, * or extended. This value isn't used in C * code, but the Tcl bindings use it. */ int numSelected; /* Number of elements currently selected. */ @@ -153,15 +149,15 @@ typedef struct { */ Tk_Cursor cursor; /* Current cursor for window, or None. */ - char *takeFocus; /* Value of -takefocus option; not used in the + Tcl_Obj *takeFocusObj; /* Value of -takefocus option; not used in the * C code, but used by keyboard traversal - * scripts. Malloc'ed, but may be NULL. */ - char *yScrollCmd; /* Command prefix for communicating with + * scripts. May be NULL. */ + Tcl_Obj *yScrollCmdObj; /* Command prefix for communicating with * vertical scrollbar. NULL means no command - * to issue. Malloc'ed. */ - char *xScrollCmd; /* Command prefix for communicating with + * to issue. May be NULL. */ + Tcl_Obj *xScrollCmdObj; /* Command prefix for communicating with * horizontal scrollbar. NULL means no command - * to issue. Malloc'ed. */ + * to issue. May be NULL. */ int state; /* Listbox state. */ Pixmap gray; /* Pixmap for displaying disabled text. */ int flags; /* Various flag bits: see below for @@ -245,7 +241,7 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_LISTBOX_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Listbox, borderWidth), + DEF_LISTBOX_BORDER_WIDTH, offsetof(Listbox, borderWidthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_LISTBOX_CURSOR, TCL_INDEX_NONE, offsetof(Listbox, cursor), @@ -271,8 +267,8 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_LISTBOX_HIGHLIGHT, TCL_INDEX_NONE, offsetof(Listbox, highlightColorPtr), 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", - "HighlightThickness", DEF_LISTBOX_HIGHLIGHT_WIDTH, TCL_INDEX_NONE, - offsetof(Listbox, highlightWidth), 0, 0, 0}, + "HighlightThickness", DEF_LISTBOX_HIGHLIGHT_WIDTH, + offsetof(Listbox, highlightWidthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_LISTBOX_JUSTIFY, TCL_INDEX_NONE, offsetof(Listbox, justify), TK_OPTION_ENUM_VAR, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", @@ -281,13 +277,13 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_LISTBOX_SELECT_COLOR, TCL_INDEX_NONE, offsetof(Listbox, selBorder), 0, DEF_LISTBOX_SELECT_MONO, 0}, {TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth", - "BorderWidth", DEF_LISTBOX_SELECT_BD, TCL_INDEX_NONE, - offsetof(Listbox, selBorderWidth), 0, 0, 0}, + "BorderWidth", DEF_LISTBOX_SELECT_BD, offsetof(Listbox, selBorderWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", DEF_LISTBOX_SELECT_FG_COLOR, TCL_INDEX_NONE, offsetof(Listbox, selFgColorPtr), TK_OPTION_NULL_OK, DEF_LISTBOX_SELECT_FG_MONO, 0}, {TK_OPTION_STRING, "-selectmode", "selectMode", "SelectMode", - DEF_LISTBOX_SELECT_MODE, TCL_INDEX_NONE, offsetof(Listbox, selectMode), + DEF_LISTBOX_SELECT_MODE, offsetof(Listbox, selectModeObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_BOOLEAN, "-setgrid", "setGrid", "SetGrid", DEF_LISTBOX_SET_GRID, TCL_INDEX_NONE, offsetof(Listbox, setGrid), 0, 0, 0}, @@ -295,18 +291,18 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_LISTBOX_STATE, TCL_INDEX_NONE, offsetof(Listbox, state), 0, &tkStateStrings[1], 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", - DEF_LISTBOX_TAKE_FOCUS, TCL_INDEX_NONE, offsetof(Listbox, takeFocus), + DEF_LISTBOX_TAKE_FOCUS, offsetof(Listbox, takeFocusObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_INT, "-width", "width", "Width", DEF_LISTBOX_WIDTH, TCL_INDEX_NONE, offsetof(Listbox, width), 0, 0, 0}, {TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand", - DEF_LISTBOX_SCROLL_COMMAND, TCL_INDEX_NONE, offsetof(Listbox, xScrollCmd), + DEF_LISTBOX_SCROLL_COMMAND, offsetof(Listbox, xScrollCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand", - DEF_LISTBOX_SCROLL_COMMAND, TCL_INDEX_NONE, offsetof(Listbox, yScrollCmd), + DEF_LISTBOX_SCROLL_COMMAND, offsetof(Listbox, yScrollCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-listvariable", "listVariable", "Variable", - DEF_LISTBOX_LIST_VARIABLE, TCL_INDEX_NONE, offsetof(Listbox, listVarName), + DEF_LISTBOX_LIST_VARIABLE, offsetof(Listbox, listVarNameObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, 0, 0} }; @@ -1011,7 +1007,7 @@ ListboxWidgetObjCmd( if (diff <= listPtr->fullLines / 3) { ChangeListboxView(listPtr, index); } else { - ChangeListboxView(listPtr, index - (listPtr->fullLines-1)/2); + ChangeListboxView(listPtr, index - (listPtr->fullLines - 1)/2); } } else { diff = index - (listPtr->topIndex + listPtr->fullLines - 1); @@ -1019,7 +1015,7 @@ ListboxWidgetObjCmd( if (diff <= listPtr->fullLines / 3) { ChangeListboxView(listPtr, listPtr->topIndex + diff); } else { - ChangeListboxView(listPtr, index-(listPtr->fullLines-1)/2); + ChangeListboxView(listPtr, index-(listPtr->fullLines - 1)/2); } } } @@ -1097,6 +1093,7 @@ ListboxBboxSubCmd( int pixelWidth, x, y, result; Tcl_Size stringLen; Tk_FontMetrics fm; + int selBorderWidth; /* * Compute the pixel width of the requested element. @@ -1111,17 +1108,18 @@ ListboxBboxSubCmd( Tk_GetFontMetrics(listPtr->tkfont, &fm); pixelWidth = Tk_TextWidth(listPtr->tkfont, stringRep, stringLen); + Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->selBorderWidthObj, &selBorderWidth); if (listPtr->justify == TK_JUSTIFY_LEFT) { - x = (listPtr->inset + listPtr->selBorderWidth) - listPtr->xOffset; + x = (listPtr->inset + selBorderWidth) - listPtr->xOffset; } else if (listPtr->justify == TK_JUSTIFY_RIGHT) { - x = Tk_Width(tkwin) - (listPtr->inset + listPtr->selBorderWidth) + x = Tk_Width(tkwin) - (listPtr->inset + selBorderWidth) - pixelWidth - listPtr->xOffset + GetMaxOffset(listPtr); } else { - x = (Tk_Width(tkwin) - pixelWidth)/2 - - listPtr->xOffset + GetMaxOffset(listPtr)/2; + x = (Tk_Width(tkwin) - pixelWidth) / 2 + - listPtr->xOffset + GetMaxOffset(listPtr) / 2; } y = ((index - listPtr->topIndex)*listPtr->lineHeight) - + listPtr->inset + listPtr->selBorderWidth; + + listPtr->inset + selBorderWidth; results[0] = Tcl_NewWideIntObj(x); results[1] = Tcl_NewWideIntObj(y); results[2] = Tcl_NewWideIntObj(pixelWidth); @@ -1249,9 +1247,11 @@ ListboxXviewSubCmd( int index, count, windowWidth, windowUnits; int offset = 0; /* Initialized to stop gcc warnings. */ double fraction; + int selBorderWidth; + Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->selBorderWidthObj, &selBorderWidth); windowWidth = Tk_Width(listPtr->tkwin) - - 2*(listPtr->inset + listPtr->selBorderWidth); + - 2 * (listPtr->inset + selBorderWidth); if (objc == 2) { Tcl_Obj *results[2]; @@ -1457,8 +1457,8 @@ DestroyListbox( listPtr->listObj = NULL; } - if (listPtr->listVarName != NULL) { - Tcl_UntraceVar2(listPtr->interp, listPtr->listVarName, NULL, + if (listPtr->listVarNameObj != NULL) { + Tcl_UntraceVar2(listPtr->interp, Tcl_GetString(listPtr->listVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, ListboxListVarProc, listPtr); } @@ -1562,10 +1562,11 @@ ConfigureListbox( Tcl_Obj *oldListObj = NULL; Tcl_Obj *errorResult = NULL; int oldExport, error; + int borderWidth, selBorderWidth, highlightWidth; oldExport = (listPtr->exportSelection) && (!Tcl_IsSafe(listPtr->interp)); - if (listPtr->listVarName != NULL) { - Tcl_UntraceVar2(interp, listPtr->listVarName, NULL, + if (listPtr->listVarNameObj != NULL) { + Tcl_UntraceVar2(interp, Tcl_GetString(listPtr->listVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, ListboxListVarProc, listPtr); } @@ -1598,10 +1599,28 @@ ConfigureListbox( Tk_SetBackgroundFromBorder(listPtr->tkwin, listPtr->normalBorder); - if (listPtr->highlightWidth < 0) { - listPtr->highlightWidth = 0; - } - listPtr->inset = listPtr->highlightWidth + listPtr->borderWidth; + Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->borderWidthObj, &borderWidth); + if (borderWidth < 0) { + borderWidth = 0; + Tcl_DecrRefCount(listPtr->borderWidthObj); + listPtr->borderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(listPtr->borderWidthObj); + } + Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth < 0) { + highlightWidth = 0; + Tcl_DecrRefCount(listPtr->highlightWidthObj); + listPtr->highlightWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(listPtr->highlightWidthObj); + } + Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->selBorderWidthObj, &selBorderWidth); + if (selBorderWidth < 0) { + selBorderWidth = 0; + Tcl_DecrRefCount(listPtr->selBorderWidthObj); + listPtr->selBorderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(listPtr->selBorderWidthObj); + } + listPtr->inset = highlightWidth + borderWidth; /* * Claim the selection if we've suddenly started exporting it and @@ -1633,14 +1652,14 @@ ConfigureListbox( */ oldListObj = listPtr->listObj; - if (listPtr->listVarName != NULL) { - Tcl_Obj *listVarObj = Tcl_GetVar2Ex(interp, listPtr->listVarName, + if (listPtr->listVarNameObj != NULL) { + Tcl_Obj *listVarObj = Tcl_GetVar2Ex(interp, Tcl_GetString(listPtr->listVarNameObj), NULL, TCL_GLOBAL_ONLY); Tcl_Size dummy; if (listVarObj == NULL) { listVarObj = (oldListObj ? oldListObj : Tcl_NewObj()); - if (Tcl_SetVar2Ex(interp, listPtr->listVarName, NULL, + if (Tcl_SetVar2Ex(interp, Tcl_GetString(listPtr->listVarNameObj), NULL, listVarObj, TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) { continue; @@ -1659,7 +1678,7 @@ ConfigureListbox( } listPtr->listObj = listVarObj; - Tcl_TraceVar2(listPtr->interp, listPtr->listVarName, + Tcl_TraceVar2(listPtr->interp, Tcl_GetString(listPtr->listVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, ListboxListVarProc, listPtr); } else if (listPtr->listObj == NULL) { @@ -1837,6 +1856,7 @@ DisplayListbox( { Listbox *listPtr = (Listbox *)clientData; Tk_Window tkwin = listPtr->tkwin; + Display *disp = listPtr->display; GC gc; int i, limit, x, y, prevSelected, freeGC; Tcl_Size stringLen; @@ -1853,6 +1873,7 @@ DisplayListbox( * off-screen. */ Pixmap pixmap; int textWidth; + int borderWidth, selBorderWidth, highlightWidth; listPtr->flags &= ~REDRAW_PENDING; if (listPtr->flags & LISTBOX_DELETED) { @@ -1892,7 +1913,7 @@ DisplayListbox( * screen). */ - pixmap = Tk_GetPixmap(listPtr->display, Tk_WindowId(tkwin), + pixmap = Tk_GetPixmap(disp, Tk_WindowId(tkwin), Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin)); #else pixmap = Tk_WindowId(tkwin); @@ -1904,17 +1925,18 @@ DisplayListbox( * Display each item in the listbox. */ + Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->selBorderWidthObj, &selBorderWidth); limit = listPtr->topIndex + listPtr->fullLines + listPtr->partialLine - 1; if (limit >= (int)listPtr->nElements) { limit = listPtr->nElements-1; } left = right = 0; if (listPtr->xOffset > 0) { - left = listPtr->selBorderWidth+1; + left = selBorderWidth + 1; } if ((listPtr->maxWidth - listPtr->xOffset) > (Tk_Width(listPtr->tkwin) - - 2*(listPtr->inset + listPtr->selBorderWidth))) { - right = listPtr->selBorderWidth+1; + - 2 * (listPtr->inset + selBorderWidth))) { + right = selBorderWidth + 1; } prevSelected = 0; @@ -1922,7 +1944,7 @@ DisplayListbox( int width = Tk_Width(tkwin); /* zeroth approx to silence warning */ x = listPtr->inset; - y = ((i - listPtr->topIndex) * listPtr->lineHeight) + listPtr->inset; + y = (i - listPtr->topIndex) * listPtr->lineHeight + listPtr->inset; gc = listPtr->textGC; freeGC = 0; @@ -1946,7 +1968,7 @@ DisplayListbox( */ gc = listPtr->selTextGC; - width = Tk_Width(tkwin) - 2*listPtr->inset; + width = Tk_Width(tkwin) - 2 * listPtr->inset; selectedBg = listPtr->selBorder; /* @@ -2003,29 +2025,29 @@ DisplayListbox( /* Draw left bevel */ if (left == 0) { Tk_3DVerticalBevel(tkwin, pixmap, selectedBg, - x, y, listPtr->selBorderWidth, listPtr->lineHeight, + x, y, selBorderWidth, listPtr->lineHeight, 1, TK_RELIEF_RAISED); } /* Draw right bevel */ if (right == 0) { Tk_3DVerticalBevel(tkwin, pixmap, selectedBg, - x + width - listPtr->selBorderWidth, y, - listPtr->selBorderWidth, listPtr->lineHeight, + x + width - selBorderWidth, y, + selBorderWidth, listPtr->lineHeight, 0, TK_RELIEF_RAISED); } /* Draw top bevel */ if (!prevSelected) { Tk_3DHorizontalBevel(tkwin, pixmap, selectedBg, x-left, y, width+left+right, - listPtr->selBorderWidth, + selBorderWidth, 1, 1, 1, TK_RELIEF_RAISED); } /* Draw bottom bevel */ if (i + 1 == (int)listPtr->nElements || !Tcl_FindHashEntry(listPtr->selection, KEY(i + 1))) { Tk_3DHorizontalBevel(tkwin, pixmap, selectedBg, x-left, - y + listPtr->lineHeight - listPtr->selBorderWidth, - width+left+right, listPtr->selBorderWidth, 0, 0, 0, + y + listPtr->lineHeight - selBorderWidth, + width+left+right, selBorderWidth, 0, 0, 0, TK_RELIEF_RAISED); } prevSelected = 1; @@ -2047,7 +2069,7 @@ DisplayListbox( */ if (attrs->border != NULL) { - width = Tk_Width(tkwin) - 2*listPtr->inset; + width = Tk_Width(tkwin) - 2 * listPtr->inset; Tk_Fill3DRectangle(tkwin, pixmap, attrs->border, x, y, width, listPtr->lineHeight, 0, TK_RELIEF_FLAT); } @@ -2077,19 +2099,19 @@ DisplayListbox( textWidth = Tk_TextWidth(listPtr->tkfont, stringRep, stringLen); Tk_GetFontMetrics(listPtr->tkfont, &fm); - y += fm.ascent + listPtr->selBorderWidth; + y += fm.ascent + selBorderWidth; if (listPtr->justify == TK_JUSTIFY_LEFT) { - x = (listPtr->inset + listPtr->selBorderWidth) - listPtr->xOffset; + x = (listPtr->inset + selBorderWidth) - listPtr->xOffset; } else if (listPtr->justify == TK_JUSTIFY_RIGHT) { - x = Tk_Width(tkwin) - (listPtr->inset + listPtr->selBorderWidth) + x = Tk_Width(tkwin) - (listPtr->inset + selBorderWidth) - textWidth - listPtr->xOffset + GetMaxOffset(listPtr); } else { x = (Tk_Width(tkwin) - textWidth)/2 - listPtr->xOffset + GetMaxOffset(listPtr)/2; } - Tk_DrawChars(listPtr->display, pixmap, gc, listPtr->tkfont, + Tk_DrawChars(disp, pixmap, gc, listPtr->tkfont, stringRep, stringLen, x, y); /* @@ -2102,71 +2124,34 @@ DisplayListbox( * Underline the text. */ - Tk_UnderlineChars(listPtr->display, pixmap, gc, - listPtr->tkfont, stringRep, x, y, 0, stringLen); + Tk_UnderlineChars(disp, pixmap, gc, listPtr->tkfont, + stringRep, x, y, 0, stringLen); } else if (listPtr->activeStyle == ACTIVE_STYLE_DOTBOX) { -#ifdef _WIN32 - /* - * This provides for exact default look and feel on Windows. - */ - - TkWinDCState state; - HDC dc; - RECT rect; - - dc = TkWinGetDrawableDC(listPtr->display, pixmap, &state); - rect.left = listPtr->inset; - rect.top = ((i - listPtr->topIndex) * listPtr->lineHeight) - + listPtr->inset; - rect.right = rect.left + width; - rect.bottom = rect.top + listPtr->lineHeight; - DrawFocusRect(dc, &rect); - TkWinReleaseDrawableDC(pixmap, dc, &state); -#else /* !_WIN32 */ /* * Draw a dotted box around the text. */ x = listPtr->inset; - y = ((i - listPtr->topIndex) * listPtr->lineHeight) + y = (i - listPtr->topIndex) * listPtr->lineHeight + listPtr->inset; - width = Tk_Width(tkwin) - 2*listPtr->inset - 1; + width = Tk_Width(tkwin) - 2 * listPtr->inset; - gcValues.line_style = LineOnOffDash; - gcValues.line_width = listPtr->selBorderWidth; - if (gcValues.line_width <= 0) { - gcValues.line_width = 1; - } - gcValues.dash_offset = 0; - gcValues.dashes = 1; + TkDrawDottedRect(disp, pixmap, gc, x, y, + width, listPtr->lineHeight); - /* - * You would think the XSetDashes was necessary, but it - * appears that the default dotting for just saying we want - * dashes appears to work correctly. - static char dashList[] = { 1 }; - static int dashLen = sizeof(dashList); - XSetDashes(listPtr->display, gc, 0, dashList, dashLen); - */ - - mask = GCLineWidth | GCLineStyle | GCDashList | GCDashOffset; - XChangeGC(listPtr->display, gc, mask, &gcValues); - XDrawRectangle(listPtr->display, pixmap, gc, x, y, - (unsigned) width, (unsigned) listPtr->lineHeight - 1); if (!freeGC) { /* * Don't bother changing if it is about to be freed. */ gcValues.line_style = LineSolid; - XChangeGC(listPtr->display, gc, GCLineStyle, &gcValues); + XChangeGC(disp, gc, GCLineStyle, &gcValues); } -#endif /* _WIN32 */ } } if (freeGC) { - Tk_FreeGC(listPtr->display, gc); + Tk_FreeGC(disp, gc); } } @@ -2175,29 +2160,30 @@ DisplayListbox( * of the text of the listbox entries. */ + Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->highlightWidthObj, &highlightWidth); Tk_Draw3DRectangle(tkwin, pixmap, listPtr->normalBorder, - listPtr->highlightWidth, listPtr->highlightWidth, - Tk_Width(tkwin) - 2*listPtr->highlightWidth, - Tk_Height(tkwin) - 2*listPtr->highlightWidth, - listPtr->borderWidth, listPtr->relief); - if (listPtr->highlightWidth > 0) { + highlightWidth, highlightWidth, + Tk_Width(tkwin) - 2 * highlightWidth, + Tk_Height(tkwin) - 2 * highlightWidth, + borderWidth, listPtr->relief); + if (highlightWidth > 0) { GC fgGC, bgGC; bgGC = Tk_GCForColor(listPtr->highlightBgColorPtr, pixmap); if (listPtr->flags & GOT_FOCUS) { fgGC = Tk_GCForColor(listPtr->highlightColorPtr, pixmap); Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, - listPtr->highlightWidth, pixmap); + highlightWidth, pixmap); } else { Tk_DrawHighlightBorder(tkwin, bgGC, bgGC, - listPtr->highlightWidth, pixmap); + highlightWidth, pixmap); } } #ifndef TK_NO_DOUBLE_BUFFERING - XCopyArea(listPtr->display, pixmap, Tk_WindowId(tkwin), - listPtr->textGC, 0, 0, (unsigned) Tk_Width(tkwin), - (unsigned) Tk_Height(tkwin), 0, 0); - Tk_FreePixmap(listPtr->display, pixmap); + XCopyArea(disp, pixmap, Tk_WindowId(tkwin), listPtr->textGC, 0, 0, + (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin), 0, 0); + Tk_FreePixmap(disp, pixmap); #endif /* TK_NO_DOUBLE_BUFFERING */ } @@ -2240,6 +2226,7 @@ ListboxComputeGeometry( Tk_FontMetrics fm; Tcl_Obj *element; const char *text; + int selBorderWidth; if (fontChanged || maxIsStale) { listPtr->xScrollUnit = Tk_TextWidth(listPtr->tkfont, "0", 1); @@ -2267,7 +2254,8 @@ ListboxComputeGeometry( } Tk_GetFontMetrics(listPtr->tkfont, &fm); - listPtr->lineHeight = fm.linespace + 1 + 2*listPtr->selBorderWidth; + Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->selBorderWidthObj, &selBorderWidth); + listPtr->lineHeight = fm.linespace + 1 + 2 * selBorderWidth; width = listPtr->width; if (width <= 0) { width = (listPtr->maxWidth + listPtr->xScrollUnit - 1) @@ -2276,8 +2264,8 @@ ListboxComputeGeometry( width = 1; } } - pixelWidth = width*listPtr->xScrollUnit + 2*listPtr->inset - + 2*listPtr->selBorderWidth; + pixelWidth = width*listPtr->xScrollUnit + 2 * listPtr->inset + + 2 * selBorderWidth; height = listPtr->height; if (listPtr->height <= 0) { height = (int)listPtr->nElements; @@ -2285,7 +2273,7 @@ ListboxComputeGeometry( height = 1; } } - pixelHeight = height*listPtr->lineHeight + 2*listPtr->inset; + pixelHeight = height*listPtr->lineHeight + 2 * listPtr->inset; Tk_GeometryRequest(listPtr->tkwin, pixelWidth, pixelHeight); Tk_SetInternalBorder(listPtr->tkwin, listPtr->inset); if (updateGrid) { @@ -2376,8 +2364,8 @@ ListboxInsertSubCmd( Tcl_IncrRefCount(newListObj); Tcl_DecrRefCount(listPtr->listObj); listPtr->listObj = newListObj; - if (listPtr->listVarName != NULL) { - Tcl_SetVar2Ex(listPtr->interp, listPtr->listVarName, NULL, + if (listPtr->listVarNameObj != NULL) { + Tcl_SetVar2Ex(listPtr->interp, Tcl_GetString(listPtr->listVarNameObj), NULL, listPtr->listObj, TCL_GLOBAL_ONLY); } @@ -2536,8 +2524,8 @@ ListboxDeleteSubCmd( Tcl_IncrRefCount(newListObj); Tcl_DecrRefCount(listPtr->listObj); listPtr->listObj = newListObj; - if (listPtr->listVarName != NULL) { - Tcl_SetVar2Ex(listPtr->interp, listPtr->listVarName, NULL, + if (listPtr->listVarNameObj != NULL) { + Tcl_SetVar2Ex(listPtr->interp, Tcl_GetString(listPtr->listVarNameObj), NULL, listPtr->listObj, TCL_GLOBAL_ONLY); } @@ -2634,7 +2622,7 @@ ListboxEventProc( } else if (eventPtr->type == ConfigureNotify) { int vertSpace; - vertSpace = Tk_Height(listPtr->tkwin) - 2*listPtr->inset; + vertSpace = Tk_Height(listPtr->tkwin) - 2 * listPtr->inset; listPtr->fullLines = vertSpace / listPtr->lineHeight; if ((listPtr->fullLines*listPtr->lineHeight) < vertSpace) { listPtr->partialLine = 1; @@ -3301,7 +3289,7 @@ ListboxUpdateVScrollbar( Tcl_Interp *interp; Tcl_DString buf; - if (listPtr->yScrollCmd == NULL) { + if (listPtr->yScrollCmdObj == NULL) { return; } if (listPtr->nElements == 0) { @@ -3326,7 +3314,7 @@ ListboxUpdateVScrollbar( interp = listPtr->interp; Tcl_Preserve(interp); Tcl_DStringInit(&buf); - Tcl_DStringAppend(&buf, listPtr->yScrollCmd, TCL_INDEX_NONE); + Tcl_DStringAppend(&buf, Tcl_GetString(listPtr->yScrollCmdObj), TCL_INDEX_NONE); Tcl_DStringAppend(&buf, " ", TCL_INDEX_NONE); Tcl_DStringAppend(&buf, firstStr, TCL_INDEX_NONE); Tcl_DStringAppend(&buf, " ", TCL_INDEX_NONE); @@ -3370,13 +3358,15 @@ ListboxUpdateHScrollbar( double first, last; Tcl_Interp *interp; Tcl_DString buf; + int selBorderWidth; - if (listPtr->xScrollCmd == NULL) { + if (listPtr->xScrollCmdObj == NULL) { return; } + Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->selBorderWidthObj, &selBorderWidth); windowWidth = Tk_Width(listPtr->tkwin) - - 2*(listPtr->inset + listPtr->selBorderWidth); + - 2 * (listPtr->inset + selBorderWidth); if (listPtr->maxWidth == 0) { first = 0; last = 1.0; @@ -3398,7 +3388,7 @@ ListboxUpdateHScrollbar( interp = listPtr->interp; Tcl_Preserve(interp); Tcl_DStringInit(&buf); - Tcl_DStringAppend(&buf, listPtr->xScrollCmd, TCL_INDEX_NONE); + Tcl_DStringAppend(&buf, Tcl_GetString(listPtr->xScrollCmdObj), TCL_INDEX_NONE); Tcl_DStringAppend(&buf, " ", TCL_INDEX_NONE); Tcl_DStringAppend(&buf, firstStr, TCL_INDEX_NONE); Tcl_DStringAppend(&buf, " ", TCL_INDEX_NONE); @@ -3448,12 +3438,12 @@ ListboxListVarProc( if (flags & TCL_TRACE_UNSETS) { - if (!Tcl_InterpDeleted(interp) && listPtr->listVarName) { + if (!Tcl_InterpDeleted(interp) && listPtr->listVarNameObj) { void *probe = NULL; do { probe = Tcl_VarTraceInfo(interp, - listPtr->listVarName, + Tcl_GetString(listPtr->listVarNameObj), TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, ListboxListVarProc, probe); if (probe == (void *)listPtr) { @@ -3469,16 +3459,16 @@ ListboxListVarProc( */ return NULL; } - Tcl_SetVar2Ex(interp, listPtr->listVarName, NULL, + Tcl_SetVar2Ex(interp, Tcl_GetString(listPtr->listVarNameObj), NULL, listPtr->listObj, TCL_GLOBAL_ONLY); - Tcl_TraceVar2(interp, listPtr->listVarName, + Tcl_TraceVar2(interp, Tcl_GetString(listPtr->listVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, ListboxListVarProc, clientData); return NULL; } } else { oldListObj = listPtr->listObj; - varListObj = Tcl_GetVar2Ex(listPtr->interp, listPtr->listVarName, + varListObj = Tcl_GetVar2Ex(listPtr->interp, Tcl_GetString(listPtr->listVarNameObj), NULL, TCL_GLOBAL_ONLY); /* @@ -3488,7 +3478,7 @@ ListboxListVarProc( */ if (Tcl_ListObjLength(listPtr->interp, varListObj, &i) != TCL_OK) { - Tcl_SetVar2Ex(interp, listPtr->listVarName, NULL, oldListObj, + Tcl_SetVar2Ex(interp, Tcl_GetString(listPtr->listVarNameObj), NULL, oldListObj, TCL_GLOBAL_ONLY); return (char *) "invalid listvar value"; } @@ -3647,11 +3637,12 @@ MigrateHashEntries( static int GetMaxOffset( Listbox *listPtr) { - int maxOffset; + int maxOffset, selBorderWidth; + Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->selBorderWidthObj, &selBorderWidth); maxOffset = listPtr->maxWidth - - (Tk_Width(listPtr->tkwin) - 2*listPtr->inset - - 2*listPtr->selBorderWidth) + listPtr->xScrollUnit - 1; + (Tk_Width(listPtr->tkwin) - 2 * listPtr->inset - + 2 * selBorderWidth) + listPtr->xScrollUnit - 1; if (maxOffset < 0) { /* diff --git a/generic/tkMenu.c b/generic/tkMenu.c index dafb1e9..9066e68 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -249,8 +249,8 @@ static const Tk_OptionSpec tkMenuConfigSpecs[] = { offsetof(TkMenu, activeFgPtr), TCL_INDEX_NONE, 0, DEF_MENU_ACTIVE_FG_MONO, 0}, {TK_OPTION_RELIEF, "-activerelief", "activeRelief", "Relief", - DEF_MENU_ACTIVE_RELIEF, offsetof(TkMenu, activeReliefPtr), - TCL_INDEX_NONE, 0, NULL, 0}, + DEF_MENU_ACTIVE_RELIEF, TCL_INDEX_NONE, + offsetof(TkMenu, activeRelief), 0, NULL, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_MENU_BG_COLOR, offsetof(TkMenu, borderPtr), TCL_INDEX_NONE, 0, DEF_MENU_BG_MONO, 0}, @@ -260,7 +260,7 @@ static const Tk_OptionSpec tkMenuConfigSpecs[] = { NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_MENU_BORDER_WIDTH, - offsetof(TkMenu, borderWidthPtr), TCL_INDEX_NONE, 0, NULL, 0}, + offsetof(TkMenu, borderWidthObj), TCL_INDEX_NONE, 0, NULL, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_MENU_CURSOR, offsetof(TkMenu, cursorPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL, 0}, @@ -1008,7 +1008,7 @@ MenuWidgetObjCmd( * * Side effects: * Commands may get excecuted; variables may get set; sub-menus may get - * posted. + * posted, the passed menu may be destroyed. * *---------------------------------------------------------------------- */ @@ -1017,8 +1017,12 @@ int TkInvokeMenu( Tcl_Interp *interp, /* The interp that the menu lives in. */ TkMenu *menuPtr, /* The menu we are invoking. */ - Tcl_Size index) /* The zero based index of the item we are - * invoking. */ + /* Must be protected by Tcl_Preserve + * against freeing by the caller. + * Tk Bug [2d3a81c0]. + */ + Tcl_Size index) /* The zero based index of the item we are + * invoking. */ { int result = TCL_OK; TkMenuEntry *mePtr; @@ -3039,7 +3043,7 @@ GetIndexFromCoords( TkRecomputeMenu(menuPtr); p = string + 1; Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, - menuPtr->borderWidthPtr, &borderwidth); + menuPtr->borderWidthObj, &borderwidth); rest = strchr(p, ','); if (rest) { Tcl_DString ds; diff --git a/generic/tkMenu.h b/generic/tkMenu.h index fdb9ae9..cbe524b 100644 --- a/generic/tkMenu.h +++ b/generic/tkMenu.h @@ -279,7 +279,7 @@ typedef struct TkMenu { Tcl_Obj *borderPtr; /* Structure used to draw 3-D border and * background for menu. */ - Tcl_Obj *borderWidthPtr; /* Width of border around whole menu. */ + Tcl_Obj *borderWidthObj; /* Width of border around whole menu. */ Tcl_Obj *activeBorderPtr; /* Used to draw background and border for * active element (if any). */ Tcl_Obj *activeBorderWidthPtr; @@ -379,7 +379,7 @@ typedef struct TkMenu { /* We actually have to allocate these because * multiple menus get changed during one * ConfigureMenu call. */ - Tcl_Obj *activeReliefPtr; /* 3-d effect for active element. */ + int activeRelief; /* 3-d effect for active element. */ Tcl_HashTable items; /* Map: id -> entry */ int serial; /* Next item # for autogenerated ids */ } TkMenu; diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c index 275b9f5..4510c96 100644 --- a/generic/tkMenuDraw.c +++ b/generic/tkMenuDraw.c @@ -633,7 +633,7 @@ DisplayMenu( return; } - Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthPtr, + Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthObj, &borderWidth); border = Tk_Get3DBorderFromObj(menuPtr->tkwin, menuPtr->borderPtr); @@ -670,25 +670,25 @@ DisplayMenu( &menuMetrics, mePtr->x, mePtr->y, mePtr->width, mePtr->height, strictMotif, 1); - if (mePtr->entryFlags & ENTRY_LAST_COLUMN) { + if (mePtr->entryFlags & ENTRY_LAST_COLUMN) { - /* - * Paint the area at the right of an entry in the last column. - * This has zero width except after menu resizing. - */ + /* + * Paint the area at the right of an entry in the last column. + * This has zero width except after menu resizing. + */ - Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, - mePtr->x + mePtr->width, mePtr->y, - Tk_Width(tkwin) - mePtr->x - mePtr->width - borderWidth, - mePtr->height, 0, TK_RELIEF_FLAT); - } + Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, + mePtr->x + mePtr->width, mePtr->y, + Tk_Width(tkwin) - mePtr->x - mePtr->width - borderWidth, + mePtr->height, 0, TK_RELIEF_FLAT); + } if ((index > 0) && (menuPtr->menuType != MENUBAR) && mePtr->columnBreak) { - /* - * Paint the area under the last entry in a column. - */ + /* + * Paint the area under the last entry in a column. + */ mePtr = menuPtr->entries[index - 1]; Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, @@ -708,9 +708,9 @@ DisplayMenu( } else { mePtr = menuPtr->entries[menuPtr->numEntries - 1]; - /* - * Paint the area under the last entry of the menu. - */ + /* + * Paint the area under the last entry of the menu. + */ Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, mePtr->x, mePtr->y + mePtr->height, mePtr->width, @@ -722,10 +722,10 @@ DisplayMenu( height = Tk_Height(tkwin) - y - borderWidth; } - /* - * Paint the area at the bottom right of the last entry. - * This has zero width except after menu resizing. - */ + /* + * Paint the area at the bottom right of the last entry. + * This has zero width except after menu resizing. + */ Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, x, y, width, height, 0, TK_RELIEF_FLAT); @@ -989,7 +989,7 @@ AdjustMenuCoords( } else { int borderWidth, activeBorderWidth; - Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthPtr, + Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->activeBorderWidthPtr, &activeBorderWidth); diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index 7159ab7..ba6b7da 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.c @@ -62,8 +62,8 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_MENUBUTTON_BITMAP, TCL_INDEX_NONE, offsetof(TkMenuButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_MENUBUTTON_BORDER_WIDTH, TCL_INDEX_NONE, - offsetof(TkMenuButton, borderWidth), 0, 0, 0}, + DEF_MENUBUTTON_BORDER_WIDTH, offsetof(TkMenuButton, borderWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_MENUBUTTON_CURSOR, TCL_INDEX_NONE, offsetof(TkMenuButton, cursor), TK_OPTION_NULL_OK, 0, 0}, @@ -81,8 +81,8 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", DEF_MENUBUTTON_FG, TCL_INDEX_NONE, offsetof(TkMenuButton, normalFg), 0, 0, 0}, {TK_OPTION_STRING, "-height", "height", "Height", - DEF_MENUBUTTON_HEIGHT, TCL_INDEX_NONE, offsetof(TkMenuButton, heightString), - 0, 0, 0}, + DEF_MENUBUTTON_HEIGHT, offsetof(TkMenuButton, heightObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_MENUBUTTON_HIGHLIGHT_BG_COLOR, TCL_INDEX_NONE, offsetof(TkMenuButton, highlightBgColorPtr), 0, 0, 0}, @@ -91,9 +91,9 @@ static const Tk_OptionSpec optionSpecs[] = { offsetof(TkMenuButton, highlightColorPtr), 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", DEF_MENUBUTTON_HIGHLIGHT_WIDTH, - TCL_INDEX_NONE, offsetof(TkMenuButton, highlightWidth), 0, 0, 0}, + offsetof(TkMenuButton, highlightWidthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-image", "image", "Image", - DEF_MENUBUTTON_IMAGE, TCL_INDEX_NONE, offsetof(TkMenuButton, imageString), + DEF_MENUBUTTON_IMAGE, offsetof(TkMenuButton, imageObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn", DEF_MENUBUTTON_INDICATOR, TCL_INDEX_NONE, offsetof(TkMenuButton, indicatorOn), @@ -101,13 +101,13 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_MENUBUTTON_JUSTIFY, TCL_INDEX_NONE, offsetof(TkMenuButton, justify), TK_OPTION_ENUM_VAR, 0, 0}, {TK_OPTION_STRING, "-menu", "menu", "Menu", - DEF_MENUBUTTON_MENU, TCL_INDEX_NONE, offsetof(TkMenuButton, menuName), + DEF_MENUBUTTON_MENU, offsetof(TkMenuButton, menuNameObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-padx", "padX", "Pad", - DEF_MENUBUTTON_PADX, TCL_INDEX_NONE, offsetof(TkMenuButton, padX), + DEF_MENUBUTTON_PADX, offsetof(TkMenuButton, padXObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-pady", "padY", "Pad", - DEF_MENUBUTTON_PADY, TCL_INDEX_NONE, offsetof(TkMenuButton, padY), + DEF_MENUBUTTON_PADY, offsetof(TkMenuButton, padYObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_MENUBUTTON_RELIEF, TCL_INDEX_NONE, offsetof(TkMenuButton, relief), @@ -119,21 +119,21 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_MENUBUTTON_STATE, TCL_INDEX_NONE, offsetof(TkMenuButton, state), TK_OPTION_ENUM_VAR, tkStateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", - DEF_MENUBUTTON_TAKE_FOCUS, TCL_INDEX_NONE, - offsetof(TkMenuButton, takeFocus), TK_OPTION_NULL_OK, 0, 0}, + DEF_MENUBUTTON_TAKE_FOCUS, offsetof(TkMenuButton, takeFocusObj), + TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-text", "text", "Text", - DEF_MENUBUTTON_TEXT, TCL_INDEX_NONE, offsetof(TkMenuButton, text), 0, 0, 0}, + DEF_MENUBUTTON_TEXT, offsetof(TkMenuButton, textObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-textvariable", "textVariable", "Variable", - DEF_MENUBUTTON_TEXT_VARIABLE, TCL_INDEX_NONE, - offsetof(TkMenuButton, textVarName), TK_OPTION_NULL_OK, 0, 0}, + DEF_MENUBUTTON_TEXT_VARIABLE, offsetof(TkMenuButton, textVarNameObj), + TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_INDEX, "-underline", "underline", "Underline", TK_OPTION_UNDERLINE_DEF(TkMenuButton, underline), 0}, {TK_OPTION_STRING, "-width", "width", "Width", - DEF_MENUBUTTON_WIDTH, TCL_INDEX_NONE, offsetof(TkMenuButton, widthString), - 0, 0, 0}, + DEF_MENUBUTTON_WIDTH, offsetof(TkMenuButton, widthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength", - DEF_MENUBUTTON_WRAP_LENGTH, TCL_INDEX_NONE, offsetof(TkMenuButton, wrapLength), - 0, 0, 0}, + DEF_MENUBUTTON_WRAP_LENGTH, offsetof(TkMenuButton, wrapLengthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0} }; @@ -190,7 +190,7 @@ static void DestroyMenuButton(void *memPtr); int Tk_MenubuttonObjCmd( - void *dummy, /* NULL. */ + TCL_UNUSED(void *), Tcl_Interp *interp, /* Current interpreter. */ Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -198,7 +198,6 @@ Tk_MenubuttonObjCmd( TkMenuButton *mbPtr; Tk_OptionTable optionTable; Tk_Window tkwin; - (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName ?-option value ...?"); @@ -238,19 +237,19 @@ Tk_MenubuttonObjCmd( Tk_PathName(mbPtr->tkwin), MenuButtonWidgetObjCmd, mbPtr, MenuButtonCmdDeletedProc); mbPtr->optionTable = optionTable; - mbPtr->menuName = NULL; - mbPtr->text = NULL; + mbPtr->menuNameObj = NULL; + mbPtr->textObj = NULL; mbPtr->underline = INT_MIN; - mbPtr->textVarName = NULL; + mbPtr->textVarNameObj = NULL; mbPtr->bitmap = None; - mbPtr->imageString = NULL; + mbPtr->imageObj = NULL; mbPtr->image = NULL; mbPtr->state = STATE_NORMAL; mbPtr->normalBorder = NULL; mbPtr->activeBorder = NULL; - mbPtr->borderWidth = 0; + mbPtr->borderWidthObj = NULL; mbPtr->relief = TK_RELIEF_FLAT; - mbPtr->highlightWidth = 0; + mbPtr->highlightWidthObj = 0; mbPtr->highlightBgColorPtr = NULL; mbPtr->highlightColorPtr = NULL; mbPtr->inset = 0; @@ -265,13 +264,13 @@ Tk_MenubuttonObjCmd( mbPtr->stippleGC = NULL; mbPtr->leftBearing = 0; mbPtr->rightBearing = 0; - mbPtr->widthString = NULL; - mbPtr->heightString = NULL; - mbPtr->width = 0; + mbPtr->widthObj = NULL; + mbPtr->heightObj = NULL; mbPtr->width = 0; - mbPtr->wrapLength = 0; - mbPtr->padX = 0; - mbPtr->padY = 0; + mbPtr->height = 0; + mbPtr->wrapLengthObj = 0; + mbPtr->padXObj = NULL; + mbPtr->padYObj = NULL; mbPtr->anchor = TK_ANCHOR_CENTER; mbPtr->justify = TK_JUSTIFY_CENTER; mbPtr->textLayout = NULL; @@ -280,8 +279,13 @@ Tk_MenubuttonObjCmd( mbPtr->indicatorHeight = 0; mbPtr->direction = DIRECTION_FLUSH; mbPtr->cursor = NULL; - mbPtr->takeFocus = NULL; + mbPtr->takeFocusObj = NULL; mbPtr->flags = 0; + mbPtr->borderWidthObj = NULL; + mbPtr->highlightWidthObj = NULL; + mbPtr->padXObj = NULL; + mbPtr->padYObj = NULL; + mbPtr->wrapLengthObj = NULL; Tk_CreateEventHandler(mbPtr->tkwin, ExposureMask|StructureNotifyMask|FocusChangeMask, @@ -414,8 +418,8 @@ DestroyMenuButton( */ Tcl_DeleteCommandFromToken(mbPtr->interp, mbPtr->widgetCmd); - if (mbPtr->textVarName != NULL) { - Tcl_UntraceVar2(mbPtr->interp, mbPtr->textVarName, NULL, + if (mbPtr->textVarNameObj != NULL) { + Tcl_UntraceVar2(mbPtr->interp, Tcl_GetString(mbPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MenuButtonTextVarProc, mbPtr); } @@ -479,13 +483,15 @@ ConfigureMenuButton( Tcl_Obj *errorResult = NULL; int error; Tk_Image image; + int borderWidth, highlightWidth; + int padX, padY; /* * Eliminate any existing trace on variables monitored by the menubutton. */ - if (mbPtr->textVarName != NULL) { - Tcl_UntraceVar2(interp, mbPtr->textVarName, NULL, + if (mbPtr->textVarNameObj != NULL) { + Tcl_UntraceVar2(interp, Tcl_GetString(mbPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MenuButtonTextVarProc, mbPtr); } @@ -531,15 +537,33 @@ ConfigureMenuButton( Tk_SetBackgroundFromBorder(mbPtr->tkwin, mbPtr->normalBorder); } - if (mbPtr->highlightWidth < 0) { - mbPtr->highlightWidth = 0; + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->highlightWidthObj, &highlightWidth); + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->padYObj, &padY); + if (borderWidth < 0) { + borderWidth = 0; + Tcl_DecrRefCount(mbPtr->borderWidthObj); + mbPtr->borderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(mbPtr->borderWidthObj); } - - if (mbPtr->padX < 0) { - mbPtr->padX = 0; + if (highlightWidth < 0) { + highlightWidth = 0; + Tcl_DecrRefCount(mbPtr->highlightWidthObj); + mbPtr->highlightWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(mbPtr->highlightWidthObj); + } + if (padX < 0) { + padX = 0; + Tcl_DecrRefCount(mbPtr->padXObj); + mbPtr->padXObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(mbPtr->padXObj); } - if (mbPtr->padY < 0) { - mbPtr->padY = 0; + if (padY < 0) { + padY = 0; + Tcl_DecrRefCount(mbPtr->padYObj); + mbPtr->padYObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(mbPtr->padYObj); } /* @@ -548,9 +572,9 @@ ConfigureMenuButton( * doesn't go to zero and cause image data to be discarded. */ - if (mbPtr->imageString != NULL) { + if (mbPtr->imageObj != NULL) { image = Tk_GetImage(mbPtr->interp, mbPtr->tkwin, - mbPtr->imageString, MenuButtonImageProc, mbPtr); + Tcl_GetString(mbPtr->imageObj), MenuButtonImageProc, mbPtr); if (image == NULL) { return TCL_ERROR; } @@ -567,24 +591,24 @@ ConfigureMenuButton( */ if ((mbPtr->bitmap != None) || (mbPtr->image != NULL)) { - if (Tk_GetPixels(interp, mbPtr->tkwin, mbPtr->widthString, + if (Tk_GetPixelsFromObj(interp, mbPtr->tkwin, mbPtr->widthObj, &mbPtr->width) != TCL_OK) { widthError: Tcl_AddErrorInfo(interp, "\n (processing \"-width\" option)"); continue; } - if (Tk_GetPixels(interp, mbPtr->tkwin, mbPtr->heightString, + if (Tk_GetPixelsFromObj(interp, mbPtr->tkwin, mbPtr->heightObj, &mbPtr->height) != TCL_OK) { heightError: Tcl_AddErrorInfo(interp, "\n (processing \"-height\" option)"); continue; } } else { - if (Tcl_GetInt(interp, mbPtr->widthString, &mbPtr->width) + if (Tcl_GetIntFromObj(interp, mbPtr->widthObj, &mbPtr->width) != TCL_OK) { goto widthError; } - if (Tcl_GetInt(interp, mbPtr->heightString, &mbPtr->height) + if (Tcl_GetIntFromObj(interp, mbPtr->heightObj, &mbPtr->height) != TCL_OK) { goto heightError; } @@ -596,7 +620,7 @@ ConfigureMenuButton( Tk_FreeSavedOptions(&savedOptions); } - if (mbPtr->textVarName != NULL) { + if (mbPtr->textVarNameObj != NULL) { /* * If no image or -compound is used, display the value of a variable. * Set up a trace to watch for any changes in it, create the variable @@ -604,18 +628,18 @@ ConfigureMenuButton( */ const char *value; - value = Tcl_GetVar2(interp, mbPtr->textVarName, NULL, TCL_GLOBAL_ONLY); + value = Tcl_GetVar2(interp, Tcl_GetString(mbPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY); if (value == NULL) { - Tcl_SetVar2(interp, mbPtr->textVarName, NULL, mbPtr->text, + Tcl_SetVar2(interp, Tcl_GetString(mbPtr->textVarNameObj), NULL, mbPtr->textObj ? Tcl_GetString(mbPtr->textObj) : "", TCL_GLOBAL_ONLY); } else { - if (mbPtr->text != NULL) { - ckfree(mbPtr->text); + if (mbPtr->textObj != NULL) { + Tcl_DecrRefCount(mbPtr->textObj); } - mbPtr->text = (char *)ckalloc(strlen(value) + 1); - strcpy(mbPtr->text, value); + mbPtr->textObj = Tcl_NewStringObj(value, TCL_INDEX_NONE); + Tcl_IncrRefCount(mbPtr->textObj); } - Tcl_TraceVar2(interp, mbPtr->textVarName, NULL, + Tcl_TraceVar2(interp, Tcl_GetString(mbPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MenuButtonTextVarProc, mbPtr); } @@ -756,6 +780,7 @@ MenuButtonEventProc( XEvent *eventPtr) /* Information about event. */ { TkMenuButton *mbPtr = (TkMenuButton *)clientData; + int highlightWidth; if ((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) { goto redraw; @@ -771,14 +796,16 @@ MenuButtonEventProc( } else if (eventPtr->type == FocusIn) { if (eventPtr->xfocus.detail != NotifyInferior) { mbPtr->flags |= GOT_FOCUS; - if (mbPtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { goto redraw; } } } else if (eventPtr->type == FocusOut) { if (eventPtr->xfocus.detail != NotifyInferior) { mbPtr->flags &= ~GOT_FOCUS; - if (mbPtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { goto redraw; } } @@ -851,15 +878,12 @@ static char * MenuButtonTextVarProc( void *clientData, /* Information about button. */ Tcl_Interp *interp, /* Interpreter containing variable. */ - const char *name1, /* Name of variable. */ - const char *name2, /* Second part of variable name. */ + TCL_UNUSED(const char *), /* Name of variable. */ + TCL_UNUSED(const char *), /* Second part of variable name. */ int flags) /* Information about what happened. */ { TkMenuButton *mbPtr = (TkMenuButton *)clientData; const char *value; - size_t len; - (void)name1; - (void)name2; /* * If the variable is unset, then immediately recreate it unless the whole @@ -867,46 +891,45 @@ MenuButtonTextVarProc( */ if (flags & TCL_TRACE_UNSETS) { - if (!Tcl_InterpDeleted(interp) && mbPtr->textVarName) { - void *probe = NULL; - - do { - probe = Tcl_VarTraceInfo(interp, - mbPtr->textVarName, - TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, - MenuButtonTextVarProc, probe); - if (probe == (void *)mbPtr) { - break; - } - } while (probe); - if (probe) { - /* - * We were able to fetch the unset trace for our - * textVarName, which means it is not unset and not - * the cause of this unset trace. Instead some outdated - * former variable must be, and we should ignore it. - */ - return NULL; - } - Tcl_SetVar2(interp, mbPtr->textVarName, NULL, mbPtr->text, + if (!Tcl_InterpDeleted(interp) && mbPtr->textVarNameObj) { + void *probe = NULL; + + do { + probe = Tcl_VarTraceInfo(interp, + Tcl_GetString(mbPtr->textVarNameObj), + TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, + MenuButtonTextVarProc, probe); + if (probe == (void *)mbPtr) { + break; + } + } while (probe); + if (probe) { + /* + * We were able to fetch the unset trace for our + * textVarName, which means it is not unset and not + * the cause of this unset trace. Instead some outdated + * former variable must be, and we should ignore it. + */ + return NULL; + } + Tcl_SetVar2(interp, Tcl_GetString(mbPtr->textVarNameObj), NULL, mbPtr->textObj ? Tcl_GetString(mbPtr->textObj) : "", TCL_GLOBAL_ONLY); - Tcl_TraceVar2(interp, mbPtr->textVarName, NULL, + Tcl_TraceVar2(interp, Tcl_GetString(mbPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MenuButtonTextVarProc, clientData); } return NULL; } - value = Tcl_GetVar2(interp, mbPtr->textVarName, NULL, TCL_GLOBAL_ONLY); + value = Tcl_GetVar2(interp, Tcl_GetString(mbPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY); if (value == NULL) { value = ""; } - if (mbPtr->text != NULL) { - ckfree(mbPtr->text); + if (mbPtr->textObj != NULL) { + Tcl_DecrRefCount(mbPtr->textObj); } - len = 1 + strlen(value); - mbPtr->text = (char *)ckalloc(len); - memcpy(mbPtr->text, value, len); + mbPtr->textObj= Tcl_NewStringObj(value, TCL_INDEX_NONE); + Tcl_IncrRefCount(mbPtr->textObj); TkpComputeMenuButtonGeometry(mbPtr); if ((mbPtr->tkwin != NULL) && Tk_IsMapped(mbPtr->tkwin) @@ -938,19 +961,14 @@ MenuButtonTextVarProc( static void MenuButtonImageProc( void *clientData, /* Pointer to widget record. */ - int x, int y, /* Upper left pixel (within image) that must - * be redisplayed. */ - int width, int height, /* Dimensions of area to redisplay (may be <= - * 0). */ - int imgWidth, int imgHeight)/* New dimensions of image. */ + TCL_UNUSED(int), /* x, Upper left pixel (within image) that must */ + TCL_UNUSED(int), /* y, be redisplayed. */ + TCL_UNUSED(int), /* width, Dimensions of area to redisplay (may be <= */ + TCL_UNUSED(int), /* height, 0). */ + TCL_UNUSED(int), /* imgWidth, New dimensions of image. */ + TCL_UNUSED(int)) /* imgHeight */ { TkMenuButton *mbPtr = (TkMenuButton *)clientData; - (void)x; - (void)y; - (void)width; - (void)height; - (void)imgWidth; - (void)imgHeight; if (mbPtr->tkwin != NULL) { TkpComputeMenuButtonGeometry(mbPtr); diff --git a/generic/tkMenubutton.h b/generic/tkMenubutton.h index 16ed223..65c730b 100644 --- a/generic/tkMenubutton.h +++ b/generic/tkMenubutton.h @@ -55,23 +55,21 @@ typedef struct { Tcl_Command widgetCmd; /* Token for menubutton's widget command. */ Tk_OptionTable optionTable; /* Table that defines configuration options * available for this widget. */ - char *menuName; /* Name of menu associated with widget. - * Malloc-ed. */ + Tcl_Obj *menuNameObj; /* Name of menu associated with widget. */ /* * Information about what's displayed in the menu button: */ - char *text; /* Text to display in button (malloc'ed) or - * NULL. */ + Tcl_Obj *textObj; /* Text to display in button. May be NULL. */ int underline; /* Index of character to underline. INT_MIN means no underline */ - char *textVarName; /* Name of variable (malloc'ed) or NULL. If + Tcl_Obj *textVarNameObj; /* Name of variable or NULL. If * non-NULL, button displays the contents of * this variable. */ Pixmap bitmap; /* Bitmap to display or None. If not None then * text and textVar and underline are * ignored. */ - char *imageString; /* Name of image to display (malloc'ed), or + Tcl_Obj *imageObj; /* Name of image to display, or * NULL. If non-NULL, bitmap, text, and * textVarName are ignored. */ Tk_Image image; /* Image to display in window, or NULL if @@ -89,10 +87,10 @@ typedef struct { Tk_3DBorder activeBorder; /* Structure used to draw 3-D border and * background when window is active. NULL * means no such border exists. */ - int borderWidth; /* Width of border. */ + Tcl_Obj *borderWidthObj; /* Width of border. */ int relief; /* 3-d effect: TK_RELIEF_RAISED, etc. */ - int highlightWidth; /* Width in pixels of highlight to draw around - * widget when it has the focus. <= 0 means + Tcl_Obj *highlightWidthObj; /* Width in pixels of highlight to draw around + * widget when it has the focus. 0 means * don't draw a highlight. */ XColor *highlightBgColorPtr;/* Color for drawing traversal highlight area * when highlight is off. */ @@ -121,18 +119,18 @@ typedef struct { * pixel (positive means to right). */ int rightBearing; /* Amount text sticks right from its * origin. */ - char *widthString; /* Value of -width option. Malloc'ed. */ - char *heightString; /* Value of -height option. Malloc'ed. */ + Tcl_Obj *widthObj; /* Value of -width option. */ + Tcl_Obj *heightObj; /* Value of -height option. */ int width, height; /* If > 0, these specify dimensions to request * for window, in characters for text and in * pixels for bitmaps. In this case the actual * size of the text string or bitmap is * ignored in computing desired window * size. */ - int wrapLength; /* Line length (in pixels) at which to wrap - * onto next line. <= 0 means don't wrap + Tcl_Obj *wrapLengthObj; /* Line length (in pixels) at which to wrap + * onto next line. 0 means don't wrap * except at newlines. */ - int padX, padY; /* Extra space around text or bitmap (pixels + Tcl_Obj *padXObj, *padYObj; /* Extra space around text or bitmap (pixels * on each side). */ Tk_Anchor anchor; /* Where text/bitmap should be displayed * inside window region. */ @@ -161,19 +159,19 @@ typedef struct { * whether the menubutton should show both an * image and text, and, if so, how. */ enum direction direction; /* Direction for where to pop the menu. Valid - * directions are "above", "below", "flush", - * "left", and "right". "above" and "below" - * will attempt to pop the menu completely - * above or below the menu respectively. - * "flush" means that the upper left corner - * of the menubutton is where the menu pops up. - * "left" and "right" will pop the menu left - * or right, and the active item will be next - * to the button. */ + * directions are "above", "below", "flush", + * "left", and "right". "above" and "below" + * will attempt to pop the menu completely + * above or below the menu respectively. + * "flush" means that the upper left corner + * of the menubutton is where the menu pops up. + * "left" and "right" will pop the menu left + * or right, and the active item will be next + * to the button. */ Tk_Cursor cursor; /* Current cursor for window, or NULL. */ - char *takeFocus; /* Value of -takefocus option; not used in the + Tcl_Obj *takeFocusObj; /* Value of -takefocus option; not used in the * C code, but used by keyboard traversal - * scripts. Malloc'ed, but may be NULL. */ + * scripts. May be NULL. */ int flags; /* Various flags; see below for * definitions. */ } TkMenuButton; @@ -210,7 +208,7 @@ typedef struct { MODULE_SCOPE void TkpComputeMenuButtonGeometry(TkMenuButton *mbPtr); MODULE_SCOPE TkMenuButton *TkpCreateMenuButton(Tk_Window tkwin); MODULE_SCOPE void TkpDisplayMenuButton(void *clientData); -MODULE_SCOPE void TkpDestroyMenuButton(TkMenuButton *mbPtr); +MODULE_SCOPE void TkpDestroyMenuButton(TkMenuButton *mbPtr); MODULE_SCOPE void TkMenuButtonWorldChanged(void *instanceData); #endif /* _TKMENUBUTTON */ diff --git a/generic/tkMessage.c b/generic/tkMessage.c index c67388a..9bb9fab 100644 --- a/generic/tkMessage.c +++ b/generic/tkMessage.c @@ -38,10 +38,8 @@ typedef struct { * Information used when displaying widget: */ - char *string; /* String displayed in message. */ - Tcl_Size numChars; /* Number of characters in string, not - * including terminating NULL. */ - char *textVarName; /* Name of variable (malloc'ed) or NULL. + Tcl_Obj *stringObj; /* String displayed in message. */ + Tcl_Obj *textVarNameObj; /* Name of variable or NULL. * If non-NULL, message displays the contents * of this variable. */ Tk_3DBorder border; /* Structure used to draw 3-D border and @@ -80,9 +78,9 @@ typedef struct { */ Tk_Cursor cursor; /* Current cursor for window, or None. */ - char *takeFocus; /* Value of -takefocus option; not used in the + Tcl_Obj *takeFocusObj; /* Value of -takefocus option; not used in the * C code, but used by keyboard traversal - * scripts. Malloc'ed, but may be NULL. */ + * scripts. May be NULL. */ int flags; /* Various flags; see below for * definitions. */ } Message; @@ -150,12 +148,12 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_MESSAGE_RELIEF, TCL_INDEX_NONE, offsetof(Message, relief), 0, 0, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", - DEF_MESSAGE_TAKE_FOCUS, TCL_INDEX_NONE, offsetof(Message, takeFocus), + DEF_MESSAGE_TAKE_FOCUS, offsetof(Message, takeFocusObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-text", "text", "Text", - DEF_MESSAGE_TEXT, TCL_INDEX_NONE, offsetof(Message, string), 0, 0, 0}, + DEF_MESSAGE_TEXT, offsetof(Message, stringObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-textvariable", "textVariable", "Variable", - DEF_MESSAGE_TEXT_VARIABLE, TCL_INDEX_NONE, offsetof(Message, textVarName), + DEF_MESSAGE_TEXT_VARIABLE, offsetof(Message, textVarNameObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-width", "width", "Width", DEF_MESSAGE_WIDTH, offsetof(Message, widthObj), TCL_INDEX_NONE, 0, 0 ,0}, @@ -401,8 +399,8 @@ DestroyMessage( if (msgPtr->textLayout != NULL) { Tk_FreeTextLayout(msgPtr->textLayout); } - if (msgPtr->textVarName != NULL) { - Tcl_UntraceVar2(msgPtr->interp, msgPtr->textVarName, NULL, + if (msgPtr->textVarNameObj != NULL) { + Tcl_UntraceVar2(msgPtr->interp, Tcl_GetString(msgPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MessageTextVarProc, msgPtr); } @@ -447,8 +445,8 @@ ConfigureMessage( * Eliminate any existing trace on a variable monitored by the message. */ - if (msgPtr->textVarName != NULL) { - Tcl_UntraceVar2(interp, msgPtr->textVarName, NULL, + if (msgPtr->textVarNameObj != NULL) { + Tcl_UntraceVar2(interp, Tcl_GetString(msgPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MessageTextVarProc, msgPtr); } @@ -465,20 +463,21 @@ ConfigureMessage( * and fetch its current value. */ - if (msgPtr->textVarName != NULL) { + if (msgPtr->textVarNameObj != NULL) { const char *value; - value = Tcl_GetVar2(interp, msgPtr->textVarName, NULL, TCL_GLOBAL_ONLY); + value = Tcl_GetVar2(interp, Tcl_GetString(msgPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY); if (value == NULL) { - Tcl_SetVar2(interp, msgPtr->textVarName, NULL, msgPtr->string, + Tcl_SetVar2(interp, Tcl_GetString(msgPtr->textVarNameObj), NULL, Tcl_GetString(msgPtr->stringObj), TCL_GLOBAL_ONLY); } else { - if (msgPtr->string != NULL) { - ckfree(msgPtr->string); + if (msgPtr->stringObj != NULL) { + Tcl_DecrRefCount(msgPtr->stringObj); } - msgPtr->string = strcpy((char *)ckalloc(strlen(value) + 1), value); + msgPtr->stringObj = Tcl_NewStringObj(value, TCL_INDEX_NONE); + Tcl_IncrRefCount(msgPtr->stringObj); } - Tcl_TraceVar2(interp, msgPtr->textVarName, NULL, + Tcl_TraceVar2(interp, Tcl_GetString(msgPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MessageTextVarProc, msgPtr); } @@ -489,8 +488,6 @@ ConfigureMessage( * be specified to Tk_ConfigureWidget. */ - msgPtr->numChars = Tcl_NumUtfChars(msgPtr->string, TCL_INDEX_NONE); - Tk_GetPixelsFromObj(NULL, msgPtr->tkwin, msgPtr->widthObj, &width); if (width < 0) { if (msgPtr->widthObj) { @@ -613,11 +610,10 @@ ComputeMessageGeometry( int aspect, lowerBound, upperBound, inset; int borderWidth, highlightWidth, padX, padY; Tk_FontMetrics fm; + Tcl_Size numChars; Tk_FreeTextLayout(msgPtr->textLayout); - Tk_GetPixelsFromObj(NULL, msgPtr->tkwin, msgPtr->borderWidthObj, &borderWidth); - Tk_GetPixelsFromObj(NULL, msgPtr->tkwin, msgPtr->highlightWidthObj, &highlightWidth); Tk_GetFontMetrics(msgPtr->tkfont, &fm); if (msgPtr->padXObj) { Tk_GetPixelsFromObj(NULL, msgPtr->tkwin, msgPtr->padXObj, &padX); @@ -630,6 +626,8 @@ ComputeMessageGeometry( padY = fm.ascent / 4; } + Tk_GetPixelsFromObj(NULL, msgPtr->tkwin, msgPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, msgPtr->tkwin, msgPtr->highlightWidthObj, &highlightWidth); inset = borderWidth + highlightWidth; /* @@ -659,9 +657,10 @@ ComputeMessageGeometry( inc = width/2; } + numChars = Tcl_GetCharLength(msgPtr->stringObj); for ( ; ; inc /= 2) { msgPtr->textLayout = Tk_ComputeTextLayout(msgPtr->tkfont, - msgPtr->string, msgPtr->numChars, width, msgPtr->justify, + Tcl_GetString(msgPtr->stringObj), numChars, width, msgPtr->justify, 0, &thisWidth, &thisHeight); maxWidth = thisWidth + 2 * (inset + padX); height = thisHeight + 2 * (inset + padY); @@ -902,12 +901,12 @@ MessageTextVarProc( */ if (flags & TCL_TRACE_UNSETS) { - if (!Tcl_InterpDeleted(interp) && msgPtr->textVarName) { + if (!Tcl_InterpDeleted(interp) && msgPtr->textVarNameObj) { void *probe = NULL; do { probe = Tcl_VarTraceInfo(interp, - msgPtr->textVarName, + Tcl_GetString(msgPtr->textVarNameObj), TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MessageTextVarProc, probe); if (probe == (void *)msgPtr) { @@ -923,25 +922,24 @@ MessageTextVarProc( */ return NULL; } - Tcl_SetVar2(interp, msgPtr->textVarName, NULL, msgPtr->string, + Tcl_SetVar2(interp, Tcl_GetString(msgPtr->textVarNameObj), NULL, Tcl_GetString(msgPtr->stringObj), TCL_GLOBAL_ONLY); - Tcl_TraceVar2(interp, msgPtr->textVarName, NULL, + Tcl_TraceVar2(interp, Tcl_GetString(msgPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MessageTextVarProc, clientData); } return NULL; } - value = Tcl_GetVar2(interp, msgPtr->textVarName, NULL, TCL_GLOBAL_ONLY); + value = Tcl_GetVar2(interp, Tcl_GetString(msgPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY); if (value == NULL) { value = ""; } - if (msgPtr->string != NULL) { - ckfree(msgPtr->string); + if (msgPtr->stringObj != NULL) { + Tcl_DecrRefCount(msgPtr->stringObj); } - msgPtr->numChars = Tcl_NumUtfChars(value, TCL_INDEX_NONE); - msgPtr->string = (char *)ckalloc(strlen(value) + 1); - strcpy(msgPtr->string, value); + msgPtr->stringObj = Tcl_NewStringObj(value, TCL_INDEX_NONE); + Tcl_IncrRefCount(msgPtr->stringObj); ComputeMessageGeometry(msgPtr); if ((msgPtr->tkwin != NULL) && Tk_IsMapped(msgPtr->tkwin) diff --git a/generic/tkObj.c b/generic/tkObj.c index cdea2ed..a91e460 100644 --- a/generic/tkObj.c +++ b/generic/tkObj.c @@ -108,10 +108,17 @@ static const TkObjType pixelObjType = { DupPixelInternalRep, /* dupIntRepProc */ NULL, /* updateStringProc */ NULL, /* setFromAnyProc */ - TCL_OBJTYPE_V0}, + TCL_OBJTYPE_V1(TkLengthOne)}, 0 }; +Tcl_Size +TkLengthOne( + TCL_UNUSED(Tcl_Obj *)) +{ + return 1; +} + /* * The following structure defines the implementation of the "pixel" Tcl * object, used for measuring distances. The pixel object remembers its @@ -124,7 +131,7 @@ static const TkObjType mmObjType = { DupMMInternalRep, /* dupIntRepProc */ UpdateStringOfMM, /* updateStringProc */ NULL, /* setFromAnyProc */ - TCL_OBJTYPE_V0}, + TCL_OBJTYPE_V1(TkLengthOne)}, 0 }; @@ -248,7 +255,7 @@ GetPixelsFromObjEx( double d; PixelRep *pixelPtr; static const double bias[] = { - 1.0, 10.0, 25.4, 0.35278 /*25.4 / 72.0*/ + 1.0, 10.0, 25.4, 0.35277777777777775 /*25.4 / 72.0*/ }; if (objPtr->typePtr != &pixelObjType.objType) { @@ -606,7 +613,7 @@ Tk_GetMMFromObj( double d; MMRep *mmPtr; static const double bias[] = { - 10.0, 25.4, 1.0, 0.35278 /*25.4 / 72.0*/ + 10.0, 25.4, 1.0, 0.35277777777777775 /*25.4 / 72.0*/ }; if (objPtr->typePtr != &mmObjType.objType) { diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c index 0f22e3b..5fd55cf 100644 --- a/generic/tkOldConfig.c +++ b/generic/tkOldConfig.c @@ -33,8 +33,8 @@ */ static int DoConfig(Tcl_Interp *interp, Tk_Window tkwin, - Tk_ConfigSpec *specPtr, Tk_Uid value, - int valueIsUid, void *widgRec); + Tk_ConfigSpec *specPtr, Tcl_Obj *value, + void *widgRec); static Tk_ConfigSpec * FindConfigSpec(Tcl_Interp *interp, Tk_ConfigSpec *specs, const char *argvName, int needFlags, int hateFlags); @@ -144,8 +144,7 @@ Tk_ConfigureWidget( Tcl_SetErrorCode(interp, "TK", "VALUE_MISSING", (char *)NULL); return TCL_ERROR; } - arg = Tcl_GetString(objv[1]); - if (DoConfig(interp, tkwin, specPtr, arg, 0, widgRec) != TCL_OK) { + if (DoConfig(interp, tkwin, specPtr, objv[1], widgRec) != TCL_OK) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (processing \"%.40s\" option)",specPtr->argvName)); return TCL_ERROR; @@ -177,30 +176,33 @@ Tk_ConfigureWidget( value = Tk_GetOption(tkwin, specPtr->dbName, specPtr->dbClass); } if (value != NULL) { - if (DoConfig(interp, tkwin, specPtr, value, 1, widgRec) != + Tcl_Obj *arg = Tcl_NewStringObj(value, TCL_INDEX_NONE); + Tcl_IncrRefCount(arg); + if (DoConfig(interp, tkwin, specPtr, arg, widgRec) != TCL_OK) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (%s \"%.50s\" in widget \"%.50s\")", "database entry for", specPtr->dbName, Tk_PathName(tkwin))); + Tcl_DecrRefCount(arg); return TCL_ERROR; } + Tcl_DecrRefCount(arg); } else { - if (specPtr->defValue != NULL) { - value = Tk_GetUid(specPtr->defValue); - } else { - value = NULL; - } - if ((value != NULL) && !(specPtr->specFlags + if ((specPtr->defValue != NULL) && !(specPtr->specFlags & TK_CONFIG_DONT_SET_DEFAULT)) { - if (DoConfig(interp, tkwin, specPtr, value, 1, widgRec) != + Tcl_Obj *arg = Tcl_NewStringObj(specPtr->defValue, TCL_INDEX_NONE); + Tcl_IncrRefCount(arg); + if (DoConfig(interp, tkwin, specPtr, arg, widgRec) != TCL_OK) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (%s \"%.50s\" in widget \"%.50s\")", "default value for", specPtr->dbName, Tk_PathName(tkwin))); + Tcl_DecrRefCount(arg); return TCL_ERROR; } + Tcl_DecrRefCount(arg); } } } @@ -332,21 +334,24 @@ DoConfig( Tk_Window tkwin, /* Window containing widget (needed to set up * X resources). */ Tk_ConfigSpec *specPtr, /* Specifier to apply. */ - Tk_Uid value, /* Value to use to fill in widgRec. */ - int valueIsUid, /* Non-zero means value is a Tk_Uid; zero - * means it's an ordinary string. */ + Tcl_Obj *arg, /* Value to use to fill in widgRec. */ void *widgRec) /* Record whose fields are to be modified. * Values must be properly initialized. */ { void *ptr; - Tk_Uid uid; - int nullValue; + int nullValue = 0; + const char *value = Tcl_GetString(arg); - nullValue = 0; if ((*value == 0) && (specPtr->specFlags & (TK_CONFIG_NULL_OK|TCL_NULL_OK|1))) { nullValue = 1; } + if ((specPtr->specFlags & TK_CONFIG_OBJS) && (specPtr->type != TK_CONFIG_STRING) + && (specPtr->type != TK_CONFIG_PIXELS)) { + /* Prevent surprises for other options than TK_CONFIG_(STRING|PIXELS) */ + Tcl_AppendResult(interp, "TK_CONFIG_OBJS not supported", (char *)NULL); + return TCL_ERROR; + } do { if (specPtr->offset < 0) { break; @@ -354,17 +359,17 @@ DoConfig( ptr = (char *)widgRec + specPtr->offset; switch (specPtr->type) { case TK_CONFIG_BOOLEAN: - if (Tcl_GetBoolean(interp, value, (int *)ptr) != TCL_OK) { + if (Tcl_GetBooleanFromObj(interp, arg, (int *)ptr) != TCL_OK) { return TCL_ERROR; } break; case TK_CONFIG_INT: - if (Tcl_GetInt(interp, value, (int *)ptr) != TCL_OK) { + if (Tcl_GetIntFromObj(interp, arg, (int *)ptr) != TCL_OK) { return TCL_ERROR; } break; case TK_CONFIG_DOUBLE: - if (Tcl_GetDouble(interp, value, (double *)ptr) != TCL_OK) { + if (Tcl_GetDoubleFromObj(interp, arg, (double *)ptr) != TCL_OK) { return TCL_ERROR; } break; @@ -373,23 +378,29 @@ DoConfig( if (nullValue) { newStr = NULL; + } else if (specPtr->specFlags & TK_CONFIG_OBJS) { + Tcl_IncrRefCount(arg); + newStr = (char *)arg; } else { newStr = (char *)ckalloc(strlen(value) + 1); strcpy(newStr, value); } - oldStr = *((char **) ptr); + oldStr = *((char **)ptr); if (oldStr != NULL) { - ckfree(oldStr); + if (specPtr->specFlags & TK_CONFIG_OBJS) { + Tcl_DecrRefCount((Tcl_Obj *)oldStr); + } else { + ckfree(oldStr); + } } - *((char **) ptr) = newStr; + *((char **)ptr) = newStr; break; } case TK_CONFIG_UID: if (nullValue) { - *((Tk_Uid *) ptr) = NULL; + *((Tk_Uid *)ptr) = NULL; } else { - uid = valueIsUid ? (Tk_Uid) value : Tk_GetUid(value); - *((Tk_Uid *) ptr) = uid; + *((Tk_Uid *)ptr) = Tk_GetUid(value); } break; case TK_CONFIG_COLOR: { @@ -398,17 +409,16 @@ DoConfig( if (nullValue) { newPtr = NULL; } else { - uid = valueIsUid ? (Tk_Uid) value : Tk_GetUid(value); - newPtr = Tk_GetColor(interp, tkwin, uid); + newPtr = Tk_AllocColorFromObj(interp, tkwin, arg); if (newPtr == NULL) { return TCL_ERROR; } } - oldPtr = *((XColor **) ptr); + oldPtr = *((XColor **)ptr); if (oldPtr != NULL) { Tk_FreeColor(oldPtr); } - *((XColor **) ptr) = newPtr; + *((XColor **)ptr) = newPtr; break; } case TK_CONFIG_FONT: { @@ -417,13 +427,13 @@ DoConfig( if (nullValue) { newFont = NULL; } else { - newFont = Tk_GetFont(interp, tkwin, value); + newFont = Tk_AllocFontFromObj(interp, tkwin, arg); if (newFont == NULL) { return TCL_ERROR; } } - Tk_FreeFont(*((Tk_Font *) ptr)); - *((Tk_Font *) ptr) = newFont; + Tk_FreeFont(*((Tk_Font *)ptr)); + *((Tk_Font *)ptr) = newFont; break; } case TK_CONFIG_BITMAP: { @@ -432,17 +442,16 @@ DoConfig( if (nullValue) { newBmp = None; } else { - uid = valueIsUid ? (Tk_Uid) value : Tk_GetUid(value); - newBmp = Tk_GetBitmap(interp, tkwin, uid); + newBmp = Tk_AllocBitmapFromObj(interp, tkwin, arg); if (newBmp == None) { return TCL_ERROR; } } - oldBmp = *((Pixmap *) ptr); + oldBmp = *((Pixmap *)ptr); if (oldBmp != None) { Tk_FreeBitmap(Tk_Display(tkwin), oldBmp); } - *((Pixmap *) ptr) = newBmp; + *((Pixmap *)ptr) = newBmp; break; } case TK_CONFIG_BORDER: { @@ -451,22 +460,20 @@ DoConfig( if (nullValue) { newBorder = NULL; } else { - uid = valueIsUid ? (Tk_Uid) value : Tk_GetUid(value); - newBorder = Tk_Get3DBorder(interp, tkwin, uid); + newBorder = Tk_Alloc3DBorderFromObj(interp, tkwin, arg); if (newBorder == NULL) { return TCL_ERROR; } } - oldBorder = *((Tk_3DBorder *) ptr); + oldBorder = *((Tk_3DBorder *)ptr); if (oldBorder != NULL) { Tk_Free3DBorder(oldBorder); } - *((Tk_3DBorder *) ptr) = newBorder; + *((Tk_3DBorder *)ptr) = newBorder; break; } case TK_CONFIG_RELIEF: - uid = valueIsUid ? (Tk_Uid) value : Tk_GetUid(value); - if (Tk_GetRelief(interp, uid, (int *)ptr) != TCL_OK) { + if (Tk_GetReliefFromObj(interp, arg, (int *)ptr) != TCL_OK) { return TCL_ERROR; } break; @@ -477,50 +484,62 @@ DoConfig( if (nullValue) { newCursor = NULL; } else { - uid = valueIsUid ? (Tk_Uid) value : Tk_GetUid(value); - newCursor = Tk_GetCursor(interp, tkwin, uid); + newCursor = Tk_AllocCursorFromObj(interp, tkwin, arg); if (newCursor == NULL) { return TCL_ERROR; } } - oldCursor = *((Tk_Cursor *) ptr); + oldCursor = *((Tk_Cursor *)ptr); if (oldCursor != NULL) { Tk_FreeCursor(Tk_Display(tkwin), oldCursor); } - *((Tk_Cursor *) ptr) = newCursor; + *((Tk_Cursor *)ptr) = newCursor; if (specPtr->type == TK_CONFIG_ACTIVE_CURSOR) { Tk_DefineCursor(tkwin, newCursor); } break; } case TK_CONFIG_JUSTIFY: - uid = valueIsUid ? (Tk_Uid) value : Tk_GetUid(value); - if (Tk_GetJustify(interp, uid, (Tk_Justify *) ptr) != TCL_OK) { + if (Tk_GetJustifyFromObj(interp, arg, (Tk_Justify *)ptr) != TCL_OK) { return TCL_ERROR; } break; case TK_CONFIG_ANCHOR: - uid = valueIsUid ? (Tk_Uid) value : Tk_GetUid(value); - if (Tk_GetAnchor(interp, uid, (Tk_Anchor *) ptr) != TCL_OK) { + if (Tk_GetAnchorFromObj(interp, arg, (Tk_Anchor *)ptr) != TCL_OK) { return TCL_ERROR; } break; case TK_CONFIG_CAP_STYLE: - uid = valueIsUid ? (Tk_Uid) value : Tk_GetUid(value); - if (Tk_GetCapStyle(interp, uid, (int *)ptr) != TCL_OK) { + if (Tk_GetCapStyle(interp, value, (int *)ptr) != TCL_OK) { return TCL_ERROR; } break; case TK_CONFIG_JOIN_STYLE: - uid = valueIsUid ? (Tk_Uid) value : Tk_GetUid(value); - if (Tk_GetJoinStyle(interp, uid, (int *)ptr) != TCL_OK) { + if (Tk_GetJoinStyle(interp, value, (int *)ptr) != TCL_OK) { return TCL_ERROR; } break; case TK_CONFIG_PIXELS: - if (nullValue) { + if (specPtr->specFlags & TK_CONFIG_OBJS) { + int dummy; + if (nullValue) { + if (*(Tcl_Obj **)ptr != NULL) { + Tcl_DecrRefCount(*(Tcl_Obj **)ptr); + *(Tcl_Obj **)ptr = NULL; + } + } else if (Tk_GetPixelsFromObj(interp, tkwin, arg, &dummy) + != TCL_OK) { + return TCL_ERROR; + } else { + Tcl_IncrRefCount(arg); + if (*(Tcl_Obj **)ptr != NULL) { + Tcl_DecrRefCount(*(Tcl_Obj **)ptr); + } + *(Tcl_Obj **)ptr = arg; + } + } else if (nullValue) { *(int *)ptr = INT_MIN; - } else if (Tk_GetPixels(interp, tkwin, value, (int *)ptr) + } else if (Tk_GetPixelsFromObj(interp, tkwin, arg, (int *)ptr) != TCL_OK) { return TCL_ERROR; } @@ -541,7 +560,7 @@ DoConfig( return TCL_ERROR; } } - *((Tk_Window *) ptr) = tkwin2; + *((Tk_Window *)ptr) = tkwin2; break; } case TK_CONFIG_CUSTOM: @@ -772,6 +791,12 @@ FormatConfigValue( } ptr = (char *)widgRec + specPtr->offset; result = ""; + if (specPtr->specFlags & TK_CONFIG_OBJS) { + if (*(Tcl_Obj **)ptr != NULL) { + result = Tcl_GetString(*(Tcl_Obj **)ptr); + } + return result; + } switch (specPtr->type) { case TK_CONFIG_BOOLEAN: if (*((int *)ptr) == 0) { @@ -789,7 +814,7 @@ FormatConfigValue( result = buffer; break; case TK_CONFIG_STRING: - result = (*(char **)ptr); + result = *(char **)ptr; if (result == NULL) { result = ""; } @@ -997,40 +1022,45 @@ Tk_FreeOptions( continue; } ptr = (char *)widgRec + specPtr->offset; + if ((specPtr->specFlags & TK_CONFIG_OBJS) && (*(Tcl_Obj **)ptr != NULL)) { + Tcl_DecrRefCount(*(Tcl_Obj **)ptr); + *(Tcl_Obj **)ptr = NULL; + continue; + } switch (specPtr->type) { case TK_CONFIG_STRING: - if (*((char **) ptr) != NULL) { - ckfree(*((char **) ptr)); - *((char **) ptr) = NULL; + if (*((char **)ptr) != NULL) { + ckfree(*((char **)ptr)); + *((char **)ptr) = NULL; } break; case TK_CONFIG_COLOR: - if (*((XColor **) ptr) != NULL) { - Tk_FreeColor(*((XColor **) ptr)); - *((XColor **) ptr) = NULL; + if (*((XColor **)ptr) != NULL) { + Tk_FreeColor(*((XColor **)ptr)); + *((XColor **)ptr) = NULL; } break; case TK_CONFIG_FONT: - Tk_FreeFont(*((Tk_Font *) ptr)); - *((Tk_Font *) ptr) = NULL; + Tk_FreeFont(*((Tk_Font *)ptr)); + *((Tk_Font *)ptr) = NULL; break; case TK_CONFIG_BITMAP: - if (*((Pixmap *) ptr) != None) { - Tk_FreeBitmap(display, *((Pixmap *) ptr)); - *((Pixmap *) ptr) = None; + if (*((Pixmap *)ptr) != None) { + Tk_FreeBitmap(display, *((Pixmap *)ptr)); + *((Pixmap *)ptr) = None; } break; case TK_CONFIG_BORDER: - if (*((Tk_3DBorder *) ptr) != NULL) { - Tk_Free3DBorder(*((Tk_3DBorder *) ptr)); - *((Tk_3DBorder *) ptr) = NULL; + if (*((Tk_3DBorder *)ptr) != NULL) { + Tk_Free3DBorder(*((Tk_3DBorder *)ptr)); + *((Tk_3DBorder *)ptr) = NULL; } break; case TK_CONFIG_CURSOR: case TK_CONFIG_ACTIVE_CURSOR: - if (*((Tk_Cursor *) ptr) != NULL) { - Tk_FreeCursor(display, *((Tk_Cursor *) ptr)); - *((Tk_Cursor *) ptr) = NULL; + if (*((Tk_Cursor *)ptr) != NULL) { + Tk_FreeCursor(display, *((Tk_Cursor *)ptr)); + *((Tk_Cursor *)ptr) = NULL; } } } diff --git a/generic/tkPack.c b/generic/tkPack.c index 727e37a..63e03a3 100644 --- a/generic/tkPack.c +++ b/generic/tkPack.c @@ -246,7 +246,9 @@ Tk_PackObjCmd( if (TkGetWindowFromObj(interp, tkwin, objv[i], &content) != TCL_OK) { continue; } - contentPtr = GetPacker(content); + if (!(contentPtr = GetPacker(content))) { + continue; + } if ((contentPtr != NULL) && (contentPtr->containerPtr != NULL)) { Tk_ManageGeometry(content, NULL, NULL); if (contentPtr->containerPtr->tkwin != Tk_Parent(contentPtr->tkwin)) { @@ -271,7 +273,9 @@ Tk_PackObjCmd( if (TkGetWindowFromObj(interp, tkwin, objv[2], &content) != TCL_OK) { return TCL_ERROR; } - contentPtr = GetPacker(content); + if (!(contentPtr = GetPacker(content))) { + return TCL_OK; + } if (contentPtr->containerPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "window \"%s\" isn't packed", argv2)); @@ -325,7 +329,9 @@ Tk_PackObjCmd( if (TkGetWindowFromObj(interp, tkwin, objv[2], &container) != TCL_OK) { return TCL_ERROR; } - containerPtr = GetPacker(container); + if (!(containerPtr = GetPacker(container))) { + return TCL_OK; + } if (objc == 3) { Tcl_SetObjResult(interp, Tcl_NewBooleanObj(!(containerPtr->flags & DONT_PROPAGATE))); @@ -382,7 +388,9 @@ Tk_PackObjCmd( return TCL_ERROR; } resultObj = Tcl_NewObj(); - containerPtr = GetPacker(container); + if (!(containerPtr = GetPacker(container))) { + return TCL_OK; + } for (contentPtr = containerPtr->contentPtr; contentPtr != NULL; contentPtr = contentPtr->nextPtr) { Tcl_ListObjAppendElement(NULL, resultObj, @@ -919,11 +927,12 @@ YExpansion( * GetPacker -- * * This internal function is used to locate a Packer structure for a - * given window, creating one if one doesn't exist already. + * window, creating one if one doesn't exist already, except if the window + * is already dead. * * Results: * The return value is a pointer to the Packer structure corresponding to - * tkwin. + * tkwin, or NULL when tkwin is already dead. * * Side effects: * A new packer structure may be created. If so, then a callback is set @@ -942,6 +951,10 @@ GetPacker( int isNew; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; + if (((TkWindow *) tkwin)->flags & TK_ALREADY_DEAD) { + return NULL; + } + if (!dispPtr->packInit) { dispPtr->packInit = 1; Tcl_InitHashTable(&dispPtr->packerHashTable, TCL_ONE_WORD_KEYS); @@ -1247,7 +1260,10 @@ ConfigureContent( Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "TOPLEVEL", NULL); return TCL_ERROR; } - contentPtr = GetPacker(content); + if (!(contentPtr = GetPacker(content))) { + continue; + } + contentPtr->flags &= ~OLD_STYLE; /* @@ -1285,7 +1301,9 @@ ConfigureContent( != TCL_OK) { return TCL_ERROR; } - prevPtr = GetPacker(other); + if (!(prevPtr = GetPacker(other))) { + continue; + } if (prevPtr->containerPtr == NULL) { notPacked: Tcl_SetObjResult(interp, Tcl_ObjPrintf( @@ -1311,7 +1329,9 @@ ConfigureContent( != TCL_OK) { return TCL_ERROR; } - otherPtr = GetPacker(other); + if (!(otherPtr = GetPacker(other))) { + continue; + } if (otherPtr->containerPtr == NULL) { goto notPacked; } @@ -1360,7 +1380,9 @@ ConfigureContent( != TCL_OK) { return TCL_ERROR; } - containerPtr = GetPacker(other); + if (!(containerPtr = GetPacker(other))) { + continue; + } prevPtr = containerPtr->contentPtr; if (prevPtr != NULL) { while (prevPtr->nextPtr != NULL) { @@ -1443,7 +1465,9 @@ ConfigureContent( */ if (!positionGiven) { - containerPtr = GetPacker(Tk_Parent(content)); + if (!(containerPtr = GetPacker(Tk_Parent(content)))) { + continue; + } prevPtr = containerPtr->contentPtr; if (prevPtr != NULL) { while (prevPtr->nextPtr != NULL) { diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index b5ca3b2..0a2c6f8 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -80,11 +80,11 @@ typedef struct { typedef struct Pane { Tk_Window tkwin; /* Window being managed. */ - int minSize; /* Minimum size of this pane, on the relevant + Tcl_Obj *minSizeObj; /* Minimum size of this pane, on the relevant * axis, in pixels. */ - int padx; /* Additional padding requested for pane, in + Tcl_Obj *padXObj; /* Additional padding requested for pane, in * the x dimension. */ - int pady; /* Additional padding requested for pane, in + Tcl_Obj *padYObj; /* Additional padding requested for pane, in * the y dimension. */ Tcl_Obj *widthObj, *heightObj; /* Tcl_Obj rep's of pane width/height, to @@ -106,6 +106,10 @@ typedef struct Pane { /* Paned window managing the window. */ Tk_Window after; /* Placeholder for parsing options. */ Tk_Window before; /* Placeholder for parsing options. */ +#ifdef BUILD_tk + int padX, padY; + int minSize; +#endif } Pane; /* @@ -155,6 +159,8 @@ typedef struct PanedWindow { int numPanes; /* Number of panes. */ int sizeofPanes; /* Number of elements in the panes array. */ int flags; /* Flags for widget; see below. */ + Tcl_Obj *borderWidthObj; + Tcl_Obj *handlePadPtr; } PanedWindow; /* @@ -279,13 +285,13 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_PANEDWINDOW_BORDERWIDTH, TCL_INDEX_NONE, offsetof(PanedWindow, borderWidth), + DEF_PANEDWINDOW_BORDERWIDTH, offsetof(PanedWindow, borderWidthObj), offsetof(PanedWindow, borderWidth), 0, 0, GEOMETRY}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_PANEDWINDOW_CURSOR, TCL_INDEX_NONE, offsetof(PanedWindow, cursor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-handlepad", "handlePad", "HandlePad", - DEF_PANEDWINDOW_HANDLEPAD, TCL_INDEX_NONE, offsetof(PanedWindow, handlePad), + DEF_PANEDWINDOW_HANDLEPAD, offsetof(PanedWindow, handlePadPtr), offsetof(PanedWindow, handlePad), 0, 0, GEOMETRY}, {TK_OPTION_PIXELS, "-handlesize", "handleSize", "HandleSize", DEF_PANEDWINDOW_HANDLESIZE, offsetof(PanedWindow, handleSizePtr), @@ -314,7 +320,7 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_PANEDWINDOW_SASHCURSOR, TCL_INDEX_NONE, offsetof(PanedWindow, sashCursor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-sashpad", "sashPad", "SashPad", - DEF_PANEDWINDOW_SASHPAD, TCL_INDEX_NONE, offsetof(PanedWindow, sashPad), + DEF_PANEDWINDOW_SASHPAD, offsetof(PanedWindow, sashPadPtr), offsetof(PanedWindow, sashPad), 0, 0, GEOMETRY}, {TK_OPTION_RELIEF, "-sashrelief", "sashRelief", "Relief", DEF_PANEDWINDOW_SASHRELIEF, TCL_INDEX_NONE, offsetof(PanedWindow, sashRelief), @@ -344,11 +350,11 @@ static const Tk_OptionSpec paneOptionSpecs[] = { {TK_OPTION_BOOLEAN, "-hide", "hide", "Hide", DEF_PANEDWINDOW_PANE_HIDE, TCL_INDEX_NONE, offsetof(Pane, hide), 0,0,GEOMETRY}, {TK_OPTION_PIXELS, "-minsize", NULL, NULL, - DEF_PANEDWINDOW_PANE_MINSIZE, TCL_INDEX_NONE, offsetof(Pane, minSize), 0, 0, 0}, + DEF_PANEDWINDOW_PANE_MINSIZE, offsetof(Pane, minSizeObj), offsetof(Pane, minSize), 0, 0, 0}, {TK_OPTION_PIXELS, "-padx", NULL, NULL, - DEF_PANEDWINDOW_PANE_PADX, TCL_INDEX_NONE, offsetof(Pane, padx), 0, 0, 0}, + DEF_PANEDWINDOW_PANE_PADX, offsetof(Pane, padXObj), offsetof(Pane, padX), 0, 0, 0}, {TK_OPTION_PIXELS, "-pady", NULL, NULL, - DEF_PANEDWINDOW_PANE_PADY, TCL_INDEX_NONE, offsetof(Pane, pady), 0, 0, 0}, + DEF_PANEDWINDOW_PANE_PADY, offsetof(Pane, padYObj), offsetof(Pane, padY), 0, 0, 0}, {TK_OPTION_CUSTOM, "-sticky", NULL, NULL, DEF_PANEDWINDOW_PANE_STICKY, TCL_INDEX_NONE, offsetof(Pane, sticky), 0, &stickyOption, 0}, @@ -799,7 +805,7 @@ ConfigurePanes( */ Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "can't add %s to itself", arg)); + "cannot add %s to itself", arg)); Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "SELF", (char *)NULL); return TCL_ERROR; } else if (Tk_IsTopLevel(tkwin)) { @@ -808,7 +814,7 @@ ConfigurePanes( */ Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "can't add toplevel %s to %s", arg, + "cannot add toplevel %s to %s", arg, Tk_PathName(pwPtr->tkwin))); Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "TOPLEVEL", (char *)NULL); return TCL_ERROR; @@ -825,7 +831,7 @@ ConfigurePanes( } if (Tk_IsTopLevel(ancestor)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "can't add %s to %s", arg, + "cannot add %s to %s", arg, Tk_PathName(pwPtr->tkwin))); Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "HIERARCHY", (char *)NULL); @@ -950,7 +956,7 @@ ConfigurePanes( /* * Make sure this pane wasn't already put into the inserts array, * i.e., when the user specifies the same window multiple times in a - * single add commaned. + * single add command. */ for (j = 0; j < insertIndex; j++) { if (inserts[j]->tkwin == tkwin) { @@ -1795,14 +1801,14 @@ ArrangePanes( } else { paneSize = panePtr->paneWidth; } - stretchReserve -= paneSize + (2 * panePtr->padx); + stretchReserve -= paneSize + (2 * panePtr->padX); } else { if (panePtr->height > 0) { paneSize = panePtr->height; } else { paneSize = panePtr->paneHeight; } - stretchReserve -= paneSize + (2 * panePtr->pady); + stretchReserve -= paneSize + (2 * panePtr->padY); } if (IsStretchable(panePtr->stretch,i,first,last) && Tk_IsMapped(pwPtr->tkwin)) { @@ -1900,9 +1906,9 @@ ArrangePanes( } if (horizontal) { paneWidth = paneSize; - paneHeight = pwHeight - (2 * panePtr->pady); + paneHeight = pwHeight - (2 * panePtr->padY); } else { - paneWidth = pwWidth - (2 * panePtr->padx); + paneWidth = pwWidth - (2 * panePtr->padX); paneHeight = paneSize; } @@ -1946,7 +1952,7 @@ ArrangePanes( */ if (horizontal) { - x += paneWidth + (2 * panePtr->padx); + x += paneWidth + (2 * panePtr->padX); if (x < internalBW) { x = internalBW; } @@ -1956,7 +1962,7 @@ ArrangePanes( panePtr->handley = y + pwPtr->handlePad; x += sashWidth; } else { - y += paneHeight + (2 * panePtr->pady); + y += paneHeight + (2 * panePtr->padY); if (y < internalBW) { y = internalBW; } @@ -1976,8 +1982,8 @@ ArrangePanes( AdjustForSticky(panePtr->sticky, paneWidth, paneHeight, &paneX, &paneY, &newPaneWidth, &newPaneHeight); - paneX += panePtr->padx; - paneY += panePtr->pady; + paneX += panePtr->padX; + paneY += panePtr->padY; /* * Now put the window in the proper spot. @@ -2259,14 +2265,14 @@ ComputeGeometry( */ if (horizontal) { - x += panePtr->paneWidth + (2 * panePtr->padx); + x += panePtr->paneWidth + (2 * panePtr->padX); panePtr->sashx = x + sashOffset; panePtr->sashy = y; panePtr->handlex = x + handleOffset; panePtr->handley = y + pwPtr->handlePad; x += sashWidth; } else { - y += panePtr->paneHeight + (2 * panePtr->pady); + y += panePtr->paneHeight + (2 * panePtr->padY); panePtr->sashx = x; panePtr->sashy = y + sashOffset; panePtr->handlex = x + pwPtr->handlePad; @@ -2291,7 +2297,7 @@ ComputeGeometry( doubleBw = 2 * Tk_Changes(panePtr->tkwin)->border_width; dim = Tk_ReqHeight(panePtr->tkwin) + doubleBw; } - dim += 2 * panePtr->pady; + dim += 2 * panePtr->padY; if (dim > reqHeight) { reqHeight = dim; } @@ -2307,7 +2313,7 @@ ComputeGeometry( doubleBw = 2 * Tk_Changes(panePtr->tkwin)->border_width; dim = Tk_ReqWidth(panePtr->tkwin) + doubleBw; } - dim += 2 * panePtr->padx; + dim += 2 * panePtr->padX; if (dim > reqWidth) { reqWidth = dim; } @@ -2636,10 +2642,10 @@ MoveSash( } if (horizontal) { panePtr->paneWidth = panePtr->width = panePtr->sashx - - sashOffset - panePtr->x - (2 * panePtr->padx); + - sashOffset - panePtr->x - (2 * panePtr->padX); } else { panePtr->paneHeight = panePtr->height = panePtr->sashy - - sashOffset - panePtr->y - (2 * panePtr->pady); + - sashOffset - panePtr->y - (2 * panePtr->padY); } } diff --git a/generic/tkPointer.c b/generic/tkPointer.c index 2fbdedf..b77abbe 100644 --- a/generic/tkPointer.c +++ b/generic/tkPointer.c @@ -181,7 +181,7 @@ GenerateEnterLeave( */ InitializeEvent(&event, targetPtr, LeaveNotify, x, y, state, - NotifyNormal); + NotifyAncestor); TkInOutEvents(&event, lastWinPtr, winPtr, LeaveNotify, EnterNotify, TCL_QUEUE_TAIL); @@ -386,7 +386,7 @@ Tk_UpdatePointer( if (targetWinPtr != NULL) { InitializeEvent(&event, targetWinPtr, MotionNotify, x, y, - tsdPtr->lastState, NotifyNormal); + tsdPtr->lastState, NotifyAncestor); Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL); } tsdPtr->lastPos = pos; @@ -416,23 +416,16 @@ int XGrabPointer( Display *display, Window grab_window, - Bool owner_events, - unsigned int event_mask, - int pointer_mode, - int keyboard_mode, - Window confine_to, - Cursor cursor, - Time time) + TCL_UNUSED(Bool), /* owner_events */ + TCL_UNUSED(unsigned int), /* event_mask */ + TCL_UNUSED(int), /* pointer_mode */ + TCL_UNUSED(int), /* keyboard_mode */ + TCL_UNUSED(Window), /* confine_to */ + TCL_UNUSED(Cursor), /* cursor */ + TCL_UNUSED(Time)) /* time */ { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - (void)owner_events; - (void)event_mask; - (void)pointer_mode; - (void)keyboard_mode; - (void)confine_to; - (void)cursor; - (void)time; LastKnownRequestProcessed(display)++; tsdPtr->grabWinPtr = (TkWindow *) Tk_IdToWindow(display, grab_window); @@ -464,11 +457,10 @@ XGrabPointer( int XUngrabPointer( Display *display, - Time time) + TCL_UNUSED(Time)) /* time */ { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - (void)time; LastKnownRequestProcessed(display)++; tsdPtr->grabWinPtr = NULL; @@ -512,14 +504,14 @@ TkPointerDeadWindow( } if (!(tsdPtr->restrictWinPtr || tsdPtr->grabWinPtr)) { - /* - * Release mouse capture only if the dead window is the capturing - * window. - */ + /* + * Release mouse capture only if the dead window is the capturing + * window. + */ - if (winPtr == (TkWindow *)TkpGetCapture()) { + if (winPtr == (TkWindow *)TkpGetCapture()) { TkpSetCapture(NULL); - } + } } } @@ -588,12 +580,11 @@ int XDefineCursor( Display *display, Window w, - Cursor cursor) + TCL_UNUSED(Cursor)) /* cursor */ { TkWindow *winPtr = (TkWindow *) Tk_IdToWindow(display, w); ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - (void)cursor; if (tsdPtr->cursorWinPtr == winPtr) { UpdateCursor(winPtr); diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c index 2bbfce8..8f2e385 100644 --- a/generic/tkRectOval.c +++ b/generic/tkRectOval.c @@ -79,8 +79,8 @@ static const Tk_ConfigSpec configSpecs[] = { NULL, offsetof(RectOvalItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, - "0", offsetof(RectOvalItem, outline.offset), - TK_CONFIG_DONT_SET_DEFAULT, NULL}, + "0", offsetof(RectOvalItem, outline.offsetObj), + TK_CONFIG_OBJS, NULL}, {TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL, NULL, offsetof(RectOvalItem, outline.disabledDash), TK_CONFIG_NULL_OK, &dashOption}, @@ -765,101 +765,101 @@ DisplayRectOval( &x2, &y2); if (x2 == x1) { - /* - * The width of the bounding box corresponds to less than one pixel - * on screen. Adjustment is needed to avoid drawing attempts with zero - * width items (which would draw nothing). The bounding box spans - * either 1 or 2 pixels. Select which pixel will be drawn. - */ - - short ix1 = (short) (rectOvalPtr->bbox[0]); - short ix2 = (short) (rectOvalPtr->bbox[2]); - - if (ix1 == ix2) { - - /* - * x1 and x2 are "within the same pixel". Use this pixel. - * Note: the degenerated case (bbox[0]==bbox[2]) of a completely - * flat box results in arbitrary selection of the pixel at the - * right (with positive coordinate) or left (with negative - * coordinate) of the box. There is no "best choice" here. - */ - - if (ix1 > 0) { - x2 += 1; - } else { - x1 -= 1; - } - } else { - - /* - * (x1,x2) span two pixels. Select the one with the larger - * covered "area". - */ - - if (ix1 > 0) { - if ((rectOvalPtr->bbox[2] - ix2) > (ix2 - rectOvalPtr->bbox[0])) { - x2 += 1; - } else { - x1 -= 1; - } - } else { - if ((rectOvalPtr->bbox[2] - ix1) > (ix1 - rectOvalPtr->bbox[0])) { - x2 += 1; - } else { - x1 -= 1; - } - } - } + /* + * The width of the bounding box corresponds to less than one pixel + * on screen. Adjustment is needed to avoid drawing attempts with zero + * width items (which would draw nothing). The bounding box spans + * either 1 or 2 pixels. Select which pixel will be drawn. + */ + + short ix1 = (short) (rectOvalPtr->bbox[0]); + short ix2 = (short) (rectOvalPtr->bbox[2]); + + if (ix1 == ix2) { + + /* + * x1 and x2 are "within the same pixel". Use this pixel. + * Note: the degenerated case (bbox[0]==bbox[2]) of a completely + * flat box results in arbitrary selection of the pixel at the + * right (with positive coordinate) or left (with negative + * coordinate) of the box. There is no "best choice" here. + */ + + if (ix1 > 0) { + x2 += 1; + } else { + x1 -= 1; + } + } else { + + /* + * (x1,x2) span two pixels. Select the one with the larger + * covered "area". + */ + + if (ix1 > 0) { + if ((rectOvalPtr->bbox[2] - ix2) > (ix2 - rectOvalPtr->bbox[0])) { + x2 += 1; + } else { + x1 -= 1; + } + } else { + if ((rectOvalPtr->bbox[2] - ix1) > (ix1 - rectOvalPtr->bbox[0])) { + x2 += 1; + } else { + x1 -= 1; + } + } + } } if (y2 == y1) { - /* - * The height of the bounding box corresponds to less than one pixel - * on screen. Adjustment is needed to avoid drawing attempts with zero - * height items (which would draw nothing). The bounding box spans - * either 1 or 2 pixels. Select which pixel will be drawn. - */ - - short iy1 = (short) (rectOvalPtr->bbox[1]); - short iy2 = (short) (rectOvalPtr->bbox[3]); - - if (iy1 == iy2) { - - /* - * y1 and y2 are "within the same pixel". Use this pixel. - * Note: the degenerated case (bbox[1]==bbox[3]) of a completely - * flat box results in arbitrary selection of the pixel below - * (with positive coordinate) or above (with negative coordinate) - * the box. There is no "best choice" here. - */ - - if (iy1 > 0) { - y2 += 1; - } else { - y1 -= 1; - } - } else { - - /* - * (y1,y2) span two pixels. Select the one with the larger - * covered "area". - */ - - if (iy1 > 0) { - if ((rectOvalPtr->bbox[3] - iy2) > (iy2 - rectOvalPtr->bbox[1])) { - y2 += 1; - } else { - y1 -= 1; - } - } else { - if ((rectOvalPtr->bbox[3] - iy1) > (iy1 - rectOvalPtr->bbox[1])) { - y2 += 1; - } else { - y1 -= 1; - } - } - } + /* + * The height of the bounding box corresponds to less than one pixel + * on screen. Adjustment is needed to avoid drawing attempts with zero + * height items (which would draw nothing). The bounding box spans + * either 1 or 2 pixels. Select which pixel will be drawn. + */ + + short iy1 = (short) (rectOvalPtr->bbox[1]); + short iy2 = (short) (rectOvalPtr->bbox[3]); + + if (iy1 == iy2) { + + /* + * y1 and y2 are "within the same pixel". Use this pixel. + * Note: the degenerated case (bbox[1]==bbox[3]) of a completely + * flat box results in arbitrary selection of the pixel below + * (with positive coordinate) or above (with negative coordinate) + * the box. There is no "best choice" here. + */ + + if (iy1 > 0) { + y2 += 1; + } else { + y1 -= 1; + } + } else { + + /* + * (y1,y2) span two pixels. Select the one with the larger + * covered "area". + */ + + if (iy1 > 0) { + if ((rectOvalPtr->bbox[3] - iy2) > (iy2 - rectOvalPtr->bbox[1])) { + y2 += 1; + } else { + y1 -= 1; + } + } else { + if ((rectOvalPtr->bbox[3] - iy1) > (iy1 - rectOvalPtr->bbox[1])) { + y2 += 1; + } else { + y1 -= 1; + } + } + } } /* diff --git a/generic/tkScale.c b/generic/tkScale.c index af6d108..e6aa7c7 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -49,10 +49,10 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_SCALE_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(TkScale, borderWidth), + DEF_SCALE_BORDER_WIDTH, offsetof(TkScale, borderWidthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-command", "command", "Command", - DEF_SCALE_COMMAND, TCL_INDEX_NONE, offsetof(TkScale, command), + DEF_SCALE_COMMAND, offsetof(TkScale, commandObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_SCALE_CURSOR, TCL_INDEX_NONE, offsetof(TkScale, cursor), @@ -77,13 +77,13 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_SCALE_HIGHLIGHT, TCL_INDEX_NONE, offsetof(TkScale, highlightColorPtr), 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", - "HighlightThickness", DEF_SCALE_HIGHLIGHT_WIDTH, TCL_INDEX_NONE, - offsetof(TkScale, highlightWidth), 0, 0, 0}, + "HighlightThickness", DEF_SCALE_HIGHLIGHT_WIDTH, offsetof(TkScale, highlightWidthObj), + TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-label", "label", "Label", - DEF_SCALE_LABEL, TCL_INDEX_NONE, offsetof(TkScale, label), + DEF_SCALE_LABEL, offsetof(TkScale, labelObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-length", "length", "Length", - DEF_SCALE_LENGTH, TCL_INDEX_NONE, offsetof(TkScale, length), 0, 0, 0}, + DEF_SCALE_LENGTH, offsetof(TkScale, lengthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", DEF_SCALE_ORIENT, TCL_INDEX_NONE, offsetof(TkScale, orient), TK_OPTION_ENUM_VAR, orientStrings, 0}, @@ -102,7 +102,7 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_SCALE_SHOW_VALUE, TCL_INDEX_NONE, offsetof(TkScale, showValue), 0, 0, 0}, {TK_OPTION_PIXELS, "-sliderlength", "sliderLength", "SliderLength", - DEF_SCALE_SLIDER_LENGTH, TCL_INDEX_NONE, offsetof(TkScale, sliderLength), + DEF_SCALE_SLIDER_LENGTH, offsetof(TkScale, sliderLengthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_RELIEF, "-sliderrelief", "sliderRelief", "SliderRelief", DEF_SCALE_SLIDER_RELIEF, TCL_INDEX_NONE, offsetof(TkScale, sliderRelief), @@ -125,7 +125,7 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_SCALE_VARIABLE, offsetof(TkScale, varNamePtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-width", "width", "Width", - DEF_SCALE_WIDTH, TCL_INDEX_NONE, offsetof(TkScale, width), 0, 0, 0}, + DEF_SCALE_WIDTH, offsetof(TkScale, widthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, 0, 0} }; @@ -281,8 +281,8 @@ Tk_ScaleObjCmd( scalePtr, ScaleCmdDeletedProc); scalePtr->optionTable = optionTable; scalePtr->orient = ORIENT_VERTICAL; - scalePtr->width = 0; - scalePtr->length = 0; + scalePtr->widthObj = NULL; + scalePtr->lengthObj = NULL; scalePtr->value = 0.0; scalePtr->varNamePtr = NULL; scalePtr->fromValue = 0.0; @@ -291,13 +291,12 @@ Tk_ScaleObjCmd( scalePtr->resolution = 1.0; scalePtr->digits = 0; scalePtr->bigIncrement = 0.0; - scalePtr->command = NULL; + scalePtr->commandObj = NULL; scalePtr->repeatDelay = 0; scalePtr->repeatInterval = 0; - scalePtr->label = NULL; - scalePtr->labelLength = 0; + scalePtr->labelObj = NULL; scalePtr->state = STATE_NORMAL; - scalePtr->borderWidth = 0; + scalePtr->borderWidthObj = NULL; scalePtr->bgBorder = NULL; scalePtr->activeBorder = NULL; scalePtr->sliderRelief = TK_RELIEF_RAISED; @@ -308,11 +307,11 @@ Tk_ScaleObjCmd( scalePtr->textColorPtr = NULL; scalePtr->textGC = NULL; scalePtr->relief = TK_RELIEF_FLAT; - scalePtr->highlightWidth = 0; + scalePtr->highlightWidthObj = NULL; scalePtr->highlightBorder = NULL; scalePtr->highlightColorPtr = NULL; scalePtr->inset = 0; - scalePtr->sliderLength = 0; + scalePtr->sliderLengthObj = NULL; scalePtr->showValue = 0; scalePtr->horizLabelY = 0; scalePtr->horizValueY = 0; @@ -327,6 +326,8 @@ Tk_ScaleObjCmd( scalePtr->takeFocusPtr = NULL; scalePtr->flags = NEVER_SET; + + Tk_SetClassProcs(scalePtr->tkwin, &scaleClass, scalePtr); Tk_CreateEventHandler(scalePtr->tkwin, ExposureMask|StructureNotifyMask|FocusChangeMask, @@ -416,7 +417,7 @@ ScaleWidgetObjCmd( } break; case COMMAND_COORDS: { - int x, y; + int x, y, width, borderWidth; double value; Tcl_Obj *coords[2]; @@ -431,14 +432,16 @@ ScaleWidgetObjCmd( } else { value = scalePtr->value; } + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->widthObj, &width); + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->borderWidthObj, &borderWidth); if (scalePtr->orient == ORIENT_VERTICAL) { - x = scalePtr->vertTroughX + scalePtr->width/2 - + scalePtr->borderWidth; + x = scalePtr->vertTroughX + width/2 + + borderWidth; y = TkScaleValueToPixel(scalePtr, value); } else { x = TkScaleValueToPixel(scalePtr, value); - y = scalePtr->horizTroughY + scalePtr->width/2 - + scalePtr->borderWidth; + y = scalePtr->horizTroughY + width/2 + + borderWidth; } coords[0] = Tcl_NewWideIntObj(x); coords[1] = Tcl_NewWideIntObj(y); @@ -595,7 +598,7 @@ ConfigureScale( { Tk_SavedOptions savedOptions; Tcl_Obj *errorResult = NULL; - int error; + int error, highlightWidth, borderWidth; double varValue; /* @@ -647,10 +650,10 @@ ConfigureScale( } } - /* - * The fromValue shall not be rounded to the resolution, but the - * toValue and tickInterval do. - */ + /* + * The fromValue shall not be rounded to the resolution, but the + * toValue and tickInterval do. + */ scalePtr->toValue = TkRoundValueToResolution(scalePtr, scalePtr->toValue); scalePtr->tickInterval = TkRoundIntervalToResolution(scalePtr, @@ -669,14 +672,19 @@ ConfigureScale( ComputeFormat(scalePtr, 0); ComputeFormat(scalePtr, 1); - scalePtr->labelLength = scalePtr->label ? strlen(scalePtr->label) : 0; - Tk_SetBackgroundFromBorder(scalePtr->tkwin, scalePtr->bgBorder); - if (scalePtr->highlightWidth < 0) { - scalePtr->highlightWidth = 0; + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->highlightWidthObj, &highlightWidth); + if (highlightWidth < 0) { + highlightWidth = 0; + if (scalePtr->highlightWidthObj) { + Tcl_DecrRefCount(scalePtr->highlightWidthObj); + } + scalePtr->highlightWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(scalePtr->highlightWidthObj); } - scalePtr->inset = scalePtr->highlightWidth + scalePtr->borderWidth; + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->borderWidthObj, &borderWidth); + scalePtr->inset = highlightWidth + borderWidth; break; } if (!error) { @@ -712,9 +720,9 @@ ConfigureScale( } else { char varString[TCL_DOUBLE_SPACE], scaleString[TCL_DOUBLE_SPACE]; - Tcl_PrintDouble(NULL, varValue, varString); - Tcl_PrintDouble(NULL, scalePtr->value, scaleString); - if (strcmp(varString, scaleString)) { + Tcl_PrintDouble(NULL, varValue, varString); + Tcl_PrintDouble(NULL, scalePtr->value, scaleString); + if (strcmp(varString, scaleString)) { ScaleSetVariable(scalePtr); } } @@ -757,6 +765,7 @@ ScaleWorldChanged( XGCValues gcValues; GC gc; TkScale *scalePtr = (TkScale *)instanceData; + int highlightWidth, borderWidth; gcValues.foreground = scalePtr->troughColorPtr->pixel; gc = Tk_GetGC(scalePtr->tkwin, GCForeground, &gcValues); @@ -778,7 +787,9 @@ ScaleWorldChanged( scalePtr->copyGC = Tk_GetGC(scalePtr->tkwin, GCGraphicsExposures, &gcValues); } - scalePtr->inset = scalePtr->highlightWidth + scalePtr->borderWidth; + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->highlightWidthObj, &highlightWidth); + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->borderWidthObj, &borderWidth); + scalePtr->inset = highlightWidth + borderWidth; /* * Recompute display-related information, and let the geometry manager @@ -931,10 +942,12 @@ ComputeFormat( * value between adjacent pixels and use it for the least * significant digit. */ + int length; x = fabs(scalePtr->fromValue - scalePtr->toValue); - if (scalePtr->length > 0) { - x /= scalePtr->length; + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->lengthObj, &length); + if (length > 0) { + x /= length; } if (x > 0) { leastSigDigit = ScaleDigit(x); @@ -1011,6 +1024,7 @@ ComputeScaleGeometry( char valueString[TCL_DOUBLE_SPACE]; int tmp, valuePixels, tickPixels, x, y, extraSpace; Tk_FontMetrics fm; + int length, width, borderWidth; Tk_GetFontMetrics(scalePtr->tkfont, &fm); scalePtr->fontHeight = fm.linespace + SPACING; @@ -1024,7 +1038,7 @@ ComputeScaleGeometry( if (scalePtr->orient == ORIENT_HORIZONTAL) { y = scalePtr->inset; extraSpace = 0; - if (scalePtr->labelLength != 0) { + if (scalePtr->labelObj != NULL) { scalePtr->horizLabelY = y + SPACING; y += scalePtr->fontHeight; extraSpace = SPACING; @@ -1038,13 +1052,16 @@ ComputeScaleGeometry( } y += extraSpace; scalePtr->horizTroughY = y; - y += scalePtr->width + 2*scalePtr->borderWidth; + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->lengthObj, &length); + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->widthObj, &width); + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->borderWidthObj, &borderWidth); + y += width + 2 * borderWidth; if (scalePtr->tickInterval != 0) { scalePtr->horizTickY = y + SPACING; y += scalePtr->fontHeight + SPACING; } Tk_GeometryRequest(scalePtr->tkwin, - scalePtr->length + 2*scalePtr->inset, y + scalePtr->inset); + length + 2*scalePtr->inset, y + scalePtr->inset); Tk_SetInternalBorder(scalePtr->tkwin, scalePtr->inset); return; } @@ -1056,14 +1073,14 @@ ComputeScaleGeometry( */ if (snprintf(valueString, TCL_DOUBLE_SPACE, scalePtr->valueFormat, - scalePtr->fromValue) < 0) { - valueString[TCL_DOUBLE_SPACE - 1] = '\0'; + scalePtr->fromValue) < 0) { + valueString[TCL_DOUBLE_SPACE - 1] = '\0'; } valuePixels = Tk_TextWidth(scalePtr->tkfont, valueString, -1); if (snprintf(valueString, TCL_DOUBLE_SPACE, scalePtr->valueFormat, - scalePtr->toValue) < 0) { - valueString[TCL_DOUBLE_SPACE - 1] = '\0'; + scalePtr->toValue) < 0) { + valueString[TCL_DOUBLE_SPACE - 1] = '\0'; } tmp = Tk_TextWidth(scalePtr->tkfont, valueString, -1); if (valuePixels < tmp) { @@ -1075,14 +1092,14 @@ ComputeScaleGeometry( */ if (snprintf(valueString, TCL_DOUBLE_SPACE, scalePtr->tickFormat, - scalePtr->fromValue) < 0) { - valueString[TCL_DOUBLE_SPACE - 1] = '\0'; + scalePtr->fromValue) < 0) { + valueString[TCL_DOUBLE_SPACE - 1] = '\0'; } tickPixels = Tk_TextWidth(scalePtr->tkfont, valueString, -1); if (snprintf(valueString, TCL_DOUBLE_SPACE, scalePtr->tickFormat, - scalePtr->toValue) < 0) { - valueString[TCL_DOUBLE_SPACE - 1] = '\0'; + scalePtr->toValue) < 0) { + valueString[TCL_DOUBLE_SPACE - 1] = '\0'; } tmp = Tk_TextWidth(scalePtr->tkfont, valueString, -1); if (tickPixels < tmp) { @@ -1113,17 +1130,21 @@ ComputeScaleGeometry( scalePtr->vertValueRightX = x; } scalePtr->vertTroughX = x; - x += 2*scalePtr->borderWidth + scalePtr->width; - if (scalePtr->labelLength == 0) { + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->widthObj, &width); + x += 2 * borderWidth + width; + if (scalePtr->labelObj == NULL) { scalePtr->vertLabelX = 0; } else { + Tcl_Size labelLength; + const char *label= Tcl_GetStringFromObj(scalePtr->labelObj, &labelLength); scalePtr->vertLabelX = x + fm.ascent/2; x = scalePtr->vertLabelX + fm.ascent/2 - + Tk_TextWidth(scalePtr->tkfont, scalePtr->label, - scalePtr->labelLength); + + Tk_TextWidth(scalePtr->tkfont, label, labelLength); } + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->lengthObj, &length); Tk_GeometryRequest(scalePtr->tkwin, x + scalePtr->inset, - scalePtr->length + 2*scalePtr->inset); + length + 2*scalePtr->inset); Tk_SetInternalBorder(scalePtr->tkwin, scalePtr->inset); } @@ -1151,6 +1172,7 @@ ScaleEventProc( XEvent *eventPtr) /* Information about event. */ { TkScale *scalePtr = (TkScale *)clientData; + int highlightWidth; if ((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) { TkEventuallyRedrawScale(scalePtr, REDRAW_ALL); @@ -1162,14 +1184,16 @@ ScaleEventProc( } else if (eventPtr->type == FocusIn) { if (eventPtr->xfocus.detail != NotifyInferior) { scalePtr->flags |= GOT_FOCUS; - if (scalePtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { TkEventuallyRedrawScale(scalePtr, REDRAW_ALL); } } } else if (eventPtr->type == FocusOut) { if (eventPtr->xfocus.detail != NotifyInferior) { scalePtr->flags &= ~GOT_FOCUS; - if (scalePtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { TkEventuallyRedrawScale(scalePtr, REDRAW_ALL); } } @@ -1277,7 +1301,7 @@ TkRoundValueToResolution( double value) /* Value to round. */ { return TkRoundIntervalToResolution(scalePtr, value - scalePtr->fromValue) - + scalePtr->fromValue; + + scalePtr->fromValue; } double @@ -1294,13 +1318,13 @@ TkRoundIntervalToResolution( rounded = scalePtr->resolution * tick; rem = value - rounded; if (rem < 0) { - if (rem <= -scalePtr->resolution/2) { - rounded = (tick - 1.0) * scalePtr->resolution; - } + if (rem <= -scalePtr->resolution/2) { + rounded = (tick - 1.0) * scalePtr->resolution; + } } else { - if (rem >= scalePtr->resolution/2) { - rounded = (tick + 1.0) * scalePtr->resolution; - } + if (rem >= scalePtr->resolution/2) { + rounded = (tick + 1.0) * scalePtr->resolution; + } } return rounded; } @@ -1344,27 +1368,27 @@ ScaleVarProc( */ if (flags & TCL_TRACE_UNSETS) { - if (!Tcl_InterpDeleted(interp) && scalePtr->varNamePtr) { - void *probe = NULL; - - do { - probe = Tcl_VarTraceInfo(interp, - Tcl_GetString(scalePtr->varNamePtr), - TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, - ScaleVarProc, probe); - if (probe == (void *)scalePtr) { - break; - } - } while (probe); - if (probe) { - /* - * We were able to fetch the unset trace for our - * varNamePtr, which means it is not unset and not - * the cause of this unset trace. Instead some outdated - * former variable must be, and we should ignore it. - */ - return NULL; - } + if (!Tcl_InterpDeleted(interp) && scalePtr->varNamePtr) { + void *probe = NULL; + + do { + probe = Tcl_VarTraceInfo(interp, + Tcl_GetString(scalePtr->varNamePtr), + TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, + ScaleVarProc, probe); + if (probe == (void *)scalePtr) { + break; + } + } while (probe); + if (probe) { + /* + * We were able to fetch the unset trace for our + * varNamePtr, which means it is not unset and not + * the cause of this unset trace. Instead some outdated + * former variable must be, and we should ignore it. + */ + return NULL; + } Tcl_TraceVar2(interp, Tcl_GetString(scalePtr->varNamePtr), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, ScaleVarProc, clientData); @@ -1388,7 +1412,7 @@ ScaleVarProc( TCL_GLOBAL_ONLY); result = Tcl_GetDoubleFromObj(interp, valuePtr, &value); if (result != TCL_OK) { - resultStr = "can't assign non-numeric value to scale variable"; + resultStr = "cannot assign a non-numeric value to a scale variable"; ScaleSetVariable(scalePtr); } else { scalePtr->value = TkRoundValueToResolution(scalePtr, value); @@ -1457,7 +1481,7 @@ TkScaleSetValue( * configuring the widget -command option even if the value did not change. */ - if ((invokeCommand) && (scalePtr->command != NULL)) { + if ((invokeCommand) && (scalePtr->commandObj != NULL)) { scalePtr->flags |= INVOKE_COMMAND; } TkEventuallyRedrawScale(scalePtr, REDRAW_SLIDER); @@ -1490,10 +1514,10 @@ ScaleSetVariable( if (scalePtr->varNamePtr != NULL) { char string[TCL_DOUBLE_SPACE]; - if (snprintf(string, TCL_DOUBLE_SPACE, scalePtr->valueFormat, - scalePtr->value) < 0) { - string[TCL_DOUBLE_SPACE - 1] = '\0'; - } + if (snprintf(string, TCL_DOUBLE_SPACE, scalePtr->valueFormat, + scalePtr->value) < 0) { + string[TCL_DOUBLE_SPACE - 1] = '\0'; + } scalePtr->flags |= SETTING_VAR; Tcl_ObjSetVar2(scalePtr->interp, scalePtr->varNamePtr, NULL, Tcl_NewStringObj(string, TCL_INDEX_NONE), TCL_GLOBAL_ONLY); @@ -1525,14 +1549,17 @@ TkScalePixelToValue( int x, int y) /* Coordinates of point within window. */ { double value, pixelRange; + int borderWidth, sliderLength; + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->sliderLengthObj, &sliderLength); if (scalePtr->orient == ORIENT_VERTICAL) { - pixelRange = Tk_Height(scalePtr->tkwin) - scalePtr->sliderLength - - 2*scalePtr->inset - 2*scalePtr->borderWidth; + pixelRange = Tk_Height(scalePtr->tkwin) - sliderLength + - 2 * scalePtr->inset - 2 * borderWidth; value = y; } else { - pixelRange = Tk_Width(scalePtr->tkwin) - scalePtr->sliderLength - - 2*scalePtr->inset - 2*scalePtr->borderWidth; + pixelRange = Tk_Width(scalePtr->tkwin) - sliderLength + - 2 * scalePtr->inset - 2 * borderWidth; value = x; } @@ -1544,8 +1571,8 @@ TkScalePixelToValue( return scalePtr->value; } - value -= scalePtr->sliderLength/2 + scalePtr->inset - + scalePtr->borderWidth; + value -= sliderLength/2 + scalePtr->inset + + borderWidth; value /= pixelRange; if (value < 0) { value = 0; @@ -1584,11 +1611,14 @@ TkScaleValueToPixel( { int y, pixelRange; double valueRange; + int borderWidth, sliderLength; + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->sliderLengthObj, &sliderLength); valueRange = scalePtr->toValue - scalePtr->fromValue; pixelRange = ((scalePtr->orient == ORIENT_VERTICAL) ? Tk_Height(scalePtr->tkwin) : Tk_Width(scalePtr->tkwin)) - - scalePtr->sliderLength - 2*scalePtr->inset - 2*scalePtr->borderWidth; + - sliderLength - 2 * scalePtr->inset - 2 * borderWidth; if (valueRange == 0) { y = 0; } else { @@ -1600,7 +1630,7 @@ TkScaleValueToPixel( y = pixelRange; } } - y += scalePtr->sliderLength/2 + scalePtr->inset + scalePtr->borderWidth; + y += sliderLength / 2 + scalePtr->inset + borderWidth; return y; } diff --git a/generic/tkScale.h b/generic/tkScale.h index 7ecf1a1..d5a90f5 100644 --- a/generic/tkScale.h +++ b/generic/tkScale.h @@ -53,10 +53,14 @@ typedef struct TkScale { * available for this widget. */ enum orient orient; /* Orientation for window (vertical or * horizontal). */ - int width; /* Desired narrow dimension of scale, in +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *widthObj; /* Desired narrow dimension of scale, in * pixels. */ - int length; /* Desired long dimension of scale, in + Tcl_Obj *lengthObj; /* Desired long dimension of scale, in * pixels. */ +#else + int width, length; +#endif double value; /* Current value of scale. */ Tcl_Obj *varNamePtr; /* Name of variable or NULL. If non-NULL, * scale's value tracks the contents of this @@ -79,15 +83,14 @@ typedef struct TkScale { * tick interval. */ double bigIncrement; /* Amount to use for large increments to scale * value. (0 means we pick a value). */ - char *command; /* Command prefix to use when invoking Tcl + Tcl_Obj *commandObj; /* Command prefix to use when invoking Tcl * commands because the scale value changed. * NULL means don't invoke commands. */ int repeatDelay; /* How long to wait before auto-repeating on * scrolling actions (in ms). */ int repeatInterval; /* Interval between autorepeats (in ms). */ - char *label; /* Label to display above or to right of + Tcl_Obj *labelObj; /* Label to display above or to right of * scale; NULL means don't display a label. */ - Tcl_Size labelLength; /* Number of non-NULL chars. in label. */ enum state state; /* Values are active, normal, or disabled. * Value of scale cannot be changed when * disabled. */ @@ -96,7 +99,11 @@ typedef struct TkScale { * Information used when displaying widget: */ +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *borderWidthObj; /* Width of 3-D border around window. */ +#else int borderWidth; /* Width of 3-D border around window. */ +#endif Tk_3DBorder bgBorder; /* Used for drawing slider and other * background areas. */ Tk_3DBorder activeBorder; /* For drawing the slider when active. */ @@ -110,9 +117,13 @@ typedef struct TkScale { GC textGC; /* GC for drawing text in normal mode. */ int relief; /* Indicates whether window as a whole is * raised, sunken, or flat. */ - int highlightWidth; /* Width in pixels of highlight to draw around +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *highlightWidthObj; /* Width in pixels of highlight to draw around * widget when it has the focus. <= 0 means * don't draw a highlight. */ +#else + int highlightWidth; +#endif Tk_3DBorder highlightBorder;/* Value of -highlightbackground option: * specifies background with which to draw 3-D * default ring and focus highlight area when @@ -123,8 +134,12 @@ typedef struct TkScale { * Indicates how much interior stuff must be * offset from outside edges to leave room for * borders. */ - int sliderLength; /* Length of slider, measured in pixels along +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *sliderLengthObj; /* Length of slider, measured in pixels along * long dimension of scale. */ +#else + int sliderLength; +#endif int showValue; /* Non-zero means to display the scale value * below or to the left of the slider; zero * means don't display the value. */ diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c index 616ed4e..6ae686a 100644 --- a/generic/tkScrollbar.c +++ b/generic/tkScrollbar.c @@ -49,15 +49,15 @@ static const Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_SYNONYM, "-bd", "borderWidth", NULL, NULL, 0, 0, NULL}, {TK_CONFIG_SYNONYM, "-bg", "background", NULL, NULL, 0, 0, NULL}, {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_SCROLLBAR_BORDER_WIDTH, offsetof(TkScrollbar, borderWidth), 0, NULL}, + DEF_SCROLLBAR_BORDER_WIDTH, offsetof(TkScrollbar, borderWidthObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_STRING, "-command", "command", "Command", - DEF_SCROLLBAR_COMMAND, offsetof(TkScrollbar, command), - TK_CONFIG_NULL_OK, NULL}, + DEF_SCROLLBAR_COMMAND, offsetof(TkScrollbar, commandObj), + TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor", DEF_SCROLLBAR_CURSOR, offsetof(TkScrollbar, cursor), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_PIXELS, "-elementborderwidth", "elementBorderWidth", "BorderWidth", DEF_SCROLLBAR_EL_BORDER_WIDTH, - offsetof(TkScrollbar, elementBorderWidth), TK_CONFIG_NULL_OK, NULL}, + offsetof(TkScrollbar, elementBorderWidthObj), TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_SCROLLBAR_HIGHLIGHT_BG, offsetof(TkScrollbar, highlightBgColorPtr), 0, NULL}, @@ -66,7 +66,7 @@ static const Tk_ConfigSpec configSpecs[] = { offsetof(TkScrollbar, highlightColorPtr), 0, NULL}, {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", - DEF_SCROLLBAR_HIGHLIGHT_WIDTH, offsetof(TkScrollbar, highlightWidth), 0, NULL}, + DEF_SCROLLBAR_HIGHLIGHT_WIDTH, offsetof(TkScrollbar, highlightWidthObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_BOOLEAN, "-jump", "jump", "Jump", DEF_SCROLLBAR_JUMP, offsetof(TkScrollbar, jump), 0, NULL}, {TK_CONFIG_CUSTOM, "-orient", "orient", "Orient", @@ -79,8 +79,8 @@ static const Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_INT, "-repeatinterval", "repeatInterval", "RepeatInterval", DEF_SCROLLBAR_REPEAT_INTERVAL, offsetof(TkScrollbar, repeatInterval), 0, NULL}, {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus", - DEF_SCROLLBAR_TAKE_FOCUS, offsetof(TkScrollbar, takeFocus), - TK_CONFIG_NULL_OK, NULL}, + DEF_SCROLLBAR_TAKE_FOCUS, offsetof(TkScrollbar, takeFocusObj), + TK_CONFIG_NULL_OK|TK_CONFIG_OBJS, NULL}, {TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background", DEF_SCROLLBAR_TROUGH_COLOR, offsetof(TkScrollbar, troughColorPtr), TK_CONFIG_COLOR_ONLY, NULL}, @@ -88,7 +88,7 @@ static const Tk_ConfigSpec configSpecs[] = { DEF_SCROLLBAR_TROUGH_MONO, offsetof(TkScrollbar, troughColorPtr), TK_CONFIG_MONO_ONLY, NULL}, {TK_CONFIG_PIXELS, "-width", "width", "Width", - tkDefScrollbarWidth, offsetof(TkScrollbar, width), 0, NULL}, + tkDefScrollbarWidth, offsetof(TkScrollbar, widthObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL} }; @@ -158,21 +158,20 @@ Tk_ScrollbarObjCmd( Tk_PathName(scrollPtr->tkwin), ScrollbarWidgetObjCmd, scrollPtr, ScrollbarCmdDeletedProc); scrollPtr->vertical = 0; - scrollPtr->width = 0; - scrollPtr->command = NULL; - scrollPtr->commandSize = 0; + scrollPtr->widthObj = 0; + scrollPtr->commandObj = NULL; scrollPtr->repeatDelay = 0; scrollPtr->repeatInterval = 0; - scrollPtr->borderWidth = 0; + scrollPtr->borderWidthObj = NULL; scrollPtr->bgBorder = NULL; scrollPtr->activeBorder = NULL; scrollPtr->troughColorPtr = NULL; scrollPtr->relief = TK_RELIEF_FLAT; - scrollPtr->highlightWidth = 0; + scrollPtr->highlightWidthObj = NULL; scrollPtr->highlightBgColorPtr = NULL; scrollPtr->highlightColorPtr = NULL; scrollPtr->inset = 0; - scrollPtr->elementBorderWidth = INT_MIN; + scrollPtr->elementBorderWidthObj = NULL; scrollPtr->arrowLength = 0; scrollPtr->sliderFirst = 0; scrollPtr->sliderLast = 0; @@ -181,7 +180,7 @@ Tk_ScrollbarObjCmd( scrollPtr->firstFraction = 0.0; scrollPtr->lastFraction = 0.0; scrollPtr->cursor = NULL; - scrollPtr->takeFocus = NULL; + scrollPtr->takeFocusObj = NULL; scrollPtr->flags = 0; if (ConfigureScrollbar(interp, scrollPtr, objc-2, objv+2, 0) != TCL_OK) { @@ -222,12 +221,12 @@ ScrollbarWidgetObjCmd( int result = TCL_OK, cmdIndex, length; Tcl_Size len; static const char *const commandNames[] = { - "activate", "cget", "configure", "delta", "fraction", - "get", "identify", "set", NULL + "activate", "cget", "configure", "delta", "fraction", + "get", "identify", "set", NULL }; enum command { - COMMAND_ACTIVATE, COMMAND_CGET, COMMAND_CONFIGURE, COMMAND_DELTA, - COMMAND_FRACTION, COMMAND_GET, COMMAND_IDENTIFY, COMMAND_SET + COMMAND_ACTIVATE, COMMAND_CGET, COMMAND_CONFIGURE, COMMAND_DELTA, + COMMAND_FRACTION, COMMAND_GET, COMMAND_IDENTIFY, COMMAND_SET }; if (objc < 2) { @@ -317,11 +316,11 @@ ScrollbarWidgetObjCmd( if (scrollPtr->vertical) { pixels = yDelta; length = Tk_Height(scrollPtr->tkwin) - 1 - - 2*(scrollPtr->arrowLength + scrollPtr->inset); + - 2 * (scrollPtr->arrowLength + scrollPtr->inset); } else { pixels = xDelta; length = Tk_Width(scrollPtr->tkwin) - 1 - - 2*(scrollPtr->arrowLength + scrollPtr->inset); + - 2 * (scrollPtr->arrowLength + scrollPtr->inset); } if (length == 0) { fraction = 0.0; @@ -346,11 +345,11 @@ ScrollbarWidgetObjCmd( if (scrollPtr->vertical) { pos = y - (scrollPtr->arrowLength + scrollPtr->inset); length = Tk_Height(scrollPtr->tkwin) - 1 - - 2*(scrollPtr->arrowLength + scrollPtr->inset); + - 2 * (scrollPtr->arrowLength + scrollPtr->inset); } else { pos = x - (scrollPtr->arrowLength + scrollPtr->inset); length = Tk_Width(scrollPtr->tkwin) - 1 - - 2*(scrollPtr->arrowLength + scrollPtr->inset); + - 2 * (scrollPtr->arrowLength + scrollPtr->inset); } if (length == 0) { fraction = 0.0; @@ -472,6 +471,8 @@ ConfigureScrollbar( Tcl_Obj *const objv[], /* Arguments. */ int flags) /* Flags to pass to Tk_ConfigureWidget. */ { + int width, borderWidth, highlightWidth, elementBorderWidth; + if (Tk_ConfigureWidget(interp, scrollPtr->tkwin, configSpecs, objc, objv, scrollPtr, flags) != TCL_OK) { return TCL_ERROR; @@ -482,18 +483,31 @@ ConfigureScrollbar( * from a 3-D border. */ - if (scrollPtr->command != NULL) { - scrollPtr->commandSize = (int) strlen(scrollPtr->command); - } else { - scrollPtr->commandSize = 0; + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->borderWidthObj, &borderWidth); + if (borderWidth < 0) { + Tcl_DecrRefCount(scrollPtr->borderWidthObj); + scrollPtr->borderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(scrollPtr->borderWidthObj); } - if (scrollPtr->highlightWidth < 0) { - scrollPtr->highlightWidth = 0; + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth < 0) { + Tcl_DecrRefCount(scrollPtr->highlightWidthObj); + scrollPtr->highlightWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(scrollPtr->highlightWidthObj); } - if (scrollPtr->elementBorderWidth < 0) { - scrollPtr->elementBorderWidth = INT_MIN; + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->widthObj, &width); + if (width < 0) { + Tcl_DecrRefCount(scrollPtr->widthObj); + scrollPtr->widthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(scrollPtr->widthObj); + } + if (scrollPtr->elementBorderWidthObj) { + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->elementBorderWidthObj, &elementBorderWidth); + if (elementBorderWidth < 0) { + Tcl_DecrRefCount(scrollPtr->elementBorderWidthObj); + scrollPtr->elementBorderWidthObj = NULL; + } } - /* * Configure platform specific options. */ @@ -535,6 +549,7 @@ TkScrollbarEventProc( XEvent *eventPtr) /* Information about event. */ { TkScrollbar *scrollPtr = (TkScrollbar *)clientData; + int highlightWidth; if ((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) { TkScrollbarEventuallyRedraw(scrollPtr); @@ -561,14 +576,16 @@ TkScrollbarEventProc( } else if (eventPtr->type == FocusIn) { if (eventPtr->xfocus.detail != NotifyInferior) { scrollPtr->flags |= GOT_FOCUS; - if (scrollPtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { TkScrollbarEventuallyRedraw(scrollPtr); } } } else if (eventPtr->type == FocusOut) { if (eventPtr->xfocus.detail != NotifyInferior) { scrollPtr->flags &= ~GOT_FOCUS; - if (scrollPtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { TkScrollbarEventuallyRedraw(scrollPtr); } } diff --git a/generic/tkScrollbar.h b/generic/tkScrollbar.h index 3543d4f..2cadcee 100644 --- a/generic/tkScrollbar.h +++ b/generic/tkScrollbar.h @@ -33,12 +33,16 @@ typedef struct TkScrollbar { Tcl_Command widgetCmd; /* Token for scrollbar's widget command. */ int vertical; /* Non-zero means vertical orientation * requested, zero means horizontal. */ +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *widthObj; /* Desired narrow dimension of scrollbar, in + * pixels. */ +#else int width; /* Desired narrow dimension of scrollbar, in * pixels. */ - char *command; /* Command prefix to use when invoking +#endif + Tcl_Obj *commandObj; /* Command prefix to use when invoking * scrolling commands. NULL means don't invoke - * commands. Malloc'ed. */ - int commandSize; /* Number of non-NULL bytes in command. */ + * commands. */ int repeatDelay; /* How long to wait before auto-repeating on * scrolling actions (in ms). */ int repeatInterval; /* Interval between autorepeats (in ms). */ @@ -48,7 +52,11 @@ typedef struct TkScrollbar { * Information used when displaying widget: */ - int borderWidth; /* Width of 3-D borders. */ +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *borderWidthObj; /* Width of 3-D borders. */ +#else + int borderWidth; +#endif Tk_3DBorder bgBorder; /* Used for drawing background (all flat * surfaces except for trough). */ Tk_3DBorder activeBorder; /* For drawing backgrounds when active (i.e. @@ -56,9 +64,13 @@ typedef struct TkScrollbar { XColor *troughColorPtr; /* Color for drawing trough. */ int relief; /* Indicates whether window as a whole is * raised, sunken, or flat. */ - int highlightWidth; /* Width in pixels of highlight to draw around +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *highlightWidthObj; /* Width in pixels of highlight to draw around * widget when it has the focus. <= 0 means * don't draw a highlight. */ +#else + int highlightWidth; +#endif XColor *highlightBgColorPtr; /* Color for drawing traversal highlight area * when highlight is off. */ @@ -68,9 +80,13 @@ typedef struct TkScrollbar { * Indicates how much interior stuff must be * offset from outside edges to leave room for * borders. */ - int elementBorderWidth; /* Width of border to draw around elements +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *elementBorderWidthObj; /* Width of border to draw around elements * inside scrollbar (arrows and slider). -1 * means use borderWidth. */ +#else + int elementBorderWidth; +#endif int arrowLength; /* Length of arrows along long dimension of * scrollbar, including space for a small gap * between the arrow and the slider. @@ -87,30 +103,23 @@ typedef struct TkScrollbar { * use for active element. */ /* - * Information describing the application related to the scrollbar. This - * information is provided by the application by invoking the "set" widget - * command. This information can now be provided in two ways: the "old" - * form (totalUnits, windowUnits, firstUnit, and lastUnit), or the "new" - * form (firstFraction and lastFraction). FirstFraction and lastFraction - * will always be valid, but the old-style information is only valid if - * the OLD_STYLE_COMMANDS flag is 1. + * Information describing the application related to the scrollbar, which + * is provided by the application by invoking the "set" widget command. */ double firstFraction; /* Position of first visible thing in window, - * specified as a fraction between 0 and - * 1.0. */ + * specified as a fraction between 0 and 1.0. */ double lastFraction; /* Position of last visible thing in window, - * specified as a fraction between 0 and - * 1.0. */ + * specified as a fraction between 0 and 1.0. */ /* * Miscellaneous information: */ Tk_Cursor cursor; /* Current cursor for window, or NULL. */ - char *takeFocus; /* Value of -takefocus option; not used in the + Tcl_Obj *takeFocusObj; /* Value of -takefocus option; not used in the * C code, but used by keyboard traversal - * scripts. Malloc'ed, but may be NULL. */ + * scripts. May be NULL. */ int flags; /* Various flags; see below for * definitions. */ } TkScrollbar; @@ -132,10 +141,6 @@ typedef struct TkScrollbar { * * REDRAW_PENDING: Non-zero means a DoWhenIdle handler has * already been queued to redraw this window. - * OLD_STYLE_COMMANDS: Non-zero means the old style of commands - * should be used to communicate with the widget: - * ".t yview 40", instead of - * ".t yview scroll 2 lines", for example. * GOT_FOCUS: Non-zero means this window has the input * focus. */ @@ -161,7 +166,7 @@ MODULE_SCOPE void TkScrollbarEventProc(void *clientData, MODULE_SCOPE void TkScrollbarEventuallyRedraw(TkScrollbar *scrollPtr); MODULE_SCOPE void TkpComputeScrollbarGeometry(TkScrollbar *scrollPtr); MODULE_SCOPE TkScrollbar *TkpCreateScrollbar(Tk_Window tkwin); -MODULE_SCOPE void TkpDestroyScrollbar(TkScrollbar *scrollPtr); +MODULE_SCOPE void TkpDestroyScrollbar(TkScrollbar *scrollPtr); MODULE_SCOPE void TkpDisplayScrollbar(void *clientData); MODULE_SCOPE void TkpConfigureScrollbar(TkScrollbar *scrollPtr); MODULE_SCOPE int TkpScrollbarPosition(TkScrollbar *scrollPtr, diff --git a/generic/tkSquare.c b/generic/tkSquare.c index 0f934eb..ac9f6a5 100644 --- a/generic/tkSquare.c +++ b/generic/tkSquare.c @@ -48,7 +48,7 @@ typedef struct { * Information used when displaying widget: */ - Tcl_Obj *borderWidthPtr; /* Width of 3-D border around whole widget. */ + Tcl_Obj *borderWidthObj; /* Width of 3-D border around whole widget. */ Tcl_Obj *bgBorderPtr; Tcl_Obj *fgBorderPtr; Tcl_Obj *reliefPtr; @@ -74,7 +74,7 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - "2", offsetof(Square, borderWidthPtr), TCL_INDEX_NONE, 0, NULL, 0}, + "2", offsetof(Square, borderWidthObj), TCL_INDEX_NONE, 0, NULL, 0}, {TK_OPTION_BOOLEAN, "-dbl", "doubleBuffer", "DoubleBuffer", "1", TCL_INDEX_NONE, offsetof(Square, doubleBuffer), TK_OPTION_VAR(bool) , NULL, 0}, {TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, @@ -346,7 +346,7 @@ SquareConfigure( */ Tk_GeometryRequest(squarePtr->tkwin, 200, 150); - Tk_GetPixelsFromObj(NULL, squarePtr->tkwin, squarePtr->borderWidthPtr, + Tk_GetPixelsFromObj(NULL, squarePtr->tkwin, squarePtr->borderWidthObj, &borderWidth); Tk_SetInternalBorder(squarePtr->tkwin, borderWidth); if (!squarePtr->updatePending) { @@ -499,7 +499,7 @@ SquareDisplay( * Redraw the widget's background and border. */ - Tk_GetPixelsFromObj(NULL, squarePtr->tkwin, squarePtr->borderWidthPtr, + Tk_GetPixelsFromObj(NULL, squarePtr->tkwin, squarePtr->borderWidthObj, &borderWidth); bgBorder = Tk_Get3DBorderFromObj(squarePtr->tkwin, squarePtr->bgBorderPtr); @@ -554,7 +554,7 @@ KeepInWindow( int i, bd, relief; int borderWidth, size; - Tk_GetPixelsFromObj(NULL, squarePtr->tkwin, squarePtr->borderWidthPtr, + Tk_GetPixelsFromObj(NULL, squarePtr->tkwin, squarePtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, squarePtr->tkwin, squarePtr->xPtr, &squarePtr->x); diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index a5c6460..9a97d00 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -58,7 +58,7 @@ doNothing(void) # define TkpRedrawWidget ((void (*)(Tk_Window))(void *)doNothing) # define TkpDefineNativeBitmaps ((void (*)(void))(void *)doNothing) # define TkpCreateNativeBitmap ((Pixmap (*)(Display *, const void *))(void *)doNothing) -# define TkpGetNativeAppBitmap ((Pixmap (*)(Display *, const char*, int *, int *))(void *)doNothing) +# define TkpGetNativeAppBitmap ((Pixmap (*)(Display *, const char *, int *, int *))(void *)doNothing) #endif #ifdef _WIN32 @@ -532,7 +532,6 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkMacOSXGetContainer, /* 49 */ TkGenerateButtonEvent, /* 50 */ TkGenWMDestroyEvent, /* 51 */ - TkMacOSXSetDrawingEnabled, /* 52 */ #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ TkCreateXEventSource, /* 0 */ diff --git a/generic/tkStyle.c b/generic/tkStyle.c index b243674..ea39760 100644 --- a/generic/tkStyle.c +++ b/generic/tkStyle.c @@ -1358,7 +1358,7 @@ Tk_GetStyle( if (entryPtr == NULL) { if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "style \"%s\" doesn't exist", name)); + "style \"%s\" does not exist", name)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "STYLE", name, (char *)NULL); } return NULL; diff --git a/generic/tkTest.c b/generic/tkTest.c index a0c68b1..518bd10 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -248,8 +248,8 @@ Tktest_Init( Tcl_CreateObjCommand2(interp, "testtext", TkpTesttextCmd, Tk_MainWindow(interp), NULL); Tcl_CreateObjCommand2(interp, "testphotostringmatch", - TestPhotoStringMatchCmd, Tk_MainWindow(interp), - NULL); + TestPhotoStringMatchCmd, Tk_MainWindow(interp), + NULL); #if defined(_WIN32) Tcl_CreateObjCommand2(interp, "testmetrics", TestmetricsObjCmd, @@ -1554,7 +1554,7 @@ ImageDisplay( } else { /* - * Drawing is not possible on the first call to DisplayImage. + * Drawing is not possible on the first call to DisplayImage. * Save the message, but do not log it until the actual display. */ @@ -2130,16 +2130,16 @@ TestPhotoStringMatchCmd( int width, height; if (objc != 2) { - Tcl_WrongNumArgs(interp, 1, objv, "imageData"); - return TCL_ERROR; + Tcl_WrongNumArgs(interp, 1, objv, "imageData"); + return TCL_ERROR; } if (TkDebugPhotoStringMatchDef(interp, objv[1], dummy, &width, &height)) { - resultObj[0] = Tcl_NewWideIntObj(width); - resultObj[1] = Tcl_NewWideIntObj(height); - Tcl_SetObjResult(interp, Tcl_NewListObj(2, resultObj)); - return TCL_OK; + resultObj[0] = Tcl_NewWideIntObj(width); + resultObj[1] = Tcl_NewWideIntObj(height); + Tcl_SetObjResult(interp, Tcl_NewListObj(2, resultObj)); + return TCL_OK; } else { - return TCL_ERROR; + return TCL_ERROR; } } diff --git a/generic/tkText.c b/generic/tkText.c index aaaabc0..f7cb5d4 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -120,7 +120,7 @@ static const Tk_OptionSpec optionSpecs[] = { "BlockCursor", DEF_TEXT_BLOCK_CURSOR, TCL_INDEX_NONE, offsetof(TkText, insertCursorType), 0, 0, 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_TEXT_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(TkText, borderWidth), + DEF_TEXT_BORDER_WIDTH, offsetof(TkText, borderWidthObj), TCL_INDEX_NONE, 0, 0, TK_TEXT_LINE_GEOMETRY}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_TEXT_CURSOR, TCL_INDEX_NONE, offsetof(TkText, cursor), @@ -140,7 +140,7 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_TEXT_FG, TCL_INDEX_NONE, offsetof(TkText, fgColor), 0, 0, 0}, {TK_OPTION_PIXELS, "-height", "height", "Height", - DEF_TEXT_HEIGHT, TCL_INDEX_NONE, offsetof(TkText, height), 0, 0, 0}, + DEF_TEXT_HEIGHT, offsetof(TkText, heightObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_TEXT_HIGHLIGHT_BG, TCL_INDEX_NONE, offsetof(TkText, highlightBgColorPtr), @@ -149,11 +149,11 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_TEXT_HIGHLIGHT, TCL_INDEX_NONE, offsetof(TkText, highlightColorPtr), 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", - "HighlightThickness", DEF_TEXT_HIGHLIGHT_WIDTH, TCL_INDEX_NONE, - offsetof(TkText, highlightWidth), 0, 0, TK_TEXT_LINE_GEOMETRY}, + "HighlightThickness", DEF_TEXT_HIGHLIGHT_WIDTH, offsetof(TkText, highlightWidthObj), + TCL_INDEX_NONE, 0, 0, TK_TEXT_LINE_GEOMETRY}, {TK_OPTION_BORDER, "-inactiveselectbackground","inactiveSelectBackground", "Foreground", - DEF_TEXT_INACTIVE_SELECT_COLOR, + DEF_TEXT_INACTIVE_SELECT_BG_COLOR, TCL_INDEX_NONE, offsetof(TkText, inactiveSelBorder), TK_OPTION_NULL_OK, DEF_TEXT_SELECT_MONO, 0}, {TK_OPTION_BORDER, "-insertbackground", "insertBackground", "Foreground", @@ -161,8 +161,8 @@ static const Tk_OptionSpec optionSpecs[] = { TCL_INDEX_NONE, offsetof(TkText, insertBorder), 0, 0, 0}, {TK_OPTION_PIXELS, "-insertborderwidth", "insertBorderWidth", - "BorderWidth", DEF_TEXT_INSERT_BD_COLOR, TCL_INDEX_NONE, - offsetof(TkText, insertBorderWidth), 0, + "BorderWidth", DEF_TEXT_INSERT_BD_COLOR, offsetof(TkText, insertBorderWidthObj), + TCL_INDEX_NONE, 0, DEF_TEXT_INSERT_BD_MONO, 0}, {TK_OPTION_INT, "-insertofftime", "insertOffTime", "OffTime", DEF_TEXT_INSERT_OFF_TIME, TCL_INDEX_NONE, offsetof(TkText, insertOffTime), @@ -175,16 +175,16 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_TEXT_INSERT_UNFOCUSSED, TCL_INDEX_NONE, offsetof(TkText, insertUnfocussed), TK_OPTION_ENUM_VAR, insertUnfocussedStrings, 0}, {TK_OPTION_PIXELS, "-insertwidth", "insertWidth", "InsertWidth", - DEF_TEXT_INSERT_WIDTH, TCL_INDEX_NONE, offsetof(TkText, insertWidth), + DEF_TEXT_INSERT_WIDTH, offsetof(TkText, insertWidthObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_INT, "-maxundo", "maxUndo", "MaxUndo", DEF_TEXT_MAX_UNDO, TCL_INDEX_NONE, offsetof(TkText, maxUndo), TK_OPTION_DONT_SET_DEFAULT, 0, 0}, {TK_OPTION_PIXELS, "-padx", "padX", "Pad", - DEF_TEXT_PADX, TCL_INDEX_NONE, offsetof(TkText, padX), 0, 0, + DEF_TEXT_PADX, offsetof(TkText, padXObj), TCL_INDEX_NONE, 0, 0, TK_TEXT_LINE_GEOMETRY}, {TK_OPTION_PIXELS, "-pady", "padY", "Pad", - DEF_TEXT_PADY, TCL_INDEX_NONE, offsetof(TkText, padY), 0, 0, 0}, + DEF_TEXT_PADY, offsetof(TkText, padYObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_TEXT_RELIEF, TCL_INDEX_NONE, offsetof(TkText, relief), 0, 0, 0}, {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground", @@ -192,23 +192,22 @@ static const Tk_OptionSpec optionSpecs[] = { 0, DEF_TEXT_SELECT_MONO, 0}, {TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", DEF_TEXT_SELECT_BD_COLOR, - offsetof(TkText, selBorderWidthPtr), - offsetof(TkText, selBorderWidth), - TK_OPTION_NULL_OK, DEF_TEXT_SELECT_BD_MONO, 0}, + offsetof(TkText, selBorderWidthObj), TCL_INDEX_NONE, + 0, DEF_TEXT_SELECT_BD_MONO, 0}, {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", DEF_TEXT_SELECT_FG_COLOR, TCL_INDEX_NONE, offsetof(TkText, selFgColorPtr), TK_OPTION_NULL_OK, DEF_TEXT_SELECT_FG_MONO, 0}, {TK_OPTION_BOOLEAN, "-setgrid", "setGrid", "SetGrid", DEF_TEXT_SET_GRID, TCL_INDEX_NONE, offsetof(TkText, setGrid), 0, 0, 0}, {TK_OPTION_PIXELS, "-spacing1", "spacing1", "Spacing", - DEF_TEXT_SPACING1, TCL_INDEX_NONE, offsetof(TkText, spacing1), - 0, 0 , TK_TEXT_LINE_GEOMETRY }, + DEF_TEXT_SPACING1, offsetof(TkText, spacing1Obj), TCL_INDEX_NONE, + 0, 0, TK_TEXT_LINE_GEOMETRY }, {TK_OPTION_PIXELS, "-spacing2", "spacing2", "Spacing", - DEF_TEXT_SPACING2, TCL_INDEX_NONE, offsetof(TkText, spacing2), - 0, 0 , TK_TEXT_LINE_GEOMETRY }, + DEF_TEXT_SPACING2, offsetof(TkText, spacing2Obj), TCL_INDEX_NONE, + 0, 0, TK_TEXT_LINE_GEOMETRY }, {TK_OPTION_PIXELS, "-spacing3", "spacing3", "Spacing", - DEF_TEXT_SPACING3, TCL_INDEX_NONE, offsetof(TkText, spacing3), - 0, 0 , TK_TEXT_LINE_GEOMETRY }, + DEF_TEXT_SPACING3, offsetof(TkText, spacing3Obj), TCL_INDEX_NONE, + 0, 0, TK_TEXT_LINE_GEOMETRY }, {TK_OPTION_CUSTOM, "-startline", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkText, start), TK_OPTION_NULL_OK, &lineOption, TK_TEXT_LINE_RANGE}, @@ -216,7 +215,7 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_TEXT_STATE, TCL_INDEX_NONE, offsetof(TkText, state), TK_OPTION_ENUM_VAR, &tkStateStrings[1], 0}, {TK_OPTION_STRING, "-tabs", "tabs", "Tabs", - DEF_TEXT_TABS, offsetof(TkText, tabOptionPtr), TCL_INDEX_NONE, + DEF_TEXT_TABS, offsetof(TkText, tabOptionObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, TK_TEXT_LINE_GEOMETRY}, {TK_OPTION_STRING_TABLE, "-tabstyle", "tabStyle", "TabStyle", DEF_TEXT_TABSTYLE, TCL_INDEX_NONE, offsetof(TkText, tabStyle), @@ -595,7 +594,7 @@ CreateWidget( textPtr->undo = textPtr->sharedTextPtr->undo; textPtr->maxUndo = textPtr->sharedTextPtr->maxUndo; textPtr->autoSeparators = textPtr->sharedTextPtr->autoSeparators; - textPtr->tabOptionPtr = NULL; + textPtr->tabOptionObj = NULL; /* * Create the "sel" tag and the "current" and "insert" marks. @@ -603,8 +602,7 @@ CreateWidget( textPtr->selBorder = NULL; textPtr->inactiveSelBorder = NULL; - textPtr->selBorderWidth = 0; - textPtr->selBorderWidthPtr = NULL; + textPtr->selBorderWidthObj = NULL; textPtr->selFgColorPtr = NULL; /* @@ -1462,8 +1460,8 @@ TextWidgetObjCmd( deleteInsertOffset = insertLength; } - indexFromLine = TkBTreeLinesTo(textPtr, indexFromPtr->linePtr); - indexFromByteOffset = indexFromPtr->byteIndex; + indexFromLine = TkBTreeLinesTo(textPtr, indexFromPtr->linePtr); + indexFromByteOffset = indexFromPtr->byteIndex; result = TextReplaceCmd(textPtr, interp, indexFromPtr, indexToPtr, objc, objv, 0); @@ -1473,11 +1471,11 @@ TextWidgetObjCmd( * Move the insertion position to the correct place. */ - TkTextIndex indexTmp; + TkTextIndex indexTmp; - TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, indexFromLine, - indexFromByteOffset, &indexTmp); - TkTextIndexForwChars(NULL, &indexTmp, + TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, indexFromLine, + indexFromByteOffset, &indexTmp); + TkTextIndexForwChars(NULL, &indexTmp, deleteInsertOffset, &index, COUNT_INDICES); TkBTreeUnlinkSegment(textPtr->insertMarkPtr, textPtr->insertMarkPtr->body.mark.linePtr); @@ -2065,6 +2063,8 @@ ConfigureText( Tk_SavedOptions savedOptions; int oldExport = (textPtr->exportSelection) && (!Tcl_IsSafe(textPtr->interp)); int mask = 0; + int selBorderWidth = INT_MIN, spacing1, spacing2, spacing3; + int insertBorderWidth, insertWidth; if (Tk_SetOptions(interp, (char *) textPtr, textPtr->optionTable, objc, objv, textPtr->tkwin, &savedOptions, &mask) != TCL_OK) { @@ -2204,16 +2204,54 @@ ConfigureText( * Don't allow negative spacings. */ - if (textPtr->spacing1 < 0) { - textPtr->spacing1 = 0; - } - if (textPtr->spacing2 < 0) { - textPtr->spacing2 = 0; - } - if (textPtr->spacing3 < 0) { - textPtr->spacing3 = 0; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->spacing1Obj, &spacing1); + if (spacing1 < 0) { + spacing1 = 0; + Tcl_DecrRefCount(textPtr->spacing1Obj); + textPtr->spacing1Obj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(textPtr->spacing1Obj); + } + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->spacing2Obj, &spacing2); + if (spacing2 < 0) { + spacing2 = 0; + Tcl_DecrRefCount(textPtr->spacing2Obj); + textPtr->spacing2Obj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(textPtr->spacing2Obj); + } + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->spacing3Obj, &spacing3); + if (spacing3 < 0) { + spacing3 = 0; + Tcl_DecrRefCount(textPtr->spacing3Obj); + textPtr->spacing3Obj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(textPtr->spacing3Obj); + } + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->insertBorderWidthObj, &insertBorderWidth); + if (insertBorderWidth < 0) { + insertBorderWidth = 0; + Tcl_DecrRefCount(textPtr->insertBorderWidthObj); + textPtr->insertBorderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(textPtr->insertBorderWidthObj); + } + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->insertWidthObj, &insertWidth); + if (insertWidth < 0) { + insertWidth = 0; + Tcl_DecrRefCount(textPtr->insertWidthObj); + textPtr->insertWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(textPtr->insertWidthObj); + } + if (textPtr->selBorderWidthObj) { + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->selBorderWidthObj, &selBorderWidth); + } + if (selBorderWidth < 0) { + selBorderWidth = 0; + if (textPtr->selBorderWidthObj) { + Tcl_DecrRefCount(textPtr->selBorderWidthObj); + } + textPtr->selBorderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(textPtr->selBorderWidthObj); } + /* * Parse tab stops. */ @@ -2222,9 +2260,9 @@ ConfigureText( ckfree(textPtr->tabArrayPtr); textPtr->tabArrayPtr = NULL; } - if (textPtr->tabOptionPtr != NULL) { + if (textPtr->tabOptionObj != NULL) { textPtr->tabArrayPtr = TkTextGetTabs(interp, textPtr->tkwin, - textPtr->tabOptionPtr); + textPtr->tabOptionObj); if (textPtr->tabArrayPtr == NULL) { Tcl_AddErrorInfo(interp,"\n (while processing -tabs option)"); Tk_RestoreSavedOptions(&savedOptions); @@ -2244,9 +2282,8 @@ ConfigureText( } else { textPtr->selTagPtr->selBorder = textPtr->selBorder; } - if (textPtr->selTagPtr->borderWidthPtr != textPtr->selBorderWidthPtr) { - textPtr->selTagPtr->borderWidthPtr = textPtr->selBorderWidthPtr; - textPtr->selTagPtr->borderWidth = textPtr->selBorderWidth; + if (textPtr->selTagPtr->borderWidthObj != textPtr->selBorderWidthObj) { + textPtr->selTagPtr->borderWidthObj = textPtr->selBorderWidthObj; } if (textPtr->selTagPtr->selFgColor == NULL) { textPtr->selTagPtr->fgColor = textPtr->selFgColorPtr; @@ -2258,17 +2295,19 @@ ConfigureText( if ((textPtr->selTagPtr->elide >= 0) || (textPtr->selTagPtr->tkfont != NULL) || (textPtr->selTagPtr->justify != TK_JUSTIFY_NULL) - || (textPtr->selTagPtr->lMargin1 != INT_MIN) - || (textPtr->selTagPtr->lMargin2 != INT_MIN) - || (textPtr->selTagPtr->offset != INT_MIN) - || (textPtr->selTagPtr->rMargin != INT_MIN) - || (textPtr->selTagPtr->spacing1 != INT_MIN) - || (textPtr->selTagPtr->spacing2 != INT_MIN) - || (textPtr->selTagPtr->spacing3 != INT_MIN) + || (textPtr->selTagPtr->lMargin1Obj != NULL) + || (textPtr->selTagPtr->lMargin2Obj != NULL) + || (textPtr->selTagPtr->offsetObj != NULL) + || (textPtr->selTagPtr->rMarginObj != NULL) + || (textPtr->selTagPtr->spacing1Obj != NULL) + || (textPtr->selTagPtr->spacing2Obj != NULL) + || (textPtr->selTagPtr->spacing3Obj != NULL) || (textPtr->selTagPtr->tabStringPtr != NULL) || (textPtr->selTagPtr->tabStyle == TK_TEXT_TABSTYLE_TABULAR) || (textPtr->selTagPtr->tabStyle == TK_TEXT_TABSTYLE_WORDPROCESSOR) - || (textPtr->selTagPtr->wrapMode != TEXT_WRAPMODE_NULL)) { + || (textPtr->selTagPtr->wrapMode == TEXT_WRAPMODE_CHAR) + || (textPtr->selTagPtr->wrapMode == TEXT_WRAPMODE_NONE) + || (textPtr->selTagPtr->wrapMode == TEXT_WRAPMODE_WORD)) { textPtr->selTagPtr->affectsDisplay = 1; textPtr->selTagPtr->affectsDisplayGeometry = 1; } @@ -2330,9 +2369,6 @@ ConfigureText( if (textPtr->width <= 0) { textPtr->width = 1; } - if (textPtr->height <= 0) { - textPtr->height = 1; - } Tk_FreeSavedOptions(&savedOptions); TextWorldChanged(textPtr, mask); return TCL_OK; @@ -2394,8 +2430,11 @@ TextWorldChanged( * changed. */ { Tk_FontMetrics fm; - int border; + int border, height; int oldCharHeight = textPtr->charHeight; + int padX, padY; + int spacing1, spacing3; + int borderWidth, highlightWidth; textPtr->charWidth = Tk_TextWidth(textPtr->tkfont, "0", 1); if (textPtr->charWidth <= 0) { @@ -2410,17 +2449,26 @@ TextWorldChanged( if (textPtr->charHeight != oldCharHeight) { TkBTreeClientRangeChanged(textPtr, textPtr->charHeight); } - border = textPtr->borderWidth + textPtr->highlightWidth; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->padYObj, &padY); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->spacing1Obj, &spacing1); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->spacing3Obj, &spacing3); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->highlightWidthObj, &highlightWidth); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->heightObj, &height); + if (height < 1) { + height = 1; + } + border = borderWidth + highlightWidth; Tk_GeometryRequest(textPtr->tkwin, - textPtr->width * textPtr->charWidth + 2*textPtr->padX + 2*border, - textPtr->height*(fm.linespace+textPtr->spacing1+textPtr->spacing3) - + 2*textPtr->padY + 2*border); + textPtr->width * textPtr->charWidth + 2 * padX + 2 * border, + height * (fm.linespace + spacing1 + spacing3) + + 2 * padY + 2*border); Tk_SetInternalBorderEx(textPtr->tkwin, - border + textPtr->padX, border + textPtr->padX, - border + textPtr->padY, border + textPtr->padY); + border + padX, border + padX, border + padY, border + padY); if (textPtr->setGrid) { - Tk_SetGrid(textPtr->tkwin, textPtr->width, textPtr->height, + Tk_SetGrid(textPtr->tkwin, textPtr->width, height, textPtr->charWidth, textPtr->charHeight); } else { Tk_UnsetGrid(textPtr->tkwin); @@ -2455,6 +2503,7 @@ TextEventProc( { TkText *textPtr = (TkText *)clientData; TkTextIndex index, index2; + int highlightWidth; if (eventPtr->type == Expose) { TkTextRedrawRegion(textPtr, eventPtr->xexpose.x, @@ -2474,7 +2523,7 @@ TextEventProc( } } else if (eventPtr->type == DestroyNotify) { /* - * NOTE: we must zero out selBorder, selBorderWidthPtr and + * NOTE: we must zero out selBorder, selBorderWidthObj and * selFgColorPtr: they are duplicates of information in the "sel" tag, * which will be freed up when we delete all tags. Hence we don't want * the automatic config options freeing process to delete them as @@ -2482,8 +2531,7 @@ TextEventProc( */ textPtr->selBorder = NULL; - textPtr->selBorderWidthPtr = NULL; - textPtr->selBorderWidth = 0; + textPtr->selBorderWidthObj = NULL; textPtr->selFgColorPtr = NULL; if (textPtr->setGrid) { Tk_UnsetGrid(textPtr->tkwin); @@ -2532,9 +2580,9 @@ TextEventProc( */ TkTextChanged(NULL, textPtr, &index, &index2); - if (textPtr->highlightWidth > 0) { - TkTextRedrawRegion(textPtr, 0, 0, textPtr->highlightWidth, - textPtr->highlightWidth); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { + TkTextRedrawRegion(textPtr, 0, 0, highlightWidth, highlightWidth); } } } @@ -2718,9 +2766,9 @@ InsertChars( */ for (tPtr = sharedTextPtr->peers; tPtr != NULL ; tPtr = tPtr->next) { - if (TkBTreeCharTagged(indexPtr, tPtr->selTagPtr)) { - TkTextSelectionEvent(tPtr); - } + if (TkBTreeCharTagged(indexPtr, tPtr->selTagPtr)) { + TkTextSelectionEvent(tPtr); + } tPtr->abortSelections = 1; } @@ -2858,9 +2906,9 @@ TextPushUndoAction( Tcl_ListObjAppendElement(NULL, markGravityRUndoMarkCmdObj, Tcl_NewStringObj(rMarkName, TCL_INDEX_NONE)); Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj, - Tcl_NewStringObj("left", 4)); + Tcl_NewStringObj("left", 4)); Tcl_ListObjAppendElement(NULL, markGravityRUndoMarkCmdObj, - Tcl_NewStringObj("right", 5)); + Tcl_NewStringObj("right", 5)); /* * Note: we don't wish to use textPtr->widgetCmd in these callbacks @@ -3185,7 +3233,7 @@ DeleteIndexRange( for (i=0, hPtr=Tcl_FirstHashEntry(&sharedTextPtr->tagTable, &search); hPtr != NULL; i++, hPtr = Tcl_NextHashEntry(&search)) { - TkBTreeTag(&index1, &index2, (TkTextTag *)Tcl_GetHashValue(hPtr), 0); + TkBTreeTag(&index1, &index2, (TkTextTag *)Tcl_GetHashValue(hPtr), 0); } /* @@ -3195,7 +3243,7 @@ DeleteIndexRange( for (tPtr = sharedTextPtr->peers; tPtr != NULL ; tPtr = tPtr->next) { - if (TkBTreeTag(&index1, &index2, tPtr->selTagPtr, 0)) { + if (TkBTreeTag(&index1, &index2, tPtr->selTagPtr, 0)) { /* * Send an event that the selection changed. This is * equivalent to: @@ -3204,7 +3252,7 @@ DeleteIndexRange( TkTextSelectionEvent(textPtr); tPtr->abortSelections = 1; - } + } } /* @@ -3305,7 +3353,7 @@ DeleteIndexRange( TkBTreeDeleteIndexRange(sharedTextPtr->tree, &index1, &index2); - UpdateDirtyFlag(sharedTextPtr); + UpdateDirtyFlag(sharedTextPtr); } resetViewCount = 0; @@ -3655,14 +3703,16 @@ TextBlinkProc( redrawInsert: TkTextMarkSegToIndex(textPtr, textPtr->insertMarkPtr, &index); if (TkTextIndexBbox(textPtr, &index, &x, &y, &w, &h, &charWidth) == 0) { + int insertWidth; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->insertWidthObj, &insertWidth); if (textPtr->insertCursorType) { /* Block cursor */ TkTextRedrawRegion(textPtr, x - textPtr->width / 2, y, - charWidth + textPtr->insertWidth / 2, h); + charWidth + insertWidth / 2, h); } else { /* I-beam cursor */ - TkTextRedrawRegion(textPtr, x - textPtr->insertWidth / 2, y, - textPtr->insertWidth, h); + TkTextRedrawRegion(textPtr, x - insertWidth / 2, y, + insertWidth, h); } } } @@ -4922,7 +4972,7 @@ DumpLine( } else if ((what & TK_DUMP_IMG) && (segPtr->typePtr == &tkTextEmbImageType)) { TkTextEmbImage *eiPtr = &segPtr->body.ei; - const char *name = (eiPtr->name == NULL) ? "" : eiPtr->name; + const char *name = eiPtr->name; TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, lineno, offset, &index); @@ -5119,13 +5169,13 @@ TextEditUndo( */ cmdObj = Tcl_ObjPrintf("::tk::TextUndoRedoProcessMarks %s", - Tk_PathName(textPtr->tkwin)); + 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_AddErrorInfo(textPtr->interp, + "\n (on undoing)"); + Tcl_BackgroundException(textPtr->interp, code); } Tcl_DecrRefCount(cmdObj); @@ -5185,13 +5235,13 @@ TextEditRedo( */ cmdObj = Tcl_ObjPrintf("::tk::TextUndoRedoProcessMarks %s", - Tk_PathName(textPtr->tkwin)); + 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_AddErrorInfo(textPtr->interp, + "\n (on undoing)"); + Tcl_BackgroundException(textPtr->interp, code); } Tcl_DecrRefCount(cmdObj); @@ -5733,7 +5783,7 @@ SearchCore( int alreadySearchOffset = -1; const char *pattern = NULL; /* For exact searches only. */ - int firstNewLine = -1; /* For exact searches only. */ + int firstNewLine = -1; /* For exact searches only. */ Tcl_RegExp regexp = NULL; /* For regexp searches only. */ /* @@ -6131,13 +6181,13 @@ SearchCore( break; } else { alreadySearchOffset -= (matchLength ? matchLength : 1); - if (alreadySearchOffset < 0) { - break; - } + if (alreadySearchOffset < 0) { + break; + } } } else { - firstOffset = matchLength ? p - startOfLine + matchLength - : p - startOfLine + (Tcl_Size)1; + firstOffset = matchLength ? p - startOfLine + matchLength + : p - startOfLine + (Tcl_Size)1; if (firstOffset >= lastOffset) { /* * Now, we have to be careful not to find diff --git a/generic/tkText.h b/generic/tkText.h index e29a8ac..63bf6c6 100644 --- a/generic/tkText.h +++ b/generic/tkText.h @@ -114,12 +114,16 @@ typedef struct TkTextEmbWindow { * yet. */ TkTextLine *linePtr; /* Line structure that contains this * window. */ - char *create; /* Script to create window on-demand. NULL - * means no such script. Malloc-ed. */ + Tcl_Obj *createObj; /* Script to create window on-demand. NULL + * means no such script. */ +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *padXObj, *padYObj; /* Padding to leave around each side of window. */ +#endif TkAlignMode align; /* How to align window in vertical space. See * definitions in tkTextWind.c. */ - int padX, padY; /* Padding to leave around each side of - * window, in pixels. */ +#if TK_MAJOR_VERSION < 9 + int padX, padY; +#endif int stretch; /* Should window stretch to fill vertical * space of line (except for pady)? 0 or 1. */ Tk_OptionTable optionTable; /* Token representing the configuration @@ -140,18 +144,23 @@ typedef struct TkTextEmbImage { * text widget. This is used when the image * changes or is deleted. */ TkTextLine *linePtr; /* Line structure that contains this image. */ - char *imageString; /* Name of the image for this segment. */ - char *imageName; /* Name used by text widget to identify this + Tcl_Obj *imageObj; /* Name of the image for this segment. */ + Tcl_Obj *imageNameObj; /* Name used by text widget to identify this * image. May be unique-ified. */ char *name; /* Name used in the hash table. Used by * "image names" to identify this instance of * the image. */ Tk_Image image; /* Image for this segment. NULL means that the * image hasn't been created yet. */ +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *padXObj, *padYObj; /* Padding to leave around each side of image, + * in pixels. */ +#endif TkAlignMode align; /* How to align image in vertical space. See * definitions in tkTextImage.c. */ - int padX, padY; /* Padding to leave around each side of image, - * in pixels. */ +#if TK_MAJOR_VERSION < 9 + int padX, padY; +#endif int chunkCount; /* Number of display chunks that refer to this * image. */ Tk_OptionTable optionTable; /* Token representing the configuration @@ -211,7 +220,7 @@ typedef struct TkTextIndex { typedef struct TkTextDispChunk TkTextDispChunk; -typedef void Tk_ChunkDisplayProc(struct TkText *textPtr, +typedef void Tk_ChunkDisplayProc(struct TkText *textPtr, TkTextDispChunk *chunkPtr, int x, int y, int height, int baseline, Display *display, Drawable dst, int screenY); @@ -343,12 +352,7 @@ typedef struct TkTextTag { Tk_3DBorder border; /* Used for drawing background. NULL means no * value specified here. */ - int borderWidth; /* Width of 3-D border for background. */ - Tcl_Obj *borderWidthPtr; /* Width of 3-D border for background. */ -#if TK_MAJOR_VERSION < 9 - char *reliefString; /* -relief option string (malloc-ed). NULL - * means option not specified. */ -#endif + Tcl_Obj *borderWidthObj; /* Width of 3-D border for background. */ int relief; /* 3-D relief for background. */ Pixmap bgStipple; /* Stipple bitmap for background. None means * no value specified here. */ @@ -359,118 +363,68 @@ typedef struct TkTextTag { Pixmap fgStipple; /* Stipple bitmap for text and other * foreground stuff. None means no value * specified here.*/ -#if TK_MAJOR_VERSION < 9 - char *justifyString; /* -justify option string (malloc-ed). NULL - * means option not specified. */ -#endif Tk_Justify justify; /* How to justify text: TK_JUSTIFY_CENTER, * TK_JUSTIFY_LEFT, or TK_JUSTIFY_RIGHT. */ -#if TK_MAJOR_VERSION > 8 - Tcl_Obj *lMargin1Obj; /* -lmargin1 option object. NULL - * means option not specified. */ -#else - char *lMargin1String; /* -lmargin1 option string (malloc-ed). NULL - * means option not specified. */ -#endif - int lMargin1; /* Left margin for first display line of each - * text line, in pixels. INT_MIN means option not specified. */ -#if TK_MAJOR_VERSION > 8 - Tcl_Obj *lMargin2Obj; /* -lmargin2 option object. NULL - * means option not specified. */ -#else - char *lMargin2String; /* -lmargin2 option string (malloc-ed). NULL - * means option not specified. */ -#endif - int lMargin2; /* Left margin for second and later display lines - * of each text line, in pixels. INT_MIN means option not specified. */ + Tcl_Obj *lMargin1Obj; /* Left margin for first display line of each + * text line, in pixels. NULL means option not specified. */ + int lMargin1; /* No longer used, but kept for binary compatibility. */ + Tcl_Obj *lMargin2Obj; /* Left margin for second and later display lines + * of each text line, in pixels NULL means option not specified. */ + int lMargin2; /* No longer used, but kept for binary compatibility. */ Tk_3DBorder lMarginColor; /* Used for drawing background in left margins. - * This is used for both lmargin1 and lmargin2. + * This is used for both lmargin1 and lmargin2. * NULL means no value specified here. */ -#if TK_MAJOR_VERSION > 8 - Tcl_Obj *offsetObj; /* -offset option. NULL means option not specified. */ -#else - char *offsetString; /* -offset option string (malloc-ed). NULL - * means option not specified. */ -#endif - int offset; /* Vertical offset of text's baseline from + Tcl_Obj *offsetObj; /* Vertical offset of text's baseline from * baseline of line. Used for superscripts and - * subscripts. INT_MIN means option not specified. */ + * subscripts. NULL means option not specified. */ + int offset; /* No longer used, but kept for binary compatibility. */ #if TK_MAJOR_VERSION < 9 - char *overstrikeString; /* -overstrike option string (malloc-ed). NULL + Tcl_Obj *overstrikeObj; /* -overstrike option. NULL * means option not specified. */ #endif int overstrike; /* > 0 means draw horizontal line through * middle of text. -1 means not specified. */ XColor *overstrikeColor; /* Color for the overstrike. NULL means same - * color as foreground. */ -#if TK_MAJOR_VERSION > 8 - Tcl_Obj *rMarginObj; /* -rmargin option object. NULL - * means option not specified. */ -#else - char *rMarginString; /* -rmargin option string (malloc-ed). NULL + * color as foreground. */ + Tcl_Obj *rMarginObj; /* Right margin for text, in pixels. NULL * means option not specified. */ -#endif - int rMargin; /* Right margin for text, in pixels. INT_MIN means option not specified. */ + int rMargin; /* No longer used, but kept for binary compatibility. */ Tk_3DBorder rMarginColor; /* Used for drawing background in right margin. * NULL means no value specified here. */ Tk_3DBorder selBorder; /* Used for drawing background for selected text. * NULL means no value specified here. */ XColor *selFgColor; /* Foreground color for selected text. NULL means * no value specified here. */ -#if TK_MAJOR_VERSION > 8 Tcl_Obj *spacing1Obj; /* -spacing1 option object. NULL * means option not specified. */ -#else - char *spacing1String; /* -spacing1 option string (malloc-ed). NULL - * means option not specified. */ -#endif - int spacing1; /* Extra spacing above first display line for - * text line. INT_MIN means option not specified. */ -#if TK_MAJOR_VERSION > 8 Tcl_Obj *spacing2Obj; /* -spacing2 option object. NULL * means option not specified. */ -#else - char *spacing2String; /* -spacing2 option string (malloc-ed). NULL - * means option not specified. */ -#endif - int spacing2; /* Extra spacing between display lines for the - * same text line. INT_MIN means option not specified. */ -#if TK_MAJOR_VERSION > 8 Tcl_Obj *spacing3Obj; /* -spacing3 option object. NULL * means option not specified. */ -#else - char *spacing3String; /* -spacing3 option string (malloc-ed). NULL - * means option not specified. */ -#endif - int spacing3; /* Extra spacing below last display line for - * text line. INT_MIN means option not specified. */ - Tcl_Obj *tabStringPtr; /* -tabs option string. NULL means option not + Tcl_Obj *tabStringPtr; /* -tabs option. NULL means option not * specified. */ struct TkTextTabArray *tabArrayPtr; /* Info about tabs for tag (malloc-ed) or - * NULL. Corresponds to tabString. */ -#if TK_MAJOR_VERSION > 8 + * NULL. Corresponds to tabStringPtr. */ TkTextTabStyle tabStyle; /* One of TK_TEXT_TABSTYLE_TABULAR or TK_TEXT_TABSTYLE_WORDPROCESSOR * or TK_TEXT_TABSTYLE_NULL (if not specified). */ -#else - int tabStyle; /* One of TABULAR or WORDPROCESSOR or NONE (if - * not specified). */ - char *underlineString; /* -underline option string (malloc-ed). NULL +#if TK_MAJOR_VERSION < 9 + Tcl_Obj *underlineObj; /* -underline option. NULL * means option not specified. */ #endif int underline; /* > 0 means draw underline underneath * text. -1 means not specified. */ XColor *underlineColor; /* Color for the underline. NULL means same - * color as foreground. */ + * color as foreground. */ TkWrapMode wrapMode; /* How to handle wrap-around for this tag. * Must be TEXT_WRAPMODE_CHAR, TEXT_WRAPMODE_WORD, * TEXT_WRAPMODE_NONE, or TEXT_WRAPMODE_NULL to * use wrapmode for whole widget. */ #if TK_MAJOR_VERSION < 9 - char *elideString; /* -elide option string (malloc-ed). NULL + Tcl_Obj *elideObj; /* -elide option. NULL * means option not specified. */ #endif - int elide; /* > 0 means that data under this tag + int elide; /* Non-zero means that data under this tag * should not be displayed. -1 means not specified. */ int affectsDisplay; /* Non-zero means that this tag affects the * way information is displayed on the screen @@ -647,7 +601,7 @@ typedef struct TkSharedText { struct TkText *peers; Tcl_Size undoMarkId; /* Counts undo marks temporarily used during - undo and redo operations. */ + undo and redo operations. */ } TkSharedText; /* @@ -709,14 +663,23 @@ typedef struct TkText { Tk_3DBorder border; /* Structure used to draw 3-D border and * default background. */ - int borderWidth; /* Width of 3-D border to draw around entire +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *borderWidthObj; /* Width of 3-D border to draw around entire * widget. */ - int padX, padY; /* Padding between text and window border. */ + Tcl_Obj *padXObj, *padYObj; /* Padding between text and window border. */ +#else + int borderWidth; + int padX, padY; +#endif int relief; /* 3-d effect for border around entire widget: * TK_RELIEF_RAISED etc. */ - int highlightWidth; /* Width in pixels of highlight to draw around +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *highlightWidthObj; /* Width in pixels of highlight to draw around * widget when it has the focus. <= 0 means * don't draw a highlight. */ +#else + int highlightWidth; +#endif XColor *highlightBgColorPtr; /* Color for drawing traversal highlight area * when highlight is off. */ @@ -728,13 +691,17 @@ typedef struct TkText { * font. */ int charHeight; /* Height of average character in default * font, including line spacing. */ - int spacing1; /* Default extra spacing above first display +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *spacing1Obj; /* Default extra spacing above first display * line for each text line. */ - int spacing2; /* Default extra spacing between display lines + Tcl_Obj *spacing2Obj; /* Default extra spacing between display lines * for the same text line. */ - int spacing3; /* Default extra spacing below last display + Tcl_Obj *spacing3Obj; /* Default extra spacing below last display * line for each text line. */ - Tcl_Obj *tabOptionPtr; /* Value of -tabs option string. */ +#else + int spacing1, spacing2, spacing3; +#endif + Tcl_Obj *tabOptionObj; /* Value of -tabs option string. */ TkTextTabArray *tabArrayPtr; /* Information about tab stops (malloc'ed). * NULL means perform default tabbing @@ -749,8 +716,12 @@ typedef struct TkText { * TEXT_WRAPMODE_CHAR, TEXT_WRAPMODE_NONE, or * TEXT_WRAPMODE_WORD, or TEXT_WRAPMODE_NULL to * use wrapmode for whole widget. */ - int width, height; /* Desired dimensions for window, measured in - * characters. */ + int width; /* Desired dimensions for window, measured in characters */ +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *heightObj; +#else + int height; +#endif int setGrid; /* Non-zero means pass gridding information to * window manager. */ int prevWidth, prevHeight; /* Last known dimensions of window; used to @@ -773,8 +744,10 @@ typedef struct TkText { /* Border and background for selected * characters when they don't have the * focus. */ - int selBorderWidth; /* Width of border around selection. */ - Tcl_Obj *selBorderWidthPtr; /* Width of border around selection. */ +#if TK_MAJOR_VERSION < 8 + int selBorderWidth; +#endif + Tcl_Obj *selBorderWidthObj; /* Width of border around selection. */ XColor *selFgColorPtr; /* Foreground color for selected text. This is * a copy of information in *selTagPtr, so it * shouldn't be explicitly freed. */ @@ -793,8 +766,12 @@ typedef struct TkText { /* Points to segment for "insert" mark. */ Tk_3DBorder insertBorder; /* Used to draw vertical bar for insertion * cursor. */ - int insertWidth; /* Total width of insert cursor. */ - int insertBorderWidth; /* Width of 3-D border around insert cursor */ +#if TK_MAJOR_VERSION > 8 + Tcl_Obj *insertWidthObj; /* Total width of insert cursor. */ + Tcl_Obj *insertBorderWidthObj; /* Width of 3-D border around insert cursor */ +#else + int insertWidth, insertBorderWidth; +#endif TkTextInsertUnfocussed insertUnfocussed; /* How to display the insert cursor when the * text widget does not have the focus. */ @@ -825,19 +802,13 @@ typedef struct TkText { * Miscellaneous additional information: */ -#if TK_MAJOR_VERSION > 8 Tcl_Obj *takeFocusObj; /* Value of -takeFocus option; not used in the * C code, but used by keyboard traversal - * scripts. Malloc'ed, but may be NULL. */ + * scripts. May be NULL. */ Tcl_Obj *xScrollCmdObj; /* Prefix of command to issue to update - * horizontal scrollbar when view changes. */ + * horizontal scrollbar when view changes. May be NULL. */ Tcl_Obj *yScrollCmdObj; /* Prefix of command to issue to update - * vertical scrollbar when view changes. */ -#else - char *takeFocus; - char *xScrollCmd; - char *yScrollCmd; -#endif + * vertical scrollbar when view changes. May be NULL. */ int flags; /* Miscellaneous flags; see below for * definitions. */ Tk_OptionTable optionTable; /* Token representing the configuration @@ -860,7 +831,7 @@ typedef struct TkText { int autoSeparators; /* Non-zero means the separators will be * inserted automatically. */ Tcl_Obj *afterSyncCmd; /* Command to be executed when lines are up to - * date */ + * date */ } TkText; /* diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c index 4810b30..7a65ee1 100644 --- a/generic/tkTextBTree.c +++ b/generic/tkTextBTree.c @@ -2019,32 +2019,32 @@ TkBTreeLinesTo( } } if (textPtr != NULL) { - /* - * The index to return must be relative to textPtr, not to the entire - * tree. Take care to never return a negative index when linePtr - * denotes a line before -startline, or an index larger than the - * number of lines in textPtr when linePtr is a line past -endline. - */ - - int indexStart, indexEnd; - - if (textPtr->start != NULL) { - indexStart = TkBTreeLinesTo(NULL, textPtr->start); - } else { - indexStart = 0; - } - if (textPtr->end != NULL) { - indexEnd = TkBTreeLinesTo(NULL, textPtr->end); - } else { - indexEnd = TkBTreeNumLines(textPtr->sharedTextPtr->tree, NULL); - } - if (index < indexStart) { - index = 0; - } else if (index > indexEnd) { - index = TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr); - } else { - index -= indexStart; - } + /* + * The index to return must be relative to textPtr, not to the entire + * tree. Take care to never return a negative index when linePtr + * denotes a line before -startline, or an index larger than the + * number of lines in textPtr when linePtr is a line past -endline. + */ + + int indexStart, indexEnd; + + if (textPtr->start != NULL) { + indexStart = TkBTreeLinesTo(NULL, textPtr->start); + } else { + indexStart = 0; + } + if (textPtr->end != NULL) { + indexEnd = TkBTreeLinesTo(NULL, textPtr->end); + } else { + indexEnd = TkBTreeNumLines(textPtr->sharedTextPtr->tree, NULL); + } + if (index < indexStart) { + index = 0; + } else if (index > indexEnd) { + index = TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr); + } else { + index -= indexStart; + } } return index; } diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index 905a4c6..185681f 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -24,8 +24,6 @@ #include "tkMacOSXInt.h" #endif -#define OK_TO_LOG (!TkpWillDrawWidget(textPtr->tkwin)) - /* * "Calculations of line pixel heights and the size of the vertical * scrollbar." @@ -142,7 +140,7 @@ typedef struct StyleValues { int overstrike; /* Non-zero means draw overstrike through * text. */ XColor *overstrikeColor; /* Foreground color for overstrike through - * text. */ + * text. */ int rMargin; /* Right margin, in pixels. */ Tk_3DBorder rMarginColor; /* Color of right margin. */ int spacing1; /* Spacing above first dline in text line. */ @@ -155,7 +153,7 @@ typedef struct StyleValues { int underline; /* Non-zero means draw underline underneath * text. */ XColor *underlineColor; /* Foreground color for underline underneath - * text. */ + * text. */ int elide; /* Zero means draw text, otherwise not. */ TkWrapMode wrapMode; /* How to handle wrap-around for this tag. * One of TEXT_WRAPMODE_CHAR, @@ -205,20 +203,13 @@ typedef struct TextStyle { /* * Macros to make debugging/testing logging a little easier. - * - * On OSX 10.14 Drawing procedures are sometimes run because the system has - * decided to redraw the window. This can corrupt the data that a test is - * trying to collect. So we don't write to the logging variables when the - * drawing procedure is being run that way. Other systems can always log. */ #define LOG(toVar,what) \ - if (OK_TO_LOG) \ - Tcl_SetVar2(textPtr->interp, toVar, NULL, (what), \ - TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT) + Tcl_SetVar2(textPtr->interp, toVar, NULL, (what), \ + TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT) #define CLEAR(var) \ - if (OK_TO_LOG) \ - Tcl_SetVar2(interp, var, NULL, "", TCL_GLOBAL_ONLY) + Tcl_SetVar2(interp, var, NULL, "", TCL_GLOBAL_ONLY) /* * The following structure describes one line of the display, which may be @@ -255,11 +246,11 @@ typedef struct DLine { Tk_3DBorder lMarginColor; /* Background color of the area corresponding * to the left margin of the display line. */ int lMarginWidth; /* Pixel width of the area corresponding to - * the left margin. */ + * the left margin. */ Tk_3DBorder rMarginColor; /* Background color of the area corresponding * to the right margin of the display line. */ int rMarginWidth; /* Pixel width of the area corresponding to - * the right margin. */ + * the right margin. */ int length; /* Total length of line, in pixels. */ TkTextDispChunk *chunkPtr; /* Pointer to first chunk in list of all of * those that are displayed on this line of @@ -573,7 +564,7 @@ static void DisplayLineBackground(TkText *textPtr, DLine *dlPtr, DLine *prevPtr, Pixmap pixmap); static void DisplayText(void *clientData); static DLine * FindDLine(TkText *textPtr, DLine *dlPtr, - const TkTextIndex *indexPtr); + const TkTextIndex *indexPtr); static void FreeDLines(TkText *textPtr, DLine *firstPtr, DLine *lastPtr, int action); static void FreeStyle(TkText *textPtr, TextStyle *stylePtr); @@ -622,7 +613,7 @@ static void AsyncUpdateLineMetrics(void *clientData); static void GenerateWidgetViewSyncEvent(TkText *textPtr, Bool InSync); static void AsyncUpdateYScrollbar(void *clientData); static int IsStartOfNotMergedLine(const TkText *textPtr, - const TkTextIndex *indexPtr); + const TkTextIndex *indexPtr); /* * Result values returned by TextGetScrollInfoObj: @@ -813,9 +804,9 @@ GetStyle( styleValues.overstrikeColor = textPtr->fgColor; styleValues.tkfont = textPtr->tkfont; styleValues.justify = TK_JUSTIFY_LEFT; - styleValues.spacing1 = textPtr->spacing1; - styleValues.spacing2 = textPtr->spacing2; - styleValues.spacing3 = textPtr->spacing3; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->spacing1Obj, &styleValues.spacing1); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->spacing2Obj, &styleValues.spacing2); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->spacing3Obj, &styleValues.spacing3); styleValues.tabArrayPtr = textPtr->tabArrayPtr; styleValues.tabStyle = textPtr->tabStyle; styleValues.wrapMode = textPtr->wrapMode; @@ -823,19 +814,19 @@ GetStyle( isSelected = 0; for (i = 0 ; i < numTags; i++) { - if (textPtr->selTagPtr == tagPtrs[i]) { - isSelected = 1; - break; - } + if (textPtr->selTagPtr == tagPtrs[i]) { + isSelected = 1; + break; + } } for (i = 0 ; i < numTags; i++) { Tk_3DBorder border; - XColor *fgColor; + XColor *fgColor; tagPtr = tagPtrs[i]; border = tagPtr->border; - fgColor = tagPtr->fgColor; + fgColor = tagPtr->fgColor; /* * If this is the selection tag, and inactiveSelBorder is NULL (the @@ -855,22 +846,22 @@ GetStyle( border = textPtr->inactiveSelBorder; } - if ((tagPtr->selBorder != NULL) && (isSelected)) { - border = tagPtr->selBorder; - } + if ((tagPtr->selBorder != NULL) && (isSelected)) { + border = tagPtr->selBorder; + } - if ((tagPtr->selFgColor != NULL) && isSelected) { - fgColor = tagPtr->selFgColor; - } + if ((tagPtr->selFgColor != NULL) && isSelected) { + fgColor = tagPtr->selFgColor; + } if ((border != NULL) && (tagPtr->priority > borderPrio)) { styleValues.border = border; borderPrio = tagPtr->priority; } - if ((tagPtr->borderWidthPtr != NULL) - && (Tcl_GetString(tagPtr->borderWidthPtr)[0] != '\0') + if ((tagPtr->borderWidthObj != NULL) + && (Tcl_GetString(tagPtr->borderWidthObj)[0] != '\0') && (tagPtr->priority > borderWidthPrio)) { - styleValues.borderWidth = tagPtr->borderWidth; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, tagPtr->borderWidthObj, &styleValues.borderWidth); borderWidthPrio = tagPtr->priority; } if ((tagPtr->relief != TK_RELIEF_NULL) @@ -904,14 +895,14 @@ GetStyle( styleValues.justify = tagPtr->justify; justifyPrio = tagPtr->priority; } - if ((tagPtr->lMargin1 != INT_MIN) + if ((tagPtr->lMargin1Obj != NULL) && (tagPtr->priority > lMargin1Prio)) { - styleValues.lMargin1 = tagPtr->lMargin1; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, tagPtr->lMargin1Obj, &styleValues.lMargin1); lMargin1Prio = tagPtr->priority; } - if ((tagPtr->lMargin2 != INT_MIN) + if ((tagPtr->lMargin2Obj != NULL) && (tagPtr->priority > lMargin2Prio)) { - styleValues.lMargin2 = tagPtr->lMargin2; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, tagPtr->lMargin2Obj, &styleValues.lMargin2); lMargin2Prio = tagPtr->priority; } if ((tagPtr->lMarginColor != NULL) @@ -919,24 +910,24 @@ GetStyle( styleValues.lMarginColor = tagPtr->lMarginColor; lMarginColorPrio = tagPtr->priority; } - if ((tagPtr->offset != INT_MIN) + if ((tagPtr->offsetObj != NULL) && (tagPtr->priority > offsetPrio)) { - styleValues.offset = tagPtr->offset; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, tagPtr->offsetObj, &styleValues.offset); offsetPrio = tagPtr->priority; } if ((tagPtr->overstrike >= 0) && (tagPtr->priority > overstrikePrio)) { styleValues.overstrike = tagPtr->overstrike > 0; overstrikePrio = tagPtr->priority; - if (tagPtr->overstrikeColor != NULL) { - styleValues.overstrikeColor = tagPtr->overstrikeColor; - } else if (fgColor != NULL) { - styleValues.overstrikeColor = fgColor; - } + if (tagPtr->overstrikeColor != NULL) { + styleValues.overstrikeColor = tagPtr->overstrikeColor; + } else if (fgColor != NULL) { + styleValues.overstrikeColor = fgColor; + } } - if ((tagPtr->rMargin != INT_MIN) + if ((tagPtr->rMarginObj != NULL) && (tagPtr->priority > rMarginPrio)) { - styleValues.rMargin = tagPtr->rMargin; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, tagPtr->rMarginObj, &styleValues.rMargin); rMarginPrio = tagPtr->priority; } if ((tagPtr->rMarginColor != NULL) @@ -944,19 +935,19 @@ GetStyle( styleValues.rMarginColor = tagPtr->rMarginColor; rMarginColorPrio = tagPtr->priority; } - if ((tagPtr->spacing1 != INT_MIN) + if ((tagPtr->spacing1Obj != NULL) && (tagPtr->priority > spacing1Prio)) { - styleValues.spacing1 = tagPtr->spacing1; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, tagPtr->spacing1Obj, &styleValues.spacing1); spacing1Prio = tagPtr->priority; } - if ((tagPtr->spacing2 != INT_MIN) + if ((tagPtr->spacing2Obj != NULL) && (tagPtr->priority > spacing2Prio)) { - styleValues.spacing2 = tagPtr->spacing2; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, tagPtr->spacing2Obj, &styleValues.spacing2); spacing2Prio = tagPtr->priority; } - if ((tagPtr->spacing3 != INT_MIN) + if ((tagPtr->spacing3Obj != NULL) && (tagPtr->priority > spacing3Prio)) { - styleValues.spacing3 = tagPtr->spacing3; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, tagPtr->spacing3Obj, &styleValues.spacing3); spacing3Prio = tagPtr->priority; } if ((tagPtr->tabStringPtr != NULL) @@ -974,19 +965,19 @@ GetStyle( && (tagPtr->priority > underlinePrio)) { styleValues.underline = tagPtr->underline > 0; underlinePrio = tagPtr->priority; - if (tagPtr->underlineColor != NULL) { - styleValues.underlineColor = tagPtr->underlineColor; - } else if (fgColor != NULL) { - styleValues.underlineColor = fgColor; - } + if (tagPtr->underlineColor != NULL) { + styleValues.underlineColor = tagPtr->underlineColor; + } else if (fgColor != NULL) { + styleValues.underlineColor = fgColor; + } } if ((tagPtr->elide >= 0) && (tagPtr->priority > elidePrio)) { styleValues.elide = tagPtr->elide > 0; elidePrio = tagPtr->priority; } - if ((tagPtr->wrapMode != TEXT_WRAPMODE_NULL) - && (tagPtr->priority > wrapPrio)) { + if (((tagPtr->wrapMode == TEXT_WRAPMODE_CHAR) || (tagPtr->wrapMode == TEXT_WRAPMODE_NONE) + || (tagPtr->wrapMode == TEXT_WRAPMODE_WORD)) && (tagPtr->priority > wrapPrio)) { styleValues.wrapMode = tagPtr->wrapMode; wrapPrio = tagPtr->priority; } @@ -1476,7 +1467,7 @@ LayoutDLine( x = chunkPtr->stylePtr->sValuePtr->lMargin2; } - dlPtr->lMarginWidth = x; + dlPtr->lMarginWidth = x; if (wrapMode == TEXT_WRAPMODE_NONE) { maxX = -1; } else { @@ -1791,7 +1782,7 @@ LayoutDLine( dlPtr->lMarginColor = sValuePtr->lMarginColor; dlPtr->rMarginColor = sValuePtr->rMarginColor; if (wrapMode != TEXT_WRAPMODE_NONE) { - dlPtr->rMarginWidth = rMargin; + dlPtr->rMarginWidth = rMargin; } /* @@ -2099,9 +2090,9 @@ UpdateDisplayInfo( * widget. */ - lineNum = TkBTreeNumLines(textPtr->sharedTextPtr->tree, - textPtr) - 1; - bytesToCount = INT_MAX; + lineNum = TkBTreeNumLines(textPtr->sharedTextPtr->tree, + textPtr) - 1; + bytesToCount = INT_MAX; } else { lineNum = TkBTreeLinesTo(textPtr, dInfoPtr->dLinePtr->index.linePtr); @@ -2488,14 +2479,14 @@ DisplayDLine( * Third, draw the background color of the left and right margins. */ if (dlPtr->lMarginColor != NULL) { - Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->lMarginColor, 0, y, - dlPtr->lMarginWidth + dInfoPtr->x - dInfoPtr->curXPixelOffset, - dlPtr->height, 0, TK_RELIEF_FLAT); + Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->lMarginColor, 0, y, + dlPtr->lMarginWidth + dInfoPtr->x - dInfoPtr->curXPixelOffset, + dlPtr->height, 0, TK_RELIEF_FLAT); } if (dlPtr->rMarginColor != NULL) { - Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->rMarginColor, - dInfoPtr->maxX - dlPtr->rMarginWidth + dInfoPtr->curXPixelOffset, - y, dlPtr->rMarginWidth, dlPtr->height, 0, TK_RELIEF_FLAT); + Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->rMarginColor, + dInfoPtr->maxX - dlPtr->rMarginWidth + dInfoPtr->curXPixelOffset, + y, dlPtr->rMarginWidth, dlPtr->height, 0, TK_RELIEF_FLAT); } /* @@ -2720,15 +2711,15 @@ DisplayLineBackground( rightX = leftX + 32767; } - /* - * Prevent the borders from leaking on adjacent characters, - * which would happen for too large border width. - */ + /* + * Prevent the borders from leaking on adjacent characters, + * which would happen for too large border width. + */ - bw = sValuePtr->borderWidth; - if (leftX + sValuePtr->borderWidth > rightX) { - bw = rightX - leftX; - } + bw = sValuePtr->borderWidth; + if (leftX + sValuePtr->borderWidth > rightX) { + bw = rightX - leftX; + } XFillRectangle(display, pixmap, chunkPtr->stylePtr->bgGC, leftX + xOffset, y, (unsigned int) (rightX - leftX), @@ -2835,23 +2826,23 @@ DisplayLineBackground( matchRight = (nextPtr2 != NULL) && SAME_BACKGROUND(nextPtr2->stylePtr, chunkPtr->stylePtr); if (matchLeft && !matchRight) { - bw = sValuePtr->borderWidth; - if (rightX2 - sValuePtr->borderWidth < leftX) { - bw = rightX2 - leftX; - } + bw = sValuePtr->borderWidth; + if (rightX2 - sValuePtr->borderWidth < leftX) { + bw = rightX2 - leftX; + } if (sValuePtr->relief != TK_RELIEF_FLAT) { Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, rightX2 - bw + xOffset, y, bw, sValuePtr->borderWidth, 0, sValuePtr->relief); } - leftX = rightX2 - bw; + leftX = rightX2 - bw; leftXIn = 0; } else if (!matchLeft && matchRight && (sValuePtr->relief != TK_RELIEF_FLAT)) { - bw = sValuePtr->borderWidth; - if (rightX2 + sValuePtr->borderWidth > rightX) { - bw = rightX - rightX2; - } + bw = sValuePtr->borderWidth; + if (rightX2 + sValuePtr->borderWidth > rightX) { + bw = rightX - rightX2; + } Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, rightX2 + xOffset, y, bw, sValuePtr->borderWidth, 1, sValuePtr->relief); @@ -2945,10 +2936,10 @@ DisplayLineBackground( matchRight = (nextPtr2 != NULL) && SAME_BACKGROUND(nextPtr2->stylePtr, chunkPtr->stylePtr); if (matchLeft && !matchRight) { - bw = sValuePtr->borderWidth; - if (rightX2 - sValuePtr->borderWidth < leftX) { - bw = rightX2 - leftX; - } + bw = sValuePtr->borderWidth; + if (rightX2 - sValuePtr->borderWidth < leftX) { + bw = rightX2 - leftX; + } if (sValuePtr->relief != TK_RELIEF_FLAT) { Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, rightX2 - bw + xOffset, @@ -2959,10 +2950,10 @@ DisplayLineBackground( leftXIn = 1; } else if (!matchLeft && matchRight && (sValuePtr->relief != TK_RELIEF_FLAT)) { - bw = sValuePtr->borderWidth; - if (rightX2 + sValuePtr->borderWidth > rightX) { - bw = rightX - rightX2; - } + bw = sValuePtr->borderWidth; + if (rightX2 + sValuePtr->borderWidth > rightX) { + bw = rightX - rightX2; + } Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, rightX2 + xOffset, y + dlPtr->height - sValuePtr->borderWidth, bw, @@ -3022,7 +3013,7 @@ AsyncUpdateLineMetrics( dInfoPtr->lineUpdateTimer = NULL; if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED) - || !Tk_IsMapped(textPtr->tkwin)) { + || !Tk_IsMapped(textPtr->tkwin)) { /* * The widget has been deleted, or is not mapped. Don't do anything. */ @@ -3082,27 +3073,27 @@ AsyncUpdateLineMetrics( * after the afterSyncCmd pointer had been set to NULL. */ - if (textPtr->afterSyncCmd) { - int code; + if (textPtr->afterSyncCmd) { + int code; Tcl_CancelIdleCall(TkTextRunAfterSyncCmd, textPtr); - Tcl_Preserve(textPtr->interp); - code = Tcl_EvalObjEx(textPtr->interp, textPtr->afterSyncCmd, - TCL_EVAL_GLOBAL); + Tcl_Preserve(textPtr->interp); + code = Tcl_EvalObjEx(textPtr->interp, textPtr->afterSyncCmd, + TCL_EVAL_GLOBAL); if (code == TCL_ERROR) { - Tcl_AddErrorInfo(textPtr->interp, "\n (text sync)"); - Tcl_BackgroundException(textPtr->interp, TCL_ERROR); + Tcl_AddErrorInfo(textPtr->interp, "\n (text sync)"); + Tcl_BackgroundException(textPtr->interp, TCL_ERROR); } - Tcl_Release(textPtr->interp); - Tcl_DecrRefCount(textPtr->afterSyncCmd); - textPtr->afterSyncCmd = NULL; + Tcl_Release(textPtr->interp); + Tcl_DecrRefCount(textPtr->afterSyncCmd); + textPtr->afterSyncCmd = NULL; } - /* - * Fire the <<WidgetViewSync>> event since the widget view is in sync - * with its internal data (actually it will be after the next trip - * through the event loop, because the widget redraws at idle-time). - */ - GenerateWidgetViewSyncEvent(textPtr, 1); + /* + * Fire the <<WidgetViewSync>> event since the widget view is in sync + * with its internal data (actually it will be after the next trip + * through the event loop, because the widget redraws at idle-time). + */ + GenerateWidgetViewSyncEvent(textPtr, 1); if (textPtr->refCount-- <= 1) { ckfree(textPtr); @@ -3218,8 +3209,8 @@ TkTextUpdateLineMetrics( int count = 0; int totalLines = TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr); int fullUpdateRequested = (lineNum == 0 && - endLine == totalLines && - doThisMuch == -1); + endLine == totalLines && + doThisMuch == -1); if (totalLines == 0) { /* @@ -3398,7 +3389,7 @@ TkTextUpdateLineMetrics( GetYView(textPtr->interp, textPtr, 1); } if (fullUpdateRequested) { - GenerateWidgetViewSyncEvent(textPtr, 1); + GenerateWidgetViewSyncEvent(textPtr, 1); } return lineNum; } @@ -3774,24 +3765,24 @@ CalculateDisplayLineHeight( int pixelHeight; if (tkTextDebug) { - int oldtkTextDebug = tkTextDebug; - /* - * Check that the indexPtr we are given really is at the start of a - * display line. The gymnastics with tkTextDebug is to prevent - * failure of a test suite test, that checks that lines are rendered - * exactly once. TkTextFindDisplayLineEnd is used here for checking - * indexPtr but it calls LayoutDLine/FreeDLine which makes the - * counting wrong. The debug mode shall therefore be switched off - * when calling TkTextFindDisplayLineEnd. - */ - - TkTextIndex indexPtr2 = *indexPtr; - tkTextDebug = 0; - TkTextFindDisplayLineEnd(textPtr, &indexPtr2, 0, NULL); - tkTextDebug = oldtkTextDebug; - if (TkTextIndexCmp(&indexPtr2,indexPtr) != 0) { - Tcl_Panic("CalculateDisplayLineHeight called with bad indexPtr"); - } + int oldtkTextDebug = tkTextDebug; + /* + * Check that the indexPtr we are given really is at the start of a + * display line. The gymnastics with tkTextDebug is to prevent + * failure of a test suite test, that checks that lines are rendered + * exactly once. TkTextFindDisplayLineEnd is used here for checking + * indexPtr but it calls LayoutDLine/FreeDLine which makes the + * counting wrong. The debug mode shall therefore be switched off + * when calling TkTextFindDisplayLineEnd. + */ + + TkTextIndex indexPtr2 = *indexPtr; + tkTextDebug = 0; + TkTextFindDisplayLineEnd(textPtr, &indexPtr2, 0, NULL); + tkTextDebug = oldtkTextDebug; + if (TkTextIndexCmp(&indexPtr2,indexPtr) != 0) { + Tcl_Panic("CalculateDisplayLineHeight called with bad indexPtr"); + } } /* @@ -3870,12 +3861,12 @@ TkTextIndexYPixels( index = *indexPtr; while (1) { - TkTextFindDisplayLineEnd(textPtr, &index, 0, NULL); - if (index.byteIndex == 0) { - break; - } - TkTextIndexBackBytes(textPtr, &index, 1, &index); - alreadyStartOfLine = 0; + TkTextFindDisplayLineEnd(textPtr, &index, 0, NULL); + if (index.byteIndex == 0) { + break; + } + TkTextIndexBackBytes(textPtr, &index, 1, &index); + alreadyStartOfLine = 0; } pixelHeight = TkBTreePixelsTo(textPtr, index.linePtr); @@ -3887,7 +3878,7 @@ TkTextIndexYPixels( */ if (alreadyStartOfLine) { - return pixelHeight; + return pixelHeight; } /* @@ -3909,10 +3900,10 @@ TkTextIndexYPixels( height = CalculateDisplayLineHeight(textPtr, &index, &bytes, NULL); - TkTextIndexForwBytes(textPtr, &index, bytes, &index); + TkTextIndexForwBytes(textPtr, &index, bytes, &index); - compare = TkTextIndexCmp(&index,indexPtr); - if (compare > 0) { + compare = TkTextIndexCmp(&index,indexPtr); + if (compare > 0) { return pixelHeight; } @@ -3920,7 +3911,7 @@ TkTextIndexYPixels( pixelHeight += height; } - if (compare == 0) { + if (compare == 0) { return pixelHeight; } } @@ -4020,7 +4011,7 @@ TkTextUpdateOneLine( * test below this while loop. */ - height = CalculateDisplayLineHeight(textPtr, indexPtr, &bytes, + height = CalculateDisplayLineHeight(textPtr, indexPtr, &bytes, &logicalLines); if (height > 0) { @@ -4034,31 +4025,31 @@ TkTextUpdateOneLine( break; } - if (mergedLines == 0) { - if (indexPtr->linePtr != linePtr) { - /* - * If we reached the end of the logical line, then either way - * we don't have a partial calculation. - */ - - partialCalc = 0; - break; - } - } else { - if (IsStartOfNotMergedLine(textPtr, indexPtr)) { - /* - * We've ended a logical line. - */ - - partialCalc = 0; - break; - } - - /* - * We must still be on the same wrapped line, on a new logical - * line merged with the logical line 'linePtr'. - */ - } + if (mergedLines == 0) { + if (indexPtr->linePtr != linePtr) { + /* + * If we reached the end of the logical line, then either way + * we don't have a partial calculation. + */ + + partialCalc = 0; + break; + } + } else { + if (IsStartOfNotMergedLine(textPtr, indexPtr)) { + /* + * We've ended a logical line. + */ + + partialCalc = 0; + break; + } + + /* + * We must still be on the same wrapped line, on a new logical + * line merged with the logical line 'linePtr'. + */ + } if (partialCalc && displayLines > 50 && mergedLines == 0) { /* * Only calculate 50 display lines at a time, to avoid huge @@ -4182,6 +4173,8 @@ DisplayText( int bottomY = 0; /* Initialization needed only to stop compiler * warnings. */ Tcl_Interp *interp; + int padX, padY; + int borderWidth, highlightWidth; if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) { @@ -4192,22 +4185,6 @@ DisplayText( return; } -#ifdef MAC_OSX_TK - /* - * If the toplevel is being resized it would be dangerous to try redrawing - * the widget. But we can just clear the REDRAW_PENDING flag and return. - * This display proc will be called again after the widget has been - * reconfigured. - */ - - TkWindow *winPtr = (TkWindow *)(textPtr->tkwin); - MacDrawable *macWin = winPtr->privatePtr; - if (macWin && (macWin->flags & TK_DO_NOT_DRAW)){ - dInfoPtr->flags &= ~REDRAW_PENDING; - return; - } -#endif - interp = textPtr->interp; Tcl_Preserve(interp); @@ -4391,6 +4368,9 @@ DisplayText( dInfoPtr->flags &= ~REDRAW_PENDING; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->padYObj, &padY); + /* * Redraw the borders if that's needed. */ @@ -4408,13 +4388,15 @@ DisplayText( goto end; } + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->highlightWidthObj, &highlightWidth); Tk_Draw3DRectangle(textPtr->tkwin, Tk_WindowId(textPtr->tkwin), - textPtr->border, textPtr->highlightWidth, - textPtr->highlightWidth, - Tk_Width(textPtr->tkwin) - 2*textPtr->highlightWidth, - Tk_Height(textPtr->tkwin) - 2*textPtr->highlightWidth, - textPtr->borderWidth, textPtr->relief); - if (textPtr->highlightWidth > 0) { + textPtr->border, highlightWidth, + highlightWidth, + Tk_Width(textPtr->tkwin) - 2 * highlightWidth, + Tk_Height(textPtr->tkwin) - 2 * highlightWidth, + borderWidth, textPtr->relief); + if (highlightWidth > 0) { GC fgGC, bgGC; bgGC = Tk_GCForColor(textPtr->highlightBgColorPtr, @@ -4423,35 +4405,35 @@ DisplayText( fgGC = Tk_GCForColor(textPtr->highlightColorPtr, Tk_WindowId(textPtr->tkwin)); Tk_DrawHighlightBorder(textPtr->tkwin, fgGC, bgGC, - textPtr->highlightWidth, Tk_WindowId(textPtr->tkwin)); + highlightWidth, Tk_WindowId(textPtr->tkwin)); } else { Tk_DrawHighlightBorder(textPtr->tkwin, bgGC, bgGC, - textPtr->highlightWidth, Tk_WindowId(textPtr->tkwin)); + highlightWidth, Tk_WindowId(textPtr->tkwin)); } } - borders = textPtr->borderWidth + textPtr->highlightWidth; - if (textPtr->padY > 0) { + borders = borderWidth + highlightWidth; + if (padY > 0) { Tk_Fill3DRectangle(textPtr->tkwin, Tk_WindowId(textPtr->tkwin), textPtr->border, borders, borders, - Tk_Width(textPtr->tkwin) - 2*borders, textPtr->padY, + Tk_Width(textPtr->tkwin) - 2 * borders, padY, 0, TK_RELIEF_FLAT); Tk_Fill3DRectangle(textPtr->tkwin, Tk_WindowId(textPtr->tkwin), textPtr->border, borders, - Tk_Height(textPtr->tkwin) - borders - textPtr->padY, - Tk_Width(textPtr->tkwin) - 2*borders, - textPtr->padY, 0, TK_RELIEF_FLAT); + Tk_Height(textPtr->tkwin) - borders - padY, + Tk_Width(textPtr->tkwin) - 2 * borders, + padY, 0, TK_RELIEF_FLAT); } - if (textPtr->padX > 0) { + if (padX > 0) { Tk_Fill3DRectangle(textPtr->tkwin, Tk_WindowId(textPtr->tkwin), - textPtr->border, borders, borders + textPtr->padY, - textPtr->padX, - Tk_Height(textPtr->tkwin) - 2*borders -2*textPtr->padY, + textPtr->border, borders, borders + padY, + padX, + Tk_Height(textPtr->tkwin) - 2 * borders -2 * padY, 0, TK_RELIEF_FLAT); Tk_Fill3DRectangle(textPtr->tkwin, Tk_WindowId(textPtr->tkwin), textPtr->border, - Tk_Width(textPtr->tkwin) - borders - textPtr->padX, - borders + textPtr->padY, textPtr->padX, - Tk_Height(textPtr->tkwin) - 2*borders -2*textPtr->padY, + Tk_Width(textPtr->tkwin) - borders - padX, + borders + padY, padX, + Tk_Height(textPtr->tkwin) - 2 * borders -2 * padY, 0, TK_RELIEF_FLAT); } dInfoPtr->flags &= ~REDRAW_BORDERS; @@ -4634,8 +4616,8 @@ DisplayText( } Tk_Fill3DRectangle(textPtr->tkwin, Tk_WindowId(textPtr->tkwin), - textPtr->border, dInfoPtr->x - textPtr->padX, bottomY, - dInfoPtr->maxX - (dInfoPtr->x - textPtr->padX), + textPtr->border, dInfoPtr->x - padX, bottomY, + dInfoPtr->maxX - (dInfoPtr->x - padX), dInfoPtr->topOfEof-bottomY, 0, TK_RELIEF_FLAT); } dInfoPtr->topOfEof = bottomY; @@ -4779,6 +4761,8 @@ TextInvalidateRegion( TextDInfo *dInfoPtr = textPtr->dInfoPtr; int maxY, inset; XRectangle rect; + int padX, padY; + int borderWidth, highlightWidth; /* * Find all lines that overlap the given region and mark them for @@ -4799,12 +4783,16 @@ TextInvalidateRegion( dInfoPtr->topOfEof = maxY; } - inset = textPtr->borderWidth + textPtr->highlightWidth; - if ((rect.x < (inset + textPtr->padX)) - || (rect.y < (inset + textPtr->padY)) + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->padYObj, &padY); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->highlightWidthObj, &highlightWidth); + inset = borderWidth + highlightWidth; + if ((rect.x < (inset + padX)) + || (rect.y < (inset + padY)) || ((int) (rect.x + rect.width) > (Tk_Width(textPtr->tkwin) - - inset - textPtr->padX)) - || (maxY > (Tk_Height(textPtr->tkwin) - inset - textPtr->padY))) { + - inset - padX)) + || (maxY > (Tk_Height(textPtr->tkwin) - inset - padY))) { dInfoPtr->flags |= REDRAW_BORDERS; } } @@ -4906,8 +4894,8 @@ TextChanged( rounded.byteIndex = 0; notBegin = 0; while (!IsStartOfNotMergedLine(textPtr, &rounded) && notBegin) { - notBegin = !TkTextIndexBackBytes(textPtr, &rounded, 1, &rounded); - rounded.byteIndex = 0; + notBegin = !TkTextIndexBackBytes(textPtr, &rounded, 1, &rounded); + rounded.byteIndex = 0; } /* @@ -4919,11 +4907,11 @@ TextChanged( firstPtr = FindDLine(textPtr, dInfoPtr->dLinePtr, &rounded); if (firstPtr == NULL) { - /* - * index1Ptr pertains to no display line, i.e this index is after - * the last display line. Since index2Ptr is after index1Ptr, there - * is no display line to free/redisplay and we can return early. - */ + /* + * index1Ptr pertains to no display line, i.e this index is after + * the last display line. Since index2Ptr is after index1Ptr, there + * is no display line to free/redisplay and we can return early. + */ return; } @@ -4931,38 +4919,38 @@ TextChanged( rounded = *index2Ptr; linePtr = index2Ptr->linePtr; do { - linePtr = TkBTreeNextLine(textPtr, linePtr); - if (linePtr == NULL) { - break; - } - rounded.linePtr = linePtr; - rounded.byteIndex = 0; + linePtr = TkBTreeNextLine(textPtr, linePtr); + if (linePtr == NULL) { + break; + } + rounded.linePtr = linePtr; + rounded.byteIndex = 0; } while (!IsStartOfNotMergedLine(textPtr, &rounded)); if (linePtr == NULL) { - lastPtr = NULL; + lastPtr = NULL; } else { - /* - * 'rounded' now points to the start of a display line as well as the - * start of a logical line not merged with its previous line, and - * this index is the closest after index2Ptr. - */ + /* + * 'rounded' now points to the start of a display line as well as the + * start of a logical line not merged with its previous line, and + * this index is the closest after index2Ptr. + */ - lastPtr = FindDLine(textPtr, dInfoPtr->dLinePtr, &rounded); + lastPtr = FindDLine(textPtr, dInfoPtr->dLinePtr, &rounded); - /* - * At least one display line is supposed to change. This makes the - * redisplay OK in case the display line we expect to get here was - * unlinked by a previous call to TkTextChanged and the text widget - * did not update before reaching this point. This happens for - * instance when moving the cursor up one line. - * Note that lastPtr != NULL here, otherwise we would have returned - * earlier when we tested for firstPtr being NULL. - */ + /* + * At least one display line is supposed to change. This makes the + * redisplay OK in case the display line we expect to get here was + * unlinked by a previous call to TkTextChanged and the text widget + * did not update before reaching this point. This happens for + * instance when moving the cursor up one line. + * Note that lastPtr != NULL here, otherwise we would have returned + * earlier when we tested for firstPtr being NULL. + */ - if (lastPtr == firstPtr) { - lastPtr = lastPtr->nextPtr; - } + if (lastPtr == firstPtr) { + lastPtr = lastPtr->nextPtr; + } } /* @@ -5147,7 +5135,7 @@ TextRedrawTag( } else { TkTextIndex tmp = *curIndexPtr; - TkTextIndexBackBytes(textPtr, &tmp, 1, &tmp); + TkTextIndexBackBytes(textPtr, &tmp, 1, &tmp); dlPtr = FindDLine(textPtr, dlPtr, &tmp); } if (dlPtr == NULL) { @@ -5166,7 +5154,7 @@ TextRedrawTag( } endPtr = FindDLine(textPtr, dlPtr, endIndexPtr); if ((endPtr != NULL) - && (TkTextIndexCmp(&endPtr->index,endIndexPtr) < 0)) { + && (TkTextIndexCmp(&endPtr->index,endIndexPtr) < 0)) { endPtr = endPtr->nextPtr; } @@ -5219,6 +5207,8 @@ TkTextRelayoutWindow( GC newGC; XGCValues gcValues; Bool inSync = 1; + int padX, padY; + int borderWidth, highlightWidth; /* * Schedule the window redisplay. See TkTextChanged for the reason why @@ -5256,15 +5246,20 @@ TkTextRelayoutWindow( * it. */ - if (textPtr->highlightWidth < 0) { - textPtr->highlightWidth = 0; - } - dInfoPtr->x = textPtr->highlightWidth + textPtr->borderWidth - + textPtr->padX; - dInfoPtr->y = textPtr->highlightWidth + textPtr->borderWidth - + textPtr->padY; - dInfoPtr->maxX = Tk_Width(textPtr->tkwin) - textPtr->highlightWidth - - textPtr->borderWidth - textPtr->padX; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->padYObj, &padY); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth < 0) { + highlightWidth = 0; + Tcl_DecrRefCount(textPtr->highlightWidthObj); + textPtr->highlightWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(textPtr->highlightWidthObj); + } + dInfoPtr->x = highlightWidth + borderWidth + padX; + dInfoPtr->y = highlightWidth + borderWidth + padY; + dInfoPtr->maxX = Tk_Width(textPtr->tkwin) - highlightWidth + - borderWidth - padX; if (dInfoPtr->maxX <= dInfoPtr->x) { dInfoPtr->maxX = dInfoPtr->x + 1; } @@ -5273,8 +5268,8 @@ TkTextRelayoutWindow( * This is the only place where dInfoPtr->maxY is set. */ - dInfoPtr->maxY = Tk_Height(textPtr->tkwin) - textPtr->highlightWidth - - textPtr->borderWidth - textPtr->padY; + dInfoPtr->maxY = Tk_Height(textPtr->tkwin) - highlightWidth + - borderWidth - padY; if (dInfoPtr->maxY <= dInfoPtr->y) { dInfoPtr->maxY = dInfoPtr->y + 1; } @@ -5327,7 +5322,7 @@ TkTextRelayoutWindow( inSync = 0; } - GenerateWidgetViewSyncEvent(textPtr, inSync); + GenerateWidgetViewSyncEvent(textPtr, inSync); } } @@ -5403,9 +5398,9 @@ TkTextSetYView( */ textPtr->topIndex = *indexPtr; - if (!IsStartOfNotMergedLine(textPtr, indexPtr)) { - TkTextFindDisplayLineEnd(textPtr, &textPtr->topIndex, 0, NULL); - } + if (!IsStartOfNotMergedLine(textPtr, indexPtr)) { + TkTextFindDisplayLineEnd(textPtr, &textPtr->topIndex, 0, NULL); + } dInfoPtr->newTopPixelOffset = pickPlace; goto scheduleUpdate; } @@ -5428,23 +5423,23 @@ TkTextSetYView( */ dlPtr = NULL; - } else { - if (TkTextIndexCmp(&dlPtr->index, indexPtr) <= 0) { - if (dInfoPtr->dLinePtr == dlPtr && dInfoPtr->topPixelOffset != 0) { - /* - * It is on the top line, but that line is hanging off the top - * of the screen. Change the top overlap to zero and update. - */ - - dInfoPtr->newTopPixelOffset = 0; - goto scheduleUpdate; - } - /* - * The line is already on screen, with no need to scroll. - */ - return; - } - } + } else { + if (TkTextIndexCmp(&dlPtr->index, indexPtr) <= 0) { + if (dInfoPtr->dLinePtr == dlPtr && dInfoPtr->topPixelOffset != 0) { + /* + * It is on the top line, but that line is hanging off the top + * of the screen. Change the top overlap to zero and update. + */ + + dInfoPtr->newTopPixelOffset = 0; + goto scheduleUpdate; + } + /* + * The line is already on screen, with no need to scroll. + */ + return; + } + } } /* @@ -5509,7 +5504,7 @@ TkTextSetYView( */ if (dInfoPtr->maxY - dInfoPtr->y < lineHeight) { - bottomY = lineHeight; + bottomY = lineHeight; } /* @@ -5645,8 +5640,8 @@ MeasureUp( index.linePtr = TkBTreeFindLine(srcPtr->tree, textPtr, lineNum); index.byteIndex = 0; - TkTextFindDisplayLineEnd(textPtr, &index, 0, NULL); - lineNum = TkBTreeLinesTo(textPtr, index.linePtr); + TkTextFindDisplayLineEnd(textPtr, &index, 0, NULL); + lineNum = TkBTreeLinesTo(textPtr, index.linePtr); lowestPtr = NULL; do { dlPtr = LayoutDLine(textPtr, &index); @@ -5667,21 +5662,21 @@ MeasureUp( for (dlPtr = lowestPtr; dlPtr != NULL; dlPtr = dlPtr->nextPtr) { distance -= dlPtr->height; if (distance <= 0) { - *dstPtr = dlPtr->index; - - /* - * dstPtr is the start of a display line that is or is not - * the start of a logical line. If it is the start of a - * logical line, we must check whether this line is merged - * with the previous logical line, and if so we must adjust - * dstPtr to the start of the display line since a display - * line start needs to be returned. - */ - if (!IsStartOfNotMergedLine(textPtr, dstPtr)) { - TkTextFindDisplayLineEnd(textPtr, dstPtr, 0, NULL); - } - - if (overlap != NULL) { + *dstPtr = dlPtr->index; + + /* + * dstPtr is the start of a display line that is or is not + * the start of a logical line. If it is the start of a + * logical line, we must check whether this line is merged + * with the previous logical line, and if so we must adjust + * dstPtr to the start of the display line since a display + * line start needs to be returned. + */ + if (!IsStartOfNotMergedLine(textPtr, dstPtr)) { + TkTextFindDisplayLineEnd(textPtr, dstPtr, 0, NULL); + } + + if (overlap != NULL) { *overlap = -distance; } break; @@ -5814,30 +5809,30 @@ TkTextSeeCmd( */ if (chunkPtr != NULL) { - chunkPtr->bboxProc(textPtr, chunkPtr, byteCount, - dlPtr->y + dlPtr->spaceAbove, - dlPtr->height - dlPtr->spaceAbove - dlPtr->spaceBelow, - dlPtr->baseline - dlPtr->spaceAbove, &x, &y, &width, - &height); - delta = x - dInfoPtr->curXPixelOffset; - oneThird = lineWidth/3; - if (delta < 0) { - if (delta < -oneThird) { - dInfoPtr->newXPixelOffset = x - lineWidth/2; - } else { - dInfoPtr->newXPixelOffset += delta; - } - } else { - delta -= lineWidth - width; - if (delta <= 0) { - return TCL_OK; - } - if (delta > oneThird) { - dInfoPtr->newXPixelOffset = x - lineWidth/2; - } else { - dInfoPtr->newXPixelOffset += delta; - } - } + chunkPtr->bboxProc(textPtr, chunkPtr, byteCount, + dlPtr->y + dlPtr->spaceAbove, + dlPtr->height - dlPtr->spaceAbove - dlPtr->spaceBelow, + dlPtr->baseline - dlPtr->spaceAbove, &x, &y, &width, + &height); + delta = x - dInfoPtr->curXPixelOffset; + oneThird = lineWidth/3; + if (delta < 0) { + if (delta < -oneThird) { + dInfoPtr->newXPixelOffset = x - lineWidth/2; + } else { + dInfoPtr->newXPixelOffset += delta; + } + } else { + delta -= lineWidth - width; + if (delta <= 0) { + return TCL_OK; + } + if (delta > oneThird) { + dInfoPtr->newXPixelOffset = x - lineWidth/2; + } else { + dInfoPtr->newXPixelOffset += delta; + } + } } dInfoPtr->flags |= DINFO_OUT_OF_DATE; if (!(dInfoPtr->flags & REDRAW_PENDING)) { @@ -6075,24 +6070,24 @@ YScrollByLines( if (offset == 0) { textPtr->topIndex = dlPtr->index; - /* - * topIndex is the start of a logical line. However, if - * the eol of the previous logical line is elided, then - * topIndex may be elsewhere than the first character of - * a display line, which is unwanted. Adjust to the start - * of the display line, if needed. - * topIndex is the start of a display line that is or is - * not the start of a logical line. If it is the start of - * a logical line, we must check whether this line is - * merged with the previous logical line, and if so we - * must adjust topIndex to the start of the display line. - */ - if (!IsStartOfNotMergedLine(textPtr, &textPtr->topIndex)) { - TkTextFindDisplayLineEnd(textPtr, &textPtr->topIndex, - 0, NULL); - } - - break; + /* + * topIndex is the start of a logical line. However, if + * the eol of the previous logical line is elided, then + * topIndex may be elsewhere than the first character of + * a display line, which is unwanted. Adjust to the start + * of the display line, if needed. + * topIndex is the start of a display line that is or is + * not the start of a logical line. If it is the start of + * a logical line, we must check whether this line is + * merged with the previous logical line, and if so we + * must adjust topIndex to the start of the display line. + */ + if (!IsStartOfNotMergedLine(textPtr, &textPtr->topIndex)) { + TkTextFindDisplayLineEnd(textPtr, &textPtr->topIndex, + 0, NULL); + } + + break; } } @@ -6922,63 +6917,63 @@ FindDLine( */ while (TkTextIndexCmp(&dlPtr->index,indexPtr) < 0) { - dlPtrPrev = dlPtr; - dlPtr = dlPtr->nextPtr; - if (dlPtr == NULL) { - /* - * We're past the last display line, either because the desired - * index lies past the visible text, or because the desired index - * is on the last display line. - */ - indexPtr2 = dlPtrPrev->index; - TkTextIndexForwBytes(textPtr, &indexPtr2, dlPtrPrev->byteCount, - &indexPtr2); - if (TkTextIndexCmp(&indexPtr2,indexPtr) > 0) { - /* - * The desired index is on the last display line. - * --> return this display line. - */ - dlPtr = dlPtrPrev; - } else { - /* - * The desired index is past the visible text. There is no - * display line displaying something at the desired index. - * --> return NULL. - */ - } - break; - } - if (TkTextIndexCmp(&dlPtr->index,indexPtr) > 0) { - /* - * If we're here then we would normally expect that: - * dlPtrPrev->index <= indexPtr < dlPtr->index - * i.e. we have found the searched display line being dlPtr. - * However it is possible that some DLines were unlinked - * previously, leading to a situation where going through - * the list of display lines skips display lines that did - * exist just a moment ago. - */ - indexPtr2 = dlPtrPrev->index; - TkTextIndexForwBytes(textPtr, &indexPtr2, dlPtrPrev->byteCount, - &indexPtr2); - if (TkTextIndexCmp(&indexPtr2,indexPtr) > 0) { - /* - * Confirmed: - * dlPtrPrev->index <= indexPtr < dlPtr->index - * --> return dlPtrPrev. - */ - dlPtr = dlPtrPrev; - } else { - /* - * The last (rightmost) index shown by dlPtrPrev is still - * before the desired index. This may be because there was - * previously a display line between dlPtrPrev and dlPtr - * and this display line has been unlinked. - * --> return dlPtr. - */ - } - break; - } + dlPtrPrev = dlPtr; + dlPtr = dlPtr->nextPtr; + if (dlPtr == NULL) { + /* + * We're past the last display line, either because the desired + * index lies past the visible text, or because the desired index + * is on the last display line. + */ + indexPtr2 = dlPtrPrev->index; + TkTextIndexForwBytes(textPtr, &indexPtr2, dlPtrPrev->byteCount, + &indexPtr2); + if (TkTextIndexCmp(&indexPtr2,indexPtr) > 0) { + /* + * The desired index is on the last display line. + * --> return this display line. + */ + dlPtr = dlPtrPrev; + } else { + /* + * The desired index is past the visible text. There is no + * display line displaying something at the desired index. + * --> return NULL. + */ + } + break; + } + if (TkTextIndexCmp(&dlPtr->index,indexPtr) > 0) { + /* + * If we're here then we would normally expect that: + * dlPtrPrev->index <= indexPtr < dlPtr->index + * i.e. we have found the searched display line being dlPtr. + * However it is possible that some DLines were unlinked + * previously, leading to a situation where going through + * the list of display lines skips display lines that did + * exist just a moment ago. + */ + indexPtr2 = dlPtrPrev->index; + TkTextIndexForwBytes(textPtr, &indexPtr2, dlPtrPrev->byteCount, + &indexPtr2); + if (TkTextIndexCmp(&indexPtr2,indexPtr) > 0) { + /* + * Confirmed: + * dlPtrPrev->index <= indexPtr < dlPtr->index + * --> return dlPtrPrev. + */ + dlPtr = dlPtrPrev; + } else { + /* + * The last (rightmost) index shown by dlPtrPrev is still + * before the desired index. This may be because there was + * previously a display line between dlPtrPrev and dlPtr + * and this display line has been unlinked. + * --> return dlPtr. + */ + } + break; + } } return dlPtr; @@ -7011,24 +7006,24 @@ IsStartOfNotMergedLine( TkTextIndex indexPtr2; if (indexPtr->byteIndex != 0) { - /* - * Not the start of a logical line. - */ - return 0; + /* + * Not the start of a logical line. + */ + return 0; } if (TkTextIndexBackBytes(textPtr, indexPtr, 1, &indexPtr2)) { - /* - * indexPtr is the first index of the text widget. - */ - return 1; + /* + * indexPtr is the first index of the text widget. + */ + return 1; } if (!TkTextIsElided(textPtr, &indexPtr2, NULL)) { - /* - * The eol of the line just before indexPtr is elided. - */ - return 1; + /* + * The eol of the line just before indexPtr is elided. + */ + return 1; } return 0; @@ -7202,7 +7197,7 @@ DlineIndexOfX( * We've reached the end of the text. */ - TkTextIndexBackChars(NULL, indexPtr, 1, indexPtr, COUNT_INDICES); + TkTextIndexBackChars(NULL, indexPtr, 1, indexPtr, COUNT_INDICES); return; } if (chunkPtr->nextPtr == NULL) { @@ -7210,7 +7205,7 @@ DlineIndexOfX( * We've reached the end of the display line. */ - TkTextIndexBackChars(NULL, indexPtr, 1, indexPtr, COUNT_INDICES); + TkTextIndexBackChars(NULL, indexPtr, 1, indexPtr, COUNT_INDICES); return; } chunkPtr = chunkPtr->nextPtr; @@ -7434,9 +7429,9 @@ TkTextIndexBbox( if (charWidthPtr != NULL) { *charWidthPtr = dInfoPtr->maxX - *xPtr; - if (*charWidthPtr > textPtr->charWidth) { - *charWidthPtr = textPtr->charWidth; - } + if (*charWidthPtr > textPtr->charWidth) { + *charWidthPtr = textPtr->charWidth; + } } if (*xPtr > dInfoPtr->maxX) { *xPtr = dInfoPtr->maxX; @@ -7725,21 +7720,21 @@ TkTextCharLayoutProc( nextX = maxX; bytesThatFit++; } - if (wrapMode == TEXT_WRAPMODE_WORD) { - while (p[bytesThatFit] == ' ') { - /* - * Space characters that would go at the beginning of the - * next line are allocated to the current line. This gives - * the effect of trimming white spaces that would otherwise - * be seen at the beginning of wrapped lines. - * Note that testing for '\t' is useless here because the - * chunk always includes at most one trailing \t, see - * LayoutDLine. - */ - - bytesThatFit++; - } - } + if (wrapMode == TEXT_WRAPMODE_WORD) { + while (p[bytesThatFit] == ' ') { + /* + * Space characters that would go at the beginning of the + * next line are allocated to the current line. This gives + * the effect of trimming white spaces that would otherwise + * be seen at the beginning of wrapped lines. + * Note that testing for '\t' is useless here because the + * chunk always includes at most one trailing \t, see + * LayoutDLine. + */ + + bytesThatFit++; + } + } if (p[bytesThatFit] == '\n') { /* * A newline character takes up no space, so if the previous diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c index 7f292e8..b2efec8 100644 --- a/generic/tkTextImage.c +++ b/generic/tkTextImage.c @@ -84,16 +84,16 @@ static const char *const alignStrings[] = { static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-align", NULL, NULL, "center", TCL_INDEX_NONE, offsetof(TkTextEmbImage, align), - TK_OPTION_ENUM_VAR, alignStrings, 0}, + (TCL_MAJOR_VERSION > 8) ? TK_OPTION_ENUM_VAR : 0, alignStrings, 0}, {TK_OPTION_PIXELS, "-padx", NULL, NULL, - "0", TCL_INDEX_NONE, offsetof(TkTextEmbImage, padX), 0, 0, 0}, + "0", offsetof(TkTextEmbImage, padXObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-pady", NULL, NULL, - "0", TCL_INDEX_NONE, offsetof(TkTextEmbImage, padY), 0, 0, 0}, + "0", offsetof(TkTextEmbImage, padYObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-image", NULL, NULL, - NULL, TCL_INDEX_NONE, offsetof(TkTextEmbImage, imageString), + NULL, offsetof(TkTextEmbImage, imageObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-name", NULL, NULL, - NULL, TCL_INDEX_NONE, offsetof(TkTextEmbImage, imageName), + NULL, offsetof(TkTextEmbImage, imageNameObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0} }; @@ -247,12 +247,12 @@ TkTextImageCmd( eiPtr->size = 1; eiPtr->body.ei.sharedTextPtr = textPtr->sharedTextPtr; eiPtr->body.ei.linePtr = NULL; - eiPtr->body.ei.imageName = NULL; - eiPtr->body.ei.imageString = NULL; + eiPtr->body.ei.imageNameObj = NULL; + eiPtr->body.ei.imageObj = NULL; eiPtr->body.ei.name = NULL; eiPtr->body.ei.image = NULL; eiPtr->body.ei.align = TK_ALIGN_CENTER; - eiPtr->body.ei.padX = eiPtr->body.ei.padY = 0; + eiPtr->body.ei.padXObj = eiPtr->body.ei.padYObj = NULL; eiPtr->body.ei.chunkCount = 0; eiPtr->body.ei.optionTable = Tk_CreateOptionTable(interp, optionSpecs); @@ -350,9 +350,9 @@ EmbImageConfigure( * changed. */ - if (eiPtr->body.ei.imageString != NULL) { + if (eiPtr->body.ei.imageObj != NULL) { image = Tk_GetImage(textPtr->interp, textPtr->tkwin, - eiPtr->body.ei.imageString, EmbImageProc, eiPtr); + Tcl_GetString(eiPtr->body.ei.imageObj), EmbImageProc, eiPtr); if (image == NULL) { return TCL_ERROR; } @@ -365,7 +365,7 @@ EmbImageConfigure( eiPtr->body.ei.image = image; if (eiPtr->body.ei.name != NULL) { - return TCL_OK; + return TCL_OK; } /* @@ -374,11 +374,11 @@ EmbImageConfigure( * associated with this image, delete the name. */ - name = eiPtr->body.ei.imageName; - if (name == NULL) { - name = eiPtr->body.ei.imageString; - } - if (name == NULL) { + if (eiPtr->body.ei.imageNameObj) { + name = Tcl_GetString(eiPtr->body.ei.imageNameObj); + } else if (eiPtr->body.ei.imageObj) { + name = Tcl_GetString(eiPtr->body.ei.imageObj); + } else { Tcl_SetObjResult(textPtr->interp, Tcl_NewStringObj( "Either a \"-name\" or a \"-image\" argument must be" " provided to the \"image create\" subcommand", TCL_INDEX_NONE)); @@ -531,11 +531,18 @@ EmbImageLayoutProc( * set by the caller. */ { int width, height; + int padX = 0, padY = 0; if (offset != 0) { Tcl_Panic("Non-zero offset in EmbImageLayoutProc"); } + if (eiPtr->body.ei.padXObj) { + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, eiPtr->body.ei.padXObj, &padX); + } + if (eiPtr->body.ei.padYObj) { + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, eiPtr->body.ei.padYObj, &padY); + } /* * See if there's room for this image on this line. */ @@ -545,8 +552,8 @@ EmbImageLayoutProc( height = 0; } else { Tk_SizeOfImage(eiPtr->body.ei.image, &width, &height); - width += 2*eiPtr->body.ei.padX; - height += 2*eiPtr->body.ei.padY; + width += 2 * padX; + height += 2 * padY; } if ((width > (maxX - chunkPtr->x)) && !noCharsYet && (textPtr->wrapMode != TEXT_WRAPMODE_NONE)) { @@ -563,8 +570,8 @@ EmbImageLayoutProc( chunkPtr->bboxProc = EmbImageBboxProc; chunkPtr->numBytes = 1; if (eiPtr->body.ei.align == TK_ALIGN_BASELINE) { - chunkPtr->minAscent = height - eiPtr->body.ei.padY; - chunkPtr->minDescent = eiPtr->body.ei.padY; + chunkPtr->minAscent = height - padY; + chunkPtr->minDescent = padY; chunkPtr->minHeight = 0; } else { chunkPtr->minAscent = 0; @@ -694,7 +701,7 @@ EmbImageDisplayProc( static void EmbImageBboxProc( - TCL_UNUSED(TkText *), + TkText *textPtr, TkTextDispChunk *chunkPtr, /* Chunk containing desired char. */ TCL_UNUSED(Tcl_Size), /* Index of desired character within the * chunk. */ @@ -712,6 +719,7 @@ EmbImageBboxProc( { TkTextSegment *eiPtr = (TkTextSegment *)chunkPtr->clientData; Tk_Image image; + int padX = 0, padY = 0; image = eiPtr->body.ei.image; if (image != NULL) { @@ -721,17 +729,23 @@ EmbImageBboxProc( *heightPtr = 0; } - *xPtr = chunkPtr->x + eiPtr->body.ei.padX; + if (eiPtr->body.ei.padXObj) { + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, eiPtr->body.ei.padXObj, &padX); + } + if (eiPtr->body.ei.padYObj) { + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, eiPtr->body.ei.padYObj, &padY); + } + *xPtr = chunkPtr->x + padX; switch (eiPtr->body.ei.align) { case TK_ALIGN_BOTTOM: - *yPtr = y + (lineHeight - *heightPtr - eiPtr->body.ei.padY); + *yPtr = y + (lineHeight - *heightPtr - padY); break; case TK_ALIGN_CENTER: *yPtr = y + (lineHeight - *heightPtr)/2; break; case TK_ALIGN_TOP: - *yPtr = y + eiPtr->body.ei.padY; + *yPtr = y + padY; break; case TK_ALIGN_BASELINE: *yPtr = y + (baseline - *heightPtr); diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index 4acad9d..a77fd9a 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -45,8 +45,8 @@ 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); + const TkTextIndex *indexPtr1, + const TkTextIndex *indexPtr2); /* * The "textindex" Tcl_Obj definition: @@ -1379,7 +1379,7 @@ ForwBack( } else { TkTextFindDisplayLineEnd(textPtr, indexPtr, 0, &xOffset); while (count-- > 0) { - TkTextIndex indexPtr2; + TkTextIndex indexPtr2; /* * Go to the beginning of the line, then backward one @@ -1390,20 +1390,20 @@ ForwBack( TkTextIndexBackChars(textPtr, indexPtr, 1, &indexPtr2, COUNT_DISPLAY_INDICES); - /* - * If we couldn't go to the previous line, then we wanted - to go before the start of the text: arrange for returning - the first index of the first display line. - */ - - if (!TkTextIndexCmp(indexPtr, &indexPtr2)) { - xOffset = 0; - break; - } - *indexPtr = indexPtr2; + /* + * If we couldn't go to the previous line, then we wanted + to go before the start of the text: arrange for returning + the first index of the first display line. + */ + + if (!TkTextIndexCmp(indexPtr, &indexPtr2)) { + xOffset = 0; + break; + } + *indexPtr = indexPtr2; } } - TkTextFindDisplayLineEnd(textPtr, indexPtr, 0, NULL); + TkTextFindDisplayLineEnd(textPtr, indexPtr, 0, NULL); /* * This call assumes indexPtr is the beginning of a display line @@ -1749,7 +1749,7 @@ IndexCountBytesOrdered( TkTextLine *linePtr; if (indexPtr1->linePtr == indexPtr2->linePtr) { - return indexPtr2->byteIndex - indexPtr1->byteIndex; + return indexPtr2->byteIndex - indexPtr1->byteIndex; } /* @@ -1763,19 +1763,19 @@ IndexCountBytesOrdered( segPtr1 = TkTextIndexToSeg(indexPtr1, &offset); byteCount = -offset; for (segPtr = segPtr1; segPtr != NULL; segPtr = segPtr->nextPtr) { - byteCount += segPtr->size; + byteCount += segPtr->size; } linePtr = TkBTreeNextLine(textPtr, indexPtr1->linePtr); while (linePtr != indexPtr2->linePtr) { for (segPtr = linePtr->segPtr; segPtr != NULL; - segPtr = segPtr->nextPtr) { - byteCount += segPtr->size; - } - linePtr = TkBTreeNextLine(textPtr, linePtr); - if (linePtr == NULL) { - Tcl_Panic("TextIndexCountBytesOrdered ran out of lines"); - } + segPtr = segPtr->nextPtr) { + byteCount += segPtr->size; + } + linePtr = TkBTreeNextLine(textPtr, linePtr); + if (linePtr == NULL) { + Tcl_Panic("TextIndexCountBytesOrdered ran out of lines"); + } } byteCount += indexPtr2->byteIndex; diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c index db1dec1..fe25f3c 100644 --- a/generic/tkTextMark.c +++ b/generic/tkTextMark.c @@ -301,7 +301,7 @@ TkTextSetMark( if (markPtr == textPtr->insertMarkPtr) { TkTextIndex index, index2; - int nblines; + int nblines; TkTextMarkSegToIndex(textPtr, textPtr->insertMarkPtr, &index); TkTextIndexForwChars(NULL, &index, 1, &index2, COUNT_INDICES); @@ -313,12 +313,12 @@ TkTextSetMark( TkTextChanged(NULL, textPtr, &index, &index2); - /* - * The number of lines in the widget is zero if and only if it is - * a partial peer with -startline == -endline, i.e. an empty - * peer. In this case the mark shall be set exactly at the given - * index, and not one character backwards (bug 3487407). - */ + /* + * The number of lines in the widget is zero if and only if it is + * a partial peer with -startline == -endline, i.e. an empty + * peer. In this case the mark shall be set exactly at the given + * index, and not one character backwards (bug 3487407). + */ nblines = TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr); if ((TkBTreeLinesTo(textPtr, indexPtr->linePtr) == nblines) @@ -436,7 +436,7 @@ TkTextMarkNameToIndex( TkTextSegment *segPtr; if (textPtr == NULL) { - return TCL_ERROR; + return TCL_ERROR; } if (!strcmp(name, "insert")) { @@ -623,10 +623,13 @@ TkTextInsertDisplayProc( /* TkText *textPtr = chunkPtr->clientData; */ TkTextIndex index; - int halfWidth = textPtr->insertWidth/2; + int halfWidth, insertWidth, insertBorderWidth; int rightSideWidth; int ix = 0, iy = 0, iw = 0, ih = 0, charWidth = 0; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->insertWidthObj, &insertWidth); + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, textPtr->insertBorderWidthObj, &insertBorderWidth); + halfWidth = insertWidth/2; if (textPtr->insertCursorType) { TkTextMarkSegToIndex(textPtr, textPtr->insertMarkPtr, &index); TkTextIndexBbox(textPtr, &index, &ix, &iy, &iw, &ih, &charWidth); @@ -658,15 +661,19 @@ TkTextInsertDisplayProc( if (textPtr->flags & GOT_FOCUS) { if (textPtr->flags & INSERT_ON) { Tk_Fill3DRectangle(textPtr->tkwin, dst, textPtr->insertBorder, - x - halfWidth, y, charWidth + textPtr->insertWidth, - height, textPtr->insertBorderWidth, TK_RELIEF_RAISED); + x - halfWidth, y, charWidth + insertWidth, + height, insertBorderWidth, TK_RELIEF_RAISED); } else if (textPtr->selBorder == textPtr->insertBorder) { Tk_Fill3DRectangle(textPtr->tkwin, dst, textPtr->border, - x - halfWidth, y, charWidth + textPtr->insertWidth, + x - halfWidth, y, charWidth + insertWidth, height, 0, TK_RELIEF_FLAT); } } else if (textPtr->insertUnfocussed == TK_TEXT_INSERT_NOFOCUS_HOLLOW) { - if (textPtr->insertBorderWidth < 1) { + if (insertBorderWidth > 0) { + Tk_Draw3DRectangle(textPtr->tkwin, dst, textPtr->insertBorder, + x - halfWidth, y, charWidth + insertWidth, + height, insertBorderWidth, TK_RELIEF_RAISED); + } else { /* * Hack to work around the fact that a "solid" border always * paints in black. @@ -675,17 +682,13 @@ TkTextInsertDisplayProc( TkBorder *borderPtr = (TkBorder *) textPtr->insertBorder; XDrawRectangle(Tk_Display(textPtr->tkwin), dst, borderPtr->bgGC, - x - halfWidth, y, charWidth + textPtr->insertWidth - 1, + x - halfWidth, y, charWidth + insertWidth - 1, height - 1); - } else { - Tk_Draw3DRectangle(textPtr->tkwin, dst, textPtr->insertBorder, - x - halfWidth, y, charWidth + textPtr->insertWidth, - height, textPtr->insertBorderWidth, TK_RELIEF_RAISED); } } else if (textPtr->insertUnfocussed == TK_TEXT_INSERT_NOFOCUS_SOLID) { Tk_Fill3DRectangle(textPtr->tkwin, dst, textPtr->insertBorder, - x - halfWidth, y, charWidth + textPtr->insertWidth, height, - textPtr->insertBorderWidth, TK_RELIEF_RAISED); + x - halfWidth, y, charWidth + insertWidth, height, + insertBorderWidth, TK_RELIEF_RAISED); } } @@ -749,7 +752,7 @@ MarkCheckProc( */ if (markPtr->body.mark.textPtr->insertMarkPtr == markPtr) { - return; + return; } if (markPtr->body.mark.textPtr->currentMarkPtr == markPtr) { return; @@ -933,16 +936,16 @@ MarkFindPrev( seg2Ptr = seg2Ptr->nextPtr) { if (seg2Ptr->typePtr == &tkTextRightMarkType || seg2Ptr->typePtr == &tkTextLeftMarkType) { - if (seg2Ptr->body.mark.hPtr == NULL) { - if (seg2Ptr != textPtr->currentMarkPtr && - seg2Ptr != textPtr->insertMarkPtr) { - /* - * This is an insert or current mark from a - * peer of textPtr. - */ - continue; - } - } + if (seg2Ptr->body.mark.hPtr == NULL) { + if (seg2Ptr != textPtr->currentMarkPtr && + seg2Ptr != textPtr->insertMarkPtr) { + /* + * This is an insert or current mark from a + * peer of textPtr. + */ + continue; + } + } prevPtr = seg2Ptr; } } diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index d679d30..6f12c1e 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -22,7 +22,7 @@ static const Tk_OptionSpec tagOptionSpecs[] = { {TK_OPTION_BITMAP, "-bgstipple", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, bgStipple), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-borderwidth", NULL, NULL, - NULL, offsetof(TkTextTag, borderWidthPtr), offsetof(TkTextTag, borderWidth), + NULL, offsetof(TkTextTag, borderWidthObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_BOOLEAN, "-elide", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, elide), @@ -36,13 +36,13 @@ static const Tk_OptionSpec tagOptionSpecs[] = { {TK_OPTION_JUSTIFY, "-justify", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, justify), TK_OPTION_NULL_OK, 0,0}, {TK_OPTION_PIXELS, "-lmargin1", NULL, NULL, - NULL, offsetof(TkTextTag, lMargin1Obj), offsetof(TkTextTag, lMargin1), TK_OPTION_NULL_OK,0,0}, + NULL, offsetof(TkTextTag, lMargin1Obj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0}, {TK_OPTION_PIXELS, "-lmargin2", NULL, NULL, - NULL, offsetof(TkTextTag, lMargin2Obj), offsetof(TkTextTag, lMargin2), TK_OPTION_NULL_OK,0,0}, + NULL, offsetof(TkTextTag, lMargin2Obj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0}, {TK_OPTION_BORDER, "-lmargincolor", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, lMarginColor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-offset", NULL, NULL, - NULL, offsetof(TkTextTag, offsetObj), offsetof(TkTextTag, offset), TK_OPTION_NULL_OK, 0, 0}, + NULL, offsetof(TkTextTag, offsetObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_BOOLEAN, "-overstrike", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, overstrike), TK_OPTION_NULL_OK, 0, 0}, @@ -52,7 +52,7 @@ static const Tk_OptionSpec tagOptionSpecs[] = { {TK_OPTION_RELIEF, "-relief", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, relief), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-rmargin", NULL, NULL, - NULL, offsetof(TkTextTag, rMarginObj), offsetof(TkTextTag, rMargin), TK_OPTION_NULL_OK, 0,0}, + NULL, offsetof(TkTextTag, rMarginObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0,0}, {TK_OPTION_BORDER, "-rmargincolor", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, rMarginColor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_BORDER, "-selectbackground", NULL, NULL, @@ -60,11 +60,11 @@ static const Tk_OptionSpec tagOptionSpecs[] = { {TK_OPTION_COLOR, "-selectforeground", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, selFgColor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-spacing1", NULL, NULL, - NULL, offsetof(TkTextTag, spacing1Obj), offsetof(TkTextTag, spacing1), TK_OPTION_NULL_OK,0,0}, + NULL, offsetof(TkTextTag, spacing1Obj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0}, {TK_OPTION_PIXELS, "-spacing2", NULL, NULL, - NULL, offsetof(TkTextTag, spacing2Obj), offsetof(TkTextTag, spacing2), TK_OPTION_NULL_OK,0,0}, + NULL, offsetof(TkTextTag, spacing2Obj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0}, {TK_OPTION_PIXELS, "-spacing3", NULL, NULL, - NULL, offsetof(TkTextTag, spacing3Obj), offsetof(TkTextTag, spacing3), TK_OPTION_NULL_OK,0,0}, + NULL, offsetof(TkTextTag, spacing3Obj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0}, {TK_OPTION_STRING, "-tabs", NULL, NULL, NULL, offsetof(TkTextTag, tabStringPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-tabstyle", NULL, NULL, @@ -363,22 +363,44 @@ TkTextTagCmd( * from "unspecified"). */ - if (tagPtr->borderWidth < 0) { - tagPtr->borderWidth = 0; + if (tagPtr->borderWidthObj) { + int borderWidth; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, tagPtr->borderWidthObj, &borderWidth); + if (borderWidth < 0) { + borderWidth = 0; + Tcl_DecrRefCount(tagPtr->borderWidthObj); + tagPtr->borderWidthObj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(tagPtr->borderWidthObj); + } } - if (tagPtr->spacing1 != INT_MIN) { - if (tagPtr->spacing1 < 0) { - tagPtr->spacing1 = 0; + if (tagPtr->spacing1Obj) { + int spacing1; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, tagPtr->spacing1Obj, &spacing1); + if (spacing1 < 0) { + spacing1 = 0; + Tcl_DecrRefCount(tagPtr->spacing1Obj); + tagPtr->spacing1Obj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(tagPtr->spacing1Obj); } } - if (tagPtr->spacing2 != INT_MIN) { - if (tagPtr->spacing2 < 0) { - tagPtr->spacing2 = 0; + if (tagPtr->spacing2Obj) { + int spacing2; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, tagPtr->spacing2Obj, &spacing2); + if (spacing2 < 0) { + spacing2 = 0; + Tcl_DecrRefCount(tagPtr->spacing2Obj); + tagPtr->spacing2Obj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(tagPtr->spacing2Obj); } } - if (tagPtr->spacing3 != INT_MIN) { - if (tagPtr->spacing3 < 0) { - tagPtr->spacing3 = 0; + if (tagPtr->spacing3Obj) { + int spacing3; + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, tagPtr->spacing3Obj, &spacing3); + if (spacing3 < 0) { + spacing3 = 0; + Tcl_DecrRefCount(tagPtr->spacing3Obj); + tagPtr->spacing3Obj = Tcl_NewIntObj(0); + Tcl_IncrRefCount(tagPtr->spacing3Obj); } } if (tagPtr->tabArrayPtr != NULL) { @@ -416,8 +438,7 @@ TkTextTagCmd( } else { textPtr->selBorder = tagPtr->selBorder; } - textPtr->selBorderWidth = tagPtr->borderWidth; - textPtr->selBorderWidthPtr = tagPtr->borderWidthPtr; + textPtr->selBorderWidthObj = tagPtr->borderWidthObj; if (tagPtr->selFgColor == NULL) { textPtr->selFgColorPtr = tagPtr->fgColor; } else { @@ -430,17 +451,19 @@ TkTextTagCmd( if ((tagPtr->elide >= 0) || (tagPtr->tkfont != NULL) || (tagPtr->justify != TK_JUSTIFY_NULL) - || (tagPtr->lMargin1 != INT_MIN) - || (tagPtr->lMargin2 != INT_MIN) - || (tagPtr->offset != INT_MIN) - || (tagPtr->rMargin != INT_MIN) - || (tagPtr->spacing1 != INT_MIN) - || (tagPtr->spacing2 != INT_MIN) - || (tagPtr->spacing3 != INT_MIN) + || (tagPtr->lMargin1Obj != NULL) + || (tagPtr->lMargin2Obj != NULL) + || (tagPtr->offsetObj != NULL) + || (tagPtr->rMarginObj != NULL) + || (tagPtr->spacing1Obj != NULL) + || (tagPtr->spacing2Obj != NULL) + || (tagPtr->spacing3Obj != NULL) || (tagPtr->tabStringPtr != NULL) || (tagPtr->tabStyle == TK_TEXT_TABSTYLE_TABULAR) || (tagPtr->tabStyle == TK_TEXT_TABSTYLE_WORDPROCESSOR) - || (tagPtr->wrapMode != TEXT_WRAPMODE_NULL)) { + || (tagPtr->wrapMode == TEXT_WRAPMODE_CHAR) + || (tagPtr->wrapMode == TEXT_WRAPMODE_NONE) + || (tagPtr->wrapMode == TEXT_WRAPMODE_WORD)) { tagPtr->affectsDisplay = 1; tagPtr->affectsDisplayGeometry = 1; } @@ -939,8 +962,7 @@ TkTextCreateTag( tagPtr->tagRootPtr = NULL; tagPtr->priority = textPtr->sharedTextPtr->numTags; tagPtr->border = NULL; - tagPtr->borderWidth = 0; - tagPtr->borderWidthPtr = NULL; + tagPtr->borderWidthObj = NULL; tagPtr->relief = TK_RELIEF_NULL; tagPtr->bgStipple = None; tagPtr->fgColor = NULL; @@ -948,25 +970,22 @@ TkTextCreateTag( tagPtr->fgStipple = None; tagPtr->justify = TK_JUSTIFY_NULL; tagPtr->lMargin1Obj = NULL; - tagPtr->lMargin1 = INT_MIN; + tagPtr->lMargin1 = 0; tagPtr->lMargin2Obj = NULL; - tagPtr->lMargin2 = INT_MIN; + tagPtr->lMargin2 = 0; tagPtr->lMarginColor = NULL; tagPtr->offsetObj = NULL; - tagPtr->offset = INT_MIN; + tagPtr->offset = 0; tagPtr->overstrike = -1; tagPtr->overstrikeColor = NULL; tagPtr->rMarginObj = NULL; - tagPtr->rMargin = INT_MIN; + tagPtr->rMargin = 0; tagPtr->rMarginColor = NULL; tagPtr->selBorder = NULL; tagPtr->selFgColor = NULL; tagPtr->spacing1Obj = NULL; - tagPtr->spacing1 = INT_MIN; tagPtr->spacing2Obj = NULL; - tagPtr->spacing2 = INT_MIN; tagPtr->spacing3Obj = NULL; - tagPtr->spacing3 = INT_MIN; tagPtr->tabStringPtr = NULL; tagPtr->tabArrayPtr = NULL; tagPtr->tabStyle = TK_TEXT_TABSTYLE_NULL; diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c index 8c71e48..d336877 100644 --- a/generic/tkTextWind.c +++ b/generic/tkTextWind.c @@ -96,13 +96,13 @@ static const char *const alignStrings[] = { static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-align", NULL, NULL, "center", TCL_INDEX_NONE, offsetof(TkTextEmbWindow, align), - TK_OPTION_ENUM_VAR, alignStrings, 0}, + (TCL_MAJOR_VERSION > 8) ? TK_OPTION_ENUM_VAR : 0, alignStrings, 0}, {TK_OPTION_STRING, "-create", NULL, NULL, - NULL, TCL_INDEX_NONE, offsetof(TkTextEmbWindow, create), TK_OPTION_NULL_OK, 0, 0}, + NULL, offsetof(TkTextEmbWindow, createObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-padx", NULL, NULL, - "0", TCL_INDEX_NONE, offsetof(TkTextEmbWindow, padX), 0, 0, 0}, + "0", offsetof(TkTextEmbWindow, padXObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-pady", NULL, NULL, - "0", TCL_INDEX_NONE, offsetof(TkTextEmbWindow, padY), 0, 0, 0}, + "0", offsetof(TkTextEmbWindow, padYObj), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_BOOLEAN, "-stretch", NULL, NULL, "0", TCL_INDEX_NONE, offsetof(TkTextEmbWindow, stretch), 0, 0, 0}, {TK_OPTION_WINDOW, "-window", NULL, NULL, @@ -290,9 +290,9 @@ TkTextWindowCmd( ewPtr->body.ew.sharedTextPtr = textPtr->sharedTextPtr; ewPtr->body.ew.linePtr = NULL; ewPtr->body.ew.tkwin = NULL; - ewPtr->body.ew.create = NULL; + ewPtr->body.ew.createObj = NULL; ewPtr->body.ew.align = TK_ALIGN_CENTER; - ewPtr->body.ew.padX = ewPtr->body.ew.padY = 0; + ewPtr->body.ew.padXObj = ewPtr->body.ew.padYObj = NULL; ewPtr->body.ew.stretch = 0; ewPtr->body.ew.optionTable = Tk_CreateOptionTable(interp, optionSpecs); @@ -833,6 +833,7 @@ EmbWinLayoutProc( { int width, height; TkTextEmbWindowClient *client; + int padX = 0, padY = 0; if (offset != 0) { Tcl_Panic("Non-zero offset in EmbWinLayoutProc"); @@ -845,7 +846,7 @@ EmbWinLayoutProc( ewPtr->body.ew.tkwin = client->tkwin; } - if ((ewPtr->body.ew.tkwin == NULL) && (ewPtr->body.ew.create != NULL)) { + if ((ewPtr->body.ew.tkwin == NULL) && (ewPtr->body.ew.createObj != NULL)) { int code, isNew; Tk_Window ancestor; Tcl_HashEntry *hPtr; @@ -853,7 +854,7 @@ EmbWinLayoutProc( Tcl_DString buf, *dsPtr = NULL; Tcl_Obj *nameObj; - before = ewPtr->body.ew.create; + before = Tcl_GetString(ewPtr->body.ew.createObj); /* * Find everything up to the next % character and append it to the @@ -907,7 +908,7 @@ EmbWinLayoutProc( code = Tcl_EvalEx(textPtr->interp, Tcl_DStringValue(dsPtr), TCL_INDEX_NONE, TCL_EVAL_GLOBAL); Tcl_DStringFree(dsPtr); } else { - code = Tcl_EvalEx(textPtr->interp, ewPtr->body.ew.create, TCL_INDEX_NONE, TCL_EVAL_GLOBAL); + code = Tcl_EvalEx(textPtr->interp, Tcl_GetString(ewPtr->body.ew.createObj), TCL_INDEX_NONE, TCL_EVAL_GLOBAL); } if (code != TCL_OK) { Tcl_BackgroundException(textPtr->interp, code); @@ -988,8 +989,14 @@ EmbWinLayoutProc( width = 0; height = 0; } else { - width = Tk_ReqWidth(ewPtr->body.ew.tkwin) + 2*ewPtr->body.ew.padX; - height = Tk_ReqHeight(ewPtr->body.ew.tkwin) + 2*ewPtr->body.ew.padY; + if (ewPtr->body.ew.padXObj) { + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, ewPtr->body.ew.padXObj, &padX); + } + if (ewPtr->body.ew.padYObj) { + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, ewPtr->body.ew.padYObj, &padY); + } + width = Tk_ReqWidth(ewPtr->body.ew.tkwin) + 2 * padX; + height = Tk_ReqHeight(ewPtr->body.ew.tkwin) + 2 * padY; } if ((width > (maxX - chunkPtr->x)) && !noCharsYet && (textPtr->wrapMode != TEXT_WRAPMODE_NONE)) { @@ -1006,8 +1013,8 @@ EmbWinLayoutProc( chunkPtr->bboxProc = EmbWinBboxProc; chunkPtr->numBytes = 1; if (ewPtr->body.ew.align == TK_ALIGN_BASELINE) { - chunkPtr->minAscent = height - ewPtr->body.ew.padY; - chunkPtr->minDescent = ewPtr->body.ew.padY; + chunkPtr->minAscent = height - padY; + chunkPtr->minDescent = padY; chunkPtr->minHeight = 0; } else { chunkPtr->minAscent = 0; @@ -1238,6 +1245,7 @@ EmbWinBboxProc( Tk_Window tkwin; TkTextSegment *ewPtr = (TkTextSegment *)chunkPtr->clientData; TkTextEmbWindowClient *client = EmbWinGetClient(textPtr, ewPtr); + int padX = 0, padY = 0; if (client == NULL) { tkwin = NULL; @@ -1251,23 +1259,29 @@ EmbWinBboxProc( *widthPtr = 0; *heightPtr = 0; } - *xPtr = chunkPtr->x + ewPtr->body.ew.padX; + if (ewPtr->body.ew.padXObj) { + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, ewPtr->body.ew.padXObj, &padX); + } + if (ewPtr->body.ew.padYObj) { + Tk_GetPixelsFromObj(NULL, textPtr->tkwin, ewPtr->body.ew.padYObj, &padY); + } + *xPtr = chunkPtr->x + padX; if (ewPtr->body.ew.stretch) { if (ewPtr->body.ew.align == TK_ALIGN_BASELINE) { - *heightPtr = baseline - ewPtr->body.ew.padY; + *heightPtr = baseline - padY; } else { - *heightPtr = lineHeight - 2*ewPtr->body.ew.padY; + *heightPtr = lineHeight - 2 * padY; } } switch (ewPtr->body.ew.align) { case TK_ALIGN_BOTTOM: - *yPtr = y + (lineHeight - *heightPtr - ewPtr->body.ew.padY); + *yPtr = y + (lineHeight - *heightPtr - padY); break; case TK_ALIGN_CENTER: *yPtr = y + (lineHeight - *heightPtr)/2; break; case TK_ALIGN_TOP: - *yPtr = y + ewPtr->body.ew.padY; + *yPtr = y + padY; break; case TK_ALIGN_BASELINE: *yPtr = y + (baseline - *heightPtr); diff --git a/generic/tkUtil.c b/generic/tkUtil.c index 3c99a4b..80a6f25 100644 --- a/generic/tkUtil.c +++ b/generic/tkUtil.c @@ -23,7 +23,7 @@ */ const TkObjType tkStateKeyObjType = { - {"statekey", /* name */ + {"statekey", /* name */ NULL, /* freeIntRepProc */ NULL, /* dupIntRepProc */ NULL, /* updateStringProc */ @@ -622,6 +622,70 @@ Tk_DrawFocusHighlight( /* *---------------------------------------------------------------------- * + * TkDrawDottedRect -- + * + * This function draws a dotted rectangle, used as focus ring of Ttk + * widgets and for rendering the active element of a listbox. + * + * Results: + * None. + * + * Side effects: + * A dotted rectangle is drawn in the specified Drawable. On the + * windowing systems x11 and aqua the GC components line_style, + * line_width, dashes, and dash_offset are modified as needed. + * + *---------------------------------------------------------------------- + */ + +void +TkDrawDottedRect( + Display *disp, /* Display containing the dotted rectangle. */ + Drawable d, /* Where to draw the rectangle (typically a + * pixmap for double buffering). */ + GC gc, /* Graphics context to use for drawing the + * rectangle. */ + int x, int y, /* Coordinates of the top-left corner. */ + int width, int height) /* Width & height, _including the border_. */ +{ +#ifdef _WIN32 + TkWinDrawDottedRect(disp, d, gc->foreground, x, y, width, height); + +#else + XGCValues gcValues; + int widthMod2 = width % 2, heightMod2 = height % 2; + int x2 = x + width - 1, y2 = y + height - 1; + + gcValues.line_style = LineOnOffDash; + gcValues.line_width = 1; + gcValues.dashes = 1; +#ifdef MAC_OSX_TK + gcValues.dash_offset = 1; +#else + gcValues.dash_offset = 0; +#endif + XChangeGC(disp, gc, GCLineStyle | GCLineWidth | GCDashList | GCDashOffset, + &gcValues); + + if (widthMod2 == 0 && heightMod2 == 0) { + XDrawLine(disp, d, gc, x+1, y, x2-1, y); /* N */ + XDrawLine(disp, d, gc, x+2, y2, x2, y2); /* S */ + XDrawLine(disp, d, gc, x, y+2, x, y2); /* W */ + XDrawLine(disp, d, gc, x2, y+1, x2, y2-1); /* E */ + } else { + int dx = 1 - widthMod2, dy = 1 - heightMod2; + + XDrawLine(disp, d, gc, x+1, y, x2-dx, y); /* N */ + XDrawLine(disp, d, gc, x+1, y2, x2-dx, y2); /* S */ + XDrawLine(disp, d, gc, x, y+1, x, y2-dy); /* W */ + XDrawLine(disp, d, gc, x2, y+1, x2, y2-dy); /* E */ + } +#endif +} + +/* + *---------------------------------------------------------------------- + * * Tk_GetScrollInfo -- * * This function is invoked to parse "xview" and "yview" scrolling diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 3570026..633c065 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -215,6 +215,17 @@ static int Initialize(Tcl_Interp *interp); static int NameWindow(Tcl_Interp *interp, TkWindow *winPtr, TkWindow *parentPtr, const char *name); static void UnlinkWindow(TkWindow *winPtr); + +/* + * This static variable only makes sense for macOS and Windows, which never + * have more than one display. It is set by TkCloseDisplay, and when set + * prevents sending Enter and Leave events when all of the windows in the + * display are being destroyed. Tk does not send those events on X11; that + * job is handled by the X server. + */ + +static int displayBeingClosed = 0; + /* *---------------------------------------------------------------------- @@ -239,6 +250,7 @@ static void TkCloseDisplay( TkDisplay *dispPtr) { + displayBeingClosed = 1; TkClipCleanup(dispPtr); if (dispPtr->name != NULL) { @@ -1336,6 +1348,39 @@ Tk_CreateWindowFromPath( *-------------------------------------------------------------- */ +#if defined(MAC_OSX_TK) || defined(_WIN32) +static void SendEnterLeaveForDestroy( + Tk_Window tkwin) +{ + int x, y; + unsigned int state; + Tk_Window pointerWin; + TkWindow *containerPtr; + + if (displayBeingClosed) { + return; + } + XQueryPointer(Tk_Display(tkwin), None, NULL, NULL, &x, &y, + NULL, NULL, &state); + pointerWin = Tk_CoordsToWindow(x, y, tkwin); + if (pointerWin == tkwin) { + if (!Tk_IsTopLevel(tkwin)) { + containerPtr = TkGetContainer((TkWindow *)pointerWin); + Tk_UpdatePointer((Tk_Window) containerPtr, x, y, state); + } + } + + if (pointerWin && (tkwin == Tk_Parent(pointerWin))) { + Tk_UpdatePointer(Tk_Parent(tkwin), x, y, state); + } +} +#else +static void SendEnterLeaveForDestroy( + TCL_UNUSED(Tk_Window)) +{ +} +#endif + void Tk_DestroyWindow( Tk_Window tkwin) /* Window to destroy. */ @@ -1355,6 +1400,10 @@ Tk_DestroyWindow( return; } + if ((winPtr->flags & TK_DONT_DESTROY_WINDOW) == 0) { + SendEnterLeaveForDestroy(tkwin); + } + winPtr->flags |= TK_ALREADY_DEAD; /* @@ -1525,7 +1574,7 @@ Tk_DestroyWindow( * Cleanup the data structures associated with this window. */ - if (winPtr->flags & TK_WIN_MANAGED) { + if (winPtr->wmInfoPtr && (winPtr->flags & TK_WIN_MANAGED)) { TkWmDeadWindow(winPtr); } else if (winPtr->flags & TK_WM_COLORMAP_WINDOW) { TkWmRemoveFromColormapWindows(winPtr); @@ -2615,7 +2664,7 @@ Tk_RestackWindow( TkWindow *otherPtr = (TkWindow *) other; /* - * Special case: if winPtr is a top-level window then just find the + * Special case: if winPtr is a toplevel window then just find the * top-level ancestor of otherPtr and restack winPtr above otherPtr * without changing any of Tk's childLists. */ diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c index af72ea4..dbf4d7e 100644 --- a/generic/ttk/ttkButton.c +++ b/generic/ttk/ttkButton.c @@ -404,7 +404,7 @@ TTK_BEGIN_LAYOUT(ButtonLayout) TTK_GROUP("Button.border", TTK_FILL_BOTH|TTK_BORDER, TTK_GROUP("Button.focus", TTK_FILL_BOTH, TTK_GROUP("Button.padding", TTK_FILL_BOTH, - TTK_NODE("Button.label", TTK_FILL_BOTH)))) + TTK_NODE("Button.label", TTK_FILL_BOTH)))) TTK_END_LAYOUT /*------------------------------------------------------------------------ @@ -505,11 +505,11 @@ CheckbuttonConfigure(Tcl_Interp *interp, void *recordPtr, int mask) Ttk_TraceHandle *vt = NULL; if (varName != NULL && *Tcl_GetString(varName) != '\0') { - vt = Ttk_TraceVariable(interp, varName, + vt = Ttk_TraceVariable(interp, varName, CheckbuttonVariableChanged, checkPtr); - if (!vt) { + if (!vt) { return TCL_ERROR; - } + } } if (BaseConfigure(interp, recordPtr, mask) != TCL_OK){ @@ -518,7 +518,7 @@ CheckbuttonConfigure(Tcl_Interp *interp, void *recordPtr, int mask) } if (checkPtr->checkbutton.variableTrace) { - Ttk_UntraceVariable(checkPtr->checkbutton.variableTrace); + Ttk_UntraceVariable(checkPtr->checkbutton.variableTrace); } checkPtr->checkbutton.variableTrace = vt; @@ -566,11 +566,11 @@ CheckbuttonInvokeCommand( newValue = checkPtr->checkbutton.onValueObj; if (checkPtr->checkbutton.variableObj == NULL || - *Tcl_GetString(checkPtr->checkbutton.variableObj) == '\0') - CheckbuttonVariableChanged(checkPtr, Tcl_GetString(newValue)); + *Tcl_GetString(checkPtr->checkbutton.variableObj) == '\0') + CheckbuttonVariableChanged(checkPtr, Tcl_GetString(newValue)); else if (Tcl_ObjSetVar2(interp, - checkPtr->checkbutton.variableObj, NULL, newValue, - TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) + checkPtr->checkbutton.variableObj, NULL, newValue, + TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) return TCL_ERROR; @@ -859,7 +859,7 @@ TTK_BEGIN_LAYOUT(MenubuttonLayout) TTK_GROUP("Menubutton.focus", TTK_FILL_BOTH, TTK_NODE("Menubutton.indicator", TTK_PACK_RIGHT) TTK_GROUP("Menubutton.padding", TTK_FILL_X, - TTK_NODE("Menubutton.label", TTK_PACK_LEFT)))) + TTK_NODE("Menubutton.label", TTK_PACK_LEFT)))) TTK_END_LAYOUT /*------------------------------------------------------------------------ diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index b1c897e..be63496 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -1202,7 +1202,7 @@ TtkClamTheme_Init(Tcl_Interp *interp) Ttk_Theme theme = Ttk_CreateTheme(interp, "clam", 0); if (!theme) { - return TCL_ERROR; + return TCL_ERROR; } Ttk_RegisterElement(interp, theme, "border", diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c index b64eb2e..87897f7 100644 --- a/generic/ttk/ttkClassicTheme.c +++ b/generic/ttk/ttkClassicTheme.c @@ -172,15 +172,15 @@ static void ButtonBorderElementDraw( inset += round(5 * TkScalingLevel(tkwin)); break; case TTK_BUTTON_DEFAULT_ACTIVE : - Tk_Draw3DRectangle(tkwin, d, border, + Tk_Draw3DRectangle(tkwin, d, border, b.x+inset, b.y+inset, b.width - 2*inset, b.height - 2*inset, 2, TK_RELIEF_FLAT); - inset += 2; - Tk_Draw3DRectangle(tkwin, d, border, + inset += 2; + Tk_Draw3DRectangle(tkwin, d, border, b.x+inset, b.y+inset, b.width - 2*inset, b.height - 2*inset, 1, TK_RELIEF_SUNKEN); ++inset; - Tk_Draw3DRectangle(tkwin, d, border, + Tk_Draw3DRectangle(tkwin, d, border, b.x+inset, b.y+inset, b.width - 2*inset, b.height - 2*inset, 2, TK_RELIEF_FLAT); inset += 2; @@ -805,50 +805,50 @@ TTK_BEGIN_LAYOUT_TABLE(LayoutTable) TTK_LAYOUT("TButton", TTK_GROUP("Button.highlight", TTK_FILL_BOTH, - TTK_GROUP("Button.border", TTK_FILL_BOTH|TTK_BORDER, + TTK_GROUP("Button.border", TTK_FILL_BOTH|TTK_BORDER, TTK_GROUP("Button.padding", TTK_FILL_BOTH, - TTK_NODE("Button.label", TTK_FILL_BOTH))))) + TTK_NODE("Button.label", TTK_FILL_BOTH))))) TTK_LAYOUT("TCheckbutton", TTK_GROUP("Checkbutton.highlight", TTK_FILL_BOTH, - TTK_GROUP("Checkbutton.border", TTK_FILL_BOTH, + TTK_GROUP("Checkbutton.border", TTK_FILL_BOTH, TTK_GROUP("Checkbutton.padding", TTK_FILL_BOTH, - TTK_NODE("Checkbutton.indicator", TTK_PACK_LEFT) - TTK_NODE("Checkbutton.label", TTK_PACK_LEFT|TTK_FILL_BOTH))))) + TTK_NODE("Checkbutton.indicator", TTK_PACK_LEFT) + TTK_NODE("Checkbutton.label", TTK_PACK_LEFT|TTK_FILL_BOTH))))) TTK_LAYOUT("TRadiobutton", TTK_GROUP("Radiobutton.highlight", TTK_FILL_BOTH, - TTK_GROUP("Radiobutton.border", TTK_FILL_BOTH, + TTK_GROUP("Radiobutton.border", TTK_FILL_BOTH, TTK_GROUP("Radiobutton.padding", TTK_FILL_BOTH, - TTK_NODE("Radiobutton.indicator", TTK_PACK_LEFT) - TTK_NODE("Radiobutton.label", TTK_PACK_LEFT|TTK_FILL_BOTH))))) + TTK_NODE("Radiobutton.indicator", TTK_PACK_LEFT) + TTK_NODE("Radiobutton.label", TTK_PACK_LEFT|TTK_FILL_BOTH))))) TTK_LAYOUT("TMenubutton", TTK_GROUP("Menubutton.highlight", TTK_FILL_BOTH, - TTK_GROUP("Menubutton.border", TTK_FILL_BOTH, + TTK_GROUP("Menubutton.border", TTK_FILL_BOTH, TTK_NODE("Menubutton.indicator", TTK_PACK_RIGHT) TTK_GROUP("Menubutton.padding", TTK_FILL_X, - TTK_NODE("Menubutton.label", 0))))) + TTK_NODE("Menubutton.label", 0))))) /* "classic" entry, includes highlight border */ TTK_LAYOUT("TEntry", TTK_GROUP("Entry.highlight", TTK_FILL_BOTH, - TTK_GROUP("Entry.field", TTK_FILL_BOTH|TTK_BORDER, + TTK_GROUP("Entry.field", TTK_FILL_BOTH|TTK_BORDER, TTK_GROUP("Entry.padding", TTK_FILL_BOTH, - TTK_NODE("Entry.textarea", TTK_FILL_BOTH))))) + TTK_NODE("Entry.textarea", TTK_FILL_BOTH))))) /* "classic" combobox, includes highlight border */ TTK_LAYOUT("TCombobox", TTK_GROUP("Combobox.highlight", TTK_FILL_BOTH, - TTK_GROUP("Combobox.field", TTK_FILL_BOTH, + TTK_GROUP("Combobox.field", TTK_FILL_BOTH, TTK_NODE("Combobox.downarrow", TTK_PACK_RIGHT|TTK_FILL_Y) TTK_GROUP("Combobox.padding", TTK_FILL_BOTH, - TTK_NODE("Combobox.textarea", TTK_FILL_BOTH))))) + TTK_NODE("Combobox.textarea", TTK_FILL_BOTH))))) /* "classic" spinbox, includes highlight border */ TTK_LAYOUT("TSpinbox", TTK_GROUP("Spinbox.highlight", TTK_FILL_BOTH, - TTK_GROUP("Spinbox.field", TTK_FILL_BOTH|TTK_FILL_X, + TTK_GROUP("Spinbox.field", TTK_FILL_BOTH|TTK_FILL_X, TTK_GROUP("null", TTK_PACK_RIGHT, TTK_NODE("Spinbox.uparrow", TTK_PACK_TOP|TTK_STICK_E) TTK_NODE("Spinbox.downarrow", TTK_PACK_BOTTOM|TTK_STICK_E)) diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index 4c2fcd3..b5500b7 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -1040,7 +1040,7 @@ typedef struct { static const Ttk_ElementOptionSpec ThumbElementOptions[] = { { "-width", TK_OPTION_PIXELS, offsetof(ThumbElement,sizeObj), - STRINGIFY(SCROLLBAR_WIDTH) }, + STRINGIFY(SCROLLBAR_WIDTH) }, { "-background", TK_OPTION_BORDER, offsetof(ThumbElement,borderObj), DEFAULT_BACKGROUND }, { "-bordercolor", TK_OPTION_COLOR, offsetof(ThumbElement,borderColorObj), @@ -1237,6 +1237,7 @@ static void TreeitemIndicatorSize( Ttk_Padding margins; Tk_GetPixelsFromObj(NULL, tkwin, indicator->sizeObj, &size); + if (size % 2 == 0) --size; /* An odd size is better for the indicator. */ Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &margins); *widthPtr = size + Ttk_PaddingWidth(margins); *heightPtr = size + Ttk_PaddingHeight(margins); @@ -1259,7 +1260,7 @@ static void TreeitemIndicatorDraw( return; } - Ttk_GetPaddingFromObj(NULL,tkwin,indicator->marginObj,&padding); + Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &padding); b = Ttk_PadBox(b, padding); XDrawRectangle(Tk_Display(tkwin), d, gc, diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c index ad856e3..0af0507 100644 --- a/generic/ttk/ttkElements.c +++ b/generic/ttk/ttkElements.c @@ -85,7 +85,7 @@ static void FillElementDraw( TCL_UNUSED(Ttk_State)) { BackgroundElement *bg = (BackgroundElement *)elementRecord; - Tk_3DBorder backgroundPtr = Tk_Get3DBorderFromObj(tkwin,bg->backgroundObj); + Tk_3DBorder backgroundPtr = Tk_Get3DBorderFromObj(tkwin, bg->backgroundObj); XFillRectangle(Tk_Display(tkwin), d, Tk_3DBorderGC(tkwin, backgroundPtr, TK_3D_FLAT_GC), @@ -247,6 +247,7 @@ static void FieldElementDraw( int x1 = b.x, x2 = b.x + b.width - 1; int y1 = b.y, y2 = b.y + b.height - 1; int w = WIN32_XDRAWLINE_HACK; + GC bgGC; /* * Draw the outer rounded rectangle @@ -265,7 +266,7 @@ static void FieldElementDraw( /* * Fill the inner rectangle */ - GC bgGC = Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC); + bgGC = Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC); XFillRectangle(disp, d, bgGC, b.x+1, b.y+1, b.width-2, b.height-2); } else { /* @@ -340,7 +341,7 @@ static void PaddingElementSize( Tk_GetReliefFromObj(NULL, padding->reliefObj, &relief); Tk_GetPixelsFromObj(NULL, tkwin, padding->shiftreliefObj, &shiftRelief); - Ttk_GetPaddingFromObj(NULL,tkwin,padding->paddingObj,&pad); + Ttk_GetPaddingFromObj(NULL, tkwin, padding->paddingObj, &pad); *paddingPtr = Ttk_RelievePadding(pad, relief, shiftRelief); } @@ -371,33 +372,40 @@ static void DrawFocusRing( Ttk_Box b) { XColor *color = Tk_GetColorFromObj(tkwin, colorObj); - unsigned long mask = 0UL; - XGCValues gcvalues; + XGCValues gcValues; GC gc; + Display *disp = Tk_Display(tkwin); + + if (thickness < 1 && solid) { + thickness = 1; + } + + gcValues.foreground = color->pixel; + gc = Tk_GetGC(tkwin, GCForeground, &gcValues); - gcvalues.foreground = color->pixel; - gcvalues.line_width = thickness < 1 ? 1 : thickness; if (solid) { - gcvalues.line_style = LineSolid; - mask = GCForeground | GCLineStyle | GCLineWidth; + XRectangle rects[4] = { + {(short)b.x, (short)b.y, (unsigned short)b.width, (unsigned short)thickness}, /* N */ + {(short)b.x, (short)(b.y + b.height - thickness), (unsigned short)b.width, (unsigned short)thickness}, /* S */ + {(short)b.x, (short)(b.y + thickness), (unsigned short)thickness, (unsigned short)(b.height - 2*thickness)}, /* W */ + {(short)(b.x + b.width - thickness), (short)(b.y + thickness), /* E */ + (unsigned short)thickness, (unsigned short)(b.height - 2*thickness)} + }; + + XFillRectangles(disp, d, gc, rects, 4); } else { - gcvalues.line_style = LineOnOffDash; - gcvalues.dashes = 1; - gcvalues.dash_offset = 1; - mask = GCForeground | GCLineStyle | GCDashList | GCDashOffset | GCLineWidth; + TkDrawDottedRect(disp, d, gc, b.x, b.y, b.width, b.height); } - gc = Tk_GetGC(tkwin, mask, &gcvalues); - XDrawRectangle(Tk_Display(tkwin), d, gc, b.x, b.y, b.width-1, b.height-1); Tk_FreeGC(Tk_Display(tkwin), gc); } static const Ttk_ElementOptionSpec FocusElementOptions[] = { - { "-focuscolor",TK_OPTION_COLOR, + { "-focuscolor", TK_OPTION_COLOR, offsetof(FocusElement,focusColorObj), "black" }, - { "-focusthickness",TK_OPTION_PIXELS, + { "-focusthickness", TK_OPTION_PIXELS, offsetof(FocusElement,focusThicknessObj), "1" }, - { "-focussolid",TK_OPTION_BOOLEAN, + { "-focussolid", TK_OPTION_BOOLEAN, offsetof(FocusElement,focusSolidObj), "0" }, { NULL, TK_OPTION_BOOLEAN, 0, NULL } }; @@ -568,7 +576,7 @@ static const Ttk_ElementOptionSpec SizegripOptions[] = { offsetof(SizegripElement,backgroundObj), DEFAULT_BACKGROUND }, { "-gripsize", TK_OPTION_PIXELS, offsetof(SizegripElement,gripSizeObj), "11.25p" }, - {0,TK_OPTION_BOOLEAN,0,0} + {0, TK_OPTION_BOOLEAN, 0, 0} }; static void SizegripSize( @@ -608,9 +616,9 @@ static void SizegripDraw( while (gripCount--) { x1 -= gripSpace; y2 -= gripSpace; for (int i = 1; i < gripThickness; i++) { - XDrawLine(Tk_Display(tkwin), d, darkGC, x1,y1, x2,y2); --x1; --y2; + XDrawLine(Tk_Display(tkwin), d, darkGC, x1,y1, x2,y2); --x1; --y2; } - XDrawLine(Tk_Display(tkwin), d, lightGC, x1,y1, x2,y2); --x1; --y2; + XDrawLine(Tk_Display(tkwin), d, lightGC, x1,y1, x2,y2); --x1; --y2; } } @@ -641,18 +649,18 @@ typedef struct { static const char checkbtnOffData[] = "\ <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\ - <rect x='.5' y='.5' width='15' height='15' rx='1.5' fill='#ffffff' stroke='#888888'/>\n\ + <rect x='.5' y='.5' width='15' height='15' rx='3.5' fill='#ffffff' stroke='#888888'/>\n\ </svg>"; static const char checkbtnOnData[] = "\ <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\ - <rect x='0' y='0' width='16' height='16' fill='#4a6984' rx='2'/>\n\ + <rect x='0' y='0' width='16' height='16' fill='#4a6984' rx='4'/>\n\ <path d='m4.5 8 3 3 4-6' fill='none' stroke='#ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/>\n\ </svg>"; static const char checkbtnTriData[] = "\ <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\ - <rect x='0' y='0' width='16' height='16' fill='#4a6984' rx='2'/>\n\ + <rect x='0' y='0' width='16' height='16' fill='#4a6984' rx='4'/>\n\ <path d='m4 8h8' fill='none' stroke='#ffffff' stroke-width='2'/>\n\ </svg>"; @@ -704,7 +712,7 @@ static const Ttk_ElementOptionSpec IndicatorElementOptions[] = { { "-indicatorbackground", TK_OPTION_COLOR, offsetof(IndicatorElement,backgroundObj), "#ffffff" }, { "-indicatorforeground", TK_OPTION_COLOR, - offsetof(IndicatorElement,foregroundObj), "#ffffff" }, + offsetof(IndicatorElement,foregroundObj), "#ffffff" }, { "-bordercolor", TK_OPTION_COLOR, offsetof(IndicatorElement,borderColorObj), "#888888" }, { "-indicatormargin", TK_OPTION_STRING, @@ -731,7 +739,7 @@ static void ColorToStr( const XColor *colorPtr, char *colorStr) /* in the format "RRGGBB" */ { snprintf(colorStr, 7, "%02x%02x%02x", - colorPtr->red >> 8, colorPtr->green >> 8, colorPtr->blue >> 8); + colorPtr->red >> 8, colorPtr->green >> 8, colorPtr->blue >> 8); } static void ImageChanged( /* to be passed to Tk_GetImage() */ @@ -920,7 +928,7 @@ static const Ttk_ElementOptionSpec ArrowElementOptions[] = { { NULL, TK_OPTION_BOOLEAN, 0, NULL } }; -static const Ttk_Padding ArrowPadding = { 3,3,3,3 }; +static const Ttk_Padding ArrowPadding = { 3, 3, 3, 3 }; static void ArrowElementSize( void *clientData, void *elementRecord, Tk_Window tkwin, @@ -1236,7 +1244,7 @@ static void TroughElementDraw( } else { b.x += (b.width - grooveWidth) / 2; b.width = grooveWidth; - } + } /* * Save the data of the trough's inner box for later @@ -1634,7 +1642,7 @@ static const Ttk_ElementOptionSpec TabElementOptions[] = { offsetof(TabElement,highlightObj), "0" }, { "-highlightcolor", TK_OPTION_COLOR, offsetof(TabElement,highlightColorObj), "#4a6984" }, - {0,TK_OPTION_BOOLEAN,0,0} + {0, TK_OPTION_BOOLEAN, 0, 0} }; static void TabElementSize( @@ -1869,7 +1877,7 @@ static void ClientElementDraw( Tk_GetPixelsFromObj(NULL, tkwin, ce->borderWidthObj, &borderWidth); Tk_Fill3DRectangle(tkwin, d, border, - b.x, b.y, b.width, b.height, borderWidth,TK_RELIEF_RAISED); + b.x, b.y, b.width, b.height, borderWidth, TK_RELIEF_RAISED); } static const Ttk_ElementSpec ClientElementSpec = { @@ -1894,7 +1902,7 @@ TtkElements_Init(Tcl_Interp *interp) * Elements: */ Ttk_RegisterElement(interp, theme, "background", - &BackgroundElementSpec,NULL); + &BackgroundElementSpec, NULL); Ttk_RegisterElement(interp, theme, "fill", &FillElementSpec, NULL); Ttk_RegisterElement(interp, theme, "border", &BorderElementSpec, NULL); diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 8c023d4..9d403ef 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -105,10 +105,10 @@ typedef struct { int exportSelection; /* Tie internal selection to X selection? */ VMODE validate; /* Validation mode */ - char *validateCmd; /* Validation script template */ - char *invalidCmd; /* Invalid callback script template */ + Tcl_Obj *validateCmdObj; /* Validation script template */ + Tcl_Obj *invalidCmdObj; /* Invalid callback script template */ - char *showChar; /* Used to derive displayString */ + Tcl_Obj *showCharObj; /* Used to derive displayString */ Tcl_Obj *fontObj; /* Text font to use */ Tcl_Obj *widthObj; /* Desired width of window (in avgchars) */ @@ -160,13 +160,13 @@ typedef struct { static const Tk_OptionSpec EntryOptionSpecs[] = { {TK_OPTION_BOOLEAN, "-exportselection", "exportSelection", - "ExportSelection", "1", TCL_INDEX_NONE, offsetof(Entry, entry.exportSelection), + "ExportSelection", "1", TCL_INDEX_NONE, offsetof(Entry, entry.exportSelection), 0,0,0 }, {TK_OPTION_FONT, "-font", "font", "Font", DEF_ENTRY_FONT, offsetof(Entry, entry.fontObj),TCL_INDEX_NONE, 0,0,GEOMETRY_CHANGED}, {TK_OPTION_STRING, "-invalidcommand", "invalidCommand", "InvalidCommand", - NULL, TCL_INDEX_NONE, offsetof(Entry, entry.invalidCmd), + NULL, offsetof(Entry, entry.invalidCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", "left", TCL_INDEX_NONE, offsetof(Entry, entry.justify), @@ -175,11 +175,11 @@ static const Tk_OptionSpec EntryOptionSpecs[] = { NULL, offsetof(Entry, entry.placeholderObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-show", "show", "Show", - NULL, TCL_INDEX_NONE, offsetof(Entry, entry.showChar), + NULL, offsetof(Entry, entry.showCharObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-state", "state", "State", "normal", offsetof(Entry, entry.stateObj), TCL_INDEX_NONE, - 0,0,STATE_CHANGED}, + 0,0,STATE_CHANGED}, {TK_OPTION_STRING, "-textvariable", "textVariable", "Variable", NULL, offsetof(Entry, entry.textVariableObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,TEXTVAR_CHANGED}, @@ -187,13 +187,13 @@ static const Tk_OptionSpec EntryOptionSpecs[] = { "none", TCL_INDEX_NONE, offsetof(Entry, entry.validate), TK_OPTION_ENUM_VAR, validateStrings, 0}, {TK_OPTION_STRING, "-validatecommand", "validateCommand", "ValidateCommand", - NULL, TCL_INDEX_NONE, offsetof(Entry, entry.validateCmd), + NULL, offsetof(Entry, entry.validateCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_INT, "-width", "width", "Width", DEF_ENTRY_WIDTH, offsetof(Entry, entry.widthObj), TCL_INDEX_NONE, 0,0,GEOMETRY_CHANGED}, {TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand", - NULL, TCL_INDEX_NONE, offsetof(Entry, entry.xscroll.scrollCmd), + NULL, offsetof(Entry, entry.xscroll.scrollCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, SCROLLCMD_CHANGED}, /* EntryStyleData options: @@ -205,8 +205,8 @@ static const Tk_OptionSpec EntryOptionSpecs[] = { NULL, offsetof(Entry, entry.styleData.foregroundObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0}, {TK_OPTION_COLOR, "-placeholderforeground", "placeholderForeground", - "PlaceholderForeground", NULL, - offsetof(Entry, entry.styleData.placeholderForegroundObj), TCL_INDEX_NONE, + "PlaceholderForeground", NULL, + offsetof(Entry, entry.styleData.placeholderForegroundObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0}, WIDGET_TAKEFOCUS_TRUE, @@ -323,14 +323,14 @@ static void EntryUpdateTextLayout(Entry *entryPtr) char *text; Tk_FreeTextLayout(entryPtr->entry.textLayout); if ((entryPtr->entry.numChars != 0) || (entryPtr->entry.placeholderObj == NULL)) { - entryPtr->entry.textLayout = Tk_ComputeTextLayout( + entryPtr->entry.textLayout = Tk_ComputeTextLayout( Tk_GetFontFromObj(entryPtr->core.tkwin, entryPtr->entry.fontObj), entryPtr->entry.displayString, entryPtr->entry.numChars, 0/*wraplength*/, entryPtr->entry.justify, TK_IGNORE_NEWLINES, &entryPtr->entry.layoutWidth, &entryPtr->entry.layoutHeight); } else { - text = Tcl_GetStringFromObj(entryPtr->entry.placeholderObj, &length); - entryPtr->entry.textLayout = Tk_ComputeTextLayout( + text = Tcl_GetStringFromObj(entryPtr->entry.placeholderObj, &length); + entryPtr->entry.textLayout = Tk_ComputeTextLayout( Tk_GetFontFromObj(entryPtr->core.tkwin, entryPtr->entry.fontObj), text, length, 0/*wraplength*/, entryPtr->entry.justify, TK_IGNORE_NEWLINES, @@ -604,7 +604,7 @@ EntryValidateChange( VMODE vmode = entryPtr->entry.validate; int code, change_ok; - if ((entryPtr->entry.validateCmd == NULL) + if ((entryPtr->entry.validateCmdObj == NULL) || (entryPtr->core.flags & VALIDATING) || !EntryNeedsValidation(vmode, reason)) { @@ -616,7 +616,7 @@ EntryValidateChange( /* Run -validatecommand and check return value: */ code = RunValidationScript(interp, entryPtr, - entryPtr->entry.validateCmd, "-validatecommand", + Tcl_GetString(entryPtr->entry.validateCmdObj), "-validatecommand", newValue, index, count, reason); if (code != TCL_OK) { goto done; @@ -632,9 +632,9 @@ EntryValidateChange( /* Run the -invalidcommand if validation failed: */ - if (!change_ok && entryPtr->entry.invalidCmd != NULL) { + if (!change_ok && entryPtr->entry.invalidCmdObj != NULL) { code = RunValidationScript(interp, entryPtr, - entryPtr->entry.invalidCmd, "-invalidcommand", + Tcl_GetString(entryPtr->entry.invalidCmdObj), "-invalidcommand", newValue, index, count, reason); if (code != TCL_OK) { goto done; @@ -686,9 +686,9 @@ static void EntryRevalidateBG(Entry *entryPtr, VREASON reason) VMODE vmode = entryPtr->entry.validate; if (EntryNeedsValidation(vmode, reason)) { - if (EntryRevalidate(interp, entryPtr, reason) == TCL_ERROR) { + if (EntryRevalidate(interp, entryPtr, reason) == TCL_ERROR) { Tcl_BackgroundException(interp, TCL_ERROR); - } + } } } @@ -764,8 +764,8 @@ EntryStoreValue(Entry *entryPtr, const char *value) entryPtr->entry.numChars = numChars; entryPtr->entry.displayString - = entryPtr->entry.showChar - ? EntryDisplayString(entryPtr->entry.showChar, numChars) + = entryPtr->entry.showCharObj + ? EntryDisplayString(Tcl_GetString(entryPtr->entry.showCharObj), numChars) : entryPtr->entry.string ; @@ -1059,8 +1059,8 @@ static int EntryConfigure(Tcl_Interp *interp, void *recordPtr, int mask) ckfree(entryPtr->entry.displayString); entryPtr->entry.displayString - = entryPtr->entry.showChar - ? EntryDisplayString(entryPtr->entry.showChar, entryPtr->entry.numChars) + = entryPtr->entry.showCharObj + ? EntryDisplayString(Tcl_GetString(entryPtr->entry.showCharObj), entryPtr->entry.numChars) : entryPtr->entry.string ; @@ -1287,7 +1287,7 @@ static void EntryDisplay(void *clientData, Drawable d) /* Draw cursor: */ if (showCursor) { - Ttk_Box field = Ttk_ClientRegion(entryPtr->core.layout, "field"); + Ttk_Box field = Ttk_ClientRegion(entryPtr->core.layout, "field"); int cursorX = EntryCharPosition(entryPtr, entryPtr->entry.insertPos), cursorY = entryPtr->entry.layoutY, cursorHeight = entryPtr->entry.layoutHeight, @@ -1333,7 +1333,7 @@ static void EntryDisplay(void *clientData, Drawable d) gc = EntryGetGC(entryPtr, foregroundObj, clipRegion); if (showSelection) { - /* Draw the selected and unselected portions separately. + /* Draw the selected and unselected portions separately. */ if (leftIndex < selFirst) { Tk_DrawTextLayout( @@ -1361,8 +1361,8 @@ static void EntryDisplay(void *clientData, Drawable d) Tk_FreeGC(Tk_Display(tkwin), gc); } else { - /* Draw the entire visible text - */ + /* Draw the entire visible text + */ Tk_DrawTextLayout( Tk_Display(tkwin), d, gc, entryPtr->entry.textLayout, entryPtr->entry.layoutX, entryPtr->entry.layoutY, @@ -1454,7 +1454,7 @@ EntryIndex( *indexPtr = Tk_PointToChar(entryPtr->entry.textLayout, x - entryPtr->entry.layoutX, 0); - TtkUpdateScrollInfo(entryPtr->entry.xscrollHandle); + TtkUpdateScrollInfo(entryPtr->entry.xscrollHandle); if (*indexPtr < entryPtr->entry.xscroll.first) { *indexPtr = entryPtr->entry.xscroll.first; } @@ -1667,7 +1667,7 @@ static int EntrySelectionRangeCommand( return TCL_ERROR; } if (EntryIndex(interp, entryPtr, objv[3], &start) != TCL_OK - || EntryIndex(interp, entryPtr, objv[4], &end) != TCL_OK) { + || EntryIndex(interp, entryPtr, objv[4], &end) != TCL_OK) { return TCL_ERROR; } if (entryPtr->core.state & TTK_STATE_DISABLED) { @@ -1805,13 +1805,13 @@ typedef struct { static const Tk_OptionSpec ComboboxOptionSpecs[] = { {TK_OPTION_STRING, "-height", "height", "Height", - DEF_LIST_HEIGHT, offsetof(Combobox, combobox.heightObj), TCL_INDEX_NONE, + DEF_LIST_HEIGHT, offsetof(Combobox, combobox.heightObj), TCL_INDEX_NONE, 0,0,0 }, {TK_OPTION_STRING, "-postcommand", "postCommand", "PostCommand", - "", offsetof(Combobox, combobox.postCommandObj), TCL_INDEX_NONE, + "", offsetof(Combobox, combobox.postCommandObj), TCL_INDEX_NONE, 0,0,0 }, {TK_OPTION_STRING, "-values", "values", "Values", - "", offsetof(Combobox, combobox.valuesObj), TCL_INDEX_NONE, + "", offsetof(Combobox, combobox.valuesObj), TCL_INDEX_NONE, 0,0,0 }, WIDGET_INHERIT_OPTIONS(EntryOptionSpecs) }; @@ -1891,10 +1891,10 @@ static int ComboboxCurrentCommand( if (TCL_OK == TkGetIntForIndex(objv[2], nValues - 1, 0, &idx)) { if (idx < 0 || idx >= nValues) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "index \"%s\" out of range", Tcl_GetString(objv[2]))); - Tcl_SetErrorCode(interp, "TTK", "COMBOBOX", "IDX_RANGE", NULL); - return TCL_ERROR; + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "index \"%s\" out of range", Tcl_GetString(objv[2]))); + Tcl_SetErrorCode(interp, "TTK", "COMBOBOX", "IDX_RANGE", NULL); + return TCL_ERROR; } currentIndex = idx; } else { @@ -1977,7 +1977,7 @@ typedef struct { static const Tk_OptionSpec SpinboxOptionSpecs[] = { {TK_OPTION_STRING, "-values", "values", "Values", - "", offsetof(Spinbox, spinbox.valuesObj), TCL_INDEX_NONE, + "", offsetof(Spinbox, spinbox.valuesObj), TCL_INDEX_NONE, 0,0,0 }, {TK_OPTION_DOUBLE, "-from", "from", "From", diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c index cd877f3..54f8442 100644 --- a/generic/ttk/ttkFrame.c +++ b/generic/ttk/ttkFrame.c @@ -254,7 +254,7 @@ typedef struct { static const Tk_OptionSpec LabelframeOptionSpecs[] = { {TK_OPTION_STRING, "-labelanchor", "labelAnchor", "LabelAnchor", "nw", offsetof(Labelframe, label.labelAnchorObj),TCL_INDEX_NONE, - 0,0,GEOMETRY_CHANGED}, + 0,0,GEOMETRY_CHANGED}, {TK_OPTION_STRING, "-text", "text", "Text", "", offsetof(Labelframe,label.textObj), TCL_INDEX_NONE, 0,0,GEOMETRY_CHANGED }, diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index f28b90f..f888855 100644 --- a/generic/ttk/ttkLabel.c +++ b/generic/ttk/ttkLabel.c @@ -145,9 +145,9 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b) b = Ttk_AnchorBox(b, text->width, text->height, anchor); /* - * Clip text if it's too wide: + * Clip text if it's too wide or too high: */ - if (b.width < text->width) { + if (b.width < text->width || b.height < text->height) { XRectangle rect; clipRegion = TkCreateRegion(); @@ -254,9 +254,9 @@ static const Ttk_ElementSpec TextElementSpec = { static int cTextSetup(TextElement *text, Tk_Window tkwin) { if (*Tcl_GetString(text->textObj) == '\0') { - return 0; + return 0; } else { - return TextSetup(text, tkwin); + return TextSetup(text, tkwin); } } diff --git a/generic/ttk/ttkLayout.c b/generic/ttk/ttkLayout.c index 31c5ed2..0a05eef 100644 --- a/generic/ttk/ttkLayout.c +++ b/generic/ttk/ttkLayout.c @@ -710,8 +710,8 @@ Ttk_LayoutTemplate Ttk_ParseLayoutTemplate(Tcl_Interp *interp, Tcl_Obj *objPtr) if (childSpec) { tail->child = Ttk_ParseLayoutTemplate(interp, childSpec); if (!tail->child) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf("Invalid -children value")); - Tcl_SetErrorCode(interp, "TTK", "VALUE", "CHILDREN", NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf("Invalid -children value")); + Tcl_SetErrorCode(interp, "TTK", "VALUE", "CHILDREN", NULL); goto error; } } diff --git a/generic/ttk/ttkManager.c b/generic/ttk/ttkManager.c index 1ea5f54..f4c74b8 100644 --- a/generic/ttk/ttkManager.c +++ b/generic/ttk/ttkManager.c @@ -549,7 +549,7 @@ int Ttk_Maintainable(Tcl_Interp *interp, Tk_Window window, Tk_Window container) return 1; badWindow: - Tcl_SetObjResult(interp, Tcl_ObjPrintf("can't add %s as content of %s", + Tcl_SetObjResult(interp, Tcl_ObjPrintf("cannot add \"%s\" as content of \"%s\"", Tk_PathName(window), Tk_PathName(container))); Tcl_SetErrorCode(interp, "TTK", "GEOMETRY", "MAINTAINABLE", NULL); return 0; diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c index 5a97ca8..37867f7 100644 --- a/generic/ttk/ttkPanedwindow.c +++ b/generic/ttk/ttkPanedwindow.c @@ -157,7 +157,7 @@ static int ConfigurePane( */ if (pane->weight < 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( - "-weight must be nonnegative", -1)); + "-weight must be non-negative", -1)); Tcl_SetErrorCode(interp, "TTK", "PANE", "WEIGHT", NULL); goto error; } diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c index 5584d9b..09202c7 100644 --- a/generic/ttk/ttkProgress.c +++ b/generic/ttk/ttkProgress.c @@ -458,11 +458,11 @@ static int ProgressbarStepCommand( */ if (pb->progress.variableTrace) { int result = Tcl_ObjSetVar2( - interp, pb->progress.variableObj, 0, newValueObj, - TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) - ? TCL_OK : TCL_ERROR; - Tcl_DecrRefCount(newValueObj); - return result; + interp, pb->progress.variableObj, 0, newValueObj, + TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) + ? TCL_OK : TCL_ERROR; + Tcl_DecrRefCount(newValueObj); + return result; } /* Otherwise, change the -value directly: diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c index ec2343a..ea81570 100644 --- a/generic/ttk/ttkScale.c +++ b/generic/ttk/ttkScale.c @@ -75,7 +75,7 @@ static const Tk_OptionSpec ScaleOptionSpecs[] = {TK_OPTION_STRING, "-state", "state", "State", "normal", offsetof(Scale,scale.stateObj), TCL_INDEX_NONE, - 0, 0, STATE_CHANGED}, + 0, 0, STATE_CHANGED}, WIDGET_TAKEFOCUS_TRUE, WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs) @@ -508,13 +508,17 @@ static const WidgetSpec ScaleWidgetSpec = }; TTK_BEGIN_LAYOUT(VerticalScaleLayout) - TTK_GROUP("Vertical.Scale.trough", TTK_FILL_BOTH, - TTK_NODE("Vertical.Scale.slider", TTK_PACK_TOP) ) + TTK_GROUP("Vertical.Scale.focus", TTK_FILL_BOTH, + TTK_GROUP("Vertical.Scale.padding", TTK_FILL_BOTH, + TTK_GROUP("Vertical.Scale.trough", TTK_FILL_BOTH, + TTK_NODE("Vertical.Scale.slider", TTK_PACK_TOP)))) TTK_END_LAYOUT TTK_BEGIN_LAYOUT(HorizontalScaleLayout) - TTK_GROUP("Horizontal.Scale.trough", TTK_FILL_BOTH, - TTK_NODE("Horizontal.Scale.slider", TTK_PACK_LEFT) ) + TTK_GROUP("Horizontal.Scale.focus", TTK_FILL_BOTH, + TTK_GROUP("Horizontal.Scale.padding", TTK_FILL_BOTH, + TTK_GROUP("Horizontal.Scale.trough", TTK_FILL_BOTH, + TTK_NODE("Horizontal.Scale.slider", TTK_PACK_LEFT)))) TTK_END_LAYOUT /* diff --git a/generic/ttk/ttkScroll.c b/generic/ttk/ttkScroll.c index 7a7f588..1bbd713 100644 --- a/generic/ttk/ttkScroll.c +++ b/generic/ttk/ttkScroll.c @@ -82,7 +82,7 @@ static int UpdateScrollbar(Tcl_Interp *interp, ScrollHandle h) h->flags &= ~SCROLL_UPDATE_REQUIRED; - if (s->scrollCmd == NULL) { + if (s->scrollCmdObj == NULL) { return TCL_OK; } @@ -90,7 +90,7 @@ static int UpdateScrollbar(Tcl_Interp *interp, ScrollHandle h) Tcl_PrintDouble(interp, (double)s->first / s->total, arg1+1); Tcl_PrintDouble(interp, (double)s->last / s->total, arg2+1); Tcl_DStringInit(&buf); - Tcl_DStringAppend(&buf, s->scrollCmd, TCL_INDEX_NONE); + Tcl_DStringAppend(&buf, Tcl_GetString(s->scrollCmdObj), TCL_INDEX_NONE); Tcl_DStringAppend(&buf, arg1, TCL_INDEX_NONE); Tcl_DStringAppend(&buf, arg2, TCL_INDEX_NONE); @@ -105,17 +105,17 @@ static int UpdateScrollbar(Tcl_Interp *interp, ScrollHandle h) if (code != TCL_OK && !Tcl_InterpDeleted(interp)) { /* Add error to stack trace. - * Also set the SCROLL_UPDATE_REQUIRED flag so that a later call to - * TtkScrolled has an effect. Indeed, the error in the -scrollcommand - * callback may later be gone, for instance the callback proc got - * defined in the meantime. + * Also set the SCROLL_UPDATE_REQUIRED flag so that a later call to + * TtkScrolled has an effect. Indeed, the error in the -scrollcommand + * callback may later be gone, for instance the callback proc got + * defined in the meantime. */ Tcl_AddErrorInfo(interp, /* @@@ "horizontal" / "vertical" */ "\n (scrolling command executed by "); Tcl_AddErrorInfo(interp, Tk_PathName(h->corePtr->tkwin)); Tcl_AddErrorInfo(interp, ")"); - TtkScrollbarUpdateRequired(h); + TtkScrollbarUpdateRequired(h); } return code; } @@ -193,7 +193,7 @@ void TtkScrollbarUpdateRequired(ScrollHandle h) void TtkUpdateScrollInfo(ScrollHandle h) { if (h->corePtr->flags & REDISPLAY_PENDING) { - h->corePtr->widgetSpec->layoutProc(h->corePtr); + h->corePtr->widgetSpec->layoutProc(h->corePtr); } } @@ -255,7 +255,7 @@ void TtkScrollTo(ScrollHandle h, int newFirst, int updateScrollInfo) Scrollable *s = h->scrollPtr; if (updateScrollInfo) { - TtkUpdateScrollInfo(h); + TtkUpdateScrollInfo(h); } if (newFirst >= s->total) diff --git a/generic/ttk/ttkTagSet.c b/generic/ttk/ttkTagSet.c index 5645325..0125603 100644 --- a/generic/ttk/ttkTagSet.c +++ b/generic/ttk/ttkTagSet.c @@ -86,8 +86,8 @@ void Ttk_DeleteTagFromTable(Ttk_TagTable tagTable, Ttk_Tag tag) entryPtr = Tcl_FindHashEntry(&tagTable->tags, tag->tagName); if (entryPtr != NULL) { - DeleteTag(tagTable, tag); - Tcl_DeleteHashEntry(entryPtr); + DeleteTag(tagTable, tag); + Tcl_DeleteHashEntry(entryPtr); } } diff --git a/generic/ttk/ttkTheme.c b/generic/ttk/ttkTheme.c index fe222fc..bb85197 100644 --- a/generic/ttk/ttkTheme.c +++ b/generic/ttk/ttkTheme.c @@ -237,7 +237,7 @@ NewElementClass(const char *name, const Ttk_ElementSpec *specPtr, void *clientDa elementClass->defaultValues = (Tcl_Obj **) ckalloc(elementClass->nResources * sizeof(Tcl_Obj *) + 1); for (i=0; i < elementClass->nResources; ++i) { - const char *defaultValue = specPtr->options[i].defaultValue; + const char *defaultValue = specPtr->options[i].defaultValue; if (defaultValue) { elementClass->defaultValues[i] = Tcl_NewStringObj(defaultValue,-1); Tcl_IncrRefCount(elementClass->defaultValues[i]); @@ -536,9 +536,10 @@ void Ttk_TkDestroyedHandler( StylePackageData* pkgPtr = GetStylePackageData(interp); /* - * Cancel any pending ThemeChanged calls: + * Cancel any pending ThemeChanged calls. We might be called + * before Ttk is initialized. See bug [3981091ed336]. */ - if (pkgPtr->themeChangePending) { + if (pkgPtr && pkgPtr->themeChangePending) { Tcl_CancelIdleCall(ThemeChangedProc, pkgPtr); } } @@ -610,7 +611,7 @@ static Ttk_Theme LookupTheme( entryPtr = Tcl_FindHashEntry(&pkgPtr->themeTable, name); if (!entryPtr) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "theme \"%s\" doesn't exist", name)); + "theme \"%s\" does not exist", name)); Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "THEME", name, NULL); return NULL; } @@ -1327,7 +1328,9 @@ static int StyleLookupCmd( } style = Ttk_GetStyle(theme, Tcl_GetString(objv[2])); - + if (!style) { + return TCL_ERROR; + } optionName = Tcl_GetString(objv[3]); if (objc >= 5) { @@ -1352,7 +1355,7 @@ static int StyleLookupCmd( } static int StyleThemeCurrentCmd( - void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj * const objv[]) + void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]) { StylePackageData *pkgPtr = (StylePackageData *)clientData; Tcl_HashSearch search; @@ -1635,17 +1638,17 @@ static int StyleThemeStylesCmd( Ttk_Theme themePtr; if (objc < 3 || objc > 4) { - Tcl_WrongNumArgs(interp, 3, objv, "?theme?"); - return TCL_ERROR; + Tcl_WrongNumArgs(interp, 3, objv, "?theme?"); + return TCL_ERROR; } if (objc == 3) { - themePtr = Ttk_GetCurrentTheme(interp); + themePtr = Ttk_GetCurrentTheme(interp); } else { - themePtr = Ttk_GetTheme(interp, Tcl_GetString(objv[3])); + themePtr = Ttk_GetTheme(interp, Tcl_GetString(objv[3])); } if (!themePtr) - return TCL_ERROR; + return TCL_ERROR; return TtkEnumerateHashTable(interp, &themePtr->styleTable); } diff --git a/generic/ttk/ttkTheme.h b/generic/ttk/ttkTheme.h index 5491693..bf8a5b7 100644 --- a/generic/ttk/ttkTheme.h +++ b/generic/ttk/ttkTheme.h @@ -199,9 +199,9 @@ typedef void (Ttk_CleanupProc)(void *clientData); enum TTKStyleVersion2 { TK_STYLE_VERSION_2 = 2 }; typedef void (Ttk_ElementSizeProc)(void *clientData, void *elementRecord, - Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding*); + Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding*); typedef void (Ttk_ElementDrawProc)(void *clientData, void *elementRecord, - Tk_Window tkwin, Drawable d, Ttk_Box b, Ttk_State state); + Tk_Window tkwin, Drawable d, Ttk_Box b, Ttk_State state); typedef struct Ttk_ElementOptionSpec { diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 5106909..b43d764 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -10,6 +10,8 @@ #ifdef _WIN32 #include "tkWinInt.h" +#elif defined(MAC_OSX_TK) +#include "tkMacOSXPrivate.h" #endif #define DEF_TREE_ROWS "10" @@ -20,13 +22,11 @@ #define DEF_MINWIDTH "20" static const Tk_Anchor DEFAULT_IMAGEANCHOR = TK_ANCHOR_W; -static const int DEFAULT_INDENT = 20; -static const int HALO = 4; /* heading separator */ +static const int DEFAULT_INDENT = 20; +static const int HALO = 4; /* heading separator */ #define STATE_CHANGED (0x100) /* item state option changed */ -#define MAX(a,b) (((a) > (b)) ? (a) : (b)) - /*------------------------------------------------------------------------ * +++ Tree items. * @@ -54,8 +54,8 @@ struct TreeItemRec { Tcl_Obj *valuesObj; Tcl_Obj *openObj; Tcl_Obj *tagsObj; - Tcl_Obj *selObj; - Tcl_Obj *imageAnchorObj; + Tcl_Obj *selObj; + Tcl_Obj *imageAnchorObj; int hidden; int height; /* Height is in number of row heights */ @@ -284,7 +284,7 @@ typedef struct { int width; /* Column width, in pixels */ int minWidth; /* Minimum column width, in pixels */ int stretch; /* Should column stretch while resizing? */ - int separator; /* Should this column have a separator? */ + int separator; /* Should this column have a separator? */ Tcl_Obj *idObj; /* Column identifier, from -columns option */ Tcl_Obj *anchorObj; /* -anchor for cell data <<NOTE-ANCHOR>> */ @@ -301,7 +301,7 @@ typedef struct { /* Temporary storage for cell data */ Tcl_Obj *data; - int selected; + int selected; Ttk_TagSet tagset; } TreeColumn; @@ -550,10 +550,10 @@ static const Tk_OptionSpec TreeviewOptionSpecs[] = { 0, 0, GEOMETRY_CHANGED}, {TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand", - NULL, TCL_INDEX_NONE, offsetof(Treeview, tree.xscroll.scrollCmd), + NULL, offsetof(Treeview, tree.xscroll.scrollCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, SCROLLCMD_CHANGED}, {TK_OPTION_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand", - NULL, TCL_INDEX_NONE, offsetof(Treeview, tree.yscroll.scrollCmd), + NULL, offsetof(Treeview, tree.yscroll.scrollCmdObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, SCROLLCMD_CHANGED}, WIDGET_TAKEFOCUS_TRUE, @@ -1685,6 +1685,7 @@ static Tcl_Size IdentifyDisplayColumn(Treeview *tv, int x, int *x1) { Tcl_Size colno = FirstColumn(tv); int xpos = tv->tree.treeArea.x; + int scaledHALO = round(HALO * TkScalingLevel(tv->core.tkwin)); if (tv->tree.nTitleColumns <= colno) { xpos -= tv->tree.xscroll.first; @@ -1693,7 +1694,7 @@ static Tcl_Size IdentifyDisplayColumn(Treeview *tv, int x, int *x1) while (colno < tv->tree.nDisplayColumns) { TreeColumn *column = tv->tree.displayColumns[colno]; int next_xpos = xpos + column->width; - if (xpos <= x && x <= next_xpos + HALO) { + if (xpos <= x && x <= next_xpos + scaledHALO) { *x1 = next_xpos; return colno; } @@ -1740,6 +1741,26 @@ static int DisplayRow(int row, Treeview *tv) return row - tv->tree.yscroll.first + tv->tree.titleRows; } +/* Is an item detached? The root is never detached. */ +static int IsDetached(Treeview* tv, TreeItem* item) +{ + return item->next == NULL && item->prev == NULL && + item->parent == NULL && item != tv->tree.root; +} + +/* Is an item or one of its ancestors detached? */ +static int IsItemOrAncestorDetached(Treeview* tv, TreeItem* item) +{ + TreeItem *parent; + + for (parent = item; parent; parent = parent->parent) { + if (IsDetached(tv, parent)) { + return 1; + } + } + return 0; +} + /* + BoundingBox -- * Compute the parcel of the specified column of the specified item, * (or the entire item if column is NULL) @@ -1754,6 +1775,10 @@ static int BoundingBox( int dispRow; Ttk_Box bbox = tv->tree.treeArea; + /* Make sure the scroll information is current before use */ + TtkUpdateScrollInfo(tv->tree.xscrollHandle); + TtkUpdateScrollInfo(tv->tree.yscrollHandle); + if (tv->tree.rowPosNeedsUpdate) { UpdatePositionTree(tv); } @@ -1762,6 +1787,9 @@ static int BoundingBox( /* not viewable, or off-screen */ return 0; } + if (IsItemOrAncestorDetached(tv, item)) { + return 0; + } bbox.y += dispRow * tv->tree.rowHeight; bbox.height = tv->tree.rowHeight * item->height; @@ -1821,11 +1849,12 @@ static TreeRegion IdentifyRegion(Treeview *tv, int x, int y) { int x1 = 0; Tcl_Size colno = IdentifyDisplayColumn(tv, x, &x1); + int scaledHALO = round(HALO * TkScalingLevel(tv->core.tkwin)); if (Ttk_BoxContains(tv->tree.headingArea, x, y)) { if (colno < 0) { return REGION_NOTHING; - } else if (-HALO <= x1 - x && x1 - x <= HALO) { + } else if (-scaledHALO <= x1 - x && x1 - x <= scaledHALO) { return REGION_SEPARATOR; } else { return REGION_HEADING; @@ -1920,7 +1949,9 @@ static Ttk_Layout TreeviewGetLayout( if ((objPtr = Ttk_QueryOption(treeLayout, "-rowheight", 0))) { (void)Tk_GetPixelsFromObj(NULL, tv->core.tkwin, objPtr, &tv->tree.rowHeight); } - tv->tree.rowHeight = MAX(tv->tree.rowHeight, 1); + if (tv->tree.rowHeight < 1) { + tv->tree.rowHeight = 1; + } if ((objPtr = Ttk_QueryOption(treeLayout, "-columnseparatorwidth", 0))) { (void)Tk_GetPixelsFromObj(NULL, tv->core.tkwin, objPtr, &tv->tree.colSeparatorWidth); @@ -1973,15 +2004,6 @@ static void TreeviewDoLayout(void *clientData) first = tv->tree.yscroll.first; last = tv->tree.yscroll.first + visibleRows - tv->tree.titleRows; total = tv->tree.totalRows - tv->tree.titleRows; - if (tv->tree.treeArea.height % tv->tree.rowHeight) { - /* When the treeview height doesn't correspond to an exact number - * of rows, the last row count must be incremented to draw a - * partial row at the bottom. The total row count must also be - * incremented to be able to scroll all the way to the bottom. - */ - last++; - total++; - } TtkScrolled(tv->tree.yscrollHandle, first, last, total); } @@ -2174,7 +2196,8 @@ static void DrawCells( Ttk_Layout layout = tv->tree.cellLayout; Ttk_Style style = Ttk_LayoutStyle(tv->core.layout); Ttk_State state = ItemState(tv, item); - Ttk_Padding cellPadding = {4, 0, 4, 0}; + short horizPad = round(4 * TkScalingLevel(tv->core.tkwin)); + Ttk_Padding cellPadding = {horizPad, 0, horizPad, 0}; DisplayItem displayItemLocal; DisplayItem displayItemCell, displayItemCellSel; int rowHeight = tv->tree.rowHeight * item->height; @@ -2267,11 +2290,19 @@ static void DrawItem( Ttk_Style style = Ttk_LayoutStyle(tv->core.layout); Ttk_State state = ItemState(tv, item); DisplayItem displayItem, displayItemSel, displayItemLocal; - int rowHeight = tv->tree.rowHeight * item->height; - int x = tv->tree.treeArea.x - tv->tree.xscroll.first; - int xTitle = tv->tree.treeArea.x; - int dispRow = DisplayRow(item->rowPos, tv); - int y = tv->tree.treeArea.y + tv->tree.rowHeight * dispRow; + int x, y, h, xTitle, dispRow, rowHeight; + + dispRow = DisplayRow(item->rowPos, tv); + h = tv->tree.rowHeight * dispRow; + if (h >= tv->tree.treeArea.height) { + /* The item is outside the visible area */ + return; + } + + rowHeight = tv->tree.rowHeight * item->height; + x = tv->tree.treeArea.x - tv->tree.xscroll.first; + xTitle = tv->tree.treeArea.x; + y = tv->tree.treeArea.y + h; PrepareItem(tv, item, &displayItem, state); PrepareItem(tv, item, &displayItemSel, state | TTK_STATE_SELECTED); @@ -2279,7 +2310,8 @@ static void DrawItem( /* Draw row background: */ { - Ttk_Box rowBox = Ttk_MakeBox(x, y, TreeWidth(tv), rowHeight); + Ttk_Box rowBox = Ttk_MakeBox(tv->tree.treeArea.x, y, + TreeWidth(tv), rowHeight); DisplayLayout(tv->tree.rowLayout, &displayItem, state, rowBox, d); } @@ -2319,7 +2351,7 @@ static void DrawItem( if (column->selected) { displayItemUsed = &displayItemSel; - stateCell |= TTK_STATE_SELECTED; + stateCell |= TTK_STATE_SELECTED; } if (column->tagset) { @@ -2397,19 +2429,99 @@ static void DrawForest( } } +/* + DrawTreeArea -- + * Draw the tree area including the headings, if any + */ +static void DrawTreeArea(Treeview *tv, Drawable d) { + if (tv->tree.showFlags & SHOW_HEADINGS) { + DrawHeadings(tv, d); + } + DrawForest(tv, tv->tree.root->children, d, 0); + DrawSeparators(tv, d); +} + /* + TreeviewDisplay -- * Display() widget hook. Draw the widget contents. */ static void TreeviewDisplay(void *clientData, Drawable d) { Treeview *tv = (Treeview *)clientData; + Tk_Window tkwin = tv->core.tkwin; + int width, height, winWidth, winHeight; + /* Draw the general layout of the treeview widget */ Ttk_DrawLayout(tv->core.layout, tv->core.state, d); - if (tv->tree.showFlags & SHOW_HEADINGS) { - DrawHeadings(tv, d); + + /* When the tree area does not fit in the available space, there is a + * risk that it will be drawn over other areas of the layout. + */ + + winWidth = Tk_Width(tkwin); + winHeight = Tk_Height(tkwin); + width = tv->tree.treeArea.width; + height = tv->tree.headingArea.height + tv->tree.treeArea.height; + + if ((width == winWidth && height == winHeight) + || (tv->tree.treeArea.height % tv->tree.rowHeight == 0 + && TreeWidth(tv) <= width)) { + /* No protection is needed; either the tree area fills the entire + * widget, or everything fits within the available area. + */ + DrawTreeArea(tv, d); + } else { + /* The tree area needs to be clipped + */ + + int x, y; + + x = tv->tree.treeArea.x; + if (tv->tree.showFlags & SHOW_HEADINGS) { + y = tv->tree.headingArea.y; + } else { + y = tv->tree.treeArea.y; + } + +#ifndef TK_NO_DOUBLE_BUFFERING + Drawable p; + XGCValues gcValues; + GC gc; + + /* Create a temporary helper drawable */ + p = Tk_GetPixmap(Tk_Display(tkwin), Tk_WindowId(tkwin), + winWidth, winHeight, Tk_Depth(tkwin)); + + /* Get a graphics context for copying the drawable content */ + gcValues.function = GXcopy; + gcValues.graphics_exposures = False; + gc = Tk_GetGC(tkwin, GCFunction|GCGraphicsExposures, &gcValues); + + /* Copy the widget background into the helper */ + XCopyArea(Tk_Display(tkwin), d, p, gc, 0, 0, + (unsigned) winWidth, (unsigned) winHeight, 0, 0); + + /* Draw the tree onto the helper without regard for borders */ + DrawTreeArea(tv, p); + + /* Copy only the tree area inside the borders back */ + XCopyArea(Tk_Display(tkwin), p, d, gc, x, y, + (unsigned) width, (unsigned) height, x, y); + + /* Clean up the temporary resources */ + Tk_FreePixmap(Tk_Display(tkwin), p); + Tk_FreeGC(Tk_Display(tkwin), gc); +#else + Ttk_Theme currentTheme = Ttk_GetCurrentTheme(tv->core.interp); + Ttk_Theme aquaTheme = Ttk_GetTheme(tv->core.interp, "aqua"); + if (currentTheme == aquaTheme && [NSApp macOSVersion] > 100800) { + y -= 4; + height += 4; + } + + Tk_ClipDrawableToRect(Tk_Display(tkwin), d, x, y, width, height); + DrawTreeArea(tv, d); + Tk_ClipDrawableToRect(Tk_Display(tkwin), d, 0, 0, -1, -1); +#endif } - DrawForest(tv, tv->tree.root->children, d, 0); - DrawSeparators(tv, d); } /*------------------------------------------------------------------------ @@ -2769,6 +2881,7 @@ static int TreeviewHorribleIdentify( Tcl_Size dColumnNumber; char dcolbuf[32]; int x, y, x1; + int scaledHALO = round(HALO * TkScalingLevel(tv->core.tkwin)); /* ASSERT: objc == 4 */ @@ -2784,7 +2897,7 @@ static int TreeviewHorribleIdentify( snprintf(dcolbuf, sizeof(dcolbuf), "#%" TCL_SIZE_MODIFIER "d", dColumnNumber); if (Ttk_BoxContains(tv->tree.headingArea,x,y)) { - if (-HALO <= x1 - x && x1 - x <= HALO) { + if (-scaledHALO <= x1 - x && x1 - x <= scaledHALO) { what = "separator"; } else { what = "heading"; @@ -2868,6 +2981,10 @@ static int TreeviewIdentifyCommand( return TCL_ERROR; } + /* Make sure the scroll information is current before use */ + TtkUpdateScrollInfo(tv->tree.xscrollHandle); + TtkUpdateScrollInfo(tv->tree.yscrollHandle); + region = IdentifyRegion(tv, x, y); item = IdentifyItem(tv, y); colno = IdentifyDisplayColumn(tv, x, &x1); @@ -3197,7 +3314,7 @@ static int TreeviewInsertCommand( interp, newItem, tv->tree.itemOptionTable, tv->core.tkwin); newItem->tagset = Ttk_GetTagSetFromObj(NULL, tv->tree.tagTable, NULL); if (ConfigureItem(interp, tv, newItem, objc, objv) != TCL_OK) { - Tcl_DeleteHashEntry(entryPtr); + Tcl_DeleteHashEntry(entryPtr); FreeItem(newItem); return TCL_ERROR; } @@ -3253,13 +3370,6 @@ static int TreeviewDetachCommand( return TCL_OK; } -/* Is an item detached? The root is never detached. */ -static int IsDetached(Treeview *tv, TreeItem *item) -{ - return item->next == NULL && item->prev == NULL && - item->parent == NULL && item != tv->tree.root; -} - /* + $tv detached ?$item? -- * List detached items (in arbitrary order) or query the detached state of * $item. @@ -3473,6 +3583,12 @@ static int TreeviewSeeCommand( return TCL_ERROR; } + /* The item cannot be moved into view if any ancestor (or itself) is detached. + */ + if (IsItemOrAncestorDetached(tv, item)) { + return TCL_OK; + } + /* Make sure all ancestors are open: */ for (parent = item->parent; parent; parent = parent->parent) { @@ -3488,6 +3604,9 @@ static int TreeviewSeeCommand( UpdatePositionTree(tv); } + /* Update the scroll information, if necessary */ + TtkUpdateScrollInfo(tv->tree.yscrollHandle); + /* Make sure item is visible: */ if (item->rowPos < tv->tree.titleRows) { @@ -3497,11 +3616,18 @@ static int TreeviewSeeCommand( - tv->tree.titleRows; scrollRow1 = item->rowPos - tv->tree.titleRows; scrollRow2 = scrollRow1 + item->height - 1; + + if (scrollRow2 >= tv->tree.yscroll.first + visibleRows) { + scrollRow2 = 1 + scrollRow2 - visibleRows; + TtkScrollTo(tv->tree.yscrollHandle, scrollRow2, 1); + } + + /* On small widgets (shorter than one row high, which is also the case + * before the widget is initially mapped) the above command will have + * scrolled down too far. This is why both conditions must be checked. + */ if (scrollRow1 < tv->tree.yscroll.first || item->height > visibleRows) { TtkScrollTo(tv->tree.yscrollHandle, scrollRow1, 1); - } else if (scrollRow2 >= tv->tree.yscroll.first + visibleRows) { - scrollRow1 = 1 + scrollRow2 - visibleRows; - TtkScrollTo(tv->tree.yscrollHandle, scrollRow1, 1); } return TCL_OK; @@ -3624,7 +3750,7 @@ static int TreeviewSelectionCommand( } if (objc != 4) { - Tcl_WrongNumArgs(interp, 2, objv, "?add|remove|set|toggle items?"); + Tcl_WrongNumArgs(interp, 2, objv, "?add|remove|set|toggle items?"); return TCL_ERROR; } @@ -3852,7 +3978,7 @@ static int TreeviewCellSelectionCommand( } if (objc < 4 || objc > 5) { - Tcl_WrongNumArgs(interp, 2, objv, "?add|remove|set|toggle arg...?"); + Tcl_WrongNumArgs(interp, 2, objv, "?add|remove|set|toggle arg...?"); return TCL_ERROR; } @@ -3946,7 +4072,7 @@ static int TreeviewTagBindCommand( Ttk_Tag tag; if (objc < 4 || objc > 6) { - Tcl_WrongNumArgs(interp, 3, objv, "tagName ?sequence? ?script?"); + Tcl_WrongNumArgs(interp, 3, objv, "tagName ?sequence? ?script?"); return TCL_ERROR; } @@ -4080,7 +4206,7 @@ static int TreeviewTagHasCommand( Tcl_NewBooleanObj(Ttk_TagSetContains(item->tagset, tag))); return TCL_OK; } else { - Tcl_WrongNumArgs(interp, 3, objv, "tagName ?item?"); + Tcl_WrongNumArgs(interp, 3, objv, "tagName ?item?"); return TCL_ERROR; } } @@ -4142,7 +4268,7 @@ static int TreeviewCtagHasCommand( Tcl_SetObjResult(interp, Tcl_NewWideIntObj(result)); return TCL_OK; } else { - Tcl_WrongNumArgs(interp, 4, objv, "tagName ?cell?"); + Tcl_WrongNumArgs(interp, 4, objv, "tagName ?cell?"); return TCL_ERROR; } } @@ -4206,7 +4332,10 @@ static int TreeviewTagAddCommand( /* Make sure tagset at column is allocated and initialised */ static void AllocCellTagSets(Treeview *tv, TreeItem *item, Tcl_Size columnNumber) { - Tcl_Size i, newSize = MAX(columnNumber + 1, tv->tree.nColumns + 1); + Tcl_Size i, newSize = columnNumber + 1; + if (newSize < tv->tree.nColumns + 1) { + newSize = tv->tree.nColumns + 1; + } if (item->nTagSets < newSize) { if (item->cellTagSets == NULL) { item->cellTagSets = (Ttk_TagSet *) @@ -4518,11 +4647,12 @@ static void TreeitemIndicatorSize( TCL_UNUSED(Ttk_Padding *)) { TreeitemIndicator *indicator = (TreeitemIndicator *)elementRecord; - Ttk_Padding margins; int size = 0; + Ttk_Padding margins; - Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginsObj, &margins); Tk_GetPixelsFromObj(NULL, tkwin, indicator->sizeObj, &size); + if (size % 2 == 0) --size; /* An odd size is better for the indicator. */ + Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginsObj, &margins); *widthPtr = size + Ttk_PaddingWidth(margins); *heightPtr = size + Ttk_PaddingHeight(margins); @@ -4540,15 +4670,34 @@ static void TreeitemIndicatorDraw( ArrowDirection direction = (state & TTK_STATE_OPEN) ? ARROW_DOWN : ARROW_RIGHT; Ttk_Padding margins; + int cx, cy; XColor *borderColor = Tk_GetColorFromObj(tkwin, indicator->colorObj); XGCValues gcvalues; GC gc; unsigned mask; if (state & TTK_STATE_LEAF) /* don't draw anything */ return; - Ttk_GetPaddingFromObj(NULL,tkwin,indicator->marginsObj,&margins); + Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginsObj, &margins); b = Ttk_PadBox(b, margins); + switch (direction) { + case ARROW_DOWN: + TtkArrowSize(b.width/2, direction, &cx, &cy); + if ((b.height - cy) % 2 == 1) { + ++cy; + } + break; + case ARROW_RIGHT: + default: + TtkArrowSize(b.height/2, direction, &cx, &cy); + if ((b.width - cx) % 2 == 1) { + ++cx; + } + break; + } + + b = Ttk_AnchorBox(b, cx, cy, TK_ANCHOR_CENTER); + gcvalues.foreground = borderColor->pixel; gcvalues.line_width = 1; mask = GCForeground | GCLineWidth; diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c index 12332f2..ecb7fd6 100644 --- a/generic/ttk/ttkWidget.c +++ b/generic/ttk/ttkWidget.c @@ -797,7 +797,7 @@ int TtkWidgetStyleCommand( } Tcl_SetObjResult(interp, Tcl_NewStringObj( - Ttk_StyleName(Ttk_LayoutStyle(corePtr->layout)), -1)); + Ttk_StyleName(Ttk_LayoutStyle(corePtr->layout)), -1)); return TCL_OK; } diff --git a/generic/ttk/ttkWidget.h b/generic/ttk/ttkWidget.h index b441f24..a7a68e0 100644 --- a/generic/ttk/ttkWidget.h +++ b/generic/ttk/ttkWidget.h @@ -180,7 +180,7 @@ typedef struct { int first; /* First visible item */ int last; /* Last visible item */ int total; /* Total #items */ - char *scrollCmd; /* Widget option */ + Tcl_Obj *scrollCmdObj; /* Widget option */ } Scrollable; typedef struct ScrollHandleRec *ScrollHandle; diff --git a/library/bgerror.tcl b/library/bgerror.tcl index 0dd04a1..a4147c3 100644 --- a/library/bgerror.tcl +++ b/library/bgerror.tcl @@ -22,7 +22,7 @@ namespace eval ::tk::dialog::error { option add *ErrorDialog*background systemAlertBackgroundActive \ widgetDefault option add *ErrorDialog*info.text.background \ - systemTextBackgroundColor widgetDefault + systemTextBackgroundColor widgetDefault option add *ErrorDialog*Button.highlightBackground \ systemAlertBackgroundActive widgetDefault } @@ -63,9 +63,9 @@ proc ::tk::dialog::error::SaveToLog {text} { set filename [tk_getSaveFile -title [mc "Select Log File"] \ -filetypes $types -defaultextension .log -parent .bgerrorDialog] if {$filename ne {}} { - set f [open $filename w] - puts -nonewline $f $text - close $f + set f [open $filename w] + puts -nonewline $f $text + close $f } return } @@ -131,7 +131,7 @@ proc ::tk::dialog::error::bgerror {err {flag 1}} { set maxRows 5 foreach line [split $err \n] { if {$lines > $maxRows - 1} { - # No more lines. Append to previous line. + # No more lines. Append to previous line. append displayedErr { ...} break } @@ -143,7 +143,7 @@ proc ::tk::dialog::error::bgerror {err {flag 1}} { append displayedErr "[string range $line 0 $maxLine-3]..." break } elseif {$lines > $maxRows - 2} { - # Last line, but no break or newline. Room to add 4 chars. + # Last line, but no break or newline. Room to add 4 chars. append displayedErr "${line}" } else { append displayedErr "${line}\n" @@ -255,7 +255,7 @@ proc ::tk::dialog::error::bgerror {err {flag 1}} { # order to ensure that it's seen if {[lindex [wm stackorder .] end] ne "$dlg"} { wm attributes $dlg -topmost 1 - } + } } # 9. Wait for the user to respond, then restore the focus and diff --git a/library/choosedir.tcl b/library/choosedir.tcl index c583215..b7225b6 100644 --- a/library/choosedir.tcl +++ b/library/choosedir.tcl @@ -28,9 +28,9 @@ proc ::tk::dialog::file::chooseDir:: {args} { Config $dataName $args if {$data(-parent) eq "."} { - set w .$dataName + set w .$dataName } else { - set w $data(-parent).$dataName + set w $data(-parent).$dataName } # (re)create the dialog box if necessary diff --git a/library/comdlg.tcl b/library/comdlg.tcl index 0a7f65b..25e1b1f 100644 --- a/library/comdlg.tcl +++ b/library/comdlg.tcl @@ -65,9 +65,9 @@ proc tclParseConfigSpec {w specs flags argList} { # 2: set the default values # if {"DONTSETDEFAULTS" ni $flags} { - foreach cmdsw [array names cmd] { + foreach cmdsw [array names cmd] { set data($cmdsw) $def($cmdsw) - } + } } # 3: parse the argument list @@ -149,7 +149,7 @@ proc ::tk::FocusGroup_BindIn {t w cmd} { variable ::tk::Priv if {![info exists Priv(fg,$t)]} { return -code error -errorcode [list TK LOOKUP FOCUS_GROUP $t] \ - "focus group \"$t\" doesn't exist" + "focus group \"$t\" does not exist" } set FocusIn($t,$w) $cmd } @@ -166,7 +166,7 @@ proc ::tk::FocusGroup_BindOut {t w cmd} { variable ::tk::Priv if {![info exists Priv(fg,$t)]} { return -code error -errorcode [list TK LOOKUP FOCUS_GROUP $t] \ - "focus group \"$t\" doesn't exist" + "focus group \"$t\" does not exist" } set FocusOut($t,$w) $cmd } diff --git a/library/console.tcl b/library/console.tcl index d882136..8eda872 100644 --- a/library/console.tcl +++ b/library/console.tcl @@ -38,7 +38,7 @@ interp alias {} EvalAttached {} consoleinterp eval # This procedure constructs and configures the console windows. # # Arguments: -# None. +# None. proc ::tk::ConsoleInit {} { if {![consoleinterp eval {set tcl_interactive}]} { @@ -722,7 +722,7 @@ Tk $::tk_patchLevel" } # ::tk::console::Fontchooser* -- -# Let the user select the console font (TIP 324). +# Let the user select the console font (TIP 324). proc ::tk::console::FontchooserToggle {} { if {[tk fontchooser configure -visible]} { @@ -795,8 +795,8 @@ proc ::tk::console::TagProc w { # # Arguments: # w - console text widget -# c1 - first char of pair -# c2 - second char of pair +# c1 - first char of pair +# c2 - second char of pair # # Calls: ::tk::console::Blink @@ -887,9 +887,9 @@ proc ::tk::console::MatchQuote {w {lim 1.0}} { # # Arguments: # w - console text widget -# i1 - start index to blink region -# i2 - end index of blink region -# dur - duration in usecs to blink for +# i1 - start index to blink region +# i2 - end index of blink region +# dur - duration in usecs to blink for # # Outputs: # blinks selected characters in $w @@ -921,7 +921,7 @@ proc ::tk::console::ConstrainBuffer {w size} { # # Arguments: # ARGS: w - text widget in which to expand str -# type - type of expansion (path / proc / variable) +# type - type of expansion (path / proc / variable) # # Calls: ::tk::console::Expand(Pathname|Procname|Variable) # @@ -1121,7 +1121,7 @@ proc ::tk::console::ExpandVariable str { # # Arguments: # l - list to find best unique match in -# e - currently best known unique match +# e - currently best known unique match # # Returns: longest unique match in the list diff --git a/library/demos/fontchoose.tcl b/library/demos/fontchoose.tcl index de9e854..6ae5479 100644 --- a/library/demos/fontchoose.tcl +++ b/library/demos/fontchoose.tcl @@ -20,7 +20,7 @@ catch {font create FontchooseDemoFont {*}[font actual TkDefaultFont]} # The font chooser needs to be configured and then shown. proc SelectFont {parent} { tk fontchooser configure -font FontchooseDemoFont \ - -command ApplyFont -parent $parent + -command ApplyFont -parent $parent tk fontchooser show } @@ -33,9 +33,9 @@ proc ApplyFont {font} { # bind $w <<TkFontchooserVisibility>> { if {[tk fontchooser configure -visible]} { - %W.f.font state disabled + %W.f.font state disabled } else { - %W.f.font state !disabled + %W.f.font state !disabled } } diff --git a/library/demos/goldberg.tcl b/library/demos/goldberg.tcl index 5a5b462..5323cce 100644 --- a/library/demos/goldberg.tcl +++ b/library/demos/goldberg.tcl @@ -1923,7 +1923,7 @@ proc scl {lst} { proc PlacedDialog {w msg {labelFnt {Helvetica 10}}} { if {[grab current] ne {}} { - return + return } destroy $w @@ -1954,7 +1954,7 @@ proc PlacedDialog {w msg {labelFnt {Helvetica 10}}} { proc ClosePlacedDialog {w} { set tl [winfo toplevel $w] if {![winfo exists $::PlacedDialogOldFocus]} { - set ::PlacedDialogOldFocus $tl + set ::PlacedDialogOldFocus $tl } focus $::PlacedDialogOldFocus set ::PlacedDialogOldFocus {} diff --git a/library/demos/images/Tcl.svg b/library/demos/images/Tcl.svg index 2c18ec1..05dd9a4 100644 --- a/library/demos/images/Tcl.svg +++ b/library/demos/images/Tcl.svg @@ -40,10 +40,10 @@ id="metadata2314"> <rdf:RDF> <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> @@ -53,23 +53,23 @@ id="layer1" transform="translate(-311.79308,-365.73272)"> <g - style="opacity:1;display:inline" - id="g2244" - transform="translate(308.95998,366.42022)"> + style="opacity:1;display:inline" + id="g2244" + transform="translate(308.95998,366.42022)"> <path - id="path4426" - d="M 445.52492,372.22514 C 445.90652,395.55723 445.21415,418.63757 425.02492,440.56889 L 424.27492,441.41264 L 425.39992,441.41264 L 433.64992,441.53764 C 420.24442,469.42405 411.52244,497.23134 392.24367,525.00639 L 391.55617,526.00639 L 392.74367,525.78764 L 402.93117,523.85014 C 395.71427,542.16045 383.37359,554.28293 369.99367,558.35014 C 366.31107,506.78151 392.04593,461.26308 413.89992,415.88139 C 413.92002,415.83965 413.94233,415.79813 413.96242,415.75639 L 413.14992,415.19389 C 377.36425,455.2074 361.23872,511.6427 355.14992,558.19389 C 343.02146,551.34666 338.97913,542.28079 334.86867,529.94389 L 343.33742,533.50639 L 344.21242,533.88139 L 344.02492,532.94389 C 337.58858,504.32416 347.5814,483.78143 357.27492,456.78764 L 364.24367,461.44389 L 365.05617,462.00639 L 365.02492,461.03764 C 364.47892,439.10645 379.24595,417.08983 398.83742,397.44389 L 401.55617,404.72514 L 401.93117,405.69389 L 402.46242,404.78764 L 408.43117,394.85014 L 408.46242,394.78764 C 418.31429,381.21812 428.72988,376.80082 445.52492,372.22514 z " - style="fill:#c3b15f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" - transform="translate(-324.02492,-364.63139)" /> + id="path4426" + d="M 445.52492,372.22514 C 445.90652,395.55723 445.21415,418.63757 425.02492,440.56889 L 424.27492,441.41264 L 425.39992,441.41264 L 433.64992,441.53764 C 420.24442,469.42405 411.52244,497.23134 392.24367,525.00639 L 391.55617,526.00639 L 392.74367,525.78764 L 402.93117,523.85014 C 395.71427,542.16045 383.37359,554.28293 369.99367,558.35014 C 366.31107,506.78151 392.04593,461.26308 413.89992,415.88139 C 413.92002,415.83965 413.94233,415.79813 413.96242,415.75639 L 413.14992,415.19389 C 377.36425,455.2074 361.23872,511.6427 355.14992,558.19389 C 343.02146,551.34666 338.97913,542.28079 334.86867,529.94389 L 343.33742,533.50639 L 344.21242,533.88139 L 344.02492,532.94389 C 337.58858,504.32416 347.5814,483.78143 357.27492,456.78764 L 364.24367,461.44389 L 365.05617,462.00639 L 365.02492,461.03764 C 364.47892,439.10645 379.24595,417.08983 398.83742,397.44389 L 401.55617,404.72514 L 401.93117,405.69389 L 402.46242,404.78764 L 408.43117,394.85014 L 408.46242,394.78764 C 418.31429,381.21812 428.72988,376.80082 445.52492,372.22514 z " + style="fill:#c3b15f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" + transform="translate(-324.02492,-364.63139)" /> <path - sodipodi:nodetypes="ccccccccccccccccccccccc" - id="path7600" - d="M 121.54988,7.5808058 C 104.81215,12.147023 94.270242,16.613077 84.4375,30.15625 L 84.40625,30.21875 L 78.4375,40.15625 L 77.90625,41.0625 L 77.53125,40.09375 L 74.8125,32.8125 C 55.22103,52.45844 40.454,74.47506 41,96.40625 L 41.03125,97.375 L 40.21875,96.8125 L 33.25,92.15625 C 23.55648,119.15004 13.56366,139.69277 20,168.3125 L 20.1875,169.25 L 19.3125,168.875 L 10.9375,165.34375 C 10.96447,165.51523 11.003113,165.67421 11.03125,165.84375 C 15.080346,177.9015 19.176955,186.81713 31.125,193.5625 C 31.596616,189.95681 32.122231,186.27456 32.71875,182.5625 C 18.12816,148.39836 30.79293,123.2814 36.5625,100.6875 L 45.4375,105.8125 C 44.211577,84.657017 56.63174,61.842112 72.78125,41.9375 L 77.46875,50.1875 C 89.477498,25.486664 98.97512,15.57175 121.54988,7.5808058 z " - style="opacity:1;fill:#eff1cb;fill-opacity:1;fill-rule:evenodd;stroke:#eff1cb;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" /> + sodipodi:nodetypes="ccccccccccccccccccccccc" + id="path7600" + d="M 121.54988,7.5808058 C 104.81215,12.147023 94.270242,16.613077 84.4375,30.15625 L 84.40625,30.21875 L 78.4375,40.15625 L 77.90625,41.0625 L 77.53125,40.09375 L 74.8125,32.8125 C 55.22103,52.45844 40.454,74.47506 41,96.40625 L 41.03125,97.375 L 40.21875,96.8125 L 33.25,92.15625 C 23.55648,119.15004 13.56366,139.69277 20,168.3125 L 20.1875,169.25 L 19.3125,168.875 L 10.9375,165.34375 C 10.96447,165.51523 11.003113,165.67421 11.03125,165.84375 C 15.080346,177.9015 19.176955,186.81713 31.125,193.5625 C 31.596616,189.95681 32.122231,186.27456 32.71875,182.5625 C 18.12816,148.39836 30.79293,123.2814 36.5625,100.6875 L 45.4375,105.8125 C 44.211577,84.657017 56.63174,61.842112 72.78125,41.9375 L 77.46875,50.1875 C 89.477498,25.486664 98.97512,15.57175 121.54988,7.5808058 z " + style="opacity:1;fill:#eff1cb;fill-opacity:1;fill-rule:evenodd;stroke:#eff1cb;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" /> <path - style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" - d="M 126.9375,-0.6875 L 126.40625,-0.59375 C 106.72165,2.83976 87.4508,10.07244 79,27.375 L 75.4375,21.15625 L 75.125,20.59375 L 74.65625,21.0625 C 64.96254,30.33838 54.55574,42.35306 46.875,54.15625 C 39.66528,65.23562 34.88327,76.07934 35.40625,84.375 L 30.375,78.09375 L 29.875,77.46875 L 29.53125,78.1875 C 23.40732,91.41649 17.22694,107.69157 13.53125,122.625 C 10.02725,136.78385 8.77244,149.67206 12.03125,157.78125 L 3.75,152.96875 L 3.0625,152.5625 L 3,153.375 C 1.44089,176.99202 11.0382,188.26833 22.0625,199.15625 L 12.875,201.4375 L 11.03125,201.90625 L 12.875,202.40625 C 18.14953,203.83558 23.15023,205.44485 26.625,208.125 C 30.09977,210.80515 32.09598,214.49082 31.5,220.375 L 31.5,220.40625 L 31.5,245.90625 L 31.5,246.0625 L 31.59375,246.1875 L 43.09375,262.6875 L 44,264 L 44,262.40625 L 44,223.53125 C 45.52181,216.98735 47.30807,212.4833 49.875,209.5 C 52.44193,206.5167 55.78211,204.98483 60.5625,204.40625 L 62.28125,204.1875 L 60.71875,203.46875 L 54.65625,200.59375 C 69.11174,191.89001 85.3013,170.55445 89.5625,150.28125 L 89.75,149.46875 L 88.96875,149.6875 L 81.46875,151.71875 C 88.13174,145.46249 94.84392,133.06721 101.21875,118.625 C 107.9798,103.3078 114.29247,85.96032 119.46875,72.09375 L 119.75,71.34375 L 118.96875,71.40625 L 113.1875,71.8125 C 120.3346,64.22669 124.30703,51.6996 126.25,38.46875 C 128.27227,24.69793 128.13035,10.1977 127,-0.15625 L 126.9375,-0.6875 z M 121.5,7.59375 C 121.8816,30.92584 121.18923,54.00618 101,75.9375 L 100.25,76.78125 L 101.375,76.78125 L 109.625,76.90625 C 96.2195,104.79266 87.49752,132.59995 68.21875,160.375 L 67.53125,161.375 L 68.71875,161.15625 L 78.90625,159.21875 C 71.68935,177.52906 59.34867,189.65154 45.96875,193.71875 C 42.28615,142.15012 68.02101,96.63169 89.875,51.25 C 89.8951,51.20826 89.91741,51.16674 89.9375,51.125 L 89.125,50.5625 C 53.33933,90.57601 37.2138,147.01131 31.125,193.5625 C 18.99654,186.71527 14.95421,177.6494 10.84375,165.3125 L 19.3125,168.875 L 20.1875,169.25 L 20,168.3125 C 13.56366,139.69277 23.55648,119.15004 33.25,92.15625 L 40.21875,96.8125 L 41.03125,97.375 L 41,96.40625 C 40.454,74.47506 55.22103,52.45844 74.8125,32.8125 L 77.53125,40.09375 L 77.90625,41.0625 L 78.4375,40.15625 L 84.40625,30.21875 L 84.4375,30.15625 C 94.28937,16.58673 104.70496,12.16943 121.5,7.59375 z " - id="path2177" /> + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" + d="M 126.9375,-0.6875 L 126.40625,-0.59375 C 106.72165,2.83976 87.4508,10.07244 79,27.375 L 75.4375,21.15625 L 75.125,20.59375 L 74.65625,21.0625 C 64.96254,30.33838 54.55574,42.35306 46.875,54.15625 C 39.66528,65.23562 34.88327,76.07934 35.40625,84.375 L 30.375,78.09375 L 29.875,77.46875 L 29.53125,78.1875 C 23.40732,91.41649 17.22694,107.69157 13.53125,122.625 C 10.02725,136.78385 8.77244,149.67206 12.03125,157.78125 L 3.75,152.96875 L 3.0625,152.5625 L 3,153.375 C 1.44089,176.99202 11.0382,188.26833 22.0625,199.15625 L 12.875,201.4375 L 11.03125,201.90625 L 12.875,202.40625 C 18.14953,203.83558 23.15023,205.44485 26.625,208.125 C 30.09977,210.80515 32.09598,214.49082 31.5,220.375 L 31.5,220.40625 L 31.5,245.90625 L 31.5,246.0625 L 31.59375,246.1875 L 43.09375,262.6875 L 44,264 L 44,262.40625 L 44,223.53125 C 45.52181,216.98735 47.30807,212.4833 49.875,209.5 C 52.44193,206.5167 55.78211,204.98483 60.5625,204.40625 L 62.28125,204.1875 L 60.71875,203.46875 L 54.65625,200.59375 C 69.11174,191.89001 85.3013,170.55445 89.5625,150.28125 L 89.75,149.46875 L 88.96875,149.6875 L 81.46875,151.71875 C 88.13174,145.46249 94.84392,133.06721 101.21875,118.625 C 107.9798,103.3078 114.29247,85.96032 119.46875,72.09375 L 119.75,71.34375 L 118.96875,71.40625 L 113.1875,71.8125 C 120.3346,64.22669 124.30703,51.6996 126.25,38.46875 C 128.27227,24.69793 128.13035,10.1977 127,-0.15625 L 126.9375,-0.6875 z M 121.5,7.59375 C 121.8816,30.92584 121.18923,54.00618 101,75.9375 L 100.25,76.78125 L 101.375,76.78125 L 109.625,76.90625 C 96.2195,104.79266 87.49752,132.59995 68.21875,160.375 L 67.53125,161.375 L 68.71875,161.15625 L 78.90625,159.21875 C 71.68935,177.52906 59.34867,189.65154 45.96875,193.71875 C 42.28615,142.15012 68.02101,96.63169 89.875,51.25 C 89.8951,51.20826 89.91741,51.16674 89.9375,51.125 L 89.125,50.5625 C 53.33933,90.57601 37.2138,147.01131 31.125,193.5625 C 18.99654,186.71527 14.95421,177.6494 10.84375,165.3125 L 19.3125,168.875 L 20.1875,169.25 L 20,168.3125 C 13.56366,139.69277 23.55648,119.15004 33.25,92.15625 L 40.21875,96.8125 L 41.03125,97.375 L 41,96.40625 C 40.454,74.47506 55.22103,52.45844 74.8125,32.8125 L 77.53125,40.09375 L 77.90625,41.0625 L 78.4375,40.15625 L 84.40625,30.21875 L 84.4375,30.15625 C 94.28937,16.58673 104.70496,12.16943 121.5,7.59375 z " + id="path2177" /> </g> </g> </svg> diff --git a/library/demos/knightstour.tcl b/library/demos/knightstour.tcl index 76b6a4f..8da89ba 100644 --- a/library/demos/knightstour.tcl +++ b/library/demos/knightstour.tcl @@ -27,11 +27,11 @@ package require tk proc ValidMoves {square} { set moves {} foreach pair {{-1 -2} {-2 -1} {-2 1} {-1 2} {1 2} {2 1} {2 -1} {1 -2}} { - set col [expr {($square % 8) + [lindex $pair 0]}] - set row [expr {($square / 8) + [lindex $pair 1]}] - if {$row >= 0 && $row < 8 && $col >= 0 && $col < 8} { - lappend moves [expr {$row * 8 + $col}] - } + set col [expr {($square % 8) + [lindex $pair 0]}] + set row [expr {($square / 8) + [lindex $pair 1]}] + if {$row >= 0 && $row < 8 && $col >= 0 && $col < 8} { + lappend moves [expr {$row * 8 + $col}] + } } return $moves } @@ -41,9 +41,9 @@ proc CheckSquare {square} { variable visited set moves 0 foreach test [ValidMoves $square] { - if {[lsearch -exact -integer $visited $test] < 0} { - incr moves - } + if {[lsearch -exact -integer $visited $test] < 0} { + incr moves + } } return $moves } @@ -55,17 +55,17 @@ proc Next {square} { set minimum 9 set nextSquare -1 foreach testSquare [ValidMoves $square] { - if {[lsearch -exact -integer $visited $testSquare] < 0} { - set count [CheckSquare $testSquare] - if {$count < $minimum} { - set minimum $count - set nextSquare $testSquare - } elseif {$count == $minimum} { - # to remove the enhancement to Warnsdorff's rule - # remove the next line: - set nextSquare [Edgemost $nextSquare $testSquare] - } - } + if {[lsearch -exact -integer $visited $testSquare] < 0} { + set count [CheckSquare $testSquare] + if {$count < $minimum} { + set minimum $count + set nextSquare $testSquare + } elseif {$count == $minimum} { + # to remove the enhancement to Warnsdorff's rule + # remove the next line: + set nextSquare [Edgemost $nextSquare $testSquare] + } + } } return $nextSquare } @@ -98,23 +98,23 @@ proc MovePiece {dlg last square} { lappend visited $square set next [Next $square] if {$next ne -1} { - variable aid [after $delay [list MovePiece $dlg $square $next]] + variable aid [after $delay [list MovePiece $dlg $square $next]] } else { - $dlg.tf.b1 configure -state normal - if {[llength $visited] == 64} { - variable initial - if {$initial == $square} { - $dlg.f.txt insert end "Closed tour!" - } else { - $dlg.f.txt insert end "Success" - if {$continuous} { - after [expr {$delay * 2}] [namespace code \ - [list Tour $dlg [expr {int(rand() * 64)}]]] - } - } - } else { - $dlg.f.txt insert end "FAILED!" - } + $dlg.tf.b1 configure -state normal + if {[llength $visited] == 64} { + variable initial + if {$initial == $square} { + $dlg.f.txt insert end "Closed tour!" + } else { + $dlg.f.txt insert end "Success" + if {$continuous} { + after [expr {$delay * 2}] [namespace code \ + [list Tour $dlg [expr {int(rand() * 64)}]]] + } + } + } else { + $dlg.f.txt insert end "FAILED!" + } } } @@ -124,11 +124,11 @@ proc Tour {dlg {square {}}} { $dlg.f.txt delete 1.0 end $dlg.tf.b1 configure -state disabled for {set n 0} {$n < 64} {incr n} { - $dlg.f.c itemconfigure $n -state disabled -outline black + $dlg.f.c itemconfigure $n -state disabled -outline black } if {$square eq {}} { - set coords [lrange [$dlg.f.c coords knight] 0 1] - set square [expr {[$dlg.f.c find closest {*}$coords 0 65]-1}] + set coords [lrange [$dlg.f.c coords knight] 0 1] + set square [expr {[$dlg.f.c find closest {*}$coords 0 65]-1}] } variable initial $square after idle [list MovePiece $dlg $initial $initial] @@ -157,9 +157,9 @@ proc DragStart {w x y} { proc DragMotion {w x y} { variable dragging if {[info exists dragging]} { - $w move selected [expr {$x - [lindex $dragging 0]}] \ - [expr {$y - [lindex $dragging 1]}] - variable dragging [list $x $y] + $w move selected [expr {$x - [lindex $dragging 0]}] \ + [expr {$y - [lindex $dragging 1]}] + variable dragging [list $x $y] } } proc DragEnd {w x y} { @@ -177,7 +177,7 @@ proc CreateGUI {} { set f [ttk::frame $dlg.f] set c [canvas $f.c -width 192p -height 192p] text $f.txt -width 12 -height 1 -padx 3p \ - -yscrollcommand [list $f.vs set] -font TkFixedFont + -yscrollcommand [list $f.vs set] -font TkFixedFont ttk::scrollbar $f.vs -command [list $f.txt yview] variable speed 1400 @@ -185,41 +185,41 @@ proc CreateGUI {} { variable continuous 0 ttk::frame $dlg.tf ttk::checkbutton $dlg.tf.cc -text Repeat \ - -variable [namespace which -variable continuous] + -variable [namespace which -variable continuous] ttk::scale $dlg.tf.sc -from 0 -to 1992 -command [list SetDelay] \ - -variable [namespace which -variable speed] + -variable [namespace which -variable speed] ttk::label $dlg.tf.ls -text Speed ttk::button $dlg.tf.b1 -text Start -command [list Tour $dlg] ttk::button $dlg.tf.b2 -text Exit -command [list Exit $dlg] set square 0 for {set row 7} {$row >= 0} {incr row -1} { - for {set col 0} {$col < 8} {incr col} { - if {(($col & 1) ^ ($row & 1))} { - set fill tan3 ; set dfill tan4 - } else { - set fill bisque ; set dfill bisque3 - } - set coords [list [expr {$col * 24 + 3}]p \ + for {set col 0} {$col < 8} {incr col} { + if {(($col & 1) ^ ($row & 1))} { + set fill tan3 ; set dfill tan4 + } else { + set fill bisque ; set dfill bisque3 + } + set coords [list [expr {$col * 24 + 3}]p \ [expr {$row * 24 + 3}]p \ - [expr {$col * 24 + 24}]p \ + [expr {$col * 24 + 24}]p \ [expr {$row * 24 + 24}]p] - $c create rectangle $coords -fill $fill -disabledfill $dfill \ - -width 1.5p -state disabled -outline black - } + $c create rectangle $coords -fill $fill -disabledfill $dfill \ + -width 1.5p -state disabled -outline black + } } if {[tk windowingsystem] ne "x11"} { - catch {eval font create KnightFont -size 18} - $c create text 0 0 -font KnightFont -text "♞" \ - -anchor nw -tags knight -fill black -activefill "#600000" + catch {eval font create KnightFont -size 18} + $c create text 0 0 -font KnightFont -text "♞" \ + -anchor nw -tags knight -fill black -activefill "#600000" } else { - # On X11 we cannot reliably tell if the ♞ glyph is available - # so just use a polygon - set pts { - 2 25 24 25 21 19 20 8 14 0 10 0 0 13 0 16 - 2 17 4 14 5 15 3 17 5 17 9 14 10 15 5 21 - } - $c create polygon $pts -tag knight -offset 8 \ - -fill black -activefill "#600000" + # On X11 we cannot reliably tell if the ♞ glyph is available + # so just use a polygon + set pts { + 2 25 24 25 21 19 20 8 14 0 10 0 0 13 0 16 + 2 17 4 14 5 15 3 17 5 17 9 14 10 15 5 21 + } + $c create polygon $pts -tag knight -offset 8 \ + -fill black -activefill "#600000" set scaleFactor [expr {$tk::scalingPct / 100.0}] $c scale knight 0 0 $scaleFactor $scaleFactor } @@ -248,7 +248,7 @@ proc CreateGUI {} { } grid $dlg.tf - - - - - -sticky ew if {[info exists ::widgetDemo]} { - grid [addSeeDismiss $dlg.buttons $dlg] - - - - - -sticky ew + grid [addSeeDismiss $dlg.buttons $dlg] - - - - - -sticky ew } grid rowconfigure $dlg 0 -weight 1 diff --git a/library/demos/labelframe.tcl b/library/demos/labelframe.tcl index 08e8a23..0f400ed 100644 --- a/library/demos/labelframe.tcl +++ b/library/demos/labelframe.tcl @@ -40,7 +40,7 @@ grid $w.f -row 0 -column 0 -pady 2m -padx 2m foreach value {1 2 3 4} { radiobutton $w.f.b$value -text "This is value $value" \ - -variable lfdummy -value $value + -variable lfdummy -value $value pack $w.f.b$value -side top -fill x -pady 1.5p } @@ -49,18 +49,18 @@ foreach value {1 2 3 4} { proc lfEnableButtons {w} { foreach child [winfo children $w] { - if {$child == "$w.cb"} continue - if {$::lfdummy2} { - $child configure -state normal - } else { - $child configure -state disabled - } + if {$child == "$w.cb"} continue + if {$::lfdummy2} { + $child configure -state normal + } else { + $child configure -state disabled + } } } labelframe $w.f2 -pady 1.5p -padx 1.5p checkbutton $w.f2.cb -text "Use this option." -variable lfdummy2 \ - -command "lfEnableButtons $w.f2" -padx 0 + -command "lfEnableButtons $w.f2" -padx 0 $w.f2 configure -labelwidget $w.f2.cb grid $w.f2 -row 0 -column 1 -pady 2m -padx 2m diff --git a/library/demos/mac_styles.tcl b/library/demos/mac_styles.tcl index 3fff03c..1d1b6d1 100644 --- a/library/demos/mac_styles.tcl +++ b/library/demos/mac_styles.tcl @@ -123,7 +123,7 @@ pack [ttk::radiobutton $radio.r2 -text "Radio 2" -variable .radioVar -value 2] - set triangle [ttk::checkbutton $buttonFrame.triangle -style Item -variable TriangleVar] bind $triangle <Button-1> {toggleTriangle %W} set bonjour [ttk::button $buttonFrame.bonjour -style ImageButton -text Bonjour \ - -image {bonjour pressed bonjour1}] + -image {bonjour pressed bonjour1}] set feather [ttk::button $buttonFrame.feather -style ImageButton -text Tk \ -image {tkfeather pressed tkfeather1}] set gradient [ttk::frame $buttonFrame.gradient] @@ -245,16 +245,16 @@ if { [wm attributes $w -isdark] } { } proc beLight {f w} { wm attributes $w -appearance aqua - $f.dark state !selected - $f.light state selected - after 10 $f.light state !hover + # A small delay is needed for the appearance change to complete. + after 10 [list $f.dark state !selected] + after 10 [list $f.light state selected] } proc beDark {f w} { wm attributes $w -appearance darkaqua - $f.light state !selected - $f.dark state selected - after 10 $f.dark state !hover + # A small delay is needed for the appearance change to complete. + after 10 [list $f.light state !selected] + after 10 [list $f.dark state selected] } $w.notebook add $appearanceFrame -text "Appearance" diff --git a/library/demos/mac_wm.tcl b/library/demos/mac_wm.tcl index 105c12c..eba4f03 100644 --- a/library/demos/mac_wm.tcl +++ b/library/demos/mac_wm.tcl @@ -46,23 +46,23 @@ proc launch {name windowInfo class} { # titled if {$class == "nswindow"} { ttk::checkbutton $f.stylemask.titled -text titled -variable $name.titled \ - -command [list setbit $name $f.stylemask.titled titled] + -command [list setbit $name $f.stylemask.titled titled] $f.stylemask.titled state selected grid $f.stylemask.titled -row 0 -column 0 -sticky w } # closable ttk::checkbutton $f.stylemask.closable -text closable -variable $name.closable \ - -command [list setbit $name $f.stylemask.closable closable] + -command [list setbit $name $f.stylemask.closable closable] $f.stylemask.closable state selected grid $f.stylemask.closable -row 1 -column 0 -sticky w # miniaturizableable ttk::checkbutton $f.stylemask.miniaturizable -text miniaturizable \ -variable $name.miniaturizable \ - -command [list setbit $name $f.stylemask.miniaturizable miniaturizable] + -command [list setbit $name $f.stylemask.miniaturizable miniaturizable] if {$class == "nswindow"} { - $f.stylemask.miniaturizable state selected + $f.stylemask.miniaturizable state selected } else { - $f.stylemask.miniaturizable state !alternate + $f.stylemask.miniaturizable state !alternate } grid $f.stylemask.miniaturizable -row 2 -column 0 -sticky w # resizable @@ -124,10 +124,10 @@ proc setbit {win cb bitname} { set bits [wm attributes $win -stylemask] set index [lsearch $bits $bitname] if {$index >= 0 && !$state} { - set bits [lreplace $bits $index $index] + set bits [lreplace $bits $index $index] } if {$index < 0 && $state} { - lappend bits $bitname + lappend bits $bitname } wm attributes $win -stylemask $bits } @@ -192,8 +192,8 @@ proc launchModernWindow {} { frame .mod.left -width 220 -height 400 -background systemWindowBackgroundColor catch { font create leftFont -family .AppleSystemUIFont -size 11 - font create rightFont -family .AppleSystemUIFont -size 16 - font create codeFont -family Courier -size 16 + font create rightFont -family .AppleSystemUIFont -size 16 + font create codeFont -family Courier -size 16 } grid [ttk::label .mod.left.spacer -padding {220 30 0 0}] -row 0 -column 0 grid [ttk::radiobutton .mod.left.about -text About -style SidebarButton \ diff --git a/library/demos/mclist.tcl b/library/demos/mclist.tcl index a60a00f..5335490 100644 --- a/library/demos/mclist.tcl +++ b/library/demos/mclist.tcl @@ -157,14 +157,14 @@ proc SortBy {tree col direction} { set mclistGrid 0 proc tglGrid {} { if {$::mclistGrid} { - .mclist.tree configure -stripe 1 - foreach col [.mclist.tree cget -columns] { - .mclist.tree column $col -separator 1 - } + .mclist.tree configure -stripe 1 + foreach col [.mclist.tree cget -columns] { + .mclist.tree column $col -separator 1 + } } else { - .mclist.tree configure -stripe 0 - foreach col [.mclist.tree cget -columns] { - .mclist.tree column $col -separator 0 - } + .mclist.tree configure -stripe 0 + foreach col [.mclist.tree cget -columns] { + .mclist.tree column $col -separator 0 + } } } diff --git a/library/demos/nl.msg b/library/demos/nl.msg index dc80c15..60ca47c 100644 --- a/library/demos/nl.msg +++ b/library/demos/nl.msg @@ -66,15 +66,15 @@ ::msgcat::mcset nl "Listboxes" "Keuzelijsten" ::msgcat::mcset nl "The 50 states" "De 50 staten van de VS" ::msgcat::mcset nl "Colors: change the color scheme for the application" \ - "Kleuren: verander het kleurenschema voor het programma" + "Kleuren: verander het kleurenschema voor het programma" ::msgcat::mcset nl "A collection of famous and infamous sayings" \ - "Beroemde en beruchte citaten en gezegden" + "Beroemde en beruchte citaten en gezegden" ::msgcat::mcset nl "Entries and Spin-boxes" "Invulvelden en Spinboxen" ::msgcat::mcset nl "Entries without scrollbars" "Invulvelden zonder schuifbalk" ::msgcat::mcset nl "Entries with scrollbars" "Invulvelden met schuifbalk" ::msgcat::mcset nl "Validated entries and password fields" \ - "Invulvelden met controle of wachtwoorden" + "Invulvelden met controle of wachtwoorden" ::msgcat::mcset nl "Spin-boxes" "Spinboxen" ::msgcat::mcset nl "Simple Rolodex-like form" "Simpel kaartsysteem" diff --git a/library/demos/states.tcl b/library/demos/states.tcl index 4e14fd5..e25ee81 100644 --- a/library/demos/states.tcl +++ b/library/demos/states.tcl @@ -23,9 +23,9 @@ labelframe $w.justif -text Justification foreach c {Left Center Right} { set lower [string tolower $c] radiobutton $w.justif.$lower -text $c -variable just \ - -relief flat -value $lower -anchor w \ - -command "$w.frame.list configure -justify \$just" \ - -tristatevalue "multi" + -relief flat -value $lower -anchor w \ + -command "$w.frame.list configure -justify \$just" \ + -tristatevalue "multi" pack $w.justif.$lower -side left -pady 1.5p -fill x } pack $w.justif diff --git a/library/demos/systray.tcl b/library/demos/systray.tcl index 6954143..3406f0c 100644 --- a/library/demos/systray.tcl +++ b/library/demos/systray.tcl @@ -26,10 +26,10 @@ $iconmenu add command -label "Status" -command { puts "status icon clicked" } $iconmenu add command -label "Exit" -command exit pack [label $w.l -text "This demonstration showcases - the tk systray and tk sysnotify commands. - Running this demo creates the systray icon. - Clicking the buttons below modifies and destroys the icon - and displays the notification."] + the tk systray and tk sysnotify commands. + Running this demo creates the systray icon. + Clicking the buttons below modifies and destroys the icon + and displays the notification."] image create photo book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw== @@ -45,20 +45,20 @@ pack $w.f $w.b3 -fill x -padx 3p -pady 3p proc create {} { global trayIconExists if {$trayIconExists} { - tk_messageBox -message "Systray icon already exists" - return + tk_messageBox -message "Systray icon already exists" + return } tk systray create -image book -text "Systray sample" \ - -button1 {puts "foo"} \ - -button3 {tk_popup $iconmenu [winfo pointerx .] [winfo pointery .]} + -button1 {puts "foo"} \ + -button3 {tk_popup $iconmenu [winfo pointerx .] [winfo pointery .]} set trayIconExists true } proc modify {} { global trayIconExists if {!$trayIconExists} { - tk_messageBox -message "Please create systray icon first" - return + tk_messageBox -message "Please create systray icon first" + return } image create photo page -data R0lGODlhCwAPAKIAAP//////AMDAwICAgAAA/wAAAAAAAAAAACwAAAAACwAPAAADMzi6CzAugiAgDGE68aB0RXgRJBFVX0SNpQlUWfahQOvSsgrX7eZJMlQMWBEYj8iQchlKAAA7 tk systray configure -image page @@ -70,8 +70,8 @@ proc modify {} { proc notify {} { global trayIconExists if {!$trayIconExists} { - tk_messageBox -message "Please create systray icon first" - return + tk_messageBox -message "Please create systray icon first" + return } tk sysnotify "Alert" "This is an alert" } @@ -79,8 +79,8 @@ proc notify {} { proc remove {} { global trayIconExists if {!$trayIconExists} { - tk_messageBox -message "Systray icon was already destroyed" - return + tk_messageBox -message "Systray icon was already destroyed" + return } tk systray destroy set trayIconExists false diff --git a/library/demos/text.tcl b/library/demos/text.tcl index 130a4a5..189cb2d 100644 --- a/library/demos/text.tcl +++ b/library/demos/text.tcl @@ -30,11 +30,11 @@ pack $w.text -expand yes -fill both # TIP 324 Demo: [tk fontchooser] proc fontchooserToggle {} { tk fontchooser [expr {[tk fontchooser configure -visible] ? - "hide" : "show"}] + "hide" : "show"}] } proc fontchooserVisibility {w} { $w configure -text [expr {[tk fontchooser configure -visible] ? - "Hide Font Dialog" : "Show Font Dialog"}] + "Hide Font Dialog" : "Show Font Dialog"}] } proc fontchooserFocus {w} { tk fontchooser configure -font [$w cget -font] \ diff --git a/library/demos/ttkpane.tcl b/library/demos/ttkpane.tcl index 749f940..87c7b6d 100644 --- a/library/demos/ttkpane.tcl +++ b/library/demos/ttkpane.tcl @@ -67,7 +67,7 @@ set testzones { set zones {} foreach zone $testzones { if {![catch {clock format 0 -timezone $zone}]} { - lappend zones $zone + lappend zones $zone } } if {[llength $zones] < 2} { lappend zones -0200 :GMT :UTC +0200 } diff --git a/library/demos/twind.tcl b/library/demos/twind.tcl index b974456..ddfc30e 100644 --- a/library/demos/twind.tcl +++ b/library/demos/twind.tcl @@ -353,6 +353,6 @@ proc textSplitWindow {textW} { $w.pane add $t -stretch always } } else { - return + return } } diff --git a/library/demos/widget b/library/demos/widget index d2dff1c..5e3373c 100644 --- a/library/demos/widget +++ b/library/demos/widget @@ -31,26 +31,26 @@ if {[tk windowingsystem] eq "x11"} { if {"defaultFont" ni [font names]} { # TIP #145 defines some standard named fonts if {"TkDefaultFont" in [font names] && "TkFixedFont" in [font names]} { - # FIX ME: the following technique of cloning the font to copy it works - # fine but means that if the system font is changed by Tk - # cannot update the copied font. font alias might be useful - # here -- or fix the app to use TkDefaultFont etc. - font create mainFont {*}[font configure TkDefaultFont] - font create fixedFont {*}[font configure TkFixedFont] - font create boldFont {*}[font configure TkDefaultFont] -weight bold - font create titleFont {*}[font configure TkDefaultFont] -weight bold - font create statusFont {*}[font configure TkDefaultFont] - font create varsFont {*}[font configure TkDefaultFont] + # FIX ME: the following technique of cloning the font to copy it works + # fine but means that if the system font is changed by Tk + # cannot update the copied font. font alias might be useful + # here -- or fix the app to use TkDefaultFont etc. + font create mainFont {*}[font configure TkDefaultFont] + font create fixedFont {*}[font configure TkFixedFont] + font create boldFont {*}[font configure TkDefaultFont] -weight bold + font create titleFont {*}[font configure TkDefaultFont] -weight bold + font create statusFont {*}[font configure TkDefaultFont] + font create varsFont {*}[font configure TkDefaultFont] if {[tk windowingsystem] eq "aqua"} { font configure titleFont -size 17 } } else { - font create mainFont -family Helvetica -size 12 - font create fixedFont -family Courier -size 10 - font create boldFont -family Helvetica -size 12 -weight bold - font create titleFont -family Helvetica -size 18 -weight bold - font create statusFont -family Helvetica -size 10 - font create varsFont -family Helvetica -size 14 + font create mainFont -family Helvetica -size 12 + font create fixedFont -family Courier -size 10 + font create boldFont -family Helvetica -size 12 -weight bold + font create titleFont -family Helvetica -size 18 -weight bold + font create statusFont -family Helvetica -size 10 + font create varsFont -family Helvetica -size 14 } } @@ -142,7 +142,7 @@ if {[tk windowingsystem] ne "aqua"} { -command {tkAboutDialog} -accelerator [mc "<F1>"] bind . <F1> {tkAboutDialog} .menuBar.file add sep - if {[string match win* [tk windowingsystem]]} { + if {[tk windowingsystem] eq "win32"} { # Windows doesn't usually have a Meta key ::tk::AmpMenuArgs .menuBar.file add command -label [mc "&Quit"] \ -command {exit} -accelerator [mc "Ctrl+Q"] diff --git a/library/demos/windowicons.tcl b/library/demos/windowicons.tcl index 0c1e0c0..13c514d 100644 --- a/library/demos/windowicons.tcl +++ b/library/demos/windowicons.tcl @@ -99,7 +99,7 @@ image create photo icon2 icon2 copy icon -zoom [expr {$tk::scalingPct / 100}] pack [button $w.i -text "Set Window Icon to Globe" -image icon2 \ - -compound top -command {wm iconphoto . icon}] -fill x -padx 3p + -compound top -command {wm iconphoto . icon}] -fill x -padx 3p pack [button $w.b -text "Set Badge to 3" -command {wm iconbadge . 3}] \ -fill x -padx 3p pack [button $w.e -text "Set Badge to 11" -command {wm iconbadge . 11}] \ diff --git a/library/dialog.tcl b/library/dialog.tcl index 16ba128..f5a771a 100644 --- a/library/dialog.tcl +++ b/library/dialog.tcl @@ -149,9 +149,9 @@ proc ::tk_dialog {w title text bitmap default args} { # 7. Set a grab and claim the focus too. if {$default >= 0} { - set focus $w.button$default + set focus $w.button$default } else { - set focus $w + set focus $w } tk::SetFocusGrab $w $focus diff --git a/library/entry.tcl b/library/entry.tcl index b344a63..bdd9fda 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -308,12 +308,12 @@ proc ::tk::EntryEndIMEMarkedText {w} { bind Entry <Button-2> { if {!$tk_strictMotif} { - ::tk::EntryScanMark %W %x + ::tk::EntryScanMark %W %x } } bind Entry <B2-Motion> { if {!$tk_strictMotif} { - ::tk::EntryScanDrag %W %x + ::tk::EntryScanDrag %W %x } } @@ -415,7 +415,7 @@ proc ::tk::EntryMouseSelect {w x} { } } if {$Priv(mouseMoved)} { - $w icursor $cur + $w icursor $cur } update idletasks } diff --git a/library/fontchooser.tcl b/library/fontchooser.tcl index 3aaa6b7..c53d1d6 100644 --- a/library/fontchooser.tcl +++ b/library/fontchooser.tcl @@ -14,10 +14,10 @@ namespace eval ::tk::fontchooser { set S(W) .__tk__fontchooser set S(fonts) [lsort -dictionary -unique [font families]] set S(styles) [list \ - [::msgcat::mc Regular] \ - [::msgcat::mc Italic] \ - [::msgcat::mc Bold] \ - [::msgcat::mc {Bold Italic}] \ + [::msgcat::mc Regular] \ + [::msgcat::mc Italic] \ + [::msgcat::mc Bold] \ + [::msgcat::mc {Bold Italic}] \ ] set S(sizes) {8 9 10 11 12 14 16 18 20 22 24 26 28 36 48 72} set S(strike) 0 @@ -34,7 +34,7 @@ proc ::tk::fontchooser::Canonical {} { variable S foreach style $S(styles) { - lappend S(styles,lcase) [string tolower $style] + lappend S(styles,lcase) [string tolower $style] } set S(sizes,lcase) $S(sizes) set S(sampletext) [::msgcat::mc "AaBbYyZz01"] @@ -42,11 +42,11 @@ proc ::tk::fontchooser::Canonical {} { # Canonical versions of font families, styles, etc. for easier searching set S(fonts,lcase) {} foreach font $S(fonts) { - lappend S(fonts,lcase) [string tolower $font] + lappend S(fonts,lcase) [string tolower $font] } set S(styles,lcase) {} foreach style $S(styles) { - lappend S(styles,lcase) [string tolower $style] + lappend S(styles,lcase) [string tolower $style] } } @@ -56,18 +56,18 @@ proc ::tk::fontchooser::Setup {} { Canonical ::ttk::style layout FontchooserFrame { - Entry.field -sticky news -border true -children { - FontchooserFrame.padding -sticky news - } + Entry.field -sticky news -border true -children { + FontchooserFrame.padding -sticky news + } } bind [winfo class .] <<ThemeChanged>> \ - [list +ttk::style layout FontchooserFrame \ - [ttk::style layout FontchooserFrame]] + [list +ttk::style layout FontchooserFrame \ + [ttk::style layout FontchooserFrame]] namespace ensemble create -map { - show ::tk::fontchooser::Show - hide ::tk::fontchooser::Hide - configure ::tk::fontchooser::Configure + show ::tk::fontchooser::Show + hide ::tk::fontchooser::Hide + configure ::tk::fontchooser::Configure } } ::tk::fontchooser::Setup @@ -78,19 +78,19 @@ proc ::tk::fontchooser::Show {} { Canonical if {![winfo exists $S(W)]} { - Create - wm transient $S(W) [winfo toplevel $S(-parent)] - tk::PlaceWindow $S(W) widget $S(-parent) - if {[string trim $S(-title)] eq ""} { - wm title $S(W) [::msgcat::mc "Font"] - } else { - wm title $S(W) $S(-title) - } + Create + wm transient $S(W) [winfo toplevel $S(-parent)] + tk::PlaceWindow $S(W) widget $S(-parent) + if {[string trim $S(-title)] eq ""} { + wm title $S(W) [::msgcat::mc "Font"] + } else { + wm title $S(W) $S(-title) + } } set S(fonts) [lsort -dictionary -unique [font families]] set S(fonts,lcase) {} foreach font $S(fonts) { - lappend S(fonts,lcase) [string tolower $font] + lappend S(fonts,lcase) [string tolower $font] } wm deiconify $S(W) } @@ -104,57 +104,57 @@ proc ::tk::fontchooser::Configure {args} { variable S set specs { - {-parent "" "" . } - {-title "" "" ""} - {-font "" "" ""} - {-command "" "" ""} + {-parent "" "" . } + {-title "" "" ""} + {-font "" "" ""} + {-command "" "" ""} } if {[llength $args] == 0} { - set result {} - foreach spec $specs { - foreach {name xx yy default} $spec break - lappend result $name \ - [expr {[info exists S($name)] ? $S($name) : $default}] - } - lappend result -visible \ - [expr {[winfo exists $S(W)] && [winfo ismapped $S(W)]}] - return $result + set result {} + foreach spec $specs { + foreach {name xx yy default} $spec break + lappend result $name \ + [expr {[info exists S($name)] ? $S($name) : $default}] + } + lappend result -visible \ + [expr {[winfo exists $S(W)] && [winfo ismapped $S(W)]}] + return $result } if {[llength $args] == 1} { - set option [lindex $args 0] - if {[string equal $option "-visible"]} { - return [expr {[winfo exists $S(W)] && [winfo ismapped $S(W)]}] - } elseif {[info exists S($option)]} { - return $S($option) - } - return -code error -errorcode [list TK LOOKUP OPTION $option] \ - "bad option \"$option\": must be\ - -command, -font, -parent, -title or -visible" + set option [lindex $args 0] + if {[string equal $option "-visible"]} { + return [expr {[winfo exists $S(W)] && [winfo ismapped $S(W)]}] + } elseif {[info exists S($option)]} { + return $S($option) + } + return -code error -errorcode [list TK LOOKUP OPTION $option] \ + "bad option \"$option\": must be\ + -command, -font, -parent, -title or -visible" } set cache [dict create -parent $S(-parent) -title $S(-title) \ - -font $S(-font) -command $S(-command)] + -font $S(-font) -command $S(-command)] set r [tclParseConfigSpec [namespace which -variable S] $specs DONTSETDEFAULTS $args] if {![winfo exists $S(-parent)]} { - set code [list TK LOOKUP WINDOW $S(-parent)] - set err "bad window path name \"$S(-parent)\"" - array set S $cache - return -code error -errorcode $code $err + set code [list TK LOOKUP WINDOW $S(-parent)] + set err "bad window path name \"$S(-parent)\"" + array set S $cache + return -code error -errorcode $code $err } if {[winfo exists $S(W)]} { - if {{-font} in $args} { - Init $S(-font) - event generate $S(-parent) <<TkFontchooserFontChanged>> - } - - if {[string trim $S(-title)] eq {}} { - wm title $S(W) [::msgcat::mc Font] - } else { - wm title $S(W) $S(-title) - } - $S(W).ok configure -state $S(nstate) - $S(W).apply configure -state $S(nstate) + if {{-font} in $args} { + Init $S(-font) + event generate $S(-parent) <<TkFontchooserFontChanged>> + } + + if {[string trim $S(-title)] eq {}} { + wm title $S(W) [::msgcat::mc Font] + } else { + wm title $S(W) $S(-title) + } + $S(W).ok configure -state $S(nstate) + $S(W).apply configure -state $S(nstate) } return $r } @@ -163,144 +163,144 @@ proc ::tk::fontchooser::Create {} { variable S set windowName __tk__fontchooser if {$S(-parent) eq "."} { - set S(W) .$windowName + set S(W) .$windowName } else { - set S(W) $S(-parent).$windowName + set S(W) $S(-parent).$windowName } # Now build the dialog if {![winfo exists $S(W)]} { - toplevel $S(W) -class TkFontDialog - if {[package provide tcltest] ne {}} { - set ::tk_dialog $S(W) - } - wm withdraw $S(W) - wm title $S(W) $S(-title) - wm transient $S(W) [winfo toplevel $S(-parent)] - - set outer [::ttk::frame $S(W).outer -padding {7.5p 7.5p}] - ::tk::AmpWidget ::ttk::label $S(W).font -text [::msgcat::mc "&Font:"] - ::tk::AmpWidget ::ttk::label $S(W).style -text [::msgcat::mc "Font st&yle:"] - ::tk::AmpWidget ::ttk::label $S(W).size -text [::msgcat::mc "&Size:"] - ttk::entry $S(W).efont -width 18 \ - -textvariable [namespace which -variable S](font) - ttk::entry $S(W).estyle -width 10 \ - -textvariable [namespace which -variable S](style) - ttk::entry $S(W).esize -textvariable [namespace which -variable S](size) \ - -width 3 -validate key -validatecommand {regexp -- {^-*[0-9]*$} %P} - - ttk_slistbox $S(W).lfonts -height 7 -exportselection 0 \ - -selectmode browse -activestyle none \ - -listvariable [namespace which -variable S](fonts) - ttk_slistbox $S(W).lstyles -width 5 -height 7 -exportselection 0 \ - -selectmode browse -activestyle none \ - -listvariable [namespace which -variable S](styles) - ttk_slistbox $S(W).lsizes -width 4 -height 7 -exportselection 0 \ - -selectmode browse -activestyle none \ - -listvariable [namespace which -variable S](sizes) - - set WE $S(W).effects - ::ttk::labelframe $WE -text [::msgcat::mc "Effects"] - ::tk::AmpWidget ::ttk::checkbutton $WE.strike \ - -variable [namespace which -variable S](strike) \ - -text [::msgcat::mc "Stri&keout"] \ - -command [namespace code [list Click strike]] - ::tk::AmpWidget ::ttk::checkbutton $WE.under \ - -variable [namespace which -variable S](under) \ - -text [::msgcat::mc "&Underline"] \ - -command [namespace code [list Click under]] - - set bbox [::ttk::frame $S(W).bbox] - ::ttk::button $S(W).ok -text [::msgcat::mc OK] -default active\ - -command [namespace code [list Done 1]] - ::ttk::button $S(W).cancel -text [::msgcat::mc Cancel] \ - -command [namespace code [list Done 0]] - ::tk::AmpWidget ::ttk::button $S(W).apply -text [::msgcat::mc "&Apply"] \ - -command [namespace code [list Apply]] - wm protocol $S(W) WM_DELETE_WINDOW [namespace code [list Done 0]] - - # Calculate minimum sizes - ttk::scrollbar $S(W).tmpvs - set scroll_width [winfo reqwidth $S(W).tmpvs] - destroy $S(W).tmpvs - set minsize(gap) [::tk::ScaleNum 10] - set minsize(bbox) [winfo reqwidth $S(W).ok] - set minsize(fonts) \ - [expr {[font measure TkDefaultFont "Helvetica"] + $scroll_width}] - set minsize(styles) \ - [expr {[font measure TkDefaultFont "Bold Italic"] + $scroll_width}] - set minsize(sizes) \ - [expr {[font measure TkDefaultFont "-99"] + $scroll_width}] - set min [expr {$minsize(gap) * 4}] - foreach {what width} [array get minsize] { - incr min $width - } - wm minsize $S(W) $min [::tk::ScaleNum 260] - - bind $S(W) <Return> [namespace code [list Done 1]] - bind $S(W) <Escape> [namespace code [list Done 0]] - bind $S(W) <Map> [namespace code [list Visibility %W 1]] - bind $S(W) <Unmap> [namespace code [list Visibility %W 0]] - bind $S(W) <Destroy> [namespace code [list Visibility %W 0]] - bind $S(W).lfonts.list <<ListboxSelect>> [namespace code [list Click font]] - bind $S(W).lstyles.list <<ListboxSelect>> [namespace code [list Click style]] - bind $S(W).lsizes.list <<ListboxSelect>> [namespace code [list Click size]] - bind $S(W) <Alt-Key> [list ::tk::AltKeyInDialog $S(W) %A] - bind $S(W).font <<AltUnderlined>> [list ::focus $S(W).efont] - bind $S(W).style <<AltUnderlined>> [list ::focus $S(W).estyle] - bind $S(W).size <<AltUnderlined>> [list ::focus $S(W).esize] - bind $S(W).apply <<AltUnderlined>> [namespace code [list Apply]] - bind $WE.strike <<AltUnderlined>> [list $WE.strike invoke] - bind $WE.under <<AltUnderlined>> [list $WE.under invoke] - - set WS $S(W).sample - ::ttk::labelframe $WS -text [::msgcat::mc "Sample"] - ::ttk::label $WS.sample -relief sunken -anchor center \ - -textvariable [namespace which -variable S](sampletext) - set S(sample) $WS.sample - grid $WS.sample -sticky news -padx 4.5p -pady 3p - grid rowconfigure $WS 0 -weight 1 - grid columnconfigure $WS 0 -weight 1 - grid propagate $WS 0 - - grid $S(W).ok -in $bbox -sticky new -pady {0 1.5p} - grid $S(W).cancel -in $bbox -sticky new -pady 1.5p - grid $S(W).apply -in $bbox -sticky new -pady 1.5p - grid columnconfigure $bbox 0 -weight 1 - - grid $WE.strike -sticky w -padx 7.5p - grid $WE.under -sticky w -padx 7.5p -pady {0 22.5p} - grid columnconfigure $WE 1 -weight 1 - - grid $S(W).font x $S(W).style x $S(W).size x -in $outer -sticky w - grid $S(W).efont x $S(W).estyle x $S(W).esize x $bbox -in $outer -sticky ew - grid $S(W).lfonts x $S(W).lstyles x $S(W).lsizes x ^ -in $outer -sticky news - grid $WE x $WS - - x ^ -in $outer -sticky news -pady {11p 22.5p} - grid configure $bbox -sticky n - grid rowconfigure $outer 2 -weight 1 - grid columnconfigure $outer {1 3 5} -minsize $minsize(gap) - grid columnconfigure $outer {0 2 4} -weight 1 - grid columnconfigure $outer 0 -minsize $minsize(fonts) - grid columnconfigure $outer 2 -minsize $minsize(styles) - grid columnconfigure $outer 4 -minsize $minsize(sizes) - grid columnconfigure $outer 6 -minsize $minsize(bbox) - - grid $outer -sticky news - grid rowconfigure $S(W) 0 -weight 1 - grid columnconfigure $S(W) 0 -weight 1 - - Init $S(-font) - - trace add variable [namespace which -variable S](size) \ - write [namespace code [list Tracer]] - trace add variable [namespace which -variable S](style) \ - write [namespace code [list Tracer]] - trace add variable [namespace which -variable S](font) \ - write [namespace code [list Tracer]] - trace add variable [namespace which -variable S](strike) \ - write [namespace code [list Tracer]] - trace add variable [namespace which -variable S](under) \ - write [namespace code [list Tracer]] + toplevel $S(W) -class TkFontDialog + if {[package provide tcltest] ne {}} { + set ::tk_dialog $S(W) + } + wm withdraw $S(W) + wm title $S(W) $S(-title) + wm transient $S(W) [winfo toplevel $S(-parent)] + + set outer [::ttk::frame $S(W).outer -padding {7.5p 7.5p}] + ::tk::AmpWidget ::ttk::label $S(W).font -text [::msgcat::mc "&Font:"] + ::tk::AmpWidget ::ttk::label $S(W).style -text [::msgcat::mc "Font st&yle:"] + ::tk::AmpWidget ::ttk::label $S(W).size -text [::msgcat::mc "&Size:"] + ttk::entry $S(W).efont -width 18 \ + -textvariable [namespace which -variable S](font) + ttk::entry $S(W).estyle -width 10 \ + -textvariable [namespace which -variable S](style) + ttk::entry $S(W).esize -textvariable [namespace which -variable S](size) \ + -width 3 -validate key -validatecommand {regexp -- {^-*[0-9]*$} %P} + + ttk_slistbox $S(W).lfonts -height 7 -exportselection 0 \ + -selectmode browse -activestyle none \ + -listvariable [namespace which -variable S](fonts) + ttk_slistbox $S(W).lstyles -width 5 -height 7 -exportselection 0 \ + -selectmode browse -activestyle none \ + -listvariable [namespace which -variable S](styles) + ttk_slistbox $S(W).lsizes -width 4 -height 7 -exportselection 0 \ + -selectmode browse -activestyle none \ + -listvariable [namespace which -variable S](sizes) + + set WE $S(W).effects + ::ttk::labelframe $WE -text [::msgcat::mc "Effects"] + ::tk::AmpWidget ::ttk::checkbutton $WE.strike \ + -variable [namespace which -variable S](strike) \ + -text [::msgcat::mc "Stri&keout"] \ + -command [namespace code [list Click strike]] + ::tk::AmpWidget ::ttk::checkbutton $WE.under \ + -variable [namespace which -variable S](under) \ + -text [::msgcat::mc "&Underline"] \ + -command [namespace code [list Click under]] + + set bbox [::ttk::frame $S(W).bbox] + ::ttk::button $S(W).ok -text [::msgcat::mc OK] -default active\ + -command [namespace code [list Done 1]] + ::ttk::button $S(W).cancel -text [::msgcat::mc Cancel] \ + -command [namespace code [list Done 0]] + ::tk::AmpWidget ::ttk::button $S(W).apply -text [::msgcat::mc "&Apply"] \ + -command [namespace code [list Apply]] + wm protocol $S(W) WM_DELETE_WINDOW [namespace code [list Done 0]] + + # Calculate minimum sizes + ttk::scrollbar $S(W).tmpvs + set scroll_width [winfo reqwidth $S(W).tmpvs] + destroy $S(W).tmpvs + set minsize(gap) [::tk::ScaleNum 10] + set minsize(bbox) [winfo reqwidth $S(W).ok] + set minsize(fonts) \ + [expr {[font measure TkDefaultFont "Helvetica"] + $scroll_width}] + set minsize(styles) \ + [expr {[font measure TkDefaultFont "Bold Italic"] + $scroll_width}] + set minsize(sizes) \ + [expr {[font measure TkDefaultFont "-99"] + $scroll_width}] + set min [expr {$minsize(gap) * 4}] + foreach {what width} [array get minsize] { + incr min $width + } + wm minsize $S(W) $min [::tk::ScaleNum 260] + + bind $S(W) <Return> [namespace code [list Done 1]] + bind $S(W) <Escape> [namespace code [list Done 0]] + bind $S(W) <Map> [namespace code [list Visibility %W 1]] + bind $S(W) <Unmap> [namespace code [list Visibility %W 0]] + bind $S(W) <Destroy> [namespace code [list Visibility %W 0]] + bind $S(W).lfonts.list <<ListboxSelect>> [namespace code [list Click font]] + bind $S(W).lstyles.list <<ListboxSelect>> [namespace code [list Click style]] + bind $S(W).lsizes.list <<ListboxSelect>> [namespace code [list Click size]] + bind $S(W) <Alt-Key> [list ::tk::AltKeyInDialog $S(W) %A] + bind $S(W).font <<AltUnderlined>> [list ::focus $S(W).efont] + bind $S(W).style <<AltUnderlined>> [list ::focus $S(W).estyle] + bind $S(W).size <<AltUnderlined>> [list ::focus $S(W).esize] + bind $S(W).apply <<AltUnderlined>> [namespace code [list Apply]] + bind $WE.strike <<AltUnderlined>> [list $WE.strike invoke] + bind $WE.under <<AltUnderlined>> [list $WE.under invoke] + + set WS $S(W).sample + ::ttk::labelframe $WS -text [::msgcat::mc "Sample"] + ::ttk::label $WS.sample -relief sunken -anchor center \ + -textvariable [namespace which -variable S](sampletext) + set S(sample) $WS.sample + grid $WS.sample -sticky news -padx 4.5p -pady 3p + grid rowconfigure $WS 0 -weight 1 + grid columnconfigure $WS 0 -weight 1 + grid propagate $WS 0 + + grid $S(W).ok -in $bbox -sticky new -pady {0 1.5p} + grid $S(W).cancel -in $bbox -sticky new -pady 1.5p + grid $S(W).apply -in $bbox -sticky new -pady 1.5p + grid columnconfigure $bbox 0 -weight 1 + + grid $WE.strike -sticky w -padx 7.5p + grid $WE.under -sticky w -padx 7.5p -pady {0 22.5p} + grid columnconfigure $WE 1 -weight 1 + + grid $S(W).font x $S(W).style x $S(W).size x -in $outer -sticky w + grid $S(W).efont x $S(W).estyle x $S(W).esize x $bbox -in $outer -sticky ew + grid $S(W).lfonts x $S(W).lstyles x $S(W).lsizes x ^ -in $outer -sticky news + grid $WE x $WS - - x ^ -in $outer -sticky news -pady {11p 22.5p} + grid configure $bbox -sticky n + grid rowconfigure $outer 2 -weight 1 + grid columnconfigure $outer {1 3 5} -minsize $minsize(gap) + grid columnconfigure $outer {0 2 4} -weight 1 + grid columnconfigure $outer 0 -minsize $minsize(fonts) + grid columnconfigure $outer 2 -minsize $minsize(styles) + grid columnconfigure $outer 4 -minsize $minsize(sizes) + grid columnconfigure $outer 6 -minsize $minsize(bbox) + + grid $outer -sticky news + grid rowconfigure $S(W) 0 -weight 1 + grid columnconfigure $S(W) 0 -weight 1 + + Init $S(-font) + + trace add variable [namespace which -variable S](size) \ + write [namespace code [list Tracer]] + trace add variable [namespace which -variable S](style) \ + write [namespace code [list Tracer]] + trace add variable [namespace which -variable S](font) \ + write [namespace code [list Tracer]] + trace add variable [namespace which -variable S](strike) \ + write [namespace code [list Tracer]] + trace add variable [namespace which -variable S](under) \ + write [namespace code [list Tracer]] } Init $S(-font) @@ -319,7 +319,7 @@ proc ::tk::fontchooser::Done {ok} { variable S if {! $ok} { - set S(result) "" + set S(result) "" } trace remove variable S(size) write [namespace code [list Tracer]] trace remove variable S(style) write [namespace code [list Tracer]] @@ -328,10 +328,10 @@ proc ::tk::fontchooser::Done {ok} { trace remove variable S(under) write [namespace code [list Tracer]] destroy $S(W) if {$ok} { - if {$S(-command) ne ""} { - uplevel #0 $S(-command) [list $S(result)] - } - event generate $S(-parent) <<TkFontchooserFontChanged>> + if {$S(-command) ne ""} { + uplevel #0 $S(-command) [list $S(result)] + } + event generate $S(-parent) <<TkFontchooserFontChanged>> } } @@ -343,9 +343,9 @@ proc ::tk::fontchooser::Done {ok} { proc ::tk::fontchooser::Apply {} { variable S if {$S(-command) ne ""} { - if {[catch {uplevel #0 $S(-command) [list $S(result)]} err]} { - ::bgerror $err - } + if {[catch {uplevel #0 $S(-command) [list $S(result)]} err]} { + ::bgerror $err + } } event generate $S(-parent) <<TkFontchooserFontChanged>> } @@ -361,25 +361,25 @@ proc ::tk::fontchooser::Init {{defaultFont ""}} { variable S if {$S(first) || $defaultFont ne ""} { - Canonical - if {$defaultFont eq ""} { - set defaultFont [[entry .___e] cget -font] - destroy .___e - } - array set F [font actual $defaultFont] - set S(font) $F(-family) - set S(style) [::msgcat::mc "Regular"] - set S(size) $F(-size) - set S(strike) $F(-overstrike) - set S(under) $F(-underline) - if {$F(-weight) eq "bold" && $F(-slant) eq "italic"} { - set S(style) [::msgcat::mc "Bold Italic"] - } elseif {$F(-weight) eq "bold"} { - set S(style) [::msgcat::mc "Bold"] - } elseif {$F(-slant) eq "italic"} { - set S(style) [::msgcat::mc "Italic"] - } - set S(first) 0 + Canonical + if {$defaultFont eq ""} { + set defaultFont [[entry .___e] cget -font] + destroy .___e + } + array set F [font actual $defaultFont] + set S(font) $F(-family) + set S(style) [::msgcat::mc "Regular"] + set S(size) $F(-size) + set S(strike) $F(-overstrike) + set S(under) $F(-underline) + if {$F(-weight) eq "bold" && $F(-slant) eq "italic"} { + set S(style) [::msgcat::mc "Bold Italic"] + } elseif {$F(-weight) eq "bold"} { + set S(style) [::msgcat::mc "Bold"] + } elseif {$F(-slant) eq "italic"} { + set S(style) [::msgcat::mc "Italic"] + } + set S(first) 0 } } @@ -393,11 +393,11 @@ proc ::tk::fontchooser::Init {{defaultFont ""}} { proc ::tk::fontchooser::Click {who} { variable S if {$who eq "font"} { - set S(font) [$S(W).lfonts get [$S(W).lfonts curselection]] + set S(font) [$S(W).lfonts get [$S(W).lfonts curselection]] } elseif {$who eq "style"} { - set S(style) [$S(W).lstyles get [$S(W).lstyles curselection]] + set S(style) [$S(W).lstyles get [$S(W).lstyles curselection]] } elseif {$who eq "size"} { - set S(size) [$S(W).lsizes get [$S(W).lsizes curselection]] + set S(size) [$S(W).lsizes get [$S(W).lsizes curselection]] } } @@ -412,38 +412,38 @@ proc ::tk::fontchooser::Tracer {var1 var2 op} { variable S # We don't need to process strike and under if {$var2 ni [list strike under]} { - # Make selection in listbox - set value [string tolower $S($var2)] - $S(W).l${var2}s selection clear 0 end - set n [lsearch -exact $S(${var2}s,lcase) $value] - $S(W).l${var2}s selection set $n - if {$n >= 0} { - set S($var2) [lindex $S(${var2}s) $n] - $S(W).e$var2 icursor end - $S(W).e$var2 selection clear - if {[set i [lsearch $S(bad) $var2]] >= 0} { - set S(bad) [lreplace $S(bad) $i $i] - } - } else { - # No match, try prefix - set n [lsearch -glob $S(${var2}s,lcase) "$value*"] - if {$var2 ne "size" || !([regexp -- {^(-[0-9]+|[0-9]+)$} $value] && $value >= -4096 && $value <= 4096)} { - if {[lsearch $S(bad) $var2] < 0} { - lappend S(bad) $var2 - } - } else { - if {[set i [lsearch $S(bad) $var2]] >= 0} { - set S(bad) [lreplace $S(bad) $i $i] - } - } - } - $S(W).l${var2}s see $n + # Make selection in listbox + set value [string tolower $S($var2)] + $S(W).l${var2}s selection clear 0 end + set n [lsearch -exact $S(${var2}s,lcase) $value] + $S(W).l${var2}s selection set $n + if {$n >= 0} { + set S($var2) [lindex $S(${var2}s) $n] + $S(W).e$var2 icursor end + $S(W).e$var2 selection clear + if {[set i [lsearch $S(bad) $var2]] >= 0} { + set S(bad) [lreplace $S(bad) $i $i] + } + } else { + # No match, try prefix + set n [lsearch -glob $S(${var2}s,lcase) "$value*"] + if {$var2 ne "size" || !([regexp -- {^(-[0-9]+|[0-9]+)$} $value] && $value >= -4096 && $value <= 4096)} { + if {[lsearch $S(bad) $var2] < 0} { + lappend S(bad) $var2 + } + } else { + if {[set i [lsearch $S(bad) $var2]] >= 0} { + set S(bad) [lreplace $S(bad) $i $i] + } + } + } + $S(W).l${var2}s see $n } if {[llength $S(bad)] == 0} { - set S(nstate) normal - Update + set S(nstate) normal + Update } else { - set S(nstate) disabled + set S(nstate) disabled } $S(W).ok configure -state $S(nstate) $S(W).apply configure -state $S(nstate) @@ -458,19 +458,19 @@ proc ::tk::fontchooser::Update {} { set S(result) [list $S(font) $S(size)] if {$S(style) eq [::msgcat::mc "Bold"]} { - lappend S(result) bold + lappend S(result) bold } if {$S(style) eq [::msgcat::mc "Italic"]} { - lappend S(result) italic + lappend S(result) italic } if {$S(style) eq [::msgcat::mc "Bold Italic"]} { - lappend S(result) bold italic + lappend S(result) bold italic } if {$S(strike)} { - lappend S(result) overstrike + lappend S(result) overstrike } if {$S(under)} { - lappend S(result) underline + lappend S(result) underline } $S(sample) configure -font $S(result) @@ -484,7 +484,7 @@ proc ::tk::fontchooser::Update {} { proc ::tk::fontchooser::Visibility {w visible} { variable S if {$w eq $S(W)} { - event generate $S(-parent) <<TkFontchooserVisibility>> + event generate $S(-parent) <<TkFontchooserVisibility>> } } @@ -496,17 +496,17 @@ proc ::tk::fontchooser::Visibility {w visible} { proc ::tk::fontchooser::ttk_slistbox {w args} { set f [ttk::frame $w -style FontchooserFrame -padding 1.5p] if {[catch { - listbox $f.list -relief flat -highlightthickness 0 -borderwidth 0 {*}$args - ttk::scrollbar $f.vs -command [list $f.list yview] - $f.list configure -yscrollcommand [list $f.vs set] - grid $f.list $f.vs -sticky news - grid rowconfigure $f 0 -weight 1 - grid columnconfigure $f 0 -weight 1 - interp hide {} $w - interp alias {} $w {} $f.list + listbox $f.list -relief flat -highlightthickness 0 -borderwidth 0 {*}$args + ttk::scrollbar $f.vs -command [list $f.list yview] + $f.list configure -yscrollcommand [list $f.vs set] + grid $f.list $f.vs -sticky news + grid rowconfigure $f 0 -weight 1 + grid columnconfigure $f 0 -weight 1 + interp hide {} $w + interp alias {} $w {} $f.list } err opt]} { - destroy $f - return -options $opt $err + destroy $f + return -options $opt $err } return $w } diff --git a/library/iconbadges.tcl b/library/iconbadges.tcl index fd249a0..5dc6f5a 100644 --- a/library/iconbadges.tcl +++ b/library/iconbadges.tcl @@ -219,9 +219,8 @@ if {[tk windowingsystem] eq "x11"} { return -code error "can't use \"$::tk::icons::base_icon($win)\" as iconphoto: not a photo image" } - if {!([string is integer $badgenumber] && $badgenumber > 0) - && [string match $badgenumber "!"] == 0 - && $badgenumber ne ""} { + if {!([string is integer -strict $badgenumber] && $badgenumber > 0) + && $badgenumber ne "!" && $badgenumber ne ""} { return -code error "can't use \"$badgenumber\" as icon badge" } @@ -244,7 +243,7 @@ if {[tk windowingsystem] eq "x11"} { set badge ::tk::icons::9plus-badge } - } + } overlay copy $::tk::icons::base_icon($win) overlay copy $badge -from 0 0 18 18 -to 18 0 diff --git a/library/iconlist.tcl b/library/iconlist.tcl index efcd63b..f0c5362 100644 --- a/library/iconlist.tcl +++ b/library/iconlist.tcl @@ -453,9 +453,9 @@ package require tk bind $canvas <Return> [namespace code {my ReturnKey}] bind $canvas <Key> [namespace code {my KeyPress %A}] bind $canvas <Alt-Key> {# nothing} - bind $canvas <Meta-Key> {# nothing} - bind $canvas <Control-Key> {# nothing} - bind $canvas <Command-Key> {# nothing} + bind $canvas <Meta-Key> {# nothing} + bind $canvas <Control-Key> {# nothing} + bind $canvas <Command-Key> {# nothing} bind $canvas <Fn-Key> {# nothing} bind $canvas <FocusIn> [namespace code {my FocusIn}] diff --git a/library/listbox.tcl b/library/listbox.tcl index d611801..a86f273 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -14,7 +14,7 @@ # tk::Priv elements used in this file: # # afterId - Token returned by "after" for autoscanning. -# listboxPrev - The last element to be selected or deselected +# listboxPrev - The last element to be selected or deselected # during a selection operation. # listboxSelection - All of the items that were selected before the # current selection operation (such as a mouse @@ -163,7 +163,7 @@ bind Listbox <<SelectAll>> { bind Listbox <<SelectNone>> { if {[%W cget -selectmode] ne "browse"} { %W selection clear 0 end - tk::FireListboxSelectEvent %W + tk::FireListboxSelectEvent %W } } @@ -188,15 +188,14 @@ bind Listbox <Shift-Option-MouseWheel> { tk::MouseWheel %W x %D -12.0 units } bind Listbox <TouchpadScroll> { - if {%# %% 5 != 0} { - return - } - lassign [tk::PreciseScrollDeltas %D] deltaX deltaY - if {$deltaX != 0} { - %W xview scroll [expr {-$deltaX}] units - } - if {$deltaY != 0} { - %W yview scroll [expr {-$deltaY}] units + if {%# %% 5 == 0} { + lassign [tk::PreciseScrollDeltas %D] tk::Priv(deltaX) tk::Priv(deltaY) + if {$tk::Priv(deltaX) != 0} { + %W xview scroll [expr {-$tk::Priv(deltaX)}] units + } + if {$tk::Priv(deltaY) != 0} { + %W yview scroll [expr {-$tk::Priv(deltaY)}] units + } } } @@ -443,7 +442,7 @@ proc ::tk::ListboxDataExtend {w el} { if {$mode eq "extended"} { $w activate $el $w see $el - if {[$w selection includes anchor]} { + if {[$w selection includes anchor]} { ListboxMotion $w $el } } elseif {$mode eq "multiple"} { @@ -518,6 +517,6 @@ proc ::tk::ListboxSelectAll w { proc ::tk::FireListboxSelectEvent w { if {[$w cget -state] eq "normal"} { - event generate $w <<ListboxSelect>> + event generate $w <<ListboxSelect>> } } diff --git a/library/menu.tcl b/library/menu.tcl index 57dc963..50319ef 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -408,7 +408,7 @@ proc ::tk::MenuUnpost menu { # # Arguments: # w - The name of the menubutton widget. -# upDown - "down" means button 1 is pressed, "up" means +# upDown - "down" means button 1 is pressed, "up" means # it isn't. # rootx, rooty - Coordinates of mouse, in (virtual?) root window. @@ -1199,18 +1199,18 @@ if {[tk windowingsystem] eq "aqua"} { incr x [expr {[winfo width $button]}] } default { # flush - if {[$button cget -indicatoron]} { - if {$cx ne ""} { - set x [expr {$cx - [winfo reqwidth $menu] / 2}] - set l [font metrics [$menu cget -font] -linespace] - set y [expr {$cy - $l/2 - 2}] - } else { - incr x [expr {([winfo width $button] - \ + if {[$button cget -indicatoron]} { + if {$cx ne ""} { + set x [expr {$cx - [winfo reqwidth $menu] / 2}] + set l [font metrics [$menu cget -font] -linespace] + set y [expr {$cy - $l/2 - 2}] + } else { + incr x [expr {([winfo width $button] - \ [winfo reqwidth $menu])/ 2}] - } - } else { - incr y [winfo height $button] - } + } + } else { + incr y [winfo height $button] + } } } PostOverPoint $menu $x $y $entry diff --git a/library/msgbox.tcl b/library/msgbox.tcl index 3757019..cb39a1c 100644 --- a/library/msgbox.tcl +++ b/library/msgbox.tcl @@ -147,11 +147,11 @@ proc ::tk::MessageBox {args} { set specs { {-default "" "" ""} {-detail "" "" ""} - {-icon "" "" "info"} - {-message "" "" ""} - {-parent "" "" .} - {-title "" "" " "} - {-type "" "" "ok"} + {-icon "" "" "info"} + {-message "" "" ""} + {-parent "" "" .} + {-title "" "" " "} + {-type "" "" "ok"} } tclParseConfigSpec $w $specs "" $args @@ -297,7 +297,7 @@ proc ::tk::MessageBox {args} { if {$windowingsystem eq "aqua"} { ::tk::unsupported::MacWindowStyle style $w moveableModal {} } elseif {$windowingsystem eq "x11"} { - wm attributes $w -type dialog + wm attributes $w -type dialog } ttk::frame $w.bot @@ -325,18 +325,18 @@ proc ::tk::MessageBox {args} { label $w.bitmap -bitmap $data(-icon) -background $bg } else { switch $data(-icon) { - error { - ttk::label $w.bitmap -image ::tk::icons::error - } - info { - ttk::label $w.bitmap -image ::tk::icons::information - } - question { - ttk::label $w.bitmap -image ::tk::icons::question - } - default { - ttk::label $w.bitmap -image ::tk::icons::warning - } + error { + ttk::label $w.bitmap -image ::tk::icons::error + } + info { + ttk::label $w.bitmap -image ::tk::icons::information + } + question { + ttk::label $w.bitmap -image ::tk::icons::question + } + default { + ttk::label $w.bitmap -image ::tk::icons::warning + } } } } @@ -382,16 +382,16 @@ proc ::tk::MessageBox {args} { } grid configure $w.$name -pady 7 } - incr i + incr i # create the binding for the key accelerator, based on the underline # - # set underIdx [$w.$name cget -under] - # if {$underIdx >= 0} { - # set key [string index [$w.$name cget -text] $underIdx] - # bind $w <Alt-[string tolower $key]> [list $w.$name invoke] - # bind $w <Alt-[string toupper $key]> [list $w.$name invoke] - # } + # set underIdx [$w.$name cget -under] + # if {$underIdx >= 0} { + # set key [string index [$w.$name cget -text] $underIdx] + # bind $w <Alt-[string tolower $key]> [list $w.$name invoke] + # bind $w <Alt-[string toupper $key]> [list $w.$name invoke] + # } } bind $w <Alt-Key> [list ::tk::AltKeyInDialog $w %A] diff --git a/library/msgs/el.msg b/library/msgs/el.msg index 0336326..3a669b3 100644 --- a/library/msgs/el.msg +++ b/library/msgs/el.msg @@ -21,17 +21,17 @@ namespace eval ::tk { ::msgcat::mcset el "Delete" "Διαγραφή" ::msgcat::mcset el "Details >>" "Λεπτομέρειες >>" ::msgcat::mcset el "Directory \"%1\$s\" does not exist." \ - "Ο κατάλογος \"%1\$s\" δεν υπάρχει." + "Ο κατάλογος \"%1\$s\" δεν υπάρχει." ::msgcat::mcset el "&Directory:" "&Κατάλογος:" ::msgcat::mcset el "Error: %1\$s" "Λάθος: %1\$s" ::msgcat::mcset el "Exit" "Έξοδος" ::msgcat::mcset el \ - "File \"%1\$s\" already exists.\nDo you want to overwrite it?" \ - "Το αρχείο \"%1\$s\" ήδη υπάρχει.\nΘέλετε να επικαλυφθεί;" + "File \"%1\$s\" already exists.\nDo you want to overwrite it?" \ + "Το αρχείο \"%1\$s\" ήδη υπάρχει.\nΘέλετε να επικαλυφθεί;" ::msgcat::mcset el "File \"%1\$s\" already exists.\n\n" \ - "Το αρχείο \"%1\$s\" ήδη υπάρχει.\n\n" + "Το αρχείο \"%1\$s\" ήδη υπάρχει.\n\n" ::msgcat::mcset el "File \"%1\$s\" does not exist." \ - "Το αρχείο \"%1\$s\" δεν υπάρχει." + "Το αρχείο \"%1\$s\" δεν υπάρχει." ::msgcat::mcset el "File &name:" "Ό&νομα αρχείου:" ::msgcat::mcset el "File &names:" "Ό&νομα αρχείων:" ::msgcat::mcset el "Files of &type:" "Αρχεία του &τύπου:" @@ -43,7 +43,7 @@ namespace eval ::tk { ::msgcat::mcset el "Hide Console" "Απόκρυψη κονσόλας" ::msgcat::mcset el "&Ignore" "Αγνόηση" ::msgcat::mcset el "Invalid file name \"%1\$s\"." \ - "Άκυρο όνομα αρχείου \"%1\$s\"." + "Άκυρο όνομα αρχείου \"%1\$s\"." ::msgcat::mcset el "Log Files" "Αρχεία Καταγραφής" ::msgcat::mcset el "&No" "Όχι" ::msgcat::mcset el "&OK" "Εντάξει" @@ -52,19 +52,19 @@ namespace eval ::tk { ::msgcat::mcset el "Open" "Άνοιγμα" ::msgcat::mcset el "&Open" "Άνοιγμα" ::msgcat::mcset el "Open Multiple Files" \ - "Άνοιγμα πολλαπλών αρχείων" + "Άνοιγμα πολλαπλών αρχείων" ::msgcat::mcset el "P&aste" "Επικόλληση" ::msgcat::mcset el "Quit" "Έξοδος" ::msgcat::mcset el "&Red" "Κόκκινο" ::msgcat::mcset el "Replace existing file?" \ - "Επικάλυψη υπάρχοντος αρχείου;" + "Επικάλυψη υπάρχοντος αρχείου;" ::msgcat::mcset el "&Retry" "Προσπάθησε ξανά" ::msgcat::mcset el "&Save" "Αποθήκευση" ::msgcat::mcset el "Save As" "Αποθήκευση σαν" ::msgcat::mcset el "Save To Log" "Αποθήκευση στο αρχείο καταγραφής" ::msgcat::mcset el "Select Log File" "Επιλογή αρχείου καταγραφής" ::msgcat::mcset el "Select a file to source" \ - "Επιλέξτε αρχείο για εκτέλεση" + "Επιλέξτε αρχείο για εκτέλεση" ::msgcat::mcset el "&Selection:" "Επιλογή:" ::msgcat::mcset el "Skip Messages" "Αποφυγήμηνυμάτων" ::msgcat::mcset el "&Source..." "Εκτέλεση..." diff --git a/library/palette.tcl b/library/palette.tcl index 90b499b..43dccc5 100644 --- a/library/palette.tcl +++ b/library/palette.tcl @@ -189,6 +189,9 @@ proc ::tk_setPalette {args} { # which contains color information. Each element # is named after a widget configuration option, and # each value is the value for that option. +# Return Value: +# A list of commands which can be run to update +# the defaults database when exec'ed. proc ::tk::RecolorTree {w colors} { upvar $colors c @@ -200,11 +203,14 @@ proc ::tk::RecolorTree {w colors} { foreach dbOption [array names c] { set option -[string tolower $dbOption] set class [string replace $dbOption 0 0 [string toupper \ - [string index $dbOption 0]]] + [string index $dbOption 0]]] + # Make sure this option is valid for this window. if {![catch {$w configure $option} value]} { - # if the option database has a preference for this - # dbOption, then use it, otherwise use the defaults - # for the widget. + # Update the option for this window. + $w configure $option $c($dbOption) + # Retrieve a default value for this option. First check + # the option database. If it is not in the database use + # the value for the temporary prototype widget. set defaultcolor [option get $w $dbOption $class] if {$defaultcolor eq "" || \ ([info exists prototype] && \ @@ -214,16 +220,15 @@ proc ::tk::RecolorTree {w colors} { if {$defaultcolor ne ""} { set defaultcolor [winfo rgb . $defaultcolor] } - set chosencolor [lindex $value 4] - if {$chosencolor ne ""} { - set chosencolor [winfo rgb . $chosencolor] + # If the color requested for this option differs from + # the default, append a command to update the default. + set requestcolor [lindex $value 4] + if {$requestcolor ne ""} { + set requestcolor [winfo rgb . $requestcolor] } - if {[string match $defaultcolor $chosencolor]} { - # Change the option database so that future windows will get - # the same colors. + if {![string match $defaultcolor $requestcolor]} { append result ";\noption add [list \ *[winfo class $w].$dbOption $c($dbOption) 60]" - $w configure $option $c($dbOption) } } } @@ -245,19 +250,19 @@ proc ::tk::RecolorTree {w colors} { proc ::tk::Darken {color percent} { if {$percent < 0} { - return #000000 + return #000000 } elseif {$percent > 200} { - return #ffffff + return #ffffff } elseif {$percent <= 100} { - lassign [winfo rgb . $color] r g b - set r [expr {($r/256)*$percent/100}] - set g [expr {($g/256)*$percent/100}] - set b [expr {($b/256)*$percent/100}] + lassign [winfo rgb . $color] r g b + set r [expr {($r/256)*$percent/100}] + set g [expr {($g/256)*$percent/100}] + set b [expr {($b/256)*$percent/100}] } elseif {$percent > 100} { - lassign [winfo rgb . $color] r g b - set r [expr {255 - ((65535-$r)/256)*(200-$percent)/100}] - set g [expr {255 - ((65535-$g)/256)*(200-$percent)/100}] - set b [expr {255 - ((65535-$b)/256)*(200-$percent)/100}] + lassign [winfo rgb . $color] r g b + set r [expr {255 - ((65535-$r)/256)*(200-$percent)/100}] + set g [expr {255 - ((65535-$g)/256)*(200-$percent)/100}] + set b [expr {255 - ((65535-$b)/256)*(200-$percent)/100}] } return [format #%02x%02x%02x $r $g $b] } diff --git a/library/panedwindow.tcl b/library/panedwindow.tcl index d3dfabc..4dfd671 100644 --- a/library/panedwindow.tcl +++ b/library/panedwindow.tcl @@ -188,7 +188,7 @@ proc ::tk::panedwindow::Cursor {w} { proc ::tk::panedwindow::Leave {w} { variable ::tk::Priv if {[info exists Priv($w,panecursor)]} { - $w configure -cursor $Priv($w,panecursor) - unset Priv($w,panecursor) + $w configure -cursor $Priv($w,panecursor) + unset Priv($w,panecursor) } } diff --git a/library/print.tcl b/library/print.tcl index 1a7f710..76cf16f 100644 --- a/library/print.tcl +++ b/library/print.tcl @@ -76,7 +76,7 @@ namespace eval ::tk::print { #Next, set values. Some are taken from the printer, #some are sane defaults. - if {[info exists printer_name] && $printer_name ne ""} { + if {[info exists printer_name] && $printer_name ne ""} { set printargs(hDC) $printer_name set printargs(pw) $paper_width set printargs(pl) $paper_height @@ -652,271 +652,606 @@ namespace eval ::tk::print { _init_print_canvas } #end win32 procedures +} + +# Begin X11 procedures. They depends on Cups being installed. +# X11 procedures abstracts print management with a "cups" ensemble command + +# cups defaultprinter returns the default printer +# cups getprinters returns a dictionary of printers along +# with printer info +# cups print $printer $data ?$options? +# print the data (binary) on a given printer +# with the provided (supported) options: +# -colormode -copies -format -margins +# -media -nup -orientation +# -prettyprint -title -tzoom + +# Some output configuration that on other platforms is managed through +# the printer driver/dialog is configured through the canvas postscript command. +if {[tk windowingsystem] eq "x11"} { + if {[info commands ::tk::print::cups] eq ""} { + namespace eval ::tk::print::cups { + # Pure Tcl cups ensemble command implementation + variable pcache + } + + proc ::tk::print::cups::defaultprinter {} { + set default {} + regexp {: ([^[:space:]]+)$} [exec lpstat -d] _ default + return $default + } + + proc ::tk::print::cups::getprinters {} { + variable pcache + # Test for existence of lpstat command to obtain the list of + # printers. + # Return an error if not found. + set res {} + try { + set printers [lsort -unique [split [exec lpstat -e] \n]] + foreach printer $printers { + set options [Parseoptions [exec lpoptions -p $printer]] + dict set res $printer $options + } + } trap {POSIX ENOENT} {e o} { + # no such command in PATH + set cmd [lindex [dict get $o -errorstack ] 1 2] + return -code error "Unable to obtain the list of printers.\ + Command \"$cmd\" not found.\ + Please install the CUPS package for your system." + } trap {CHILDSTATUS} {} { + # command returns a non-0 exit status. Wrong print system? + set cmd [lindex [dict get $o -errorstack ] 1 2] + return -code error "Command \"$cmd\" return with errors" + } + return [set pcache $res] + } + + # Parseoptions + # Parse lpoptions -d output. It has three forms + # option-key + # option-key=option-value + # option-key='option value with spaces' + # Arguments: + # data - data to process. + # + proc ::tk::print::cups::Parseoptions {data} { + set res {} + set re {[^ =]+|[^ ]+='[^']+'|[^ ]+=[^ ']+} + foreach tok [regexp -inline -all $re $data] { + lassign [split $tok "="] k v + dict set res $k [string trim $v "'"] + } + return $res + } + + proc ::tk::print::cups::print {printer data args} { + variable pcache + if {$printer ni [dict keys $pcache]} { + return -code error "unknown printer or class \"$printer\"" + } + set title "Tk print job" + set options { + -colormode -copies -format -margins -media -nup -orientation + -prettyprint -title -tzoom + } + while {[llength $args]} { + set opt [tcl::prefix match $options [lpop args 0]] + switch $opt { + -colormode { + set opts {auto monochrome color} + set val [tcl::prefix match $opts [lpop args 0]] + lappend printargs -o print-color-mode=$val + } + -copies { + set val [lpop args 0] + if {![string is integer -strict $val] || + $val < 0 || $val > 100 + } { + # save paper !! + return -code error "copies must be an integer\ + between 0 and 100" + } + lappend printargs -o copies=$val + } + -format { + set opts {auto pdf postscript text} + set val [tcl::prefix match $opts [lpop args 0]] + # lpr uses auto always + } + -margins { + set val [lpop args 0] + if {[llength $val] != 4 || + ![string is integer -strict [lindex $val 0]] || + ![string is integer -strict [lindex $val 1]] || + ![string is integer -strict [lindex $val 2]] || + ![string is integer -strict [lindex $val 3]] + } { + return -code error "margins must be a list of 4\ + integers: top left bottom right" + } + lappend printargs -o page-top=[lindex $val 0] + lappend printargs -o page-left=[lindex $val 1] + lappend printargs -o page-bottom=[lindex $val 2] + lappend printargs -o page-right=[lindex $val 3] + } + -media { + set opts {a4 legal letter} + set val [tcl::prefix match $opts [lpop args 0]] + lappend printargs -o media=$val + } + -nup { + set val [lpop args 0] + if {$val ni {1 2 4 6 9 16}} { + return -code error "number-up must be 1, 2, 4, 6, 9 or\ + 16" + } + lappend printargs -o number-up=$val + } + -orientation { + set opts {portrait landscape} + set val [tcl::prefix match $opts [lpop args 0]] + if {$val eq "landscape"} + lappend printargs -o landscape=true + } + -prettyprint { + lappend printargs -o prettyprint=true + # prettyprint mess with these default values if set + # so we force them. + # these will be overriden if set after this point + if {[lsearch $printargs {cpi=*}] == -1} { + lappend printargs -o cpi=10.0 + lappend printargs -o lpi=6.0 + } + } + -title { + set title [lpop args 0] + } + -tzoom { + set val [lpop args 0] + if {![string is double -strict $val] || + $val < 0.5 || $val > 2.0 + } { + return -code error "text zoom must be a number between\ + 0.5 and 2.0" + } + # CUPS text filter defaults to lpi=6 and cpi=10 + lappend printargs -o cpi=[expr {10.0 / $val}] + lappend printargs -o lpi=[expr {6.0 / $val}] + } + default { + # shouldn't happen + } + } + } + # build our options + lappend printargs -T $title + lappend printargs -P $printer + # open temp file + set fd [file tempfile fname tk_print] + chan configure $fd -translation binary + chan puts $fd $data + chan close $fd + # add -r to automatically delete temp files + exec lpr {*}$printargs -r $fname & + } - #begin X11 procedures + namespace eval ::tk::print::cups { + namespace export defaultprinter getprinters print + namespace ensemble create + } + };# ::tk::print::cups + + namespace eval ::tk::print { + + variable mcmap + set mcmap(media) [dict create \ + [mc "Letter"] letter \ + [mc "Legal"] legal \ + [mc "A4"] a4] + set mcmap(orient) [dict create \ + [mc "Portrait"] portrait \ + [mc "Landscape"] landscape] + set mcmap(color) [dict create \ + [mc "RGB"] color \ + [mc "Grayscale"] gray] + + # available print options + variable optlist + set optlist(printer) {} + set optlist(media) [dict keys $mcmap(media)] + set optlist(orient) [dict keys $mcmap(orient)] + set optlist(color) [dict keys $mcmap(color)] + set optlist(number-up) {1 2 4 6 9 16} - # X11 procedures wrap standard Unix shell commands such as lp/lpr and - # lpstat for printing. Some output configuration that on other platforms - # is managed through the printer driver/dialog is configured through the - # canvas postscript command. + # selected options + variable option + set option(printer) {} + # Initialize with sane defaults. + set option(copies) 1 + set option(media) [mc "A4"] + # Canvas options + set option(orient) [mc "Portrait"] + set option(color) [mc "RGB"] + set option(czoom) 100 + # Text options. + # See libcupsfilter's cfFilterTextToPDF() and cups-filters's texttopdf + # known options: + # prettyprint, wrap, columns, lpi, cpi + set option(number-up) 1 + set option(tzoom) 100; # we derive lpi and cpi from this value + set option(pprint) 0 ; # pretty print + set option(margin-top) 20 ; # ~ 7mm (~ 1/4") + set option(margin-left) 20 ; # ~ 7mm (~ 1/4") + set option(margin-right) 20 ; # ~ 7mm (~ 1/4") + set option(margin-bottom) 20 ; # ~ 7mm (~ 1/4") + + # array to collect printer information + variable pinfo + array set pinfo {} + + # a map for printer state -> human readable message + variable statemap + dict set statemap 3 [mc "Idle"] + dict set statemap 4 [mc "Printing"] + dict set statemap 5 [mc "Printer stopped"] + } - if {[tk windowingsystem] eq "x11"} { - variable printcmd {} + # ttk version of [tk_optionMenu] + # var should be a full qualified varname + proc ::tk::print::ttk_optionMenu {w var args} { + ttk::menubutton $w -textvariable $var -menu $w.menu + menu $w.menu + foreach option $args { + $w.menu add command \ + -label $option \ + -command [list set $var $option] + } + # return the same value as tk_optionMenu + return $w.menu + } - # print options + # _setprintenv + # Set the print environtment - list of printers, state and options. + # Arguments: + # none. + # + proc ::tk::print::_setprintenv {} { + variable option variable optlist + variable pinfo + set optlist(printer) {} - set optlist(paper) [list [mc "Letter"] [mc "Legal"] [mc "A4"]] - set optlist(orient) [list [mc "Portrait"] [mc "Landscape"]] - set optlist(color) [list [mc "Grayscale"] [mc "RGB"]] - set optlist(zoom) {100 90 80 70 60 50 40 30 20 10} + dict for {printer options} [cups getprinters] { + lappend optlist(printer) $printer + set pinfo($printer) $options + } - # selected options - variable sel - array set sel { - printer {} - copies {} - paper {} - orient {} - color {} - zoom {} + # It's an error to not have any printer configured + if {[llength $optlist(printer)] == 0} { + return -code error "No installed printers found.\ + Please check or update your CUPS installation." } + # If no printer is selected, check for the default one + # If none found, use the first one from the list + if {$option(printer) eq ""} { + set option(printer) [cups defaultprinter] + if {$option(printer) eq ""} { + set option(printer) [lindex $optlist(printer) 0] + } + } + } + + # _print + # Main printer dialog. + # Select printer, set options, and fire print command. + # Arguments: + # w - widget with contents to print. + # + proc ::tk::print::_print {w} { + variable optlist + variable option + variable pinfo + variable statemap + # default values for dialog widgets option add *Printdialog*TLabel.anchor e option add *Printdialog*TMenubutton.Menu.tearOff 0 option add *Printdialog*TMenubutton.width 12 option add *Printdialog*TSpinbox.width 12 - # this is tempting to add, but it's better to leave it to user's taste + # this is tempting to add, but it's better to leave it to + # user's taste. # option add *Printdialog*Menu.background snow - # returns the full qualified var name - proc myvar {varname} { - set fqvar [uplevel 1 [list namespace which -variable $varname]] - # assert var existence - if {$fqvar eq ""} { - return -code error "Wrong varname \"$varname\"" - } - return $fqvar - } - - # ttk version of [tk_optionMenu] - # var should be a full qualified varname - proc ttk_optionMenu {w var args} { - ttk::menubutton $w \ - -textvariable $var \ - -menu $w.menu - menu $w.menu - foreach option $args { - $w.menu add command \ - -label $option \ - -command [list set $var $option] - } - # return the same value as tk_optionMenu - return $w.menu - } - - # _setprintenv - # Set the print environtment - print command, and list of printers. - # Arguments: - # none. - - proc _setprintenv {} { - variable printcmd - variable optlist - - #Test for existence of lpstat command to obtain list of printers. Return error - #if not found. - - catch {exec lpstat -a} msg - set notfound "command not found" - if {[string first $notfound $msg] >= 0} { - error "Unable to obtain list of printers. Please install the CUPS package \ - for your system." - return - } - set notfound "No destinations added" - if {[string first $notfound $msg] != -1} { - error "Please check or update your CUPS installation." - return + set class [winfo class $w] + if {$class ni {Text Canvas}} { + return -code error "printing windows of class \"$class\"\ + is not supported" + } + # Should this be called with every invocaton? + # Yes. It allows dynamic discovery of newly added printers + # whithout having to restart the app + _setprintenv + + set p ._print + destroy $p + + # Copy the current values to a dialog's temporary variable. + # This allow us to cancel the dialog discarding any changes + # made to the options + namespace eval dlg {variable option} + array set dlg::option [array get option] + set var [namespace which -variable dlg::option] + + # The toplevel of our dialog + toplevel $p -class Printdialog + place [ttk::frame $p.background] -x 0 -y 0 -relwidth 1.0 -relheight 1.0 + wm title $p [mc "Print"] + wm resizable $p 0 0 + wm attributes $p -type dialog + wm transient $p [winfo toplevel $w] + + # The printer to use + set pf [ttk::frame $p.printerf] + pack $pf -side top -fill x -expand no -padx 9p -pady 9p + + ttk::label $pf.printerl -text "[mc "Printer"]" + set tv [ttk::treeview $pf.prlist -height 5 \ + -columns {printer location state} \ + -show headings \ + -selectmode browse] + $tv configure \ + -yscrollcommand [namespace code [list _scroll $pf.sy]] \ + -xscrollcommand [namespace code [list _scroll $pf.sx]] + ttk::scrollbar $pf.sy -command [list $tv yview] + ttk::scrollbar $pf.sx -command [list $tv xview] -orient horizontal + $tv heading printer -text [mc "Printer"] + $tv heading location -text [mc "Location"] + $tv heading state -text [mc "State"] + $tv column printer -width 200 -stretch 0 + $tv column location -width 100 -stretch 0 + $tv column state -width 250 -stretch 0 + + foreach printer $optlist(printer) { + set location [dict getdef $pinfo($printer) printer-location ""] + set nstate [dict getdef $pinfo($printer) printer-state 0] + set state [dict getdef $statemap $nstate ""] + switch -- $nstate { + 3 - 4 { + set accepting [dict getdef $pinfo($printer) \ + printer-is-accepting-jobs ""] + if {$accepting ne ""} { + append state ". " [mc "Printer is accepting jobs"] + } + } + 5 { + set reason [dict getdef $pinfo($printer) \ + printer-state-reasons ""] + if {$reason ne ""} { + append state ". (" $reason ")" + } + } } - - # Select print command. We prefer lpr, but will fall back to lp if - # necessary. - if {[auto_execok lpr] ne ""} { - set printcmd lpr - } else { - set printcmd lp + set id [$tv insert {} end \ + -values [list $printer $location $state]] + if {$option(printer) eq $printer} { + $tv selection set $id } + } - #Build list of printers - set printers {} - set printdata [exec lpstat -a] - foreach item [split $printdata \n] { - lappend printers [lindex [split $item] 0] - } - # filter out duplicates - set optlist(printer) [lsort -unique $printers] + grid $pf.printerl -sticky w + grid $pf.prlist $pf.sy -sticky news + grid $pf.sx -sticky ew + grid remove $pf.sy $pf.sx + bind $tv <<TreeviewSelect>> [namespace code {_onselect %W}] + + # Start of printing options + set of [ttk::labelframe $p.optionsframe -text [mc "Options"]] + pack $of -fill x -padx 9p -pady {0 9p} -ipadx 2p -ipady 2p + + # COPIES + ttk::label $of.copiesl -text "[mc "Copies"] :" + ttk::spinbox $of.copies -textvariable ${var}(copies) \ + -from 1 -to 1000 + grid $of.copiesl $of.copies -sticky ew -padx 2p -pady 2p + $of.copies state readonly + + # PAPER SIZE + ttk::label $of.medial -text "[mc "Paper"] :" + ttk_optionMenu $of.media ${var}(media) {*}$optlist(media) + grid $of.medial $of.media -sticky ew -padx 2p -pady 2p + + if {$class eq "Canvas"} { + # additional options for Canvas output + # SCALE + ttk::label $of.percentl -text "[mc "Scale"] :" + ttk::spinbox $of.percent -textvariable ${var}(czoom) \ + -from 5 -to 500 -increment 5 + grid $of.percentl $of.percent -sticky ew -padx 2p -pady 2p + $of.percent state readonly + + # ORIENT + ttk::label $of.orientl -text "[mc "Orientation"] :" + ttk_optionMenu $of.orient ${var}(orient) {*}$optlist(orient) + grid $of.orientl $of.orient -sticky ew -padx 2p -pady 2p + + # COLOR + ttk::label $of.colorl -text "[mc "Output"] :" + ttk_optionMenu $of.color ${var}(color) {*}$optlist(color) + grid $of.colorl $of.color -sticky ew -padx 2p -pady 2p + } elseif {$class eq "Text"} { + # additional options for Text output + # NUMBER-UP + ttk::label $of.nupl -text "[mc "Pages per sheet"] :" + ttk_optionMenu $of.nup ${var}(number-up) {*}$optlist(number-up) + grid $of.nupl $of.nup -sticky ew -padx 2p -pady 2p + + # TEXT SCALE + ttk::label $of.tzooml -text "[mc "Text scale"] :" + ttk::spinbox $of.tzoom -textvariable ${var}(tzoom) \ + -from 50 -to 200 -increment 5 + grid $of.tzooml $of.tzoom -sticky ew -padx 2p -pady 2p + $of.tzoom state readonly + + # PRETTY PRINT (banner on top) + ttk::checkbutton $of.pprint -onvalue 1 -offvalue 0 \ + -text [mc "Pretty print"] \ + -variable ${var}(pprint) + grid $of.pprint - -sticky ew -padx 2p -pady 2p } - # _print - # Main printer dialog. Select printer, set options, and - # fire print command. - # Arguments: - # w - widget with contents to print. - # + # The buttons frame. + set bf [ttk::frame $p.buttonf] + pack $bf -fill x -expand no -side bottom -padx 9p -pady {0 9p} - proc _print {w} { - # TODO: revise padding - variable optlist - variable sel - - # should this be called with every invocaton? - _setprintenv - if {$sel(printer) eq "" && [llength $optlist(printer)] > 0} { - set sel(printer) [lindex $optlist(printer) 0] - } - - set p ._print - catch {destroy $p} - - # copy the current values to a dialog's temorary variable - # this allow us to cancel the dialog discarding any changes - # made to the options - namespace eval dlg {variable sel} - array set dlg::sel [array get sel] - - # The toplevel of our dialog - toplevel $p -class Printdialog - place [ttk::frame $p.background] -x 0 -y 0 -relwidth 1.0 -relheight 1.0 - wm title $p [mc "Print"] - wm resizable $p 0 0 - wm attributes $p -type dialog - - # The printer to use - set pf [ttk::frame $p.printerf] - pack $pf -side top -fill x -expand no -padx 9p -pady 9p - - ttk::label $pf.printerl -text "[mc "Printer"] :" - ttk::combobox $pf.printer \ - -textvariable [myvar dlg::sel](printer) \ - -state readonly \ - -values $optlist(printer) - pack $pf.printerl -side left -padx {0 4.5p} - pack $pf.printer -side left - - # Start of printing options - set of [ttk::labelframe $p.optionsframe -text [mc "Options"]] - pack $of -fill x -padx 9p -pady {0 9p} -ipadx 2p -ipady 2p - - # COPIES - ttk::label $of.copiesl -text "[mc "Copies"] :" - ttk::spinbox $of.copies -from 1 -to 1000 \ - -textvariable [myvar dlg::sel](copies) - grid $of.copiesl $of.copies -sticky ew -padx 2p -pady 2p - - # PAPER SIZE - ttk::label $of.paperl -text "[mc "Paper"] :" - ttk_optionMenu $of.paper [myvar dlg::sel](paper) {*}$optlist(paper) - grid $of.paperl $of.paper -sticky ew -padx 2p -pady 2p - - # additional options for canvas output - if {[winfo class $w] eq "Canvas"} { - # SCALE - ttk::label $of.percentl -text "[mc "Scale"] :" - ttk_optionMenu $of.percent [myvar dlg::sel](zoom) {*}$optlist(zoom) - grid $of.percentl $of.percent -sticky ew -padx 2p -pady 2p - - # ORIENT - ttk::label $of.orientl -text "[mc "Orientation"] :" - ttk_optionMenu $of.orient [myvar dlg::sel](orient) {*}$optlist(orient) - grid $of.orientl $of.orient -sticky ew -padx 2p -pady 2p - - # COLOR - ttk::label $of.colorl -text "[mc "Output"] :" - ttk_optionMenu $of.color [myvar dlg::sel](color) {*}$optlist(color) - grid $of.colorl $of.color -sticky ew -padx 2p -pady 2p - } - - # The buttons frame. - set bf [ttk::frame $p.buttonf] - pack $bf -fill x -expand no -side bottom -padx 9p -pady {0 9p} - - ttk::button $bf.print -text [mc "Print"] \ - -command [namespace code [list _runprint $w $p]] - ttk::button $bf.cancel -text [mc "Cancel"] \ - -command [namespace code [list _cancel $p]] - pack $bf.print -side right - pack $bf.cancel -side right -padx {0 4.5p} - #Center the window as a dialog. - ::tk::PlaceWindow $p - } - - proc _cancel {p} { - namespace delete dlg - destroy $p - } - - # _runprint - - # Execute the print command--print the file. - # Arguments: - # w - widget with contents to print. - # - proc _runprint {w p} { - variable printcmd - variable sel + ttk::button $bf.print -text [mc "Print"] \ + -command [namespace code [list _runprint $w $class $p]] + ttk::button $bf.cancel -text [mc "Cancel"] \ + -command [list destroy $p] + pack $bf.print -side right + pack $bf.cancel -side right -padx {0 4.5p} - # copy the values back from the dialog - array set sel [array get dlg::sel] - namespace delete dlg + # cleanup binding + bind $bf <Destroy> [namespace code [list _cleanup $p]] - #First, generate print file. - if {[winfo class $w] eq "Text"} { - set file [makeTempFile tk_text.txt [$w get 1.0 end]] - } + # Center the window as a dialog. + ::tk::PlaceWindow $p + } - if {[winfo class $w] eq "Canvas"} { - if {$sel(color) eq [mc "RGB"]} { - set colormode color - } else { - set colormode gray - } + # _onselect + # Updates the selected printer when treeview selection changes. + # Arguments: + # tv - treeview pathname. + # + proc ::tk::print::_onselect {tv} { + variable dlg::option + set id [$tv selection] + if {$id eq ""} { + # is this even possible? + set option(printer) "" + } else { + set option(printer) [$tv set $id printer] + } + } - if {$sel(orient) eq [mc "Landscape"]} { - set willrotate "1" - } else { - set willrotate "0" - } + # _scroll + # Implements autoscroll for the printers view + # + proc ::tk::print::_scroll {sbar from to} { + if {$from == 0.0 && $to == 1.0} { + grid remove $sbar + } else { + grid $sbar + $sbar set $from $to + } + } - #Scale based on size of widget, not size of paper. - set printwidth [expr {$sel(zoom) / 100.00 * [winfo width $w]}] - set file [makeTempFile tk_canvas.ps] - $w postscript -file $file -colormode $colormode \ - -rotate $willrotate -pagewidth $printwidth - } + # _cleanup + # Perform cleanup when the dialog is destroyed. + # Arguments: + # p - print dialog pathname (not used). + # + proc ::tk::print::_cleanup {p} { + namespace delete dlg + } - #Build list of args to pass to print command. - set printargs {} - if {$printcmd eq "lpr"} { - lappend printargs -P $sel(printer) -# $sel(copies) - } else { - lappend printargs -d $sel(printer) -n $sel(copies) + # _runprint - + # Execute the print command--print the file. + # Arguments: + # w - widget with contents to print. + # class - class of the widget to print (Canvas or Text). + # p - print dialog pathname. + # + proc ::tk::print::_runprint {w class p} { + variable option + variable mcmap + + # copy the values back from the dialog + array set option [array get dlg::option] + + # get (back) name of media from the translated one + set media [dict get $mcmap(media) $option(media)] + set printargs {} + lappend printargs -title "[tk appname]: Tk window $w" + lappend printargs -copies $option(copies) + lappend printargs -media $media + + if {$class eq "Canvas"} { + set colormode [dict get $mcmap(color) $option(color)] + set rotate 0 + if {[dict get $mcmap(orient) $option(orient)] eq "landscape"} { + set rotate 1 } - - # launch the job in the background - after 0 [list exec $printcmd {*}$printargs -o PageSize=$sel(paper) $file] - destroy $p + # Scale based on size of widget, not size of paper. + # TODO: is this correct?? + set printwidth [expr { + $option(czoom) / 100.0 * [winfo width $w] + }] + set data [encoding convertto iso8859-1 [$w postscript \ + -colormode $colormode -rotate $rotate -pagewidth $printwidth]] + } elseif {$class eq "Text"} { + set tzoom [expr {$option(tzoom) / 100.0}] + if {$option(tzoom) != 100} { + lappend printargs -tzoom $tzoom + } + if {$option(pprint)} { + lappend printargs -prettyprint + } + if {$option(number-up) != 1} { + lappend printargs -nup $option(number-up) + } + # these are hardcoded. Should we allow the user to control + # margins? + lappend printargs -margins [list \ + $option(margin-top) $option(margin-left) \ + $option(margin-bottom) $option(margin-right) ] + # get the data in shape. Cupsfilter's text filter wraps lines + # at character level, not words, so we do it by ourselves. + # compute usable page width in inches + set pw [dict get {a4 8.27 legal 8.5 letter 8.5} $media] + set pw [expr { + $pw - ($option(margin-left) + $option(margin-right)) / 72.0 + }] + # set the wrap length at 98% of computed page width in chars + # the 9.8 constant is the product 10.0 (default cpi) * 0.95 + set wl [expr {int( 9.8 * $pw / $tzoom )}] + set data [encoding convertto utf-8 [_wrapLines [$w get 1.0 end] $wl]] } - # Initialize with sane defaults. - set sel(copies) 1 - set sel(paper) [mc "A4"] - set sel(orient) [mc "Portrait"] - set sel(color) [mc "RGB"] - set sel(zoom) 100 + # launch the job in the background + after idle [namespace code \ + [list cups print $option(printer) $data {*}$printargs]] + destroy $p + } + + # _wrapLines - + # wrap long lines into lines of at most length wl at word boundaries + # Arguments: + # str - string to be wrapped + # wl - wrap length + # + proc ::tk::print::_wrapLines {str wl} { + # This is a really simple algorithm: it breaks a line on space or tab + # character, collapsing them only at the breaking point. + # Leading space is left as-is. + # For a full fledged line breaking algorithm see + # Unicode® Standard Annex #14 "Unicode Line Breaking Algorithm" + set res {} + incr wl -1 + set re [format {((?:^|[^[:blank:]]).{0,%d})(?:[[:blank:]]|$)} $wl] + foreach line [split $str \n] { + lappend res {*}[lmap {_ l} [regexp -all -inline -- $re $line] { + set l + }] + } + return [join $res \n] } - #end X11 procedures +} +#end X11 procedures +namespace eval ::tk::print { #begin macOS Aqua procedures if {[tk windowingsystem] eq "aqua"} { # makePDF - diff --git a/library/scale.tcl b/library/scale.tcl index 74d6449..e2b5941 100644 --- a/library/scale.tcl +++ b/library/scale.tcl @@ -143,10 +143,10 @@ proc ::tk::ScaleButtonDown {w x y} { set coords [$w coords] set Priv(deltaX) [expr {$x - [lindex $coords 0]}] set Priv(deltaY) [expr {$y - [lindex $coords 1]}] - switch -exact -- $Priv($w,relief) { - "raised" { $w configure -sliderrelief sunken } - "ridge" { $w configure -sliderrelief groove } - } + switch -exact -- $Priv($w,relief) { + "raised" { $w configure -sliderrelief sunken } + "ridge" { $w configure -sliderrelief groove } + } } } @@ -179,8 +179,8 @@ proc ::tk::ScaleEndDrag {w} { variable ::tk::Priv set Priv(dragging) 0 if {[info exists Priv($w,relief)]} { - $w configure -sliderrelief $Priv($w,relief) - unset Priv($w,relief) + $w configure -sliderrelief $Priv($w,relief) + unset Priv($w,relief) } } @@ -209,8 +209,8 @@ proc ::tk::ScaleIncrement {w dir big repeat} { # the -command script lasts longer than -repeatdelay set clockms [clock milliseconds] if {$repeat eq "again" && - [expr {$clockms - $Priv(clockms)}] > [expr {[$w cget -repeatinterval] * 1.1}]} { - set Priv(clockms) $clockms + [expr {$clockms - $Priv(clockms)}] > [expr {[$w cget -repeatinterval] * 1.1}]} { + set Priv(clockms) $clockms set Priv(afterId) [after [$w cget -repeatinterval] \ [list tk::ScaleIncrement $w $dir $big again]] return @@ -228,20 +228,20 @@ proc ::tk::ScaleIncrement {w dir big repeat} { set inc [$w cget -resolution] } if {([$w cget -from] > [$w cget -to]) ^ ($dir eq "up")} { - if {$inc > 0} { - set inc [expr {-$inc}] - } + if {$inc > 0} { + set inc [expr {-$inc}] + } } else { - if {$inc < 0} { - set inc [expr {-$inc}] - } + if {$inc < 0} { + set inc [expr {-$inc}] + } } # this will run the -command script (if any) during the redrawing # of the scale at idle time $w set [expr {[$w get] + $inc}] if {$repeat eq "again"} { - set Priv(clockms) $clockms + set Priv(clockms) $clockms set Priv(afterId) [after [$w cget -repeatinterval] \ [list tk::ScaleIncrement $w $dir $big again]] } elseif {$repeat eq "initial"} { diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl index 9e210f6..960eb44 100644 --- a/library/scrlbar.tcl +++ b/library/scrlbar.tcl @@ -145,12 +145,12 @@ bind Scrollbar <Shift-Option-MouseWheel> { tk::ScrollByUnits %W hv %D -12.0 } bind Scrollbar <TouchpadScroll> { - lassign [tk::PreciseScrollDeltas %D] deltaX deltaY - if {$deltaX != 0 && [%W cget -orient] eq "horizontal"} { - tk::ScrollbarScrollByPixels %W h $deltaX + lassign [tk::PreciseScrollDeltas %D] tk::Priv(deltaX) tk::Priv(deltaY) + if {$tk::Priv(deltaX) != 0 && [%W cget -orient] eq "horizontal"} { + tk::ScrollbarScrollByPixels %W h $tk::Priv(deltaX) } - if {$deltaY != 0 && [%W cget -orient] eq "vertical"} { - tk::ScrollbarScrollByPixels %W v $deltaY + if {$tk::Priv(deltaY) != 0 && [%W cget -orient] eq "vertical"} { + tk::ScrollbarScrollByPixels %W v $tk::Priv(deltaY) } } @@ -477,7 +477,7 @@ proc ::tk::ScrollTopBottom {w x y} { proc ::tk::ScrollButton2Down {w x y} { variable ::tk::Priv if {![winfo exists $w]} { - return + return } set element [$w identify $x $y] if {[string match {arrow[12]} $element]} { @@ -493,8 +493,8 @@ proc ::tk::ScrollButton2Down {w x y} { update idletasks if {[winfo exists $w]} { - $w configure -activerelief sunken - $w activate slider - ScrollStartDrag $w $x $y + $w configure -activerelief sunken + $w activate slider + ScrollStartDrag $w $x $y } } diff --git a/library/spinbox.tcl b/library/spinbox.tcl index 4303141..54eb709 100644 --- a/library/spinbox.tcl +++ b/library/spinbox.tcl @@ -347,19 +347,19 @@ proc ::tk::spinbox::ArrowPress {w x y} { variable ::tk::Priv if {[$w cget -state] ne "disabled" && \ - [string match "button*" $Priv(element)]} { - $w selection element $Priv(element) - set Priv(repeated) 0 - set Priv(relief) [$w cget -$Priv(element)relief] - catch {after cancel $Priv(afterId)} - set delay [$w cget -repeatdelay] - if {$delay > 0} { - set Priv(afterId) [after $delay \ - [list ::tk::spinbox::Invoke $w $Priv(element)]] - } - if {[info exists Priv(outsideElement)]} { - unset Priv(outsideElement) - } + [string match "button*" $Priv(element)]} { + $w selection element $Priv(element) + set Priv(repeated) 0 + set Priv(relief) [$w cget -$Priv(element)relief] + catch {after cancel $Priv(afterId)} + set delay [$w cget -repeatdelay] + if {$delay > 0} { + set Priv(afterId) [after $delay \ + [list ::tk::spinbox::Invoke $w $Priv(element)]] + } + if {[info exists Priv(outsideElement)]} { + unset Priv(outsideElement) + } } } diff --git a/library/systray.tcl b/library/systray.tcl index 56cfbf9..eae3183 100644 --- a/library/systray.tcl +++ b/library/systray.tcl @@ -196,7 +196,7 @@ namespace eval ::tk::sysnotify:: { # Fade the window into view. proc _fadeIn {w} { variable defaults - if {![winfo exists $w]} {return} + if {![winfo exists $w]} {return} if {[set alpha [option get $w alpha ""]] eq ""} { set alpha [dict get $defaults alpha] } @@ -214,7 +214,7 @@ namespace eval ::tk::sysnotify:: { # Fade out and destroy window. proc _fadeOut {w} { - if {![winfo exists $w]} {return} + if {![winfo exists $w]} {return} set before [wm attributes $w -alpha] set new [expr { $before - 0.02 }] wm attributes $w -alpha $new @@ -432,16 +432,16 @@ proc ::tk::systray::_check_options {argsList singleOk} { set len [llength $argsList] while {[llength $argsList] > 0} { - set opt [lindex $argsList 0] - if {![dict exists $_options $opt]} { - tailcall return -code error -errorcode {TK SYSTRAY OPTION} \ + set opt [lindex $argsList 0] + if {![dict exists $_options $opt]} { + tailcall return -code error -errorcode {TK SYSTRAY OPTION} \ "unknown option \"$opt\": must be -image, -text, -button1 or -button3" - } - if {[llength $argsList] == 1 && !($len == 1 && $singleOk)} { - tailcall return -code error -errorcode {TK SYSTRAY OPTION} \ + } + if {[llength $argsList] == 1 && !($len == 1 && $singleOk)} { + tailcall return -code error -errorcode {TK SYSTRAY OPTION} \ "missing value for option \"$opt\"" - } - set argsList [lrange $argsList 2 end] + } + set argsList [lrange $argsList 2 end] } } @@ -479,5 +479,5 @@ proc ::tk::sysnotify::sysnotify {title message} { #Thanks to Christian Gollwitzer for the guidance here namespace ensemble configure tk -map \ [dict merge [namespace ensemble configure tk -map] \ - {systray ::tk::systray sysnotify ::tk::sysnotify::sysnotify}] + {systray ::tk::systray sysnotify ::tk::sysnotify::sysnotify}] diff --git a/library/text.tcl b/library/text.tcl index 15bdef2..2e4417c 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -469,12 +469,12 @@ bind Text <Shift-Option-MouseWheel> { tk::MouseWheel %W x [tk::ScaleNum %D] -1.2 pixels } bind Text <TouchpadScroll> { - lassign [tk::PreciseScrollDeltas %D] deltaX deltaY - if {$deltaX != 0} { - %W xview scroll [tk::ScaleNum [expr {-$deltaX}]] pixels + lassign [tk::PreciseScrollDeltas %D] tk::Priv(deltaX) tk::Priv(deltaY) + if {$tk::Priv(deltaX) != 0} { + %W xview scroll [tk::ScaleNum [expr {-$tk::Priv(deltaX)}]] pixels } - if {$deltaY != 0} { - %W yview scroll [tk::ScaleNum [expr {-$deltaY}]] pixels + if {$tk::Priv(deltaY) != 0} { + %W yview scroll [tk::ScaleNum [expr {-$tk::Priv(deltaY)}]] pixels } } @@ -498,7 +498,7 @@ proc ::tk::TextClosestGap {w x y} { # [a9cf210a42] to properly handle selecting and moving the mouse # out of the widget. if {$y < [lindex [$w dlineinfo $pos] 1] || - $x - [lindex $bbox 0] < [lindex $bbox 2]/2} { + $x - [lindex $bbox 0] < [lindex $bbox 2]/2} { return $pos } $w index "$pos + 1 char" @@ -552,14 +552,14 @@ proc ::tk::TextButton1 {w x y} { # Arguments: # w - The text window in which the button was pressed. # x - Mouse x position. -# y - Mouse y position. +# y - Mouse y position. set ::tk::Priv(textanchoruid) 0 proc ::tk::TextAnchor {w} { variable Priv if {![info exists Priv(textanchor,$w)]} { - set Priv(textanchor,$w) tk::anchor[incr Priv(textanchoruid)] + set Priv(textanchor,$w) tk::anchor[incr Priv(textanchoruid)] } return $Priv(textanchor,$w) } @@ -665,7 +665,7 @@ proc ::tk::TextKeyExtend {w index} { # # Arguments: # w - The text window. -# x, y - Position of the mouse. +# x, y - Position of the mouse. proc ::tk::TextPasteSelection {w x y} { $w mark set insert [TextClosestGap $w $x $y] @@ -759,9 +759,9 @@ proc ::tk::TextKeySelect {w new} { } $w mark set $anchorname insert } else { - if {[catch {$w index $anchorname}]} { - $w mark set $anchorname insert - } + if {[catch {$w index $anchorname}]} { + $w mark set $anchorname insert + } if {[$w compare $new < $anchorname]} { set first $new set last $anchorname @@ -904,8 +904,8 @@ proc ::tk::TextUpDownLine {w n} { "$Priv(textPosOrig) + [expr {$lines + $n}] displaylines"] set Priv(prevPos) $new if {[$w compare $new == "end display lineend"] \ - || [$w compare $new == "insert display linestart"]} { - set Priv(textPosOrig) $new + || [$w compare $new == "insert display linestart"]} { + set Priv(textPosOrig) $new } return $new } @@ -1045,8 +1045,8 @@ proc ::tk_textCopy w { proc ::tk_textCut w { if {![catch {set data [$w get sel.first sel.last]}]} { - # make <<Cut>> an atomic operation on the Undo stack, - # i.e. separate it from other delete operations on either side + # make <<Cut>> an atomic operation on the Undo stack, + # i.e. separate it from other delete operations on either side set oldSeparator [$w cget -autoseparators] if {([$w cget -state] eq "normal") && $oldSeparator} { $w edit separator @@ -1217,9 +1217,9 @@ proc ::tk::TextUndoRedoProcessMarks {w} { # 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 - } + if {[string range $mark 0 11] eq "tk::undoMark"} { + lappend undoMarks $mark + } } # transform marks into indices @@ -1248,8 +1248,8 @@ proc ::tk::TextUndoRedoProcessMarks {w} { } 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 + lappend indices [$w index $Lmark] [$w index $Rmark] + $w mark unset $Lmark $Rmark } # process ranges to: @@ -1259,36 +1259,36 @@ proc ::tk::TextUndoRedoProcessMarks {w} { 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 - } - } + 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 diff --git a/library/tk.tcl b/library/tk.tcl index 7741fd0..8bc0ca6 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -11,7 +11,7 @@ # 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 9.0b3 +package require -exact tk 9.0.1 # Create a ::tk namespace namespace eval ::tk { @@ -428,7 +428,7 @@ switch -exact -- [tk windowingsystem] { event add <<Cut>> <Control-x> <Shift-Delete> <Control-Lock-X> event add <<Copy>> <Control-c> <Control-Insert> <Control-Lock-C> event add <<Paste>> <Control-v> <Shift-Insert> <Control-Lock-V> - event add <<Undo>> <Control-z> <Control-Lock-Z> + event add <<Undo>> <Control-z> <Control-Lock-Z> event add <<Redo>> <Control-y> <Control-Lock-Y> event add <<SelectAll>> <Control-/> <Control-a> <Control-Lock-A> diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index 39d0f3e..35e4a3c 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -24,7 +24,7 @@ namespace eval ::tk::dialog::file { # Based on Vimix/16/actions/go-up.svg # See https://github.com/vinceliuice/vimix-icon-theme - set updirImageData { + variable updirImageData { <?xml version="1.0" encoding="UTF-8"?> <svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg"> <path d="m7 14v-9l-4 4-1-1 6-6 6 6-1 1-4-4v9z" fill="#000000"/> @@ -45,7 +45,7 @@ namespace eval ::tk::dialog::file { } # Based on https://icons8.com/icon/JXYalxb9XWWd/folder - set folderImageData { + variable folderImageData { <?xml version="1.0" encoding="UTF-8"?> <svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg"> <path d="m0.5 13.5v-12h4.293l2 2h8.707v10z" fill="#59afff"/> @@ -56,7 +56,7 @@ namespace eval ::tk::dialog::file { } # Based on https://icons8.com/icon/mEF_vyjYlnE3/file - set fileImageData { + variable fileImageData { <?xml version="1.0" encoding="UTF-8"?> <svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg"> <path d="m2 1h8l4 4v11h-12z" fill="#808080"/> @@ -650,7 +650,7 @@ proc ::tk::dialog::file::Update {w} { # ::tk::dialog::file::SetPathSilently -- # -# Sets data(selectPath) without invoking the trace procedure +# Sets data(selectPath) without invoking the trace procedure # proc ::tk::dialog::file::SetPathSilently {w path} { upvar ::tk::dialog::file::[winfo name $w] data diff --git a/library/ttk/altTheme.tcl b/library/ttk/altTheme.tcl index 2d1b6b9..1dfb5b2 100644 --- a/library/ttk/altTheme.tcl +++ b/library/ttk/altTheme.tcl @@ -6,12 +6,12 @@ namespace eval ttk::theme::alt { variable colors array set colors { - -frame "#d9d9d9" + -frame "#d9d9d9" -window "#ffffff" -alternate "#f0f0f0" - -darker "#c3c3c3" + -darker "#c3c3c3" -border "#414141" - -activebg "#ececec" + -activebg "#ececec" -disabledfg "#a3a3a3" -selectbg "#4a6984" -selectfg "#ffffff" @@ -21,18 +21,18 @@ namespace eval ttk::theme::alt { ttk::style theme settings alt { ttk::style configure "." \ - -background $colors(-frame) \ - -foreground black \ + -background $colors(-frame) \ + -foreground black \ -troughcolor $colors(-darker) \ -bordercolor $colors(-border) \ - -selectbackground $colors(-selectbg) \ - -selectforeground $colors(-selectfg) \ - -font TkDefaultFont + -selectbackground $colors(-selectbg) \ + -selectforeground $colors(-selectfg) \ + -font TkDefaultFont ttk::style map "." -background \ [list disabled $colors(-frame) active $colors(-activebg)] ttk::style map "." -foreground [list disabled $colors(-disabledfg)] - ttk::style map "." -embossed [list disabled 1] + ttk::style map "." -embossed [list disabled 1] ttk::style configure TButton \ -anchor center -width -11 -padding 0.75p \ @@ -49,12 +49,12 @@ namespace eval ttk::theme::alt { -indicatormargin {0 1.5p 3p 1.5p} -padding 1.5p ttk::style map TCheckbutton -indicatorcolor \ [list pressed $colors(-frame) \ - alternate $colors(-altindicator) \ - disabled $colors(-frame)] + alternate $colors(-altindicator) \ + disabled $colors(-frame)] ttk::style map TRadiobutton -indicatorcolor \ [list pressed $colors(-frame) \ - alternate $colors(-altindicator) \ - disabled $colors(-frame)] + alternate $colors(-altindicator) \ + disabled $colors(-frame)] ttk::style configure TMenubutton \ -width -11 -padding 2.25p -arrowsize 3.75p -relief raised @@ -100,7 +100,8 @@ namespace eval ttk::theme::alt { ttk::style configure Item \ -indicatormargins {1.5p 1.5p 3p 1.5p} ttk::style configure Treeview -background $colors(-window) \ - -stripedbackground $colors(-alternate) -indent 15p + -stripedbackground $colors(-alternate) -indent 15p \ + -focuswidth 1 -focuscolor $colors(-selectbg) ttk::setTreeviewRowHeight ttk::style configure Treeview.Separator \ -background $colors(-alternate) @@ -119,3 +120,34 @@ namespace eval ttk::theme::alt { -barsize 22.5p -thickness 11.25p } } + +# ttk::theme::alt::configureNotebookStyle -- +# +# Sets theme-specific option values for the ttk::notebook style $style and the +# style $style.Tab. Invoked by ::ttk::configureNotebookStyle. + +proc ttk::theme::alt::configureNotebookStyle {style} { + set tabPos [ttk::style lookup $style -tabposition {} nw] + switch -- [string index $tabPos 0] { + n { + ttk::style configure $style -tabmargins {1.5p 1.5p 0.75p 0} + ttk::style map $style.Tab -expand {selected {1.5p 1.5p 0.75p 0}} + } + s { + ttk::style configure $style -tabmargins {1.5p 0 0.75p 1.5p} + ttk::style map $style.Tab -expand {selected {1.5p 0 0.75p 1.5p}} + } + w { + ttk::style configure $style -tabmargins {1.5p 1.5p 0 0.75p} + ttk::style map $style.Tab -expand {selected {1.5p 1.5p 0 0.75p}} + } + e { + ttk::style configure $style -tabmargins {0 1.5p 1.5p 0.75p} + ttk::style map $style.Tab -expand {selected {0 1.5p 1.5p 0.75p}} + } + default { + ttk::style configure $style -tabmargins {1.5p 1.5p 0.75p 0} + ttk::style map $style.Tab -expand {selected {1.5p 1.5p 0.75p 0}} + } + } +} diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl index a631376..dfefbbd 100644 --- a/library/ttk/aquaTheme.tcl +++ b/library/ttk/aquaTheme.tcl @@ -30,8 +30,8 @@ namespace eval ttk::theme::aqua { ttk::style map TButton \ -foreground { pressed white - {alternate !pressed !background} white - disabled systemDisabledControlTextColor} + {alternate !pressed !background} white + disabled systemDisabledControlTextColor} # Menubutton ttk::style configure TMenubutton -anchor center -padding {2 0 0 2} @@ -152,7 +152,7 @@ namespace eval ttk::theme::aqua { ttk::style configure Treeview -rowheight 18 \ -background systemControlBackgroundColor \ -stripedbackground systemControlAlternatingRowColor \ - -foreground systemTextColor \ + -foreground systemTextColor \ -fieldbackground systemTextBackgroundColor ttk::style map Treeview \ -background { diff --git a/library/ttk/button.tcl b/library/ttk/button.tcl index a14a53b..541a0f2 100644 --- a/library/ttk/button.tcl +++ b/library/ttk/button.tcl @@ -18,10 +18,10 @@ namespace eval ttk::button {} -bind TButton <Enter> { %W instate !disabled {%W state active} } +bind TButton <Enter> { %W instate !disabled {%W state active} } bind TButton <Leave> { %W state !active } bind TButton <space> { ttk::button::activate %W } -bind TButton <<Invoke>> { ttk::button::activate %W } +bind TButton <<Invoke>> { ttk::button::activate %W } bind TButton <Button-1> \ { %W instate !disabled { ttk::clickToFocus %W; %W state pressed } } @@ -39,8 +39,8 @@ ttk::copyBindings TButton TRadiobutton # ...plus a few more: -bind TRadiobutton <Up> { ttk::button::RadioTraverse %W -1 } -bind TRadiobutton <Down> { ttk::button::RadioTraverse %W +1 } +bind TRadiobutton <Up> { ttk::button::RadioTraverse %W -1 } +bind TRadiobutton <Down> { ttk::button::RadioTraverse %W +1 } # bind TCheckbutton <+> { %W select } # bind TCheckbutton <minus> { %W deselect } @@ -58,7 +58,7 @@ proc ttk::button::activate {w} { } # RadioTraverse -- up/down keyboard traversal for radiobutton groups. -# Set focus to previous/next radiobutton in a group. +# Set focus to previous/next radiobutton in a group. # A radiobutton group consists of all the radiobuttons with # the same parent and -variable; this is a pretty good heuristic # that works most of the time. diff --git a/library/ttk/clamTheme.tcl b/library/ttk/clamTheme.tcl index be72290..0674b81 100644 --- a/library/ttk/clamTheme.tcl +++ b/library/ttk/clamTheme.tcl @@ -9,13 +9,13 @@ namespace eval ttk::theme::clam { variable colors array set colors { -disabledfg "#999999" - -frame "#dcdad5" - -window "#ffffff" + -frame "#dcdad5" + -window "#ffffff" -dark "#cfcdc8" - -darker "#bab5ab" + -darker "#bab5ab" -darkest "#9e9a91" -lighter "#eeebe7" - -lightest "#ffffff" + -lightest "#ffffff" -selectbg "#4a6984" -selectfg "#ffffff" -altindicator "#5895bc" @@ -115,7 +115,7 @@ namespace eval ttk::theme::clam { ttk::style configure TSpinbox -arrowsize 7.5p -padding {1.5p 0 7.5p 0} ttk::style map TSpinbox \ -background [list readonly $colors(-frame)] \ - -arrowcolor [list disabled $colors(-disabledfg)] \ + -arrowcolor [list disabled $colors(-disabledfg)] \ -bordercolor [list focus $colors(-selectbg)] ttk::style configure TNotebook.Tab -padding {4.5p 1.5p 4.5p 1.5p} @@ -138,7 +138,8 @@ namespace eval ttk::theme::clam { -background [list disabled $colors(-frame)\ selected $colors(-selectbg)] \ -foreground [list disabled $colors(-disabledfg) \ - selected $colors(-selectfg)] + selected $colors(-selectfg)] \ + -bordercolor [list focus $colors(-selectbg)] ttk::style configure TLabelframe \ -labeloutside true -labelmargins {0 0 0 3p} \ @@ -156,3 +157,34 @@ namespace eval ttk::theme::clam { ttk::style configure Sash -sashthickness 4.5p -gripsize 15p } } + +# ttk::theme::clam::configureNotebookStyle -- +# +# Sets theme-specific option values for the ttk::notebook tab style $style.Tab. +# Invoked by ::ttk::configureNotebookStyle. + +proc ttk::theme::clam::configureNotebookStyle {style} { + set tabPos [ttk::style lookup $style -tabposition {} nw] + switch -- [string index $tabPos 0] { + n { + ttk::style configure $style.Tab -padding {4.5p 1.5p 4.5p 1.5p} + ttk::style map $style.Tab -padding {selected {4.5p 3p 4.5p 1.5p}} + } + s { + ttk::style configure $style.Tab -padding {4.5p 1.5p 4.5p 1.5p} + ttk::style map $style.Tab -padding {selected {4.5p 1.5p 4.5p 3p }} + } + w { + ttk::style configure $style.Tab -padding {1.5p 4.5p 1.5p 4.5p} + ttk::style map $style.Tab -padding {selected {3p 4.5p 1.5p 4.5p}} + } + e { + ttk::style configure $style.Tab -padding {1.5p 4.5p 1.5p 4.5p} + ttk::style map $style.Tab -padding {selected {1.5p 4.5p 3p 4.5p}} + } + default { + ttk::style configure $style.Tab -padding {4.5p 1.5p 4.5p 1.5p} + ttk::style map $style.Tab -padding {selected {4.5p 3p 4.5p 1.5p}} + } + } +} diff --git a/library/ttk/classicTheme.tcl b/library/ttk/classicTheme.tcl index 7964034..b65dfac 100644 --- a/library/ttk/classicTheme.tcl +++ b/library/ttk/classicTheme.tcl @@ -123,7 +123,17 @@ namespace eval ttk::theme::classic { # # Toolbar buttons: # - ttk::style configure Toolbutton -padding 1.5p -relief flat -shiftrelief 2 + ttk::style layout Toolbutton { + Toolbutton.focus -children { + Toolbutton.border -children { + Toolbutton.padding -children { + Toolbutton.label + } + } + } + } + ttk::style configure Toolbutton -padding 1.5p -relief flat \ + -shiftrelief 2 -focussolid 1 ttk::style map Toolbutton -relief \ {disabled flat selected sunken pressed sunken active raised} ttk::style map Toolbutton -background \ diff --git a/library/ttk/combobox.tcl b/library/ttk/combobox.tcl index 1b9d4cb..b225277 100644 --- a/library/ttk/combobox.tcl +++ b/library/ttk/combobox.tcl @@ -42,13 +42,13 @@ namespace eval ttk::combobox { ttk::copyBindings TEntry TCombobox -bind TCombobox <Down> { ttk::combobox::Post %W } -bind TCombobox <Escape> { ttk::combobox::Unpost %W } +bind TCombobox <Down> { ttk::combobox::Post %W } +bind TCombobox <Escape> { ttk::combobox::Unpost %W } -bind TCombobox <Button-1> { ttk::combobox::Press "" %W %x %y } +bind TCombobox <Button-1> { ttk::combobox::Press "" %W %x %y } bind TCombobox <Shift-Button-1> { ttk::combobox::Press "s" %W %x %y } -bind TCombobox <Double-Button-1> { ttk::combobox::Press "2" %W %x %y } -bind TCombobox <Triple-Button-1> { ttk::combobox::Press "3" %W %x %y } +bind TCombobox <Double-Button-1> { ttk::combobox::Press "2" %W %x %y } +bind TCombobox <Triple-Button-1> { ttk::combobox::Press "3" %W %x %y } bind TCombobox <B1-Motion> { ttk::combobox::Drag %W %x } bind TCombobox <Motion> { ttk::combobox::Motion %W %x %y } @@ -57,13 +57,13 @@ bind TCombobox <Shift-MouseWheel> { # Ignore the event } bind TCombobox <TouchpadScroll> { - lassign [tk::PreciseScrollDeltas %D] deltaX deltaY + lassign [tk::PreciseScrollDeltas %D] tk::Priv(deltaX) tk::Priv(deltaY) # TouchpadScroll events fire about 60 times per second. - if {$deltaY != 0 && %# %% 15 == 0} { - ttk::combobox::Scroll %W [expr {$deltaY > 0 ? -1 : 1}] + if {$tk::Priv(deltaY) != 0 && %# %% 15 == 0} { + ttk::combobox::Scroll %W [expr {$tk::Priv(deltaY) > 0 ? -1 : 1}] } } -bind TCombobox <<TraverseIn>> { ttk::combobox::TraverseIn %W } +bind TCombobox <<TraverseIn>> { ttk::combobox::TraverseIn %W } ### Combobox listbox bindings. # @@ -129,9 +129,9 @@ proc ttk::combobox::Press {mode w x y} { focus $w if {$State(entryPress)} { switch -- $mode { - s { ttk::entry::Shift-Press $w $x ; # Shift } - 2 { ttk::entry::Select $w $x word ; # Double click} - 3 { ttk::entry::Select $w $x line ; # Triple click } + s { ttk::entry::Shift-Press $w $x ; # Shift } + 2 { ttk::entry::Select $w $x word ; # Double click} + 3 { ttk::entry::Select $w $x line ; # Triple click } "" - default { ttk::entry::Press $w $x } } @@ -158,7 +158,7 @@ proc ttk::combobox::Motion {w x y} { variable State ttk::saveCursor $w State(userConfCursor) [ttk::cursor text] if { [$w identify $x $y] eq "textarea" - && [$w instate {!readonly !disabled}] + && [$w instate {!readonly !disabled}] } { ttk::setCursor $w text } else { @@ -356,7 +356,7 @@ proc ttk::combobox::ConfigureListbox {cb} { set values [$cb cget -values] set current [$cb current] if {$current < 0} { - set current 0 ;# no current entry, highlight first one + set current 0 ;# no current entry, highlight first one } set Values($cb) $values $popdown.l selection clear 0 end @@ -367,10 +367,10 @@ proc ttk::combobox::ConfigureListbox {cb} { if {$height > [$cb cget -height]} { set height [$cb cget -height] grid $popdown.sb - grid configure $popdown.l -padx {1 0} + grid configure $popdown.l -padx {1 0} } else { grid remove $popdown.sb - grid configure $popdown.l -padx 1 + grid configure $popdown.l -padx 1 } $popdown.l configure -height $height } @@ -380,7 +380,7 @@ proc ttk::combobox::ConfigureAquaMenu {cb width} { set values [$cb cget -values] set current [$cb current] if {$current < 0} { - set current 0 ;# no current entry, highlight first one + set current 0 ;# no current entry, highlight first one } $cb.popdown.menu delete 0 end $cb.spacer configure -width [expr {$width - 40}] -height 1 @@ -444,7 +444,7 @@ proc ttk::combobox::AquaPlacePopdown {cb popdown} { set style [$cb cget -style] set postoffset [ttk::style lookup $style -postoffset {} {0 0 0 0}] foreach var {x y w h} delta $postoffset { - incr $var $delta + incr $var $delta } wm geometry $popdown ${w}x${h}+${x}+${y} return [list $x $y $w $h] diff --git a/library/ttk/cursors.tcl b/library/ttk/cursors.tcl index 9d1e1ae..f185276 100644 --- a/library/ttk/cursors.tcl +++ b/library/ttk/cursors.tcl @@ -47,19 +47,19 @@ namespace eval ttk { none none standard left_ptr - text xterm + text xterm link hand2 crosshair crosshair busy watch forbidden pirate - hresize sb_h_double_arrow - vresize sb_v_double_arrow + hresize sb_h_double_arrow + vresize sb_v_double_arrow - nresize top_side - sresize bottom_side - wresize left_side - eresize right_side + nresize top_side + sresize bottom_side + wresize left_side + eresize right_side nwresize top_left_corner neresize top_right_corner swresize bottom_left_corner @@ -82,13 +82,13 @@ namespace eval ttk { busy wait forbidden no - vresize size_ns - nresize size_ns + vresize size_ns + nresize size_ns sresize size_ns wresize size_we eresize size_we - hresize size_we + hresize size_we nwresize size_nw_se swresize size_ne_sw @@ -101,18 +101,18 @@ namespace eval ttk { "aqua" { array set Cursors { standard arrow - text ibeam - link pointinghand + text ibeam + link pointinghand crosshair crosshair - busy watch + busy watch forbidden notallowed - hresize resizeleftright - vresize resizeupdown - nresize resizeup - sresize resizedown - wresize resizeleft - eresize resizeright + hresize resizeleftright + vresize resizeupdown + nresize resizeup + sresize resizedown + wresize resizeleft + eresize resizeright } } } @@ -138,12 +138,12 @@ proc ttk::cursor {name} { proc ttk::setCursor {w name} { variable Cursors if {[info exists Cursors($name)]} { - set cursorname $Cursors($name) + set cursorname $Cursors($name) } else { - set cursorname $name + set cursorname $name } if {[$w cget -cursor] ne $cursorname} { - $w configure -cursor $cursorname + $w configure -cursor $cursorname } } @@ -157,10 +157,10 @@ proc ttk::setCursor {w name} { proc ttk::saveCursor {w saveVar excludeList} { upvar $saveVar sv if {![info exists sv]} { - set sv [$w cget -cursor] + set sv [$w cget -cursor] } if {[$w cget -cursor] ni $excludeList} { - set sv [$w cget -cursor] + set sv [$w cget -cursor] } } diff --git a/library/ttk/defaults.tcl b/library/ttk/defaults.tcl index 226bd39..3f6320e 100644 --- a/library/ttk/defaults.tcl +++ b/library/ttk/defaults.tcl @@ -10,11 +10,11 @@ namespace eval ttk::theme::default { -foreground "#000000" -window "#ffffff" -alternate "#e8e8e8" - -text "#000000" + -text "#000000" -activebg "#ececec" -selectbg "#4a6984" -selectfg "#ffffff" - -darker "#c3c3c3" + -darker "#c3c3c3" -disabledfg "#a3a3a3" -indicator "#4a6984" -disabledindicator "#a3a3a3" @@ -85,14 +85,14 @@ proc ttk::theme::default::reconfigureDefaultTheme {} { ttk::style theme settings default { ttk::style configure "." \ - -borderwidth 1 \ - -background $colors(-frame) \ - -foreground $colors(-foreground) \ - -troughcolor $colors(-darker) \ - -font TkDefaultFont \ + -borderwidth 1 \ + -background $colors(-frame) \ + -foreground $colors(-foreground) \ + -troughcolor $colors(-darker) \ + -font TkDefaultFont \ -selectbackground $colors(-selectbg) \ -selectforeground $colors(-selectfg) \ - -insertwidth 1 \ + -insertwidth 1 \ -insertcolor $colors(-foreground) \ -focuscolor $colors(-text) @@ -189,7 +189,8 @@ proc ttk::theme::default::reconfigureDefaultTheme {} { -stripedbackground $colors(-alternate) \ -fieldbackground $colors(-window) \ -foreground $colors(-text) \ - -indent 15p + -indent 15p \ + -focuswidth 1 -focuscolor $colors(-selectbg) ttk::setTreeviewRowHeight ttk::style configure Treeview.Separator \ -background $colors(-alternate) @@ -203,7 +204,7 @@ proc ttk::theme::default::reconfigureDefaultTheme {} { ttk::style layout ComboboxPopdownFrame { ComboboxPopdownFrame.border -sticky nswe } - ttk::style configure ComboboxPopdownFrame \ + ttk::style configure ComboboxPopdownFrame \ -borderwidth 1 -relief solid # @@ -211,12 +212,13 @@ proc ttk::theme::default::reconfigureDefaultTheme {} { # ttk::style layout Toolbutton { Toolbutton.border -children { - Toolbutton.padding -children { - Toolbutton.label + Toolbutton.focus -children { + Toolbutton.padding -children { + Toolbutton.label + } } } } - ttk::style configure Toolbutton \ -padding 1.5p -relief flat ttk::style map Toolbutton -relief \ diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl index 3d2ef90..813ae91 100644 --- a/library/ttk/entry.tcl +++ b/library/ttk/entry.tcl @@ -60,21 +60,21 @@ option add *TEntry.cursor [ttk::cursor text] widgetDefault ## Clipboard events: # -bind TEntry <<Cut>> { ttk::entry::Cut %W } -bind TEntry <<Copy>> { ttk::entry::Copy %W } -bind TEntry <<Paste>> { ttk::entry::Paste %W } -bind TEntry <<Clear>> { ttk::entry::Clear %W } +bind TEntry <<Cut>> { ttk::entry::Cut %W } +bind TEntry <<Copy>> { ttk::entry::Copy %W } +bind TEntry <<Paste>> { ttk::entry::Paste %W } +bind TEntry <<Clear>> { ttk::entry::Clear %W } ## Button1 bindings: # Used for selection and navigation. # -bind TEntry <Button-1> { ttk::entry::Press %W %x } +bind TEntry <Button-1> { ttk::entry::Press %W %x } bind TEntry <Shift-Button-1> { ttk::entry::Shift-Press %W %x } -bind TEntry <Double-Button-1> { ttk::entry::Select %W %x word } -bind TEntry <Triple-Button-1> { ttk::entry::Select %W %x line } +bind TEntry <Double-Button-1> { ttk::entry::Select %W %x word } +bind TEntry <Triple-Button-1> { ttk::entry::Select %W %x line } bind TEntry <B1-Motion> { ttk::entry::Drag %W %x } -bind TEntry <B1-Leave> { ttk::entry::DragOut %W %m } +bind TEntry <B1-Leave> { ttk::entry::DragOut %W %m } bind TEntry <B1-Enter> { ttk::entry::DragIn %W } bind TEntry <ButtonRelease-1> { ttk::entry::Release %W } @@ -87,37 +87,37 @@ bind TEntry <<ToggleSelection>> { # Note: ButtonRelease-2 # is mapped to <<PasteSelection>> in tk.tcl. # -bind TEntry <Button-2> { ttk::entry::ScanMark %W %x } -bind TEntry <B2-Motion> { ttk::entry::ScanDrag %W %x } +bind TEntry <Button-2> { ttk::entry::ScanMark %W %x } +bind TEntry <B2-Motion> { ttk::entry::ScanDrag %W %x } bind TEntry <ButtonRelease-2> { ttk::entry::ScanRelease %W %x } bind TEntry <<PasteSelection>> { ttk::entry::ScanRelease %W %x } ## Keyboard navigation bindings: # bind TEntry <<PrevChar>> { ttk::entry::Move %W prevchar } -bind TEntry <<NextChar>> { ttk::entry::Move %W nextchar } +bind TEntry <<NextChar>> { ttk::entry::Move %W nextchar } bind TEntry <<PrevWord>> { ttk::entry::Move %W prevword } bind TEntry <<NextWord>> { ttk::entry::Move %W nextword } bind TEntry <<LineStart>> { ttk::entry::Move %W home } bind TEntry <<LineEnd>> { ttk::entry::Move %W end } -bind TEntry <<SelectPrevChar>> { ttk::entry::Extend %W prevchar } +bind TEntry <<SelectPrevChar>> { ttk::entry::Extend %W prevchar } bind TEntry <<SelectNextChar>> { ttk::entry::Extend %W nextchar } bind TEntry <<SelectPrevWord>> { ttk::entry::Extend %W prevword } bind TEntry <<SelectNextWord>> { ttk::entry::Extend %W selectnextword } bind TEntry <<SelectLineStart>> { ttk::entry::Extend %W home } bind TEntry <<SelectLineEnd>> { ttk::entry::Extend %W end } -bind TEntry <<SelectAll>> { %W selection range 0 end } -bind TEntry <<SelectNone>> { %W selection clear } +bind TEntry <<SelectAll>> { %W selection range 0 end } +bind TEntry <<SelectNone>> { %W selection clear } -bind TEntry <<TraverseIn>> { %W selection range 0 end; %W icursor end } +bind TEntry <<TraverseIn>> { %W selection range 0 end; %W icursor end } ## Edit bindings: # -bind TEntry <Key> { ttk::entry::Insert %W %A } +bind TEntry <Key> { ttk::entry::Insert %W %A } bind TEntry <Delete> { ttk::entry::Delete %W } -bind TEntry <BackSpace> { ttk::entry::Backspace %W } +bind TEntry <BackSpace> { ttk::entry::Backspace %W } # Ignore all Alt, Meta, Control, Command, and Fn keypresses unless explicitly bound. # Otherwise, the <Key> class binding will fire and insert the character. @@ -125,11 +125,11 @@ bind TEntry <BackSpace> { ttk::entry::Backspace %W } # bind TEntry <Alt-Key> {# nothing} bind TEntry <Meta-Key> {# nothing} -bind TEntry <Control-Key> {# nothing} -bind TEntry <Escape> {# nothing} -bind TEntry <Return> {# nothing} -bind TEntry <KP_Enter> {# nothing} -bind TEntry <Tab> {# nothing} +bind TEntry <Control-Key> {# nothing} +bind TEntry <Escape> {# nothing} +bind TEntry <Return> {# nothing} +bind TEntry <KP_Enter> {# nothing} +bind TEntry <Tab> {# nothing} bind TEntry <Command-Key> {# nothing} bind TEntry <Fn-Key> {# nothing} @@ -227,7 +227,7 @@ proc ttk::entry::Cut {w} { # ## ClosestGap -- Find closest boundary between characters. -# Returns the index of the character just after the boundary. +# Returns the index of the character just after the boundary. # proc ttk::entry::ClosestGap {w x} { set pos [$w index @$x] @@ -323,7 +323,7 @@ proc ttk::entry::PrevChar {w start} { proc ttk::entry::RelIndex {w where {index insert}} { switch -- $where { prevchar { PrevChar $w $index } - nextchar { NextChar $w $index } + nextchar { NextChar $w $index } prevword { PrevWord $w $index } nextword { NextWord $w $index } selectnextword { SelectNextWord $w $index } @@ -485,7 +485,7 @@ proc ttk::entry::DragOut {w mode} { } ## <B1-Enter> binding -# Suspend autoscroll. +# Suspend autoscroll. # proc ttk::entry::DragIn {w} { ttk::CancelRepeat @@ -496,7 +496,7 @@ proc ttk::entry::DragIn {w} { proc ttk::entry::Release {w} { variable State set State(selectMode) none - ttk::CancelRepeat ;# suspend autoscroll + ttk::CancelRepeat ;# suspend autoscroll } ## AutoScroll diff --git a/library/ttk/fonts.tcl b/library/ttk/fonts.tcl index 5138c89..4c4c207 100644 --- a/library/ttk/fonts.tcl +++ b/library/ttk/fonts.tcl @@ -20,7 +20,7 @@ # # Windows: # The default system font changed from "MS Sans Serif" to "Tahoma" -# in Windows XP/Windows 2000. +# in Windows XP/Windows 2000. # # MS documentation says to use "Tahoma 8" in Windows 2000/XP, # although many MS programs still use "MS Sans Serif 8" @@ -67,20 +67,20 @@ if {!$tip145} {apply {{} { global tcl_platform switch -- [tk windowingsystem] { win32 { - # In safe interps there is no osVersion element. + # In safe interps there is no osVersion element. if {[info exists tcl_platform(osVersion)]} { - if {$tcl_platform(osVersion) >= 5.0} { - set family "Tahoma" - } else { - set family "MS Sans Serif" - } - } else { - if {[lsearch -exact [font families] Tahoma] >= 0} { - set family "Tahoma" - } else { - set family "MS Sans Serif" - } - } + if {$tcl_platform(osVersion) >= 5.0} { + set family "Tahoma" + } else { + set family "MS Sans Serif" + } + } else { + if {[lsearch -exact [font families] Tahoma] >= 0} { + set family "Tahoma" + } else { + set family "MS Sans Serif" + } + } set size 8 font configure TkDefaultFont -family $family -size $size diff --git a/library/ttk/menubutton.tcl b/library/ttk/menubutton.tcl index 8ef8937..10bbe5a 100644 --- a/library/ttk/menubutton.tcl +++ b/library/ttk/menubutton.tcl @@ -47,12 +47,12 @@ namespace eval ttk { bind TMenubutton <Enter> { %W instate !disabled {%W state active } } bind TMenubutton <Leave> { %W state !active } bind TMenubutton <space> { ttk::menubutton::Popdown %W } -bind TMenubutton <<Invoke>> { ttk::menubutton::Popdown %W } +bind TMenubutton <<Invoke>> { ttk::menubutton::Popdown %W } if {[tk windowingsystem] eq "x11"} { - bind TMenubutton <Button-1> { ttk::menubutton::Pulldown %W } + bind TMenubutton <Button-1> { ttk::menubutton::Pulldown %W } bind TMenubutton <ButtonRelease-1> { ttk::menubutton::TransferGrab %W } - bind TMenubutton <B1-Leave> { ttk::menubutton::TransferGrab %W } + bind TMenubutton <B1-Leave> { ttk::menubutton::TransferGrab %W } } else { bind TMenubutton <Button-1> \ { %W state pressed ; ttk::menubutton::Popdown %W } @@ -138,7 +138,7 @@ if {[tk windowingsystem] eq "aqua"} { # if we go offscreen to the top, show as 'below' if {$y < [winfo vrooty $mb]} { set y [expr {[winfo vrooty $mb] + [winfo rooty $mb]\ - + [winfo reqheight $mb]}] + + [winfo reqheight $mb]}] } } below { diff --git a/library/ttk/notebook.tcl b/library/ttk/notebook.tcl index 1d59d1e..fedb1be 100644 --- a/library/ttk/notebook.tcl +++ b/library/ttk/notebook.tcl @@ -170,7 +170,7 @@ proc ttk::notebook::enableTraversal {nb} { # bind $top <Control-Next> {+ttk::notebook::TLCycleTab %W 1} bind $top <Control-Prior> {+ttk::notebook::TLCycleTab %W -1} - bind $top <Control-Tab> {+ttk::notebook::TLCycleTab %W 1} + bind $top <Control-Tab> {+ttk::notebook::TLCycleTab %W 1} bind $top <Control-Shift-Tab> {+ttk::notebook::TLCycleTab %W -1} catch { bind $top <Control-ISO_Left_Tab> {+ttk::notebook::TLCycleTab %W -1} @@ -199,7 +199,7 @@ proc ttk::notebook::Cleanup {nb} { 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] + set TLNotebooks($top) [lreplace $TLNotebooks($top) $index $index] } } diff --git a/library/ttk/panedwindow.tcl b/library/ttk/panedwindow.tcl index d5e25cd..131c07c 100644 --- a/library/ttk/panedwindow.tcl +++ b/library/ttk/panedwindow.tcl @@ -8,20 +8,20 @@ namespace eval ttk::panedwindow { pressed 0 pressX - pressY - - sash - + sash - sashPos - } } ## Bindings: # -bind TPanedwindow <Button-1> { ttk::panedwindow::Press %W %x %y } +bind TPanedwindow <Button-1> { ttk::panedwindow::Press %W %x %y } bind TPanedwindow <B1-Motion> { ttk::panedwindow::Drag %W %x %y } -bind TPanedwindow <ButtonRelease-1> { ttk::panedwindow::Release %W %x %y } +bind TPanedwindow <ButtonRelease-1> { ttk::panedwindow::Release %W %x %y } -bind TPanedwindow <Motion> { ttk::panedwindow::SetCursor %W %x %y } -bind TPanedwindow <Enter> { ttk::panedwindow::SetCursor %W %x %y } -bind TPanedwindow <Leave> { ttk::panedwindow::ResetCursor %W } +bind TPanedwindow <Motion> { ttk::panedwindow::SetCursor %W %x %y } +bind TPanedwindow <Enter> { ttk::panedwindow::SetCursor %W %x %y } +bind TPanedwindow <Leave> { ttk::panedwindow::ResetCursor %W } ## Sash movement: # @@ -33,10 +33,10 @@ proc ttk::panedwindow::Press {w x y} { set State(pressed) 0 return } - set State(pressed) 1 - set State(pressX) $x - set State(pressY) $y - set State(sash) $sash + set State(pressed) 1 + set State(pressX) $x + set State(pressY) $y + set State(sash) $sash set State(sashPos) [$w sashpos $sash] } @@ -44,8 +44,8 @@ proc ttk::panedwindow::Drag {w x y} { variable State if {!$State(pressed)} { return } switch -glob -- [$w cget -orient] { - h* { set delta [expr {$x - $State(pressX)}] } - v* { set delta [expr {$y - $State(pressY)}] } + h* { set delta [expr {$x - $State(pressX)}] } + v* { set delta [expr {$y - $State(pressY)}] } } $w sashpos $State(sash) [expr {$State(sashPos) + $delta}] } @@ -62,7 +62,7 @@ proc ttk::panedwindow::ResetCursor {w} { variable State ttk::saveCursor $w State(userConfCursor) \ - [list [ttk::cursor hresize] [ttk::cursor vresize]] + [list [ttk::cursor hresize] [ttk::cursor vresize]] if {!$State(pressed)} { ttk::setCursor $w $State(userConfCursor) @@ -73,7 +73,7 @@ proc ttk::panedwindow::SetCursor {w x y} { variable State ttk::saveCursor $w State(userConfCursor) \ - [list [ttk::cursor hresize] [ttk::cursor vresize]] + [list [ttk::cursor hresize] [ttk::cursor vresize]] set cursor $State(userConfCursor) if {[llength [$w identify $x $y]]} { diff --git a/library/ttk/scale.tcl b/library/ttk/scale.tcl index a97440d..1b6882a 100644 --- a/library/ttk/scale.tcl +++ b/library/ttk/scale.tcl @@ -41,14 +41,14 @@ proc ttk::scale::Press {w x y} { switch -glob -- [$w identify $x $y] { *track - - *trough { - set inc [expr {([$w get $x $y] <= [$w get]) ^ ([$w cget -from] > [$w cget -to]) ? -1 : 1}] - ttk::Repeatedly Increment $w $inc - } - *slider { - set State(dragging) 1 - set State(initial) [$w get] - } + *trough { + set inc [expr {([$w get $x $y] <= [$w get]) ^ ([$w cget -from] > [$w cget -to]) ? -1 : 1}] + ttk::Repeatedly Increment $w $inc + } + *slider { + set State(dragging) 1 + set State(initial) [$w get] + } } } @@ -61,14 +61,14 @@ proc ttk::scale::Jump {w x y} { switch -glob -- [$w identify $x $y] { *track - - *trough { - $w set [$w get $x $y] - set State(dragging) 1 - set State(initial) [$w get] - } - *slider { - Press $w $x $y - } + *trough { + $w set [$w get $x $y] + set State(dragging) 1 + set State(initial) [$w get] + } + *slider { + Press $w $x $y + } } } diff --git a/library/ttk/scrollbar.tcl b/library/ttk/scrollbar.tcl index 7c31511..1a73fd7 100644 --- a/library/ttk/scrollbar.tcl +++ b/library/ttk/scrollbar.tcl @@ -9,11 +9,11 @@ namespace eval ttk::scrollbar { # State(first) -- value of -first at start of drag. } -bind TScrollbar <Button-1> { ttk::scrollbar::Press %W %x %y } +bind TScrollbar <Button-1> { ttk::scrollbar::Press %W %x %y } bind TScrollbar <B1-Motion> { ttk::scrollbar::Drag %W %x %y } bind TScrollbar <ButtonRelease-1> { ttk::scrollbar::Release %W %x %y } -bind TScrollbar <Button-2> { ttk::scrollbar::Jump %W %x %y } +bind TScrollbar <Button-2> { ttk::scrollbar::Jump %W %x %y } bind TScrollbar <B2-Motion> { ttk::scrollbar::Drag %W %x %y } bind TScrollbar <ButtonRelease-2> { ttk::scrollbar::Release %W %x %y } @@ -97,7 +97,7 @@ proc ttk::scrollbar::Release {w x y} { } # scrollbar::Jump -- Button-2 binding for scrollbars. -# Behaves exactly like scrollbar::Press, except that +# Behaves exactly like scrollbar::Press, except that # clicking in the trough jumps to the the selected position. # proc ttk::scrollbar::Jump {w x y} { diff --git a/library/ttk/sizegrip.tcl b/library/ttk/sizegrip.tcl index 2a49451..a4a596b 100644 --- a/library/ttk/sizegrip.tcl +++ b/library/ttk/sizegrip.tcl @@ -19,22 +19,22 @@ switch -- [tk windowingsystem] { namespace eval ttk::sizegrip { variable State array set State { - pressed 0 - pressX 0 - pressY 0 - width 0 - height 0 + pressed 0 + pressX 0 + pressY 0 + width 0 + height 0 widthInc 1 heightInc 1 - resizeX 1 - resizeY 1 - toplevel {} + resizeX 1 + resizeY 1 + toplevel {} } } -bind TSizegrip <Button-1> { ttk::sizegrip::Press %W %X %Y } -bind TSizegrip <B1-Motion> { ttk::sizegrip::Drag %W %X %Y } -bind TSizegrip <ButtonRelease-1> { ttk::sizegrip::Release %W %X %Y } +bind TSizegrip <Button-1> { ttk::sizegrip::Press %W %X %Y } +bind TSizegrip <B1-Motion> { ttk::sizegrip::Drag %W %X %Y } +bind TSizegrip <ButtonRelease-1> { ttk::sizegrip::Release %W %X %Y } proc ttk::sizegrip::Press {W X Y} { variable State @@ -46,7 +46,7 @@ proc ttk::sizegrip::Press {W X Y} { # If the toplevel is not resizable then bail foreach {State(resizeX) State(resizeY)} [wm resizable $top] break if {!$State(resizeX) && !$State(resizeY)} { - return + return } # Sanity-checks: @@ -83,10 +83,10 @@ proc ttk::sizegrip::Drag {W X Y} { set w $State(width) set h $State(height) if {$State(resizeX)} { - set w [expr {$w + ($X - $State(pressX))/$State(widthInc)}] + set w [expr {$w + ($X - $State(pressX))/$State(widthInc)}] } if {$State(resizeY)} { - set h [expr {$h + ($Y - $State(pressY))/$State(heightInc)}] + set h [expr {$h + ($Y - $State(pressY))/$State(heightInc)}] } if {$w <= 0} { set w 1 } if {$h <= 0} { set h 1 } diff --git a/library/ttk/spinbox.tcl b/library/ttk/spinbox.tcl index 96d8acf..f8d0d31 100644 --- a/library/ttk/spinbox.tcl +++ b/library/ttk/spinbox.tcl @@ -12,26 +12,26 @@ namespace eval ttk::spinbox { } ttk::copyBindings TEntry TSpinbox bind TSpinbox <Motion> { ttk::spinbox::Motion %W %x %y } -bind TSpinbox <Button-1> { ttk::spinbox::Press %W %x %y } -bind TSpinbox <ButtonRelease-1> { ttk::spinbox::Release %W } -bind TSpinbox <Double-Button-1> { ttk::spinbox::DoubleClick %W %x %y } -bind TSpinbox <Triple-Button-1> {} ;# disable TEntry triple-click +bind TSpinbox <Button-1> { ttk::spinbox::Press %W %x %y } +bind TSpinbox <ButtonRelease-1> { ttk::spinbox::Release %W } +bind TSpinbox <Double-Button-1> { ttk::spinbox::DoubleClick %W %x %y } +bind TSpinbox <Triple-Button-1> {} ;# disable TEntry triple-click bind TSpinbox <Up> { event generate %W <<Increment>> } -bind TSpinbox <Down> { event generate %W <<Decrement>> } +bind TSpinbox <Down> { event generate %W <<Decrement>> } bind TSpinbox <<Increment>> { ttk::spinbox::Spin %W +1 } -bind TSpinbox <<Decrement>> { ttk::spinbox::Spin %W -1 } +bind TSpinbox <<Decrement>> { ttk::spinbox::Spin %W -1 } -ttk::bindMouseWheel TSpinbox { ttk::spinbox::Spin %W } +ttk::bindMouseWheel TSpinbox { ttk::spinbox::Spin %W } bind TSpinbox <Shift-MouseWheel> { # Ignore the event } bind TSpinbox <TouchpadScroll> { - lassign [tk::PreciseScrollDeltas %D] deltaX deltaY + lassign [tk::PreciseScrollDeltas %D] tk::Priv(deltaX) tk::Priv(deltaY) # TouchpadScroll events fire about 60 times per second. - if {$deltaY != 0 && %# %% 12 == 0} { - ttk::spinbox::Spin %W [expr {$deltaY > 0 ? -1 : 1}] + if {$tk::Priv(deltaY) != 0 && %# %% 12 == 0} { + ttk::spinbox::Spin %W [expr {$tk::Priv(deltaY) > 0 ? -1 : 1}] } } @@ -58,7 +58,7 @@ proc ttk::spinbox::Press {w x y} { switch -glob -- [$w identify $x $y] { *textarea { ttk::entry::Press $w $x } *rightarrow - - *uparrow { ttk::Repeatedly event generate $w <<Increment>> } + *uparrow { ttk::Repeatedly event generate $w <<Increment>> } *leftarrow - *downarrow { ttk::Repeatedly event generate $w <<Decrement>> } *spinbutton { @@ -90,7 +90,7 @@ proc ttk::spinbox::Release {w} { ## MouseWheel -- # Mousewheel callback. Turn these into <<Increment>> (-1, up) -# or <<Decrement> (+1, down) events. Not used any more. +# or <<Decrement> (+1, down) events. Not used any more. # proc ttk::spinbox::MouseWheel {w dir {factor 1.0}} { if {[$w instate disabled]} { return } diff --git a/library/ttk/treeview.tcl b/library/ttk/treeview.tcl index e9fc5ad..5b95054 100644 --- a/library/ttk/treeview.tcl +++ b/library/ttk/treeview.tcl @@ -7,19 +7,19 @@ namespace eval ttk::treeview { # Enter/Leave/Motion # - set State(activeWidget) {} - set State(activeHeading) {} + set State(activeWidget) {} + set State(activeHeading) {} # Press/drag/release: # - set State(pressMode) none + set State(pressMode) none set State(pressX) 0 # For pressMode == "resize" set State(resizeColumn) #0 # For pressmode == "heading" - set State(heading) {} + set State(heading) {} set State(cellAnchor) {} set State(cellAnchorOp) "set" @@ -28,19 +28,19 @@ namespace eval ttk::treeview { ### Widget bindings. # -bind Treeview <Motion> { ttk::treeview::Motion %W %x %y } +bind Treeview <Motion> { ttk::treeview::Motion %W %x %y } bind Treeview <B1-Leave> { #nothing } bind Treeview <Leave> { ttk::treeview::ActivateHeading {} {}} -bind Treeview <Button-1> { ttk::treeview::Press %W %x %y } -bind Treeview <Double-Button-1> { ttk::treeview::DoubleClick %W %x %y } -bind Treeview <ButtonRelease-1> { ttk::treeview::Release %W %x %y } -bind Treeview <B1-Motion> { ttk::treeview::Drag %W %x %y } -bind Treeview <Up> { ttk::treeview::Keynav %W up } -bind Treeview <Down> { ttk::treeview::Keynav %W down } -bind Treeview <Right> { ttk::treeview::Keynav %W right } -bind Treeview <Left> { ttk::treeview::Keynav %W left } +bind Treeview <Button-1> { ttk::treeview::Press %W %x %y } +bind Treeview <Double-Button-1> { ttk::treeview::DoubleClick %W %x %y } +bind Treeview <ButtonRelease-1> { ttk::treeview::Release %W %x %y } +bind Treeview <B1-Motion> { ttk::treeview::Drag %W %x %y } +bind Treeview <Up> { ttk::treeview::Keynav %W up } +bind Treeview <Down> { ttk::treeview::Keynav %W down } +bind Treeview <Right> { ttk::treeview::Keynav %W right } +bind Treeview <Left> { ttk::treeview::Keynav %W left } bind Treeview <Prior> { %W yview scroll -1 pages } -bind Treeview <Next> { %W yview scroll 1 pages } +bind Treeview <Next> { %W yview scroll 1 pages } bind Treeview <Return> { ttk::treeview::ToggleFocus %W } bind Treeview <space> { ttk::treeview::ToggleFocus %W } @@ -66,17 +66,17 @@ proc ttk::treeview::Keynav {w dir} { set cells [expr {[$w cget -selecttype] eq "cell"}] if {$cells} { - lassign $State(cellAnchor) _ colAnchor - # Just in case, give it a valid value - if {$colAnchor eq ""} { - set colAnchor "#1" - } + lassign $State(cellAnchor) _ colAnchor + # Just in case, give it a valid value + if {$colAnchor eq ""} { + set colAnchor "#1" + } } switch -- $dir { up { if {[set up [$w prev $focus]] eq ""} { - set focus [$w parent $focus] + set focus [$w parent $focus] } else { while {[$w item $up -open] && [llength [$w children $up]]} { set up [lindex [$w children $up] end] @@ -86,7 +86,7 @@ proc ttk::treeview::Keynav {w dir} { } down { if {[$w item $focus -open] && [llength [$w children $focus]]} { - set focus [lindex [$w children $focus] 0] + set focus [lindex [$w children $focus] 0] } else { set up $focus while {$up ne "" && [set down [$w next $up]] eq ""} { @@ -96,46 +96,46 @@ proc ttk::treeview::Keynav {w dir} { } } left { - if {$cells} { - # This assumes that colAnchor is of the "#N" format. - set colNo [string range $colAnchor 1 end] - set firstCol [expr {"tree" ni [$w cget -show]}] - if {$colNo > $firstCol} { - incr colNo -1 - set colAnchor "#$colNo" - } - } elseif {[$w item $focus -open] && [llength [$w children $focus]]} { + if {$cells} { + # This assumes that colAnchor is of the "#N" format. + set colNo [string range $colAnchor 1 end] + set firstCol [expr {"tree" ni [$w cget -show]}] + if {$colNo > $firstCol} { + incr colNo -1 + set colAnchor "#$colNo" + } + } elseif {[$w item $focus -open] && [llength [$w children $focus]]} { CloseItem $w $focus } else { set focus [$w parent $focus] } } right { - if {$cells} { - set colNo [string range $colAnchor 1 end] - set dispCol [$w cget -displaycolumns] - if {$dispCol eq "#all"} { - set lastCol [llength [$w cget -columns]] - } else { - set lastCol [llength $dispCol] - } - if {$colNo < ($lastCol - 1)} { - incr colNo - set colAnchor "#$colNo" - } - } else { - OpenItem $w $focus - } + if {$cells} { + set colNo [string range $colAnchor 1 end] + set dispCol [$w cget -displaycolumns] + if {$dispCol eq "#all"} { + set lastCol [llength [$w cget -columns]] + } else { + set lastCol [llength $dispCol] + } + if {$colNo < ($lastCol - 1)} { + incr colNo + set colAnchor "#$colNo" + } + } else { + OpenItem $w $focus + } } } if {$focus != {}} { - if {$cells} { - set cell [list $focus $colAnchor] - SelectOp $w $focus $cell choose - } else { - SelectOp $w $focus "" choose - } + if {$cells} { + set cell [list $focus $colAnchor] + SelectOp $w $focus $cell choose + } else { + SelectOp $w $focus "" choose + } } } @@ -192,9 +192,9 @@ proc ttk::treeview::ActivateHeading {w heading} { proc ttk::treeview::IdentifyCell {w x y} { set cell {} if {[$w cget -selecttype] eq "cell"} { - # Later handling assumes that the column in the cell ID is of the - # format #N, which is always the case from "identify cell" - set cell [$w identify cell $x $y] + # Later handling assumes that the column in the cell ID is of the + # format #N, which is always the case from "identify cell" + set cell [$w identify cell $x $y] } return $cell } @@ -205,7 +205,7 @@ proc ttk::treeview::IdentifyCell {w x y} { # proc ttk::treeview::Select {w x y op} { if {[set item [$w identify row $x $y]] ne "" } { - set cell [IdentifyCell $w $x $y] + set cell [IdentifyCell $w $x $y] SelectOp $w $item $cell $op } } @@ -231,7 +231,7 @@ proc ttk::treeview::Press {w x y} { tree - cell { set item [$w identify item $x $y] - set cell [IdentifyCell $w $x $y] + set cell [IdentifyCell $w $x $y] SelectOp $w $item $cell choose switch -glob -- [$w identify element $x $y] { @@ -293,7 +293,7 @@ proc ttk::treeview::heading.press {w x y} { proc ttk::treeview::heading.drag {w x y} { variable State if { [$w identify region $x $y] eq "heading" - && [$w identify column $x $y] eq $State(heading) + && [$w identify column $x $y] eq $State(heading) } { $w heading $State(heading) state pressed } else { @@ -340,27 +340,27 @@ proc ttk::treeview::select.choose.extended {w item cell} { proc ttk::treeview::select.toggle.extended {w item cell} { variable State if {$cell ne ""} { - $w cellselection toggle [list $cell] - set State(cellAnchor) $cell - set State(cellAnchorOp) add + $w cellselection toggle [list $cell] + set State(cellAnchor) $cell + set State(cellAnchorOp) add } else { - $w selection toggle [list $item] + $w selection toggle [list $item] } } proc ttk::treeview::select.extend.extended {w item cell} { variable State if {$cell ne ""} { - if {$State(cellAnchor) ne ""} { - $w cellselection $State(cellAnchorOp) $State(cellAnchor) $cell - } else { - BrowseTo $w $item $cell - } + if {$State(cellAnchor) ne ""} { + $w cellselection $State(cellAnchorOp) $State(cellAnchor) $cell + } else { + BrowseTo $w $item $cell + } } else { - if {[set anchor [$w focus]] ne ""} { - $w selection set [between $w $anchor $item] - } else { - BrowseTo $w $item $cell - } + if {[set anchor [$w focus]] ne ""} { + $w selection set [between $w $anchor $item] + } else { + BrowseTo $w $item $cell + } } } @@ -426,7 +426,7 @@ proc ttk::treeview::Toggle {w item} { # don't allow toggling on indicators that # are not present in front of leaf items if {[$w children $item] == {}} { - return + return } # not a leaf, toggle! if {[$w item $item -open]} { @@ -455,9 +455,9 @@ proc ttk::treeview::BrowseTo {w item cell} { set State(cellAnchor) $cell set State(cellAnchorOp) set if {$cell ne ""} { - $w cellselection set [list $cell] + $w cellselection set [list $cell] } else { - $w selection set [list $item] + $w selection set [list $item] } } diff --git a/library/ttk/ttk.tcl b/library/ttk/ttk.tcl index cbf1303..e5bfc42 100644 --- a/library/ttk/ttk.tcl +++ b/library/ttk/ttk.tcl @@ -95,6 +95,21 @@ proc ::ttk::setTheme {theme} { set currentTheme $theme } +## ttk::configureNotebookStyle $style -- +# Sets theme-specific option values for the ttk::notebook style $style +# and/or the style $style.Tab. To be invoked if the -tabposition option +# of $style has a non-default value (like "sw", "wn", or "en"). +# +proc ::ttk::configureNotebookStyle {style} { + set theme [ttk::style theme use] + if {[llength [info procs theme::${theme}::configureNotebookStyle]] > 0} { + theme::${theme}::configureNotebookStyle $style + return 1 + } else { + return 0 + } +} + ## ttk::setTreeviewRowHeight -- # Sets the default height of the ttk::treeview rows for the current theme. # To be invoked from within the library files for the built-in themes. @@ -154,17 +169,17 @@ proc ttk::LoadThemes {} { set builtinThemes [style theme names] foreach {theme scripts} { - classic classicTheme.tcl - alt altTheme.tcl - clam clamTheme.tcl + classic classicTheme.tcl + alt altTheme.tcl + clam clamTheme.tcl winnative winTheme.tcl xpnative {xpTheme.tcl vistaTheme.tcl} - aqua aquaTheme.tcl + aqua aquaTheme.tcl } { if {[lsearch -exact $builtinThemes $theme] >= 0} { - foreach script $scripts { - uplevel #0 [list source -encoding utf-8 [file join $library $script]] - } + foreach script $scripts { + uplevel #0 [list source -encoding utf-8 [file join $library $script]] + } } } } diff --git a/library/ttk/utils.tcl b/library/ttk/utils.tcl index 3f6446d..a0af39d 100644 --- a/library/ttk/utils.tcl +++ b/library/ttk/utils.tcl @@ -46,7 +46,7 @@ proc ttk::GuessTakeFocus {w} { } ## ttk::traverseTo $w -- -# Set the keyboard focus to the specified window. +# Set the keyboard focus to the specified window. # proc ttk::traverseTo {w} { set focus [focus] @@ -119,7 +119,7 @@ proc ttk::focusFirst {w} { # See #1239190 and #1411983 for more discussion. # namespace eval ttk { - variable Grab ;# map: window name -> grab token + variable Grab ;# map: window name -> grab token # grab token details: # Two-element list containing: @@ -304,15 +304,14 @@ bind TtkScrollable <Shift-Option-MouseWheel> \ ## Touchpad scrolling # bind TtkScrollable <TouchpadScroll> { - if {%# %% 5 != 0} { - return - } - lassign [tk::PreciseScrollDeltas %D] deltaX deltaY - if {$deltaX != 0} { - %W xview scroll [expr {-$deltaX}] units - } - if {$deltaY != 0} { - %W yview scroll [expr {-$deltaY}] units + if {%# %% 5 == 0} { + lassign [tk::PreciseScrollDeltas %D] tk::Priv(deltaX) tk::Priv(deltaY) + if {$tk::Priv(deltaX) != 0} { + %W xview scroll [expr {-$tk::Priv(deltaX)}] units + } + if {$tk::Priv(deltaY) != 0} { + %W yview scroll [expr {-$tk::Priv(deltaY)}] units + } } } #*EOF* diff --git a/library/ttk/vistaTheme.tcl b/library/ttk/vistaTheme.tcl index 4105a1a..5a30837 100644 --- a/library/ttk/vistaTheme.tcl +++ b/library/ttk/vistaTheme.tcl @@ -16,7 +16,7 @@ namespace eval ttk::theme::vista { ttk::style theme settings vista { - ttk::style configure . \ + ttk::style configure . \ -background SystemButtonFace \ -foreground SystemWindowText \ -selectforeground SystemHighlightText \ @@ -42,49 +42,49 @@ namespace eval ttk::theme::vista { # Treeview: ttk::style configure Heading -font TkHeadingFont ttk::style configure Treeview -background SystemWindow \ - -stripedbackground System3dLight + -stripedbackground System3dLight ttk::style configure Treeview.Separator \ - -background System3dLight + -background System3dLight ttk::style map Treeview \ -background [list disabled SystemButtonFace \ selected SystemHighlight] \ -foreground [list disabled SystemGrayText \ selected SystemHighlightText] - # Label and Toolbutton + # Label and Toolbutton ttk::style configure TLabelframe.Label -foreground SystemButtonText ttk::style configure Toolbutton -padding 3p - # Combobox + # Combobox ttk::style configure TCombobox -padding 1.5p - ttk::style element create Combobox.border vsapi \ - COMBOBOX 4 {disabled 4 focus 3 active 2 hover 2 {} 1} - ttk::style element create Combobox.background vsapi \ - EDIT 3 {disabled 3 readonly 5 focus 4 hover 2 {} 1} - ttk::style element create Combobox.rightdownarrow vsapi \ - COMBOBOX 6 {disabled 4 pressed 3 active 2 {} 1} \ - -syssize {SM_CXVSCROLL SM_CYVSCROLL} - ttk::style layout TCombobox { - Combobox.border -sticky nswe -border 0 -children { - Combobox.rightdownarrow -side right -sticky ns - Combobox.padding -sticky nswe -children { - Combobox.background -sticky nswe -children { - Combobox.focus -sticky nswe -children { - Combobox.textarea -sticky nswe - } - } - } - } - } - # Vista.Combobox droplist frame - ttk::style element create ComboboxPopdownFrame.background vsapi\ - LISTBOX 3 {disabled 4 active 3 focus 2 {} 1} - ttk::style layout ComboboxPopdownFrame { - ComboboxPopdownFrame.background -sticky news -border 1 -children { - ComboboxPopdownFrame.padding -sticky news - } - } + ttk::style element create Combobox.border vsapi \ + COMBOBOX 4 {disabled 4 focus 3 active 2 hover 2 {} 1} + ttk::style element create Combobox.background vsapi \ + EDIT 3 {disabled 3 readonly 5 focus 4 hover 2 {} 1} + ttk::style element create Combobox.rightdownarrow vsapi \ + COMBOBOX 6 {disabled 4 pressed 3 active 2 {} 1} \ + -syssize {SM_CXVSCROLL SM_CYVSCROLL} + ttk::style layout TCombobox { + Combobox.border -sticky nswe -border 0 -children { + Combobox.rightdownarrow -side right -sticky ns + Combobox.padding -sticky nswe -children { + Combobox.background -sticky nswe -children { + Combobox.focus -sticky nswe -children { + Combobox.textarea -sticky nswe + } + } + } + } + } + # Vista.Combobox droplist frame + ttk::style element create ComboboxPopdownFrame.background vsapi\ + LISTBOX 3 {disabled 4 active 3 focus 2 {} 1} + ttk::style layout ComboboxPopdownFrame { + ComboboxPopdownFrame.background -sticky news -border 1 -children { + ComboboxPopdownFrame.padding -sticky news + } + } ttk::style map TCombobox \ -selectbackground [list !focus SystemWindow] \ -selectforeground [list !focus SystemWindowText] \ @@ -94,135 +94,166 @@ namespace eval ttk::theme::vista { ] \ -focusfill [list {readonly focus} SystemHighlight] - # Entry - ttk::style configure TEntry -padding {1 1 1 1} ;# Needs lookup - ttk::style element create Entry.field vsapi \ - EDIT 6 {disabled 4 focus 3 hover 2 {} 1} -padding {2 2 2 2} - ttk::style element create Entry.background vsapi \ - EDIT 3 {disabled 3 readonly 3 focus 4 hover 2 {} 1} - ttk::style layout TEntry { - Entry.field -sticky news -border 0 -children { - Entry.background -sticky news -children { - Entry.padding -sticky news -children { - Entry.textarea -sticky news - } - } - } - } + # Entry + ttk::style configure TEntry -padding {1 1 1 1} ;# Needs lookup + ttk::style element create Entry.field vsapi \ + EDIT 6 {disabled 4 focus 3 hover 2 {} 1} -padding {2 2 2 2} + ttk::style element create Entry.background vsapi \ + EDIT 3 {disabled 3 readonly 3 focus 4 hover 2 {} 1} + ttk::style layout TEntry { + Entry.field -sticky news -border 0 -children { + Entry.background -sticky news -children { + Entry.padding -sticky news -children { + Entry.textarea -sticky news + } + } + } + } ttk::style map TEntry \ -selectbackground [list !focus SystemWindow] \ -selectforeground [list !focus SystemWindowText] - # Spinbox - ttk::style configure TSpinbox -padding 0 - ttk::style element create Spinbox.field vsapi \ - EDIT 9 {disabled 4 focus 3 hover 2 {} 1} -padding {1 1 1 2} - ttk::style element create Spinbox.background vsapi \ - EDIT 3 {disabled 3 readonly 3 focus 4 hover 2 {} 1} - ttk::style element create Spinbox.innerbg vsapi \ - EDIT 3 {disabled 3 readonly 3 focus 4 hover 2 {} 1}\ - -padding {2 0 15 2} - ttk::style element create Spinbox.uparrow vsapi \ - SPIN 1 {disabled 4 pressed 3 active 2 {} 1} \ - -padding 1 -halfheight 1 \ - -syssize { SM_CXVSCROLL SM_CYVSCROLL } - ttk::style element create Spinbox.downarrow vsapi \ - SPIN 2 {disabled 4 pressed 3 active 2 {} 1} \ - -padding 1 -halfheight 1 \ - -syssize { SM_CXVSCROLL SM_CYVSCROLL } - ttk::style layout TSpinbox { - Spinbox.field -sticky nswe -children { - Spinbox.background -sticky news -children { - Spinbox.padding -sticky news -children { - Spinbox.innerbg -sticky news -children { - Spinbox.textarea - } - } - Spinbox.uparrow -side top -sticky ens - Spinbox.downarrow -side bottom -sticky ens - } - } - } + # Spinbox + ttk::style configure TSpinbox -padding 0 + ttk::style element create Spinbox.field vsapi \ + EDIT 9 {disabled 4 focus 3 hover 2 {} 1} -padding {1 1 1 2} + ttk::style element create Spinbox.background vsapi \ + EDIT 3 {disabled 3 readonly 3 focus 4 hover 2 {} 1} + ttk::style element create Spinbox.innerbg vsapi \ + EDIT 3 {disabled 3 readonly 3 focus 4 hover 2 {} 1}\ + -padding {2 0 15 2} + ttk::style element create Spinbox.uparrow vsapi \ + SPIN 1 {disabled 4 pressed 3 active 2 {} 1} \ + -padding 1 -halfheight 1 \ + -syssize { SM_CXVSCROLL SM_CYVSCROLL } + ttk::style element create Spinbox.downarrow vsapi \ + SPIN 2 {disabled 4 pressed 3 active 2 {} 1} \ + -padding 1 -halfheight 1 \ + -syssize { SM_CXVSCROLL SM_CYVSCROLL } + ttk::style layout TSpinbox { + Spinbox.field -sticky nswe -children { + Spinbox.background -sticky news -children { + Spinbox.padding -sticky news -children { + Spinbox.innerbg -sticky news -children { + Spinbox.textarea + } + } + Spinbox.uparrow -side top -sticky ens + Spinbox.downarrow -side bottom -sticky ens + } + } + } 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} - ttk::style element create Vertical.Scrollbar.trough vsapi \ - SCROLLBAR 7 {disabled 4 pressed 3 active 2 hover 5 {} 1} - ttk::style element create Vertical.Scrollbar.thumb vsapi \ - SCROLLBAR 3 {disabled 4 pressed 3 active 2 hover 5 {} 1} \ - -syssize {SM_CXVSCROLL SM_CYVSCROLL} - ttk::style element create Vertical.Scrollbar.grip vsapi \ - SCROLLBAR 9 {disabled 4 pressed 3 active 2 hover 5 {} 1} \ - -syssize {SM_CXVSCROLL SM_CYVSCROLL} - ttk::style element create Horizontal.Scrollbar.leftarrow vsapi \ - SCROLLBAR 1 {disabled 12 pressed 11 active 10 hover 19 {} 9} \ - -syssize {SM_CXHSCROLL SM_CYHSCROLL} - ttk::style element create Horizontal.Scrollbar.rightarrow vsapi \ - SCROLLBAR 1 {disabled 16 pressed 15 active 14 hover 20 {} 13} \ - -syssize {SM_CXHSCROLL SM_CYHSCROLL} - ttk::style element create Horizontal.Scrollbar.trough vsapi \ - SCROLLBAR 5 {disabled 4 pressed 3 active 2 hover 5 {} 1} - ttk::style element create Horizontal.Scrollbar.thumb vsapi \ - SCROLLBAR 2 {disabled 4 pressed 3 active 2 hover 5 {} 1} \ - -syssize {SM_CXHSCROLL SM_CYHSCROLL} - ttk::style element create Horizontal.Scrollbar.grip vsapi \ - SCROLLBAR 8 {disabled 4 pressed 3 active 2 hover 5 {} 1} - - # Progressbar - ttk::style element create Horizontal.Progressbar.pbar vsapi \ - PROGRESS 3 {{} 1} -padding 8 - ttk::style layout Horizontal.TProgressbar { - Horizontal.Progressbar.trough -sticky nswe -children { - Horizontal.Progressbar.pbar -side left -sticky ns - Horizontal.Progressbar.ctext -sticky nesw - } - } - 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 -sticky nswe -children { - Horizontal.Scale.trough -sticky nswe -children { - Horizontal.Scale.track -sticky we - Horizontal.Scale.slider -side left -sticky {} - } - } - } - ttk::style element create Vertical.Scale.slider vsapi \ - TRACKBAR 6 {disabled 5 focus 4 pressed 3 active 2 {} 1} \ - -width 12 -height 6 - ttk::style layout Vertical.TScale { - Scale.focus -sticky nswe -children { - Vertical.Scale.trough -sticky nswe -children { - Vertical.Scale.track -sticky ns - Vertical.Scale.slider -side top -sticky {} - } - } - } - - # Treeview - ttk::style configure Item -padding {3p 0 0 0} + # 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} + ttk::style element create Vertical.Scrollbar.trough vsapi \ + SCROLLBAR 7 {disabled 4 pressed 3 active 2 hover 5 {} 1} + ttk::style element create Vertical.Scrollbar.thumb vsapi \ + SCROLLBAR 3 {disabled 4 pressed 3 active 2 hover 5 {} 1} \ + -syssize {SM_CXVSCROLL SM_CYVSCROLL} + ttk::style element create Vertical.Scrollbar.grip vsapi \ + SCROLLBAR 9 {disabled 4 pressed 3 active 2 hover 5 {} 1} \ + -syssize {SM_CXVSCROLL SM_CYVSCROLL} + ttk::style element create Horizontal.Scrollbar.leftarrow vsapi \ + SCROLLBAR 1 {disabled 12 pressed 11 active 10 hover 19 {} 9} \ + -syssize {SM_CXHSCROLL SM_CYHSCROLL} + ttk::style element create Horizontal.Scrollbar.rightarrow vsapi \ + SCROLLBAR 1 {disabled 16 pressed 15 active 14 hover 20 {} 13} \ + -syssize {SM_CXHSCROLL SM_CYHSCROLL} + ttk::style element create Horizontal.Scrollbar.trough vsapi \ + SCROLLBAR 5 {disabled 4 pressed 3 active 2 hover 5 {} 1} + ttk::style element create Horizontal.Scrollbar.thumb vsapi \ + SCROLLBAR 2 {disabled 4 pressed 3 active 2 hover 5 {} 1} \ + -syssize {SM_CXHSCROLL SM_CYHSCROLL} + ttk::style element create Horizontal.Scrollbar.grip vsapi \ + SCROLLBAR 8 {disabled 4 pressed 3 active 2 hover 5 {} 1} + + # Progressbar + ttk::style element create Horizontal.Progressbar.pbar vsapi \ + PROGRESS 3 {{} 1} -padding 8 + ttk::style layout Horizontal.TProgressbar { + Horizontal.Progressbar.trough -sticky nswe -children { + Horizontal.Progressbar.pbar -side left -sticky ns + Horizontal.Progressbar.ctext -sticky nesw + } + } + 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 -sticky nswe -children { + Horizontal.Scale.trough -sticky nswe -children { + Horizontal.Scale.track -sticky we + Horizontal.Scale.slider -side left -sticky {} + } + } + } + ttk::style element create Vertical.Scale.slider vsapi \ + TRACKBAR 6 {disabled 5 focus 4 pressed 3 active 2 {} 1} \ + -width 12 -height 6 + ttk::style layout Vertical.TScale { + Scale.focus -sticky nswe -children { + Vertical.Scale.trough -sticky nswe -children { + Vertical.Scale.track -sticky ns + Vertical.Scale.slider -side top -sticky {} + } + } + } + + # Treeview + ttk::style configure Item -padding {3p 0 0 0} ttk::style configure Treeview -indent 15p ttk::setTreeviewRowHeight - package provide ttk::theme::vista 1.0 + package provide ttk::theme::vista 1.0 + } +} + +# ttk::theme::vista::configureNotebookStyle -- +# +# Sets theme-specific option values for the ttk::notebook style $style and the +# style $style.Tab. Invoked by ::ttk::configureNotebookStyle. + +proc ttk::theme::vista::configureNotebookStyle {style} { + set tabPos [ttk::style lookup $style -tabposition {} nw] + switch -- [string index $tabPos 0] { + n { + ttk::style configure $style -tabmargins {2 2 2 0} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + s { + ttk::style configure $style -tabmargins {2 0 2 2} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + w { + ttk::style configure $style -tabmargins {2 2 0 2} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + e { + ttk::style configure $style -tabmargins {0 2 2 2} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + default { + ttk::style configure $style -tabmargins {2 2 2 0} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } } } diff --git a/library/ttk/winTheme.tcl b/library/ttk/winTheme.tcl index 3be8add..9b9812a 100644 --- a/library/ttk/winTheme.tcl +++ b/library/ttk/winTheme.tcl @@ -17,7 +17,7 @@ namespace eval ttk::theme::winnative { -font TkDefaultFont ttk::style map "." -foreground {disabled SystemGrayText} - ttk::style map "." -embossed {disabled 1} + ttk::style map "." -embossed {disabled 1} ttk::style configure TButton \ -anchor center -width -11 -relief raised -shiftrelief 1 @@ -81,8 +81,39 @@ namespace eval ttk::theme::winnative { -foreground [list disabled SystemGrayText \ selected SystemHighlightText] - ttk::style configure TProgressbar \ + ttk::style configure TProgressbar \ -background SystemHighlight -borderwidth 0 \ -barsize 22.5p -thickness 11.25p } } + +# ttk::theme::winnative::configureNotebookStyle -- +# +# Sets theme-specific option values for the ttk::notebook style $style and the +# style $style.Tab. Invoked by ::ttk::configureNotebookStyle. + +proc ttk::theme::winnative::configureNotebookStyle {style} { + set tabPos [ttk::style lookup $style -tabposition {} nw] + switch -- [string index $tabPos 0] { + n { + ttk::style configure $style -tabmargins {2 2 2 0} + ttk::style map $style.Tab -expand {selected {2 2 2 0}} + } + s { + ttk::style configure $style -tabmargins {2 0 2 2} + ttk::style map $style.Tab -expand {selected {2 0 2 2}} + } + w { + ttk::style configure $style -tabmargins {2 2 0 2} + ttk::style map $style.Tab -expand {selected {2 2 0 2}} + } + e { + ttk::style configure $style -tabmargins {0 2 2 2} + ttk::style map $style.Tab -expand {selected {0 2 2 2}} + } + default { + ttk::style configure $style -tabmargins {2 2 2 0} + ttk::style map $style.Tab -expand {selected {2 2 2 0}} + } + } +} diff --git a/library/ttk/xpTheme.tcl b/library/ttk/xpTheme.tcl index 1c900ba..60c47b0 100644 --- a/library/ttk/xpTheme.tcl +++ b/library/ttk/xpTheme.tcl @@ -62,3 +62,34 @@ namespace eval ttk::theme::xpnative { selected SystemHighlightText] } } + +# ttk::theme::xpnative::configureNotebookStyle -- +# +# Sets theme-specific option values for the ttk::notebook style $style and the +# style $style.Tab. Invoked by ::ttk::configureNotebookStyle. + +proc ttk::theme::xpnative::configureNotebookStyle {style} { + set tabPos [ttk::style lookup $style -tabposition {} nw] + switch -- [string index $tabPos 0] { + n { + ttk::style configure $style -tabmargins {2 2 2 0} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + s { + ttk::style configure $style -tabmargins {2 0 2 2} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + w { + ttk::style configure $style -tabmargins {2 2 0 2} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + e { + ttk::style configure $style -tabmargins {0 2 2 2} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + default { + ttk::style configure $style -tabmargins {2 2 2 0} + ttk::style map $style.Tab -expand {selected {2 2 2 2}} + } + } +} diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl index e4d0db5..176d636 100644 --- a/library/xmfbox.tcl +++ b/library/xmfbox.tcl @@ -315,10 +315,10 @@ proc ::tk::MotifFDialog_Config {dataName type argList} { # Builds the UI components of the Motif file dialog. # # Arguments: -# w Pathname of the dialog to build. +# w Pathname of the dialog to build. # # Results: -# None. +# None. proc ::tk::MotifFDialog_BuildUI {w} { set dataName [lindex [split $w .] end] @@ -476,9 +476,9 @@ proc ::tk::MotifFDialog_MakeSList {w f label cmdPrefix} { # w pathname of the dialog box. # # Results: -# A list of two elements. The first element is the directory -# specified # by the filter. The second element is the filter -# pattern itself. +# A list of two elements. The first element is the directory +# specified # by the filter. The second element is the filter +# pattern itself. proc ::tk::MotifFDialog_InterpFilter {w} { upvar ::tk::dialog::file::[winfo name $w] data @@ -538,7 +538,7 @@ proc ::tk::MotifFDialog_InterpFilter {w} { # boxes. # # Arguments: -# w pathname of the dialog box. +# w pathname of the dialog box. # # Results: # None. @@ -562,7 +562,7 @@ proc ::tk::MotifFDialog_Update {w} { # to the filter setting. # # Arguments: -# w pathname of the dialog box. +# w pathname of the dialog box. # # Results: # None. @@ -623,7 +623,7 @@ proc ::tk::MotifFDialog_LoadFiles {w} { # (clicked-over) by the user. # # Arguments: -# w The pathname of the dialog box. +# w The pathname of the dialog box. # # Results: # None. @@ -669,7 +669,7 @@ proc ::tk::MotifFDialog_BrowseDList {w} { # (double-clicked) by the user. # # Arguments: -# w The pathname of the dialog box. +# w The pathname of the dialog box. # # Results: # None. @@ -717,7 +717,7 @@ proc ::tk::MotifFDialog_ActivateDList {w} { # (clicked-over) by the user. # # Arguments: -# w The pathname of the dialog box. +# w The pathname of the dialog box. # # Results: # None. @@ -759,7 +759,7 @@ proc ::tk::MotifFDialog_BrowseFList {w} { # (double-clicked) by the user. # # Arguments: -# w The pathname of the dialog box. +# w The pathname of the dialog box. # # Results: # None. @@ -785,7 +785,7 @@ proc ::tk::MotifFDialog_ActivateFList {w} { # text inside the filter entry. # # Arguments: -# w The pathname of the dialog box. +# w The pathname of the dialog box. # # Results: # None. @@ -808,7 +808,7 @@ proc ::tk::MotifFDialog_ActivateFEnt {w} { # terminated. # # Arguments: -# w The pathname of the dialog box. +# w The pathname of the dialog box. # # Results: # None. @@ -926,7 +926,7 @@ proc ::tk::ListBoxKeyAccel_Unset {w} { # keystrokes. # # Arguments: -# w The pathname of the listbox. +# w The pathname of the listbox. # key The key which the user just pressed. # # Results: diff --git a/macosx/README b/macosx/README index 64be140..2828f13 100644 --- a/macosx/README +++ b/macosx/README @@ -183,6 +183,15 @@ environment variable XCNOSTDIN to 1 in the Executable editor for Wish. That will cause us to force closing stdin & stdout. Otherwise, given how Xcode launches Wish remotely, they will be left open and then Wish & gdb will fight for stdin. +- The Aqua port also supports the environment variable TK_NO_STDERR which, if set +to a non-empty value, causes stderr to be redirected to /dev/null. This is +convenient because Apple sometimes releases a new OS without removing all of +their commands which log debugging information. Log messages are written to +stderr, and hence printed in the terminal, when wish or tclsh is started from +the terminal, or when running the tests. The messages are not only annoying, +they can also cause tests to fail if a debugging message is written to stderr +while a test is running tktest as a subprocess with exec or open. + 3. FullScreen, Split View and Tabbed Windows -------------------------------------------- @@ -361,18 +370,11 @@ The following build configurations are available: The Xcode projects refer to the toplevel tcl and tk source directories via the the TCL_SRCROOT and TK_SRCROOT user build settings, by default these are set to the project-relative paths '../../tcl' and '../../tk', if your source -directories are named differently, e.g. '../../tcl8.7' and '../../tk8.7', you +directories are named differently, e.g. '../../tcl9.0' and '../../tk9.0', you need to manually change the TCL_SRCROOT and TK_SRCROOT settings by editing your ${USER}.pbxuser file (located inside the Tk.xcodeproj bundle directory) with a text editor. -- To enable weak-linking, set the MACOSX_DEPLOYMENT_TARGET environment variable -to the minimal OS version the binaries should be able to run on, e.g: - export MACOSX_DEPLOYMENT_TARGET=10.6 -This requires at least gcc 3.1; with gcc 4 or later, set/add to CFLAGS instead: - export CFLAGS="-mmacosx-version-min=10.6" -Support for weak-linking was added with 8.4.14/8.5a5. - Detailed Instructions for building with macosx/GNUmakefile ---------------------------------------------------------- @@ -390,8 +392,8 @@ Tcl/Tk version number, e.g. '8.7'). Setup this shell variable as follows: ver="8.7" -- Setup environment variables as desired, e.g. for a universal build on 10.5: - CFLAGS="-arch x86_64 -arch arm64 -mmacosx-version-min=10.5" +- Setup environment variables as desired, e.g. for a universal build on 10.9: + CFLAGS="-arch x86_64 -arch arm64 -mmacosx-version-min=10.9" export CFLAGS - Change to the directory containing the Tcl and Tk source trees and build: @@ -477,9 +479,9 @@ https://developer.apple.com/library/mac/documentation/Cocoa/\ Reference/ApplicationKit/Classes/NSApplication_Class) void NSApplicationMain(int argc, char *argv[]) { - [NSApplication sharedApplication]; - [NSBundle loadNibNamed:@"myMain" owner:NSApp]; - [NSApp run]; + [NSApplication sharedApplication]; + [NSBundle loadNibNamed:@"myMain" owner:NSApp]; + [NSApp run]; } Here NSApp is a standard global variable, initialized by the OS, which points to an object in a subclass of NSApplication (called @@ -517,17 +519,6 @@ specific SetupProc and then a platform specific CheckProc. In the macOS port, these are named TkMacOSXEventsSetupProc and TkMacOSXEventsCheckProc. -It is important to understand that the Apple window manager does not -have the concept of an expose event. Their replacement for an expose -event is to have the window manager call the [NSView drawRect] method -in any situation where an expose event for that NSView would be -generated in X11. The [NSView drawRect] method is a no-op which is -expected to be overridden by any application. In the case of Tcl, the -replacement [NSView drawRect] method creates a Tcl expose event -for each dirty rectangle of the NSView, and then adds the expose -event to the Tcl queue. - - 5.2 Autorelease pools ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/macosx/Tk-Common.xcconfig b/macosx/Tk-Common.xcconfig deleted file mode 100644 index 9eaa384..0000000 --- a/macosx/Tk-Common.xcconfig +++ /dev/null @@ -1,45 +0,0 @@ -// -// Tk-Common.xcconfig -- -// -// This file contains the Xcode build settings comon to all -// project configurations in Wish.xcodeproj. -// -// Copyright © 2007-2009 Daniel A. Steffen <das@users.sourceforge.net> -// Copyright © 2008-2009 Apple Inc. -// -// See the file "license.terms" for information on usage and redistribution -// of this file, and for a DISCLAIMER OF ALL WARRANTIES. - -HEADER_SEARCH_PATHS = $(TK_SRCROOT)/generic $(TK_SRCROOT)/xlib "$(DERIVED_FILE_DIR)/tcl" "$(DERIVED_FILE_DIR)/tk" $(HEADER_SEARCH_PATHS) -REZ_SEARCH_PATHS = $(TK_SRCROOT)/generic $(TCL_SRCROOT)/generic $(REZ_SEARCH_PATHS) -OTHER_LDFLAGS = -headerpad_max_install_names -sectcreate __TEXT __info_plist "$(DERIVED_FILE_DIR)/tk/Wish-Info.plist" $(OTHER_LDFLAGS) -OTHER_LDFLAGS_AQUA = -INSTALL_PATH = $(APPLICATION_INSTALL_PATH) -INSTALL_MODE_FLAG = go-w,a+rX -GCC_PREFIX_HEADER = $(DERIVED_FILE_DIR)/tk/tkConfig.h -OTHER_CFLAGS = -imacros "$(DERIVED_FILE_DIR)/tcl/tclConfig.h" $(OTHER_CFLAGS) -GCC_GENERATE_DEBUGGING_SYMBOLS = YES -GCC_NO_COMMON_BLOCKS = YES -GCC_DYNAMIC_NO_PIC = YES -GCC_VERSION = 4.2 -GCC = gcc-$(GCC_VERSION) -WARNING_CFLAGS = -Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -Winit-self -Wcast-align -Wdisabled-optimization -Winline $(WARNING_CFLAGS) -REZ_RESOURCE_MAP_READ_ONLY = YES -APPLICATION_INSTALL_PATH = /Applications/Utilities -BINDIR = $(PREFIX)/bin -CFLAGS = $(CFLAGS) -CPPFLAGS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET) $(CPPFLAGS) -FRAMEWORK_INSTALL_PATH = /Library/Frameworks -INCLUDEDIR = $(PREFIX)/include -LIBDIR = $(PREFIX)/lib -MANDIR = $(PREFIX)/man -PREFIX = /usr/local -TCL_BUILD_DIR = $(OBJROOT)/../tcl/Tcl.build/$(CONFIGURATION)/Tcl.build/Objects -TCL_CONFIGURE_ARGS = --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 -VERSION = 8.7 diff --git a/macosx/Tk-Debug.xcconfig b/macosx/Tk-Debug.xcconfig deleted file mode 100644 index eedc3aa..0000000 --- a/macosx/Tk-Debug.xcconfig +++ /dev/null @@ -1,19 +0,0 @@ -// -// Tk-Debug.xcconfig -- -// -// This file contains the Xcode build settings for all Debug -// project configurations in Wish.xcodeproj. -// -// Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net> -// -// See the file "license.terms" for information on usage and redistribution -// of this file, and for a DISCLAIMER OF ALL WARRANTIES. - -#include "Tk-Common.xcconfig" - -DEBUG_INFORMATION_FORMAT = dwarf -DEPLOYMENT_POSTPROCESSING = NO -GCC_OPTIMIZATION_LEVEL = 0 -GCC_PREPROCESSOR_DEFINITIONS = DEBUGLEVEL=4 $(TCL_DEFS) $(TK_DEFS) $(GCC_PREPROCESSOR_DEFINITIONS) -CONFIGURE_ARGS = --enable-symbols $(TCL_CONFIGURE_ARGS) $(CONFIGURE_ARGS) -MAKE_TARGET = develop diff --git a/macosx/Tk-Release.xcconfig b/macosx/Tk-Release.xcconfig deleted file mode 100644 index 75270ff..0000000 --- a/macosx/Tk-Release.xcconfig +++ /dev/null @@ -1,19 +0,0 @@ -// -// Tk-Release.xcconfig -- -// -// This file contains the Xcode build settings for all Release -// project configurations in Wish.xcodeproj. -// -// Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net> -// -// See the file "license.terms" for information on usage and redistribution -// of this file, and for a DISCLAIMER OF ALL WARRANTIES. - -#include "Tk-Common.xcconfig" - -DEBUG_INFORMATION_FORMAT = dwarf-with-dsym -// DEPLOYMENT_POSTPROCESSING = YES -GCC_OPTIMIZATION_LEVEL = 2 -GCC_PREPROCESSOR_DEFINITIONS = NDEBUG $(TCL_DEFS) $(TK_DEFS) $(GCC_PREPROCESSOR_DEFINITIONS) -CONFIGURE_ARGS = --disable-symbols $(TCL_CONFIGURE_ARGS) $(CONFIGURE_ARGS) -MAKE_TARGET = deploy diff --git a/macosx/Tk.xcodeproj/default.pbxuser b/macosx/Tk.xcodeproj/default.pbxuser deleted file mode 100644 index 30bcecb..0000000 --- a/macosx/Tk.xcodeproj/default.pbxuser +++ /dev/null @@ -1,399 +0,0 @@ -// !$*UTF8*$! -{ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - activeBuildConfigurationName = Debug; - activeExecutable = F9E61D1C090A4282002B3151 /* Wish */; - activeTarget = F9E61D16090A3E94002B3151 /* Tk */; - codeSenseManager = F944EB9D08F798180049FDD4 /* Code sense */; - executables = ( - F9E61D1C090A4282002B3151 /* Wish */, - F944EB8F08F798100049FDD4 /* tktest */, - F9FD31F50CC1AD070073837D /* tktest-X11 */, - ); - perUserDictionary = { - com.apple.ide.smrt.PBXUserSmartGroupsKey.Rev10 = <040b73747265616d747970656481e8038401408484840e4e534d757461626c654172726179008484074e534172726179008484084e534f626a65637400858401690192848484134e534d757461626c6544696374696f6e6172790084840c4e5344696374696f6e6172790095960792848484084e53537472696e67019584012b046e616d658692849a9a14496d706c656d656e746174696f6e2046696c65738692849a9a195042585472616e7369656e744c6f636174696f6e4174546f708692849a9a06626f74746f6d8692849a9a0b707265666572656e63657386928497960892849a9a0669734c6561668692848484084e534e756d626572008484074e5356616c7565009584012a849696008692849a9a04726f6f748692849a9a093c50524f4a4543543e8692849a9a09726563757273697665869284a29da496018692849a9a05696d6167658692849a9a0b536d617274466f6c6465728692849a9a0763616e536176658692a892849a9a1250425850726f6a65637453636f70654b65798692849a9a035945538692849a9a0572656765788692849a9a065c2e286329248692849a9a07666e6d617463688692849a9a00868692849a9a146162736f6c75746550617468546f42756e646c658692849a9a008692849a9a0b6465736372697074696f6e8692849a9a103c6e6f206465736372697074696f6e3e8692849a9a08676c6f62616c49448692849a9a183143433045413430303433353045463930303434343130428692849a9a03636c7a8692849a9a1550425846696c656e616d65536d61727447726f7570868686>; - }; - sourceControlManager = F944EB9C08F798180049FDD4 /* Source Control */; - userBuildSettings = { - SYMROOT = "${SRCROOT}/../../build/tk"; - TCL_SRCROOT = "${SRCROOT}/../../tcl"; - TK_SRCROOT = "${SRCROOT}/../../tk"; - }; - }; - 8DD76FA90486AB0100D96B5E /* tktest */ = { - activeExec = 0; - executables = ( - F944EB8F08F798100049FDD4 /* tktest */, - ); - }; - F944EB8F08F798100049FDD4 /* tktest */ = { - isa = PBXExecutable; - activeArgIndices = ( - YES, - NO, - NO, - NO, - NO, - NO, - NO, - ); - argumentStrings = ( - "${TK_SRCROOT}/library/demos/widget", - "${TK_SRCROOT}/tests/all.tcl", - "${TK_SRCROOT}/tests/ttk/all.tcl", - "-geometry +0+0", - "-singleproc 1", - "-verbose \"bet\"", - "-skip window-2.9", - ); - autoAttachOnCrash = 1; - breakpointsEnabled = 1; - configStateDict = { - "PBXLSLaunchAction-0" = { - PBXLSLaunchAction = 0; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXLSRunLaunchConfig; - displayName = "Executable Runner"; - identifier = com.apple.Xcode.launch.runConfig; - remoteHostInfo = ""; - startActionInfo = ""; - }; - "PBXLSLaunchAction-1" = { - PBXLSLaunchAction = 1; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXGDB_LaunchConfig; - displayName = GDB; - identifier = com.apple.Xcode.launch.GDBMI_Config; - remoteHostInfo = ""; - startActionInfo = ""; - }; - }; - customDataFormattersEnabled = 1; - dataTipCustomDataFormattersEnabled = 1; - dataTipShowTypeColumn = 1; - dataTipSortType = 0; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 0; - environmentEntries = ( - { - active = YES; - name = TCL_LIBRARY; - value = "${TCL_SRCROOT}/library"; - }, - { - active = YES; - name = TK_LIBRARY; - value = "${TK_SRCROOT}/library"; - }, - { - active = YES; - name = TCLLIBPATH; - value = /Library/Tcl; - }, - { - active = YES; - name = TK_SRCROOT; - value = "${TK_SRCROOT}"; - }, - { - active = NO; - name = TK_CONSOLE; - value = 1; - }, - { - active = NO; - name = DYLD_PRINT_LIBRARIES; - }, - { - active = NO; - name = NSTraceEvents; - value = YES; - }, - { - active = NO; - name = MallocBadFreeAbort; - value = 1; - }, - { - active = NO; - name = MallocLogFile; - value = /tmp/malloc.log; - }, - { - active = NO; - name = MallocStackLogging; - value = 1; - }, - { - active = NO; - name = MallocStackLoggingNoCompact; - value = 1; - }, - { - active = NO; - name = MallocPreScribble; - value = 1; - }, - { - active = NO; - name = MallocScribble; - value = 1; - }, - { - active = NO; - name = NSZombieEnabled; - value = YES; - }, - { - active = NO; - name = NSDeallocateZombies; - value = YES; - }, - { - active = NO; - name = NSAutoreleaseFreedObjectCheckEnabled; - value = YES; - }, - { - active = NO; - name = NSEnableAutoreleasePool; - value = NO; - }, - { - active = NO; - name = AUTO_LOG_ALL; - value = YES; - }, - { - active = NO; - name = AUTO_LOG_NOISY; - value = YES; - }, - { - active = NO; - name = AUTO_REFERENCE_COUNT_LOGGING; - value = YES; - }, - ); - executableSystemSymbolLevel = 0; - executableUserSymbolLevel = 0; - libgmallocEnabled = 0; - name = tktest; - showTypeColumn = 0; - sourceDirectories = ( - ); - }; - F944EB9C08F798180049FDD4 /* Source Control */ = { - isa = PBXSourceControlManager; - fallbackIsa = XCSourceControlManager; - isSCMEnabled = 0; - repositoryNamesForRoots = { - .. = ""; - }; - scmConfiguration = { - CVSToolPath = /usr/bin/cvs; - CVSUseSSH = NO; - SubversionToolPath = /usr/bin/svn; - repositoryNamesForRoots = { - .. = ""; - }; - }; - scmType = scm.cvs; - }; - F944EB9D08F798180049FDD4 /* Code sense */ = { - isa = PBXCodeSenseManager; - indexTemplatePath = ""; - }; - F97258A50A86873C00096C78 /* tktest-X11 */ = { - activeExec = 0; - executables = ( - F9FD31F50CC1AD070073837D /* tktest-X11 */, - ); - }; - F9E61D16090A3E94002B3151 /* Tk */ = { - activeExec = 0; - executables = ( - F9E61D1C090A4282002B3151 /* Wish */, - ); - }; - F9E61D1C090A4282002B3151 /* Wish */ = { - isa = PBXExecutable; - activeArgIndices = ( - YES, - ); - argumentStrings = ( - "${TK_SRCROOT}/library/demos/widget", - ); - autoAttachOnCrash = 1; - breakpointsEnabled = 1; - configStateDict = { - "PBXLSLaunchAction-0" = { - PBXLSLaunchAction = 0; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXLSRunLaunchConfig; - displayName = "Executable Runner"; - identifier = com.apple.Xcode.launch.runConfig; - remoteHostInfo = ""; - startActionInfo = ""; - }; - "PBXLSLaunchAction-1" = { - PBXLSLaunchAction = 1; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXGDB_LaunchConfig; - displayName = GDB; - identifier = com.apple.Xcode.launch.GDBMI_Config; - remoteHostInfo = ""; - startActionInfo = ""; - }; - }; - customDataFormattersEnabled = 1; - dataTipCustomDataFormattersEnabled = 1; - dataTipShowTypeColumn = 1; - dataTipSortType = 0; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 0; - environmentEntries = ( - { - active = NO; - name = DYLD_PRINT_LIBRARIES; - }, - ); - executableSystemSymbolLevel = 0; - executableUserSymbolLevel = 0; - libgmallocEnabled = 0; - name = Wish; - showTypeColumn = 0; - sourceDirectories = ( - ); - }; - F9FD31F50CC1AD070073837D /* tktest-X11 */ = { - isa = PBXExecutable; - activeArgIndices = ( - YES, - NO, - NO, - NO, - NO, - NO, - NO, - ); - argumentStrings = ( - "${TK_SRCROOT}/library/demos/widget", - "${TK_SRCROOT}/tests/all.tcl", - "${TK_SRCROOT}/tests/ttk/all.tcl", - "-geometry +0+0", - "-singleproc 1", - "-verbose \"bet\"", - "-skip window-2.9", - ); - autoAttachOnCrash = 1; - breakpointsEnabled = 1; - configStateDict = { - "PBXLSLaunchAction-0" = { - PBXLSLaunchAction = 0; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXLSRunLaunchConfig; - displayName = "Executable Runner"; - identifier = com.apple.Xcode.launch.runConfig; - remoteHostInfo = ""; - startActionInfo = ""; - }; - "PBXLSLaunchAction-1" = { - PBXLSLaunchAction = 1; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXGDB_LaunchConfig; - displayName = GDB; - identifier = com.apple.Xcode.launch.GDBMI_Config; - remoteHostInfo = ""; - startActionInfo = ""; - }; - }; - customDataFormattersEnabled = 1; - dataTipCustomDataFormattersEnabled = 1; - dataTipShowTypeColumn = 1; - dataTipSortType = 0; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 0; - environmentEntries = ( - { - active = YES; - name = TCL_LIBRARY; - value = "${TCL_SRCROOT}/library"; - }, - { - active = YES; - name = TK_LIBRARY; - value = "${TK_SRCROOT}/library"; - }, - { - active = YES; - name = TCLLIBPATH; - value = /Library/Tcl; - }, - { - active = YES; - name = DISPLAY; - value = ":0"; - }, - { - active = NO; - name = DYLD_PRINT_LIBRARIES; - }, - { - active = NO; - name = MallocBadFreeAbort; - value = 1; - }, - { - active = NO; - name = MallocLogFile; - value = /tmp/malloc.log; - }, - { - active = NO; - name = MallocStackLogging; - value = 1; - }, - { - active = NO; - name = MallocStackLoggingNoCompact; - value = 1; - }, - { - active = NO; - name = MallocPreScribble; - value = 1; - }, - { - active = NO; - name = MallocScribble; - value = 1; - }, - ); - executableSystemSymbolLevel = 0; - executableUserSymbolLevel = 0; - libgmallocEnabled = 0; - name = "tktest-X11"; - showTypeColumn = 0; - sourceDirectories = ( - ); - }; -} diff --git a/macosx/Tk.xcodeproj/project.pbxproj b/macosx/Tk.xcodeproj/project.pbxproj deleted file mode 100644 index b82f51f..0000000 --- a/macosx/Tk.xcodeproj/project.pbxproj +++ /dev/null @@ -1,5713 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - F9152B090EAF8A5000CD5C7B /* tkBusy.c in Sources */ = {isa = PBXBuildFile; fileRef = F9152B080EAF8A5000CD5C7B /* tkBusy.c */; }; - F9152B0A0EAF8A5700CD5C7B /* tkBusy.c in Sources */ = {isa = PBXBuildFile; fileRef = F9152B080EAF8A5000CD5C7B /* tkBusy.c */; }; - F92EE8BF0E62F846001A6E80 /* tkImgPhInstance.c in Sources */ = {isa = PBXBuildFile; fileRef = F92EE8BE0E62F846001A6E80 /* tkImgPhInstance.c */; }; - F92EE8D30E62F939001A6E80 /* tkImgPhInstance.c in Sources */ = {isa = PBXBuildFile; fileRef = F92EE8BE0E62F846001A6E80 /* tkImgPhInstance.c */; }; - F93599B30DF1F75400E04F67 /* tclOO.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599B20DF1F75400E04F67 /* tclOO.c */; }; - F93599B70DF1F76100E04F67 /* tclOOBasic.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599B60DF1F76100E04F67 /* tclOOBasic.c */; }; - F93599B90DF1F76600E04F67 /* tclOOCall.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599B80DF1F76600E04F67 /* tclOOCall.c */; }; - F93599BC0DF1F77000E04F67 /* tclOODefineCmds.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599BB0DF1F77000E04F67 /* tclOODefineCmds.c */; }; - F93599BE0DF1F77400E04F67 /* tclOOInfo.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599BD0DF1F77400E04F67 /* tclOOInfo.c */; }; - F93599C20DF1F78300E04F67 /* tclOOMethod.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C10DF1F78300E04F67 /* tclOOMethod.c */; }; - F93599C40DF1F78800E04F67 /* tclOOStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C30DF1F78800E04F67 /* tclOOStubInit.c */; }; - F93599C60DF1F78D00E04F67 /* tclOOStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */; }; - F94523A20E6FC2AC00C1D987 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F94523A10E6FC2AC00C1D987 /* Cocoa.framework */; }; - F95D77EA0DFD820D00A8BF6F /* tclIORTrans.c in Sources */ = {isa = PBXBuildFile; fileRef = F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */; }; - F96437CA0EF0D4B2003F468E /* tclZlib.c in Sources */ = {isa = PBXBuildFile; fileRef = F96437C90EF0D4B2003F468E /* tclZlib.c */; }; - F96437CB0EF0D4B2003F468E /* tclZlib.c in Sources */ = {isa = PBXBuildFile; fileRef = F96437C90EF0D4B2003F468E /* tclZlib.c */; }; - F96437E70EF0D652003F468E /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F96437E60EF0D652003F468E /* libz.dylib */; }; - F96437E80EF0D652003F468E /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F96437E60EF0D652003F468E /* libz.dylib */; }; - F966BDCF08F27A3F005CB29B /* tk3d.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAAC08F27A39005CB29B /* tk3d.c */; }; - F966BDD108F27A3F005CB29B /* tkArgv.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAAE08F27A39005CB29B /* tkArgv.c */; }; - F966BDD208F27A3F005CB29B /* tkAtom.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAAF08F27A39005CB29B /* tkAtom.c */; }; - F966BDD308F27A3F005CB29B /* tkBind.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB008F27A39005CB29B /* tkBind.c */; }; - F966BDD408F27A3F005CB29B /* tkBitmap.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB108F27A39005CB29B /* tkBitmap.c */; }; - F966BDD508F27A3F005CB29B /* tkButton.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB208F27A39005CB29B /* tkButton.c */; }; - F966BDD708F27A3F005CB29B /* tkCanvArc.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB408F27A39005CB29B /* tkCanvArc.c */; }; - F966BDD808F27A3F005CB29B /* tkCanvas.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB508F27A39005CB29B /* tkCanvas.c */; }; - F966BDDA08F27A3F005CB29B /* tkCanvBmap.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB708F27A39005CB29B /* tkCanvBmap.c */; }; - F966BDDB08F27A3F005CB29B /* tkCanvImg.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB808F27A39005CB29B /* tkCanvImg.c */; }; - F966BDDC08F27A3F005CB29B /* tkCanvLine.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB908F27A39005CB29B /* tkCanvLine.c */; }; - F966BDDD08F27A3F005CB29B /* tkCanvPoly.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BABA08F27A39005CB29B /* tkCanvPoly.c */; }; - F966BDDE08F27A3F005CB29B /* tkCanvPs.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BABB08F27A39005CB29B /* tkCanvPs.c */; }; - F966BDE008F27A3F005CB29B /* tkCanvText.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BABD08F27A39005CB29B /* tkCanvText.c */; }; - F966BDE108F27A3F005CB29B /* tkCanvUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BABE08F27A39005CB29B /* tkCanvUtil.c */; }; - F966BDE208F27A3F005CB29B /* tkCanvWind.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BABF08F27A39005CB29B /* tkCanvWind.c */; }; - F966BDE308F27A3F005CB29B /* tkClipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC008F27A39005CB29B /* tkClipboard.c */; }; - F966BDE408F27A3F005CB29B /* tkCmds.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC108F27A39005CB29B /* tkCmds.c */; }; - F966BDE508F27A3F005CB29B /* tkColor.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC208F27A39005CB29B /* tkColor.c */; }; - F966BDE708F27A3F005CB29B /* tkConfig.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC408F27A39005CB29B /* tkConfig.c */; }; - F966BDE808F27A3F005CB29B /* tkConsole.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC508F27A39005CB29B /* tkConsole.c */; }; - F966BDE908F27A3F005CB29B /* tkCursor.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC608F27A39005CB29B /* tkCursor.c */; }; - F966BDEB08F27A3F005CB29B /* tkEntry.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC808F27A39005CB29B /* tkEntry.c */; }; - F966BDED08F27A3F005CB29B /* tkError.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BACA08F27A39005CB29B /* tkError.c */; }; - F966BDEE08F27A3F005CB29B /* tkEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BACB08F27A39005CB29B /* tkEvent.c */; }; - F966BDEF08F27A3F005CB29B /* tkFileFilter.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BACC08F27A39005CB29B /* tkFileFilter.c */; }; - F966BDF108F27A3F005CB29B /* tkFocus.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BACE08F27A39005CB29B /* tkFocus.c */; }; - F966BDF208F27A3F005CB29B /* tkFont.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BACF08F27A39005CB29B /* tkFont.c */; }; - F966BDF408F27A3F005CB29B /* tkFrame.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD108F27A39005CB29B /* tkFrame.c */; }; - F966BDF508F27A3F005CB29B /* tkGC.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD208F27A39005CB29B /* tkGC.c */; }; - F966BDF608F27A3F005CB29B /* tkGeometry.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD308F27A39005CB29B /* tkGeometry.c */; }; - F966BDF708F27A3F005CB29B /* tkGet.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD408F27A39005CB29B /* tkGet.c */; }; - F966BDF808F27A3F005CB29B /* tkGrab.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD508F27A39005CB29B /* tkGrab.c */; }; - F966BDF908F27A3F005CB29B /* tkGrid.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD608F27A39005CB29B /* tkGrid.c */; }; - F966BDFA08F27A3F005CB29B /* tkImage.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD708F27A39005CB29B /* tkImage.c */; }; - F966BDFB08F27A3F005CB29B /* tkImgBmap.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD808F27A39005CB29B /* tkImgBmap.c */; }; - F966BDFC08F27A3F005CB29B /* tkImgGIF.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD908F27A39005CB29B /* tkImgGIF.c */; }; - F966BDFD08F27A3F005CB29B /* tkImgPhoto.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BADA08F27A39005CB29B /* tkImgPhoto.c */; }; - F966BDFE08F27A3F005CB29B /* tkImgPPM.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BADB08F27A39005CB29B /* tkImgPPM.c */; }; - F966BE0708F27A3F005CB29B /* tkListbox.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAE408F27A39005CB29B /* tkListbox.c */; }; - F966BE0808F27A3F005CB29B /* tkMacWinMenu.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAE508F27A39005CB29B /* tkMacWinMenu.c */; }; - F966BE0908F27A3F005CB29B /* tkMain.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAE608F27A39005CB29B /* tkMain.c */; }; - F966BE0A08F27A3F005CB29B /* tkMenu.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAE708F27A39005CB29B /* tkMenu.c */; }; - F966BE0C08F27A3F005CB29B /* tkMenubutton.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAE908F27A39005CB29B /* tkMenubutton.c */; }; - F966BE0E08F27A3F005CB29B /* tkMenuDraw.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAEB08F27A39005CB29B /* tkMenuDraw.c */; }; - F966BE0F08F27A3F005CB29B /* tkMessage.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAEC08F27A39005CB29B /* tkMessage.c */; }; - F966BE1008F27A3F005CB29B /* tkObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAED08F27A39005CB29B /* tkObj.c */; }; - F966BE1108F27A3F005CB29B /* tkOldConfig.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAEE08F27A39005CB29B /* tkOldConfig.c */; }; - F966BE1208F27A3F005CB29B /* tkOption.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAEF08F27A39005CB29B /* tkOption.c */; }; - F966BE1308F27A3F005CB29B /* tkPack.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF008F27A39005CB29B /* tkPack.c */; }; - F966BE1408F27A3F005CB29B /* tkPanedWindow.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF108F27A39005CB29B /* tkPanedWindow.c */; }; - F966BE1508F27A3F005CB29B /* tkPlace.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF208F27A39005CB29B /* tkPlace.c */; }; - F966BE1708F27A3F005CB29B /* tkPointer.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF408F27A39005CB29B /* tkPointer.c */; }; - F966BE1908F27A3F005CB29B /* tkRectOval.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF608F27A39005CB29B /* tkRectOval.c */; }; - F966BE1A08F27A3F005CB29B /* tkScale.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF708F27A39005CB29B /* tkScale.c */; }; - F966BE1C08F27A40005CB29B /* tkScrollbar.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF908F27A39005CB29B /* tkScrollbar.c */; }; - F966BE1E08F27A40005CB29B /* tkSelect.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAFB08F27A39005CB29B /* tkSelect.c */; }; - F966BE2008F27A40005CB29B /* tkSquare.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAFD08F27A39005CB29B /* tkSquare.c */; }; - F966BE2208F27A40005CB29B /* tkStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAFF08F27A39005CB29B /* tkStubInit.c */; }; - F966BE2308F27A40005CB29B /* tkStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0008F27A39005CB29B /* tkStubLib.c */; }; - F966BE2408F27A40005CB29B /* tkStyle.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0108F27A39005CB29B /* tkStyle.c */; }; - F966BE2508F27A40005CB29B /* tkTest.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0208F27A39005CB29B /* tkTest.c */; }; - F966BE2608F27A40005CB29B /* tkText.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0308F27A39005CB29B /* tkText.c */; }; - F966BE2808F27A40005CB29B /* tkTextBTree.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0508F27A39005CB29B /* tkTextBTree.c */; }; - F966BE2908F27A40005CB29B /* tkTextDisp.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0608F27A39005CB29B /* tkTextDisp.c */; }; - F966BE2B08F27A40005CB29B /* tkTextImage.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0808F27A39005CB29B /* tkTextImage.c */; }; - F966BE2C08F27A40005CB29B /* tkTextIndex.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0908F27A39005CB29B /* tkTextIndex.c */; }; - F966BE2D08F27A40005CB29B /* tkTextMark.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0A08F27A39005CB29B /* tkTextMark.c */; }; - F966BE2E08F27A40005CB29B /* tkTextTag.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0B08F27A39005CB29B /* tkTextTag.c */; }; - F966BE2F08F27A40005CB29B /* tkTextWind.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0C08F27A39005CB29B /* tkTextWind.c */; }; - F966BE3008F27A40005CB29B /* tkTrig.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0D08F27A39005CB29B /* tkTrig.c */; }; - F966BE3108F27A40005CB29B /* tkUndo.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0E08F27A39005CB29B /* tkUndo.c */; }; - F966BE3308F27A40005CB29B /* tkUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB1008F27A39005CB29B /* tkUtil.c */; }; - F966BE3408F27A40005CB29B /* tkVisual.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB1108F27A39005CB29B /* tkVisual.c */; }; - F966BE3508F27A40005CB29B /* tkWindow.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB1208F27A39005CB29B /* tkWindow.c */; }; - F966BEDB08F27A40005CB29B /* tkMacOSXBitmap.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBC508F27A3B005CB29B /* tkMacOSXBitmap.c */; }; - F966BEDC08F27A40005CB29B /* tkMacOSXButton.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBC608F27A3B005CB29B /* tkMacOSXButton.c */; }; - F966BEDE08F27A40005CB29B /* tkMacOSXClipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBC808F27A3B005CB29B /* tkMacOSXClipboard.c */; }; - F966BEDF08F27A40005CB29B /* tkMacOSXColor.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBC908F27A3B005CB29B /* tkMacOSXColor.c */; }; - F966BEE008F27A40005CB29B /* tkMacOSXConfig.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBCA08F27A3B005CB29B /* tkMacOSXConfig.c */; }; - F966BEE108F27A40005CB29B /* tkMacOSXCursor.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBCB08F27A3B005CB29B /* tkMacOSXCursor.c */; }; - F966BEE308F27A40005CB29B /* tkMacOSXDebug.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBCD08F27A3B005CB29B /* tkMacOSXDebug.c */; }; - F966BEE608F27A40005CB29B /* tkMacOSXDialog.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBD008F27A3B005CB29B /* tkMacOSXDialog.c */; }; - F966BEE708F27A40005CB29B /* tkMacOSXDraw.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBD108F27A3B005CB29B /* tkMacOSXDraw.c */; }; - F966BEE808F27A40005CB29B /* tkMacOSXEmbed.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBD208F27A3B005CB29B /* tkMacOSXEmbed.c */; }; - F966BEE908F27A40005CB29B /* tkMacOSXEntry.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBD308F27A3B005CB29B /* tkMacOSXEntry.c */; }; - F966BEEA08F27A40005CB29B /* tkMacOSXEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBD408F27A3B005CB29B /* tkMacOSXEvent.c */; }; - F966BEEC08F27A40005CB29B /* tkMacOSXFont.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBD608F27A3B005CB29B /* tkMacOSXFont.c */; }; - F966BEED08F27A40005CB29B /* tkMacOSXHLEvents.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBD708F27A3B005CB29B /* tkMacOSXHLEvents.c */; }; - F966BEEE08F27A40005CB29B /* tkMacOSXInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBD808F27A3B005CB29B /* tkMacOSXInit.c */; settings = {COMPILER_FLAGS = "-DTK_LIBRARY=\\\"$(TK_LIBRARY)\\\""; }; }; - F966BEF108F27A40005CB29B /* tkMacOSXKeyboard.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBDB08F27A3B005CB29B /* tkMacOSXKeyboard.c */; }; - F966BEF208F27A40005CB29B /* tkMacOSXKeyEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBDC08F27A3B005CB29B /* tkMacOSXKeyEvent.c */; }; - F966BEF308F27A40005CB29B /* tkMacOSXMenu.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBDD08F27A3B005CB29B /* tkMacOSXMenu.c */; }; - F966BEF608F27A40005CB29B /* tkMacOSXMenubutton.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBE008F27A3B005CB29B /* tkMacOSXMenubutton.c */; }; - F966BEF708F27A40005CB29B /* tkMacOSXMenus.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBE108F27A3B005CB29B /* tkMacOSXMenus.c */; }; - F966BEF808F27A40005CB29B /* tkMacOSXMouseEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBE208F27A3B005CB29B /* tkMacOSXMouseEvent.c */; }; - F966BEF908F27A40005CB29B /* tkMacOSXNotify.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBE308F27A3B005CB29B /* tkMacOSXNotify.c */; }; - F966BF0108F27A40005CB29B /* tkMacOSXRegion.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBEB08F27A3C005CB29B /* tkMacOSXRegion.c */; }; - F966BF0308F27A40005CB29B /* tkMacOSXScrlbr.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBED08F27A3C005CB29B /* tkMacOSXScrlbr.c */; }; - F966BF0408F27A40005CB29B /* tkMacOSXSend.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBEE08F27A3C005CB29B /* tkMacOSXSend.c */; }; - F966BF0508F27A40005CB29B /* tkMacOSXSubwindows.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBEF08F27A3C005CB29B /* tkMacOSXSubwindows.c */; }; - F966BF0608F27A40005CB29B /* tkMacOSXTest.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBF008F27A3C005CB29B /* tkMacOSXTest.c */; }; - F966BF0708F27A40005CB29B /* tkMacOSXWindowEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBF108F27A3C005CB29B /* tkMacOSXWindowEvent.c */; }; - F966BF0808F27A40005CB29B /* tkMacOSXWm.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBF208F27A3C005CB29B /* tkMacOSXWm.c */; }; - F966BF0B08F27A40005CB29B /* tkMacOSXXStubs.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BBF508F27A3C005CB29B /* tkMacOSXXStubs.c */; }; - F966BF7F08F27A41005CB29B /* tkAppInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC7508F27A3D005CB29B /* tkAppInit.c */; settings = {COMPILER_FLAGS = "-DTK_TEST"; }; }; - F966BF8308F27A41005CB29B /* tkUnix3d.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC7908F27A3D005CB29B /* tkUnix3d.c */; }; - F966BF9608F27A41005CB29B /* tkUnixScale.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8C08F27A3D005CB29B /* tkUnixScale.c */; }; - F966C02A08F27A42005CB29B /* xcolors.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BD2408F27A3F005CB29B /* xcolors.c */; }; - F966C02B08F27A42005CB29B /* xdraw.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BD2508F27A3F005CB29B /* xdraw.c */; }; - F966C02C08F27A42005CB29B /* xgc.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BD2608F27A3F005CB29B /* xgc.c */; }; - F966C02D08F27A42005CB29B /* ximage.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BD2708F27A3F005CB29B /* ximage.c */; }; - F966C02E08F27A42005CB29B /* xutil.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BD2808F27A3F005CB29B /* xutil.c */; }; - F966C07508F2820D005CB29B /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F966C07408F2820D005CB29B /* CoreFoundation.framework */; }; - F966C07708F2821B005CB29B /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F966C07608F2821B005CB29B /* Carbon.framework */; }; - F966C07908F28233005CB29B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F966C07808F28233005CB29B /* IOKit.framework */; }; - F96888050AF786D5000797B5 /* ttkBlink.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E10AF786D5000797B5 /* ttkBlink.c */; }; - F96888060AF786D5000797B5 /* ttkButton.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E20AF786D5000797B5 /* ttkButton.c */; }; - F96888070AF786D5000797B5 /* ttkCache.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E30AF786D5000797B5 /* ttkCache.c */; }; - F96888080AF786D5000797B5 /* ttkClamTheme.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E40AF786D5000797B5 /* ttkClamTheme.c */; }; - F96888090AF786D5000797B5 /* ttkClassicTheme.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E50AF786D5000797B5 /* ttkClassicTheme.c */; }; - F968880A0AF786D5000797B5 /* ttkDefaultTheme.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E70AF786D5000797B5 /* ttkDefaultTheme.c */; }; - F968880B0AF786D5000797B5 /* ttkElements.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E80AF786D5000797B5 /* ttkElements.c */; }; - F968880C0AF786D5000797B5 /* ttkEntry.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E90AF786D5000797B5 /* ttkEntry.c */; }; - F968880D0AF786D5000797B5 /* ttkFrame.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887EA0AF786D5000797B5 /* ttkFrame.c */; }; - F968880E0AF786D5000797B5 /* ttkImage.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887EB0AF786D5000797B5 /* ttkImage.c */; }; - F968880F0AF786D5000797B5 /* ttkInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887EC0AF786D5000797B5 /* ttkInit.c */; }; - F96888100AF786D5000797B5 /* ttkLabel.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887ED0AF786D5000797B5 /* ttkLabel.c */; }; - F96888110AF786D5000797B5 /* ttkLayout.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887EE0AF786D5000797B5 /* ttkLayout.c */; }; - F96888120AF786D5000797B5 /* ttkManager.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887EF0AF786D5000797B5 /* ttkManager.c */; }; - F96888130AF786D5000797B5 /* ttkNotebook.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F10AF786D5000797B5 /* ttkNotebook.c */; }; - F96888140AF786D5000797B5 /* ttkPanedwindow.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F20AF786D5000797B5 /* ttkPanedwindow.c */; }; - F96888150AF786D5000797B5 /* ttkProgress.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F30AF786D5000797B5 /* ttkProgress.c */; }; - F96888160AF786D5000797B5 /* ttkScale.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F40AF786D5000797B5 /* ttkScale.c */; }; - F96888170AF786D5000797B5 /* ttkScroll.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F50AF786D5000797B5 /* ttkScroll.c */; }; - F96888180AF786D5000797B5 /* ttkScrollbar.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F60AF786D5000797B5 /* ttkScrollbar.c */; }; - F96888190AF786D5000797B5 /* ttkSeparator.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F70AF786D5000797B5 /* ttkSeparator.c */; }; - F968881A0AF786D5000797B5 /* ttkSquare.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F80AF786D5000797B5 /* ttkSquare.c */; }; - F968881B0AF786D5000797B5 /* ttkState.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F90AF786D5000797B5 /* ttkState.c */; }; - F968881C0AF786D5000797B5 /* ttkStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887FA0AF786D5000797B5 /* ttkStubInit.c */; }; - F968881D0AF786D5000797B5 /* ttkStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887FB0AF786D5000797B5 /* ttkStubLib.c */; }; - F968881E0AF786D5000797B5 /* ttkTagSet.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887FC0AF786D5000797B5 /* ttkTagSet.c */; }; - F968881F0AF786D5000797B5 /* ttkTheme.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887FD0AF786D5000797B5 /* ttkTheme.c */; }; - F96888200AF786D5000797B5 /* ttkTrace.c in Sources */ = {isa = PBXBuildFile; fileRef = F96888000AF786D5000797B5 /* ttkTrace.c */; }; - F96888210AF786D5000797B5 /* ttkTrack.c in Sources */ = {isa = PBXBuildFile; fileRef = F96888010AF786D5000797B5 /* ttkTrack.c */; }; - F96888220AF786D5000797B5 /* ttkTreeview.c in Sources */ = {isa = PBXBuildFile; fileRef = F96888020AF786D5000797B5 /* ttkTreeview.c */; }; - F96888230AF786D5000797B5 /* ttkWidget.c in Sources */ = {isa = PBXBuildFile; fileRef = F96888030AF786D5000797B5 /* ttkWidget.c */; }; - F96888850AF78938000797B5 /* ttkMacOSXTheme.c in Sources */ = {isa = PBXBuildFile; fileRef = F96888840AF78938000797B5 /* ttkMacOSXTheme.c */; }; - F96D456F08F272BB004A47F5 /* regcomp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED008F272A7004A47F5 /* regcomp.c */; }; - F96D457208F272BB004A47F5 /* regerror.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED308F272A7004A47F5 /* regerror.c */; }; - F96D457508F272BB004A47F5 /* regexec.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED608F272A7004A47F5 /* regexec.c */; }; - F96D457608F272BB004A47F5 /* regfree.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED708F272A7004A47F5 /* regfree.c */; }; - F96D457B08F272BB004A47F5 /* tclAlloc.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EDC08F272A7004A47F5 /* tclAlloc.c */; settings = {COMPILER_FLAGS = "-DUSE_TCLALLOC=0"; }; }; - F96D457C08F272BB004A47F5 /* tclAsync.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EDD08F272A7004A47F5 /* tclAsync.c */; }; - F96D457D08F272BB004A47F5 /* tclBasic.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EDE08F272A7004A47F5 /* tclBasic.c */; }; - F96D457E08F272BC004A47F5 /* tclBinary.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EDF08F272A7004A47F5 /* tclBinary.c */; }; - F96D457F08F272BC004A47F5 /* tclCkalloc.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE008F272A7004A47F5 /* tclCkalloc.c */; }; - F96D458008F272BC004A47F5 /* tclClock.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE108F272A7004A47F5 /* tclClock.c */; }; - F96D458108F272BC004A47F5 /* tclCmdAH.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE208F272A7004A47F5 /* tclCmdAH.c */; }; - F96D458208F272BC004A47F5 /* tclCmdIL.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE308F272A7004A47F5 /* tclCmdIL.c */; }; - F96D458308F272BC004A47F5 /* tclCmdMZ.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE408F272A7004A47F5 /* tclCmdMZ.c */; }; - F96D458408F272BC004A47F5 /* tclCompCmds.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE508F272A7004A47F5 /* tclCompCmds.c */; }; - F96D458508F272BC004A47F5 /* tclCompExpr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE608F272A7004A47F5 /* tclCompExpr.c */; }; - F96D458608F272BC004A47F5 /* tclCompile.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE708F272A7004A47F5 /* tclCompile.c */; }; - F96D458808F272BC004A47F5 /* tclConfig.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE908F272A7004A47F5 /* tclConfig.c */; }; - F96D458908F272BC004A47F5 /* tclDate.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EEA08F272A7004A47F5 /* tclDate.c */; }; - F96D458B08F272BC004A47F5 /* tclDictObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EEC08F272A7004A47F5 /* tclDictObj.c */; }; - F96D458C08F272BC004A47F5 /* tclEncoding.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EED08F272A7004A47F5 /* tclEncoding.c */; }; - F96D458D08F272BC004A47F5 /* tclEnv.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EEE08F272A7004A47F5 /* tclEnv.c */; }; - F96D458E08F272BC004A47F5 /* tclEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EEF08F272A7004A47F5 /* tclEvent.c */; }; - F96D458F08F272BC004A47F5 /* tclExecute.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF008F272A7004A47F5 /* tclExecute.c */; }; - F96D459008F272BC004A47F5 /* tclFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF108F272A7004A47F5 /* tclFCmd.c */; }; - F96D459108F272BC004A47F5 /* tclFileName.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF208F272A7004A47F5 /* tclFileName.c */; }; - F96D459308F272BC004A47F5 /* tclGet.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF408F272A7004A47F5 /* tclGet.c */; }; - F96D459508F272BC004A47F5 /* tclHash.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF608F272A7004A47F5 /* tclHash.c */; }; - F96D459608F272BC004A47F5 /* tclHistory.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF708F272A7004A47F5 /* tclHistory.c */; }; - F96D459708F272BC004A47F5 /* tclIndexObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF808F272A7004A47F5 /* tclIndexObj.c */; }; - F96D459B08F272BC004A47F5 /* tclInterp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EFC08F272A7004A47F5 /* tclInterp.c */; }; - F96D459D08F272BC004A47F5 /* tclIO.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EFE08F272A7004A47F5 /* tclIO.c */; }; - F96D459F08F272BC004A47F5 /* tclIOCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0008F272A7004A47F5 /* tclIOCmd.c */; }; - F96D45A008F272BC004A47F5 /* tclIOGT.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0108F272A7004A47F5 /* tclIOGT.c */; }; - F96D45A108F272BC004A47F5 /* tclIORChan.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0208F272A7004A47F5 /* tclIORChan.c */; }; - F96D45A208F272BC004A47F5 /* tclIOSock.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0308F272A7004A47F5 /* tclIOSock.c */; }; - F96D45A308F272BC004A47F5 /* tclIOUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0408F272A7004A47F5 /* tclIOUtil.c */; }; - F96D45A408F272BC004A47F5 /* tclLink.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0508F272A7004A47F5 /* tclLink.c */; }; - F96D45A508F272BC004A47F5 /* tclListObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0608F272A7004A47F5 /* tclListObj.c */; }; - F96D45A608F272BC004A47F5 /* tclLiteral.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0708F272A7004A47F5 /* tclLiteral.c */; }; - F96D45A708F272BC004A47F5 /* tclLoad.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0808F272A7004A47F5 /* tclLoad.c */; }; - F96D45A908F272BC004A47F5 /* tclMain.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0A08F272A7004A47F5 /* tclMain.c */; }; - F96D45AA08F272BC004A47F5 /* tclNamesp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0B08F272A7004A47F5 /* tclNamesp.c */; }; - F96D45AB08F272BC004A47F5 /* tclNotify.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0C08F272A7004A47F5 /* tclNotify.c */; }; - F96D45AC08F272BC004A47F5 /* tclObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0D08F272A7004A47F5 /* tclObj.c */; }; - F96D45AD08F272BC004A47F5 /* tclPanic.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0E08F272A7004A47F5 /* tclPanic.c */; }; - F96D45AE08F272BC004A47F5 /* tclParse.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0F08F272A7004A47F5 /* tclParse.c */; }; - F96D45B008F272BC004A47F5 /* tclPathObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1108F272A7004A47F5 /* tclPathObj.c */; }; - F96D45B108F272BC004A47F5 /* tclPipe.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1208F272A7004A47F5 /* tclPipe.c */; }; - F96D45B208F272BC004A47F5 /* tclPkg.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1308F272A7004A47F5 /* tclPkg.c */; }; - F96D45B308F272BC004A47F5 /* tclPkgConfig.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1408F272A7004A47F5 /* tclPkgConfig.c */; settings = {COMPILER_FLAGS = "-DCFG_INSTALL_LIBDIR=\\\"$(LIBDIR)\\\" -DCFG_INSTALL_BINDIR=\\\"$(BINDIR)\\\" -DCFG_INSTALL_SCRDIR=\\\"$(TCL_LIBRARY)\\\" -DCFG_INSTALL_INCDIR=\\\"$(INCLUDEDIR)\\\" -DCFG_INSTALL_DOCDIR=\\\"$(MANDIR)\\\" -DCFG_RUNTIME_LIBDIR=\\\"$(LIBDIR)\\\" -DCFG_RUNTIME_BINDIR=\\\"$(BINDIR)\\\" -DCFG_RUNTIME_SCRDIR=\\\"$(TCL_LIBRARY)\\\" -DCFG_RUNTIME_INCDIR=\\\"$(INCLUDEDIR)\\\" -DCFG_RUNTIME_DOCDIR=\\\"$(MANDIR)\\\""; }; }; - F96D45B608F272BC004A47F5 /* tclPosixStr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1708F272A7004A47F5 /* tclPosixStr.c */; }; - F96D45B708F272BC004A47F5 /* tclPreserve.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1808F272A7004A47F5 /* tclPreserve.c */; }; - F96D45B808F272BC004A47F5 /* tclProc.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1908F272A7004A47F5 /* tclProc.c */; }; - F96D45B908F272BC004A47F5 /* tclRegexp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1A08F272A7004A47F5 /* tclRegexp.c */; }; - F96D45BB08F272BC004A47F5 /* tclResolve.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1C08F272A7004A47F5 /* tclResolve.c */; }; - F96D45BC08F272BC004A47F5 /* tclResult.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1D08F272A7004A47F5 /* tclResult.c */; }; - F96D45BD08F272BC004A47F5 /* tclScan.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1E08F272A7004A47F5 /* tclScan.c */; }; - F96D45BE08F272BC004A47F5 /* tclStringObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1F08F272A7004A47F5 /* tclStringObj.c */; }; - F96D45C308F272BC004A47F5 /* tclStrToD.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2408F272A7004A47F5 /* tclStrToD.c */; }; - F96D45C408F272BC004A47F5 /* tclStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2508F272A7004A47F5 /* tclStubInit.c */; }; - F96D45C508F272BC004A47F5 /* tclStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2608F272A7004A47F5 /* tclStubLib.c */; }; - F96D45C908F272BC004A47F5 /* tclThread.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2A08F272A7004A47F5 /* tclThread.c */; }; - F96D45CA08F272BC004A47F5 /* tclThreadAlloc.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2B08F272A7004A47F5 /* tclThreadAlloc.c */; }; - F96D45CB08F272BC004A47F5 /* tclThreadJoin.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2C08F272A7004A47F5 /* tclThreadJoin.c */; }; - F96D45CC08F272BC004A47F5 /* tclThreadStorage.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2D08F272A7004A47F5 /* tclThreadStorage.c */; }; - F96D45CE08F272BC004A47F5 /* tclTimer.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2F08F272A7004A47F5 /* tclTimer.c */; }; - F96D45D008F272BC004A47F5 /* tclTomMathInterface.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F3108F272A7004A47F5 /* tclTomMathInterface.c */; }; - F96D45D108F272BC004A47F5 /* tclTrace.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F3208F272A7004A47F5 /* tclTrace.c */; }; - F96D45D308F272BC004A47F5 /* tclUtf.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F3408F272A7004A47F5 /* tclUtf.c */; }; - F96D45D408F272BC004A47F5 /* tclUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F3508F272A7004A47F5 /* tclUtil.c */; }; - F96D45D508F272BC004A47F5 /* tclVar.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F3608F272A7004A47F5 /* tclVar.c */; }; - F96D48E208F272C3004A47F5 /* bn_fast_s_mp_mul_digs.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426408F272B3004A47F5 /* bn_fast_s_mp_mul_digs.c */; }; - F96D48E408F272C3004A47F5 /* bn_fast_s_mp_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426608F272B3004A47F5 /* bn_fast_s_mp_sqr.c */; }; - F96D48E708F272C3004A47F5 /* bn_mp_add.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426908F272B3004A47F5 /* bn_mp_add.c */; }; - F96D48E808F272C3004A47F5 /* bn_mp_add_d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426A08F272B3004A47F5 /* bn_mp_add_d.c */; }; - F96D48EB08F272C3004A47F5 /* bn_mp_clamp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426D08F272B3004A47F5 /* bn_mp_clamp.c */; }; - F96D48EC08F272C3004A47F5 /* bn_mp_clear.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426E08F272B3004A47F5 /* bn_mp_clear.c */; }; - F96D48ED08F272C3004A47F5 /* bn_mp_clear_multi.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426F08F272B3004A47F5 /* bn_mp_clear_multi.c */; }; - F96D48EE08F272C3004A47F5 /* bn_mp_cmp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427008F272B3004A47F5 /* bn_mp_cmp.c */; }; - F96D48F008F272C3004A47F5 /* bn_mp_cmp_mag.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427208F272B3004A47F5 /* bn_mp_cmp_mag.c */; }; - F96D48F208F272C3004A47F5 /* bn_mp_copy.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427408F272B3004A47F5 /* bn_mp_copy.c */; }; - F96D48F308F272C3004A47F5 /* bn_mp_count_bits.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427508F272B3004A47F5 /* bn_mp_count_bits.c */; }; - F96D48F408F272C3004A47F5 /* bn_mp_div.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427608F272B3004A47F5 /* bn_mp_div.c */; }; - F96D48F508F272C3004A47F5 /* bn_mp_div_2.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427708F272B3004A47F5 /* bn_mp_div_2.c */; }; - F96D48F608F272C3004A47F5 /* bn_mp_div_2d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427808F272B3004A47F5 /* bn_mp_div_2d.c */; }; - F96D48F708F272C3004A47F5 /* bn_mp_div_3.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427908F272B3004A47F5 /* bn_mp_div_3.c */; }; - F96D48F808F272C3004A47F5 /* bn_mp_div_d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427A08F272B3004A47F5 /* bn_mp_div_d.c */; }; - F96D48FC08F272C3004A47F5 /* bn_mp_exch.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427E08F272B3004A47F5 /* bn_mp_exch.c */; }; - F96D490508F272C3004A47F5 /* bn_mp_grow.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D428708F272B3004A47F5 /* bn_mp_grow.c */; }; - F96D490608F272C3004A47F5 /* bn_mp_init.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D428808F272B3004A47F5 /* bn_mp_init.c */; }; - F96D490708F272C3004A47F5 /* bn_mp_init_copy.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D428908F272B3004A47F5 /* bn_mp_init_copy.c */; }; - F96D490808F272C3004A47F5 /* bn_mp_init_multi.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D428A08F272B3004A47F5 /* bn_mp_init_multi.c */; }; - F96D490908F272C3004A47F5 /* bn_mp_init_set.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D428B08F272B3004A47F5 /* bn_mp_init_set.c */; }; - F96D490B08F272C3004A47F5 /* bn_mp_init_size.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D428D08F272B3004A47F5 /* bn_mp_init_size.c */; }; - F96D491008F272C3004A47F5 /* bn_mp_karatsuba_mul.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429208F272B3004A47F5 /* bn_mp_karatsuba_mul.c */; }; - F96D491108F272C3004A47F5 /* bn_mp_karatsuba_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429308F272B3004A47F5 /* bn_mp_karatsuba_sqr.c */; }; - F96D491308F272C3004A47F5 /* bn_mp_lshd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429508F272B3004A47F5 /* bn_mp_lshd.c */; }; - F96D491408F272C3004A47F5 /* bn_mp_mod.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429608F272B3004A47F5 /* bn_mp_mod.c */; }; - F96D491508F272C3004A47F5 /* bn_mp_mod_2d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429708F272B3004A47F5 /* bn_mp_mod_2d.c */; }; - F96D491A08F272C3004A47F5 /* bn_mp_mul.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429C08F272B3004A47F5 /* bn_mp_mul.c */; }; - F96D491B08F272C3004A47F5 /* bn_mp_mul_2.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429D08F272B3004A47F5 /* bn_mp_mul_2.c */; }; - F96D491C08F272C3004A47F5 /* bn_mp_mul_2d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429E08F272B3004A47F5 /* bn_mp_mul_2d.c */; }; - F96D491D08F272C3004A47F5 /* bn_mp_mul_d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429F08F272B3004A47F5 /* bn_mp_mul_d.c */; }; - F96D492908F272C3004A47F5 /* bn_mp_radix_size.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42AB08F272B3004A47F5 /* bn_mp_radix_size.c */; }; - F96D492A08F272C3004A47F5 /* bn_mp_radix_smap.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42AC08F272B3004A47F5 /* bn_mp_radix_smap.c */; }; - F96D492C08F272C3004A47F5 /* bn_mp_read_radix.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42AE08F272B3004A47F5 /* bn_mp_read_radix.c */; }; - F96D493708F272C3004A47F5 /* bn_mp_rshd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42B908F272B3004A47F5 /* bn_mp_rshd.c */; }; - F96D493808F272C3004A47F5 /* bn_mp_set.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42BA08F272B3004A47F5 /* bn_mp_set.c */; }; - F96D493C08F272C3004A47F5 /* bn_mp_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42BE08F272B3004A47F5 /* bn_mp_sqr.c */; }; - F96D493F08F272C3004A47F5 /* bn_mp_sub.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C108F272B3004A47F5 /* bn_mp_sub.c */; }; - F96D494008F272C3004A47F5 /* bn_mp_sub_d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C208F272B3004A47F5 /* bn_mp_sub_d.c */; }; - F96D494608F272C3004A47F5 /* bn_mp_toom_mul.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C808F272B3004A47F5 /* bn_mp_toom_mul.c */; }; - F96D494708F272C3004A47F5 /* bn_mp_toom_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C908F272B3004A47F5 /* bn_mp_toom_sqr.c */; }; - F96D494908F272C3004A47F5 /* bn_mp_toradix_n.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CB08F272B3004A47F5 /* bn_mp_toradix_n.c */; }; - F96D494C08F272C3004A47F5 /* bn_mp_zero.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */; }; - F96D494E08F272C3004A47F5 /* bn_reverse.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D008F272B3004A47F5 /* bn_reverse.c */; }; - F96D494F08F272C3004A47F5 /* bn_s_mp_add.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */; }; - F96D495108F272C3004A47F5 /* bn_s_mp_mul_digs.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */; }; - F96D495308F272C3004A47F5 /* bn_s_mp_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */; }; - F96D495408F272C3004A47F5 /* bn_s_mp_sub.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */; }; - F96D495508F272C3004A47F5 /* bncore.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D708F272B3004A47F5 /* bncore.c */; }; - F96D49A908F272C4004A47F5 /* tclMacOSXBundle.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433908F272B5004A47F5 /* tclMacOSXBundle.c */; }; - F96D49AD08F272C4004A47F5 /* tclMacOSXFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433D08F272B5004A47F5 /* tclMacOSXFCmd.c */; }; - F96D49AE08F272C4004A47F5 /* tclMacOSXNotify.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433E08F272B5004A47F5 /* tclMacOSXNotify.c */; }; - F96D4AC608F272C9004A47F5 /* tclLoadDyld.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445B08F272B9004A47F5 /* tclLoadDyld.c */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; }; - F96D4ACA08F272C9004A47F5 /* tclUnixChan.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445F08F272B9004A47F5 /* tclUnixChan.c */; }; - F96D4ACB08F272C9004A47F5 /* tclUnixEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446008F272B9004A47F5 /* tclUnixEvent.c */; }; - F96D4ACC08F272C9004A47F5 /* tclUnixFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446108F272B9004A47F5 /* tclUnixFCmd.c */; }; - F96D4ACD08F272C9004A47F5 /* tclUnixFile.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446208F272B9004A47F5 /* tclUnixFile.c */; }; - F96D4ACE08F272C9004A47F5 /* tclUnixInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446308F272B9004A47F5 /* tclUnixInit.c */; settings = {COMPILER_FLAGS = "-DTCL_LIBRARY=\\\"$(TCL_LIBRARY)\\\" -DTCL_PACKAGE_PATH=\\\"$(TCL_PACKAGE_PATH)\\\""; }; }; - F96D4ACF08F272C9004A47F5 /* tclUnixNotfy.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446408F272B9004A47F5 /* tclUnixNotfy.c */; }; - F96D4AD008F272C9004A47F5 /* tclUnixPipe.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446508F272B9004A47F5 /* tclUnixPipe.c */; }; - F96D4AD208F272CA004A47F5 /* tclUnixSock.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446708F272B9004A47F5 /* tclUnixSock.c */; }; - F96D4AD408F272CA004A47F5 /* tclUnixThrd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446908F272B9004A47F5 /* tclUnixThrd.c */; }; - F96D4AD608F272CA004A47F5 /* tclUnixTime.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446B08F272B9004A47F5 /* tclUnixTime.c */; }; - F9C9CC000E84059800E00935 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9C9CBFF0E84059800E00935 /* ApplicationServices.framework */; }; - F9DD99BD0F07DF850018B2E4 /* tkImgPNG.c in Sources */ = {isa = PBXBuildFile; fileRef = F9DD99BC0F07DF850018B2E4 /* tkImgPNG.c */; }; - F9DD99BE0F07DF850018B2E4 /* tkImgPNG.c in Sources */ = {isa = PBXBuildFile; fileRef = F9DD99BC0F07DF850018B2E4 /* tkImgPNG.c */; }; - F9E61D28090A481F002B3151 /* bn_mp_cmp_d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427108F272B3004A47F5 /* bn_mp_cmp_d.c */; }; - F9E61D29090A486C002B3151 /* bn_mp_neg.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42A208F272B3004A47F5 /* bn_mp_neg.c */; }; - F9E61D2A090A4891002B3151 /* bn_mp_sqrt.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C008F272B3004A47F5 /* bn_mp_sqrt.c */; }; - F9E61D2B090A48A4002B3151 /* bn_mp_and.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426C08F272B3004A47F5 /* bn_mp_and.c */; }; - F9E61D2C090A48AC002B3151 /* bn_mp_expt_d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427F08F272B3004A47F5 /* bn_mp_expt_d.c */; }; - F9E61D2D090A48BB002B3151 /* bn_mp_xor.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CD08F272B3004A47F5 /* bn_mp_xor.c */; }; - F9E61D2E090A48BF002B3151 /* bn_mp_or.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42A308F272B3004A47F5 /* bn_mp_or.c */; }; - F9E61D2F090A48C7002B3151 /* bn_mp_shrink.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42BC08F272B3004A47F5 /* bn_mp_shrink.c */; }; - F9E61D30090A48E2002B3151 /* bn_mp_to_unsigned_bin_n.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C708F272B3004A47F5 /* bn_mp_to_unsigned_bin_n.c */; }; - F9E61D31090A48F9002B3151 /* bn_mp_to_unsigned_bin.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C608F272B3004A47F5 /* bn_mp_to_unsigned_bin.c */; }; - F9E61D32090A48FA002B3151 /* bn_mp_unsigned_bin_size.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CC08F272B3004A47F5 /* bn_mp_unsigned_bin_size.c */; }; - F9F4415E0C8BAE6F00BCCD67 /* tclDTrace.d in Sources */ = {isa = PBXBuildFile; fileRef = F9F4415D0C8BAE6F00BCCD67 /* tclDTrace.d */; }; - F9FC77B80AB29E9100B7077D /* tclUnixCompat.c in Sources */ = {isa = PBXBuildFile; fileRef = F9FC77B70AB29E9100B7077D /* tclUnixCompat.c */; }; - F9FD30BC0CC1AD070073837D /* regcomp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED008F272A7004A47F5 /* regcomp.c */; }; - F9FD30BD0CC1AD070073837D /* regerror.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED308F272A7004A47F5 /* regerror.c */; }; - F9FD30BE0CC1AD070073837D /* regexec.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED608F272A7004A47F5 /* regexec.c */; }; - F9FD30BF0CC1AD070073837D /* regfree.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED708F272A7004A47F5 /* regfree.c */; }; - F9FD30C00CC1AD070073837D /* tclAlloc.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EDC08F272A7004A47F5 /* tclAlloc.c */; settings = {COMPILER_FLAGS = "-DUSE_TCLALLOC=0"; }; }; - F9FD30C10CC1AD070073837D /* tclAsync.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EDD08F272A7004A47F5 /* tclAsync.c */; }; - F9FD30C20CC1AD070073837D /* tclBasic.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EDE08F272A7004A47F5 /* tclBasic.c */; }; - F9FD30C30CC1AD070073837D /* tclBinary.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EDF08F272A7004A47F5 /* tclBinary.c */; }; - F9FD30C40CC1AD070073837D /* tclCkalloc.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE008F272A7004A47F5 /* tclCkalloc.c */; }; - F9FD30C50CC1AD070073837D /* tclClock.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE108F272A7004A47F5 /* tclClock.c */; }; - F9FD30C60CC1AD070073837D /* tclCmdAH.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE208F272A7004A47F5 /* tclCmdAH.c */; }; - F9FD30C70CC1AD070073837D /* tclCmdIL.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE308F272A7004A47F5 /* tclCmdIL.c */; }; - F9FD30C80CC1AD070073837D /* tclCmdMZ.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE408F272A7004A47F5 /* tclCmdMZ.c */; }; - F9FD30C90CC1AD070073837D /* tclCompCmds.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE508F272A7004A47F5 /* tclCompCmds.c */; }; - F9FD30CA0CC1AD070073837D /* tclCompExpr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE608F272A7004A47F5 /* tclCompExpr.c */; }; - F9FD30CB0CC1AD070073837D /* tclCompile.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE708F272A7004A47F5 /* tclCompile.c */; }; - F9FD30CC0CC1AD070073837D /* tclConfig.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EE908F272A7004A47F5 /* tclConfig.c */; }; - F9FD30CD0CC1AD070073837D /* tclDate.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EEA08F272A7004A47F5 /* tclDate.c */; }; - F9FD30CE0CC1AD070073837D /* tclDictObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EEC08F272A7004A47F5 /* tclDictObj.c */; }; - F9FD30CF0CC1AD070073837D /* tclEncoding.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EED08F272A7004A47F5 /* tclEncoding.c */; }; - F9FD30D00CC1AD070073837D /* tclEnv.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EEE08F272A7004A47F5 /* tclEnv.c */; }; - F9FD30D10CC1AD070073837D /* tclEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EEF08F272A7004A47F5 /* tclEvent.c */; }; - F9FD30D20CC1AD070073837D /* tclExecute.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF008F272A7004A47F5 /* tclExecute.c */; }; - F9FD30D30CC1AD070073837D /* tclFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF108F272A7004A47F5 /* tclFCmd.c */; }; - F9FD30D40CC1AD070073837D /* tclFileName.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF208F272A7004A47F5 /* tclFileName.c */; }; - F9FD30D50CC1AD070073837D /* tclGet.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF408F272A7004A47F5 /* tclGet.c */; }; - F9FD30D60CC1AD070073837D /* tclHash.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF608F272A7004A47F5 /* tclHash.c */; }; - F9FD30D70CC1AD070073837D /* tclHistory.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF708F272A7004A47F5 /* tclHistory.c */; }; - F9FD30D80CC1AD070073837D /* tclIndexObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EF808F272A7004A47F5 /* tclIndexObj.c */; }; - F9FD30D90CC1AD070073837D /* tclInterp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EFC08F272A7004A47F5 /* tclInterp.c */; }; - F9FD30DA0CC1AD070073837D /* tclIO.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3EFE08F272A7004A47F5 /* tclIO.c */; }; - F9FD30DB0CC1AD070073837D /* tclIOCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0008F272A7004A47F5 /* tclIOCmd.c */; }; - F9FD30DC0CC1AD070073837D /* tclIOGT.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0108F272A7004A47F5 /* tclIOGT.c */; }; - F9FD30DD0CC1AD070073837D /* tclIORChan.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0208F272A7004A47F5 /* tclIORChan.c */; }; - F9FD30DE0CC1AD070073837D /* tclIOSock.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0308F272A7004A47F5 /* tclIOSock.c */; }; - F9FD30DF0CC1AD070073837D /* tclIOUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0408F272A7004A47F5 /* tclIOUtil.c */; }; - F9FD30E00CC1AD070073837D /* tclLink.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0508F272A7004A47F5 /* tclLink.c */; }; - F9FD30E10CC1AD070073837D /* tclListObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0608F272A7004A47F5 /* tclListObj.c */; }; - F9FD30E20CC1AD070073837D /* tclLiteral.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0708F272A7004A47F5 /* tclLiteral.c */; }; - F9FD30E30CC1AD070073837D /* tclLoad.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0808F272A7004A47F5 /* tclLoad.c */; }; - F9FD30E40CC1AD070073837D /* tclMain.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0A08F272A7004A47F5 /* tclMain.c */; }; - F9FD30E50CC1AD070073837D /* tclNamesp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0B08F272A7004A47F5 /* tclNamesp.c */; }; - F9FD30E60CC1AD070073837D /* tclNotify.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0C08F272A7004A47F5 /* tclNotify.c */; }; - F9FD30E70CC1AD070073837D /* tclObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0D08F272A7004A47F5 /* tclObj.c */; }; - F9FD30E80CC1AD070073837D /* tclPanic.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0E08F272A7004A47F5 /* tclPanic.c */; }; - F9FD30E90CC1AD070073837D /* tclParse.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F0F08F272A7004A47F5 /* tclParse.c */; }; - F9FD30EA0CC1AD070073837D /* tclPathObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1108F272A7004A47F5 /* tclPathObj.c */; }; - F9FD30EB0CC1AD070073837D /* tclPipe.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1208F272A7004A47F5 /* tclPipe.c */; }; - F9FD30EC0CC1AD070073837D /* tclPkg.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1308F272A7004A47F5 /* tclPkg.c */; }; - F9FD30ED0CC1AD070073837D /* tclPkgConfig.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1408F272A7004A47F5 /* tclPkgConfig.c */; settings = {COMPILER_FLAGS = "-DCFG_INSTALL_LIBDIR=\\\"$(LIBDIR)\\\" -DCFG_INSTALL_BINDIR=\\\"$(BINDIR)\\\" -DCFG_INSTALL_SCRDIR=\\\"$(TCL_LIBRARY)\\\" -DCFG_INSTALL_INCDIR=\\\"$(INCLUDEDIR)\\\" -DCFG_INSTALL_DOCDIR=\\\"$(MANDIR)\\\" -DCFG_RUNTIME_LIBDIR=\\\"$(LIBDIR)\\\" -DCFG_RUNTIME_BINDIR=\\\"$(BINDIR)\\\" -DCFG_RUNTIME_SCRDIR=\\\"$(TCL_LIBRARY)\\\" -DCFG_RUNTIME_INCDIR=\\\"$(INCLUDEDIR)\\\" -DCFG_RUNTIME_DOCDIR=\\\"$(MANDIR)\\\""; }; }; - F9FD30EE0CC1AD070073837D /* tclPosixStr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1708F272A7004A47F5 /* tclPosixStr.c */; }; - F9FD30EF0CC1AD070073837D /* tclPreserve.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1808F272A7004A47F5 /* tclPreserve.c */; }; - F9FD30F00CC1AD070073837D /* tclProc.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1908F272A7004A47F5 /* tclProc.c */; }; - F9FD30F10CC1AD070073837D /* tclRegexp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1A08F272A7004A47F5 /* tclRegexp.c */; }; - F9FD30F20CC1AD070073837D /* tclResolve.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1C08F272A7004A47F5 /* tclResolve.c */; }; - F9FD30F30CC1AD070073837D /* tclResult.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1D08F272A7004A47F5 /* tclResult.c */; }; - F9FD30F40CC1AD070073837D /* tclScan.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1E08F272A7004A47F5 /* tclScan.c */; }; - F9FD30F50CC1AD070073837D /* tclStringObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F1F08F272A7004A47F5 /* tclStringObj.c */; }; - F9FD30F60CC1AD070073837D /* tclStrToD.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2408F272A7004A47F5 /* tclStrToD.c */; }; - F9FD30F70CC1AD070073837D /* tclStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2508F272A7004A47F5 /* tclStubInit.c */; }; - F9FD30F80CC1AD070073837D /* tclStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2608F272A7004A47F5 /* tclStubLib.c */; }; - F9FD30F90CC1AD070073837D /* tclThread.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2A08F272A7004A47F5 /* tclThread.c */; }; - F9FD30FA0CC1AD070073837D /* tclThreadAlloc.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2B08F272A7004A47F5 /* tclThreadAlloc.c */; }; - F9FD30FB0CC1AD070073837D /* tclThreadJoin.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2C08F272A7004A47F5 /* tclThreadJoin.c */; }; - F9FD30FC0CC1AD070073837D /* tclThreadStorage.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2D08F272A7004A47F5 /* tclThreadStorage.c */; }; - F9FD30FD0CC1AD070073837D /* tclTimer.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F2F08F272A7004A47F5 /* tclTimer.c */; }; - F9FD30FE0CC1AD070073837D /* tclTomMathInterface.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F3108F272A7004A47F5 /* tclTomMathInterface.c */; }; - F9FD30FF0CC1AD070073837D /* tclTrace.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F3208F272A7004A47F5 /* tclTrace.c */; }; - F9FD31000CC1AD070073837D /* tclUtf.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F3408F272A7004A47F5 /* tclUtf.c */; }; - F9FD31010CC1AD070073837D /* tclUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F3508F272A7004A47F5 /* tclUtil.c */; }; - F9FD31020CC1AD070073837D /* tclVar.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3F3608F272A7004A47F5 /* tclVar.c */; }; - F9FD31030CC1AD070073837D /* bn_fast_s_mp_mul_digs.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426408F272B3004A47F5 /* bn_fast_s_mp_mul_digs.c */; }; - F9FD31040CC1AD070073837D /* bn_fast_s_mp_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426608F272B3004A47F5 /* bn_fast_s_mp_sqr.c */; }; - F9FD31050CC1AD070073837D /* bn_mp_add.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426908F272B3004A47F5 /* bn_mp_add.c */; }; - F9FD31060CC1AD070073837D /* bn_mp_add_d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426A08F272B3004A47F5 /* bn_mp_add_d.c */; }; - F9FD31070CC1AD070073837D /* bn_mp_and.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426C08F272B3004A47F5 /* bn_mp_and.c */; }; - F9FD31080CC1AD070073837D /* bn_mp_clamp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426D08F272B3004A47F5 /* bn_mp_clamp.c */; }; - F9FD31090CC1AD070073837D /* bn_mp_clear.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426E08F272B3004A47F5 /* bn_mp_clear.c */; }; - F9FD310A0CC1AD070073837D /* bn_mp_clear_multi.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D426F08F272B3004A47F5 /* bn_mp_clear_multi.c */; }; - F9FD310B0CC1AD070073837D /* bn_mp_cmp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427008F272B3004A47F5 /* bn_mp_cmp.c */; }; - F9FD310C0CC1AD070073837D /* bn_mp_cmp_d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427108F272B3004A47F5 /* bn_mp_cmp_d.c */; }; - F9FD310D0CC1AD070073837D /* bn_mp_cmp_mag.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427208F272B3004A47F5 /* bn_mp_cmp_mag.c */; }; - F9FD310E0CC1AD070073837D /* bn_mp_copy.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427408F272B3004A47F5 /* bn_mp_copy.c */; }; - F9FD310F0CC1AD070073837D /* bn_mp_count_bits.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427508F272B3004A47F5 /* bn_mp_count_bits.c */; }; - F9FD31100CC1AD070073837D /* bn_mp_div.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427608F272B3004A47F5 /* bn_mp_div.c */; }; - F9FD31110CC1AD070073837D /* bn_mp_div_2.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427708F272B3004A47F5 /* bn_mp_div_2.c */; }; - F9FD31120CC1AD070073837D /* bn_mp_div_2d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427808F272B3004A47F5 /* bn_mp_div_2d.c */; }; - F9FD31130CC1AD070073837D /* bn_mp_div_3.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427908F272B3004A47F5 /* bn_mp_div_3.c */; }; - F9FD31140CC1AD070073837D /* bn_mp_div_d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427A08F272B3004A47F5 /* bn_mp_div_d.c */; }; - F9FD31150CC1AD070073837D /* bn_mp_exch.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427E08F272B3004A47F5 /* bn_mp_exch.c */; }; - F9FD31160CC1AD070073837D /* bn_mp_expt_d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D427F08F272B3004A47F5 /* bn_mp_expt_d.c */; }; - F9FD31170CC1AD070073837D /* bn_mp_grow.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D428708F272B3004A47F5 /* bn_mp_grow.c */; }; - F9FD31180CC1AD070073837D /* bn_mp_init.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D428808F272B3004A47F5 /* bn_mp_init.c */; }; - F9FD31190CC1AD070073837D /* bn_mp_init_copy.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D428908F272B3004A47F5 /* bn_mp_init_copy.c */; }; - F9FD311A0CC1AD070073837D /* bn_mp_init_multi.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D428A08F272B3004A47F5 /* bn_mp_init_multi.c */; }; - F9FD311B0CC1AD070073837D /* bn_mp_init_set.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D428B08F272B3004A47F5 /* bn_mp_init_set.c */; }; - F9FD311C0CC1AD070073837D /* bn_mp_init_size.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D428D08F272B3004A47F5 /* bn_mp_init_size.c */; }; - F9FD311D0CC1AD070073837D /* bn_mp_karatsuba_mul.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429208F272B3004A47F5 /* bn_mp_karatsuba_mul.c */; }; - F9FD311E0CC1AD070073837D /* bn_mp_karatsuba_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429308F272B3004A47F5 /* bn_mp_karatsuba_sqr.c */; }; - F9FD311F0CC1AD070073837D /* bn_mp_lshd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429508F272B3004A47F5 /* bn_mp_lshd.c */; }; - F9FD31200CC1AD070073837D /* bn_mp_mod.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429608F272B3004A47F5 /* bn_mp_mod.c */; }; - F9FD31210CC1AD070073837D /* bn_mp_mod_2d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429708F272B3004A47F5 /* bn_mp_mod_2d.c */; }; - F9FD31220CC1AD070073837D /* bn_mp_mul.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429C08F272B3004A47F5 /* bn_mp_mul.c */; }; - F9FD31230CC1AD070073837D /* bn_mp_mul_2.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429D08F272B3004A47F5 /* bn_mp_mul_2.c */; }; - F9FD31240CC1AD070073837D /* bn_mp_mul_2d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429E08F272B3004A47F5 /* bn_mp_mul_2d.c */; }; - F9FD31250CC1AD070073837D /* bn_mp_mul_d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D429F08F272B3004A47F5 /* bn_mp_mul_d.c */; }; - F9FD31260CC1AD070073837D /* bn_mp_neg.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42A208F272B3004A47F5 /* bn_mp_neg.c */; }; - F9FD31270CC1AD070073837D /* bn_mp_or.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42A308F272B3004A47F5 /* bn_mp_or.c */; }; - F9FD31280CC1AD070073837D /* bn_mp_radix_size.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42AB08F272B3004A47F5 /* bn_mp_radix_size.c */; }; - F9FD31290CC1AD070073837D /* bn_mp_radix_smap.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42AC08F272B3004A47F5 /* bn_mp_radix_smap.c */; }; - F9FD312A0CC1AD070073837D /* bn_mp_read_radix.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42AE08F272B3004A47F5 /* bn_mp_read_radix.c */; }; - F9FD312B0CC1AD070073837D /* bn_mp_rshd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42B908F272B3004A47F5 /* bn_mp_rshd.c */; }; - F9FD312C0CC1AD070073837D /* bn_mp_set.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42BA08F272B3004A47F5 /* bn_mp_set.c */; }; - F9FD312D0CC1AD070073837D /* bn_mp_shrink.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42BC08F272B3004A47F5 /* bn_mp_shrink.c */; }; - F9FD312E0CC1AD070073837D /* bn_mp_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42BE08F272B3004A47F5 /* bn_mp_sqr.c */; }; - F9FD312F0CC1AD070073837D /* bn_mp_sqrt.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C008F272B3004A47F5 /* bn_mp_sqrt.c */; }; - F9FD31300CC1AD070073837D /* bn_mp_sub.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C108F272B3004A47F5 /* bn_mp_sub.c */; }; - F9FD31310CC1AD070073837D /* bn_mp_sub_d.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C208F272B3004A47F5 /* bn_mp_sub_d.c */; }; - F9FD31320CC1AD070073837D /* bn_mp_to_unsigned_bin_n.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C708F272B3004A47F5 /* bn_mp_to_unsigned_bin_n.c */; }; - F9FD31330CC1AD070073837D /* bn_mp_to_unsigned_bin.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C608F272B3004A47F5 /* bn_mp_to_unsigned_bin.c */; }; - F9FD31340CC1AD070073837D /* bn_mp_toom_mul.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C808F272B3004A47F5 /* bn_mp_toom_mul.c */; }; - F9FD31350CC1AD070073837D /* bn_mp_toom_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C908F272B3004A47F5 /* bn_mp_toom_sqr.c */; }; - F9FD31360CC1AD070073837D /* bn_mp_toradix_n.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CB08F272B3004A47F5 /* bn_mp_toradix_n.c */; }; - F9FD31370CC1AD070073837D /* bn_mp_unsigned_bin_size.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CC08F272B3004A47F5 /* bn_mp_unsigned_bin_size.c */; }; - F9FD31380CC1AD070073837D /* bn_mp_xor.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CD08F272B3004A47F5 /* bn_mp_xor.c */; }; - F9FD31390CC1AD070073837D /* bn_mp_zero.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */; }; - F9FD313A0CC1AD070073837D /* bn_reverse.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D008F272B3004A47F5 /* bn_reverse.c */; }; - F9FD313B0CC1AD070073837D /* bn_s_mp_add.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */; }; - F9FD313C0CC1AD070073837D /* bn_s_mp_mul_digs.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */; }; - F9FD313D0CC1AD070073837D /* bn_s_mp_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */; }; - F9FD313E0CC1AD070073837D /* bn_s_mp_sub.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */; }; - F9FD313F0CC1AD070073837D /* bncore.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D708F272B3004A47F5 /* bncore.c */; }; - F9FD31400CC1AD070073837D /* tclMacOSXBundle.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433908F272B5004A47F5 /* tclMacOSXBundle.c */; }; - F9FD31410CC1AD070073837D /* tclMacOSXFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433D08F272B5004A47F5 /* tclMacOSXFCmd.c */; }; - F9FD31420CC1AD070073837D /* tclMacOSXNotify.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433E08F272B5004A47F5 /* tclMacOSXNotify.c */; }; - F9FD31430CC1AD070073837D /* tclLoadDyld.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445B08F272B9004A47F5 /* tclLoadDyld.c */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; }; - F9FD31440CC1AD070073837D /* tclUnixChan.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445F08F272B9004A47F5 /* tclUnixChan.c */; }; - F9FD31450CC1AD070073837D /* tclUnixCompat.c in Sources */ = {isa = PBXBuildFile; fileRef = F9FC77B70AB29E9100B7077D /* tclUnixCompat.c */; }; - F9FD31460CC1AD070073837D /* tclUnixEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446008F272B9004A47F5 /* tclUnixEvent.c */; }; - F9FD31470CC1AD070073837D /* tclUnixFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446108F272B9004A47F5 /* tclUnixFCmd.c */; }; - F9FD31480CC1AD070073837D /* tclUnixFile.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446208F272B9004A47F5 /* tclUnixFile.c */; }; - F9FD31490CC1AD070073837D /* tclUnixInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446308F272B9004A47F5 /* tclUnixInit.c */; settings = {COMPILER_FLAGS = "-DTCL_LIBRARY=\\\"$(TCL_LIBRARY)\\\" -DTCL_PACKAGE_PATH=\\\"$(TCL_PACKAGE_PATH)\\\""; }; }; - F9FD314A0CC1AD070073837D /* tclUnixNotfy.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446408F272B9004A47F5 /* tclUnixNotfy.c */; }; - F9FD314B0CC1AD070073837D /* tclUnixPipe.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446508F272B9004A47F5 /* tclUnixPipe.c */; }; - F9FD314C0CC1AD070073837D /* tclUnixSock.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446708F272B9004A47F5 /* tclUnixSock.c */; }; - F9FD314D0CC1AD070073837D /* tclUnixThrd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446908F272B9004A47F5 /* tclUnixThrd.c */; }; - F9FD314E0CC1AD070073837D /* tclUnixTime.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446B08F272B9004A47F5 /* tclUnixTime.c */; }; - F9FD314F0CC1AD070073837D /* tk3d.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAAC08F27A39005CB29B /* tk3d.c */; }; - F9FD31500CC1AD070073837D /* tkArgv.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAAE08F27A39005CB29B /* tkArgv.c */; }; - F9FD31510CC1AD070073837D /* tkAtom.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAAF08F27A39005CB29B /* tkAtom.c */; }; - F9FD31520CC1AD070073837D /* tkBind.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB008F27A39005CB29B /* tkBind.c */; }; - F9FD31530CC1AD070073837D /* tkBitmap.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB108F27A39005CB29B /* tkBitmap.c */; }; - F9FD31540CC1AD070073837D /* tkButton.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB208F27A39005CB29B /* tkButton.c */; }; - F9FD31550CC1AD070073837D /* tkCanvArc.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB408F27A39005CB29B /* tkCanvArc.c */; }; - F9FD31560CC1AD070073837D /* tkCanvas.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB508F27A39005CB29B /* tkCanvas.c */; }; - F9FD31570CC1AD070073837D /* tkCanvBmap.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB708F27A39005CB29B /* tkCanvBmap.c */; }; - F9FD31580CC1AD070073837D /* tkCanvImg.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB808F27A39005CB29B /* tkCanvImg.c */; }; - F9FD31590CC1AD070073837D /* tkCanvLine.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAB908F27A39005CB29B /* tkCanvLine.c */; }; - F9FD315A0CC1AD070073837D /* tkCanvPoly.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BABA08F27A39005CB29B /* tkCanvPoly.c */; }; - F9FD315B0CC1AD070073837D /* tkCanvPs.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BABB08F27A39005CB29B /* tkCanvPs.c */; }; - F9FD315C0CC1AD070073837D /* tkCanvText.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BABD08F27A39005CB29B /* tkCanvText.c */; }; - F9FD315D0CC1AD070073837D /* tkCanvUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BABE08F27A39005CB29B /* tkCanvUtil.c */; }; - F9FD315E0CC1AD070073837D /* tkCanvWind.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BABF08F27A39005CB29B /* tkCanvWind.c */; }; - F9FD315F0CC1AD070073837D /* tkClipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC008F27A39005CB29B /* tkClipboard.c */; }; - F9FD31600CC1AD070073837D /* tkCmds.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC108F27A39005CB29B /* tkCmds.c */; }; - F9FD31610CC1AD070073837D /* tkColor.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC208F27A39005CB29B /* tkColor.c */; }; - F9FD31620CC1AD070073837D /* tkConfig.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC408F27A39005CB29B /* tkConfig.c */; }; - F9FD31630CC1AD070073837D /* tkConsole.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC508F27A39005CB29B /* tkConsole.c */; }; - F9FD31640CC1AD070073837D /* tkCursor.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC608F27A39005CB29B /* tkCursor.c */; }; - F9FD31650CC1AD070073837D /* tkEntry.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAC808F27A39005CB29B /* tkEntry.c */; }; - F9FD31660CC1AD070073837D /* tkError.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BACA08F27A39005CB29B /* tkError.c */; }; - F9FD31670CC1AD070073837D /* tkEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BACB08F27A39005CB29B /* tkEvent.c */; }; - F9FD31680CC1AD070073837D /* tkFileFilter.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BACC08F27A39005CB29B /* tkFileFilter.c */; }; - F9FD31690CC1AD070073837D /* tkFocus.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BACE08F27A39005CB29B /* tkFocus.c */; }; - F9FD316A0CC1AD070073837D /* tkFont.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BACF08F27A39005CB29B /* tkFont.c */; }; - F9FD316B0CC1AD070073837D /* tkFrame.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD108F27A39005CB29B /* tkFrame.c */; }; - F9FD316C0CC1AD070073837D /* tkGC.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD208F27A39005CB29B /* tkGC.c */; }; - F9FD316D0CC1AD070073837D /* tkGeometry.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD308F27A39005CB29B /* tkGeometry.c */; }; - F9FD316E0CC1AD070073837D /* tkGet.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD408F27A39005CB29B /* tkGet.c */; }; - F9FD316F0CC1AD070073837D /* tkGrab.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD508F27A39005CB29B /* tkGrab.c */; }; - F9FD31700CC1AD070073837D /* tkGrid.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD608F27A39005CB29B /* tkGrid.c */; }; - F9FD31710CC1AD070073837D /* tkImage.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD708F27A39005CB29B /* tkImage.c */; }; - F9FD31720CC1AD070073837D /* tkImgBmap.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD808F27A39005CB29B /* tkImgBmap.c */; }; - F9FD31730CC1AD070073837D /* tkImgGIF.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAD908F27A39005CB29B /* tkImgGIF.c */; }; - F9FD31740CC1AD070073837D /* tkImgPhoto.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BADA08F27A39005CB29B /* tkImgPhoto.c */; }; - F9FD31750CC1AD070073837D /* tkImgPPM.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BADB08F27A39005CB29B /* tkImgPPM.c */; }; - F9FD31760CC1AD070073837D /* tkListbox.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAE408F27A39005CB29B /* tkListbox.c */; }; - F9FD31770CC1AD070073837D /* tkMacWinMenu.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAE508F27A39005CB29B /* tkMacWinMenu.c */; }; - F9FD31780CC1AD070073837D /* tkMain.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAE608F27A39005CB29B /* tkMain.c */; }; - F9FD31790CC1AD070073837D /* tkMenu.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAE708F27A39005CB29B /* tkMenu.c */; }; - F9FD317A0CC1AD070073837D /* tkMenubutton.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAE908F27A39005CB29B /* tkMenubutton.c */; }; - F9FD317B0CC1AD070073837D /* tkMenuDraw.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAEB08F27A39005CB29B /* tkMenuDraw.c */; }; - F9FD317C0CC1AD070073837D /* tkMessage.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAEC08F27A39005CB29B /* tkMessage.c */; }; - F9FD317D0CC1AD070073837D /* tkObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAED08F27A39005CB29B /* tkObj.c */; }; - F9FD317E0CC1AD070073837D /* tkOldConfig.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAEE08F27A39005CB29B /* tkOldConfig.c */; }; - F9FD31800CC1AD070073837D /* tkOption.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAEF08F27A39005CB29B /* tkOption.c */; }; - F9FD31810CC1AD070073837D /* tkPack.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF008F27A39005CB29B /* tkPack.c */; }; - F9FD31820CC1AD070073837D /* tkPanedWindow.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF108F27A39005CB29B /* tkPanedWindow.c */; }; - F9FD31830CC1AD070073837D /* tkPlace.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF208F27A39005CB29B /* tkPlace.c */; }; - F9FD31850CC1AD070073837D /* tkRectOval.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF608F27A39005CB29B /* tkRectOval.c */; }; - F9FD31860CC1AD070073837D /* tkScale.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF708F27A39005CB29B /* tkScale.c */; }; - F9FD31870CC1AD070073837D /* tkScrollbar.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF908F27A39005CB29B /* tkScrollbar.c */; }; - F9FD31880CC1AD070073837D /* tkSelect.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAFB08F27A39005CB29B /* tkSelect.c */; }; - F9FD31890CC1AD070073837D /* tkSquare.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAFD08F27A39005CB29B /* tkSquare.c */; }; - F9FD318A0CC1AD070073837D /* tkStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAFF08F27A39005CB29B /* tkStubInit.c */; }; - F9FD318B0CC1AD070073837D /* tkStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0008F27A39005CB29B /* tkStubLib.c */; }; - F9FD318C0CC1AD070073837D /* tkStyle.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0108F27A39005CB29B /* tkStyle.c */; }; - F9FD318D0CC1AD070073837D /* tkTest.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0208F27A39005CB29B /* tkTest.c */; }; - F9FD318E0CC1AD070073837D /* tkText.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0308F27A39005CB29B /* tkText.c */; }; - F9FD318F0CC1AD070073837D /* tkTextBTree.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0508F27A39005CB29B /* tkTextBTree.c */; }; - F9FD31900CC1AD070073837D /* tkTextDisp.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0608F27A39005CB29B /* tkTextDisp.c */; }; - F9FD31910CC1AD070073837D /* tkTextImage.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0808F27A39005CB29B /* tkTextImage.c */; }; - F9FD31920CC1AD070073837D /* tkTextIndex.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0908F27A39005CB29B /* tkTextIndex.c */; }; - F9FD31930CC1AD070073837D /* tkTextMark.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0A08F27A39005CB29B /* tkTextMark.c */; }; - F9FD31940CC1AD070073837D /* tkTextTag.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0B08F27A39005CB29B /* tkTextTag.c */; }; - F9FD31950CC1AD070073837D /* tkTextWind.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0C08F27A39005CB29B /* tkTextWind.c */; }; - F9FD31960CC1AD070073837D /* tkTrig.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0D08F27A39005CB29B /* tkTrig.c */; }; - F9FD31970CC1AD070073837D /* tkUndo.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB0E08F27A39005CB29B /* tkUndo.c */; }; - F9FD31980CC1AD070073837D /* tkUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB1008F27A39005CB29B /* tkUtil.c */; }; - F9FD31990CC1AD070073837D /* tkVisual.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB1108F27A39005CB29B /* tkVisual.c */; }; - F9FD319A0CC1AD070073837D /* tkWindow.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BB1208F27A39005CB29B /* tkWindow.c */; }; - F9FD319B0CC1AD070073837D /* ttkBlink.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E10AF786D5000797B5 /* ttkBlink.c */; }; - F9FD319C0CC1AD070073837D /* ttkButton.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E20AF786D5000797B5 /* ttkButton.c */; }; - F9FD319D0CC1AD070073837D /* ttkCache.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E30AF786D5000797B5 /* ttkCache.c */; }; - F9FD319E0CC1AD070073837D /* ttkClamTheme.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E40AF786D5000797B5 /* ttkClamTheme.c */; }; - F9FD319F0CC1AD070073837D /* ttkClassicTheme.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E50AF786D5000797B5 /* ttkClassicTheme.c */; }; - F9FD31A00CC1AD070073837D /* ttkDefaultTheme.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E70AF786D5000797B5 /* ttkDefaultTheme.c */; }; - F9FD31A10CC1AD070073837D /* ttkElements.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E80AF786D5000797B5 /* ttkElements.c */; }; - F9FD31A20CC1AD070073837D /* ttkEntry.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887E90AF786D5000797B5 /* ttkEntry.c */; }; - F9FD31A30CC1AD070073837D /* ttkFrame.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887EA0AF786D5000797B5 /* ttkFrame.c */; }; - F9FD31A40CC1AD070073837D /* ttkImage.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887EB0AF786D5000797B5 /* ttkImage.c */; }; - F9FD31A50CC1AD070073837D /* ttkInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887EC0AF786D5000797B5 /* ttkInit.c */; }; - F9FD31A60CC1AD070073837D /* ttkLabel.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887ED0AF786D5000797B5 /* ttkLabel.c */; }; - F9FD31A70CC1AD070073837D /* ttkLayout.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887EE0AF786D5000797B5 /* ttkLayout.c */; }; - F9FD31A80CC1AD070073837D /* ttkManager.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887EF0AF786D5000797B5 /* ttkManager.c */; }; - F9FD31A90CC1AD070073837D /* ttkNotebook.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F10AF786D5000797B5 /* ttkNotebook.c */; }; - F9FD31AA0CC1AD070073837D /* ttkPanedwindow.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F20AF786D5000797B5 /* ttkPanedwindow.c */; }; - F9FD31AB0CC1AD070073837D /* ttkProgress.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F30AF786D5000797B5 /* ttkProgress.c */; }; - F9FD31AC0CC1AD070073837D /* ttkScale.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F40AF786D5000797B5 /* ttkScale.c */; }; - F9FD31AD0CC1AD070073837D /* ttkScroll.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F50AF786D5000797B5 /* ttkScroll.c */; }; - F9FD31AE0CC1AD070073837D /* ttkScrollbar.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F60AF786D5000797B5 /* ttkScrollbar.c */; }; - F9FD31AF0CC1AD070073837D /* ttkSeparator.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F70AF786D5000797B5 /* ttkSeparator.c */; }; - F9FD31B00CC1AD070073837D /* ttkSquare.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F80AF786D5000797B5 /* ttkSquare.c */; }; - F9FD31B10CC1AD070073837D /* ttkState.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887F90AF786D5000797B5 /* ttkState.c */; }; - F9FD31B20CC1AD070073837D /* ttkStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887FA0AF786D5000797B5 /* ttkStubInit.c */; }; - F9FD31B30CC1AD070073837D /* ttkStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887FB0AF786D5000797B5 /* ttkStubLib.c */; }; - F9FD31B40CC1AD070073837D /* ttkTagSet.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887FC0AF786D5000797B5 /* ttkTagSet.c */; }; - F9FD31B50CC1AD070073837D /* ttkTheme.c in Sources */ = {isa = PBXBuildFile; fileRef = F96887FD0AF786D5000797B5 /* ttkTheme.c */; }; - F9FD31B60CC1AD070073837D /* ttkTrace.c in Sources */ = {isa = PBXBuildFile; fileRef = F96888000AF786D5000797B5 /* ttkTrace.c */; }; - F9FD31B70CC1AD070073837D /* ttkTrack.c in Sources */ = {isa = PBXBuildFile; fileRef = F96888010AF786D5000797B5 /* ttkTrack.c */; }; - F9FD31B80CC1AD070073837D /* ttkTreeview.c in Sources */ = {isa = PBXBuildFile; fileRef = F96888020AF786D5000797B5 /* ttkTreeview.c */; }; - F9FD31B90CC1AD070073837D /* ttkWidget.c in Sources */ = {isa = PBXBuildFile; fileRef = F96888030AF786D5000797B5 /* ttkWidget.c */; }; - F9FD31DA0CC1AD070073837D /* tkAppInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC7508F27A3D005CB29B /* tkAppInit.c */; settings = {COMPILER_FLAGS = "-DTK_TEST"; }; }; - F9FD31DB0CC1AD070073837D /* tkUnix3d.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC7908F27A3D005CB29B /* tkUnix3d.c */; }; - F9FD31DC0CC1AD070073837D /* tkUnixScale.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8C08F27A3D005CB29B /* tkUnixScale.c */; }; - F9FD31E20CC1AD070073837D /* tclDTrace.d in Sources */ = {isa = PBXBuildFile; fileRef = F9F4415D0C8BAE6F00BCCD67 /* tclDTrace.d */; }; - F9FD31E40CC1AD070073837D /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F966C07408F2820D005CB29B /* CoreFoundation.framework */; }; - F9FD31F80CC1ADB70073837D /* tkUnixCursor.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC7D08F27A3D005CB29B /* tkUnixCursor.c */; }; - F9FD31FA0CC1ADB70073837D /* tkUnixKey.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8708F27A3D005CB29B /* tkUnixKey.c */; }; - F9FD31FB0CC1ADB70073837D /* tkUnixXId.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC9108F27A3D005CB29B /* tkUnixXId.c */; }; - F9FD31FC0CC1ADB70073837D /* tkUnixInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8508F27A3D005CB29B /* tkUnixInit.c */; }; - F9FD31FD0CC1ADB70073837D /* tkUnixEmbed.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8108F27A3D005CB29B /* tkUnixEmbed.c */; }; - F9FD31FE0CC1ADB70073837D /* tkUnixSend.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8F08F27A3D005CB29B /* tkUnixSend.c */; }; - F9FD31FF0CC1ADB70073837D /* tkUnixFocus.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8308F27A3D005CB29B /* tkUnixFocus.c */; }; - F9FD32000CC1ADB70073837D /* tkUnixWm.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC9008F27A3D005CB29B /* tkUnixWm.c */; }; - F9FD32010CC1ADB70073837D /* tkUnixRFont.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8B08F27A3D005CB29B /* tkUnixRFont.c */; }; - F9FD32020CC1ADB70073837D /* tkUnix.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC7808F27A3D005CB29B /* tkUnix.c */; }; - F9FD32030CC1ADB70073837D /* tkUnixMenu.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8808F27A3D005CB29B /* tkUnixMenu.c */; }; - F9FD32040CC1ADB70073837D /* tkUnixConfig.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC7C08F27A3D005CB29B /* tkUnixConfig.c */; }; - F9FD32050CC1ADB70073837D /* tkUnixDraw.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8008F27A3D005CB29B /* tkUnixDraw.c */; }; - F9FD32070CC1ADB70073837D /* tkUnixSelect.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8E08F27A3D005CB29B /* tkUnixSelect.c */; }; - F9FD32080CC1ADB70073837D /* tkUnixEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8208F27A3D005CB29B /* tkUnixEvent.c */; }; - F9FD32090CC1ADB70073837D /* tkUnixColor.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC7B08F27A3D005CB29B /* tkUnixColor.c */; }; - F9FD320A0CC1ADB70073837D /* tkUnixButton.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC7A08F27A3D005CB29B /* tkUnixButton.c */; }; - F9FD320B0CC1ADB70073837D /* tkUnixMenubu.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8908F27A3D005CB29B /* tkUnixMenubu.c */; }; - F9FD320C0CC1ADB70073837D /* tkUnixScrlbr.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BC8D08F27A3D005CB29B /* tkUnixScrlbr.c */; }; - F9FD32170CC1AF170073837D /* libX11.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F9FD32140CC1AF170073837D /* libX11.dylib */; }; - F9FD32180CC1AF170073837D /* libXext.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F9FD32150CC1AF170073837D /* libXext.dylib */; }; - F9FD32190CC1AF170073837D /* libXss.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F9FD32160CC1AF170073837D /* libXss.dylib */; }; - F9FD349B0CC1BB0D0073837D /* libfreetype.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F9FD34990CC1BB0D0073837D /* libfreetype.dylib */; }; - F9FD349C0CC1BB0D0073837D /* libXft.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F9FD349A0CC1BB0D0073837D /* libXft.dylib */; }; - F9FD34C40CC1BBD70073837D /* libfontconfig.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F9FD34C30CC1BBD70073837D /* libfontconfig.dylib */; }; - F9FFAF1D0DFDDB26007F8A6A /* tclIORTrans.c in Sources */ = {isa = PBXBuildFile; fileRef = F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */; }; - F9FFAF1F0DFDDB2F007F8A6A /* tclOO.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599B20DF1F75400E04F67 /* tclOO.c */; }; - F9FFAF200DFDDB32007F8A6A /* tclOOBasic.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599B60DF1F76100E04F67 /* tclOOBasic.c */; }; - F9FFAF210DFDDB32007F8A6A /* tclOOCall.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599B80DF1F76600E04F67 /* tclOOCall.c */; }; - F9FFAF220DFDDB34007F8A6A /* tclOODefineCmds.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599BB0DF1F77000E04F67 /* tclOODefineCmds.c */; }; - F9FFAF230DFDDB35007F8A6A /* tclOOInfo.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599BD0DF1F77400E04F67 /* tclOOInfo.c */; }; - F9FFAF240DFDDB36007F8A6A /* tclOOMethod.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C10DF1F78300E04F67 /* tclOOMethod.c */; }; - F9FFAF250DFDDB37007F8A6A /* tclOOStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C30DF1F78800E04F67 /* tclOOStubInit.c */; }; - F9FFAF260DFDDB38007F8A6A /* tclOOStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 8DD76FB20486AB0100D96B5E /* tktest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tktest; sourceTree = BUILT_PRODUCTS_DIR; }; - F9099B8A0CC67D30005A9580 /* textpeer.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = textpeer.tcl; sourceTree = "<group>"; }; - F9099B8B0CC67D3E005A9580 /* ttkbut.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ttkbut.tcl; sourceTree = "<group>"; }; - F9152B080EAF8A5000CD5C7B /* tkBusy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkBusy.c; sourceTree = "<group>"; }; - F91543270EF201A90032D1E8 /* fontchoose.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fontchoose.tcl; sourceTree = "<group>"; }; - F915432A0EF201CF0032D1E8 /* zlib.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = zlib.test; sourceTree = "<group>"; }; - F915432D0EF201EE0032D1E8 /* zlib.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = zlib.n; sourceTree = "<group>"; }; - F9183E640EFC80CD0030B814 /* throw.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = throw.n; sourceTree = "<group>"; }; - F9183E650EFC80D70030B814 /* try.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = try.n; sourceTree = "<group>"; }; - F9183E6A0EFC81560030B814 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; - F9183E8F0EFC817B0030B814 /* tdbc */ = {isa = PBXFileReference; lastKnownFileType = folder; path = tdbc; sourceTree = "<group>"; }; - F91DC23C0E44C51B002CB8D1 /* nre.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = nre.test; sourceTree = "<group>"; }; - F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = "<group>"; }; - F92240290D7C620F005EC715 /* knightstour.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = knightstour.tcl; sourceTree = "<group>"; }; - F92D7F100DE777240033A13A /* tsdPerf.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tsdPerf.tcl; sourceTree = "<group>"; }; - F92EE8BE0E62F846001A6E80 /* tkImgPhInstance.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkImgPhInstance.c; sourceTree = "<group>"; }; - F93599B20DF1F75400E04F67 /* tclOO.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOO.c; sourceTree = "<group>"; }; - F93599B40DF1F75900E04F67 /* tclOO.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclOO.decls; sourceTree = "<group>"; }; - F93599B50DF1F75D00E04F67 /* tclOO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOO.h; sourceTree = "<group>"; }; - F93599B60DF1F76100E04F67 /* tclOOBasic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOBasic.c; sourceTree = "<group>"; }; - F93599B80DF1F76600E04F67 /* tclOOCall.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOCall.c; sourceTree = "<group>"; }; - F93599BA0DF1F76A00E04F67 /* tclOODecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOODecls.h; sourceTree = "<group>"; }; - F93599BB0DF1F77000E04F67 /* tclOODefineCmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOODefineCmds.c; sourceTree = "<group>"; }; - F93599BD0DF1F77400E04F67 /* tclOOInfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOInfo.c; sourceTree = "<group>"; }; - F93599BF0DF1F77900E04F67 /* tclOOInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOOInt.h; sourceTree = "<group>"; }; - F93599C00DF1F77D00E04F67 /* tclOOIntDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOOIntDecls.h; sourceTree = "<group>"; }; - F93599C10DF1F78300E04F67 /* tclOOMethod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOMethod.c; sourceTree = "<group>"; }; - F93599C30DF1F78800E04F67 /* tclOOStubInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOStubInit.c; sourceTree = "<group>"; }; - F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOStubLib.c; sourceTree = "<group>"; }; - F93599C80DF1F81900E04F67 /* oo.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = oo.test; sourceTree = "<group>"; }; - F93599CF0DF1F87F00E04F67 /* Class.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Class.3; sourceTree = "<group>"; }; - F93599D00DF1F89E00E04F67 /* class.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = class.n; sourceTree = "<group>"; }; - F93599D20DF1F8DF00E04F67 /* copy.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = copy.n; sourceTree = "<group>"; }; - F93599D30DF1F8F500E04F67 /* define.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = define.n; sourceTree = "<group>"; }; - F93599D40DF1F91900E04F67 /* Method.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Method.3; sourceTree = "<group>"; }; - F93599D50DF1F93700E04F67 /* my.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = my.n; sourceTree = "<group>"; }; - F93599D60DF1F95000E04F67 /* next.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = next.n; sourceTree = "<group>"; }; - F93599D70DF1F96800E04F67 /* object.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = object.n; sourceTree = "<group>"; }; - F93599D80DF1F98300E04F67 /* self.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = self.n; sourceTree = "<group>"; }; - F936FCD70CCD984500716967 /* ttkprogress.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ttkprogress.tcl; sourceTree = "<group>"; }; - F936FCD80CCD984600716967 /* tree.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tree.tcl; sourceTree = "<group>"; }; - F936FCD90CCD984600716967 /* toolbar.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = toolbar.tcl; sourceTree = "<group>"; }; - F936FCDA0CCD984600716967 /* ttknote.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ttknote.tcl; sourceTree = "<group>"; }; - F936FCDB0CCD984600716967 /* combo.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = combo.tcl; sourceTree = "<group>"; }; - F93E5EFD09CF8711008FA367 /* tkMacOSXFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXFont.h; sourceTree = "<group>"; }; - F94523A10E6FC2AC00C1D987 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; - F946FB8B0FBE3AED00CD6495 /* itcl */ = {isa = PBXFileReference; lastKnownFileType = folder; path = itcl; sourceTree = "<group>"; }; - F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIORTrans.c; sourceTree = "<group>"; }; - F95D8D4B0F1715610006B020 /* Tk.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Tk.icns; sourceTree = "<group>"; }; - F95D8D4C0F1715610006B020 /* Tk.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Tk.tiff; sourceTree = "<group>"; }; - F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = macOSXLoad.test; sourceTree = "<group>"; }; - F962F7C60DADC26200648DB8 /* vsapi.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = vsapi.test; sourceTree = "<group>"; }; - F96437C90EF0D4B2003F468E /* tclZlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclZlib.c; sourceTree = "<group>"; }; - F96437E60EF0D652003F468E /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = "<absolute>"; }; - F966BA0408F27A37005CB29B /* error.xbm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = error.xbm; sourceTree = "<group>"; }; - F966BA0508F27A37005CB29B /* gray12.xbm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = gray12.xbm; sourceTree = "<group>"; }; - F966BA0608F27A37005CB29B /* gray25.xbm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = gray25.xbm; sourceTree = "<group>"; }; - F966BA0708F27A37005CB29B /* gray50.xbm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = gray50.xbm; sourceTree = "<group>"; }; - F966BA0808F27A37005CB29B /* gray75.xbm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = gray75.xbm; sourceTree = "<group>"; }; - F966BA0908F27A37005CB29B /* hourglass.xbm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = hourglass.xbm; sourceTree = "<group>"; }; - F966BA0A08F27A37005CB29B /* info.xbm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = info.xbm; sourceTree = "<group>"; }; - F966BA0B08F27A37005CB29B /* questhead.xbm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = questhead.xbm; sourceTree = "<group>"; }; - F966BA0C08F27A37005CB29B /* question.xbm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = question.xbm; sourceTree = "<group>"; }; - F966BA0D08F27A37005CB29B /* warning.xbm */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = warning.xbm; sourceTree = "<group>"; }; - F966BA0F08F27A37005CB29B /* changes.md */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = changes.md; sourceTree = "<group>"; }; - F966BA1108F27A37005CB29B /* 3DBorder.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = 3DBorder.3; sourceTree = "<group>"; }; - F966BA1208F27A37005CB29B /* AddOption.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = AddOption.3; sourceTree = "<group>"; }; - F966BA1308F27A37005CB29B /* bell.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = bell.n; sourceTree = "<group>"; }; - F966BA1408F27A37005CB29B /* bind.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = bind.n; sourceTree = "<group>"; }; - F966BA1508F27A37005CB29B /* BindTable.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = BindTable.3; sourceTree = "<group>"; }; - F966BA1608F27A37005CB29B /* bindtags.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = bindtags.n; sourceTree = "<group>"; }; - F966BA1708F27A37005CB29B /* bitmap.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = bitmap.n; sourceTree = "<group>"; }; - F966BA1808F27A37005CB29B /* button.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = button.n; sourceTree = "<group>"; }; - F966BA1908F27A37005CB29B /* canvas.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = canvas.n; sourceTree = "<group>"; }; - F966BA1A08F27A37005CB29B /* CanvPsY.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CanvPsY.3; sourceTree = "<group>"; }; - F966BA1B08F27A37005CB29B /* CanvTkwin.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CanvTkwin.3; sourceTree = "<group>"; }; - F966BA1C08F27A37005CB29B /* CanvTxtInfo.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CanvTxtInfo.3; sourceTree = "<group>"; }; - F966BA1D08F27A37005CB29B /* checkbutton.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = checkbutton.n; sourceTree = "<group>"; }; - F966BA1E08F27A37005CB29B /* chooseColor.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = chooseColor.n; sourceTree = "<group>"; }; - F966BA1F08F27A37005CB29B /* chooseDirectory.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = chooseDirectory.n; sourceTree = "<group>"; }; - F966BA2008F27A37005CB29B /* Clipboard.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Clipboard.3; sourceTree = "<group>"; }; - F966BA2108F27A37005CB29B /* clipboard.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = clipboard.n; sourceTree = "<group>"; }; - F966BA2208F27A37005CB29B /* ClrSelect.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ClrSelect.3; sourceTree = "<group>"; }; - F966BA2308F27A37005CB29B /* colors.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = colors.n; sourceTree = "<group>"; }; - F966BA2408F27A37005CB29B /* ConfigWidg.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ConfigWidg.3; sourceTree = "<group>"; }; - F966BA2508F27A37005CB29B /* ConfigWind.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ConfigWind.3; sourceTree = "<group>"; }; - F966BA2608F27A37005CB29B /* console.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = console.n; sourceTree = "<group>"; }; - F966BA2708F27A37005CB29B /* CoordToWin.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CoordToWin.3; sourceTree = "<group>"; }; - F966BA2808F27A37005CB29B /* CrtCmHdlr.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtCmHdlr.3; sourceTree = "<group>"; }; - F966BA2908F27A37005CB29B /* CrtErrHdlr.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtErrHdlr.3; sourceTree = "<group>"; }; - F966BA2A08F27A37005CB29B /* CrtGenHdlr.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtGenHdlr.3; sourceTree = "<group>"; }; - F966BA2B08F27A37005CB29B /* CrtImgType.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtImgType.3; sourceTree = "<group>"; }; - F966BA2C08F27A37005CB29B /* CrtItemType.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtItemType.3; sourceTree = "<group>"; }; - F966BA2D08F27A37005CB29B /* CrtPhImgFmt.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtPhImgFmt.3; sourceTree = "<group>"; }; - F966BA2E08F27A37005CB29B /* CrtSelHdlr.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtSelHdlr.3; sourceTree = "<group>"; }; - F966BA2F08F27A37005CB29B /* CrtWindow.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtWindow.3; sourceTree = "<group>"; }; - F966BA3008F27A37005CB29B /* cursors.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = cursors.n; sourceTree = "<group>"; }; - F966BA3108F27A37005CB29B /* DeleteImg.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = DeleteImg.3; sourceTree = "<group>"; }; - F966BA3208F27A37005CB29B /* destroy.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = destroy.n; sourceTree = "<group>"; }; - F966BA3308F27A37005CB29B /* dialog.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = dialog.n; sourceTree = "<group>"; }; - F966BA3408F27A37005CB29B /* DrawFocHlt.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = DrawFocHlt.3; sourceTree = "<group>"; }; - F966BA3508F27A37005CB29B /* entry.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = entry.n; sourceTree = "<group>"; }; - F966BA3608F27A37005CB29B /* event.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = event.n; sourceTree = "<group>"; }; - F966BA3708F27A37005CB29B /* EventHndlr.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = EventHndlr.3; sourceTree = "<group>"; }; - F966BA3808F27A37005CB29B /* FindPhoto.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = FindPhoto.3; sourceTree = "<group>"; }; - F966BA3908F27A37005CB29B /* focus.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = focus.n; sourceTree = "<group>"; }; - F966BA3A08F27A37005CB29B /* focusNext.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = focusNext.n; sourceTree = "<group>"; }; - F966BA3B08F27A37005CB29B /* font.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = font.n; sourceTree = "<group>"; }; - F966BA3C08F27A37005CB29B /* FontId.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = FontId.3; sourceTree = "<group>"; }; - F966BA3D08F27A37005CB29B /* frame.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = frame.n; sourceTree = "<group>"; }; - F966BA3E08F27A37005CB29B /* FreeXId.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = FreeXId.3; sourceTree = "<group>"; }; - F966BA3F08F27A37005CB29B /* GeomReq.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GeomReq.3; sourceTree = "<group>"; }; - F966BA4008F27A37005CB29B /* GetAnchor.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetAnchor.3; sourceTree = "<group>"; }; - F966BA4108F27A37005CB29B /* GetBitmap.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetBitmap.3; sourceTree = "<group>"; }; - F966BA4208F27A37005CB29B /* GetCapStyl.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetCapStyl.3; sourceTree = "<group>"; }; - F966BA4308F27A37005CB29B /* GetClrmap.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetClrmap.3; sourceTree = "<group>"; }; - F966BA4408F27A37005CB29B /* GetColor.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetColor.3; sourceTree = "<group>"; }; - F966BA4508F27A37005CB29B /* GetCursor.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetCursor.3; sourceTree = "<group>"; }; - F966BA4608F27A37005CB29B /* GetDash.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetDash.3; sourceTree = "<group>"; }; - F966BA4708F27A37005CB29B /* GetFont.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetFont.3; sourceTree = "<group>"; }; - F966BA4808F27A37005CB29B /* GetGC.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetGC.3; sourceTree = "<group>"; }; - F966BA4908F27A37005CB29B /* GetHINSTANCE.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetHINSTANCE.3; sourceTree = "<group>"; }; - F966BA4A08F27A37005CB29B /* GetHWND.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetHWND.3; sourceTree = "<group>"; }; - F966BA4B08F27A37005CB29B /* GetImage.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetImage.3; sourceTree = "<group>"; }; - F966BA4C08F27A37005CB29B /* GetJoinStl.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetJoinStl.3; sourceTree = "<group>"; }; - F966BA4D08F27A37005CB29B /* GetJustify.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetJustify.3; sourceTree = "<group>"; }; - F966BA4E08F27A37005CB29B /* getOpenFile.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = getOpenFile.n; sourceTree = "<group>"; }; - F966BA4F08F27A37005CB29B /* GetOption.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetOption.3; sourceTree = "<group>"; }; - F966BA5008F27A38005CB29B /* GetPixels.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetPixels.3; sourceTree = "<group>"; }; - F966BA5108F27A38005CB29B /* GetPixmap.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetPixmap.3; sourceTree = "<group>"; }; - F966BA5208F27A38005CB29B /* GetRelief.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetRelief.3; sourceTree = "<group>"; }; - F966BA5308F27A38005CB29B /* GetRootCrd.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetRootCrd.3; sourceTree = "<group>"; }; - F966BA5408F27A38005CB29B /* GetScroll.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetScroll.3; sourceTree = "<group>"; }; - F966BA5508F27A38005CB29B /* GetSelect.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetSelect.3; sourceTree = "<group>"; }; - F966BA5608F27A38005CB29B /* GetUid.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetUid.3; sourceTree = "<group>"; }; - F966BA5708F27A38005CB29B /* GetVisual.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetVisual.3; sourceTree = "<group>"; }; - F966BA5808F27A38005CB29B /* GetVRoot.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetVRoot.3; sourceTree = "<group>"; }; - F966BA5908F27A38005CB29B /* Grab.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Grab.3; sourceTree = "<group>"; }; - F966BA5A08F27A38005CB29B /* grab.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = grab.n; sourceTree = "<group>"; }; - F966BA5B08F27A38005CB29B /* grid.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = grid.n; sourceTree = "<group>"; }; - F966BA5C08F27A38005CB29B /* HandleEvent.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = HandleEvent.3; sourceTree = "<group>"; }; - F966BA5D08F27A38005CB29B /* HWNDToWindow.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = HWNDToWindow.3; sourceTree = "<group>"; }; - F966BA5E08F27A38005CB29B /* IdToWindow.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = IdToWindow.3; sourceTree = "<group>"; }; - F966BA5F08F27A38005CB29B /* image.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = image.n; sourceTree = "<group>"; }; - F966BA6008F27A38005CB29B /* ImgChanged.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ImgChanged.3; sourceTree = "<group>"; }; - F966BA6108F27A38005CB29B /* Inactive.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Inactive.3; sourceTree = "<group>"; }; - F966BA6208F27A38005CB29B /* InternAtom.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = InternAtom.3; sourceTree = "<group>"; }; - F966BA6308F27A38005CB29B /* keysyms.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = keysyms.n; sourceTree = "<group>"; }; - F966BA6408F27A38005CB29B /* label.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = label.n; sourceTree = "<group>"; }; - F966BA6508F27A38005CB29B /* labelframe.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = labelframe.n; sourceTree = "<group>"; }; - F966BA6608F27A38005CB29B /* listbox.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = listbox.n; sourceTree = "<group>"; }; - F966BA6708F27A38005CB29B /* loadTk.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = loadTk.n; sourceTree = "<group>"; }; - F966BA6808F27A38005CB29B /* lower.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = lower.n; sourceTree = "<group>"; }; - F966BA6908F27A38005CB29B /* MainLoop.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = MainLoop.3; sourceTree = "<group>"; }; - F966BA6A08F27A38005CB29B /* MaintGeom.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = MaintGeom.3; sourceTree = "<group>"; }; - F966BA6B08F27A38005CB29B /* MainWin.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = MainWin.3; sourceTree = "<group>"; }; - F966BA6D08F27A38005CB29B /* ManageGeom.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ManageGeom.3; sourceTree = "<group>"; }; - F966BA6E08F27A38005CB29B /* MapWindow.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = MapWindow.3; sourceTree = "<group>"; }; - F966BA6F08F27A38005CB29B /* MeasureChar.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = MeasureChar.3; sourceTree = "<group>"; }; - F966BA7008F27A38005CB29B /* menu.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = menu.n; sourceTree = "<group>"; }; - F966BA7208F27A38005CB29B /* menubutton.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = menubutton.n; sourceTree = "<group>"; }; - F966BA7308F27A38005CB29B /* message.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = message.n; sourceTree = "<group>"; }; - F966BA7408F27A38005CB29B /* messageBox.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = messageBox.n; sourceTree = "<group>"; }; - F966BA7508F27A38005CB29B /* MoveToplev.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = MoveToplev.3; sourceTree = "<group>"; }; - F966BA7608F27A38005CB29B /* Name.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Name.3; sourceTree = "<group>"; }; - F966BA7708F27A38005CB29B /* NameOfImg.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = NameOfImg.3; sourceTree = "<group>"; }; - F966BA7808F27A38005CB29B /* option.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = option.n; sourceTree = "<group>"; }; - F966BA7908F27A38005CB29B /* optionMenu.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = optionMenu.n; sourceTree = "<group>"; }; - F966BA7A08F27A38005CB29B /* options.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = options.n; sourceTree = "<group>"; }; - F966BA7B08F27A38005CB29B /* OwnSelect.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = OwnSelect.3; sourceTree = "<group>"; }; - F966BA7D08F27A38005CB29B /* pack.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = pack.n; sourceTree = "<group>"; }; - F966BA7E08F27A38005CB29B /* palette.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = palette.n; sourceTree = "<group>"; }; - F966BA7F08F27A38005CB29B /* panedwindow.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = panedwindow.n; sourceTree = "<group>"; }; - F966BA8008F27A38005CB29B /* ParseArgv.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ParseArgv.3; sourceTree = "<group>"; }; - F966BA8108F27A38005CB29B /* photo.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = photo.n; sourceTree = "<group>"; }; - F966BA8208F27A38005CB29B /* place.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = place.n; sourceTree = "<group>"; }; - F966BA8308F27A38005CB29B /* popup.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = popup.n; sourceTree = "<group>"; }; - F966BA8408F27A38005CB29B /* QWinEvent.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = QWinEvent.3; sourceTree = "<group>"; }; - F966BA8508F27A38005CB29B /* radiobutton.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = radiobutton.n; sourceTree = "<group>"; }; - F966BA8608F27A38005CB29B /* raise.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = raise.n; sourceTree = "<group>"; }; - F966BA8708F27A38005CB29B /* Restack.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Restack.3; sourceTree = "<group>"; }; - F966BA8808F27A38005CB29B /* RestrictEv.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = RestrictEv.3; sourceTree = "<group>"; }; - F966BA8908F27A38005CB29B /* scale.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = scale.n; sourceTree = "<group>"; }; - F966BA8A08F27A38005CB29B /* scrollbar.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = scrollbar.n; sourceTree = "<group>"; }; - F966BA8B08F27A38005CB29B /* selection.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = selection.n; sourceTree = "<group>"; }; - F966BA8C08F27A38005CB29B /* send.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = send.n; sourceTree = "<group>"; }; - F966BA8D08F27A38005CB29B /* SetAppName.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SetAppName.3; sourceTree = "<group>"; }; - F966BA8E08F27A38005CB29B /* SetCaret.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SetCaret.3; sourceTree = "<group>"; }; - F966BA8F08F27A38005CB29B /* SetClass.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SetClass.3; sourceTree = "<group>"; }; - F966BA9008F27A38005CB29B /* SetClassProcs.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SetClassProcs.3; sourceTree = "<group>"; }; - F966BA9108F27A38005CB29B /* SetGrid.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SetGrid.3; sourceTree = "<group>"; }; - F966BA9208F27A38005CB29B /* SetOptions.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SetOptions.3; sourceTree = "<group>"; }; - F966BA9308F27A38005CB29B /* SetVisual.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SetVisual.3; sourceTree = "<group>"; }; - F966BA9408F27A38005CB29B /* spinbox.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = spinbox.n; sourceTree = "<group>"; }; - F966BA9508F27A38005CB29B /* StrictMotif.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = StrictMotif.3; sourceTree = "<group>"; }; - F966BA9608F27A38005CB29B /* text.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = text.n; sourceTree = "<group>"; }; - F966BA9708F27A38005CB29B /* TextLayout.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = TextLayout.3; sourceTree = "<group>"; }; - F966BA9808F27A38005CB29B /* tk.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = tk.n; sourceTree = "<group>"; }; - F966BA9A08F27A38005CB29B /* Tk_Init.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Tk_Init.3; sourceTree = "<group>"; }; - F966BA9B08F27A38005CB29B /* Tk_Main.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Tk_Main.3; sourceTree = "<group>"; }; - F966BA9C08F27A38005CB29B /* tkerror.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = tkerror.n; sourceTree = "<group>"; }; - F966BA9D08F27A38005CB29B /* TkInitStubs.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = TkInitStubs.3; sourceTree = "<group>"; }; - F966BA9E08F27A38005CB29B /* tkvars.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = tkvars.n; sourceTree = "<group>"; }; - F966BA9F08F27A38005CB29B /* tkwait.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = tkwait.n; sourceTree = "<group>"; }; - F966BAA008F27A38005CB29B /* toplevel.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = toplevel.n; sourceTree = "<group>"; }; - F966BAA108F27A38005CB29B /* WindowId.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = WindowId.3; sourceTree = "<group>"; }; - F966BAA208F27A38005CB29B /* winfo.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = winfo.n; sourceTree = "<group>"; }; - F966BAA308F27A38005CB29B /* wish.1 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = wish.1; sourceTree = "<group>"; }; - F966BAA408F27A38005CB29B /* wm.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = wm.n; sourceTree = "<group>"; }; - F966BAA608F27A38005CB29B /* default.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = default.h; sourceTree = "<group>"; }; - F966BAA708F27A38005CB29B /* ks_names.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ks_names.h; sourceTree = "<group>"; }; - F966BAA908F27A39005CB29B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; - F966BAAA08F27A39005CB29B /* tk.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tk.decls; sourceTree = "<group>"; }; - F966BAAB08F27A39005CB29B /* tk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tk.h; sourceTree = "<group>"; }; - F966BAAC08F27A39005CB29B /* tk3d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tk3d.c; sourceTree = "<group>"; }; - F966BAAD08F27A39005CB29B /* tk3d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tk3d.h; sourceTree = "<group>"; }; - F966BAAE08F27A39005CB29B /* tkArgv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkArgv.c; sourceTree = "<group>"; }; - F966BAAF08F27A39005CB29B /* tkAtom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkAtom.c; sourceTree = "<group>"; }; - F966BAB008F27A39005CB29B /* tkBind.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkBind.c; sourceTree = "<group>"; }; - F966BAB108F27A39005CB29B /* tkBitmap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkBitmap.c; sourceTree = "<group>"; }; - F966BAB208F27A39005CB29B /* tkButton.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkButton.c; sourceTree = "<group>"; }; - F966BAB308F27A39005CB29B /* tkButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkButton.h; sourceTree = "<group>"; }; - F966BAB408F27A39005CB29B /* tkCanvArc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkCanvArc.c; sourceTree = "<group>"; }; - F966BAB508F27A39005CB29B /* tkCanvas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkCanvas.c; sourceTree = "<group>"; }; - F966BAB608F27A39005CB29B /* tkCanvas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkCanvas.h; sourceTree = "<group>"; }; - F966BAB708F27A39005CB29B /* tkCanvBmap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkCanvBmap.c; sourceTree = "<group>"; }; - F966BAB808F27A39005CB29B /* tkCanvImg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkCanvImg.c; sourceTree = "<group>"; }; - F966BAB908F27A39005CB29B /* tkCanvLine.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkCanvLine.c; sourceTree = "<group>"; }; - F966BABA08F27A39005CB29B /* tkCanvPoly.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkCanvPoly.c; sourceTree = "<group>"; }; - F966BABB08F27A39005CB29B /* tkCanvPs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkCanvPs.c; sourceTree = "<group>"; }; - F966BABD08F27A39005CB29B /* tkCanvText.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkCanvText.c; sourceTree = "<group>"; }; - F966BABE08F27A39005CB29B /* tkCanvUtil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkCanvUtil.c; sourceTree = "<group>"; }; - F966BABF08F27A39005CB29B /* tkCanvWind.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkCanvWind.c; sourceTree = "<group>"; }; - F966BAC008F27A39005CB29B /* tkClipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkClipboard.c; sourceTree = "<group>"; }; - F966BAC108F27A39005CB29B /* tkCmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkCmds.c; sourceTree = "<group>"; }; - F966BAC208F27A39005CB29B /* tkColor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkColor.c; sourceTree = "<group>"; }; - F966BAC308F27A39005CB29B /* tkColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkColor.h; sourceTree = "<group>"; }; - F966BAC408F27A39005CB29B /* tkConfig.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkConfig.c; sourceTree = "<group>"; }; - F966BAC508F27A39005CB29B /* tkConsole.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkConsole.c; sourceTree = "<group>"; }; - F966BAC608F27A39005CB29B /* tkCursor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkCursor.c; sourceTree = "<group>"; }; - F966BAC708F27A39005CB29B /* tkDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkDecls.h; sourceTree = "<group>"; }; - F966BAC808F27A39005CB29B /* tkEntry.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkEntry.c; sourceTree = "<group>"; }; - F966BAC908F27A39005CB29B /* tkEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkEntry.h; sourceTree = "<group>"; }; - F966BACA08F27A39005CB29B /* tkError.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkError.c; sourceTree = "<group>"; }; - F966BACB08F27A39005CB29B /* tkEvent.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkEvent.c; sourceTree = "<group>"; }; - F966BACC08F27A39005CB29B /* tkFileFilter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkFileFilter.c; sourceTree = "<group>"; }; - F966BACD08F27A39005CB29B /* tkFileFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkFileFilter.h; sourceTree = "<group>"; }; - F966BACE08F27A39005CB29B /* tkFocus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkFocus.c; sourceTree = "<group>"; }; - F966BACF08F27A39005CB29B /* tkFont.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkFont.c; sourceTree = "<group>"; }; - F966BAD008F27A39005CB29B /* tkFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkFont.h; sourceTree = "<group>"; }; - F966BAD108F27A39005CB29B /* tkFrame.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkFrame.c; sourceTree = "<group>"; }; - F966BAD208F27A39005CB29B /* tkGC.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkGC.c; sourceTree = "<group>"; }; - F966BAD308F27A39005CB29B /* tkGeometry.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkGeometry.c; sourceTree = "<group>"; }; - F966BAD408F27A39005CB29B /* tkGet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkGet.c; sourceTree = "<group>"; }; - F966BAD508F27A39005CB29B /* tkGrab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkGrab.c; sourceTree = "<group>"; }; - F966BAD608F27A39005CB29B /* tkGrid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkGrid.c; sourceTree = "<group>"; }; - F966BAD708F27A39005CB29B /* tkImage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkImage.c; sourceTree = "<group>"; }; - F966BAD808F27A39005CB29B /* tkImgBmap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkImgBmap.c; sourceTree = "<group>"; }; - F966BAD908F27A39005CB29B /* tkImgGIF.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkImgGIF.c; sourceTree = "<group>"; }; - F966BADA08F27A39005CB29B /* tkImgPhoto.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkImgPhoto.c; sourceTree = "<group>"; }; - F966BADB08F27A39005CB29B /* tkImgPPM.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkImgPPM.c; sourceTree = "<group>"; }; - F966BADC08F27A39005CB29B /* tkImgUtil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkImgUtil.c; sourceTree = "<group>"; }; - F966BADE08F27A39005CB29B /* tkInt.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tkInt.decls; sourceTree = "<group>"; }; - F966BADF08F27A39005CB29B /* tkInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkInt.h; sourceTree = "<group>"; }; - F966BAE108F27A39005CB29B /* tkIntDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkIntDecls.h; sourceTree = "<group>"; }; - F966BAE208F27A39005CB29B /* tkIntPlatDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkIntPlatDecls.h; sourceTree = "<group>"; }; - F966BAE308F27A39005CB29B /* tkIntXlibDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkIntXlibDecls.h; sourceTree = "<group>"; }; - F966BAE408F27A39005CB29B /* tkListbox.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkListbox.c; sourceTree = "<group>"; }; - F966BAE508F27A39005CB29B /* tkMacWinMenu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkMacWinMenu.c; sourceTree = "<group>"; }; - F966BAE608F27A39005CB29B /* tkMain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkMain.c; sourceTree = "<group>"; }; - F966BAE708F27A39005CB29B /* tkMenu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkMenu.c; sourceTree = "<group>"; }; - F966BAE808F27A39005CB29B /* tkMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMenu.h; sourceTree = "<group>"; }; - F966BAE908F27A39005CB29B /* tkMenubutton.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkMenubutton.c; sourceTree = "<group>"; }; - F966BAEA08F27A39005CB29B /* tkMenubutton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMenubutton.h; sourceTree = "<group>"; }; - F966BAEB08F27A39005CB29B /* tkMenuDraw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkMenuDraw.c; sourceTree = "<group>"; }; - F966BAEC08F27A39005CB29B /* tkMessage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkMessage.c; sourceTree = "<group>"; }; - F966BAED08F27A39005CB29B /* tkObj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkObj.c; sourceTree = "<group>"; }; - F966BAEE08F27A39005CB29B /* tkOldConfig.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkOldConfig.c; sourceTree = "<group>"; }; - F966BAEF08F27A39005CB29B /* tkOption.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkOption.c; sourceTree = "<group>"; }; - F966BAF008F27A39005CB29B /* tkPack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkPack.c; sourceTree = "<group>"; }; - F966BAF108F27A39005CB29B /* tkPanedWindow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkPanedWindow.c; sourceTree = "<group>"; }; - F966BAF208F27A39005CB29B /* tkPlace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkPlace.c; sourceTree = "<group>"; }; - F966BAF308F27A39005CB29B /* tkPlatDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkPlatDecls.h; sourceTree = "<group>"; }; - F966BAF408F27A39005CB29B /* tkPointer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkPointer.c; sourceTree = "<group>"; }; - F966BAF508F27A39005CB29B /* tkPort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkPort.h; sourceTree = "<group>"; }; - F966BAF608F27A39005CB29B /* tkRectOval.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkRectOval.c; sourceTree = "<group>"; }; - F966BAF708F27A39005CB29B /* tkScale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkScale.c; sourceTree = "<group>"; }; - F966BAF808F27A39005CB29B /* tkScale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkScale.h; sourceTree = "<group>"; }; - F966BAF908F27A39005CB29B /* tkScrollbar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkScrollbar.c; sourceTree = "<group>"; }; - F966BAFA08F27A39005CB29B /* tkScrollbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkScrollbar.h; sourceTree = "<group>"; }; - F966BAFB08F27A39005CB29B /* tkSelect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkSelect.c; sourceTree = "<group>"; }; - F966BAFC08F27A39005CB29B /* tkSelect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkSelect.h; sourceTree = "<group>"; }; - F966BAFD08F27A39005CB29B /* tkSquare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkSquare.c; sourceTree = "<group>"; }; - F966BAFF08F27A39005CB29B /* tkStubInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkStubInit.c; sourceTree = "<group>"; }; - F966BB0008F27A39005CB29B /* tkStubLib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkStubLib.c; sourceTree = "<group>"; }; - F966BB0108F27A39005CB29B /* tkStyle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkStyle.c; sourceTree = "<group>"; }; - F966BB0208F27A39005CB29B /* tkTest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkTest.c; sourceTree = "<group>"; }; - F966BB0308F27A39005CB29B /* tkText.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkText.c; sourceTree = "<group>"; }; - F966BB0408F27A39005CB29B /* tkText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkText.h; sourceTree = "<group>"; }; - F966BB0508F27A39005CB29B /* tkTextBTree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkTextBTree.c; sourceTree = "<group>"; }; - F966BB0608F27A39005CB29B /* tkTextDisp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkTextDisp.c; sourceTree = "<group>"; }; - F966BB0808F27A39005CB29B /* tkTextImage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkTextImage.c; sourceTree = "<group>"; }; - F966BB0908F27A39005CB29B /* tkTextIndex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkTextIndex.c; sourceTree = "<group>"; }; - F966BB0A08F27A39005CB29B /* tkTextMark.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkTextMark.c; sourceTree = "<group>"; }; - F966BB0B08F27A39005CB29B /* tkTextTag.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkTextTag.c; sourceTree = "<group>"; }; - F966BB0C08F27A39005CB29B /* tkTextWind.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkTextWind.c; sourceTree = "<group>"; }; - F966BB0D08F27A39005CB29B /* tkTrig.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkTrig.c; sourceTree = "<group>"; }; - F966BB0E08F27A39005CB29B /* tkUndo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUndo.c; sourceTree = "<group>"; }; - F966BB0F08F27A39005CB29B /* tkUndo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkUndo.h; sourceTree = "<group>"; }; - F966BB1008F27A39005CB29B /* tkUtil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUtil.c; sourceTree = "<group>"; }; - F966BB1108F27A39005CB29B /* tkVisual.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkVisual.c; sourceTree = "<group>"; }; - F966BB1208F27A39005CB29B /* tkWindow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWindow.c; sourceTree = "<group>"; }; - F966BB1408F27A39005CB29B /* bgerror.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = bgerror.tcl; sourceTree = "<group>"; }; - F966BB1508F27A39005CB29B /* button.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = button.tcl; sourceTree = "<group>"; }; - F966BB1608F27A39005CB29B /* choosedir.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = choosedir.tcl; sourceTree = "<group>"; }; - F966BB1708F27A39005CB29B /* clrpick.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = clrpick.tcl; sourceTree = "<group>"; }; - F966BB1808F27A39005CB29B /* comdlg.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = comdlg.tcl; sourceTree = "<group>"; }; - F966BB1908F27A39005CB29B /* console.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = console.tcl; sourceTree = "<group>"; }; - F966BB1B08F27A39005CB29B /* anilabel.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = anilabel.tcl; sourceTree = "<group>"; }; - F966BB1C08F27A39005CB29B /* aniwave.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = aniwave.tcl; sourceTree = "<group>"; }; - F966BB1D08F27A39005CB29B /* arrow.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = arrow.tcl; sourceTree = "<group>"; }; - F966BB1E08F27A39005CB29B /* bind.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = bind.tcl; sourceTree = "<group>"; }; - F966BB1F08F27A39005CB29B /* bitmap.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = bitmap.tcl; sourceTree = "<group>"; }; - F966BB2008F27A39005CB29B /* browse */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = browse; sourceTree = "<group>"; }; - F966BB2108F27A39005CB29B /* button.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = button.tcl; sourceTree = "<group>"; }; - F966BB2208F27A39005CB29B /* check.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = check.tcl; sourceTree = "<group>"; }; - F966BB2308F27A39005CB29B /* clrpick.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = clrpick.tcl; sourceTree = "<group>"; }; - F966BB2408F27A39005CB29B /* colors.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = colors.tcl; sourceTree = "<group>"; }; - F966BB2508F27A39005CB29B /* cscroll.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = cscroll.tcl; sourceTree = "<group>"; }; - F966BB2608F27A39005CB29B /* ctext.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ctext.tcl; sourceTree = "<group>"; }; - F966BB2708F27A39005CB29B /* dialog1.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = dialog1.tcl; sourceTree = "<group>"; }; - F966BB2808F27A39005CB29B /* dialog2.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = dialog2.tcl; sourceTree = "<group>"; }; - F966BB2A08F27A39005CB29B /* entry1.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = entry1.tcl; sourceTree = "<group>"; }; - F966BB2B08F27A39005CB29B /* entry2.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = entry2.tcl; sourceTree = "<group>"; }; - F966BB2C08F27A39005CB29B /* entry3.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = entry3.tcl; sourceTree = "<group>"; }; - F966BB2D08F27A39005CB29B /* filebox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = filebox.tcl; sourceTree = "<group>"; }; - F966BB2E08F27A39005CB29B /* floor.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = floor.tcl; sourceTree = "<group>"; }; - F966BB2F08F27A39005CB29B /* form.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = form.tcl; sourceTree = "<group>"; }; - F966BB3008F27A39005CB29B /* goldberg.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = goldberg.tcl; sourceTree = "<group>"; }; - F966BB3108F27A39005CB29B /* hello */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = hello; sourceTree = "<group>"; }; - F966BB3208F27A39005CB29B /* hscale.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = hscale.tcl; sourceTree = "<group>"; }; - F966BB3308F27A39005CB29B /* icon.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = icon.tcl; sourceTree = "<group>"; }; - F966BB3408F27A39005CB29B /* image1.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = image1.tcl; sourceTree = "<group>"; }; - F966BB3508F27A39005CB29B /* image2.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = image2.tcl; sourceTree = "<group>"; }; - F966BB4208F27A3A005CB29B /* items.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = items.tcl; sourceTree = "<group>"; }; - F966BB4308F27A3A005CB29B /* ixset */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = ixset; sourceTree = "<group>"; }; - F966BB4408F27A3A005CB29B /* label.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = label.tcl; sourceTree = "<group>"; }; - F966BB4508F27A3A005CB29B /* labelframe.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = labelframe.tcl; sourceTree = "<group>"; }; - F966BB4608F27A3A005CB29B /* menu.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = menu.tcl; sourceTree = "<group>"; }; - F966BB4708F27A3A005CB29B /* menubu.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = menubu.tcl; sourceTree = "<group>"; }; - F966BB4808F27A3A005CB29B /* msgbox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = msgbox.tcl; sourceTree = "<group>"; }; - F966BB4A08F27A3A005CB29B /* paned1.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = paned1.tcl; sourceTree = "<group>"; }; - F966BB4B08F27A3A005CB29B /* paned2.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = paned2.tcl; sourceTree = "<group>"; }; - F966BB4C08F27A3A005CB29B /* pendulum.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pendulum.tcl; sourceTree = "<group>"; }; - F966BB4D08F27A3A005CB29B /* plot.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = plot.tcl; sourceTree = "<group>"; }; - F966BB4E08F27A3A005CB29B /* puzzle.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = puzzle.tcl; sourceTree = "<group>"; }; - F966BB4F08F27A3A005CB29B /* radio.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = radio.tcl; sourceTree = "<group>"; }; - F966BB5008F27A3A005CB29B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; - F966BB5108F27A3A005CB29B /* rmt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = rmt; sourceTree = "<group>"; }; - F966BB5208F27A3A005CB29B /* rolodex */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = rolodex; sourceTree = "<group>"; }; - F966BB5308F27A3A005CB29B /* ruler.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ruler.tcl; sourceTree = "<group>"; }; - F966BB5408F27A3A005CB29B /* sayings.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = sayings.tcl; sourceTree = "<group>"; }; - F966BB5508F27A3A005CB29B /* search.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = search.tcl; sourceTree = "<group>"; }; - F966BB5608F27A3A005CB29B /* spin.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = spin.tcl; sourceTree = "<group>"; }; - F966BB5708F27A3A005CB29B /* square */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = square; sourceTree = "<group>"; }; - F966BB5808F27A3A005CB29B /* states.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = states.tcl; sourceTree = "<group>"; }; - F966BB5908F27A3A005CB29B /* style.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = style.tcl; sourceTree = "<group>"; }; - F966BB5A08F27A3A005CB29B /* tclIndex */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclIndex; sourceTree = "<group>"; }; - F966BB5B08F27A3A005CB29B /* tcolor */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = tcolor; sourceTree = "<group>"; }; - F966BB5C08F27A3A005CB29B /* text.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = text.tcl; sourceTree = "<group>"; }; - F966BB5D08F27A3A005CB29B /* timer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = timer; sourceTree = "<group>"; }; - F966BB5E08F27A3A005CB29B /* twind.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = twind.tcl; sourceTree = "<group>"; }; - F966BB5F08F27A3A005CB29B /* unicodeout.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unicodeout.tcl; sourceTree = "<group>"; }; - F966BB6008F27A3A005CB29B /* vscale.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = vscale.tcl; sourceTree = "<group>"; }; - F966BB6108F27A3A005CB29B /* widget */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = widget; sourceTree = "<group>"; }; - F966BB6208F27A3A005CB29B /* dialog.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = dialog.tcl; sourceTree = "<group>"; }; - F966BB6308F27A3A005CB29B /* entry.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = entry.tcl; sourceTree = "<group>"; }; - F966BB6408F27A3A005CB29B /* focus.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = focus.tcl; sourceTree = "<group>"; }; - F966BB7308F27A3A005CB29B /* listbox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = listbox.tcl; sourceTree = "<group>"; }; - F966BB7408F27A3A005CB29B /* menu.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = menu.tcl; sourceTree = "<group>"; }; - F966BB7508F27A3A005CB29B /* mkpsenc.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = mkpsenc.tcl; sourceTree = "<group>"; }; - F966BB7608F27A3A005CB29B /* msgbox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = msgbox.tcl; sourceTree = "<group>"; }; - F966BB8708F27A3A005CB29B /* optMenu.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = optMenu.tcl; sourceTree = "<group>"; }; - F966BB8808F27A3A005CB29B /* palette.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = palette.tcl; sourceTree = "<group>"; }; - F966BB8908F27A3B005CB29B /* panedwindow.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = panedwindow.tcl; sourceTree = "<group>"; }; - F966BB8B08F27A3B005CB29B /* safetk.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = safetk.tcl; sourceTree = "<group>"; }; - F966BB8C08F27A3B005CB29B /* scale.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = scale.tcl; sourceTree = "<group>"; }; - F966BB8D08F27A3B005CB29B /* scrlbar.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = scrlbar.tcl; sourceTree = "<group>"; }; - F966BB8E08F27A3B005CB29B /* spinbox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = spinbox.tcl; sourceTree = "<group>"; }; - F966BB8F08F27A3B005CB29B /* tclIndex */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclIndex; sourceTree = "<group>"; }; - F966BB9008F27A3B005CB29B /* tearoff.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tearoff.tcl; sourceTree = "<group>"; }; - F966BB9108F27A3B005CB29B /* text.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = text.tcl; sourceTree = "<group>"; }; - F966BB9208F27A3B005CB29B /* tk.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tk.tcl; sourceTree = "<group>"; }; - F966BB9308F27A3B005CB29B /* tkfbox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tkfbox.tcl; sourceTree = "<group>"; }; - F966BB9508F27A3B005CB29B /* xmfbox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = xmfbox.tcl; sourceTree = "<group>"; }; - F966BB9608F27A3B005CB29B /* license.terms */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = license.terms; sourceTree = "<group>"; }; - F966BBBA08F27A3B005CB29B /* configure.ac */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure.ac; sourceTree = "<group>"; }; - F966BBBB08F27A3B005CB29B /* GNUmakefile */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = GNUmakefile; sourceTree = "<group>"; }; - F966BBBE08F27A3B005CB29B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; - F966BBC008F27A3B005CB29B /* Tk-Info.plist.in */ = {isa = PBXFileReference; explicitFileType = text.plist; fileEncoding = 4; path = "Tk-Info.plist.in"; sourceTree = "<group>"; }; - F966BBC208F27A3B005CB29B /* tkMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSX.h; sourceTree = "<group>"; }; - F966BBC508F27A3B005CB29B /* tkMacOSXBitmap.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXBitmap.c; sourceTree = "<group>"; }; - F966BBC608F27A3B005CB29B /* tkMacOSXButton.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXButton.c; sourceTree = "<group>"; }; - F966BBC808F27A3B005CB29B /* tkMacOSXClipboard.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXClipboard.c; sourceTree = "<group>"; }; - F966BBC908F27A3B005CB29B /* tkMacOSXColor.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXColor.c; sourceTree = "<group>"; }; - F966BBCA08F27A3B005CB29B /* tkMacOSXConfig.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXConfig.c; sourceTree = "<group>"; }; - F966BBCB08F27A3B005CB29B /* tkMacOSXCursor.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXCursor.c; sourceTree = "<group>"; }; - F966BBCC08F27A3B005CB29B /* tkMacOSXCursors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXCursors.h; sourceTree = "<group>"; }; - F966BBCD08F27A3B005CB29B /* tkMacOSXDebug.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXDebug.c; sourceTree = "<group>"; }; - F966BBCE08F27A3B005CB29B /* tkMacOSXDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXDebug.h; sourceTree = "<group>"; }; - F966BBCF08F27A3B005CB29B /* tkMacOSXDefault.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXDefault.h; sourceTree = "<group>"; }; - F966BBD008F27A3B005CB29B /* tkMacOSXDialog.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXDialog.c; sourceTree = "<group>"; }; - F966BBD108F27A3B005CB29B /* tkMacOSXDraw.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXDraw.c; sourceTree = "<group>"; }; - F966BBD208F27A3B005CB29B /* tkMacOSXEmbed.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEmbed.c; sourceTree = "<group>"; }; - F966BBD308F27A3B005CB29B /* tkMacOSXEntry.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEntry.c; sourceTree = "<group>"; }; - F966BBD408F27A3B005CB29B /* tkMacOSXEvent.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEvent.c; sourceTree = "<group>"; }; - F966BBD608F27A3B005CB29B /* tkMacOSXFont.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXFont.c; sourceTree = "<group>"; }; - F966BBD708F27A3B005CB29B /* tkMacOSXHLEvents.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXHLEvents.c; sourceTree = "<group>"; }; - F966BBD808F27A3B005CB29B /* tkMacOSXInit.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXInit.c; sourceTree = "<group>"; }; - F966BBDA08F27A3B005CB29B /* tkMacOSXInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXInt.h; sourceTree = "<group>"; }; - F966BBDB08F27A3B005CB29B /* tkMacOSXKeyboard.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXKeyboard.c; sourceTree = "<group>"; }; - F966BBDC08F27A3B005CB29B /* tkMacOSXKeyEvent.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXKeyEvent.c; sourceTree = "<group>"; }; - F966BBDD08F27A3B005CB29B /* tkMacOSXMenu.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXMenu.c; sourceTree = "<group>"; }; - F966BBE008F27A3B005CB29B /* tkMacOSXMenubutton.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXMenubutton.c; sourceTree = "<group>"; }; - F966BBE108F27A3B005CB29B /* tkMacOSXMenus.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXMenus.c; sourceTree = "<group>"; }; - F966BBE208F27A3B005CB29B /* tkMacOSXMouseEvent.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXMouseEvent.c; sourceTree = "<group>"; }; - F966BBE308F27A3B005CB29B /* tkMacOSXNotify.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXNotify.c; sourceTree = "<group>"; }; - F966BBEA08F27A3C005CB29B /* tkMacOSXPort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXPort.h; sourceTree = "<group>"; }; - F966BBEB08F27A3C005CB29B /* tkMacOSXRegion.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXRegion.c; sourceTree = "<group>"; }; - F966BBEC08F27A3C005CB29B /* tkMacOSXScale.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXScale.c; sourceTree = "<group>"; }; - F966BBED08F27A3C005CB29B /* tkMacOSXScrlbr.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXScrlbr.c; sourceTree = "<group>"; }; - F966BBEE08F27A3C005CB29B /* tkMacOSXSend.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXSend.c; sourceTree = "<group>"; }; - F966BBEF08F27A3C005CB29B /* tkMacOSXSubwindows.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXSubwindows.c; sourceTree = "<group>"; }; - F966BBF008F27A3C005CB29B /* tkMacOSXTest.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXTest.c; sourceTree = "<group>"; }; - F966BBF108F27A3C005CB29B /* tkMacOSXWindowEvent.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXWindowEvent.c; sourceTree = "<group>"; }; - F966BBF208F27A3C005CB29B /* tkMacOSXWm.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXWm.c; sourceTree = "<group>"; }; - F966BBF308F27A3C005CB29B /* tkMacOSXWm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXWm.h; sourceTree = "<group>"; }; - F966BBF408F27A3C005CB29B /* tkMacOSXXCursors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXXCursors.h; sourceTree = "<group>"; }; - F966BBF508F27A3C005CB29B /* tkMacOSXXStubs.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXXStubs.c; sourceTree = "<group>"; }; - F966BBF708F27A3C005CB29B /* Wish-Info.plist.in */ = {isa = PBXFileReference; explicitFileType = text.plist; fileEncoding = 4; path = "Wish-Info.plist.in"; sourceTree = "<group>"; }; - F966BC0308F27A3C005CB29B /* README */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = README; sourceTree = "<group>"; }; - F966BC0508F27A3C005CB29B /* all.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = all.tcl; sourceTree = "<group>"; }; - F966BC0608F27A3C005CB29B /* arc.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = arc.tcl; sourceTree = "<group>"; }; - F966BC0708F27A3C005CB29B /* bell.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = bell.test; sourceTree = "<group>"; }; - F966BC0808F27A3C005CB29B /* bevel.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = bevel.tcl; sourceTree = "<group>"; }; - F966BC0908F27A3C005CB29B /* bgerror.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = bgerror.test; sourceTree = "<group>"; }; - F966BC0A08F27A3C005CB29B /* bind.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = bind.test; sourceTree = "<group>"; }; - F966BC0B08F27A3C005CB29B /* bitmap.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = bitmap.test; sourceTree = "<group>"; }; - F966BC0C08F27A3C005CB29B /* border.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = border.test; sourceTree = "<group>"; }; - F966BC0D08F27A3C005CB29B /* bugs.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = bugs.tcl; sourceTree = "<group>"; }; - F966BC0E08F27A3C005CB29B /* butGeom.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = butGeom.tcl; sourceTree = "<group>"; }; - F966BC0F08F27A3C005CB29B /* butGeom2.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = butGeom2.tcl; sourceTree = "<group>"; }; - F966BC1008F27A3C005CB29B /* button.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = button.test; sourceTree = "<group>"; }; - F966BC1108F27A3C005CB29B /* canvas.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = canvas.test; sourceTree = "<group>"; }; - F966BC1208F27A3C005CB29B /* canvImg.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = canvImg.test; sourceTree = "<group>"; }; - F966BC1308F27A3C005CB29B /* canvPs.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = canvPs.test; sourceTree = "<group>"; }; - F966BC1408F27A3C005CB29B /* canvPsArc.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = canvPsArc.tcl; sourceTree = "<group>"; }; - F966BC1508F27A3C005CB29B /* canvPsBmap.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = canvPsBmap.tcl; sourceTree = "<group>"; }; - F966BC1608F27A3C005CB29B /* canvPsGrph.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = canvPsGrph.tcl; sourceTree = "<group>"; }; - F966BC1708F27A3C005CB29B /* canvPsImg.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = canvPsImg.tcl; sourceTree = "<group>"; }; - F966BC1808F27A3C005CB29B /* canvPsText.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = canvPsText.tcl; sourceTree = "<group>"; }; - F966BC1908F27A3C005CB29B /* canvRect.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = canvRect.test; sourceTree = "<group>"; }; - F966BC1A08F27A3C005CB29B /* canvText.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = canvText.test; sourceTree = "<group>"; }; - F966BC1B08F27A3C005CB29B /* canvWind.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = canvWind.test; sourceTree = "<group>"; }; - F966BC1C08F27A3C005CB29B /* choosedir.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = choosedir.test; sourceTree = "<group>"; }; - F966BC1D08F27A3C005CB29B /* clipboard.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = clipboard.test; sourceTree = "<group>"; }; - F966BC1E08F27A3C005CB29B /* clrpick.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = clrpick.test; sourceTree = "<group>"; }; - F966BC1F08F27A3C005CB29B /* cmap.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = cmap.tcl; sourceTree = "<group>"; }; - F966BC2008F27A3C005CB29B /* cmds.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = cmds.test; sourceTree = "<group>"; }; - F966BC2108F27A3C005CB29B /* color.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = color.test; sourceTree = "<group>"; }; - F966BC2208F27A3C005CB29B /* config.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = config.test; sourceTree = "<group>"; }; - F966BC2308F27A3C005CB29B /* constraints.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = constraints.tcl; sourceTree = "<group>"; }; - F966BC2408F27A3C005CB29B /* cursor.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = cursor.test; sourceTree = "<group>"; }; - F966BC2508F27A3C005CB29B /* dialog.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = dialog.test; sourceTree = "<group>"; }; - F966BC2608F27A3C005CB29B /* embed.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = embed.test; sourceTree = "<group>"; }; - F966BC2708F27A3C005CB29B /* entry.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = entry.test; sourceTree = "<group>"; }; - F966BC2808F27A3C005CB29B /* event.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = event.test; sourceTree = "<group>"; }; - F966BC2908F27A3C005CB29B /* filebox.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = filebox.test; sourceTree = "<group>"; }; - F966BC2A08F27A3C005CB29B /* focus.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = focus.test; sourceTree = "<group>"; }; - F966BC2B08F27A3C005CB29B /* focusTcl.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = focusTcl.test; sourceTree = "<group>"; }; - F966BC2C08F27A3C005CB29B /* font.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = font.test; sourceTree = "<group>"; }; - F966BC2D08F27A3C005CB29B /* frame.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = frame.test; sourceTree = "<group>"; }; - F966BC2E08F27A3C005CB29B /* geometry.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = geometry.test; sourceTree = "<group>"; }; - F966BC2F08F27A3C005CB29B /* get.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = get.test; sourceTree = "<group>"; }; - F966BC3008F27A3C005CB29B /* grab.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = grab.test; sourceTree = "<group>"; }; - F966BC3108F27A3C005CB29B /* grid.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = grid.test; sourceTree = "<group>"; }; - F966BC3308F27A3C005CB29B /* image.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = image.test; sourceTree = "<group>"; }; - F966BC3408F27A3C005CB29B /* imgBmap.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = imgBmap.test; sourceTree = "<group>"; }; - F966BC3508F27A3C005CB29B /* imgPhoto.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = imgPhoto.test; sourceTree = "<group>"; }; - F966BC3608F27A3C005CB29B /* imgPPM.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = imgPPM.test; sourceTree = "<group>"; }; - F966BC3708F27A3C005CB29B /* listbox.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = listbox.test; sourceTree = "<group>"; }; - F966BC3808F27A3C005CB29B /* main.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = main.test; sourceTree = "<group>"; }; - F966BC3908F27A3C005CB29B /* menu.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = menu.test; sourceTree = "<group>"; }; - F966BC3A08F27A3C005CB29B /* menubut.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = menubut.test; sourceTree = "<group>"; }; - F966BC3B08F27A3C005CB29B /* menuDraw.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = menuDraw.test; sourceTree = "<group>"; }; - F966BC3C08F27A3C005CB29B /* message.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = message.test; sourceTree = "<group>"; }; - F966BC3D08F27A3C005CB29B /* msgbox.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = msgbox.test; sourceTree = "<group>"; }; - F966BC3E08F27A3C005CB29B /* obj.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = obj.test; sourceTree = "<group>"; }; - F966BC4008F27A3C005CB29B /* option.file1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = option.file1; sourceTree = "<group>"; }; - F966BC4108F27A3C005CB29B /* option.file2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = option.file2; sourceTree = "<group>"; }; - F966BC4208F27A3C005CB29B /* option.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = option.test; sourceTree = "<group>"; }; - F966BC4308F27A3C005CB29B /* pack.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pack.test; sourceTree = "<group>"; }; - F966BC4408F27A3C005CB29B /* panedwindow.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = panedwindow.test; sourceTree = "<group>"; }; - F966BC4508F27A3D005CB29B /* place.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = place.test; sourceTree = "<group>"; }; - F966BC4608F27A3D005CB29B /* raise.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = raise.test; sourceTree = "<group>"; }; - F966BC4708F27A3D005CB29B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; - F966BC4808F27A3D005CB29B /* safe.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = safe.test; sourceTree = "<group>"; }; - F966BC4908F27A3D005CB29B /* scale.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = scale.test; sourceTree = "<group>"; }; - F966BC4A08F27A3D005CB29B /* scrollbar.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = scrollbar.test; sourceTree = "<group>"; }; - F966BC4B08F27A3D005CB29B /* select.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = select.test; sourceTree = "<group>"; }; - F966BC4C08F27A3D005CB29B /* send.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = send.test; sourceTree = "<group>"; }; - F966BC4D08F27A3D005CB29B /* spinbox.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = spinbox.test; sourceTree = "<group>"; }; - F966BC4E08F27A3D005CB29B /* text.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = text.test; sourceTree = "<group>"; }; - F966BC4F08F27A3D005CB29B /* textBTree.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = textBTree.test; sourceTree = "<group>"; }; - F966BC5008F27A3D005CB29B /* textDisp.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = textDisp.test; sourceTree = "<group>"; }; - F966BC5108F27A3D005CB29B /* textImage.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = textImage.test; sourceTree = "<group>"; }; - F966BC5208F27A3D005CB29B /* textIndex.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = textIndex.test; sourceTree = "<group>"; }; - F966BC5308F27A3D005CB29B /* textMark.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = textMark.test; sourceTree = "<group>"; }; - F966BC5408F27A3D005CB29B /* textTag.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = textTag.test; sourceTree = "<group>"; }; - F966BC5508F27A3D005CB29B /* textWind.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = textWind.test; sourceTree = "<group>"; }; - F966BC5608F27A3D005CB29B /* tk.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tk.test; sourceTree = "<group>"; }; - F966BC5708F27A3D005CB29B /* unixButton.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unixButton.test; sourceTree = "<group>"; }; - F966BC5808F27A3D005CB29B /* unixEmbed.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unixEmbed.test; sourceTree = "<group>"; }; - F966BC5908F27A3D005CB29B /* unixFont.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unixFont.test; sourceTree = "<group>"; }; - F966BC5A08F27A3D005CB29B /* unixMenu.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unixMenu.test; sourceTree = "<group>"; }; - F966BC5B08F27A3D005CB29B /* unixSelect.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unixSelect.test; sourceTree = "<group>"; }; - F966BC5C08F27A3D005CB29B /* unixWm.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unixWm.test; sourceTree = "<group>"; }; - F966BC5D08F27A3D005CB29B /* util.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = util.test; sourceTree = "<group>"; }; - F966BC5E08F27A3D005CB29B /* visual.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = visual.test; sourceTree = "<group>"; }; - F966BC5F08F27A3D005CB29B /* visual_bb.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = visual_bb.test; sourceTree = "<group>"; }; - F966BC6008F27A3D005CB29B /* winButton.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winButton.test; sourceTree = "<group>"; }; - F966BC6108F27A3D005CB29B /* winClipboard.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winClipboard.test; sourceTree = "<group>"; }; - F966BC6208F27A3D005CB29B /* winDialog.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winDialog.test; sourceTree = "<group>"; }; - F966BC6308F27A3D005CB29B /* window.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = window.test; sourceTree = "<group>"; }; - F966BC6408F27A3D005CB29B /* winfo.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winfo.test; sourceTree = "<group>"; }; - F966BC6508F27A3D005CB29B /* winFont.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winFont.test; sourceTree = "<group>"; }; - 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.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>"; }; - F966BC7608F27A3D005CB29B /* tkConfig.h.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = tkConfig.h.in; sourceTree = "<group>"; }; - F966BC7708F27A3D005CB29B /* tkConfig.sh.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tkConfig.sh.in; sourceTree = "<group>"; }; - F966BC7808F27A3D005CB29B /* tkUnix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnix.c; sourceTree = "<group>"; }; - F966BC7908F27A3D005CB29B /* tkUnix3d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnix3d.c; sourceTree = "<group>"; }; - F966BC7A08F27A3D005CB29B /* tkUnixButton.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixButton.c; sourceTree = "<group>"; }; - F966BC7B08F27A3D005CB29B /* tkUnixColor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixColor.c; sourceTree = "<group>"; }; - F966BC7C08F27A3D005CB29B /* tkUnixConfig.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixConfig.c; sourceTree = "<group>"; }; - F966BC7D08F27A3D005CB29B /* tkUnixCursor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixCursor.c; sourceTree = "<group>"; }; - F966BC7E08F27A3D005CB29B /* tkUnixDefault.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkUnixDefault.h; sourceTree = "<group>"; }; - F966BC8008F27A3D005CB29B /* tkUnixDraw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixDraw.c; sourceTree = "<group>"; }; - F966BC8108F27A3D005CB29B /* tkUnixEmbed.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixEmbed.c; sourceTree = "<group>"; }; - F966BC8208F27A3D005CB29B /* tkUnixEvent.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixEvent.c; sourceTree = "<group>"; }; - F966BC8308F27A3D005CB29B /* tkUnixFocus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixFocus.c; sourceTree = "<group>"; }; - F966BC8408F27A3D005CB29B /* tkUnixFont.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixFont.c; sourceTree = "<group>"; }; - F966BC8508F27A3D005CB29B /* tkUnixInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixInit.c; sourceTree = "<group>"; }; - F966BC8608F27A3D005CB29B /* tkUnixInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkUnixInt.h; sourceTree = "<group>"; }; - F966BC8708F27A3D005CB29B /* tkUnixKey.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixKey.c; sourceTree = "<group>"; }; - F966BC8808F27A3D005CB29B /* tkUnixMenu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixMenu.c; sourceTree = "<group>"; }; - F966BC8908F27A3D005CB29B /* tkUnixMenubu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixMenubu.c; sourceTree = "<group>"; }; - F966BC8A08F27A3D005CB29B /* tkUnixPort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkUnixPort.h; sourceTree = "<group>"; }; - F966BC8B08F27A3D005CB29B /* tkUnixRFont.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixRFont.c; sourceTree = "<group>"; }; - F966BC8C08F27A3D005CB29B /* tkUnixScale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixScale.c; sourceTree = "<group>"; }; - F966BC8D08F27A3D005CB29B /* tkUnixScrlbr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkUnixScrlbr.c; sourceTree = "<group>"; }; - 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.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; 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>"; }; - 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>"; }; - F966BCF208F27A3E005CB29B /* wish.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wish.rc; sourceTree = "<group>"; }; - F966BCF308F27A3E005CB29B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; - F966BCF508F27A3F005CB29B /* rules.vc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rules.vc; sourceTree = "<group>"; }; - F966BCF608F27A3F005CB29B /* stubs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stubs.c; sourceTree = "<group>"; }; - F966BCF708F27A3F005CB29B /* tcl.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tcl.m4; sourceTree = "<group>"; }; - F966BCF808F27A3F005CB29B /* tkConfig.sh.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tkConfig.sh.in; sourceTree = "<group>"; }; - F966BCF908F27A3F005CB29B /* tkWin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkWin.h; sourceTree = "<group>"; }; - F966BCFA08F27A3F005CB29B /* tkWin32Dll.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWin32Dll.c; sourceTree = "<group>"; }; - F966BCFB08F27A3F005CB29B /* tkWin3d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWin3d.c; sourceTree = "<group>"; }; - F966BCFC08F27A3F005CB29B /* tkWinButton.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinButton.c; sourceTree = "<group>"; }; - F966BCFD08F27A3F005CB29B /* tkWinClipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinClipboard.c; sourceTree = "<group>"; }; - F966BCFE08F27A3F005CB29B /* tkWinColor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinColor.c; sourceTree = "<group>"; }; - F966BCFF08F27A3F005CB29B /* tkWinConfig.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinConfig.c; sourceTree = "<group>"; }; - F966BD0008F27A3F005CB29B /* tkWinCursor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinCursor.c; sourceTree = "<group>"; }; - F966BD0108F27A3F005CB29B /* tkWinDefault.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkWinDefault.h; sourceTree = "<group>"; }; - F966BD0208F27A3F005CB29B /* tkWinDialog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinDialog.c; sourceTree = "<group>"; }; - F966BD0308F27A3F005CB29B /* tkWinDraw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinDraw.c; sourceTree = "<group>"; }; - F966BD0408F27A3F005CB29B /* tkWinEmbed.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinEmbed.c; sourceTree = "<group>"; }; - F966BD0508F27A3F005CB29B /* tkWinFont.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinFont.c; sourceTree = "<group>"; }; - F966BD0708F27A3F005CB29B /* tkWinImage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinImage.c; sourceTree = "<group>"; }; - F966BD0808F27A3F005CB29B /* tkWinInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinInit.c; sourceTree = "<group>"; }; - F966BD0908F27A3F005CB29B /* tkWinInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkWinInt.h; sourceTree = "<group>"; }; - F966BD0A08F27A3F005CB29B /* tkWinKey.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinKey.c; sourceTree = "<group>"; }; - F966BD0B08F27A3F005CB29B /* tkWinMenu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinMenu.c; sourceTree = "<group>"; }; - F966BD0C08F27A3F005CB29B /* tkWinPixmap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinPixmap.c; sourceTree = "<group>"; }; - F966BD0D08F27A3F005CB29B /* tkWinPointer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinPointer.c; sourceTree = "<group>"; }; - F966BD0E08F27A3F005CB29B /* tkWinPort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkWinPort.h; sourceTree = "<group>"; }; - F966BD0F08F27A3F005CB29B /* tkWinRegion.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinRegion.c; sourceTree = "<group>"; }; - F966BD1008F27A3F005CB29B /* tkWinScrlbr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinScrlbr.c; sourceTree = "<group>"; }; - F966BD1108F27A3F005CB29B /* tkWinSend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinSend.c; sourceTree = "<group>"; }; - F966BD1208F27A3F005CB29B /* tkWinSendCom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinSendCom.c; sourceTree = "<group>"; }; - F966BD1308F27A3F005CB29B /* tkWinSendCom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkWinSendCom.h; sourceTree = "<group>"; }; - F966BD1408F27A3F005CB29B /* tkWinTest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinTest.c; sourceTree = "<group>"; }; - F966BD1508F27A3F005CB29B /* tkWinWindow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinWindow.c; sourceTree = "<group>"; }; - F966BD1608F27A3F005CB29B /* tkWinWm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinWm.c; sourceTree = "<group>"; }; - F966BD1708F27A3F005CB29B /* tkWinX.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkWinX.c; sourceTree = "<group>"; }; - F966BD1808F27A3F005CB29B /* winMain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = winMain.c; sourceTree = "<group>"; }; - F966BD1B08F27A3F005CB29B /* cursorfont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cursorfont.h; sourceTree = "<group>"; }; - F966BD1C08F27A3F005CB29B /* keysym.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = keysym.h; sourceTree = "<group>"; }; - F966BD1D08F27A3F005CB29B /* keysymdef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = keysymdef.h; sourceTree = "<group>"; }; - F966BD1E08F27A3F005CB29B /* X.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X.h; sourceTree = "<group>"; }; - F966BD1F08F27A3F005CB29B /* Xatom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Xatom.h; sourceTree = "<group>"; }; - F966BD2008F27A3F005CB29B /* Xfuncproto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Xfuncproto.h; sourceTree = "<group>"; }; - F966BD2108F27A3F005CB29B /* Xlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Xlib.h; sourceTree = "<group>"; }; - F966BD2208F27A3F005CB29B /* Xutil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Xutil.h; sourceTree = "<group>"; }; - F966BD2308F27A3F005CB29B /* xbytes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xbytes.h; sourceTree = "<group>"; }; - F966BD2408F27A3F005CB29B /* xcolors.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xcolors.c; sourceTree = "<group>"; }; - F966BD2508F27A3F005CB29B /* xdraw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xdraw.c; sourceTree = "<group>"; }; - F966BD2608F27A3F005CB29B /* xgc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xgc.c; sourceTree = "<group>"; }; - F966BD2708F27A3F005CB29B /* ximage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ximage.c; sourceTree = "<group>"; }; - F966BD2808F27A3F005CB29B /* xutil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xutil.c; sourceTree = "<group>"; }; - F966C07408F2820D005CB29B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; }; - F966C07608F2821B005CB29B /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; - F966C07808F28233005CB29B /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; - F96887E00AF786D5000797B5 /* ttk.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ttk.decls; sourceTree = "<group>"; }; - F96887E10AF786D5000797B5 /* ttkBlink.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkBlink.c; sourceTree = "<group>"; }; - F96887E20AF786D5000797B5 /* ttkButton.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkButton.c; sourceTree = "<group>"; }; - F96887E30AF786D5000797B5 /* ttkCache.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkCache.c; sourceTree = "<group>"; }; - F96887E40AF786D5000797B5 /* ttkClamTheme.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkClamTheme.c; sourceTree = "<group>"; }; - F96887E50AF786D5000797B5 /* ttkClassicTheme.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkClassicTheme.c; sourceTree = "<group>"; }; - F96887E60AF786D5000797B5 /* ttkDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ttkDecls.h; sourceTree = "<group>"; }; - F96887E70AF786D5000797B5 /* ttkDefaultTheme.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkDefaultTheme.c; sourceTree = "<group>"; }; - F96887E80AF786D5000797B5 /* ttkElements.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkElements.c; sourceTree = "<group>"; }; - F96887E90AF786D5000797B5 /* ttkEntry.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkEntry.c; sourceTree = "<group>"; }; - F96887EA0AF786D5000797B5 /* ttkFrame.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkFrame.c; sourceTree = "<group>"; }; - F96887EB0AF786D5000797B5 /* ttkImage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkImage.c; sourceTree = "<group>"; }; - F96887EC0AF786D5000797B5 /* ttkInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkInit.c; sourceTree = "<group>"; }; - F96887ED0AF786D5000797B5 /* ttkLabel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkLabel.c; sourceTree = "<group>"; }; - F96887EE0AF786D5000797B5 /* ttkLayout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkLayout.c; sourceTree = "<group>"; }; - F96887EF0AF786D5000797B5 /* ttkManager.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkManager.c; sourceTree = "<group>"; }; - F96887F00AF786D5000797B5 /* ttkManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ttkManager.h; sourceTree = "<group>"; }; - F96887F10AF786D5000797B5 /* ttkNotebook.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkNotebook.c; sourceTree = "<group>"; }; - F96887F20AF786D5000797B5 /* ttkPanedwindow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkPanedwindow.c; sourceTree = "<group>"; }; - F96887F30AF786D5000797B5 /* ttkProgress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkProgress.c; sourceTree = "<group>"; }; - F96887F40AF786D5000797B5 /* ttkScale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkScale.c; sourceTree = "<group>"; }; - F96887F50AF786D5000797B5 /* ttkScroll.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkScroll.c; sourceTree = "<group>"; }; - F96887F60AF786D5000797B5 /* ttkScrollbar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkScrollbar.c; sourceTree = "<group>"; }; - F96887F70AF786D5000797B5 /* ttkSeparator.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkSeparator.c; sourceTree = "<group>"; }; - F96887F80AF786D5000797B5 /* ttkSquare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkSquare.c; sourceTree = "<group>"; }; - F96887F90AF786D5000797B5 /* ttkState.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkState.c; sourceTree = "<group>"; }; - F96887FA0AF786D5000797B5 /* ttkStubInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkStubInit.c; sourceTree = "<group>"; }; - F96887FB0AF786D5000797B5 /* ttkStubLib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkStubLib.c; sourceTree = "<group>"; }; - F96887FC0AF786D5000797B5 /* ttkTagSet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkTagSet.c; sourceTree = "<group>"; }; - F96887FD0AF786D5000797B5 /* ttkTheme.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkTheme.c; sourceTree = "<group>"; }; - F96887FE0AF786D5000797B5 /* ttkTheme.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ttkTheme.h; sourceTree = "<group>"; }; - F96887FF0AF786D5000797B5 /* ttkThemeInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ttkThemeInt.h; sourceTree = "<group>"; }; - F96888000AF786D5000797B5 /* ttkTrace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkTrace.c; sourceTree = "<group>"; }; - F96888010AF786D5000797B5 /* ttkTrack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkTrack.c; sourceTree = "<group>"; }; - F96888020AF786D5000797B5 /* ttkTreeview.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkTreeview.c; sourceTree = "<group>"; }; - F96888030AF786D5000797B5 /* ttkWidget.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkWidget.c; sourceTree = "<group>"; }; - F96888040AF786D5000797B5 /* ttkWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ttkWidget.h; sourceTree = "<group>"; }; - F96888370AF787B3000797B5 /* altTheme.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = altTheme.tcl; sourceTree = "<group>"; }; - F96888380AF787B3000797B5 /* aquaTheme.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = aquaTheme.tcl; sourceTree = "<group>"; }; - F96888390AF787B3000797B5 /* button.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = button.tcl; sourceTree = "<group>"; }; - F968883A0AF787B3000797B5 /* clamTheme.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = clamTheme.tcl; sourceTree = "<group>"; }; - F968883B0AF787B3000797B5 /* classicTheme.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = classicTheme.tcl; sourceTree = "<group>"; }; - F968883C0AF787B3000797B5 /* combobox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = combobox.tcl; sourceTree = "<group>"; }; - F968883D0AF787B3000797B5 /* cursors.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = cursors.tcl; sourceTree = "<group>"; }; - F968883E0AF787B3000797B5 /* defaults.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = defaults.tcl; sourceTree = "<group>"; }; - F96888400AF787B3000797B5 /* entry.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = entry.tcl; sourceTree = "<group>"; }; - F96888410AF787B3000797B5 /* fonts.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fonts.tcl; sourceTree = "<group>"; }; - F96888440AF787B3000797B5 /* menubutton.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = menubutton.tcl; sourceTree = "<group>"; }; - F96888450AF787B3000797B5 /* notebook.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = notebook.tcl; sourceTree = "<group>"; }; - F96888460AF787B3000797B5 /* panedwindow.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = panedwindow.tcl; sourceTree = "<group>"; }; - F96888470AF787B3000797B5 /* progress.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = progress.tcl; sourceTree = "<group>"; }; - F96888480AF787B3000797B5 /* scale.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = scale.tcl; sourceTree = "<group>"; }; - F96888490AF787B3000797B5 /* scrollbar.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = scrollbar.tcl; sourceTree = "<group>"; }; - F968884A0AF787B3000797B5 /* sizegrip.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = sizegrip.tcl; sourceTree = "<group>"; }; - F968884B0AF787B3000797B5 /* treeview.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = treeview.tcl; sourceTree = "<group>"; }; - F968884C0AF787B3000797B5 /* ttk.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ttk.tcl; sourceTree = "<group>"; }; - F968884D0AF787B3000797B5 /* utils.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = utils.tcl; sourceTree = "<group>"; }; - F968884E0AF787B3000797B5 /* winTheme.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winTheme.tcl; sourceTree = "<group>"; }; - F968884F0AF787B3000797B5 /* xpTheme.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = xpTheme.tcl; sourceTree = "<group>"; }; - F96888540AF7880C000797B5 /* all.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = all.tcl; sourceTree = "<group>"; }; - F96888560AF7880C000797B5 /* combobox.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = combobox.test; sourceTree = "<group>"; }; - F96888570AF7880C000797B5 /* entry.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = entry.test; sourceTree = "<group>"; }; - F96888580AF7880C000797B5 /* image.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = image.test; sourceTree = "<group>"; }; - F96888590AF7880C000797B5 /* labelframe.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = labelframe.test; sourceTree = "<group>"; }; - F968885A0AF7880C000797B5 /* layout.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = layout.test; sourceTree = "<group>"; }; - F968885C0AF7880C000797B5 /* notebook.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = notebook.test; sourceTree = "<group>"; }; - F968885D0AF7880C000797B5 /* panedwindow.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = panedwindow.test; sourceTree = "<group>"; }; - F968885E0AF7880C000797B5 /* progressbar.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = progressbar.test; sourceTree = "<group>"; }; - F968885F0AF7880C000797B5 /* scrollbar.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = scrollbar.test; sourceTree = "<group>"; }; - F96888600AF7880C000797B5 /* treetags.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = treetags.test; sourceTree = "<group>"; }; - F96888610AF7880C000797B5 /* treeview.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = treeview.test; sourceTree = "<group>"; }; - F96888620AF7880C000797B5 /* ttk.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ttk.test; sourceTree = "<group>"; }; - F96888630AF7880C000797B5 /* validate.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = validate.test; sourceTree = "<group>"; }; - F968886B0AF788F6000797B5 /* ttk_button.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_button.n; sourceTree = "<group>"; }; - F968886C0AF788F6000797B5 /* ttk_checkbutton.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_checkbutton.n; sourceTree = "<group>"; }; - F968886D0AF788F6000797B5 /* ttk_combobox.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_combobox.n; sourceTree = "<group>"; }; - F968886F0AF788F6000797B5 /* ttk_entry.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_entry.n; sourceTree = "<group>"; }; - F96888700AF788F6000797B5 /* ttk_frame.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_frame.n; sourceTree = "<group>"; }; - F96888710AF788F6000797B5 /* ttk_Geometry.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_Geometry.3; sourceTree = "<group>"; }; - F96888720AF788F6000797B5 /* ttk_image.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_image.n; sourceTree = "<group>"; }; - F96888730AF788F6000797B5 /* ttk_intro.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_intro.n; sourceTree = "<group>"; }; - F96888740AF788F6000797B5 /* ttk_label.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_label.n; sourceTree = "<group>"; }; - F96888750AF788F6000797B5 /* ttk_labelframe.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_labelframe.n; sourceTree = "<group>"; }; - F96888760AF788F6000797B5 /* ttk_menubutton.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_menubutton.n; sourceTree = "<group>"; }; - F96888770AF788F6000797B5 /* ttk_notebook.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_notebook.n; sourceTree = "<group>"; }; - F96888780AF788F6000797B5 /* ttk_panedwindow.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_panedwindow.n; sourceTree = "<group>"; }; - F96888790AF788F6000797B5 /* ttk_progressbar.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_progressbar.n; sourceTree = "<group>"; }; - F968887A0AF788F6000797B5 /* ttk_radiobutton.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_radiobutton.n; sourceTree = "<group>"; }; - F968887B0AF788F6000797B5 /* ttk_scrollbar.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_scrollbar.n; sourceTree = "<group>"; }; - F968887C0AF788F6000797B5 /* ttk_separator.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_separator.n; sourceTree = "<group>"; }; - F968887D0AF788F6000797B5 /* ttk_sizegrip.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_sizegrip.n; sourceTree = "<group>"; }; - F968887E0AF788F6000797B5 /* ttk_style.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_style.n; sourceTree = "<group>"; }; - F968887F0AF788F6000797B5 /* ttk_Theme.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_Theme.3; sourceTree = "<group>"; }; - F96888800AF788F6000797B5 /* ttk_treeview.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_treeview.n; sourceTree = "<group>"; }; - F96888810AF788F6000797B5 /* ttk_widget.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ttk_widget.n; sourceTree = "<group>"; }; - F96888840AF78938000797B5 /* ttkMacOSXTheme.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = ttkMacOSXTheme.c; sourceTree = "<group>"; }; - F96888860AF78953000797B5 /* ttkWinMonitor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkWinMonitor.c; sourceTree = "<group>"; }; - F96888870AF78953000797B5 /* ttkWinTheme.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkWinTheme.c; sourceTree = "<group>"; }; - F96888880AF78953000797B5 /* ttkWinXPTheme.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttkWinXPTheme.c; sourceTree = "<group>"; }; - F96D3DFB08F272A4004A47F5 /* changes.md */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = changes.md; sourceTree = "<group>"; }; - F96D3DFD08F272A4004A47F5 /* Access.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Access.3; sourceTree = "<group>"; }; - F96D3DFE08F272A4004A47F5 /* AddErrInfo.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = AddErrInfo.3; sourceTree = "<group>"; }; - F96D3DFF08F272A4004A47F5 /* after.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = after.n; sourceTree = "<group>"; }; - F96D3E0008F272A4004A47F5 /* Alloc.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Alloc.3; sourceTree = "<group>"; }; - F96D3E0108F272A4004A47F5 /* AllowExc.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = AllowExc.3; sourceTree = "<group>"; }; - F96D3E0208F272A4004A47F5 /* append.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = append.n; sourceTree = "<group>"; }; - F96D3E0308F272A4004A47F5 /* AppInit.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = AppInit.3; sourceTree = "<group>"; }; - F96D3E0408F272A5004A47F5 /* array.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = array.n; sourceTree = "<group>"; }; - F96D3E0508F272A5004A47F5 /* AssocData.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = AssocData.3; sourceTree = "<group>"; }; - F96D3E0608F272A5004A47F5 /* Async.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Async.3; sourceTree = "<group>"; }; - F96D3E0708F272A5004A47F5 /* BackgdErr.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = BackgdErr.3; sourceTree = "<group>"; }; - F96D3E0808F272A5004A47F5 /* Backslash.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Backslash.3; sourceTree = "<group>"; }; - F96D3E0908F272A5004A47F5 /* bgerror.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = bgerror.n; sourceTree = "<group>"; }; - F96D3E0A08F272A5004A47F5 /* binary.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = binary.n; sourceTree = "<group>"; }; - F96D3E0B08F272A5004A47F5 /* BoolObj.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = BoolObj.3; sourceTree = "<group>"; }; - F96D3E0C08F272A5004A47F5 /* break.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = break.n; sourceTree = "<group>"; }; - F96D3E0D08F272A5004A47F5 /* ByteArrObj.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ByteArrObj.3; sourceTree = "<group>"; }; - F96D3E0E08F272A5004A47F5 /* CallDel.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CallDel.3; sourceTree = "<group>"; }; - F96D3E0F08F272A5004A47F5 /* case.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = case.n; sourceTree = "<group>"; }; - F96D3E1008F272A5004A47F5 /* catch.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = catch.n; sourceTree = "<group>"; }; - F96D3E1108F272A5004A47F5 /* cd.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = cd.n; sourceTree = "<group>"; }; - F96D3E1208F272A5004A47F5 /* chan.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = chan.n; sourceTree = "<group>"; }; - F96D3E1308F272A5004A47F5 /* ChnlStack.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ChnlStack.3; sourceTree = "<group>"; }; - F96D3E1408F272A5004A47F5 /* clock.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = clock.n; sourceTree = "<group>"; }; - F96D3E1508F272A5004A47F5 /* close.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = close.n; sourceTree = "<group>"; }; - F96D3E1608F272A5004A47F5 /* CmdCmplt.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CmdCmplt.3; sourceTree = "<group>"; }; - F96D3E1708F272A5004A47F5 /* Concat.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Concat.3; sourceTree = "<group>"; }; - F96D3E1808F272A5004A47F5 /* concat.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = concat.n; sourceTree = "<group>"; }; - F96D3E1908F272A5004A47F5 /* continue.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = continue.n; sourceTree = "<group>"; }; - F96D3E1A08F272A5004A47F5 /* CrtChannel.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtChannel.3; sourceTree = "<group>"; }; - F96D3E1B08F272A5004A47F5 /* CrtChnlHdlr.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtChnlHdlr.3; sourceTree = "<group>"; }; - F96D3E1C08F272A5004A47F5 /* CrtCloseHdlr.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtCloseHdlr.3; sourceTree = "<group>"; }; - F96D3E1D08F272A5004A47F5 /* CrtCommand.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtCommand.3; sourceTree = "<group>"; }; - F96D3E1E08F272A5004A47F5 /* CrtFileHdlr.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtFileHdlr.3; sourceTree = "<group>"; }; - F96D3E1F08F272A5004A47F5 /* CrtInterp.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtInterp.3; sourceTree = "<group>"; }; - F96D3E2008F272A5004A47F5 /* CrtMathFnc.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtMathFnc.3; sourceTree = "<group>"; }; - F96D3E2108F272A5004A47F5 /* CrtObjCmd.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtObjCmd.3; sourceTree = "<group>"; }; - F96D3E2208F272A5004A47F5 /* CrtAlias.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtAlias.3; sourceTree = "<group>"; }; - F96D3E2308F272A5004A47F5 /* CrtTimerHdlr.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtTimerHdlr.3; sourceTree = "<group>"; }; - F96D3E2408F272A5004A47F5 /* CrtTrace.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = CrtTrace.3; sourceTree = "<group>"; }; - F96D3E2508F272A5004A47F5 /* dde.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = dde.n; sourceTree = "<group>"; }; - F96D3E2608F272A5004A47F5 /* DetachPids.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = DetachPids.3; sourceTree = "<group>"; }; - F96D3E2708F272A5004A47F5 /* dict.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = dict.n; sourceTree = "<group>"; }; - F96D3E2808F272A5004A47F5 /* DictObj.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = DictObj.3; sourceTree = "<group>"; }; - F96D3E2908F272A5004A47F5 /* DoOneEvent.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = DoOneEvent.3; sourceTree = "<group>"; }; - F96D3E2A08F272A5004A47F5 /* DoubleObj.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = DoubleObj.3; sourceTree = "<group>"; }; - F96D3E2B08F272A5004A47F5 /* DoWhenIdle.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = DoWhenIdle.3; sourceTree = "<group>"; }; - F96D3E2C08F272A5004A47F5 /* DString.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = DString.3; sourceTree = "<group>"; }; - F96D3E2D08F272A5004A47F5 /* DumpActiveMemory.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = DumpActiveMemory.3; sourceTree = "<group>"; }; - F96D3E2E08F272A5004A47F5 /* Encoding.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Encoding.3; sourceTree = "<group>"; }; - F96D3E2F08F272A5004A47F5 /* encoding.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = encoding.n; sourceTree = "<group>"; }; - F96D3E3008F272A5004A47F5 /* Ensemble.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Ensemble.3; sourceTree = "<group>"; }; - F96D3E3108F272A5004A47F5 /* Environment.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Environment.3; sourceTree = "<group>"; }; - F96D3E3208F272A5004A47F5 /* eof.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = eof.n; sourceTree = "<group>"; }; - F96D3E3308F272A5004A47F5 /* error.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = error.n; sourceTree = "<group>"; }; - F96D3E3408F272A5004A47F5 /* Eval.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Eval.3; sourceTree = "<group>"; }; - F96D3E3508F272A5004A47F5 /* eval.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = eval.n; sourceTree = "<group>"; }; - F96D3E3608F272A5004A47F5 /* exec.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = exec.n; sourceTree = "<group>"; }; - F96D3E3708F272A5004A47F5 /* Exit.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Exit.3; sourceTree = "<group>"; }; - F96D3E3808F272A5004A47F5 /* exit.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = exit.n; sourceTree = "<group>"; }; - F96D3E3908F272A5004A47F5 /* expr.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = expr.n; sourceTree = "<group>"; }; - F96D3E3A08F272A5004A47F5 /* ExprLong.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ExprLong.3; sourceTree = "<group>"; }; - F96D3E3B08F272A5004A47F5 /* ExprLongObj.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ExprLongObj.3; sourceTree = "<group>"; }; - F96D3E3C08F272A5004A47F5 /* fblocked.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = fblocked.n; sourceTree = "<group>"; }; - F96D3E3D08F272A5004A47F5 /* fconfigure.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = fconfigure.n; sourceTree = "<group>"; }; - F96D3E3E08F272A5004A47F5 /* fcopy.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = fcopy.n; sourceTree = "<group>"; }; - F96D3E3F08F272A5004A47F5 /* file.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = file.n; sourceTree = "<group>"; }; - F96D3E4008F272A5004A47F5 /* fileevent.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = fileevent.n; sourceTree = "<group>"; }; - F96D3E4108F272A5004A47F5 /* filename.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = filename.n; sourceTree = "<group>"; }; - F96D3E4208F272A5004A47F5 /* FileSystem.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = FileSystem.3; sourceTree = "<group>"; }; - F96D3E4308F272A5004A47F5 /* FindExec.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = FindExec.3; sourceTree = "<group>"; }; - F96D3E4408F272A5004A47F5 /* flush.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = flush.n; sourceTree = "<group>"; }; - F96D3E4508F272A5004A47F5 /* for.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = for.n; sourceTree = "<group>"; }; - F96D3E4608F272A5004A47F5 /* foreach.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = foreach.n; sourceTree = "<group>"; }; - F96D3E4708F272A5004A47F5 /* format.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = format.n; sourceTree = "<group>"; }; - F96D3E4808F272A5004A47F5 /* GetCwd.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetCwd.3; sourceTree = "<group>"; }; - F96D3E4908F272A5004A47F5 /* GetHostName.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetHostName.3; sourceTree = "<group>"; }; - F96D3E4A08F272A5004A47F5 /* GetIndex.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetIndex.3; sourceTree = "<group>"; }; - F96D3E4B08F272A5004A47F5 /* GetInt.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetInt.3; sourceTree = "<group>"; }; - F96D3E4C08F272A5004A47F5 /* GetOpnFl.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetOpnFl.3; sourceTree = "<group>"; }; - F96D3E4D08F272A5004A47F5 /* gets.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = gets.n; sourceTree = "<group>"; }; - F96D3E4E08F272A5004A47F5 /* GetStdChan.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetStdChan.3; sourceTree = "<group>"; }; - F96D3E4F08F272A5004A47F5 /* GetTime.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetTime.3; sourceTree = "<group>"; }; - F96D3E5008F272A5004A47F5 /* GetVersion.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = GetVersion.3; sourceTree = "<group>"; }; - F96D3E5108F272A5004A47F5 /* glob.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = glob.n; sourceTree = "<group>"; }; - F96D3E5208F272A6004A47F5 /* global.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = global.n; sourceTree = "<group>"; }; - F96D3E5308F272A6004A47F5 /* Hash.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Hash.3; sourceTree = "<group>"; }; - F96D3E5408F272A6004A47F5 /* history.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = history.n; sourceTree = "<group>"; }; - F96D3E5508F272A6004A47F5 /* http.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = http.n; sourceTree = "<group>"; }; - F96D3E5608F272A6004A47F5 /* if.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = if.n; sourceTree = "<group>"; }; - F96D3E5708F272A6004A47F5 /* incr.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = incr.n; sourceTree = "<group>"; }; - F96D3E5808F272A6004A47F5 /* info.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = info.n; sourceTree = "<group>"; }; - F96D3E5908F272A6004A47F5 /* Init.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Init.3; sourceTree = "<group>"; }; - F96D3E5A08F272A6004A47F5 /* InitStubs.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = InitStubs.3; sourceTree = "<group>"; }; - F96D3E5B08F272A6004A47F5 /* Interp.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Interp.3; sourceTree = "<group>"; }; - F96D3E5C08F272A6004A47F5 /* interp.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = interp.n; sourceTree = "<group>"; }; - F96D3E5D08F272A6004A47F5 /* IntObj.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = IntObj.3; sourceTree = "<group>"; }; - F96D3E5E08F272A6004A47F5 /* join.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = join.n; sourceTree = "<group>"; }; - F96D3E5F08F272A6004A47F5 /* lappend.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = lappend.n; sourceTree = "<group>"; }; - F96D3E6008F272A6004A47F5 /* lassign.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = lassign.n; sourceTree = "<group>"; }; - F96D3E6108F272A6004A47F5 /* library.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = library.n; sourceTree = "<group>"; }; - F96D3E6208F272A6004A47F5 /* Limit.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Limit.3; sourceTree = "<group>"; }; - F96D3E6308F272A6004A47F5 /* lindex.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = lindex.n; sourceTree = "<group>"; }; - F96D3E6408F272A6004A47F5 /* LinkVar.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = LinkVar.3; sourceTree = "<group>"; }; - F96D3E6508F272A6004A47F5 /* linsert.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = linsert.n; sourceTree = "<group>"; }; - F96D3E6608F272A6004A47F5 /* list.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = list.n; sourceTree = "<group>"; }; - F96D3E6708F272A6004A47F5 /* ListObj.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ListObj.3; sourceTree = "<group>"; }; - F96D3E6808F272A6004A47F5 /* llength.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = llength.n; sourceTree = "<group>"; }; - F96D3E6908F272A6004A47F5 /* load.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = load.n; sourceTree = "<group>"; }; - F96D3E6A08F272A6004A47F5 /* lrange.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = lrange.n; sourceTree = "<group>"; }; - F96D3E6B08F272A6004A47F5 /* lrepeat.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = lrepeat.n; sourceTree = "<group>"; }; - F96D3E6C08F272A6004A47F5 /* lreplace.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = lreplace.n; sourceTree = "<group>"; }; - F96D3E6D08F272A6004A47F5 /* lsearch.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = lsearch.n; sourceTree = "<group>"; }; - F96D3E6E08F272A6004A47F5 /* lset.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = lset.n; sourceTree = "<group>"; }; - F96D3E6F08F272A6004A47F5 /* lsort.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = lsort.n; sourceTree = "<group>"; }; - F96D3E7008F272A6004A47F5 /* man.macros */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = man.macros; sourceTree = "<group>"; }; - F96D3E7108F272A6004A47F5 /* mathfunc.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = mathfunc.n; sourceTree = "<group>"; }; - F96D3E7208F272A6004A47F5 /* memory.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = memory.n; sourceTree = "<group>"; }; - F96D3E7308F272A6004A47F5 /* msgcat.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = msgcat.n; sourceTree = "<group>"; }; - F96D3E7408F272A6004A47F5 /* Namespace.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Namespace.3; sourceTree = "<group>"; }; - F96D3E7508F272A6004A47F5 /* namespace.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = namespace.n; sourceTree = "<group>"; }; - F96D3E7608F272A6004A47F5 /* Notifier.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Notifier.3; sourceTree = "<group>"; }; - F96D3E7708F272A6004A47F5 /* Object.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Object.3; sourceTree = "<group>"; }; - F96D3E7808F272A6004A47F5 /* ObjectType.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ObjectType.3; sourceTree = "<group>"; }; - F96D3E7908F272A6004A47F5 /* open.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = open.n; sourceTree = "<group>"; }; - F96D3E7A08F272A6004A47F5 /* OpenFileChnl.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = OpenFileChnl.3; sourceTree = "<group>"; }; - F96D3E7B08F272A6004A47F5 /* OpenTcp.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = OpenTcp.3; sourceTree = "<group>"; }; - F96D3E7C08F272A6004A47F5 /* package.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = package.n; sourceTree = "<group>"; }; - F96D3E7D08F272A6004A47F5 /* packagens.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = packagens.n; sourceTree = "<group>"; }; - F96D3E7E08F272A6004A47F5 /* Panic.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Panic.3; sourceTree = "<group>"; }; - F96D3E7F08F272A6004A47F5 /* ParseCmd.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ParseCmd.3; sourceTree = "<group>"; }; - F96D3E8008F272A6004A47F5 /* pid.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = pid.n; sourceTree = "<group>"; }; - F96D3E8108F272A6004A47F5 /* pkgMkIndex.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = pkgMkIndex.n; sourceTree = "<group>"; }; - F96D3E8208F272A6004A47F5 /* PkgRequire.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = PkgRequire.3; sourceTree = "<group>"; }; - F96D3E8308F272A6004A47F5 /* Preserve.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Preserve.3; sourceTree = "<group>"; }; - F96D3E8408F272A6004A47F5 /* PrintDbl.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = PrintDbl.3; sourceTree = "<group>"; }; - F96D3E8508F272A6004A47F5 /* proc.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = proc.n; sourceTree = "<group>"; }; - F96D3E8608F272A6004A47F5 /* puts.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = puts.n; sourceTree = "<group>"; }; - F96D3E8708F272A6004A47F5 /* pwd.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = pwd.n; sourceTree = "<group>"; }; - F96D3E8808F272A6004A47F5 /* re_syntax.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = re_syntax.n; sourceTree = "<group>"; }; - F96D3E8908F272A6004A47F5 /* read.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = read.n; sourceTree = "<group>"; }; - F96D3E8A08F272A6004A47F5 /* RecEvalObj.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = RecEvalObj.3; sourceTree = "<group>"; }; - F96D3E8B08F272A6004A47F5 /* RecordEval.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = RecordEval.3; sourceTree = "<group>"; }; - F96D3E8C08F272A6004A47F5 /* RegConfig.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = RegConfig.3; sourceTree = "<group>"; }; - F96D3E8D08F272A6004A47F5 /* RegExp.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = RegExp.3; sourceTree = "<group>"; }; - F96D3E8E08F272A6004A47F5 /* regexp.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = regexp.n; sourceTree = "<group>"; }; - F96D3E8F08F272A6004A47F5 /* registry.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = registry.n; sourceTree = "<group>"; }; - F96D3E9008F272A6004A47F5 /* regsub.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = regsub.n; sourceTree = "<group>"; }; - F96D3E9108F272A6004A47F5 /* rename.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = rename.n; sourceTree = "<group>"; }; - F96D3E9208F272A6004A47F5 /* return.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = return.n; sourceTree = "<group>"; }; - F96D3E9308F272A6004A47F5 /* safe.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = safe.n; sourceTree = "<group>"; }; - F96D3E9408F272A6004A47F5 /* SaveResult.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SaveResult.3; sourceTree = "<group>"; }; - F96D3E9508F272A6004A47F5 /* scan.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = scan.n; sourceTree = "<group>"; }; - F96D3E9608F272A6004A47F5 /* seek.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = seek.n; sourceTree = "<group>"; }; - F96D3E9708F272A6004A47F5 /* set.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = set.n; sourceTree = "<group>"; }; - F96D3E9808F272A6004A47F5 /* SetChanErr.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SetChanErr.3; sourceTree = "<group>"; }; - F96D3E9908F272A6004A47F5 /* SetErrno.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SetErrno.3; sourceTree = "<group>"; }; - F96D3E9A08F272A6004A47F5 /* SetRecLmt.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SetRecLmt.3; sourceTree = "<group>"; }; - F96D3E9B08F272A7004A47F5 /* SetResult.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SetResult.3; sourceTree = "<group>"; }; - F96D3E9C08F272A7004A47F5 /* SetVar.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SetVar.3; sourceTree = "<group>"; }; - F96D3E9D08F272A7004A47F5 /* Signal.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Signal.3; sourceTree = "<group>"; }; - F96D3E9E08F272A7004A47F5 /* Sleep.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Sleep.3; sourceTree = "<group>"; }; - F96D3E9F08F272A7004A47F5 /* socket.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = socket.n; sourceTree = "<group>"; }; - F96D3EA008F272A7004A47F5 /* source.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = source.n; sourceTree = "<group>"; }; - F96D3EA108F272A7004A47F5 /* SourceRCFile.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SourceRCFile.3; sourceTree = "<group>"; }; - F96D3EA208F272A7004A47F5 /* split.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = split.n; sourceTree = "<group>"; }; - F96D3EA308F272A7004A47F5 /* SplitList.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SplitList.3; sourceTree = "<group>"; }; - F96D3EA408F272A7004A47F5 /* SplitPath.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SplitPath.3; sourceTree = "<group>"; }; - F96D3EA508F272A7004A47F5 /* StaticPkg.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = StaticPkg.3; sourceTree = "<group>"; }; - F96D3EA608F272A7004A47F5 /* StdChannels.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = StdChannels.3; sourceTree = "<group>"; }; - F96D3EA708F272A7004A47F5 /* string.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = string.n; sourceTree = "<group>"; }; - F96D3EA808F272A7004A47F5 /* StringObj.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = StringObj.3; sourceTree = "<group>"; }; - F96D3EA908F272A7004A47F5 /* StrMatch.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = StrMatch.3; sourceTree = "<group>"; }; - F96D3EAA08F272A7004A47F5 /* subst.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = subst.n; sourceTree = "<group>"; }; - F96D3EAB08F272A7004A47F5 /* SubstObj.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = SubstObj.3; sourceTree = "<group>"; }; - F96D3EAC08F272A7004A47F5 /* switch.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = switch.n; sourceTree = "<group>"; }; - F96D3EAD08F272A7004A47F5 /* Tcl.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Tcl.n; sourceTree = "<group>"; }; - F96D3EAE08F272A7004A47F5 /* Tcl_Main.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Tcl_Main.3; sourceTree = "<group>"; }; - F96D3EAF08F272A7004A47F5 /* TCL_MEM_DEBUG.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = TCL_MEM_DEBUG.3; sourceTree = "<group>"; }; - F96D3EB008F272A7004A47F5 /* tclsh.1 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = tclsh.1; sourceTree = "<group>"; }; - F96D3EB108F272A7004A47F5 /* tcltest.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = tcltest.n; sourceTree = "<group>"; }; - F96D3EB208F272A7004A47F5 /* tclvars.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = tclvars.n; sourceTree = "<group>"; }; - F96D3EB308F272A7004A47F5 /* tell.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = tell.n; sourceTree = "<group>"; }; - F96D3EB408F272A7004A47F5 /* Thread.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Thread.3; sourceTree = "<group>"; }; - F96D3EB508F272A7004A47F5 /* time.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = time.n; sourceTree = "<group>"; }; - F96D3EB608F272A7004A47F5 /* tm.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = tm.n; sourceTree = "<group>"; }; - F96D3EB708F272A7004A47F5 /* ToUpper.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = ToUpper.3; sourceTree = "<group>"; }; - F96D3EB808F272A7004A47F5 /* trace.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = trace.n; sourceTree = "<group>"; }; - F96D3EB908F272A7004A47F5 /* TraceCmd.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = TraceCmd.3; sourceTree = "<group>"; }; - F96D3EBA08F272A7004A47F5 /* TraceVar.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = TraceVar.3; sourceTree = "<group>"; }; - F96D3EBB08F272A7004A47F5 /* Translate.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Translate.3; sourceTree = "<group>"; }; - F96D3EBC08F272A7004A47F5 /* UniCharIsAlpha.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = UniCharIsAlpha.3; sourceTree = "<group>"; }; - F96D3EBD08F272A7004A47F5 /* unknown.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = unknown.n; sourceTree = "<group>"; }; - F96D3EBE08F272A7004A47F5 /* unload.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = unload.n; sourceTree = "<group>"; }; - F96D3EBF08F272A7004A47F5 /* unset.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = unset.n; sourceTree = "<group>"; }; - F96D3EC008F272A7004A47F5 /* update.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = update.n; sourceTree = "<group>"; }; - F96D3EC108F272A7004A47F5 /* uplevel.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = uplevel.n; sourceTree = "<group>"; }; - F96D3EC208F272A7004A47F5 /* UpVar.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = UpVar.3; sourceTree = "<group>"; }; - F96D3EC308F272A7004A47F5 /* upvar.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = upvar.n; sourceTree = "<group>"; }; - F96D3EC408F272A7004A47F5 /* Utf.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Utf.3; sourceTree = "<group>"; }; - F96D3EC508F272A7004A47F5 /* variable.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = variable.n; sourceTree = "<group>"; }; - F96D3EC608F272A7004A47F5 /* vwait.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = vwait.n; sourceTree = "<group>"; }; - F96D3EC708F272A7004A47F5 /* while.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = while.n; sourceTree = "<group>"; }; - F96D3EC808F272A7004A47F5 /* WrongNumArgs.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = WrongNumArgs.3; sourceTree = "<group>"; }; - F96D3ECA08F272A7004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; - F96D3ECB08F272A7004A47F5 /* regc_color.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = regc_color.c; sourceTree = "<group>"; }; - F96D3ECC08F272A7004A47F5 /* regc_cvec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = regc_cvec.c; sourceTree = "<group>"; }; - F96D3ECD08F272A7004A47F5 /* regc_lex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = regc_lex.c; sourceTree = "<group>"; }; - F96D3ECE08F272A7004A47F5 /* regc_locale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = regc_locale.c; sourceTree = "<group>"; }; - F96D3ECF08F272A7004A47F5 /* regc_nfa.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = regc_nfa.c; sourceTree = "<group>"; }; - F96D3ED008F272A7004A47F5 /* regcomp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = regcomp.c; sourceTree = "<group>"; }; - F96D3ED108F272A7004A47F5 /* regcustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = regcustom.h; sourceTree = "<group>"; }; - F96D3ED208F272A7004A47F5 /* rege_dfa.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rege_dfa.c; sourceTree = "<group>"; }; - F96D3ED308F272A7004A47F5 /* regerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = regerror.c; sourceTree = "<group>"; }; - F96D3ED408F272A7004A47F5 /* regerrs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = regerrs.h; sourceTree = "<group>"; }; - F96D3ED508F272A7004A47F5 /* regex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = regex.h; sourceTree = "<group>"; }; - F96D3ED608F272A7004A47F5 /* regexec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = regexec.c; sourceTree = "<group>"; }; - F96D3ED708F272A7004A47F5 /* regfree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = regfree.c; sourceTree = "<group>"; }; - F96D3ED808F272A7004A47F5 /* regfronts.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = regfronts.c; sourceTree = "<group>"; }; - F96D3ED908F272A7004A47F5 /* regguts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = regguts.h; sourceTree = "<group>"; }; - F96D3EDA08F272A7004A47F5 /* tcl.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tcl.decls; sourceTree = "<group>"; }; - F96D3EDB08F272A7004A47F5 /* tcl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tcl.h; sourceTree = "<group>"; }; - F96D3EDC08F272A7004A47F5 /* tclAlloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclAlloc.c; sourceTree = "<group>"; }; - F96D3EDD08F272A7004A47F5 /* tclAsync.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclAsync.c; sourceTree = "<group>"; }; - F96D3EDE08F272A7004A47F5 /* tclBasic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclBasic.c; sourceTree = "<group>"; }; - F96D3EDF08F272A7004A47F5 /* tclBinary.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclBinary.c; sourceTree = "<group>"; }; - F96D3EE008F272A7004A47F5 /* tclCkalloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclCkalloc.c; sourceTree = "<group>"; }; - F96D3EE108F272A7004A47F5 /* tclClock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclClock.c; sourceTree = "<group>"; }; - F96D3EE208F272A7004A47F5 /* tclCmdAH.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclCmdAH.c; sourceTree = "<group>"; }; - F96D3EE308F272A7004A47F5 /* tclCmdIL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclCmdIL.c; sourceTree = "<group>"; }; - F96D3EE408F272A7004A47F5 /* tclCmdMZ.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclCmdMZ.c; sourceTree = "<group>"; }; - F96D3EE508F272A7004A47F5 /* tclCompCmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclCompCmds.c; sourceTree = "<group>"; }; - F96D3EE608F272A7004A47F5 /* tclCompExpr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclCompExpr.c; sourceTree = "<group>"; }; - F96D3EE708F272A7004A47F5 /* tclCompile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclCompile.c; sourceTree = "<group>"; }; - F96D3EE808F272A7004A47F5 /* tclCompile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclCompile.h; sourceTree = "<group>"; }; - F96D3EE908F272A7004A47F5 /* tclConfig.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclConfig.c; sourceTree = "<group>"; }; - F96D3EEA08F272A7004A47F5 /* tclDate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclDate.c; sourceTree = "<group>"; }; - F96D3EEB08F272A7004A47F5 /* tclDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclDecls.h; sourceTree = "<group>"; }; - F96D3EEC08F272A7004A47F5 /* tclDictObj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclDictObj.c; sourceTree = "<group>"; }; - F96D3EED08F272A7004A47F5 /* tclEncoding.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclEncoding.c; sourceTree = "<group>"; }; - F96D3EEE08F272A7004A47F5 /* tclEnv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclEnv.c; sourceTree = "<group>"; }; - F96D3EEF08F272A7004A47F5 /* tclEvent.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclEvent.c; sourceTree = "<group>"; }; - F96D3EF008F272A7004A47F5 /* tclExecute.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclExecute.c; sourceTree = "<group>"; }; - F96D3EF108F272A7004A47F5 /* tclFCmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclFCmd.c; sourceTree = "<group>"; }; - F96D3EF208F272A7004A47F5 /* tclFileName.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclFileName.c; sourceTree = "<group>"; }; - F96D3EF308F272A7004A47F5 /* tclFileSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclFileSystem.h; sourceTree = "<group>"; }; - F96D3EF408F272A7004A47F5 /* tclGet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclGet.c; sourceTree = "<group>"; }; - F96D3EF508F272A7004A47F5 /* tclGetDate.y */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; path = tclGetDate.y; sourceTree = "<group>"; }; - F96D3EF608F272A7004A47F5 /* tclHash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclHash.c; sourceTree = "<group>"; }; - F96D3EF708F272A7004A47F5 /* tclHistory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclHistory.c; sourceTree = "<group>"; }; - F96D3EF808F272A7004A47F5 /* tclIndexObj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIndexObj.c; sourceTree = "<group>"; }; - F96D3EF908F272A7004A47F5 /* tclInt.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclInt.decls; sourceTree = "<group>"; }; - F96D3EFA08F272A7004A47F5 /* tclInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclInt.h; sourceTree = "<group>"; }; - F96D3EFB08F272A7004A47F5 /* tclIntDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclIntDecls.h; sourceTree = "<group>"; }; - F96D3EFC08F272A7004A47F5 /* tclInterp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclInterp.c; sourceTree = "<group>"; }; - F96D3EFD08F272A7004A47F5 /* tclIntPlatDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclIntPlatDecls.h; sourceTree = "<group>"; }; - F96D3EFE08F272A7004A47F5 /* tclIO.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIO.c; sourceTree = "<group>"; }; - F96D3EFF08F272A7004A47F5 /* tclIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclIO.h; sourceTree = "<group>"; }; - F96D3F0008F272A7004A47F5 /* tclIOCmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIOCmd.c; sourceTree = "<group>"; }; - F96D3F0108F272A7004A47F5 /* tclIOGT.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIOGT.c; sourceTree = "<group>"; }; - F96D3F0208F272A7004A47F5 /* tclIORChan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIORChan.c; sourceTree = "<group>"; }; - F96D3F0308F272A7004A47F5 /* tclIOSock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIOSock.c; sourceTree = "<group>"; }; - F96D3F0408F272A7004A47F5 /* tclIOUtil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIOUtil.c; sourceTree = "<group>"; }; - F96D3F0508F272A7004A47F5 /* tclLink.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclLink.c; sourceTree = "<group>"; }; - F96D3F0608F272A7004A47F5 /* tclListObj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclListObj.c; sourceTree = "<group>"; }; - F96D3F0708F272A7004A47F5 /* tclLiteral.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclLiteral.c; sourceTree = "<group>"; }; - F96D3F0808F272A7004A47F5 /* tclLoad.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclLoad.c; sourceTree = "<group>"; }; - F96D3F0908F272A7004A47F5 /* tclLoadNone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclLoadNone.c; sourceTree = "<group>"; }; - F96D3F0A08F272A7004A47F5 /* tclMain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclMain.c; sourceTree = "<group>"; }; - F96D3F0B08F272A7004A47F5 /* tclNamesp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclNamesp.c; sourceTree = "<group>"; }; - F96D3F0C08F272A7004A47F5 /* tclNotify.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclNotify.c; sourceTree = "<group>"; }; - F96D3F0D08F272A7004A47F5 /* tclObj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclObj.c; sourceTree = "<group>"; }; - F96D3F0E08F272A7004A47F5 /* tclPanic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclPanic.c; sourceTree = "<group>"; }; - F96D3F0F08F272A7004A47F5 /* tclParse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclParse.c; sourceTree = "<group>"; }; - F96D3F1108F272A7004A47F5 /* tclPathObj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclPathObj.c; sourceTree = "<group>"; }; - F96D3F1208F272A7004A47F5 /* tclPipe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclPipe.c; sourceTree = "<group>"; }; - F96D3F1308F272A7004A47F5 /* tclPkg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclPkg.c; sourceTree = "<group>"; }; - F96D3F1408F272A7004A47F5 /* tclPkgConfig.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclPkgConfig.c; sourceTree = "<group>"; }; - F96D3F1508F272A7004A47F5 /* tclPlatDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclPlatDecls.h; sourceTree = "<group>"; }; - F96D3F1608F272A7004A47F5 /* tclPort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclPort.h; sourceTree = "<group>"; }; - F96D3F1708F272A7004A47F5 /* tclPosixStr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclPosixStr.c; sourceTree = "<group>"; }; - F96D3F1808F272A7004A47F5 /* tclPreserve.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclPreserve.c; sourceTree = "<group>"; }; - F96D3F1908F272A7004A47F5 /* tclProc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclProc.c; sourceTree = "<group>"; }; - F96D3F1A08F272A7004A47F5 /* tclRegexp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclRegexp.c; sourceTree = "<group>"; }; - F96D3F1B08F272A7004A47F5 /* tclRegexp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclRegexp.h; sourceTree = "<group>"; }; - F96D3F1C08F272A7004A47F5 /* tclResolve.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclResolve.c; sourceTree = "<group>"; }; - F96D3F1D08F272A7004A47F5 /* tclResult.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclResult.c; sourceTree = "<group>"; }; - F96D3F1E08F272A7004A47F5 /* tclScan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclScan.c; sourceTree = "<group>"; }; - F96D3F1F08F272A7004A47F5 /* tclStringObj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclStringObj.c; sourceTree = "<group>"; }; - F96D3F2408F272A7004A47F5 /* tclStrToD.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclStrToD.c; sourceTree = "<group>"; }; - F96D3F2508F272A7004A47F5 /* tclStubInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclStubInit.c; sourceTree = "<group>"; }; - F96D3F2608F272A7004A47F5 /* tclStubLib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclStubLib.c; sourceTree = "<group>"; }; - F96D3F2708F272A7004A47F5 /* tclTest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclTest.c; sourceTree = "<group>"; }; - F96D3F2808F272A7004A47F5 /* tclTestObj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclTestObj.c; sourceTree = "<group>"; }; - F96D3F2908F272A7004A47F5 /* tclTestProcBodyObj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclTestProcBodyObj.c; sourceTree = "<group>"; }; - F96D3F2A08F272A7004A47F5 /* tclThread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclThread.c; sourceTree = "<group>"; }; - F96D3F2B08F272A7004A47F5 /* tclThreadAlloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclThreadAlloc.c; sourceTree = "<group>"; }; - F96D3F2C08F272A7004A47F5 /* tclThreadJoin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclThreadJoin.c; sourceTree = "<group>"; }; - F96D3F2D08F272A7004A47F5 /* tclThreadStorage.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclThreadStorage.c; sourceTree = "<group>"; }; - F96D3F2E08F272A7004A47F5 /* tclThreadTest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclThreadTest.c; sourceTree = "<group>"; }; - F96D3F2F08F272A7004A47F5 /* tclTimer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclTimer.c; sourceTree = "<group>"; }; - F96D3F3008F272A7004A47F5 /* tclTomMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclTomMath.h; sourceTree = "<group>"; }; - F96D3F3108F272A7004A47F5 /* tclTomMathInterface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclTomMathInterface.c; sourceTree = "<group>"; }; - F96D3F3208F272A7004A47F5 /* tclTrace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclTrace.c; sourceTree = "<group>"; }; - F96D3F3308F272A7004A47F5 /* tclUniData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUniData.c; sourceTree = "<group>"; }; - F96D3F3408F272A7004A47F5 /* tclUtf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUtf.c; sourceTree = "<group>"; }; - F96D3F3508F272A7004A47F5 /* tclUtil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUtil.c; sourceTree = "<group>"; }; - F96D3F3608F272A7004A47F5 /* tclVar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclVar.c; sourceTree = "<group>"; }; - F96D3F3708F272A7004A47F5 /* tommath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath.h; sourceTree = "<group>"; }; - F96D3F3908F272A8004A47F5 /* auto.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = auto.tcl; sourceTree = "<group>"; }; - F96D3F3A08F272A8004A47F5 /* clock.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = clock.tcl; sourceTree = "<group>"; }; - F96D3F3C08F272A8004A47F5 /* pkgIndex.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkgIndex.tcl; sourceTree = "<group>"; }; - F96D3F8C08F272A8004A47F5 /* history.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = history.tcl; sourceTree = "<group>"; }; - F96D3F8E08F272A8004A47F5 /* http.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = http.tcl; sourceTree = "<group>"; }; - F96D3F8F08F272A8004A47F5 /* pkgIndex.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkgIndex.tcl; sourceTree = "<group>"; }; - F96D3F9108F272A8004A47F5 /* http.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = http.tcl; sourceTree = "<group>"; }; - F96D3F9208F272A8004A47F5 /* pkgIndex.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkgIndex.tcl; sourceTree = "<group>"; }; - F96D3F9308F272A8004A47F5 /* init.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = init.tcl; sourceTree = "<group>"; }; - F96D3F9508F272A8004A47F5 /* msgcat.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = msgcat.tcl; sourceTree = "<group>"; }; - F96D3F9608F272A8004A47F5 /* pkgIndex.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkgIndex.tcl; sourceTree = "<group>"; }; - F96D401808F272AA004A47F5 /* optparse.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = optparse.tcl; sourceTree = "<group>"; }; - F96D401908F272AA004A47F5 /* pkgIndex.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkgIndex.tcl; sourceTree = "<group>"; }; - F96D401A08F272AA004A47F5 /* package.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = package.tcl; sourceTree = "<group>"; }; - F96D401B08F272AA004A47F5 /* parray.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = parray.tcl; sourceTree = "<group>"; }; - F96D401D08F272AA004A47F5 /* pkgIndex.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkgIndex.tcl; sourceTree = "<group>"; }; - F96D401E08F272AA004A47F5 /* safe.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = safe.tcl; sourceTree = "<group>"; }; - F96D401F08F272AA004A47F5 /* tclIndex */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclIndex; sourceTree = "<group>"; }; - F96D402108F272AA004A47F5 /* pkgIndex.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkgIndex.tcl; sourceTree = "<group>"; }; - F96D402208F272AA004A47F5 /* tcltest.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tcltest.tcl; sourceTree = "<group>"; }; - F96D402308F272AA004A47F5 /* tm.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tm.tcl; sourceTree = "<group>"; }; - F96D425B08F272B2004A47F5 /* word.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = word.tcl; sourceTree = "<group>"; }; - F96D426408F272B3004A47F5 /* bn_fast_s_mp_mul_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_fast_s_mp_mul_digs.c; sourceTree = "<group>"; }; - F96D426608F272B3004A47F5 /* bn_fast_s_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_fast_s_mp_sqr.c; sourceTree = "<group>"; }; - F96D426908F272B3004A47F5 /* bn_mp_add.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_add.c; sourceTree = "<group>"; }; - F96D426A08F272B3004A47F5 /* bn_mp_add_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_add_d.c; sourceTree = "<group>"; }; - F96D426C08F272B3004A47F5 /* bn_mp_and.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_and.c; sourceTree = "<group>"; }; - F96D426D08F272B3004A47F5 /* bn_mp_clamp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_clamp.c; sourceTree = "<group>"; }; - F96D426E08F272B3004A47F5 /* bn_mp_clear.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_clear.c; sourceTree = "<group>"; }; - F96D426F08F272B3004A47F5 /* bn_mp_clear_multi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_clear_multi.c; sourceTree = "<group>"; }; - F96D427008F272B3004A47F5 /* bn_mp_cmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_cmp.c; sourceTree = "<group>"; }; - F96D427108F272B3004A47F5 /* bn_mp_cmp_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_cmp_d.c; sourceTree = "<group>"; }; - F96D427208F272B3004A47F5 /* bn_mp_cmp_mag.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_cmp_mag.c; sourceTree = "<group>"; }; - F96D427408F272B3004A47F5 /* bn_mp_copy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_copy.c; sourceTree = "<group>"; }; - F96D427508F272B3004A47F5 /* bn_mp_count_bits.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_count_bits.c; sourceTree = "<group>"; }; - F96D427608F272B3004A47F5 /* bn_mp_div.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div.c; sourceTree = "<group>"; }; - F96D427708F272B3004A47F5 /* bn_mp_div_2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div_2.c; sourceTree = "<group>"; }; - F96D427808F272B3004A47F5 /* bn_mp_div_2d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div_2d.c; sourceTree = "<group>"; }; - F96D427908F272B3004A47F5 /* bn_mp_div_3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div_3.c; sourceTree = "<group>"; }; - F96D427A08F272B3004A47F5 /* bn_mp_div_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div_d.c; sourceTree = "<group>"; }; - F96D427E08F272B3004A47F5 /* bn_mp_exch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_exch.c; sourceTree = "<group>"; }; - F96D427F08F272B3004A47F5 /* bn_mp_expt_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_expt_d.c; sourceTree = "<group>"; }; - F96D428708F272B3004A47F5 /* bn_mp_grow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_grow.c; sourceTree = "<group>"; }; - F96D428808F272B3004A47F5 /* bn_mp_init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init.c; sourceTree = "<group>"; }; - F96D428908F272B3004A47F5 /* bn_mp_init_copy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_copy.c; sourceTree = "<group>"; }; - F96D428A08F272B3004A47F5 /* bn_mp_init_multi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_multi.c; sourceTree = "<group>"; }; - F96D428B08F272B3004A47F5 /* bn_mp_init_set.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_set.c; sourceTree = "<group>"; }; - F96D428D08F272B3004A47F5 /* bn_mp_init_size.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_size.c; sourceTree = "<group>"; }; - F96D429208F272B3004A47F5 /* bn_mp_karatsuba_mul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_karatsuba_mul.c; sourceTree = "<group>"; }; - F96D429308F272B3004A47F5 /* bn_mp_karatsuba_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_karatsuba_sqr.c; sourceTree = "<group>"; }; - F96D429508F272B3004A47F5 /* bn_mp_lshd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_lshd.c; sourceTree = "<group>"; }; - F96D429608F272B3004A47F5 /* bn_mp_mod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mod.c; sourceTree = "<group>"; }; - F96D429708F272B3004A47F5 /* bn_mp_mod_2d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mod_2d.c; sourceTree = "<group>"; }; - F96D429C08F272B3004A47F5 /* bn_mp_mul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mul.c; sourceTree = "<group>"; }; - F96D429D08F272B3004A47F5 /* bn_mp_mul_2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mul_2.c; sourceTree = "<group>"; }; - F96D429E08F272B3004A47F5 /* bn_mp_mul_2d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mul_2d.c; sourceTree = "<group>"; }; - F96D429F08F272B3004A47F5 /* bn_mp_mul_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mul_d.c; sourceTree = "<group>"; }; - F96D42A208F272B3004A47F5 /* bn_mp_neg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_neg.c; sourceTree = "<group>"; }; - F96D42A308F272B3004A47F5 /* bn_mp_or.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_or.c; sourceTree = "<group>"; }; - F96D42AB08F272B3004A47F5 /* bn_mp_radix_size.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_radix_size.c; sourceTree = "<group>"; }; - F96D42AC08F272B3004A47F5 /* bn_mp_radix_smap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_radix_smap.c; sourceTree = "<group>"; }; - F96D42AE08F272B3004A47F5 /* bn_mp_read_radix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_read_radix.c; sourceTree = "<group>"; }; - F96D42B908F272B3004A47F5 /* bn_mp_rshd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_rshd.c; sourceTree = "<group>"; }; - F96D42BA08F272B3004A47F5 /* bn_mp_set.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_set.c; sourceTree = "<group>"; }; - F96D42BC08F272B3004A47F5 /* bn_mp_shrink.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_shrink.c; sourceTree = "<group>"; }; - F96D42BE08F272B3004A47F5 /* bn_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sqr.c; sourceTree = "<group>"; }; - F96D42C008F272B3004A47F5 /* bn_mp_sqrt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sqrt.c; sourceTree = "<group>"; }; - F96D42C108F272B3004A47F5 /* bn_mp_sub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sub.c; sourceTree = "<group>"; }; - F96D42C208F272B3004A47F5 /* bn_mp_sub_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sub_d.c; sourceTree = "<group>"; }; - F96D42C608F272B3004A47F5 /* bn_mp_to_unsigned_bin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_to_unsigned_bin.c; sourceTree = "<group>"; }; - F96D42C708F272B3004A47F5 /* bn_mp_to_unsigned_bin_n.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_to_unsigned_bin_n.c; sourceTree = "<group>"; }; - F96D42C808F272B3004A47F5 /* bn_mp_toom_mul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_toom_mul.c; sourceTree = "<group>"; }; - F96D42C908F272B3004A47F5 /* bn_mp_toom_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_toom_sqr.c; sourceTree = "<group>"; }; - F96D42CB08F272B3004A47F5 /* bn_mp_toradix_n.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_toradix_n.c; sourceTree = "<group>"; }; - F96D42CC08F272B3004A47F5 /* bn_mp_unsigned_bin_size.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_unsigned_bin_size.c; sourceTree = "<group>"; }; - F96D42CD08F272B3004A47F5 /* bn_mp_xor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_xor.c; sourceTree = "<group>"; }; - F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_zero.c; sourceTree = "<group>"; }; - F96D42D008F272B3004A47F5 /* bn_reverse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_reverse.c; sourceTree = "<group>"; }; - F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_add.c; sourceTree = "<group>"; }; - F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_mul_digs.c; sourceTree = "<group>"; }; - F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sqr.c; sourceTree = "<group>"; }; - F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sub.c; sourceTree = "<group>"; }; - F96D42D708F272B3004A47F5 /* bncore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bncore.c; sourceTree = "<group>"; }; - F96D432908F272B4004A47F5 /* tommath_class.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_class.h; sourceTree = "<group>"; }; - F96D432A08F272B4004A47F5 /* tommath_superclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_superclass.h; sourceTree = "<group>"; }; - F96D432B08F272B4004A47F5 /* license.terms */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = license.terms; sourceTree = "<group>"; }; - F96D432E08F272B5004A47F5 /* configure.ac */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure.ac; sourceTree = "<group>"; }; - F96D432F08F272B5004A47F5 /* GNUmakefile */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = GNUmakefile; sourceTree = "<group>"; }; - F96D433108F272B5004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; - F96D433208F272B5004A47F5 /* Tcl-Info.plist.in */ = {isa = PBXFileReference; explicitFileType = text.plist; fileEncoding = 4; path = "Tcl-Info.plist.in"; sourceTree = "<group>"; }; - F96D433908F272B5004A47F5 /* tclMacOSXBundle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclMacOSXBundle.c; sourceTree = "<group>"; }; - F96D433D08F272B5004A47F5 /* tclMacOSXFCmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclMacOSXFCmd.c; sourceTree = "<group>"; }; - F96D433E08F272B5004A47F5 /* tclMacOSXNotify.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclMacOSXNotify.c; sourceTree = "<group>"; }; - F96D434308F272B5004A47F5 /* README */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = README; sourceTree = "<group>"; }; - F96D434508F272B5004A47F5 /* all.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = all.tcl; sourceTree = "<group>"; }; - F96D434608F272B5004A47F5 /* append.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = append.test; sourceTree = "<group>"; }; - F96D434708F272B5004A47F5 /* appendComp.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = appendComp.test; sourceTree = "<group>"; }; - F96D434808F272B5004A47F5 /* assocd.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = assocd.test; sourceTree = "<group>"; }; - F96D434908F272B5004A47F5 /* async.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = async.test; sourceTree = "<group>"; }; - F96D434A08F272B5004A47F5 /* autoMkindex.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = autoMkindex.test; sourceTree = "<group>"; }; - F96D434B08F272B5004A47F5 /* basic.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = basic.test; sourceTree = "<group>"; }; - F96D434C08F272B5004A47F5 /* binary.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = binary.test; sourceTree = "<group>"; }; - F96D434D08F272B5004A47F5 /* case.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = case.test; sourceTree = "<group>"; }; - F96D434E08F272B5004A47F5 /* chan.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = chan.test; sourceTree = "<group>"; }; - F96D434F08F272B5004A47F5 /* clock.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = clock.test; sourceTree = "<group>"; }; - F96D435008F272B5004A47F5 /* cmdAH.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = cmdAH.test; sourceTree = "<group>"; }; - F96D435108F272B5004A47F5 /* cmdIL.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = cmdIL.test; sourceTree = "<group>"; }; - F96D435208F272B5004A47F5 /* cmdInfo.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = cmdInfo.test; sourceTree = "<group>"; }; - F96D435308F272B5004A47F5 /* cmdMZ.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = cmdMZ.test; sourceTree = "<group>"; }; - F96D435408F272B5004A47F5 /* compExpr-old.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "compExpr-old.test"; sourceTree = "<group>"; }; - F96D435508F272B5004A47F5 /* compExpr.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = compExpr.test; sourceTree = "<group>"; }; - F96D435608F272B5004A47F5 /* compile.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = compile.test; sourceTree = "<group>"; }; - F96D435708F272B5004A47F5 /* concat.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = concat.test; sourceTree = "<group>"; }; - F96D435808F272B5004A47F5 /* config.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = config.test; sourceTree = "<group>"; }; - F96D435908F272B5004A47F5 /* dcall.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = dcall.test; sourceTree = "<group>"; }; - F96D435A08F272B5004A47F5 /* dict.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = dict.test; sourceTree = "<group>"; }; - F96D435C08F272B5004A47F5 /* dstring.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = dstring.test; sourceTree = "<group>"; }; - F96D435E08F272B5004A47F5 /* encoding.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = encoding.test; sourceTree = "<group>"; }; - F96D435F08F272B5004A47F5 /* env.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = env.test; sourceTree = "<group>"; }; - F96D436008F272B5004A47F5 /* error.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = error.test; sourceTree = "<group>"; }; - F96D436108F272B5004A47F5 /* eval.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = eval.test; sourceTree = "<group>"; }; - F96D436208F272B5004A47F5 /* event.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = event.test; sourceTree = "<group>"; }; - F96D436308F272B5004A47F5 /* exec.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = exec.test; sourceTree = "<group>"; }; - F96D436408F272B5004A47F5 /* execute.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = execute.test; sourceTree = "<group>"; }; - F96D436508F272B5004A47F5 /* expr-old.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "expr-old.test"; sourceTree = "<group>"; }; - F96D436608F272B5004A47F5 /* expr.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = expr.test; sourceTree = "<group>"; }; - F96D436708F272B6004A47F5 /* fCmd.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fCmd.test; sourceTree = "<group>"; }; - F96D436808F272B6004A47F5 /* fileName.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fileName.test; sourceTree = "<group>"; }; - F96D436908F272B6004A47F5 /* fileSystem.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fileSystem.test; sourceTree = "<group>"; }; - F96D436A08F272B6004A47F5 /* for-old.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "for-old.test"; sourceTree = "<group>"; }; - F96D436B08F272B6004A47F5 /* for.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = for.test; sourceTree = "<group>"; }; - F96D436C08F272B6004A47F5 /* foreach.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = foreach.test; sourceTree = "<group>"; }; - F96D436D08F272B6004A47F5 /* format.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = format.test; sourceTree = "<group>"; }; - F96D436E08F272B6004A47F5 /* get.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = get.test; sourceTree = "<group>"; }; - F96D436F08F272B6004A47F5 /* history.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = history.test; sourceTree = "<group>"; }; - F96D437008F272B6004A47F5 /* http.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = http.test; sourceTree = "<group>"; }; - F96D437108F272B6004A47F5 /* httpd */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = httpd; sourceTree = "<group>"; }; - F96D437208F272B6004A47F5 /* httpold.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = httpold.test; sourceTree = "<group>"; }; - F96D437308F272B6004A47F5 /* if-old.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "if-old.test"; sourceTree = "<group>"; }; - F96D437408F272B6004A47F5 /* if.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = if.test; sourceTree = "<group>"; }; - F96D437508F272B6004A47F5 /* incr-old.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "incr-old.test"; sourceTree = "<group>"; }; - F96D437608F272B6004A47F5 /* incr.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = incr.test; sourceTree = "<group>"; }; - F96D437708F272B6004A47F5 /* indexObj.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = indexObj.test; sourceTree = "<group>"; }; - F96D437808F272B6004A47F5 /* info.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = info.test; sourceTree = "<group>"; }; - F96D437908F272B6004A47F5 /* init.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = init.test; sourceTree = "<group>"; }; - F96D437A08F272B6004A47F5 /* interp.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = interp.test; sourceTree = "<group>"; }; - F96D437B08F272B6004A47F5 /* io.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = io.test; sourceTree = "<group>"; }; - F96D437C08F272B6004A47F5 /* ioCmd.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ioCmd.test; sourceTree = "<group>"; }; - F96D437D08F272B6004A47F5 /* iogt.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = iogt.test; sourceTree = "<group>"; }; - F96D437F08F272B6004A47F5 /* join.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = join.test; sourceTree = "<group>"; }; - F96D438008F272B6004A47F5 /* lindex.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = lindex.test; sourceTree = "<group>"; }; - F96D438108F272B6004A47F5 /* link.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = link.test; sourceTree = "<group>"; }; - F96D438208F272B6004A47F5 /* linsert.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = linsert.test; sourceTree = "<group>"; }; - F96D438308F272B6004A47F5 /* list.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = list.test; sourceTree = "<group>"; }; - F96D438408F272B6004A47F5 /* listObj.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = listObj.test; sourceTree = "<group>"; }; - F96D438508F272B6004A47F5 /* llength.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = llength.test; sourceTree = "<group>"; }; - F96D438608F272B6004A47F5 /* load.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = load.test; sourceTree = "<group>"; }; - F96D438708F272B6004A47F5 /* lrange.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = lrange.test; sourceTree = "<group>"; }; - F96D438808F272B6004A47F5 /* lrepeat.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = lrepeat.test; sourceTree = "<group>"; }; - F96D438908F272B6004A47F5 /* lreplace.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = lreplace.test; sourceTree = "<group>"; }; - F96D438A08F272B6004A47F5 /* lsearch.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = lsearch.test; sourceTree = "<group>"; }; - F96D438B08F272B6004A47F5 /* lset.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = lset.test; sourceTree = "<group>"; }; - F96D438C08F272B6004A47F5 /* lsetComp.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = lsetComp.test; sourceTree = "<group>"; }; - F96D438D08F272B6004A47F5 /* macOSXFCmd.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = macOSXFCmd.test; sourceTree = "<group>"; }; - F96D438E08F272B6004A47F5 /* main.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = main.test; sourceTree = "<group>"; }; - F96D438F08F272B6004A47F5 /* misc.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = misc.test; sourceTree = "<group>"; }; - F96D439008F272B6004A47F5 /* msgcat.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = msgcat.test; sourceTree = "<group>"; }; - F96D439108F272B6004A47F5 /* namespace-old.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "namespace-old.test"; sourceTree = "<group>"; }; - F96D439208F272B7004A47F5 /* namespace.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = namespace.test; sourceTree = "<group>"; }; - F96D439308F272B7004A47F5 /* notify.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = notify.test; sourceTree = "<group>"; }; - F96D439408F272B7004A47F5 /* obj.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = obj.test; sourceTree = "<group>"; }; - F96D439508F272B7004A47F5 /* opt.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = opt.test; sourceTree = "<group>"; }; - F96D439608F272B7004A47F5 /* package.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = package.test; sourceTree = "<group>"; }; - F96D439708F272B7004A47F5 /* parse.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = parse.test; sourceTree = "<group>"; }; - F96D439808F272B7004A47F5 /* parseExpr.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = parseExpr.test; sourceTree = "<group>"; }; - F96D439908F272B7004A47F5 /* parseOld.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = parseOld.test; sourceTree = "<group>"; }; - F96D439A08F272B7004A47F5 /* pid.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pid.test; sourceTree = "<group>"; }; - F96D439B08F272B7004A47F5 /* pkg.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkg.test; sourceTree = "<group>"; }; - F96D439C08F272B7004A47F5 /* pkgMkIndex.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkgMkIndex.test; sourceTree = "<group>"; }; - F96D439D08F272B7004A47F5 /* platform.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = platform.test; sourceTree = "<group>"; }; - F96D439E08F272B7004A47F5 /* proc-old.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "proc-old.test"; sourceTree = "<group>"; }; - F96D439F08F272B7004A47F5 /* proc.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = proc.test; sourceTree = "<group>"; }; - F96D43A008F272B7004A47F5 /* pwd.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pwd.test; sourceTree = "<group>"; }; - F96D43A108F272B7004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; - F96D43A208F272B7004A47F5 /* reg.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = reg.test; sourceTree = "<group>"; }; - F96D43A308F272B7004A47F5 /* regexp.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = regexp.test; sourceTree = "<group>"; }; - F96D43A408F272B7004A47F5 /* regexpComp.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = regexpComp.test; sourceTree = "<group>"; }; - F96D43A508F272B7004A47F5 /* registry.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = registry.test; sourceTree = "<group>"; }; - F96D43A608F272B7004A47F5 /* remote.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = remote.tcl; sourceTree = "<group>"; }; - F96D43A708F272B7004A47F5 /* rename.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = rename.test; sourceTree = "<group>"; }; - F96D43A808F272B7004A47F5 /* result.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = result.test; sourceTree = "<group>"; }; - F96D43A908F272B7004A47F5 /* safe.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = safe.test; sourceTree = "<group>"; }; - F96D43AA08F272B7004A47F5 /* scan.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = scan.test; sourceTree = "<group>"; }; - F96D43AB08F272B7004A47F5 /* security.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = security.test; sourceTree = "<group>"; }; - F96D43AC08F272B7004A47F5 /* set-old.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "set-old.test"; sourceTree = "<group>"; }; - F96D43AD08F272B7004A47F5 /* set.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = set.test; sourceTree = "<group>"; }; - F96D43AE08F272B7004A47F5 /* socket.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = socket.test; sourceTree = "<group>"; }; - F96D43AF08F272B7004A47F5 /* source.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = source.test; sourceTree = "<group>"; }; - F96D43B008F272B7004A47F5 /* split.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = split.test; sourceTree = "<group>"; }; - F96D43B108F272B7004A47F5 /* stack.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = stack.test; sourceTree = "<group>"; }; - F96D43B208F272B7004A47F5 /* string.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = string.test; sourceTree = "<group>"; }; - F96D43B308F272B7004A47F5 /* stringComp.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = stringComp.test; sourceTree = "<group>"; }; - F96D43B408F272B7004A47F5 /* stringObj.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = stringObj.test; sourceTree = "<group>"; }; - F96D43B508F272B7004A47F5 /* subst.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = subst.test; sourceTree = "<group>"; }; - F96D43B608F272B7004A47F5 /* switch.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = switch.test; sourceTree = "<group>"; }; - F96D43B708F272B7004A47F5 /* tcltest.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tcltest.test; sourceTree = "<group>"; }; - F96D43B808F272B7004A47F5 /* thread.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = thread.test; sourceTree = "<group>"; }; - F96D43B908F272B7004A47F5 /* timer.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = timer.test; sourceTree = "<group>"; }; - F96D43BA08F272B7004A47F5 /* tm.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tm.test; sourceTree = "<group>"; }; - F96D43BB08F272B7004A47F5 /* trace.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = trace.test; sourceTree = "<group>"; }; - F96D43BC08F272B7004A47F5 /* unixFCmd.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unixFCmd.test; sourceTree = "<group>"; }; - F96D43BD08F272B7004A47F5 /* unixFile.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unixFile.test; sourceTree = "<group>"; }; - F96D43BE08F272B7004A47F5 /* unixInit.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unixInit.test; sourceTree = "<group>"; }; - F96D43BF08F272B7004A47F5 /* unixNotfy.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unixNotfy.test; sourceTree = "<group>"; }; - F96D43C008F272B7004A47F5 /* unknown.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unknown.test; sourceTree = "<group>"; }; - F96D43C108F272B7004A47F5 /* unload.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unload.test; sourceTree = "<group>"; }; - F96D43C208F272B7004A47F5 /* uplevel.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uplevel.test; sourceTree = "<group>"; }; - F96D43C308F272B7004A47F5 /* upvar.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = upvar.test; sourceTree = "<group>"; }; - F96D43C408F272B7004A47F5 /* utf.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = utf.test; sourceTree = "<group>"; }; - F96D43C508F272B7004A47F5 /* util.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = util.test; sourceTree = "<group>"; }; - F96D43C608F272B7004A47F5 /* var.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = var.test; sourceTree = "<group>"; }; - F96D43C708F272B7004A47F5 /* while-old.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "while-old.test"; sourceTree = "<group>"; }; - F96D43C808F272B7004A47F5 /* while.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = while.test; sourceTree = "<group>"; }; - F96D43C908F272B7004A47F5 /* winConsole.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winConsole.test; sourceTree = "<group>"; }; - F96D43CA08F272B7004A47F5 /* winDde.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winDde.test; sourceTree = "<group>"; }; - 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.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>"; }; - F96D442B08F272B8004A47F5 /* makeTestCases.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = makeTestCases.tcl; sourceTree = "<group>"; }; - F96D442C08F272B8004A47F5 /* man2help.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2help.tcl; sourceTree = "<group>"; }; - F96D442D08F272B8004A47F5 /* man2help2.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2help2.tcl; sourceTree = "<group>"; }; - F96D442E08F272B8004A47F5 /* man2html.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2html.tcl; sourceTree = "<group>"; }; - F96D442F08F272B8004A47F5 /* man2html1.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2html1.tcl; sourceTree = "<group>"; }; - F96D443008F272B8004A47F5 /* man2html2.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = man2html2.tcl; sourceTree = "<group>"; }; - F96D443108F272B8004A47F5 /* man2tcl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = man2tcl.c; sourceTree = "<group>"; }; - F96D443208F272B8004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; - F96D443308F272B8004A47F5 /* regexpTestLib.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = regexpTestLib.tcl; sourceTree = "<group>"; }; - F96D443508F272B8004A47F5 /* tcl.hpj.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.hpj.in; sourceTree = "<group>"; }; - 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.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>"; }; - F96D444C08F272B9004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; - F96D444D08F272B9004A47F5 /* install-sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "install-sh"; sourceTree = "<group>"; }; - F96D444E08F272B9004A47F5 /* installManPage */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = installManPage; sourceTree = "<group>"; }; - F96D444F08F272B9004A47F5 /* ldAix */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = ldAix; sourceTree = "<group>"; }; - F96D445008F272B9004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; }; - F96D445208F272B9004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; - F96D445308F272B9004A47F5 /* tcl.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tcl.m4; sourceTree = "<group>"; }; - F96D445408F272B9004A47F5 /* tcl.spec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.spec; sourceTree = "<group>"; }; - F96D445508F272B9004A47F5 /* tclAppInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclAppInit.c; sourceTree = "<group>"; }; - F96D445608F272B9004A47F5 /* tclConfig.h.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = tclConfig.h.in; sourceTree = "<group>"; }; - F96D445708F272B9004A47F5 /* tclConfig.sh.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tclConfig.sh.in; sourceTree = "<group>"; }; - F96D445808F272B9004A47F5 /* tclLoadAix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclLoadAix.c; sourceTree = "<group>"; }; - F96D445908F272B9004A47F5 /* tclLoadDl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclLoadDl.c; sourceTree = "<group>"; }; - F96D445B08F272B9004A47F5 /* tclLoadDyld.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclLoadDyld.c; sourceTree = "<group>"; }; - F96D445C08F272B9004A47F5 /* tclLoadNext.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclLoadNext.c; sourceTree = "<group>"; }; - F96D445D08F272B9004A47F5 /* tclLoadOSF.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclLoadOSF.c; sourceTree = "<group>"; }; - F96D445E08F272B9004A47F5 /* tclLoadShl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclLoadShl.c; sourceTree = "<group>"; }; - F96D445F08F272B9004A47F5 /* tclUnixChan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixChan.c; sourceTree = "<group>"; }; - F96D446008F272B9004A47F5 /* tclUnixEvent.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixEvent.c; sourceTree = "<group>"; }; - F96D446108F272B9004A47F5 /* tclUnixFCmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixFCmd.c; sourceTree = "<group>"; }; - F96D446208F272B9004A47F5 /* tclUnixFile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixFile.c; sourceTree = "<group>"; }; - F96D446308F272B9004A47F5 /* tclUnixInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixInit.c; sourceTree = "<group>"; }; - F96D446408F272B9004A47F5 /* tclUnixNotfy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixNotfy.c; sourceTree = "<group>"; }; - F96D446508F272B9004A47F5 /* tclUnixPipe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixPipe.c; sourceTree = "<group>"; }; - F96D446608F272B9004A47F5 /* tclUnixPort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclUnixPort.h; sourceTree = "<group>"; }; - F96D446708F272B9004A47F5 /* tclUnixSock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixSock.c; sourceTree = "<group>"; }; - F96D446808F272B9004A47F5 /* tclUnixTest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixTest.c; sourceTree = "<group>"; }; - F96D446908F272B9004A47F5 /* tclUnixThrd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixThrd.c; sourceTree = "<group>"; }; - F96D446A08F272B9004A47F5 /* tclUnixThrd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclUnixThrd.h; sourceTree = "<group>"; }; - F96D446B08F272B9004A47F5 /* tclUnixTime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixTime.c; sourceTree = "<group>"; }; - 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>"; }; - F96D447408F272BA004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; }; - F96D447508F272BA004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; 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>"; }; - F96D447E08F272BA004A47F5 /* tcl.dsp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.dsp; sourceTree = "<group>"; }; - F96D447F08F272BA004A47F5 /* tcl.dsw */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.dsw; sourceTree = "<group>"; }; - F96D448008F272BA004A47F5 /* tcl.hpj.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.hpj.in; sourceTree = "<group>"; }; - F96D448108F272BA004A47F5 /* tcl.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tcl.m4; sourceTree = "<group>"; }; - F96D448208F272BA004A47F5 /* tcl.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.rc; sourceTree = "<group>"; }; - F96D448308F272BA004A47F5 /* tclAppInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclAppInit.c; sourceTree = "<group>"; }; - F96D448408F272BA004A47F5 /* tclConfig.sh.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tclConfig.sh.in; sourceTree = "<group>"; }; - F96D448608F272BA004A47F5 /* tclsh.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tclsh.rc; sourceTree = "<group>"; }; - F96D448708F272BA004A47F5 /* tclWin32Dll.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWin32Dll.c; sourceTree = "<group>"; }; - F96D448808F272BA004A47F5 /* tclWinChan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinChan.c; sourceTree = "<group>"; }; - F96D448908F272BA004A47F5 /* tclWinConsole.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinConsole.c; sourceTree = "<group>"; }; - F96D448A08F272BA004A47F5 /* tclWinDde.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinDde.c; sourceTree = "<group>"; }; - F96D448B08F272BA004A47F5 /* tclWinError.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinError.c; sourceTree = "<group>"; }; - F96D448C08F272BA004A47F5 /* tclWinFCmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinFCmd.c; sourceTree = "<group>"; }; - F96D448D08F272BA004A47F5 /* tclWinFile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinFile.c; sourceTree = "<group>"; }; - F96D448E08F272BA004A47F5 /* tclWinInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinInit.c; sourceTree = "<group>"; }; - F96D448F08F272BA004A47F5 /* tclWinInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclWinInt.h; sourceTree = "<group>"; }; - F96D449008F272BA004A47F5 /* tclWinLoad.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinLoad.c; sourceTree = "<group>"; }; - F96D449108F272BA004A47F5 /* tclWinNotify.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinNotify.c; sourceTree = "<group>"; }; - F96D449208F272BA004A47F5 /* tclWinPipe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinPipe.c; sourceTree = "<group>"; }; - F96D449308F272BA004A47F5 /* tclWinPort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclWinPort.h; sourceTree = "<group>"; }; - F96D449408F272BA004A47F5 /* tclWinReg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinReg.c; sourceTree = "<group>"; }; - F96D449508F272BA004A47F5 /* tclWinSerial.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinSerial.c; sourceTree = "<group>"; }; - F96D449608F272BA004A47F5 /* tclWinSock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinSock.c; sourceTree = "<group>"; }; - F96D449708F272BA004A47F5 /* tclWinTest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinTest.c; sourceTree = "<group>"; }; - F96D449808F272BA004A47F5 /* tclWinThrd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinThrd.c; sourceTree = "<group>"; }; - F96D449908F272BA004A47F5 /* tclWinThrd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclWinThrd.h; sourceTree = "<group>"; }; - F96D449A08F272BA004A47F5 /* tclWinTime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinTime.c; sourceTree = "<group>"; }; - F973E5960EE99384001A648E /* vistaTheme.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = vistaTheme.tcl; sourceTree = "<group>"; }; - F974D56C0FBE7D6300BF728B /* http11.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = http11.test; sourceTree = "<group>"; }; - F974D56D0FBE7D6300BF728B /* httpd11.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = httpd11.tcl; sourceTree = "<group>"; }; - F974D5720FBE7DC600BF728B /* coroutine.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = coroutine.n; sourceTree = "<group>"; }; - F974D5760FBE7E1900BF728B /* tailcall.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = tailcall.n; sourceTree = "<group>"; }; - F974D5770FBE7E6100BF728B /* coroutine.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = coroutine.test; sourceTree = "<group>"; }; - F974D5780FBE7E6100BF728B /* tailcall.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tailcall.test; sourceTree = "<group>"; }; - F974D5790FBE7E9C00BF728B /* tcl.pc.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.pc.in; sourceTree = "<group>"; }; - F974D57B0FBE7EC000BF728B /* tk.pc.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk.pc.in; sourceTree = "<group>"; }; - F974D57C0FBE7EFF00BF728B /* iconlist.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = iconlist.tcl; sourceTree = "<group>"; }; - F974D57D0FBE7EFF00BF728B /* icons.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = icons.tcl; sourceTree = "<group>"; }; - F97590AE1039A96200558A9A /* Wish.sdef */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.sdef; path = Wish.sdef; sourceTree = "<group>"; }; - F976F6A70C325FB6005066D9 /* tkMacOSXPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXPrivate.h; sourceTree = "<group>"; }; - F97AE7F10B65C1E900310EA2 /* Tk-Common.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tk-Common.xcconfig"; sourceTree = "<group>"; }; - F97AE82B0B65C69B00310EA2 /* Tk-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tk-Release.xcconfig"; sourceTree = "<group>"; }; - F97AE8330B65C87F00310EA2 /* Tk-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tk-Debug.xcconfig"; sourceTree = "<group>"; }; - F98383650F0FA43900171CA6 /* checkbutton.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = checkbutton.test; sourceTree = "<group>"; }; - F98383680F0FA44700171CA6 /* radiobutton.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = radiobutton.test; sourceTree = "<group>"; }; - F9903CAF094FAADA004613E9 /* tclTomMath.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclTomMath.decls; sourceTree = "<group>"; }; - F9903CB0094FAADA004613E9 /* tclTomMathDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclTomMathDecls.h; sourceTree = "<group>"; }; - F99388380EE0114B0065FE6B /* fontchooser.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fontchooser.tcl; sourceTree = "<group>"; }; - F99388950EE02D980065FE6B /* fontchooser.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fontchooser.test; sourceTree = "<group>"; }; - F99D61180EF5573A00BBFE01 /* TclZlib.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = TclZlib.3; sourceTree = "<group>"; }; - F9A3082D08F2D4AB00BAE1AB /* Tk.framework */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.framework; path = Tk.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F9A3084B08F2D4CE00BAE1AB /* Wish.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Wish.app; sourceTree = BUILT_PRODUCTS_DIR; }; - F9A3084E08F2D4F400BAE1AB /* Tcl.framework */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.framework; path = Tcl.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F9A493240CEBF38300B78AE2 /* chanio.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = chanio.test; sourceTree = "<group>"; }; - F9C888C20EEF6571003F63AD /* fontchooser.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = fontchooser.n; sourceTree = "<group>"; }; - F9C9CBFF0E84059800E00935 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; - F9D1360A0CDC252C00DBE0B5 /* mclist.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = mclist.tcl; sourceTree = "<group>"; }; - F9DD99BC0F07DF850018B2E4 /* tkImgPNG.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkImgPNG.c; sourceTree = "<group>"; }; - F9DD99BF0F07DFCD0018B2E4 /* imgPNG.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = imgPNG.test; sourceTree = "<group>"; }; - F9ECB1120B26521500A28025 /* pkgIndex.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkgIndex.tcl; sourceTree = "<group>"; }; - F9ECB1130B26521500A28025 /* platform.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = platform.tcl; sourceTree = "<group>"; }; - F9ECB1140B26521500A28025 /* shell.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = shell.tcl; sourceTree = "<group>"; }; - F9ECB1CA0B2652D300A28025 /* apply.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = apply.test; sourceTree = "<group>"; }; - F9ECB1CB0B26534C00A28025 /* mathop.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = mathop.test; sourceTree = "<group>"; }; - F9ECB1E10B26543C00A28025 /* platform_shell.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = platform_shell.n; sourceTree = "<group>"; }; - F9ECB1E20B26543C00A28025 /* platform.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = platform.n; sourceTree = "<group>"; }; - F9F4415D0C8BAE6F00BCCD67 /* tclDTrace.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = tclDTrace.d; sourceTree = "<group>"; }; - F9F4EFDC0CC7B3CA00378A27 /* ttkpane.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; languageSpecificationIdentifier = shell; path = ttkpane.tcl; sourceTree = "<group>"; }; - F9F4EFDD0CC7B3CB00378A27 /* ttkmenu.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; languageSpecificationIdentifier = shell; path = ttkmenu.tcl; sourceTree = "<group>"; }; - F9FC77B70AB29E9100B7077D /* tclUnixCompat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixCompat.c; sourceTree = "<group>"; }; - F9FD31F40CC1AD070073837D /* tktest-X11 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "tktest-X11"; sourceTree = BUILT_PRODUCTS_DIR; }; - F9FD32140CC1AF170073837D /* libX11.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libX11.dylib; path = /usr/X11R6/lib/libX11.dylib; sourceTree = "<absolute>"; }; - F9FD32150CC1AF170073837D /* libXext.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libXext.dylib; path = /usr/X11R6/lib/libXext.dylib; sourceTree = "<absolute>"; }; - F9FD32160CC1AF170073837D /* libXss.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libXss.dylib; path = /usr/X11R6/lib/libXss.dylib; sourceTree = "<absolute>"; }; - F9FD34990CC1BB0D0073837D /* libfreetype.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfreetype.dylib; path = /usr/X11R6/lib/libfreetype.dylib; sourceTree = "<absolute>"; }; - F9FD349A0CC1BB0D0073837D /* libXft.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libXft.dylib; path = /usr/X11R6/lib/libXft.dylib; sourceTree = "<absolute>"; }; - F9FD34C30CC1BBD70073837D /* libfontconfig.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfontconfig.dylib; path = /usr/X11R6/lib/libfontconfig.dylib; sourceTree = "<absolute>"; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8DD76FAD0486AB0100D96B5E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - F966C07508F2820D005CB29B /* CoreFoundation.framework in Frameworks */, - F96437E70EF0D652003F468E /* libz.dylib in Frameworks */, - F966C07708F2821B005CB29B /* Carbon.framework in Frameworks */, - F966C07908F28233005CB29B /* IOKit.framework in Frameworks */, - F94523A20E6FC2AC00C1D987 /* Cocoa.framework in Frameworks */, - F9C9CC000E84059800E00935 /* ApplicationServices.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F9FD31E30CC1AD070073837D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - F9FD31E40CC1AD070073837D /* CoreFoundation.framework in Frameworks */, - F96437E80EF0D652003F468E /* libz.dylib in Frameworks */, - F9FD32170CC1AF170073837D /* libX11.dylib in Frameworks */, - F9FD32180CC1AF170073837D /* libXext.dylib in Frameworks */, - F9FD32190CC1AF170073837D /* libXss.dylib in Frameworks */, - F9FD349C0CC1BB0D0073837D /* libXft.dylib in Frameworks */, - F9FD349B0CC1BB0D0073837D /* libfreetype.dylib in Frameworks */, - F9FD34C40CC1BBD70073837D /* libfontconfig.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* Tk */ = { - isa = PBXGroup; - children = ( - F96D3DF708F271BE004A47F5 /* Tk Sources */, - F96D3DF608F27169004A47F5 /* Tcl Sources */, - F966C06F08F281DC005CB29B /* Frameworks */, - 1AB674ADFE9D54B511CA2CBB /* Products */, - ); - comments = "Copyright (c) 2004-2009 Daniel A. Steffen <das@users.sourceforge.net>\nCopyright 2008-2009, Apple Inc.\n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n"; - name = Tk; - path = .; - sourceTree = SOURCE_ROOT; - }; - 1AB674ADFE9D54B511CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - F9A3084B08F2D4CE00BAE1AB /* Wish.app */, - F9A3082D08F2D4AB00BAE1AB /* Tk.framework */, - F9A3084E08F2D4F400BAE1AB /* Tcl.framework */, - 8DD76FB20486AB0100D96B5E /* tktest */, - F9FD31F40CC1AD070073837D /* tktest-X11 */, - ); - includeInIndex = 0; - name = Products; - sourceTree = "<group>"; - }; - F9183E690EFC81560030B814 /* pkgs */ = { - isa = PBXGroup; - children = ( - F9183E6A0EFC81560030B814 /* README */, - F946FB8B0FBE3AED00CD6495 /* itcl */, - F9183E8F0EFC817B0030B814 /* tdbc */, - ); - path = pkgs; - sourceTree = "<group>"; - }; - F966BA0308F27A37005CB29B /* bitmaps */ = { - isa = PBXGroup; - children = ( - F966BA0408F27A37005CB29B /* error.xbm */, - F966BA0508F27A37005CB29B /* gray12.xbm */, - F966BA0608F27A37005CB29B /* gray25.xbm */, - F966BA0708F27A37005CB29B /* gray50.xbm */, - F966BA0808F27A37005CB29B /* gray75.xbm */, - F966BA0908F27A37005CB29B /* hourglass.xbm */, - F966BA0A08F27A37005CB29B /* info.xbm */, - F966BA0B08F27A37005CB29B /* questhead.xbm */, - F966BA0C08F27A37005CB29B /* question.xbm */, - F966BA0D08F27A37005CB29B /* warning.xbm */, - ); - path = bitmaps; - sourceTree = "<group>"; - }; - F966BA1008F27A37005CB29B /* doc */ = { - isa = PBXGroup; - children = ( - F966BA1108F27A37005CB29B /* 3DBorder.3 */, - F966BA1208F27A37005CB29B /* AddOption.3 */, - F966BA1308F27A37005CB29B /* bell.n */, - F966BA1408F27A37005CB29B /* bind.n */, - F966BA1508F27A37005CB29B /* BindTable.3 */, - F966BA1608F27A37005CB29B /* bindtags.n */, - F966BA1708F27A37005CB29B /* bitmap.n */, - F966BA1808F27A37005CB29B /* button.n */, - F966BA1908F27A37005CB29B /* canvas.n */, - F966BA1A08F27A37005CB29B /* CanvPsY.3 */, - F966BA1B08F27A37005CB29B /* CanvTkwin.3 */, - F966BA1C08F27A37005CB29B /* CanvTxtInfo.3 */, - F966BA1D08F27A37005CB29B /* checkbutton.n */, - F966BA1E08F27A37005CB29B /* chooseColor.n */, - F966BA1F08F27A37005CB29B /* chooseDirectory.n */, - F966BA2008F27A37005CB29B /* Clipboard.3 */, - F966BA2108F27A37005CB29B /* clipboard.n */, - F966BA2208F27A37005CB29B /* ClrSelect.3 */, - F966BA2308F27A37005CB29B /* colors.n */, - F966BA2408F27A37005CB29B /* ConfigWidg.3 */, - F966BA2508F27A37005CB29B /* ConfigWind.3 */, - F966BA2608F27A37005CB29B /* console.n */, - F966BA2708F27A37005CB29B /* CoordToWin.3 */, - F966BA2808F27A37005CB29B /* CrtCmHdlr.3 */, - F966BA2908F27A37005CB29B /* CrtErrHdlr.3 */, - F966BA2A08F27A37005CB29B /* CrtGenHdlr.3 */, - F966BA2B08F27A37005CB29B /* CrtImgType.3 */, - F966BA2C08F27A37005CB29B /* CrtItemType.3 */, - F966BA2D08F27A37005CB29B /* CrtPhImgFmt.3 */, - F966BA2E08F27A37005CB29B /* CrtSelHdlr.3 */, - F966BA2F08F27A37005CB29B /* CrtWindow.3 */, - F966BA3008F27A37005CB29B /* cursors.n */, - F966BA3108F27A37005CB29B /* DeleteImg.3 */, - F966BA3208F27A37005CB29B /* destroy.n */, - F966BA3308F27A37005CB29B /* dialog.n */, - F966BA3408F27A37005CB29B /* DrawFocHlt.3 */, - F966BA3508F27A37005CB29B /* entry.n */, - F966BA3608F27A37005CB29B /* event.n */, - F966BA3708F27A37005CB29B /* EventHndlr.3 */, - F966BA3808F27A37005CB29B /* FindPhoto.3 */, - F966BA3908F27A37005CB29B /* focus.n */, - F966BA3A08F27A37005CB29B /* focusNext.n */, - F966BA3B08F27A37005CB29B /* font.n */, - F9C888C20EEF6571003F63AD /* fontchooser.n */, - F966BA3C08F27A37005CB29B /* FontId.3 */, - F966BA3D08F27A37005CB29B /* frame.n */, - F966BA3E08F27A37005CB29B /* FreeXId.3 */, - F966BA3F08F27A37005CB29B /* GeomReq.3 */, - F966BA4008F27A37005CB29B /* GetAnchor.3 */, - F966BA4108F27A37005CB29B /* GetBitmap.3 */, - F966BA4208F27A37005CB29B /* GetCapStyl.3 */, - F966BA4308F27A37005CB29B /* GetClrmap.3 */, - F966BA4408F27A37005CB29B /* GetColor.3 */, - F966BA4508F27A37005CB29B /* GetCursor.3 */, - F966BA4608F27A37005CB29B /* GetDash.3 */, - F966BA4708F27A37005CB29B /* GetFont.3 */, - F966BA4808F27A37005CB29B /* GetGC.3 */, - F966BA4908F27A37005CB29B /* GetHINSTANCE.3 */, - F966BA4A08F27A37005CB29B /* GetHWND.3 */, - F966BA4B08F27A37005CB29B /* GetImage.3 */, - F966BA4C08F27A37005CB29B /* GetJoinStl.3 */, - F966BA4D08F27A37005CB29B /* GetJustify.3 */, - F966BA4E08F27A37005CB29B /* getOpenFile.n */, - F966BA4F08F27A37005CB29B /* GetOption.3 */, - F966BA5008F27A38005CB29B /* GetPixels.3 */, - F966BA5108F27A38005CB29B /* GetPixmap.3 */, - F966BA5208F27A38005CB29B /* GetRelief.3 */, - F966BA5308F27A38005CB29B /* GetRootCrd.3 */, - F966BA5408F27A38005CB29B /* GetScroll.3 */, - F966BA5508F27A38005CB29B /* GetSelect.3 */, - F966BA5608F27A38005CB29B /* GetUid.3 */, - F966BA5708F27A38005CB29B /* GetVisual.3 */, - F966BA5808F27A38005CB29B /* GetVRoot.3 */, - F966BA5908F27A38005CB29B /* Grab.3 */, - F966BA5A08F27A38005CB29B /* grab.n */, - F966BA5B08F27A38005CB29B /* grid.n */, - F966BA5C08F27A38005CB29B /* HandleEvent.3 */, - F966BA5D08F27A38005CB29B /* HWNDToWindow.3 */, - F966BA5E08F27A38005CB29B /* IdToWindow.3 */, - F966BA5F08F27A38005CB29B /* image.n */, - F966BA6008F27A38005CB29B /* ImgChanged.3 */, - F966BA6108F27A38005CB29B /* Inactive.3 */, - F966BA6208F27A38005CB29B /* InternAtom.3 */, - F966BA6308F27A38005CB29B /* keysyms.n */, - F966BA6408F27A38005CB29B /* label.n */, - F966BA6508F27A38005CB29B /* labelframe.n */, - F966BA6608F27A38005CB29B /* listbox.n */, - F966BA6708F27A38005CB29B /* loadTk.n */, - F966BA6808F27A38005CB29B /* lower.n */, - F966BA6908F27A38005CB29B /* MainLoop.3 */, - F966BA6A08F27A38005CB29B /* MaintGeom.3 */, - F966BA6B08F27A38005CB29B /* MainWin.3 */, - F966BA6D08F27A38005CB29B /* ManageGeom.3 */, - F966BA6E08F27A38005CB29B /* MapWindow.3 */, - F966BA6F08F27A38005CB29B /* MeasureChar.3 */, - F966BA7008F27A38005CB29B /* menu.n */, - F966BA7208F27A38005CB29B /* menubutton.n */, - F966BA7308F27A38005CB29B /* message.n */, - F966BA7408F27A38005CB29B /* messageBox.n */, - F966BA7508F27A38005CB29B /* MoveToplev.3 */, - F966BA7608F27A38005CB29B /* Name.3 */, - F966BA7708F27A38005CB29B /* NameOfImg.3 */, - F966BA7808F27A38005CB29B /* option.n */, - F966BA7908F27A38005CB29B /* optionMenu.n */, - F966BA7A08F27A38005CB29B /* options.n */, - F966BA7B08F27A38005CB29B /* OwnSelect.3 */, - F966BA7D08F27A38005CB29B /* pack.n */, - F966BA7E08F27A38005CB29B /* palette.n */, - F966BA7F08F27A38005CB29B /* panedwindow.n */, - F966BA8008F27A38005CB29B /* ParseArgv.3 */, - F966BA8108F27A38005CB29B /* photo.n */, - F966BA8208F27A38005CB29B /* place.n */, - F966BA8308F27A38005CB29B /* popup.n */, - F966BA8408F27A38005CB29B /* QWinEvent.3 */, - F966BA8508F27A38005CB29B /* radiobutton.n */, - F966BA8608F27A38005CB29B /* raise.n */, - F966BA8708F27A38005CB29B /* Restack.3 */, - F966BA8808F27A38005CB29B /* RestrictEv.3 */, - F966BA8908F27A38005CB29B /* scale.n */, - F966BA8A08F27A38005CB29B /* scrollbar.n */, - F966BA8B08F27A38005CB29B /* selection.n */, - F966BA8C08F27A38005CB29B /* send.n */, - F966BA8D08F27A38005CB29B /* SetAppName.3 */, - F966BA8E08F27A38005CB29B /* SetCaret.3 */, - F966BA8F08F27A38005CB29B /* SetClass.3 */, - F966BA9008F27A38005CB29B /* SetClassProcs.3 */, - F966BA9108F27A38005CB29B /* SetGrid.3 */, - F966BA9208F27A38005CB29B /* SetOptions.3 */, - F966BA9308F27A38005CB29B /* SetVisual.3 */, - F966BA9408F27A38005CB29B /* spinbox.n */, - F966BA9508F27A38005CB29B /* StrictMotif.3 */, - F966BA9608F27A38005CB29B /* text.n */, - F966BA9708F27A38005CB29B /* TextLayout.3 */, - F966BA9808F27A38005CB29B /* tk.n */, - F966BA9A08F27A38005CB29B /* Tk_Init.3 */, - F966BA9B08F27A38005CB29B /* Tk_Main.3 */, - F966BA9C08F27A38005CB29B /* tkerror.n */, - F966BA9D08F27A38005CB29B /* TkInitStubs.3 */, - F966BA9E08F27A38005CB29B /* tkvars.n */, - F966BA9F08F27A38005CB29B /* tkwait.n */, - F966BAA008F27A38005CB29B /* toplevel.n */, - F968886B0AF788F6000797B5 /* ttk_button.n */, - F968886C0AF788F6000797B5 /* ttk_checkbutton.n */, - F968886D0AF788F6000797B5 /* ttk_combobox.n */, - F968886F0AF788F6000797B5 /* ttk_entry.n */, - F96888700AF788F6000797B5 /* ttk_frame.n */, - F96888710AF788F6000797B5 /* ttk_Geometry.3 */, - F96888720AF788F6000797B5 /* ttk_image.n */, - F96888730AF788F6000797B5 /* ttk_intro.n */, - F96888740AF788F6000797B5 /* ttk_label.n */, - F96888750AF788F6000797B5 /* ttk_labelframe.n */, - F96888760AF788F6000797B5 /* ttk_menubutton.n */, - F96888770AF788F6000797B5 /* ttk_notebook.n */, - F96888780AF788F6000797B5 /* ttk_panedwindow.n */, - F96888790AF788F6000797B5 /* ttk_progressbar.n */, - F968887A0AF788F6000797B5 /* ttk_radiobutton.n */, - F968887B0AF788F6000797B5 /* ttk_scrollbar.n */, - F968887C0AF788F6000797B5 /* ttk_separator.n */, - F968887D0AF788F6000797B5 /* ttk_sizegrip.n */, - F968887E0AF788F6000797B5 /* ttk_style.n */, - F968887F0AF788F6000797B5 /* ttk_Theme.3 */, - F96888800AF788F6000797B5 /* ttk_treeview.n */, - F96888810AF788F6000797B5 /* ttk_widget.n */, - F966BAA108F27A38005CB29B /* WindowId.3 */, - F966BAA208F27A38005CB29B /* winfo.n */, - F966BAA308F27A38005CB29B /* wish.1 */, - F966BAA408F27A38005CB29B /* wm.n */, - ); - path = doc; - sourceTree = "<group>"; - }; - F966BAA508F27A38005CB29B /* generic */ = { - isa = PBXGroup; - children = ( - F966BAA608F27A38005CB29B /* default.h */, - F966BAA708F27A38005CB29B /* ks_names.h */, - F966BAA908F27A39005CB29B /* README */, - F966BAAA08F27A39005CB29B /* tk.decls */, - F966BAAB08F27A39005CB29B /* tk.h */, - F966BAAC08F27A39005CB29B /* tk3d.c */, - F966BAAD08F27A39005CB29B /* tk3d.h */, - F966BAAE08F27A39005CB29B /* tkArgv.c */, - F966BAAF08F27A39005CB29B /* tkAtom.c */, - F966BAB008F27A39005CB29B /* tkBind.c */, - F966BAB108F27A39005CB29B /* tkBitmap.c */, - F9152B080EAF8A5000CD5C7B /* tkBusy.c */, - F966BAB208F27A39005CB29B /* tkButton.c */, - F966BAB308F27A39005CB29B /* tkButton.h */, - F966BAB408F27A39005CB29B /* tkCanvArc.c */, - F966BAB508F27A39005CB29B /* tkCanvas.c */, - F966BAB608F27A39005CB29B /* tkCanvas.h */, - F966BAB708F27A39005CB29B /* tkCanvBmap.c */, - F966BAB808F27A39005CB29B /* tkCanvImg.c */, - F966BAB908F27A39005CB29B /* tkCanvLine.c */, - F966BABA08F27A39005CB29B /* tkCanvPoly.c */, - F966BABB08F27A39005CB29B /* tkCanvPs.c */, - F966BABD08F27A39005CB29B /* tkCanvText.c */, - F966BABE08F27A39005CB29B /* tkCanvUtil.c */, - F966BABF08F27A39005CB29B /* tkCanvWind.c */, - F966BAC008F27A39005CB29B /* tkClipboard.c */, - F966BAC108F27A39005CB29B /* tkCmds.c */, - F966BAC208F27A39005CB29B /* tkColor.c */, - F966BAC308F27A39005CB29B /* tkColor.h */, - F966BAC408F27A39005CB29B /* tkConfig.c */, - F966BAC508F27A39005CB29B /* tkConsole.c */, - F966BAC608F27A39005CB29B /* tkCursor.c */, - F966BAC708F27A39005CB29B /* tkDecls.h */, - F966BAC808F27A39005CB29B /* tkEntry.c */, - F966BAC908F27A39005CB29B /* tkEntry.h */, - F966BACA08F27A39005CB29B /* tkError.c */, - F966BACB08F27A39005CB29B /* tkEvent.c */, - F966BACC08F27A39005CB29B /* tkFileFilter.c */, - F966BACD08F27A39005CB29B /* tkFileFilter.h */, - F966BACE08F27A39005CB29B /* tkFocus.c */, - F966BACF08F27A39005CB29B /* tkFont.c */, - F966BAD008F27A39005CB29B /* tkFont.h */, - F966BAD108F27A39005CB29B /* tkFrame.c */, - F966BAD208F27A39005CB29B /* tkGC.c */, - F966BAD308F27A39005CB29B /* tkGeometry.c */, - F966BAD408F27A39005CB29B /* tkGet.c */, - F966BAD508F27A39005CB29B /* tkGrab.c */, - F966BAD608F27A39005CB29B /* tkGrid.c */, - F966BAD708F27A39005CB29B /* tkImage.c */, - F966BAD808F27A39005CB29B /* tkImgBmap.c */, - F966BAD908F27A39005CB29B /* tkImgGIF.c */, - F92EE8BE0E62F846001A6E80 /* tkImgPhInstance.c */, - F966BADA08F27A39005CB29B /* tkImgPhoto.c */, - F9DD99BC0F07DF850018B2E4 /* tkImgPNG.c */, - F966BADB08F27A39005CB29B /* tkImgPPM.c */, - F966BADC08F27A39005CB29B /* tkImgUtil.c */, - F966BADE08F27A39005CB29B /* tkInt.decls */, - F966BADF08F27A39005CB29B /* tkInt.h */, - F966BAE108F27A39005CB29B /* tkIntDecls.h */, - F966BAE208F27A39005CB29B /* tkIntPlatDecls.h */, - F966BAE308F27A39005CB29B /* tkIntXlibDecls.h */, - F966BAE408F27A39005CB29B /* tkListbox.c */, - F966BAE508F27A39005CB29B /* tkMacWinMenu.c */, - F966BAE608F27A39005CB29B /* tkMain.c */, - F966BAE708F27A39005CB29B /* tkMenu.c */, - F966BAE808F27A39005CB29B /* tkMenu.h */, - F966BAE908F27A39005CB29B /* tkMenubutton.c */, - F966BAEA08F27A39005CB29B /* tkMenubutton.h */, - F966BAEB08F27A39005CB29B /* tkMenuDraw.c */, - F966BAEC08F27A39005CB29B /* tkMessage.c */, - F966BAED08F27A39005CB29B /* tkObj.c */, - F966BAEE08F27A39005CB29B /* tkOldConfig.c */, - F966BAEF08F27A39005CB29B /* tkOption.c */, - F966BAF008F27A39005CB29B /* tkPack.c */, - F966BAF108F27A39005CB29B /* tkPanedWindow.c */, - F966BAF208F27A39005CB29B /* tkPlace.c */, - F966BAF308F27A39005CB29B /* tkPlatDecls.h */, - F966BAF408F27A39005CB29B /* tkPointer.c */, - F966BAF508F27A39005CB29B /* tkPort.h */, - F966BAF608F27A39005CB29B /* tkRectOval.c */, - F966BAF708F27A39005CB29B /* tkScale.c */, - F966BAF808F27A39005CB29B /* tkScale.h */, - F966BAF908F27A39005CB29B /* tkScrollbar.c */, - F966BAFA08F27A39005CB29B /* tkScrollbar.h */, - F966BAFB08F27A39005CB29B /* tkSelect.c */, - F966BAFC08F27A39005CB29B /* tkSelect.h */, - F966BAFD08F27A39005CB29B /* tkSquare.c */, - F966BAFF08F27A39005CB29B /* tkStubInit.c */, - F966BB0008F27A39005CB29B /* tkStubLib.c */, - F966BB0108F27A39005CB29B /* tkStyle.c */, - F966BB0208F27A39005CB29B /* tkTest.c */, - F966BB0308F27A39005CB29B /* tkText.c */, - F966BB0408F27A39005CB29B /* tkText.h */, - F966BB0508F27A39005CB29B /* tkTextBTree.c */, - F966BB0608F27A39005CB29B /* tkTextDisp.c */, - F966BB0808F27A39005CB29B /* tkTextImage.c */, - F966BB0908F27A39005CB29B /* tkTextIndex.c */, - F966BB0A08F27A39005CB29B /* tkTextMark.c */, - F966BB0B08F27A39005CB29B /* tkTextTag.c */, - F966BB0C08F27A39005CB29B /* tkTextWind.c */, - F966BB0D08F27A39005CB29B /* tkTrig.c */, - F966BB0E08F27A39005CB29B /* tkUndo.c */, - F966BB0F08F27A39005CB29B /* tkUndo.h */, - F966BB1008F27A39005CB29B /* tkUtil.c */, - F966BB1108F27A39005CB29B /* tkVisual.c */, - F966BB1208F27A39005CB29B /* tkWindow.c */, - F96887DF0AF786D5000797B5 /* ttk */, - ); - path = generic; - sourceTree = "<group>"; - }; - F966BB1308F27A39005CB29B /* library */ = { - isa = PBXGroup; - children = ( - F966BB1408F27A39005CB29B /* bgerror.tcl */, - F966BB1508F27A39005CB29B /* button.tcl */, - F966BB1608F27A39005CB29B /* choosedir.tcl */, - F966BB1708F27A39005CB29B /* clrpick.tcl */, - F966BB1808F27A39005CB29B /* comdlg.tcl */, - F966BB1908F27A39005CB29B /* console.tcl */, - F966BB1A08F27A39005CB29B /* demos */, - F966BB6208F27A3A005CB29B /* dialog.tcl */, - F966BB6308F27A3A005CB29B /* entry.tcl */, - F966BB6408F27A3A005CB29B /* focus.tcl */, - F99388380EE0114B0065FE6B /* fontchooser.tcl */, - F974D57C0FBE7EFF00BF728B /* iconlist.tcl */, - F974D57D0FBE7EFF00BF728B /* icons.tcl */, - F966BB7308F27A3A005CB29B /* listbox.tcl */, - F966BB7408F27A3A005CB29B /* menu.tcl */, - F966BB7508F27A3A005CB29B /* mkpsenc.tcl */, - F966BB7608F27A3A005CB29B /* msgbox.tcl */, - F966BB8708F27A3A005CB29B /* optMenu.tcl */, - F966BB8808F27A3A005CB29B /* palette.tcl */, - F966BB8908F27A3B005CB29B /* panedwindow.tcl */, - F966BB8B08F27A3B005CB29B /* safetk.tcl */, - F966BB8C08F27A3B005CB29B /* scale.tcl */, - F966BB8D08F27A3B005CB29B /* scrlbar.tcl */, - F966BB8E08F27A3B005CB29B /* spinbox.tcl */, - F966BB8F08F27A3B005CB29B /* tclIndex */, - F966BB9008F27A3B005CB29B /* tearoff.tcl */, - F966BB9108F27A3B005CB29B /* text.tcl */, - F966BB9208F27A3B005CB29B /* tk.tcl */, - F966BB9308F27A3B005CB29B /* tkfbox.tcl */, - F96888360AF787B3000797B5 /* ttk */, - F966BB9508F27A3B005CB29B /* xmfbox.tcl */, - ); - path = library; - sourceTree = "<group>"; - }; - F966BB1A08F27A39005CB29B /* demos */ = { - isa = PBXGroup; - children = ( - F966BB1B08F27A39005CB29B /* anilabel.tcl */, - F966BB1C08F27A39005CB29B /* aniwave.tcl */, - F966BB1D08F27A39005CB29B /* arrow.tcl */, - F966BB1E08F27A39005CB29B /* bind.tcl */, - F966BB1F08F27A39005CB29B /* bitmap.tcl */, - F966BB2008F27A39005CB29B /* browse */, - F966BB2108F27A39005CB29B /* button.tcl */, - F966BB2208F27A39005CB29B /* check.tcl */, - F966BB2308F27A39005CB29B /* clrpick.tcl */, - F966BB2408F27A39005CB29B /* colors.tcl */, - F936FCDB0CCD984600716967 /* combo.tcl */, - F966BB2508F27A39005CB29B /* cscroll.tcl */, - F966BB2608F27A39005CB29B /* ctext.tcl */, - F966BB2708F27A39005CB29B /* dialog1.tcl */, - F966BB2808F27A39005CB29B /* dialog2.tcl */, - F966BB2A08F27A39005CB29B /* entry1.tcl */, - F966BB2B08F27A39005CB29B /* entry2.tcl */, - F966BB2C08F27A39005CB29B /* entry3.tcl */, - F966BB2D08F27A39005CB29B /* filebox.tcl */, - F966BB2E08F27A39005CB29B /* floor.tcl */, - F91543270EF201A90032D1E8 /* fontchoose.tcl */, - F966BB2F08F27A39005CB29B /* form.tcl */, - F966BB3008F27A39005CB29B /* goldberg.tcl */, - F966BB3108F27A39005CB29B /* hello */, - F966BB3208F27A39005CB29B /* hscale.tcl */, - F966BB3308F27A39005CB29B /* icon.tcl */, - F966BB3408F27A39005CB29B /* image1.tcl */, - F966BB3508F27A39005CB29B /* image2.tcl */, - F966BB4208F27A3A005CB29B /* items.tcl */, - F966BB4308F27A3A005CB29B /* ixset */, - F92240290D7C620F005EC715 /* knightstour.tcl */, - F966BB4408F27A3A005CB29B /* label.tcl */, - F966BB4508F27A3A005CB29B /* labelframe.tcl */, - F9D1360A0CDC252C00DBE0B5 /* mclist.tcl */, - F966BB4608F27A3A005CB29B /* menu.tcl */, - F966BB4708F27A3A005CB29B /* menubu.tcl */, - F966BB4808F27A3A005CB29B /* msgbox.tcl */, - F966BB4A08F27A3A005CB29B /* paned1.tcl */, - F966BB4B08F27A3A005CB29B /* paned2.tcl */, - F966BB4C08F27A3A005CB29B /* pendulum.tcl */, - F966BB4D08F27A3A005CB29B /* plot.tcl */, - F966BB4E08F27A3A005CB29B /* puzzle.tcl */, - F966BB4F08F27A3A005CB29B /* radio.tcl */, - F966BB5008F27A3A005CB29B /* README */, - F966BB5108F27A3A005CB29B /* rmt */, - F966BB5208F27A3A005CB29B /* rolodex */, - F966BB5308F27A3A005CB29B /* ruler.tcl */, - F966BB5408F27A3A005CB29B /* sayings.tcl */, - F966BB5508F27A3A005CB29B /* search.tcl */, - F966BB5608F27A3A005CB29B /* spin.tcl */, - F966BB5708F27A3A005CB29B /* square */, - F966BB5808F27A3A005CB29B /* states.tcl */, - F966BB5908F27A3A005CB29B /* style.tcl */, - F966BB5A08F27A3A005CB29B /* tclIndex */, - F966BB5B08F27A3A005CB29B /* tcolor */, - F966BB5C08F27A3A005CB29B /* text.tcl */, - F9099B8A0CC67D30005A9580 /* textpeer.tcl */, - F966BB5D08F27A3A005CB29B /* timer */, - F936FCD90CCD984600716967 /* toolbar.tcl */, - F936FCD80CCD984600716967 /* tree.tcl */, - F9099B8B0CC67D3E005A9580 /* ttkbut.tcl */, - F9F4EFDD0CC7B3CB00378A27 /* ttkmenu.tcl */, - F936FCDA0CCD984600716967 /* ttknote.tcl */, - F9F4EFDC0CC7B3CA00378A27 /* ttkpane.tcl */, - F936FCD70CCD984500716967 /* ttkprogress.tcl */, - F966BB5E08F27A3A005CB29B /* twind.tcl */, - F966BB5F08F27A3A005CB29B /* unicodeout.tcl */, - F966BB6008F27A3A005CB29B /* vscale.tcl */, - F966BB6108F27A3A005CB29B /* widget */, - ); - path = demos; - sourceTree = "<group>"; - }; - F966BB9708F27A3B005CB29B /* macosx */ = { - isa = PBXGroup; - children = ( - F966BBBA08F27A3B005CB29B /* configure.ac */, - F966BBBB08F27A3B005CB29B /* GNUmakefile */, - F966BBBE08F27A3B005CB29B /* README */, - F966BBC008F27A3B005CB29B /* Tk-Info.plist.in */, - F966BBC208F27A3B005CB29B /* tkMacOSX.h */, - F966BBC508F27A3B005CB29B /* tkMacOSXBitmap.c */, - F966BBC608F27A3B005CB29B /* tkMacOSXButton.c */, - F966BBC808F27A3B005CB29B /* tkMacOSXClipboard.c */, - F966BBC908F27A3B005CB29B /* tkMacOSXColor.c */, - F966BBCA08F27A3B005CB29B /* tkMacOSXConfig.c */, - F966BBCB08F27A3B005CB29B /* tkMacOSXCursor.c */, - F966BBCC08F27A3B005CB29B /* tkMacOSXCursors.h */, - F966BBCD08F27A3B005CB29B /* tkMacOSXDebug.c */, - F966BBCE08F27A3B005CB29B /* tkMacOSXDebug.h */, - F966BBCF08F27A3B005CB29B /* tkMacOSXDefault.h */, - F966BBD008F27A3B005CB29B /* tkMacOSXDialog.c */, - F966BBD108F27A3B005CB29B /* tkMacOSXDraw.c */, - F966BBD208F27A3B005CB29B /* tkMacOSXEmbed.c */, - F966BBD308F27A3B005CB29B /* tkMacOSXEntry.c */, - F966BBD408F27A3B005CB29B /* tkMacOSXEvent.c */, - F966BBD608F27A3B005CB29B /* tkMacOSXFont.c */, - F93E5EFD09CF8711008FA367 /* tkMacOSXFont.h */, - F966BBD708F27A3B005CB29B /* tkMacOSXHLEvents.c */, - F966BBD808F27A3B005CB29B /* tkMacOSXInit.c */, - F966BBDA08F27A3B005CB29B /* tkMacOSXInt.h */, - F966BBDB08F27A3B005CB29B /* tkMacOSXKeyboard.c */, - F966BBDC08F27A3B005CB29B /* tkMacOSXKeyEvent.c */, - F966BBDD08F27A3B005CB29B /* tkMacOSXMenu.c */, - F966BBE008F27A3B005CB29B /* tkMacOSXMenubutton.c */, - F966BBE108F27A3B005CB29B /* tkMacOSXMenus.c */, - F966BBE208F27A3B005CB29B /* tkMacOSXMouseEvent.c */, - F966BBE308F27A3B005CB29B /* tkMacOSXNotify.c */, - F966BBEA08F27A3C005CB29B /* tkMacOSXPort.h */, - F976F6A70C325FB6005066D9 /* tkMacOSXPrivate.h */, - F966BBEB08F27A3C005CB29B /* tkMacOSXRegion.c */, - F966BBEC08F27A3C005CB29B /* tkMacOSXScale.c */, - F966BBED08F27A3C005CB29B /* tkMacOSXScrlbr.c */, - F966BBEE08F27A3C005CB29B /* tkMacOSXSend.c */, - F966BBEF08F27A3C005CB29B /* tkMacOSXSubwindows.c */, - F966BBF008F27A3C005CB29B /* tkMacOSXTest.c */, - F966BBF108F27A3C005CB29B /* tkMacOSXWindowEvent.c */, - F966BBF208F27A3C005CB29B /* tkMacOSXWm.c */, - F966BBF308F27A3C005CB29B /* tkMacOSXWm.h */, - F966BBF408F27A3C005CB29B /* tkMacOSXXCursors.h */, - F966BBF508F27A3C005CB29B /* tkMacOSXXStubs.c */, - F96888840AF78938000797B5 /* ttkMacOSXTheme.c */, - F95D8D4B0F1715610006B020 /* Tk.icns */, - F95D8D4C0F1715610006B020 /* Tk.tiff */, - F966BBF708F27A3C005CB29B /* Wish-Info.plist.in */, - F97590AE1039A96200558A9A /* Wish.sdef */, - F97AE7F10B65C1E900310EA2 /* Tk-Common.xcconfig */, - F97AE8330B65C87F00310EA2 /* Tk-Debug.xcconfig */, - F97AE82B0B65C69B00310EA2 /* Tk-Release.xcconfig */, - ); - path = macosx; - sourceTree = "<group>"; - }; - F966BC0408F27A3C005CB29B /* tests */ = { - isa = PBXGroup; - children = ( - F966BC0508F27A3C005CB29B /* all.tcl */, - F966BC0608F27A3C005CB29B /* arc.tcl */, - F966BC0708F27A3C005CB29B /* bell.test */, - F966BC0808F27A3C005CB29B /* bevel.tcl */, - F966BC0908F27A3C005CB29B /* bgerror.test */, - F966BC0A08F27A3C005CB29B /* bind.test */, - F966BC0B08F27A3C005CB29B /* bitmap.test */, - F966BC0C08F27A3C005CB29B /* border.test */, - F966BC0D08F27A3C005CB29B /* bugs.tcl */, - F966BC0E08F27A3C005CB29B /* butGeom.tcl */, - F966BC0F08F27A3C005CB29B /* butGeom2.tcl */, - F966BC1008F27A3C005CB29B /* button.test */, - F966BC1108F27A3C005CB29B /* canvas.test */, - F966BC1208F27A3C005CB29B /* canvImg.test */, - F966BC1308F27A3C005CB29B /* canvPs.test */, - F966BC1408F27A3C005CB29B /* canvPsArc.tcl */, - F966BC1508F27A3C005CB29B /* canvPsBmap.tcl */, - F966BC1608F27A3C005CB29B /* canvPsGrph.tcl */, - F966BC1708F27A3C005CB29B /* canvPsImg.tcl */, - F966BC1808F27A3C005CB29B /* canvPsText.tcl */, - F966BC1908F27A3C005CB29B /* canvRect.test */, - F966BC1A08F27A3C005CB29B /* canvText.test */, - F966BC1B08F27A3C005CB29B /* canvWind.test */, - F966BC1C08F27A3C005CB29B /* choosedir.test */, - F966BC1D08F27A3C005CB29B /* clipboard.test */, - F966BC1E08F27A3C005CB29B /* clrpick.test */, - F966BC1F08F27A3C005CB29B /* cmap.tcl */, - F966BC2008F27A3C005CB29B /* cmds.test */, - F966BC2108F27A3C005CB29B /* color.test */, - F966BC2208F27A3C005CB29B /* config.test */, - F966BC2308F27A3C005CB29B /* constraints.tcl */, - F966BC2408F27A3C005CB29B /* cursor.test */, - F966BC2508F27A3C005CB29B /* dialog.test */, - F966BC2608F27A3C005CB29B /* embed.test */, - F966BC2708F27A3C005CB29B /* entry.test */, - F966BC2808F27A3C005CB29B /* event.test */, - F966BC2908F27A3C005CB29B /* filebox.test */, - F966BC2A08F27A3C005CB29B /* focus.test */, - F966BC2B08F27A3C005CB29B /* focusTcl.test */, - F966BC2C08F27A3C005CB29B /* font.test */, - F99388950EE02D980065FE6B /* fontchooser.test */, - F966BC2D08F27A3C005CB29B /* frame.test */, - F966BC2E08F27A3C005CB29B /* geometry.test */, - F966BC2F08F27A3C005CB29B /* get.test */, - F966BC3008F27A3C005CB29B /* grab.test */, - F966BC3108F27A3C005CB29B /* grid.test */, - F966BC3308F27A3C005CB29B /* image.test */, - F966BC3408F27A3C005CB29B /* imgBmap.test */, - F966BC3508F27A3C005CB29B /* imgPhoto.test */, - F9DD99BF0F07DFCD0018B2E4 /* imgPNG.test */, - F966BC3608F27A3C005CB29B /* imgPPM.test */, - F966BC3708F27A3C005CB29B /* listbox.test */, - F966BC3808F27A3C005CB29B /* main.test */, - F966BC3908F27A3C005CB29B /* menu.test */, - F966BC3A08F27A3C005CB29B /* menubut.test */, - F966BC3B08F27A3C005CB29B /* menuDraw.test */, - F966BC3C08F27A3C005CB29B /* message.test */, - F966BC3D08F27A3C005CB29B /* msgbox.test */, - F966BC3E08F27A3C005CB29B /* obj.test */, - F966BC4008F27A3C005CB29B /* option.file1 */, - F966BC4108F27A3C005CB29B /* option.file2 */, - F966BC4208F27A3C005CB29B /* option.test */, - F966BC4308F27A3C005CB29B /* pack.test */, - F966BC4408F27A3C005CB29B /* panedwindow.test */, - F966BC4508F27A3D005CB29B /* place.test */, - F966BC4608F27A3D005CB29B /* raise.test */, - F966BC4708F27A3D005CB29B /* README */, - F966BC4808F27A3D005CB29B /* safe.test */, - F966BC4908F27A3D005CB29B /* scale.test */, - F966BC4A08F27A3D005CB29B /* scrollbar.test */, - F966BC4B08F27A3D005CB29B /* select.test */, - F966BC4C08F27A3D005CB29B /* send.test */, - F966BC4D08F27A3D005CB29B /* spinbox.test */, - F966BC4E08F27A3D005CB29B /* text.test */, - F966BC4F08F27A3D005CB29B /* textBTree.test */, - F966BC5008F27A3D005CB29B /* textDisp.test */, - F966BC5108F27A3D005CB29B /* textImage.test */, - F966BC5208F27A3D005CB29B /* textIndex.test */, - F966BC5308F27A3D005CB29B /* textMark.test */, - F966BC5408F27A3D005CB29B /* textTag.test */, - F966BC5508F27A3D005CB29B /* textWind.test */, - F966BC5608F27A3D005CB29B /* tk.test */, - F96888530AF7880C000797B5 /* ttk */, - F966BC5708F27A3D005CB29B /* unixButton.test */, - F966BC5808F27A3D005CB29B /* unixEmbed.test */, - F966BC5908F27A3D005CB29B /* unixFont.test */, - F966BC5A08F27A3D005CB29B /* unixMenu.test */, - F966BC5B08F27A3D005CB29B /* unixSelect.test */, - F966BC5C08F27A3D005CB29B /* unixWm.test */, - F966BC5D08F27A3D005CB29B /* util.test */, - F966BC5E08F27A3D005CB29B /* visual.test */, - F966BC5F08F27A3D005CB29B /* visual_bb.test */, - F966BC6008F27A3D005CB29B /* winButton.test */, - F966BC6108F27A3D005CB29B /* winClipboard.test */, - F966BC6208F27A3D005CB29B /* winDialog.test */, - F966BC6308F27A3D005CB29B /* window.test */, - F966BC6408F27A3D005CB29B /* winfo.test */, - F966BC6508F27A3D005CB29B /* winFont.test */, - F966BC6608F27A3D005CB29B /* winMenu.test */, - F966BC6708F27A3D005CB29B /* winSend.test */, - F966BC6808F27A3D005CB29B /* winWm.test */, - F966BC6908F27A3D005CB29B /* wm.test */, - F966BC6A08F27A3D005CB29B /* xmfbox.test */, - ); - path = tests; - sourceTree = "<group>"; - }; - F966BC6B08F27A3D005CB29B /* unix */ = { - isa = PBXGroup; - children = ( - F966BC6C08F27A3D005CB29B /* aclocal.m4 */, - F966BC6D08F27A3D005CB29B /* configure */, - F966BC6E08F27A3D005CB29B /* configure.ac */, - F966BC6F08F27A3D005CB29B /* install-sh */, - F966BC7008F27A3D005CB29B /* installManPage */, - F966BC7108F27A3D005CB29B /* Makefile.in */, - F966BC7208F27A3D005CB29B /* README */, - F966BC7308F27A3D005CB29B /* tcl.m4 */, - F974D57B0FBE7EC000BF728B /* tk.pc.in */, - F966BC7408F27A3D005CB29B /* tk.spec */, - F966BC7508F27A3D005CB29B /* tkAppInit.c */, - F966BC7608F27A3D005CB29B /* tkConfig.h.in */, - F966BC7708F27A3D005CB29B /* tkConfig.sh.in */, - F966BC7808F27A3D005CB29B /* tkUnix.c */, - F966BC7908F27A3D005CB29B /* tkUnix3d.c */, - F966BC7A08F27A3D005CB29B /* tkUnixButton.c */, - F966BC7B08F27A3D005CB29B /* tkUnixColor.c */, - F966BC7C08F27A3D005CB29B /* tkUnixConfig.c */, - F966BC7D08F27A3D005CB29B /* tkUnixCursor.c */, - F966BC7E08F27A3D005CB29B /* tkUnixDefault.h */, - F966BC8008F27A3D005CB29B /* tkUnixDraw.c */, - F966BC8108F27A3D005CB29B /* tkUnixEmbed.c */, - F966BC8208F27A3D005CB29B /* tkUnixEvent.c */, - F966BC8308F27A3D005CB29B /* tkUnixFocus.c */, - F966BC8408F27A3D005CB29B /* tkUnixFont.c */, - F966BC8508F27A3D005CB29B /* tkUnixInit.c */, - F966BC8608F27A3D005CB29B /* tkUnixInt.h */, - F966BC8708F27A3D005CB29B /* tkUnixKey.c */, - F966BC8808F27A3D005CB29B /* tkUnixMenu.c */, - F966BC8908F27A3D005CB29B /* tkUnixMenubu.c */, - F966BC8A08F27A3D005CB29B /* tkUnixPort.h */, - F966BC8B08F27A3D005CB29B /* tkUnixRFont.c */, - F966BC8C08F27A3D005CB29B /* tkUnixScale.c */, - F966BC8D08F27A3D005CB29B /* tkUnixScrlbr.c */, - F966BC8E08F27A3D005CB29B /* tkUnixSelect.c */, - F966BC8F08F27A3D005CB29B /* tkUnixSend.c */, - F966BC9008F27A3D005CB29B /* tkUnixWm.c */, - F966BC9108F27A3D005CB29B /* tkUnixXId.c */, - ); - path = unix; - sourceTree = "<group>"; - }; - F966BC9208F27A3D005CB29B /* win */ = { - isa = PBXGroup; - children = ( - F966BC9408F27A3D005CB29B /* aclocal.m4 */, - F966BC9508F27A3D005CB29B /* buildall.vc.bat */, - F966BC9608F27A3E005CB29B /* configure */, - F966BC9708F27A3E005CB29B /* configure.ac */, - F966BC9908F27A3E005CB29B /* Makefile.in */, - F966BC9A08F27A3E005CB29B /* makefile.vc */, - F966BC9C08F27A3E005CB29B /* nmakehlp.c */, - F966BC9D08F27A3E005CB29B /* rc */, - F966BCF308F27A3E005CB29B /* README */, - F966BCF508F27A3F005CB29B /* rules.vc */, - F966BCF608F27A3F005CB29B /* stubs.c */, - F966BCF708F27A3F005CB29B /* tcl.m4 */, - F966BCF808F27A3F005CB29B /* tkConfig.sh.in */, - F966BCF908F27A3F005CB29B /* tkWin.h */, - F966BCFA08F27A3F005CB29B /* tkWin32Dll.c */, - F966BCFB08F27A3F005CB29B /* tkWin3d.c */, - F966BCFC08F27A3F005CB29B /* tkWinButton.c */, - F966BCFD08F27A3F005CB29B /* tkWinClipboard.c */, - F966BCFE08F27A3F005CB29B /* tkWinColor.c */, - F966BCFF08F27A3F005CB29B /* tkWinConfig.c */, - F966BD0008F27A3F005CB29B /* tkWinCursor.c */, - F966BD0108F27A3F005CB29B /* tkWinDefault.h */, - F966BD0208F27A3F005CB29B /* tkWinDialog.c */, - F966BD0308F27A3F005CB29B /* tkWinDraw.c */, - F966BD0408F27A3F005CB29B /* tkWinEmbed.c */, - F966BD0508F27A3F005CB29B /* tkWinFont.c */, - F966BD0708F27A3F005CB29B /* tkWinImage.c */, - F966BD0808F27A3F005CB29B /* tkWinInit.c */, - F966BD0908F27A3F005CB29B /* tkWinInt.h */, - F966BD0A08F27A3F005CB29B /* tkWinKey.c */, - F966BD0B08F27A3F005CB29B /* tkWinMenu.c */, - F966BD0C08F27A3F005CB29B /* tkWinPixmap.c */, - F966BD0D08F27A3F005CB29B /* tkWinPointer.c */, - F966BD0E08F27A3F005CB29B /* tkWinPort.h */, - F966BD0F08F27A3F005CB29B /* tkWinRegion.c */, - F966BD1008F27A3F005CB29B /* tkWinScrlbr.c */, - F966BD1108F27A3F005CB29B /* tkWinSend.c */, - F966BD1208F27A3F005CB29B /* tkWinSendCom.c */, - F966BD1308F27A3F005CB29B /* tkWinSendCom.h */, - F966BD1408F27A3F005CB29B /* tkWinTest.c */, - F966BD1508F27A3F005CB29B /* tkWinWindow.c */, - F966BD1608F27A3F005CB29B /* tkWinWm.c */, - F966BD1708F27A3F005CB29B /* tkWinX.c */, - F96888860AF78953000797B5 /* ttkWinMonitor.c */, - F96888870AF78953000797B5 /* ttkWinTheme.c */, - F96888880AF78953000797B5 /* ttkWinXPTheme.c */, - F966BD1808F27A3F005CB29B /* winMain.c */, - ); - path = win; - sourceTree = "<group>"; - }; - F966BC9D08F27A3E005CB29B /* rc */ = { - isa = PBXGroup; - children = ( - F966BCEE08F27A3E005CB29B /* tk.rc */, - F966BCEF08F27A3E005CB29B /* tk_base.rc */, - F966BCF208F27A3E005CB29B /* wish.rc */, - ); - path = rc; - sourceTree = "<group>"; - }; - F966BD1908F27A3F005CB29B /* xlib */ = { - isa = PBXGroup; - children = ( - F966BD1A08F27A3F005CB29B /* X11 */, - F966BD2308F27A3F005CB29B /* xbytes.h */, - F966BD2408F27A3F005CB29B /* xcolors.c */, - F966BD2508F27A3F005CB29B /* xdraw.c */, - F966BD2608F27A3F005CB29B /* xgc.c */, - F966BD2708F27A3F005CB29B /* ximage.c */, - F966BD2808F27A3F005CB29B /* xutil.c */, - ); - path = xlib; - sourceTree = "<group>"; - }; - F966BD1A08F27A3F005CB29B /* X11 */ = { - isa = PBXGroup; - children = ( - F966BD1B08F27A3F005CB29B /* cursorfont.h */, - F966BD1C08F27A3F005CB29B /* keysym.h */, - F966BD1D08F27A3F005CB29B /* keysymdef.h */, - F966BD1E08F27A3F005CB29B /* X.h */, - F966BD1F08F27A3F005CB29B /* Xatom.h */, - F966BD2008F27A3F005CB29B /* Xfuncproto.h */, - F966BD2108F27A3F005CB29B /* Xlib.h */, - F966BD2208F27A3F005CB29B /* Xutil.h */, - ); - path = X11; - sourceTree = "<group>"; - }; - F966C06F08F281DC005CB29B /* Frameworks */ = { - isa = PBXGroup; - children = ( - F9C9CBFF0E84059800E00935 /* ApplicationServices.framework */, - F966C07408F2820D005CB29B /* CoreFoundation.framework */, - F96437E60EF0D652003F468E /* libz.dylib */, - F966C07608F2821B005CB29B /* Carbon.framework */, - F94523A10E6FC2AC00C1D987 /* Cocoa.framework */, - F966C07808F28233005CB29B /* IOKit.framework */, - F9FD32140CC1AF170073837D /* libX11.dylib */, - F9FD32150CC1AF170073837D /* libXext.dylib */, - F9FD32160CC1AF170073837D /* libXss.dylib */, - F9FD349A0CC1BB0D0073837D /* libXft.dylib */, - F9FD34990CC1BB0D0073837D /* libfreetype.dylib */, - F9FD34C30CC1BBD70073837D /* libfontconfig.dylib */, - ); - name = Frameworks; - sourceTree = "<group>"; - }; - F96887DF0AF786D5000797B5 /* ttk */ = { - isa = PBXGroup; - children = ( - F96887E00AF786D5000797B5 /* ttk.decls */, - F96887E10AF786D5000797B5 /* ttkBlink.c */, - F96887E20AF786D5000797B5 /* ttkButton.c */, - F96887E30AF786D5000797B5 /* ttkCache.c */, - F96887E40AF786D5000797B5 /* ttkClamTheme.c */, - F96887E50AF786D5000797B5 /* ttkClassicTheme.c */, - F96887E60AF786D5000797B5 /* ttkDecls.h */, - F96887E70AF786D5000797B5 /* ttkDefaultTheme.c */, - F96887E80AF786D5000797B5 /* ttkElements.c */, - F96887E90AF786D5000797B5 /* ttkEntry.c */, - F96887EA0AF786D5000797B5 /* ttkFrame.c */, - F96887EB0AF786D5000797B5 /* ttkImage.c */, - F96887EC0AF786D5000797B5 /* ttkInit.c */, - F96887ED0AF786D5000797B5 /* ttkLabel.c */, - F96887EE0AF786D5000797B5 /* ttkLayout.c */, - F96887EF0AF786D5000797B5 /* ttkManager.c */, - F96887F00AF786D5000797B5 /* ttkManager.h */, - F96887F10AF786D5000797B5 /* ttkNotebook.c */, - F96887F20AF786D5000797B5 /* ttkPanedwindow.c */, - F96887F30AF786D5000797B5 /* ttkProgress.c */, - F96887F40AF786D5000797B5 /* ttkScale.c */, - F96887F50AF786D5000797B5 /* ttkScroll.c */, - F96887F60AF786D5000797B5 /* ttkScrollbar.c */, - F96887F70AF786D5000797B5 /* ttkSeparator.c */, - F96887F80AF786D5000797B5 /* ttkSquare.c */, - F96887F90AF786D5000797B5 /* ttkState.c */, - F96887FA0AF786D5000797B5 /* ttkStubInit.c */, - F96887FB0AF786D5000797B5 /* ttkStubLib.c */, - F96887FC0AF786D5000797B5 /* ttkTagSet.c */, - F96887FD0AF786D5000797B5 /* ttkTheme.c */, - F96887FE0AF786D5000797B5 /* ttkTheme.h */, - F96887FF0AF786D5000797B5 /* ttkThemeInt.h */, - F96888000AF786D5000797B5 /* ttkTrace.c */, - F96888010AF786D5000797B5 /* ttkTrack.c */, - F96888020AF786D5000797B5 /* ttkTreeview.c */, - F96888030AF786D5000797B5 /* ttkWidget.c */, - F96888040AF786D5000797B5 /* ttkWidget.h */, - ); - path = ttk; - sourceTree = "<group>"; - }; - F96888360AF787B3000797B5 /* ttk */ = { - isa = PBXGroup; - children = ( - F96888370AF787B3000797B5 /* altTheme.tcl */, - F96888380AF787B3000797B5 /* aquaTheme.tcl */, - F96888390AF787B3000797B5 /* button.tcl */, - F968883A0AF787B3000797B5 /* clamTheme.tcl */, - F968883B0AF787B3000797B5 /* classicTheme.tcl */, - F968883C0AF787B3000797B5 /* combobox.tcl */, - F968883D0AF787B3000797B5 /* cursors.tcl */, - F968883E0AF787B3000797B5 /* defaults.tcl */, - F96888400AF787B3000797B5 /* entry.tcl */, - F96888410AF787B3000797B5 /* fonts.tcl */, - F96888440AF787B3000797B5 /* menubutton.tcl */, - F96888450AF787B3000797B5 /* notebook.tcl */, - F96888460AF787B3000797B5 /* panedwindow.tcl */, - F96888470AF787B3000797B5 /* progress.tcl */, - F96888480AF787B3000797B5 /* scale.tcl */, - F96888490AF787B3000797B5 /* scrollbar.tcl */, - F968884A0AF787B3000797B5 /* sizegrip.tcl */, - F968884B0AF787B3000797B5 /* treeview.tcl */, - F968884C0AF787B3000797B5 /* ttk.tcl */, - F968884D0AF787B3000797B5 /* utils.tcl */, - F968884E0AF787B3000797B5 /* winTheme.tcl */, - F973E5960EE99384001A648E /* vistaTheme.tcl */, - F968884F0AF787B3000797B5 /* xpTheme.tcl */, - ); - path = ttk; - sourceTree = "<group>"; - }; - F96888530AF7880C000797B5 /* ttk */ = { - isa = PBXGroup; - children = ( - F96888540AF7880C000797B5 /* all.tcl */, - F98383650F0FA43900171CA6 /* checkbutton.test */, - F96888560AF7880C000797B5 /* combobox.test */, - F96888570AF7880C000797B5 /* entry.test */, - F96888580AF7880C000797B5 /* image.test */, - F96888590AF7880C000797B5 /* labelframe.test */, - F968885A0AF7880C000797B5 /* layout.test */, - F968885C0AF7880C000797B5 /* notebook.test */, - F968885D0AF7880C000797B5 /* panedwindow.test */, - F968885E0AF7880C000797B5 /* progressbar.test */, - F98383680F0FA44700171CA6 /* radiobutton.test */, - F968885F0AF7880C000797B5 /* scrollbar.test */, - F96888600AF7880C000797B5 /* treetags.test */, - F96888610AF7880C000797B5 /* treeview.test */, - F96888620AF7880C000797B5 /* ttk.test */, - F96888630AF7880C000797B5 /* validate.test */, - F962F7C60DADC26200648DB8 /* vsapi.test */, - ); - path = ttk; - sourceTree = "<group>"; - }; - F96D3DF608F27169004A47F5 /* Tcl Sources */ = { - isa = PBXGroup; - children = ( - F96D3EC908F272A7004A47F5 /* generic */, - F96D432C08F272B4004A47F5 /* macosx */, - F96D443E08F272B9004A47F5 /* unix */, - F96D425C08F272B2004A47F5 /* libtommath */, - F96D446E08F272B9004A47F5 /* win */, - F96D3F3808F272A7004A47F5 /* library */, - F96D434408F272B5004A47F5 /* tests */, - F96D3DFC08F272A4004A47F5 /* doc */, - F96D43D008F272B8004A47F5 /* tools */, - F9183E690EFC81560030B814 /* pkgs */, - F96D3DFB08F272A4004A47F5 /* changes.md */, - F96D434308F272B5004A47F5 /* README */, - F96D432B08F272B4004A47F5 /* license.terms */, - ); - name = "Tcl Sources"; - sourceTree = TCL_SRCROOT; - }; - F96D3DF708F271BE004A47F5 /* Tk Sources */ = { - isa = PBXGroup; - children = ( - F966BAA508F27A38005CB29B /* generic */, - F966BB9708F27A3B005CB29B /* macosx */, - F966BC6B08F27A3D005CB29B /* unix */, - F966BD1908F27A3F005CB29B /* xlib */, - F966BA0308F27A37005CB29B /* bitmaps */, - F966BC9208F27A3D005CB29B /* win */, - F966BB1308F27A39005CB29B /* library */, - F966BC0408F27A3C005CB29B /* tests */, - F966BA1008F27A37005CB29B /* doc */, - F966BA0F08F27A37005CB29B /* changes.md */, - F966BC0308F27A3C005CB29B /* README */, - F966BB9608F27A3B005CB29B /* license.terms */, - ); - name = "Tk Sources"; - sourceTree = TK_SRCROOT; - }; - F96D3DFC08F272A4004A47F5 /* doc */ = { - isa = PBXGroup; - children = ( - F96D3DFD08F272A4004A47F5 /* Access.3 */, - F96D3DFE08F272A4004A47F5 /* AddErrInfo.3 */, - F96D3DFF08F272A4004A47F5 /* after.n */, - F96D3E0008F272A4004A47F5 /* Alloc.3 */, - F96D3E0108F272A4004A47F5 /* AllowExc.3 */, - F96D3E0208F272A4004A47F5 /* append.n */, - F96D3E0308F272A4004A47F5 /* AppInit.3 */, - F96D3E0408F272A5004A47F5 /* array.n */, - F96D3E0508F272A5004A47F5 /* AssocData.3 */, - F96D3E0608F272A5004A47F5 /* Async.3 */, - F96D3E0708F272A5004A47F5 /* BackgdErr.3 */, - F96D3E0808F272A5004A47F5 /* Backslash.3 */, - F96D3E0908F272A5004A47F5 /* bgerror.n */, - F96D3E0A08F272A5004A47F5 /* binary.n */, - F96D3E0B08F272A5004A47F5 /* BoolObj.3 */, - F96D3E0C08F272A5004A47F5 /* break.n */, - F96D3E0D08F272A5004A47F5 /* ByteArrObj.3 */, - F96D3E0E08F272A5004A47F5 /* CallDel.3 */, - F96D3E0F08F272A5004A47F5 /* case.n */, - F96D3E1008F272A5004A47F5 /* catch.n */, - F96D3E1108F272A5004A47F5 /* cd.n */, - F96D3E1208F272A5004A47F5 /* chan.n */, - F96D3E1308F272A5004A47F5 /* ChnlStack.3 */, - F93599CF0DF1F87F00E04F67 /* Class.3 */, - F93599D00DF1F89E00E04F67 /* class.n */, - F96D3E1408F272A5004A47F5 /* clock.n */, - F96D3E1508F272A5004A47F5 /* close.n */, - F96D3E1608F272A5004A47F5 /* CmdCmplt.3 */, - F96D3E1708F272A5004A47F5 /* Concat.3 */, - F96D3E1808F272A5004A47F5 /* concat.n */, - F96D3E1908F272A5004A47F5 /* continue.n */, - F93599D20DF1F8DF00E04F67 /* copy.n */, - F974D5720FBE7DC600BF728B /* coroutine.n */, - F96D3E1A08F272A5004A47F5 /* CrtChannel.3 */, - F96D3E1B08F272A5004A47F5 /* CrtChnlHdlr.3 */, - F96D3E1C08F272A5004A47F5 /* CrtCloseHdlr.3 */, - F96D3E1D08F272A5004A47F5 /* CrtCommand.3 */, - F96D3E1E08F272A5004A47F5 /* CrtFileHdlr.3 */, - F96D3E1F08F272A5004A47F5 /* CrtInterp.3 */, - F96D3E2008F272A5004A47F5 /* CrtMathFnc.3 */, - F96D3E2108F272A5004A47F5 /* CrtObjCmd.3 */, - F96D3E2208F272A5004A47F5 /* CrtAlias.3 */, - F96D3E2308F272A5004A47F5 /* CrtTimerHdlr.3 */, - F96D3E2408F272A5004A47F5 /* CrtTrace.3 */, - F96D3E2508F272A5004A47F5 /* dde.n */, - F93599D30DF1F8F500E04F67 /* define.n */, - F96D3E2608F272A5004A47F5 /* DetachPids.3 */, - F96D3E2708F272A5004A47F5 /* dict.n */, - F96D3E2808F272A5004A47F5 /* DictObj.3 */, - F96D3E2908F272A5004A47F5 /* DoOneEvent.3 */, - F96D3E2A08F272A5004A47F5 /* DoubleObj.3 */, - F96D3E2B08F272A5004A47F5 /* DoWhenIdle.3 */, - F96D3E2C08F272A5004A47F5 /* DString.3 */, - F96D3E2D08F272A5004A47F5 /* DumpActiveMemory.3 */, - F96D3E2E08F272A5004A47F5 /* Encoding.3 */, - F96D3E2F08F272A5004A47F5 /* encoding.n */, - F96D3E3008F272A5004A47F5 /* Ensemble.3 */, - F96D3E3108F272A5004A47F5 /* Environment.3 */, - F96D3E3208F272A5004A47F5 /* eof.n */, - F96D3E3308F272A5004A47F5 /* error.n */, - F96D3E3408F272A5004A47F5 /* Eval.3 */, - F96D3E3508F272A5004A47F5 /* eval.n */, - F96D3E3608F272A5004A47F5 /* exec.n */, - F96D3E3708F272A5004A47F5 /* Exit.3 */, - F96D3E3808F272A5004A47F5 /* exit.n */, - F96D3E3908F272A5004A47F5 /* expr.n */, - F96D3E3A08F272A5004A47F5 /* ExprLong.3 */, - F96D3E3B08F272A5004A47F5 /* ExprLongObj.3 */, - F96D3E3C08F272A5004A47F5 /* fblocked.n */, - F96D3E3D08F272A5004A47F5 /* fconfigure.n */, - F96D3E3E08F272A5004A47F5 /* fcopy.n */, - F96D3E3F08F272A5004A47F5 /* file.n */, - F96D3E4008F272A5004A47F5 /* fileevent.n */, - F96D3E4108F272A5004A47F5 /* filename.n */, - F96D3E4208F272A5004A47F5 /* FileSystem.3 */, - F96D3E4308F272A5004A47F5 /* FindExec.3 */, - F96D3E4408F272A5004A47F5 /* flush.n */, - F96D3E4508F272A5004A47F5 /* for.n */, - F96D3E4608F272A5004A47F5 /* foreach.n */, - F96D3E4708F272A5004A47F5 /* format.n */, - F96D3E4808F272A5004A47F5 /* GetCwd.3 */, - F96D3E4908F272A5004A47F5 /* GetHostName.3 */, - F96D3E4A08F272A5004A47F5 /* GetIndex.3 */, - F96D3E4B08F272A5004A47F5 /* GetInt.3 */, - F96D3E4C08F272A5004A47F5 /* GetOpnFl.3 */, - F96D3E4D08F272A5004A47F5 /* gets.n */, - F96D3E4E08F272A5004A47F5 /* GetStdChan.3 */, - F96D3E4F08F272A5004A47F5 /* GetTime.3 */, - F96D3E5008F272A5004A47F5 /* GetVersion.3 */, - F96D3E5108F272A5004A47F5 /* glob.n */, - F96D3E5208F272A6004A47F5 /* global.n */, - F96D3E5308F272A6004A47F5 /* Hash.3 */, - F96D3E5408F272A6004A47F5 /* history.n */, - F96D3E5508F272A6004A47F5 /* http.n */, - F96D3E5608F272A6004A47F5 /* if.n */, - F96D3E5708F272A6004A47F5 /* incr.n */, - F96D3E5808F272A6004A47F5 /* info.n */, - F96D3E5908F272A6004A47F5 /* Init.3 */, - F96D3E5A08F272A6004A47F5 /* InitStubs.3 */, - F96D3E5B08F272A6004A47F5 /* Interp.3 */, - F96D3E5C08F272A6004A47F5 /* interp.n */, - F96D3E5D08F272A6004A47F5 /* IntObj.3 */, - F96D3E5E08F272A6004A47F5 /* join.n */, - F96D3E5F08F272A6004A47F5 /* lappend.n */, - F96D3E6008F272A6004A47F5 /* lassign.n */, - F96D3E6108F272A6004A47F5 /* library.n */, - F96D3E6208F272A6004A47F5 /* Limit.3 */, - F96D3E6308F272A6004A47F5 /* lindex.n */, - F96D3E6408F272A6004A47F5 /* LinkVar.3 */, - F96D3E6508F272A6004A47F5 /* linsert.n */, - F96D3E6608F272A6004A47F5 /* list.n */, - F96D3E6708F272A6004A47F5 /* ListObj.3 */, - F96D3E6808F272A6004A47F5 /* llength.n */, - F96D3E6908F272A6004A47F5 /* load.n */, - F96D3E6A08F272A6004A47F5 /* lrange.n */, - F96D3E6B08F272A6004A47F5 /* lrepeat.n */, - F96D3E6C08F272A6004A47F5 /* lreplace.n */, - F96D3E6D08F272A6004A47F5 /* lsearch.n */, - F96D3E6E08F272A6004A47F5 /* lset.n */, - F96D3E6F08F272A6004A47F5 /* lsort.n */, - F96D3E7008F272A6004A47F5 /* man.macros */, - F96D3E7108F272A6004A47F5 /* mathfunc.n */, - F96D3E7208F272A6004A47F5 /* memory.n */, - F93599D40DF1F91900E04F67 /* Method.3 */, - F96D3E7308F272A6004A47F5 /* msgcat.n */, - F93599D50DF1F93700E04F67 /* my.n */, - F96D3E7408F272A6004A47F5 /* Namespace.3 */, - F96D3E7508F272A6004A47F5 /* namespace.n */, - F93599D60DF1F95000E04F67 /* next.n */, - F96D3E7608F272A6004A47F5 /* Notifier.3 */, - F96D3E7708F272A6004A47F5 /* Object.3 */, - F93599D70DF1F96800E04F67 /* object.n */, - F96D3E7808F272A6004A47F5 /* ObjectType.3 */, - F96D3E7908F272A6004A47F5 /* open.n */, - F96D3E7A08F272A6004A47F5 /* OpenFileChnl.3 */, - F96D3E7B08F272A6004A47F5 /* OpenTcp.3 */, - F96D3E7C08F272A6004A47F5 /* package.n */, - F96D3E7D08F272A6004A47F5 /* packagens.n */, - F96D3E7E08F272A6004A47F5 /* Panic.3 */, - F96D3E7F08F272A6004A47F5 /* ParseCmd.3 */, - F96D3E8008F272A6004A47F5 /* pid.n */, - F96D3E8108F272A6004A47F5 /* pkgMkIndex.n */, - F96D3E8208F272A6004A47F5 /* PkgRequire.3 */, - F9ECB1E10B26543C00A28025 /* platform_shell.n */, - F9ECB1E20B26543C00A28025 /* platform.n */, - F96D3E8308F272A6004A47F5 /* Preserve.3 */, - F96D3E8408F272A6004A47F5 /* PrintDbl.3 */, - F96D3E8508F272A6004A47F5 /* proc.n */, - F96D3E8608F272A6004A47F5 /* puts.n */, - F96D3E8708F272A6004A47F5 /* pwd.n */, - F96D3E8808F272A6004A47F5 /* re_syntax.n */, - F96D3E8908F272A6004A47F5 /* read.n */, - F96D3E8A08F272A6004A47F5 /* RecEvalObj.3 */, - F96D3E8B08F272A6004A47F5 /* RecordEval.3 */, - F96D3E8C08F272A6004A47F5 /* RegConfig.3 */, - F96D3E8D08F272A6004A47F5 /* RegExp.3 */, - F96D3E8E08F272A6004A47F5 /* regexp.n */, - F96D3E8F08F272A6004A47F5 /* registry.n */, - F96D3E9008F272A6004A47F5 /* regsub.n */, - F96D3E9108F272A6004A47F5 /* rename.n */, - F96D3E9208F272A6004A47F5 /* return.n */, - F96D3E9308F272A6004A47F5 /* safe.n */, - F96D3E9408F272A6004A47F5 /* SaveResult.3 */, - F96D3E9508F272A6004A47F5 /* scan.n */, - F96D3E9608F272A6004A47F5 /* seek.n */, - F93599D80DF1F98300E04F67 /* self.n */, - F96D3E9708F272A6004A47F5 /* set.n */, - F96D3E9808F272A6004A47F5 /* SetChanErr.3 */, - F96D3E9908F272A6004A47F5 /* SetErrno.3 */, - F96D3E9A08F272A6004A47F5 /* SetRecLmt.3 */, - F96D3E9B08F272A7004A47F5 /* SetResult.3 */, - F96D3E9C08F272A7004A47F5 /* SetVar.3 */, - F96D3E9D08F272A7004A47F5 /* Signal.3 */, - F96D3E9E08F272A7004A47F5 /* Sleep.3 */, - F96D3E9F08F272A7004A47F5 /* socket.n */, - F96D3EA008F272A7004A47F5 /* source.n */, - F96D3EA108F272A7004A47F5 /* SourceRCFile.3 */, - F96D3EA208F272A7004A47F5 /* split.n */, - F96D3EA308F272A7004A47F5 /* SplitList.3 */, - F96D3EA408F272A7004A47F5 /* SplitPath.3 */, - F96D3EA508F272A7004A47F5 /* StaticPkg.3 */, - F96D3EA608F272A7004A47F5 /* StdChannels.3 */, - F96D3EA708F272A7004A47F5 /* string.n */, - F96D3EA808F272A7004A47F5 /* StringObj.3 */, - F96D3EA908F272A7004A47F5 /* StrMatch.3 */, - F96D3EAA08F272A7004A47F5 /* subst.n */, - F96D3EAB08F272A7004A47F5 /* SubstObj.3 */, - F96D3EAC08F272A7004A47F5 /* switch.n */, - F974D5760FBE7E1900BF728B /* tailcall.n */, - F96D3EAD08F272A7004A47F5 /* Tcl.n */, - F99D61180EF5573A00BBFE01 /* TclZlib.3 */, - F96D3EAE08F272A7004A47F5 /* Tcl_Main.3 */, - F96D3EAF08F272A7004A47F5 /* TCL_MEM_DEBUG.3 */, - F96D3EB008F272A7004A47F5 /* tclsh.1 */, - F96D3EB108F272A7004A47F5 /* tcltest.n */, - F96D3EB208F272A7004A47F5 /* tclvars.n */, - F96D3EB308F272A7004A47F5 /* tell.n */, - F96D3EB408F272A7004A47F5 /* Thread.3 */, - F9183E640EFC80CD0030B814 /* throw.n */, - F96D3EB508F272A7004A47F5 /* time.n */, - F96D3EB608F272A7004A47F5 /* tm.n */, - F96D3EB708F272A7004A47F5 /* ToUpper.3 */, - F96D3EB808F272A7004A47F5 /* trace.n */, - F96D3EB908F272A7004A47F5 /* TraceCmd.3 */, - F96D3EBA08F272A7004A47F5 /* TraceVar.3 */, - F96D3EBB08F272A7004A47F5 /* Translate.3 */, - F9183E650EFC80D70030B814 /* try.n */, - F96D3EBC08F272A7004A47F5 /* UniCharIsAlpha.3 */, - F96D3EBD08F272A7004A47F5 /* unknown.n */, - F96D3EBE08F272A7004A47F5 /* unload.n */, - F96D3EBF08F272A7004A47F5 /* unset.n */, - F96D3EC008F272A7004A47F5 /* update.n */, - F96D3EC108F272A7004A47F5 /* uplevel.n */, - F96D3EC208F272A7004A47F5 /* UpVar.3 */, - F96D3EC308F272A7004A47F5 /* upvar.n */, - F96D3EC408F272A7004A47F5 /* Utf.3 */, - F96D3EC508F272A7004A47F5 /* variable.n */, - F96D3EC608F272A7004A47F5 /* vwait.n */, - F96D3EC708F272A7004A47F5 /* while.n */, - F96D3EC808F272A7004A47F5 /* WrongNumArgs.3 */, - F915432D0EF201EE0032D1E8 /* zlib.n */, - ); - path = doc; - sourceTree = "<group>"; - }; - F96D3EC908F272A7004A47F5 /* generic */ = { - isa = PBXGroup; - children = ( - F96D3ECA08F272A7004A47F5 /* README */, - F96D3ECB08F272A7004A47F5 /* regc_color.c */, - F96D3ECC08F272A7004A47F5 /* regc_cvec.c */, - F96D3ECD08F272A7004A47F5 /* regc_lex.c */, - F96D3ECE08F272A7004A47F5 /* regc_locale.c */, - F96D3ECF08F272A7004A47F5 /* regc_nfa.c */, - F96D3ED008F272A7004A47F5 /* regcomp.c */, - F96D3ED108F272A7004A47F5 /* regcustom.h */, - F96D3ED208F272A7004A47F5 /* rege_dfa.c */, - F96D3ED308F272A7004A47F5 /* regerror.c */, - F96D3ED408F272A7004A47F5 /* regerrs.h */, - F96D3ED508F272A7004A47F5 /* regex.h */, - F96D3ED608F272A7004A47F5 /* regexec.c */, - F96D3ED708F272A7004A47F5 /* regfree.c */, - F96D3ED808F272A7004A47F5 /* regfronts.c */, - F96D3ED908F272A7004A47F5 /* regguts.h */, - F96D3EDA08F272A7004A47F5 /* tcl.decls */, - F96D3EDB08F272A7004A47F5 /* tcl.h */, - F96D3EDC08F272A7004A47F5 /* tclAlloc.c */, - F96D3EDD08F272A7004A47F5 /* tclAsync.c */, - F96D3EDE08F272A7004A47F5 /* tclBasic.c */, - F96D3EDF08F272A7004A47F5 /* tclBinary.c */, - F96D3EE008F272A7004A47F5 /* tclCkalloc.c */, - F96D3EE108F272A7004A47F5 /* tclClock.c */, - F96D3EE208F272A7004A47F5 /* tclCmdAH.c */, - F96D3EE308F272A7004A47F5 /* tclCmdIL.c */, - F96D3EE408F272A7004A47F5 /* tclCmdMZ.c */, - F96D3EE508F272A7004A47F5 /* tclCompCmds.c */, - F96D3EE608F272A7004A47F5 /* tclCompExpr.c */, - F96D3EE708F272A7004A47F5 /* tclCompile.c */, - F96D3EE808F272A7004A47F5 /* tclCompile.h */, - F96D3EE908F272A7004A47F5 /* tclConfig.c */, - F96D3EEA08F272A7004A47F5 /* tclDate.c */, - F96D3EEB08F272A7004A47F5 /* tclDecls.h */, - F96D3EEC08F272A7004A47F5 /* tclDictObj.c */, - F9F4415D0C8BAE6F00BCCD67 /* tclDTrace.d */, - F96D3EED08F272A7004A47F5 /* tclEncoding.c */, - F96D3EEE08F272A7004A47F5 /* tclEnv.c */, - F96D3EEF08F272A7004A47F5 /* tclEvent.c */, - F96D3EF008F272A7004A47F5 /* tclExecute.c */, - F96D3EF108F272A7004A47F5 /* tclFCmd.c */, - F96D3EF208F272A7004A47F5 /* tclFileName.c */, - F96D3EF308F272A7004A47F5 /* tclFileSystem.h */, - F96D3EF408F272A7004A47F5 /* tclGet.c */, - F96D3EF508F272A7004A47F5 /* tclGetDate.y */, - F96D3EF608F272A7004A47F5 /* tclHash.c */, - F96D3EF708F272A7004A47F5 /* tclHistory.c */, - F96D3EF808F272A7004A47F5 /* tclIndexObj.c */, - F96D3EF908F272A7004A47F5 /* tclInt.decls */, - F96D3EFA08F272A7004A47F5 /* tclInt.h */, - F96D3EFB08F272A7004A47F5 /* tclIntDecls.h */, - F96D3EFC08F272A7004A47F5 /* tclInterp.c */, - F96D3EFD08F272A7004A47F5 /* tclIntPlatDecls.h */, - F96D3EFE08F272A7004A47F5 /* tclIO.c */, - F96D3EFF08F272A7004A47F5 /* tclIO.h */, - F96D3F0008F272A7004A47F5 /* tclIOCmd.c */, - F96D3F0108F272A7004A47F5 /* tclIOGT.c */, - F96D3F0208F272A7004A47F5 /* tclIORChan.c */, - F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */, - F96D3F0308F272A7004A47F5 /* tclIOSock.c */, - F96D3F0408F272A7004A47F5 /* tclIOUtil.c */, - F96D3F0508F272A7004A47F5 /* tclLink.c */, - F96D3F0608F272A7004A47F5 /* tclListObj.c */, - F96D3F0708F272A7004A47F5 /* tclLiteral.c */, - F96D3F0808F272A7004A47F5 /* tclLoad.c */, - F96D3F0908F272A7004A47F5 /* tclLoadNone.c */, - F96D3F0A08F272A7004A47F5 /* tclMain.c */, - F96D3F0B08F272A7004A47F5 /* tclNamesp.c */, - F96D3F0C08F272A7004A47F5 /* tclNotify.c */, - F96D3F0D08F272A7004A47F5 /* tclObj.c */, - F93599B20DF1F75400E04F67 /* tclOO.c */, - F93599B40DF1F75900E04F67 /* tclOO.decls */, - F93599B50DF1F75D00E04F67 /* tclOO.h */, - F93599B60DF1F76100E04F67 /* tclOOBasic.c */, - F93599B80DF1F76600E04F67 /* tclOOCall.c */, - F93599BA0DF1F76A00E04F67 /* tclOODecls.h */, - F93599BB0DF1F77000E04F67 /* tclOODefineCmds.c */, - F93599BD0DF1F77400E04F67 /* tclOOInfo.c */, - F93599BF0DF1F77900E04F67 /* tclOOInt.h */, - F93599C00DF1F77D00E04F67 /* tclOOIntDecls.h */, - F93599C10DF1F78300E04F67 /* tclOOMethod.c */, - F93599C30DF1F78800E04F67 /* tclOOStubInit.c */, - F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */, - F96D3F0E08F272A7004A47F5 /* tclPanic.c */, - F96D3F0F08F272A7004A47F5 /* tclParse.c */, - F96D3F1108F272A7004A47F5 /* tclPathObj.c */, - F96D3F1208F272A7004A47F5 /* tclPipe.c */, - F96D3F1308F272A7004A47F5 /* tclPkg.c */, - F96D3F1408F272A7004A47F5 /* tclPkgConfig.c */, - F96D3F1508F272A7004A47F5 /* tclPlatDecls.h */, - F96D3F1608F272A7004A47F5 /* tclPort.h */, - F96D3F1708F272A7004A47F5 /* tclPosixStr.c */, - F96D3F1808F272A7004A47F5 /* tclPreserve.c */, - F96D3F1908F272A7004A47F5 /* tclProc.c */, - F96D3F1A08F272A7004A47F5 /* tclRegexp.c */, - F96D3F1B08F272A7004A47F5 /* tclRegexp.h */, - F96D3F1C08F272A7004A47F5 /* tclResolve.c */, - F96D3F1D08F272A7004A47F5 /* tclResult.c */, - F96D3F1E08F272A7004A47F5 /* tclScan.c */, - F96D3F1F08F272A7004A47F5 /* tclStringObj.c */, - F96D3F2408F272A7004A47F5 /* tclStrToD.c */, - F96D3F2508F272A7004A47F5 /* tclStubInit.c */, - F96D3F2608F272A7004A47F5 /* tclStubLib.c */, - F96D3F2708F272A7004A47F5 /* tclTest.c */, - F96D3F2808F272A7004A47F5 /* tclTestObj.c */, - F96D3F2908F272A7004A47F5 /* tclTestProcBodyObj.c */, - F96D3F2A08F272A7004A47F5 /* tclThread.c */, - F96D3F2B08F272A7004A47F5 /* tclThreadAlloc.c */, - F96D3F2C08F272A7004A47F5 /* tclThreadJoin.c */, - F96D3F2D08F272A7004A47F5 /* tclThreadStorage.c */, - F96D3F2E08F272A7004A47F5 /* tclThreadTest.c */, - F96D3F2F08F272A7004A47F5 /* tclTimer.c */, - F9903CAF094FAADA004613E9 /* tclTomMath.decls */, - F96D3F3008F272A7004A47F5 /* tclTomMath.h */, - F9903CB0094FAADA004613E9 /* tclTomMathDecls.h */, - F96D3F3108F272A7004A47F5 /* tclTomMathInterface.c */, - F96D3F3208F272A7004A47F5 /* tclTrace.c */, - F96D3F3308F272A7004A47F5 /* tclUniData.c */, - F96D3F3408F272A7004A47F5 /* tclUtf.c */, - F96D3F3508F272A7004A47F5 /* tclUtil.c */, - F96D3F3608F272A7004A47F5 /* tclVar.c */, - F96437C90EF0D4B2003F468E /* tclZlib.c */, - F96D3F3708F272A7004A47F5 /* tommath.h */, - ); - path = generic; - sourceTree = "<group>"; - }; - F96D3F3808F272A7004A47F5 /* library */ = { - isa = PBXGroup; - children = ( - F96D3F3908F272A8004A47F5 /* auto.tcl */, - F96D3F3A08F272A8004A47F5 /* clock.tcl */, - F96D3F3B08F272A8004A47F5 /* dde */, - F96D3F8C08F272A8004A47F5 /* history.tcl */, - F96D3F8D08F272A8004A47F5 /* http */, - F96D3F9008F272A8004A47F5 /* http1.0 */, - F96D3F9308F272A8004A47F5 /* init.tcl */, - F96D3F9408F272A8004A47F5 /* msgcat */, - F96D401708F272AA004A47F5 /* opt */, - F96D401A08F272AA004A47F5 /* package.tcl */, - F96D401B08F272AA004A47F5 /* parray.tcl */, - F9ECB1110B26521500A28025 /* platform */, - F96D401C08F272AA004A47F5 /* reg */, - F96D401E08F272AA004A47F5 /* safe.tcl */, - F96D401F08F272AA004A47F5 /* tclIndex */, - F96D402008F272AA004A47F5 /* tcltest */, - F96D402308F272AA004A47F5 /* tm.tcl */, - F96D425B08F272B2004A47F5 /* word.tcl */, - ); - path = library; - sourceTree = "<group>"; - }; - F96D3F3B08F272A8004A47F5 /* dde */ = { - isa = PBXGroup; - children = ( - F96D3F3C08F272A8004A47F5 /* pkgIndex.tcl */, - ); - path = dde; - sourceTree = "<group>"; - }; - F96D3F8D08F272A8004A47F5 /* http */ = { - isa = PBXGroup; - children = ( - F96D3F8E08F272A8004A47F5 /* http.tcl */, - F96D3F8F08F272A8004A47F5 /* pkgIndex.tcl */, - ); - path = http; - sourceTree = "<group>"; - }; - F96D3F9008F272A8004A47F5 /* http1.0 */ = { - isa = PBXGroup; - children = ( - F96D3F9108F272A8004A47F5 /* http.tcl */, - F96D3F9208F272A8004A47F5 /* pkgIndex.tcl */, - ); - path = http1.0; - sourceTree = "<group>"; - }; - F96D3F9408F272A8004A47F5 /* msgcat */ = { - isa = PBXGroup; - children = ( - F96D3F9508F272A8004A47F5 /* msgcat.tcl */, - F96D3F9608F272A8004A47F5 /* pkgIndex.tcl */, - ); - path = msgcat; - sourceTree = "<group>"; - }; - F96D401708F272AA004A47F5 /* opt */ = { - isa = PBXGroup; - children = ( - F96D401808F272AA004A47F5 /* optparse.tcl */, - F96D401908F272AA004A47F5 /* pkgIndex.tcl */, - ); - path = opt; - sourceTree = "<group>"; - }; - F96D401C08F272AA004A47F5 /* reg */ = { - isa = PBXGroup; - children = ( - F96D401D08F272AA004A47F5 /* pkgIndex.tcl */, - ); - path = reg; - sourceTree = "<group>"; - }; - F96D402008F272AA004A47F5 /* tcltest */ = { - isa = PBXGroup; - children = ( - F96D402108F272AA004A47F5 /* pkgIndex.tcl */, - F96D402208F272AA004A47F5 /* tcltest.tcl */, - ); - path = tcltest; - sourceTree = "<group>"; - }; - F96D425C08F272B2004A47F5 /* libtommath */ = { - isa = PBXGroup; - children = ( - F96D426408F272B3004A47F5 /* bn_fast_s_mp_mul_digs.c */, - F96D426608F272B3004A47F5 /* bn_fast_s_mp_sqr.c */, - F96D426908F272B3004A47F5 /* bn_mp_add.c */, - F96D426A08F272B3004A47F5 /* bn_mp_add_d.c */, - F96D426C08F272B3004A47F5 /* bn_mp_and.c */, - F96D426D08F272B3004A47F5 /* bn_mp_clamp.c */, - F96D426E08F272B3004A47F5 /* bn_mp_clear.c */, - F96D426F08F272B3004A47F5 /* bn_mp_clear_multi.c */, - F96D427008F272B3004A47F5 /* bn_mp_cmp.c */, - F96D427108F272B3004A47F5 /* bn_mp_cmp_d.c */, - F96D427208F272B3004A47F5 /* bn_mp_cmp_mag.c */, - F96D427408F272B3004A47F5 /* bn_mp_copy.c */, - F96D427508F272B3004A47F5 /* bn_mp_count_bits.c */, - F96D427608F272B3004A47F5 /* bn_mp_div.c */, - F96D427708F272B3004A47F5 /* bn_mp_div_2.c */, - F96D427808F272B3004A47F5 /* bn_mp_div_2d.c */, - F96D427908F272B3004A47F5 /* bn_mp_div_3.c */, - F96D427A08F272B3004A47F5 /* bn_mp_div_d.c */, - F96D427E08F272B3004A47F5 /* bn_mp_exch.c */, - F96D427F08F272B3004A47F5 /* bn_mp_expt_d.c */, - F96D428708F272B3004A47F5 /* bn_mp_grow.c */, - F96D428808F272B3004A47F5 /* bn_mp_init.c */, - F96D428908F272B3004A47F5 /* bn_mp_init_copy.c */, - F96D428A08F272B3004A47F5 /* bn_mp_init_multi.c */, - F96D428B08F272B3004A47F5 /* bn_mp_init_set.c */, - F96D428D08F272B3004A47F5 /* bn_mp_init_size.c */, - F96D429208F272B3004A47F5 /* bn_mp_karatsuba_mul.c */, - F96D429308F272B3004A47F5 /* bn_mp_karatsuba_sqr.c */, - F96D429508F272B3004A47F5 /* bn_mp_lshd.c */, - F96D429608F272B3004A47F5 /* bn_mp_mod.c */, - F96D429708F272B3004A47F5 /* bn_mp_mod_2d.c */, - F96D429C08F272B3004A47F5 /* bn_mp_mul.c */, - F96D429D08F272B3004A47F5 /* bn_mp_mul_2.c */, - F96D429E08F272B3004A47F5 /* bn_mp_mul_2d.c */, - F96D429F08F272B3004A47F5 /* bn_mp_mul_d.c */, - F96D42A208F272B3004A47F5 /* bn_mp_neg.c */, - F96D42A308F272B3004A47F5 /* bn_mp_or.c */, - F96D42AB08F272B3004A47F5 /* bn_mp_radix_size.c */, - F96D42AC08F272B3004A47F5 /* bn_mp_radix_smap.c */, - F96D42AE08F272B3004A47F5 /* bn_mp_read_radix.c */, - F96D42B908F272B3004A47F5 /* bn_mp_rshd.c */, - F96D42BA08F272B3004A47F5 /* bn_mp_set.c */, - F96D42BC08F272B3004A47F5 /* bn_mp_shrink.c */, - F96D42BE08F272B3004A47F5 /* bn_mp_sqr.c */, - F96D42C008F272B3004A47F5 /* bn_mp_sqrt.c */, - F96D42C108F272B3004A47F5 /* bn_mp_sub.c */, - F96D42C208F272B3004A47F5 /* bn_mp_sub_d.c */, - F96D42C608F272B3004A47F5 /* bn_mp_to_unsigned_bin.c */, - F96D42C708F272B3004A47F5 /* bn_mp_to_unsigned_bin_n.c */, - F96D42C808F272B3004A47F5 /* bn_mp_toom_mul.c */, - F96D42C908F272B3004A47F5 /* bn_mp_toom_sqr.c */, - F96D42CB08F272B3004A47F5 /* bn_mp_toradix_n.c */, - F96D42CC08F272B3004A47F5 /* bn_mp_unsigned_bin_size.c */, - F96D42CD08F272B3004A47F5 /* bn_mp_xor.c */, - F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */, - F96D42D008F272B3004A47F5 /* bn_reverse.c */, - F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */, - F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */, - F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */, - F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */, - F96D42D708F272B3004A47F5 /* bncore.c */, - F96D432908F272B4004A47F5 /* tommath_class.h */, - F96D432A08F272B4004A47F5 /* tommath_superclass.h */, - ); - path = libtommath; - sourceTree = "<group>"; - }; - F96D432C08F272B4004A47F5 /* macosx */ = { - isa = PBXGroup; - children = ( - F96D432E08F272B5004A47F5 /* configure.ac */, - F96D432F08F272B5004A47F5 /* GNUmakefile */, - F96D433108F272B5004A47F5 /* README */, - F96D433908F272B5004A47F5 /* tclMacOSXBundle.c */, - F96D433D08F272B5004A47F5 /* tclMacOSXFCmd.c */, - F96D433E08F272B5004A47F5 /* tclMacOSXNotify.c */, - F96D433208F272B5004A47F5 /* Tcl-Info.plist.in */, - F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */, - ); - path = macosx; - sourceTree = "<group>"; - }; - F96D434408F272B5004A47F5 /* tests */ = { - isa = PBXGroup; - children = ( - F96D434508F272B5004A47F5 /* all.tcl */, - F96D434608F272B5004A47F5 /* append.test */, - F96D434708F272B5004A47F5 /* appendComp.test */, - F9ECB1CA0B2652D300A28025 /* apply.test */, - F96D434808F272B5004A47F5 /* assocd.test */, - F96D434908F272B5004A47F5 /* async.test */, - F96D434A08F272B5004A47F5 /* autoMkindex.test */, - F96D434B08F272B5004A47F5 /* basic.test */, - F96D434C08F272B5004A47F5 /* binary.test */, - F96D434D08F272B5004A47F5 /* case.test */, - F96D434E08F272B5004A47F5 /* chan.test */, - F9A493240CEBF38300B78AE2 /* chanio.test */, - F96D434F08F272B5004A47F5 /* clock.test */, - F96D435008F272B5004A47F5 /* cmdAH.test */, - F96D435108F272B5004A47F5 /* cmdIL.test */, - F96D435208F272B5004A47F5 /* cmdInfo.test */, - F96D435308F272B5004A47F5 /* cmdMZ.test */, - F96D435408F272B5004A47F5 /* compExpr-old.test */, - F96D435508F272B5004A47F5 /* compExpr.test */, - F96D435608F272B5004A47F5 /* compile.test */, - F96D435708F272B5004A47F5 /* concat.test */, - F96D435808F272B5004A47F5 /* config.test */, - F974D5770FBE7E6100BF728B /* coroutine.test */, - F96D435908F272B5004A47F5 /* dcall.test */, - F96D435A08F272B5004A47F5 /* dict.test */, - F96D435C08F272B5004A47F5 /* dstring.test */, - F96D435E08F272B5004A47F5 /* encoding.test */, - F96D435F08F272B5004A47F5 /* env.test */, - F96D436008F272B5004A47F5 /* error.test */, - F96D436108F272B5004A47F5 /* eval.test */, - F96D436208F272B5004A47F5 /* event.test */, - F96D436308F272B5004A47F5 /* exec.test */, - F96D436408F272B5004A47F5 /* execute.test */, - F96D436508F272B5004A47F5 /* expr-old.test */, - F96D436608F272B5004A47F5 /* expr.test */, - F96D436708F272B6004A47F5 /* fCmd.test */, - F96D436808F272B6004A47F5 /* fileName.test */, - F96D436908F272B6004A47F5 /* fileSystem.test */, - F96D436A08F272B6004A47F5 /* for-old.test */, - F96D436B08F272B6004A47F5 /* for.test */, - F96D436C08F272B6004A47F5 /* foreach.test */, - F96D436D08F272B6004A47F5 /* format.test */, - F96D436E08F272B6004A47F5 /* get.test */, - F96D436F08F272B6004A47F5 /* history.test */, - F96D437008F272B6004A47F5 /* http.test */, - F974D56C0FBE7D6300BF728B /* http11.test */, - F96D437108F272B6004A47F5 /* httpd */, - F974D56D0FBE7D6300BF728B /* httpd11.tcl */, - F96D437208F272B6004A47F5 /* httpold.test */, - F96D437308F272B6004A47F5 /* if-old.test */, - F96D437408F272B6004A47F5 /* if.test */, - F96D437508F272B6004A47F5 /* incr-old.test */, - F96D437608F272B6004A47F5 /* incr.test */, - F96D437708F272B6004A47F5 /* indexObj.test */, - F96D437808F272B6004A47F5 /* info.test */, - F96D437908F272B6004A47F5 /* init.test */, - F96D437A08F272B6004A47F5 /* interp.test */, - F96D437B08F272B6004A47F5 /* io.test */, - F96D437C08F272B6004A47F5 /* ioCmd.test */, - F96D437D08F272B6004A47F5 /* iogt.test */, - F96D437F08F272B6004A47F5 /* join.test */, - F96D438008F272B6004A47F5 /* lindex.test */, - F96D438108F272B6004A47F5 /* link.test */, - F96D438208F272B6004A47F5 /* linsert.test */, - F96D438308F272B6004A47F5 /* list.test */, - F96D438408F272B6004A47F5 /* listObj.test */, - F96D438508F272B6004A47F5 /* llength.test */, - F96D438608F272B6004A47F5 /* load.test */, - F96D438708F272B6004A47F5 /* lrange.test */, - F96D438808F272B6004A47F5 /* lrepeat.test */, - F96D438908F272B6004A47F5 /* lreplace.test */, - F96D438A08F272B6004A47F5 /* lsearch.test */, - F96D438B08F272B6004A47F5 /* lset.test */, - F96D438C08F272B6004A47F5 /* lsetComp.test */, - F96D438D08F272B6004A47F5 /* macOSXFCmd.test */, - F95FAFF90B34F1130072E431 /* macOSXLoad.test */, - F96D438E08F272B6004A47F5 /* main.test */, - F9ECB1CB0B26534C00A28025 /* mathop.test */, - F96D438F08F272B6004A47F5 /* misc.test */, - F96D439008F272B6004A47F5 /* msgcat.test */, - F96D439108F272B6004A47F5 /* namespace-old.test */, - F96D439208F272B7004A47F5 /* namespace.test */, - F96D439308F272B7004A47F5 /* notify.test */, - F91DC23C0E44C51B002CB8D1 /* nre.test */, - F96D439408F272B7004A47F5 /* obj.test */, - F93599C80DF1F81900E04F67 /* oo.test */, - F96D439508F272B7004A47F5 /* opt.test */, - F96D439608F272B7004A47F5 /* package.test */, - F96D439708F272B7004A47F5 /* parse.test */, - F96D439808F272B7004A47F5 /* parseExpr.test */, - F96D439908F272B7004A47F5 /* parseOld.test */, - F96D439A08F272B7004A47F5 /* pid.test */, - F96D439B08F272B7004A47F5 /* pkg.test */, - F96D439C08F272B7004A47F5 /* pkgMkIndex.test */, - F96D439D08F272B7004A47F5 /* platform.test */, - F96D439E08F272B7004A47F5 /* proc-old.test */, - F96D439F08F272B7004A47F5 /* proc.test */, - F96D43A008F272B7004A47F5 /* pwd.test */, - F96D43A108F272B7004A47F5 /* README */, - F96D43A208F272B7004A47F5 /* reg.test */, - F96D43A308F272B7004A47F5 /* regexp.test */, - F96D43A408F272B7004A47F5 /* regexpComp.test */, - F96D43A508F272B7004A47F5 /* registry.test */, - F96D43A608F272B7004A47F5 /* remote.tcl */, - F96D43A708F272B7004A47F5 /* rename.test */, - F96D43A808F272B7004A47F5 /* result.test */, - F96D43A908F272B7004A47F5 /* safe.test */, - F96D43AA08F272B7004A47F5 /* scan.test */, - F96D43AB08F272B7004A47F5 /* security.test */, - F96D43AC08F272B7004A47F5 /* set-old.test */, - F96D43AD08F272B7004A47F5 /* set.test */, - F96D43AE08F272B7004A47F5 /* socket.test */, - F96D43AF08F272B7004A47F5 /* source.test */, - F96D43B008F272B7004A47F5 /* split.test */, - F96D43B108F272B7004A47F5 /* stack.test */, - F96D43B208F272B7004A47F5 /* string.test */, - F96D43B308F272B7004A47F5 /* stringComp.test */, - F96D43B408F272B7004A47F5 /* stringObj.test */, - F96D43B508F272B7004A47F5 /* subst.test */, - F96D43B608F272B7004A47F5 /* switch.test */, - F974D5780FBE7E6100BF728B /* tailcall.test */, - F96D43B708F272B7004A47F5 /* tcltest.test */, - F96D43B808F272B7004A47F5 /* thread.test */, - F96D43B908F272B7004A47F5 /* timer.test */, - F96D43BA08F272B7004A47F5 /* tm.test */, - F96D43BB08F272B7004A47F5 /* trace.test */, - F96D43BC08F272B7004A47F5 /* unixFCmd.test */, - F96D43BD08F272B7004A47F5 /* unixFile.test */, - F96D43BE08F272B7004A47F5 /* unixInit.test */, - F96D43BF08F272B7004A47F5 /* unixNotfy.test */, - F96D43C008F272B7004A47F5 /* unknown.test */, - F96D43C108F272B7004A47F5 /* unload.test */, - F96D43C208F272B7004A47F5 /* uplevel.test */, - F96D43C308F272B7004A47F5 /* upvar.test */, - F96D43C408F272B7004A47F5 /* utf.test */, - F96D43C508F272B7004A47F5 /* util.test */, - F96D43C608F272B7004A47F5 /* var.test */, - F96D43C708F272B7004A47F5 /* while-old.test */, - F96D43C808F272B7004A47F5 /* while.test */, - F96D43C908F272B7004A47F5 /* winConsole.test */, - F96D43CA08F272B7004A47F5 /* winDde.test */, - F96D43CB08F272B7004A47F5 /* winFCmd.test */, - F96D43CC08F272B7004A47F5 /* winFile.test */, - F96D43CD08F272B7004A47F5 /* winNotify.test */, - F96D43CE08F272B7004A47F5 /* winPipe.test */, - F96D43CF08F272B7004A47F5 /* winTime.test */, - F915432A0EF201CF0032D1E8 /* zlib.test */, - ); - path = tests; - sourceTree = "<group>"; - }; - F96D43D008F272B8004A47F5 /* tools */ = { - isa = PBXGroup; - children = ( - F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */, - F96D43D208F272B8004A47F5 /* configure */, - 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 */, - F96D442B08F272B8004A47F5 /* makeTestCases.tcl */, - F96D442C08F272B8004A47F5 /* man2help.tcl */, - F96D442D08F272B8004A47F5 /* man2help2.tcl */, - F96D442E08F272B8004A47F5 /* man2html.tcl */, - F96D442F08F272B8004A47F5 /* man2html1.tcl */, - F96D443008F272B8004A47F5 /* man2html2.tcl */, - F96D443108F272B8004A47F5 /* man2tcl.c */, - F96D443208F272B8004A47F5 /* README */, - F96D443308F272B8004A47F5 /* regexpTestLib.tcl */, - F96D443508F272B8004A47F5 /* tcl.hpj.in */, - F96D443608F272B8004A47F5 /* tcl.wse.in */, - F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */, - F96D443A08F272B9004A47F5 /* tclZIC.tcl */, - F92D7F100DE777240033A13A /* tsdPerf.tcl */, - F96D443B08F272B9004A47F5 /* uniClass.tcl */, - F96D443C08F272B9004A47F5 /* uniParse.tcl */, - ); - path = tools; - sourceTree = "<group>"; - }; - F96D443E08F272B9004A47F5 /* unix */ = { - isa = PBXGroup; - children = ( - F96D444008F272B9004A47F5 /* aclocal.m4 */, - F96D444108F272B9004A47F5 /* configure */, - F96D444208F272B9004A47F5 /* configure.ac */, - F96D444308F272B9004A47F5 /* dltest */, - F96D444D08F272B9004A47F5 /* install-sh */, - F96D444E08F272B9004A47F5 /* installManPage */, - F96D444F08F272B9004A47F5 /* ldAix */, - F96D445008F272B9004A47F5 /* Makefile.in */, - F96D445208F272B9004A47F5 /* README */, - F96D445308F272B9004A47F5 /* tcl.m4 */, - F974D5790FBE7E9C00BF728B /* tcl.pc.in */, - F96D445408F272B9004A47F5 /* tcl.spec */, - F96D445508F272B9004A47F5 /* tclAppInit.c */, - F96D445608F272B9004A47F5 /* tclConfig.h.in */, - F96D445708F272B9004A47F5 /* tclConfig.sh.in */, - F96D445808F272B9004A47F5 /* tclLoadAix.c */, - F96D445908F272B9004A47F5 /* tclLoadDl.c */, - F96D445B08F272B9004A47F5 /* tclLoadDyld.c */, - F96D445C08F272B9004A47F5 /* tclLoadNext.c */, - F96D445D08F272B9004A47F5 /* tclLoadOSF.c */, - F96D445E08F272B9004A47F5 /* tclLoadShl.c */, - F96D445F08F272B9004A47F5 /* tclUnixChan.c */, - F9FC77B70AB29E9100B7077D /* tclUnixCompat.c */, - F96D446008F272B9004A47F5 /* tclUnixEvent.c */, - F96D446108F272B9004A47F5 /* tclUnixFCmd.c */, - F96D446208F272B9004A47F5 /* tclUnixFile.c */, - F96D446308F272B9004A47F5 /* tclUnixInit.c */, - F96D446408F272B9004A47F5 /* tclUnixNotfy.c */, - F96D446508F272B9004A47F5 /* tclUnixPipe.c */, - F96D446608F272B9004A47F5 /* tclUnixPort.h */, - F96D446708F272B9004A47F5 /* tclUnixSock.c */, - F96D446808F272B9004A47F5 /* tclUnixTest.c */, - F96D446908F272B9004A47F5 /* tclUnixThrd.c */, - F96D446A08F272B9004A47F5 /* tclUnixThrd.h */, - F96D446B08F272B9004A47F5 /* tclUnixTime.c */, - F96D446C08F272B9004A47F5 /* tclXtNotify.c */, - F96D446D08F272B9004A47F5 /* tclXtTest.c */, - ); - path = unix; - sourceTree = "<group>"; - }; - F96D444308F272B9004A47F5 /* dltest */ = { - isa = PBXGroup; - children = ( - F96D444408F272B9004A47F5 /* Makefile.in */, - F96D444508F272B9004A47F5 /* pkga.c */, - F96D444608F272B9004A47F5 /* pkgb.c */, - F96D444708F272B9004A47F5 /* pkgc.c */, - F96D444808F272B9004A47F5 /* pkgd.c */, - F96D444908F272B9004A47F5 /* pkge.c */, - F96D444B08F272B9004A47F5 /* pkgua.c */, - F96D444C08F272B9004A47F5 /* README */, - ); - path = dltest; - sourceTree = "<group>"; - }; - F96D446E08F272B9004A47F5 /* win */ = { - isa = PBXGroup; - children = ( - F96D447008F272BA004A47F5 /* aclocal.m4 */, - F96D447108F272BA004A47F5 /* buildall.vc.bat */, - F96D447208F272BA004A47F5 /* cat.c */, - F96D447408F272BA004A47F5 /* configure */, - F96D447508F272BA004A47F5 /* configure.ac */, - F96D447708F272BA004A47F5 /* Makefile.in */, - F96D447808F272BA004A47F5 /* makefile.vc */, - F96D447908F272BA004A47F5 /* nmakehlp.c */, - F96D447A08F272BA004A47F5 /* README */, - F96D447C08F272BA004A47F5 /* rules.vc */, - F96D447D08F272BA004A47F5 /* stub16.c */, - F96D447E08F272BA004A47F5 /* tcl.dsp */, - F96D447F08F272BA004A47F5 /* tcl.dsw */, - F96D448008F272BA004A47F5 /* tcl.hpj.in */, - F96D448108F272BA004A47F5 /* tcl.m4 */, - F96D448208F272BA004A47F5 /* tcl.rc */, - F96D448308F272BA004A47F5 /* tclAppInit.c */, - F96D448408F272BA004A47F5 /* tclConfig.sh.in */, - F96D448608F272BA004A47F5 /* tclsh.rc */, - F96D448708F272BA004A47F5 /* tclWin32Dll.c */, - F96D448808F272BA004A47F5 /* tclWinChan.c */, - F96D448908F272BA004A47F5 /* tclWinConsole.c */, - F96D448A08F272BA004A47F5 /* tclWinDde.c */, - F96D448B08F272BA004A47F5 /* tclWinError.c */, - F96D448C08F272BA004A47F5 /* tclWinFCmd.c */, - F96D448D08F272BA004A47F5 /* tclWinFile.c */, - F96D448E08F272BA004A47F5 /* tclWinInit.c */, - F96D448F08F272BA004A47F5 /* tclWinInt.h */, - F96D449008F272BA004A47F5 /* tclWinLoad.c */, - F96D449108F272BA004A47F5 /* tclWinNotify.c */, - F96D449208F272BA004A47F5 /* tclWinPipe.c */, - F96D449308F272BA004A47F5 /* tclWinPort.h */, - F96D449408F272BA004A47F5 /* tclWinReg.c */, - F96D449508F272BA004A47F5 /* tclWinSerial.c */, - F96D449608F272BA004A47F5 /* tclWinSock.c */, - F96D449708F272BA004A47F5 /* tclWinTest.c */, - F96D449808F272BA004A47F5 /* tclWinThrd.c */, - F96D449908F272BA004A47F5 /* tclWinThrd.h */, - F96D449A08F272BA004A47F5 /* tclWinTime.c */, - ); - path = win; - sourceTree = "<group>"; - }; - F9ECB1110B26521500A28025 /* platform */ = { - isa = PBXGroup; - children = ( - F9ECB1120B26521500A28025 /* pkgIndex.tcl */, - F9ECB1130B26521500A28025 /* platform.tcl */, - F9ECB1140B26521500A28025 /* shell.tcl */, - ); - path = platform; - sourceTree = "<group>"; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8DD76FA90486AB0100D96B5E /* tktest */ = { - isa = PBXNativeTarget; - buildConfigurationList = F95CC8B009158F3100EA5ACE /* Build configuration list for PBXNativeTarget "tktest" */; - buildPhases = ( - F9A5C5F508F651A2008AE941 /* Configure Tcl */, - F9A5C5F608F651AB008AE941 /* Configure Tk */, - 8DD76FAB0486AB0100D96B5E /* Sources */, - 8DD76FAD0486AB0100D96B5E /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = tktest; - productInstallPath = "$(BINDIR)"; - productName = tktest; - productReference = 8DD76FB20486AB0100D96B5E /* tktest */; - productType = "com.apple.product-type.tool"; - }; - F97258A50A86873C00096C78 /* tktest-X11 */ = { - isa = PBXNativeTarget; - buildConfigurationList = F97258A80A86873D00096C78 /* Build configuration list for PBXNativeTarget "tktest-X11" */; - buildPhases = ( - F9FD30B40CC1AD070073837D /* Configure Tcl */, - F9FD30B50CC1AD070073837D /* Configure Tk */, - F9FD30BB0CC1AD070073837D /* Sources */, - F9FD31E30CC1AD070073837D /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "tktest-X11"; - productInstallPath = "$(BINDIR)"; - productName = tktest; - productReference = F9FD31F40CC1AD070073837D /* tktest-X11 */; - productType = "com.apple.product-type.tool"; - }; - F9E61D16090A3E94002B3151 /* Tk */ = { - isa = PBXNativeTarget; - buildConfigurationList = F95CC8AB09158F3100EA5ACE /* Build configuration list for PBXNativeTarget "Tk" */; - buildPhases = ( - F97AF02F0B665DA900310EA2 /* Build Tk */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Tk; - productName = Wish; - productReference = F9A3084B08F2D4CE00BAE1AB /* Wish.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = F95CC8B509158F3100EA5ACE /* Build configuration list for PBXProject "Tk" */; - compatibilityVersion = "Xcode 3.2"; - hasScannedForEncodings = 1; - mainGroup = 08FB7794FE84155DC02AAC07 /* Tk */; - projectDirPath = ""; - projectRoots = ( - .., - ../../tcl, - ); - targets = ( - F9E61D16090A3E94002B3151 /* Tk */, - 8DD76FA90486AB0100D96B5E /* tktest */, - F97258A50A86873C00096C78 /* tktest-X11 */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - F97AF02F0B665DA900310EA2 /* Build Tk */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${TARGET_TEMP_DIR}/.none", - ); - name = "Build Tk"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${WRAPPER_NAME}", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/bash; - shellScript = "export CC=$(xcrun -find ${GCC} || echo ${GCC}); export LD=${CC}\ngnumake -C \"${TK_SRCROOT}/macosx\" -j \"$(sysctl -n hw.activecpu)\" \"$(echo \"${ACTION}\" | sed -e s/build// -e s/clean/distclean/ -e s/..\\*/\\&-/)${MAKE_TARGET}\" CFLAGS_WARNING=\"${WARNING_CFLAGS}\" CFLAGS_OPTIMIZE=\"-O${GCC_OPTIMIZATION_LEVEL}\" SYMROOT=\"${BUILT_PRODUCTS_DIR}\" OBJ_DIR=\"${OBJECT_FILE_DIR}\" INSTALL_ROOT=\"${DSTROOT}\" PREFIX=\"${PREFIX}\" BINDIR=\"${BINDIR}\" LIBDIR=\"${FRAMEWORK_INSTALL_PATH}\" MANDIR=\"${MANDIR}\" EXTRA_CONFIGURE_ARGS=\"${CONFIGURE_ARGS}\" APPLICATION_INSTALL_PATH=\"${APPLICATION_INSTALL_PATH}\" TCL_BUILD_DIR=\"${TCL_BUILD_DIR}\" TCL_FRAMEWORK_DIR=\"${TCL_FRAMEWORK_DIR}\" ${EXTRA_MAKE_FLAGS}\nresult=$?\nif [ -e \"${BUILT_PRODUCTS_DIR}/tktest\" ]; then\n\trm -f \"${BUILT_PRODUCTS_DIR}/tktest\"\nfi\necho \"Done\"\nrm -f \"${SCRIPT_INPUT_FILE_0}\"\nexit ${result}\n"; - showEnvVarsInLog = 0; - }; - F9A5C5F508F651A2008AE941 /* Configure Tcl */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(TCL_SRCROOT)/macosx/configure.ac", - "$(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.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.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.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.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.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.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.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; - buildActionMask = 2147483647; - files = ( - F96D456F08F272BB004A47F5 /* regcomp.c in Sources */, - F96D457208F272BB004A47F5 /* regerror.c in Sources */, - F96D457508F272BB004A47F5 /* regexec.c in Sources */, - F96D457608F272BB004A47F5 /* regfree.c in Sources */, - F96D457B08F272BB004A47F5 /* tclAlloc.c in Sources */, - F96D457C08F272BB004A47F5 /* tclAsync.c in Sources */, - F96D457D08F272BB004A47F5 /* tclBasic.c in Sources */, - F96D457E08F272BC004A47F5 /* tclBinary.c in Sources */, - F96D457F08F272BC004A47F5 /* tclCkalloc.c in Sources */, - F96D458008F272BC004A47F5 /* tclClock.c in Sources */, - F96D458108F272BC004A47F5 /* tclCmdAH.c in Sources */, - F96D458208F272BC004A47F5 /* tclCmdIL.c in Sources */, - F96D458308F272BC004A47F5 /* tclCmdMZ.c in Sources */, - F96D458408F272BC004A47F5 /* tclCompCmds.c in Sources */, - F96D458508F272BC004A47F5 /* tclCompExpr.c in Sources */, - F96D458608F272BC004A47F5 /* tclCompile.c in Sources */, - F96D458808F272BC004A47F5 /* tclConfig.c in Sources */, - F96D458908F272BC004A47F5 /* tclDate.c in Sources */, - F96D458B08F272BC004A47F5 /* tclDictObj.c in Sources */, - F96D458C08F272BC004A47F5 /* tclEncoding.c in Sources */, - F96D458D08F272BC004A47F5 /* tclEnv.c in Sources */, - F96D458E08F272BC004A47F5 /* tclEvent.c in Sources */, - F96D458F08F272BC004A47F5 /* tclExecute.c in Sources */, - F96D459008F272BC004A47F5 /* tclFCmd.c in Sources */, - F96D459108F272BC004A47F5 /* tclFileName.c in Sources */, - F96D459308F272BC004A47F5 /* tclGet.c in Sources */, - F96D459508F272BC004A47F5 /* tclHash.c in Sources */, - F96D459608F272BC004A47F5 /* tclHistory.c in Sources */, - F96D459708F272BC004A47F5 /* tclIndexObj.c in Sources */, - F96D459B08F272BC004A47F5 /* tclInterp.c in Sources */, - F96D459D08F272BC004A47F5 /* tclIO.c in Sources */, - F96D459F08F272BC004A47F5 /* tclIOCmd.c in Sources */, - F96D45A008F272BC004A47F5 /* tclIOGT.c in Sources */, - F96D45A108F272BC004A47F5 /* tclIORChan.c in Sources */, - F95D77EA0DFD820D00A8BF6F /* tclIORTrans.c in Sources */, - F96D45A208F272BC004A47F5 /* tclIOSock.c in Sources */, - F96D45A308F272BC004A47F5 /* tclIOUtil.c in Sources */, - F96D45A408F272BC004A47F5 /* tclLink.c in Sources */, - F96D45A508F272BC004A47F5 /* tclListObj.c in Sources */, - F96D45A608F272BC004A47F5 /* tclLiteral.c in Sources */, - F96D45A708F272BC004A47F5 /* tclLoad.c in Sources */, - F96D45A908F272BC004A47F5 /* tclMain.c in Sources */, - F96D45AA08F272BC004A47F5 /* tclNamesp.c in Sources */, - F96D45AB08F272BC004A47F5 /* tclNotify.c in Sources */, - F96D45AC08F272BC004A47F5 /* tclObj.c in Sources */, - F93599B30DF1F75400E04F67 /* tclOO.c in Sources */, - F93599B70DF1F76100E04F67 /* tclOOBasic.c in Sources */, - F93599B90DF1F76600E04F67 /* tclOOCall.c in Sources */, - F93599BC0DF1F77000E04F67 /* tclOODefineCmds.c in Sources */, - F93599BE0DF1F77400E04F67 /* tclOOInfo.c in Sources */, - F93599C20DF1F78300E04F67 /* tclOOMethod.c in Sources */, - F93599C40DF1F78800E04F67 /* tclOOStubInit.c in Sources */, - F93599C60DF1F78D00E04F67 /* tclOOStubLib.c in Sources */, - F96D45AD08F272BC004A47F5 /* tclPanic.c in Sources */, - F96D45AE08F272BC004A47F5 /* tclParse.c in Sources */, - F96D45B008F272BC004A47F5 /* tclPathObj.c in Sources */, - F96D45B108F272BC004A47F5 /* tclPipe.c in Sources */, - F96D45B208F272BC004A47F5 /* tclPkg.c in Sources */, - F96D45B308F272BC004A47F5 /* tclPkgConfig.c in Sources */, - F96D45B608F272BC004A47F5 /* tclPosixStr.c in Sources */, - F96D45B708F272BC004A47F5 /* tclPreserve.c in Sources */, - F96D45B808F272BC004A47F5 /* tclProc.c in Sources */, - F96D45B908F272BC004A47F5 /* tclRegexp.c in Sources */, - F96D45BB08F272BC004A47F5 /* tclResolve.c in Sources */, - F96D45BC08F272BC004A47F5 /* tclResult.c in Sources */, - F96D45BD08F272BC004A47F5 /* tclScan.c in Sources */, - F96D45BE08F272BC004A47F5 /* tclStringObj.c in Sources */, - F96D45C308F272BC004A47F5 /* tclStrToD.c in Sources */, - F96D45C408F272BC004A47F5 /* tclStubInit.c in Sources */, - F96D45C508F272BC004A47F5 /* tclStubLib.c in Sources */, - F96D45C908F272BC004A47F5 /* tclThread.c in Sources */, - F96D45CA08F272BC004A47F5 /* tclThreadAlloc.c in Sources */, - F96D45CB08F272BC004A47F5 /* tclThreadJoin.c in Sources */, - F96D45CC08F272BC004A47F5 /* tclThreadStorage.c in Sources */, - F96D45CE08F272BC004A47F5 /* tclTimer.c in Sources */, - F96D45D008F272BC004A47F5 /* tclTomMathInterface.c in Sources */, - F96D45D108F272BC004A47F5 /* tclTrace.c in Sources */, - F96D45D308F272BC004A47F5 /* tclUtf.c in Sources */, - F96D45D408F272BC004A47F5 /* tclUtil.c in Sources */, - F96D45D508F272BC004A47F5 /* tclVar.c in Sources */, - F96437CA0EF0D4B2003F468E /* tclZlib.c in Sources */, - F96D48E208F272C3004A47F5 /* bn_fast_s_mp_mul_digs.c in Sources */, - F96D48E408F272C3004A47F5 /* bn_fast_s_mp_sqr.c in Sources */, - F96D48E708F272C3004A47F5 /* bn_mp_add.c in Sources */, - F96D48E808F272C3004A47F5 /* bn_mp_add_d.c in Sources */, - F9E61D2B090A48A4002B3151 /* bn_mp_and.c in Sources */, - F96D48EB08F272C3004A47F5 /* bn_mp_clamp.c in Sources */, - F96D48EC08F272C3004A47F5 /* bn_mp_clear.c in Sources */, - F96D48ED08F272C3004A47F5 /* bn_mp_clear_multi.c in Sources */, - F96D48EE08F272C3004A47F5 /* bn_mp_cmp.c in Sources */, - F9E61D28090A481F002B3151 /* bn_mp_cmp_d.c in Sources */, - F96D48F008F272C3004A47F5 /* bn_mp_cmp_mag.c in Sources */, - F96D48F208F272C3004A47F5 /* bn_mp_copy.c in Sources */, - F96D48F308F272C3004A47F5 /* bn_mp_count_bits.c in Sources */, - F96D48F408F272C3004A47F5 /* bn_mp_div.c in Sources */, - F96D48F508F272C3004A47F5 /* bn_mp_div_2.c in Sources */, - F96D48F608F272C3004A47F5 /* bn_mp_div_2d.c in Sources */, - F96D48F708F272C3004A47F5 /* bn_mp_div_3.c in Sources */, - F96D48F808F272C3004A47F5 /* bn_mp_div_d.c in Sources */, - F96D48FC08F272C3004A47F5 /* bn_mp_exch.c in Sources */, - F9E61D2C090A48AC002B3151 /* bn_mp_expt_d.c in Sources */, - F96D490508F272C3004A47F5 /* bn_mp_grow.c in Sources */, - F96D490608F272C3004A47F5 /* bn_mp_init.c in Sources */, - F96D490708F272C3004A47F5 /* bn_mp_init_copy.c in Sources */, - F96D490808F272C3004A47F5 /* bn_mp_init_multi.c in Sources */, - F96D490908F272C3004A47F5 /* bn_mp_init_set.c in Sources */, - F96D490B08F272C3004A47F5 /* bn_mp_init_size.c in Sources */, - F96D491008F272C3004A47F5 /* bn_mp_karatsuba_mul.c in Sources */, - F96D491108F272C3004A47F5 /* bn_mp_karatsuba_sqr.c in Sources */, - F96D491308F272C3004A47F5 /* bn_mp_lshd.c in Sources */, - F96D491408F272C3004A47F5 /* bn_mp_mod.c in Sources */, - F96D491508F272C3004A47F5 /* bn_mp_mod_2d.c in Sources */, - F96D491A08F272C3004A47F5 /* bn_mp_mul.c in Sources */, - F96D491B08F272C3004A47F5 /* bn_mp_mul_2.c in Sources */, - F96D491C08F272C3004A47F5 /* bn_mp_mul_2d.c in Sources */, - F96D491D08F272C3004A47F5 /* bn_mp_mul_d.c in Sources */, - F9E61D29090A486C002B3151 /* bn_mp_neg.c in Sources */, - F9E61D2E090A48BF002B3151 /* bn_mp_or.c in Sources */, - F96D492908F272C3004A47F5 /* bn_mp_radix_size.c in Sources */, - F96D492A08F272C3004A47F5 /* bn_mp_radix_smap.c in Sources */, - F96D492C08F272C3004A47F5 /* bn_mp_read_radix.c in Sources */, - F96D493708F272C3004A47F5 /* bn_mp_rshd.c in Sources */, - F96D493808F272C3004A47F5 /* bn_mp_set.c in Sources */, - F9E61D2F090A48C7002B3151 /* bn_mp_shrink.c in Sources */, - F96D493C08F272C3004A47F5 /* bn_mp_sqr.c in Sources */, - F9E61D2A090A4891002B3151 /* bn_mp_sqrt.c in Sources */, - F96D493F08F272C3004A47F5 /* bn_mp_sub.c in Sources */, - F96D494008F272C3004A47F5 /* bn_mp_sub_d.c in Sources */, - F9E61D30090A48E2002B3151 /* bn_mp_to_unsigned_bin_n.c in Sources */, - F9E61D31090A48F9002B3151 /* bn_mp_to_unsigned_bin.c in Sources */, - F96D494608F272C3004A47F5 /* bn_mp_toom_mul.c in Sources */, - F96D494708F272C3004A47F5 /* bn_mp_toom_sqr.c in Sources */, - F96D494908F272C3004A47F5 /* bn_mp_toradix_n.c in Sources */, - F9E61D32090A48FA002B3151 /* bn_mp_unsigned_bin_size.c in Sources */, - F9E61D2D090A48BB002B3151 /* bn_mp_xor.c in Sources */, - F96D494C08F272C3004A47F5 /* bn_mp_zero.c in Sources */, - F96D494E08F272C3004A47F5 /* bn_reverse.c in Sources */, - F96D494F08F272C3004A47F5 /* bn_s_mp_add.c in Sources */, - F96D495108F272C3004A47F5 /* bn_s_mp_mul_digs.c in Sources */, - F96D495308F272C3004A47F5 /* bn_s_mp_sqr.c in Sources */, - F96D495408F272C3004A47F5 /* bn_s_mp_sub.c in Sources */, - F96D495508F272C3004A47F5 /* bncore.c in Sources */, - F96D49A908F272C4004A47F5 /* tclMacOSXBundle.c in Sources */, - F96D49AD08F272C4004A47F5 /* tclMacOSXFCmd.c in Sources */, - F96D49AE08F272C4004A47F5 /* tclMacOSXNotify.c in Sources */, - F96D4AC608F272C9004A47F5 /* tclLoadDyld.c in Sources */, - F96D4ACA08F272C9004A47F5 /* tclUnixChan.c in Sources */, - F9FC77B80AB29E9100B7077D /* tclUnixCompat.c in Sources */, - F96D4ACB08F272C9004A47F5 /* tclUnixEvent.c in Sources */, - F96D4ACC08F272C9004A47F5 /* tclUnixFCmd.c in Sources */, - F96D4ACD08F272C9004A47F5 /* tclUnixFile.c in Sources */, - F96D4ACE08F272C9004A47F5 /* tclUnixInit.c in Sources */, - F96D4ACF08F272C9004A47F5 /* tclUnixNotfy.c in Sources */, - F96D4AD008F272C9004A47F5 /* tclUnixPipe.c in Sources */, - F96D4AD208F272CA004A47F5 /* tclUnixSock.c in Sources */, - F96D4AD408F272CA004A47F5 /* tclUnixThrd.c in Sources */, - F96D4AD608F272CA004A47F5 /* tclUnixTime.c in Sources */, - F9F4415E0C8BAE6F00BCCD67 /* tclDTrace.d in Sources */, - F966BDCF08F27A3F005CB29B /* tk3d.c in Sources */, - F966BDD108F27A3F005CB29B /* tkArgv.c in Sources */, - F966BDD208F27A3F005CB29B /* tkAtom.c in Sources */, - F966BDD308F27A3F005CB29B /* tkBind.c in Sources */, - F966BDD408F27A3F005CB29B /* tkBitmap.c in Sources */, - F9152B090EAF8A5000CD5C7B /* tkBusy.c in Sources */, - F966BDD508F27A3F005CB29B /* tkButton.c in Sources */, - F966BDD708F27A3F005CB29B /* tkCanvArc.c in Sources */, - F966BDD808F27A3F005CB29B /* tkCanvas.c in Sources */, - F966BDDA08F27A3F005CB29B /* tkCanvBmap.c in Sources */, - F966BDDB08F27A3F005CB29B /* tkCanvImg.c in Sources */, - F966BDDC08F27A3F005CB29B /* tkCanvLine.c in Sources */, - F966BDDD08F27A3F005CB29B /* tkCanvPoly.c in Sources */, - F966BDDE08F27A3F005CB29B /* tkCanvPs.c in Sources */, - F966BDE008F27A3F005CB29B /* tkCanvText.c in Sources */, - F966BDE108F27A3F005CB29B /* tkCanvUtil.c in Sources */, - F966BDE208F27A3F005CB29B /* tkCanvWind.c in Sources */, - F966BDE308F27A3F005CB29B /* tkClipboard.c in Sources */, - F966BDE408F27A3F005CB29B /* tkCmds.c in Sources */, - F966BDE508F27A3F005CB29B /* tkColor.c in Sources */, - F966BDE708F27A3F005CB29B /* tkConfig.c in Sources */, - F966BDE808F27A3F005CB29B /* tkConsole.c in Sources */, - F966BDE908F27A3F005CB29B /* tkCursor.c in Sources */, - F966BDEB08F27A3F005CB29B /* tkEntry.c in Sources */, - F966BDED08F27A3F005CB29B /* tkError.c in Sources */, - F966BDEE08F27A3F005CB29B /* tkEvent.c in Sources */, - F966BDEF08F27A3F005CB29B /* tkFileFilter.c in Sources */, - F966BDF108F27A3F005CB29B /* tkFocus.c in Sources */, - F966BDF208F27A3F005CB29B /* tkFont.c in Sources */, - F966BDF408F27A3F005CB29B /* tkFrame.c in Sources */, - F966BDF508F27A3F005CB29B /* tkGC.c in Sources */, - F966BDF608F27A3F005CB29B /* tkGeometry.c in Sources */, - F966BDF708F27A3F005CB29B /* tkGet.c in Sources */, - F966BDF808F27A3F005CB29B /* tkGrab.c in Sources */, - F966BDF908F27A3F005CB29B /* tkGrid.c in Sources */, - F966BDFA08F27A3F005CB29B /* tkImage.c in Sources */, - F966BDFB08F27A3F005CB29B /* tkImgBmap.c in Sources */, - F966BDFC08F27A3F005CB29B /* tkImgGIF.c in Sources */, - F92EE8BF0E62F846001A6E80 /* tkImgPhInstance.c in Sources */, - F966BDFD08F27A3F005CB29B /* tkImgPhoto.c in Sources */, - F9DD99BD0F07DF850018B2E4 /* tkImgPNG.c in Sources */, - F966BDFE08F27A3F005CB29B /* tkImgPPM.c in Sources */, - F966BE0708F27A3F005CB29B /* tkListbox.c in Sources */, - F966BE0808F27A3F005CB29B /* tkMacWinMenu.c in Sources */, - F966BE0908F27A3F005CB29B /* tkMain.c in Sources */, - F966BE0A08F27A3F005CB29B /* tkMenu.c in Sources */, - F966BE0C08F27A3F005CB29B /* tkMenubutton.c in Sources */, - F966BE0E08F27A3F005CB29B /* tkMenuDraw.c in Sources */, - F966BE0F08F27A3F005CB29B /* tkMessage.c in Sources */, - F966BE1008F27A3F005CB29B /* tkObj.c in Sources */, - F966BE1108F27A3F005CB29B /* tkOldConfig.c in Sources */, - F966BE1208F27A3F005CB29B /* tkOption.c in Sources */, - F966BE1308F27A3F005CB29B /* tkPack.c in Sources */, - F966BE1408F27A3F005CB29B /* tkPanedWindow.c in Sources */, - F966BE1508F27A3F005CB29B /* tkPlace.c in Sources */, - F966BE1708F27A3F005CB29B /* tkPointer.c in Sources */, - F966BE1908F27A3F005CB29B /* tkRectOval.c in Sources */, - F966BE1A08F27A3F005CB29B /* tkScale.c in Sources */, - F966BE1C08F27A40005CB29B /* tkScrollbar.c in Sources */, - F966BE1E08F27A40005CB29B /* tkSelect.c in Sources */, - F966BE2008F27A40005CB29B /* tkSquare.c in Sources */, - F966BE2208F27A40005CB29B /* tkStubInit.c in Sources */, - F966BE2308F27A40005CB29B /* tkStubLib.c in Sources */, - F966BE2408F27A40005CB29B /* tkStyle.c in Sources */, - F966BE2508F27A40005CB29B /* tkTest.c in Sources */, - F966BE2608F27A40005CB29B /* tkText.c in Sources */, - F966BE2808F27A40005CB29B /* tkTextBTree.c in Sources */, - F966BE2908F27A40005CB29B /* tkTextDisp.c in Sources */, - F966BE2B08F27A40005CB29B /* tkTextImage.c in Sources */, - F966BE2C08F27A40005CB29B /* tkTextIndex.c in Sources */, - F966BE2D08F27A40005CB29B /* tkTextMark.c in Sources */, - F966BE2E08F27A40005CB29B /* tkTextTag.c in Sources */, - F966BE2F08F27A40005CB29B /* tkTextWind.c in Sources */, - F966BE3008F27A40005CB29B /* tkTrig.c in Sources */, - F966BE3108F27A40005CB29B /* tkUndo.c in Sources */, - F966BE3308F27A40005CB29B /* tkUtil.c in Sources */, - F966BE3408F27A40005CB29B /* tkVisual.c in Sources */, - F966BE3508F27A40005CB29B /* tkWindow.c in Sources */, - F96888050AF786D5000797B5 /* ttkBlink.c in Sources */, - F96888060AF786D5000797B5 /* ttkButton.c in Sources */, - F96888070AF786D5000797B5 /* ttkCache.c in Sources */, - F96888080AF786D5000797B5 /* ttkClamTheme.c in Sources */, - F96888090AF786D5000797B5 /* ttkClassicTheme.c in Sources */, - F968880A0AF786D5000797B5 /* ttkDefaultTheme.c in Sources */, - F968880B0AF786D5000797B5 /* ttkElements.c in Sources */, - F968880C0AF786D5000797B5 /* ttkEntry.c in Sources */, - F968880D0AF786D5000797B5 /* ttkFrame.c in Sources */, - F968880E0AF786D5000797B5 /* ttkImage.c in Sources */, - F968880F0AF786D5000797B5 /* ttkInit.c in Sources */, - F96888100AF786D5000797B5 /* ttkLabel.c in Sources */, - F96888110AF786D5000797B5 /* ttkLayout.c in Sources */, - F96888120AF786D5000797B5 /* ttkManager.c in Sources */, - F96888130AF786D5000797B5 /* ttkNotebook.c in Sources */, - F96888140AF786D5000797B5 /* ttkPanedwindow.c in Sources */, - F96888150AF786D5000797B5 /* ttkProgress.c in Sources */, - F96888160AF786D5000797B5 /* ttkScale.c in Sources */, - F96888170AF786D5000797B5 /* ttkScroll.c in Sources */, - F96888180AF786D5000797B5 /* ttkScrollbar.c in Sources */, - F96888190AF786D5000797B5 /* ttkSeparator.c in Sources */, - F968881A0AF786D5000797B5 /* ttkSquare.c in Sources */, - F968881B0AF786D5000797B5 /* ttkState.c in Sources */, - F968881C0AF786D5000797B5 /* ttkStubInit.c in Sources */, - F968881D0AF786D5000797B5 /* ttkStubLib.c in Sources */, - F968881E0AF786D5000797B5 /* ttkTagSet.c in Sources */, - F968881F0AF786D5000797B5 /* ttkTheme.c in Sources */, - F96888200AF786D5000797B5 /* ttkTrace.c in Sources */, - F96888210AF786D5000797B5 /* ttkTrack.c in Sources */, - F96888220AF786D5000797B5 /* ttkTreeview.c in Sources */, - F96888230AF786D5000797B5 /* ttkWidget.c in Sources */, - F966BEDB08F27A40005CB29B /* tkMacOSXBitmap.c in Sources */, - F966BEDC08F27A40005CB29B /* tkMacOSXButton.c in Sources */, - F966BEDE08F27A40005CB29B /* tkMacOSXClipboard.c in Sources */, - F966BEDF08F27A40005CB29B /* tkMacOSXColor.c in Sources */, - F966BEE008F27A40005CB29B /* tkMacOSXConfig.c in Sources */, - F966BEE108F27A40005CB29B /* tkMacOSXCursor.c in Sources */, - F966BEE308F27A40005CB29B /* tkMacOSXDebug.c in Sources */, - F966BEE608F27A40005CB29B /* tkMacOSXDialog.c in Sources */, - F966BEE708F27A40005CB29B /* tkMacOSXDraw.c in Sources */, - F966BEE808F27A40005CB29B /* tkMacOSXEmbed.c in Sources */, - F966BEE908F27A40005CB29B /* tkMacOSXEntry.c in Sources */, - F966BEEA08F27A40005CB29B /* tkMacOSXEvent.c in Sources */, - F966BEEC08F27A40005CB29B /* tkMacOSXFont.c in Sources */, - F966BEED08F27A40005CB29B /* tkMacOSXHLEvents.c in Sources */, - F966BEEE08F27A40005CB29B /* tkMacOSXInit.c in Sources */, - F966BEF108F27A40005CB29B /* tkMacOSXKeyboard.c in Sources */, - F966BEF208F27A40005CB29B /* tkMacOSXKeyEvent.c in Sources */, - F966BEF308F27A40005CB29B /* tkMacOSXMenu.c in Sources */, - F966BEF608F27A40005CB29B /* tkMacOSXMenubutton.c in Sources */, - F966BEF708F27A40005CB29B /* tkMacOSXMenus.c in Sources */, - F966BEF808F27A40005CB29B /* tkMacOSXMouseEvent.c in Sources */, - F966BEF908F27A40005CB29B /* tkMacOSXNotify.c in Sources */, - F966BF0108F27A40005CB29B /* tkMacOSXRegion.c in Sources */, - F966BF0308F27A40005CB29B /* tkMacOSXScrlbr.c in Sources */, - F966BF0408F27A40005CB29B /* tkMacOSXSend.c in Sources */, - F966BF0508F27A40005CB29B /* tkMacOSXSubwindows.c in Sources */, - F966BF0608F27A40005CB29B /* tkMacOSXTest.c in Sources */, - F966BF0708F27A40005CB29B /* tkMacOSXWindowEvent.c in Sources */, - F966BF0808F27A40005CB29B /* tkMacOSXWm.c in Sources */, - F966BF0B08F27A40005CB29B /* tkMacOSXXStubs.c in Sources */, - F96888850AF78938000797B5 /* ttkMacOSXTheme.c in Sources */, - F966BF7F08F27A41005CB29B /* tkAppInit.c in Sources */, - F966BF8308F27A41005CB29B /* tkUnix3d.c in Sources */, - F966BF9608F27A41005CB29B /* tkUnixScale.c in Sources */, - F966C02A08F27A42005CB29B /* xcolors.c in Sources */, - F966C02B08F27A42005CB29B /* xdraw.c in Sources */, - F966C02C08F27A42005CB29B /* xgc.c in Sources */, - F966C02D08F27A42005CB29B /* ximage.c in Sources */, - F966C02E08F27A42005CB29B /* xutil.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F9FD30BB0CC1AD070073837D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F9FD30BC0CC1AD070073837D /* regcomp.c in Sources */, - F9FD30BD0CC1AD070073837D /* regerror.c in Sources */, - F9FD30BE0CC1AD070073837D /* regexec.c in Sources */, - F9FD30BF0CC1AD070073837D /* regfree.c in Sources */, - F9FD30C00CC1AD070073837D /* tclAlloc.c in Sources */, - F9FD30C10CC1AD070073837D /* tclAsync.c in Sources */, - F9FD30C20CC1AD070073837D /* tclBasic.c in Sources */, - F9FD30C30CC1AD070073837D /* tclBinary.c in Sources */, - F9FD30C40CC1AD070073837D /* tclCkalloc.c in Sources */, - F9FD30C50CC1AD070073837D /* tclClock.c in Sources */, - F9FD30C60CC1AD070073837D /* tclCmdAH.c in Sources */, - F9FD30C70CC1AD070073837D /* tclCmdIL.c in Sources */, - F9FD30C80CC1AD070073837D /* tclCmdMZ.c in Sources */, - F9FD30C90CC1AD070073837D /* tclCompCmds.c in Sources */, - F9FD30CA0CC1AD070073837D /* tclCompExpr.c in Sources */, - F9FD30CB0CC1AD070073837D /* tclCompile.c in Sources */, - F9FD30CC0CC1AD070073837D /* tclConfig.c in Sources */, - F9FD30CD0CC1AD070073837D /* tclDate.c in Sources */, - F9FD30CE0CC1AD070073837D /* tclDictObj.c in Sources */, - F9FD30CF0CC1AD070073837D /* tclEncoding.c in Sources */, - F9FD30D00CC1AD070073837D /* tclEnv.c in Sources */, - F9FD30D10CC1AD070073837D /* tclEvent.c in Sources */, - F9FD30D20CC1AD070073837D /* tclExecute.c in Sources */, - F9FD30D30CC1AD070073837D /* tclFCmd.c in Sources */, - F9FD30D40CC1AD070073837D /* tclFileName.c in Sources */, - F9FD30D50CC1AD070073837D /* tclGet.c in Sources */, - F9FD30D60CC1AD070073837D /* tclHash.c in Sources */, - F9FD30D70CC1AD070073837D /* tclHistory.c in Sources */, - F9FD30D80CC1AD070073837D /* tclIndexObj.c in Sources */, - F9FD30D90CC1AD070073837D /* tclInterp.c in Sources */, - F9FD30DA0CC1AD070073837D /* tclIO.c in Sources */, - F9FD30DB0CC1AD070073837D /* tclIOCmd.c in Sources */, - F9FD30DC0CC1AD070073837D /* tclIOGT.c in Sources */, - F9FD30DD0CC1AD070073837D /* tclIORChan.c in Sources */, - F9FFAF1D0DFDDB26007F8A6A /* tclIORTrans.c in Sources */, - F9FD30DE0CC1AD070073837D /* tclIOSock.c in Sources */, - F9FD30DF0CC1AD070073837D /* tclIOUtil.c in Sources */, - F9FD30E00CC1AD070073837D /* tclLink.c in Sources */, - F9FD30E10CC1AD070073837D /* tclListObj.c in Sources */, - F9FD30E20CC1AD070073837D /* tclLiteral.c in Sources */, - F9FD30E30CC1AD070073837D /* tclLoad.c in Sources */, - F9FD30E40CC1AD070073837D /* tclMain.c in Sources */, - F9FD30E50CC1AD070073837D /* tclNamesp.c in Sources */, - F9FD30E60CC1AD070073837D /* tclNotify.c in Sources */, - F9FD30E70CC1AD070073837D /* tclObj.c in Sources */, - F9FFAF1F0DFDDB2F007F8A6A /* tclOO.c in Sources */, - F9FFAF200DFDDB32007F8A6A /* tclOOBasic.c in Sources */, - F9FFAF210DFDDB32007F8A6A /* tclOOCall.c in Sources */, - F9FFAF220DFDDB34007F8A6A /* tclOODefineCmds.c in Sources */, - F9FFAF230DFDDB35007F8A6A /* tclOOInfo.c in Sources */, - F9FFAF240DFDDB36007F8A6A /* tclOOMethod.c in Sources */, - F9FFAF250DFDDB37007F8A6A /* tclOOStubInit.c in Sources */, - F9FFAF260DFDDB38007F8A6A /* tclOOStubLib.c in Sources */, - F9FD30E80CC1AD070073837D /* tclPanic.c in Sources */, - F9FD30E90CC1AD070073837D /* tclParse.c in Sources */, - F9FD30EA0CC1AD070073837D /* tclPathObj.c in Sources */, - F9FD30EB0CC1AD070073837D /* tclPipe.c in Sources */, - F9FD30EC0CC1AD070073837D /* tclPkg.c in Sources */, - F9FD30ED0CC1AD070073837D /* tclPkgConfig.c in Sources */, - F9FD30EE0CC1AD070073837D /* tclPosixStr.c in Sources */, - F9FD30EF0CC1AD070073837D /* tclPreserve.c in Sources */, - F9FD30F00CC1AD070073837D /* tclProc.c in Sources */, - F9FD30F10CC1AD070073837D /* tclRegexp.c in Sources */, - F9FD30F20CC1AD070073837D /* tclResolve.c in Sources */, - F9FD30F30CC1AD070073837D /* tclResult.c in Sources */, - F9FD30F40CC1AD070073837D /* tclScan.c in Sources */, - F9FD30F50CC1AD070073837D /* tclStringObj.c in Sources */, - F9FD30F60CC1AD070073837D /* tclStrToD.c in Sources */, - F9FD30F70CC1AD070073837D /* tclStubInit.c in Sources */, - F9FD30F80CC1AD070073837D /* tclStubLib.c in Sources */, - F9FD30F90CC1AD070073837D /* tclThread.c in Sources */, - F9FD30FA0CC1AD070073837D /* tclThreadAlloc.c in Sources */, - F9FD30FB0CC1AD070073837D /* tclThreadJoin.c in Sources */, - F9FD30FC0CC1AD070073837D /* tclThreadStorage.c in Sources */, - F9FD30FD0CC1AD070073837D /* tclTimer.c in Sources */, - F9FD30FE0CC1AD070073837D /* tclTomMathInterface.c in Sources */, - F9FD30FF0CC1AD070073837D /* tclTrace.c in Sources */, - F9FD31000CC1AD070073837D /* tclUtf.c in Sources */, - F9FD31010CC1AD070073837D /* tclUtil.c in Sources */, - F9FD31020CC1AD070073837D /* tclVar.c in Sources */, - F96437CB0EF0D4B2003F468E /* tclZlib.c in Sources */, - F9FD31030CC1AD070073837D /* bn_fast_s_mp_mul_digs.c in Sources */, - F9FD31040CC1AD070073837D /* bn_fast_s_mp_sqr.c in Sources */, - F9FD31050CC1AD070073837D /* bn_mp_add.c in Sources */, - F9FD31060CC1AD070073837D /* bn_mp_add_d.c in Sources */, - F9FD31070CC1AD070073837D /* bn_mp_and.c in Sources */, - F9FD31080CC1AD070073837D /* bn_mp_clamp.c in Sources */, - F9FD31090CC1AD070073837D /* bn_mp_clear.c in Sources */, - F9FD310A0CC1AD070073837D /* bn_mp_clear_multi.c in Sources */, - F9FD310B0CC1AD070073837D /* bn_mp_cmp.c in Sources */, - F9FD310C0CC1AD070073837D /* bn_mp_cmp_d.c in Sources */, - F9FD310D0CC1AD070073837D /* bn_mp_cmp_mag.c in Sources */, - F9FD310E0CC1AD070073837D /* bn_mp_copy.c in Sources */, - F9FD310F0CC1AD070073837D /* bn_mp_count_bits.c in Sources */, - F9FD31100CC1AD070073837D /* bn_mp_div.c in Sources */, - F9FD31110CC1AD070073837D /* bn_mp_div_2.c in Sources */, - F9FD31120CC1AD070073837D /* bn_mp_div_2d.c in Sources */, - F9FD31130CC1AD070073837D /* bn_mp_div_3.c in Sources */, - F9FD31140CC1AD070073837D /* bn_mp_div_d.c in Sources */, - F9FD31150CC1AD070073837D /* bn_mp_exch.c in Sources */, - F9FD31160CC1AD070073837D /* bn_mp_expt_d.c in Sources */, - F9FD31170CC1AD070073837D /* bn_mp_grow.c in Sources */, - F9FD31180CC1AD070073837D /* bn_mp_init.c in Sources */, - F9FD31190CC1AD070073837D /* bn_mp_init_copy.c in Sources */, - F9FD311A0CC1AD070073837D /* bn_mp_init_multi.c in Sources */, - F9FD311B0CC1AD070073837D /* bn_mp_init_set.c in Sources */, - F9FD311C0CC1AD070073837D /* bn_mp_init_size.c in Sources */, - F9FD311D0CC1AD070073837D /* bn_mp_karatsuba_mul.c in Sources */, - F9FD311E0CC1AD070073837D /* bn_mp_karatsuba_sqr.c in Sources */, - F9FD311F0CC1AD070073837D /* bn_mp_lshd.c in Sources */, - F9FD31200CC1AD070073837D /* bn_mp_mod.c in Sources */, - F9FD31210CC1AD070073837D /* bn_mp_mod_2d.c in Sources */, - F9FD31220CC1AD070073837D /* bn_mp_mul.c in Sources */, - F9FD31230CC1AD070073837D /* bn_mp_mul_2.c in Sources */, - F9FD31240CC1AD070073837D /* bn_mp_mul_2d.c in Sources */, - F9FD31250CC1AD070073837D /* bn_mp_mul_d.c in Sources */, - F9FD31260CC1AD070073837D /* bn_mp_neg.c in Sources */, - F9FD31270CC1AD070073837D /* bn_mp_or.c in Sources */, - F9FD31280CC1AD070073837D /* bn_mp_radix_size.c in Sources */, - F9FD31290CC1AD070073837D /* bn_mp_radix_smap.c in Sources */, - F9FD312A0CC1AD070073837D /* bn_mp_read_radix.c in Sources */, - F9FD312B0CC1AD070073837D /* bn_mp_rshd.c in Sources */, - F9FD312C0CC1AD070073837D /* bn_mp_set.c in Sources */, - F9FD312D0CC1AD070073837D /* bn_mp_shrink.c in Sources */, - F9FD312E0CC1AD070073837D /* bn_mp_sqr.c in Sources */, - F9FD312F0CC1AD070073837D /* bn_mp_sqrt.c in Sources */, - F9FD31300CC1AD070073837D /* bn_mp_sub.c in Sources */, - F9FD31310CC1AD070073837D /* bn_mp_sub_d.c in Sources */, - F9FD31320CC1AD070073837D /* bn_mp_to_unsigned_bin_n.c in Sources */, - F9FD31330CC1AD070073837D /* bn_mp_to_unsigned_bin.c in Sources */, - F9FD31340CC1AD070073837D /* bn_mp_toom_mul.c in Sources */, - F9FD31350CC1AD070073837D /* bn_mp_toom_sqr.c in Sources */, - F9FD31360CC1AD070073837D /* bn_mp_toradix_n.c in Sources */, - F9FD31370CC1AD070073837D /* bn_mp_unsigned_bin_size.c in Sources */, - F9FD31380CC1AD070073837D /* bn_mp_xor.c in Sources */, - F9FD31390CC1AD070073837D /* bn_mp_zero.c in Sources */, - F9FD313A0CC1AD070073837D /* bn_reverse.c in Sources */, - F9FD313B0CC1AD070073837D /* bn_s_mp_add.c in Sources */, - F9FD313C0CC1AD070073837D /* bn_s_mp_mul_digs.c in Sources */, - F9FD313D0CC1AD070073837D /* bn_s_mp_sqr.c in Sources */, - F9FD313E0CC1AD070073837D /* bn_s_mp_sub.c in Sources */, - F9FD313F0CC1AD070073837D /* bncore.c in Sources */, - F9FD31400CC1AD070073837D /* tclMacOSXBundle.c in Sources */, - F9FD31410CC1AD070073837D /* tclMacOSXFCmd.c in Sources */, - F9FD31420CC1AD070073837D /* tclMacOSXNotify.c in Sources */, - F9FD31430CC1AD070073837D /* tclLoadDyld.c in Sources */, - F9FD31440CC1AD070073837D /* tclUnixChan.c in Sources */, - F9FD31450CC1AD070073837D /* tclUnixCompat.c in Sources */, - F9FD31460CC1AD070073837D /* tclUnixEvent.c in Sources */, - F9FD31470CC1AD070073837D /* tclUnixFCmd.c in Sources */, - F9FD31480CC1AD070073837D /* tclUnixFile.c in Sources */, - F9FD31490CC1AD070073837D /* tclUnixInit.c in Sources */, - F9FD314A0CC1AD070073837D /* tclUnixNotfy.c in Sources */, - F9FD314B0CC1AD070073837D /* tclUnixPipe.c in Sources */, - F9FD314C0CC1AD070073837D /* tclUnixSock.c in Sources */, - F9FD314D0CC1AD070073837D /* tclUnixThrd.c in Sources */, - F9FD314E0CC1AD070073837D /* tclUnixTime.c in Sources */, - F9FD31E20CC1AD070073837D /* tclDTrace.d in Sources */, - F9FD314F0CC1AD070073837D /* tk3d.c in Sources */, - F9FD31500CC1AD070073837D /* tkArgv.c in Sources */, - F9FD31510CC1AD070073837D /* tkAtom.c in Sources */, - F9FD31520CC1AD070073837D /* tkBind.c in Sources */, - F9FD31530CC1AD070073837D /* tkBitmap.c in Sources */, - F9152B0A0EAF8A5700CD5C7B /* tkBusy.c in Sources */, - F9FD31540CC1AD070073837D /* tkButton.c in Sources */, - F9FD31550CC1AD070073837D /* tkCanvArc.c in Sources */, - F9FD31560CC1AD070073837D /* tkCanvas.c in Sources */, - F9FD31570CC1AD070073837D /* tkCanvBmap.c in Sources */, - F9FD31580CC1AD070073837D /* tkCanvImg.c in Sources */, - F9FD31590CC1AD070073837D /* tkCanvLine.c in Sources */, - F9FD315A0CC1AD070073837D /* tkCanvPoly.c in Sources */, - F9FD315B0CC1AD070073837D /* tkCanvPs.c in Sources */, - F9FD315C0CC1AD070073837D /* tkCanvText.c in Sources */, - F9FD315D0CC1AD070073837D /* tkCanvUtil.c in Sources */, - F9FD315E0CC1AD070073837D /* tkCanvWind.c in Sources */, - F9FD315F0CC1AD070073837D /* tkClipboard.c in Sources */, - F9FD31600CC1AD070073837D /* tkCmds.c in Sources */, - F9FD31610CC1AD070073837D /* tkColor.c in Sources */, - F9FD31620CC1AD070073837D /* tkConfig.c in Sources */, - F9FD31630CC1AD070073837D /* tkConsole.c in Sources */, - F9FD31640CC1AD070073837D /* tkCursor.c in Sources */, - F9FD31650CC1AD070073837D /* tkEntry.c in Sources */, - F9FD31660CC1AD070073837D /* tkError.c in Sources */, - F9FD31670CC1AD070073837D /* tkEvent.c in Sources */, - F9FD31680CC1AD070073837D /* tkFileFilter.c in Sources */, - F9FD31690CC1AD070073837D /* tkFocus.c in Sources */, - F9FD316A0CC1AD070073837D /* tkFont.c in Sources */, - F9FD316B0CC1AD070073837D /* tkFrame.c in Sources */, - F9FD316C0CC1AD070073837D /* tkGC.c in Sources */, - F9FD316D0CC1AD070073837D /* tkGeometry.c in Sources */, - F9FD316E0CC1AD070073837D /* tkGet.c in Sources */, - F9FD316F0CC1AD070073837D /* tkGrab.c in Sources */, - F9FD31700CC1AD070073837D /* tkGrid.c in Sources */, - F9FD31710CC1AD070073837D /* tkImage.c in Sources */, - F9FD31720CC1AD070073837D /* tkImgBmap.c in Sources */, - F9FD31730CC1AD070073837D /* tkImgGIF.c in Sources */, - F92EE8D30E62F939001A6E80 /* tkImgPhInstance.c in Sources */, - F9FD31740CC1AD070073837D /* tkImgPhoto.c in Sources */, - F9DD99BE0F07DF850018B2E4 /* tkImgPNG.c in Sources */, - F9FD31750CC1AD070073837D /* tkImgPPM.c in Sources */, - F9FD31760CC1AD070073837D /* tkListbox.c in Sources */, - F9FD31770CC1AD070073837D /* tkMacWinMenu.c in Sources */, - F9FD31780CC1AD070073837D /* tkMain.c in Sources */, - F9FD31790CC1AD070073837D /* tkMenu.c in Sources */, - F9FD317A0CC1AD070073837D /* tkMenubutton.c in Sources */, - F9FD317B0CC1AD070073837D /* tkMenuDraw.c in Sources */, - F9FD317C0CC1AD070073837D /* tkMessage.c in Sources */, - F9FD317D0CC1AD070073837D /* tkObj.c in Sources */, - F9FD317E0CC1AD070073837D /* tkOldConfig.c in Sources */, - F9FD31800CC1AD070073837D /* tkOption.c in Sources */, - F9FD31810CC1AD070073837D /* tkPack.c in Sources */, - F9FD31820CC1AD070073837D /* tkPanedWindow.c in Sources */, - F9FD31830CC1AD070073837D /* tkPlace.c in Sources */, - F9FD31850CC1AD070073837D /* tkRectOval.c in Sources */, - F9FD31860CC1AD070073837D /* tkScale.c in Sources */, - F9FD31870CC1AD070073837D /* tkScrollbar.c in Sources */, - F9FD31880CC1AD070073837D /* tkSelect.c in Sources */, - F9FD31890CC1AD070073837D /* tkSquare.c in Sources */, - F9FD318A0CC1AD070073837D /* tkStubInit.c in Sources */, - F9FD318B0CC1AD070073837D /* tkStubLib.c in Sources */, - F9FD318C0CC1AD070073837D /* tkStyle.c in Sources */, - F9FD318D0CC1AD070073837D /* tkTest.c in Sources */, - F9FD318E0CC1AD070073837D /* tkText.c in Sources */, - F9FD318F0CC1AD070073837D /* tkTextBTree.c in Sources */, - F9FD31900CC1AD070073837D /* tkTextDisp.c in Sources */, - F9FD31910CC1AD070073837D /* tkTextImage.c in Sources */, - F9FD31920CC1AD070073837D /* tkTextIndex.c in Sources */, - F9FD31930CC1AD070073837D /* tkTextMark.c in Sources */, - F9FD31940CC1AD070073837D /* tkTextTag.c in Sources */, - F9FD31950CC1AD070073837D /* tkTextWind.c in Sources */, - F9FD31960CC1AD070073837D /* tkTrig.c in Sources */, - F9FD31970CC1AD070073837D /* tkUndo.c in Sources */, - F9FD31980CC1AD070073837D /* tkUtil.c in Sources */, - F9FD31990CC1AD070073837D /* tkVisual.c in Sources */, - F9FD319A0CC1AD070073837D /* tkWindow.c in Sources */, - F9FD319B0CC1AD070073837D /* ttkBlink.c in Sources */, - F9FD319C0CC1AD070073837D /* ttkButton.c in Sources */, - F9FD319D0CC1AD070073837D /* ttkCache.c in Sources */, - F9FD319E0CC1AD070073837D /* ttkClamTheme.c in Sources */, - F9FD319F0CC1AD070073837D /* ttkClassicTheme.c in Sources */, - F9FD31A00CC1AD070073837D /* ttkDefaultTheme.c in Sources */, - F9FD31A10CC1AD070073837D /* ttkElements.c in Sources */, - F9FD31A20CC1AD070073837D /* ttkEntry.c in Sources */, - F9FD31A30CC1AD070073837D /* ttkFrame.c in Sources */, - F9FD31A40CC1AD070073837D /* ttkImage.c in Sources */, - F9FD31A50CC1AD070073837D /* ttkInit.c in Sources */, - F9FD31A60CC1AD070073837D /* ttkLabel.c in Sources */, - F9FD31A70CC1AD070073837D /* ttkLayout.c in Sources */, - F9FD31A80CC1AD070073837D /* ttkManager.c in Sources */, - F9FD31A90CC1AD070073837D /* ttkNotebook.c in Sources */, - F9FD31AA0CC1AD070073837D /* ttkPanedwindow.c in Sources */, - F9FD31AB0CC1AD070073837D /* ttkProgress.c in Sources */, - F9FD31AC0CC1AD070073837D /* ttkScale.c in Sources */, - F9FD31AD0CC1AD070073837D /* ttkScroll.c in Sources */, - F9FD31AE0CC1AD070073837D /* ttkScrollbar.c in Sources */, - F9FD31AF0CC1AD070073837D /* ttkSeparator.c in Sources */, - F9FD31B00CC1AD070073837D /* ttkSquare.c in Sources */, - F9FD31B10CC1AD070073837D /* ttkState.c in Sources */, - F9FD31B20CC1AD070073837D /* ttkStubInit.c in Sources */, - F9FD31B30CC1AD070073837D /* ttkStubLib.c in Sources */, - F9FD31B40CC1AD070073837D /* ttkTagSet.c in Sources */, - F9FD31B50CC1AD070073837D /* ttkTheme.c in Sources */, - F9FD31B60CC1AD070073837D /* ttkTrace.c in Sources */, - F9FD31B70CC1AD070073837D /* ttkTrack.c in Sources */, - F9FD31B80CC1AD070073837D /* ttkTreeview.c in Sources */, - F9FD31B90CC1AD070073837D /* ttkWidget.c in Sources */, - F9FD31DA0CC1AD070073837D /* tkAppInit.c in Sources */, - F9FD32020CC1ADB70073837D /* tkUnix.c in Sources */, - F9FD31DB0CC1AD070073837D /* tkUnix3d.c in Sources */, - F9FD320A0CC1ADB70073837D /* tkUnixButton.c in Sources */, - F9FD32090CC1ADB70073837D /* tkUnixColor.c in Sources */, - F9FD32040CC1ADB70073837D /* tkUnixConfig.c in Sources */, - F9FD31F80CC1ADB70073837D /* tkUnixCursor.c in Sources */, - F9FD32050CC1ADB70073837D /* tkUnixDraw.c in Sources */, - F9FD31FD0CC1ADB70073837D /* tkUnixEmbed.c in Sources */, - F9FD32080CC1ADB70073837D /* tkUnixEvent.c in Sources */, - F9FD31FF0CC1ADB70073837D /* tkUnixFocus.c in Sources */, - F9FD31FC0CC1ADB70073837D /* tkUnixInit.c in Sources */, - F9FD31FA0CC1ADB70073837D /* tkUnixKey.c in Sources */, - F9FD32030CC1ADB70073837D /* tkUnixMenu.c in Sources */, - F9FD320B0CC1ADB70073837D /* tkUnixMenubu.c in Sources */, - F9FD32010CC1ADB70073837D /* tkUnixRFont.c in Sources */, - F9FD31DC0CC1AD070073837D /* tkUnixScale.c in Sources */, - F9FD320C0CC1ADB70073837D /* tkUnixScrlbr.c in Sources */, - F9FD32070CC1ADB70073837D /* tkUnixSelect.c in Sources */, - F9FD31FE0CC1ADB70073837D /* tkUnixSend.c in Sources */, - F9FD32000CC1ADB70073837D /* tkUnixWm.c in Sources */, - F9FD31FB0CC1ADB70073837D /* tkUnixXId.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - F90E36D50F3B5C8400810A10 /* DebugNoGC */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tk-Debug.xcconfig */; - buildSettings = { - ARCHS = ( - "$(NATIVE_ARCH_64_BIT)", - "$(NATIVE_ARCH_32_BIT)", - ); - CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = unsupported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - }; - name = DebugNoGC; - }; - F90E36D60F3B5C8400810A10 /* DebugNoGC */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = DebugNoGC; - }; - F90E36D70F3B5C8400810A10 /* DebugNoGC */ = { - isa = XCBuildConfiguration; - buildSettings = { - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = DebugNoGC; - }; - F90E36D80F3B5C8400810A10 /* DebugNoGC */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_INPUT_FILETYPE = sourcecode.c.c; - GCC_PREPROCESSOR_DEFINITIONS = ( - "__private_extern__=extern", - "$(GCC_PREPROCESSOR_DEFINITIONS)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = DebugNoGC; - }; - F91BCC4F093152310042A6BF /* ReleaseUniversal */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = ReleaseUniversal; - }; - F91BCC50093152310042A6BF /* ReleaseUniversal */ = { - isa = XCBuildConfiguration; - buildSettings = { - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = ReleaseUniversal; - }; - F91BCC51093152310042A6BF /* ReleaseUniversal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tk-Release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CFLAGS = "-arch x86_64 -arch arm64 $(CFLAGS)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - MACOSX_DEPLOYMENT_TARGET = 10.6; - PREBINDING = NO; - }; - name = ReleaseUniversal; - }; - F93084370BB93D2800CD0B9E /* DebugMemCompile */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = DebugMemCompile; - }; - F93084380BB93D2800CD0B9E /* DebugMemCompile */ = { - isa = XCBuildConfiguration; - buildSettings = { - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = DebugMemCompile; - }; - F93084390BB93D2800CD0B9E /* DebugMemCompile */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_INPUT_FILETYPE = sourcecode.c.c; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = DebugMemCompile; - }; - F930843A0BB93D2800CD0B9E /* DebugMemCompile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tk-Debug.xcconfig */; - buildSettings = { - ARCHS = ( - "$(NATIVE_ARCH_64_BIT)", - "$(NATIVE_ARCH_32_BIT)", - ); - CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --enable-symbols=all"; - CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - }; - name = DebugMemCompile; - }; - F9359B250DF212DA00E04F67 /* DebugGCov */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tk-Debug.xcconfig */; - buildSettings = { - ARCHS = ( - "$(NATIVE_ARCH_64_BIT)", - "$(NATIVE_ARCH_32_BIT)", - ); - CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_GENERATE_TEST_COVERAGE_FILES = YES; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS)", - "-lgcov", - ); - PREBINDING = NO; - }; - name = DebugGCov; - }; - F9359B260DF212DA00E04F67 /* DebugGCov */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = DebugGCov; - }; - F9359B270DF212DA00E04F67 /* DebugGCov */ = { - isa = XCBuildConfiguration; - buildSettings = { - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = DebugGCov; - }; - F9359B280DF212DA00E04F67 /* DebugGCov */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_INPUT_FILETYPE = sourcecode.c.c; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = DebugGCov; - }; - F95CC8AC09158F3100EA5ACE /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = Debug; - }; - F95CC8AD09158F3100EA5ACE /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = Release; - }; - F95CC8AE09158F3100EA5ACE /* DebugNoFixAndContinue */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = DebugNoFixAndContinue; - }; - F95CC8B109158F3100EA5ACE /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "__private_extern__=extern", - "$(GCC_PREPROCESSOR_DEFINITIONS)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = Debug; - }; - F95CC8B209158F3100EA5ACE /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = Release; - }; - F95CC8B309158F3100EA5ACE /* DebugNoFixAndContinue */ = { - isa = XCBuildConfiguration; - buildSettings = { - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = DebugNoFixAndContinue; - }; - F95CC8B609158F3100EA5ACE /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tk-Debug.xcconfig */; - buildSettings = { - ARCHS = ( - "$(NATIVE_ARCH_64_BIT)", - "$(NATIVE_ARCH_32_BIT)", - ); - CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - }; - name = Debug; - }; - F95CC8B709158F3100EA5ACE /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tk-Release.xcconfig */; - buildSettings = { - ARCHS = ( - "$(NATIVE_ARCH_64_BIT)", - "$(NATIVE_ARCH_32_BIT)", - ); - CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - }; - name = Release; - }; - F95CC8B809158F3100EA5ACE /* DebugNoFixAndContinue */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tk-Debug.xcconfig */; - buildSettings = { - ARCHS = ( - "$(NATIVE_ARCH_64_BIT)", - "$(NATIVE_ARCH_32_BIT)", - ); - CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - }; - name = DebugNoFixAndContinue; - }; - F97258A90A86873D00096C78 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_INPUT_FILETYPE = sourcecode.c.c; - GCC_PREPROCESSOR_DEFINITIONS = ( - "__private_extern__=extern", - "$(GCC_PREPROCESSOR_DEFINITIONS)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = Debug; - }; - F97258AA0A86873D00096C78 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_INPUT_FILETYPE = sourcecode.c.c; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = Release; - }; - F97258AB0A86873D00096C78 /* DebugNoFixAndContinue */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_INPUT_FILETYPE = sourcecode.c.c; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = DebugNoFixAndContinue; - }; - F97258AC0A86873D00096C78 /* ReleaseUniversal */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CFLAGS = "-arch x86_64 -arch arm64 $(CFLAGS)"; - GCC_INPUT_FILETYPE = sourcecode.c.c; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = ReleaseUniversal; - }; - F987512F0DE7B57E00B1C9EC /* DebugNoCF */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tk-Debug.xcconfig */; - buildSettings = { - ARCHS = ( - "$(NATIVE_ARCH_64_BIT)", - "$(NATIVE_ARCH_32_BIT)", - ); - CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --disable-corefoundation"; - CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - }; - name = DebugNoCF; - }; - F98751300DE7B57E00B1C9EC /* DebugNoCF */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --enable-corefoundation"; - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = DebugNoCF; - }; - F98751310DE7B57E00B1C9EC /* DebugNoCF */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --enable-corefoundation"; - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = DebugNoCF; - }; - F98751320DE7B57E00B1C9EC /* DebugNoCF */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_INPUT_FILETYPE = sourcecode.c.c; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = DebugNoCF; - }; - F9988AB10D814C6500B6B03B /* Debug gcc40 */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tk-Debug.xcconfig */; - buildSettings = { - ARCHS = ( - "$(NATIVE_ARCH_64_BIT)", - "$(NATIVE_ARCH_32_BIT)", - ); - CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - GCC_VERSION = 4.0; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - }; - name = "Debug gcc40"; - }; - F9988AB20D814C6500B6B03B /* Debug gcc40 */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = "Debug gcc40"; - }; - F9988AB30D814C6500B6B03B /* Debug gcc40 */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "__private_extern__=extern", - "$(GCC_PREPROCESSOR_DEFINITIONS)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = "Debug gcc40"; - }; - F9988AB40D814C6500B6B03B /* Debug gcc40 */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_INPUT_FILETYPE = sourcecode.c.c; - GCC_PREPROCESSOR_DEFINITIONS = ( - "__private_extern__=extern", - "$(GCC_PREPROCESSOR_DEFINITIONS)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = "Debug gcc40"; - }; - F9988AB50D814C7500B6B03B /* Debug llvm-gcc */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tk-Debug.xcconfig */; - buildSettings = { - ARCHS = ( - "$(NATIVE_ARCH_64_BIT)", - "$(NATIVE_ARCH_32_BIT)", - ); - CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; - GCC = "llvm-gcc"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - GCC_VERSION = com.apple.compilers.llvmgcc42; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - }; - name = "Debug llvm-gcc"; - }; - F9988AB60D814C7500B6B03B /* Debug llvm-gcc */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = "Debug llvm-gcc"; - }; - F9988AB70D814C7500B6B03B /* Debug llvm-gcc */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "__private_extern__=extern", - "$(GCC_PREPROCESSOR_DEFINITIONS)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = "Debug llvm-gcc"; - }; - F9988AB80D814C7500B6B03B /* Debug llvm-gcc */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_INPUT_FILETYPE = sourcecode.c.c; - GCC_PREPROCESSOR_DEFINITIONS = ( - "__private_extern__=extern", - "$(GCC_PREPROCESSOR_DEFINITIONS)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = "Debug llvm-gcc"; - }; - F9988BB10D81586D00B6B03B /* ReleaseUniversal gcc40 */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tk-Release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CFLAGS = "-arch x86_64 -arch arm64 $(CFLAGS)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - GCC_VERSION = 4.0; - MACOSX_DEPLOYMENT_TARGET = 10.6; - PREBINDING = NO; - }; - name = "ReleaseUniversal gcc40"; - }; - F9988BB20D81586D00B6B03B /* ReleaseUniversal gcc40 */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = "ReleaseUniversal gcc40"; - }; - F9988BB30D81586D00B6B03B /* ReleaseUniversal gcc40 */ = { - isa = XCBuildConfiguration; - buildSettings = { - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = "ReleaseUniversal gcc40"; - }; - F9988BB40D81586D00B6B03B /* ReleaseUniversal gcc40 */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CFLAGS = "-arch x86_64 -arch arm64 $(CFLAGS)"; - GCC_INPUT_FILETYPE = sourcecode.c.c; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = "ReleaseUniversal gcc40"; - }; - F9988BB50D81587400B6B03B /* ReleaseUniversal llvm-gcc */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tk-Release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CFLAGS = "-arch x86_64 -arch arm64 $(CFLAGS)"; - DEBUG_INFORMATION_FORMAT = dwarf; - GCC = "llvm-gcc"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - GCC_OPTIMIZATION_LEVEL = 4; - "GCC_OPTIMIZATION_LEVEL[arch=ppc]" = s; - GCC_VERSION = com.apple.compilers.llvmgcc42; - MACOSX_DEPLOYMENT_TARGET = 10.6; - PREBINDING = NO; - }; - name = "ReleaseUniversal llvm-gcc"; - }; - F9988BB60D81587400B6B03B /* ReleaseUniversal llvm-gcc */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = "ReleaseUniversal llvm-gcc"; - }; - F9988BB70D81587400B6B03B /* ReleaseUniversal llvm-gcc */ = { - isa = XCBuildConfiguration; - buildSettings = { - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = "ReleaseUniversal llvm-gcc"; - }; - F9988BB80D81587400B6B03B /* ReleaseUniversal llvm-gcc */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CFLAGS = "-arch x86_64 -arch arm64 $(CFLAGS)"; - GCC_INPUT_FILETYPE = sourcecode.c.c; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = "ReleaseUniversal llvm-gcc"; - }; - F99EE73C0BE835310060D4AF /* DebugLeaks */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = DebugLeaks; - }; - F99EE73E0BE835310060D4AF /* DebugLeaks */ = { - isa = XCBuildConfiguration; - buildSettings = { - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = DebugLeaks; - }; - F99EE7400BE835310060D4AF /* DebugLeaks */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_INPUT_FILETYPE = sourcecode.c.c; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = DebugLeaks; - }; - F99EE7420BE835310060D4AF /* DebugLeaks */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tk-Debug.xcconfig */; - buildSettings = { - ARCHS = ( - "$(NATIVE_ARCH_64_BIT)", - ); - CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = unsupported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - GCC_PREPROCESSOR_DEFINITIONS = ( - PURIFY, - "$(GCC_PREPROCESSOR_DEFINITIONS)", - ); - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - RUN_CLANG_STATIC_ANALYZER = YES; - }; - name = DebugLeaks; - }; - F9A9D1EF0FC77787002A2BE3 /* Debug clang */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tk-Debug.xcconfig */; - buildSettings = { - ARCHS = ( - "$(NATIVE_ARCH_64_BIT)", - "$(NATIVE_ARCH_32_BIT)", - ); - CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; - GCC = clang; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - }; - name = "Debug clang"; - }; - F9A9D1F00FC77787002A2BE3 /* Debug clang */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = "Debug clang"; - }; - F9A9D1F10FC77787002A2BE3 /* Debug clang */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "__private_extern__=extern", - "$(GCC_PREPROCESSOR_DEFINITIONS)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = "Debug clang"; - }; - F9A9D1F20FC77787002A2BE3 /* Debug clang */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "__private_extern__=extern", - "$(GCC_PREPROCESSOR_DEFINITIONS)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = "Debug clang"; - }; - F9A9D1F30FC77799002A2BE3 /* ReleaseUniversal clang */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tk-Release.xcconfig */; - buildSettings = { - ARCHS = ( - "$(NATIVE_ARCH_64_BIT)", - ); - CFLAGS = "-arch x86_64 -arch arm64 $(CFLAGS)"; - DEBUG_INFORMATION_FORMAT = dwarf; - GCC = clang; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - GCC_OPTIMIZATION_LEVEL = 4; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - MACOSX_DEPLOYMENT_TARGET = 10.6; - PREBINDING = NO; - }; - name = "ReleaseUniversal clang"; - }; - F9A9D1F40FC77799002A2BE3 /* ReleaseUniversal clang */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = "ReleaseUniversal clang"; - }; - F9A9D1F50FC77799002A2BE3 /* ReleaseUniversal clang */ = { - isa = XCBuildConfiguration; - buildSettings = { - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = "ReleaseUniversal clang"; - }; - F9A9D1F60FC77799002A2BE3 /* ReleaseUniversal clang */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CFLAGS = "-arch x86_64 -arch arm64 $(CFLAGS)"; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = "ReleaseUniversal clang"; - }; - F9EEED960C2FEFD300396116 /* ReleaseUniversal10.5SDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Wish; - SKIP_INSTALL = NO; - }; - name = ReleaseUniversal10.5SDK; - }; - F9EEED970C2FEFD300396116 /* ReleaseUniversal10.5SDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS_AQUA)", - "$(OTHER_LDFLAGS)", - ); - PRODUCT_NAME = tktest; - }; - name = ReleaseUniversal10.5SDK; - }; - F9EEED980C2FEFD300396116 /* ReleaseUniversal10.5SDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CFLAGS = "-arch x86_64 -arch arm64 $(CFLAGS)"; - GCC_INPUT_FILETYPE = sourcecode.c.c; - HEADER_SEARCH_PATHS = ( - /usr/X11R6/include, - /usr/X11R6/include/freetype2, - "$(HEADER_SEARCH_PATHS)", - ); - LIBRARY_SEARCH_PATHS = ( - /usr/X11R6/lib, - "$(LIBRARY_SEARCH_PATHS)", - ); - PRODUCT_NAME = "tktest-X11"; - }; - name = ReleaseUniversal10.5SDK; - }; - F9EEED990C2FEFD300396116 /* ReleaseUniversal10.5SDK */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tk-Release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CFLAGS = "-arch x86_64 -arch arm64 $(CFLAGS)"; - CPPFLAGS = "-isysroot $(SDKROOT) $(CPPFLAGS)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_INPUT_FILETYPE = sourcecode.c.objc; - MACOSX_DEPLOYMENT_TARGET = 10.5; - PREBINDING = NO; - SDKROOT = macosx10.5; - }; - name = ReleaseUniversal10.5SDK; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - F95CC8AB09158F3100EA5ACE /* Build configuration list for PBXNativeTarget "Tk" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F95CC8AC09158F3100EA5ACE /* Debug */, - F9A9D1F00FC77787002A2BE3 /* Debug clang */, - F9988AB60D814C7500B6B03B /* Debug llvm-gcc */, - F9988AB20D814C6500B6B03B /* Debug gcc40 */, - F90E36D60F3B5C8400810A10 /* DebugNoGC */, - F95CC8AE09158F3100EA5ACE /* DebugNoFixAndContinue */, - F98751300DE7B57E00B1C9EC /* DebugNoCF */, - F93084370BB93D2800CD0B9E /* DebugMemCompile */, - F99EE73C0BE835310060D4AF /* DebugLeaks */, - F9359B260DF212DA00E04F67 /* DebugGCov */, - F95CC8AD09158F3100EA5ACE /* Release */, - F91BCC4F093152310042A6BF /* ReleaseUniversal */, - F9A9D1F40FC77799002A2BE3 /* ReleaseUniversal clang */, - F9988BB60D81587400B6B03B /* ReleaseUniversal llvm-gcc */, - F9988BB20D81586D00B6B03B /* ReleaseUniversal gcc40 */, - F9EEED960C2FEFD300396116 /* ReleaseUniversal10.5SDK */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - F95CC8B009158F3100EA5ACE /* Build configuration list for PBXNativeTarget "tktest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F95CC8B109158F3100EA5ACE /* Debug */, - F9A9D1F10FC77787002A2BE3 /* Debug clang */, - F9988AB70D814C7500B6B03B /* Debug llvm-gcc */, - F9988AB30D814C6500B6B03B /* Debug gcc40 */, - F90E36D70F3B5C8400810A10 /* DebugNoGC */, - F95CC8B309158F3100EA5ACE /* DebugNoFixAndContinue */, - F98751310DE7B57E00B1C9EC /* DebugNoCF */, - F93084380BB93D2800CD0B9E /* DebugMemCompile */, - F99EE73E0BE835310060D4AF /* DebugLeaks */, - F9359B270DF212DA00E04F67 /* DebugGCov */, - F95CC8B209158F3100EA5ACE /* Release */, - F91BCC50093152310042A6BF /* ReleaseUniversal */, - F9A9D1F50FC77799002A2BE3 /* ReleaseUniversal clang */, - F9988BB70D81587400B6B03B /* ReleaseUniversal llvm-gcc */, - F9988BB30D81586D00B6B03B /* ReleaseUniversal gcc40 */, - F9EEED970C2FEFD300396116 /* ReleaseUniversal10.5SDK */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - F95CC8B509158F3100EA5ACE /* Build configuration list for PBXProject "Tk" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F95CC8B609158F3100EA5ACE /* Debug */, - F9A9D1EF0FC77787002A2BE3 /* Debug clang */, - F9988AB50D814C7500B6B03B /* Debug llvm-gcc */, - F9988AB10D814C6500B6B03B /* Debug gcc40 */, - F90E36D50F3B5C8400810A10 /* DebugNoGC */, - F95CC8B809158F3100EA5ACE /* DebugNoFixAndContinue */, - F987512F0DE7B57E00B1C9EC /* DebugNoCF */, - F930843A0BB93D2800CD0B9E /* DebugMemCompile */, - F99EE7420BE835310060D4AF /* DebugLeaks */, - F9359B250DF212DA00E04F67 /* DebugGCov */, - F95CC8B709158F3100EA5ACE /* Release */, - F91BCC51093152310042A6BF /* ReleaseUniversal */, - F9A9D1F30FC77799002A2BE3 /* ReleaseUniversal clang */, - F9988BB50D81587400B6B03B /* ReleaseUniversal llvm-gcc */, - F9988BB10D81586D00B6B03B /* ReleaseUniversal gcc40 */, - F9EEED990C2FEFD300396116 /* ReleaseUniversal10.5SDK */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - F97258A80A86873D00096C78 /* Build configuration list for PBXNativeTarget "tktest-X11" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F97258A90A86873D00096C78 /* Debug */, - F9A9D1F20FC77787002A2BE3 /* Debug clang */, - F9988AB80D814C7500B6B03B /* Debug llvm-gcc */, - F9988AB40D814C6500B6B03B /* Debug gcc40 */, - F90E36D80F3B5C8400810A10 /* DebugNoGC */, - F97258AB0A86873D00096C78 /* DebugNoFixAndContinue */, - F98751320DE7B57E00B1C9EC /* DebugNoCF */, - F93084390BB93D2800CD0B9E /* DebugMemCompile */, - F99EE7400BE835310060D4AF /* DebugLeaks */, - F9359B280DF212DA00E04F67 /* DebugGCov */, - F97258AA0A86873D00096C78 /* Release */, - F97258AC0A86873D00096C78 /* ReleaseUniversal */, - F9A9D1F60FC77799002A2BE3 /* ReleaseUniversal clang */, - F9988BB80D81587400B6B03B /* ReleaseUniversal llvm-gcc */, - F9988BB40D81586D00B6B03B /* ReleaseUniversal gcc40 */, - F9EEED980C2FEFD300396116 /* ReleaseUniversal10.5SDK */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index c825920..89260de 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -187,6 +187,7 @@ TkpDisplayButton( Pixmap pixmap; DrawParams* dpPtr = &macButtonPtr->drawParams; int needhighlight = 0; + int highlightWidth; butPtr->flags &= ~REDRAW_PENDING; if ((butPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { @@ -194,7 +195,7 @@ TkpDisplayButton( } pixmap = (Pixmap) Tk_WindowId(tkwin); - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->highlightWidthPtr, &butPtr->highlightWidth); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->highlightWidthObj, &highlightWidth); if (TkMacOSXComputeButtonDrawParams(butPtr, dpPtr)) { macButtonPtr->useTkText = 0; @@ -227,7 +228,7 @@ TkpDisplayButton( * Ask for the highlight border, if needed. */ - if (butPtr->highlightWidth < 3) { + if (highlightWidth < 3) { needhighlight = 1; } } @@ -244,7 +245,7 @@ TkpDisplayButton( gc = Tk_GCForColor(Tk_3DBorderColor(butPtr->highlightBorder), pixmap); } if (gc) { - TkMacOSXDrawSolidBorder(tkwin, gc, 0, butPtr->highlightWidth); + TkMacOSXDrawSolidBorder(tkwin, gc, 0, highlightWidth); } } } @@ -276,6 +277,9 @@ TkpComputeButtonGeometry( MacButton *mbPtr = (MacButton *) butPtr; Tk_FontMetrics fm; char *text = Tcl_GetString(butPtr->textPtr); + int padX, padY, wrapLength; + int butPtrWidth, butPtrHeight; + int borderWidth, highlightWidth; TkMacOSXComputeButtonParams(butPtr, &mbPtr->btnkind, &mbPtr->drawinfo); @@ -315,17 +319,19 @@ TkpComputeButtonGeometry( haveImage = 1; } - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padXPtr, &butPtr->padX); - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padYPtr, &butPtr->padY); - + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->widthObj, &butPtrWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->heightObj, &butPtrHeight); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padYObj, &padY); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->wrapLengthObj, &wrapLength); if (haveImage == 0 || butPtr->compound != COMPOUND_NONE) { Tk_FreeTextLayout(butPtr->textLayout); butPtr->textLayout = Tk_ComputeTextLayout(butPtr->tkfont, - text, TCL_INDEX_NONE, butPtr->wrapLength, butPtr->justify, 0, + text, TCL_INDEX_NONE, wrapLength, butPtr->justify, 0, &butPtr->textWidth, &butPtr->textHeight); - txtWidth = butPtr->textWidth + 2 * butPtr->padX; - txtHeight = butPtr->textHeight + 2 * butPtr->padY; + txtWidth = butPtr->textWidth + 2 * padX; + txtHeight = butPtr->textHeight + 2 * padY; haveText = 1; } @@ -338,7 +344,7 @@ TkpComputeButtonGeometry( * Image is above or below text. */ - height += txtHeight + butPtr->padY; + height += txtHeight + padY; width = (width > txtWidth ? width : txtWidth); break; case COMPOUND_LEFT: @@ -347,7 +353,7 @@ TkpComputeButtonGeometry( * Image is left or right of text. */ - width += txtWidth + 2 * butPtr->padX; + width += txtWidth + 2 * padX; height = (height > txtHeight ? height : txtHeight); break; case COMPOUND_CENTER: @@ -363,8 +369,8 @@ TkpComputeButtonGeometry( } } /* Image with or without text */ - width = butPtr->width > 0 ? butPtr->width : width + butPtr->indicatorSpace; - height = butPtr->height > 0 ? butPtr->height : height; + width = butPtrWidth > 0 ? butPtrWidth : width + butPtr->indicatorSpace; + height = butPtrHeight > 0 ? butPtrHeight : height; if (butPtr->type == TYPE_BUTTON) { /* * Allow room to shift the image. @@ -375,13 +381,13 @@ TkpComputeButtonGeometry( } else { /* Text only */ width = txtWidth + butPtr->indicatorSpace; height = txtHeight; - if (butPtr->width > 0) { + if (butPtrWidth > 0) { charWidth = Tk_TextWidth(butPtr->tkfont, "0", 1); - width = butPtr->width * charWidth + 2 * butPtr->padX; + width = butPtrWidth * charWidth + 2 * padX; } - if (butPtr->height > 0) { + if (butPtrHeight > 0) { Tk_GetFontMetrics(butPtr->tkfont, &fm); - height = butPtr->height * fm.linespace + 2 * butPtr->padY; + height = butPtrHeight * fm.linespace + 2 * padY; } } @@ -389,10 +395,10 @@ TkpComputeButtonGeometry( * Now figure out the size of the border decorations for the button. */ - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthPtr, &butPtr->borderWidth); - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthPtr, &butPtr->highlightWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthObj, &highlightWidth); - butPtr->inset = butPtr->borderWidth + butPtr->highlightWidth; + butPtr->inset = borderWidth + highlightWidth; width += butPtr->inset * 2; height += butPtr->inset * 2; @@ -454,6 +460,7 @@ DrawButtonImageAndText( int textXOffset = 0, textYOffset = 0; int width = 0, height = 0; int fullWidth = 0, fullHeight = 0; + int padX, padY, borderWidth, highlightWidth; DrawParams *dpPtr = &mbPtr->drawParams; if (tkwin == NULL || !Tk_IsMapped(tkwin)) { @@ -477,10 +484,10 @@ DrawButtonImageAndText( pressed = 1; } - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padXPtr, &butPtr->padX); - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padYPtr, &butPtr->padY); - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->borderWidthPtr, &butPtr->borderWidth); - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->highlightWidthPtr, &butPtr->highlightWidth); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padYObj, &padY); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->highlightWidthObj, &highlightWidth); haveText = (butPtr->textWidth != 0 && butPtr->textHeight != 0); if (butPtr->compound != COMPOUND_NONE && haveImage && haveText) { /* Image and Text */ @@ -491,11 +498,11 @@ DrawButtonImageAndText( case COMPOUND_BOTTOM: /* Image is above or below text */ if (butPtr->compound == COMPOUND_TOP) { - textYOffset = height + butPtr->padY; + textYOffset = height + padY; } else { - imageYOffset = butPtr->textHeight + butPtr->padY; + imageYOffset = butPtr->textHeight + padY; } - fullHeight = height + butPtr->textHeight + butPtr->padY; + fullHeight = height + butPtr->textHeight + padY; fullWidth = (width > butPtr->textWidth ? width : butPtr->textWidth); textXOffset = (fullWidth - butPtr->textWidth)/2; imageXOffset = (fullWidth - width)/2; @@ -507,11 +514,11 @@ DrawButtonImageAndText( */ if (butPtr->compound == COMPOUND_LEFT) { - textXOffset = width + butPtr->padX; + textXOffset = width + padX; } else { - imageXOffset = butPtr->textWidth + butPtr->padX; + imageXOffset = butPtr->textWidth + padX; } - fullWidth = butPtr->textWidth + butPtr->padX + width; + fullWidth = butPtr->textWidth + padX + width; fullHeight = (height > butPtr->textHeight ? height : butPtr->textHeight); textYOffset = (fullHeight - butPtr->textHeight)/2; @@ -536,8 +543,7 @@ DrawButtonImageAndText( } TkComputeAnchor(butPtr->anchor, tkwin, - butPtr->padX + butPtr->borderWidth, - butPtr->padY + butPtr->borderWidth, + padX + borderWidth, padY + borderWidth, fullWidth + butPtr->indicatorSpace, fullHeight, &x, &y); x += butPtr->indicatorSpace; @@ -587,8 +593,7 @@ DrawButtonImageAndText( int x = 0, y; TkComputeAnchor(butPtr->anchor, tkwin, - butPtr->padX + butPtr->borderWidth, - butPtr->padY + butPtr->borderWidth, + padX + borderWidth, padY + borderWidth, width + butPtr->indicatorSpace, height, &x, &y); x += butPtr->indicatorSpace; if (pressed) { @@ -621,7 +626,7 @@ DrawButtonImageAndText( } else { /* Text only */ int x, y; - TkComputeAnchor(butPtr->anchor, tkwin, butPtr->padX, butPtr->padY, + TkComputeAnchor(butPtr->anchor, tkwin, padX, padY, butPtr->textWidth + butPtr->indicatorSpace, butPtr->textHeight, &x, &y); x += butPtr->indicatorSpace; @@ -672,11 +677,11 @@ DrawButtonImageAndText( */ if (dpPtr->relief != TK_RELIEF_FLAT) { - int inset = butPtr->highlightWidth; + int inset = highlightWidth; Tk_Draw3DRectangle(tkwin, pixmap, dpPtr->border, inset, inset, Tk_Width(tkwin) - 2 * inset, Tk_Height(tkwin) - 2 * inset, - butPtr->borderWidth, dpPtr->relief); + borderWidth, dpPtr->relief); } } } @@ -957,15 +962,16 @@ TkMacOSXComputeButtonParams( HIThemeButtonDrawInfo *drawinfo) { MacButton *mbPtr = (MacButton *) butPtr; + int borderWidth, highlightWidth; - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthPtr, &butPtr->borderWidth); - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthPtr, &butPtr->highlightWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthObj, &highlightWidth); - if (butPtr->borderWidth <= 2) { + if (borderWidth <= 2) { *btnkind = kThemeSmallBevelButton; - } else if (butPtr->borderWidth == 3) { + } else if (borderWidth == 3) { *btnkind = kThemeBevelButton; - } else if (butPtr->borderWidth == 4) { + } else if (borderWidth == 4) { *btnkind = kThemeRoundedBevelButton; } else { *btnkind = kThemePushButton; @@ -977,14 +983,14 @@ TkMacOSXComputeButtonParams( *btnkind = kThemePushButton; break; case TYPE_RADIO_BUTTON: - if (butPtr->borderWidth <= 1) { + if (borderWidth <= 1) { *btnkind = kThemeSmallRadioButton; } else { *btnkind = kThemeRadioButton; } break; case TYPE_CHECK_BUTTON: - if (butPtr->borderWidth <= 1) { + if (borderWidth <= 1) { *btnkind = kThemeSmallCheckBox; } else { *btnkind = kThemeCheckBox; @@ -996,14 +1002,14 @@ TkMacOSXComputeButtonParams( if (butPtr->indicatorOn) { switch (butPtr->type) { case TYPE_RADIO_BUTTON: - if (butPtr->borderWidth <= 1) { + if (borderWidth <= 1) { *btnkind = kThemeSmallRadioButton; } else { *btnkind = kThemeRadioButton; } break; case TYPE_CHECK_BUTTON: - if (butPtr->borderWidth <= 1) { + if (borderWidth <= 1) { *btnkind = kThemeSmallCheckBox; } else { *btnkind = kThemeCheckBox; @@ -1068,7 +1074,7 @@ TkMacOSXComputeButtonParams( } else if (mbPtr->defaultPulseHandler) { Tcl_DeleteTimerHandler(mbPtr->defaultPulseHandler); } - if (butPtr->highlightWidth >= 3) { + if (highlightWidth >= 3) { if ((butPtr->flags & GOT_FOCUS)) { drawinfo->adornment |= kThemeAdornmentFocus; } diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c index f16ab0d..8d5f727 100644 --- a/macosx/tkMacOSXClipboard.c +++ b/macosx/tkMacOSXClipboard.c @@ -126,8 +126,8 @@ TkSelGetSelection( ([[NSPasteboard generalPasteboard] changeCount] != changeCount); if (dispPtr && (haveExternalClip || dispPtr->clipboardActive) - && selection == dispPtr->clipboardAtom - && (target == XA_STRING || target == dispPtr->utf8Atom)) { + && selection == dispPtr->clipboardAtom + && (target == XA_STRING || target == dispPtr->utf8Atom)) { NSString *string = nil; NSPasteboard *pb = [NSPasteboard generalPasteboard]; NSString *type = [pb availableTypeFromArray:[NSArray arrayWithObject: diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c index 978b9d6..29bd240 100644 --- a/macosx/tkMacOSXColor.c +++ b/macosx/tkMacOSXColor.c @@ -52,7 +52,7 @@ static void initColorTable() #if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 if (@available(macOS 10.14, *)) { darkAqua = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]; - lightAqua = [NSAppearance appearanceNamed:NSAppearanceNameAqua]; + lightAqua = [NSAppearance appearanceNamed:NSAppearanceNameAqua]; } #endif @@ -103,7 +103,7 @@ static void initColorTable() name = (char *)ckalloc(length + 1); strcpy(name, key.UTF8String); name[0] = (char)toupper(UCHAR(name[0])); - if (!strcmp(name, "WindowBackgroundColor")) { + if (!strcmp(name, "WindowBackgroundColor")) { /* * Avoid black windows on old systems. @@ -192,8 +192,8 @@ TkMacOSXRGBPixel( MacPixel p = {0}; p.pixel.colortype = rgbColor; p.pixel.value = (unsigned int)(((red & 0xff) << 16) | - ((green & 0xff) << 8) | - (blue & 0xff)); + ((green & 0xff) << 8) | + (blue & 0xff)); return p.ulong; } @@ -436,7 +436,7 @@ TkMacOSXInDarkMode(Tk_Window tkwin) #if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 if (@available(macOS 10.14, *)) { - TkWindow *winPtr = (TkWindow*) tkwin; + TkWindow *winPtr = (TkWindow*) tkwin; NSAppearanceName name; NSView *view = nil; if (winPtr && winPtr->privatePtr) { @@ -583,10 +583,7 @@ TkMacOSXSetColorInContext( * TkpGetColor -- * * Create a new TkColor for the color with the given name, for use in the - * specified window. The colormap field is set to lightColormap if the - * window has a LightAqua appearance, or darkColormap if the window has a - * DarkAqua appearance. TkColors with different colormaps are managed - * separately in the per-display table of TkColors maintained by Tk. + * specified window. * * This function is called by Tk_GetColor. * @@ -609,8 +606,9 @@ TkpGetColor( Display *display = NULL; TkColor *tkColPtr; XColor color; - Colormap colormap = tkwin ? Tk_Colormap(tkwin) : noColormap; + Colormap colormap = TK_DYNAMIC_COLORMAP; NSView *view = nil; + Bool haveValidXColor = False; static Bool initialized = NO; if (!initialized) { @@ -638,27 +636,43 @@ TkpGetColor( p.pixel.colortype = entry->type; p.pixel.value = (unsigned int)entry->index; color.pixel = p.ulong; + +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 + NSAppearance *windowAppearance; + /* See comments in tkMacOSXDraw.c */ + if (@available(macOS 12.0, *)) { +#if MAC_OS_X_VERSION_MAX_ALLOWED > 120000 + NSAppearance *current = NSAppearance.currentDrawingAppearance; + NSAppearance *effective = view.effectiveAppearance; + if( current != effective) { + // printf("Appearances are out of sync!\n"); + // Deprecations be damned! + NSAppearance.currentAppearance = effective; + } +#endif + } + if (@available(macOS 10.14, *)) { + if (view) { + windowAppearance = [view effectiveAppearance]; + } else { + windowAppearance = [NSApp effectiveAppearance]; + } + } +#endif + if (entry->type == semantic) { CGFloat rgba[4]; #if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 if (@available(macOS 10.14, *)) { - NSAppearance *windowAppearance; - if (view) { - windowAppearance = [view effectiveAppearance]; - } else { - windowAppearance = [NSApp effectiveAppearance]; - } - if ([windowAppearance name] == NSAppearanceNameDarkAqua) { - colormap = darkColormap; - } else { - colormap = lightColormap; - } if (@available(macOS 11.0, *)) { #if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000 CGFloat *rgbaPtr = rgba; [windowAppearance performAsCurrentDrawingAppearance:^{ GetRGBA(entry, p.ulong, rgbaPtr); }]; + color.red = (unsigned short)(rgba[0] * 65535.0); + color.green = (unsigned short)(rgba[1] * 65535.0); + color.blue = (unsigned short)(rgba[2] * 65535.0); #endif } else { #if MAC_OS_X_VERSION_MIN_REQUIRED < 110000 @@ -671,13 +685,13 @@ TkpGetColor( } else { GetRGBA(entry, p.ulong, rgba); } -#else +#else //MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 GetRGBA(entry, p.ulong, rgba); -#endif color.red = (unsigned short)(rgba[0] * 65535.0); color.green = (unsigned short)(rgba[1] * 65535.0); color.blue = (unsigned short)(rgba[2] * 65535.0); - goto validXColor; +#endif //MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 + haveValidXColor = True; } else if (SetCGColorComponents(entry, 0, &c)) { const size_t n = CGColorGetNumberOfComponents(c); const CGFloat *rgba = CGColorGetComponents(c); @@ -695,15 +709,14 @@ TkpGetColor( Tcl_Panic("CGColor with %d components", (int) n); } CGColorRelease(c); - goto validXColor; + haveValidXColor = True; } } } - if (TkParseColor(display, colormap, name, &color) == 0) { + if (!haveValidXColor && TkParseColor(display, colormap, name, &color) == 0) { return NULL; } -validXColor: tkColPtr = (TkColor *)ckalloc(sizeof(TkColor)); tkColPtr->colormap = colormap; tkColPtr->color = color; diff --git a/macosx/tkMacOSXColor.h b/macosx/tkMacOSXColor.h index ab5a3b4..54077f8 100644 --- a/macosx/tkMacOSXColor.h +++ b/macosx/tkMacOSXColor.h @@ -53,17 +53,6 @@ typedef union MacPixel_t { } MacPixel; /* - * We maintain two colormaps, one for the LightAqua appearance and one for the - * DarkAqua appearance. - */ - -enum macColormap { - noColormap, - lightColormap, - darkColormap, -}; - -/* * In TkMacOSXColor.c a Tk hash table is constructed from the static data * below to map system color names to CGColors. */ diff --git a/macosx/tkMacOSXConstants.h b/macosx/tkMacOSXConstants.h index 29bc391..164247f 100644 --- a/macosx/tkMacOSXConstants.h +++ b/macosx/tkMacOSXConstants.h @@ -15,25 +15,12 @@ #ifndef _TKMACCONSTANTS #define _TKMACCONSTANTS -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 -#define NSFullScreenWindowMask (1 << 14) -#endif - -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1090 -typedef NSInteger NSModalResponse; -#endif - /* * Let's raise a glass for the project manager who improves our lives by * generating deprecation warnings about pointless changes of the names * of constants. */ -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 -#define kCTFontDefaultOrientation kCTFontOrientationDefault -#define kCTFontVerticalOrientation kCTFontOrientationVertical -#endif - #if MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 #define NSOKButton NSModalResponseOK #endif diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h index 60430be..ca4db03 100644 --- a/macosx/tkMacOSXDefault.h +++ b/macosx/tkMacOSXDefault.h @@ -517,7 +517,7 @@ #define DEF_TEXT_PADX "1" #define DEF_TEXT_PADY "1" #define DEF_TEXT_RELIEF "flat" -#define DEF_TEXT_INACTIVE_SELECT_COLOR INACTIVE_SELECT_BG +#define DEF_TEXT_INACTIVE_SELECT_BG_COLOR INACTIVE_SELECT_BG #define DEF_TEXT_SELECT_COLOR SELECT_BG #define DEF_TEXT_SELECT_MONO BLACK #define DEF_TEXT_SELECT_BD_COLOR "1" diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index b9de43f..8ca605f 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -464,7 +464,7 @@ Tk_ChooseColorObjCmd( case COLOR_INITIAL: { XColor *colorPtr; - colorPtr = Tk_GetColor(interp, tkwin, value); + colorPtr = Tk_AllocColorFromObj(interp, tkwin, objv[i + 1]); if (colorPtr == NULL) { goto end; } diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index ff35da3..e93f9cf 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -283,7 +283,8 @@ Tk_MacOSXGetCGContextForDrawable( * * TkMacOSXDrawCGImage -- * - * Draw CG image into drawable. + * Draw CG image into drawable. The entire image is used, and will + * be rescaled if its dimensions do not equal dstBounds.size. * * Results: * None. @@ -302,25 +303,11 @@ TkMacOSXDrawCGImage( CGImageRef image, unsigned long imageForeground, unsigned long imageBackground, - CGRect imageBounds, - CGRect srcBounds, CGRect dstBounds) { MacDrawable *macDraw = (MacDrawable *)d; if (macDraw && context && image) { - CGImageRef subImage = NULL; - - if (!CGRectEqualToRect(imageBounds, srcBounds)) { - if (!CGRectContainsRect(imageBounds, srcBounds)) { - TkMacOSXDbgMsg("Mismatch of sub CGImage bounds"); - } - subImage = CGImageCreateWithImageInRect(image, CGRectOffset( - srcBounds, -imageBounds.origin.x, -imageBounds.origin.y)); - if (subImage) { - image = subImage; - } - } dstBounds = CGRectOffset(dstBounds, macDraw->xOff, macDraw->yOff); if (CGImageIsMask(image)) { if (macDraw->flags & TK_IS_BW_PIXMAP) { @@ -369,9 +356,6 @@ TkMacOSXDrawCGImage( CGContextDrawImage(context, dstBounds, image); CGContextRestoreGState(context); #endif /* TK_MAC_DEBUG_IMAGE_DRAWING */ - if (subImage) { - CFRelease(subImage); - } } else { TkMacOSXDbgMsg("Drawing of empty CGImage requested"); } @@ -434,16 +418,16 @@ XDrawLines( } } - /* - * In the case of closed polylines, the first and last points are the - * same. We want miter or bevel join be rendered also at this point, - * this needs telling CoreGraphics that the path is closed. - */ + /* + * In the case of closed polylines, the first and last points are the + * same. We want miter or bevel join be rendered also at this point, + * this needs telling CoreGraphics that the path is closed. + */ - if ((points[0].x == points[npoints-1].x) && - (points[0].y == points[npoints-1].y)) { - CGContextClosePath(dc.context); - } + if ((points[0].x == points[npoints-1].x) && + (points[0].y == points[npoints-1].y)) { + CGContextClosePath(dc.context); + } CGContextStrokePath(dc.context); } TkMacOSXRestoreDrawingContext(&dc); @@ -1093,6 +1077,23 @@ XFillArcs( * Results: * Returns 0 if the scroll generated no additional damage. Otherwise, sets * the region that needs to be repainted after scrolling and returns 1. + * When drawRect was in use, this function used the now deprecated + * scrollRect method of NSView. With the current updateLayer + * implementation, using a CGImage as the view's backing layer, we are + * able to use XCopyArea. But both implementations are incomplete. + * They return a damage area which is just the source rectangle minus + * destination rectangle. Other platforms, e.g. Windows, where + * this function is essentially provided by the windowing system, + * are able to add to the damage region the bounding rectangles of + * all subwindows which meet the source rectangle, even if they are + * contained in the destination rectangle. The information needed + * to do that is not available in this module, as far as I know. + * + * In fact, the Text widget is the only one which calls this + * function, and textDisp.c compensates for this defect by using + * macOS-specific code. This is possible because access to the + * list of all embedded windows in a Text widget is available in + * that module. * * Side effects: * Scrolls the bits in the window. @@ -1103,36 +1104,21 @@ XFillArcs( int TkScrollWindow( Tk_Window tkwin, /* The window to be scrolled. */ - TCL_UNUSED(GC), /* GC for window to be scrolled. */ + GC gc, /* GC for window to be scrolled. */ int x, int y, /* Position rectangle to be scrolled. */ int width, int height, int dx, int dy, /* Distance rectangle should be moved. */ Region damageRgn) /* Region to accumulate damage in. */ { Drawable drawable = Tk_WindowId(tkwin); - MacDrawable *macDraw = (MacDrawable *)drawable; - TKContentView *view = (TKContentView *)TkMacOSXGetNSViewForDrawable(macDraw); HIShapeRef srcRgn, dstRgn; HIMutableShapeRef dmgRgn = HIShapeCreateMutable(); - NSRect bounds, viewSrcRect, srcRect, dstRect; + NSRect srcRect, dstRect; int result = 0; - if (view) { - - /* - * Get the scroll area in NSView coordinates (origin at bottom left). - */ - - bounds = [view bounds]; - viewSrcRect = NSMakeRect(macDraw->xOff + x, - bounds.size.height - height - (macDraw->yOff + y), - width, height); - - /* - * Scroll the rectangle. - */ - - [view scrollRect:viewSrcRect by:NSMakeSize(dx, -dy)]; + // Should behave more like TkScrollWindow on other platforms + if (XCopyArea(Tk_Display(tkwin), drawable, drawable, gc, x, y, + (unsigned)width, (unsigned)height, x+dx, y+dy) == Success) { /* * Compute the damage region, using Tk coordinates (origin at top left). @@ -1237,14 +1223,19 @@ TkMacOSXSetupDrawingContext( * Intersect the drawable's clipping region with the region stored in the * X GC. If the resulting region is empty, don't do any drawing. */ - +//#if 0 // disable clipping (almost works, but windows can open up blank) dc.clipRgn = TkMacOSXGetClipRgn(d); ClipToGC(d, gc, &dc.clipRgn); if (dc.clipRgn && HIShapeIsEmpty(dc.clipRgn)) { + /* + * Things are probably not set up for drawing yet. Request a call to + * updateLayer and return failure. + */ canDraw = false; + [view setNeedsDisplay:YES]; goto end; } - +//#endif //disable clipping /* * If the drawable already has a CGContext, use it. Otherwise, we must be * drawing to a window and we use the current context of its ContentView. @@ -1252,53 +1243,62 @@ TkMacOSXSetupDrawingContext( dc.context = TkMacOSXGetCGContextForDrawable(d); if (!dc.context) { - NSRect drawingBounds, currentBounds; dc.view = view; - dc.context = GET_CGCONTEXT; + dc.context = view.tkLayerBitmapContext; if (dc.clipRgn) { CGRect clipBounds; CGAffineTransform t = { .a = 1, .b = 0, .c = 0, .d = -1, .tx = 0, .ty = [view bounds].size.height}; HIShapeGetBounds(dc.clipRgn, &clipBounds); clipBounds = CGRectApplyAffineTransform(clipBounds, t); - drawingBounds = NSRectFromCGRect(clipBounds); - } else { - drawingBounds = [view bounds]; } /* - * We can only draw into the NSView which is the current focusView. - * When the current [NSView focusView] is nil, the CGContext for - * [NSGraphicsContext currentContext] is nil. Otherwise the current - * CGContext draws into the current focusView. An NSView is guaranteed - * to be the focusView when its drawRect or setFrame methods are - * running. Prior to OSX 10.14 it was also possible to call the - * lockFocus method to force an NSView to become the current focusView. - * But that method was deprecated in 10.14 and so is no longer used by - * Tk. Instead, if the view is not the current focusView then we add - * the drawing bounds to its dirty rectangle and return false. The - * part of the view inside the drawing bounds will get redrawn during - * the next call to its drawRect method. + * Workaround for an Apple bug. + * + * Without the block below, ttk frames, labelframes and labels do not + * get the correct background color on macOS 12.5 after the appearance + * changes. This function is only called when drawing, so we know that + * our view is the focus view. Even though the effective appearance of + * the view has been changed, the currentAppearance, i.e. the + * appearance that will be used for drawing, may not have been changed + * to match. + * + * Prior to macOS 12.0 the currentAppearance property of NSAppearance + * was settable. In macOS 12.0 currentAppearance was deprecated and + * replaced by the read-only property currentDrawingAppearance. The + * ttk color issues are fixed by setting the currentAppearance to + * the effectiveAppearance of the view. So we are forced to use this + * deprecated function until Apple fixes this. + * + * It is a mystery why this only affects the ttk widgets. A possible + * clue is that when drawing a ttk widget this function is called with + * a NULL gc, whereas the gc is non-null when it is called for drawing + * a Tk widget. This means that the CGContext setup below is not done + * for ttk widgets. Perhaps that setup triggers an update of the + * currentAppearance property, but that has not been verified. */ - if (view != [NSView focusView]) { - [view addTkDirtyRect:drawingBounds]; - canDraw = false; - goto end; - } - - /* - * Drawing will also fail when the view is the current focusView but - * the clipping rectangle set by drawRect does not contain the clipping - * region of our drawing context. (See bug [2a61eca3a8].) If part of - * the drawing bounds will be clipped then we draw whatever we can, but - * we also add the drawing bounds to the view's dirty rectangle so it - * will get redrawn in the next call to its drawRect method. - */ + if (@available(macOS 12.0, *)) { +#if MAC_OS_X_VERSION_MAX_ALLOWED > 120000 + NSAppearance *current = NSAppearance.currentDrawingAppearance; + NSAppearance *effective = view.effectiveAppearance; + if( current != effective) { + // printf("Appearances are out of sync!\n"); + // Deprecations be damned! + NSAppearance.currentAppearance = effective; + } +#endif + } else { + /* + *It is not clear if this is a problem before macos 12.0, but + * we might as well do the update anyway. + */ - currentBounds = NSRectFromCGRect(CGContextGetClipBoundingBox(dc.context)); - if (!NSContainsRect(currentBounds, drawingBounds)) { - [view addTkDirtyRect:drawingBounds]; +#if MAC_OS_X_VERSION_MIN_REQUIRED < 120000 +/* currentAppearance is not deprecated. */ + NSAppearance.currentAppearance = view.effectiveAppearance; +#endif } } @@ -1324,6 +1324,7 @@ TkMacOSXSetupDrawingContext( }; CGContextConcatCTM(dc.context, t); } +//#if 0 // disable clipping if (dc.clipRgn) { #ifdef TK_MAC_DEBUG_DRAWING @@ -1369,6 +1370,8 @@ TkMacOSXSetupDrawingContext( CGContextClipToRect(dc.context, r); } } +//#endif //disable clipping + if (gc) { static const CGLineCap cgCap[] = { [CapNotLast] = kCGLineCapButt, @@ -1475,6 +1478,13 @@ TkMacOSXRestoreDrawingContext( dcPtr->clipRgn = NULL; } + /* + * Mark the view as needing to be redisplayed, since we have drawn on its + * backing layer. + */ + + [dcPtr->view setNeedsDisplay:YES]; + #ifdef TK_MAC_DEBUG bzero(dcPtr, sizeof(TkMacOSXDrawingContext)); #endif @@ -1524,10 +1534,13 @@ TkMacOSXGetClipRgn( } if (macDraw->drawRgn) { + // The drawRgn is the visRgn intersected with a rectangle which + // may be smaller than the widget bounds. clipRgn = HIShapeCreateCopy(macDraw->drawRgn); } else if (macDraw->visRgn) { clipRgn = HIShapeCreateCopy(macDraw->visRgn); } + // A NULL clipRgn does not allow any drawing at all. return clipRgn; } @@ -1537,7 +1550,9 @@ TkMacOSXGetClipRgn( * Tk_ClipDrawableToRect -- * * Clip all drawing into the drawable d to the given rectangle. If width - * or height are negative, reset to no clipping. + * or height are negative, reset to no clipping. This is called by the + * Text widget to display each DLine, and by the Canvas widget when it + * is updating a sub rectangle in the canvas. * * Results: * None. @@ -1566,7 +1581,10 @@ Tk_ClipDrawableToRect( width, height); HIShapeRef drawRgn = HIShapeCreateWithRect(&clipRect); - if (macDraw->winPtr && macDraw->flags & TK_CLIP_INVALID) { + // When drawing a Text widget we can reuse the + // clipping region for different DLines, so we don't want to + // update unless necessary. + if (macDraw->winPtr && (macDraw->flags & TK_CLIP_INVALID)) { TkMacOSXUpdateClipRgn(macDraw->winPtr); } if (macDraw->visRgn) { @@ -1657,7 +1675,7 @@ TkMacOSXMakeStippleMap( * * On the Macintosh, this puts a 1 pixel border in the bgGC color between * the widget and the focus ring, except in the case where highlightWidth - * is 1, in which case the border is left out. + * is 0 or 1, in which case the border is left out. * * For proper Mac L&F, use highlightWidth of 3. * @@ -1672,19 +1690,19 @@ TkMacOSXMakeStippleMap( */ void -Tk_DrawHighlightBorder ( +Tk_DrawHighlightBorder( Tk_Window tkwin, GC fgGC, GC bgGC, int highlightWidth, Drawable drawable) { - if (highlightWidth == 1) { - TkDrawInsetFocusHighlight (tkwin, fgGC, highlightWidth, drawable, 0); + if (highlightWidth <= 1) { + TkDrawInsetFocusHighlight(tkwin, fgGC, 1, drawable, 0); } else { - TkDrawInsetFocusHighlight (tkwin, bgGC, highlightWidth, drawable, 0); + TkDrawInsetFocusHighlight(tkwin, bgGC, highlightWidth, drawable, 0); if (fgGC != bgGC) { - TkDrawInsetFocusHighlight (tkwin, fgGC, highlightWidth - 1, + TkDrawInsetFocusHighlight(tkwin, fgGC, highlightWidth - 1, drawable, 0); } } diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index ef4f44d..8b556ba 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -850,12 +850,12 @@ EmbedStructureProc( if (eventPtr->type == ConfigureNotify) { /* - * Send a ConfigureNotify to the embedded application. - */ + * Send a ConfigureNotify to the embedded application. + */ - if (containerPtr->embeddedPtr != NULL) { - TkDoConfigureNotify(containerPtr->embeddedPtr); - } + if (containerPtr->embeddedPtr != NULL) { + TkDoConfigureNotify(containerPtr->embeddedPtr); + } if (containerPtr->embedded != None) { /* * Ignore errors, since the embedded application could have @@ -1011,9 +1011,8 @@ EmbedGeometryRequest( */ Tk_GeometryRequest((Tk_Window)winPtr, width, height); - while (Tcl_DoOneEvent(TCL_IDLE_EVENTS|TCL_TIMER_EVENTS|TCL_DONT_WAIT)) {} if ((winPtr->changes.width != width) - || (winPtr->changes.height != height)) { + || (winPtr->changes.height != height)) { EmbedSendConfigure(containerPtr); } } diff --git a/macosx/tkMacOSXEntry.c b/macosx/tkMacOSXEntry.c index 286a7fe..4579528 100644 --- a/macosx/tkMacOSXEntry.c +++ b/macosx/tkMacOSXEntry.c @@ -100,6 +100,7 @@ TkpDrawEntryBorderAndFocus( kThemeStateActive), .isFocused = (entryPtr->flags & GOT_FOCUS ? 1 : 0), }; + int borderWidth, highlightWidth; /* * I use 6 as the borderwidth. 2 of the 5 go into the actual frame the 3 @@ -107,8 +108,10 @@ TkpDrawEntryBorderAndFocus( * than Tk does on X11. */ - if (entryPtr->borderWidth != MAC_OSX_ENTRY_BORDER - || entryPtr->highlightWidth != MAC_OSX_FOCUS_WIDTH + Tk_GetPixelsFromObj(NULL, tkwin, entryPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, tkwin, entryPtr->highlightWidthObj, &highlightWidth); + if (borderWidth != MAC_OSX_ENTRY_BORDER + || highlightWidth != MAC_OSX_FOCUS_WIDTH || entryPtr->relief != MAC_OSX_ENTRY_RELIEF) { return 0; } diff --git a/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c index 4f36915..63493bc 100644 --- a/macosx/tkMacOSXEvent.c +++ b/macosx/tkMacOSXEvent.c @@ -35,7 +35,7 @@ enum { switch ((NSInteger)type) { case NSAppKitDefined: - subtype = [theEvent subtype]; + subtype = [theEvent subtype]; switch (subtype) { /* Ignored at the moment. */ @@ -49,11 +49,11 @@ enum { break; case NSWindowMovedEventType: break; - case NSWindowWillMoveEventType: - break; + case NSWindowWillMoveEventType: + break; - default: - break; + default: + break; } break; /* AppkitEvent. Return theEvent */ case NSKeyUp: @@ -80,7 +80,7 @@ enum { break; /* Mouse event. Return the processed event. */ #if 0 case NSSystemDefined: - subtype = [theEvent subtype]; + subtype = [theEvent subtype]; break; case NSApplicationDefined: { id win; @@ -88,14 +88,14 @@ enum { break; } case NSCursorUpdate: - break; + break; case NSEventTypeGesture: case NSEventTypeMagnify: case NSEventTypeRotate: case NSEventTypeSwipe: case NSEventTypeBeginGesture: case NSEventTypeEndGesture: - break; + break; #endif default: diff --git a/macosx/tkMacOSXFileTypes.c b/macosx/tkMacOSXFileTypes.c index 5df7ddd..acf2da9 100644 --- a/macosx/tkMacOSXFileTypes.c +++ b/macosx/tkMacOSXFileTypes.c @@ -26,9 +26,9 @@ without generating deprecation warnings. #include "tkMacOSXPrivate.h" #define CHARS_TO_OSTYPE(string) (OSType) string[0] << 24 | \ - (OSType) string[1] << 16 | \ - (OSType) string[2] << 8 | \ - (OSType) string[3] + (OSType) string[1] << 16 | \ + (OSType) string[2] << 8 | \ + (OSType) string[3] MODULE_SCOPE NSString *TkMacOSXOSTypeToUTI(OSType ostype) { char string[5]; diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index 3f71dd0..9df184d 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -16,8 +16,6 @@ #include "tkMacOSXFont.h" #include "tkMacOSXConstants.h" -#define defaultOrientation kCTFontDefaultOrientation -#define verticalOrientation kCTFontVerticalOrientation #define fixedPitch kCTFontUserFixedPitchFontType /* @@ -384,7 +382,7 @@ InitFont( fmPtr->fixed = [nsFont advancementForGlyph:glyphs[0]].width == [nsFont advancementForGlyph:glyphs[1]].width; bounds = NSRectFromCGRect(CTFontGetBoundingRectsForGlyphs((CTFontRef) - nsFont, defaultOrientation, ch, boundingRects, nCh)); + nsFont, kCTFontOrientationDefault, ch, boundingRects, nCh)); kern = [nsFont advancementForGlyph:glyphs[2]].width - [fontPtr->nsFont advancementForGlyph:glyphs[2]].width; } diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c index 8e1fff5..0d07fdf 100644 --- a/macosx/tkMacOSXHLEvents.c +++ b/macosx/tkMacOSXHLEvents.c @@ -307,34 +307,34 @@ static const char getSdefProc[] = "::tk::mac::GetDynamicSdef"; /* * This descriptor can be coerced to a file url. Construct a Tcl * expression which passes the file path as a string argument to - * ::tk::mac::DoScriptFile. + * ::tk::mac::DoScriptFile. */ if (noErr == AEGetParamPtr(theDesc, keyDirectObject, typeFileURL, &type, - (Ptr) URLBuffer, URL_MAX_LENGTH, &actual)) { - if (actual > 0) { - URLBuffer[actual] = '\0'; - NSString *urlString = [NSString stringWithUTF8String:(char*)URLBuffer]; - NSURL *fileURL = [NSURL URLWithString:urlString]; - AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo)); - Tcl_DString *scriptFileCommand = &AEInfo->command; - Tcl_DStringInit(scriptFileCommand); - Tcl_DStringAppend(scriptFileCommand, scriptFileProc, TCL_INDEX_NONE); - Tcl_DStringAppendElement(scriptFileCommand, [[fileURL path] UTF8String]); - AEInfo->interp = _eventInterp; - AEInfo->procedure = scriptFileProc; - AEInfo->replyEvent = nil; + (Ptr) URLBuffer, URL_MAX_LENGTH, &actual)) { + if (actual > 0) { + URLBuffer[actual] = '\0'; + NSString *urlString = [NSString stringWithUTF8String:(char*)URLBuffer]; + NSURL *fileURL = [NSURL URLWithString:urlString]; + AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo)); + Tcl_DString *scriptFileCommand = &AEInfo->command; + Tcl_DStringInit(scriptFileCommand); + Tcl_DStringAppend(scriptFileCommand, scriptFileProc, TCL_INDEX_NONE); + Tcl_DStringAppendElement(scriptFileCommand, [[fileURL path] UTF8String]); + AEInfo->interp = _eventInterp; + AEInfo->procedure = scriptFileProc; + AEInfo->replyEvent = nil; AEInfo->retryCount = 0; - ProcessAppleEvent((void *)AEInfo); - } - } + ProcessAppleEvent((void *)AEInfo); + } + } } else if (noErr == AEGetParamPtr(theDesc, keyDirectObject, typeUTF8Text, &type, NULL, 0, &actual)) { - /* - * The descriptor cannot be coerced to a file URL but can be coerced to - * text. Construct a Tcl expression which passes the text as a string - * argument to ::tk::mac::DoScriptText. - */ + /* + * The descriptor cannot be coerced to a file URL but can be coerced to + * text. Construct a Tcl expression which passes the text as a string + * argument to ::tk::mac::DoScriptText. + */ if (actual > 0) { char *data = (char *)ckalloc(actual + 1); @@ -350,23 +350,23 @@ static const char getSdefProc[] = "::tk::mac::GetDynamicSdef"; AEInfo->interp = _eventInterp; AEInfo->procedure = scriptTextProc; AEInfo->retryCount = 0; - if (Tcl_FindCommand(AEInfo->interp, AEInfo->procedure, NULL, 0)) { - AEInfo->replyEvent = replyEvent; - ProcessAppleEvent(AEInfo); - } else { - AEInfo->replyEvent = nil; - ProcessAppleEvent(AEInfo); - } + if (Tcl_FindCommand(AEInfo->interp, AEInfo->procedure, NULL, 0)) { + AEInfo->replyEvent = replyEvent; + ProcessAppleEvent(AEInfo); + } else { + AEInfo->replyEvent = nil; + ProcessAppleEvent(AEInfo); + } } } } } - (void)handleURLEvent:(NSAppleEventDescriptor*)event - withReplyEvent:(NSAppleEventDescriptor*)replyEvent + withReplyEvent:(NSAppleEventDescriptor*)replyEvent { NSString* url = [[event paramDescriptorForKeyword:keyDirectObject] - stringValue]; + stringValue]; const char *cURL=[url UTF8String]; AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo)); Tcl_DString *launchCommand = &AEInfo->command; @@ -456,18 +456,18 @@ static void ProcessAppleEvent( Tcl_DStringLength(&AEInfo->command), TCL_EVAL_GLOBAL); if (AEInfo->replyEvent && code >= 0) { - Tcl_Size reslen; - const char *result = Tcl_GetStringFromObj(Tcl_GetObjResult(AEInfo->interp), - &reslen); - if (code == TCL_OK) { - AEPutParamPtr((AppleEvent*)[AEInfo->replyEvent aeDesc], - keyDirectObject, typeChar, result, reslen); - } else { - AEPutParamPtr((AppleEvent*)[AEInfo->replyEvent aeDesc], - keyErrorString, typeChar, result, reslen); - AEPutParamPtr((AppleEvent*)[AEInfo->replyEvent aeDesc], - keyErrorNumber, typeSInt32, (Ptr) &code, sizeof(int)); - } + Tcl_Size reslen; + const char *result = Tcl_GetStringFromObj(Tcl_GetObjResult(AEInfo->interp), + &reslen); + if (code == TCL_OK) { + AEPutParamPtr((AppleEvent*)[AEInfo->replyEvent aeDesc], + keyDirectObject, typeChar, result, reslen); + } else { + AEPutParamPtr((AppleEvent*)[AEInfo->replyEvent aeDesc], + keyErrorString, typeChar, result, reslen); + AEPutParamPtr((AppleEvent*)[AEInfo->replyEvent aeDesc], + keyErrorNumber, typeSInt32, (Ptr) &code, sizeof(int)); + } } else if (code != TCL_OK) { Tcl_BackgroundException(AEInfo->interp, code); } @@ -537,8 +537,8 @@ TkMacOSXInitAppleEvents( /* * We do not load our sdef dynamically but this event handler - * is required to silence error messages from inline execution - * of AppleScript at the Objective-C level. + * is required to silence error messages from inline execution + * of AppleScript at the Objective-C level. */ [aeManager setEventHandler:NSApp andSelector:@selector(handleGetSDEFEvent:withReplyEvent:) diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index 99cfdd1..580a112 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -19,6 +19,10 @@ #include "tkColor.h" #include "xbytes.h" +static CGImageRef CreateCGImageFromPixmap(Drawable pixmap); +static CGImageRef CreateCGImageFromDrawableRect( Drawable drawable, int force_1x_scale, + int x, int y, unsigned int width, unsigned int height); + /* Pixel formats * * Tk uses the XImage structure defined in Xlib.h for storing images. The @@ -510,8 +514,16 @@ TkMacOSXPutImage( return BadDrawable; } if (dc.context) { - CGRect bounds, srcRect, dstRect; + CGRect dstRect, srcRect = CGRectMake(src_x, src_y, width, height); + /* + * Whole image is copied before cropping. For performance, + * consider revising TkMacOSXCreateCGImageWithXImage() to accept + * source x/y/w/h and copy only the needed portion instead. + */ CGImageRef img = TkMacOSXCreateCGImageWithXImage(image, pixelFormat); + CGImageRef cropped = CGImageCreateWithImageInRect(img, srcRect); + CGImageRelease(img); + img = cropped; /* * The CGContext for a pixmap is RGB only, with A = 0. @@ -521,12 +533,9 @@ TkMacOSXPutImage( CGContextSetBlendMode(dc.context, kCGBlendModeSourceAtop); } if (img) { - bounds = CGRectMake(0, 0, image->width, image->height); - srcRect = CGRectMake(src_x, src_y, width, height); dstRect = CGRectMake(dest_x, dest_y, width, height); - TkMacOSXDrawCGImage(drawable, gc, dc.context, - img, gc->foreground, gc->background, - bounds, srcRect, dstRect); + TkMacOSXDrawCGImage(drawable, gc, dc.context, img, + gc->foreground, gc->background, dstRect); CFRelease(img); } else { TkMacOSXDbgMsg("Invalid source drawable"); @@ -620,6 +629,11 @@ int TkpPutRGBAImage( * with origin at the top left, as used by XImage and CGImage, not bottom * left as used by NSView. * + * If force_1x_scale is true, then the returned CGImage will be downscaled + * if necessary to have the requested width and height. Othewise, for + * windows on Retina displays, the width and height of the returned CGImage + * will be twice the requested width and height. + * * Side effects: * None * @@ -629,6 +643,7 @@ int TkpPutRGBAImage( static CGImageRef CreateCGImageFromDrawableRect( Drawable drawable, + int force_1x_scale, int x, int y, unsigned int width, @@ -637,6 +652,7 @@ CreateCGImageFromDrawableRect( MacDrawable *mac_drawable = (MacDrawable *)drawable; CGContextRef cg_context = NULL; CGImageRef cg_image = NULL, result = NULL; + CGFloat scaleFactor = 1.0; if (mac_drawable->flags & TK_IS_PIXMAP) { cg_context = TkMacOSXGetCGContextForDrawable(drawable); CGContextRetain(cg_context); @@ -646,18 +662,9 @@ CreateCGImageFromDrawableRect( TkMacOSXDbgMsg("Invalid source drawable"); return NULL; } - NSSize size = view.frame.size; - NSUInteger view_width = size.width, view_height = size.height; - NSUInteger bytesPerPixel = 4, - bytesPerRow = bytesPerPixel * view_width, - bitsPerComponent = 8; - CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); - cg_context = CGBitmapContextCreate(NULL, view_width, view_height, - bitsPerComponent, bytesPerRow, colorSpace, - kCGImageAlphaPremultipliedLast | - kCGBitmapByteOrder32Big); - CFRelease(colorSpace); - [view.layer renderInContext:cg_context]; + scaleFactor = view.layer.contentsScale; + cg_context = ((TKContentView *)view).tkLayerBitmapContext; + CGContextRetain(cg_context); } if (cg_context) { cg_image = CGBitmapContextCreateImage(cg_context); @@ -666,7 +673,33 @@ CreateCGImageFromDrawableRect( if (cg_image) { CGRect rect = CGRectMake(x + mac_drawable->xOff, y + mac_drawable->yOff, width, height); - result = CGImageCreateWithImageInRect(cg_image, rect); + rect = CGRectApplyAffineTransform(rect, CGAffineTransformMakeScale(scaleFactor, scaleFactor)); + if (force_1x_scale && (scaleFactor != 1.0)) { + // See https://web.archive.org/web/20200219030756/http://blog.foundry376.com/2008/07/scaling-a-cgimage/#comment-200 + // create context, keeping original image properties + CGColorSpaceRef colorspace = CGImageGetColorSpace(cg_image); + cg_context = CGBitmapContextCreate(NULL, width, height, + CGImageGetBitsPerComponent(cg_image), + //CGImageGetBytesPerRow(cg_image), // wastes space? + CGImageGetBitsPerPixel(cg_image) * width / 8, + colorspace, + CGImageGetAlphaInfo(cg_image)); + CGColorSpaceRelease(colorspace); + if (cg_context) { + // Extract the subimage in the specified rectangle. + CGImageRef subimage = CGImageCreateWithImageInRect(cg_image, rect); + // Draw the subimage in our context (resizing it to fit). + CGContextDrawImage(cg_context, CGRectMake(0, 0, width, height), + subimage); + // We will return the image we just drew. + result = CGBitmapContextCreateImage(cg_context); + CGContextRelease(cg_context); + CGImageRelease(subimage); + } + } else { + // No resizing is needed. Just return the subimage + result = CGImageCreateWithImageInRect(cg_image, rect); + } CGImageRelease(cg_image); } return result; @@ -786,12 +819,13 @@ XGetImage( TCL_UNUSED(unsigned long), /* plane_mask */ int format) { - NSBitmapImageRep* bitmapRep = nil; - NSUInteger bitmap_fmt = 0; XImage* imagePtr = NULL; + NSBitmapImageRep* bitmapRep = nil; + NSBitmapFormat bitmap_fmt = 0; char *bitmap = NULL; int depth = 32, offset = 0, bitmap_pad = 0; - unsigned int bytes_per_row, size, row, n, m; + NSInteger bytes_per_row, samples_per_pixel, size; + unsigned int row, n, m; if (format == ZPixmap) { CGImageRef cgImage; @@ -799,7 +833,8 @@ XGetImage( return NULL; } - cgImage = CreateCGImageFromDrawableRect(drawable, x, y, width, height); + // Request 1x-scale image for compatibility + cgImage = CreateCGImageFromDrawableRect(drawable, 1, x, y, width, height); if (cgImage) { bitmapRep = [NSBitmapImageRep alloc]; [bitmapRep initWithCGImage:cgImage]; @@ -811,10 +846,27 @@ XGetImage( bitmap_fmt = [bitmapRep bitmapFormat]; size = [bitmapRep bytesPerPlane]; bytes_per_row = [bitmapRep bytesPerRow]; + samples_per_pixel = [bitmapRep samplesPerPixel]; +#if 0 + fprintf(stderr, "XGetImage:\n" + " bitmsp_fmt = %ld\n" + " samples_per_pixel = %ld\n" + " width = %u\n" + " height = %u\n" + " bytes_per_row = %ld\n" + " size = %ld\n", + bitmap_fmt, samples_per_pixel, width, height, bytes_per_row, size); +#endif + /* + * Image data with all pixels having alpha value 255 may be reported + * as 3 samples per pixel, even though each row has 4*width pixels and + * the pixels are stored in the default ARGB32 format. + */ + if ((bitmap_fmt != 0 && bitmap_fmt != NSAlphaFirstBitmapFormat) - || [bitmapRep samplesPerPixel] != 4 + || samples_per_pixel < 3 + || samples_per_pixel > 4 || [bitmapRep isPlanar] != 0 - || bytes_per_row < 4 * width || size != bytes_per_row * height) { TkMacOSXDbgMsg("XGetImage: Unrecognized bitmap format"); [bitmapRep release]; @@ -844,6 +896,7 @@ XGetImage( } } } + imagePtr = XCreateImage(display, NULL, depth, format, offset, (char*) bitmap, width, height, bitmap_pad, bytes_per_row); @@ -890,9 +943,8 @@ XCopyArea( int dest_y) { TkMacOSXDrawingContext dc; - MacDrawable *srcDraw = (MacDrawable *)src; CGImageRef img = NULL; - CGRect bounds, srcRect, dstRect; + CGRect dstRect; LastKnownRequestProcessed(display)++; if (!width || !height) { @@ -909,20 +961,13 @@ XCopyArea( return BadDrawable; } - if (srcDraw->flags & TK_IS_PIXMAP) { - img = CreateCGImageFromPixmap(src); - } else if (TkMacOSXGetNSWindowForDrawable(src)) { - img = CreateCGImageFromDrawableRect(src, src_x, src_y, width, height); - } else { - TkMacOSXDbgMsg("Invalid source drawable - neither window nor pixmap."); - } + // Use unscaled source (TkMacOSXDrawCGImage() will implicitly downscale) + img = CreateCGImageFromDrawableRect(src, 0, src_x, src_y, width, height); if (img) { - bounds = CGRectMake(0, 0, srcDraw->size.width, srcDraw->size.height); - srcRect = CGRectMake(src_x, src_y, width, height); dstRect = CGRectMake(dest_x, dest_y, width, height); TkMacOSXDrawCGImage(dst, gc, dc.context, img, - gc->foreground, gc->background, bounds, srcRect, dstRect); + gc->foreground, gc->background, dstRect); CFRelease(img); } else { TkMacOSXDbgMsg("Failed to construct CGImage."); @@ -967,7 +1012,7 @@ XCopyPlane( TkMacOSXDrawingContext dc; MacDrawable *srcDraw = (MacDrawable *)src; MacDrawable *dstDraw = (MacDrawable *)dst; - CGRect bounds, srcRect, dstRect; + CGRect srcRect, dstRect; LastKnownRequestProcessed(display)++; if (!width || !height) { /* TkMacOSXDbgMsg("Drawing of empty area requested"); */ @@ -990,7 +1035,7 @@ XCopyPlane( TkpClipMask *clipPtr = (TkpClipMask *) gc->clip_mask; unsigned long imageBackground = gc->background; - if (clipPtr && clipPtr->type == TKP_CLIP_PIXMAP) { + if (clipPtr && clipPtr->type == TKP_CLIP_PIXMAP) { srcRect = CGRectMake(src_x, src_y, width, height); CGImageRef mask = CreateCGImageFromPixmap( clipPtr->value.pixmap); @@ -1033,13 +1078,9 @@ XCopyPlane( CGImageRelease(submask); CGImageRelease(subimage); } else { - bounds = CGRectMake(0, 0, - srcDraw->size.width, srcDraw->size.height); - srcRect = CGRectMake(src_x, src_y, width, height); dstRect = CGRectMake(dest_x, dest_y, width, height); TkMacOSXDrawCGImage(dst, gc, dc.context, img, - gc->foreground, imageBackground, bounds, - srcRect, dstRect); + gc->foreground, imageBackground, dstRect); CGImageRelease(img); } } else { @@ -1100,8 +1141,8 @@ struct TkMacOSXNSImageModel { int ring; /* Thickness of the focus ring. */ double alpha; /* Transparency, between 0.0 and 1.0*/ char *imageName ; /* Malloc'ed image name. */ - char *source; /* Malloc'ed string describing the image. */ - char *as; /* Malloc'ed interpretation of source */ + Tcl_Obj *sourceObj; /* Describing the image. */ + Tcl_Obj *asObj; /* Interpretation of source */ int flags; /* Sundry flags, defined below. */ bool pressed; /* Image is for use in a pressed button.*/ bool templ; /* Image is for use as a template.*/ @@ -1163,24 +1204,24 @@ static Tk_ImageType TkMacOSXNSImageType = { static const Tk_OptionSpec systemImageOptions[] = { {TK_OPTION_STRING, "-source", NULL, NULL, DEF_SOURCE, - -1, offsetof(TkMacOSXNSImageModel, source), 0, NULL, 0}, + offsetof(TkMacOSXNSImageModel, sourceObj), TCL_INDEX_NONE, 0, NULL, 0}, {TK_OPTION_STRING, "-as", NULL, NULL, DEF_AS, - -1, offsetof(TkMacOSXNSImageModel, as), 0, NULL, 0}, + offsetof(TkMacOSXNSImageModel, asObj), TCL_INDEX_NONE, 0, NULL, 0}, {TK_OPTION_INT, "-width", NULL, NULL, DEF_WIDTH, - -1, offsetof(TkMacOSXNSImageModel, width), 0, NULL, 0}, + TCL_INDEX_NONE, offsetof(TkMacOSXNSImageModel, width), 0, NULL, 0}, {TK_OPTION_INT, "-height", NULL, NULL, DEF_HEIGHT, - -1, offsetof(TkMacOSXNSImageModel, height), 0, NULL, 0}, + TCL_INDEX_NONE, offsetof(TkMacOSXNSImageModel, height), 0, NULL, 0}, {TK_OPTION_INT, "-radius", NULL, NULL, DEF_RADIUS, - -1, offsetof(TkMacOSXNSImageModel, radius), 0, NULL, 0}, + TCL_INDEX_NONE, offsetof(TkMacOSXNSImageModel, radius), 0, NULL, 0}, {TK_OPTION_INT, "-ring", NULL, NULL, DEF_RING, - -1, offsetof(TkMacOSXNSImageModel, ring), 0, NULL, 0}, + TCL_INDEX_NONE, offsetof(TkMacOSXNSImageModel, ring), 0, NULL, 0}, {TK_OPTION_DOUBLE, "-alpha", NULL, NULL, DEF_ALPHA, - -1, offsetof(TkMacOSXNSImageModel, alpha), 0, NULL, 0}, + TCL_INDEX_NONE, offsetof(TkMacOSXNSImageModel, alpha), 0, NULL, 0}, {TK_OPTION_BOOLEAN, "-pressed", NULL, NULL, DEF_PRESSED, - -1, offsetof(TkMacOSXNSImageModel, pressed), TK_OPTION_VAR(bool), NULL, 0}, + TCL_INDEX_NONE, offsetof(TkMacOSXNSImageModel, pressed), TK_OPTION_VAR(bool), NULL, 0}, {TK_OPTION_BOOLEAN, "-template", NULL, NULL, DEF_TEMPLATE, - -1, offsetof(TkMacOSXNSImageModel, templ), TK_OPTION_VAR(bool), NULL, 0}, - {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, NULL, 0} + TCL_INDEX_NONE, offsetof(TkMacOSXNSImageModel, templ), TK_OPTION_VAR(bool), NULL, 0}, + {TK_OPTION_END, NULL, NULL, NULL, NULL, TCL_INDEX_NONE, TCL_INDEX_NONE, 0, NULL, 0} }; /* @@ -1296,7 +1337,7 @@ TkMacOSXNSImageConfigureModel( modelPtr->height = oldHeight; } - if (modelPtr->source == NULL || modelPtr->source[0] == '0') { + if (modelPtr->sourceObj == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("-source is required.", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TK", "IMAGE", "SYSTEM", "BAD_VALUE", NULL); goto errorExit; @@ -1313,7 +1354,7 @@ TkMacOSXNSImageConfigureModel( goto errorExit; } - source = [[NSString alloc] initWithUTF8String: modelPtr->source]; + source = [[NSString alloc] initWithUTF8String: Tcl_GetString(modelPtr->sourceObj)]; switch (sourceInterpretation) { case NAME_SOURCE: newImage = [[NSImage imageNamed:source] copy]; @@ -1369,7 +1410,7 @@ TkMacOSXNSImageConfigureModel( case NAME_SOURCE: Tcl_SetObjResult(interp, Tcl_NewStringObj("Unknown named NSImage.\n" "Try omitting ImageName, " - "e.g. use NSCaution for NSImageNameCaution.", TCL_INDEX_NONE)); + "e.g. use NSCaution for NSImageNameCaution.", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TK", "IMAGE", "SYSTEM", "BAD_VALUE", NULL); goto errorExit; case FILE_SOURCE: @@ -1473,9 +1514,9 @@ TkMacOSXNSImageObjCmd( objPtr = Tk_GetOptionValue(interp, (char *)modelPtr, optionTable, objv[2], NULL); if (objPtr == NULL) { - goto error; - } - Tcl_SetObjResult(interp, objPtr); + goto error; + } + Tcl_SetObjResult(interp, objPtr); break; case CONFIGURE: if (objc == 2) { @@ -1550,8 +1591,8 @@ TkMacOSXNSImageCreate( modelPtr->instancePtr = NULL; modelPtr->image = NULL; modelPtr->darkModeImage = NULL; - modelPtr->source = NULL; - modelPtr->as = NULL; + modelPtr->sourceObj = NULL; + modelPtr->asObj = NULL; /* * Process configuration options given in the image create command. @@ -1736,8 +1777,8 @@ TkMacOSXNSImageDelete( Tcl_DeleteCommand(modelPtr->interp, modelPtr->imageName); ckfree(modelPtr->imageName); - ckfree(modelPtr->source); - ckfree(modelPtr->as); + Tcl_DecrRefCount(modelPtr->sourceObj); + Tcl_DecrRefCount(modelPtr->asObj); [modelPtr->image release]; [modelPtr->darkModeImage release]; ckfree(modelPtr); diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index ea4d4e4..bcae214 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -15,6 +15,7 @@ #include "tkMacOSXPrivate.h" #include "tkMacOSXConstants.h" +#include "tkMacOSXWm.h" #include <dlfcn.h> #include <objc/objc-auto.h> #include <sys/stat.h> @@ -41,9 +42,8 @@ static Tcl_ObjCmdProc2 TkMacOSVersionObjCmd; @implementation TKApplication @synthesize poolLock = _poolLock; @synthesize macOSVersion = _macOSVersion; -@synthesize isDrawing = _isDrawing; -@synthesize isSigned = _isSigned; @synthesize tkLiveResizeEnded = _tkLiveResizeEnded; +@synthesize tkWillExit = _tkWillExit; @synthesize tkPointerWindow = _tkPointerWindow; - (void) setTkPointerWindow: (TkWindow *)winPtr { @@ -137,6 +137,7 @@ static Tcl_ObjCmdProc2 TkMacOSVersionObjCmd; - (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app { + (void) app; return YES; } @@ -181,7 +182,6 @@ static Tcl_ObjCmdProc2 TkMacOSVersionObjCmd; */ TkMacOSXInitAppleEvents(_eventInterp); - } @@ -204,18 +204,7 @@ static Tcl_ObjCmdProc2 TkMacOSVersionObjCmd; */ Ttk_MacOSXInit(); - - /* - * It is not safe to force activation of the NSApp until this method is - * called. Activating too early can cause the menu bar to be unresponsive. - * The call to activateIgnoringOtherApps was moved here to avoid this. - * However, with the release of macOS 10.15 (Catalina) that was no longer - * sufficient. (See ticket bf93d098d7.) The call to setActivationPolicy - * needed to be moved into this function as well. - */ - [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; - [NSApp activateIgnoringOtherApps: YES]; /* * Add an event monitor so we continue to receive NSMouseMoved and @@ -230,15 +219,6 @@ static Tcl_ObjCmdProc2 TkMacOSVersionObjCmd; { return event; }]; - - /* - * Process events to ensure that the root window is fully initialized. See - * ticket 56a1823c73. - */ - - [NSApp _lockAutoreleasePool]; - while (Tcl_DoOneEvent(TCL_WINDOW_EVENTS|TCL_DONT_WAIT)) {} - [NSApp _unlockAutoreleasePool]; } - (void) _setup: (Tcl_Interp *) interp @@ -290,12 +270,6 @@ static Tcl_ObjCmdProc2 TkMacOSVersionObjCmd; [NSApp setMacOSVersion: 10000*majorVersion + 100*minorVersion]; /* - * We are not drawing right now. - */ - - [NSApp setIsDrawing:NO]; - - /* * Be our own delegate. */ @@ -394,7 +368,7 @@ static void closePanels( [[NSFontPanel sharedFontPanel] orderOut:nil]; } if ([NSColorPanel sharedColorPanelExists]) { - [[NSColorPanel sharedColorPanel] orderOut:nil]; + [[NSColorPanel sharedColorPanel] orderOut:nil]; } } @@ -431,6 +405,21 @@ TCL_NORETURN void TkpExitProc( } /* + * At this point it is too late to be looking up the Tk window associated + * to any NSWindows, but it can happen. This makes sure the answer is None + * if such a query is attempted. It is also too late to be running any + * event loops, as happens in updateLayer. Set the tkWillExit flag to + * prevent this. + */ + + [NSApp setTkWillExit:YES]; + for (TKWindow *w in [NSApp orderedWindows]) { + if ([w respondsToSelector: @selector (tkWindow)]) { + [w setTkWindow: None]; + } + } + + /* * Tcl_Exit does not call Tcl_Finalize if there is an exit proc installed. */ @@ -457,6 +446,26 @@ static void TkMacOSXSignalHandler(TCL_UNUSED(int)) { Tcl_Exit(1); } +/* + * This static function is run as an idle task to order the root window front. + * This is only done if the window is in the normal state. This avoids + * flashing the root window on the screen if it was withdrawn immediately after + * loading Tk. + */ + +static void showRootWindow(void *clientData) { + NSWindow *root = (NSWindow *) clientData; + if ([NSApp tkWillExit]) { + return; + } + TkWindow *winPtr = TkMacOSXGetTkWindow(root); + WmInfo *wmPtr = winPtr->wmInfoPtr; + if (wmPtr->hints.initial_state == NormalState) { + [root makeKeyAndOrderFront:NSApp]; + } + [NSApp activateIgnoringOtherApps: YES]; +} + int TkpInit( Tcl_Interp *interp) @@ -471,15 +480,15 @@ TkpInit( if (!initialized) { struct stat st; Bool shouldOpenConsole = NO; - Bool stdinIsNullish = (!isatty(0) && + Bool stdinIsNullish = (!isatty(0) && (fstat(0, &st) || (S_ISCHR(st.st_mode) && st.st_blocks == 0))); /* * Initialize/check OS version variable for runtime checks. */ -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 -# error Mac OS X 10.6 required +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 +# error Mac OS X 10.9 required #endif initialized = 1; @@ -495,7 +504,7 @@ TkpInit( if (Tcl_MacOSXOpenVersionedBundleResources(interp, "com.tcltk.tklibrary", TK_FRAMEWORK_VERSION, 0, PATH_MAX, tkLibPath) != TCL_OK) { - # if 0 /* This is not really an error. Wish still runs fine. */ + # if 0 /* This is not really an error. Wish still runs fine. */ TkMacOSXDbgMsg("Tcl_MacOSXOpenVersionedBundleResources failed"); # endif } @@ -517,40 +526,40 @@ TkpInit( [TKApplication sharedApplication]; [pool drain]; - /* - * WARNING: The finishLaunching method runs asynchronously. This - * creates a race between the initialization of the NSApplication and - * the initialization of Tk. If Tk wins the race bad things happen - * with the root window (see below). If the NSApplication wins then an - * AppleEvent created during launch, e.g. by dropping a file icon on - * the application icon, will be delivered before the procedure meant - * to to handle the AppleEvent has been defined. This is handled in - * tkMacOSXHLEvents.c by scheduling a timer event to handle the - * AppleEvent later, after the required procedure has been defined. - */ + /* + * WARNING: The finishLaunching method runs asynchronously. This + * creates a race between the initialization of the NSApplication and + * the initialization of Tk. If Tk wins the race bad things happen + * with the root window (see below). If the NSApplication wins then an + * AppleEvent created during launch, e.g. by dropping a file icon on + * the application icon, will be delivered before the procedure meant + * to to handle the AppleEvent has been defined. This is handled in + * tkMacOSXHLEvents.c by scheduling a timer event to handle the + * AppleEvent later, after the required procedure has been defined. + */ [NSApp _setup:interp]; [NSApp finishLaunching]; - /* - * Create a Tk event source based on the Appkit event queue. - */ + /* + * Create a Tk event source based on the Appkit event queue. + */ Tk_MacOSXSetupTkNotifier(); /* * If Tk initialization wins the race, the root window is mapped before - * the NSApplication is initialized. This can cause bad things to - * happen. The root window can open off screen with no way to make it - * appear on screen until the app icon is clicked. This will happen if - * a Tk application opens a modal window in its startup script (see - * ticket 56a1823c73). In other cases, an empty root window can open - * on screen and remain visible for a noticeable amount of time while - * the Tk initialization finishes (see ticket d1989fb7cf). The call - * below forces Tk to block until the Appkit event queue has been - * created. This seems to be sufficient to ensure that the - * NSApplication initialization wins the race, avoiding these bad - * window behaviors. + * the NSApplication is initialized. This can cause bad things to + * happen. The root window can open off screen with no way to make it + * appear on screen until the app icon is clicked. This will happen if + * a Tk application opens a modal window in its startup script (see + * ticket 56a1823c73). In other cases, an empty root window can open + * on screen and remain visible for a noticeable amount of time while + * the Tk initialization finishes (see ticket d1989fb7cf). The call + * below forces Tk to block until the Appkit event queue has been + * created. This seems to be sufficient to ensure that the + * NSApplication initialization wins the race, avoiding these bad + * window behaviors. */ Tcl_DoOneEvent(TCL_WINDOW_EVENTS | TCL_DONT_WAIT); @@ -600,6 +609,9 @@ TkpInit( #if defined(USE_CUSTOM_EXIT_PROC) doCleanupFromExit = YES; #endif + } else if (getenv("TK_NO_STDERR") != NULL) { + FILE *null = fopen("/dev/null", "w"); + dup2(fileno(null), STDERR_FILENO); } /* @@ -625,14 +637,22 @@ TkpInit( * The root window has been created and mapped, but XMapWindow deferred its * call to makeKeyAndOrderFront because the first call to XMapWindow * occurs too early in the initialization process for that. Process idle - * tasks now, so the root window is configured, then order it front. + * tasks now, so the root window is configured. */ while(Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {}; + for (NSWindow *window in [NSApp windows]) { TkWindow *winPtr = TkMacOSXGetTkWindow(window); if (winPtr && Tk_IsMapped(winPtr)) { - [window makeKeyAndOrderFront:NSApp]; + + /* + * Ordering the root window front in an idle task allows + * checking whether it was immediately withdrawn, and + * therefore does not need to be placed on the screen. + */ + + Tcl_DoWhenIdle(showRootWindow, window); break; } } @@ -675,7 +695,7 @@ TkpInit( Tcl_CreateObjCommand2(interp, "::tk::mac::GetAppPath", TkMacOSXGetAppPathObjCmd, NULL, NULL); Tcl_CreateObjCommand2(interp, "::tk::mac::macOSVersion", - TkMacOSVersionObjCmd, NULL, NULL); + TkMacOSVersionObjCmd, NULL, NULL); MacSystrayInit(interp); MacPrint_Init(interp); diff --git a/macosx/tkMacOSXInt.h b/macosx/tkMacOSXInt.h index 29b20f7..feb6a32 100644 --- a/macosx/tkMacOSXInt.h +++ b/macosx/tkMacOSXInt.h @@ -88,7 +88,6 @@ typedef struct TkWindowPrivate MacDrawable; #define TK_DRAWN_UNDER_MENU 0x08 #define TK_IS_PIXMAP 0x10 #define TK_IS_BW_PIXMAP 0x20 -#define TK_DO_NOT_DRAW 0x40 #define TTK_HAS_CONTRASTING_BG 0x80 /* diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index a16eb42..19c7ba9 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -64,8 +64,8 @@ static NSUInteger textInputModifiers; static NSMutableArray *nsEvArray = nil; if (nsEvArray == nil) { - nsEvArray = [[NSMutableArray alloc] initWithCapacity: 1]; - processingCompose = NO; + nsEvArray = [[NSMutableArray alloc] initWithCapacity: 1]; + processingCompose = NO; } if (!winPtr) { return theEvent; @@ -80,7 +80,7 @@ static NSUInteger textInputModifiers; if ([theEvent type] == NSKeyDown && [theEvent isARepeat] && [NSEvent keyRepeatDelay] < 0) { - return theEvent; + return theEvent; } /* @@ -288,8 +288,6 @@ static NSUInteger textInputModifiers; @implementation TKContentView -@synthesize tkDirtyRect = _tkDirtyRect; -@synthesize tkNeedsDisplay = _tkNeedsDisplay; /* * Implementation of the NSTextInputClient protocol. @@ -311,7 +309,7 @@ static NSUInteger textInputModifiers; Bool sendingIMEText = NO; str = ([aString isKindOfClass: [NSAttributedString class]]) ? - [aString string] : aString; + [aString string] : aString; len = [str length]; if (NS_KEYLOG) { @@ -426,7 +424,7 @@ static NSUInteger textInputModifiers; (void)selRange; str = ([aString isKindOfClass: [NSAttributedString class]]) ? - [aString string] : aString; + [aString string] : aString; if (focusWin) { /* @@ -636,12 +634,12 @@ setupXEvent(XEvent *xEvent, Tk_Window tkwin, NSUInteger modifiers) display = Tk_Display(tkwin); if (modifiers) { state = (modifiers & NSAlphaShiftKeyMask ? LockMask : 0) | - (modifiers & NSShiftKeyMask ? ShiftMask : 0) | - (modifiers & NSControlKeyMask ? ControlMask : 0) | - (modifiers & NSCommandKeyMask ? Mod1Mask : 0) | - (modifiers & NSAlternateKeyMask ? Mod2Mask : 0) | - (modifiers & NSNumericPadKeyMask ? Mod3Mask : 0) | - (modifiers & NSFunctionKeyMask ? Mod4Mask : 0) ; + (modifiers & NSShiftKeyMask ? ShiftMask : 0) | + (modifiers & NSControlKeyMask ? ControlMask : 0) | + (modifiers & NSCommandKeyMask ? Mod1Mask : 0) | + (modifiers & NSAlternateKeyMask ? Mod2Mask : 0) | + (modifiers & NSNumericPadKeyMask ? Mod3Mask : 0) | + (modifiers & NSFunctionKeyMask ? Mod4Mask : 0) ; } memset(xEvent, 0, sizeof(XEvent)); xEvent->xany.serial = LastKnownRequestProcessed(display); diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c index 3874dbd..f898496 100644 --- a/macosx/tkMacOSXKeyboard.c +++ b/macosx/tkMacOSXKeyboard.c @@ -268,7 +268,7 @@ UpdateKeymaps() */ for (index = 3; index >= 0; index--) { - for (virt = 0; virt < 128; virt++) { + for (virt = 0; virt < 128; virt++) { MacKeycode macKC; macKC.v = (keycode_v) {.virt = virt, .o_s = index, .keychar = 0}; int modifiers = INDEX2CARBON(index); @@ -288,7 +288,7 @@ UpdateKeymaps() hPtr = Tcl_CreateHashEntry(&unichar2xvirtual, INT2PTR(macKC.x.keychar), &dummy); Tcl_SetHashValue(hPtr, INT2PTR(macKC.x.xvirtual)); - } + } xvirtual2unichar[macKC.x.xvirtual] = macKC.x.keychar; } } diff --git a/macosx/tkMacOSXKeysyms.h b/macosx/tkMacOSXKeysyms.h index 51b2fc8..339fc8d 100644 --- a/macosx/tkMacOSXKeysyms.h +++ b/macosx/tkMacOSXKeysyms.h @@ -48,7 +48,7 @@ static const KeyInfo keyArray[] = { {57, XK_Caps_Lock, MOD_KEYCHAR}, {58, XK_Alt_L, MOD_KEYCHAR}, {59, XK_Control_L, MOD_KEYCHAR}, - {60, XK_Shift_R, MOD_KEYCHAR}, + {60, XK_Shift_R, MOD_KEYCHAR}, {61, XK_Alt_R, MOD_KEYCHAR}, {62, XK_Control_R, MOD_KEYCHAR}, {63, XK_Super_L, MOD_KEYCHAR}, @@ -684,7 +684,7 @@ static const KeysymInfo keysymTable[] = { {0x07c8, 0x0398}, /* Greek_THETA */ {0x07c9, 0x0399}, /* Greek_IOTA */ {0x07ca, 0x039a}, /* Greek_KAPPA */ - {0x07cb, 0x039b}, /* Greek_LAMDA */ + {0x07cb, 0x039b}, /* Greek_LAMBDA */ {0x07cc, 0x039c}, /* Greek_MU */ {0x07cd, 0x039d}, /* Greek_NU */ {0x07ce, 0x039e}, /* Greek_XI */ diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 1908bb9..ac8ec6f 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -960,8 +960,6 @@ TkpPostMenu( } realWin = Tk_Parent(realWin); } - NSWindow *win = [realWinView window]; - NSView *view = [win contentView]; NSMenu *menu = (NSMenu *) menuPtr->platformData; NSInteger itemIndex = index; NSInteger numItems = [menu numberOfItems]; @@ -971,8 +969,8 @@ TkpPostMenu( inPostMenu = true; result = TkPreprocessMenu(menuPtr); if (result != TCL_OK) { - inPostMenu = false; - return result; + inPostMenu = false; + return result; } if (itemIndex >= numItems) { itemIndex = numItems - 1; @@ -991,8 +989,9 @@ TkpPostMenu( } [menu popUpMenuPositioningItem:item - atLocation:[win tkConvertPointFromScreen:location] - inView:view]; + atLocation:location + inView:nil + appearance:realWinView.effectiveAppearance]; inPostMenu = false; return TCL_OK; } @@ -1417,7 +1416,7 @@ TkpComputeStandardMenuGeometry( } menuSize = [(NSMenu *) menuPtr->platformData size]; - Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthPtr, + Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->activeBorderWidthPtr, &activeBorderWidth); diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c index ac7befd..128a5d9 100644 --- a/macosx/tkMacOSXMenubutton.c +++ b/macosx/tkMacOSXMenubutton.c @@ -170,10 +170,11 @@ TkpDisplayMenuButton( Tk_Window tkwin = butPtr->tkwin; Pixmap pixmap; DrawParams *dpPtr = &mbPtr->drawParams; + int highlightWidth; butPtr->flags &= ~REDRAW_PENDING; if ((butPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { - return; + return; } pixmap = (Pixmap) Tk_WindowId(tkwin); @@ -190,10 +191,11 @@ TkpDisplayMenuButton( * Draw highlight border, if needed. */ - if (butPtr->highlightWidth < 3) { - if (butPtr->flags & GOT_FOCUS) { + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth < 3) { + if (butPtr->flags & GOT_FOCUS) { GC gc = Tk_GCForColor(butPtr->highlightColorPtr, pixmap); - TkMacOSXDrawSolidBorder(tkwin, gc, 0, butPtr->highlightWidth); + TkMacOSXDrawSolidBorder(tkwin, gc, 0, highlightWidth); } } } @@ -246,7 +248,8 @@ TkpComputeMenuButtonGeometry( int width, height, avgWidth, haveImage = 0, haveText = 0; int txtWidth, txtHeight; Tk_FontMetrics fm; - int highlightWidth = butPtr->highlightWidth > 0 ? butPtr->highlightWidth : 0; + int borderWidth, highlightWidth; + int padX, padY; /* * First compute the size of the contents of the button. @@ -259,23 +262,26 @@ TkpComputeMenuButtonGeometry( avgWidth = 0; if (butPtr->image != NULL) { - Tk_SizeOfImage(butPtr->image, &width, &height); - haveImage = 1; + Tk_SizeOfImage(butPtr->image, &width, &height); + haveImage = 1; } else if (butPtr->bitmap != None) { - Tk_SizeOfBitmap(butPtr->display, butPtr->bitmap, &width, &height); - haveImage = 1; + Tk_SizeOfBitmap(butPtr->display, butPtr->bitmap, &width, &height); + haveImage = 1; } - if (butPtr->text && strlen(butPtr->text) > 0) { + if (butPtr->textObj && Tcl_GetString(butPtr->textObj)[0]) { + int wrapLength; + haveText = 1; - Tk_FreeTextLayout(butPtr->textLayout); - butPtr->textLayout = Tk_ComputeTextLayout(butPtr->tkfont, - butPtr->text, TCL_INDEX_NONE, butPtr->wrapLength, - butPtr->justify, 0, &butPtr->textWidth, &butPtr->textHeight); - txtWidth = butPtr->textWidth; - txtHeight = butPtr->textHeight; - avgWidth = Tk_TextWidth(butPtr->tkfont, "0", 1); - Tk_GetFontMetrics(butPtr->tkfont, &fm); + Tk_FreeTextLayout(butPtr->textLayout); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->wrapLengthObj, &wrapLength); + butPtr->textLayout = Tk_ComputeTextLayout(butPtr->tkfont, + Tcl_GetString(butPtr->textObj), TCL_INDEX_NONE, wrapLength, + butPtr->justify, 0, &butPtr->textWidth, &butPtr->textHeight); + txtWidth = butPtr->textWidth; + txtHeight = butPtr->textHeight; + avgWidth = Tk_TextWidth(butPtr->tkfont, "0", 1); + Tk_GetFontMetrics(butPtr->tkfont, &fm); } /* @@ -285,15 +291,19 @@ TkpComputeMenuButtonGeometry( * otherwise it is not really a compound button. */ + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->widthObj, &butPtr->width); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->heightObj, &butPtr->height); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padYObj, &padY); if (haveImage && haveText) { - switch ((enum compound) butPtr->compound) { + switch ((enum compound) butPtr->compound) { case COMPOUND_TOP: case COMPOUND_BOTTOM: /* * Image is above or below text */ - height += txtHeight + butPtr->padY; + height += txtHeight + padY; width = (width > txtWidth ? width : txtWidth); break; case COMPOUND_LEFT: @@ -302,7 +312,7 @@ TkpComputeMenuButtonGeometry( * Image is left or right of text */ - width += txtWidth + butPtr->padX; + width += txtWidth + padX; height = (height > txtHeight ? height : txtHeight); break; case COMPOUND_CENTER: @@ -315,36 +325,38 @@ TkpComputeMenuButtonGeometry( break; case COMPOUND_NONE: break; - } + } - if (butPtr->width > 0) { - width = butPtr->width; - } - if (butPtr->height > 0) { - height = butPtr->height; - } + if (butPtr->width > 0) { + width = butPtr->width; + } + if (butPtr->height > 0) { + height = butPtr->height; + } } else { - if (haveImage) { /* Image only */ - if (butPtr->width > 0) { - width = butPtr->width; - } - if (butPtr->height > 0) { - height = butPtr->height; - } - } else { /* Text only */ - width = txtWidth; - height = txtHeight; - if (butPtr->width > 0) { - width = butPtr->width * avgWidth + 2*butPtr->padX; - } - if (butPtr->height > 0) { - height = butPtr->height * fm.linespace + 2*butPtr->padY; - } - } + if (haveImage) { /* Image only */ + if (butPtr->width > 0) { + width = butPtr->width; + } + if (butPtr->height > 0) { + height = butPtr->height; + } + } else { /* Text only */ + width = txtWidth; + height = txtHeight; + if (butPtr->width > 0) { + width = butPtr->width * avgWidth + 2 * padX; + } + if (butPtr->height > 0) { + height = butPtr->height * fm.linespace + 2 * padY; + } + } } - butPtr->inset = highlightWidth + butPtr->borderWidth; + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthObj, &highlightWidth); + butPtr->inset = highlightWidth + borderWidth; width += LEFT_INSET + RIGHT_INSET + 2*butPtr->inset; height += 2*butPtr->inset; height = height < MIN_HEIGHT ? MIN_HEIGHT : height; @@ -379,32 +391,35 @@ DrawMenuButtonImageAndText( int textXOffset = 0, textYOffset = 0; int width = 0, height = 0; int fullWidth = 0, fullHeight = 0; + int padX, padY; if (tkwin == NULL || !Tk_IsMapped(tkwin)) { - return; + return; } DrawParams *dpPtr = &mbPtr->drawParams; pixmap = (Pixmap) Tk_WindowId(tkwin); if (butPtr->image != NULL) { - Tk_SizeOfImage(butPtr->image, &width, &height); - haveImage = 1; + Tk_SizeOfImage(butPtr->image, &width, &height); + haveImage = 1; } else if (butPtr->bitmap != None) { - Tk_SizeOfBitmap(butPtr->display, butPtr->bitmap, &width, &height); - haveImage = 1; + Tk_SizeOfBitmap(butPtr->display, butPtr->bitmap, &width, &height); + haveImage = 1; } haveText = (butPtr->textWidth != 0 && butPtr->textHeight != 0); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padYObj, &padY); if (butPtr->compound != COMPOUND_NONE && haveImage && haveText) { - int x = 0, y = 0; + int x = 0, y = 0; - textXOffset = 0; - textYOffset = 0; - fullWidth = 0; - fullHeight = 0; + textXOffset = 0; + textYOffset = 0; + fullWidth = 0; + fullHeight = 0; - switch ((enum compound) butPtr->compound) { + switch ((enum compound) butPtr->compound) { case COMPOUND_TOP: case COMPOUND_BOTTOM: /* @@ -412,11 +427,11 @@ DrawMenuButtonImageAndText( */ if (butPtr->compound == COMPOUND_TOP) { - textYOffset = height + butPtr->padY; + textYOffset = height + padY; } else { - imageYOffset = butPtr->textHeight + butPtr->padY; + imageYOffset = butPtr->textHeight + padY; } - fullHeight = height + butPtr->textHeight + butPtr->padY; + fullHeight = height + butPtr->textHeight + padY; fullWidth = (width > butPtr->textWidth ? width : butPtr->textWidth); textXOffset = (fullWidth - butPtr->textWidth)/2; @@ -429,13 +444,13 @@ DrawMenuButtonImageAndText( */ if (butPtr->compound == COMPOUND_LEFT) { - textXOffset = width + butPtr->padX - 2; + textXOffset = width + padX - 2; } else { - imageXOffset = butPtr->textWidth + butPtr->padX; + imageXOffset = butPtr->textWidth + padX; } - fullWidth = butPtr->textWidth + butPtr->padX + width; + fullWidth = butPtr->textWidth + padX + width; fullHeight = (height > butPtr->textHeight ? height : - butPtr->textHeight); + butPtr->textHeight); textYOffset = (fullHeight - butPtr->textHeight)/2; imageYOffset = (fullHeight - height)/2; break; @@ -446,7 +461,7 @@ DrawMenuButtonImageAndText( fullWidth = (width > butPtr->textWidth ? width : butPtr->textWidth); fullHeight = (height > butPtr->textHeight ? height : - butPtr->textHeight); + butPtr->textHeight); textXOffset = (fullWidth - butPtr->textWidth) / 2; imageXOffset = (fullWidth - width) / 2; textYOffset = (fullHeight - butPtr->textHeight) / 2; @@ -456,56 +471,59 @@ DrawMenuButtonImageAndText( break; } - TkComputeAnchor(butPtr->anchor, tkwin, - butPtr->padX + butPtr->inset, butPtr->padY + butPtr->inset, - fullWidth, fullHeight, &x, &y); - imageXOffset = LEFT_INSET; - imageYOffset += y; - textYOffset -= 1; + TkComputeAnchor(butPtr->anchor, tkwin, + padX + butPtr->inset, padY + butPtr->inset, + fullWidth, fullHeight, &x, &y); + imageXOffset = LEFT_INSET; + imageYOffset += y; + textYOffset -= 1; - if (butPtr->image != NULL) { + if (butPtr->image != NULL) { Tk_RedrawImage(butPtr->image, 0, 0, width, - height, pixmap, imageXOffset, imageYOffset); - } else { - XSetClipOrigin(butPtr->display, dpPtr->gc, - imageXOffset, imageYOffset); - XCopyPlane(butPtr->display, butPtr->bitmap, pixmap, dpPtr->gc, - 0, 0, (unsigned int) width, (unsigned int) height, - imageXOffset, imageYOffset, 1); - XSetClipOrigin(butPtr->display, dpPtr->gc, 0, 0); - } - - Tk_DrawTextLayout(butPtr->display, pixmap, - dpPtr->gc, butPtr->textLayout, - x + textXOffset, y + textYOffset, 0, -1); - Tk_UnderlineTextLayout(butPtr->display, pixmap, dpPtr->gc, - butPtr->textLayout, x + textXOffset, y + textYOffset, - butPtr->underline); + height, pixmap, imageXOffset, imageYOffset); + } else { + XSetClipOrigin(butPtr->display, dpPtr->gc, + imageXOffset, imageYOffset); + XCopyPlane(butPtr->display, butPtr->bitmap, pixmap, dpPtr->gc, + 0, 0, (unsigned int) width, (unsigned int) height, + imageXOffset, imageYOffset, 1); + XSetClipOrigin(butPtr->display, dpPtr->gc, 0, 0); + } + + Tk_DrawTextLayout(butPtr->display, pixmap, + dpPtr->gc, butPtr->textLayout, + x + textXOffset, y + textYOffset, 0, -1); + Tk_UnderlineTextLayout(butPtr->display, pixmap, dpPtr->gc, + butPtr->textLayout, x + textXOffset, y + textYOffset, + butPtr->underline); } else { int x, y; - if (haveImage) { - TkComputeAnchor(butPtr->anchor, tkwin, - butPtr->padX + butPtr->borderWidth, - butPtr->padY + butPtr->borderWidth, - width, height, &x, &y); + if (haveImage) { + int borderWidth; + + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthObj, &borderWidth); + TkComputeAnchor(butPtr->anchor, tkwin, + padX + borderWidth, + padY + borderWidth, + width, height, &x, &y); imageXOffset = LEFT_INSET; imageYOffset += y; if (butPtr->image != NULL) { Tk_RedrawImage(butPtr->image, 0, 0, width, height, pixmap, imageXOffset, imageYOffset); - } else { - XSetClipOrigin(butPtr->display, dpPtr->gc, x, y); - XCopyPlane(butPtr->display, butPtr->bitmap, + } else { + XSetClipOrigin(butPtr->display, dpPtr->gc, x, y); + XCopyPlane(butPtr->display, butPtr->bitmap, pixmap, dpPtr->gc, 0, 0, (unsigned int) width, (unsigned int) height, imageXOffset, imageYOffset, 1); - XSetClipOrigin(butPtr->display, dpPtr->gc, 0, 0); - } - } else { + XSetClipOrigin(butPtr->display, dpPtr->gc, 0, 0); + } + } else { textXOffset = LEFT_INSET; - TkComputeAnchor(butPtr->anchor, tkwin, butPtr->padX, butPtr->padY, + TkComputeAnchor(butPtr->anchor, tkwin, padX, padY, butPtr->textWidth, butPtr->textHeight, &x, &y); Tk_DrawTextLayout(butPtr->display, pixmap, dpPtr->gc, butPtr->textLayout, textXOffset, y, 0, -1); @@ -537,7 +555,7 @@ TkMacOSXDrawMenuButton( MacMenuButton *mbPtr, /* Mac menubutton. */ TCL_UNUSED(GC), /* The GC we are drawing into - not used */ Pixmap pixmap) /* The pixmap we are drawing into - needed for the - * bevel button */ + * bevel button */ { TkMenuButton *butPtr = (TkMenuButton *) mbPtr; TkWindow *winPtr = (TkWindow *) butPtr->tkwin; @@ -552,23 +570,23 @@ TkMacOSXDrawMenuButton( Tk_Width(butPtr->tkwin), Tk_Height(butPtr->tkwin)); if (useNewerHITools == 1) { - HIRect contHIRec; - static HIThemeButtonDrawInfo hiinfo; + HIRect contHIRec; + static HIThemeButtonDrawInfo hiinfo; - MenuButtonBackgroundDrawCB(mbPtr, 32, true); + MenuButtonBackgroundDrawCB(mbPtr, 32, true); if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, &dc)) { return; } - hiinfo.version = 0; - hiinfo.state = mbPtr->drawinfo.state; - hiinfo.kind = mbPtr->btnkind; - hiinfo.value = mbPtr->drawinfo.value; - hiinfo.adornment = mbPtr->drawinfo.adornment; - hiinfo.animation.time.current = CFAbsoluteTimeGetCurrent(); - if (hiinfo.animation.time.start == 0) { - hiinfo.animation.time.start = hiinfo.animation.time.current; - } + hiinfo.version = 0; + hiinfo.state = mbPtr->drawinfo.state; + hiinfo.kind = mbPtr->btnkind; + hiinfo.value = mbPtr->drawinfo.value; + hiinfo.adornment = mbPtr->drawinfo.adornment; + hiinfo.animation.time.current = CFAbsoluteTimeGetCurrent(); + if (hiinfo.animation.time.start == 0) { + hiinfo.animation.time.start = hiinfo.animation.time.current; + } /* * To avoid menubuttons with white text on a white background, we @@ -581,10 +599,10 @@ TkMacOSXDrawMenuButton( hiinfo.state = kThemeStateInactive; } - HIThemeDrawButton(&cntrRect, &hiinfo, dc.context, + HIThemeDrawButton(&cntrRect, &hiinfo, dc.context, kHIThemeOrientationNormal, &contHIRec); TkMacOSXRestoreDrawingContext(&dc); - MenuButtonContentDrawCB(mbPtr->btnkind, &mbPtr->drawinfo, + MenuButtonContentDrawCB(mbPtr->btnkind, &mbPtr->drawinfo, mbPtr, 32, true); } else { if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, &dc)) { @@ -623,11 +641,11 @@ MenuButtonBackgroundDrawCB ( Pixmap pixmap; if (tkwin == NULL || !Tk_IsMapped(tkwin)) { - return; + return; } pixmap = (Pixmap) Tk_WindowId(tkwin); Tk_Fill3DRectangle(tkwin, pixmap, butPtr->normalBorder, 0, 0, - Tk_Width(tkwin), Tk_Height(tkwin), 0, TK_RELIEF_FLAT); + Tk_Width(tkwin), Tk_Height(tkwin), 0, TK_RELIEF_FLAT); } /* @@ -658,7 +676,7 @@ MenuButtonContentDrawCB ( Tk_Window tkwin = butPtr->tkwin; if (tkwin == NULL || !Tk_IsMapped(tkwin)) { - return; + return; } DrawMenuButtonImageAndText(butPtr); } @@ -730,8 +748,9 @@ TkMacOSXComputeMenuButtonParams( HIThemeButtonDrawInfo *drawinfo) { MacMenuButton *mbPtr = (MacMenuButton *) butPtr; + int highlightWidth; - if (butPtr->image || butPtr->bitmap || butPtr->text) { + if (butPtr->image || butPtr->bitmap || butPtr->textObj) { /* TODO: allow for Small and Mini menubuttons. */ *btnkind = kThemePopupButton; } else { /* This should never happen. */ @@ -749,22 +768,23 @@ TkMacOSXComputeMenuButtonParams( drawinfo->state = kThemeStateInactive; if ((mbPtr->flags & ACTIVE) == 0) { - if (butPtr->state == STATE_DISABLED) { - drawinfo->state = kThemeStateUnavailableInactive; - } else { - drawinfo->state = kThemeStateInactive; - } + if (butPtr->state == STATE_DISABLED) { + drawinfo->state = kThemeStateUnavailableInactive; + } else { + drawinfo->state = kThemeStateInactive; + } } else if (butPtr->state == STATE_DISABLED) { - drawinfo->state = kThemeStateUnavailable; + drawinfo->state = kThemeStateUnavailable; } else { - drawinfo->state = kThemeStateActive; + drawinfo->state = kThemeStateActive; } drawinfo->adornment = kThemeAdornmentNone; - if (butPtr->highlightWidth >= 3) { - if ((butPtr->flags & GOT_FOCUS)) { - drawinfo->adornment |= kThemeAdornmentFocus; - } + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth >= 3) { + if ((butPtr->flags & GOT_FOCUS)) { + drawinfo->adornment |= kThemeAdornmentFocus; + } } drawinfo->adornment |= kThemeAdornmentArrowDoubleArrow; } @@ -795,12 +815,12 @@ TkMacOSXComputeMenuButtonDrawParams( ((butPtr->image != NULL) || (butPtr->bitmap != None)); dpPtr->border = butPtr->normalBorder; if ((butPtr->state == STATE_DISABLED) && (butPtr->disabledFg != NULL)) { - dpPtr->gc = butPtr->disabledGC; + dpPtr->gc = butPtr->disabledGC; } else if (butPtr->state == STATE_ACTIVE) { - dpPtr->gc = butPtr->activeTextGC; - dpPtr->border = butPtr->activeBorder; + dpPtr->gc = butPtr->activeTextGC; + dpPtr->border = butPtr->activeBorder; } else { - dpPtr->gc = butPtr->normalTextGC; + dpPtr->gc = butPtr->normalTextGC; } } diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c index b1b8bad..b717352 100644 --- a/macosx/tkMacOSXMenus.c +++ b/macosx/tkMacOSXMenus.c @@ -116,18 +116,18 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp); _defaultWindowsMenuItems = [_defaultWindowsMenuItems arrayByAddingObjectsFromArray: [NSArray arrayWithObjects: - [NSMenuItem separatorItem], + [NSMenuItem separatorItem], [NSMenuItem itemWithTitle:@"Show Previous Tab" - action:@selector(selectPreviousTab:) - target:nil + action:@selector(selectPreviousTab:) + target:nil keyEquivalent:@"\t" - keyEquivalentModifierMask: + keyEquivalentModifierMask: NSControlKeyMask|NSShiftKeyMask], - [NSMenuItem itemWithTitle:@"Show Next Tab" - action:@selector(selectNextTab:) - target:nil + [NSMenuItem itemWithTitle:@"Show Next Tab" + action:@selector(selectNextTab:) + target:nil keyEquivalent:@"\t" - keyEquivalentModifierMask:NSControlKeyMask], + keyEquivalentModifierMask:NSControlKeyMask], [NSMenuItem itemWithTitle:@"Move Tab To New Window" action:@selector(moveTabToNewWindow:) target:nil], @@ -135,7 +135,7 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp); action:@selector(mergeAllWindows:) target:nil], [NSMenuItem separatorItem], - nil]]; + nil]]; } _defaultWindowsMenuItems = [_defaultWindowsMenuItems arrayByAddingObject: [NSMenuItem itemWithTitle:@"Bring All to Front" @@ -193,7 +193,7 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp); } return haveDemo; } else { - return [super validateUserInterfaceItem:anItem]; + return [super validateUserInterfaceItem:anItem]; } } diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c index 83d2cd2..062a125 100644 --- a/macosx/tkMacOSXMouseEvent.c +++ b/macosx/tkMacOSXMouseEvent.c @@ -504,8 +504,9 @@ enum { state |= Tk_GetButtonMask(Button1); } if (eventType == NSMouseEntered) { - Tk_UpdatePointer((Tk_Window) [NSApp tkPointerWindow], - global.x, global.y, state); + Tk_Window new_win = Tk_CoordsToWindow(global.x, global.y, + (Tk_Window) [NSApp tkPointerWindow]); + Tk_UpdatePointer(new_win, global.x, global.y, state); } else if (eventType == NSMouseExited) { if ([NSApp tkDragTarget]) { Tk_UpdatePointer((Tk_Window) [NSApp tkDragTarget], @@ -883,9 +884,9 @@ TkpWarpPointer( CGWarpMouseCursorPosition(pt); if (dispPtr->warpWindow) { - TkGenerateButtonEventForXPointer(Tk_WindowId(dispPtr->warpWindow)); + TkGenerateButtonEventForXPointer(Tk_WindowId(dispPtr->warpWindow)); } else { - TkGenerateButtonEventForXPointer(None); + TkGenerateButtonEventForXPointer(None); } } diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c index a20eec2..bdb1ef9 100644 --- a/macosx/tkMacOSXNotify.c +++ b/macosx/tkMacOSXNotify.c @@ -189,7 +189,6 @@ void DebugPrintQueue(void) - (void) _runBackgroundLoop { while(Tcl_DoOneEvent(TCL_IDLE_EVENTS|TCL_TIMER_EVENTS|TCL_DONT_WAIT)){ - TkMacOSXDrawAllViews(NULL); } } @end @@ -305,88 +304,6 @@ TkMacOSXNotifyExitHandler( /* *---------------------------------------------------------------------- * - * TkMacOSXDrawAllViews -- - * - * This static function is meant to be run as an idle task. It attempts - * to redraw all views which have the tkNeedsDisplay property set to YES. - * This relies on a feature of [NSApp nextEventMatchingMask: ...] which - * is undocumented, namely that it sometimes blocks and calls drawRect - * for all views that need display before it returns. We call it with - * deQueue=NO so that it will not change anything on the AppKit event - * queue, because we only want the side effect that it runs drawRect. The - * only times when any NSViews have the needsDisplay property set to YES - * are during execution of this function or in the addTkDirtyRect method - * of TKContentView. - * - * The reason for running this function as an idle task is to try to - * arrange that all widgets will be fully configured before they are - * drawn. Any idle tasks that might reconfigure them should be higher on - * the idle queue, so they should be run before the display procs are run - * by drawRect. - * - * If this function is called directly with non-NULL clientData parameter - * then the int which it references will be set to the number of windows - * that need display, but the needsDisplay property of those windows will - * not be changed. - * - * Results: - * None. - * - * Side effects: - * Parts of windows may get redrawn. - * - *---------------------------------------------------------------------- - */ - -void -TkMacOSXDrawAllViews( - void *clientData) -{ - int count = 0, *dirtyCount = (int *)clientData; - - for (NSWindow *window in [NSApp windows]) { - if ([[window contentView] isMemberOfClass:[TKContentView class]]) { - TKContentView *view = [window contentView]; - if ([view tkNeedsDisplay]) { - count++; - if (dirtyCount) { - continue; - } - [[view layer] setNeedsDisplayInRect:[view tkDirtyRect]]; - [view setNeedsDisplay:YES]; - } - } else { - [window displayIfNeeded]; - } - } - if (dirtyCount) { - *dirtyCount = count; - } - [NSApp nextEventMatchingMask:NSAnyEventMask - untilDate:[NSDate distantPast] - inMode:GetRunLoopMode(TkMacOSXGetModalSession()) - dequeue:NO]; - for (NSWindow *window in [NSApp windows]) { - if ([[window contentView] isMemberOfClass:[TKContentView class]]) { - TKContentView *view = [window contentView]; - - /* - * If we did not run drawRect, we set needsDisplay back to NO. - * Note that if drawRect did run it may have added to Tk's dirty - * rect, due to attempts to draw outside of drawRect's dirty rect. - */ - - if ([view needsDisplay]) { - [view setNeedsDisplay: NO]; - } - } - } - [NSApp setNeedsToDraw:NO]; -} - -/* - *---------------------------------------------------------------------- - * * TkMacOSXEventsSetupProc -- * * This procedure implements the setup part of the MacOSX event source. It @@ -448,11 +365,11 @@ TkMacOSXEventsSetupProc( */ NSEvent *currentEvent = - [NSApp nextEventMatchingMask:NSAnyEventMask + [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:GetRunLoopMode(TkMacOSXGetModalSession()) dequeue:NO]; - if ((currentEvent) || [NSApp needsToDraw] ) { + if ((currentEvent)) { Tcl_SetMaxBlockTime(&zeroBlockTime); Tcl_DeleteTimerHandler(ticker); ticker = NULL; @@ -560,25 +477,6 @@ TkMacOSXEventsCheckProc( */ [NSApp _unlockAutoreleasePool]; - - /* - * Add an idle task to the end of the idle queue which will redisplay - * all of our dirty windows. We want this to happen after all other - * idle tasks have run so that all widgets will be configured before - * they are displayed. The drawRect method "borrows" the idle queue - * while drawing views. That is, it sends expose events which cause - * display procs to be posted as idle tasks and then runs an inner - * event loop to processes those idle tasks. We are trying to arrange - * for the idle queue to be empty when it starts that process and empty - * when it finishes. - */ - - int dirtyCount = 0; - TkMacOSXDrawAllViews(&dirtyCount); - if (dirtyCount > 0) { - Tcl_CancelIdleCall(TkMacOSXDrawAllViews, NULL); - Tcl_DoWhenIdle(TkMacOSXDrawAllViews, NULL); - } } } diff --git a/macosx/tkMacOSXPrint.c b/macosx/tkMacOSXPrint.c index d7f3886..a7eddb8 100644 --- a/macosx/tkMacOSXPrint.c +++ b/macosx/tkMacOSXPrint.c @@ -92,8 +92,8 @@ StartPrint( /* Check for proper number of arguments. */ if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "file"); - return TCL_ERROR; + Tcl_WrongNumArgs(interp, 1, objv, "file"); + return TCL_ERROR; } fileName = [NSString stringWithUTF8String: Tcl_GetString(objv[1])]; @@ -105,20 +105,20 @@ StartPrint( status = PMCreateSession( & printSession); if (status != noErr) { - NSLog(@ "Error creating print session."); - return TCL_ERROR; + NSLog(@ "Error creating print session."); + return TCL_ERROR; } status = PMCreatePrintSettings( & printSettings); if (status != noErr) { - NSLog(@ "Error creating print settings."); - return TCL_ERROR; + NSLog(@ "Error creating print settings."); + return TCL_ERROR; } status = PMSessionDefaultPrintSettings(printSession, printSettings); if (status != noErr) { - NSLog(@ "Error creating default print settings."); - return TCL_ERROR; + NSLog(@ "Error creating default print settings."); + return TCL_ERROR; } printSession = (PMPrintSession)[printInfo PMPrintSession]; @@ -163,25 +163,25 @@ FinishPrint( * otherwise printing will occur regardless of value. */ if (buttonValue == NSModalResponseCancel) { - return noErr; + return noErr; } status = PMCreateSession( & printSession); if (status != noErr) { - NSLog(@ "Error creating print session."); - return status; + NSLog(@ "Error creating print session."); + return status; } status = PMCreatePrintSettings( & printSettings); if (status != noErr) { - NSLog(@ "Error creating print settings."); - return status; + NSLog(@ "Error creating print settings."); + return status; } status = PMSessionDefaultPrintSettings(printSession, printSettings); if (status != noErr) { - NSLog(@ "Error creating default print settings."); - return status; + NSLog(@ "Error creating default print settings."); + return status; } printSession = (PMPrintSession)[printInfo PMPrintSession]; @@ -191,81 +191,81 @@ FinishPrint( /*Handle print operation.*/ if (buttonValue == NSModalResponseOK) { - if (urlFile == NULL) { - NSLog(@ "Could not get file to print."); - return noErr; - } - - fileName = file; - - CFURLRef printURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, urlFile, kCFURLPOSIXPathStyle, false); - - PMPrinter currentPrinter; - PMDestinationType printDestination; - - /*Get the intended destination.*/ - status = PMSessionGetDestinationType(printSession, printSettings, & printDestination); - - /*Destination is printer. Send file to printer.*/ - if (status == noErr && printDestination == kPMDestinationPrinter) { - - status = PMSessionGetCurrentPrinter(printSession, & currentPrinter); - if (status == noErr) { - CFArrayRef mimeTypes; - status = PMPrinterGetMimeTypes(currentPrinter, printSettings, & mimeTypes); - if (status == noErr && mimeTypes != NULL) { - mimeType = CFSTR("application/pdf"); - if (CFArrayContainsValue(mimeTypes, CFRangeMake(0, CFArrayGetCount(mimeTypes)), mimeType)) { - status = PMPrinterPrintWithFile(currentPrinter, printSettings, pageFormat, mimeType, printURL); - CFRelease(urlFile); - return status; - } - } - } - } - - /* Destination is file. Determine how to handle. */ - if (status == noErr && printDestination == kPMDestinationFile) { - CFURLRef outputLocation = NULL; - - status = PMSessionCopyDestinationLocation(printSession, printSettings, & outputLocation); - if (status == noErr) { - /*Get the source file and target destination, convert to strings.*/ - CFStringRef sourceFile = CFURLCopyFileSystemPath(printURL, kCFURLPOSIXPathStyle); - CFStringRef savePath = CFURLCopyFileSystemPath(outputLocation, kCFURLPOSIXPathStyle); - NSString * sourcePath = (NSString * ) sourceFile; - NSString * finalPath = (NSString * ) savePath; - NSString * pathExtension = [finalPath pathExtension]; - NSFileManager * fileManager = [NSFileManager defaultManager]; + if (urlFile == NULL) { + NSLog(@ "Could not get file to print."); + return noErr; + } + + fileName = file; + + CFURLRef printURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, urlFile, kCFURLPOSIXPathStyle, false); + + PMPrinter currentPrinter; + PMDestinationType printDestination; + + /*Get the intended destination.*/ + status = PMSessionGetDestinationType(printSession, printSettings, & printDestination); + + /*Destination is printer. Send file to printer.*/ + if (status == noErr && printDestination == kPMDestinationPrinter) { + + status = PMSessionGetCurrentPrinter(printSession, & currentPrinter); + if (status == noErr) { + CFArrayRef mimeTypes; + status = PMPrinterGetMimeTypes(currentPrinter, printSettings, & mimeTypes); + if (status == noErr && mimeTypes != NULL) { + mimeType = CFSTR("application/pdf"); + if (CFArrayContainsValue(mimeTypes, CFRangeMake(0, CFArrayGetCount(mimeTypes)), mimeType)) { + status = PMPrinterPrintWithFile(currentPrinter, printSettings, pageFormat, mimeType, printURL); + CFRelease(urlFile); + return status; + } + } + } + } + + /* Destination is file. Determine how to handle. */ + if (status == noErr && printDestination == kPMDestinationFile) { + CFURLRef outputLocation = NULL; + + status = PMSessionCopyDestinationLocation(printSession, printSettings, & outputLocation); + if (status == noErr) { + /*Get the source file and target destination, convert to strings.*/ + CFStringRef sourceFile = CFURLCopyFileSystemPath(printURL, kCFURLPOSIXPathStyle); + CFStringRef savePath = CFURLCopyFileSystemPath(outputLocation, kCFURLPOSIXPathStyle); + NSString * sourcePath = (NSString * ) sourceFile; + NSString * finalPath = (NSString * ) savePath; + NSString * pathExtension = [finalPath pathExtension]; + NSFileManager * fileManager = [NSFileManager defaultManager]; NSError * error = nil; - /* + /* * Is the target file a PDF? If so, copy print file * to output location. */ - if ([pathExtension isEqualToString: @ "pdf"]) { + if ([pathExtension isEqualToString: @ "pdf"]) { /*Make sure no file conflict exists.*/ if ([fileManager fileExistsAtPath: finalPath]) { [fileManager removeItemAtPath: finalPath error: &error]; } - if ([fileManager fileExistsAtPath: sourcePath]) { - error = nil; - [fileManager copyItemAtPath: sourcePath toPath: finalPath error: & error]; - } + if ([fileManager fileExistsAtPath: sourcePath]) { + error = nil; + [fileManager copyItemAtPath: sourcePath toPath: finalPath error: & error]; + } return status; - } - - /* - * Is the target file PostScript? If so, run print file - * through CUPS filter to convert back to PostScript. - */ - - if ([pathExtension isEqualToString: @ "ps"]) { - char source[5012]; - char target[5012]; - [sourcePath getCString: source maxLength: (sizeof source) encoding: NSUTF8StringEncoding]; - [finalPath getCString: target maxLength: (sizeof target) encoding: NSUTF8StringEncoding]; + } + + /* + * Is the target file PostScript? If so, run print file + * through CUPS filter to convert back to PostScript. + */ + + if ([pathExtension isEqualToString: @ "ps"]) { + char source[5012]; + char target[5012]; + [sourcePath getCString: source maxLength: (sizeof source) encoding: NSUTF8StringEncoding]; + [finalPath getCString: target maxLength: (sizeof target) encoding: NSUTF8StringEncoding]; /*Make sure no file conflict exists.*/ if ([fileManager fileExistsAtPath: finalPath]) { [fileManager removeItemAtPath: finalPath error: &error]; @@ -290,39 +290,39 @@ FinishPrint( } } - /* Destination is preview. Open file in default application for PDF. */ - if ((status == noErr) && (printDestination == kPMDestinationPreview)) { - CFStringRef urlpath = CFURLCopyFileSystemPath(printURL, kCFURLPOSIXPathStyle); - NSString * path = (NSString * ) urlpath; - NSURL * url = [NSURL fileURLWithPath: path]; - NSWorkspace * ws = [NSWorkspace sharedWorkspace]; - [ws openURL: url]; - status = noErr; - return status; - } - - /* - * If destination is not printer, file or preview, - * we do not support it. Display alert. - */ + /* Destination is preview. Open file in default application for PDF. */ + if ((status == noErr) && (printDestination == kPMDestinationPreview)) { + CFStringRef urlpath = CFURLCopyFileSystemPath(printURL, kCFURLPOSIXPathStyle); + NSString * path = (NSString * ) urlpath; + NSURL * url = [NSURL fileURLWithPath: path]; + NSWorkspace * ws = [NSWorkspace sharedWorkspace]; + [ws openURL: url]; + status = noErr; + return status; + } + + /* + * If destination is not printer, file or preview, + * we do not support it. Display alert. + */ if (((status == noErr) && (printDestination != kPMDestinationPreview)) || ((status == noErr) && (printDestination != kPMDestinationFile)) || ((status == noErr) && (printDestination != kPMDestinationPrinter))) { - NSAlert * alert = [[[NSAlert alloc] init] autorelease]; - [alert addButtonWithTitle: @ "OK"]; + NSAlert * alert = [[[NSAlert alloc] init] autorelease]; + [alert addButtonWithTitle: @ "OK"]; - [alert setMessageText: @ "Unsupported Printing Operation"]; - [alert setInformativeText: @ "This printing operation is not supported."]; - [alert setAlertStyle: NSAlertStyleInformational]; - [alert runModal]; - return status; - } + [alert setMessageText: @ "Unsupported Printing Operation"]; + [alert setInformativeText: @ "This printing operation is not supported."]; + [alert setAlertStyle: NSAlertStyleInformational]; + [alert runModal]; + return status; + } } /* Return because cancel button was clicked. */ if (buttonValue == NSModalResponseCancel) { - PMRelease(printSession); - return status; + PMRelease(printSession); + return status; } return status; diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h index 553a6be..ec8525f 100644 --- a/macosx/tkMacOSXPrivate.h +++ b/macosx/tkMacOSXPrivate.h @@ -166,7 +166,7 @@ typedef union MacKeycode_t { #define ON_KEYPAD(virt) ((virt >= 0x41) && (virt <= 0x5C)) #define IS_PRINTABLE(keychar) ((keychar >= 0x20) && (keychar != 0x7f) && \ - ((keychar < 0xF700) || keychar >= 0xF8FF)) + ((keychar < 0xF700) || keychar >= 0xF8FF)) /* * An "index" is 2-bit bitfield showing the state of the Option and Shift @@ -240,14 +240,14 @@ MODULE_SCOPE int TkMacOSXIsWindowZoomed(TkWindow *winPtr); MODULE_SCOPE int TkGenerateButtonEventForXPointer(Window window); MODULE_SCOPE void TkMacOSXDrawCGImage(Drawable d, GC gc, CGContextRef context, CGImageRef image, unsigned long imageForeground, - unsigned long imageBackground, CGRect imageBounds, - CGRect srcBounds, CGRect dstBounds); + unsigned long imageBackground, CGRect dstBounds); MODULE_SCOPE int TkMacOSXSetupDrawingContext(Drawable d, GC gc, TkMacOSXDrawingContext *dcPtr); MODULE_SCOPE void TkMacOSXRestoreDrawingContext( TkMacOSXDrawingContext *dcPtr); MODULE_SCOPE void TkMacOSXSetColorInContext(GC gc, unsigned long pixel, CGContextRef context); +MODULE_SCOPE void TkMacOSXRedrawViewIdleTask(void *clientData); #define TkMacOSXGetTkWindow(window) ((TkWindow *)Tk_MacOSXGetTkWindow(window)) #define TkMacOSXGetNSWindowForDrawable(drawable) ((NSWindow *)Tk_MacOSXGetNSWindowForDrawable(drawable)) #define TkMacOSXGetNSViewForDrawable(macWin) ((NSView *)Tk_MacOSXGetNSViewForDrawable((Drawable)(macWin))) @@ -273,7 +273,6 @@ MODULE_SCOPE Tcl_ObjCmdProc2 TkMacOSXNSImageObjCmd; MODULE_SCOPE void TkMacOSXDrawSolidBorder(Tk_Window tkwin, GC gc, int inset, int thickness); MODULE_SCOPE int TkMacOSXServices_Init(Tcl_Interp *interp); -MODULE_SCOPE Tcl_ObjCmdProc TkMacOSXRegisterServiceWidgetObjCmd; MODULE_SCOPE unsigned TkMacOSXAddVirtual(unsigned int keycode); MODULE_SCOPE int TkMacOSXNSImage_Init(Tcl_Interp *interp); MODULE_SCOPE void TkMacOSXWinNSBounds(TkWindow *winPtr, NSView *view, @@ -320,10 +319,8 @@ VISIBILITY_HIDDEN } @property int poolLock; @property int macOSVersion; -@property Bool isDrawing; -@property Bool needsToDraw; -@property Bool isSigned; @property Bool tkLiveResizeEnded; +@property Bool tkWillExit; /* * Persistent state variables used by processMouseEvent. @@ -392,7 +389,7 @@ VISIBILITY_HIDDEN - (void) handleDoScriptEvent: (NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent; - (void)handleURLEvent: (NSAppleEventDescriptor*)event - withReplyEvent: (NSAppleEventDescriptor*)replyEvent; + withReplyEvent: (NSAppleEventDescriptor*)replyEvent; @end VISIBILITY_HIDDEN @@ -405,12 +402,9 @@ VISIBILITY_HIDDEN { @private NSString *privateWorkingText; - Bool _tkNeedsDisplay; - NSRect _tkDirtyRect; NSTrackingArea *trackingArea; } -@property Bool tkNeedsDisplay; -@property NSRect tkDirtyRect; +@property CGContextRef tkLayerBitmapContext; @end @interface TKContentView(TKKeyEvent) @@ -419,10 +413,9 @@ VISIBILITY_HIDDEN @end @interface TKContentView(TKWindowEvent) -- (void) addTkDirtyRect: (NSRect) rect; -- (void) clearTkDirtyRect; - (void) generateExposeEvents: (NSRect) rect; - (void) tkToolbarButton: (id) sender; +- (void) resetTkLayerBitmapContext; @end @interface NSWindow(TKWm) @@ -467,6 +460,14 @@ VISIBILITY_HIDDEN - (NSMenuItem *)itemInSupermenu; @end +// Need undocumented appearance: argument +@interface NSMenu(TKMenu) +- (BOOL)popUpMenuPositioningItem:(NSMenuItem *)item + atLocation:(NSPoint)location + inView:(NSView *)view + appearance:(NSAppearance *)appearance; +@end + @interface NSMenuItem(TKUtils) + (id)itemWithSubmenu:(NSMenu *)submenu; + (id)itemWithTitle:(NSString *)title submenu:(NSMenu *)submenu; diff --git a/macosx/tkMacOSXScale.c b/macosx/tkMacOSXScale.c index 96a61b8..1442236 100644 --- a/macosx/tkMacOSXScale.c +++ b/macosx/tkMacOSXScale.c @@ -167,14 +167,14 @@ TkpDisplayScale( */ Tcl_Preserve(scalePtr); - if ((scalePtr->flags & INVOKE_COMMAND) && (scalePtr->command != NULL)) { + if ((scalePtr->flags & INVOKE_COMMAND) && (scalePtr->commandObj != NULL)) { Tcl_Preserve(interp); - if (snprintf(string, TCL_DOUBLE_SPACE, scalePtr->format, - scalePtr->value) < 0) { - string[TCL_DOUBLE_SPACE - 1] = '\0'; - } + if (snprintf(string, TCL_DOUBLE_SPACE, scalePtr->format, + scalePtr->value) < 0) { + string[TCL_DOUBLE_SPACE - 1] = '\0'; + } Tcl_DStringInit(&buf); - Tcl_DStringAppend(&buf, scalePtr->command, TCL_INDEX_NONE); + Tcl_DStringAppend(&buf, Tcl_GetString(scalePtr->commandObj), TCL_INDEX_NONE); Tcl_DStringAppend(&buf, " ", TCL_INDEX_NONE); Tcl_DStringAppend(&buf, string, TCL_INDEX_NONE); result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), TCL_INDEX_NONE, TCL_EVAL_GLOBAL); diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index f5b25f1..3b747b9 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -160,10 +160,8 @@ TkpCreateScrollbar( *-------------------------------------------------------------- */ -#if MAC_OS_X_VERSION_MAX_ALLOWED > 1080 - /* - * This stand-alone drawing function is used on macOS 10.9 and newer because + * This stand-alone drawing function is used because * the HIToolbox does not draw the scrollbar thumb at the expected size on * those systems. The thumb is drawn too large, causing a mouse click on the * thumb to be interpreted as a mouse click in the trough. @@ -185,7 +183,7 @@ static void drawMacScrollbar( if (scrollPtr->vertical) { thumbOrigin.x = troughBounds.origin.x + MIN_GAP; thumbOrigin.y = troughBounds.origin.y + scrollPtr->sliderFirst; - thumbSize.width = troughBounds.size.width - 2*MIN_GAP + 1; + thumbSize.width = troughBounds.size.width - 2 * MIN_GAP + 1; thumbSize.height = scrollPtr->sliderLast - scrollPtr->sliderFirst; inner[0] = troughBounds.origin; inner[1] = CGPointMake(inner[0].x, @@ -197,7 +195,7 @@ static void drawMacScrollbar( thumbOrigin.x = troughBounds.origin.x + scrollPtr->sliderFirst; thumbOrigin.y = troughBounds.origin.y + MIN_GAP; thumbSize.width = scrollPtr->sliderLast - scrollPtr->sliderFirst; - thumbSize.height = troughBounds.size.height - 2*MIN_GAP + 1; + thumbSize.height = troughBounds.size.height - 2 * MIN_GAP + 1; inner[0] = troughBounds.origin; inner[1] = CGPointMake(inner[0].x + troughBounds.size.width, inner[0].y + 1); @@ -240,7 +238,6 @@ static void drawMacScrollbar( CFRelease(path); } } -#endif void TkpDisplayScrollbar( @@ -251,6 +248,7 @@ TkpDisplayScrollbar( Tk_Window tkwin = scrollPtr->tkwin; TkWindow *winPtr = (TkWindow *) tkwin; TkMacOSXDrawingContext dc; + int borderWidth, highlightWidth; scrollPtr->flags &= ~REDRAW_PENDING; @@ -262,7 +260,6 @@ TkpDisplayScrollbar( NSView *view = TkMacOSXGetNSViewForDrawable(macWin); if ((view == NULL) - || (macWin->flags & TK_DO_NOT_DRAW) || !TkMacOSXSetupDrawingContext((Drawable)macWin, NULL, &dc)) { return; } @@ -284,7 +281,8 @@ TkpDisplayScrollbar( * Draw a 3D rectangle to provide a base for the native scrollbar. */ - if (scrollPtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { GC fgGC, bgGC; bgGC = Tk_GCForColor(scrollPtr->highlightBgColorPtr, (Pixmap) macWin); @@ -293,19 +291,20 @@ TkpDisplayScrollbar( } else { fgGC = bgGC; } - Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, scrollPtr->highlightWidth, + Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, highlightWidth, (Pixmap) macWin); } + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->borderWidthObj, &borderWidth); Tk_Draw3DRectangle(tkwin, (Pixmap) macWin, scrollPtr->bgBorder, - scrollPtr->highlightWidth, scrollPtr->highlightWidth, - Tk_Width(tkwin) - 2*scrollPtr->highlightWidth, - Tk_Height(tkwin) - 2*scrollPtr->highlightWidth, - scrollPtr->borderWidth, scrollPtr->relief); + highlightWidth, highlightWidth, + Tk_Width(tkwin) - 2 * highlightWidth, + Tk_Height(tkwin) - 2 * highlightWidth, + borderWidth, scrollPtr->relief); Tk_Fill3DRectangle(tkwin, (Pixmap) macWin, scrollPtr->bgBorder, scrollPtr->inset, scrollPtr->inset, - Tk_Width(tkwin) - 2*scrollPtr->inset, - Tk_Height(tkwin) - 2*scrollPtr->inset, 0, TK_RELIEF_FLAT); + Tk_Width(tkwin) - 2 * scrollPtr->inset, + Tk_Height(tkwin) - 2 * scrollPtr->inset, 0, TK_RELIEF_FLAT); /* * Update values and then draw the native scrollbar over the rectangle. @@ -320,7 +319,6 @@ TkpDisplayScrollbar( HIThemeDrawTrack(&msPtr->info, 0, dc.context, kHIThemeOrientationNormal); } else { -#if MAC_OS_X_VERSION_MAX_ALLOWED > 1080 /* * Switch back to NSView coordinates and draw a modern scrollbar. @@ -328,7 +326,6 @@ TkpDisplayScrollbar( CGContextConcatCTM(dc.context, t); drawMacScrollbar(scrollPtr, msPtr, dc.context); -#endif } TkMacOSXRestoreDrawingContext(&dc); scrollPtr->flags &= ~REDRAW_PENDING; @@ -372,19 +369,20 @@ TkpComputeScrollbarGeometry( */ int fieldLength; + int width, borderWidth, highlightWidth; - if (scrollPtr->highlightWidth < 0) { - scrollPtr->highlightWidth = 0; - } - scrollPtr->inset = scrollPtr->highlightWidth + scrollPtr->borderWidth; + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->widthObj, &width); + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->highlightWidthObj, &highlightWidth); + scrollPtr->inset = highlightWidth + borderWidth; if ([NSApp macOSVersion] == 100600) { - scrollPtr->arrowLength = scrollPtr->width; + scrollPtr->arrowLength = width; } else { scrollPtr->arrowLength = 0; } fieldLength = (scrollPtr->vertical ? Tk_Height(scrollPtr->tkwin) : Tk_Width(scrollPtr->tkwin)) - - 2*(scrollPtr->arrowLength + scrollPtr->inset); + - 2 * (scrollPtr->arrowLength + scrollPtr->inset); if (fieldLength < 0) { fieldLength = 0; } @@ -422,14 +420,14 @@ TkpComputeScrollbarGeometry( if (scrollPtr->vertical) { Tk_GeometryRequest(scrollPtr->tkwin, - scrollPtr->width + 2*scrollPtr->inset, - 2*(scrollPtr->arrowLength + scrollPtr->borderWidth + width + 2 * scrollPtr->inset, + 2 * (scrollPtr->arrowLength + borderWidth + scrollPtr->inset) + metrics.minThumbHeight); } else { Tk_GeometryRequest(scrollPtr->tkwin, - 2*(scrollPtr->arrowLength + scrollPtr->borderWidth + 2 * (scrollPtr->arrowLength + borderWidth + scrollPtr->inset) + metrics.minThumbHeight, - scrollPtr->width + 2*scrollPtr->inset); + width + 2 * scrollPtr->inset); } Tk_SetInternalBorder(scrollPtr->tkwin, scrollPtr->inset); } @@ -550,7 +548,7 @@ TkpScrollbarPosition( if (y < scrollPtr->sliderLast) { return SLIDER; } - if (y < length - (2*scrollPtr->arrowLength + inset)) { + if (y < length - (2 * scrollPtr->arrowLength + inset)) { return BOTTOM_GAP; } diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index a420898..2c15445 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -56,32 +56,37 @@ XDestroyWindow( Window window) /* Window. */ { MacDrawable *macWin = (MacDrawable *)window; + TKContentView *view = (TKContentView *)TkMacOSXGetNSViewForDrawable(macWin); + //fprintf(stderr, "XDestroyWindow: %s with parent %s\n", + // Tk_PathName(macWin->winPtr), + // Tk_PathName(macWin->winPtr->parentPtr)); /* * Remove any dangling pointers that may exist if the window we are * deleting is being tracked by the grab code. */ - TkPointerDeadWindow(macWin->winPtr); TkMacOSXSelDeadWindow(macWin->winPtr); + TkPointerDeadWindow(macWin->winPtr); macWin->toplevel->referenceCount--; if (!Tk_IsTopLevel(macWin->winPtr)) { - TkMacOSXInvalidateWindow(macWin, TK_PARENT_WINDOW); if (macWin->winPtr->parentPtr != NULL) { TkMacOSXInvalClipRgns((Tk_Window)macWin->winPtr->parentPtr); + Tcl_CancelIdleCall(TkMacOSXRedrawViewIdleTask, (void *) view); + Tcl_DoWhenIdle(TkMacOSXRedrawViewIdleTask, (void *) view); } if (macWin->visRgn) { CFRelease(macWin->visRgn); - macWin->visRgn = NULL; + macWin->visRgn = NULL; } if (macWin->aboveVisRgn) { CFRelease(macWin->aboveVisRgn); - macWin->aboveVisRgn = NULL; + macWin->aboveVisRgn = NULL; } if (macWin->drawRgn) { CFRelease(macWin->drawRgn); - macWin->drawRgn = NULL; + macWin->drawRgn = NULL; } if (macWin->toplevel->referenceCount == 0) { @@ -93,15 +98,15 @@ XDestroyWindow( } if (macWin->visRgn) { CFRelease(macWin->visRgn); - macWin->visRgn = NULL; + macWin->visRgn = NULL; } if (macWin->aboveVisRgn) { CFRelease(macWin->aboveVisRgn); - macWin->aboveVisRgn = NULL; + macWin->aboveVisRgn = NULL; } if (macWin->drawRgn) { CFRelease(macWin->drawRgn); - macWin->drawRgn = NULL; + macWin->drawRgn = NULL; } macWin->view = nil; macWin->winPtr->privatePtr = NULL; @@ -147,11 +152,10 @@ XMapWindow( return BadWindow; } MacDrawable *macWin = (MacDrawable *)window; - TkWindow *winPtr = macWin->winPtr; - NSWindow *win = TkMacOSXGetNSWindowForDrawable(window); static Bool initialized = NO; NSPoint mouse = [NSEvent mouseLocation]; int x = mouse.x, y = TkMacOSXZeroScreenHeight() - mouse.y; + //fprintf(stderr, "XMapWindow: %s\n", Tk_PathName(macWin->winPtr)); /* * Under certain situations it's possible for this function to be called @@ -165,29 +169,44 @@ XMapWindow( TkMacOSXMakeRealWindowExist(macWin->toplevel->winPtr); } + TkWindow *winPtr = macWin->winPtr; + NSWindow *win = TkMacOSXGetNSWindowForDrawable(window); + TKContentView *view = [win contentView]; LastKnownRequestProcessed(display)++; if (Tk_IsTopLevel(winPtr)) { if (!Tk_IsEmbedded(winPtr)) { - TKContentView *view = [win contentView]; /* - * We want to activate Tk when a toplevel is mapped but we must not - * supply YES here. This is because during Tk initialization the - * root window is mapped before applicationDidFinishLaunching - * returns. Forcing the app to activate too early can make the menu - * bar unresponsive. + * We want to activate Tk when a toplevel is mapped but we can't + * always specify activateIgnoringOtherApps to be YES. This is + * because during Tk initialization the root window is mapped + * before applicationDidFinishLaunching returns. Forcing the app to + * activate too early can make the menu bar unresponsive. */ TkMacOSXApplyWindowAttributes(winPtr, win); [win setExcludedFromWindowsMenu:NO]; [NSApp activateIgnoringOtherApps:initialized]; - [view addTkDirtyRect: [view bounds]]; if (initialized) { if ([win canBecomeKeyWindow]) { [win makeKeyAndOrderFront:NSApp]; } else { [win orderFrontRegardless]; } + + /* + * Delay for up to 20 milliseconds until the toplevel has + * actually become the highest toplevel. This is to ensure + * that the Visibility event occurs after the toplevel is + * visible. + */ + + for (int try = 0; try < 20; try++) { + if ([[NSApp orderedWindows] firstObject] == win) { + break; + } + [NSThread sleepForTimeInterval:.001]; + } } /* @@ -208,9 +227,7 @@ XMapWindow( */ TkMacOSXInvalClipRgns(contWinPtr); - TkMacOSXInvalidateWindow(macWin, TK_PARENT_WINDOW); } - TkMacOSXInvalClipRgns((Tk_Window)winPtr); } else { /* @@ -222,14 +239,13 @@ XMapWindow( } /* - * Mark the toplevel as needing to be redrawn, unless the window is being - * mapped while drawing is taking place. + * If a geometry manager is mapping hundreds of windows we + * don't want to redraw the view hundreds of times, so do + * it in an idle task. */ - TKContentView *view = [win contentView]; - if (view != [NSView focusView]) { - [view addTkDirtyRect:[view bounds]]; - } + Tcl_CancelIdleCall(TkMacOSXRedrawViewIdleTask, (void *) view); + Tcl_DoWhenIdle(TkMacOSXRedrawViewIdleTask, (void *) view); /* * Generate VisibilityNotify events for window and all mapped children. @@ -253,7 +269,8 @@ XMapWindow( * * NotifyVisibility -- * - * Recursively called helper proc for XMapWindow(). + * Helper for XMapWindow(). Generates VisibilityNotify events + * for the window and all of its descendants. * * Results: * None. @@ -308,7 +325,6 @@ XUnmapWindow( { MacDrawable *macWin = (MacDrawable *)window; TkWindow *winPtr = macWin->winPtr; - TkWindow *parentPtr = winPtr->parentPtr; NSWindow *win = TkMacOSXGetNSWindowForDrawable(window); if (!window) { @@ -353,22 +369,12 @@ XUnmapWindow( } else { /* - * Rebuild the visRgn clip region for the parent so it will be allowed + * Rebuild the clip regions for the parent so it will be allowed * to draw in the space from which this subwindow was removed and then * redraw the window. */ - if (parentPtr && parentPtr->privatePtr->visRgn) { - TkMacOSXInvalidateViewRegion( - TkMacOSXGetNSViewForDrawable(parentPtr->window), - parentPtr->privatePtr->visRgn); - } - TkMacOSXInvalClipRgns((Tk_Window)parentPtr); - TkMacOSXUpdateClipRgn(parentPtr); - } - TKContentView *view = [win contentView]; - if (view != [NSView focusView]) { - [view addTkDirtyRect:[view bounds]]; + TkMacOSXInvalClipRgns((Tk_Window)winPtr->parentPtr); } return Success; } @@ -408,7 +414,6 @@ XResizeWindow( [(TKWindow *)w tkLayoutChanged]; } else { NSRect r = [w contentRectForFrameRect:[w frame]]; - r.origin.y += r.size.height - height; r.size.width = width; r.size.height = height; @@ -739,80 +744,16 @@ XConfigureWindow( NSView *view = TkMacOSXGetNSViewForDrawable(macWin); if (view) { - TkMacOSXInvalClipRgns((Tk_Window)winPtr->parentPtr); - TkpRedrawWidget((Tk_Window)winPtr); + TkMacOSXInvalidateWindow(macWin, TK_PARENT_WINDOW); } } -#if 0 - TkGenWMMoveRequestEvent(macWin->winPtr, - macWin->winPtr->changes.x, macWin->winPtr->changes.y); -#endif return Success; } /* *---------------------------------------------------------------------- * - * TkMacOSXSetDrawingEnabled -- - * - * This function sets the TK_DO_NOT_DRAW flag for a given window and - * all of its children. - * - * Results: - * None. - * - * Side effects: - * The clipping regions for the window and its children are cleared. - * - *---------------------------------------------------------------------- - */ - -void -TkMacOSXSetDrawingEnabled( - TkWindow *winPtr, - int flag) -{ - TkWindow *childPtr; - MacDrawable *macWin = winPtr->privatePtr; - - if (macWin) { - if (flag) { - macWin->flags &= ~TK_DO_NOT_DRAW; - } else { - macWin->flags |= TK_DO_NOT_DRAW; - } - } - - /* - * Set the flag for all children & their descendants, excluding Toplevels. - * (??? Do we need to exclude Toplevels?) - */ - - childPtr = winPtr->childList; - while (childPtr) { - if (!Tk_IsTopLevel(childPtr)) { - TkMacOSXSetDrawingEnabled(childPtr, flag); - } - childPtr = childPtr->nextPtr; - } - - /* - * If the window is a container, set the flag for its embedded window. - */ - - if (Tk_IsContainer(winPtr)) { - childPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)winPtr); - - if (childPtr) { - TkMacOSXSetDrawingEnabled(childPtr, flag); - } - } -} - -/* - *---------------------------------------------------------------------- - * * TkMacOSXUpdateClipRgn -- * * This function updates the clipping regions for a given window and all of @@ -964,6 +905,7 @@ TkMacOSXUpdateClipRgn( } } +// Unused and misspelled stub function /* *---------------------------------------------------------------------- * @@ -992,6 +934,10 @@ TkMacOSXVisableClipRgn( return (Region) HIShapeCreateMutableCopy(winPtr->privatePtr->visRgn); } +#if 0 +//This code is not currently used. But it shows how to iterate over the +//rectangles in a region described by an HIShape. + /* *---------------------------------------------------------------------- * @@ -1029,9 +975,9 @@ InvalViewRect( break; case kHIShapeEnumerateRect: dirtyRect = NSRectFromCGRect(CGRectApplyAffineTransform(*rect, t)); - [view addTkDirtyRect:dirtyRect]; break; } + [view generateExposeEvents:[view bounds]]; return noErr; } @@ -1046,22 +992,34 @@ TkMacOSXInvalidateViewRegion( InvalViewRect, view); } } +#endif /* *---------------------------------------------------------------------- * * TkMacOSXInvalidateWindow -- * - * This function invalidates a window and (optionally) its children. + * This stub function redraws the part of the toplevel window + * covered by a given Tk window. (Except currently it redraws + * the entire toplevel.) * * Results: * None. * * Side effects: - * Damage is created. + * The window is redrawn. * *---------------------------------------------------------------------- */ +void +TkMacOSXRedrawViewIdleTask( + void *clientData) +{ + TKContentView *view = (TKContentView *) clientData; + // fprintf(stderr, "idle redraw for %p\n", view); + [view generateExposeEvents:[view bounds]]; + [view setNeedsDisplay:YES]; +} void TkMacOSXInvalidateWindow( @@ -1072,11 +1030,16 @@ TkMacOSXInvalidateWindow( #ifdef TK_MAC_DEBUG_CLIP_REGIONS TkMacOSXDbgMsg("%s", macWin->winPtr->pathName); #endif - if (macWin->flags & TK_CLIP_INVALID) { - TkMacOSXUpdateClipRgn(macWin->winPtr); + TKContentView *view = (TKContentView *)TkMacOSXGetNSViewForDrawable(macWin); + TkWindow *winPtr = macWin->winPtr; + Tk_Window tkwin = (Tk_Window) winPtr; + Tk_Window parent = (Tk_Window) winPtr->parentPtr; + TkMacOSXInvalClipRgns(tkwin); + if ((flag == TK_PARENT_WINDOW) && parent){ + TkMacOSXInvalClipRgns(parent); } - TkMacOSXInvalidateViewRegion(TkMacOSXGetNSViewForDrawable(macWin), - (flag == TK_WINDOW_ONLY) ? macWin->visRgn : macWin->aboveVisRgn); + [view generateExposeEvents:[view bounds]]; + [view setNeedsDisplay:YES]; } /* @@ -1105,17 +1068,19 @@ Tk_MacOSXGetNSWindowForDrawable( if (!macWin || macWin->flags & TK_IS_PIXMAP) { result = nil; + } else if (macWin->toplevel && macWin->toplevel->winPtr && macWin->toplevel->winPtr->wmInfoPtr && macWin->toplevel->winPtr->wmInfoPtr->window) { result = macWin->toplevel->winPtr->wmInfoPtr->window; + } else if (macWin->winPtr && macWin->winPtr->wmInfoPtr && macWin->winPtr->wmInfoPtr->window) { result = macWin->winPtr->wmInfoPtr->window; + } else if (macWin->toplevel && (macWin->toplevel->flags & TK_EMBEDDED)) { TkWindow *contWinPtr = (TkWindow *)Tk_GetOtherWindow((Tk_Window)macWin->toplevel->winPtr); - - if (contWinPtr) { + if (contWinPtr && contWinPtr->privatePtr) { result = TkMacOSXGetNSWindowForDrawable((Drawable)contWinPtr->privatePtr); } } diff --git a/macosx/tkMacOSXSysTray.c b/macosx/tkMacOSXSysTray.c index 21055f0..2ba7238 100644 --- a/macosx/tkMacOSXSysTray.c +++ b/macosx/tkMacOSXSysTray.c @@ -205,7 +205,7 @@ MacSystrayObjCmd( static const char *modifyOptions[] = {"image", "text", "b1_callback", "b3_callback", NULL}; typedef enum {TRAY_IMAGE, TRAY_TEXT, TRAY_B1_CALLBACK, TRAY_B3_CALLBACK - } modifyOptionsEnum; + } modifyOptionsEnum; if ([NSApp macOSVersion] < 101000) { Tcl_AppendResult(interp, @@ -329,9 +329,9 @@ MacSystrayObjCmd( break; } - /* - * Modify the text for the tooltip. - */ + /* + * Modify the text for the tooltip. + */ case TRAY_TEXT: { NSString *tooltip = [NSString stringWithUTF8String:Tcl_GetString(objv[3])]; @@ -345,9 +345,9 @@ MacSystrayObjCmd( break; } - /* - * Modify the proc for the callback. - */ + /* + * Modify the proc for the callback. + */ case TRAY_B1_CALLBACK: { [statusItem setB1Callback : objv[3]]; @@ -365,14 +365,14 @@ MacSystrayObjCmd( /* * Set all properties to nil, and release statusItem. */ - [statusItem setImagewithImage: nil]; - [statusItem setTextwithString: nil]; - [statusItem setB1Callback : NULL]; - [statusItem setB3Callback : NULL]; - [statusItem release]; - *info = NULL; - statusItem = NULL; - break; + [statusItem setImagewithImage: nil]; + [statusItem setTextwithString: nil]; + [statusItem setB1Callback : NULL]; + [statusItem setB3Callback : NULL]; + [statusItem release]; + *info = NULL; + statusItem = NULL; + break; } } diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c index 3be0c92..459c514 100644 --- a/macosx/tkMacOSXTest.c +++ b/macosx/tkMacOSXTest.c @@ -21,9 +21,6 @@ * Forward declarations of procedures defined later in this file: */ -#if !defined(NDEBUG) && MAC_OS_X_VERSION_MAX_ALLOWED < 1080 -static Tcl_ObjCmdProc2 DebuggerObjCmd; -#endif static Tcl_ObjCmdProc2 PressButtonObjCmd; static Tcl_ObjCmdProc2 MoveMouseObjCmd; static Tcl_ObjCmdProc2 InjectKeyEventObjCmd; @@ -55,9 +52,6 @@ TkplatformtestInit( * Add commands for platform specific tests on MacOS here. */ -#if !defined(NDEBUG) && MAC_OS_X_VERSION_MAX_ALLOWED < 1080 - Tcl_CreateObjCommand2(interp, "debugger", DebuggerObjCmd, NULL, NULL); -#endif Tcl_CreateObjCommand2(interp, "pressbutton", PressButtonObjCmd, NULL, NULL); Tcl_CreateObjCommand2(interp, "movemouse", MoveMouseObjCmd, NULL, NULL); Tcl_CreateObjCommand2(interp, "injectkeyevent", InjectKeyEventObjCmd, NULL, NULL); @@ -68,36 +62,6 @@ TkplatformtestInit( /* *---------------------------------------------------------------------- * - * DebuggerObjCmd -- - * - * This procedure simply calls the low level debugger, which was - * deprecated in OSX 10.8. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -#if !defined(NDEBUG) && MAC_OS_X_VERSION_MAX_ALLOWED < 1080 -static int -DebuggerObjCmd( - TCL_UNUSED(void *), - TCL_UNUSED(Tcl_Interp *), - TCL_UNUSED(Tcl_Size), - TCL_UNUSED(Tcl_Obj *const *)) -{ - Debugger(); - return TCL_OK; -} -#endif - -/* - *---------------------------------------------------------------------- - * * MenuBarHeightObjCmd -- * * This procedure calls [NSMenu menuBarHeight] and returns the result @@ -140,6 +104,8 @@ MenuBarHeightObjCmd( * Returns true if and only if the NSView of the drawable is the * current focusView, which on 10.14 and newer systems can only be the * case when within [NSView drawRect]. + * NOTE: This is no longer needed when we use updateLayer instead + * of drawRect. Now it always returns True. * * Side effects: * None @@ -151,21 +117,8 @@ MODULE_SCOPE Bool TkTestLogDisplay( Drawable drawable) { - MacDrawable *macWin = (MacDrawable *)drawable; - NSWindow *win = nil; - if (macWin->toplevel && macWin->toplevel->winPtr && - macWin->toplevel->winPtr->wmInfoPtr && - macWin->toplevel->winPtr->wmInfoPtr->window) { - win = macWin->toplevel->winPtr->wmInfoPtr->window; - } else if (macWin->winPtr && macWin->winPtr->wmInfoPtr && - macWin->winPtr->wmInfoPtr->window) { - win = macWin->winPtr->wmInfoPtr->window; - } - if (win) { - return ([win contentView] == [NSView focusView]); - } else { - return True; - } + (void) drawable; + return True; } /* @@ -210,8 +163,8 @@ PressButtonObjCmd( } if (objc != 3) { - Tcl_WrongNumArgs(interp, 1, objv, "x y"); - return TCL_ERROR; + Tcl_WrongNumArgs(interp, 1, objv, "x y"); + return TCL_ERROR; } for (i = 1; i < objc; i++) { if (Tcl_GetIntFromObj(interp,objv[i],&value) != TCL_OK) { @@ -310,8 +263,8 @@ MoveMouseObjCmd( } if (objc != 3) { - Tcl_WrongNumArgs(interp, 1, objv, "x y"); - return TCL_ERROR; + Tcl_WrongNumArgs(interp, 1, objv, "x y"); + return TCL_ERROR; } for (i = 1; i < objc; i++) { if (Tcl_GetIntFromObj(interp,objv[i],&value) != TCL_OK) { @@ -373,12 +326,12 @@ InjectKeyEventObjCmd( if (objc < 3) { wrongArgs: - Tcl_WrongNumArgs(interp, 1, objv, "option keysym ?arg?"); - return TCL_ERROR; + Tcl_WrongNumArgs(interp, 1, objv, "option keysym ?arg?"); + return TCL_ERROR; } if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings, - sizeof(char *), "option", 0, &index) != TCL_OK) { - return TCL_ERROR; + sizeof(char *), "option", 0, &index) != TCL_OK) { + return TCL_ERROR; } type = types[index]; if (Tcl_GetIntFromObj(interp, objv[2], &keysym) != TCL_OK) { @@ -390,37 +343,37 @@ InjectKeyEventObjCmd( macKC.uint = XKeysymToKeycode(NULL, keysym); for (i = 3; i < objc; i++) { if (Tcl_GetIndexFromObjStruct(interp, objv[i], argStrings, - sizeof(char *), "option", TCL_EXACT, &index) != TCL_OK) { - return TCL_ERROR; - } - switch ((enum args) index) { + sizeof(char *), "option", TCL_EXACT, &index) != TCL_OK) { + return TCL_ERROR; + } + switch ((enum args) index) { case KEYEVENT_SHIFT: mods |= NSShiftKeyMask; - break; + break; case KEYEVENT_CONTROL: mods |= NSControlKeyMask; - break; + break; case KEYEVENT_OPTION: mods |= NSAlternateKeyMask; - break; + break; case KEYEVENT_COMMAND: mods |= NSCommandKeyMask; - break; + break; case KEYEVENT_FUNCTION: mods |= NSFunctionKeyMask; - break; + break; case KEYEVENT_X: if (++i >= objc) { - goto wrongArgs; - } + goto wrongArgs; + } if (Tcl_GetIntFromObj(interp,objv[i], &x) != TCL_OK) { return TCL_ERROR; } break; case KEYEVENT_Y: if (++i >= objc) { - goto wrongArgs; - } + goto wrongArgs; + } if (Tcl_GetIntFromObj(interp,objv[i], &y) != TCL_OK) { return TCL_ERROR; } @@ -448,7 +401,7 @@ InjectKeyEventObjCmd( } keyEvent = [NSEvent keyEventWithType:type location:NSMakePoint(x, y) - modifierFlags:mods + modifierFlags:mods timestamp:GetCurrentEventTime() windowNumber:0 context:nil diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index e261bee..13dc916 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -134,13 +134,6 @@ extern NSString *NSWindowDidOrderOffScreenNotification; Tk_MapWindow((Tk_Window)winPtr); /* - * Process all Tk events generated by Tk_MapWindow(). - */ - - while (Tcl_ServiceEvent(0)) {} - while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {} - - /* * NSWindowDidDeminiaturizeNotification is received after * NSWindowDidBecomeKeyNotification, so activate manually */ @@ -150,7 +143,7 @@ extern NSString *NSWindowDidOrderOffScreenNotification; } - (NSRect)windowWillUseStandardFrame:(NSWindow *)window - defaultFrame:(NSRect)newFrame + defaultFrame:(NSRect)newFrame { (void)window; @@ -238,15 +231,14 @@ extern NSString *NSWindowDidOrderOffScreenNotification; TkWindow *winPtr = TkMacOSXGetTkWindow(window); if (winPtr) { TKContentView *view = [window contentView]; + // fprintf(stderr, "Window %s became visible.\n", Tk_PathName(winPtr)); #if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 if (@available(macOS 10.14, *)) { [view viewDidChangeEffectiveAppearance]; } #endif - [view addTkDirtyRect:[view bounds]]; - Tcl_CancelIdleCall(TkMacOSXDrawAllViews, NULL); - Tcl_DoWhenIdle(TkMacOSXDrawAllViews, NULL); + [view setNeedsDisplay:YES]; } } @@ -256,7 +248,7 @@ extern NSString *NSWindowDidOrderOffScreenNotification; TkWindow *winPtr = TkMacOSXGetTkWindow(w); if (winPtr) { - while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {} + // fprintf(stderr, "Window %s was ordered on screen.\n", Tk_PathName(winPtr)); } } @@ -264,10 +256,10 @@ extern NSString *NSWindowDidOrderOffScreenNotification; { NSString *name = [notification name]; if ([name isEqualToString:NSWindowWillStartLiveResizeNotification]) { - // printf("Starting live resize.\n"); + // fprintf(stderr, "Starting live resize.\n"); } else if ([name isEqualToString:NSWindowDidEndLiveResizeNotification]) { [self setTkLiveResizeEnded:YES]; - // printf("Ending live resize\n"); + // fprintf(stderr, "Ending live resize\n"); } } @@ -284,9 +276,11 @@ extern NSString *NSWindowDidOrderOffScreenNotification; NSWindow *w = [notification object]; TkWindow *winPtr = TkMacOSXGetTkWindow(w); +#if 0 if (winPtr) { - //Tk_UnmapWindow((Tk_Window)winPtr); + Tk_UnmapWindow((Tk_Window)winPtr); } +#endif } #endif /* TK_MAC_DEBUG_NOTIFICATIONS */ @@ -308,11 +302,8 @@ extern NSString *NSWindowDidOrderOffScreenNotification; observe(NSWindowDidOrderOnScreenNotification, windowBecameVisible:); observe(NSWindowWillStartLiveResizeNotification, windowLiveResize:); observe(NSWindowDidEndLiveResizeNotification, windowLiveResize:); - -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 observe(NSWindowDidEnterFullScreenNotification, windowEnteredFullScreen:); observe(NSWindowDidExitFullScreenNotification, windowExitedFullScreen:); -#endif #ifdef TK_MAC_DEBUG_NOTIFICATIONS observe(NSWindowWillMoveNotification, windowDragStart:); @@ -396,7 +387,7 @@ static void RefocusGrabWindow(void *data) { } - (BOOL)applicationShouldHandleReopen:(NSApplication *)sender - hasVisibleWindows:(BOOL)flag + hasVisibleWindows:(BOOL)flag { (void)sender; (void)flag; @@ -447,7 +438,7 @@ static void RefocusGrabWindow(void *data) { @end #pragma mark - - + /* *---------------------------------------------------------------------- * @@ -473,33 +464,13 @@ static void RefocusGrabWindow(void *data) { * *---------------------------------------------------------------------- */ - +// This stub is no longer used, but is expected by the stub mechanism. int TkpWillDrawWidget(Tk_Window tkwin) { - int result; - if (tkwin) { - TkWindow *winPtr = (TkWindow *)tkwin; - TKContentView *view = (TKContentView *)TkMacOSXGetNSViewForDrawable( - (Drawable)winPtr->privatePtr); - result = ([NSApp isDrawing] && view == [NSView focusView]); -#if 0 - printf("TkpWillDrawWidget: %s %d %d \n", Tk_PathName(tkwin), - [NSApp isDrawing], (view == [NSView focusView])); - if (!result) { - NSRect dirtyRect; - TkMacOSXWinNSBounds(winPtr, view, &dirtyRect); - printf("TkpAppCanDraw: dirtyRect for %s is %s\n", - Tk_PathName(tkwin), - NSStringFromRect(dirtyRect).UTF8String); - [view addTkDirtyRect:dirtyRect]; - } -#endif - } else { - result = [NSApp isDrawing]; - } - return result; + (void) tkwin; + return false; } - + /* *---------------------------------------------------------------------- * @@ -527,11 +498,14 @@ GenerateUpdates( TkWindow *childPtr; XEvent event; CGRect bounds, damageBounds; + NSView *view = TkMacOSXGetNSViewForDrawable((Drawable)winPtr->privatePtr); TkMacOSXWinCGBounds(winPtr, &bounds); +#if 0 if (!CGRectIntersectsRect(bounds, *updateBounds)) { return 0; } +#endif /* * Compute the bounding box of the area that the damage occurred in. @@ -548,7 +522,11 @@ GenerateUpdates( event.xexpose.width = damageBounds.size.width; event.xexpose.height = damageBounds.size.height; event.xexpose.count = 0; - Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL); + if ([view inLiveResize]) { + Tk_HandleEvent(&event); + } else { + Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL); + } #ifdef TK_MAC_DEBUG_DRAWING TKLog(@"Exposed %p {{%d, %d}, {%d, %d}}", event.xany.window, event.xexpose.x, @@ -871,7 +849,7 @@ TkWmProtocolEventProc( Tcl_Preserve(protPtr); interp = protPtr->interp; Tcl_Preserve(interp); - result = Tcl_EvalEx(interp, protPtr->command, TCL_INDEX_NONE, TCL_EVAL_GLOBAL); + result = Tcl_EvalEx(interp, Tcl_GetString(protPtr->commandObj), TCL_INDEX_NONE, TCL_EVAL_GLOBAL); if (result != TCL_OK) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (command for \"%s\" window manager protocol)", @@ -952,40 +930,16 @@ ExposeRestrictProc( ? TK_PROCESS_EVENT : TK_DEFER_EVENT); } -/* - * Restrict event processing to ConfigureNotify events. - */ - -static Tk_RestrictAction -ConfigureRestrictProc( - TCL_UNUSED(void *), - XEvent *eventPtr) -{ - return (eventPtr->type==ConfigureNotify ? TK_PROCESS_EVENT : TK_DEFER_EVENT); -} - @implementation TKContentView(TKWindowEvent) - (id)initWithFrame:(NSRect)frame { self = [super initWithFrame:frame]; if (self) { - /* - * The layer must exist before we set wantsLayer to YES. - */ - - self.layer = [CALayer layer]; self.wantsLayer = YES; self.layerContentsRedrawPolicy = NSViewLayerContentsRedrawOnSetNeedsDisplay; self.layer.contentsGravity = self.layer.contentsAreFlipped ? kCAGravityTopLeft : kCAGravityBottomLeft; - - /* - * Nothing gets drawn at all if the layer does not have a delegate. - * Currently, we do not implement any methods of the delegate, however. - */ - - self.layer.delegate = (id) self; trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds] options:(NSTrackingMouseEnteredAndExited | @@ -995,21 +949,40 @@ ConfigureRestrictProc( NSTrackingActiveAlways) owner:self userInfo:nil]; - [self addTrackingArea:trackingArea]; + [self addTrackingArea:trackingArea]; } return self; } -/* - * We will just use drawRect. - */ - - (BOOL) wantsUpdateLayer { - return NO; + return YES; +} +- (void) updateLayer { + CGContextRef context = self.tkLayerBitmapContext; + if (context && ![NSApp tkWillExit]) { + /* + * Create a CGImage by copying (probably using copy-on-write) the + * bitmap data of the CGBitmapContext that we have been using for + * drawing. Then render that CGImage into the CALayer of this view by + * assigning a reference to the CGImage to the contents property of the + * layer. This will cause all drawing done since the last call to this + * function to become visible. + */ + + CGImageRef newImg = CGBitmapContextCreateImage(context); + self.layer.contents = (__bridge id) newImg; + CGImageRelease(newImg); // will quickly leak memory if this is missing + + /* + * Run any pending widget display procs as part of the update. + * Without this there are black flashes when a window opens. + */ + + while(Tcl_DoOneEvent(TCL_IDLE_EVENTS)){} + } } -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 - (void) viewDidChangeBackingProperties { @@ -1021,116 +994,62 @@ ConfigureRestrictProc( */ self.layer.contentsScale = self.window.screen.backingScaleFactor; -} -#endif - -- (void) addTkDirtyRect: (NSRect) rect -{ - _tkNeedsDisplay = YES; - _tkDirtyRect = NSUnionRect(_tkDirtyRect, rect); - [NSApp setNeedsToDraw:YES]; - [self setNeedsDisplay:YES]; - [[self layer] setNeedsDisplay]; -} - -- (void) clearTkDirtyRect -{ - _tkNeedsDisplay = NO; - _tkDirtyRect = NSZeroRect; - [NSApp setNeedsToDraw:NO]; -} - -- (void) drawRect: (NSRect) rect -{ - (void)rect; - -#ifdef TK_MAC_DEBUG_DRAWING - TkWindow *winPtr = TkMacOSXGetTkWindow([self window]); - if (winPtr) { - fprintf(stderr, "drawRect: drawing %s in %s\n", - Tk_PathName(winPtr), NSStringFromRect(rect).UTF8String); - } -#endif - - /* - * We do not allow recursive calls to drawRect, but we only log them on OSX - * > 10.13, where they should never happen. - */ - - if ([NSApp isDrawing]) { - if ([NSApp macOSVersion] > 101300) { - TKLog(@"WARNING: a recursive call to drawRect was aborted."); - } - return; - } - - [NSApp setIsDrawing: YES]; - [self clearTkDirtyRect]; - [self generateExposeEvents:rect]; - [NSApp setIsDrawing:NO]; - -#ifdef TK_MAC_DEBUG_DRAWING - fprintf(stderr, "drawRect: done.\n"); -#endif + [self resetTkLayerBitmapContext]; + // need to redraw + [self generateExposeEvents: self.bounds]; } -(void) setFrameSize: (NSSize)newsize { + NSSize oldsize = self.bounds.size; [super setFrameSize: newsize]; + if ((newsize.width == 1 && newsize.height == 1) || + (oldsize.width == 0 && oldsize.height == 0)) { + return; + } NSWindow *w = [self window]; TkWindow *winPtr = TkMacOSXGetTkWindow(w); Tk_Window tkwin = (Tk_Window)winPtr; - if (![self inLiveResize] && - [w respondsToSelector: @selector (tkLayoutChanged)]) { - [(TKWindow *)w tkLayoutChanged]; - } - if (winPtr) { - unsigned int width = (unsigned int)newsize.width; - unsigned int height=(unsigned int)newsize.height; - void *oldArg; - Tk_RestrictProc *oldProc; + unsigned int width = (unsigned int) newsize.width; + unsigned int height= (unsigned int) newsize.height; /* - * This can be called from outside the Tk event loop. Since it calls - * Tcl_DoOneEvent, we need to make sure we don't clobber the - * AutoreleasePool set up by the caller. + * This function can be re-entered, so we need to make sure we don't + * clobber any AutoreleasePool set up by the caller. */ [NSApp _lockAutoreleasePool]; - /* - * Disable Tk drawing until the window has been completely configured. - */ - - TkMacOSXSetDrawingEnabled(winPtr, 0); - /* * Generate and handle a ConfigureNotify event for the new size. */ TkGenWMConfigureEvent(tkwin, Tk_X(tkwin), Tk_Y(tkwin), width, height, TK_SIZE_CHANGED | TK_MACOSX_HANDLE_EVENT_IMMEDIATELY); - oldProc = Tk_RestrictEvents(ConfigureRestrictProc, NULL, &oldArg); - Tk_RestrictEvents(oldProc, oldArg, &oldArg); /* - * Now that Tk has configured all subwindows, create the clip regions. + * Update Tk's window data for the new size. */ - TkMacOSXSetDrawingEnabled(winPtr, 1); - TkMacOSXInvalClipRgns(tkwin); - TkMacOSXUpdateClipRgn(winPtr); + if ([w respondsToSelector: @selector (tkLayoutChanged)]) { + [(TKWindow *)w tkLayoutChanged]; + } - /* - * Generate and process expose events to redraw the window. To avoid - * crashes, only do this if we are being called from drawRect. See - * ticket [1fa8c3ed8d]. - */ + /* + * Reset the cgimage layer and redraw the entire content view. + */ + + [self viewDidChangeBackingProperties]; + + /* + * In live resize we seem to need to draw a second time to + * avoid artifacts. + */ - if([NSApp isDrawing] || [self inLiveResize]) { - [self generateExposeEvents: [self bounds]]; + if ([self inLiveResize]) { + [self generateExposeEvents:self.bounds]; } /* @@ -1138,7 +1057,14 @@ ConfigureRestrictProc( */ [NSApp _unlockAutoreleasePool]; + } + + /* + * Request a call to updateLayer. + */ + + [self setNeedsDisplay:YES]; } /* @@ -1150,53 +1076,62 @@ ConfigureRestrictProc( - (void) generateExposeEvents: (NSRect) rect { - unsigned long serial; - int updatesNeeded; CGRect updateBounds; TkWindow *winPtr = TkMacOSXGetTkWindow([self window]); void *oldArg; Tk_RestrictProc *oldProc; - if (!winPtr) { + static int reentered = 0; + + if (!winPtr || + (winPtr->flags & (TK_ALREADY_DEAD)) || + !Tk_IsMapped(winPtr)) { return; } + if (reentered) { + /* + * When in liveResize an event loop gets run below to + * immediately process displayProcs while the resize is being + * done. Those can cause calls to this function, leading to + * crashes or very poor performance. The reentered flag is + * used to detect this. + */ + // fprintf(stderr, "Recursive call to generateExposeEvents\n"); + return; + } + reentered = 1; + /* * Generate Tk Expose events. All of these events will share the same * serial number. */ - - updateBounds = NSRectToCGRect(rect); + if ([self inLiveResize]) { + updateBounds = [self bounds]; + } else { + updateBounds = NSRectToCGRect(rect); + } updateBounds.origin.y = ([self bounds].size.height - updateBounds.origin.y - updateBounds.size.height); - updatesNeeded = GenerateUpdates(&updateBounds, winPtr); - if (updatesNeeded) { - - serial = LastKnownRequestProcessed(Tk_Display(winPtr)); - + if ( GenerateUpdates(&updateBounds, winPtr)) { /* - * Use the ExposeRestrictProc to process only the expose events. This - * will create idle drawing tasks, which we handle before we return. + * Use the ExposeRestrictProc to process the expose events we just + * generated. This will create idle drawing tasks, which we handle + * before we return in the case of a live resize. */ - - oldProc = Tk_RestrictEvents(ExposeRestrictProc, UINT2PTR(serial), &oldArg); - while (Tcl_ServiceEvent(TCL_WINDOW_EVENTS|TCL_DONT_WAIT)) {}; - Tk_RestrictEvents(oldProc, oldArg, &oldArg); + unsigned int serial = LastKnownRequestProcessed(Tk_Display(winPtr)); + oldProc = Tk_RestrictEvents(ExposeRestrictProc, UINT2PTR(serial), &oldArg); + while (Tcl_ServiceEvent(TCL_WINDOW_EVENTS|TCL_DONT_WAIT)) {}; + Tk_RestrictEvents(oldProc, NULL, &oldArg); /* - * Starting with OSX 10.14, which uses Core Animation to draw windows, - * all drawing must be done within the drawRect method. (The CGContext - * which draws to the backing CALayer is created by the NSView before - * calling drawRect, and destroyed when drawRect returns. Drawing done - * with the current CGContext outside of the drawRect method has no - * effect.) - * - * Fortunately, Tk schedules all drawing to be done while Tcl is idle. - * So to run any display procs which were scheduled by the expose - * events we process all idle events before returning. + * During a LiveResize we process all idle tasks generated by the + * expose events to redraw the window while it is being resized. */ - - while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {} + if ([self inLiveResize]) { + while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {} + } } + reentered = 0; } /* @@ -1242,7 +1177,7 @@ static const char *const accentNames[] = { } NSString *accent = [preferences stringForKey:@"AppleAccentColor"]; NSArray *words = [[preferences stringForKey:@"AppleHighlightColor"] - componentsSeparatedByString: @" "]; + componentsSeparatedByString: @" "]; NSString *highlight = [words count] > 3 ? [words objectAtIndex:3] : nil; const char *accentName = accent ? accentNames[1 + accent.intValue] : defaultColor; const char *highlightName = highlight ? highlight.UTF8String: defaultColor; @@ -1251,6 +1186,8 @@ static const char *const accentNames[] = { effectiveAppearanceName.UTF8String, accentName, highlightName); Tk_SendVirtualEvent(tkwin, "AppearanceChanged", Tcl_NewStringObj(data, TCL_INDEX_NONE)); + // Force a redraw of the view. + [self setFrameSize:self.frame.size]; } - (void)observeValueForKeyPath:(NSString *)keyPath @@ -1352,6 +1289,32 @@ static const char *const accentNames[] = { return [super validRequestorForSendType:sendType returnType:returnType]; } +-(void) resetTkLayerBitmapContext { + static CGColorSpaceRef colorspace = NULL; + if (colorspace == NULL) { + colorspace = CGColorSpaceCreateDeviceRGB(); + CGColorSpaceRetain(colorspace); + } + CGContextRef newCtx = CGBitmapContextCreate( + NULL, self.layer.contentsScale * self.frame.size.width, + self.layer.contentsScale * self.frame.size.height, 8, 0, colorspace, + kCGBitmapByteOrder32Big | kCGImageAlphaNoneSkipLast // will also need to specify this when capturing + ); + CGContextScaleCTM(newCtx, self.layer.contentsScale, self.layer.contentsScale); +#if 0 + fprintf(stderr, "rTkLBC %.1f %s %p %p %ld\n", (float)self.layer.contentsScale, + NSStringFromSize(self.frame.size).UTF8String, colorspace, newCtx, + self.tkLayerBitmapContext ? + (long)CFGetRetainCount(self.tkLayerBitmapContext) : INT_MIN); + fprintf(stderr, "rTkLBC %p %ld\n", self.tkLayerBitmapContext, + (long)(self.tkLayerBitmapContext ? + CFGetRetainCount(self.tkLayerBitmapContext) : LONG_MIN)); +#endif + // The context is also released in TkWmDeadWindow. + CGContextRelease(self.tkLayerBitmapContext); + self.tkLayerBitmapContext = newCtx; +} + @end /* diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 9b4db14..8c1f508 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -112,7 +112,7 @@ static const struct { .forceOnAttrs = kWindowNoTitleBarAttribute | kWindowDoesNotCycleAttribute, .flags = WM_TOPMOST, - .styleMask = 0}, + .styleMask = 0}, [kSheetWindowClass] = { .validAttrs = kWindowResizableAttribute, .forceOnAttrs = kWindowNoTitleBarAttribute | @@ -291,6 +291,7 @@ static void syncLayout(NSWindow *macWindow) contentRect.size.width; wmPtr->parentHeight = winPtr->changes.height + frameRect.size.height - contentRect.size.height; + TkMacOSXInvalClipRgns((Tk_Window)winPtr); } } #endif @@ -555,16 +556,6 @@ static void placeAsTab(TKWindow *macWindow) { @implementation NSWindow(TKWm) -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 -- (NSPoint) tkConvertPointToScreen: (NSPoint) point -{ - return [self convertBaseToScreen:point]; -} -- (NSPoint) tkConvertPointFromScreen: (NSPoint)point -{ - return [self convertScreenToBase:point]; -} -#else - (NSPoint) tkConvertPointToScreen: (NSPoint) point { NSRect pointrect = {point, {0,0}}; @@ -576,7 +567,6 @@ static void placeAsTab(TKWindow *macWindow) { NSRect pointrect = {point, {0,0}}; return [self convertRectFromScreen:pointrect].origin; } -#endif @end #pragma mark - @@ -587,6 +577,7 @@ static void placeAsTab(TKWindow *macWindow) { - (void) tkLayoutChanged { syncLayout(self); + [[self contentView] setNeedsDisplay:YES]; } @end @@ -606,6 +597,7 @@ static void placeAsTab(TKWindow *macWindow) { - (void) tkLayoutChanged { syncLayout(self); + [[self contentView] setNeedsDisplay:YES]; } #if MAC_OS_X_VERSION_MAX_ALLOWED >= 101300 @@ -621,7 +613,7 @@ static void placeAsTab(TKWindow *macWindow) { #endif - (NSSize)windowWillResize:(NSWindow *)sender - toSize:(NSSize)frameSize + toSize:(NSSize)frameSize { NSRect currentFrame = [sender frame]; TkWindow *winPtr = TkMacOSXGetTkWindow(sender); @@ -818,30 +810,29 @@ FrontWindowAtPoint( int y) { NSPoint p = NSMakePoint(x, TkMacOSXZeroScreenHeight() - y); - NSArray *windows = [NSApp orderedWindows]; - TkWindow *winPtr = NULL; - for (NSWindow *w in windows) { - winPtr = TkMacOSXGetTkWindow(w); + for (NSWindow *w in [NSApp orderedWindows]) { + TkWindow *winPtr = TkMacOSXGetTkWindow(w); if (winPtr) { - WmInfo *wmPtr = winPtr->wmInfoPtr; NSRect windowFrame = [w frame]; - NSRect contentFrame = [w frame]; + NSRect contentFrame = windowFrame; - contentFrame.size.height = [[w contentView] frame].size.height; /* * For consistency with other platforms, points in the * title bar are not considered to be contained in the * window. */ - if ((wmPtr->hints.initial_state == NormalState || - wmPtr->hints.initial_state == ZoomState)) { - if (NSMouseInRect(p, contentFrame, NO)) { - return winPtr; - } else if (NSMouseInRect(p, windowFrame, NO)) { - return NULL; - } + contentFrame.size.height = [[w contentView] frame].size.height; + if (NSMouseInRect(p, contentFrame, NO)) { + return winPtr; + } else if (NSMouseInRect(p, windowFrame, NO)) { + /* + * The pointer is in the title bar of the highest NSWindow + * containing it, and therefore it should not be considered + * to be contained in any Tk window. + */ + return NULL; } } } @@ -1100,12 +1091,15 @@ TkWmUnmapWindow( * * This procedure is invoked when a top-level window is about to be * deleted. It cleans up the wm-related data structures for the window. + * If the dead window contains the pointer, TkUpdatePointer is called + * to tell Tk which window will be the new pointer window. * * Results: * None. * * Side effects: - * The WmInfo structure for winPtr gets freed up. + * The WmInfo structure for winPtr gets freed. Tk's cached pointer + * window may change. * *---------------------------------------------------------------------- */ @@ -1114,13 +1108,15 @@ void TkWmDeadWindow( TkWindow *winPtr) /* Top-level window that's being deleted. */ { + TkWindow *winPtr2; + NSWindow *w; WmInfo *wmPtr = winPtr->wmInfoPtr, *wmPtr2; - TKWindow *deadNSWindow; - - if (wmPtr == NULL) { - return; + TKWindow *deadNSWindow = NULL; + if (Tk_WindowId(winPtr) == None) { + fprintf(stderr, "TkWmDeadWindow: no window id\n"); + } else { + deadNSWindow = (TKWindow *)TkMacOSXGetNSWindowForDrawable(Tk_WindowId(winPtr)); } - /* *If the dead window is a transient, remove it from the container's list. */ @@ -1172,11 +1168,10 @@ TkWmDeadWindow( for (Transient *transientPtr = wmPtr->transientPtr; transientPtr != NULL; transientPtr = transientPtr->nextPtr) { - TkWindow *winPtr2 = transientPtr->winPtr; - TkWindow *containerPtr = (TkWindow *)TkMacOSXGetContainer(winPtr2); - + TkWindow *containerPtr = (TkWindow *)TkMacOSXGetContainer( + transientPtr->winPtr); if (containerPtr == winPtr) { - wmPtr2 = winPtr2->wmInfoPtr; + wmPtr2 = transientPtr->winPtr->wmInfoPtr; wmPtr2->container = NULL; } } @@ -1188,29 +1183,48 @@ TkWmDeadWindow( ckfree(transientPtr); } - deadNSWindow = (TKWindow *)wmPtr->window; - /* * Remove references to the Tk window from the mouse event processing - * state which is recorded in the NSApplication object. + * state which is recorded in the NSApplication object and notify Tk + * of the new pointer window. */ - if (winPtr == [NSApp tkPointerWindow]) { - NSWindow *w; - NSPoint mouse = [NSEvent mouseLocation]; - [NSApp setTkPointerWindow:nil]; - for (w in [NSApp orderedWindows]) { - if (w == deadNSWindow) { - continue; - } - if (NSPointInRect(mouse, [w frame])) { - TkWindow *winPtr2 = TkMacOSXGetTkWindow(w); - int x = mouse.x, y = TkMacOSXZeroScreenHeight() - mouse.y; - [NSApp setTkPointerWindow:winPtr2]; - Tk_UpdatePointer((Tk_Window) winPtr2, x, y, - [NSApp tkButtonState]); - break; - } + NSPoint mouse = [NSEvent mouseLocation]; + [NSApp setTkPointerWindow:nil]; + winPtr2 = NULL; + + for (w in [NSApp orderedWindows]) { + if (w == deadNSWindow || w == NULL) { + continue; + } + winPtr2 = TkMacOSXGetTkWindow(w); + if (winPtr2 == NULL) { + continue; + } + if (NSPointInRect(mouse, [w frame])) { + [NSApp setTkPointerWindow: winPtr2]; + break; + } + } + if (winPtr2) { + /* + * We now know which toplevel will contain the pointer when the window + * is destroyed. We need to know which Tk window within the + * toplevel will contain the pointer. + */ + NSPoint local = [w tkConvertPointFromScreen: mouse]; + int top_x = floor(local.x), + top_y = floor(w.frame.size.height - local.y); + int root_x = floor(mouse.x), + root_y = floor(TkMacOSXZeroScreenHeight() - mouse.y); + int win_x, win_y; + Tk_Window target = Tk_TopCoordsToWindow((Tk_Window) winPtr2, top_x, top_y, &win_x, &win_y); + /* + * A non-toplevel window can have a NULL parent while it is in the process of + * being destroyed. We should not call Tk_UpdatePointer in that case. + */ + if (Tk_Parent(target) != NULL || Tk_IsTopLevel(target)) { + Tk_UpdatePointer(target, root_x, root_y, [NSApp tkButtonState]); } } @@ -1223,9 +1237,9 @@ TkWmDeadWindow( if (deadNSWindow && !Tk_IsEmbedded(winPtr)) { NSWindow *parent = [deadNSWindow parentWindow]; [deadNSWindow setTkWindow:None]; - if (winPtr->window) { - ((MacDrawable *)winPtr->window)->view = nil; - } + if (winPtr->window) { + ((MacDrawable *)winPtr->window)->view = nil; + } wmPtr->window = NULL; if (parent) { @@ -1262,9 +1276,10 @@ TkWmDeadWindow( * set tkEventTarget to NULL when there is no window to send Tk events to. */ TkWindow *newTkEventTarget = NULL; + winPtr2 = NULL; - for (NSWindow *w in [NSApp orderedWindows]) { - TkWindow *winPtr2 = TkMacOSXGetTkWindow(w); + for (w in [NSApp orderedWindows]) { + winPtr2 = TkMacOSXGetTkWindow(w); BOOL isOnScreen; if (!winPtr2 || !winPtr2->wmInfoPtr) { @@ -1290,6 +1305,14 @@ TkWmDeadWindow( [NSApp _setKeyWindow:nil]; [NSApp _setMainWindow:nil]; } + + /* + * Avoid redrawing the view after it is released. + */ + + TKContentView *deadView = [deadNSWindow contentView]; + Tcl_CancelIdleCall(TkMacOSXRedrawViewIdleTask,(void *) deadView); + CGContextRelease(deadView.tkLayerBitmapContext); [deadNSWindow close]; #if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults]; @@ -1704,11 +1727,7 @@ WmSetAttribute( return TCL_ERROR; } if (boolValue != (([macWindow styleMask] & NSFullScreenWindowMask) != 0)) { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 [macWindow toggleFullScreen:macWindow]; -#else - TKLog(@"The fullscreen attribute is ignored on this system."); -#endif } break; case WMATT_MODIFIED: @@ -1749,7 +1768,7 @@ WmSetAttribute( } else if (![macWindow isKindOfClass: [NSPanel class]] && styleMaskBits[index].allowed == NSWindowClass_panel) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "styleMask bit \"%s\" can only be used with an NSPanel", + "styleMask bit \"%s\" can only be used with an NSPanel", styleMaskBits[index].bitname)); Tcl_SetErrorCode(interp, "TK", "INVALID_STYLEMASK_BIT", NULL); return TCL_ERROR; @@ -1794,15 +1813,15 @@ WmSetAttribute( fprintf(stderr, "Current styleMask: %lx\n", [macWindow styleMask]); fprintf(stderr, "Setting styleMask to %lx\n", styleMaskValue); #endif - macWindow.styleMask = (unsigned long) styleMaskValue; + macWindow.styleMask = (unsigned long) styleMaskValue; NSRect newFrame = [macWindow frame]; int heightDiff = newFrame.size.height - oldFrame.size.height; int newHeight = heightDiff < 0 ? newFrame.size.height : newFrame.size.height - heightDiff; [(TKWindow *)macWindow tkLayoutChanged]; if (heightDiff) { - //Calling XMoveResizeWindow twice is a hack to force a relayout - //of the window. + // Calling XMoveResizeWindow twice is a hack to force a relayout + // of the window. XMoveResizeWindow(winPtr->display, winPtr->window, winPtr->changes.x, winPtr->changes.y, newFrame.size.width, newHeight - 1); @@ -2390,8 +2409,7 @@ WmDeiconifyCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { WmInfo *wmPtr = winPtr->wmInfoPtr; - NSWindow *win = TkMacOSXGetNSWindowForDrawable(winPtr->window); - + NSWindow *win = nil; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); return TCL_ERROR; @@ -2410,11 +2428,17 @@ WmDeiconifyCmd( return TCL_ERROR; } + if (winPtr->window) { + win = TkMacOSXGetNSWindowForDrawable(winPtr->window); + } TkpWmSetState(winPtr, TkMacOSXIsWindowZoomed(winPtr) ? ZoomState : NormalState); - [win setExcludedFromWindowsMenu:NO]; - TkMacOSXApplyWindowAttributes(winPtr, win); - [win orderFront:NSApp]; + if (win) { + [win setExcludedFromWindowsMenu:NO]; + TkMacOSXApplyWindowAttributes(winPtr, win); + [win orderFront:NSApp]; + [[win contentView] setNeedsDisplay:YES]; + } if (wmPtr->icon) { Tk_UnmapWindow((Tk_Window)wmPtr->icon); } @@ -2439,8 +2463,7 @@ WmDeiconifyCmd( } } - [[win contentView] setNeedsDisplay:YES]; - Tcl_DoWhenIdle(TkMacOSXDrawAllViews, NULL); + //Tcl_DoWhenIdle(TkMacOSXDrawAllViews, NULL); return TCL_OK; } @@ -2541,19 +2564,18 @@ WmForgetCmd( macWin->toplevel->referenceCount++; macWin->flags &= ~TK_HOST_EXISTS; - TkWmDeadWindow(winPtr); RemapWindows(winPtr, (MacDrawable *)winPtr->parentPtr->window); - /* - * Make sure wm no longer manages this window - */ - Tk_ManageGeometry(frameWin, NULL, NULL); + /* + * Make sure wm no longer manages this window + */ + Tk_ManageGeometry(frameWin, NULL, NULL); winPtr->flags &= ~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED); /* - * Flags (above) must be cleared before calling TkMapTopFrame (below). - */ + * Flags (above) must be cleared before calling TkMapTopFrame (below). + */ TkMapTopFrame(frameWin); } else { @@ -2632,11 +2654,13 @@ WmGeometryCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { WmInfo *wmPtr = winPtr->wmInfoPtr; - NSWindow *win = TkMacOSXGetNSWindowForDrawable(winPtr->window); + NSWindow *win = nil; char xSign = '+', ySign = '+'; int width, height, x = wmPtr->x, y= wmPtr->y; char *argv3; - + if (winPtr && winPtr->window) { + win = TkMacOSXGetNSWindowForDrawable(winPtr->window); + } if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?newGeometry?"); return TCL_ERROR; @@ -2962,7 +2986,7 @@ WmIconbitmapCmd( wmPtr->hints.flags &= ~IconPixmapHint; } } else { - pixmap = Tk_GetBitmap(interp, (Tk_Window)winPtr, Tk_GetUid(str)); + pixmap = Tk_GetBitmap(interp, (Tk_Window)winPtr, str); if (pixmap == None) { return TCL_ERROR; } @@ -3382,18 +3406,23 @@ WmIconwindowCmd( return TCL_ERROR; } if (wmPtr->icon != NULL) { + NSWindow *win = nil; TkWindow *oldIcon = (TkWindow *)wmPtr->icon; - WmInfo *wmPtr3 = oldIcon->wmInfoPtr; - NSWindow *win = TkMacOSXGetNSWindowForDrawable(oldIcon->window); - + if (winPtr && winPtr->window) { + win = TkMacOSXGetNSWindowForDrawable(winPtr->window); + } /* * The old icon should be withdrawn. */ - - TkpWmSetState(oldIcon, WithdrawnState); + if (oldIcon) { + WmInfo *wmPtr3 = oldIcon->wmInfoPtr; + TkpWmSetState(oldIcon, WithdrawnState); + if (wmPtr3) { + wmPtr3->iconFor = NULL; + } + } [win orderOut:NSApp]; - [win setExcludedFromWindowsMenu:YES]; - wmPtr3->iconFor = NULL; + [win setExcludedFromWindowsMenu:YES]; } Tk_MakeWindowExist(tkwin2); wmPtr->hints.icon_window = Tk_WindowId(tkwin2); @@ -3488,6 +3517,7 @@ WmManageCmd( } else if (Tk_IsTopLevel(frameWin)) { /* Already managed by wm - ignore it */ } + Tk_ManageGeometry((Tk_Window)winPtr, &wmMgrType, NULL); return TCL_OK; } @@ -3626,7 +3656,11 @@ WmOverrideredirectCmd( { Bool boolValue; XSetWindowAttributes atts; - TKWindow *win = (TKWindow *)TkMacOSXGetNSWindowForDrawable(winPtr->window); + NSWindow *win = nil; + if (winPtr && winPtr->window) { + win = TkMacOSXGetNSWindowForDrawable(winPtr->window); + } + if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?boolean?"); @@ -3750,8 +3784,6 @@ WmProtocolCmd( WmInfo *wmPtr = winPtr->wmInfoPtr; ProtocolHandler *protPtr, *prevPtr; Atom protocol; - char *cmd; - Tcl_Size cmdLength; Tcl_Obj *resultObj; if ((objc < 3) || (objc > 5)) { @@ -3783,8 +3815,7 @@ WmProtocolCmd( for (protPtr = wmPtr->protPtr; protPtr != NULL; protPtr = protPtr->nextPtr) { if (protPtr->protocol == protocol) { - Tcl_SetObjResult(interp, - Tcl_NewStringObj(protPtr->command, TCL_INDEX_NONE)); + Tcl_SetObjResult(interp, protPtr->commandObj); return TCL_OK; } } @@ -3804,21 +3835,20 @@ WmProtocolCmd( } else { prevPtr->nextPtr = protPtr->nextPtr; } - if (protPtr->command) - ckfree(protPtr->command); + if (protPtr->commandObj) + Tcl_DecrRefCount(protPtr->commandObj); Tcl_EventuallyFree(protPtr, TCL_DYNAMIC); break; } } - cmd = Tcl_GetStringFromObj(objv[4], &cmdLength); - if (cmdLength > 0) { + if (Tcl_GetString(objv[4])[0]) { protPtr = (ProtocolHandler *)ckalloc(sizeof(ProtocolHandler)); protPtr->protocol = protocol; protPtr->nextPtr = wmPtr->protPtr; wmPtr->protPtr = protPtr; protPtr->interp = interp; - protPtr->command = (char *)ckalloc(cmdLength+1); - strcpy(protPtr->command, cmd); + protPtr->commandObj = objv[4]; + Tcl_IncrRefCount(protPtr->commandObj); } return TCL_OK; } @@ -4311,12 +4341,12 @@ WmTransientCmd( RemoveTransient(winPtr); containerPtr = (TkWindow*) container; while (!Tk_TopWinHierarchy(containerPtr)) { - /* - * Ensure that the container window is actually a Tk toplevel. - */ + /* + * Ensure that the container window is actually a Tk toplevel. + */ - containerPtr = containerPtr->parentPtr; - } + containerPtr = containerPtr->parentPtr; + } Tk_MakeWindowExist((Tk_Window)containerPtr); if (wmPtr->iconFor != NULL) { @@ -5216,7 +5246,7 @@ Tk_GetRootCoords( */ winPtr = otherPtr; - continue; + continue; } winPtr = winPtr->parentPtr; } @@ -5619,6 +5649,15 @@ Tk_MoveToplevelWindow( * *---------------------------------------------------------------------- */ +#define PRINT_STACK \ + for (NSWindow *w in [NSApp orderedWindows]) { \ + TkWindow *winPtr2 = TkMacOSXGetTkWindow(w); \ + if (winPtr2) { \ + fprintf(stderr, "%s ", Tk_PathName(winPtr2)); \ + } \ + } \ + fprintf(stderr, "\n"); \ + fflush(stderr) void TkWmRestackToplevel( @@ -5676,8 +5715,14 @@ TkWmRestackToplevel( * Just let the Mac window manager deal with all the subtleties of keeping * track of off-screen windows, etc. */ - +#if 0 + fprintf(stderr, "window order: "); PRINT_STACK; +#endif [macWindow orderWindow:macAboveBelow relativeTo:otherNumber]; +#if 0 + fprintf(stderr, "new window order: "); PRINT_STACK; +#endif +#undef PRINT_STACK } /* @@ -6027,7 +6072,7 @@ Tk_Window TkMacOSXGetContainer( TkWindow *winPtr) { - if (winPtr->wmInfoPtr != NULL) { + if (Tk_PathName(winPtr)) { return (Tk_Window)winPtr->wmInfoPtr->container; } return NULL; @@ -6072,7 +6117,7 @@ TkMacOSXGetXWindow( * void*. * * Results: - * A Tk_Window, or NULL if the NSWindow is not associated with + * A Tk_Window, or None if the NSWindow is not associated with * any Tk window. * * Side effects: @@ -6088,13 +6133,12 @@ Tk_MacOSXGetTkWindow( Window window = None; if ([(NSWindow *)w respondsToSelector: @selector (tkWindow)]) { window = [(TKWindow *)w tkWindow]; - } - if (window) { TkDisplay *dispPtr = TkGetDisplayList(); - return Tk_IdToWindow(dispPtr->display, window); - } else { - return NULL; + if (window && dispPtr && dispPtr->display) { + return Tk_IdToWindow(dispPtr->display, window); + } } + return NULL; } /* @@ -6119,7 +6163,10 @@ MODULE_SCOPE int TkMacOSXIsWindowZoomed( TkWindow *winPtr) { - NSWindow *macWindow = TkMacOSXGetNSWindowForDrawable(winPtr->window); + NSWindow *macWindow = nil; + if (winPtr && winPtr->window) { + macWindow = TkMacOSXGetNSWindowForDrawable(winPtr->window); + } return [macWindow isZoomed]; } @@ -6240,7 +6287,7 @@ TkUnsupported1ObjCmd( case TKMWS_APPEARANCE: if ([NSApp macOSVersion] < 100900) { Tcl_SetObjResult(interp, Tcl_NewStringObj( - "Window appearances did not exist until OSX 10.9.", TCL_INDEX_NONE)); + "Window appearances did not exist until OSX 10.9.", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TK", "WINDOWSTYLE", "APPEARANCE", NULL); return TCL_ERROR; } @@ -6794,7 +6841,7 @@ TkMacOSXMakeRealWindowExist( } if ((styleMask & (NSTexturedBackgroundWindowMask|NSHUDWindowMask)) && !(styleMask & NSDocModalWindowMask)) { - /* + /* * Workaround for [Bug 2824538]: Textured windows are draggable from * opaque content. */ @@ -6832,9 +6879,11 @@ TkMacOSXMakeRealWindowExist( * * TkpRedrawWidget -- * - * Mark the bounding rectangle of this widget as needing display so the - * widget will be drawn by [NSView drawRect:]. If this is called within - * the drawRect method, do nothing. + * This is a stub called only from tkTextDisp.c. It was introduced + * to deal with an issue in macOS 10.14 and is not needed + * even for that OS with updateLayer in use. It would add the widget bounds + * to the dirtyRect, which is not currently used, and set the + * TkNeedsDisplay flag. Now it is a no-op. * * Results: * None. @@ -6847,15 +6896,16 @@ TkMacOSXMakeRealWindowExist( void TkpRedrawWidget(Tk_Window tkwin) { + (void) tkwin; +#if 0 TkWindow *winPtr = (TkWindow *)tkwin; - NSWindow *w; + NSWindow *w = nil; Rect tkBounds; NSRect bounds; - if ([NSApp isDrawing]) { - return; + if (winPtr && winPtr->window) { + w = TkMacOSXGetNSWindowForDrawable(winPtr->window); } - w = TkMacOSXGetNSWindowForDrawable(winPtr->window); if (w) { TKContentView *view = [w contentView]; TkMacOSXWinBounds(winPtr, &tkBounds); @@ -6863,8 +6913,9 @@ TkpRedrawWidget(Tk_Window tkwin) { [view bounds].size.height - tkBounds.bottom, tkBounds.right - tkBounds.left, tkBounds.bottom - tkBounds.top); - [view addTkDirtyRect:bounds]; + [view setNeedsDisplay:YES]; } +#endif } @@ -6987,14 +7038,15 @@ TkpWmSetState( * or WithdrawnState. */ { WmInfo *wmPtr = winPtr->wmInfoPtr; - NSWindow *macWin; + NSWindow *macWin = nil; wmPtr->hints.initial_state = state; if (wmPtr->flags & WM_NEVER_MAPPED) { goto setStateEnd; } - - macWin = TkMacOSXGetNSWindowForDrawable(winPtr->window); + if (winPtr && winPtr->window) { + macWin = TkMacOSXGetNSWindowForDrawable(winPtr->window); + } /* * Make sure windows are updated before the state change. As an exception, @@ -7181,7 +7233,10 @@ TkpChangeFocus( * didn't originally belong to topLevelPtr's * application. */ { - if (winPtr->atts.override_redirect) { + if (!winPtr || + (winPtr->flags & TK_ALREADY_DEAD) || + !Tk_IsMapped(winPtr) || + winPtr->atts.override_redirect) { return 0; } @@ -7382,8 +7437,6 @@ ApplyWindowAttributeFlagChanges( } if ((changedAttributes & (kWindowResizableAttribute | kWindowFullZoomAttribute)) || initial) { - [macWindow setShowsResizeIndicator: - !!(newAttributes & kWindowResizableAttribute)]; [[macWindow standardWindowButton:NSWindowZoomButton] setEnabled:(newAttributes & kWindowResizableAttribute) && (newAttributes & kWindowFullZoomAttribute)]; @@ -7570,9 +7623,9 @@ ApplyContainerOverrideChanges( wmPtr->attributes &= ~kWindowNoActivatesAttribute; if ([NSApp macOSVersion] == 100600) { styleMask = NSTitledWindowMask | - NSClosableWindowMask | - NSMiniaturizableWindowMask | - NSResizableWindowMask; + NSClosableWindowMask | + NSMiniaturizableWindowMask | + NSResizableWindowMask; } else { styleMask |= NSTitledWindowMask; } diff --git a/macosx/tkMacOSXWm.h b/macosx/tkMacOSXWm.h index 12c4e8f..d243e76 100644 --- a/macosx/tkMacOSXWm.h +++ b/macosx/tkMacOSXWm.h @@ -29,7 +29,7 @@ typedef struct ProtocolHandler { * same top-level window, or NULL for end of * list. */ Tcl_Interp *interp; /* Interpreter in which to invoke command. */ - char* command; /* Tcl command to invoke when a client message + Tcl_Obj* commandObj; /* Tcl command to invoke when a client message * for this protocol arrives. The actual size * of the structure varies to accommodate the * needs of the actual command. THIS MUST BE diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index ff850f0..bbc0bcb 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -136,7 +136,6 @@ static inline HIThemeButtonDrawInfo ComputeButtonDrawInfo( * define it to return nil. */ -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 static CGColorRef CGColorFromRGBA( CGFloat *rgba) @@ -162,15 +161,6 @@ CGColorFromGray( #define CGCOLOR(nscolor) (nscolor).CGColor -#else - -#define CGCOLOR(nscolor) NULL -#define CGColorFromRGBA(rgba) NULL -#define CGColorFromGray(gray) NULL -#define CGPathCreateWithRoundedRect(w, x, y, z) NULL - -#endif - /*---------------------------------------------------------------------- * +++ Utilities. */ @@ -214,9 +204,9 @@ static GrayPalette LookupGrayPalette( { const PaletteStateTable *entry = design->palettes; while ((state & entry->onBits) != entry->onBits || - (~state & entry->offBits) != entry->offBits) + (~state & entry->offBits) != entry->offBits) { - ++entry; + ++entry; } return isDark ? entry->dark : entry->light; } @@ -356,12 +346,12 @@ static void GetBackgroundColorRGBA( rgba[i] -= Ttk_ContrastDelta*contrast / 255.0; } } - if (save && winPtr->privatePtr) { - winPtr->privatePtr->flags |= TTK_HAS_CONTRASTING_BG; - for (int i = 0; i < 4; i++) { - winPtr->privatePtr->fillRGBA[i] = rgba[i]; - } - } + if (save && winPtr->privatePtr) { + winPtr->privatePtr->flags |= TTK_HAS_CONTRASTING_BG; + for (int i = 0; i < 4; i++) { + winPtr->privatePtr->fillRGBA[i] = rgba[i]; + } + } } } @@ -931,8 +921,8 @@ DrawHelpSymbol( NSColor *foreground = state & TTK_STATE_DISABLED ? [NSColor disabledControlTextColor] : [NSColor controlTextColor]; NSDictionary *attrs = @{ - NSForegroundColorAttributeName : foreground, - NSFontAttributeName : font + NSForegroundColorAttributeName : foreground, + NSFontAttributeName : font }; NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:@"?" @@ -1505,10 +1495,10 @@ DrawTab( if (!(state & TTK_STATE_SELECTED)) { DrawGrayButton(context, bounds, &tabDesign, state, tkwin); - /* - * Draw a separator line on the left side of the tab if it - * not first. - */ + /* + * Draw a separator line on the left side of the tab if it + * not first. + */ if (!(state & TTK_STATE_FIRST)) { CGContextSaveGState(context); @@ -1653,20 +1643,20 @@ static void ButtonElementMinSize( if (params->heightMetric != NoThemeMetric) { ChkErr(GetThemeMetric, params->heightMetric, minHeight); - /* - * The theme height does not include the 1-pixel border around - * the button, although it does include the 1-pixel shadow at - * the bottom. - */ + /* + * The theme height does not include the 1-pixel border around + * the button, although it does include the 1-pixel shadow at + * the bottom. + */ *minHeight += 2; - /* - * For buttons with labels the minwidth must be 0 to force the - * correct text layout. For example, a non-zero value will cause the - * text to be left justified, no matter what -anchor setting is used in - * the style. - */ + /* + * For buttons with labels the minwidth must be 0 to force the + * correct text layout. For example, a non-zero value will cause the + * text to be left justified, no matter what -anchor setting is used in + * the style. + */ if (params->widthMetric != NoThemeMetric) { ChkErr(GetThemeMetric, params->widthMetric, minWidth); @@ -1700,10 +1690,10 @@ static void ButtonElementSize( return; case TkGradientButton: *paddingPtr = Ttk_MakePadding(1, 1, 1, 1); - /* Fall through. */ + /* Fall through. */ case kThemeArrowButton: case kThemeRoundButtonHelp: - return; + return; /* Buttons which are sized like PushButtons but unknown to HITheme. */ case TkRoundedRectButton: case TkRecessedButton: @@ -1711,7 +1701,7 @@ static void ButtonElementSize( info.kind = kThemePushButton; break; default: - break; + break; } /* @@ -2152,14 +2142,14 @@ static void EntryElementDraw( .isFocused = state & TTK_STATE_FOCUS, }; - /* - * Earlier versions of the Aqua theme ignored the -fieldbackground - * option and used the -background as if it were -fieldbackground. - * Here we are enabling -fieldbackground. For backwards - * compatibility, if -fieldbackground is set to the default color and - * -background is set to a different color then we use -background as - * -fieldbackground. - */ + /* + * Earlier versions of the Aqua theme ignored the -fieldbackground + * option and used the -background as if it were -fieldbackground. + * Here we are enabling -fieldbackground. For backwards + * compatibility, if -fieldbackground is set to the default color and + * -background is set to a different color then we use -background as + * -fieldbackground. + */ if (0 != strcmp(Tcl_GetString(e->fieldbackgroundObj), defaultBG)) { backgroundPtr = @@ -2828,14 +2818,14 @@ static void ThumbElementDraw( CGRect troughBounds = {{macWin->xOff, macWin->yOff}, {Tk_Width(tkwin), Tk_Height(tkwin)}}; - /* - * The info struct has integer fields, which will be converted to - * floats in the drawing routine. All of values provided in the info - * struct, namely min, max, value, and viewSize are only defined up to - * an arbitrary scale factor. To avoid roundoff error we scale so - * that the viewSize is a large float which is smaller than the - * largest int. - */ + /* + * The info struct has integer fields, which will be converted to + * floats in the drawing routine. All of values provided in the info + * struct, namely min, max, value, and viewSize are only defined up to + * an arbitrary scale factor. To avoid roundoff error we scale so + * that the viewSize is a large float which is smaller than the + * largest int. + */ HIThemeTrackDrawInfo info = { .version = 0, @@ -2941,7 +2931,7 @@ static void SeparatorElementDraw( CGRect bounds = BoxToRect(d, b); const HIThemeSeparatorDrawInfo info = { .version = 0, - /* Separator only supports kThemeStateActive, kThemeStateInactive */ + /* Separator only supports kThemeStateActive, kThemeStateInactive */ .state = Ttk_StateTableLookup(ThemeStateTable, state & TTK_STATE_BACKGROUND), }; @@ -3004,7 +2994,7 @@ static void SizegripElementDraw( CGRect bounds = BoxToRect(d, b); HIThemeGrowBoxDrawInfo info = { .version = 0, - /* Grow box only supports kThemeStateActive, kThemeStateInactive */ + /* Grow box only supports kThemeStateActive, kThemeStateInactive */ .state = Ttk_StateTableLookup(ThemeStateTable, state & TTK_STATE_BACKGROUND), .kind = kHIThemeGrowBoxKindNormal, @@ -3295,10 +3285,10 @@ static void TreeHeaderElementDraw( BEGIN_DRAWING(d) if ([NSApp macOSVersion] > 100800) { - /* - * Compensate for the padding added in TreeHeaderElementSize, so - * the larger heading will be drawn at the top of the widget. - */ + /* + * Compensate for the padding added in TreeHeaderElementSize, so + * the larger heading will be drawn at the top of the widget. + */ bounds.origin.y -= 4; DrawListHeader(bounds, dc.context, tkwin, state); @@ -3484,13 +3474,13 @@ TTK_LAYOUT("TSpinbox", TTK_LAYOUT("TEntry", TTK_GROUP("Entry.field", TTK_FILL_BOTH|TTK_BORDER, - TTK_GROUP("Entry.padding", TTK_FILL_BOTH, + TTK_GROUP("Entry.padding", TTK_FILL_BOTH, TTK_NODE("Entry.textarea", TTK_FILL_BOTH)))) /* Searchbox */ TTK_LAYOUT("Searchbox", TTK_GROUP("Searchbox.field", TTK_FILL_BOTH|TTK_BORDER, - TTK_GROUP("Entry.padding", TTK_FILL_BOTH, + TTK_GROUP("Entry.padding", TTK_FILL_BOTH, TTK_NODE("Entry.textarea", TTK_FILL_BOTH)))) /* Progress bars -- track only */ diff --git a/macosx/ttkMacOSXTheme.h b/macosx/ttkMacOSXTheme.h index 1e2b7ae..2092b02 100644 --- a/macosx/ttkMacOSXTheme.h +++ b/macosx/ttkMacOSXTheme.h @@ -561,7 +561,7 @@ static ThemeFrameParams #define CHECK_RADIUS(radius, bounds) \ if ((radius) > (bounds).size.width / 2 || (radius) > (bounds).size.height / 2) { \ - return; \ + return; \ } /* diff --git a/tests/bell.test b/tests/bell.test index 2f5efee..935ce8f 100644 --- a/tests/bell.test +++ b/tests/bell.test @@ -12,19 +12,19 @@ tcltest::loadTestedCommands test bell-1.1 {bell command} -body { bell a -} -returnCodes {error} -result {bad option "a": must be -displayof or -nice} +} -returnCodes error -result {bad option "a": must be -displayof or -nice} test bell-1.2 {bell command} -body { bell a b -} -returnCodes {error} -result {bad option "a": must be -displayof or -nice} +} -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"} +} -returnCodes error -result {bad window path name "gorp"} test bell-1.4 {bell command} -body { bell -nice -displayof -} -returnCodes {error} -result {wrong # args: should be "bell ?-displayof window? ?-nice?"} +} -returnCodes error -result {wrong # args: should be "bell ?-displayof window? ?-nice?"} test bell-1.5 {bell command} -body { bell -nice -nice -nice @@ -36,7 +36,7 @@ test bell-1.6 {bell command} -body { test bell-1.7 {bell command} -body { bell -nice -displayof . -nice -} -returnCodes {error} -result {wrong # args: should be "bell ?-displayof window? ?-nice?"} +} -returnCodes error -result {wrong # args: should be "bell ?-displayof window? ?-nice?"} test bell-1.8 {bell command} -body { puts "Bell should ring now ..." diff --git a/tests/bgerror.test b/tests/bgerror.test index bd38310..eda8ba6 100644 --- a/tests/bgerror.test +++ b/tests/bgerror.test @@ -13,8 +13,8 @@ tcltest::loadTestedCommands test bgerror-1.1 {bgerror / tkerror compat} -setup { set errRes {} proc tkerror {err} { - global errRes; - set errRes $err; + global errRes; + set errRes $err; } } -body { after 0 {error err1} @@ -27,8 +27,8 @@ test bgerror-1.1 {bgerror / tkerror compat} -setup { test bgerror-1.2 {bgerror / tkerror compat / accumulation} -setup { set errRes {} proc tkerror {err} { - global errRes; - lappend errRes $err; + global errRes; + lappend errRes $err; } } -body { after 0 {error err1} @@ -43,9 +43,9 @@ test bgerror-1.2 {bgerror / tkerror compat / accumulation} -setup { test bgerror-1.3 {bgerror / tkerror compat / accumulation / break} -setup { set errRes {} proc tkerror {err} { - global errRes; - lappend errRes $err; - return -code break "skip!"; + global errRes; + lappend errRes $err; + return -code break "skip!"; } } -body { after 0 {error err1} diff --git a/tests/bind.test b/tests/bind.test index 5421e62..b536d35 100644 --- a/tests/bind.test +++ b/tests/bind.test @@ -342,11 +342,11 @@ test bind-9.2 {Tk_DeleteBinding procedure} -setup { } -body { frame .t.f -class Test -width 150 -height 100 foreach i {a b c d} { - bind .t.f $i "binding for $i" + bind .t.f $i "binding for $i" } foreach i {b d a c} { - bind .t.f $i {} - lappend result [lsort [bind .t.f]] + bind .t.f $i {} + lappend result [lsort [bind .t.f]] } return $result } -cleanup { @@ -357,11 +357,11 @@ test bind-9.3 {Tk_DeleteBinding procedure} -setup { } -body { frame .t.f -class Test -width 150 -height 100 foreach i {<Button-1> <Meta-Button-1> <Control-Button-1> <Double-Alt-Button-1>} { - bind .t.f $i "binding for $i" + bind .t.f $i "binding for $i" } foreach i {<Control-Button-1> <Double-Alt-Button-1> <Button-1> <Meta-Button-1>} { - bind .t.f $i {} - lappend result [lsort [bind .t.f]] + bind .t.f $i {} + lappend result [lsort [bind .t.f]] } return $result } -cleanup { @@ -385,7 +385,7 @@ test bind-10.2 {Tk_GetBinding procedure} -body { test bind-11.1 {Tk_GetAllBindings procedure} -body { frame .t.f foreach i "! a \\\{ ~ <Delete> <space> <<Paste>> <Tab> <Linefeed> <Key-<> <Meta-a> <Â>" { - bind .t.f $i Test + bind .t.f $i Test } lsort [bind .t.f] } -cleanup { @@ -394,7 +394,7 @@ test bind-11.1 {Tk_GetAllBindings procedure} -body { test bind-11.2 {Tk_GetAllBindings procedure} -body { frame .t.f foreach i "<Double-Button-1> <Triple-Button-1> <Meta-Control-a> <Double-Alt-Enter> <Button-1>" { - bind .t.f $i Test + bind .t.f $i Test } lsort [bind .t.f] } -cleanup { @@ -403,7 +403,7 @@ test bind-11.2 {Tk_GetAllBindings procedure} -body { test bind-11.3 {Tk_GetAllBindings procedure} -body { frame .t.f foreach i "<Double-Triple-Button-1> abcd a<Leave>b" { - bind .t.f $i Test + bind .t.f $i Test } lsort [bind .t.f] } -cleanup { @@ -418,7 +418,7 @@ test bind-12.1 {Tk_DeleteAllBindings procedure} -body { test bind-12.2 {Tk_DeleteAllBindings procedure} -body { frame .t.f -class Test -width 150 -height 100 foreach i "a b c <Meta-Button-1> <Alt-a> <Control-a>" { - bind .t.f $i x + bind .t.f $i x } destroy .t.f } -result {} @@ -490,8 +490,8 @@ test bind-13.3 {Tk_BindEvent procedure} -setup { (command bound to event)}} test bind-13.4 {Tk_BindEvent procedure} -setup { proc foo {} { - set x 44 - event generate .t.f <:> + set x 44 + event generate .t.f <:> } frame .t.f -class Test -width 150 -height 100 pack .t.f @@ -936,7 +936,7 @@ test bind-13.33 {Tk_BindEvent procedure: many C bindings cause realloc} -setup { } -body { bindtags .t.f {a b c d e f g h i j k l m n o p} foreach p [bindtags .t.f] { - bind $p <Button-1> "lappend x $p" + bind $p <Button-1> "lappend x $p" } event generate .t.f <Button-1> return $x @@ -1019,8 +1019,8 @@ test bind-13.43 {Tk_BindEvent procedure: break in script} -setup { } -result {b1} test bind-13.45 {Tk_BindEvent procedure: error in script} -setup { proc bgerror msg { - global x - lappend x $msg + global x + lappend x $msg } frame .t.f -class Test -width 150 -height 100 pack .t.f @@ -6070,8 +6070,8 @@ test bind-28.15 {keysym names, Emoji} -body { test bind-29.1 {Tcl_BackgroundError procedure} -setup { proc bgerror msg { - global x errorInfo - set x [list $msg $errorInfo] + global x errorInfo + set x [list $msg $errorInfo] } frame .t.f -class Test -width 150 -height 100 pack .t.f @@ -6094,12 +6094,12 @@ test bind-29.1 {Tcl_BackgroundError procedure} -setup { test bind-29.2 {Tcl_BackgroundError procedure} -setup { proc do {} { - event generate .t.f <Button> - event generate .t.f <ButtonRelease> + event generate .t.f <Button> + event generate .t.f <ButtonRelease> } proc bgerror msg { - global x errorInfo - set x [list $msg $errorInfo] + global x errorInfo + set x [list $msg $errorInfo] } frame .t.f -class Test -width 150 -height 100 pack .t.f @@ -6284,7 +6284,7 @@ test bind-32.2 {detection of double click should not fail} -setup { # that used an event ring overflowed, and the double click was not detected. # But new implementation should work properly. for {set i 0} {$i < 1000} {incr i} { - event generate .t.f <Expose> + event generate .t.f <Expose> } event generate .t.f <Button-1> event generate .t.f <ButtonRelease-1> @@ -6857,9 +6857,9 @@ test bind-34.1 {-warp works relatively to a window} -setup { # pointer should have moved the same amount as the window moved set res 1 foreach pos1 $pointerPos1 pos2 $pointerPos2 { - if {$pos1 != [expr {$pos2 - 400}]} { - set res [list $pointerPos1 $pointerPos2] - } + if {$pos1 != ($pos2 - 400)} { + set res [list $pointerPos1 $pointerPos2] + } } set res } -cleanup { @@ -6883,31 +6883,31 @@ test bind-34.3 {-warp works with null or negative coordinates} -setup { # a hot spot (which would trigger the corresponding action as an # unwanted effect) but will warp the pointer to the hot spot limit only. if {[tk windowingsystem] eq "x11"} { - set halo 1 + set halo 1 } else { - set halo 0 + set halo 0 } set res {} } -body { event generate {} <Motion> -x 0 -y 0 -warp 1 controlPointerWarpTiming foreach dim [winfo pointerxy .] { - if {$dim <= $halo} { - lappend res ok - } else { - lappend res $dim - } + if {$dim <= $halo} { + lappend res ok + } else { + lappend res $dim + } } event generate {} <Motion> -x 100 -y 100 -warp 1 controlPointerWarpTiming event generate {} <Motion> -x -1 -y -1 -warp 1 controlPointerWarpTiming foreach dim [winfo pointerxy .] { - if {$dim <= $halo} { - lappend res ok - } else { - lappend res $dim - } + if {$dim <= $halo} { + lappend res ok + } else { + lappend res $dim + } } set res } -cleanup { @@ -6927,7 +6927,7 @@ proc testKey {window event type mods} { update event generate $window $event if {$keyInfo == {}} { - vwait keyInfo + vwait keyInfo } set save $keyInfo set keyInfo {} @@ -6937,7 +6937,7 @@ proc testKey {window event type mods} { } eval $injectcmd if {$keyInfo == {}} { - vwait keyInfo + vwait keyInfo } if {$save != $keyInfo} { return "[format "0x%x" $numericKeysym] ($mods): $save != $keyInfo" @@ -7051,7 +7051,7 @@ test bind-36.1 {pointer warp with grab on toplevel, bug [e3888d5820]} -setup { grab release .top wm geometry .top 200x200+300+300 label .top.l -height 5 -width 20 -highlightthickness 2 \ - -highlightbackground black -bg yellow -text "My label" + -highlightbackground black -bg yellow -text "My label" pack .top.l -side bottom update # On KDE/Plasma _with_the_Aurorae_theme_ (at least), setting up the toplevel @@ -7073,7 +7073,7 @@ test bind-36.1 {pointer warp with grab on toplevel, bug [e3888d5820]} -setup { # success if the coords are the same with or without the grab, and if they # are at (10,10) inside the label widget as requested by the warping expr {$x1==$x2 && $y1==$y2 && $x1==[winfo rootx .top.l]+10 \ - && $y1==[winfo rooty .top.l]+10} + && $y1==[winfo rooty .top.l]+10} } -cleanup { destroy .top unset x1 y1 x2 y2 diff --git a/tests/busy.test b/tests/busy.test index e4f5165..f535bfc 100644 --- a/tests/busy.test +++ b/tests/busy.test @@ -83,7 +83,7 @@ test busy-2.8 {tk busy hold non existing window} -body { test busy-2.9 {tk busy hold (shortcut) non existing window} -body { tk busy .f update -} -returnCodes {error} -result {bad window path name ".f"} +} -returnCodes error -result {bad window path name ".f"} test busy-2.10 {tk busy hold root window with cursor} -body { set res [tk busy hold . -cursor arrow] update @@ -138,7 +138,7 @@ test busy-3.4 {tk busy cget non-busy window} -setup { tk busy cget .f -cursor } -cleanup { destroy .f -} -returnCodes error -result {can't find busy window ".f"} +} -returnCodes error -result {cannot find busy window ".f"} test busy-3.5 {tk busy cget invalid option} -setup { pack [frame .f] tk busy hold .f @@ -194,7 +194,7 @@ test busy-4.3 {tk busy configure non-busy window} -setup { tk busy configure .f } -cleanup { destroy .f -} -returnCodes error -result {can't find busy window ".f"} +} -returnCodes error -result {cannot find busy window ".f"} test busy-4.4 {tk busy configure} -constraints {nonwin} -setup { pack [frame .f] @@ -332,7 +332,7 @@ test busy-5.3 {tk busy forget non busy window} -setup { tk busy forget .f } -cleanup { destroy .f -} -returnCodes error -result {can't find busy window ".f"} +} -returnCodes error -result {cannot find busy window ".f"} test busy-5.4 {tk busy forget window} -setup { pack [frame .f] tk busy hold .f diff --git a/tests/button.test b/tests/button.test index 3479fc0..c60750a 100644 --- a/tests/button.test +++ b/tests/button.test @@ -35,7 +35,7 @@ test button-1.2 {configuration option: "activebackground" for label} -setup { .l configure -activebackground non-existent } -cleanup { destroy .l -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.3 {configuration option: "activebackground" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -54,7 +54,7 @@ test button-1.4 {configuration option: "activebackground" for button} -setup { .b configure -activebackground non-existent } -cleanup { destroy .b -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.5 {configuration option: "activebackground" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -73,7 +73,7 @@ test button-1.6 {configuration option: "activebackground" for checkbutton} -setu .c configure -activebackground non-existent } -cleanup { destroy .c -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.7 {configuration option: "activebackground" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -92,7 +92,7 @@ test button-1.8 {configuration option: "activebackground" for radiobutton} -setu .r configure -activebackground non-existent } -cleanup { destroy .r -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.9 {configuration option: "activeforeground" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -112,7 +112,7 @@ test button-1.10 {configuration option: "activeforeground" for label} -setup { .l configure -activeforeground non-existent } -cleanup { destroy .l -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.11 {configuration option: "activeforeground" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -131,7 +131,7 @@ test button-1.12 {configuration option: "activeforeground" for button} -setup { .b configure -activeforeground non-existent } -cleanup { destroy .b -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.13 {configuration option: "activeforeground" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -150,7 +150,7 @@ test button-1.14 {configuration option: "activeforeground" for checkbutton} -set .c configure -activeforeground non-existent } -cleanup { destroy .c -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.15 {configuration option: "activeforeground" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -169,7 +169,7 @@ test button-1.16 {configuration option: "activeforeground" for radiobutton} -set .r configure -activeforeground non-existent } -cleanup { destroy .r -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.17 {configuration option: "anchor" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -189,7 +189,7 @@ test button-1.18 {configuration option: "anchor" for label} -setup { .l configure -anchor bogus } -cleanup { destroy .l -} -returnCodes {error} -result {bad anchor "bogus": must be n, ne, e, se, s, sw, w, nw, or center} +} -returnCodes error -result {bad anchor "bogus": must be n, ne, e, se, s, sw, w, nw, or center} test button-1.19 {configuration option: "anchor" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -208,7 +208,7 @@ test button-1.20 {configuration option: "anchor" for button} -setup { .b configure -anchor bogus } -cleanup { destroy .b -} -returnCodes {error} -result {bad anchor "bogus": must be n, ne, e, se, s, sw, w, nw, or center} +} -returnCodes error -result {bad anchor "bogus": must be n, ne, e, se, s, sw, w, nw, or center} test button-1.21 {configuration option: "anchor" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -227,7 +227,7 @@ test button-1.22 {configuration option: "anchor" for checkbutton} -setup { .c configure -anchor bogus } -cleanup { destroy .c -} -returnCodes {error} -result {bad anchor "bogus": must be n, ne, e, se, s, sw, w, nw, or center} +} -returnCodes error -result {bad anchor "bogus": must be n, ne, e, se, s, sw, w, nw, or center} test button-1.23 {configuration option: "anchor" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -246,7 +246,7 @@ test button-1.24 {configuration option: "anchor" for radiobutton} -setup { .r configure -anchor bogus } -cleanup { destroy .r -} -returnCodes {error} -result {bad anchor "bogus": must be n, ne, e, se, s, sw, w, nw, or center} +} -returnCodes error -result {bad anchor "bogus": must be n, ne, e, se, s, sw, w, nw, or center} test button-1.25 {configuration option: "background" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -266,7 +266,7 @@ test button-1.26 {configuration option: "background" for label} -setup { .l configure -background non-existent } -cleanup { destroy .l -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.27 {configuration option: "background" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -285,7 +285,7 @@ test button-1.28 {configuration option: "background" for button} -setup { .b configure -background non-existent } -cleanup { destroy .b -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.29 {configuration option: "background" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -304,7 +304,7 @@ test button-1.30 {configuration option: "background" for checkbutton} -setup { .c configure -background non-existent } -cleanup { destroy .c -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.31 {configuration option: "background" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -323,7 +323,7 @@ test button-1.32 {configuration option: "background" for radiobutton} -setup { .r configure -background non-existent } -cleanup { destroy .r -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.33 {configuration option: "bd" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -343,7 +343,7 @@ test button-1.34 {configuration option: "bd" for label} -setup { .l configure -bd badValue } -cleanup { destroy .l -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test button-1.35 {configuration option: "bd" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -362,7 +362,7 @@ test button-1.36 {configuration option: "bd" for button} -setup { .b configure -bd badValue } -cleanup { destroy .b -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test button-1.37 {configuration option: "bd" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -381,7 +381,7 @@ test button-1.38 {configuration option: "bd" for checkbutton} -setup { .c configure -bd badValue } -cleanup { destroy .c -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test button-1.39 {configuration option: "bd" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -400,7 +400,7 @@ test button-1.40 {configuration option: "bd" for radiobutton} -setup { .r configure -bd badValue } -cleanup { destroy .r -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test button-1.41 {configuration option: "bg" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -420,7 +420,7 @@ test button-1.42 {configuration option: "bg" for label} -setup { .l configure -bg non-existent } -cleanup { destroy .l -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.43 {configuration option: "bg" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -439,7 +439,7 @@ test button-1.44 {configuration option: "bg" for button} -setup { .b configure -bg non-existent } -cleanup { destroy .b -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.45 {configuration option: "bg" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -458,7 +458,7 @@ test button-1.46 {configuration option: "bg" for checkbutton} -setup { .c configure -bg non-existent } -cleanup { destroy .c -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.47 {configuration option: "bg" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -477,7 +477,7 @@ test button-1.48 {configuration option: "bg" for radiobutton} -setup { .r configure -bg non-existent } -cleanup { destroy .r -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.49 {configuration option: "bitmap" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -497,7 +497,7 @@ test button-1.50 {configuration option: "bitmap" for label} -setup { .l configure -bitmap badValue } -cleanup { destroy .l -} -returnCodes {error} -result {bitmap "badValue" not defined} +} -returnCodes error -result {bitmap "badValue" not defined} test button-1.51 {configuration option: "bitmap" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -516,7 +516,7 @@ test button-1.52 {configuration option: "bitmap" for button} -setup { .b configure -bitmap badValue } -cleanup { destroy .b -} -returnCodes {error} -result {bitmap "badValue" not defined} +} -returnCodes error -result {bitmap "badValue" not defined} test button-1.53 {configuration option: "bitmap" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -535,7 +535,7 @@ test button-1.54 {configuration option: "bitmap" for checkbutton} -setup { .c configure -bitmap badValue } -cleanup { destroy .c -} -returnCodes {error} -result {bitmap "badValue" not defined} +} -returnCodes error -result {bitmap "badValue" not defined} test button-1.55 {configuration option: "bitmap" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -554,7 +554,7 @@ test button-1.56 {configuration option: "bitmap" for radiobutton} -setup { .r configure -bitmap badValue } -cleanup { destroy .r -} -returnCodes {error} -result {bitmap "badValue" not defined} +} -returnCodes error -result {bitmap "badValue" not defined} test button-1.57 {configuration option: "borderwidth" for label} -setup { label .l -highlightthickness 2 -font {Helvetica -12 bold} @@ -574,7 +574,7 @@ test button-1.58 {configuration option: "borderwidth" for label} -setup { .l configure -borderwidth badValue } -cleanup { destroy .l -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test button-1.59 {configuration option: "borderwidth" for button} -setup { button .b -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -593,7 +593,7 @@ test button-1.60 {configuration option: "borderwidth" for button} -setup { .b configure -borderwidth badValue } -cleanup { destroy .b -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test button-1.61 {configuration option: "borderwidth" for checkbutton} -setup { checkbutton .c -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -612,7 +612,7 @@ test button-1.62 {configuration option: "borderwidth" for checkbutton} -setup { .c configure -borderwidth badValue } -cleanup { destroy .c -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test button-1.63 {configuration option: "borderwidth" for radiobutton} -setup { radiobutton .r -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -631,7 +631,7 @@ test button-1.64 {configuration option: "borderwidth" for radiobutton} -setup { .r configure -borderwidth badValue } -cleanup { destroy .r -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test button-1.65 {configuration option: "command" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -692,7 +692,7 @@ test button-1.70 {configuration option: "compound" for label} -setup { .l configure -compound bogus } -cleanup { destroy .l -} -returnCodes {error} -result {bad compound "bogus": must be bottom, center, left, none, right, or top} +} -returnCodes error -result {bad compound "bogus": must be bottom, center, left, none, right, or top} test button-1.71 {configuration option: "compound" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -711,7 +711,7 @@ test button-1.72 {configuration option: "compound" for button} -setup { .b configure -compound bogus } -cleanup { destroy .b -} -returnCodes {error} -result {bad compound "bogus": must be bottom, center, left, none, right, or top} +} -returnCodes error -result {bad compound "bogus": must be bottom, center, left, none, right, or top} test button-1.73 {configuration option: "compound" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -730,7 +730,7 @@ test button-1.74 {configuration option: "compound" for checkbutton} -setup { .c configure -compound bogus } -cleanup { destroy .c -} -returnCodes {error} -result {bad compound "bogus": must be bottom, center, left, none, right, or top} +} -returnCodes error -result {bad compound "bogus": must be bottom, center, left, none, right, or top} test button-1.75 {configuration option: "compound" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -749,7 +749,7 @@ test button-1.76 {configuration option: "compound" for radiobutton} -setup { .r configure -compound bogus } -cleanup { destroy .r -} -returnCodes {error} -result {bad compound "bogus": must be bottom, center, left, none, right, or top} +} -returnCodes error -result {bad compound "bogus": must be bottom, center, left, none, right, or top} test button-1.77 {configuration option: "cursor" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -769,7 +769,7 @@ test button-1.78 {configuration option: "cursor" for label} -setup { .l configure -cursor badValue } -cleanup { destroy .l -} -returnCodes {error} -result {bad cursor spec "badValue"} +} -returnCodes error -result {bad cursor spec "badValue"} test button-1.79 {configuration option: "cursor" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -788,7 +788,7 @@ test button-1.80 {configuration option: "cursor" for button} -setup { .b configure -cursor badValue } -cleanup { destroy .b -} -returnCodes {error} -result {bad cursor spec "badValue"} +} -returnCodes error -result {bad cursor spec "badValue"} test button-1.81 {configuration option: "cursor" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -807,7 +807,7 @@ test button-1.82 {configuration option: "cursor" for checkbutton} -setup { .c configure -cursor badValue } -cleanup { destroy .c -} -returnCodes {error} -result {bad cursor spec "badValue"} +} -returnCodes error -result {bad cursor spec "badValue"} test button-1.83 {configuration option: "cursor" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -826,7 +826,7 @@ test button-1.84 {configuration option: "cursor" for radiobutton} -setup { .r configure -cursor badValue } -cleanup { destroy .r -} -returnCodes {error} -result {bad cursor spec "badValue"} +} -returnCodes error -result {bad cursor spec "badValue"} test button-1.85 {configuration option: "default" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -846,7 +846,7 @@ test button-1.86 {configuration option: "default" for button} -setup { .b configure -default huh? } -cleanup { destroy .b -} -returnCodes {error} -result {bad default "huh?": must be active, disabled, or normal} +} -returnCodes error -result {bad default "huh?": must be active, disabled, or normal} test button-1.87 {configuration option: "disabledforeground" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -866,7 +866,7 @@ test button-1.88 {configuration option: "disabledforeground" for label} -setup { .l configure -disabledforeground non-existent } -cleanup { destroy .l -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.89 {configuration option: "disabledforeground" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -885,7 +885,7 @@ test button-1.90 {configuration option: "disabledforeground" for button} -setup .b configure -disabledforeground non-existent } -cleanup { destroy .b -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.91 {configuration option: "disabledforeground" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -904,7 +904,7 @@ test button-1.92 {configuration option: "disabledforeground" for checkbutton} -s .c configure -disabledforeground non-existent } -cleanup { destroy .c -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.93 {configuration option: "disabledforeground" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -923,7 +923,7 @@ test button-1.94 {configuration option: "disabledforeground" for radiobutton} -s .r configure -disabledforeground non-existent } -cleanup { destroy .r -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.95 {configuration option: "fg" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -943,7 +943,7 @@ test button-1.96 {configuration option: "fg" for label} -setup { .l configure -fg non-existent } -cleanup { destroy .l -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.97 {configuration option: "fg" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -962,7 +962,7 @@ test button-1.98 {configuration option: "fg" for button} -setup { .b configure -fg non-existent } -cleanup { destroy .b -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.99 {configuration option: "fg" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -981,7 +981,7 @@ test button-1.100 {configuration option: "fg" for checkbutton} -setup { .c configure -fg non-existent } -cleanup { destroy .c -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.101 {configuration option: "fg" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -1000,7 +1000,7 @@ test button-1.102 {configuration option: "fg" for radiobutton} -setup { .r configure -fg non-existent } -cleanup { destroy .r -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.103 {configuration option: "font" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 @@ -1020,7 +1020,7 @@ test button-1.104 {configuration option: "activebackground" for label} -setup { .l configure -font {} } -cleanup { destroy .l -} -returnCodes {error} -result {font "" doesn't exist} +} -returnCodes error -result {font "" does not exist} test button-1.105 {configuration option: "font" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 pack .b @@ -1039,7 +1039,7 @@ test button-1.106 {configuration option: "activebackground" for button} -setup { .b configure -font {} } -cleanup { destroy .b -} -returnCodes {error} -result {font "" doesn't exist} +} -returnCodes error -result {font "" does not exist} test button-1.107 {configuration option: "font" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 pack .c @@ -1058,7 +1058,7 @@ test button-1.108 {configuration option: "activebackground" for checkbutton} -se .c configure -font {} } -cleanup { destroy .c -} -returnCodes {error} -result {font "" doesn't exist} +} -returnCodes error -result {font "" does not exist} test button-1.109 {configuration option: "font" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 pack .r @@ -1077,7 +1077,7 @@ test button-1.110 {configuration option: "activebackground" for radiobutton} -se .r configure -font {} } -cleanup { destroy .r -} -returnCodes {error} -result {font "" doesn't exist} +} -returnCodes error -result {font "" does not exist} test button-1.111 {configuration option: "foreground" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1097,7 +1097,7 @@ test button-1.112 {configuration option: "foreground" for label} -setup { .l configure -foreground non-existent } -cleanup { destroy .l -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.113 {configuration option: "foreground" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -1116,7 +1116,7 @@ test button-1.114 {configuration option: "foreground" for button} -setup { .b configure -foreground non-existent } -cleanup { destroy .b -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.115 {configuration option: "foreground" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -1135,7 +1135,7 @@ test button-1.116 {configuration option: "foreground" for checkbutton} -setup { .c configure -foreground non-existent } -cleanup { destroy .c -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.117 {configuration option: "foreground" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -1154,7 +1154,7 @@ test button-1.118 {configuration option: "foreground" for radiobutton} -setup { .r configure -foreground non-existent } -cleanup { destroy .r -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.119 {configuration option: "height" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1174,7 +1174,7 @@ test button-1.120 {configuration option: "height" for label} -setup { .l configure -height 20.0 } -cleanup { destroy .l -} -returnCodes {error} -result {expected integer but got "20.0"} +} -returnCodes error -result {expected integer but got "20.0"} test button-1.121 {configuration option: "height" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -1193,7 +1193,7 @@ test button-1.122 {configuration option: "height" for button} -setup { .b configure -height 20.0 } -cleanup { destroy .b -} -returnCodes {error} -result {expected integer but got "20.0"} +} -returnCodes error -result {expected integer but got "20.0"} test button-1.123 {configuration option: "height" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -1212,7 +1212,7 @@ test button-1.124 {configuration option: "height" for checkbutton} -setup { .c configure -height 20.0 } -cleanup { destroy .c -} -returnCodes {error} -result {expected integer but got "20.0"} +} -returnCodes error -result {expected integer but got "20.0"} test button-1.125 {configuration option: "height" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -1231,7 +1231,7 @@ test button-1.126 {configuration option: "height" for radiobutton} -setup { .r configure -height 20.0 } -cleanup { destroy .r -} -returnCodes {error} -result {expected integer but got "20.0"} +} -returnCodes error -result {expected integer but got "20.0"} test button-1.127 {configuration option: "highlightbackground" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1251,7 +1251,7 @@ test button-1.128 {configuration option: "highlightbackground" for label} -setup .l configure -highlightbackground non-existent } -cleanup { destroy .l -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.129 {configuration option: "highlightbackground" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -1270,7 +1270,7 @@ test button-1.130 {configuration option: "highlightbackground" for button} -setu .b configure -highlightbackground non-existent } -cleanup { destroy .b -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.131 {configuration option: "highlightbackground" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -1289,7 +1289,7 @@ test button-1.132 {configuration option: "highlightbackground" for checkbutton} .c configure -highlightbackground non-existent } -cleanup { destroy .c -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.133 {configuration option: "highlightbackground" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -1308,7 +1308,7 @@ test button-1.134 {configuration option: "highlightbackground" for radiobutton} .r configure -highlightbackground non-existent } -cleanup { destroy .r -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.135 {configuration option: "highlightcolor" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1328,7 +1328,7 @@ test button-1.136 {configuration option: "highlightcolor" for label} -setup { .l configure -highlightcolor non-existent } -cleanup { destroy .l -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.137 {configuration option: "highlightcolor" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -1347,7 +1347,7 @@ test button-1.138 {configuration option: "highlightcolor" for button} -setup { .b configure -highlightcolor non-existent } -cleanup { destroy .b -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.139 {configuration option: "highlightcolor" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -1366,7 +1366,7 @@ test button-1.140 {configuration option: "highlightcolor" for checkbutton} -setu .c configure -highlightcolor non-existent } -cleanup { destroy .c -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.141 {configuration option: "highlightcolor" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -1385,7 +1385,7 @@ test button-1.142 {configuration option: "highlightcolor" for radiobutton} -setu .r configure -highlightcolor non-existent } -cleanup { destroy .r -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.143 {configuration option: "highlightthickness" for label} -setup { label .l -borderwidth 2 -font {Helvetica -12 bold} @@ -1405,7 +1405,7 @@ test button-1.144 {configuration option: "highlightthickness" for label} -setup .l configure -highlightthickness badValue } -cleanup { destroy .l -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test button-1.145 {configuration option: "highlightthickness" for button} -setup { button .b -borderwidth 2 -font {Helvetica -12 bold} pack .b @@ -1424,7 +1424,7 @@ test button-1.146 {configuration option: "highlightthickness" for button} -setup .b configure -highlightthickness badValue } -cleanup { destroy .b -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test button-1.147 {configuration option: "highlightthickness" for checkbutton} -setup { checkbutton .c -borderwidth 2 -font {Helvetica -12 bold} pack .c @@ -1443,7 +1443,7 @@ test button-1.148 {configuration option: "highlightthickness" for checkbutton} - .c configure -highlightthickness badValue } -cleanup { destroy .c -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test button-1.149 {configuration option: "highlightthickness" for radiobutton} -setup { radiobutton .r -borderwidth 2 -font {Helvetica -12 bold} pack .r @@ -1462,7 +1462,7 @@ test button-1.150 {configuration option: "highlightthickness" for radiobutton} - .r configure -highlightthickness badValue } -cleanup { destroy .r -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test button-1.151 {configuration option: "image" for label} -constraints { testImageType @@ -1486,7 +1486,7 @@ test button-1.152 {configuration option: "image" for label} -setup { .l configure -image bogus } -cleanup { destroy .l -} -returnCodes {error} -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not exist} test button-1.153 {configuration option: "image" for button} -constraints { testImageType } -setup { @@ -1509,7 +1509,7 @@ test button-1.154 {configuration option: "image" for button} -setup { .b configure -image bogus } -cleanup { destroy .b -} -returnCodes {error} -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not exist} test button-1.155 {configuration option: "image" for checkbutton} -constraints { testImageType } -setup { @@ -1532,7 +1532,7 @@ test button-1.156 {configuration option: "image" for checkbutton} -setup { .c configure -image bogus } -cleanup { destroy .c -} -returnCodes {error} -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not exist} test button-1.157 {configuration option: "image" for radiobutton} -constraints { testImageType } -setup { @@ -1555,7 +1555,7 @@ test button-1.158 {configuration option: "image" for radiobutton} -setup { .r configure -image bogus } -cleanup { destroy .r -} -returnCodes {error} -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not exist} test button-1.159 {configuration option: "indicatoron" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1575,7 +1575,7 @@ test button-1.160 {configuration option: "indicatoron" for checkbutton} -setup { .c configure -indicatoron no_way } -cleanup { destroy .c -} -returnCodes {error} -result {expected boolean value but got "no_way"} +} -returnCodes error -result {expected boolean value but got "no_way"} test button-1.161 {configuration option: "indicatoron" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -1594,7 +1594,7 @@ test button-1.162 {configuration option: "indicatoron" for radiobutton} -setup { .r configure -indicatoron no_way } -cleanup { destroy .r -} -returnCodes {error} -result {expected boolean value but got "no_way"} +} -returnCodes error -result {expected boolean value but got "no_way"} test button-1.163 {configuration option: "justify" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1614,7 +1614,7 @@ test button-1.164 {configuration option: "justify" for label} -setup { .l configure -justify bogus } -cleanup { destroy .l -} -returnCodes {error} -result {bad justification "bogus": must be left, right, or center} +} -returnCodes error -result {bad justification "bogus": must be left, right, or center} test button-1.165 {configuration option: "justify" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -1633,7 +1633,7 @@ test button-1.166 {configuration option: "justify" for button} -setup { .b configure -justify bogus } -cleanup { destroy .b -} -returnCodes {error} -result {bad justification "bogus": must be left, right, or center} +} -returnCodes error -result {bad justification "bogus": must be left, right, or center} test button-1.167 {configuration option: "justify" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -1652,7 +1652,7 @@ test button-1.168 {configuration option: "justify" for checkbutton} -setup { .c configure -justify bogus } -cleanup { destroy .c -} -returnCodes {error} -result {bad justification "bogus": must be left, right, or center} +} -returnCodes error -result {bad justification "bogus": must be left, right, or center} test button-1.169 {configuration option: "justify" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -1671,7 +1671,7 @@ test button-1.170 {configuration option: "justify" for radiobutton} -setup { .r configure -justify bogus } -cleanup { destroy .r -} -returnCodes {error} -result {bad justification "bogus": must be left, right, or center} +} -returnCodes error -result {bad justification "bogus": must be left, right, or center} test button-1.171 {configuration option: "offrelief" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1691,7 +1691,7 @@ test button-1.172 {configuration option: "offrelief" for checkbutton} -setup { .c configure -offrelief 1.5 } -cleanup { destroy .c -} -returnCodes {error} -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} +} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} test button-1.173 {configuration option: "offrelief" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -1710,7 +1710,7 @@ test button-1.174 {configuration option: "offrelief" for radiobutton} -setup { .r configure -offrelief 1.5 } -cleanup { destroy .r -} -returnCodes {error} -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} +} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} test button-1.175 {configuration option: "offvalue" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1752,7 +1752,7 @@ test button-1.178 {configuration option: "overrelief" for button} -setup { .b configure -overrelief 1.5 } -cleanup { destroy .b -} -returnCodes {error} -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, sunken, or ""} +} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, sunken, or ""} test button-1.179 {configuration option: "overrelief" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -1771,7 +1771,7 @@ test button-1.180 {configuration option: "overrelief" for checkbutton} -setup { .c configure -overrelief 1.5 } -cleanup { destroy .c -} -returnCodes {error} -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, sunken, or ""} +} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, sunken, or ""} test button-1.181 {configuration option: "overrelief" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -1790,7 +1790,7 @@ test button-1.182 {configuration option: "overrelief" for radiobutton} -setup { .r configure -overrelief 1.5 } -cleanup { destroy .r -} -returnCodes {error} -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, sunken, or ""} +} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, sunken, or ""} test button-1.183 {configuration option: "padx" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1810,7 +1810,7 @@ test button-1.184 {configuration option: "padx" for label} -setup { .l configure -padx 420x } -cleanup { destroy .l -} -returnCodes {error} -result {expected screen distance but got "420x"} +} -returnCodes error -result {expected screen distance but got "420x"} test button-1.185 {configuration option: "padx" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -1829,7 +1829,7 @@ test button-1.186 {configuration option: "padx" for button} -setup { .b configure -padx 420x } -cleanup { destroy .b -} -returnCodes {error} -result {expected screen distance but got "420x"} +} -returnCodes error -result {expected screen distance but got "420x"} test button-1.187 {configuration option: "padx" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -1848,7 +1848,7 @@ test button-1.188 {configuration option: "padx" for checkbutton} -setup { .c configure -padx 420x } -cleanup { destroy .c -} -returnCodes {error} -result {expected screen distance but got "420x"} +} -returnCodes error -result {expected screen distance but got "420x"} test button-1.189 {configuration option: "padx" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -1867,7 +1867,7 @@ test button-1.190 {configuration option: "padx" for radiobutton} -setup { .r configure -padx 420x } -cleanup { destroy .r -} -returnCodes {error} -result {expected screen distance but got "420x"} +} -returnCodes error -result {expected screen distance but got "420x"} test button-1.191 {configuration option: "pady" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1887,7 +1887,7 @@ test button-1.192 {configuration option: "pady" for label} -setup { .l configure -pady 420x } -cleanup { destroy .l -} -returnCodes {error} -result {expected screen distance but got "420x"} +} -returnCodes error -result {expected screen distance but got "420x"} test button-1.193 {configuration option: "pady" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -1906,7 +1906,7 @@ test button-1.194 {configuration option: "pady" for button} -setup { .b configure -pady 420x } -cleanup { destroy .b -} -returnCodes {error} -result {expected screen distance but got "420x"} +} -returnCodes error -result {expected screen distance but got "420x"} test button-1.195 {configuration option: "pady" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -1925,7 +1925,7 @@ test button-1.196 {configuration option: "pady" for checkbutton} -setup { .c configure -pady 420x } -cleanup { destroy .c -} -returnCodes {error} -result {expected screen distance but got "420x"} +} -returnCodes error -result {expected screen distance but got "420x"} test button-1.197 {configuration option: "pady" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -1944,7 +1944,7 @@ test button-1.198 {configuration option: "pady" for radiobutton} -setup { .r configure -pady 420x } -cleanup { destroy .r -} -returnCodes {error} -result {expected screen distance but got "420x"} +} -returnCodes error -result {expected screen distance but got "420x"} test button-1.199 {configuration option: "repeatdelay" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1964,7 +1964,7 @@ test button-1.200 {configuration option: "repeatdelay" for button} -setup { .b configure -repeatdelay foo } -cleanup { destroy .b -} -returnCodes {error} -result {expected integer but got "foo"} +} -returnCodes error -result {expected integer but got "foo"} test button-1.201 {configuration option: "repeatinterval" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1984,7 +1984,7 @@ test button-1.202 {configuration option: "repeatinterval" for button} -setup { .b configure -repeatinterval foo } -cleanup { destroy .b -} -returnCodes {error} -result {expected integer but got "foo"} +} -returnCodes error -result {expected integer but got "foo"} test button-1.203 {configuration option: "relief" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -2004,7 +2004,7 @@ test button-1.204 {configuration option: "relief" for label} -setup { .l configure -relief 1.5 } -cleanup { destroy .l -} -returnCodes {error} -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} +} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} test button-1.205 {configuration option: "relief" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -2023,7 +2023,7 @@ test button-1.206 {configuration option: "relief" for button} -setup { .b configure -relief 1.5 } -cleanup { destroy .b -} -returnCodes {error} -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} +} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} test button-1.207 {configuration option: "relief" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -2042,7 +2042,7 @@ test button-1.208 {configuration option: "relief" for checkbutton} -setup { .c configure -relief 1.5 } -cleanup { destroy .c -} -returnCodes {error} -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} +} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} test button-1.209 {configuration option: "relief" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -2061,7 +2061,7 @@ test button-1.210 {configuration option: "relief" for radiobutton} -setup { .r configure -relief 1.5 } -cleanup { destroy .r -} -returnCodes {error} -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} +} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} test button-1.211 {configuration option: "selectcolor" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -2081,7 +2081,7 @@ test button-1.212 {configuration option: "selectcolor" for checkbutton} -setup { .c configure -selectcolor non-existent } -cleanup { destroy .c -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.213 {configuration option: "selectcolor" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -2100,7 +2100,7 @@ test button-1.214 {configuration option: "selectcolor" for radiobutton} -setup { .r configure -selectcolor non-existent } -cleanup { destroy .r -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test button-1.215 {configuration option: "selectimage" for checkbutton} -constraints { testImageType @@ -2124,7 +2124,7 @@ test button-1.216 {configuration option: "selectimage" for checkbutton} -setup { .c configure -selectimage bogus } -cleanup { destroy .c -} -returnCodes {error} -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not exist} test button-1.217 {configuration option: "selectimage" for radiobutton} -constraints { testImageType } -setup { @@ -2147,7 +2147,7 @@ test button-1.218 {configuration option: "selectimage" for radiobutton} -setup { .r configure -selectimage bogus } -cleanup { destroy .r -} -returnCodes {error} -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not exist} test button-1.219 {configuration option: "state" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -2167,7 +2167,7 @@ test button-1.220 {configuration option: "state" for label} -setup { .l configure -state bogus } -cleanup { destroy .l -} -returnCodes {error} -result {bad state "bogus": must be active, disabled, or normal} +} -returnCodes error -result {bad state "bogus": must be active, disabled, or normal} test button-1.221 {configuration option: "state" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -2186,7 +2186,7 @@ test button-1.222 {configuration option: "state" for button} -setup { .b configure -state bogus } -cleanup { destroy .b -} -returnCodes {error} -result {bad state "bogus": must be active, disabled, or normal} +} -returnCodes error -result {bad state "bogus": must be active, disabled, or normal} test button-1.223 {configuration option: "state" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -2205,7 +2205,7 @@ test button-1.224 {configuration option: "state" for checkbutton} -setup { .c configure -state bogus } -cleanup { destroy .c -} -returnCodes {error} -result {bad state "bogus": must be active, disabled, or normal} +} -returnCodes error -result {bad state "bogus": must be active, disabled, or normal} test button-1.225 {configuration option: "state" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -2224,7 +2224,7 @@ test button-1.226 {configuration option: "state" for radiobutton} -setup { .r configure -state bogus } -cleanup { destroy .r -} -returnCodes {error} -result {bad state "bogus": must be active, disabled, or normal} +} -returnCodes error -result {bad state "bogus": must be active, disabled, or normal} test button-1.227 {configuration option: "takefocus" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -2371,7 +2371,7 @@ test button-1.240 {configuration option: "tristateimage" for checkbutton} -setup .c configure -tristateimage bogus } -cleanup { destroy .c -} -returnCodes {error} -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not exist} test button-1.241 {configuration option: "tristateimage" for radiobutton} -constraints { testImageType } -setup { @@ -2394,7 +2394,7 @@ test button-1.242 {configuration option: "tristateimage" for radiobutton} -setup .r configure -tristateimage bogus } -cleanup { destroy .r -} -returnCodes {error} -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not exist} test button-1.243 {configuration option: "underline" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -2414,7 +2414,7 @@ test button-1.244 {configuration option: "underline" for label} -setup { .l configure -underline 3p } -cleanup { destroy .l -} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""} +} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""} test button-1.245 {configuration option: "underline" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -2433,7 +2433,7 @@ test button-1.246 {configuration option: "underline" for button} -setup { .b configure -underline 3p } -cleanup { destroy .b -} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""} +} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""} test button-1.247 {configuration option: "underline" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -2452,7 +2452,7 @@ test button-1.248 {configuration option: "underline" for checkbutton} -setup { .c configure -underline 3p } -cleanup { destroy .c -} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""} +} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""} test button-1.249 {configuration option: "underline" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -2471,7 +2471,7 @@ test button-1.250 {configuration option: "underline" for radiobutton} -setup { .r configure -underline 3p } -cleanup { destroy .r -} -returnCodes {error} -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""} +} -returnCodes error -result {bad index "3p": must be integer?[+-]integer?, end?[+-]integer?, or ""} test button-1.251 {configuration option: "tristatevalue" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -2523,7 +2523,7 @@ test button-1.255 {configuration option: "width" for label} -setup { .l configure -width 3p } -cleanup { destroy .l -} -returnCodes {error} -result {expected integer but got "3p"} +} -returnCodes error -result {expected integer but got "3p"} test button-1.256 {configuration option: "width" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -2542,7 +2542,7 @@ test button-1.257 {configuration option: "width" for button} -setup { .b configure -width 3p } -cleanup { destroy .b -} -returnCodes {error} -result {expected integer but got "3p"} +} -returnCodes error -result {expected integer but got "3p"} test button-1.258 {configuration option: "width" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -2561,7 +2561,7 @@ test button-1.259 {configuration option: "width" for checkbutton} -setup { .c configure -width 3p } -cleanup { destroy .c -} -returnCodes {error} -result {expected integer but got "3p"} +} -returnCodes error -result {expected integer but got "3p"} test button-1.260 {configuration option: "width" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -2580,7 +2580,7 @@ test button-1.261 {configuration option: "width" for radiobutton} -setup { .r configure -width 3p } -cleanup { destroy .r -} -returnCodes {error} -result {expected integer but got "3p"} +} -returnCodes error -result {expected integer but got "3p"} test button-1.262 {configuration option: "wraplength" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -2600,7 +2600,7 @@ test button-1.263 {configuration option: "wraplength" for label} -setup { .l configure -wraplength 6x } -cleanup { destroy .l -} -returnCodes {error} -result {expected screen distance but got "6x"} +} -returnCodes error -result {expected screen distance but got "6x"} test button-1.264 {configuration option: "wraplength" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b @@ -2619,7 +2619,7 @@ test button-1.265 {configuration option: "wraplength" for button} -setup { .b configure -wraplength 6x } -cleanup { destroy .b -} -returnCodes {error} -result {expected screen distance but got "6x"} +} -returnCodes error -result {expected screen distance but got "6x"} test button-1.266 {configuration option: "wraplength" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c @@ -2638,7 +2638,7 @@ test button-1.267 {configuration option: "wraplength" for checkbutton} -setup { .c configure -wraplength 6x } -cleanup { destroy .c -} -returnCodes {error} -result {expected screen distance but got "6x"} +} -returnCodes error -result {expected screen distance but got "6x"} test button-1.268 {configuration option: "wraplength" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r @@ -2657,7 +2657,7 @@ test button-1.269 {configuration option: "wraplength" for radiobutton} -setup { .r configure -wraplength 6x } -cleanup { destroy .r -} -returnCodes {error} -result {expected screen distance but got "6x"} +} -returnCodes error -result {expected screen distance but got "6x"} test button-1.270 {configuration options} -body { # Additional check to make sure that -selectcolor may be empty in @@ -2682,7 +2682,7 @@ test button-1.271 {configuration options: fallback to default} -setup { # ex-tests 3.* test button-2.1 {ButtonCreate - not enough arguments} -body { button -} -returnCodes {error} -result {wrong # args: should be "button pathName ?-option value ...?"} +} -returnCodes error -result {wrong # args: should be "button pathName ?-option value ...?"} test button-2.2 {ButtonCreate procedure - setting label class} -body { label .x @@ -2721,7 +2721,7 @@ test button-2.7 {ButtonCreate - bad window name} -body { button foo } -cleanup { destroy foo -} -returnCodes {error} -result {bad window path name "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 { option add *funny.background bogus @@ -2729,7 +2729,7 @@ test button-2.8 {ButtonCreate procedure - error in default option value} -body { } -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} @@ -2746,7 +2746,7 @@ 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} winfo exists .x @@ -2767,31 +2767,31 @@ test button-3.1 {ButtonWidgetCmd - too few arguments} -body { .b } -cleanup { destroy .b -} -returnCodes {error} -result {wrong # args: should be ".b option ?arg ...?"} +} -returnCodes error -result {wrong # args: should be ".b option ?arg ...?"} test button-3.2 {ButtonWidgetCmd - bad option name} -body { button .b .b c } -cleanup { destroy .b -} -returnCodes {error} -result {ambiguous option "c": must be cget, configure, flash, or invoke} +} -returnCodes error -result {ambiguous option "c": must be cget, configure, flash, or invoke} test button-3.3 {ButtonWidgetCmd - bad option name} -body { button .b .b bogus } -cleanup { destroy .b -} -returnCodes {error} -result {bad option "bogus": must be cget, configure, flash, or invoke} +} -returnCodes error -result {bad option "bogus": must be cget, configure, flash, or invoke} test button-3.4 {ButtonWidgetCmd procedure, "cget" option} -body { button .b .b cget a b } -cleanup { destroy .b -} -returnCodes {error} -result {wrong # args: should be ".b cget option"} +} -returnCodes error -result {wrong # args: should be ".b cget option"} test button-3.5 {ButtonWidgetCmd procedure, "cget" option} -body { button .b .b cget -gorp } -cleanup { destroy .b -} -returnCodes {error} -result {unknown option "-gorp"} +} -returnCodes error -result {unknown option "-gorp"} #ex 4.7 test button-3.6 {ButtonWidgetCmd procedure, "cget" option} -body { @@ -2799,45 +2799,45 @@ test button-3.6 {ButtonWidgetCmd procedure, "cget" option} -body { .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"} +} -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"} +} -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"} +} -returnCodes error -result {unknown option "-onvalue"} # ex 4.6 test button-3.13 {ButtonWidgetCmd procedure, "configure" option} -body { @@ -2857,14 +2857,14 @@ test button-3.15 {ButtonWidgetCmd procedure, "configure" option} -body { .b configure -gorp } -cleanup { destroy .b -} -returnCodes {error} -result {unknown option "-gorp"} +} -returnCodes error -result {unknown option "-gorp"} test button-3.16 {ButtonWidgetCmd procedure, "configure" option} -setup { button .b } -body { .b co -bg #ffffff -fg } -cleanup { destroy .b -} -returnCodes {error} -result {value for "-fg" missing} +} -returnCodes error -result {value for "-fg" missing} test button-3.17 {ButtonWidgetCmd procedure, "configure" option} -setup { button .b } -body { @@ -2879,19 +2879,19 @@ test button-3.18 {ButtonWidgetCmd procedure, "deselect" option} -body { .c deselect foo } -cleanup { destroy .c -} -returnCodes {error} -result {wrong # args: should be ".c deselect"} +} -returnCodes error -result {wrong # args: should be ".c deselect"} test button-3.19 {ButtonWidgetCmd procedure, "deselect" option} -body { label .l .l deselect } -cleanup { destroy .l -} -returnCodes {error} -result {bad option "deselect": must be cget or configure} +} -returnCodes error -result {bad option "deselect": must be cget or configure} test button-3.20 {ButtonWidgetCmd procedure, "deselect" option} -body { button .b .b deselect } -cleanup { destroy .b -} -returnCodes {error} -result {bad option "deselect": must be cget, configure, flash, or invoke} +} -returnCodes error -result {bad option "deselect": must be cget, configure, flash, or invoke} test button-3.21 {ButtonWidgetCmd procedure, "deselect" option} -body { checkbutton .c -variable checkvar -onvalue 1 -offvalue 0 @@ -2926,7 +2926,7 @@ test button-3.24 {ButtonWidgetCmd procedure, "deselect" option} -body { } -cleanup { destroy .c trace remove variable checkvar write 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 @@ -2936,7 +2936,7 @@ test button-3.25 {ButtonWidgetCmd procedure, "deselect" option} -body { } -cleanup { trace remove variable checkvar write bogusTrace destroy .c -} -match {glob} -result {{*trace aborted +} -match glob -result {{*trace aborted while executing * ".c deselect"} 0} @@ -2948,7 +2948,7 @@ test button-3.26 {ButtonWidgetCmd procedure, "deselect" option} -body { } -cleanup { destroy .r trace remove variable radiovar write 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 @@ -2968,44 +2968,44 @@ test button-3.28 {ButtonWidgetCmd procedure, "flash" option} -body { .b flash foo } -cleanup { destroy .b -} -returnCodes {error} -result {wrong # args: should be ".b flash"} +} -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} +} -returnCodes error -result {bad option "flash": must be cget or configure} test button-3.30 {ButtonWidgetCmd procedure, "flash" option} -body { button .b catch {.b flash} } -cleanup { destroy .b -} -returnCodes {ok} -match {glob} -result {*} +} -returnCodes {ok} -match glob -result {*} test button-3.31 {ButtonWidgetCmd procedure, "flash" option} -body { checkbutton .c catch {.c flash} } -cleanup { destroy .c -} -returnCodes {ok} -match {glob} -result {*} +} -returnCodes {ok} -match glob -result {*} test button-3.32 {ButtonWidgetCmd procedure, "flash" option} -body { radiobutton .r catch {.r f} } -cleanup { destroy .r -} -returnCodes {ok} -match {glob} -result {*} +} -returnCodes {ok} -match glob -result {*} test button-3.33 {ButtonWidgetCmd procedure, "invoke" option} -body { label .l .l invoke } -cleanup { destroy .l -} -returnCodes {error} -result {bad option "invoke": must be cget or configure} +} -returnCodes error -result {bad option "invoke": must be cget or configure} test button-3.34 {ButtonWidgetCmd procedure, "invoke" option} -body { button .b .b invoke foo } -cleanup { destroy .b -} -returnCodes {error} -result {wrong # args: should be ".b invoke"} +} -returnCodes error -result {wrong # args: should be ".b invoke"} test button-3.35 {ButtonWidgetCmd procedure, "invoke" option} -body { button .b .b configure -command {set x invoked} @@ -3026,7 +3026,7 @@ test button-3.36 {ButtonWidgetCmd procedure, "invoke" option} -body { } -result {not invoked} test button-3.37 {ButtonWidgetCmd procedure, "invoke" option} -body { checkbutton .c -variable checkvar -onvalue 1 -offvalue 0 \ - -command {set x invoked} + -command {set x invoked} set checkvar bogus set x "not invoked" .c invoke @@ -3049,19 +3049,19 @@ test button-3.39 {ButtonWidgetCmd procedure, "select" option} -body { .l select } -cleanup { destroy .l -} -returnCodes {error} -result {bad option "select": must be cget or configure} +} -returnCodes error -result {bad option "select": must be cget or configure} test button-3.40 {ButtonWidgetCmd procedure, "select" option} -body { button .b .b select } -cleanup { destroy .b -} -returnCodes {error} -result {bad option "select": must be cget, configure, flash, or invoke} +} -returnCodes error -result {bad option "select": must be cget, configure, flash, or invoke} test button-3.41 {ButtonWidgetCmd procedure, "select" option} -body { checkbutton .c .c select foo } -cleanup { destroy .c -} -returnCodes {error} -result {wrong # args: should be ".c select"} +} -returnCodes error -result {wrong # args: should be ".c select"} test button-3.42 {ButtonWidgetCmd procedure, "select" option} -body { checkbutton .c -variable checkvar -onvalue lovely -offvalue 0 set checkvar bogus @@ -3086,7 +3086,7 @@ test button-3.44 {ButtonWidgetCmd procedure, "select" option} -body { } -cleanup { destroy .r trace remove variable radiovar write 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 @@ -3096,7 +3096,7 @@ test button-3.45 {ButtonWidgetCmd procedure, "select" option} -body { } -cleanup { destroy .r trace remove variable radiovar write bogusTrace -} -match {glob} -result {{*trace aborted +} -match glob -result {{*trace aborted while executing * ".r select"} red} @@ -3107,25 +3107,25 @@ test button-3.46 {ButtonWidgetCmd procedure, "toggle" option} -body { .l toggle } -cleanup { destroy .l -} -returnCodes {error} -result {bad option "toggle": must be cget or configure} +} -returnCodes error -result {bad option "toggle": must be cget or configure} test button-3.47 {ButtonWidgetCmd procedure, "toggle" option} -body { button .b .b toggle } -cleanup { destroy .b -} -returnCodes {error} -result {bad option "toggle": must be cget, configure, flash, or invoke} +} -returnCodes error -result {bad option "toggle": must be cget, configure, flash, or invoke} test button-3.48 {ButtonWidgetCmd procedure, "toggle" option} -body { radiobutton .r .r toggle } -cleanup { destroy .r -} -returnCodes {error} -result {bad option "toggle": must be cget, configure, deselect, flash, invoke, or select} +} -returnCodes error -result {bad option "toggle": must be cget, configure, deselect, flash, invoke, or select} test button-3.49 {ButtonWidgetCmd procedure, "toggle" option} -body { checkbutton .c .c toggle foo } -cleanup { destroy .c -} -returnCodes {error} -result {wrong # args: should be ".c toggle"} +} -returnCodes error -result {wrong # args: should be ".c toggle"} test button-3.50 {ButtonWidgetCmd procedure, "toggle" option} -body { set checkvar bogus checkbutton .c -variable checkvar -onvalue sunshine -offvalue rain @@ -3147,7 +3147,7 @@ test button-3.51 {ButtonWidgetCmd procedure, "toggle" option} -body { } -cleanup { destroy .c trace remove variable checkvar write 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 @@ -3157,7 +3157,7 @@ test button-3.52 {ButtonWidgetCmd procedure, "toggle" option} -body { } -cleanup { trace remove variable checkvar write bogusTrace destroy .c -} -match {glob} -result {{*trace aborted +} -match glob -result {{*trace aborted while executing * ".c toggle"} abc} @@ -3169,7 +3169,7 @@ test button-3.53 {ButtonWidgetCmd procedure, "toggle" option} -body { } -cleanup { trace remove variable checkvar write 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 @@ -3179,7 +3179,7 @@ test button-3.54 {ButtonWidgetCmd procedure, "toggle" option} -body { } -cleanup { trace remove variable checkvar write bogusTrace destroy .c -} -match {glob} -result {{*trace aborted +} -match glob -result {{*trace aborted while executing * ".c toggle"} xyz} @@ -3192,7 +3192,7 @@ test button-3.55 {ButtonWidgetCmd procedure, "toggle" option} -setup { .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 { @@ -3203,7 +3203,7 @@ test button-3.56 {ButtonWidgetCmd procedure, "toggle" option} -setup { return $errorInfo } -cleanup { destroy .c -} -match {glob} -result {can't set "checkvar": variable is array +} -match glob -result {can't set "checkvar": variable is array while executing ".c toggle"} @@ -3232,7 +3232,7 @@ test button-5.1 {ConfigureButton - textvariable trace} -body { .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} @@ -3320,13 +3320,13 @@ test button-5.10 {ConfigureButton - error in setting variable} -setup { } -cleanup { destroy .r trace remove variable x write bogusTrace -} -returnCodes {error} -result {can't set "x": trace aborted} +} -returnCodes error -result {can't set "x": trace aborted} test button-5.11 {ConfigureButton - bad image name} -body { button .b -image bogus } -cleanup { destroy .b -} -returnCodes {error} -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not exist} test button-5.12 {ConfigureButton - setting variable from current text value} -setup { unset -nocomplain x @@ -3353,7 +3353,7 @@ test button-5.14 {ConfigureButton - variable handling} -setup { } -cleanup { trace remove variable x write 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 { @@ -3371,7 +3371,7 @@ test button-5.16 {ConfigureButton - -width option} -body { .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} @@ -3387,7 +3387,7 @@ test button-5.18 {ConfigureButton - -height option} -body { .b configure -height 0.5c } -cleanup { destroy .b -} -returnCodes {error} -result {expected integer but got "0.5c"} +} -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} @@ -3404,7 +3404,7 @@ test button-5.20 {ConfigureButton - -width option} -body { .b configure -width abc } -cleanup { destroy .b -} -returnCodes {error} -result {expected screen distance but got "abc"} +} -returnCodes error -result {expected screen distance but got "abc"} test button-5.21 {ConfigureButton - -width option} -body { button .b -bitmap questhead catch {.b configure -width abc} @@ -3425,7 +3425,7 @@ test button-5.22 {ConfigureButton - -height option} -constraints { } -cleanup { destroy .b image delete image1 -} -returnCodes {error} -result {expected screen distance but got "0.5x"} +} -returnCodes error -result {expected screen distance but got "0.5x"} test button-5.23 {ConfigureButton - -height option} -constraints { testImageType } -setup { @@ -3447,41 +3447,41 @@ test button-5.24 {ConfigureButton - computing geometry} -constraints { fonts } -body { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -padx 30 -pady 20 + -padx 30 -pady 20 # 1. button with text .b configure -text "Sample text" pack .b set textwidth [font measure [.b cget -font] -displayof .b [.b cget -text]] set expectedwidth [expr {$textwidth + 2*[.b cget -borderwidth] \ - + 2*[.b cget -highlightthickness] + 2*[.b cget -padx]}] + + 2*[.b cget -highlightthickness] + 2*[.b cget -padx]}] incr expectedwidth 2 ; # added (hardcoded) in tkUnixButton.c set result [expr {$expectedwidth == [winfo reqwidth .b]}] set linespace [lindex [font metrics [.b cget -font] -displayof .b] 5] set expectedheight [expr {$linespace + 2*[.b cget -borderwidth] \ - + 2*[.b cget -highlightthickness] + 2*[.b cget -pady]}] + + 2*[.b cget -highlightthickness] + 2*[.b cget -pady]}] incr expectedheight 2 ; # added (hardcoded) in tkUnixButton.c lappend result [expr {$expectedheight == [winfo reqheight .b]}] # 2. button with a bitmap image # there is no access to characteristics the predefined bitmaps, # so define one as an image (copied from questhead.xbm) set myquesthead [image create bitmap -data { - #define myquesthead_width 20 - #define myquesthead_height 22 - static unsigned char myquesthead_bits[] = { - 0xf8, 0x1f, 0x00, 0xac, 0x2a, 0x00, 0x56, 0x55, 0x00, 0xeb, 0xaf, 0x00, - 0xf5, 0x5f, 0x01, 0xfb, 0xbf, 0x00, 0x75, 0x5d, 0x01, 0xfb, 0xbe, 0x02, - 0x75, 0x5d, 0x05, 0xab, 0xbe, 0x0a, 0x55, 0x5f, 0x07, 0xab, 0xaf, 0x00, - 0xd6, 0x57, 0x01, 0xac, 0xab, 0x00, 0xd8, 0x57, 0x00, 0xb0, 0xaa, 0x00, - 0x50, 0x55, 0x00, 0xb0, 0x0b, 0x00, 0xd0, 0x17, 0x00, 0xb0, 0x0b, 0x00, - 0x58, 0x15, 0x00, 0xa8, 0x2a, 0x00}; + #define myquesthead_width 20 + #define myquesthead_height 22 + static unsigned char myquesthead_bits[] = { + 0xf8, 0x1f, 0x00, 0xac, 0x2a, 0x00, 0x56, 0x55, 0x00, 0xeb, 0xaf, 0x00, + 0xf5, 0x5f, 0x01, 0xfb, 0xbf, 0x00, 0x75, 0x5d, 0x01, 0xfb, 0xbe, 0x02, + 0x75, 0x5d, 0x05, 0xab, 0xbe, 0x0a, 0x55, 0x5f, 0x07, 0xab, 0xaf, 0x00, + 0xd6, 0x57, 0x01, 0xac, 0xab, 0x00, 0xd8, 0x57, 0x00, 0xb0, 0xaa, 0x00, + 0x50, 0x55, 0x00, 0xb0, 0x0b, 0x00, 0xd0, 0x17, 0x00, 0xb0, 0x0b, 0x00, + 0x58, 0x15, 0x00, 0xa8, 0x2a, 0x00}; }] .b configure -image $myquesthead set expectedwidth [expr {[image width $myquesthead] + 2*[.b cget -borderwidth] \ - + 2*[.b cget -highlightthickness]}] + + 2*[.b cget -highlightthickness]}] incr expectedwidth 2 ; # added (hardcoded) in tkUnixButton.c lappend result [expr {$expectedwidth == [winfo reqwidth .b]}] set expectedheight [expr {[image height $myquesthead] + 2*[.b cget -borderwidth] \ - + 2*[.b cget -highlightthickness]}] + + 2*[.b cget -highlightthickness]}] incr expectedheight 2 ; # added (hardcoded) in tkUnixButton.c lappend result [expr {$expectedheight == [winfo reqheight .b]}] } -cleanup { @@ -3554,7 +3554,7 @@ test button-8.2 {TkInvokeButton procedure} -setup { } -cleanup { destroy .c trace remove variable x write bogusTrace -} -returnCodes {error} -result {can't set "x": trace aborted} +} -returnCodes error -result {can't set "x": trace aborted} test button-8.3 {TkInvokeButton procedure} -setup { set x 0 } -body { @@ -3575,7 +3575,7 @@ test button-8.4 {TkInvokeButton procedure} -setup { } -cleanup { destroy .c trace remove variable x write bogusTrace -} -returnCodes {error} -result {can't set "x": trace aborted} +} -returnCodes error -result {can't set "x": trace aborted} test button-8.5 {TkInvokeButton procedure} -setup { set x 1 } -body { @@ -3609,7 +3609,7 @@ test button-8.7 {TkInvokeButton procedure} -body { } -cleanup { destroy .r trace remove variable x write bogusTrace -} -returnCodes {error} -result {can't set "x": trace aborted} +} -returnCodes error -result {can't set "x": trace aborted} test button-8.8 {TkInvokeButton procedure} -body { radiobutton .r -variable x -value red set x green @@ -3619,7 +3619,7 @@ test button-8.8 {TkInvokeButton procedure} -body { } -cleanup { destroy .r trace remove variable x write bogusTrace -} -match {glob} -result {{*trace aborted +} -match glob -result {{*trace aborted while executing * ".r invoke"} red} @@ -3953,9 +3953,9 @@ test button-13.8 {size behavior: checkbutton} -setup { 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 - } + if {[winfo exists .top.b]} { + destroy .top.b + } } toplevel .top button .top.b -text Foo -command destroy_button diff --git a/tests/canvImg.test b/tests/canvImg.test index bf532fe..2ac7435 100644 --- a/tests/canvImg.test +++ b/tests/canvImg.test @@ -29,7 +29,7 @@ test canvImg-1.2 {options for image items} -body { .c create image 50 50 -anchor gorp -tags i1 } -cleanup { .c delete all -} -returnCodes {error} -result {bad anchor position "gorp": must be n, ne, e, se, s, sw, w, nw, or center} +} -returnCodes error -result {bad anchor "gorp": must be n, ne, e, se, s, sw, w, nw, or center} test canvImg-1.3 {options for image items} -constraints testImageType -setup { image create test foo .c delete all @@ -44,7 +44,7 @@ test canvImg-1.4 {options for image items} -body { .c create image 50 50 -image unknown -tags i1 } -cleanup { .c delete all -} -returnCodes {error} -result {image "unknown" doesn't exist} +} -returnCodes error -result {image "unknown" does not exist} test canvImg-1.5 {options for image items} -constraints testImageType -setup { image create test foo .c delete all @@ -60,12 +60,12 @@ test canvImg-2.1 {CreateImage procedure} -body { .c create image 40 } -cleanup { .c delete all -} -returnCodes {error} -result {wrong # coordinates: expected 2, got 1} +} -returnCodes error -result {wrong # coordinates: expected 2, got 1} test canvImg-2.2 {CreateImage procedure} -body { .c create image 40 50 60 } -cleanup { .c delete all -} -returnCodes {error} -result {unknown option "60"} +} -returnCodes error -result {unknown option "60"} test canvImg-2.3 {CreateImage procedure} -body { .c delete all set i [.c create image 50 50] @@ -79,17 +79,17 @@ test canvImg-2.4 {CreateImage procedure} -body { .c create image xyz 40 } -cleanup { .c delete all -} -returnCodes {error} -result {expected screen distance but got "xyz"} +} -returnCodes error -result {expected screen distance but got "xyz"} test canvImg-2.5 {CreateImage procedure} -body { .c create image 50 qrs } -cleanup { .c delete all -} -returnCodes {error} -result {expected screen distance but got "qrs"} +} -returnCodes error -result {expected screen distance but got "qrs"} test canvImg-2.6 {CreateImage procedure} -constraints testImageType -body { .c create image 50 50 -gorp foo } -cleanup { .c delete all -} -returnCodes {error} -result {unknown option "-gorp"} +} -returnCodes error -result {unknown option "-gorp"} test canvImg-3.1 {ImageCoords procedure} -constraints testImageType -setup { @@ -109,7 +109,7 @@ test canvImg-3.2 {ImageCoords procedure} -constraints testImageType -setup { } -cleanup { .c delete all image delete foo -} -returnCodes {error} -result {expected screen distance but got "dumb"} +} -returnCodes error -result {expected screen distance but got "dumb"} test canvImg-3.3 {ImageCoords procedure} -constraints testImageType -setup { image create test foo } -body { @@ -119,7 +119,7 @@ test canvImg-3.3 {ImageCoords procedure} -constraints testImageType -setup { } -cleanup { .c delete all image delete foo -} -returnCodes {error} -result {expected screen distance but got "dumb0"} +} -returnCodes error -result {expected screen distance but got "dumb0"} test canvImg-3.4 {ImageCoords procedure} -constraints testImageType -setup { image create test foo } -body { @@ -129,7 +129,7 @@ test canvImg-3.4 {ImageCoords procedure} -constraints testImageType -setup { } -cleanup { .c delete all image delete foo -} -returnCodes {error} -result {wrong # coordinates: expected 2, got 1} +} -returnCodes error -result {wrong # coordinates: expected 2, got 1} test canvImg-3.5 {ImageCoords procedure} -constraints testImageType -setup { image create test foo } -body { @@ -139,7 +139,7 @@ test canvImg-3.5 {ImageCoords procedure} -constraints testImageType -setup { } -cleanup { .c delete all image delete foo -} -returnCodes {error} -result {wrong # coordinates: expected 0 or 2, got 3} +} -returnCodes error -result {wrong # coordinates: expected 0 or 2, got 3} test canvImg-4.1 {ConfiugreImage procedure} -constraints testImageType -setup { @@ -195,7 +195,7 @@ test canvImg-4.3 {ConfiugreImage procedure} -constraints testImageType -setup { } -cleanup { .c delete all image delete foo foo2 -} -returnCodes {error} -result {image "lousy" doesn't exist} +} -returnCodes error -result {image "lousy" does not exist} test canvImg-5.1 {DeleteImage procedure} -constraints testImageType -setup { diff --git a/tests/canvPsImg.tcl b/tests/canvPsImg.tcl index 1f46eca..273ca7d 100644 --- a/tests/canvPsImg.tcl +++ b/tests/canvPsImg.tcl @@ -53,9 +53,9 @@ foreach v [winfo visualsavailable .] { # The hack below is necessary for some systems, which have more than one # visual of the same type... if {![winfo exists .t.$v]} { - radiobutton .t.$v -text $v -variable visual -value $v \ + radiobutton .t.$v -text $v -variable visual -value $v \ -command BuildTestImage - pack .t.$v -in .t.top.l -anchor w + pack .t.$v -in .t.top.l -anchor w } } diff --git a/tests/canvText.test b/tests/canvText.test index d685c45..5b08df7 100644 --- a/tests/canvText.test +++ b/tests/canvText.test @@ -11,6 +11,8 @@ namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }] + # Canvas used in 1.* - 17.* tests canvas .c -width 400 -height 300 -bd 2 -relief sunken pack .c @@ -24,7 +26,7 @@ test canvText-1.1 {configuration options: good value for "anchor"} -body { } -result {nw nw} test canvasText-1.2 {configuration options: bad value for "anchor"} -body { .c itemconfigure test -anchor xyz -} -returnCodes error -result {bad anchor position "xyz": must be n, ne, e, se, s, sw, w, nw, or center} +} -returnCodes error -result {bad anchor "xyz": must be n, ne, e, se, s, sw, w, nw, or center} test canvText-1.3 {configuration options: good value for "fill"} -body { .c itemconfigure test -fill #ff0000 list [lindex [.c itemconfigure test -fill] 4] [.c itemcget test -fill] @@ -42,7 +44,7 @@ test canvText-1.6 {configuration options: good value for "font"} -body { } -result {{Times 40} {Times 40}} test canvasText-1.7 {configuration options: bad value for "font"} -body { .c itemconfigure test -font {} -} -returnCodes error -result {font "" doesn't exist} +} -returnCodes error -result {font "" does not exist} test canvText-1.8 {configuration options: good value for "justify"} -body { .c itemconfigure test -justify left list [lindex [.c itemconfigure test -justify] 4] [.c itemcget test -justify] @@ -95,22 +97,22 @@ test canvasText-1.19 {configuration options: bounding of "angle"} -body { test canvText-2.1 {CreateText procedure: args} -body { .c create text -} -returnCodes {error} -result {wrong # args: should be ".c create text coords ?arg ...?"} +} -returnCodes error -result {wrong # args: should be ".c create text coords ?arg ...?"} test canvText-2.2 {CreateText procedure: args} -body { .c create text xyz 0 } -cleanup { .c delete all -} -returnCodes {error} -result {expected screen distance but got "xyz"} +} -returnCodes error -result {expected screen distance but got "xyz"} test canvText-2.3 {CreateText procedure: args} -body { .c create text 0 xyz } -cleanup { .c delete all -} -returnCodes {error} -result {expected screen distance but got "xyz"} +} -returnCodes error -result {expected screen distance but got "xyz"} test canvText-2.4 {CreateText procedure: args} -body { .c create text 0 0 -xyz xyz } -cleanup { .c delete all -} -returnCodes {error} -result {unknown option "-xyz"} +} -returnCodes error -result {unknown option "-xyz"} test canvText-2.5 {CreateText procedure} -body { .c create text 0 0 -tags x .c coords x @@ -133,14 +135,14 @@ test canvText-3.2 {TextCoords procedure} -setup { .c coords test xyz 0 } -cleanup { .c delete test -} -returnCodes {error} -result {expected screen distance but got "xyz"} +} -returnCodes error -result {expected screen distance but got "xyz"} test canvText-3.3 {TextCoords procedure} -setup { .c create text 20 20 -tag test } -body { .c coords test 0 xyz } -cleanup { .c delete test -} -returnCodes {error} -result {expected screen distance but got "xyz"} +} -returnCodes error -result {expected screen distance but got "xyz"} test canvText-3.4 {TextCoords procedure} -setup { .c create text 20 20 -tag test } -body { @@ -159,14 +161,14 @@ test canvText-3.5 {TextCoords procedure} -setup { .c coords test 10 } -cleanup { .c delete test -} -returnCodes {error} -result {wrong # coordinates: expected 2, got 1} +} -returnCodes error -result {wrong # coordinates: expected 2, got 1} test canvText-3.6 {TextCoords procedure} -setup { .c create text 20 20 -tag test } -body { .c coords test 10 10 10 } -cleanup { .c delete test -} -returnCodes {error} -result {wrong # coordinates: expected 0 or 2, got 3} +} -returnCodes error -result {wrong # coordinates: expected 0 or 2, got 3} test canvText-4.1 {ConfigureText procedure} -setup { @@ -175,7 +177,7 @@ test canvText-4.1 {ConfigureText procedure} -setup { .c itemconfig test -fill xyz } -cleanup { .c delete test -} -returnCodes {error} -result {unknown color name "xyz"} +} -returnCodes error -result {unknown color name "xyz"} test canvText-4.2 {ConfigureText procedure} -setup { .c create text 20 20 -tag test } -body { @@ -260,7 +262,7 @@ test canvText-5.1 {ConfigureText procedure: adjust cursor} -body { } -result {} -test canvText-6.1 {ComputeTextBbox procedure} -constraints fonts -setup { +test canvText-6.1 {ComputeTextBbox procedure} -constraints {fonts failsOnXQuarz} -setup { .c delete test } -body { set font "-adobe-times-medium-r-normal--*-200-*-*-*-*-*-*" @@ -312,7 +314,7 @@ test canvText-6.4 {ComputeTextBbox procedure} -constraints fonts -setup { } -cleanup { .c delete test } -result 1 -test canvText-6.5 {ComputeTextBbox procedure} -constraints fonts -setup { +test canvText-6.5 {ComputeTextBbox procedure} -constraints {fonts failsOnXQuarz} -setup { .c delete test } -body { set font "-adobe-times-medium-r-normal--*-200-*-*-*-*-*-*" @@ -364,7 +366,7 @@ test canvText-6.8 {ComputeTextBbox procedure} -constraints fonts -setup { } -cleanup { .c delete test } -result 1 -test canvText-6.9 {ComputeTextBbox procedure} -constraints fonts -setup { +test canvText-6.9 {ComputeTextBbox procedure} -constraints {fonts failsOnXQuarz} -setup { .c delete test } -body { set font "-adobe-times-medium-r-normal--*-200-*-*-*-*-*-*" @@ -636,7 +638,7 @@ test canvText-9.8 {TextInsert procedure: selectFirst > selectLast: deselect} -bo .c select to test 8 .c dchars test 3 10 .c index test sel.first -} -returnCodes {error} -result {selection isn't in item} +} -returnCodes error -result {selection isn't in item} test canvText-9.9 {TextInsert procedure: selectFirst <= selectLast} -body { .c itemconfig test -text "abcdefghijk" .c select from test 4 @@ -766,7 +768,7 @@ test canvText-14.2 {GetTextIndex procedure: select error} -setup { .c index test sel.first } -cleanup { .c delete test -} -returnCodes {error} -result {selection isn't in item} +} -returnCodes error -result {selection isn't in item} test canvText-14.3 {GetTextIndex procedure: select error} -setup { .c create text 0 0 -tag test focus .c @@ -776,7 +778,7 @@ test canvText-14.3 {GetTextIndex procedure: select error} -setup { .c index test sel.last } -cleanup { .c delete test -} -returnCodes {error} -result {selection isn't in item} +} -returnCodes error -result {selection isn't in item} test canvText-14.4 {GetTextIndex procedure: select error} -setup { .c create text 0 0 -tag test focus .c @@ -786,7 +788,7 @@ test canvText-14.4 {GetTextIndex procedure: select error} -setup { .c index test sel. } -cleanup { .c delete test -} -returnCodes {error} -result {bad index "sel."} +} -returnCodes error -result {bad index "sel."} test canvText-14.5 {GetTextIndex procedure: bad int or unknown index} -setup { .c create text 0 0 -tag test focus .c @@ -795,7 +797,7 @@ test canvText-14.5 {GetTextIndex procedure: bad int or unknown index} -setup { .c index test xyz } -cleanup { .c delete test -} -returnCodes {error} -result {bad index "xyz"} +} -returnCodes error -result {bad index "xyz"} test canvText-14.6 {select clear errors} -setup { .c create text 0 0 -tag test } -body { @@ -906,20 +908,20 @@ test canvText-19.1 {patch 1006286, leading space caused wrap under Win32} -setup set s1 { Yeah-ah-ah-ah-oh-oh-oh-oh-oh-oh-oh-oh-oh-oh-oh-oh-oh-oh-oh-oh-Yow} set s2 { Yeah ah ah ah oh oh oh oh oh oh oh oh oh oh oh oh oh oh oh oh Yow} $c create text 21 18 \ - -font $f \ - -text $s1 \ - -fill white \ - -width 922 \ - -anchor nw \ - -tags tbox1 + -font $f \ + -text $s1 \ + -fill white \ + -width 922 \ + -anchor nw \ + -tags tbox1 $c create rect {*}[$c bbox tbox1] -outline red $c create text 21 160 \ - -font $f \ - -text $s2 \ - -fill white \ - -width 922 \ - -anchor nw \ - -tags tbox2 + -font $f \ + -text $s2 \ + -fill white \ + -width 922 \ + -anchor nw \ + -tags tbox2 $c create rect {*}[$c bbox tbox2] -outline red after 500 "set done 1" ; vwait done set results [list] @@ -931,7 +933,7 @@ test canvText-19.1 {patch 1006286, leading space caused wrap under Win32} -setup lappend results [selection get] array set metrics [font metrics $f] set x [expr {21 + [font measure $f " "] \ - + ([font measure {Arial 28 bold} "Y"] / 2)}] + + ([font measure {Arial 28 bold} "Y"] / 2)}] set y1 [expr {18 + ($metrics(-linespace) / 2)}] set y2 [expr {160 + ($metrics(-linespace) / 2)}] lappend results [$c index tbox1 @$x,$y1] @@ -948,10 +950,10 @@ test canvText-20.1 {angled text bounding box} -setup { list $b $a $d $c } proc almosteq {b1 b2} { - # check whether the two boxes are equal, with 1 unit tolerance on each x y w h - lassign $b1 a b c d - lassign $b2 e f g h - expr {($e-$a)<=1 && ($f-$b)<=1 && ($g-$c)<=1 && ($h-$d)<=1} + # check whether the two boxes are equal, with 1 unit tolerance on each x y w h + lassign $b1 a b c d + lassign $b2 e f g h + expr {($e-$a)<=1 && ($f-$b)<=1 && ($g-$c)<=1 && ($h-$d)<=1} } } -body { .c create text 2 2 -tag t -anchor center -text 0 -font {TkDefaultFont 24} diff --git a/tests/canvas.test b/tests/canvas.test index c06e0d2..b0e1379 100644 --- a/tests/canvas.test +++ b/tests/canvas.test @@ -44,7 +44,7 @@ test canvas-1.6 {configuration options: bad value for "bd"} -body { test canvas-1.7 {configuration options: good value for "borderwidth"} -body { .c configure -borderwidth 1.3 .c cget -borderwidth -} -result 1 +} -result 1.3 test canvas-1.8 {configuration options: bad value for "borderwidth"} -body { .c configure -borderwidth badValue } -returnCodes error -result {expected screen distance but got "badValue"} @@ -72,7 +72,7 @@ test canvas-1.14 {configuration options: bad value for "cursor"} -body { test canvas-1.15 {configuration options: good value for "height"} -body { .c configure -height 2.1 .c cget -height -} -result 2 +} -result 2.1 test canvas-1.16 {configuration options: bad value for "height"} -body { .c configure -height x42 } -returnCodes error -result {expected screen distance but got "x42"} @@ -107,7 +107,7 @@ test canvas-1.24 {configuration options: bad value for "insertbackground"} -body test canvas-1.25 {configuration options: good value for "insertborderwidth"} -body { .c configure -insertborderwidth 1.3 .c cget -insertborderwidth -} -result 1 +} -result 1.3 test canvas-1.26 {configuration options: bad value for "insertborderwidth"} -body { .c configure -insertborderwidth 2.6x } -returnCodes error -result {expected screen distance but got "2.6x"} @@ -128,7 +128,7 @@ test canvas-1.30 {configuration options: bad value for "insertontime"} -body { test canvas-1.31 {configuration options: good value for "insertwidth"} -body { .c configure -insertwidth 1.3 .c cget -insertwidth -} -result 1 +} -result 1.3 test canvas-1.32 {configuration options: bad value for "insertwidth"} -body { .c configure -insertwidth 6x } -returnCodes error -result {expected screen distance but got "6x"} @@ -138,7 +138,7 @@ test canvas-1.33 {configuration options: good value for "relief"} -body { } -result {groove} test canvas-1.34 {configuration options: bad value for "relief"} -body { .c configure -relief r -} -returnCodes error -result {bad relief "r": must be flat, groove, raised, ridge, solid, or sunken} +} -returnCodes error -result {ambiguous relief "r": must be flat, groove, raised, ridge, solid, or sunken} test canvas-1.35 {configuration options: good value for "selectbackground"} -body { .c configure -selectbackground #110022 .c cget -selectbackground @@ -149,7 +149,7 @@ test canvas-1.36 {configuration options: bad value for "selectbackground"} -body test canvas-1.37 {configuration options: good value for "selectborderwidth"} -body { .c configure -selectborderwidth 1.3 .c cget -selectborderwidth -} -result 1 +} -result 1.3 test canvas-1.38 {configuration options: bad value for "selectborderwidth"} -body { .c configure -selectborderwidth badValue } -returnCodes error -result {expected screen distance but got "badValue"} @@ -558,6 +558,13 @@ test canvas-11.3 {canvas poly dchars, bug 3291543} { .c dchars 1 2 end .c coords 1 } {} +test canvas-11.4 {canvas line dchars crash with -arrows, bug 51ece3786f} { + # This would crash + destroy .c + canvas .c + .c create line 10 10 100 100 -arrow last + .c dchars 1 0 1 +} {} test canvas-12.1 {canvas mm obj, patch SF-403327, 102471} -setup { destroy .c @@ -997,7 +1004,7 @@ test canvas-20.1 {addtag/dtag - no shuffling of tag sequence} -setup { .c create text 100 100 -text Hello } -body { for {set i 1} {$i < 5} {incr i} { - .c addtag tag$i all + .c addtag tag$i all } # [.c addtags] only adds tags that are not already present .c addtag tag1 all ; # no effect @@ -1221,12 +1228,12 @@ test canvas-22.9 {canvas rotate: window item rotation behaviour} -setup { proc matchPixels {pixels expected} { set matched 1 foreach pline $pixels eline $expected { - foreach ppixel $pline epixel $eline { - if {$ppixel != $epixel} { - set matched 0 - break - } - } + foreach ppixel $pline epixel $eline { + if {$ppixel != $epixel} { + set matched 0 + break + } + } } return $matched } @@ -1239,16 +1246,16 @@ test canvas-23.1 {canvas image} -setup { .c create rectangle 0 0 0 9 -fill #000080 -outline #000080 .c image testimage matchPixels [testimage data] { \ - {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}} + {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}} } -cleanup { destroy .c image delete testimage @@ -1262,11 +1269,11 @@ test canvas-23.2 {canvas image with subsample} -setup { .c create rectangle 0 0 1 9 -fill #008000 -outline #008000 .c image testimage 2 matchPixels [testimage data] { \ - {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}} + {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}} } -cleanup { destroy .c image delete testimage @@ -1280,26 +1287,26 @@ test canvas-23.3 {canvas image with subsample and zoom} -setup { .c create rectangle 0 0 9 0 -fill #800000 -outline #800000 .c image testimage 1 2 matchPixels [testimage data] { \ - {#800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000} \ - {#800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ - {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}} + {#800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000} \ + {#800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \ + {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}} } -cleanup { destroy .c image delete testimage diff --git a/tests/cmds.test b/tests/cmds.test index 3ccd587..8a1ff2a 100644 --- a/tests/cmds.test +++ b/tests/cmds.test @@ -14,13 +14,13 @@ update test cmds-1.1 {tkwait visibility, argument errors} -body { tkwait visibility -} -returnCodes {error} -result {wrong # args: should be "tkwait variable|visibility|window name"} +} -returnCodes error -result {wrong # args: should be "tkwait variable|visibility|window name"} test cmds-1.2 {tkwait visibility, argument errors} -body { tkwait visibility foo bar -} -returnCodes {error} -result {wrong # args: should be "tkwait variable|visibility|window name"} +} -returnCodes error -result {wrong # args: should be "tkwait variable|visibility|window name"} test cmds-1.3 {tkwait visibility, argument errors} -body { tkwait visibility bad_window -} -returnCodes {error} -result {bad window path name "bad_window"} +} -returnCodes error -result {bad window path name "bad_window"} test cmds-1.4 {tkwait visibility, waiting for window to be mapped} -setup { button .b -text "Test" set x init @@ -39,7 +39,7 @@ test cmds-1.5 {tkwait visibility, window gets deleted} -setup { } -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" diff --git a/tests/config.test b/tests/config.test index 5621e92..6c27608 100644 --- a/tests/config.test +++ b/tests/config.test @@ -19,7 +19,7 @@ proc killTables {} { foreach t {alltypes chain3 chain2 chain1 configerror internal new notenoughparams twowindows} { while {[testobjconfig info $t] != ""} { - testobjconfig delete $t + testobjconfig delete $t } } } @@ -1289,7 +1289,7 @@ test config-8.1 {Tk_RestoreSavedOptions - restore in proper order} -constraints } -body { testobjconfig alltypes .a .a csave -color green -color black -color blue \ - -color #ffff00 -color #ff00ff -color bogus \ + -color #ffff00 -color #ff00ff -color bogus \ } -cleanup { killTables } -returnCodes error -result {unknown color name "bogus"} @@ -1766,10 +1766,10 @@ test config-14.1 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::button - ::foo::button .a - ::foo::button .b - } + namespace import -force ::button + ::foo::button .a + ::foo::button .b + } ] destroy .a .b } -result {} @@ -1777,10 +1777,10 @@ test config-14.2 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::canvas - ::foo::canvas .a - ::foo::canvas .b - } + namespace import -force ::canvas + ::foo::canvas .a + ::foo::canvas .b + } ] destroy .a .b } -result {} @@ -1788,10 +1788,10 @@ test config-14.3 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::entry - ::foo::entry .a - ::foo::entry .b - } + namespace import -force ::entry + ::foo::entry .a + ::foo::entry .b + } ] destroy .a .b } -result {} @@ -1799,10 +1799,10 @@ test config-14.4 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::frame - ::foo::frame .a - ::foo::frame .b - } + namespace import -force ::frame + ::foo::frame .a + ::foo::frame .b + } ] destroy .a .b } -result {} @@ -1810,10 +1810,10 @@ test config-14.5 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::listbox - ::foo::listbox .a - ::foo::listbox .b - } + namespace import -force ::listbox + ::foo::listbox .a + ::foo::listbox .b + } ] destroy .a .b } -result {} @@ -1821,10 +1821,10 @@ test config-14.6 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::menu - ::foo::menu .a - ::foo::menu .b - } + namespace import -force ::menu + ::foo::menu .a + ::foo::menu .b + } ] destroy .a .b } -result {} @@ -1832,10 +1832,10 @@ test config-14.7 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::menubutton - ::foo::menubutton .a - ::foo::menubutton .b - } + namespace import -force ::menubutton + ::foo::menubutton .a + ::foo::menubutton .b + } ] destroy .a .b } -result {} @@ -1843,10 +1843,10 @@ test config-14.8 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::message - ::foo::message .a - ::foo::message .b - } + namespace import -force ::message + ::foo::message .a + ::foo::message .b + } ] destroy .a .b } -result {} @@ -1854,10 +1854,10 @@ test config-14.9 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::scale - ::foo::scale .a - ::foo::scale .b - } + namespace import -force ::scale + ::foo::scale .a + ::foo::scale .b + } ] destroy .a .b } -result {} @@ -1865,10 +1865,10 @@ test config-14.10 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::scrollbar - ::foo::scrollbar .a - ::foo::scrollbar .b - } + namespace import -force ::scrollbar + ::foo::scrollbar .a + ::foo::scrollbar .b + } ] destroy .a .b } -result {} @@ -1876,10 +1876,10 @@ test config-14.11 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::spinbox - ::foo::spinbox .a - ::foo::spinbox .b - } + namespace import -force ::spinbox + ::foo::spinbox .a + ::foo::spinbox .b + } ] destroy .a .b } -result {} @@ -1887,10 +1887,10 @@ test config-14.12 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::text - ::foo::text .a - ::foo::text .b - } + namespace import -force ::text + ::foo::text .a + ::foo::text .b + } ] destroy .a .b } -result {} @@ -1898,10 +1898,10 @@ test config-14.13 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::radiobutton - ::foo::radiobutton .a - ::foo::radiobutton .b - } + namespace import -force ::radiobutton + ::foo::radiobutton .a + ::foo::radiobutton .b + } ] destroy .a .b } -result {} @@ -1909,10 +1909,10 @@ test config-14.14 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * } -body { namespace eval ::foo [subst { - namespace import -force ::checkbutton - ::foo::checkbutton .a - ::foo::checkbutton .b - } + namespace import -force ::checkbutton + ::foo::checkbutton .a + ::foo::checkbutton .b + } ] destroy .a .b } -result {} diff --git a/tests/constraints.tcl b/tests/constraints.tcl index 8cc1a18..8e61610 100644 --- a/tests/constraints.tcl +++ b/tests/constraints.tcl @@ -132,51 +132,51 @@ namespace eval tk { namespace export fixfocus proc fixfocus {} { - catch {destroy .focus} - toplevel .focus - wm geometry .focus +0+0 - entry .focus.e - .focus.e insert 0 "fixfocus" - pack .focus.e - update - focus -force .focus.e - destroy .focus + catch {destroy .focus} + toplevel .focus + wm geometry .focus +0+0 + entry .focus.e + .focus.e insert 0 "fixfocus" + pack .focus.e + update + focus -force .focus.e + destroy .focus } - namespace export imageInit imageFinish imageCleanup imageNames - variable ImageNames - proc imageInit {} { - variable ImageNames - if {![info exists ImageNames]} { - set ImageNames [lsearch -all -inline -glob -not [lsort [image names]] ::tk::icons::indicator*] - } - imageCleanup - if {[lsort [image names]] ne $ImageNames} { - return -code error "IMAGE NAMES mismatch: [image names] != $ImageNames" - } - } - proc imageFinish {} { - variable ImageNames + namespace export imageInit imageFinish imageCleanup imageNames + variable ImageNames + proc imageInit {} { + variable ImageNames + if {![info exists ImageNames]} { + set ImageNames [lsearch -all -inline -glob -not [lsort [image names]] ::tk::icons::indicator*] + } + imageCleanup + if {[lsort [image names]] ne $ImageNames} { + return -code error "IMAGE NAMES mismatch: [image names] != $ImageNames" + } + } + proc imageFinish {} { + variable ImageNames set imgs [lsearch -all -inline -glob -not [lsort [image names]] ::tk::icons::indicator*] - if {$imgs ne $ImageNames} { - return -code error "images remaining: [image names] != $ImageNames" - } - imageCleanup - } - proc imageCleanup {} { - variable ImageNames - foreach img [image names] { - if {$img ni $ImageNames} {image delete $img} - } - } - proc imageNames {} { - variable ImageNames - set r {} - foreach img [image names] { - if {$img ni $ImageNames} {lappend r $img} - } - return $r - } + if {$imgs ne $ImageNames} { + return -code error "images remaining: [image names] != $ImageNames" + } + imageCleanup + } + proc imageCleanup {} { + variable ImageNames + foreach img [image names] { + if {$img ni $ImageNames} {image delete $img} + } + } + proc imageNames {} { + variable ImageNames + set r {} + foreach img [image names] { + if {$img ni $ImageNames} {lappend r $img} + } + return $r + } # # CONTROL TIMING ASPECTS OF POINTER WARPING @@ -368,8 +368,8 @@ testConstraint secureserver 0 if {[llength [info commands send]]} { testConstraint secureserver 1 if {[catch {send $app set a 0} msg] == 1} { - if {[string match "X server insecure *" $msg]} { - testConstraint secureserver 0 + if {[string match "X server insecure *" $msg]} { + testConstraint secureserver 0 } } } diff --git a/tests/dialog.test b/tests/dialog.test index 692d928..a7c1ac9 100644 --- a/tests/dialog.test +++ b/tests/dialog.test @@ -21,12 +21,12 @@ test dialog-1.3 {tk_dialog command} -body { test dialog-2.1 {tk_dialog operation} -setup { proc PressButton {btn} { - if {![winfo ismapped $btn]} { - update - } - event generate $btn <Enter> - event generate $btn <Button-1> -x 5 -y 5 - event generate $btn <ButtonRelease-1> -x 5 -y 5 + if {![winfo ismapped $btn]} { + update + } + event generate $btn <Enter> + event generate $btn <Button-1> -x 5 -y 5 + event generate $btn <ButtonRelease-1> -x 5 -y 5 } } -body { set x [after 5000 [list set tk::Priv(button) "no response"]] @@ -39,9 +39,9 @@ test dialog-2.1 {tk_dialog operation} -setup { } -result 0 test dialog-2.2 {tk_dialog operation} -setup { proc HitReturn {w} { - event generate $w <Enter> - focus -force $w - event generate $w <Key> -keysym Return + event generate $w <Enter> + focus -force $w + event generate $w <Key> -keysym Return } } -body { set x [after 5000 [list set tk::Priv(button) "no response"]] diff --git a/tests/entry.test b/tests/entry.test index 1454104..82259b1 100644 --- a/tests/entry.test +++ b/tests/entry.test @@ -14,28 +14,28 @@ tcltest::loadTestedCommands # For xscrollcommand set scrollInfo {} proc scroll args { - global scrollInfo - set scrollInfo $args + global scrollInfo + set scrollInfo $args } # For trace add variable proc override args { - global x - set x 12345 + global x + set x 12345 } # Procedures used in widget VALIDATION tests proc doval {W d i P s S v V} { - set ::vVals [list $W $d $i $P $s $S $v $V] - return 1 + set ::vVals [list $W $d $i $P $s $S $v $V] + return 1 } proc doval2 {W d i P s S v V} { - set ::vVals [list $W $d $i $P $s $S $v $V] - set ::e mydata - return 1 + set ::vVals [list $W $d $i $P $s $S $v $V] + set ::e mydata + return 1 } proc doval3 {W d i P s S v V} { - set ::vVals [list $W $d $i $P $s $S $v $V] - return 0 + set ::vVals [list $W $d $i $P $s $S $v $V] + return 0 } set cy [font metrics {Courier -12} -linespace] @@ -59,7 +59,7 @@ test entry-1.2 {configuration option: "background" for entry} -setup { .e configure -background non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test entry-1.3 {configuration option: "bd" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -79,7 +79,7 @@ test entry-1.4 {configuration option: "bd" for entry} -setup { .e configure -bd badValue } -cleanup { destroy .e -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test entry-1.5 {configuration option: "bg" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -99,7 +99,7 @@ test entry-1.6 {configuration option: "bg" for entry} -setup { .e configure -bg non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test entry-1.7 {configuration option: "borderwidth" for entry} -setup { entry .e -highlightthickness 2 -font {Helvetica -12 bold} @@ -110,7 +110,7 @@ test entry-1.7 {configuration option: "borderwidth" for entry} -setup { .e cget -borderwidth } -cleanup { destroy .e -} -result 1 +} -result 1.3 test entry-1.8 {configuration option: "borderwidth" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e ; update idletasks @@ -119,7 +119,7 @@ test entry-1.8 {configuration option: "borderwidth" for entry} -setup { .e configure -borderwidth badValue } -cleanup { destroy .e -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test entry-1.9 {configuration option: "cursor" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -139,7 +139,7 @@ test entry-1.10 {configuration option: "cursor" for entry} -setup { .e configure -cursor badValue } -cleanup { destroy .e -} -returnCodes {error} -result {bad cursor spec "badValue"} +} -returnCodes error -result {bad cursor spec "badValue"} test entry-1.11 {configuration option: "disabledbackground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -159,7 +159,7 @@ test entry-1.12 {configuration option: "disabledbackground" for entry} -setup { .e configure -disabledbackground non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test entry-1.13 {configuration option: "disabledforeground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -179,7 +179,7 @@ test entry-1.14 {configuration option: "disabledforeground" for entry} -setup { .e configure -disabledforeground non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test entry-1.15 {configuration option: "exportselection" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -199,7 +199,7 @@ test entry-1.16 {configuration option: "exportselection" for entry} -setup { .e configure -exportselection xyzzy } -cleanup { destroy .e -} -returnCodes {error} -result {expected boolean value but got "xyzzy"} +} -returnCodes error -result {expected boolean value but got "xyzzy"} test entry-1.17 {configuration option: "fg" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -219,7 +219,7 @@ test entry-1.18 {configuration option: "fg" for entry} -setup { .e configure -fg non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test entry-1.19 {configuration option: "font" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 @@ -239,7 +239,7 @@ test entry-1.20 {configuration option: "font" for entry} -setup { .e configure -font {} } -cleanup { destroy .e -} -returnCodes {error} -result {font "" doesn't exist} +} -returnCodes error -result {font "" does not exist} test entry-1.21 {configuration option: "foreground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -259,7 +259,7 @@ test entry-1.22 {configuration option: "foreground" for entry} -setup { .e configure -foreground non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test entry-1.23 {configuration option: "highlightbackground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -279,7 +279,7 @@ test entry-1.24 {configuration option: "highlightbackground" for entry} -setup { .e configure -highlightbackground non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test entry-1.25 {configuration option: "highlightcolor" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -299,7 +299,7 @@ test entry-1.26 {configuration option: "highlightcolor" for entry} -setup { .e configure -highlightcolor non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test entry-1.27 {configuration option: "highlightthickness" for entry} -setup { entry .e -borderwidth 2 -font {Helvetica -12 bold} @@ -329,7 +329,7 @@ test entry-1.29 {configuration option: "highlightthickness" for entry} -setup { .e configure -highlightthickness badValue } -cleanup { destroy .e -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test entry-1.30 {configuration option: "insertbackground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -349,7 +349,7 @@ test entry-1.31 {configuration option: "insertbackground" for entry} -setup { .e configure -insertbackground non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test entry-1.32 {configuration option: "insertborderwidth" for entry} -setup { entry .e -borderwidth 2 -insertwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -360,7 +360,7 @@ test entry-1.32 {configuration option: "insertborderwidth" for entry} -setup { .e cget -insertborderwidth } -cleanup { destroy .e -} -result 1 +} -result 1.3 test entry-1.33 {configuration option: "insertborderwidth" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e ; update idletasks @@ -369,7 +369,7 @@ test entry-1.33 {configuration option: "insertborderwidth" for entry} -setup { .e configure -insertborderwidth 2.6x } -cleanup { destroy .e -} -returnCodes {error} -result {expected screen distance but got "2.6x"} +} -returnCodes error -result {expected screen distance but got "2.6x"} test entry-1.34 {configuration option: "insertofftime" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -389,7 +389,7 @@ test entry-1.35 {configuration option: "insertofftime" for entry} -setup { .e configure -insertofftime 3.2 } -cleanup { destroy .e -} -returnCodes {error} -result {expected integer but got "3.2"} +} -returnCodes error -result {expected integer but got "3.2"} test entry-1.36 {configuration option: "insertontime" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -409,7 +409,7 @@ test entry-1.37 {configuration option: "insertontime" for entry} -setup { .e configure -insertontime 3.2 } -cleanup { destroy .e -} -returnCodes {error} -result {expected integer but got "3.2"} +} -returnCodes error -result {expected integer but got "3.2"} test entry-1.38 {configuration option: "invalidcommand" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -451,7 +451,7 @@ test entry-1.41 {configuration option: "justify" for entry} -setup { .e configure -justify bogus } -cleanup { destroy .e -} -returnCodes {error} -result {bad justification "bogus": must be left, right, or center} +} -returnCodes error -result {bad justification "bogus": must be left, right, or center} test entry-1.42 {configuration option: "readonlybackground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -471,7 +471,7 @@ test entry-1.43 {configuration option: "readonlybackground" for entry} -setup { .e configure -readonlybackground non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test entry-1.44 {configuration option: "relief" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -502,7 +502,7 @@ test entry-1.46 {configuration option: "selectbackground" for entry} -setup { .e configure -selectbackground non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test entry-1.47 {configuration option: "selectborderwidth" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -513,7 +513,7 @@ test entry-1.47 {configuration option: "selectborderwidth" for entry} -setup { .e cget -selectborderwidth } -cleanup { destroy .e -} -result 1 +} -result 1.3 test entry-1.48 {configuration option: "selectborderwidth" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e ; update idletasks @@ -522,7 +522,7 @@ test entry-1.48 {configuration option: "selectborderwidth" for entry} -setup { .e configure -selectborderwidth badValue } -cleanup { destroy .e -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test entry-1.49 {configuration option: "selectforeground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -542,7 +542,7 @@ test entry-1.50 {configuration option: "selectforeground" for entry} -setup { .e configure -selectforeground non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test entry-1.51 {configuration option: "show" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -573,7 +573,7 @@ test entry-1.53 {configuration option: "state" for entry} -setup { .e configure -state bogus } -cleanup { destroy .e -} -returnCodes {error} -result {bad state "bogus": must be disabled, normal, or readonly} +} -returnCodes error -result {bad state "bogus": must be disabled, normal, or readonly} test entry-1.54 {configuration option: "takefocus" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -615,7 +615,7 @@ test entry-1.57 {configuration option: "width" for entry} -setup { .e configure -width 3p } -cleanup { destroy .e -} -returnCodes {error} -result {expected integer but got "3p"} +} -returnCodes error -result {expected integer but got "3p"} test entry-1.58 {configuration option: "xscrollcommand" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -1761,7 +1761,7 @@ test entry-6.1 {EntryComputeGeometry procedure} -constraints { pack .e ; update idletasks } -body { .e configure -font {Courier -12} -bd 2 -relief raised -width 20 \ - -highlightthickness 3 + -highlightthickness 3 .e insert end 012\t45 update list [.e index @61] [.e index @62] @@ -1775,7 +1775,7 @@ test entry-6.2 {EntryComputeGeometry procedure} -constraints { pack .e ; update idletasks } -body { .e configure -font {Courier -12} -bd 2 -relief raised -width 20 \ - -justify center -highlightthickness 3 + -justify center -highlightthickness 3 .e insert end 012\t45 update list [.e index @96] [.e index @97] @@ -1789,7 +1789,7 @@ test entry-6.3 {EntryComputeGeometry procedure} -constraints { pack .e ; update idletasks } -body { .e configure -font {Courier -12} -bd 2 -relief raised -width 20 \ - -justify right -highlightthickness 3 + -justify right -highlightthickness 3 .e insert end 012\t45 update list [.e index @131] [.e index @132] @@ -2342,8 +2342,8 @@ test entry-8.18 {DeleteChars procedure} -setup { # note: XPAD corresponds to the hardcoded #define XPAD 1 set XPAD 1 set expected [expr { [font measure [.e cget -font] "xyy"] \ - + 2 * ( [.e cget -borderwidth] + \ - [.e cget -highlightthickness] + $XPAD ) } ] + + 2 * ( [.e cget -borderwidth] + \ + [.e cget -highlightthickness] + $XPAD ) } ] expr {[winfo reqwidth .e] == $expected} } -cleanup { destroy .e @@ -2754,7 +2754,7 @@ test entry-13.15 {GetEntryIndex procedure} -body { 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 ; update idletasks .e insert 0 012345678901234567890 .e xview 4 @@ -2765,7 +2765,7 @@ test entry-13.16 {GetEntryIndex procedure} -constraints fonts -body { } -result 4 test entry-13.17 {GetEntryIndex procedure} -constraints fonts -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ - -font {Courier -12} + -font {Courier -12} pack .e ; update idletasks .e insert 0 012345678901234567890 .e xview 4 @@ -2776,7 +2776,7 @@ test entry-13.17 {GetEntryIndex procedure} -constraints fonts -body { } -result 4 test entry-13.18 {GetEntryIndex procedure} -constraints fonts -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ - -font {Courier -12} + -font {Courier -12} pack .e ; update idletasks .e insert 0 012345678901234567890 .e xview 4 @@ -2787,7 +2787,7 @@ test entry-13.18 {GetEntryIndex procedure} -constraints fonts -body { } -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 ; update idletasks .e insert 0 012345678901234567890 .e xview 4 @@ -2798,7 +2798,7 @@ test entry-13.19 {GetEntryIndex procedure} -constraints fonts -body { } -result 8 test entry-13.20 {GetEntryIndex procedure} -constraints fonts -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ - -font {Courier -12} + -font {Courier -12} pack .e ; update idletasks .e insert 0 012345678901234567890 .e xview 4 @@ -2809,7 +2809,7 @@ test entry-13.20 {GetEntryIndex procedure} -constraints fonts -body { } -result 9 test entry-13.21 {GetEntryIndex procedure} -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ - -font {Courier -12} + -font {Courier -12} pack .e ; update idletasks .e insert 0 012345678901234567890 .e xview 4 @@ -2829,7 +2829,7 @@ test entry-13.22 {GetEntryIndex procedure} -setup { } -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 ; update idletasks .e insert 0 012345678901234567890 .e xview 4 @@ -2840,7 +2840,7 @@ test entry-13.23 {GetEntryIndex procedure} -body { } -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 ; update idletasks .e insert 0 012345678901234567890 .e xview 4 @@ -2851,7 +2851,7 @@ test entry-13.24 {GetEntryIndex procedure} -body { } -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 ; update idletasks .e insert 0 012345678901234567890 .e xview 4 @@ -2896,7 +2896,7 @@ test entry-14.2 {EntryFetchSelection procedure} -body { 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" + append x "This is line $i, out of 500\n" } } -body { entry .e @@ -3045,10 +3045,10 @@ test entry-19.1 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert 0 a set ::vVals @@ -3060,10 +3060,10 @@ test entry-19.2 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert 0 a ;# previous settings .e insert 1 b @@ -3076,10 +3076,10 @@ test entry-19.3 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert 0 ab ;# previous settings .e insert end c @@ -3092,10 +3092,10 @@ test entry-19.4 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert 0 abc ;# previous settings .e insert 1 123 @@ -3108,10 +3108,10 @@ test entry-19.5 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert 0 a123bc ;# previous settings .e delete 2 @@ -3124,10 +3124,10 @@ test entry-19.6 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert 0 a13bc ;# previous settings .e configure -validate key @@ -3141,10 +3141,10 @@ test entry-19.7 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate focus \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert end abc ;# previous settings set ::vVals {} @@ -3158,10 +3158,10 @@ test entry-19.8 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e configure -validate focus ;# previous settings .e insert end abcd ;# previous settings @@ -3177,10 +3177,10 @@ test entry-19.9 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate focus \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert end abcd ;# previous settings focus -force .e ;# previous settings @@ -3198,10 +3198,10 @@ test entry-19.10 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert end abcd ;# previous settings focus -force .e @@ -3216,10 +3216,10 @@ test entry-19.11 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert end abcd ;# previous settings focus -force .e ;# previous settings @@ -3237,10 +3237,10 @@ test entry-19.12 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate focusin \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert 0 abcd ;# previous settings focus -force .e @@ -3255,10 +3255,10 @@ test entry-19.13 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate focusin \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert end abcd ;# previous settings set ::vVals {} @@ -3274,10 +3274,10 @@ test entry-19.14 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate focuso \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert end abcd ;# previous settings set ::vVals {} ;# previous settings @@ -3293,10 +3293,10 @@ test entry-19.15 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate focuso \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert end abcd ;# previous settings set ::vVals {} ;# previous settings @@ -3316,10 +3316,10 @@ test entry-19.16 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate focuso \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert end abcd ;# previous settings set ::vVals {} ;# previous settings @@ -3339,10 +3339,10 @@ test entry-19.17 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate focuso \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks .e insert end abcd ;# previous settings set ::e newdata @@ -3357,10 +3357,10 @@ test entry-19.18 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate all \ - -validatecommand [list doval3 %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval3 %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks set ::e newdata ;# previous settings .e configure -validate all @@ -3377,10 +3377,10 @@ test entry-19.19 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate all \ - -validatecommand [list doval3 %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval3 %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks set ::e nextdata ;# previous settings @@ -3400,10 +3400,10 @@ test entry-19.20 {entry widget validation} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e ; update idletasks set ::e nextdata ;# previous settings .e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V] ;# prev @@ -3425,8 +3425,8 @@ test entry-19.21 {entry widget validation - bug 40e4bf6198} -setup { unset -nocomplain ::e ::vVals } -body { entry .e -validate key \ - -validatecommand [list doval2 %W %d %i %P %s %S %v %V] \ - -textvariable ::e + -validatecommand [list doval2 %W %d %i %P %s %S %v %V] \ + -textvariable ::e pack .e ; update idletasks set ::e origdata .e insert 0 A @@ -3576,7 +3576,7 @@ test entry-25.1 {Bug [5d991b822e]} { set var INIT entry .b -textvariable var trace add variable var unset {apply {args { - .b configure -textvariable {} + .b configure -textvariable {} }}} pack .b bind .b <Configure> {unset var} @@ -3589,7 +3589,7 @@ test entry-25.2 {Bug [5d991b822e]} { set var INIT entry .b -textvariable var trace add variable var unset {apply {args { - .b configure -textvariable new + .b configure -textvariable new }}} pack .b bind .b <Configure> {unset -nocomplain var} diff --git a/tests/event.test b/tests/event.test index c56d4d8..3cef258 100644 --- a/tests/event.test +++ b/tests/event.test @@ -51,17 +51,17 @@ proc _keypress_lookup {char} { global keypress_lookup if {! [info exists keypress_lookup]} { - _init_keypress_lookup + _init_keypress_lookup } if {$char == ""} { - error "empty char" + error "empty char" } if {[info exists keypress_lookup($char)]} { - return $keypress_lookup($char) + return $keypress_lookup($char) } else { - return $char + return $char } } @@ -76,12 +76,12 @@ proc _keypress {win key} { # the focus if the mouse is moved around. if {[focus] != $win} { - focus -force $win + focus -force $win } event generate $win <Key-$keysym> _pause 50 if {[focus] != $win} { - focus -force $win + focus -force $win } event generate $win <KeyRelease-$keysym> _pause 50 @@ -91,7 +91,7 @@ proc _keypress {win key} { proc _keypress_string {win string} { foreach letter [split $string ""] { - _keypress $win $letter + _keypress $win $letter } } @@ -101,7 +101,7 @@ proc _pause {{msecs 1000}} { global _pause if {! [info exists _pause(number)]} { - set _pause(number) 0 + set _pause(number) 0 } set num [incr _pause(number)] @@ -117,7 +117,7 @@ proc _pause {{msecs 1000}} { proc _text_ind_to_x_y {text ind} { set bbox [$text bbox $ind] if {[llength $bbox] != 4} { - error "got bbox \{$bbox\} from $text, index $ind" + error "got bbox \{$bbox\} from $text, index $ind" } foreach {x1 y1 width height} $bbox break set middle_y [expr {$y1 + ($height / 2)}] @@ -128,10 +128,10 @@ proc _text_ind_to_x_y {text ind} { proc _get_selection {widget} { if {[string compare $widget [selection own]] != 0} { - return "" + return "" } if {[catch {selection get} sel]} { - return "" + return "" } return $sel } @@ -209,7 +209,7 @@ test event-2.2(keypress) {type into entry widget and then delete some text} -set deleteWindows } -result {MEL} test event-2.3(keypress) {type into entry widget, triple click, hit Delete key, - and then type some more} -setup { + and then type some more} -setup { deleteWindows } -body { set t [toplevel .t] @@ -222,10 +222,10 @@ test event-2.3(keypress) {type into entry widget, triple click, hit Delete key, event generate $e <Enter> for {set i 0} {$i < 3} {incr i} { - _pause 100 - event generate $e <Button-1> - _pause 100 - event generate $e <ButtonRelease-1> + _pause 100 + event generate $e <Button-1> + _pause 100 + event generate $e <ButtonRelease-1> } _keypress $e Delete @@ -265,6 +265,7 @@ test event-2.5(keypress) {type into text widget and then delete some text} -setu test event-2.6(keypress) {type into text widget, triple click, hit Delete key, and then type some more} -setup { deleteWindows + update idletasks } -body { set t [toplevel .t] set e [text $t.e] @@ -276,10 +277,10 @@ test event-2.6(keypress) {type into text widget, triple click, event generate $e <Enter> for {set i 0} {$i < 3} {incr i} { - _pause 100 - event generate $e <Button-1> - _pause 100 - event generate $e <ButtonRelease-1> + _pause 100 + event generate $e <Button-1> + _pause 100 + event generate $e <ButtonRelease-1> } _keypress $e Delete @@ -318,10 +319,10 @@ test event-3.1(click-drag) {click and drag in a text widget, this tests 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]] - _pause 50 + 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]] + _pause 50 } event generate $e <ButtonRelease-1> -x $current_x -y $current_y @@ -338,10 +339,10 @@ test event-3.1(click-drag) {click and drag in a text widget, this tests event generate $e <Button-1> -x $current_x -y $current_y while {[$e compare $current >= [list $anchor - 4 char]]} { - 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]] - _pause 50 + 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]] + _pause 50 } event generate $e <ButtonRelease-1> -x $current_x -y $current_y @@ -385,10 +386,10 @@ test event-3.1(click-drag) {click and drag in a text widget, this tests 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 - _pause 50 + 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 + _pause 50 } event generate $e <ButtonRelease-1> -x $current_x -y $current_y @@ -405,10 +406,10 @@ test event-3.1(click-drag) {click and drag in a text widget, this tests event generate $e <Button-1> -x $current_x -y $current_y while {$current >= ($anchor - 4)} { - 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 -1 - _pause 50 + 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 -1 + _pause 50 } event generate $e <ButtonRelease-1> -x $current_x -y $current_y @@ -567,7 +568,7 @@ test event-4.2(double-click-drag) {click down, click up, click down again, } -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 - text widget, this should extend the selection to the new line} -setup { + text widget, this should extend the selection to the new line} -setup { deleteWindows } -body { set t [toplevel .t] @@ -624,12 +625,12 @@ test event-5.1(triple-click-drag) {Triple click and drag across lines in a } -cleanup { deleteWindows } -result [list "LINE THREE\n" "LINE TWO\nLINE THREE\n" \ - "LINE ONE\nLINE TWO\nLINE THREE\n"] + "LINE ONE\nLINE TWO\nLINE THREE\n"] test event-6.1(button-state) {button press in a window that is then - destroyed, when the mouse is moved into another window it - should not generate a <B1-motion> event since the mouse - was not pressed down in that window} -setup { + destroyed, when the mouse is moved into another window it + should not generate a <B1-motion> event since the mouse + was not pressed down in that window} -setup { deleteWindows } -body { set t [toplevel .t] @@ -781,8 +782,8 @@ test event-7.2(double-click) {A double click on a lone character } -result {4 A 4 A} test event-8 {event generate with keysyms corresponding to - multi-byte virtual keycodes - bug - e36963bfe8df9f5e528134707a91b9c0051de723} -constraints nonPortable -setup { + multi-byte virtual keycodes - bug + e36963bfe8df9f5e528134707a91b9c0051de723} -constraints nonPortable -setup { deleteWindows set res [list ] } -body { @@ -803,13 +804,13 @@ test event-8 {event generate with keysyms corresponding to # (system-independent) known keysym, unless the system # running the test does not have a keyboard with a # diaeresis key. - if {[expr {[lindex $res 3] ne "??"}]} { - # keyboard has a physical diaeresis key and bug is fixed - return "OK" + if {[lindex $res 3] ne "??"} { + # keyboard has a physical diaeresis key and bug is fixed + return "OK" } else { - return "Test failed, unless the keyboard tied to the system \ - on which this test is run does NOT have a diaeresis \ - physical key - in this case, test is actually void." + return "Test failed, unless the keyboard tied to the system \ + on which this test is run does NOT have a diaeresis \ + physical key - in this case, test is actually void." } } -cleanup { deleteWindows @@ -840,12 +841,18 @@ test event-9.1 {enter . window by destroying a toplevel - bug b1d115fa60} -setup deleteWindows bind . <Enter> $EnterBind } -result {.} -test event-9.2 {enter toplevel window by destroying a toplevel - bug b1d115fa60} -setup { + +# This test fails sporadically when run on the macOS CI runner. It does +# not seem to fail on real computers. It is not needed since the same +# thing is tested by 9.13. So it is simpler to constrain it as notAqua. +test event-9.2 {enter toplevel window by destroying a toplevel - bug b1d115fa60} \ +-constraints { notAqua} \ +-setup { set iconified false if {[winfo ismapped .]} { - wm iconify . - update - set iconified true + wm iconify . + update + set iconified true } } -body { toplevel .top1 @@ -869,12 +876,318 @@ test event-9.2 {enter toplevel window by destroying a toplevel - bug b1d115fa60} } -cleanup { deleteWindows ; # destroy all children of ".", this already includes .top1 if {$iconified} { - wm deiconify . - update + wm deiconify . + update } } -result {.top1} +proc waitForWindowEvent {w event {timeout 1000}} { +# This proc is intended to overcome latency of windowing system +# notifications when toplevel windows are involved. These latencies vary +# considerably with the window manager in use, with the system load, +# with configured scheduling priorities for processes, etc ... +# Waiting for the corresponding window events evades the trouble that is +# associated with the alternative: waiting or halting the Tk process for a +# fixed amount of time (using "after ms"). With the latter strategy it's +# always a gamble how much waiting time is enough on an end user's system. +# It also leads to long fixed waiting times in order to be on the safe side. + + variable _windowEvent + + # Use counter as a unique ID to prevent subsequent waits + # from interfering with each other. + set counter [incr _windowEvent(counter)] + set _windowEvent($counter) 1 + set savedBinding [bind $w $event] + bind $w $event [list +waitForWindowEvent.signal $counter] + set afterID [after $timeout [list set _windowEvent($counter) -1]] + vwait _windowEvent($counter) + set late [expr {$_windowEvent($counter) == -1}] + bind $w $event $savedBinding + unset _windowEvent($counter) + if {$late} { + puts stderr "wait for $event event on $w timed out (> $timeout ms)" + } else { + after cancel $afterID + } +} +proc waitForWindowEvent.signal {counter} { +# Helper proc that records the triggering of a window event. + incr ::_windowEvent($counter) +} + +proc create_and_pack_frames {{w {}}} { + frame $w.f1 -bg blue -width 200 -height 200 + pack propagate $w.f1 0 + frame $w.f1.f2 -bg yellow -width 100 -height 100 + pack $w.f1.f2 $w.f1 -side bottom -anchor se + update idletasks +} + +proc setup_win_mousepointer {w} { +# Position the window and the mouse pointer as an initial state for some tests. +# The so-called "pointer window" is the $w window that will now contain the mouse pointer. + wm geometry . +700+400; # root window out of our way - must not cover windows from event-9.1* + toplevel $w + pack propagate $w 0 + wm geometry $w 300x300+100+100 + tkwait visibility $w + update; # service remaining screen drawing events (e.g. <Expose>) + set pointerWin [winfo containing [winfo pointerx $w] [winfo pointery $w]] + event generate $w <Motion> -warp 1 -x 250 -y 250 + if {($pointerWin ne $w) && ([tk windowingsystem] ne "aqua")} { + waitForWindowEvent $w <Enter> + } else { + controlPointerWarpTiming + } +} + +test event-9.11 {pointer window container = parent} -setup { + setup_win_mousepointer .one + wm withdraw .one + create_and_pack_frames .one + wm deiconify .one + tkwait visibility .one.f1.f2 + _pause 200; # needed for Windows + update idletasks; # finish display of window + set result "|" +} -body { + bind all <Leave> {append result "<Leave> %d %W|"} + bind all <Enter> {append result "<Enter> %d %W|"} + destroy .one.f1.f2 + update + set result +} -cleanup { + bind all <Leave> {} + bind all <Enter> {} + destroy .one + unset result +} -result {|<Enter> NotifyInferior .one.f1|} + +test event-9.12 {pointer window container != parent} -setup { + setup_win_mousepointer .one + wm withdraw .one + create_and_pack_frames .one + pack propagate .one.f1.f2 0 + pack [frame .one.g -bg orange -width 80 -height 80] -anchor se -side bottom -in .one.f1.f2 + wm deiconify .one + tkwait visibility .one.g + event generate .one <Motion> -warp 1 -x 250 -y 250 + _pause 200; # needed for Windows + set result "|" +} -body { + bind all <Leave> {append result "<Leave> %d %W|"} + bind all <Enter> {append result "<Enter> %d %W|"} + destroy .one.g + update + set result +} -cleanup { + bind all <Leave> {} + bind all <Enter> {} + destroy .one + unset result +} -result {|<Enter> NotifyNonlinearVirtual .one.f1|<Enter> NotifyNonlinear .one.f1.f2|} + +test event-9.13 {pointer window is a toplevel, toplevel destination} -setup { + setup_win_mousepointer .one + toplevel .two + wm geometry .two 300x300+150+150 + wm withdraw .two + wm deiconify .two + waitForWindowEvent .two <Enter> + update idletasks; # finish displaying windows + set result | +} -body { + bind all <Leave> {append result "<Leave> %d %W|"} + bind all <Enter> {append result "<Enter> %d %W|"} + destroy .two + waitForWindowEvent .one <Enter> + update + set result +} -cleanup { + bind all <Leave> {} + bind all <Enter> {} + destroy .one + unset result +} -result {|<Enter> NotifyNonlinear .one|} + +test event-9.14 {pointer window is a toplevel, tk internal destination} -setup { + setup_win_mousepointer .one + wm withdraw .one + create_and_pack_frames .one + toplevel .two + wm geometry .two 300x300+150+150 + wm withdraw .two + wm deiconify .one + wm deiconify .two + waitForWindowEvent .two <Enter> + set result "|" +} -body { + bind all <Leave> {append result "<Leave> %d %W|"} + bind all <Enter> {append result "<Enter> %d %W|"} + destroy .two + waitForWindowEvent .one.f1.f2 <Enter> + set result +} -cleanup { + bind all <Leave> {} + bind all <Enter> {} + destroy .one + unset result +} -result {|<Enter> NotifyNonlinearVirtual .one|<Enter> NotifyNonlinearVirtual .one.f1|<Enter> NotifyNonlinear .one.f1.f2|} + +test event-9.15 {pointer window is a toplevel, destination is screen root} -setup { + setup_win_mousepointer .one; # ensure the mouse pointer is where we want it to be (the .one toplevel is not itself used in this test) +# destroy .one + toplevel .two + wm geometry .two 300x300+150+150 + wm deiconify .two + waitForWindowEvent .two <Enter> + update idletasks; # finish displaying .two + event generate .two <Motion> -warp 1 -x 275 -y 275 + controlPointerWarpTiming + set result "|" +} -body { + bind all <Leave> {append result "<Leave> %d %W|"} + bind all <Enter> {append result "<Enter> %d %W|"} + destroy .two + set result +} -cleanup { + bind all <Leave> {} + bind all <Enter> {} + destroy .one + unset result +} -result {|} + +test event-9.16 {Successive destructions (pointer window + parent), single generation of crossing events} -setup { + # Tests correctness of overwriting the dead window struct in + # TkPointerDeadWindow() and subsequent reading in GenerateEnterLeave(). + setup_win_mousepointer .one + wm withdraw .one + create_and_pack_frames .one + wm deiconify .one + tkwait visibility .one.f1.f2 + update idletasks; # finish displaying window + _pause 200; # needed for Windows + set result "|" +} -body { + bind all <Leave> {append result "<Leave> %d %W|"} + bind all <Enter> {append result "<Enter> %d %W|"} + destroy .one.f1 + update + set result +} -cleanup { + bind all <Leave> {} + bind all <Enter> {} + destroy .one + unset result +} -result {|<Enter> NotifyInferior .one|} + +test event-9.17 {Successive destructions (pointer window + parent), separate crossing events} -setup { + # Tests correctness of overwriting the dead window struct in + # TkPointerDeadWindow() and subsequent reading in GenerateEnterLeave(). + setup_win_mousepointer .one + wm withdraw .one + create_and_pack_frames .one + wm deiconify .one + tkwait visibility .one.f1.f2 + update idletasks; # finish displaying window + _pause 200; # needed for Windows + set result "|" +} -body { + bind all <Leave> {append result "<Leave> %d %W|"} + bind all <Enter> {append result "<Enter> %d %W|"} + destroy .one.f1.f2 + update; # make sure window is gone + destroy .one.f1 + update; # make sure window is gone + set result +} -cleanup { + bind all <Leave> {} + bind all <Enter> {} + destroy .one + unset result +} -result {|<Enter> NotifyInferior .one.f1|<Enter> NotifyInferior .one|} + +test event-9.18 {Successive destructions (pointer window + ancestors including its toplevel), destination is non-root toplevel} -setup { + setup_win_mousepointer .one + toplevel .two + pack propagate .two 0 + wm geometry .two 300x300+100+100 + create_and_pack_frames .two + wm deiconify .two + waitForWindowEvent .two.f1.f2 <Enter> + set result "|" +} -body { + bind all <Leave> {append result "<Leave> %d %W|"} + bind all <Enter> {append result "<Enter> %d %W|"} + destroy .two + waitForWindowEvent .one <Enter> + set result +} -cleanup { + bind all <Leave> {} + bind all <Enter> {} + destroy .one + unset result +} -result {|<Enter> NotifyNonlinear .one|} + +test event-9.19 {Successive destructions (pointer window + ancestors including its toplevel), destination is internal window, bypass root win} -setup { + setup_win_mousepointer .one; # ensure the mouse pointer is where we want it to be (the .one toplevel is not itself used in this test) +# destroy .one + toplevel .two + pack propagate .two 0 + wm geometry .two 300x300+100+100 + create_and_pack_frames .two + wm deiconify .two + toplevel .three + pack propagate .three 0 + wm geometry .three 300x300+110+110 + create_and_pack_frames .three + wm deiconify .three + waitForWindowEvent .three.f1.f2 <Enter> + update idletasks; # finish displaying windows + set result "|" +} -body { + bind all <Leave> {append result "<Leave> %d %W|"} + bind all <Enter> {append result "<Enter> %d %W|"} + destroy .three + waitForWindowEvent .two.f1.f2 <Enter> + update idletasks; #finish destroying .two + set result +} -cleanup { + bind all <Leave> {} + bind all <Enter> {} + destroy .one + destroy .two + unset result +} -result {|<Enter> NotifyNonlinearVirtual .two|<Enter> NotifyNonlinearVirtual .two.f1|<Enter> NotifyNonlinear .two.f1.f2|} + +test event-9.20 {Successive destructions (pointer window + ancestors including its toplevel), destination is screen root} -setup { + setup_win_mousepointer .one; # ensure the mouse pointer is where we want it to be (the .one toplevel is not itself used in this test) + destroy .one + toplevel .two + pack propagate .two 0 + wm geometry .two 300x300+100+100 + create_and_pack_frames .two + wm deiconify .two + waitForWindowEvent .two.f1.f2 <Enter> + set result "|" +} -body { + bind all <Leave> {append result "<Leave> %d %W|"} + bind all <Enter> {append result "<Enter> %d %W|"} + destroy .two + update idletasks; #finish destroying .two + set result +} -cleanup { + bind all <Leave> {} + bind all <Enter> {} + unset result +} -result {|} + # cleanup +# macOS sometimes has trouble deleting the test window, +# causing a failure in focus.test. +_pause 200; +deleteWindows update unset -nocomplain keypress_lookup rename _init_keypress_lookup {} @@ -883,6 +1196,8 @@ rename _keypress {} rename _pause {} rename _text_ind_to_x_y {} rename _get_selection {} +rename create_and_pack_frames {} +rename setup_win_mousepointer {} cleanupTests return diff --git a/tests/filebox.test b/tests/filebox.test index f46c906..2a02fbe 100644 --- a/tests/filebox.test +++ b/tests/filebox.test @@ -168,27 +168,27 @@ foreach mode $modes { regsub \"-foo\" $options "" options foreach option $options { - if {[string index $option 0] eq "-"} { + 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" - } + } } test filebox-1.3.1-$mode "tk_getOpenFile command" -constraints notAqua -body { - tk_getOpenFile -foo bar + tk_getOpenFile -foo bar } -returnCodes error -result $unknownOptionsMsg(tk_getOpenFile,notAqua) test filebox-1.3.2-$mode "tk_getOpenFile command" -constraints aqua -body { - tk_getOpenFile -foo bar + tk_getOpenFile -foo bar } -returnCodes error -result $unknownOptionsMsg(tk_getOpenFile,aqua) test filebox-1.4-$mode "tk_getOpenFile command" -body { - tk_getOpenFile -initialdir + tk_getOpenFile -initialdir } -returnCodes error -result {value for "-initialdir" missing} test filebox-1.5-$mode "tk_getOpenFile command" -body { - tk_getOpenFile -parent foo.bar + tk_getOpenFile -parent foo.bar } -returnCodes error -result {bad window path name "foo.bar"} test filebox-1.6-$mode "tk_getOpenFile command" -body { - tk_getOpenFile -filetypes {Foo} + tk_getOpenFile -filetypes {Foo} } -returnCodes error -result {bad file type "Foo", should be "typeName {extension ?extensions ...?} ?{macType ?macTypes ...?}?"} set isNative [expr { @@ -210,8 +210,8 @@ foreach mode $modes { # set verylongstring $verylongstring$verylongstring test filebox-2.1-$mode "tk_getOpenFile command" nonUnixUserInteraction { - ToPressButton $parent cancel - tk_getOpenFile -title "Press Cancel ($verylongstring)" -parent $parent + ToPressButton $parent cancel + tk_getOpenFile -title "Press Cancel ($verylongstring)" -parent $parent } "" set fileName $tmpFile @@ -219,63 +219,63 @@ foreach mode $modes { set pathName [file join $fileDir $fileName] test filebox-2.2-$mode "tk_getOpenFile command" nonUnixUserInteraction { - ToPressButton $parent ok - set choice [tk_getOpenFile -title "Press Ok" \ + ToPressButton $parent ok + set choice [tk_getOpenFile -title "Press Ok" \ -parent $parent -initialfile $fileName -initialdir $fileDir] } $pathName test filebox-2.3-$mode "tk_getOpenFile command" nonUnixUserInteraction { - ToEnterFileByKey $parent $fileName $fileDir - set choice [tk_getOpenFile -title "Enter \"$fileName\" and press Ok" \ + ToEnterFileByKey $parent $fileName $fileDir + set choice [tk_getOpenFile -title "Enter \"$fileName\" and press Ok" \ -parent $parent -initialdir $fileDir] } $pathName test filebox-2.4-$mode "tk_getOpenFile command" nonUnixUserInteraction { - cd $fileDir - ToPressButton $parent ok - set choice [tk_getOpenFile -title "Enter \"$fileName\" and press Ok" \ + cd $fileDir + ToPressButton $parent ok + set choice [tk_getOpenFile -title "Enter \"$fileName\" and press Ok" \ -parent $parent -initialdir . -initialfile $fileName] } $pathName test filebox-2.5-$mode "tk_getOpenFile command" nonUnixUserInteraction { - ToPressButton $parent ok - set choice [tk_getOpenFile -title "Enter \"$fileName\" and press Ok" \ + ToPressButton $parent ok + set choice [tk_getOpenFile -title "Enter \"$fileName\" and press Ok" \ -parent $parent -initialdir /badpath -initialfile $fileName] } $pathName test filebox-2.6-$mode "tk_getOpenFile command" -setup { - toplevel .t1; toplevel .t2 - wm geometry .t1 +0+0 - wm geometry .t2 +0+0 + toplevel .t1; toplevel .t2 + wm geometry .t1 +0+0 + wm geometry .t2 +0+0 } -constraints nonUnixUserInteraction -body { - set choice {} - ToPressButton .t1 ok - lappend choice [tk_getOpenFile \ + set choice {} + ToPressButton .t1 ok + lappend choice [tk_getOpenFile \ -title "Enter \"$fileName\" and press Ok" \ -parent .t1 -initialdir $fileDir \ -initialfile $fileName] - ToPressButton .t2 ok - lappend choice [tk_getOpenFile \ + ToPressButton .t2 ok + lappend choice [tk_getOpenFile \ -title "Enter \"$fileName\" and press Ok" \ -parent .t2 -initialdir $fileDir \ -initialfile $fileName] - ToPressButton .t1 ok - lappend choice [tk_getOpenFile \ + ToPressButton .t1 ok + lappend choice [tk_getOpenFile \ -title "Enter \"$fileName\" and press Ok" \ -parent .t1 -initialdir $fileDir \ -initialfile $fileName] } -result [list $pathName $pathName $pathName] -cleanup { - destroy .t1 - destroy .t2 + destroy .t1 + destroy .t2 } foreach x [lsort -integer [array names filters]] { - test filebox-3.$x-$mode "tk_getOpenFile command" nonUnixUserInteraction { + test filebox-3.$x-$mode "tk_getOpenFile command" nonUnixUserInteraction { ToPressButton $parent ok set choice [tk_getOpenFile -title "Press Ok" \ -filetypes $filters($x) -parent $parent \ -initialfile $fileName -initialdir $fileDir] - } $pathName + } $pathName } foreach {x res} [list 1 "-unset-" 2 "Text files"] { set t [expr {$x + [llength [array names filters]]}] - test filebox-3.$t-$mode "tk_getOpenFile command" nonUnixUserInteraction { + test filebox-3.$t-$mode "tk_getOpenFile command" nonUnixUserInteraction { catch {unset tv} catch {unset typeName} ToPressButton $parent ok @@ -289,7 +289,7 @@ foreach mode $modes { set typeName "-unset-" } set typeName - } $res + } $res } test filebox-4.1.1-$mode "tk_getSaveFile command" -constraints notAqua -body { diff --git a/tests/focus.test b/tests/focus.test index 03563bc..e1cfe58 100644 --- a/tests/focus.test +++ b/tests/focus.test @@ -19,8 +19,8 @@ proc focusSetup {} { toplevel .t wm geom .t +0+0 foreach i {b1 b2 b3 b4} { - button .t.$i -text .t.$i -relief raised -bd 2 - pack .t.$i + button .t.$i -text .t.$i -relief raised -bd 2 + pack .t.$i } tkwait visibility .t.b4 } @@ -43,10 +43,8 @@ proc focusSetupAlt {} { # the X server and possibly also the window manager. proc focusClear {} { - global x; - after 200 {set x 1} - tkwait variable x - dobg {focus -force .; update} + dobg {after 200; focus -force .; update} + after 400 update } @@ -82,7 +80,7 @@ test focus-1.1 {Tk_FocusCmd procedure} -constraints unix -body { focus } -result {} test focus-1.2 {Tk_FocusCmd procedure} -constraints { - unix altDisplay + unix altDisplay } -body { focus .alt.b focus @@ -108,7 +106,7 @@ 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 { @@ -134,36 +132,36 @@ test focus-1.8 {Tk_FocusCmd procedure, focussing on dead window} -constraints { 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 + unix altDisplay } -body { focusClear focus -force .alt.c @@ -227,7 +225,7 @@ test focus-1.25 {Tk_FocusCmd procedure} -constraints unix -body { focusSetup test focus-2.1 {TkFocusFilterEvent procedure} -constraints { - unix nonPortable testwrapper + unix nonPortable testwrapper } -body { focusClear focus -force .b @@ -239,7 +237,7 @@ test focus-2.1 {TkFocusFilterEvent procedure} -constraints { return $focusInfo } -result {} test focus-2.2 {TkFocusFilterEvent procedure} -constraints { - unix nonPortable testwrapper + unix nonPortable testwrapper } -body { focusClear focus -force .b @@ -251,7 +249,7 @@ test focus-2.2 {TkFocusFilterEvent procedure} -constraints { } -result {{in .t NotifyAncestor } .b} test focus-2.3 {TkFocusFilterEvent procedure} -constraints { - unix nonPortable testwrapper + unix nonPortable testwrapper } -body { focusClear focus -force .b @@ -330,10 +328,10 @@ test focus-2.7 {TkFocusFilterEvent procedure, FocusOut events} -constraints { foreach detail {NotifyAncestor NotifyInferior NotifyNonlinear NotifyNonlinearVirtual NotifyPointer NotifyPointerRoot NotifyVirtual} { - focus -force .t.b1 - event gen [testwrapper .t] <FocusOut> -detail $detail - update - lappend result [focus] + focus -force .t.b1 + event gen [testwrapper .t] <FocusOut> -detail $detail + update + lappend result [focus] } return $result } -result {{} .t.b1 {} {} .t.b1 .t.b1 {}} @@ -358,12 +356,12 @@ test focus-2.10 {TkFocusFilterEvent procedure, Enter events} -constraints { focus .t.b1 focusClear foreach detail {NotifyAncestor NotifyInferior NotifyNonlinear - NotifyNonlinearVirtual NotifyVirtual} { - event gen [testwrapper .t] <Enter> -detail $detail -focus 1 - update - lappend result [focus] - event gen [testwrapper .t] <Leave> -detail NotifyAncestor - update + NotifyNonlinearVirtual NotifyVirtual} { + event gen [testwrapper .t] <Enter> -detail $detail -focus 1 + update + lappend result [focus] + event gen [testwrapper .t] <Leave> -detail NotifyAncestor + update } return $result } -result {.t.b1 {} .t.b1 .t.b1 .t.b1} @@ -399,7 +397,7 @@ test focus-2.13 {TkFocusFilterEvent procedure, Enter events} -constraints { in .t.b1 NotifyAncestor } test focus-2.14 {TkFocusFilterEvent procedure, Enter events, ignore errors when setting focus due to implicit focus} -constraints { - unix testwrapper + unix testwrapper } -setup { destroy .t2 set focusInfo {} @@ -420,12 +418,12 @@ test focus-2.15 {TkFocusFilterEvent procedure, Leave events} -constraints { focus .t.b1 foreach detail {NotifyAncestor NotifyInferior NotifyNonlinear NotifyNonlinearVirtual NotifyVirtual} { - focusClear - event gen [testwrapper .t] <Enter> -detail NotifyAncestor -focus 1 - update - event gen [testwrapper .t] <Leave> -detail $detail - update - lappend result [focus] + focusClear + event gen [testwrapper .t] <Enter> -detail NotifyAncestor -focus 1 + update + event gen [testwrapper .t] <Leave> -detail $detail + update + lappend result [focus] } return $result } -result {{} .t.b1 {} {} {}} @@ -476,7 +474,7 @@ test focus-3.1 {SetFocus procedure, create record on focus} -constraints { # error if Tk forgets to make the window exist before focussing # on it. test focus-3.2 {SetFocus procedure, making window exist} -constraints { - unix testwrapper + unix testwrapper } -body { update button .b2 -text "Another button" @@ -512,7 +510,7 @@ test focus-3.4 {SetFocus procedure, delaying claim of X focus} -constraints { destroy .t2 } -result {} test focus-3.5 {SetFocus procedure, generating events} -constraints { - unix testwrapper + unix testwrapper } -body { focusSetup focusClear @@ -524,7 +522,7 @@ test focus-3.5 {SetFocus procedure, generating events} -constraints { in .t.b2 NotifyAncestor } test focus-3.6 {SetFocus procedure, generating events} -constraints { - unix testwrapper + unix testwrapper } -body { focusSetup focus -force .b @@ -552,7 +550,7 @@ unix nonPortable testwrapper test focus-4.1 {TkFocusDeadWindow procedure} -constraints { - unix testwrapper + unix testwrapper } -body { focusSetup update @@ -562,7 +560,7 @@ test focus-4.1 {TkFocusDeadWindow procedure} -constraints { focus } -result {.b} test focus-4.2 {TkFocusDeadWindow procedure} -constraints { - unix testwrapper + unix testwrapper } -body { focusSetup update @@ -576,7 +574,7 @@ test focus-4.2 {TkFocusDeadWindow procedure} -constraints { # Non-portable due to wm-specific redirection of input focus when # windows are deleted: test focus-4.3 {TkFocusDeadWindow procedure} -constraints { - unix nonPortable testwrapper + unix nonPortable testwrapper } -body { focusSetup update @@ -587,7 +585,7 @@ test focus-4.3 {TkFocusDeadWindow procedure} -constraints { focus } -result {} test focus-4.4 {TkFocusDeadWindow procedure} -constraints { - unix testwrapper + unix testwrapper } -body { focusSetup focus -force .t.b2 @@ -643,11 +641,11 @@ test focus-6.1 {miscellaneous - embedded application in same process} -constrain child eval "set argv {-use [winfo id .t.f1]}" load {} Tk child child eval { - entry .e1 -bg lightBlue - pack .e1 - bind all <FocusIn> {lappend x "focus in %W %d"} - bind all <FocusOut> {lappend x "focus out %W %d"} - set x {} + entry .e1 -bg lightBlue + pack .e1 + bind all <FocusIn> {lappend x "focus in %W %d"} + bind all <FocusOut> {lappend x "focus out %W %d"} + set x {} } # Claim the focus and wait long enough for it to really arrive. @@ -696,11 +694,11 @@ test focus-6.2 {miscellaneous - embedded application in different process} -cons bind all <FocusOut> {lappend x "focus out %W %d"} setupbg -use [winfo id .t.f1] dobg { - entry .e1 -bg lightBlue - pack .e1 - bind all <FocusIn> {lappend x "focus in %W %d"} - bind all <FocusOut> {lappend x "focus out %W %d"} - set x {} + entry .e1 -bg lightBlue + pack .e1 + bind all <FocusIn> {lappend x "focus in %W %d"} + bind all <FocusOut> {lappend x "focus out %W %d"} + set x {} } # Claim the focus and wait long enough for it to really arrive. diff --git a/tests/focusTcl.test b/tests/focusTcl.test index 6cfc230..de3b564 100644 --- a/tests/focusTcl.test +++ b/tests/focusTcl.test @@ -18,33 +18,33 @@ option add *highlightThickness 2 proc setup1 w { if {$w == "."} { - set w "" + set w "" } foreach i {a b c d} { - destroy $w.$i - frame $w.$i -width 200 -height 50 -bd 2 -relief raised - pack $w.$i + destroy $w.$i + frame $w.$i -width 200 -height 50 -bd 2 -relief raised + pack $w.$i } .b configure -width 0 -height 0 foreach i {x y z} { - destroy $w.b.$i - button $w.b.$i -text "Button $w.b.$i" - pack $w.b.$i -side left + destroy $w.b.$i + button $w.b.$i -text "Button $w.b.$i" + pack $w.b.$i -side left } if {![winfo ismapped $w.b.z]} { - tkwait visibility $w.b.z + tkwait visibility $w.b.z } } proc cleanup1 w { if {$w == "."} { - set w "" + set w "" } foreach i {a b c d} { - destroy $w.$i + destroy $w.$i } foreach i {x y z} { - destroy $w.b.$i + destroy $w.b.$i } } @@ -105,7 +105,7 @@ test focusTcl-1.9 {tk_focusNext procedure, basic tree traversal} -body { test focusTcl-1.10 {tk_focusNext procedure, basic tree traversal} -body { setup1 . foreach w {.b .b.x .b.y .c .d} { - $w configure -takefocus 0 + $w configure -takefocus 0 } tk_focusNext .a } -cleanup { @@ -114,7 +114,7 @@ test focusTcl-1.10 {tk_focusNext procedure, basic tree traversal} -body { test focusTcl-1.11 {tk_focusNext procedure, basic tree traversal} -body { setup1 . foreach w {.b .b.x .b.y .c .d} { - $w configure -takefocus 0 + $w configure -takefocus 0 } tk_focusNext .b.z } -cleanup { @@ -373,9 +373,9 @@ test focusTcl-5.2 {tkFocusOK procedure, -takefocus 1} -body { test focusTcl-5.3 {tkFocusOK procedure, -takefocus procedure} -body { proc t w { if {$w == ".b.x"} { - return 1 + return 1 } elseif {$w == ".b.y"} { - return "" + return "" } return 0 } @@ -385,7 +385,7 @@ test focusTcl-5.3 {tkFocusOK procedure, -takefocus procedure} -body { update .b configure -takefocus "" foreach w {.b.x .b.y .b.z .c} { - $w configure -takefocus t + $w configure -takefocus t } list [tk_focusNext .a] [tk_focusNext .b.x] } -cleanup { @@ -411,7 +411,7 @@ test focusTcl-5.5 {tkFocusOK procedure, -takefocus "", not mapped} -body { test focusTcl-5.6 {tkFocusOK procedure, -takefocus "", not mapped} -body { setup1 . foreach w {.b.x .b.y .b.z} { - $w configure -takefocus "" + $w configure -takefocus "" } pack forget .b update @@ -441,7 +441,7 @@ test focusTcl-5.8 {tkFocusOK procedure, -takefocus "", not mapped} -body { test focusTcl-5.9 {tkFocusOK procedure, -takefocus "", window disabled} -body { setup1 . foreach w {.b.x .b.y .b.z} { - $w configure -takefocus "" + $w configure -takefocus "" } update .b.x configure -state disabled @@ -452,7 +452,7 @@ test focusTcl-5.9 {tkFocusOK procedure, -takefocus "", window disabled} -body { test focusTcl-5.10 {tkFocusOK procedure, -takefocus "", check for bindings} -body { setup1 . foreach w {.a .b .c .d} { - $w configure -takefocus "" + $w configure -takefocus "" } update bind .a <Key> {foo} @@ -463,7 +463,7 @@ test focusTcl-5.10 {tkFocusOK procedure, -takefocus "", check for bindings} -bod test focusTcl-5.11 {tkFocusOK procedure, -takefocus "", check for bindings} -body { setup1 . foreach w {.a .b .c .d} { - $w configure -takefocus "" + $w configure -takefocus "" } update bind Frame <Key> {foo} diff --git a/tests/font.test b/tests/font.test index ca38269..13001c1 100644 --- a/tests/font.test +++ b/tests/font.test @@ -22,16 +22,16 @@ proc getnondefaultfonts {} { global defaultfontlist set nondeffonts [list ] foreach afont [font names] { - if {$afont ni $defaultfontlist} { - lappend nondeffonts $afont - } + if {$afont ni $defaultfontlist} { + lappend nondeffonts $afont + } } set nondeffonts } proc clearnondefaultfonts {} { foreach afont [getnondefaultfonts] { - font delete $afont + font delete $afont } } @@ -42,7 +42,7 @@ wm geom .t +0+0 update idletasks switch [tk windowingsystem] { - x11 {set fixed "TkFixedFont"} + x11 {set fixed "TkFixedFont"} win32 {set fixed "courier 12"} aqua {set fixed "monaco 9"} } @@ -97,7 +97,7 @@ test font-2.1 {TkFontPkgFree} -setup { lappend x [foo eval {catch {font families} msg; set msg}] } -cleanup { interp delete foo -} -result {{named font "wiggles" doesn't exist} {can't invoke "font" command: application has been destroyed}} +} -result {{named font "wiggles" does not exist} {cannot invoke "font" command: application has been destroyed}} test font-3.1 {font command: general} -body { @@ -133,7 +133,7 @@ test font-4.6 {font command: actual: arguments} -body { test font-4.7 {font command: actual: arguments} -constraints noExceed -body { # (tkfont == NULL) font actual "\{xyz" -} -returnCodes error -result "font \"{xyz\" doesn't exist" +} -returnCodes error -result "font \"{xyz\" does not exist" test font-4.8 {font command: actual: all attributes} -body { # not (objc > 3) so objPtr = NULL lindex [font actual {-family times}] 0 @@ -173,7 +173,7 @@ test font-5.1 {font command: configure} -body { 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} +} -returnCodes error -result {named font "xyz" does not exist} test font-5.3 {font command: configure: "deleted" font} -setup { destroy .t.f catch {font delete xyz} @@ -187,7 +187,7 @@ test font-5.3 {font command: configure: "deleted" font} -setup { font configure xyz } -cleanup { destroy .t.f -} -returnCodes error -result {named font "xyz" doesn't exist} +} -returnCodes error -result {named font "xyz" does not exist} test font-5.4 {font command: configure: get all options} -setup { catch {font delete xyz} } -body { @@ -330,7 +330,7 @@ test font-7.4 {font command: delete: non-existent} -setup { } -body { # (namedHashPtr == NULL) font delete xyz -} -returnCodes error -result {named font "xyz" doesn't exist} +} -returnCodes error -result {named font "xyz" does not exist} test font-7.5 {font command: delete: mark for later deletion} -setup { destroy .t.f catch {font delete xyz} @@ -345,7 +345,7 @@ test font-7.5 {font command: delete: mark for later deletion} -setup { font configure xyz } -cleanup { destroy .t.f -} -returnCodes error -result {named font "xyz" doesn't exist} +} -returnCodes error -result {named font "xyz" does not exist} test font-7.6 {font command: delete: mark for later deletion} -setup { destroy .t.f catch {font delete xyz} @@ -405,7 +405,7 @@ test font-9.3 {font command: measure: arguments} -body { 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" +} -returnCodes error -result "font \"{xyz\" does not exist" test font-9.5 {font command: measure} -body { # Tk_TextWidth() expr {[font measure $fixed "abcdefg"] == [font measure $fixed "a"]*7 } @@ -443,7 +443,7 @@ test font-10.5 {font command: metrics: arguments} -body { test font-10.6 {font command: metrics: bad font} -constraints noExceed -body { # (tkfont == NULL) font metrics "\{xyz" -} -returnCodes error -result "font \"{xyz\" doesn't exist" +} -returnCodes error -result "font \"{xyz\" does not exist" test font-10.7 {font command: metrics: get all metrics} -setup { catch {unset a} } -body { @@ -707,7 +707,7 @@ test font-15.9 {Tk_AllocFontFromObj procedure: get attribute font} -setup { test font-15.10 {Tk_AllocFontFromObj procedure: no match} -constraints noExceed -body { # (ParseFontNameObj() != TCL_OK) font actual "\{xyz" -} -returnCodes error -result "font \"{xyz\" doesn't exist" +} -returnCodes error -result "font \"{xyz\" does not exist" test font-15.11 {Tk_AllocFontFromObj procedure: get attribute font} -body { # not (ParseFontNameObj() != TCL_OK) lindex [font actual {plan 9}] 0 @@ -946,9 +946,9 @@ test font-21.7 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {avantgarde 12 roman normal} if {[font actual {avantgarde 12 roman normal} -family] == "avantgarde"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x AvantGarde-Book + set x AvantGarde-Book } } -result {AvantGarde-Book} test font-21.8 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -956,9 +956,9 @@ test font-21.8 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {avantgarde 12 roman bold} if {[font actual {avantgarde 12 roman normal} -family] == "avantgarde"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x AvantGarde-Demi + set x AvantGarde-Demi } } -result {AvantGarde-Demi} test font-21.9 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -966,9 +966,9 @@ test font-21.9 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {avantgarde 12 italic normal} if {[font actual {avantgarde 12 roman normal} -family] == "avantgarde"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x AvantGarde-BookOblique + set x AvantGarde-BookOblique } } -result {AvantGarde-BookOblique} test font-21.10 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -976,9 +976,9 @@ test font-21.10 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {avantgarde 12 italic bold} if {[font actual {avantgarde 12 roman normal} -family] == "avantgarde"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x AvantGarde-DemiOblique + set x AvantGarde-DemiOblique } } -result {AvantGarde-DemiOblique} @@ -987,9 +987,9 @@ test font-21.11 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {bookman 12 roman normal} if {[font actual {avantgarde 12 roman normal} -family] == "bookman"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Bookman-Light + set x Bookman-Light } } -result {Bookman-Light} test font-21.12 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -997,9 +997,9 @@ test font-21.12 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {bookman 12 roman bold} if {[font actual {avantgarde 12 roman normal} -family] == "bookman"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Bookman-Demi + set x Bookman-Demi } } -result {Bookman-Demi} test font-21.13 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1007,9 +1007,9 @@ test font-21.13 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {bookman 12 italic normal} if {[font actual {avantgarde 12 roman normal} -family] == "bookman"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Bookman-LightItalic + set x Bookman-LightItalic } } -result {Bookman-LightItalic} test font-21.14 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1017,9 +1017,9 @@ test font-21.14 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {bookman 12 italic bold} if {[font actual {avantgarde 12 roman normal} -family] == "bookman"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Bookman-DemiItalic + set x Bookman-DemiItalic } } -result {Bookman-DemiItalic} @@ -1028,9 +1028,9 @@ test font-21.15 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {courier 12 roman normal} if {[font actual {avantgarde 12 roman normal} -family] == "courier"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Courier + set x Courier } } -result {Courier} test font-21.16 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1038,9 +1038,9 @@ test font-21.16 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {courier 12 roman bold} if {[font actual {avantgarde 12 roman normal} -family] == "courier"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Courier-Bold + set x Courier-Bold } } -result {Courier-Bold} test font-21.17 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1048,9 +1048,9 @@ test font-21.17 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {courier 12 italic normal} if {[font actual {avantgarde 12 roman normal} -family] == "courier"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Courier-Oblique + set x Courier-Oblique } } -result {Courier-Oblique} test font-21.18 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1058,9 +1058,9 @@ test font-21.18 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {courier 12 italic bold} if {[font actual {avantgarde 12 roman normal} -family] == "courier"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Courier-BoldOblique + set x Courier-BoldOblique } } -result {Courier-BoldOblique} @@ -1069,9 +1069,9 @@ test font-21.19 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {helvetica 12 roman normal} if {[font actual {avantgarde 12 roman normal} -family] == "helvetica"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Helvetica + set x Helvetica } } -result {Helvetica} test font-21.20 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1079,9 +1079,9 @@ test font-21.20 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {helvetica 12 roman bold} if {[font actual {avantgarde 12 roman normal} -family] == "helvetica"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Helvetica-Bold + set x Helvetica-Bold } } -result {Helvetica-Bold} test font-21.21 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1089,9 +1089,9 @@ test font-21.21 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {helvetica 12 italic normal} if {[font actual {avantgarde 12 roman normal} -family] == "helvetica"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Helvetica-Oblique + set x Helvetica-Oblique } } -result {Helvetica-Oblique} test font-21.22 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1099,9 +1099,9 @@ test font-21.22 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {helvetica 12 italic bold} if {[font actual {avantgarde 12 roman normal} -family] == "helvetica"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Helvetica-BoldOblique + set x Helvetica-BoldOblique } } -result {Helvetica-BoldOblique} @@ -1110,9 +1110,9 @@ test font-21.23 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -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] + set x [psfontname avantgarde 12 roman normal] } else { - set x NewCenturySchlbk-Roman + set x NewCenturySchlbk-Roman } } -result {NewCenturySchlbk-Roman} test font-21.24 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1120,9 +1120,9 @@ test font-21.24 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -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] + set x [psfontname avantgarde 12 roman normal] } else { - set x NewCenturySchlbk-Bold + set x NewCenturySchlbk-Bold } } -result {NewCenturySchlbk-Bold} test font-21.25 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1130,9 +1130,9 @@ test font-21.25 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -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] + set x [psfontname avantgarde 12 roman normal] } else { - set x NewCenturySchlbk-Italic + set x NewCenturySchlbk-Italic } } -result {NewCenturySchlbk-Italic} test font-21.26 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1140,9 +1140,9 @@ test font-21.26 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -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] + set x [psfontname avantgarde 12 roman normal] } else { - set x NewCenturySchlbk-BoldItalic + set x NewCenturySchlbk-BoldItalic } } -result {NewCenturySchlbk-BoldItalic} @@ -1151,9 +1151,9 @@ test font-21.27 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {palatino 12 roman normal} if {[font actual {avantgarde 12 roman normal} -family] == "palatino"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Palatino-Roman + set x Palatino-Roman } } -result {Palatino-Roman} test font-21.28 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1161,9 +1161,9 @@ test font-21.28 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {palatino 12 roman bold} if {[font actual {avantgarde 12 roman normal} -family] == "palatino"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Palatino-Bold + set x Palatino-Bold } } -result {Palatino-Bold} test font-21.29 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1171,9 +1171,9 @@ test font-21.29 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {palatino 12 italic normal} if {[font actual {avantgarde 12 roman normal} -family] == "palatino"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Palatino-Italic + set x Palatino-Italic } } -result {Palatino-Italic} test font-21.30 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1181,9 +1181,9 @@ test font-21.30 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {palatino 12 italic bold} if {[font actual {avantgarde 12 roman normal} -family] == "palatino"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Palatino-BoldItalic + set x Palatino-BoldItalic } } -result {Palatino-BoldItalic} @@ -1192,9 +1192,9 @@ test font-21.31 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {symbol 12 roman normal} if {[font actual {avantgarde 12 roman normal} -family] == "symbol"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Symbol + set x Symbol } } -result {Symbol} test font-21.32 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1202,9 +1202,9 @@ test font-21.32 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {symbol 12 roman bold} if {[font actual {avantgarde 12 roman normal} -family] == "symbol"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Symbol + set x Symbol } } -result {Symbol} test font-21.33 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1212,9 +1212,9 @@ test font-21.33 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {symbol 12 italic normal} if {[font actual {avantgarde 12 roman normal} -family] == "symbol"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Symbol + set x Symbol } } -result {Symbol} test font-21.34 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1222,9 +1222,9 @@ test font-21.34 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {symbol 12 italic bold} if {[font actual {avantgarde 12 roman normal} -family] == "symbol"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Symbol + set x Symbol } } -result {Symbol} @@ -1233,9 +1233,9 @@ test font-21.35 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {times 12 roman normal} if {[font actual {avantgarde 12 roman normal} -family] == "times"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Times-Roman + set x Times-Roman } } -result {Times-Roman} test font-21.36 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1243,9 +1243,9 @@ test font-21.36 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {times 12 roman bold} if {[font actual {avantgarde 12 roman normal} -family] == "times"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Times-Bold + set x Times-Bold } } -result {Times-Bold} test font-21.37 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1253,9 +1253,9 @@ test font-21.37 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {times 12 italic normal} if {[font actual {avantgarde 12 roman normal} -family] == "times"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Times-Italic + set x Times-Italic } } -result {Times-Italic} test font-21.38 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1263,9 +1263,9 @@ test font-21.38 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {times 12 italic bold} if {[font actual {avantgarde 12 roman normal} -family] == "times"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x Times-BoldItalic + set x Times-BoldItalic } } -result {Times-BoldItalic} @@ -1274,9 +1274,9 @@ test font-21.39 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {zapfchancery 12 roman normal} if {[font actual {avantgarde 12 roman normal} -family] == "zapfchancery"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x ZapfChancery-MediumItalic + set x ZapfChancery-MediumItalic } } -result {ZapfChancery-MediumItalic} test font-21.40 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1284,9 +1284,9 @@ test font-21.40 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {zapfchancery 12 roman bold} if {[font actual {avantgarde 12 roman normal} -family] == "zapfchancery"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x ZapfChancery-MediumItalic + set x ZapfChancery-MediumItalic } } -result {ZapfChancery-MediumItalic} test font-21.41 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1294,9 +1294,9 @@ test font-21.41 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {zapfchancery 12 italic normal} if {[font actual {avantgarde 12 roman normal} -family] == "zapfchancery"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x ZapfChancery-MediumItalic + set x ZapfChancery-MediumItalic } } -result {ZapfChancery-MediumItalic} test font-21.42 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1304,9 +1304,9 @@ test font-21.42 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {zapfchancery 12 italic bold} if {[font actual {avantgarde 12 roman normal} -family] == "zapfchancery"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x ZapfChancery-MediumItalic + set x ZapfChancery-MediumItalic } } -result {ZapfChancery-MediumItalic} @@ -1315,9 +1315,9 @@ test font-21.43 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {zapfdingbats 12 roman normal} if {[font actual {avantgarde 12 roman normal} -family] == "zapfdingbats"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x ZapfDingbats + set x ZapfDingbats } } -result {ZapfDingbats} test font-21.44 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1325,9 +1325,9 @@ test font-21.44 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {zapfdingbats 12 roman bold} if {[font actual {avantgarde 12 roman normal} -family] == "zapfdingbats"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x ZapfDingbats + set x ZapfDingbats } } -result {ZapfDingbats} test font-21.45 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1335,9 +1335,9 @@ test font-21.45 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {zapfdingbats 12 italic normal} if {[font actual {avantgarde 12 roman normal} -family] == "zapfdingbats"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x ZapfDingbats + set x ZapfDingbats } } -result {ZapfDingbats} test font-21.46 {Tk_PostscriptFontName procedure: exhaustive} -constraints { @@ -1345,9 +1345,9 @@ test font-21.46 {Tk_PostscriptFontName procedure: exhaustive} -constraints { } -body { set name {zapfdingbats 12 italic bold} if {[font actual {avantgarde 12 roman normal} -family] == "zapfdingbats"} { - set x [psfontname avantgarde 12 roman normal] + set x [psfontname avantgarde 12 roman normal] } else { - set x ZapfDingbats + set x ZapfDingbats } } -result {ZapfDingbats} @@ -2254,10 +2254,10 @@ test font-38.6 {ParseFontNameObj procedure: begins with *} -body { } -result [font actual {times 0} -family] test font-38.7 {ParseFontNameObj procedure: arguments} -constraints noExceed -body { font actual "\{xyz" -} -returnCodes error -result "font \"{xyz\" doesn't exist" +} -returnCodes error -result "font \"{xyz\" does not exist" test font-38.8 {ParseFontNameObj procedure: arguments} -constraints noExceed -body { font actual "" -} -returnCodes error -result {font "" doesn't exist} +} -returnCodes error -result {font "" does not exist} test font-38.9 {ParseFontNameObj procedure: arguments} -body { font actual {times 20 xyz xyz} } -returnCodes error -result {unknown font style "xyz"} @@ -2305,7 +2305,7 @@ test font-40.4 {TkFontParseXLFD procedure: all fields unspecified} -body { } -result {-family} test font-40.5 {TkFontParseXLFD procedure: all fields specified} -body { lindex [font actual \ - -foundry-times-weight-slant-setwidth-addstyle-10-10-10-10-spacing-avgwidth-registry-encoding] 1 + -foundry-times-weight-slant-setwidth-addstyle-10-10-10-10-spacing-avgwidth-registry-encoding] 1 } -result [font actual {times 0} -family] @@ -2381,11 +2381,11 @@ test font-45.2 {TkFontGetAliasList: match} -constraints win -body { } -result {times} test font-45.3 {TkFontGetAliasList: match} -constraints {noExceed failsOnUbuntu} -body { if {[font actual {{times new roman} 10} -family] eq "Times New Roman"} { - # avoid test failure on systems that have a real "times new roman" font - set res 1 + # avoid test failure on systems that have a real "times new roman" font + set res 1 } else { - set res [expr {[font actual {{times new roman} 10} -family] eq \ - [font actual {times 10} -family]} ] + set res [expr {[font actual {{times new roman} 10} -family] eq \ + [font actual {times 10} -family]} ] } } -result 1 @@ -2434,15 +2434,15 @@ test font-47.2 {Bug 3049518 - Canvas} -body { set twidth [font measure MyFont $text] set theight [font metrics MyFont -linespace] set circid [$c create polygon \ - 15 15 \ - [expr {15 + $twidth}] 15 \ - [expr {15 + $twidth}] [expr {15 + $theight}] \ - 15 [expr {15 + $theight}] \ - -width 1 -joinstyle round -smooth true -fill {} -outline blue] + 15 15 \ + [expr {15 + $twidth}] 15 \ + [expr {15 + $twidth}] [expr {15 + $theight}] \ + 15 [expr {15 + $theight}] \ + -width 1 -joinstyle round -smooth true -fill {} -outline blue] pack $c -fill both -expand 1 -side top update - # Lamda test functions + # Lambda test functions set circle_text {{w user_data text circ} { if {[winfo class $w] ne "Canvas"} { puts "Wrong widget type: $w" @@ -2468,6 +2468,7 @@ test font-47.2 {Bug 3049518 - Canvas} -body { apply $circle_text $c FontChanged $textid $circid update bind $c <<TkWorldChanged>> [list apply $circle_text %W %d $textid $circid] + update idletasks # Begin test: set results {} diff --git a/tests/fontchooser.test b/tests/fontchooser.test index 4afda83..f852e97 100644 --- a/tests/fontchooser.test +++ b/tests/fontchooser.test @@ -25,21 +25,21 @@ proc then {cmd} { } proc afterbody {} { if {$::tk_dialog == {}} { - if {[incr ::iter_after] > 30} { - set ::dialogresult ">30 iterations waiting for tk_dialog" - return - } - after 150 {afterbody} - return + if {[incr ::iter_after] > 30} { + set ::dialogresult ">30 iterations waiting for tk_dialog" + return + } + after 150 {afterbody} + return } uplevel #0 {set dialogresult [eval $command]} } proc Click {button} { switch -exact -- $button { - ok { $::tk_dialog.ok invoke } - cancel { $::tk_dialog.cancel invoke } - apply { $::tk_dialog.apply invoke } - default { return -code error "invalid button name \"$button\"" } + ok { $::tk_dialog.ok invoke } + cancel { $::tk_dialog.cancel invoke } + apply { $::tk_dialog.apply invoke } + default { return -code error "invalid button name \"$button\"" } } } proc ApplyFont {font} { @@ -96,37 +96,37 @@ testConstraint scriptImpl [llength [info proc ::tk::fontchooser::Configure]] test fontchooser-2.0 {fontchooser -title} -constraints scriptImpl -body { start { - tk::fontchooser::Configure -title "Hello" - tk::fontchooser::Show + tk::fontchooser::Configure -title "Hello" + tk::fontchooser::Show } then { - set x [wm title $::tk_dialog] - Click cancel + set x [wm title $::tk_dialog] + Click cancel } set x } -result {Hello} test fontchooser-2.1 {fontchooser -title (cyrillic)} -constraints scriptImpl -body { start { - tk::fontchooser::Configure \ - -title "Привет" - tk::fontchooser::Show + tk::fontchooser::Configure \ + -title "Привет" + tk::fontchooser::Show } then { - set x [wm title $::tk_dialog] - Click cancel + set x [wm title $::tk_dialog] + Click cancel } set x } -result "Привет" test fontchooser-3.0 {fontchooser -parent} -constraints scriptImpl -body { start { - tk::fontchooser::Configure -parent . - tk::fontchooser::Show + tk::fontchooser::Configure -parent . + tk::fontchooser::Show } then { - set x [winfo parent $::tk_dialog] - Click cancel + set x [winfo parent $::tk_dialog] + Click cancel } set x } -result {.} @@ -137,55 +137,55 @@ test fontchooser-3.1 {fontchooser -parent (invalid)} -constraints scriptImpl -bo test fontchooser-4.0 {fontchooser -font} -constraints scriptImpl -body { start { - tk::fontchooser::Configure -command ApplyFont -font courier - tk::fontchooser::Show + tk::fontchooser::Configure -command ApplyFont -font courier + tk::fontchooser::Show } then { - Click cancel + Click cancel } set ::testfont } -result {} test fontchooser-4.1 {fontchooser -font} -constraints scriptImpl -body { start { - tk::fontchooser::Configure -command ApplyFont -font courier - tk::fontchooser::Show + tk::fontchooser::Configure -command ApplyFont -font courier + tk::fontchooser::Show } then { - Click ok + Click ok } expr {$::testfont ne {}} } -result 1 test fontchooser-4.2 {fontchooser -font} -constraints scriptImpl -body { start { - tk::fontchooser::Configure -command ApplyFont -font TkDefaultFont - tk::fontchooser::Show + tk::fontchooser::Configure -command ApplyFont -font TkDefaultFont + tk::fontchooser::Show } then { - Click ok + Click ok } expr {$::testfont ne {}} } -result 1 test fontchooser-4.3 {fontchooser -font} -constraints scriptImpl -body { start { - tk::fontchooser::Configure -command ApplyFont -font {times 14 bold} - tk::fontchooser::Show + tk::fontchooser::Configure -command ApplyFont -font {times 14 bold} + tk::fontchooser::Show } then { - Click ok + Click ok } expr {$::testfont ne {}} } -result 1 test fontchooser-4.4 {fontchooser -font} -constraints {scriptImpl haveTimes14BoldFont} -body { start { - tk::fontchooser::Configure -command ApplyFont -font {times 14 bold} - tk::fontchooser::Show + tk::fontchooser::Configure -command ApplyFont -font {times 14 bold} + tk::fontchooser::Show } then { - Click ok + Click ok } lrange $::testfont 1 end } -result {14 bold} diff --git a/tests/frame.test b/tests/frame.test index 74768e4..65bcb95 100644 --- a/tests/frame.test +++ b/tests/frame.test @@ -169,9 +169,9 @@ test frame-1.12 {frame configuration options} -setup { frame .f set opts {} foreach opt [.f configure] { - if {[llength $opt] == 5} { - lappend opts [lindex $opt 0] [lindex $opt 4] - } + if {[llength $opt] == 5} { + lappend opts [lindex $opt 0] [lindex $opt 4] + } } frame .g {*}$opts } -cleanup { @@ -213,7 +213,7 @@ test frame-1.19 {frame configuration options} -body { lindex [.f configure -borderwidth] 4 } -cleanup { .f configure -borderwidth [lindex [.f configure -borderwidth] 3] -} -result 1 +} -result 1.3 test frame-1.20 {frame configuration options} -body { .f configure -borderwidth badValue } -returnCodes error -result {expected screen distance but got "badValue"} @@ -376,7 +376,7 @@ test frame-2.8 {toplevel configuration options} -constraints win -setup { .t configure -use 0x44022 } -cleanup { deleteWindows -} -returnCodes error -result {window "0x44022" doesn't exist} +} -returnCodes error -result {window "0x44022" does not exist} test frame-2.9 {toplevel configuration options} -constraints win -setup { deleteWindows } -body { @@ -476,9 +476,9 @@ test frame-2.19 {toplevel configuration options} -setup { # Make sure all options can be set to the default value toplevel .f foreach opt [.f configure] { - if {[llength $opt] == 5} { - lappend opts [lindex $opt 0] [lindex $opt 4] - } + if {[llength $opt] == 5} { + lappend opts [lindex $opt 0] [lindex $opt 4] + } } toplevel .g {*}$opts } -cleanup { @@ -514,7 +514,7 @@ test frame-2.25 {toplevel configuration options} -body { test frame-2.26 {toplevel configuration options} -body { .t configure -borderwidth 1.3 lindex [.t configure -borderwidth] 4 -} -result 1 +} -result 1.3 test frame-2.27 {toplevel configuration options} -body { .t configure -borderwidth badValue } -returnCodes error -result {expected screen distance but got "badValue"} @@ -1097,26 +1097,26 @@ test frame-12.2 {FrameWorldChanged procedure} -setup { # Test all -labelanchor positions set font {helvetica 12} labelframe .f -highlightthickness 1 -bd 3 -padx 1 -pady 2 -font $font \ - -text "Mupp" + -text "Mupp" set fh [expr {max([font metrics $font -linespace] + 2 - 3, 0)}] set fw [expr {max([font measure $font "Mupp"] + 2 - 3, 0)}] place .f -x 0 -y 0 -width 100 -height 100 pack [frame .f.f] -fill both -expand 1 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 - switch -glob $lp { - n* {incr expy $fh ; incr exph -$fh} - s* {incr exph -$fh} - w* {incr expx $fw ; incr expw -$fw} - e* {incr expw -$fw} - } - lappend result [expr { + .f configure -labelanchor $lp + update + set expx 5 + set expy 6 + set expw 90 + set exph 88 + switch -glob $lp { + n* {incr expy $fh ; incr exph -$fh} + s* {incr exph -$fh} + w* {incr expx $fw ; incr expw -$fw} + e* {incr expw -$fw} + } + lappend result [expr { [winfo x .f.f] == $expx && [winfo y .f.f] == $expy && [winfo width .f.f] == $expw && [winfo height .f.f] == $exph }] @@ -1248,7 +1248,7 @@ test frame-13.16 {labelframe configuration options} -body { lindex [.f configure -borderwidth] 4 } -cleanup { .f configure -borderwidth [lindex [.f configure -borderwidth] 3] -} -result 1 +} -result 1.3 test frame-13.17 {labelframe configuration options} -body { .f configure -borderwidth badValue } -returnCodes error -result {expected screen distance but got "badValue"} @@ -1391,7 +1391,7 @@ test frame-14.1 {labelframe labelwidget option} -setup { pack .f.f update list [winfo children .] [winfo width .f] \ - [expr {[winfo height .f] - [winfo height .l]}] + [expr {[winfo height .f] - [winfo height .l]}] } -cleanup { deleteWindows } -result {{.f .l} 54 52} @@ -1509,7 +1509,7 @@ test frame-15.2 {TIP 262: frame background images} -setup { .f configure -backgroundimage gorp } -returnCodes error -cleanup { deleteWindows -} -result {image "gorp" doesn't exist} +} -result {image "gorp" does not exist} test frame-15.3 {TIP 262: frame background images} -setup { deleteWindows image create photo gorp -width 10 -height 10 @@ -1689,7 +1689,7 @@ test frame-15.9 {TIP 262: toplevel background images} -setup { .t configure -backgroundimage gorp } -returnCodes error -cleanup { deleteWindows -} -result {image "gorp" doesn't exist} +} -result {image "gorp" does not exist} test frame-15.10 {TIP 262: toplevel background images} -setup { deleteWindows image create photo gorp -width 10 -height 10 diff --git a/tests/geometry.test b/tests/geometry.test index 6576331..1588bb9 100644 --- a/tests/geometry.test +++ b/tests/geometry.test @@ -32,7 +32,7 @@ button .f.f.b4 -text .b4 test geometry-1.1 {Tk_ManageGeometry procedure} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } } -body { place .b1 -x 120 -y 80 @@ -41,7 +41,7 @@ test geometry-1.1 {Tk_ManageGeometry procedure} -setup { } -result {120 80} test geometry-1.2 {Tk_ManageGeometry procedure} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } } -body { place .f -x 20 -y 30 -width 200 -height 200 @@ -56,7 +56,7 @@ test geometry-1.2 {Tk_ManageGeometry procedure} -setup { test geometry-2.1 {Tk_GeometryRequest procedure} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } destroy .f2 } -body { @@ -65,7 +65,7 @@ test geometry-2.1 {Tk_GeometryRequest procedure} -setup { .f2 configure -width 150 -height 300 update lappend result [winfo reqwidth .f2] [winfo reqheight .f2] \ - [winfo geom .f2] + [winfo geom .f2] place .f2 -x 10 -y 20 update lappend result [winfo geom .f2] @@ -79,7 +79,7 @@ test geometry-2.1 {Tk_GeometryRequest procedure} -setup { test geometry-3.1 {Tk_SetInternalBorder procedure} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } } -body { place .f -x 20 -y 30 -width 200 -height 200 @@ -96,7 +96,7 @@ test geometry-3.1 {Tk_SetInternalBorder procedure} -setup { test geometry-4.1 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } } -body { place .f -x 20 -y 30 -width 200 -height 200 @@ -108,7 +108,7 @@ test geometry-4.1 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { } -result {91 46} test geometry-4.2 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } } -body { place .f -x 20 -y 30 -width 200 -height 200 @@ -121,11 +121,11 @@ test geometry-4.2 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { place .f -x 30 -y 25 update list [winfo x .b1] [winfo y .b1] [winfo x .b2] [winfo y .b2] \ - [winfo x .b3] [winfo y .b3] + [winfo x .b3] [winfo y .b3] } -result {101 41 61 61 101 61} test geometry-4.3 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } } -body { place .f -x 20 -y 30 -width 200 -height 200 @@ -140,11 +140,11 @@ test geometry-4.3 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { place .f.f -x 10 -y 25 update list [winfo x .b1] [winfo y .b1] [winfo x .b2] [winfo y .b2] \ - [winfo x .b3] [winfo y .b3] + [winfo x .b3] [winfo y .b3] } -result {0 0 46 86 86 86} test geometry-4.4 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } } -body { place .f -x 20 -y 30 -width 200 -height 200 @@ -159,11 +159,11 @@ test geometry-4.4 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { place .f.f.f -x 2 -y 3 update list [winfo x .b1] [winfo y .b1] [winfo x .b2] [winfo y .b2] \ - [winfo x .b3] [winfo y .b3] + [winfo x .b3] [winfo y .b3] } -result {93 49 0 0 93 69} test geometry-4.5 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } } -body { place .f -x 20 -y 30 -width 200 -height 200 @@ -178,11 +178,11 @@ test geometry-4.5 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { place .f.f.f -x 2 -y 3 update list [winfo x .b1] [winfo y .b1] [winfo x .b2] [winfo y .b2] \ - [winfo x .b3] [winfo y .b3] + [winfo x .b3] [winfo y .b3] } -result {93 49 53 69 0 0} test geometry-4.6 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } } -body { foreach w {.f .f.f .f.f.f .b1 .b2 .b3 .f.f.b4} { @@ -200,7 +200,7 @@ test geometry-4.6 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { } -result {54 9 56 71} test geometry-4.7 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } } -body { bind .b1 <Configure> {lappend x configure} @@ -223,7 +223,7 @@ test geometry-4.7 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { } -result {init configure |} test geometry-4.8 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } } -body { place .f -x 20 -y 30 -width 200 -height 200 @@ -239,12 +239,12 @@ test geometry-4.8 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { place .f -x 30 -y 25 update list [winfo x .b1] [winfo y .b1] [winfo ismapped .b1] \ - [winfo x .b2] [winfo y .b2] [winfo ismapped .b2] \ - [winfo x .b3] [winfo y .b3] [winfo ismapped .b3] + [winfo x .b2] [winfo y .b2] [winfo ismapped .b2] \ + [winfo x .b3] [winfo y .b3] [winfo ismapped .b3] } -result {91 46 0 51 66 0 91 66 0} test geometry-4.9 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } } -body { place .f -x 20 -y 30 -width 200 -height 200 @@ -262,7 +262,7 @@ test geometry-4.9 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { } -result {1 0 1} test geometry-4.10 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { - place forget $w + place forget $w } destroy .t } -body { diff --git a/tests/get.test b/tests/get.test index 51b6b94..ce1d372 100644 --- a/tests/get.test +++ b/tests/get.test @@ -97,7 +97,7 @@ test get-1.11 {Tk_GetAnchorFromObj - error} -setup { .b configure -anchor unknown } -cleanup { destroy .b -} -returnCodes {error} -result {bad anchor "unknown": must be n, ne, e, se, s, sw, w, nw, or center} +} -returnCodes error -result {bad anchor "unknown": must be n, ne, e, se, s, sw, w, nw, or center} test get-2.1 {Tk_GetJustifyFromObj} -setup { @@ -130,7 +130,7 @@ test get-2.4 {Tk_GetJustifyFromObj - error} -setup { .b configure -justify stupid } -cleanup { destroy .b -} -returnCodes {error} -result {bad justification "stupid": must be left, right, or center} +} -returnCodes error -result {bad justification "stupid": must be left, right, or center} # cleanup cleanupTests diff --git a/tests/grid.test b/tests/grid.test index 9aa2f84..128c244 100644 --- a/tests/grid.test +++ b/tests/grid.test @@ -709,7 +709,7 @@ test grid-10.23 {column/row configure} -body { grid columnconfigure . .b -weight 1 set res {} foreach i {0 1 2 3} { - lappend res [grid columnconfigure . $i -weight] + lappend res [grid columnconfigure . $i -weight] } return $res } -cleanup { @@ -726,7 +726,7 @@ test grid-10.24 {column/row configure} -body { grid columnconfigure . .c -weight 2 set res {} foreach i {0 1 2 3 4 5 6} { - lappend res [grid columnconfigure . $i -weight] + lappend res [grid columnconfigure . $i -weight] } return $res } -cleanup { @@ -743,7 +743,7 @@ test grid-10.25 {column/row configure} -body { grid rowconfigure . {1 .d} -weight 2 set res {} foreach i {0 1 2 3 4 5 6 7} { - lappend res [grid rowconfigure . $i -weight] + lappend res [grid rowconfigure . $i -weight] } return $res } -cleanup { @@ -1023,7 +1023,7 @@ test grid-11.15 {^ ^ test with multiple windows} -body { } -result {{0,0 50,50} {50,0 50,100} {100,0 50,100} {0,50 50,50}} test grid-11.16 {default widget placement} -body { foreach l {a b c d e} { - frame .$l -width 50 -height 50 + frame .$l -width 50 -height 50 } grid .a .b .c .d -sticky news grid x ^ x .e -sticky news @@ -1037,7 +1037,7 @@ test grid-11.16 {default widget placement} -body { } -result {50 100 50} test grid-11.17 {default widget placement} -body { foreach l {a b c d e} { - frame .$l -width 50 -height 50 + frame .$l -width 50 -height 50 } grid .a .b .c .d -sticky news grid ^ x ^ .e -sticky news @@ -1051,7 +1051,7 @@ test grid-11.17 {default widget placement} -body { } -result {100 50 100} test grid-11.18 {default widget placement} -body { foreach l {a b c d e} { - frame .$l -width 50 -height 50 + frame .$l -width 50 -height 50 } grid .a .b .c .d -sticky news grid ^ ^ ^ x -in . ;# ^ and no child should work with -in. @@ -1067,7 +1067,7 @@ test grid-11.18 {default widget placement} -body { } -result {100 100 100 50} test grid-11.19 {default widget placement} -body { foreach l {a b c d e} { - frame .$l -width 50 -height 50 + frame .$l -width 50 -height 50 } grid .a .b -sticky news grid .c .d -sticky news @@ -1143,8 +1143,8 @@ test grid-13.1 {-in} -body { test grid-13.2 {-in} -body { frame .f -bg red list [winfo manager .f] \ - [catch {grid .f -in .f} err] $err \ - [winfo manager .f] + [catch {grid .f -in .f} err] $err \ + [winfo manager .f] } -cleanup { grid_reset 13.1.1 } -result {{} 1 {window can't be managed in itself} {}} @@ -1321,11 +1321,11 @@ test grid-14.1 {structure notify} -body { update set a "" lappend a "[winfo x .g],[winfo y .g] \ - [winfo width .g],[winfo height .g]" + [winfo width .g],[winfo height .g]" .f configure -bd 5 -relief raised update lappend a "[winfo x .g],[winfo y .g] \ - [winfo width .g],[winfo height .g]" + [winfo width .g],[winfo height .g]" return $a } -cleanup { grid_reset 14.1 @@ -1565,13 +1565,13 @@ test grid-16.9 {layout uniform} -body { frame .f4 -width 135 -height 100 frame .f5 -width 80 -height 40 for {set t 1} {$t <= 5} {incr t} { - grid .f$t + grid .f$t } grid rowconfigure . {0 2} -uniform a grid rowconfigure . {1 3} -uniform b update list [grid bbox . 0 0] [grid bbox . 0 1] [grid bbox . 0 2] \ - [grid bbox . 0 3] [grid bbox . 0 4] + [grid bbox . 0 3] [grid bbox . 0 4] } -cleanup { grid_reset 16.9 } -result {{0 0 135 75} {0 75 135 100} {0 175 135 75} {0 250 135 100} {0 350 135 40}} @@ -1591,7 +1591,7 @@ test grid-16.10 {layout uniform} -body { grid columnconfigure . 4 -minsize 130 update list [grid bbox . 0 0] [grid bbox . 2 1] [grid bbox . 1 2] \ - [grid bbox . 4 3] [grid bbox . 3 4] + [grid bbox . 4 3] [grid bbox . 3 4] } -cleanup { grid_reset 16.10 } -result {{0 0 75 60} {170 60 150 30} {75 90 95 90} {390 180 140 100} {320 280 70 45}} @@ -1634,7 +1634,7 @@ test grid-16.12 {layout uniform (grow)} -body { } -cleanup { grid_reset 16.12 } -result [list {0 0 50 95} {50 0 50 95} {100 0 100 95} {200 0 70 95} \ - {0 0 70 95} {70 0 50 95} {120 0 140 95} {260 0 90 95}] + {0 0 70 95} {70 0 50 95} {120 0 140 95} {260 0 90 95}] test grid-16.13 {layout span} -body { frame .f1 -width 24 -height 20 frame .f2 -width 38 -height 20 @@ -1643,15 +1643,15 @@ test grid-16.13 {layout span} -body { grid .f3 - - - set res {} foreach w {{0 1 0 0} {0 0 1 0} {1 3 4 0} {1 2 1 2} {1 1 1 12}} { - for {set c 0} {$c < 4} {incr c} { - grid columnconfigure . $c -weight [lindex $w $c] - } - update - set res2 {} - for {set c 0} {$c <= 4} {incr c} { - lappend res2 [lindex [grid bbox . $c 0] 2] - } - lappend res $res2 + for {set c 0} {$c < 4} {incr c} { + grid columnconfigure . $c -weight [lindex $w $c] + } + update + set res2 {} + for {set c 0} {$c <= 4} {incr c} { + lappend res2 [lindex [grid bbox . $c 0] 2] + } + lappend res $res2 } return $res # The last result below should ideally be 8 8 8 126 but the current @@ -1659,7 +1659,7 @@ test grid-16.13 {layout span} -body { } -cleanup { grid_reset 16.13 } -result [list [list 0 112 0 38 0] [list 0 0 112 38 0] [list 14 42 56 38 0] \ - [list 18 38 18 76 0] [list 7 8 9 126 0]] + [list 18 38 18 76 0] [list 7 8 9 126 0]] test grid-16.14 {layout span} -body { frame .f1 -width 110 -height 20 frame .f2 -width 38 -height 20 @@ -1668,21 +1668,21 @@ test grid-16.14 {layout span} -body { grid .f3 - - - set res {} foreach w {{0 1 0 0} {0 0 1 0} {1 3 4 0} {1 2 1 3} {1 1 1 12}} { - for {set c 0} {$c < 4} {incr c} { - grid columnconfigure . $c -weight [lindex $w $c] - } - update - set res2 {} - for {set c 0} {$c <= 4} {incr c} { - lappend res2 [lindex [grid bbox . $c 0] 2] - } - lappend res $res2 + for {set c 0} {$c < 4} {incr c} { + grid columnconfigure . $c -weight [lindex $w $c] + } + update + set res2 {} + for {set c 0} {$c <= 4} {incr c} { + lappend res2 [lindex [grid bbox . $c 0] 2] + } + lappend res $res2 } return $res } -cleanup { grid_reset 16.14 } -result [list [list 0 112 0 38 0] [list 0 0 112 38 0] [list 14 42 56 38 0] \ - [list 27 55 28 40 0] [list 36 37 37 40 0]] + [list 27 55 28 40 0] [list 36 37 37 40 0]] test grid-16.15 {layout span} -body { frame .f1 -width 24 -height 20 frame .f2 -width 38 -height 20 @@ -1691,21 +1691,21 @@ test grid-16.15 {layout span} -body { grid x .f3 - - set res {} foreach w {{0 1 0 0} {0 0 1 0} {1 0 1 0} {0 0 0 0} {1 0 0 6}} { - for {set c 0} {$c < 4} {incr c} { - grid columnconfigure . $c -weight [lindex $w $c] - } - update - set res2 {} - for {set c 0} {$c <= 4} {incr c} { - lappend res2 [lindex [grid bbox . $c 0] 2] - } - lappend res $res2 + for {set c 0} {$c < 4} {incr c} { + grid columnconfigure . $c -weight [lindex $w $c] + } + update + set res2 {} + for {set c 0} {$c <= 4} {incr c} { + lappend res2 [lindex [grid bbox . $c 0] 2] + } + lappend res $res2 } return $res } -cleanup { grid_reset 16.15 } -result [list [list 0 112 0 38 0] [list 0 0 112 38 0] [list 0 0 112 38 0] \ - [list 0 37 37 76 0] [list 0 12 12 126 0]] + [list 0 37 37 76 0] [list 0 12 12 126 0]] test grid-16.16 {layout span} -body { frame .f1 -width 64 -height 20 frame .f2 -width 38 -height 20 @@ -1718,21 +1718,21 @@ test grid-16.16 {layout span} -body { grid .f4 .f5 .f6 set res {} foreach w {{1 1 5 1} {0 0 1 0} {1 3 4 0} {1 2 1 2} {1 1 1 12}} { - for {set c 0} {$c < 4} {incr c} { - grid columnconfigure . $c -weight [lindex $w $c] - } - update - set res2 {} - for {set c 0} {$c <= 4} {incr c} { - lappend res2 [lindex [grid bbox . $c 0] 2] - } - lappend res $res2 + for {set c 0} {$c < 4} {incr c} { + grid columnconfigure . $c -weight [lindex $w $c] + } + update + set res2 {} + for {set c 0} {$c <= 4} {incr c} { + lappend res2 [lindex [grid bbox . $c 0] 2] + } + lappend res $res2 } return $res } -cleanup { grid_reset 16.16 } -result [list [list 30 34 43 43 0] [list 30 34 48 38 0] [list 22 42 48 38 0] \ - [list 25 39 29 57 0] [list 30 34 22 64 0]] + [list 25 39 29 57 0] [list 30 34 22 64 0]] test grid-16.17 {layout weights (shrinking at minsize)} -body { foreach i {0 1 2 3} { frame .$i -bg gray -width 100 -height 75 -bd 2 -relief ridge @@ -1766,15 +1766,15 @@ test grid-16.18 {layout span} -body { grid columnconfigure . 0 -weight 1 set res {} foreach w {{1 0 0} {0 1 0} {0 0 1}} { - for {set c 0} {$c < 3} {incr c} { - grid columnconfigure . $c -weight [lindex $w $c] - } - update - set res2 {} - for {set c 0} {$c <= 2} {incr c} { - lappend res2 [lindex [grid bbox . $c 0] 2] - } - lappend res $res2 + for {set c 0} {$c < 3} {incr c} { + grid columnconfigure . $c -weight [lindex $w $c] + } + update + set res2 {} + for {set c 0} {$c <= 2} {incr c} { + lappend res2 [lindex [grid bbox . $c 0] 2] + } + lappend res $res2 } return $res } -cleanup { @@ -1795,7 +1795,7 @@ test grid-16.19 {layout span} -constraints { knownBug } -body { set res {} update for {set c 0} {$c <= 5} {incr c} { - lappend res [lindex [grid bbox . $c 0] 2] + lappend res [lindex [grid bbox . $c 0] 2] } return $res } -cleanup { @@ -1861,10 +1861,10 @@ test grid-18.2 {test support for minreqsize} -body { test grid-19.1 {uniform realloc} -body { # Use a lot of uniform groups to test the reallocation mechanism for {set t 0} {$t < 100} {incr t 2} { - frame .fa$t -width 5 -height 20 - frame .fb$t -width 6 -height 20 - grid .fa$t .fb$t -row 0 -column $t -sticky news - grid columnconfigure . [list $t [expr {$t + 1}]] -uniform a$t + frame .fa$t -width 5 -height 20 + frame .fb$t -width 6 -height 20 + grid .fa$t .fb$t -row 0 -column $t -sticky news + grid columnconfigure . [list $t [expr {$t + 1}]] -uniform a$t } update grid bbox . @@ -1927,16 +1927,16 @@ test grid-21.6 {anchor} -body { . configure -width 300 -height 250 set res {} foreach a {n ne e se s sw w nw center} { - grid anchor . $a - update - lappend res [grid bbox .] + grid anchor . $a + update + lappend res [grid bbox .] } return $res } -cleanup { grid_reset 21.6 } -result [list {37 0 225 150} {75 0 225 150} {75 50 225 150} {75 100 225 150} \ - {37 100 225 150} {0 100 225 150} {0 50 225 150} {0 0 225 150} \ - {37 50 225 150}] + {37 100 225 150} {0 100 225 150} {0 50 225 150} {0 0 225 150} \ + {37 50 225 150}] test grid-21.7 {anchor} -body { # Test with a non-symmetric internal border. # This only tests vertically, there is currently no way to get @@ -1954,17 +1954,17 @@ test grid-21.7 {anchor} -body { . configure -width 300 -height 250 set res {} foreach a {n ne e se s sw w nw center} { - grid anchor .f $a - update - lappend res [grid bbox .f] + grid anchor .f $a + update + lappend res [grid bbox .f] } pack propagate . 1 ; wm geometry . {} return $res } -cleanup { grid_reset 21.7 } -result [list {37 20 225 150} {75 20 225 150} {75 60 225 150} {75 100 225 150} \ - {37 100 225 150} {0 100 225 150} {0 60 225 150} {0 20 225 150} \ - {37 60 225 150}] + {37 100 225 150} {0 100 225 150} {0 60 225 150} {0 20 225 150} \ + {37 60 225 150}] test grid-22.1 {remove: basic argument checking} { list [catch {grid remove foo} msg] $msg @@ -2022,7 +2022,7 @@ test grid-22.5 {remove} { grid_reset 22.5 test grid-23 {grid configure -in leaked from previous container window - bug - 6aea69fccbb266b7f0437686379fbe5b55442958} { + 6aea69fccbb266b7f0437686379fbe5b55442958} { frame .f frame .g pack .f .g diff --git a/tests/image.test b/tests/image.test index c7b6511..e6f166b 100644 --- a/tests/image.test +++ b/tests/image.test @@ -31,7 +31,7 @@ test image-1.3 {Tk_ImageCmd procedure, "create" option} -body { } -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} +} -returnCodes error -result {image type "bad_type" does not exist} test image-1.5 {Tk_ImageCmd procedure, "create" option} -constraints { testImageType } -body { @@ -68,7 +68,7 @@ test image-1.7 {Tk_ImageCmd procedure, "create" option} -constraints { update # On MacOS we need to wait for the test image display procedure to run. while {"timed out" ni $x && [lindex $x end 1] ne "display"} { - vwait x + vwait x } after cancel timer if {[lindex $x end] eq "timed out"} { @@ -177,7 +177,7 @@ test image-2.3 {Tk_ImageCmd procedure, "delete" option} -constraints { image delete myimage gorp img2 } -cleanup { imageCleanup -} -returnCodes error -result {image "gorp" doesn't exist} +} -returnCodes error -result {image "gorp" does not exist} test image-2.4 {Tk_ImageCmd procedure, "delete" option} -constraints { testImageType } -setup { @@ -200,7 +200,7 @@ test image-3.2 {Tk_ImageCmd procedure, "height" option} -body { } -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} +} -returnCodes error -result {image "foo" does not exist} test image-3.4 {Tk_ImageCmd procedure, "height" option} -constraints { testImageType } -setup { @@ -226,11 +226,11 @@ test image-4.2 {Tk_ImageCmd procedure, "names" option} -constraints { interp create testinterp load {} Tk testinterp interp eval testinterp { - image delete {*}[image names] - image create test myimage - image create test img2 - image create test 24613 - lsort [image names] + image delete {*}[image names] + image create test myimage + image create test img2 + image create test 24613 + lsort [image names] } } -cleanup { interp delete testinterp @@ -241,9 +241,9 @@ test image-4.3 {Tk_ImageCmd procedure, "names" option} -setup { interp create testinterp load {} Tk testinterp interp eval testinterp { - image delete {*}[image names] - eval image delete [image names] [image names] - lsort [image names] + image delete {*}[image names] + eval image delete [image names] [image names] + lsort [image names] } } -cleanup { interp delete testinterp @@ -258,7 +258,7 @@ test image-5.2 {Tk_ImageCmd procedure, "type" option} -body { } -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} +} -returnCodes error -result {image "foo" does not exist} test image-5.4 {Tk_ImageCmd procedure, "type" option} -constraints { testImageType @@ -281,7 +281,7 @@ test image-5.5 {Tk_ImageCmd procedure, "type" option} -constraints { image type myimage } -cleanup { imageCleanup -} -returnCodes error -result {image "myimage" doesn't exist} +} -returnCodes error -result {image "myimage" does not exist} test image-5.6 {Tk_ImageCmd procedure, "type" option} -constraints { testOldImageType } -setup { @@ -326,7 +326,7 @@ test image-7.2 {Tk_ImageCmd procedure, "width" option} -body { } -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} +} -returnCodes error -result {image "foo" does not exist} test image-7.4 {Tk_ImageCmd procedure, "width" option} -constraints { testImageType } -setup { @@ -370,10 +370,6 @@ test image-9.1 {Tk_ImageChanged procedure} -constraints testImageType -setup { foo changed 5 6 7 8 30 15 update idletasks update - # On MacOS we need to wait for the test image display procedure to run. - while {"timed out" ni $x && [lindex $x end 1] ne "display"} { - vwait x - } after cancel $timer return $x } -cleanup { @@ -408,7 +404,7 @@ test image-10.1 {Tk_GetImage procedure} -setup { .c create image 100 10 -image bad_name } -cleanup { imageCleanup -} -returnCodes error -result {image "bad_name" doesn't exist} +} -returnCodes error -result {image "bad_name" does not exist} test image-10.2 {Tk_GetImage procedure} -constraints testImageType -setup { destroy .l imageCleanup @@ -420,7 +416,7 @@ test image-10.2 {Tk_GetImage procedure} -constraints testImageType -setup { } -cleanup { destroy .l imageCleanup -} -returnCodes error -result {image "mytest" doesn't exist} +} -returnCodes error -result {image "mytest" does not exist} test image-11.1 {Tk_FreeImage procedure} -constraints testImageType -setup { @@ -581,7 +577,7 @@ test image-13.2 {DeleteImage procedure} -constraints testImageType -setup { lappend x | [imageNames] | [catch {image delete foo} msg] | $msg | [imageNames] | } -cleanup { imageCleanup -} -result {{foo free} {foo free} {foo delete} | {} | 1 | {image "foo" doesn't exist} | {} |} +} -result {{foo free} {foo free} {foo delete} | {} | 1 | {image "foo" does not exist} | {} |} test image-13.3 {Tk_SizeOfImage procedure} -constraints testOldImageType -setup { imageCleanup diff --git a/tests/imgBmap.test b/tests/imgBmap.test index ecb098e..c498c90 100644 --- a/tests/imgBmap.test +++ b/tests/imgBmap.test @@ -157,7 +157,7 @@ test imageBmap-3.3 {ImgBmapConfigureModel procedure, memory de-allocation} -body test imageBmap-3.4 {ImgBmapConfigureModel procedure} -body { image create bitmap i1 i1 configure -maskdata $data2 -} -returnCodes error -result {can't have mask without bitmap} +} -returnCodes error -result {cannot have a mask without a bitmap} test imageBmap-3.5 {ImgBmapConfigureModel procedure} -body { image create bitmap i1 -data $data1 -maskdata { #define foo_width 8 diff --git a/tests/imgListFormat.test b/tests/imgListFormat.test index 3c6da21..f7f2553 100644 --- a/tests/imgListFormat.test +++ b/tests/imgListFormat.test @@ -112,12 +112,12 @@ test imgListFormat-3.1 {StringMatchDef: data is not a list} -body { } -returnCodes error -result {unmatched open quote in list} # empty data case tested with imgPhoto-4.95 (imgPhoto.test) test imgListFormat-3.2 {StringMatchDef: \ - list element not a proper list} -body { + list element not a proper list} -body { testphotostringmatch {{red white} {not "} {blue green}} # " } -returnCodes error -result {unmatched open quote in list} test imgListFormat-3.3 {StringMatchDef: \ - sublists with differen lengths} -body { + sublists with differen lengths} -body { testphotostringmatch {{#001122 #334455 #667788} {#99AABB #CCDDEE} {#FF0011 #223344 #556677}} @@ -141,7 +141,7 @@ test imgListFormat-3.5 {StringMatchDef: valid data} -setup { } -body { photo1 put {{blue green} {yellow magenta} - {#000000 #FFFFFFFF}} + {#000000 #FFFFFFFF}} list [image width photo1] [image height photo1] \ [photo1 get 0 2 -withalpha] } -cleanup { @@ -334,7 +334,7 @@ test imgListFormat-6.3 {ParseColor: color name too long} -setup { image create photo photo1 set longstr {} for {set i 1} {$i <= 100} {incr i} { - append longstr "z" + append longstr "z" } } -body { photo1 put [list [list blue] [list $longstr]] @@ -510,7 +510,7 @@ test imgListFormat-8.4 {ParseColor: valid #RGBA color} -setup { } -result {{155 213 2 13} {119 170 204 255}} test imgListFormat-9.1 {ParseColorAsStandard: - Tk color, valid suffixes} -setup { + Tk color, valid suffixes} -setup { image create photo photo1 set result {} } -body { @@ -525,7 +525,7 @@ test imgListFormat-9.1 {ParseColorAsStandard: imageCleanup } -result {{0 0 255 181} {17 68 51 204} {136 221 68 26} {255 0 255 255}} test imgListFormat-9.2 {ParseColorAsStandard: - Tk color with and w/o suffixes} -setup { + Tk color with and w/o suffixes} -setup { image create photo photo1 set result {} } -body { @@ -587,7 +587,7 @@ test imgListFormat-9.8 {ParseColorAsStandard: # suffix, no hex digits} -setup { imageCleanup } -returnCodes error -result {invalid alpha suffix "#"} test imgListFormat-9.9 {ParseColorAsStandard: - '#' suffix, too many digits} -setup { + '#' suffix, too many digits} -setup { image create photo photo1 } -body { photo1 put {{#ABC#12 #ABC#123}} @@ -595,7 +595,7 @@ test imgListFormat-9.9 {ParseColorAsStandard: imageCleanup } -returnCodes error -result {invalid alpha suffix "#123"} test imgListFormat-9.10 {ParseColorAsStandard: - invalid digit in #X suffix} -setup { + invalid digit in #X suffix} -setup { image create photo photo1 } -body { photo1 put {#000#a #000#g} @@ -603,7 +603,7 @@ test imgListFormat-9.10 {ParseColorAsStandard: imageCleanup } -returnCodes error -result {invalid alpha suffix "#g": expected hex digit} test imgListFormat-9.11 {ParseColorAsStandard: - invalid digit in #XX suffix} -setup { + invalid digit in #XX suffix} -setup { image create photo photo1 } -body { photo1 put {green#2 green#2W} @@ -611,7 +611,7 @@ test imgListFormat-9.11 {ParseColorAsStandard: imageCleanup } -returnCodes error -result {invalid alpha suffix "#2W": expected hex digit} test imgListFormat-9.12 {ParseColorAsStandard: - invalid color: not a hex digit} -setup { + invalid color: not a hex digit} -setup { image create photo photo1 } -body { photo1 put {#ABCDEF@.99 #ABCDEG@.99} diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index 0a2cf7f..e292d94 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -365,7 +365,7 @@ test imgPhoto-4.12 {ImgPhotoCmd procedure: copy option} -setup { photo1 copy blah } -returnCodes error -cleanup { image delete photo1 -} -result {image "blah" doesn't exist or is not a photo image} +} -result {image "blah" does not exist or is not a photo image} test imgPhoto-4.13 {ImgPhotoCmd procedure: copy option} -setup { image create photo photo1 image create photo photo2 @@ -1018,7 +1018,7 @@ test imgPhoto-4.87 {ImgPhotoCmd, transparency set: no opt} -setup { photo1 transparency set 0 0 0 photo1 transparency set 1 0 1 list [photo1 transparency get 0 0 -alpha] \ - [photo1 transparency get 1 0 -alpha] + [photo1 transparency get 1 0 -alpha] } -cleanup { imageCleanup } -result {255 0} @@ -1064,17 +1064,17 @@ test imgPhoto-4.93 {ImgPhotoCmd put: data in ppm format} -setup { photo2 put $imgdata -format ppm set result {} if {[image width photo1] != [image width photo2] \ - || [image height photo1] != [image height photo2]} { - lappend result [list [image width photo2] [image height photo2]] + || [image height photo1] != [image height photo2]} { + lappend result [list [image width photo2] [image height photo2]] } else { - lappend result 1 + lappend result 1 } foreach point {{206 125} {67 12} {13 46} {19 184}} { - if {[photo1 get {*}$point] ne [photo2 get {*}$point]} { - lappend result [photo2 get {*}$point] - } else { - lappend result 1 - } + if {[photo1 get {*}$point] ne [photo2 get {*}$point]} { + lappend result [photo2 get {*}$point] + } else { + lappend result 1 + } } set result } -cleanup { @@ -1099,7 +1099,7 @@ test imgPhoto-4.96 {ImgPhotoCmd put: "default" handler is selected} -setup { image create photo photo1 image create photo photo2 set imgData {{{1 2 3 4} {5 6 7 8} {9 10 11 12}} - {{13 14 15 15} {17 18 19 20} {21 22 23 24}}} + {{13 14 15 15} {17 18 19 20} {21 22 23 24}}} } -body { photo1 put $imgData photo2 put $imgData -format default @@ -1107,8 +1107,8 @@ test imgPhoto-4.96 {ImgPhotoCmd put: "default" handler is selected} -setup { lappend result [list [image width photo1] [image height photo1]] lappend result [list [image width photo2] [image height photo2]] lappend result [string equal \ - [photo1 data -format "default -colorformat rgba"] \ - [photo2 data -format "default -colorformat rgba"]] + [photo1 data -format "default -colorformat rgba"] \ + [photo2 data -format "default -colorformat rgba"]] set result } -cleanup { imageCleanup @@ -1246,9 +1246,9 @@ test imgPhoto-4.111 {ImgPhotoCmd data: invalid -from coords #4} -setup { {coordinates for -from option extend outside image} test imgPhoto-4.112 {ImgPhotoCmd data: -from with 2 coords} -setup { image create photo photo1 -data { - {black black black black black} - {white white white white white} - {green green green green green}} + {black black black black black} + {white white white white white} + {green green green green green}} } -body { set imgData [photo1 data -from 2 1] list [llength [lindex $imgData 0]] [llength $imgData] @@ -1288,7 +1288,7 @@ test imgPhoto-4.117 {ImgPhotoCmd data: list colorformat} -setup { # This testcase fails with Tcl < 8.6.7, due to [25842c] test imgPhoto-4.118 {ImgPhotoCmd data: using data for new image results in same image as orignial } -constraints { - needsTcl867 + needsTcl867 } -setup { image create photo teapot -file $teapotPhotoFile teapot copy teapot -from 50 60 70 80 -shrink @@ -1300,19 +1300,19 @@ test imgPhoto-4.118 {ImgPhotoCmd data: using data for new image # We don't test gif here, as there seems to be a problem with # <imgName> data and gif format ("too many colors", probably a bug) foreach fmt {ppm png {default -colorformat rgba} \ - {default -colorformat list}} { - set imgData [teapotTransp data -format $fmt] - photo1 blank - photo1 put $imgData - if { ! [string equal [photo1 data] [teapotTransp data]]} { - lappend result $fmt - } + {default -colorformat list}} { + set imgData [teapotTransp data -format $fmt] + photo1 blank + photo1 put $imgData + if { ! [string equal [photo1 data] [teapotTransp data]]} { + lappend result $fmt + } } set imgData [teapot data -format default] photo1 blank photo1 put $imgData if { ! [string equal [photo1 data] [teapot data]]} { - lappend result default + lappend result default } set result } -cleanup { @@ -1431,7 +1431,7 @@ test imgPhoto-8.3 {ImgPhotoDelete procedure, name cleanup} -body { photo1 copy photo2 } -returnCodes error -cleanup { imageCleanup -} -result {image "photo2" doesn't exist or is not a photo image} +} -result {image "photo2" does not exist or is not a photo image} test imgPhoto-9.1 {ImgPhotoCmdDeletedProc procedure} -body { image create photo photo2 -file $teapotPhotoFile @@ -1488,7 +1488,7 @@ test imgPhoto-11.1 {Tk_FindPhoto} -setup { photo1 copy i1 } -cleanup { imageCleanup -} -returnCodes error -result {image "i1" doesn't exist or is not a photo image} +} -returnCodes error -result {image "i1" does not exist or is not a photo image} test imgPhoto-12.1 {Tk_PhotoPutZoomedBlock} -body { image create photo p3 -file $teapotPhotoFile @@ -1824,7 +1824,7 @@ test imgPhoto-19.1 {MatchStringFormat: with "-format default"} -setup { imageCleanup } -result {3 2} test imgPhoto-19.2 {MatchStringFormat: without -format option, - default fmt} -body { + default fmt} -body { image create photo photo1 photo1 put {{red} {green}} list [image width photo1] [image height photo1] @@ -2062,9 +2062,9 @@ test imgPhoto-21.4 {bug daa10097: only 3 metadata list items on configure} -setu } -body { set a {} foreach line [photo1 configure] { - if {[lindex $line 0] eq {-metadata}} { - set a $line - } + if {[lindex $line 0] eq {-metadata}} { + set a $line + } } set a } -cleanup { diff --git a/tests/imgSVGnano.test b/tests/imgSVGnano.test index 2da15e7..dc1bf45 100644 --- a/tests/imgSVGnano.test +++ b/tests/imgSVGnano.test @@ -16,18 +16,18 @@ namespace eval svgnano { variable data set data(plus) {\ - <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"> - <path fill="none" stroke="#000000" d="M0 0 h16 v16 h-16 z"/> - <path fill="none" stroke="#000000" d="M8 4 v 8 M4 8 h 8"/> - <circle fill="yellow" stroke="red" cx="10" cy="80" r="10" /> - <ellipse fill="none" stroke="blue" stroke-width="3" cx="60" cy="60" rx="10" ry="20" /> - <line x1="10" y1="90" x2="50" y2="99"/> - <rect fill="none" stroke="green" x="20" y="20" width="60" height="50" rx="3" ry="3"/> - <polyline fill="red" stroke="purple" points="80,10 90,20 85,40"/> - <polygon fill ="yellow" points="80,80 70,85 90,90"/> - </svg>} - set data(bad) {<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0:w"> - </svg>\ + <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"> + <path fill="none" stroke="#000000" d="M0 0 h16 v16 h-16 z"/> + <path fill="none" stroke="#000000" d="M8 4 v 8 M4 8 h 8"/> + <circle fill="yellow" stroke="red" cx="10" cy="80" r="10" /> + <ellipse fill="none" stroke="blue" stroke-width="3" cx="60" cy="60" rx="10" ry="20" /> + <line x1="10" y1="90" x2="50" y2="99"/> + <rect fill="none" stroke="green" x="20" y="20" width="60" height="50" rx="3" ry="3"/> + <polyline fill="red" stroke="purple" points="80,10 90,20 85,40"/> + <polygon fill ="yellow" points="80,80 70,85 90,90"/> + </svg>} + set data(bad) {<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0:w"> + </svg>\ } tcltest::makeFile $data(plus) plus.svg diff --git a/tests/listbox.test b/tests/listbox.test index c02f389..c4b7c15 100644 --- a/tests/listbox.test +++ b/tests/listbox.test @@ -107,7 +107,7 @@ test listbox-1.9 {configuration options} -body { list [lindex [.l configure -borderwidth] 4] [.l cget -borderwidth] } -cleanup { .l configure -borderwidth [lindex [.l configure -borderwidth] 3] -} -result {1 1} +} -result {1.3 1.3} test listbox-1.10 {configuration options} -body { .l configure -borderwidth badValue } -returnCodes error -result {expected screen distance but got "badValue"} @@ -242,7 +242,7 @@ test listbox-1.37 {configuration options} -body { list [lindex [.l configure -selectborderwidth] 4] [.l cget -selectborderwidth] } -cleanup { .l configure -selectborderwidth [lindex [.l configure -selectborderwidth] 3] -} -result {1 1} +} -result {1.3 1.3} test listbox-1.38 {configuration options} -body { .l configure -selectborderwidth badValue } -returnCodes error -result {expected screen distance but got "badValue"} @@ -502,7 +502,7 @@ test listbox-3.18b {ListboxWidgetCmd procedure, "bbox" option, justified, non-de lappend lres [.top.l bbox 0] [.top.l bbox 1] [.top.l bbox 2] set res 1 for {set i 0} {$i < [llength $lres]} {incr i 4} { - set res [expr {$res * [expr {[lindex $lres $i] >= 0}] }] + set res [expr {$res * [expr {[lindex $lres $i] >= 0}] }] } set res } -cleanup { @@ -3188,7 +3188,7 @@ test listbox-32.1 {Bug [5d991b822e]} { set var INIT listbox .b -listvariable var trace add variable var unset {apply {args { - .b configure -listvariable {} + .b configure -listvariable {} }}} pack .b bind .b <Configure> {unset var} @@ -3201,7 +3201,7 @@ test listbox-32.2 {Bug [5d991b822e]} { set var INIT listbox .b -listvariable var trace add variable var unset {apply {args { - .b configure -listvariable new + .b configure -listvariable new }}} pack .b bind .b <Configure> {unset -nocomplain var} diff --git a/tests/main.test b/tests/main.test index 6b9f598..e481542 100644 --- a/tests/main.test +++ b/tests/main.test @@ -56,16 +56,16 @@ test main-2.2 {Tk_MainEx: -encoding option} -constraints stdio -setup { # 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 - }]} { - return - } - # Grrr... Behavior depends on this value. - after 1000 - } + foreach line [split $script \n] { + if {[catch { + puts $chan $line + flush $chan + }]} { + return + } + # Grrr... Behavior depends on this value. + after 1000 + } } test main-2.3 {Tk_MainEx: -encoding option} -constraints stdio -setup { diff --git a/tests/menu.test b/tests/menu.test index 72369b5..5828879 100644 --- a/tests/menu.test +++ b/tests/menu.test @@ -746,11 +746,11 @@ test menu-2.127 {entry configuration options 0 -image bogus tearoff} -body { test menu-2.128 {entry configuration options 1 -image bogus command} -body { .m1 entryconfigure 1 -image bogus -} -returnCodes error -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not exist} test menu-2.129 {entry configuration options 2 -image bogus cascade} -body { .m1 entryconfigure 2 -image bogus -} -returnCodes error -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not exist} test menu-2.130 {entry configuration options 3 -image bogus separator} -body { .m1 entryconfigure 3 -image bogus @@ -758,11 +758,11 @@ test menu-2.130 {entry configuration options 3 -image bogus separator} -body { test menu-2.131 {entry configuration options 4 -image bogus checkbutton} -body { .m1 entryconfigure 4 -image bogus -} -returnCodes error -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not 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} +} -returnCodes error -result {image "bogus" does not exist} test menu-2.133 {entry configuration options 0 -image {} tearoff} -body { .m1 entryconfigure 0 -image @@ -1027,11 +1027,11 @@ test menu-2.190 {entry configuration options 3 -selectimage bogus separator} -bo test menu-2.191 {entry configuration options 4 -selectimage bogus checkbutton} -body { .m1 entryconfigure 4 -selectimage bogus -} -returnCodes error -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not 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} +} -returnCodes error -result {image "bogus" does not exist} test menu-2.193 {entry configuration options 0 -selectimage {} tearoff} -body { .m1 entryconfigure 0 -selectimage @@ -1865,7 +1865,7 @@ test menu-4.3 {TkInvokeMenu: checkbutton -on} -setup { menu .m1 .m1 add checkbutton -label "test" -variable foo -onvalue on -offvalue off list [catch {.m1 invoke 1} msg] $msg [catch {set foo} msg2] $msg2 \ - [catch {unset foo} msg3] $msg3 + [catch {unset foo} msg3] $msg3 } -cleanup { destroy .m1 } -result {0 {} 0 on 0 {}} @@ -3098,9 +3098,9 @@ test menu-16.19 {MenuAddOrInsert - Insert a cascade deep into the tree} -setup { .menubar.test.cascade add command -label SubItem -command "puts SubItemSelected" . configure -menu .menubar list [catch {.menubar.test add cascade -label SubMenu \ - -menu .menubar.test.cascade}] \ - [info commands .\#menubar.\#menubar\#test.\#menubar\#test\#cascade] \ - [. configure -menu ""] + -menu .menubar.test.cascade}] \ + [info commands .\#menubar.\#menubar\#test.\#menubar\#test\#cascade] \ + [. configure -menu ""] } -cleanup { deleteWindows } -result {0 .#menubar.#menubar#test.#menubar#test#cascade {}} @@ -3113,7 +3113,7 @@ test menu-17.1 {MenuVarProc} -setup { menu .m1 set foo "hello" list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \ - [unset foo] + [unset foo] } -cleanup { deleteWindows } -result {e001 {}} @@ -3124,7 +3124,7 @@ test menu-17.2 {MenuVarProc} -setup { catch {unset foo} menu .m1 list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \ - [set foo ""] + [set foo ""] } -cleanup { deleteWindows } -result {e001 {}} @@ -3135,7 +3135,7 @@ test menu-17.3 {MenuVarProc} -setup { menu .m1 set foo "hello" list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \ - [set foo "hello"] [unset foo] + [set foo "hello"] [unset foo] } -cleanup { deleteWindows } -result {e001 hello {}} @@ -3145,7 +3145,7 @@ test menu-17.4 {MenuVarProc} -setup { menu .m1 set foo "goodbye" list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \ - [set foo "hello"] [unset foo] + [set foo "hello"] [unset foo] } -cleanup { deleteWindows } -result {e001 hello {}} @@ -3155,7 +3155,7 @@ test menu-17.5 {MenuVarProc} -setup { menu .m1 set foo "hello" list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \ - [set foo "goodbye"] [unset foo] + [set foo "goodbye"] [unset foo] } -cleanup { deleteWindows } -result {e001 goodbye {}} @@ -3167,7 +3167,7 @@ test menu-17.6 {MenuVarProc [5d991b822e]} -setup { set var INIT .b add checkbutton -variable var trace add variable var unset {apply {args { - .b entryconfigure 1 -variable {} + .b entryconfigure 1 -variable {} }}} unset var } -cleanup { @@ -3181,7 +3181,7 @@ test menu-17.7 {MenuVarProc [5d991b822e]} -setup { set var INIT .b add checkbutton -variable var trace add variable var unset {apply {args { - .b entryconfigure 1 -variable new + .b entryconfigure 1 -variable new }}} unset var } -cleanup { @@ -3580,7 +3580,7 @@ test menu-24.3 {TkNewMenuName} -setup { menu .#m rename .#m hideme list [catch {. configure -menu [menu .m]}] [. configure -menu ""] [destroy .#m] \ - [destroy .m] [destroy hideme] + [destroy .m] [destroy hideme] } -result {0 {} {} {} {}} @@ -3937,7 +3937,7 @@ test menu-32.6 {DeleteMenuCloneEntries - reentrancy - crashes tk8.0} -setup { } -body { menu .m1 .m1 add command -label test \ - -command ".m1 delete test ; .m1 add command -label test -command \".m1 delete test\"; .m1 delete test" + -command ".m1 delete test ; .m1 add command -label test -command \".m1 delete test\"; .m1 delete test" .m1 invoke test } -cleanup { deleteWindows @@ -3960,8 +3960,8 @@ test menu-32.8 {Ensure all menu clone commands are deleted} -setup { menu .menubar.test .menubar.test add command -label "hi" for {set i 0} {$i < 10} {incr i} { - .menubar add cascade -menu .menubar.test -label "Test" - .menubar delete Test + .menubar add cascade -menu .menubar.test -label "Test" + .menubar delete Test } info commands .#menubar*test* diff --git a/tests/menuDraw.test b/tests/menuDraw.test index 2cafc31..9456ae1 100644 --- a/tests/menuDraw.test +++ b/tests/menuDraw.test @@ -50,7 +50,7 @@ test menuDraw-4.2 {TkMenuEntryFreeDrawOptions} -setup { } -body { menu .m1 .m1 add checkbutton -label "This is a test." -font "Courier 12" \ - -activeforeground red -background green -selectcolor purple + -activeforeground red -background green -selectcolor purple destroy .m1 } -result {} @@ -683,9 +683,9 @@ test menuDraw-17.1 {AdjustMenuCoords - menubar} -constraints unix -setup { .m2 add command -label foo . configure -menu .m1 foreach w [winfo children .] { - if {[$w cget -type] == "menubar"} { - break - } + if {[$w cget -type] == "menubar"} { + break + } } list [$w postcascade 0] [. configure -menu ""] } -cleanup { diff --git a/tests/menubut.test b/tests/menubut.test index 028341f..f997e55 100644 --- a/tests/menubut.test +++ b/tests/menubut.test @@ -98,7 +98,7 @@ test menubutton-1.15 {configuration options} -body { .mb cget -borderwidth } -cleanup { .mb configure -borderwidth [lindex [.mb configure -borderwidth] 3] -} -result 1 +} -result 1.3 test menubutton-1.16 {configuration options} -body { .mb configure -borderwidth badValue } -returnCodes error -result {expected screen distance but got "badValue"} @@ -207,7 +207,7 @@ test menubutton-1.37 {configuration options} -setup { .mb configure -image bogus } -cleanup { .mb configure -image [lindex [.mb configure -image] 3] -} -returnCodes error -result {image "bogus" doesn't exist} +} -returnCodes error -result {image "bogus" does not exist} test menubutton-1.38 {configuration options} -body { .mb configure -indicatoron yes .mb cget -indicatoron @@ -593,7 +593,7 @@ test menubutton-7.4 {ComputeMenuButtonGeometry procedure} -constraints { image create test image1 } -body { menubutton .mb -image image1 -bd 2 -relief raised -width 40 \ - -highlightthickness 2 + -highlightthickness 2 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { @@ -607,7 +607,7 @@ test menubutton-7.5 {ComputeMenuButtonGeometry procedure} -constraints { image create test image1 } -body { menubutton .mb -image image1 -bd 2 -relief raised -height 30 \ - -highlightthickness 2 + -highlightthickness 2 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { @@ -618,7 +618,7 @@ test menubutton-7.6 {ComputeMenuButtonGeometry procedure} -setup { deleteWindows } -body { menubutton .mb -bitmap question -bd 2 -relief raised \ - -highlightthickness 2 + -highlightthickness 2 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { @@ -628,7 +628,7 @@ test menubutton-7.7 {ComputeMenuButtonGeometry procedure} -setup { deleteWindows } -body { menubutton .mb -bitmap question -bd 2 -relief raised -width 40 \ - -highlightthickness 1 + -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { @@ -638,7 +638,7 @@ test menubutton-7.8 {ComputeMenuButtonGeometry procedure} -setup { deleteWindows } -body { menubutton .mb -bitmap question -bd 2 -relief raised -height 50 \ - -highlightthickness 1 + -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { @@ -650,7 +650,7 @@ test menubutton-7.9 {ComputeMenuButtonGeometry procedure} -constraints { deleteWindows } -body { menubutton .mb -text String -bd 2 -relief raised -padx 0 -pady 0 \ - -highlightthickness 1 + -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { @@ -662,7 +662,7 @@ test menubutton-7.10 {ComputeMenuButtonGeometry procedure} -constraints { deleteWindows } -body { menubutton .mb -text String -bd 2 -relief raised -width 20 \ - -padx 0 -pady 0 -highlightthickness 1 + -padx 0 -pady 0 -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { @@ -674,7 +674,7 @@ test menubutton-7.11 {ComputeMenuButtonGeometry procedure} -constraints { deleteWindows } -body { menubutton .mb -text String -bd 2 -relief raised -height 2 \ - -padx 0 -pady 0 -highlightthickness 1 + -padx 0 -pady 0 -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { @@ -686,7 +686,7 @@ test menubutton-7.12 {ComputeMenuButtonGeometry procedure} -constraints { deleteWindows } -body { menubutton .mb -text String -bd 2 -relief raised -padx 10 -pady 5 \ - -highlightthickness 1 + -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { @@ -698,7 +698,7 @@ test menubutton-7.13 {ComputeMenuButtonGeometry procedure} -constraints { deleteWindows } -body { menubutton .mb -text String -bd 2 -relief raised \ - -highlightthickness 1 -indicatoron 1 + -highlightthickness 1 -indicatoron 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { @@ -714,7 +714,7 @@ test menubutton-7.14 {ComputeMenuButtonGeometry procedure} -constraints { # size varies to maintain constant absolute size. menubutton .mb -image image1 -bd 2 -relief raised \ - -highlightthickness 2 -indicatoron 1 + -highlightthickness 2 -indicatoron 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { @@ -731,7 +731,7 @@ test menubutton-7.15 {ComputeMenuButtonGeometry procedure} -constraints { # size varies to maintain constant absolute size. menubutton .mb -image image1 -bd 2 -relief raised \ - -highlightthickness 2 -indicatoron 1 + -highlightthickness 2 -indicatoron 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { @@ -757,7 +757,7 @@ test menubutton-9.1 {Bug [5d991b822e]} { set var INIT menubutton .b -textvariable var trace add variable var unset {apply {args { - .b configure -textvariable {} + .b configure -textvariable {} }}} pack .b bind .b <Configure> {unset var} @@ -770,7 +770,7 @@ test menubutton-9.2 {Bug [5d991b822e]} { set var INIT menubutton .b -textvariable var trace add variable var unset {apply {args { - .b configure -textvariable new + .b configure -textvariable new }}} pack .b bind .b <Configure> {unset -nocomplain var} diff --git a/tests/message.test b/tests/message.test index 4abe2db..311a0ff 100644 --- a/tests/message.test +++ b/tests/message.test @@ -30,7 +30,7 @@ test message-1.2 {configuration option: "anchor"} -setup { .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} +} -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 { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -50,7 +50,7 @@ test message-1.4 {configuration option: "aspect"} -setup { .m configure -aspect bogus } -cleanup { destroy .m -} -returnCodes {error} -result {expected integer but got "bogus"} +} -returnCodes error -result {expected integer but got "bogus"} test message-1.5 {configuration option: "background"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -70,7 +70,7 @@ test message-1.6 {configuration option: "background"} -setup { .m configure -background non-existent } -cleanup { destroy .m -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test message-1.7 {configuration option: "bd"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -90,7 +90,7 @@ test message-1.8 {configuration option: "bd"} -setup { .m configure -bd badValue } -cleanup { destroy .m -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test message-1.9 {configuration option: "bg"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -110,7 +110,7 @@ test message-1.10 {configuration option: "bg"} -setup { .m configure -bg non-existent } -cleanup { destroy .m -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test message-1.11 {configuration option: "borderwidth"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -130,7 +130,7 @@ test message-1.12 {configuration option: "borderwidth"} -setup { .m configure -borderwidth badValue } -cleanup { destroy .m -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test message-1.13 {configuration option: "cursor"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -150,7 +150,7 @@ test message-1.14 {configuration option: "cursor"} -setup { .m configure -cursor badValue } -cleanup { destroy .m -} -returnCodes {error} -result {bad cursor spec "badValue"} +} -returnCodes error -result {bad cursor spec "badValue"} test message-1.15 {configuration option: "fg"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -170,7 +170,7 @@ test message-1.16 {configuration option: "fg"} -setup { .m configure -fg badValue } -cleanup { destroy .m -} -returnCodes {error} -result {unknown color name "badValue"} +} -returnCodes error -result {unknown color name "badValue"} test message-1.17 {configuration option: "font"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -190,7 +190,7 @@ test message-1.18 {configuration option: "font"} -setup { .m configure -font {} } -cleanup { destroy .m -} -returnCodes {error} -result {font "" doesn't exist} +} -returnCodes error -result {font "" does not exist} test message-1.19 {configuration option: "-foreground"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -210,7 +210,7 @@ test message-1.20 {configuration option: "-foreground"} -setup { .m configure -foreground badValue } -cleanup { destroy .m -} -returnCodes {error} -result {unknown color name "badValue"} +} -returnCodes error -result {unknown color name "badValue"} test message-1.21 {configuration option: "highlightbackground"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -230,7 +230,7 @@ test message-1.22 {configuration option: "highlightbackground"} -setup { .m configure -highlightbackground ugly } -cleanup { destroy .m -} -returnCodes {error} -result {unknown color name "ugly"} +} -returnCodes error -result {unknown color name "ugly"} test message-1.23 {configuration option: "highlightcolor"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -250,7 +250,7 @@ test message-1.24 {configuration option: "highlightcolor"} -setup { .m configure -highlightcolor non-existent } -cleanup { destroy .m -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test message-1.25 {configuration option: "highlightthickness"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -270,7 +270,7 @@ test message-1.26 {configuration option: "highlightthickness"} -setup { .m configure -highlightthickness badValue } -cleanup { destroy .m -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test message-1.27 {configuration option: "justify"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -290,7 +290,7 @@ test message-1.28 {configuration option: "justify"} -setup { .m configure -justify bogus } -cleanup { destroy .m -} -returnCodes {error} -result {bad justification "bogus": must be left, right, or center} +} -returnCodes error -result {bad justification "bogus": must be left, right, or center} test message-1.29 {configuration option: "padx"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -310,7 +310,7 @@ test message-1.30 {configuration option: "padx"} -setup { .m configure -padx 420x } -cleanup { destroy .m -} -returnCodes {error} -result {expected screen distance or "" but got "420x"} +} -returnCodes error -result {expected screen distance or "" but got "420x"} test message-1.31 {configuration option: "pady"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -330,7 +330,7 @@ test message-1.32 {configuration option: "pady"} -setup { .m configure -pady 420x } -cleanup { destroy .m -} -returnCodes {error} -result {expected screen distance or "" but got "420x"} +} -returnCodes error -result {expected screen distance or "" but got "420x"} test message-1.33 {configuration option: "relief"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -350,7 +350,7 @@ test message-1.34 {configuration option: "relief"} -setup { .m configure -relief badValue } -cleanup { destroy .m -} -returnCodes {error} -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken} +} -returnCodes error -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken} test message-1.35 {configuration options: "text"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -392,7 +392,7 @@ test message-1.38 {configuration option: "width"} -setup { .m configure -width badValue } -cleanup { destroy .m -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test message-1.39 {configuration options, fallback to default} -setup { message .m -borderwidth -2 -highlightthickness -2 -font {Helvetica -12 bold} pack .m @@ -407,11 +407,11 @@ test message-1.39 {configuration options, fallback to default} -setup { test message-2.1 {Tk_MessageObjCmd procedure} -body { message -} -returnCodes {error} -result {wrong # args: should be "message pathName ?-option value ...?"} +} -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"} +} -returnCodes error -result {bad window path name "foo"} test message-2.3 {Tk_MessageObjCmd procedure} -body { catch {message foo} winfo children . @@ -419,7 +419,7 @@ test message-2.3 {Tk_MessageObjCmd procedure} -body { test message-2.4 {Tk_MessageObjCmd procedure} -body { message .s -gorp dump -} -returnCodes {error} -result {unknown option "-gorp"} +} -returnCodes error -result {unknown option "-gorp"} test message-2.5 {Tk_MessageObjCmd procedure} -body { catch {message .s -gorp dump} winfo children . @@ -486,7 +486,7 @@ test message-4.1 {Bug [5d991b822e]} { set var INIT message .b -textvariable var trace add variable var unset {apply {args { - .b configure -textvariable {} + .b configure -textvariable {} }}} pack .b bind .b <Configure> {unset var} @@ -499,7 +499,7 @@ test message-4.2 {Bug [5d991b822e]} { set var INIT message .b -textvariable var trace add variable var unset {apply {args { - .b configure -textvariable new + .b configure -textvariable new }}} pack .b bind .b <Configure> {unset -nocomplain var} diff --git a/tests/msgbox.test b/tests/msgbox.test index 91e52a7..60955a4 100644 --- a/tests/msgbox.test +++ b/tests/msgbox.test @@ -131,49 +131,49 @@ test msgbox-2.2 {tk_messageBox command -icon option} -constraints { } -body { ChooseMsg . abort tk_messageBox -title Hi -message "Please press abort" \ - -type abortretryignore -icon warning + -type abortretryignore -icon warning } -result {abort} test msgbox-2.3 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . abort tk_messageBox -title Hi -message "Please press abort" \ - -type abortretryignore -icon error + -type abortretryignore -icon error } -result {abort} test msgbox-2.4 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . abort tk_messageBox -title Hi -message "Please press abort" \ - -type abortretryignore -icon info + -type abortretryignore -icon info } -result {abort} test msgbox-2.5 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . abort tk_messageBox -title Hi -message "Please press abort" \ - -type abortretryignore -icon question + -type abortretryignore -icon question } -result {abort} test msgbox-2.6 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . abort tk_messageBox -title Hi -message "Please press abort" \ - -type abortretryignore -default abort + -type abortretryignore -default abort } -result {abort} test msgbox-2.7 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . retry tk_messageBox -title Hi -message "Please press retry" \ - -type abortretryignore -default retry + -type abortretryignore -default retry } -result {retry} test msgbox-2.8 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . ignore tk_messageBox -title Hi -message "Please press ignore" \ - -type abortretryignore -default ignore + -type abortretryignore -default ignore } -result {ignore} test msgbox-2.9 {tk_messageBox command} -constraints { nonUnixUserInteraction @@ -186,35 +186,35 @@ test msgbox-2.10 {tk_messageBox command -icon option} -constraints { } -body { ChooseMsg . ok tk_messageBox -title Hi -message "Please press ok" \ - -type ok -icon warning + -type ok -icon warning } -result {ok} test msgbox-2.11 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . ok tk_messageBox -title Hi -message "Please press ok" \ - -type ok -icon error + -type ok -icon error } -result {ok} test msgbox-2.12 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . ok tk_messageBox -title Hi -message "Please press ok" \ - -type ok -icon info + -type ok -icon info } -result {ok} test msgbox-2.13 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . ok tk_messageBox -title Hi -message "Please press ok" \ - -type ok -icon question + -type ok -icon question } -result {ok} test msgbox-2.14 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . ok tk_messageBox -title Hi -message "Please press ok" \ - -type ok -default ok + -type ok -default ok } -result {ok} test msgbox-2.15 {tk_messageBox command} -constraints { nonUnixUserInteraction @@ -227,42 +227,42 @@ test msgbox-2.16 {tk_messageBox command -icon option} -constraints { } -body { ChooseMsg . ok tk_messageBox -title Hi -message "Please press ok" \ - -type okcancel -icon warning + -type okcancel -icon warning } -result {ok} test msgbox-2.17 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . ok tk_messageBox -title Hi -message "Please press ok" \ - -type okcancel -icon error + -type okcancel -icon error } -result {ok} test msgbox-2.18 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . ok tk_messageBox -title Hi -message "Please press ok" \ - -type okcancel -icon info + -type okcancel -icon info } -result {ok} test msgbox-2.19 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . ok tk_messageBox -title Hi -message "Please press ok" \ - -type okcancel -icon question + -type okcancel -icon question } -result {ok} test msgbox-2.20 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . ok tk_messageBox -title Hi -message "Please press ok" \ - -type okcancel -default ok + -type okcancel -default ok } -result {ok} test msgbox-2.21 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . cancel tk_messageBox -title Hi -message "Please press cancel" \ - -type okcancel -default cancel + -type okcancel -default cancel } -result {cancel} test msgbox-2.22 {tk_messageBox command} -constraints { nonUnixUserInteraction @@ -275,42 +275,42 @@ test msgbox-2.23 {tk_messageBox command -icon option} -constraints { } -body { ChooseMsg . retry tk_messageBox -title Hi -message "Please press retry" \ - -type retrycancel -icon warning + -type retrycancel -icon warning } -result {retry} test msgbox-2.24 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . retry tk_messageBox -title Hi -message "Please press retry" \ - -type retrycancel -icon error + -type retrycancel -icon error } -result {retry} test msgbox-2.25 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . retry tk_messageBox -title Hi -message "Please press retry" \ - -type retrycancel -icon info + -type retrycancel -icon info } -result {retry} test msgbox-2.26 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . retry tk_messageBox -title Hi -message "Please press retry" \ - -type retrycancel -icon question + -type retrycancel -icon question } -result {retry} test msgbox-2.27 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . retry tk_messageBox -title Hi -message "Please press retry" \ - -type retrycancel -default retry + -type retrycancel -default retry } -result {retry} test msgbox-2.28 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . cancel tk_messageBox -title Hi -message "Please press cancel" \ - -type retrycancel -default cancel + -type retrycancel -default cancel } -result {cancel} test msgbox-2.29 {tk_messageBox command} -constraints { nonUnixUserInteraction @@ -323,42 +323,42 @@ test msgbox-2.30 {tk_messageBox command -icon option} -constraints { } -body { ChooseMsg . yes tk_messageBox -title Hi -message "Please press yes" \ - -type yesno -icon warning + -type yesno -icon warning } -result {yes} test msgbox-2.31 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . yes tk_messageBox -title Hi -message "Please press yes" \ - -type yesno -icon error + -type yesno -icon error } -result {yes} test msgbox-2.32 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . yes tk_messageBox -title Hi -message "Please press yes" \ - -type yesno -icon info + -type yesno -icon info } -result {yes} test msgbox-2.33 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . yes tk_messageBox -title Hi -message "Please press yes" \ - -type yesno -icon question + -type yesno -icon question } -result {yes} test msgbox-2.34 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . yes tk_messageBox -title Hi -message "Please press yes" \ - -type yesno -default yes + -type yesno -default yes } -result {yes} test msgbox-2.35 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . no tk_messageBox -title Hi -message "Please press no" \ - -type yesno -default no + -type yesno -default no } -result {no} test msgbox-2.36 {tk_messageBox command} -constraints { nonUnixUserInteraction @@ -371,49 +371,49 @@ test msgbox-2.37 {tk_messageBox command -icon option} -constraints { } -body { ChooseMsg . yes tk_messageBox -title Hi -message "Please press yes" \ - -type yesnocancel -icon warning + -type yesnocancel -icon warning } -result {yes} test msgbox-2.38 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . yes tk_messageBox -title Hi -message "Please press yes" \ - -type yesnocancel -icon error + -type yesnocancel -icon error } -result {yes} test msgbox-2.39 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . yes tk_messageBox -title Hi -message "Please press yes" \ - -type yesnocancel -icon info + -type yesnocancel -icon info } -result {yes} test msgbox-2.40 {tk_messageBox command -icon option} -constraints { nonUnixUserInteraction } -body { ChooseMsg . yes tk_messageBox -title Hi -message "Please press yes" \ - -type yesnocancel -icon question + -type yesnocancel -icon question } -result {yes} test msgbox-2.41 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . yes tk_messageBox -title Hi -message "Please press yes" \ - -type yesnocancel -default yes + -type yesnocancel -default yes } -result {yes} test msgbox-2.42 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . no tk_messageBox -title Hi -message "Please press no" \ - -type yesnocancel -default no + -type yesnocancel -default no } -result {no} test msgbox-2.43 {tk_messageBox command} -constraints { nonUnixUserInteraction } -body { ChooseMsg . cancel tk_messageBox -title Hi -message "Please press cancel" \ - -type yesnocancel -default cancel + -type yesnocancel -default cancel } -result {cancel} diff --git a/tests/pack.test b/tests/pack.test index 0731125..db1bd88 100644 --- a/tests/pack.test +++ b/tests/pack.test @@ -594,7 +594,7 @@ test pack-6.1 {-expand option} -setup { pack .pack.a .pack.b .pack.c .pack.d -side left update list [winfo geometry .pack.a] [winfo geometry .pack.b] \ - [winfo geometry .pack.c] [winfo geometry .pack.d] + [winfo geometry .pack.c] [winfo geometry .pack.d] } -result {20x40+0+80 50x30+20+85 80x80+70+60 40x30+150+85} test pack-6.2 {-expand option} -setup { pack forget .pack.a .pack.b .pack.c .pack.d @@ -604,7 +604,7 @@ test pack-6.2 {-expand option} -setup { pack .pack.c .pack.d -side left -expand 1 update list [winfo geometry .pack.a] [winfo geometry .pack.b] \ - [winfo geometry .pack.c] [winfo geometry .pack.d] + [winfo geometry .pack.c] [winfo geometry .pack.d] } -result {20x40+18+80 50x30+56+85 80x80+124+60 40x30+241+85} test pack-6.3 {-expand option} -setup { pack forget .pack.a .pack.b .pack.c .pack.d @@ -612,7 +612,7 @@ test pack-6.3 {-expand option} -setup { pack .pack.a .pack.b .pack.c .pack.d -side top update list [winfo geometry .pack.a] [winfo geometry .pack.b] \ - [winfo geometry .pack.c] [winfo geometry .pack.d] + [winfo geometry .pack.c] [winfo geometry .pack.d] } -result {20x40+140+0 50x30+125+40 80x80+110+70 40x30+130+150} test pack-6.4 {-expand option} -setup { pack forget .pack.a .pack.b .pack.c .pack.d @@ -622,7 +622,7 @@ test pack-6.4 {-expand option} -setup { pack .pack.c .pack.d -side top -expand 1 update list [winfo geometry .pack.a] [winfo geometry .pack.b] \ - [winfo geometry .pack.c] [winfo geometry .pack.d] + [winfo geometry .pack.c] [winfo geometry .pack.d] } -result {20x40+140+3 50x30+125+46 80x80+110+79 40x30+130+166} test pack-6.5 {-expand option} -setup { pack forget .pack.a .pack.b .pack.c .pack.d @@ -630,7 +630,7 @@ test pack-6.5 {-expand option} -setup { pack .pack.a .pack.b .pack.c .pack.d -side right update list [winfo geometry .pack.a] [winfo geometry .pack.b] \ - [winfo geometry .pack.c] [winfo geometry .pack.d] + [winfo geometry .pack.c] [winfo geometry .pack.d] } -result {20x40+280+80 50x30+230+85 80x80+150+60 40x30+110+85} test pack-6.6 {-expand option} -setup { pack forget .pack.a .pack.b .pack.c .pack.d @@ -640,7 +640,7 @@ test pack-6.6 {-expand option} -setup { pack .pack.c .pack.d -side right -expand 1 update list [winfo geometry .pack.a] [winfo geometry .pack.b] \ - [winfo geometry .pack.c] [winfo geometry .pack.d] + [winfo geometry .pack.c] [winfo geometry .pack.d] } -result {20x40+262+80 50x30+194+85 80x80+95+60 40x30+18+85} test pack-6.7 {-expand option} -setup { pack forget .pack.a .pack.b .pack.c .pack.d @@ -648,7 +648,7 @@ test pack-6.7 {-expand option} -setup { pack .pack.a .pack.b .pack.c .pack.d -side bottom update list [winfo geometry .pack.a] [winfo geometry .pack.b] \ - [winfo geometry .pack.c] [winfo geometry .pack.d] + [winfo geometry .pack.c] [winfo geometry .pack.d] } -result {20x40+140+160 50x30+125+130 80x80+110+50 40x30+130+20} test pack-6.8 {-expand option} -setup { pack forget .pack.a .pack.b .pack.c .pack.d @@ -658,7 +658,7 @@ test pack-6.8 {-expand option} -setup { pack .pack.c .pack.d -side bottom -expand 1 update list [winfo geometry .pack.a] [winfo geometry .pack.b] \ - [winfo geometry .pack.c] [winfo geometry .pack.d] + [winfo geometry .pack.c] [winfo geometry .pack.d] } -result {20x40+140+157 50x30+125+124 80x80+110+40 40x30+130+3} test pack-6.9 {-expand option} -setup { pack forget .pack.a .pack.b .pack.c .pack.d @@ -669,7 +669,7 @@ test pack-6.9 {-expand option} -setup { pack .pack.d -side left update list [winfo geometry .pack.a] [winfo geometry .pack.b] \ - [winfo geometry .pack.c] [winfo geometry .pack.d] + [winfo geometry .pack.c] [winfo geometry .pack.d] } -result {300x65+0+135 50x30+250+52 250x105+0+0 40x30+0+105} test pack-6.10 {-expand option} -setup { pack forget .pack.a .pack.b .pack.c .pack.d @@ -680,7 +680,7 @@ test pack-6.10 {-expand option} -setup { pack .pack.d -side bottom update list [winfo geometry .pack.a] [winfo geometry .pack.b] \ - [winfo geometry .pack.c] [winfo geometry .pack.d] + [winfo geometry .pack.c] [winfo geometry .pack.d] } -result {100x200+0+0 50x30+175+0 160x170+140+30 40x30+100+170} test pack-6.11 {-expand option} -setup { pack forget .pack.a .pack.b .pack.c .pack.d @@ -691,16 +691,16 @@ test pack-6.11 {-expand option} -setup { pack .pack.d -side bottom -expand yes -fill both update list [winfo geometry .pack.a] [winfo geometry .pack.b] \ - [winfo geometry .pack.c] [winfo geometry .pack.d] + [winfo geometry .pack.c] [winfo geometry .pack.d] } -result {100x200+0+0 200x100+100+0 160x100+140+100 40x100+100+100} test pack-6.12 {-expand option} -setup { toplevel .pack2 -height 400 -width 400 wm geometry .pack2 +0+0 pack propagate .pack2 0 foreach i {w1 w2 w3} { - frame .pack2.$i -width 30 -height 30 -bd 2 -relief raised - label .pack2.$i.l -text $i - place .pack2.$i.l -relwidth 1.0 -relheight 1.0 + frame .pack2.$i -width 30 -height 30 -bd 2 -relief raised + label .pack2.$i.l -text $i + place .pack2.$i.l -relwidth 1.0 -relheight 1.0 } } -body { pack .pack2.w1 .pack2.w2 .pack2.w3 -padx 5 -ipadx 4 -pady 2 -ipady 6 -expand 1 -side left @@ -714,13 +714,13 @@ test pack-6.13 {-expand option} -setup { wm geometry .pack2 +0+0 pack propagate .pack2 0 foreach i {w1 w2 w3} { - frame .pack2.$i -width 30 -height 30 -bd 2 -relief raised - label .pack2.$i.l -text $i - place .pack2.$i.l -relwidth 1.0 -relheight 1.0 + frame .pack2.$i -width 30 -height 30 -bd 2 -relief raised + label .pack2.$i.l -text $i + place .pack2.$i.l -relwidth 1.0 -relheight 1.0 } } -body { pack .pack2.w1 .pack2.w2 .pack2.w3 -padx 5 -ipadx 4 -pady 2 \ - -ipady 6 -expand 1 -side top + -ipady 6 -expand 1 -side top update list [winfo geometry .pack2.w1] [winfo geometry .pack2.w2] [winfo geometry .pack2.w3] } -cleanup { @@ -800,29 +800,29 @@ pack .pack.a .pack.b .pack.c -side top update test pack-8.1 {insufficient space} -body { list [winfo geometry .pack.a] [winfo ismapped .pack.a] \ - [winfo geometry .pack.b] [winfo ismapped .pack.b] \ - [winfo geometry .pack.c] [winfo ismapped .pack.c] + [winfo geometry .pack.b] [winfo ismapped .pack.b] \ + [winfo geometry .pack.c] [winfo ismapped .pack.c] } -result {20x40+30+0 1 50x30+15+40 1 80x80+0+70 1} wm geom .pack 270x250 update test pack-8.2 {insufficient space} -body { list [winfo geometry .pack.a] [winfo ismapped .pack.a] \ - [winfo geometry .pack.b] [winfo ismapped .pack.b] \ - [winfo geometry .pack.c] [winfo ismapped .pack.c] + [winfo geometry .pack.b] [winfo ismapped .pack.b] \ + [winfo geometry .pack.c] [winfo ismapped .pack.c] } -result {20x40+25+0 1 50x30+10+40 1 70x30+0+70 1} wm geom .pack 240x220 update test pack-8.3 {insufficient space} -body { list [winfo geometry .pack.a] [winfo ismapped .pack.a] \ - [winfo geometry .pack.b] [winfo ismapped .pack.b] \ - [winfo geometry .pack.c] [winfo ismapped .pack.c] + [winfo geometry .pack.b] [winfo ismapped .pack.b] \ + [winfo geometry .pack.c] [winfo ismapped .pack.c] } -result {20x40+10+0 1 40x30+0+40 1 70x30+0+70 0} wm geom .pack 350x350 update test pack-8.4 {insufficient space} -body { list [winfo geometry .pack.a] [winfo ismapped .pack.a] \ - [winfo geometry .pack.b] [winfo ismapped .pack.b] \ - [winfo geometry .pack.c] [winfo ismapped .pack.c] + [winfo geometry .pack.b] [winfo ismapped .pack.b] \ + [winfo geometry .pack.c] [winfo ismapped .pack.c] } -result {20x40+65+0 1 50x30+50+40 1 80x80+35+70 1} wm geom .pack {} pack .pack.a -side left @@ -831,37 +831,37 @@ pack .pack.c -side left update test pack-8.5 {insufficient space} -body { list [winfo geometry .pack.a] [winfo ismapped .pack.a] \ - [winfo geometry .pack.b] [winfo ismapped .pack.b] \ - [winfo geometry .pack.c] [winfo ismapped .pack.c] + [winfo geometry .pack.b] [winfo ismapped .pack.b] \ + [winfo geometry .pack.c] [winfo ismapped .pack.c] } -result {20x40+0+20 1 50x30+100+25 1 80x80+20+0 1} wm geom .pack 320x180 update test pack-8.6 {insufficient space} -body { list [winfo geometry .pack.a] [winfo ismapped .pack.a] \ - [winfo geometry .pack.b] [winfo ismapped .pack.b] \ - [winfo geometry .pack.c] [winfo ismapped .pack.c] + [winfo geometry .pack.b] [winfo ismapped .pack.b] \ + [winfo geometry .pack.c] [winfo ismapped .pack.c] } -result {20x30+0+0 1 50x30+70+0 1 50x30+20+0 1} wm geom .pack 250x180 update test pack-8.7 {insufficient space} -body { list [winfo geometry .pack.a] [winfo ismapped .pack.a] \ - [winfo geometry .pack.b] [winfo ismapped .pack.b] \ - [winfo geometry .pack.c] [winfo ismapped .pack.c] + [winfo geometry .pack.b] [winfo ismapped .pack.b] \ + [winfo geometry .pack.c] [winfo ismapped .pack.c] } -result {20x30+0+0 1 30x30+20+0 1 50x30+20+0 0} pack forget .pack.b update test pack-8.8 {insufficient space} -body { list [winfo geometry .pack.a] [winfo ismapped .pack.a] \ - [winfo geometry .pack.b] [winfo ismapped .pack.b] \ - [winfo geometry .pack.c] [winfo ismapped .pack.c] + [winfo geometry .pack.b] [winfo ismapped .pack.b] \ + [winfo geometry .pack.c] [winfo ismapped .pack.c] } -result {20x30+0+0 1 30x30+20+0 0 30x30+20+0 1} pack .pack.b -side right -after .pack.a wm geom .pack {} update test pack-8.9 {insufficient space} -body { list [winfo geometry .pack.a] [winfo ismapped .pack.a] \ - [winfo geometry .pack.b] [winfo ismapped .pack.b] \ - [winfo geometry .pack.c] [winfo ismapped .pack.c] + [winfo geometry .pack.b] [winfo ismapped .pack.b] \ + [winfo geometry .pack.c] [winfo ismapped .pack.c] } -result {20x40+0+20 1 50x30+100+25 1 80x80+20+0 1} pack forget .pack.right .pack.bottom @@ -1176,8 +1176,8 @@ test pack-12.11 {command options and errors} -setup { test pack-12.12 {command options and errors} -setup { pack forget .pack.a .pack.b .pack.c .pack.d } -body { - pack .pack.a -expand "who cares?" -} -returnCodes error -result {expected boolean value but got "who cares?"} + pack .pack.a -expand "who_cares?" +} -returnCodes error -result {expected boolean value but got "who_cares?"} test pack-12.13 {command options and errors} -setup { pack forget .pack.a .pack.b .pack.c .pack.d } -body { @@ -1374,7 +1374,7 @@ test pack-13.1 {window deletion} -setup { destroy .pack.d update set result [list [pack content .pack] [winfo geometry .pack.a] \ - [winfo geometry .pack.b] [winfo geometry .pack.c]] + [winfo geometry .pack.b] [winfo geometry .pack.c]] } -result {{.pack.right .pack.bottom .pack.a .pack.b .pack.c} 20x40+30+0 50x30+15+40 80x80+0+70} test pack-14.1 {respond to changes in expansion} -setup { @@ -1460,10 +1460,10 @@ test pack-15.4 {managing geometry with -in option} -setup { destroy .pack.f1 .pack.f2 } -body { foreach i {1 2} { - frame .pack.f$i -width 100 -height 40 -bd 2 -relief raised - lower .pack.f$i - pack propagate .pack.f$i 0 - pack .pack.f$i -side top + frame .pack.f$i -width 100 -height 40 -bd 2 -relief raised + lower .pack.f$i + pack propagate .pack.f$i 0 + pack .pack.f$i -side top } pack .pack.b -in .pack.f1 -side right update @@ -1486,10 +1486,10 @@ test pack-15.5 {managing geometry with -in option} -setup { destroy .pack.f1 .pack.f2 } -body { foreach i {1 2} { - frame .pack.f$i -width 100 -height 20 -bd 2 -relief raised - lower .pack.f$i - pack propagate .pack.f$i 0 - pack .pack.f$i -side top + frame .pack.f$i -width 100 -height 20 -bd 2 -relief raised + lower .pack.f$i + pack propagate .pack.f$i 0 + pack .pack.f$i -side top } pack .pack.b -in .pack.f2 -side top update @@ -1553,6 +1553,11 @@ test pack-17.2 {PackLostContentProc procedure} -setup { # into account while the window is unmapped. # pack-18.1.2 checks that, on Windows, width/height changes are taken into # account on window remapping. +# +# While these tests pass on macOS, one can see by watching the tests +# that the window .pack is sometimes black, even though the frame is +# colored. So, evidently, even though the size changes are honored, +# the window is sometimes not completely configured. test pack-18.1.1 {unmap content when container unmapped} -constraints { macOrUnix failsOnUbuntu failsOnXQuarz } -setup { @@ -1562,7 +1567,8 @@ test pack-18.1.1 {unmap content when container unmapped} -constraints { # as the screen (screen switch causes scale and other tests to fail). wm geometry .pack +100+100 } -body { - frame .pack.a -width 100 -height 50 -relief raised -bd 2 + frame .pack.a -width 100 -height 50 -relief raised -bd 2 -bg green + after 100 pack .pack.a update set result [winfo ismapped .pack.a] @@ -1571,7 +1577,7 @@ test pack-18.1.1 {unmap content when container unmapped} -constraints { .pack.a configure -width 200 -height 75 update lappend result [winfo width .pack.a] [winfo height .pack.a] \ - [winfo ismapped .pack.a] + [winfo ismapped .pack.a] wm deiconify .pack update lappend result [winfo ismapped .pack.a] @@ -1585,7 +1591,7 @@ test pack-18.1.2 {unmap content when container unmapped} -constraints { # as the screen (screen switch causes scale and other tests to fail). wm geometry .pack +100+100 } -body { - frame .pack.a -width 100 -height 50 -relief raised -bd 2 + frame .pack.a -width 100 -height 50 -relief raised -bd 2 -bg green pack .pack.a update set result [winfo ismapped .pack.a] @@ -1606,8 +1612,8 @@ test pack-18.2 {unmap content when container unmapped} -constraints {failsOnUbun # as the screen (screen switch causes scale and other tests to fail). wm geometry .pack +100+100 } -body { - frame .pack.a -relief raised -bd 2 - frame .pack.b -width 70 -height 30 -relief sunken -bd 2 + frame .pack.a -relief raised -bd 2 -bg green + frame .pack.b -width 70 -height 30 -relief sunken -bd 2 -bg red pack .pack.a pack .pack.b -in .pack.a update @@ -1617,7 +1623,7 @@ test pack-18.2 {unmap content when container unmapped} -constraints {failsOnUbun .pack.b configure -width 100 -height 30 update lappend result [winfo width .pack.b] [winfo height .pack.b] \ - [winfo ismapped .pack.b] + [winfo ismapped .pack.b] wm deiconify .pack update lappend result [winfo ismapped .pack.b] diff --git a/tests/packgrid.test b/tests/packgrid.test index db49f60..63e5b86 100644 --- a/tests/packgrid.test +++ b/tests/packgrid.test @@ -22,7 +22,7 @@ test packgrid-1.1 {pack and grid in same container window} -setup { } -returnCodes error -cleanup { destroy .p destroy .g -} -result {cannot use geometry manager pack inside . because grid is already managing it's content windows} +} -result {cannot use geometry manager "pack" inside ".": grid is already managing its content windows} test packgrid-1.2 {pack and grid in same container window} -setup { grid propagate . true @@ -36,7 +36,7 @@ test packgrid-1.2 {pack and grid in same container window} -setup { } -returnCodes error -cleanup { destroy .p destroy .g -} -result {cannot use geometry manager grid inside . because pack is already managing it's content windows} +} -result {cannot use geometry manager "grid" inside ".": pack is already managing its content windows} test packgrid-1.3 {pack and grid in same container window} -setup { grid propagate . false @@ -137,7 +137,7 @@ test packgrid-2.1 {pack and grid in same container window, change propagation} - } -returnCodes error -cleanup { destroy .p destroy .g -} -result {cannot use geometry manager grid inside . because pack is already managing it's content windows} +} -result {cannot use geometry manager "grid" inside ".": pack is already managing its content windows} test packgrid-2.2 {pack and grid in same container window, change propagation} -setup { grid propagate . true @@ -153,7 +153,7 @@ test packgrid-2.2 {pack and grid in same container window, change propagation} - destroy .p update destroy .g -} -result {cannot use geometry manager pack inside . because grid is already managing it's content windows} +} -result {cannot use geometry manager "pack" inside ".": grid is already managing its content windows} test packgrid-2.3 {pack and grid in same container window, change propagation} -setup { grid propagate . false @@ -170,7 +170,7 @@ test packgrid-2.3 {pack and grid in same container window, change propagation} - } -returnCodes error -cleanup { destroy .p destroy .g -} -result {cannot use geometry manager pack inside . because grid is already managing it's content windows} +} -result {cannot use geometry manager "pack" inside ".": grid is already managing its content windows} test packgrid-2.4 {pack and grid in same container window, change propagation} -setup { grid propagate . false @@ -186,7 +186,7 @@ test packgrid-2.4 {pack and grid in same container window, change propagation} - } -returnCodes error -cleanup { destroy .p destroy .g -} -result {cannot use geometry manager grid inside . because pack is already managing it's content windows} +} -result {cannot use geometry manager "grid" inside ".": pack is already managing its content windows} test packgrid-3.1 {stealing content} -setup { grid propagate . true @@ -229,7 +229,7 @@ test packgrid-3.3 {stealing content} -setup { } -returnCodes error -cleanup { destroy .p destroy .g -} -result {cannot use geometry manager pack inside . because grid is already managing it's content windows} +} -result {cannot use geometry manager "pack" inside ".": grid is already managing its content windows} test packgrid-3.4 {stealing content} -setup { grid propagate . true @@ -244,7 +244,7 @@ test packgrid-3.4 {stealing content} -setup { } -returnCodes error -cleanup { destroy .p destroy .g -} -result {cannot use geometry manager grid inside . because pack is already managing it's content windows} +} -result {cannot use geometry manager "grid" inside ".": pack is already managing its content windows} test packgrid-4.1 {content stolen after container destruction - bug [aa7679685e]} -setup { frame .f diff --git a/tests/panedwindow.test b/tests/panedwindow.test index 45c6deb..34995e1 100644 --- a/tests/panedwindow.test +++ b/tests/panedwindow.test @@ -49,7 +49,7 @@ test panedwindow-1.7 {configuration options: -borderwidth (good)} -body { list [lindex [.p configure -borderwidth] 4] [.p cget -borderwidth] } -cleanup { .p configure -borderwidth [lindex [.p configure -borderwidth] 3] -} -result {1 1} +} -result {1.3 1.3} test panedwindow-1.8 {configuration options: -borderwidth (bad)} -body { .p configure -borderwidth badValue } -returnCodes error -result {expected screen distance but got "badValue"} @@ -148,7 +148,7 @@ test panedwindow-1.29 {configuration options: -sashpad (good)} -body { list [lindex [.p configure -sashpad] 4] [.p cget -sashpad] } -cleanup { .p configure -sashpad [lindex [.p configure -sashpad] 3] -} -result {1 1} +} -result {1.3 1.3} test panedwindow-1.30 {configuration options: -sashpad (bad)} -body { .p configure -sashpad badValue } -returnCodes error -result {expected screen distance but got "badValue"} @@ -192,7 +192,7 @@ test panedwindow-1.38 {configuration options: -width (bad)} -body { test panedwindow-1.39 {configuration options: -after (good)} -body { .p paneconfigure .b -after .c list [lindex [.p paneconfigure .b -after] 4] \ - [.p panecget .b -after] + [.p panecget .b -after] } -cleanup { .p paneconfig .b -after [lindex [.p paneconfig .b -after] 3] } -result {.c .c} @@ -202,7 +202,7 @@ test panedwindow-1.40 {configuration options: -after (bad)} -body { test panedwindow-1.41 {configuration options: -before (good)} -body { .p paneconfigure .b -before .c list [lindex [.p paneconfigure .b -before] 4] \ - [.p panecget .b -before] + [.p panecget .b -before] } -cleanup { .p paneconfig .b -before [lindex [.p paneconfig .b -before] 3] } -result {.c .c} @@ -212,7 +212,7 @@ test panedwindow-1.42 {configuration options: -before (bad)} -body { test panedwindow-1.43 {configuration options: -height (good)} -body { .p paneconfigure .b -height 10 list [lindex [.p paneconfigure .b -height] 4] \ - [.p panecget .b -height] + [.p panecget .b -height] } -cleanup { .p paneconfig .b -height [lindex [.p paneconfig .b -height] 3] } -result {10 10} @@ -222,7 +222,7 @@ test panedwindow-1.44 {configuration options: -height (bad)} -body { test panedwindow-1.45 {configuration options: -hide (good)} -body { .p paneconfigure .b -hide false list [lindex [.p paneconfigure .b -hide] 4] \ - [.p panecget .b -hide] + [.p panecget .b -hide] } -cleanup { .p paneconfig .b -hide [lindex [.p paneconfig .b -hide] 3] } -result {0 0} @@ -232,7 +232,7 @@ test panedwindow-1.46 {configuration options: -hide (bad)} -body { test panedwindow-1.47 {configuration options: -minsize (good)} -body { .p paneconfigure .b -minsize 10 list [lindex [.p paneconfigure .b -minsize] 4] \ - [.p panecget .b -minsize] + [.p panecget .b -minsize] } -cleanup { .p paneconfig .b -minsize [lindex [.p paneconfig .b -minsize] 3] } -result {10 10} @@ -242,27 +242,27 @@ test panedwindow-1.48 {configuration options: -minsize (bad)} -body { test panedwindow-1.49 {configuration options: -padx (good)} -body { .p paneconfigure .b -padx 1.3 list [lindex [.p paneconfigure .b -padx] 4] \ - [.p panecget .b -padx] + [.p panecget .b -padx] } -cleanup { .p paneconfig .b -padx [lindex [.p paneconfig .b -padx] 3] -} -result {1 1} +} -result {1.3 1.3} test panedwindow-1.50 {configuration options: -padx (bad)} -body { .p paneconfigure .b -padx badValue } -returnCodes error -result {expected screen distance but got "badValue"} test panedwindow-1.51 {configuration options: -pady (good)} -body { .p paneconfigure .b -pady 1.3 list [lindex [.p paneconfigure .b -pady] 4] \ - [.p panecget .b -pady] + [.p panecget .b -pady] } -cleanup { .p paneconfig .b -pady [lindex [.p paneconfig .b -pady] 3] -} -result {1 1} +} -result {1.3 1.3} test panedwindow-1.52 {configuration options: -pady (bad)} -body { .p paneconfigure .b -pady badValue } -returnCodes error -result {expected screen distance but got "badValue"} test panedwindow-1.53 {configuration options: -sticky (good)} -body { .p paneconfigure .b -sticky nsew list [lindex [.p paneconfigure .b -sticky] 4] \ - [.p panecget .b -sticky] + [.p panecget .b -sticky] } -cleanup { .p paneconfig .b -sticky [lindex [.p paneconfig .b -sticky] 3] } -result {nesw nesw} @@ -272,7 +272,7 @@ test panedwindow-1.54 {configuration options: -sticky (bad)} -body { test panedwindow-1.55 {configuration options: -stretch (good)} -body { .p paneconfigure .b -stretch alw list [lindex [.p paneconfigure .b -stretch] 4] \ - [.p panecget .b -stretch] + [.p panecget .b -stretch] } -cleanup { .p paneconfig .b -stretch [lindex [.p paneconfig .b -stretch] 3] } -result {always always} @@ -282,7 +282,7 @@ test panedwindow-1.56 {configuration options: -stretch (bad)} -body { test panedwindow-1.57 {configuration options: -width (good)} -body { .p paneconfigure .b -width 10 list [lindex [.p paneconfigure .b -width] 4] \ - [.p panecget .b -width] + [.p panecget .b -width] } -cleanup { .p paneconfig .b -width [lindex [.p paneconfig .b -width] 3] } -result {10 10} @@ -439,8 +439,8 @@ test panedwindow-6.4 {sash coord subcommand sashes correctly placed} -setup { } -body { panedwindow .p -borderwidth 0 -sashpad 2 -sashwidth 4 -showhandle false .p add [frame .p.f -width 20 -height 20] \ - [frame .p.f2 -width 20 -height 20] \ - [frame .p.f3 -width 20 -height 20] + [frame .p.f2 -width 20 -height 20] \ + [frame .p.f3 -width 20 -height 20] .p sash coord 0 } -cleanup { deleteWindows @@ -450,8 +450,8 @@ test panedwindow-6.5 {sash coord subcommand sashes correctly placed} -setup { } -body { panedwindow .p -borderwidth 0 -sashpad 2 -sashwidth 4 -showhandle false .p add [frame .p.f -width 20 -height 20] \ - [frame .p.f2 -width 20 -height 20] \ - [frame .p.f3 -width 20 -height 20] + [frame .p.f2 -width 20 -height 20] \ + [frame .p.f3 -width 20 -height 20] .p sash coord 1 } -cleanup { deleteWindows @@ -460,10 +460,10 @@ test panedwindow-6.6 {sash coord subcommand, sashes correctly placed} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 2 -sashwidth 4 -orient vertical \ - -showhandle false + -showhandle false .p add [frame .p.f -width 20 -height 20] \ - [frame .p.f2 -width 20 -height 20] \ - [frame .p.f3 -width 20 -height 20] + [frame .p.f2 -width 20 -height 20] \ + [frame .p.f3 -width 20 -height 20] .p sash coord 0 } -cleanup { deleteWindows @@ -472,10 +472,10 @@ test panedwindow-6.7 {sash coord subcommand, sashes correctly placed} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 2 -sashwidth 4 -orient vertical \ - -showhandle false + -showhandle false .p add [frame .p.f -width 20 -height 20] \ - [frame .p.f2 -width 20 -height 20] \ - [frame .p.f3 -width 20 -height 20] + [frame .p.f2 -width 20 -height 20] \ + [frame .p.f3 -width 20 -height 20] .p sash coord 1 } -cleanup { deleteWindows @@ -485,8 +485,8 @@ test panedwindow-6.8 {sash coord subcommand, errors} -setup { } -body { panedwindow .p 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 0} 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"] @@ -497,8 +497,8 @@ test panedwindow-6.9 {sash coord subcommand, errors} -setup { 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 0} 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"] @@ -509,9 +509,9 @@ test panedwindow-6.10 {sash coord subcommand, errors} -setup { 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 0} msg] \ + [catch {.p sash coord 1} 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"] @@ -639,7 +639,7 @@ test panedwindow-9.2 {sash mark/sash dragto interaction} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 4 -orient vertical \ - -showhandle false + -showhandle false .p add [frame .p.f -width 20 -height 20] [button .p.c -text foobar] .p sash mark 0 10 10 .p sash dragto 0 10 20 @@ -779,7 +779,7 @@ test panedwindow-11.4 {moving sash changes size of pane above} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \ - -orient vertical + -orient vertical .p add [frame .f -width 20 -height 10] [button .c -text foobar] -sticky nsew .p sash place 0 0 20 pack .p @@ -791,7 +791,7 @@ test panedwindow-11.5 {moving sash changes size of pane below} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \ - -orient vertical + -orient vertical .p add [frame .f -width 20 -height 10] [frame .f2 -width 20 -height 10] pack .p update @@ -807,7 +807,7 @@ test panedwindow-11.6 {moving sash does not change reqsize of panedwindow} -setu deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \ - -orient vertical + -orient vertical .p add [frame .f -width 20 -height 10] [frame .f2 -width 20 -height 10] set result [winfo reqheight .p] .p sash place 0 0 20 @@ -820,7 +820,7 @@ test panedwindow-11.7 {moving sash does not alter reqsize of widget} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \ - -orient vertical + -orient vertical .p add [frame .f -width 20 -height 10] [frame .f2 -width 20 -height 10] set result [winfo reqheight .f] .p sash place 0 0 20 @@ -842,7 +842,7 @@ test panedwindow-11.9 {moving sash restricted to minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \ - -orient vertical + -orient vertical .p add [frame .f -width 20 -height 30] [button .c] -minsize 10 .p sash place 0 0 5 pack .p @@ -865,7 +865,7 @@ test panedwindow-11.11 {moving sash right pushes other sashes} -setup { } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 .p add [frame .f -width 20 -height 30] [frame .f2 -width 20 -height 20] \ - [frame .f3 -width 20 -height 30] + [frame .f3 -width 20 -height 30] .p sash place 0 80 0 list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -876,7 +876,7 @@ test panedwindow-11.12 {moving sash left pushes other sashes} -setup { } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 .p add [frame .f -width 20 -height 30] [frame .f2 -width 20 -height 20] \ - [frame .f3 -width 20 -height 30] + [frame .f3 -width 20 -height 30] .p sash place 1 0 0 list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -887,7 +887,7 @@ test panedwindow-11.13 {move sash in mapped window restricted to visible win} -s } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 .p add [frame .f -width 20 -height 30] [frame .f2 -width 20 -height 20] \ - [frame .f3 -width 20 -height 30] + [frame .f3 -width 20 -height 30] place .p -width 50 update .p sash place 1 100 0 @@ -901,7 +901,7 @@ test panedwindow-11.14 {move sash in mapped window restricted to visible win} -s } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 .p add [frame .f -width 20 -height 30] [frame .f2 -width 20 -height 20] \ - [frame .f3 -width 20 -height 30] + [frame .f3 -width 20 -height 30] place .p -width 100 update .p sash place 1 200 0 @@ -915,7 +915,7 @@ test panedwindow-11.15 {moving sash into "virtual" space on last pane increases } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 .p add [frame .f -width 20 -height 30] [frame .f2 -width 20 -height 20] \ - [frame .f3 -width 20 -height 30] + [frame .f3 -width 20 -height 30] place .p -width 100 set result [winfo reqwidth .p] update @@ -945,7 +945,7 @@ test panedwindow-12.2 {vertical panedwindow lays out widgets properly} -setup { set result {} } -body { panedwindow .p -showhandle false -borderwidth 2 -sashpad 2 -sashwidth 2 \ - -orient vertical + -orient vertical foreach win {.p.f .p.f2 .p.f3} {.p add [frame $win -width 20 -height 10]} pack .p update @@ -959,8 +959,8 @@ test panedwindow-12.3 {horizontal panedwindow lays out widgets properly} -setup } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 foreach {win color} {.p.f blue .p.f2 green} { - .p add [frame $win -width 20 -height 20 -bg $color] -padx 10 -pady 5 \ - -sticky "" + .p add [frame $win -width 20 -height 20 -bg $color] -padx 10 -pady 5 \ + -sticky "" } pack .p update @@ -978,9 +978,9 @@ test panedwindow-12.4 {vertical panedwindow lays out widgets properly} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 \ - -orient vertical + -orient vertical foreach win {.p.f .p.f2} { - .p add [frame $win -width 20 -height 20] -padx 10 -pady 5 -sticky "" + .p add [frame $win -width 20 -height 20] -padx 10 -pady 5 -sticky "" } pack .p update @@ -1091,7 +1091,7 @@ test panedwindow-12.12 {vertical panedwindow reqwidth is max pane width} -setup deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \ - -orient vertical + -orient vertical .p add [frame .p.f -width 20 -height 20] [frame .p.f2 -width 20 -height 20] set result [winfo reqwidth .p] .p.f config -width 40 @@ -1103,7 +1103,7 @@ test panedwindow-12.13 {vertical panedwindow reqwidth is max pane width} -setup deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \ - -orient vertical + -orient vertical foreach win {.p.f .p.f2} {.p add [frame $win -width 20 -height 20]} .p paneconfigure .p.f -width 15 set result [winfo reqwidth .p] @@ -1116,7 +1116,7 @@ test panedwindow-12.14 {panedwindow pane height overrides widget width} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \ - -orient vertical + -orient vertical foreach win {.p.f .p.f2} {.p add [frame $win -width 20 -height 20]} .p sash place 0 0 10 pack .p @@ -1513,7 +1513,7 @@ test panedwindow-17.1 {MoveSash, move right} -setup { } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } # Get the requested width of the paned window @@ -1534,7 +1534,7 @@ test panedwindow-17.2 {MoveSash, move right (unmapped) clipped by reqwidth} -set } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } .p sash place 0 100 0 @@ -1550,7 +1550,7 @@ test panedwindow-17.3 {MoveSash, move right (mapped, width < reqwidth) clipped b } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } # Put the panedwindow up on the display and give it a width < reqwidth @@ -1570,7 +1570,7 @@ test panedwindow-17.4 {MoveSash, move right (mapped, width > reqwidth) clipped b } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } # Put the panedwindow up on the display and give it a width > reqwidth @@ -1590,7 +1590,7 @@ test panedwindow-17.5 {MoveSash, move right respects minsize} -setup { } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 } .p sash place 0 100 0 @@ -1606,7 +1606,7 @@ test panedwindow-17.6 {MoveSash, move right respects minsize} -setup { } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 } .p sash place 0 100 0 @@ -1621,7 +1621,7 @@ test panedwindow-17.7 {MoveSash, move right pushes other sashes} -setup { } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } .p sash place 0 100 0 @@ -1637,7 +1637,7 @@ test panedwindow-17.8 {MoveSash, move right pushes other sashes, respects minsiz } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 } .p sash place 0 100 0 @@ -1653,8 +1653,8 @@ test panedwindow-17.9 {MoveSash, move right respects minsize, exludes pad} -setu } -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 add [frame $w -height 20 -width 20 -bg $c] \ + -sticky nsew -minsize 10 -padx 5 } .p sash place 0 100 0 @@ -1670,8 +1670,8 @@ test panedwindow-17.10 {MoveSash, move right, negative minsize becomes 0} -setup } -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 add [frame $w -height 20 -width 20 -bg $c] \ + -sticky nsew -minsize -50 } .p sash place 0 50 0 @@ -1688,7 +1688,7 @@ test panedwindow-17.11 {MoveSash, move left} -setup { 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 + .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } # Get the requested width of the paned window @@ -1709,7 +1709,7 @@ test panedwindow-17.12 {MoveSash, move left, can't move outside of window} -setu } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } .p sash place 0 -100 0 @@ -1725,7 +1725,7 @@ test panedwindow-17.13 {MoveSash, move left respects minsize} -setup { } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 } .p sash place 0 0 0 @@ -1741,7 +1741,7 @@ test panedwindow-17.14 {MoveSash, move left respects minsize} -setup { } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 } .p sash place 1 0 0 @@ -1756,7 +1756,7 @@ test panedwindow-17.15 {MoveSash, move left pushes other sashes} -setup { } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } .p sash place 1 0 0 @@ -1772,7 +1772,7 @@ test panedwindow-17.16 {MoveSash, move left pushes other sashes, respects minsiz } -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 } .p sash place 1 0 0 @@ -1788,8 +1788,8 @@ test panedwindow-17.17 {MoveSash, move left respects minsize, exludes pad} -setu } -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 add [frame $w -height 20 -width 20 -bg $c] \ + -sticky nsew -minsize 10 -padx 5 } .p sash place 1 0 0 @@ -1805,8 +1805,8 @@ test panedwindow-17.18 {MoveSash, move left, negative minsize becomes 0} -setup } -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 add [frame $w -height 20 -width 20 -bg $c] \ + -sticky nsew -minsize -50 } .p sash place 1 10 0 @@ -1824,9 +1824,9 @@ test panedwindow-18.1 {MoveSash, move down} -setup { } -body { set result {} panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } # Get the requested width of the paned window @@ -1846,9 +1846,9 @@ test panedwindow-18.2 {MoveSash, move down (unmapped) clipped by reqheight} -set deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } .p sash place 0 0 100 @@ -1863,9 +1863,9 @@ test panedwindow-18.3 {MoveSash, move down (mapped, height < reqheight) clipped deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .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 @@ -1884,9 +1884,9 @@ test panedwindow-18.4 {MoveSash, move down (mapped, height > reqheight) clipped deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .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 @@ -1905,9 +1905,9 @@ test panedwindow-18.5 {MoveSash, move down respects minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 } .p sash place 0 0 100 @@ -1922,9 +1922,9 @@ test panedwindow-18.6 {MoveSash, move down respects minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 } .p sash place 0 0 100 @@ -1939,9 +1939,9 @@ 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 + -orient vertical foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } .p sash place 0 0 100 @@ -1956,9 +1956,9 @@ test panedwindow-18.8 {MoveSash, move down pushes other sashes, respects minsize deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 } .p sash place 0 0 100 @@ -1973,10 +1973,10 @@ 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 + -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 add [frame $w -height 20 -width 20 -bg $c] \ + -sticky nsew -minsize 10 -pady 5 } .p sash place 0 0 100 @@ -1991,10 +1991,10 @@ 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 + -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 add [frame $w -height 20 -width 20 -bg $c] \ + -sticky nsew -minsize -50 } .p sash place 0 0 50 @@ -2010,9 +2010,9 @@ test panedwindow-18.11 {MoveSash, move up} -setup { } -body { set result {} panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } # Get the requested width of the paned window @@ -2032,9 +2032,9 @@ 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 + -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } .p sash place 0 0 -100 @@ -2049,9 +2049,9 @@ test panedwindow-18.13 {MoveSash, move up respects minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 } .p sash place 0 0 0 @@ -2066,9 +2066,9 @@ test panedwindow-18.14 {MoveSash, move up respects minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 } .p sash place 1 0 0 @@ -2082,9 +2082,9 @@ 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 + -orient vertical foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew } .p sash place 1 0 0 @@ -2099,9 +2099,9 @@ test panedwindow-18.16 {MoveSash, move up pushes other sashes, respects minsize} deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -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 add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 } .p sash place 1 0 0 @@ -2116,10 +2116,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 + -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 add [frame $w -height 20 -width 20 -bg $c] \ + -sticky nsew -minsize 10 -pady 5 } .p sash place 1 0 0 @@ -2134,10 +2134,10 @@ 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 + -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 add [frame $w -height 20 -width 20 -bg $c] \ + -sticky nsew -minsize -50 } .p sash place 1 0 10 @@ -2159,7 +2159,7 @@ test panedwindow-19.1 {ComputeGeometry, reqheight taken from widgets} -setup { } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] + .p add [frame $w -width 20 -height 20 -bg blue] } set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]] .f3 configure -height 40 @@ -2173,7 +2173,7 @@ test panedwindow-19.2 {ComputeGeometry, reqheight taken from widgets} -setup { } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] + .p add [frame $w -width 20 -height 20 -bg blue] } set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]] .p paneconfigure .f3 -height 40 @@ -2187,7 +2187,7 @@ test panedwindow-19.3 {ComputeGeometry, reqheight taken from widgets} -setup { } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -pady 20 + .p add [frame $w -width 20 -height 20 -bg blue] -pady 20 } set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]] .p paneconfigure .f3 -height 40 @@ -2200,9 +2200,9 @@ test panedwindow-19.4 {ComputeGeometry, reqwidth taken from widgets} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 \ - -orient vertical + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] + .p add [frame $w -width 20 -height 20 -bg blue] } set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]] .f3 configure -width 40 @@ -2215,9 +2215,9 @@ test panedwindow-19.5 {ComputeGeometry, reqwidth taken from widgets} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 \ - -orient vertical + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] + .p add [frame $w -width 20 -height 20 -bg blue] } set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]] .p paneconfigure .f3 -width 40 @@ -2230,9 +2230,9 @@ test panedwindow-19.6 {ComputeGeometry, reqwidth taken from widgets} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 \ - -orient vertical + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -padx 20 + .p add [frame $w -width 20 -height 20 -bg blue] -padx 20 } set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]] .p paneconfigure .f3 -width 40 @@ -2248,7 +2248,7 @@ test panedwindow-19.7 {ComputeGeometry, one pane, reqsize set properly} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2259,9 +2259,9 @@ test panedwindow-19.8 {ComputeGeometry, three panes, reqsize set properly} -setu deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2272,10 +2272,10 @@ test panedwindow-19.9 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -2286,17 +2286,17 @@ test panedwindow-19.10 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -2310,10 +2310,10 @@ test panedwindow-19.11 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 0 \ - -orient vertical -sashwidth 0 -handlesize 6 \ - -showhandle 0 + -orient vertical -sashwidth 0 -handlesize 6 \ + -showhandle 0 .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -2323,11 +2323,11 @@ test panedwindow-19.12 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2338,11 +2338,11 @@ test panedwindow-19.13 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -2353,19 +2353,19 @@ test panedwindow-19.14 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -2377,7 +2377,7 @@ test panedwindow-19.15 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2388,9 +2388,9 @@ test panedwindow-19.16 {ComputeGeometry, three panes, reqsize set properly} -set deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2401,10 +2401,10 @@ test panedwindow-19.17 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -2415,17 +2415,17 @@ test panedwindow-19.18 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -2439,10 +2439,10 @@ test panedwindow-19.19 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 0 \ - -orient vertical -sashwidth 0 -handlesize 6 \ - -showhandle 1 + -orient vertical -sashwidth 0 -handlesize 6 \ + -showhandle 1 .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -2452,11 +2452,11 @@ test panedwindow-19.20 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2467,11 +2467,11 @@ test panedwindow-19.21 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -2482,19 +2482,19 @@ test panedwindow-19.22 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -2506,7 +2506,7 @@ test panedwindow-19.23 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2517,9 +2517,9 @@ test panedwindow-19.24 {ComputeGeometry, three panes, reqsize set properly} -set deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2530,10 +2530,10 @@ test panedwindow-19.25 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -2544,17 +2544,17 @@ test panedwindow-19.26 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -2568,10 +2568,10 @@ test panedwindow-19.27 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 0 \ - -orient vertical -sashwidth 3 -handlesize 6 \ - -showhandle 0 + -orient vertical -sashwidth 3 -handlesize 6 \ + -showhandle 0 .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -2581,11 +2581,11 @@ test panedwindow-19.28 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2596,11 +2596,11 @@ test panedwindow-19.29 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -2611,19 +2611,19 @@ test panedwindow-19.30 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -2635,7 +2635,7 @@ test panedwindow-19.31 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2646,9 +2646,9 @@ test panedwindow-19.32 {ComputeGeometry, three panes, reqsize set properly} -set deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2659,10 +2659,10 @@ test panedwindow-19.33 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -2673,17 +2673,17 @@ test panedwindow-19.34 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -2697,10 +2697,10 @@ test panedwindow-19.35 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 0 \ - -orient vertical -sashwidth 3 -handlesize 6 \ - -showhandle 1 + -orient vertical -sashwidth 3 -handlesize 6 \ + -showhandle 1 .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -2710,11 +2710,11 @@ test panedwindow-19.36 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2725,11 +2725,11 @@ test panedwindow-19.37 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -2740,19 +2740,19 @@ test panedwindow-19.38 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -2764,7 +2764,7 @@ test panedwindow-19.39 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2775,9 +2775,9 @@ test panedwindow-19.40 {ComputeGeometry, three panes, reqsize set properly} -set deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2788,10 +2788,10 @@ test panedwindow-19.41 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -2802,17 +2802,17 @@ test panedwindow-19.42 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -2826,10 +2826,10 @@ test panedwindow-19.43 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 5 \ - -orient vertical -sashwidth 0 -handlesize 6 \ - -showhandle 0 + -orient vertical -sashwidth 0 -handlesize 6 \ + -showhandle 0 .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -2839,11 +2839,11 @@ test panedwindow-19.44 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2854,11 +2854,11 @@ test panedwindow-19.45 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -2869,19 +2869,19 @@ test panedwindow-19.46 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -2893,7 +2893,7 @@ test panedwindow-19.47 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2904,9 +2904,9 @@ test panedwindow-19.48 {ComputeGeometry, three panes, reqsize set properly} -set deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2917,10 +2917,10 @@ test panedwindow-19.49 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -2931,17 +2931,17 @@ test panedwindow-19.50 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -2955,10 +2955,10 @@ test panedwindow-19.51 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 5 \ - -orient vertical -sashwidth 0 -handlesize 6 \ - -showhandle 1 + -orient vertical -sashwidth 0 -handlesize 6 \ + -showhandle 1 .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -2968,11 +2968,11 @@ test panedwindow-19.52 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -2983,11 +2983,11 @@ test panedwindow-19.53 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -2998,19 +2998,19 @@ test panedwindow-19.54 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -3022,7 +3022,7 @@ test panedwindow-19.55 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3033,9 +3033,9 @@ test panedwindow-19.56 {ComputeGeometry, three panes, reqsize set properly} -set deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3046,10 +3046,10 @@ test panedwindow-19.57 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3060,17 +3060,17 @@ test panedwindow-19.58 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -3084,10 +3084,10 @@ test panedwindow-19.59 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 5 \ - -orient vertical -sashwidth 3 -handlesize 6 \ - -showhandle 0 + -orient vertical -sashwidth 3 -handlesize 6 \ + -showhandle 0 .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3097,11 +3097,11 @@ test panedwindow-19.60 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3112,11 +3112,11 @@ test panedwindow-19.61 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3127,19 +3127,19 @@ test panedwindow-19.62 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -3151,7 +3151,7 @@ test panedwindow-19.63 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3162,9 +3162,9 @@ test panedwindow-19.64 {ComputeGeometry, three panes, reqsize set properly} -set deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3175,10 +3175,10 @@ test panedwindow-19.65 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3189,17 +3189,17 @@ test panedwindow-19.66 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -3213,10 +3213,10 @@ test panedwindow-19.67 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 5 \ - -orient vertical -sashwidth 3 -handlesize 6 \ - -showhandle 1 + -orient vertical -sashwidth 3 -handlesize 6 \ + -showhandle 1 .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3226,11 +3226,11 @@ test panedwindow-19.68 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3241,11 +3241,11 @@ test panedwindow-19.69 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3256,19 +3256,19 @@ test panedwindow-19.70 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -3280,7 +3280,7 @@ test panedwindow-19.71 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3291,9 +3291,9 @@ test panedwindow-19.72 {ComputeGeometry, three panes, reqsize set properly} -set deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3304,10 +3304,10 @@ test panedwindow-19.73 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3318,17 +3318,17 @@ test panedwindow-19.74 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -3342,10 +3342,10 @@ test panedwindow-19.75 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 0 \ - -orient vertical -sashwidth 0 -handlesize 6 \ - -showhandle 0 + -orient vertical -sashwidth 0 -handlesize 6 \ + -showhandle 0 .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3355,11 +3355,11 @@ test panedwindow-19.76 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3370,11 +3370,11 @@ test panedwindow-19.77 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3385,19 +3385,19 @@ test panedwindow-19.78 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -3409,7 +3409,7 @@ test panedwindow-19.79 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3420,9 +3420,9 @@ test panedwindow-19.80 {ComputeGeometry, three panes, reqsize set properly} -set deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3433,10 +3433,10 @@ test panedwindow-19.81 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3447,17 +3447,17 @@ test panedwindow-19.82 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -3471,10 +3471,10 @@ test panedwindow-19.83 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 0 \ - -orient vertical -sashwidth 0 -handlesize 6 \ - -showhandle 1 + -orient vertical -sashwidth 0 -handlesize 6 \ + -showhandle 1 .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3484,11 +3484,11 @@ test panedwindow-19.84 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3499,11 +3499,11 @@ test panedwindow-19.85 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3514,19 +3514,19 @@ test panedwindow-19.86 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 0 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -3538,7 +3538,7 @@ test panedwindow-19.87 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3549,9 +3549,9 @@ test panedwindow-19.88 {ComputeGeometry, three panes, reqsize set properly} -set deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3562,10 +3562,10 @@ test panedwindow-19.89 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3576,17 +3576,17 @@ test panedwindow-19.90 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -3600,10 +3600,10 @@ test panedwindow-19.91 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 0 \ - -orient vertical -sashwidth 3 -handlesize 6 \ - -showhandle 0 + -orient vertical -sashwidth 3 -handlesize 6 \ + -showhandle 0 .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3613,11 +3613,11 @@ test panedwindow-19.92 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3628,11 +3628,11 @@ test panedwindow-19.93 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3643,19 +3643,19 @@ test panedwindow-19.94 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -3667,7 +3667,7 @@ test panedwindow-19.95 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3678,9 +3678,9 @@ test panedwindow-19.96 {ComputeGeometry, three panes, reqsize set properly} -set deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3691,10 +3691,10 @@ test panedwindow-19.97 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3705,17 +3705,17 @@ test panedwindow-19.98 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -3729,10 +3729,10 @@ test panedwindow-19.99 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 0 \ - -orient vertical -sashwidth 3 -handlesize 6 \ - -showhandle 1 + -orient vertical -sashwidth 3 -handlesize 6 \ + -showhandle 1 .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3742,11 +3742,11 @@ test panedwindow-19.100 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3757,11 +3757,11 @@ test panedwindow-19.101 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3772,19 +3772,19 @@ test panedwindow-19.102 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ - -sashwidth 3 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -3796,7 +3796,7 @@ test panedwindow-19.103 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3807,9 +3807,9 @@ test panedwindow-19.104 {ComputeGeometry, three panes, reqsize set properly} -se deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3820,10 +3820,10 @@ test panedwindow-19.105 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3834,17 +3834,17 @@ test panedwindow-19.106 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 + -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -3858,10 +3858,10 @@ test panedwindow-19.107 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 5 \ - -orient vertical -sashwidth 0 -handlesize 6 \ - -showhandle 0 + -orient vertical -sashwidth 0 -handlesize 6 \ + -showhandle 0 .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3871,11 +3871,11 @@ test panedwindow-19.108 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3886,11 +3886,11 @@ test panedwindow-19.109 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3901,19 +3901,19 @@ test panedwindow-19.110 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -3925,7 +3925,7 @@ test panedwindow-19.111 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3936,9 +3936,9 @@ test panedwindow-19.112 {ComputeGeometry, three panes, reqsize set properly} -se deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -3949,10 +3949,10 @@ test panedwindow-19.113 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -3963,17 +3963,17 @@ test panedwindow-19.114 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 + -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -3987,10 +3987,10 @@ test panedwindow-19.115 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 5 \ - -orient vertical -sashwidth 0 -handlesize 6 \ - -showhandle 1 + -orient vertical -sashwidth 0 -handlesize 6 \ + -showhandle 1 .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -4000,11 +4000,11 @@ test panedwindow-19.116 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -4015,11 +4015,11 @@ test panedwindow-19.117 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -4030,19 +4030,19 @@ test panedwindow-19.118 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 0 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 0 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -4054,7 +4054,7 @@ test panedwindow-19.119 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -4065,9 +4065,9 @@ test panedwindow-19.120 {ComputeGeometry, three panes, reqsize set properly} -se deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -4078,10 +4078,10 @@ test panedwindow-19.121 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -4092,17 +4092,17 @@ test panedwindow-19.122 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 + -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -4116,10 +4116,10 @@ test panedwindow-19.123 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 5 \ - -orient vertical -sashwidth 3 -handlesize 6 \ - -showhandle 0 + -orient vertical -sashwidth 3 -handlesize 6 \ + -showhandle 0 .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -4129,11 +4129,11 @@ test panedwindow-19.124 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -4144,11 +4144,11 @@ test panedwindow-19.125 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -4159,19 +4159,19 @@ test panedwindow-19.126 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 0 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 0 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -4183,7 +4183,7 @@ test panedwindow-19.127 {ComputeGeometry, one pane, reqsize set properly} -setup # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -4194,9 +4194,9 @@ test panedwindow-19.128 {ComputeGeometry, three panes, reqsize set properly} -se deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -4207,10 +4207,10 @@ test panedwindow-19.129 {ComputeGeometry, sash coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -4221,17 +4221,17 @@ test panedwindow-19.130 {ComputeGeometry/ArrangePanes, pane coords} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 + -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 3 -padx 11 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 3 -padx 11 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] } return $result } -cleanup { @@ -4245,10 +4245,10 @@ test panedwindow-19.131 {ComputeGeometry, one pane, vertical} -setup { # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 5 \ - -orient vertical -sashwidth 3 -handlesize 6 \ - -showhandle 1 + -orient vertical -sashwidth 3 -handlesize 6 \ + -showhandle 1 .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ - -sticky "" + -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -4258,11 +4258,11 @@ test panedwindow-19.132 {ComputeGeometry, three panes, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { @@ -4273,11 +4273,11 @@ test panedwindow-19.133 {ComputeGeometry, sash coords, vertical} -setup { deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky "" + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { @@ -4288,19 +4288,19 @@ test panedwindow-19.134 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ - -sashwidth 3 -handlesize 6 -showhandle 1 \ - -orient vertical + -sashwidth 3 -handlesize 6 -showhandle 1 \ + -orient vertical foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ - -sticky nsew -pady 11 -padx 3 + .p add [frame $w -width 20 -height 20 -bg blue] \ + -sticky nsew -pady 11 -padx 3 } pack .p update set result {} foreach w {.p.f1 .p.f2 .p.f3} { - lappend result [list [winfo x $w] [winfo y $w] \ - [winfo width $w] [winfo height $w]] - } + lappend result [list [winfo x $w] [winfo y $w] \ + [winfo width $w] [winfo height $w]] + } return $result } -cleanup { deleteWindows @@ -4322,7 +4322,7 @@ test panedwindow-20.2 {destroyed pane causes geometry recomputation} -setup { } -body { panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 2 .p add [frame .f -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 20 -bg red] + [frame .f2 -width 20 -height 20 -bg red] destroy .f winfo reqwidth .p } -cleanup { @@ -4335,7 +4335,7 @@ test panedwindow-21.1 {ArrangePanes, extra space is given to the last pane} -set } -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 + [frame .f2 -width 20 -height 20 -bg red] -sticky nsew place .p -width 100 -x 0 -y 0 update winfo width .f2 @@ -4346,9 +4346,9 @@ test panedwindow-21.2 {ArrangePanes, extra space is given to the last pane} -set deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -orient vertical .p add [frame .f1 -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 20 -bg red] -sticky nsew + [frame .f2 -width 20 -height 20 -bg red] -sticky nsew place .p -height 100 -x 0 -y 0 update winfo height .f2 @@ -4360,7 +4360,7 @@ test panedwindow-21.3 {ArrangePanes, explicit height/width are preferred} -setup } -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 "" + [frame .f2 -width 20 -height 20 -bg red] -sticky "" .p paneconfigure .f1 -width 10 -height 15 pack .p update @@ -4373,7 +4373,7 @@ test panedwindow-21.4 {ArrangePanes, panes clipped by size of pane} -setup { } -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] + [frame .f2 -width 20 -height 20 -bg red] .p sash place 0 10 0 pack .p update @@ -4385,9 +4385,9 @@ test panedwindow-21.5 {ArrangePanes, panes clipped by size of pane} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -orient vertical .p add [frame .f1 -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 20 -bg red] + [frame .f2 -width 20 -height 20 -bg red] .p sash place 0 0 10 pack .p update @@ -4400,7 +4400,7 @@ test panedwindow-21.6 {ArrangePanes, height of pane taken from total height} -se } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 .p add [frame .p.f1 -width 20 -height 20 -bg blue] \ - [frame .p.f2 -width 20 -height 40 -bg red] -sticky "" + [frame .p.f2 -width 20 -height 40 -bg red] -sticky "" pack .p update winfo y .p.f1 @@ -4411,9 +4411,9 @@ test panedwindow-21.7 {ArrangePanes, width of pane taken from total width} -setu deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -orient vertical .p add [frame .p.f1 -width 20 -height 20 -bg blue] \ - [frame .p.f2 -width 40 -height 40 -bg red] -sticky "" + [frame .p.f2 -width 40 -height 40 -bg red] -sticky "" pack .p update winfo x .p.f1 @@ -4425,7 +4425,7 @@ test panedwindow-21.8 {ArrangePanes, panes with width <= 0 are unmapped} -setup } -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 40 -bg red] + [frame .f2 -width 20 -height 40 -bg red] pack .p update set result [winfo ismapped .f1] @@ -4440,7 +4440,7 @@ test panedwindow-21.9 {ArrangePanes, panes with width <= 0 are unmapped} -setup } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 .p add [frame .p.f1 -width 20 -height 20 -bg blue] \ - [frame .p.f2 -width 20 -height 40 -bg red] + [frame .p.f2 -width 20 -height 40 -bg red] pack .p update set result [winfo ismapped .p.f1] @@ -4455,7 +4455,7 @@ test panedwindow-21.10 {ArrangePanes, panes with width <= 0 are unmapped} -setup } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 -orient vertical .p add [frame .p.f1 -width 20 -height 20 -bg blue] \ - [frame .p.f2 -width 20 -height 40 -bg red] + [frame .p.f2 -width 20 -height 40 -bg red] pack .p update set result [winfo ismapped .p.f1] @@ -4470,7 +4470,7 @@ test panedwindow-21.11 {ArrangePanes, last pane shrinks} -setup { } -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 + [frame .f2 -width 20 -height 20 -bg red] -sticky nsew place .p -width 40 -x 0 -y 0 update winfo width .f2 @@ -4481,9 +4481,9 @@ test panedwindow-21.12 {ArrangePanes, last pane shrinks} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ - -orient vertical + -orient vertical .p add [frame .f1 -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 20 -bg red] -sticky nsew + [frame .f2 -width 20 -height 20 -bg red] -sticky nsew place .p -height 40 -x 0 -y 0 update winfo height .f2 @@ -4521,17 +4521,17 @@ test panedwindow-21.15 {ArrangePanes, last pane grows} -setup { } -body { panedwindow .p -showhandle false -height 50 .p add [frame .f1 -width 50 -bg red] [frame .f2 -width 50 -bg white] \ - [frame .f3 -width 50 -bg blue] [frame .f4 -width 50 -bg green] + [frame .f3 -width 50 -bg blue] [frame .f4 -width 50 -bg green] .p sash place 1 250 0 pack .p update set result [list] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] [winfo width .p] + [winfo width .f4] [winfo width .p] .p configure -width 300 update lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] [winfo width .p] + [winfo width .f4] [winfo width .p] } -cleanup { deleteWindows } -result {50 150 1 1 211 50 150 1 89 300} @@ -4543,7 +4543,7 @@ test panedwindow-22.1 {PanedWindowReqProc, react to pane geometry changes} -setu # Basically just want to make sure that the PanedWindowReqProc is called panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 2 .p add [frame .f1 -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 40 -bg red] + [frame .f2 -width 20 -height 40 -bg red] set result [winfo reqheight .p] .f1 configure -height 80 lappend result [winfo reqheight .p] @@ -4572,7 +4572,7 @@ test panedwindow-23.1 {ConfigurePanes, can't add panedwindow to itself} -setup { .p add .p } -cleanup { deleteWindows -} -returnCodes error -result {can't add .p to itself} +} -returnCodes error -result {cannot add .p to itself} test panedwindow-23.2 {ConfigurePanes, bad window throws error} -setup { deleteWindows } -body { @@ -4657,11 +4657,11 @@ test panedwindow-23.10 {ConfigurePanes, options applied to all panes} -setup { .p add [button .b] [button .c] -sticky ne -height 5 -width 5 -minsize 10 set result {} foreach w {.b .c} { - set val {} - foreach option {-sticky -height -width -minsize} { - lappend val $option [.p panecget $w $option] - } - lappend result $w $val + set val {} + foreach option {-sticky -height -width -minsize} { + lappend val $option [.p panecget $w $option] + } + lappend result $w $val } return $result } -cleanup { @@ -4675,7 +4675,7 @@ test panedwindow-23.11 {ConfigurePanes, existing panes are reconfigured} -setup .p add [button .b] -sticky nw -height 10 .p add .b [button .c] -sticky se -height 2 list [.p panes] [.p panecget .b -sticky] [.p panecget .b -height] \ - [.p panecget .c -sticky] [.p panecget .c -height] + [.p panecget .c -sticky] [.p panecget .c -height] } -cleanup { deleteWindows } -result [list {.b .c} es 2 es 2] @@ -4863,7 +4863,7 @@ test panedwindow-23.24 {ConfigurePanes, panedwindow cannot manage toplevels} -se .p add .t } -cleanup { deleteWindows -} -returnCodes error -result {can't add toplevel .t to .p} +} -returnCodes error -result {cannot add toplevel .t to .p} test panedwindow-23.25 {ConfigurePanes, restrict possible panes} -setup { deleteWindows } -body { @@ -4873,7 +4873,7 @@ test panedwindow-23.25 {ConfigurePanes, restrict possible panes} -setup { .p add .f.b } -cleanup { deleteWindows -} -returnCodes error -result {can't add .f.b to .p} +} -returnCodes error -result {cannot add .f.b to .p} test panedwindow-23.26 {ConfigurePanes, restrict possible panes} -setup { deleteWindows } -body { @@ -4918,15 +4918,15 @@ test panedwindow-23.29 {ConfigurePanes, -hide works} -setup { update set result [list] lappend result [winfo ismapped .f1] [winfo ismapped .f2] \ - [winfo ismapped .f3] [winfo ismapped .f4] + [winfo ismapped .f3] [winfo ismapped .f4] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] [winfo width .p] + [winfo width .f4] [winfo width .p] .p paneconfigure .f2 -hide 1 update lappend result [winfo ismapped .f1] [winfo ismapped .f2] \ - [winfo ismapped .f3] [winfo ismapped .f4] + [winfo ismapped .f3] [winfo ismapped .f4] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] [winfo width .p] + [winfo width .f4] [winfo width .p] } -cleanup { deleteWindows } -result {1 1 1 1 40 40 40 40 171 1 0 1 1 40 40 40 40 128} @@ -4943,15 +4943,15 @@ test panedwindow-23.30 {ConfigurePanes, -hide works} -setup { update set result [list] lappend result [winfo ismapped .f1] [winfo ismapped .f2] \ - [winfo ismapped .f3] [winfo ismapped .f4] + [winfo ismapped .f3] [winfo ismapped .f4] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] [winfo width .p] + [winfo width .f4] [winfo width .p] .p paneconfigure .f2 -hide 1 update lappend result [winfo ismapped .f1] [winfo ismapped .f2] \ - [winfo ismapped .f3] [winfo ismapped .f4] + [winfo ismapped .f3] [winfo ismapped .f4] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] [winfo width .p] + [winfo width .f4] [winfo width .p] } -cleanup { deleteWindows } -result {1 1 1 0 39 40 40 1 130 1 0 1 1 40 40 40 42 130} @@ -4971,19 +4971,19 @@ test panedwindow-23.30a {ConfigurePanes, hidden panes are unmapped} -setup { update set result [list] lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \ - [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]] + [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]] .p2 paneconfigure .l1 -hide 1 update lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \ - [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]] + [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]] .p1 paneconfigure .p2 -hide 1 update lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \ - [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]] + [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]] .p1 paneconfigure .p2 -hide 0 update lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \ - [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]] + [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]] } -cleanup { deleteWindows } -result {{1 1 1 1 1} {1 1 0 1 1} {1 0 0 0 0} {1 1 0 1 1}} @@ -5009,7 +5009,7 @@ test panedwindow-23.32 {ConfigurePanes, -hide works, last pane stretches} -setup deleteWindows } -body { panedwindow .p -showhandle false -width 200 -height 200 \ - -borderwidth 0 -orient vertical + -borderwidth 0 -orient vertical frame .f1 -height 50 -bg red frame .f2 -height 50 -bg green frame .f3 -height 50 -bg blue @@ -5038,11 +5038,11 @@ test panedwindow-23.33 {ConfigurePanes, -stretch first} -setup { update set result [list] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] + [winfo width .f4] .p paneconfigure .f2 -hide 1 update lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] + [winfo width .f4] } -cleanup { deleteWindows } -result {51 40 40 40 94 40 40 40} @@ -5059,11 +5059,11 @@ test panedwindow-23.34 {ConfigurePanes, -stretch middle} -setup { update set result [list] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] + [winfo width .f4] .p paneconfigure .f2 -hide 1 update lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] + [winfo width .f4] } -cleanup { deleteWindows } -result {40 45 46 40 40 45 94 40} @@ -5080,11 +5080,11 @@ test panedwindow-23.35 {ConfigurePanes, -stretch always} -setup { update set result [list] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] + [winfo width .f4] .p paneconfigure .f2 -hide 1 update lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] + [winfo width .f4] } -cleanup { deleteWindows } -result {42 43 43 43 58 43 58 58} @@ -5101,11 +5101,11 @@ test panedwindow-23.36 {ConfigurePanes, -stretch never} -setup { update set result [list] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] + [winfo width .f4] .p paneconfigure .f2 -hide 1 update lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ - [winfo width .f4] + [winfo width .f4] } -cleanup { deleteWindows } -result {40 40 40 40 40 40 40 40} @@ -5139,10 +5139,10 @@ test panedwindow-25.1 {DestroyPanedWindow} -setup { # This test should not result in any memory leaks. panedwindow .p foreach w {.a .b .c .d .e .f .g .h .i .j .k .l .m .n .o .q .r .s .t} { - .p add [button $w] + .p add [button $w] } foreach w {.a .b .c .d .e .f .g .h .i .j .k .l .m .n .o .p .q .r .s .t} { - destroy $w + destroy $w } set result {} } -result {} @@ -5174,7 +5174,7 @@ test panedwindow-26.1 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 0 0 } -cleanup { deleteWindows @@ -5184,7 +5184,7 @@ test panedwindow-26.2 {PanedWindowIdentifyCoords, padding is included} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 20 0 } -cleanup { deleteWindows @@ -5194,7 +5194,7 @@ test panedwindow-26.3 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 22 0 } -cleanup { deleteWindows @@ -5204,7 +5204,7 @@ test panedwindow-26.4 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 24 0 } -cleanup { deleteWindows @@ -5214,7 +5214,7 @@ test panedwindow-26.5 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 26 0 } -cleanup { deleteWindows @@ -5224,7 +5224,7 @@ test panedwindow-26.6 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 26 -1 } -cleanup { deleteWindows @@ -5234,7 +5234,7 @@ test panedwindow-26.7 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 26 100 } -cleanup { deleteWindows @@ -5243,9 +5243,9 @@ test panedwindow-26.8 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ - -handlesize 6 + -handlesize 6 .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 22 4 } -cleanup { deleteWindows @@ -5254,9 +5254,9 @@ test panedwindow-26.9 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ - -handlesize 6 + -handlesize 6 .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 22 5 } -cleanup { deleteWindows @@ -5265,9 +5265,9 @@ test panedwindow-26.10 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ - -handlesize 8 + -handlesize 8 .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 20 5 } -cleanup { deleteWindows @@ -5276,9 +5276,9 @@ test panedwindow-26.11 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ - -handlesize 8 + -handlesize 8 .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 20 0 } -cleanup { deleteWindows @@ -5288,8 +5288,8 @@ test panedwindow-26.12 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -showhandle false -bd 0 -sashwidth 2 -sashpad 2 .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] \ - [frame .f3 -bg green -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] \ + [frame .f3 -bg green -width 20 -height 20] .p identify 48 0 } -cleanup { deleteWindows @@ -5323,7 +5323,7 @@ test panedwindow-26.16 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 0 0 } -cleanup { deleteWindows @@ -5333,7 +5333,7 @@ test panedwindow-26.17 {PanedWindowIdentifyCoords, padding is included} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 0 20 } -cleanup { deleteWindows @@ -5343,7 +5343,7 @@ test panedwindow-26.18 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 0 22 } -cleanup { deleteWindows @@ -5353,7 +5353,7 @@ test panedwindow-26.19 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 0 24 } -cleanup { deleteWindows @@ -5363,7 +5363,7 @@ test panedwindow-26.20 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 0 26 } -cleanup { deleteWindows @@ -5373,7 +5373,7 @@ test panedwindow-26.21 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify -1 26 } -cleanup { deleteWindows @@ -5383,7 +5383,7 @@ test panedwindow-26.22 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 100 26 } -cleanup { deleteWindows @@ -5392,9 +5392,9 @@ test panedwindow-26.23 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ - -handlesize 6 -orient vertical + -handlesize 6 -orient vertical .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 4 22 } -cleanup { deleteWindows @@ -5403,9 +5403,9 @@ test panedwindow-26.24 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ - -handlesize 6 -orient vertical + -handlesize 6 -orient vertical .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 5 22 } -cleanup { deleteWindows @@ -5414,9 +5414,9 @@ test panedwindow-26.25 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ - -handlesize 8 -orient vertical + -handlesize 8 -orient vertical .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 5 20 } -cleanup { deleteWindows @@ -5425,9 +5425,9 @@ test panedwindow-26.26 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ - -handlesize 8 -orient vertical + -handlesize 8 -orient vertical .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] .p identify 0 20 } -cleanup { deleteWindows @@ -5437,8 +5437,8 @@ test panedwindow-26.27 {PanedWindowIdentifyCoords} -setup { } -body { panedwindow .p -showhandle false -bd 0 -sashwidth 2 -sashpad 2 -orient vertical .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] \ - [frame .f3 -bg green -width 20 -height 20] + [frame .f2 -bg blue -width 20 -height 20] \ + [frame .f3 -bg green -width 20 -height 20] .p identify 0 48 } -cleanup { deleteWindows diff --git a/tests/place.test b/tests/place.test index fae275a..7fdcc2a 100644 --- a/tests/place.test +++ b/tests/place.test @@ -37,8 +37,8 @@ test place-1.2 {Tk_PlaceCmd procedure, "info" option} -setup { place forget .t.f2 } -body { place .t.f2 -x 1 -y 2 -width 3 -height 4 -relx 0.1 -rely 0.2 \ - -relwidth 0.3 -relheight 0.4 -anchor se -in .t.f \ - -bordermode outside + -relwidth 0.3 -relheight 0.4 -anchor se -in .t.f \ + -bordermode outside place info .t.f2 } -result {-in .t.f -x 1 -relx 0.1 -y 2 -rely 0.2 -width 3 -relwidth 0.3 -height 4 -relheight 0.4 -anchor se -bordermode outside} test place-1.3 {Tk_PlaceCmd procedure, "info" option} -setup { @@ -48,8 +48,8 @@ test place-1.3 {Tk_PlaceCmd procedure, "info" option} -setup { # Make sure the result is built as a proper list by using a space in parent frame ".t.a b" place .t.f2 -x 1 -y 2 -width {} -height 4 -relx 0.2 -rely 0.2 \ - -relwidth 0.3 -relheight {} -anchor w -in ".t.a b" \ - -bordermode ignore + -relwidth 0.3 -relheight {} -anchor w -in ".t.a b" \ + -bordermode ignore place info .t.f2 } -cleanup { destroy ".t.a.b" @@ -485,22 +485,22 @@ test place-13.1 {test respect for internalborder} -setup { test place-14.1 {memory leak testing} -constraints memory -setup { destroy .f proc getbytes {} { - set lines [split [memory info] "\n"] - lindex [lindex $lines 3] 3 + set lines [split [memory info] "\n"] + lindex [lindex $lines 3] 3 } # Repeat each body checking that memory does not increase proc stress {args} { - set res {} - foreach body $args { - set end 0 - for {set i 0} {$i < 5} {incr i} { - uplevel 1 $body - set tmp $end - set end [getbytes] - } - lappend res [expr {$end - $tmp}] - } - return $res + set res {} + foreach body $args { + set end 0 + for {set i 0} {$i < 5} {incr i} { + uplevel 1 $body + set tmp $end + set end [getbytes] + } + lappend res [expr {$end - $tmp}] + } + return $res } } -body { # Test all manners of forgetting content diff --git a/tests/raise.test b/tests/raise.test index 2e9e2c6..7e6b0bd 100644 --- a/tests/raise.test +++ b/tests/raise.test @@ -16,6 +16,7 @@ namespace import -force tcltest::test # Procedure to create a bunch of overlapping windows, which should # make it easy to detect differences in order. +wm geometry . +400+400 proc raise_setup {} { destroy {*}[winfo children .raise] update idletasks diff --git a/tests/safe.test b/tests/safe.test index 9bb1a36..03d298e 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -40,7 +40,7 @@ if {[package vsatisfies [package provide Tcl] 8.6.7-]} { lappend hidden_cmds tcl:encoding:dirs } if {[package vsatisfies [package provide Tcl] 8.7-]} { - lappend hidden_cmds file tcl:encoding:system tcl:file:tempdir tcl:file:home tcl:file:tildeexpand + lappend hidden_cmds file tcl:encoding:system tcl:file:tempdir tcl:file:home tcl:file:tildeexpand zipfs foreach cmd { cmdtype nameofexecutable } {lappend hidden_cmds tcl:info:$cmd} @@ -48,7 +48,7 @@ if {[package vsatisfies [package provide Tcl] 8.7-]} { autopurge list purge status } {lappend hidden_cmds tcl:process:$cmd} foreach cmd { - lmkimg lmkzip mkimg mkkey mkzip mount mount_data unmount + canonical exists info list lmkimg lmkzip mkimg mkkey mkzip mount mountdata root unmount } {lappend hidden_cmds tcl:zipfs:$cmd} } foreach cmd { diff --git a/tests/safePrimarySelection.test b/tests/safePrimarySelection.test index fd237f0..4605735 100644 --- a/tests/safePrimarySelection.test +++ b/tests/safePrimarySelection.test @@ -67,20 +67,20 @@ set ::_test_tmp::script { namespace eval ::_test_tmp {} proc ::_test_tmp::getPrimarySelection {} { - if {[catch {::tk::GetSelection . PRIMARY} sel]} { - set sel {} - } - return $sel + if {[catch {::tk::GetSelection . PRIMARY} sel]} { + set sel {} + } + return $sel } proc ::_test_tmp::setPrimarySelection {} { - destroy .preset - text .preset -exportselection 1 - .preset insert end OLD_VALUE - # pack .preset - .preset tag add sel 1.0 end-1c - update - return + destroy .preset + text .preset -exportselection 1 + .preset insert end OLD_VALUE + # pack .preset + .preset tag add sel 1.0 end-1c + update + return } # Clearing the PRIMARY selection is troublesome. @@ -88,123 +88,123 @@ set ::_test_tmp::script { # However, the window must continue to exist, or some X11 servers # will set the PRIMARY selection to something else. proc ::_test_tmp::clearPrimarySelection {} { - destroy .clear - text .clear -exportselection 1 - .clear insert end TMP_VALUE - # pack .clear - .clear tag add sel 1.0 end-1c - update - .clear tag remove sel 1.0 end-1c - update - return + destroy .clear + text .clear -exportselection 1 + .clear insert end TMP_VALUE + # pack .clear + .clear tag add sel 1.0 end-1c + update + .clear tag remove sel 1.0 end-1c + update + return } # If this interpreter can write to the PRIMARY # selection, the commands below will do so. proc ::_test_tmp::tryText {} { - text .t -exportselection 1 - .t insert end PAYLOAD - pack .t - .t tag add sel 1.0 end-1c - update - return + text .t -exportselection 1 + .t insert end PAYLOAD + pack .t + .t tag add sel 1.0 end-1c + update + return } proc ::_test_tmp::tryEntry {} { - entry .t -exportselection 1 - .t insert end PAYLOAD - pack .t - .t selection range 0 end - update - return + entry .t -exportselection 1 + .t insert end PAYLOAD + pack .t + .t selection range 0 end + update + return } proc ::_test_tmp::tryTtkEntry {} { - ::ttk::entry .t -exportselection 1 - .t insert end PAYLOAD - pack .t - .t selection range 0 end - update - return + ::ttk::entry .t -exportselection 1 + .t insert end PAYLOAD + pack .t + .t selection range 0 end + update + return } proc ::_test_tmp::tryListbox {} { - listbox .t -exportselection 1 - .t insert end list1 PAYLOAD list3 - pack .t - .t selection set 1 - update - return + listbox .t -exportselection 1 + .t insert end list1 PAYLOAD list3 + pack .t + .t selection set 1 + update + return } proc ::_test_tmp::trySpinbox {ver} { - if {$ver == 1} { - # spinbox as entry - spinbox .t -exportselection 1 -values {1 2 3 4 5} - .t delete 0 end - .t insert end PAYLOAD - pack .t - .t selection range 0 end - update - return - # selects PAYLOAD - } elseif {$ver == 2} { - # spinbox spun - spinbox .t -exportselection 1 -values {1 2 3 4 5} - .t invoke buttonup - pack .t - .t selection range 0 end - update - return - # selects 2 - } else { - # spinbox spun/selected/spun - spinbox .t -exportselection 1 -values {1 2 3 4 5} - .t invoke buttonup - pack .t - .t selection range 0 end - update - .t invoke buttonup - update - return - # selects 3 - } + if {$ver == 1} { + # spinbox as entry + spinbox .t -exportselection 1 -values {1 2 3 4 5} + .t delete 0 end + .t insert end PAYLOAD + pack .t + .t selection range 0 end + update + return + # selects PAYLOAD + } elseif {$ver == 2} { + # spinbox spun + spinbox .t -exportselection 1 -values {1 2 3 4 5} + .t invoke buttonup + pack .t + .t selection range 0 end + update + return + # selects 2 + } else { + # spinbox spun/selected/spun + spinbox .t -exportselection 1 -values {1 2 3 4 5} + .t invoke buttonup + pack .t + .t selection range 0 end + update + .t invoke buttonup + update + return + # selects 3 + } } proc ::_test_tmp::tryTtkSpinbox {ver} { - if {$ver == 1} { - # ttk::spinbox as entry - ::ttk::spinbox .t -exportselection 1 -values {1 2 3 4 5} - .t delete 0 end - .t insert end PAYLOAD - pack .t - .t selection range 0 end - update - return - } elseif {$ver == 2} { - # ttk::spinbox spun - ::ttk::spinbox .t -exportselection 1 -values {1 2 3 4 5} - ::ttk::spinbox::Spin .t +1 - ::ttk::spinbox::Spin .t +1 - pack .t - # ttk::spinbox::Spin sets selection - update - return - # selects 2 - } else { - # ttk::spinbox spun/selected/spun - ::ttk::spinbox .t -exportselection 1 -values {1 2 3 4 5} - ::ttk::spinbox::Spin .t +1 - ::ttk::spinbox::Spin .t +1 - pack .t - # ttk::spinbox::Spin sets selection - update - ::ttk::spinbox::Spin .t +1 - update - return - # selects 3 - } + if {$ver == 1} { + # ttk::spinbox as entry + ::ttk::spinbox .t -exportselection 1 -values {1 2 3 4 5} + .t delete 0 end + .t insert end PAYLOAD + pack .t + .t selection range 0 end + update + return + } elseif {$ver == 2} { + # ttk::spinbox spun + ::ttk::spinbox .t -exportselection 1 -values {1 2 3 4 5} + ::ttk::spinbox::Spin .t +1 + ::ttk::spinbox::Spin .t +1 + pack .t + # ttk::spinbox::Spin sets selection + update + return + # selects 2 + } else { + # ttk::spinbox spun/selected/spun + ::ttk::spinbox .t -exportselection 1 -values {1 2 3 4 5} + ::ttk::spinbox::Spin .t +1 + ::ttk::spinbox::Spin .t +1 + pack .t + # ttk::spinbox::Spin sets selection + update + ::ttk::spinbox::Spin .t +1 + update + return + # selects 3 + } } } diff --git a/tests/scale.test b/tests/scale.test index f08015e..7d42070 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -30,7 +30,7 @@ test scale-1.1 {configuration options} -body { .s configure -activebackground [lindex [.s configure -activebackground] 3] } -result {#ff0000} test scale-1.2 {configuration options} -body { - .s configure -activebackground non-existent + .s configure -activebackground non-existent } -returnCodes error -result {unknown color name "non-existent"} test scale-1.3 {configuration options} -body { .s configure -background #ff0000 @@ -39,7 +39,7 @@ test scale-1.3 {configuration options} -body { .s configure -background [lindex [.s configure -background] 3] } -result {#ff0000} test scale-1.4 {configuration options} -body { - .s configure -background non-existent + .s configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test scale-1.5 {configuration options} -body { .s configure -bd 4 @@ -48,7 +48,7 @@ test scale-1.5 {configuration options} -body { .s configure -bd [lindex [.s configure -bd] 3] } -result 4 test scale-1.6 {configuration options} -body { - .s configure -bd badValue + .s configure -bd badValue } -returnCodes error -result {expected screen distance but got "badValue"} test scale-1.7 {configuration options} -body { .s configure -bigincrement 12.5 @@ -57,7 +57,7 @@ test scale-1.7 {configuration options} -body { .s configure -bigincrement [lindex [.s configure -bigincrement] 3] } -result {12.5} test scale-1.8 {configuration options} -body { - .s configure -bigincrement badValue + .s configure -bigincrement badValue } -returnCodes error -result {expected floating-point number but got "badValue"} test scale-1.9 {configuration options} -body { .s configure -bg #ff0000 @@ -66,16 +66,16 @@ test scale-1.9 {configuration options} -body { .s configure -bg [lindex [.s configure -bg] 3] } -result {#ff0000} test scale-1.10 {configuration options} -body { - .s configure -bg non-existent + .s configure -bg non-existent } -returnCodes error -result {unknown color name "non-existent"} test scale-1.11 {configuration options} -body { .s configure -borderwidth 1.3 .s cget -borderwidth } -cleanup { .s configure -borderwidth [lindex [.s configure -borderwidth] 3] -} -result 1 +} -result 1.3 test scale-1.12 {configuration options} -body { - .s configure -borderwidth badValue + .s configure -borderwidth badValue } -returnCodes error -result {expected screen distance but got "badValue"} test scale-1.13 {configuration options} -body { .s configure -command {set x} @@ -90,7 +90,7 @@ test scale-1.15 {configuration options} -body { .s configure -cursor [lindex [.s configure -cursor] 3] } -result {arrow} test scale-1.16 {configuration options} -body { - .s configure -cursor badValue + .s configure -cursor badValue } -returnCodes error -result {bad cursor spec "badValue"} test scale-1.17 {configuration options} -body { .s configure -digits 5 @@ -99,7 +99,7 @@ test scale-1.17 {configuration options} -body { .s configure -digits [lindex [.s configure -digits] 3] } -result 5 test scale-1.18 {configuration options} -body { - .s configure -digits badValue + .s configure -digits badValue } -returnCodes error -result {expected integer but got "badValue"} test scale-1.19 {configuration options} -body { .s configure -fg #00ff00 @@ -108,7 +108,7 @@ test scale-1.19 {configuration options} -body { .s configure -fg [lindex [.s configure -fg] 3] } -result {#00ff00} test scale-1.20 {configuration options} -body { - .s configure -fg badValue + .s configure -fg badValue } -returnCodes error -result {unknown color name "badValue"} test scale-1.21 {configuration options} -body { .s configure -font fixed @@ -123,7 +123,7 @@ test scale-1.23 {configuration options} -body { .s configure -foreground [lindex [.s configure -foreground] 3] } -result {green} test scale-1.24 {configuration options} -body { - .s configure -foreground badValue + .s configure -foreground badValue } -returnCodes error -result {unknown color name "badValue"} test scale-1.25 {configuration options} -body { .s configure -from -15.0 @@ -132,7 +132,7 @@ test scale-1.25 {configuration options} -body { .s configure -from [lindex [.s configure -from] 3] } -result {-15.0} test scale-1.26 {configuration options} -body { - .s configure -from badValue + .s configure -from badValue } -returnCodes error -result {expected floating-point number but got "badValue"} test scale-1.27 {configuration options} -body { .s configure -highlightbackground #112233 @@ -141,7 +141,7 @@ test scale-1.27 {configuration options} -body { .s configure -highlightbackground [lindex [.s configure -highlightbackground] 3] } -result {#112233} test scale-1.28 {configuration options} -body { - .s configure -highlightbackground ugly + .s configure -highlightbackground ugly } -returnCodes error -result {unknown color name "ugly"} test scale-1.29 {configuration options} -body { .s configure -highlightcolor #123456 @@ -150,7 +150,7 @@ test scale-1.29 {configuration options} -body { .s configure -highlightcolor [lindex [.s configure -highlightcolor] 3] } -result {#123456} test scale-1.30 {configuration options} -body { - .s configure -highlightcolor non-existent + .s configure -highlightcolor non-existent } -returnCodes error -result {unknown color name "non-existent"} test scale-1.31 {configuration options} -body { .s configure -highlightthickness 2 @@ -159,7 +159,7 @@ test scale-1.31 {configuration options} -body { .s configure -highlightthickness [lindex [.s configure -highlightthickness] 3] } -result 2 test scale-1.32 {configuration options} -body { - .s configure -highlightthickness badValue + .s configure -highlightthickness badValue } -returnCodes error -result {expected screen distance but got "badValue"} test scale-1.33 {configuration options} -body { .s configure -label {Some text} @@ -174,7 +174,7 @@ test scale-1.35 {configuration options} -body { .s configure -length [lindex [.s configure -length] 3] } -result 130 test scale-1.36 {configuration options} -body { - .s configure -length badValue + .s configure -length badValue } -returnCodes error -result {expected screen distance but got "badValue"} test scale-1.37 {configuration options} -body { .s configure -orient horizontal @@ -183,7 +183,7 @@ test scale-1.37 {configuration options} -body { .s configure -orient [lindex [.s configure -orient] 3] } -result {horizontal} test scale-1.38 {configuration options} -body { - .s configure -orient badValue + .s configure -orient badValue } -returnCodes error -result {bad orient "badValue": must be horizontal or vertical} test scale-1.39 {configuration options} -body { .s configure -orient horizontal @@ -198,7 +198,7 @@ test scale-1.41 {configuration options} -body { .s configure -relief [lindex [.s configure -relief] 3] } -result {ridge} test scale-1.42 {configuration options} -body { - .s configure -relief badValue + .s configure -relief badValue } -returnCodes error -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken} test scale-1.43 {configuration options} -body { .s configure -repeatdelay 14 @@ -207,7 +207,7 @@ test scale-1.43 {configuration options} -body { .s configure -repeatdelay [lindex [.s configure -repeatdelay] 3] } -result 14 test scale-1.44 {configuration options} -body { - .s configure -repeatdelay bogus + .s configure -repeatdelay bogus } -returnCodes error -result {expected integer but got "bogus"} test scale-1.45 {configuration options} -body { .s configure -repeatinterval 14 @@ -216,7 +216,7 @@ test scale-1.45 {configuration options} -body { .s configure -repeatinterval [lindex [.s configure -repeatinterval] 3] } -result 14 test scale-1.46 {configuration options} -body { - .s configure -repeatinterval bogus + .s configure -repeatinterval bogus } -returnCodes error -result {expected integer but got "bogus"} test scale-1.47 {configuration options} -body { .s configure -resolution 2.0 @@ -225,7 +225,7 @@ test scale-1.47 {configuration options} -body { .s configure -resolution [lindex [.s configure -resolution] 3] } -result {2.0} test scale-1.48 {configuration options} -body { - .s configure -resolution badValue + .s configure -resolution badValue } -returnCodes error -result {expected floating-point number but got "badValue"} test scale-1.49 {configuration options} -body { .s configure -showvalue 0 @@ -234,7 +234,7 @@ test scale-1.49 {configuration options} -body { .s configure -showvalue [lindex [.s configure -showvalue] 3] } -result 0 test scale-1.50 {configuration options} -body { - .s configure -showvalue badValue + .s configure -showvalue badValue } -returnCodes error -result {expected boolean value but got "badValue"} test scale-1.51 {configuration options} -body { .s configure -sliderlength 86 @@ -243,7 +243,7 @@ test scale-1.51 {configuration options} -body { .s configure -sliderlength [lindex [.s configure -sliderlength] 3] } -result 86 test scale-1.52 {configuration options} -body { - .s configure -sliderlength badValue + .s configure -sliderlength badValue } -returnCodes error -result {expected screen distance but got "badValue"} test scale-1.53 {configuration options} -body { .s configure -sliderrelief raised @@ -252,7 +252,7 @@ test scale-1.53 {configuration options} -body { .s configure -sliderrelief [lindex [.s configure -sliderrelief] 3] } -result {raised} test scale-1.54 {configuration options} -body { - .s configure -sliderrelief badValue + .s configure -sliderrelief badValue } -returnCodes error -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken} test scale-1.55 {configuration options} -body { .s configure -state d @@ -261,7 +261,7 @@ test scale-1.55 {configuration options} -body { .s configure -state [lindex [.s configure -state] 3] } -result {disabled} test scale-1.56 {configuration options} -body { - .s configure -state badValue + .s configure -state badValue } -returnCodes error -result {bad state "badValue": must be active, disabled, or normal} test scale-1.57 {configuration options} -body { .s configure -state n @@ -282,7 +282,7 @@ test scale-1.61 {configuration options} -body { .s configure -tickinterval [lindex [.s configure -tickinterval] 3] } -result {4.0} test scale-1.62 {configuration options} -body { - .s configure -tickinterval badValue + .s configure -tickinterval badValue } -returnCodes error -result {expected floating-point number but got "badValue"} test scale-1.63 {configuration options} -body { .s configure -to 14.9 @@ -291,7 +291,7 @@ test scale-1.63 {configuration options} -body { .s configure -to [lindex [.s configure -to] 3] } -result {15.0} test scale-1.64 {configuration options} -body { - .s configure -to badValue + .s configure -to badValue } -returnCodes error -result {expected floating-point number but got "badValue"} test scale-1.65 {configuration options} -body { .s configure -troughcolor #ff0000 @@ -300,7 +300,7 @@ test scale-1.65 {configuration options} -body { .s configure -troughcolor [lindex [.s configure -troughcolor] 3] } -result {#ff0000} test scale-1.66 {configuration options} -body { - .s configure -troughcolor non-existent + .s configure -troughcolor non-existent } -returnCodes error -result {unknown color name "non-existent"} test scale-1.67 {configuration options} -body { .s configure -variable x @@ -315,7 +315,7 @@ test scale-1.69 {configuration options} -body { .s configure -width [lindex [.s configure -width] 3] } -result 32 test scale-1.70 {configuration options} -body { - .s configure -width badValue + .s configure -width badValue } -returnCodes error -result {expected screen distance but got "badValue"} destroy .s @@ -556,7 +556,7 @@ test scale-5.5 {ConfigureScale procedure} -setup { } -body { scale .s -from 1.11 -to 1.89 -resolution .1 -tickinterval .76 list [format %.1f [.s cget -from]] [format %.1f [.s cget -to]] \ - [format %.1f [.s cget -tickinterval]] + [format %.1f [.s cget -tickinterval]] } -cleanup { deleteWindows } -result {1.1 1.9 0.8} @@ -726,7 +726,7 @@ test scale-7.3 {ComputeScaleGeometry procedure} -constraints { deleteWindows } -body { scale .s -from 0 -to 1000 -orient vertical -showvalue 0 -width 10 \ - -sliderlength 10 + -sliderlength 10 pack .s update list [winfo reqwidth .s] [winfo reqheight .s] @@ -739,7 +739,7 @@ test scale-7.4 {ComputeScaleGeometry procedure} -constraints { deleteWindows } -body { scale .s -from 0 -to 1000 -orient vertical -showvalue 0 -bd 5 \ - -relief sunken + -relief sunken pack .s update list [winfo reqwidth .s] [winfo reqheight .s] @@ -764,7 +764,7 @@ test scale-7.6 {ComputeScaleGeometry procedure} -constraints { deleteWindows } -body { scale .s -from 0 -to 1000 -label "Long string" -orient horizontal \ - -tick 500 + -tick 500 pack .s update list [winfo reqwidth .s] [winfo reqheight .s] @@ -787,7 +787,7 @@ test scale-7.8 {ComputeScaleGeometry procedure} -setup { deleteWindows } -body { scale .s -from 0 -to 1000 -orient horizontal -showvalue 0 -bd 5 \ - -relief raised -highlightthickness 2 + -relief raised -highlightthickness 2 pack .s update list [winfo reqwidth .s] [winfo reqheight .s] @@ -806,7 +806,7 @@ test scale-8.1 {ScaleElement procedure} -constraints { .s set 30 update list [.s identify 53 52] [.s identify 54 52] [.s identify 70 52] \ - [.s identify 71 52] + [.s identify 71 52] } -cleanup { deleteWindows } -result {{} trough1 trough1 {}} @@ -820,7 +820,7 @@ test scale-8.2 {ScaleElement procedure} -constraints { .s set 30 update list [.s identify 60 2] [.s identify 60 3] [.s identify 60 302] \ - [.s identify 60 303] + [.s identify 60 303] } -cleanup { deleteWindows } -result {{} trough1 trough2 {}} @@ -834,7 +834,7 @@ test scale-8.3 {ScaleElement procedure} -constraints { .s set 30 update list [.s identify 60 83] [.s identify 60 84] [.s identify 60 113] \ - [.s identify 60 114] \ + [.s identify 60 114] \ } -cleanup { deleteWindows } -result {trough1 slider slider trough2} @@ -842,12 +842,12 @@ test scale-8.4 {ScaleElement procedure} -setup { deleteWindows } -body { scale .s -from 0 -to 100 -orient vertical -bd 4 -width 10 \ - -highlightthickness 1 -length 300 -showvalue 0 + -highlightthickness 1 -length 300 -showvalue 0 pack .s .s set 30 update list [.s identify 4 40] [.s identify 5 40] [.s identify 22 40] \ - [.s identify 23 40] \ + [.s identify 23 40] \ } -cleanup { deleteWindows } -result {{} trough1 trough1 {}} @@ -857,13 +857,13 @@ test scale-8.5 {ScaleElement procedure} -constraints { deleteWindows } -body { scale .s -from 0 -to 100 -orient horizontal -bd 1 \ - -highlightthickness 2 -tick 20 -sliderlength 20 \ - -length 200 -label Test + -highlightthickness 2 -tick 20 -sliderlength 20 \ + -length 200 -label Test pack .s .s set 30 update list [.s identify 150 36] [.s identify 150 37] [.s identify 150 53] \ - [.s identify 150 54] + [.s identify 150 54] } -cleanup { deleteWindows } -result {{} trough2 trough2 {}} @@ -873,12 +873,12 @@ test scale-8.6 {ScaleElement procedure} -constraints { deleteWindows } -body { scale .s -from 0 -to 100 -orient horizontal -bd 2 \ - -highlightthickness 1 -tick 20 -length 200 + -highlightthickness 1 -tick 20 -length 200 pack .s .s set 30 update list [.s identify 150 20] [.s identify 150 21] [.s identify 150 39] \ - [.s identify 150 40] + [.s identify 150 40] } -cleanup { deleteWindows } -result {{} trough2 trough2 {}} @@ -886,12 +886,12 @@ test scale-8.7 {ScaleElement procedure} -setup { deleteWindows } -body { scale .s -from 0 -to 100 -orient horizontal -bd 4 -highlightthickness 2 \ - -length 200 -width 10 -showvalue 0 + -length 200 -width 10 -showvalue 0 pack .s .s set 30 update list [.s identify 30 5] [.s identify 30 6] [.s identify 30 23] \ - [.s identify 30 24] + [.s identify 30 24] } -cleanup { deleteWindows } -result {{} trough1 trough1 {}} @@ -899,12 +899,12 @@ test scale-8.8 {ScaleElement procedure} -setup { deleteWindows } -body { scale .s -from 0 -to 100 -orient horizontal -bd 1 -highlightthickness 2 \ - -tick 20 -sliderlength 20 -length 200 -label Test -showvalue 0 + -tick 20 -sliderlength 20 -length 200 -label Test -showvalue 0 pack .s .s set 30 update list [.s identify 2 28] [.s identify 3 28] [.s identify 202 28] \ - [.s identify 203 28] + [.s identify 203 28] } -cleanup { deleteWindows } -result {{} trough1 trough2 {}} @@ -912,12 +912,12 @@ test scale-8.9 {ScaleElement procedure} -setup { deleteWindows } -body { scale .s -from 0 -to 100 -orient horizontal -bd 1 -highlightthickness 2 \ - -tick 20 -sliderlength 20 -length 200 -label Test -showvalue 0 + -tick 20 -sliderlength 20 -length 200 -label Test -showvalue 0 pack .s .s set 80 update list [.s identify 145 28] [.s identify 146 28] [.s identify 165 28] \ - [.s identify 166 28] + [.s identify 166 28] } -cleanup { deleteWindows } -result {trough1 slider slider trough2} @@ -968,7 +968,7 @@ test scale-9.8 {PixelToValue procedure} -body { } -result 100 test scale-9.9 {PixelToValue procedure} -body { .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal + -orient horizontal update .s get 76 152 } -result 65 @@ -981,7 +981,7 @@ test scale-10.1 {ValueToPixel procedure} -constraints { deleteWindows } -body { scale .s -from 0 -to 100 -sliderlength 20 -length 124 -bd 2 \ - -orient horizontal -label Test -tick 20 + -orient horizontal -label Test -tick 20 pack .s update list [.s coords -10] [.s coords 40] [.s coords 1000] @@ -994,7 +994,7 @@ test scale-10.2 {ValueToPixel procedure} -constraints { deleteWindows } -body { scale .s -from 100 -to 0 -sliderlength 20 -length 122 -bd 1 \ - -orient vertical -label Test -tick 20 + -orient vertical -label Test -tick 20 pack .s update list [.s coords -10] [.s coords 40] [.s coords 1000] @@ -1007,11 +1007,11 @@ test scale-11.1 {ScaleEventProc procedure} -setup { deleteWindows } -body { proc killScale value { - global x - if {$value > 30} { - destroy .s1 - lappend x [winfo exists .s1] [info commands .s1] - } + global x + if {$value > 30} { + destroy .s1 + lappend x [winfo exists .s1] [info commands .s1] + } } set x initial scale .s1 -from 0 -to 100 -command killScale @@ -1083,8 +1083,8 @@ test scale-13.5 {SetScaleValue procedure} -body { } -result 100 test scale-13.6 {SetScaleValue procedure} -body { proc varTrace args { - global traceInfo - set traceInfo $args + global traceInfo + set traceInfo $args } .s configure -from 0 -to 100 -command {set x} -variable y update @@ -1106,78 +1106,78 @@ pack [scale .s] update test scale-14.1 {RoundValueToResolution procedure} -body { .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 84 152 } -result 72 test scale-14.2 {RoundValueToResolution procedure} -body { .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 86 152 } -result 76 test scale-14.3 {RoundValueToResolution procedure} -body { .s configure -from 100 -to 0 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 84 152 } -result 28 test scale-14.4 {RoundValueToResolution procedure} -body { .s configure -from 100 -to 0 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 86 152 } -result 24 test scale-14.5 {RoundValueToResolution procedure} -body { .s configure -from -100 -to 0 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 84 152 } -result -28 test scale-14.6 {RoundValueToResolution procedure} -body { .s configure -from -100 -to 0 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 86 152 } -result -24 test scale-14.7 {RoundValueToResolution procedure} -body { .s configure -from 0 -to -100 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 84 152 } -result -72 test scale-14.8 {RoundValueToResolution procedure} -body { .s configure -from 0 -to -100 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 4.0 + -orient horizontal -resolution 4.0 update .s get 86 152 } -result -76 test scale-14.9 {RoundValueToResolution procedure} -body { .s configure -from 0 -to 2.25 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 0 + -orient horizontal -resolution 0 update .s get 84 152 } -result {1.64} test scale-14.10 {RoundValueToResolution procedure} -body { .s configure -from 0 -to 2.25 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 0 + -orient horizontal -resolution 0 update .s get 86 152 } -result {1.69} test scale-14.11 {RoundValueToResolution procedure} -body { .s configure -from 0 -to 225 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 0 -digits 5 + -orient horizontal -resolution 0 -digits 5 update .s get 84 152 } -result {164.25} test scale-14.12 {RoundValueToResolution procedure} -body { .s configure -from 0 -to 225 -sliderlength 10 -length 114 -bd 2 \ - -orient horizontal -resolution 0 -digits 5 + -orient horizontal -resolution 0 -digits 5 update .s get 86 152 } -result {168.75} @@ -1211,7 +1211,7 @@ test scale-14a.2 {RoundValueToResolution, RoundIntervalToResolution procedures} update } -body { .s configure -length 400 -bd 0 -from -1.5 -to 1.5 -resolution 1 \ - -tickinterval 1 -digits 2 + -tickinterval 1 -digits 2 update .s get 250 0 } -cleanup { @@ -1245,7 +1245,7 @@ test scale-15.3 {ScaleVarProc procedure} -setup { set y 40q } -cleanup { deleteWindows -} -returnCodes error -result {can't set "y": can't assign non-numeric value to scale variable} +} -returnCodes error -result {can't set "y": cannot assign a non-numeric value to a scale variable} test scale-15.4 {ScaleVarProc procedure} -setup { deleteWindows } -body { @@ -1266,7 +1266,7 @@ test scale-15.5 {ScaleVarProc procedure} -setup { set y x } -cleanup { deleteWindows -} -returnCodes error -result {can't set "y": can't assign non-numeric value to scale variable} +} -returnCodes error -result {can't set "y": cannot assign a non-numeric value to a scale variable} test scale-15.6 {ScaleVarProc procedure} -setup { deleteWindows } -body { @@ -1283,7 +1283,7 @@ test scale-15.7 {ScaleVarProc procedure, variable deleted} -setup { } -body { set y 6 scale .s -from 10 -to 0 -variable y -orient horizontal -length 150 \ - -command "set x" + -command "set x" pack .s update set x untouched @@ -1298,7 +1298,7 @@ test scale-15.8 {ScaleVarProc procedure, don't call -command} -setup { } -body { set y 6 scale .s -from 0 -to 100 -variable y -orient horizontal -length 150 \ - -command "set x" + -command "set x" pack .s update set x untouched @@ -1364,10 +1364,10 @@ test scale-18.2 {Scale button 1 events [Bug 787065]} -setup { pack .s tkwait visibility .s list [catch { - event generate .s <Button-1> -x 0 -y 0 - event generate .s <ButtonRelease-1> -x 0 -y 0 - update - set ::error + event generate .s <Button-1> -x 0 -y 0 + event generate .s <ButtonRelease-1> -x 0 -y 0 + update + set ::error } msg] $msg } -cleanup { unset ::error @@ -1385,10 +1385,10 @@ test scale-18.3 {Scale button 2 events [Bug 787065]} -setup { pack .s tkwait visibility .s list [catch { - event generate .s <Button-2> -x 0 -y 0 - event generate .s <ButtonRelease-2> -x 0 -y 0 - update - set ::error + event generate .s <Button-2> -x 0 -y 0 + event generate .s <ButtonRelease-2> -x 0 -y 0 + update + set ::error } msg] $msg } -cleanup { unset ::error @@ -1399,7 +1399,7 @@ test scale-18.3 {Scale button 2 events [Bug 787065]} -setup { test scale-18.4 {Bug [415415ffff] - Long callback: One click -> Several steps} -setup { catch {destroy .s} scale .s -from 0 -to 5 -resolution 1 -variable x1 -orient horizontal -length 100 \ - -command longCmd -repeatdelay 300 + -command longCmd -repeatdelay 300 pack .s update proc longCmd {unused} { @@ -1418,35 +1418,35 @@ test scale-18.4 {Bug [415415ffff] - Long callback: One click -> Several steps} - test scale-19 {Bug [3529885fff] - Click in through goes in wrong direction} \ -setup { - catch {destroy .s} - catch {destroy .s1 .s2 .s3 .s4} - unset -nocomplain x1 x2 x3 x4 x y - scale .s1 -from 0 -to 100 -resolution 1 -variable x1 -digits 4 -orient horizontal -length 100 - scale .s2 -from 0 -to 100 -resolution -1 -variable x2 -digits 4 -orient horizontal -length 100 - scale .s3 -from 100 -to 0 -resolution 1 -variable x3 -digits 4 -orient horizontal -length 100 - scale .s4 -from 100 -to 0 -resolution -1 -variable x4 -digits 4 -orient horizontal -length 100 - pack .s1 .s2 .s3 .s4 -side left - update + catch {destroy .s} + catch {destroy .s1 .s2 .s3 .s4} + unset -nocomplain x1 x2 x3 x4 x y + scale .s1 -from 0 -to 100 -resolution 1 -variable x1 -digits 4 -orient horizontal -length 100 + scale .s2 -from 0 -to 100 -resolution -1 -variable x2 -digits 4 -orient horizontal -length 100 + scale .s3 -from 100 -to 0 -resolution 1 -variable x3 -digits 4 -orient horizontal -length 100 + scale .s4 -from 100 -to 0 -resolution -1 -variable x4 -digits 4 -orient horizontal -length 100 + pack .s1 .s2 .s3 .s4 -side left + update } \ -body { - foreach {x y} [.s1 coord 50] {} - event generate .s1 <Button-1> -x $x -y $y - event generate .s1 <ButtonRelease-1> -x $x -y $y - foreach {x y} [.s2 coord 50] {} - event generate .s2 <Button-1> -x $x -y $y - event generate .s2 <ButtonRelease-1> -x $x -y $y - foreach {x y} [.s3 coord 50] {} - event generate .s3 <Button-1> -x $x -y $y - event generate .s3 <ButtonRelease-1> -x $x -y $y - foreach {x y} [.s4 coord 50] {} - event generate .s4 <Button-1> -x $x -y $y - event generate .s4 <ButtonRelease-1> -x $x -y $y - update - list $x1 $x2 $x3 $x4 + foreach {x y} [.s1 coord 50] {} + event generate .s1 <Button-1> -x $x -y $y + event generate .s1 <ButtonRelease-1> -x $x -y $y + foreach {x y} [.s2 coord 50] {} + event generate .s2 <Button-1> -x $x -y $y + event generate .s2 <ButtonRelease-1> -x $x -y $y + foreach {x y} [.s3 coord 50] {} + event generate .s3 <Button-1> -x $x -y $y + event generate .s3 <ButtonRelease-1> -x $x -y $y + foreach {x y} [.s4 coord 50] {} + event generate .s4 <Button-1> -x $x -y $y + event generate .s4 <ButtonRelease-1> -x $x -y $y + update + list $x1 $x2 $x3 $x4 } \ -cleanup { - unset x1 x2 x3 x4 x y - destroy .s1 .s2 .s3 .s4 + unset x1 x2 x3 x4 x y + destroy .s1 .s2 .s3 .s4 } \ -result {1.0 1.0 1.0 1.0} @@ -1596,7 +1596,7 @@ test scale-22.1 {Bug [5d991b822e]} { set var INIT scale .b -variable var trace add variable var unset {apply {args { - .b configure -variable {} + .b configure -variable {} }}} pack .b bind .b <Configure> {unset var} @@ -1608,7 +1608,7 @@ test scale-22.2 {Bug [5d991b822e]} { set var INIT scale .b -variable var trace add variable var unset {apply {args { - .b configure -variable new + .b configure -variable new }}} pack .b bind .b <Configure> {unset -nocomplain var} diff --git a/tests/scrollbar.test b/tests/scrollbar.test index ef24860..ad24d8d 100644 --- a/tests/scrollbar.test +++ b/tests/scrollbar.test @@ -18,38 +18,38 @@ proc scroll args { proc getTroughSize {w} { if {[testConstraint testmetrics]} { - # Only Windows has [testmetrics] + # Only Windows has [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 {[tk windowingsystem] eq "x11"} { - # Calculations here assume that the arrow area is a square. + if {[tk windowingsystem] eq "x11"} { + # Calculations here assume that the arrow area is a square. if [string match v* [$w cget -orient]] { - return [expr {[winfo height $w] \ - - ([winfo width $w] \ + return [expr {[winfo height $w] \ + - ([winfo width $w] \ - [$w cget -highlightthickness] \ - [$w cget -bd] + 1)*2}] } else { - return [expr {[winfo width $w] \ - - ([winfo height $w] \ + return [expr {[winfo width $w] \ + - ([winfo height $w] \ - [$w cget -highlightthickness] \ - [$w cget -bd] + 1)*2}] } - } else { - # macOS aqua + } else { + # macOS aqua if [string match v* [$w cget -orient]] { - return [expr {[winfo height $w] \ + return [expr {[winfo height $w] \ - ([$w cget -highlightthickness] \ +[$w cget -bd])*2}] } else { - return [expr {[winfo width $w] \ + return [expr {[winfo width $w] \ - ([$w cget -highlightthickness] \ +[$w cget -bd])*2}] } - } + } } } @@ -78,7 +78,7 @@ foreach test { {-bd 4 4 badValue {expected screen distance but got "badValue"}} {-bg #ff0000 #ff0000 non-existent {unknown color name "non-existent"}} - {-borderwidth 1.3 1 badValue {expected screen distance but got "badValue"}} + {-borderwidth 1.3 1.3 badValue {expected screen distance but got "badValue"}} {-command "set x" {set x} {} {}} {-elementborderwidth 4 4 badValue {expected screen distance but got "badValue"}} {-cursor arrow arrow badValue {bad cursor spec "badValue"}} @@ -302,10 +302,10 @@ if {[testConstraint testmetrics]} { place configure .t.s -width [expr {2*[testmetrics cxhscroll .t.s]+1}] } else { if {[tk windowingsystem] eq "x11"} { - place configure .t.s -width [expr {[winfo height .t.s] - 2*([.t.s cget -highlightthickness] + [.t.s cget -bd] + 1)}] + place configure .t.s -width [expr {[winfo height .t.s] - 2*([.t.s cget -highlightthickness] + [.t.s cget -bd] + 1)}] } else { - # macOS aqua - place configure .t.s -width [expr {2*([.t.s cget -highlightthickness] + [.t.s cget -bd])}] + # macOS aqua + place configure .t.s -width [expr {2*([.t.s cget -highlightthickness] + [.t.s cget -bd])}] } } update @@ -718,9 +718,9 @@ test scrollbar-10.3 {<MouseWheel> event on horizontal scrollbar} -setup { test scrollbar-11.1 {bug fix: [011706ec42] Scrollbar unsafe wrt widget destruction} -body { proc destroy_scrollbar {} { - if {[winfo exists .top.s]} { - destroy .top.s - } + if {[winfo exists .top.s]} { + destroy .top.s + } } toplevel .top scrollbar .top.s @@ -735,9 +735,9 @@ test scrollbar-11.1 {bug fix: [011706ec42] Scrollbar unsafe wrt widget destructi } -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 - } + if {[winfo exists .top.s]} { + destroy .top.s + } } toplevel .top wm minsize .top 50 400 diff --git a/tests/select.test b/tests/select.test index 55f9184..ea7be2b 100644 --- a/tests/select.test +++ b/tests/select.test @@ -20,7 +20,7 @@ tcltest::loadTestedCommands testConstraint cliboardManagerPresent 0 if {![catch {selection get -selection CLIPBOARD_MANAGER -type TARGETS}]} { if {"SAVE_TARGETS" in [selection get -selection CLIPBOARD_MANAGER -type TARGETS]} { - testConstraint cliboardManagerPresent 1 + testConstraint cliboardManagerPresent 1 } } testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] @@ -886,7 +886,7 @@ test select-9.1 {SelCvtToX and SelCvtFromX procedures} -setup { set selValue "1024" set selInfo "" selection handle -selection PRIMARY -format INTEGER -type TEST \ - .f1 {handler TEST} + .f1 {handler TEST} update set result "" lappend result [dobg {selection get TEST}] diff --git a/tests/spinbox.test b/tests/spinbox.test index 6cb52e9..87fb946 100644 --- a/tests/spinbox.test +++ b/tests/spinbox.test @@ -14,35 +14,35 @@ tcltest::loadTestedCommands # For xscrollcommand set scrollInfo {} proc scroll args { - global scrollInfo - set scrollInfo $args + global scrollInfo + set scrollInfo $args } # For trace add variable proc override args { - global x - set x 12345 + global x + set x 12345 } # Procedures used in widget VALIDATION tests proc doval {W d i P s S v V} { - set ::vVals [list $W $d $i $P $s $S $v $V] - return 1 + set ::vVals [list $W $d $i $P $s $S $v $V] + return 1 } proc doval2 {W d i P s S v V} { - set ::vVals [list $W $d $i $P $s $S $v $V] - set ::e mydata - return 1 + set ::vVals [list $W $d $i $P $s $S $v $V] + set ::e mydata + return 1 } proc doval3 {W d i P s S v V} { - set ::vVals [list $W $d $i $P $s $S $v $V] - return 0 + set ::vVals [list $W $d $i $P $s $S $v $V] + return 0 } set cy [font metrics {Courier -12} -linespace] test spinbox-1.1 {configuration option: "activebackground"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -52,19 +52,19 @@ test spinbox-1.1 {configuration option: "activebackground"} -setup { destroy .e } -result {#ff0000} test spinbox-1.2 {configuration option: "activebackground" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -activebackground non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test spinbox-1.3 {configuration option: "background"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -74,19 +74,19 @@ test spinbox-1.3 {configuration option: "background"} -setup { destroy .e } -result {#ff0000} test spinbox-1.4 {configuration option: "background" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -background non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test spinbox-1.5 {configuration option: "bd"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -96,19 +96,19 @@ test spinbox-1.5 {configuration option: "bd"} -setup { destroy .e } -result 4 test spinbox-1.6 {configuration option: "bd" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -bd badValue } -cleanup { destroy .e -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test spinbox-1.7 {configuration option: "bg"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -118,19 +118,19 @@ test spinbox-1.7 {configuration option: "bg"} -setup { destroy .e } -result {#ff0000} test spinbox-1.8 {configuration option: "bg" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -bg non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test spinbox-1.9 {configuration option: "borderwidth"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -138,21 +138,21 @@ test spinbox-1.9 {configuration option: "borderwidth"} -setup { .e cget -borderwidth } -cleanup { destroy .e -} -result 1 +} -result 1.3 test spinbox-1.10 {configuration option: "borderwidth" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -borderwidth badValue } -cleanup { destroy .e -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test spinbox-1.11 {configuration option: "buttonbackground"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -162,19 +162,19 @@ test spinbox-1.11 {configuration option: "buttonbackground"} -setup { destroy .e } -result {#ff0000} test spinbox-1.12 {configuration option: "buttonbackground" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -buttonbackground non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test spinbox-1.13 {configuration option: "buttoncursor"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -184,19 +184,19 @@ test spinbox-1.13 {configuration option: "buttoncursor"} -setup { destroy .e } -result {arrow} test spinbox-1.14 {configuration option: "buttoncursor" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -buttoncursor badValue } -cleanup { destroy .e -} -returnCodes {error} -result {bad cursor spec "badValue"} +} -returnCodes error -result {bad cursor spec "badValue"} test spinbox-1.15 {configuration option: "command"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -207,8 +207,8 @@ test spinbox-1.15 {configuration option: "command"} -setup { } -result {a command} test spinbox-1.16 {configuration option: "cursor"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -218,19 +218,19 @@ test spinbox-1.16 {configuration option: "cursor"} -setup { destroy .e } -result {arrow} test spinbox-1.17 {configuration option: "cursor" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -cursor badValue } -cleanup { destroy .e -} -returnCodes {error} -result {bad cursor spec "badValue"} +} -returnCodes error -result {bad cursor spec "badValue"} test spinbox-1.18 {configuration option: "disabledbackground"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -240,19 +240,19 @@ test spinbox-1.18 {configuration option: "disabledbackground"} -setup { destroy .e } -result {green} test spinbox-1.19 {configuration option: "disabledbackground" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -disabledbackground non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test spinbox-1.20 {configuration option: "disabledforeground"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -262,19 +262,19 @@ test spinbox-1.20 {configuration option: "disabledforeground"} -setup { destroy .e } -result {#110022} test spinbox-1.21 {configuration option: "disabledforeground" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -disabledforeground bogus } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "bogus"} +} -returnCodes error -result {unknown color name "bogus"} test spinbox-1.22 {configuration option: "exportselection"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -284,19 +284,19 @@ test spinbox-1.22 {configuration option: "exportselection"} -setup { destroy .e } -result 1 test spinbox-1.23 {configuration option: "exportselection" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -exportselection xyzzy } -cleanup { destroy .e -} -returnCodes {error} -result {expected boolean value but got "xyzzy"} +} -returnCodes error -result {expected boolean value but got "xyzzy"} test spinbox-1.24 {configuration option: "fg"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -306,19 +306,19 @@ test spinbox-1.24 {configuration option: "fg"} -setup { destroy .e } -result {#110022} test spinbox-1.25 {configuration option: "fg" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -fg bogus } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "bogus"} +} -returnCodes error -result {unknown color name "bogus"} test spinbox-1.26 {configuration option: "font"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -328,19 +328,19 @@ test spinbox-1.26 {configuration option: "font"} -setup { destroy .e } -result {-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*} test spinbox-1.27 {configuration option: "font" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -font {} } -cleanup { destroy .e -} -returnCodes {error} -result {font "" doesn't exist} +} -returnCodes error -result {font "" does not exist} test spinbox-1.28 {configuration option: "foreground"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -350,19 +350,19 @@ test spinbox-1.28 {configuration option: "foreground"} -setup { destroy .e } -result {#110022} test spinbox-1.29 {configuration option: "foreground" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -foreground bogus } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "bogus"} +} -returnCodes error -result {unknown color name "bogus"} test spinbox-1.30 {configuration option: "format"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -372,19 +372,19 @@ test spinbox-1.30 {configuration option: "format"} -setup { destroy .e } -result {%0.5f} test spinbox-1.31 {configuration option: "format" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -format %d } -cleanup { destroy .e -} -returnCodes {error} -result {bad spinbox format specifier "%d"} +} -returnCodes error -result {bad spinbox format specifier "%d"} test spinbox-1.32 {configuration option: "from"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -394,19 +394,19 @@ test spinbox-1.32 {configuration option: "from"} -setup { destroy .e } -result {-10.0} test spinbox-1.33 {configuration option: "from" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -from bogus } -cleanup { destroy .e -} -returnCodes {error} -result {expected floating-point number but got "bogus"} +} -returnCodes error -result {expected floating-point number but got "bogus"} test spinbox-1.34 {configuration option: "highlightbackground"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -416,19 +416,19 @@ test spinbox-1.34 {configuration option: "highlightbackground"} -setup { destroy .e } -result {#123456} test spinbox-1.35 {configuration option: "highlightbackground" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -highlightbackground ugly } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "ugly"} +} -returnCodes error -result {unknown color name "ugly"} test spinbox-1.36 {configuration option: "highlightcolor"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -438,19 +438,19 @@ test spinbox-1.36 {configuration option: "highlightcolor"} -setup { destroy .e } -result {#123456} test spinbox-1.37 {configuration option: "highlightcolor" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -highlightcolor bogus } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "bogus"} +} -returnCodes error -result {unknown color name "bogus"} test spinbox-1.38 {configuration option: "highlightthickness"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -460,19 +460,19 @@ test spinbox-1.38 {configuration option: "highlightthickness"} -setup { destroy .e } -result 6 test spinbox-1.39 {configuration option: "highlightthickness" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -highlightthickness bogus } -cleanup { destroy .e -} -returnCodes {error} -result {expected screen distance but got "bogus"} +} -returnCodes error -result {expected screen distance but got "bogus"} test spinbox-1.40 {configuration option: "highlightthickness"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -483,8 +483,8 @@ test spinbox-1.40 {configuration option: "highlightthickness"} -setup { } -result 0 test spinbox-1.41 {configuration option: "increment"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -494,19 +494,19 @@ test spinbox-1.41 {configuration option: "increment"} -setup { destroy .e } -result {1.0} test spinbox-1.42 {configuration option: "increment" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -increment bogus } -cleanup { destroy .e -} -returnCodes {error} -result {expected floating-point number but got "bogus"} +} -returnCodes error -result {expected floating-point number but got "bogus"} test spinbox-1.43 {configuration option: "insertbackground"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -516,19 +516,19 @@ test spinbox-1.43 {configuration option: "insertbackground"} -setup { destroy .e } -result {#110022} test spinbox-1.44 {configuration option: "insertbackground" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -insertbackground bogus } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "bogus"} +} -returnCodes error -result {unknown color name "bogus"} test spinbox-1.45 {configuration option: "insertborderwidth"} -setup { - spinbox .e -borderwidth 2 -insertwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -insertwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -536,21 +536,21 @@ test spinbox-1.45 {configuration option: "insertborderwidth"} -setup { .e cget -insertborderwidth } -cleanup { destroy .e -} -result 1 +} -result 1.3 test spinbox-1.46 {configuration option: "insertborderwidth" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -insertborderwidth 2.6x } -cleanup { destroy .e -} -returnCodes {error} -result {expected screen distance but got "2.6x"} +} -returnCodes error -result {expected screen distance but got "2.6x"} test spinbox-1.47 {configuration option: "insertofftime"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -560,19 +560,19 @@ test spinbox-1.47 {configuration option: "insertofftime"} -setup { destroy .e } -result 100 test spinbox-1.48 {configuration option: "insertofftime" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -insertofftime 3.2 } -cleanup { destroy .e -} -returnCodes {error} -result {expected integer but got "3.2"} +} -returnCodes error -result {expected integer but got "3.2"} test spinbox-1.49 {configuration option: "insertontime"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -582,19 +582,19 @@ test spinbox-1.49 {configuration option: "insertontime"} -setup { destroy .e } -result 100 test spinbox-1.50 {configuration option: "insertontime" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -insertontime 3.2 } -cleanup { destroy .e -} -returnCodes {error} -result {expected integer but got "3.2"} +} -returnCodes error -result {expected integer but got "3.2"} test spinbox-1.51 {configuration option: "invalidcommand"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -605,8 +605,8 @@ test spinbox-1.51 {configuration option: "invalidcommand"} -setup { } -result {a command} test spinbox-1.52 {configuration option: "invcmd"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -617,8 +617,8 @@ test spinbox-1.52 {configuration option: "invcmd"} -setup { } -result {a command} test spinbox-1.53 {configuration option: "justify"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -628,19 +628,19 @@ test spinbox-1.53 {configuration option: "justify"} -setup { destroy .e } -result {right} test spinbox-1.54 {configuration option: "justify" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -justify bogus } -cleanup { destroy .e -} -returnCodes {error} -result {bad justification "bogus": must be left, right, or center} +} -returnCodes error -result {bad justification "bogus": must be left, right, or center} test spinbox-1.55 {configuration option: "readonlybackground"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -650,19 +650,19 @@ test spinbox-1.55 {configuration option: "readonlybackground"} -setup { destroy .e } -result {green} test spinbox-1.56 {configuration option: "readonlybackground" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -readonlybackground non-existent } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "non-existent"} +} -returnCodes error -result {unknown color name "non-existent"} test spinbox-1.57 {configuration option: "relief"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -672,19 +672,19 @@ test spinbox-1.57 {configuration option: "relief"} -setup { destroy .e } -result {groove} test spinbox-1.58 {configuration option: "relief" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -relief 1.5 } -cleanup { destroy .e -} -returnCodes {error} -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} +} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} test spinbox-1.59 {configuration option: "repeatdelay"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -694,19 +694,19 @@ test spinbox-1.59 {configuration option: "repeatdelay"} -setup { destroy .e } -result 500 test spinbox-1.60 {configuration option: "repeatdelay" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -repeatdelay 3p } -cleanup { destroy .e -} -returnCodes {error} -result {expected integer but got "3p"} +} -returnCodes error -result {expected integer but got "3p"} test spinbox-1.61 {configuration option: "repeatinterval"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -716,19 +716,19 @@ test spinbox-1.61 {configuration option: "repeatinterval"} -setup { destroy .e } -result -500 test spinbox-1.62 {configuration option: "repeatinterval" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -repeatinterval 3p } -cleanup { destroy .e -} -returnCodes {error} -result {expected integer but got "3p"} +} -returnCodes error -result {expected integer but got "3p"} test spinbox-1.63 {configuration option: "selectbackground"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -738,19 +738,19 @@ test spinbox-1.63 {configuration option: "selectbackground"} -setup { destroy .e } -result {#110022} test spinbox-1.64 {configuration option: "selectbackground" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -selectbackground bogus } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "bogus"} +} -returnCodes error -result {unknown color name "bogus"} test spinbox-1.65 {configuration option: "selectborderwidth"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -758,21 +758,21 @@ test spinbox-1.65 {configuration option: "selectborderwidth"} -setup { .e cget -selectborderwidth } -cleanup { destroy .e -} -result 1 +} -result 1.3 test spinbox-1.66 {configuration option: "selectborderwidth" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -selectborderwidth badValue } -cleanup { destroy .e -} -returnCodes {error} -result {expected screen distance but got "badValue"} +} -returnCodes error -result {expected screen distance but got "badValue"} test spinbox-1.67 {configuration option: "selectforeground"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -782,19 +782,19 @@ test spinbox-1.67 {configuration option: "selectforeground"} -setup { destroy .e } -result {#654321} test spinbox-1.68 {configuration option: "selectforeground" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -selectforeground bogus } -cleanup { destroy .e -} -returnCodes {error} -result {unknown color name "bogus"} +} -returnCodes error -result {unknown color name "bogus"} test spinbox-1.69 {configuration option: "state"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -804,19 +804,19 @@ test spinbox-1.69 {configuration option: "state"} -setup { destroy .e } -result {normal} test spinbox-1.70 {configuration option: "state" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -state bogus } -cleanup { destroy .e -} -returnCodes {error} -result {bad state "bogus": must be disabled, normal, or readonly} +} -returnCodes error -result {bad state "bogus": must be disabled, normal, or readonly} test spinbox-1.71 {configuration option: "takefocus"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -827,8 +827,8 @@ test spinbox-1.71 {configuration option: "takefocus"} -setup { } -result {any string} test spinbox-1.72 {configuration option: "textvariable"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -839,8 +839,8 @@ test spinbox-1.72 {configuration option: "textvariable"} -setup { } -result {i} test spinbox-1.73 {configuration option: "to"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -850,19 +850,19 @@ test spinbox-1.73 {configuration option: "to"} -setup { destroy .e } -result {14.9} test spinbox-1.74 {configuration option: "to" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -to bogus } -cleanup { destroy .e -} -returnCodes {error} -result {expected floating-point number but got "bogus"} +} -returnCodes error -result {expected floating-point number but got "bogus"} test spinbox-1.75 {configuration option: "validate"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -872,19 +872,19 @@ test spinbox-1.75 {configuration option: "validate"} -setup { destroy .e } -result {key} test spinbox-1.76 {configuration option: "validate" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -validate "bogus" } -cleanup { destroy .e -} -returnCodes {error} -result {bad validate "bogus": must be all, key, focus, focusin, focusout, or none} +} -returnCodes error -result {bad validate "bogus": must be all, key, focus, focusin, focusout, or none} test spinbox-1.77 {configuration option: "validatecommand"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -895,8 +895,8 @@ test spinbox-1.77 {configuration option: "validatecommand"} -setup { } -result {a command} test spinbox-1.78 {configuration option: "values"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -906,19 +906,19 @@ test spinbox-1.78 {configuration option: "values"} -setup { destroy .e } -result {mon tue wed thur} test spinbox-1.79 {configuration option: "values" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -values {bad {}list} } -cleanup { destroy .e -} -returnCodes {error} -result {list element in braces followed by "list" instead of space} +} -returnCodes error -result {list element in braces followed by "list" instead of space} test spinbox-1.80 {configuration option: "validatecommand"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -929,8 +929,8 @@ test spinbox-1.80 {configuration option: "validatecommand"} -setup { } -result {a command} test spinbox-1.81 {configuration option: "width"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -940,19 +940,19 @@ test spinbox-1.81 {configuration option: "width"} -setup { destroy .e } -result 402 test spinbox-1.82 {configuration option: "width" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -width 3p } -cleanup { destroy .e -} -returnCodes {error} -result {expected integer but got "3p"} +} -returnCodes error -result {expected integer but got "3p"} test spinbox-1.83 {configuration option: "wrap"} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { @@ -962,19 +962,19 @@ test spinbox-1.83 {configuration option: "wrap"} -setup { destroy .e } -result 1 test spinbox-1.84 {configuration option: "wrap" for spinbox} -setup { - spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ + -relief sunken pack .e update } -body { .e configure -wrap xyzzy } -cleanup { destroy .e -} -returnCodes {error} -result {expected boolean value but got "xyzzy"} +} -returnCodes error -result {expected boolean value but got "xyzzy"} test spinbox-1.85 {configuration option: "xscrollcommand"} -setup { spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ - -relief sunken + -relief sunken pack .e update } -body { @@ -2628,12 +2628,12 @@ test spinbox-8.18 {DeleteChars procedure} -setup { set XPAD 1 set buttonWidth [expr { [font measure [.e cget -font] "0"] + 2 * (1 + $XPAD) }] if {$buttonWidth < 11} { - set buttonWidth 11 + set buttonWidth 11 } set expected [expr { [font measure [.e cget -font] "xyy"] \ - + 2 * ( [.e cget -borderwidth] + \ - [.e cget -highlightthickness] + $XPAD ) \ - + $buttonWidth } ] + + 2 * ( [.e cget -borderwidth] + \ + [.e cget -highlightthickness] + $XPAD ) \ + + $buttonWidth } ] expr {[winfo reqwidth .e] == $expected} } -cleanup { destroy .e @@ -2898,7 +2898,7 @@ test spinbox-13.10 {GetSpinboxIndex procedure} -constraints x11 -body { # 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 + spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 @@ -2918,11 +2918,11 @@ test spinbox-13.11 {GetSpinboxIndex procedure} -constraints aquaOrWin32 -body { # 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 + 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] @@ -2936,11 +2936,11 @@ test spinbox-13.11 {GetSpinboxIndex procedure} -constraints aquaOrWin32 -body { test spinbox-13.12 {GetSpinboxIndex procedure} -constraints x11 -body { # Previous settings: - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken - pack .e - .e insert 0 012345678901234567890 - .e xview 4 - update + 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] @@ -2953,11 +2953,11 @@ test spinbox-13.12 {GetSpinboxIndex procedure} -constraints x11 -body { test spinbox-13.12.1 {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 - update + 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] @@ -2970,11 +2970,11 @@ test spinbox-13.12.1 {GetSpinboxIndex procedure} -constraints unix -body { test spinbox-13.13 {GetSpinboxIndex procedure} -constraints win -body { # Previous settings: - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken - pack .e - .e insert 0 012345678901234567890 - .e xview 4 - update + 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] @@ -2990,11 +2990,11 @@ test spinbox-13.14 {GetSpinboxIndex procedure} -constraints win -body { # 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 + 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] @@ -3010,11 +3010,11 @@ test spinbox-13.14.1 {GetSpinboxIndex procedure} -constraints win -body { # 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 + 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] @@ -3036,7 +3036,7 @@ test spinbox-13.15 {GetSpinboxIndex procedure} -body { 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 @@ -3047,7 +3047,7 @@ test spinbox-13.16 {GetSpinboxIndex procedure} -constraints fonts -body { } -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 @@ -3058,7 +3058,7 @@ test spinbox-13.17 {GetSpinboxIndex procedure} -constraints fonts -body { } -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 @@ -3069,7 +3069,7 @@ test spinbox-13.18 {GetSpinboxIndex procedure} -constraints fonts -body { } -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 @@ -3080,7 +3080,7 @@ test spinbox-13.19 {GetSpinboxIndex procedure} -constraints fonts -body { } -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 @@ -3091,7 +3091,7 @@ test spinbox-13.20 {GetSpinboxIndex procedure} -constraints fonts -body { } -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 @@ -3111,7 +3111,7 @@ test spinbox-13.22 {GetSpinboxIndex procedure} -setup { } -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 @@ -3122,7 +3122,7 @@ test spinbox-13.23 {GetSpinboxIndex procedure} -body { } -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 @@ -3133,7 +3133,7 @@ test spinbox-13.24 {GetSpinboxIndex procedure} -body { } -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 @@ -3157,7 +3157,7 @@ test spinbox-14.1 {SpinboxFetchSelection procedure} -body { 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" + append x "This is line $i, out of 500\n" } } -body { spinbox .e @@ -3283,10 +3283,10 @@ test spinbox-19.1 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert 0 a set ::vVals @@ -3298,10 +3298,10 @@ test spinbox-19.2 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert 0 a ;# previous settings .e insert 1 b @@ -3314,10 +3314,10 @@ test spinbox-19.3 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert 0 ab ;# previous settings .e insert end c @@ -3330,10 +3330,10 @@ test spinbox-19.4 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert 0 abc ;# previous settings .e insert 1 123 @@ -3346,10 +3346,10 @@ test spinbox-19.5 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert 0 a123bc ;# previous settings .e delete 2 @@ -3362,10 +3362,10 @@ test spinbox-19.6 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert 0 a13bc ;# previous settings .e configure -validate key @@ -3379,10 +3379,10 @@ test spinbox-19.7 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate focus \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert end abc ;# previous settings set ::vVals {} @@ -3396,10 +3396,10 @@ test spinbox-19.8 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e configure -validate focus ;# previous settings .e insert end abcd ;# previous settings @@ -3415,10 +3415,10 @@ test spinbox-19.9 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate focus \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert end abcd ;# previous settings focus -force .e ;# previous settings @@ -3436,10 +3436,10 @@ test spinbox-19.10 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert end abcd ;# previous settings focus -force .e @@ -3454,10 +3454,10 @@ test spinbox-19.11 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert end abcd ;# previous settings focus -force .e ;# previous settings @@ -3475,10 +3475,10 @@ test spinbox-19.12 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate focusin \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert 0 abcd ;# previous settings focus -force .e @@ -3493,10 +3493,10 @@ test spinbox-19.13 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate focusin \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert end abcd ;# previous settings set ::vVals {} @@ -3512,10 +3512,10 @@ test spinbox-19.14 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate focuso \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert end abcd ;# previous settings set ::vVals {} ;# previous settings @@ -3531,10 +3531,10 @@ test spinbox-19.15 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate focuso \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert end abcd ;# previous settings set ::vVals {} ;# previous settings @@ -3554,10 +3554,10 @@ test spinbox-19.16 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate focuso \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert end abcd ;# previous settings set ::vVals {} ;# previous settings @@ -3577,10 +3577,10 @@ test spinbox-19.17 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate focuso \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e .e insert end abcd ;# previous settings set ::e newdata @@ -3595,10 +3595,10 @@ test spinbox-19.18 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate all \ - -validatecommand [list doval3 %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval3 %W %d %i %P %s %S %v %V] \ + -invalidcommand bell \ + -textvariable ::e \ + -background red -foreground white pack .e set ::e newdata ;# previous settings .e configure -validate all @@ -3616,10 +3616,10 @@ test spinbox-19.19 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate all \ - -validatecommand [list doval3 %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -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 @@ -3639,10 +3639,10 @@ test spinbox-19.20 {spinbox widget validation} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate all \ - -validatecommand [list doval %W %d %i %P %s %S %v %V] \ - -invalidcommand bell \ - -textvariable ::e \ - -background red -foreground white + -validatecommand [list doval %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] ;# prev @@ -3664,8 +3664,8 @@ test spinbox-19.21 {spinbox widget validation - bug 40e4bf6198} -setup { unset -nocomplain ::e ::vVals } -body { spinbox .e -validate key \ - -validatecommand [list doval2 %W %d %i %P %s %S %v %V] \ - -textvariable ::e + -validatecommand [list doval2 %W %d %i %P %s %S %v %V] \ + -textvariable ::e pack .e set ::e origdata .e insert 0 A @@ -3707,19 +3707,19 @@ test spinbox-20.5 {spinbox config, -format specifier} -body { .e config -format %2e-1f } -cleanup { destroy .e -} -returnCodes {error} -result {bad spinbox format specifier "%2e-1f"} +} -returnCodes error -result {bad spinbox format specifier "%2e-1f"} test spinbox-20.6 {spinbox config, -format specifier} -body { spinbox .e .e config -format 2.2 } -cleanup { destroy .e -} -returnCodes {error} -result {bad spinbox format specifier "2.2"} +} -returnCodes error -result {bad spinbox format specifier "2.2"} test spinbox-20.7 {spinbox config, -format specifier} -body { spinbox .e .e config -format %2.-2f } -cleanup { destroy .e -} -returnCodes {error} -result {bad spinbox format specifier "%2.-2f"} +} -returnCodes error -result {bad spinbox format specifier "%2.-2f"} test spinbox-20.8 {spinbox config, -format specifier} -body { spinbox .e .e config -format %-2.02f diff --git a/tests/systray.test b/tests/systray.test index a87e6ef..6f38823 100644 --- a/tests/systray.test +++ b/tests/systray.test @@ -14,7 +14,7 @@ test systray-1 {systray icon creation, all options} -setup { image create photo _book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw== } -body { tk systray create -image _book -text "Systray sample" \ - -button1 {puts "button 1 click"} -button3 {puts "button 3 click"} + -button1 {puts "button 1 click"} -button3 {puts "button 3 click"} } -cleanup { tk systray destroy image delete _book @@ -22,17 +22,17 @@ test systray-1 {systray icon creation, all options} -setup { test systray-2 {systray create, argument checking} -body { tk systray create -} -returnCodes {error} -result {missing required option "-image"} +} -returnCodes error -result {missing required option "-image"} test systray-3 {systray create, argument checking} -body { tk systray create -text Hell -} -returnCodes {error} -result {missing required option "-image"} +} -returnCodes error -result {missing required option "-image"} test systray-4 {systray create, argument checking} -setup { image create photo _book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw== } -body { tk systray create -image _book -gorp invalidOption -} -returnCodes {error} -result {unknown option "-gorp": must be -image, -text, -button1 or -button3} +} -returnCodes error -result {unknown option "-gorp": must be -image, -text, -button1 or -button3} test systray-5 {systray icon creation, only required option present} -setup { image create photo _book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw== @@ -94,13 +94,13 @@ test systray-10 {configure non-existing systray icon} -setup { catch {tk systray destroy} } -body { tk systray configure -} -returnCodes {error} -result {systray not created} +} -returnCodes error -result {systray not created} test systray-11 {destroy non-existing systray icon} -setup { catch {tk systray destroy} } -body { tk systray destroy -} -returnCodes {error} -result {systray not created} +} -returnCodes error -result {systray not created} test systray-12 {destroy systray icon works} -setup { image create photo _book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw== @@ -118,7 +118,7 @@ test systray-13 {systray icon creation, attempt to create more than one in an in } -cleanup { tk systray destroy image delete _book -} -returnCodes {error} -result {only one system tray icon supported per interpeter} +} -returnCodes error -result {only one system tray icon supported per interpeter} test systray-14 {systray icon creation, create one per interp, visibiliy checks} -setup { image create photo _book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw== @@ -127,23 +127,23 @@ test systray-14 {systray icon creation, create one per interp, visibiliy checks} interp create second # load Tk into the 'second' interp foreach pkg [info loaded] { - if {[lindex $pkg 1] == "Tk"} { - set loadTk "load $pkg" - break - } + if {[lindex $pkg 1] == "Tk"} { + set loadTk "load $pkg" + break + } } eval $loadTk second # create the icon in the 'second' interp second eval { - # should trigger an error: image _book unknown in 'second' interp' - # image from higer interp should not be visible by 'tk systray' - tk systray create -image _book -text "second interp" + # should trigger an error: image _book unknown in 'second' interp' + # image from higer interp should not be visible by 'tk systray' + tk systray create -image _book -text "second interp" } } -cleanup { tk systray destroy image delete _book interp delete second -} -returnCodes {error} -result {image "_book" doesn't exist} +} -returnCodes error -result {image "_book" does not exist} test systray-15 {systray icon creation, create one per interp} -setup { image create photo _book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw== @@ -152,21 +152,21 @@ test systray-15 {systray icon creation, create one per interp} -setup { interp create second # load Tk into the 'second' interp foreach pkg [info loaded] { - if {[lindex $pkg 1] == "Tk"} { - set loadTk "load $pkg" - break - } + if {[lindex $pkg 1] == "Tk"} { + set loadTk "load $pkg" + break + } } eval $loadTk second # create the icon in the 'second' interp second eval { - image create photo _page -data R0lGODlhCwAPAKIAAP//////AMDAwICAgAAA/wAAAAAAAAAAACwAAAAACwAPAAADMzi6CzAugiAgDGE68aB0RXgRJBFVX0SNpQlUWfahQOvSsgrX7eZJMlQMWBEYj8iQchlKAAA7 - tk systray create -image _page -text "second interp" + image create photo _page -data R0lGODlhCwAPAKIAAP//////AMDAwICAgAAA/wAAAAAAAAAAACwAAAAACwAPAAADMzi6CzAugiAgDGE68aB0RXgRJBFVX0SNpQlUWfahQOvSsgrX7eZJMlQMWBEYj8iQchlKAAA7 + tk systray create -image _page -text "second interp" } } -cleanup { second eval { - tk systray destroy - image delete _page + tk systray destroy + image delete _page } interp delete second tk systray destroy @@ -177,13 +177,13 @@ test systray-16 {systray icon creation from a bitmap, on Linux and macOS only} - nonwin } -setup { set data1 { - #define foo_width 16 - #define foo_height 16 - static unsigned char foo_bits[] = { - 0xff, 0xff, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, - 0x81, 0x81, 0xff, 0xff, 0xff, 0xff, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, - 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xff, 0xff - }; + #define foo_width 16 + #define foo_height 16 + static unsigned char foo_bits[] = { + 0xff, 0xff, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, + 0x81, 0x81, 0xff, 0xff, 0xff, 0xff, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, + 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xff, 0xff + }; } image create bitmap cross -data $data1 } -body { @@ -227,7 +227,7 @@ test sysnotify-2.1 {system notification stems from a systray icon on Windows} -c catch {tk systray destroy} } -body { tk sysnotify {Alert} {This is an alert} -} -returnCodes {error} -result {must create a system tray icon with the "tk systray" command first} +} -returnCodes error -result {must create a system tray icon with the "tk systray" command first} test sysnotify-2.2 {system notification is not linked to any systray icon on X11 or aqua} -constraints { nonwin } -setup { diff --git a/tests/text.test b/tests/text.test index 2303729..f0fa05d 100644 --- a/tests/text.test +++ b/tests/text.test @@ -46,7 +46,7 @@ test text-1.2 {configuration option: "autoseparators"} -setup { .t configure -autoseparators nah } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.3 {configuration option: "background"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -65,7 +65,7 @@ test text-1.4 {configuration option: "background"} -setup { .t configure -background <gorp> } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.5 {configuration option: "bd"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -84,7 +84,7 @@ test text-1.6 {configuration option: "bd"} -setup { .t configure -bd foo } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.7 {configuration option: "bg"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -103,7 +103,7 @@ test text-1.8 {configuration option: "bg"} -setup { .t configure -bg #xx } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.9 {configuration option: "blockcursor"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -122,7 +122,7 @@ test text-1.10 {configuration option: "blockcursor"} -setup { .t configure -blockcursor xx } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.11 {configuration option: "borderwidth"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -141,7 +141,7 @@ test text-1.12 {configuration option: "borderwidth"} -setup { .t configure -borderwidth ++ } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.13 {configuration option: "cursor"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -160,7 +160,7 @@ test text-1.14 {configuration option: "cursor"} -setup { .t configure -cursor lousy } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.15 {configuration option: "exportselection"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -179,7 +179,7 @@ test text-1.16 {configuration option: "exportselection"} -setup { .t configure -exportselection maybe } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.17 {configuration option: "fg"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -198,7 +198,7 @@ test text-1.18 {configuration option: "fg"} -setup { .t configure -fg stupid } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.19 {configuration option: "font"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -217,7 +217,7 @@ test text-1.20 {configuration option: "font"} -setup { .t configure -font {} } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.21 {configuration option: "foreground"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -236,7 +236,7 @@ test text-1.22 {configuration option: "foreground"} -setup { .t configure -foreground bogus } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.23 {configuration option: "height"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -255,7 +255,7 @@ test text-1.24 {configuration option: "height"} -setup { .t configure -height bad } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.25 {configuration option: "highlightbackground"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -274,7 +274,7 @@ test text-1.26 {configuration option: "highlightbackground"} -setup { .t configure -highlightbackground bogus } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.27 {configuration option: "highlightcolor"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -293,7 +293,7 @@ test text-1.28 {configuration option: "highlightcolor"} -setup { .t configure -highlightcolor bogus } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.29 {configuration option: "highlightthickness"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -312,7 +312,7 @@ test text-1.30 {configuration option: "highlightthickness"} -setup { .t configure -highlightthickness bad } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.31 {configuration option: "inactiveselectbackground"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -331,7 +331,7 @@ test text-1.32 {configuration option: "inactiveselectbackground"} -setup { .t configure -inactiveselectbackground bogus } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.33 {configuration option: "insertbackground"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -350,7 +350,7 @@ test text-1.34 {configuration option: "insertbackground"} -setup { .t configure -insertbackground <bogus> } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.35 {configuration option: "insertborderwidth"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -369,7 +369,7 @@ test text-1.36 {configuration option: "insertborderwidth"} -setup { .t configure -insertborderwidth bogus } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.37 {configuration option: "insertofftime"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -388,7 +388,7 @@ test text-1.38 {configuration option: "insertofftime"} -setup { .t configure -insertofftime 2.4 } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.39 {configuration option: "insertontime"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -407,7 +407,7 @@ test text-1.40 {configuration option: "insertontime"} -setup { .t configure -insertontime e1 } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.41 {configuration option: "insertwidth"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -417,7 +417,7 @@ test text-1.41 {configuration option: "insertwidth"} -setup { .t cget -insertwidth } -cleanup { destroy .t -} -result 2 +} -result 2.3 test text-1.42 {configuration option: "insertwidth"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -426,7 +426,7 @@ test text-1.42 {configuration option: "insertwidth"} -setup { .t configure -insertwidth 47d } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.43 {configuration option: "maxundo"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -454,7 +454,7 @@ test text-1.44 {configuration option: "maxundo"} -setup { .t configure -maxundo noway } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.45 {configuration option: "padx"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -464,7 +464,7 @@ test text-1.45 {configuration option: "padx"} -setup { .t cget -padx } -cleanup { destroy .t -} -result 3 +} -result 3.4 test text-1.46 {configuration option: "padx"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -473,7 +473,7 @@ test text-1.46 {configuration option: "padx"} -setup { .t configure -padx 2.4. } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.47 {configuration option: "pady"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -492,7 +492,7 @@ test text-1.48 {configuration option: "pady"} -setup { .t configure -pady bogus } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.49 {configuration option: "relief"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -511,7 +511,7 @@ test text-1.50 {configuration option: "relief"} -setup { .t configure -relief bumpy } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.51 {configuration option: "selectbackground"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -530,7 +530,7 @@ test text-1.52 {configuration option: "selectbackground"} -setup { .t configure -selectbackground bogus } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.53 {configuration option: "selectborderwidth"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -549,7 +549,7 @@ test text-1.54 {configuration option: "selectborderwidth"} -setup { .t configure -selectborderwidth 3x } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.55 {configuration option: "selectforeground"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -568,7 +568,7 @@ test text-1.56 {configuration option: "selectforeground"} -setup { .t configure -selectforeground #12345 } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.57 {configuration option: "spacing1"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -587,7 +587,7 @@ test text-1.58 {configuration option: "spacing1"} -setup { .t configure -spacing1 1.3x } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.59 {configuration option: "spacing1"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -606,7 +606,7 @@ test text-1.60 {configuration option: "spacing1"} -setup { .t configure -spacing1 bogus } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.61 {configuration option: "spacing2"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -625,7 +625,7 @@ test text-1.62 {configuration option: "spacing2"} -setup { .t configure -spacing2 bogus } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.63 {configuration option: "spacing2"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -644,7 +644,7 @@ test text-1.64 {configuration option: "spacing2"} -setup { .t configure -spacing2 bogus } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.65 {configuration option: "spacing3"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -663,7 +663,7 @@ test text-1.66 {configuration option: "spacing3"} -setup { .t configure -spacing3 bogus } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.67 {configuration option: "spacing3"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -682,7 +682,7 @@ test text-1.68 {configuration option: "spacing3"} -setup { .t configure -spacing3 bogus } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.69 {configuration option: "state"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -701,7 +701,7 @@ test text-1.70 {configuration option: "state"} -setup { .t configure -state foo } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.71 {configuration option: "tabs"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -720,7 +720,7 @@ test text-1.72 {configuration option: "tabs"} -setup { .t configure -tabs bad_tabs } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.73 {configuration option: "tabstyle"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -739,7 +739,7 @@ test text-1.74 {configuration option: "tabstyle"} -setup { .t configure -tabstyle garbage } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.75 {configuration option: "undo"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -767,7 +767,7 @@ test text-1.76 {configuration option: "undo"} -setup { .t configure -undo eh } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.77 {configuration option: "width"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -786,7 +786,7 @@ test text-1.78 {configuration option: "width"} -setup { .t configure -width 2.4 } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.79 {configuration option: "wrap"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -805,7 +805,7 @@ test text-1.80 {configuration option: "wrap"} -setup { .t configure -wrap bad_wrap } -cleanup { destroy .t -} -match glob -returnCodes {error} -result {*} +} -match glob -returnCodes error -result {*} test text-1.81 {text options} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t @@ -879,15 +879,15 @@ test text-1.86 {configuration option: "insertunfocussed"} -setup { test text-2.1 {Tk_TextCmd procedure} -body { text -} -returnCodes {error} -result {wrong # args: should be "text pathName ?-option value ...?"} +} -returnCodes error -result {wrong # args: should be "text pathName ?-option value ...?"} test text-2.2 {Tk_TextCmd procedure} -body { text foobar -} -returnCodes {error} -result {bad window path name "foobar"} +} -returnCodes error -result {bad window path name "foobar"} test text-2.3 {Tk_TextCmd procedure} -body { text .t -gorp nofun } -cleanup { destroy .t -} -returnCodes {error} -result {unknown option "-gorp"} +} -returnCodes error -result {unknown option "-gorp"} test text-2.4 {Tk_TextCmd procedure} -body { catch {text .t -gorp nofun} winfo exists .t @@ -945,14 +945,14 @@ test text-3.1 {TextWidgetCmd procedure, basics} -setup { .t } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t option ?arg ...?"} +} -returnCodes error -result {wrong # args: should be ".t option ?arg ...?"} test text-3.2 {TextWidgetCmd procedure} -setup { text .t } -body { .t gorp 1.0 z 1.2 } -cleanup { destroy .t -} -returnCodes {error} -result {bad option "gorp": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, pendingsync, replace, scan, search, see, sync, tag, window, xview, or yview} +} -returnCodes error -result {bad option "gorp": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, pendingsync, replace, scan, search, see, sync, tag, window, xview, or yview} test text-4.1 {TextWidgetCmd procedure, "bbox" option} -setup { text .t @@ -960,21 +960,21 @@ test text-4.1 {TextWidgetCmd procedure, "bbox" option} -setup { .t bbox } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t bbox index"} +} -returnCodes error -result {wrong # args: should be ".t bbox index"} test text-4.2 {TextWidgetCmd procedure, "bbox" option} -setup { text .t } -body { .t bbox a b } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t bbox index"} +} -returnCodes error -result {wrong # args: should be ".t bbox index"} test text-4.3 {TextWidgetCmd procedure, "bbox" option} -setup { text .t } -body { .t bbox bad_mark } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "bad_mark"} +} -returnCodes error -result {bad text index "bad_mark"} test text-5.1 {TextWidgetCmd procedure, "cget" option} -setup { text .t @@ -982,21 +982,21 @@ test text-5.1 {TextWidgetCmd procedure, "cget" option} -setup { .t cget } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t cget option"} +} -returnCodes error -result {wrong # args: should be ".t cget option"} test text-5.2 {TextWidgetCmd procedure, "cget" option} -setup { text .t } -body { .t cget a b } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t cget option"} +} -returnCodes error -result {wrong # args: should be ".t cget option"} test text-5.3 {TextWidgetCmd procedure, "cget" option} -setup { text .t } -body { .t cget -gorp } -cleanup { destroy .t -} -returnCodes {error} -result {unknown option "-gorp"} +} -returnCodes error -result {unknown option "-gorp"} test text-5.4 {TextWidgetCmd procedure, "cget" option} -setup { text .t } -body { @@ -1013,28 +1013,28 @@ test text-6.1 {TextWidgetCmd procedure, "compare" option} -setup { .t compare a b } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t compare index1 op index2"} +} -returnCodes error -result {wrong # args: should be ".t compare index1 op index2"} test text-6.2 {TextWidgetCmd procedure, "compare" option} -setup { text .t } -body { .t compare a b c d } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t compare index1 op index2"} +} -returnCodes error -result {wrong # args: should be ".t compare index1 op index2"} test text-6.3 {TextWidgetCmd procedure, "compare" option} -setup { text .t } -body { .t compare @x == 1.0 } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "@x"} +} -returnCodes error -result {bad text index "@x"} test text-6.4 {TextWidgetCmd procedure, "compare" option} -setup { text .t } -body { .t compare 1.0 < @y } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "@y"} +} -returnCodes error -result {bad text index "@y"} test text-6.5 {TextWidgetCmd procedure, "compare" option} -setup { text .t } -body { @@ -1132,7 +1132,7 @@ Line 7" .t compare 1.0 <x 1.2 } -cleanup { destroy .t -} -returnCodes {error} -result {bad comparison operator "<x": must be <, <=, ==, >=, >, or !=} +} -returnCodes error -result {bad comparison operator "<x": must be <, <=, ==, >=, >, or !=} test text-6.12 {TextWidgetCmd procedure, "compare" option} -setup { text .t } -body { @@ -1146,7 +1146,7 @@ Line 7" .t compare 1.0 >> 1.2 } -cleanup { destroy .t -} -returnCodes {error} -result {bad comparison operator ">>": must be <, <=, ==, >=, >, or !=} +} -returnCodes error -result {bad comparison operator ">>": must be <, <=, ==, >=, >, or !=} test text-6.13 {TextWidgetCmd procedure, "compare" option} -setup { text .t } -body { @@ -1160,7 +1160,7 @@ Line 7" .t compare 1.0 z 1.2 } -cleanup { destroy .t -} -returnCodes {error} -result {bad comparison operator "z": must be <, <=, ==, >=, >, or !=} +} -returnCodes error -result {bad comparison operator "z": must be <, <=, ==, >=, >, or !=} test text-6.14 {TextWidgetCmd procedure, "compare" option} -setup { text .t } -body { @@ -1174,7 +1174,7 @@ Line 7" .t co 1.0 z 1.2 } -cleanup { destroy .t -} -returnCodes {error} -result {ambiguous option "co": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, pendingsync, replace, scan, search, see, sync, tag, window, xview, or yview} +} -returnCodes error -result {ambiguous option "co": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, pendingsync, replace, scan, search, see, sync, tag, window, xview, or yview} # "configure" option is already covered above test text-7.1 {TextWidgetCmd procedure, "debug" option} -setup { @@ -1183,14 +1183,14 @@ test text-7.1 {TextWidgetCmd procedure, "debug" option} -setup { .t debug 0 1 } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t debug boolean"} +} -returnCodes error -result {wrong # args: should be ".t debug boolean"} test text-7.2 {TextWidgetCmd procedure, "debug" option} -setup { text .t } -body { .t de 0 1 } -cleanup { destroy .t -} -returnCodes {error} -result {ambiguous option "de": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, pendingsync, replace, scan, search, see, sync, tag, window, xview, or yview} +} -returnCodes error -result {ambiguous option "de": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, pendingsync, replace, scan, search, see, sync, tag, window, xview, or yview} test text-7.3 {TextWidgetCmd procedure, "debug" option} -setup { text .t } -body { @@ -1215,21 +1215,21 @@ test text-8.1 {TextWidgetCmd procedure, "delete" option} -setup { .t delete } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t delete index1 ?index2 ...?"} +} -returnCodes error -result {wrong # args: should be ".t delete index1 ?index2 ...?"} test text-8.2 {TextWidgetCmd procedure, "delete" option} -setup { text .t } -body { .t delete a b c } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "a"} +} -returnCodes error -result {bad text index "a"} test text-8.3 {TextWidgetCmd procedure, "delete" option} -setup { text .t } -body { .t delete @x 2.2 } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "@x"} +} -returnCodes error -result {bad text index "@x"} test text-8.4 {TextWidgetCmd procedure, "delete" option} -setup { text .t } -body { @@ -1239,7 +1239,7 @@ abcdefghijklm .t delete 2.3 @y } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "@y"} +} -returnCodes error -result {bad text index "@y"} test text-8.5 {TextWidgetCmd procedure, "delete" option} -setup { text .t } -body { @@ -1296,7 +1296,7 @@ abcdefghijklm .t delete 2.1 2.3 foo } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "foo"} +} -returnCodes error -result {bad text index "foo"} test text-8.9 {TextWidgetCmd procedure, "delete" option} -setup { text .t } -body { @@ -1414,7 +1414,7 @@ abcdefghijklm .t replace 1.3 2.3 } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t replace index1 index2 chars ?tagList chars tagList ...?"} +} -returnCodes error -result {wrong # args: should be ".t replace index1 index2 chars ?tagList chars tagList ...?"} test text-8.19 {TextWidgetCmd procedure, "replace" option} -setup { text .t } -body { @@ -1424,7 +1424,7 @@ abcdefghijklm .t replace 3.1 2.3 foo } -cleanup { destroy .t -} -returnCodes {error} -result {index "2.3" before "3.1" in the text} +} -returnCodes error -result {index "2.3" before "3.1" in the text} test text-8.20 {TextWidgetCmd procedure, "replace" option} -setup { text .t } -body { @@ -1486,17 +1486,17 @@ Line 7" rename test.t .t destroy .t } -result [list {edit undo} {delete 2.1 2.4} {mark set insert 2.1} {see insert} \ - {mark set tk::undoMarkL2 2.1} {mark set tk::undoMarkR2 2.4} \ - {mark gravity tk::undoMarkL2 left} {mark gravity tk::undoMarkR2 right} \ - {insert 2.1 ef} {mark set insert 2.3} {see insert} \ - {mark set tk::undoMarkL1 2.1} {mark set tk::undoMarkR1 2.3} \ - {mark gravity tk::undoMarkL1 left} {mark gravity tk::undoMarkR1 right} \ - {mark names} \ - {index tk::undoMarkL1} {index tk::undoMarkR1} \ - {mark unset tk::undoMarkL1 tk::undoMarkR1} \ - {index tk::undoMarkL2} {index tk::undoMarkR2} \ - {mark unset tk::undoMarkL2 tk::undoMarkR2} \ - {compare 2.1 > 2.3} {compare 2.6 > 2.3} ] + {mark set tk::undoMarkL2 2.1} {mark set tk::undoMarkR2 2.4} \ + {mark gravity tk::undoMarkL2 left} {mark gravity tk::undoMarkR2 right} \ + {insert 2.1 ef} {mark set insert 2.3} {see insert} \ + {mark set tk::undoMarkL1 2.1} {mark set tk::undoMarkR1 2.3} \ + {mark gravity tk::undoMarkL1 left} {mark gravity tk::undoMarkR1 right} \ + {mark names} \ + {index tk::undoMarkL1} {index tk::undoMarkR1} \ + {mark unset tk::undoMarkL1 tk::undoMarkR1} \ + {index tk::undoMarkL2} {index tk::undoMarkR2} \ + {mark unset tk::undoMarkL2 tk::undoMarkR2} \ + {compare 2.1 > 2.3} {compare 2.6 > 2.3} ] test text-8.23 {TextWidgetCmd procedure, "replace" option with undo} -setup { text .t @@ -1594,7 +1594,7 @@ test text-8.27 {TextWidgetCmd procedure, "replace" option crash} -setup { } -body { .tt insert 0.0 \na for {set i 0} {$i < 2} {incr i} { - .tt replace 2.0 3.0 b + .tt replace 2.0 3.0 b } } -cleanup { destroy .tt @@ -1616,28 +1616,28 @@ test text-9.1 {TextWidgetCmd procedure, "get" option} -setup { .t get } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t get ?-displaychars? ?--? index1 ?index2 ...?"} +} -returnCodes error -result {wrong # args: should be ".t get ?-displaychars? ?--? index1 ?index2 ...?"} test text-9.2 {TextWidgetCmd procedure, "get" option} -setup { text .t } -body { .t get a b c } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "a"} +} -returnCodes error -result {bad text index "a"} test text-9.3 {TextWidgetCmd procedure, "get" option} -setup { text .t } -body { .t get @q 3.1 } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "@q"} +} -returnCodes error -result {bad text index "@q"} test text-9.4 {TextWidgetCmd procedure, "get" option} -setup { text .t } -body { .t get 3.1 @r } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "@r"} +} -returnCodes error -result {bad text index "@r"} test text-9.5 {TextWidgetCmd procedure, "get" option} -setup { text .t } -body { @@ -1867,7 +1867,7 @@ Line 7" .t get 5.2 5.4 5.5 foo } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "foo"} +} -returnCodes error -result {bad text index "foo"} test text-9.21 {TextWidgetCmd procedure, "get" option} -setup { text .t } -body { @@ -2061,35 +2061,35 @@ test text-10.1 {TextWidgetCmd procedure, "count" option} -setup { .t count } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t count ?-option value ...? index1 index2"} +} -returnCodes error -result {wrong # args: should be ".t count ?-option value ...? index1 index2"} test text-10.2 {TextWidgetCmd procedure, "count" option} -setup { text .t } -body { .t count blah 1.0 2.0 } -cleanup { destroy .t -} -returnCodes {error} -result {bad option "blah": must be -chars, -displaychars, -displayindices, -displaylines, -indices, -lines, -update, -xpixels, or -ypixels} +} -returnCodes error -result {bad option "blah": must be -chars, -displaychars, -displayindices, -displaylines, -indices, -lines, -update, -xpixels, or -ypixels} test text-10.3 {TextWidgetCmd procedure, "count" option} -setup { text .t } -body { .t count a b } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "a"} +} -returnCodes error -result {bad text index "a"} test text-10.4 {TextWidgetCmd procedure, "count" option} -setup { text .t } -body { .t count @q 3.1 } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "@q"} +} -returnCodes error -result {bad text index "@q"} test text-10.5 {TextWidgetCmd procedure, "count" option} -setup { text .t } -body { .t count 3.1 @r } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "@r"} +} -returnCodes error -result {bad text index "@r"} test text-10.6 {TextWidgetCmd procedure, "count" option} -setup { text .t .t insert 1.0 "Line 1 @@ -2187,7 +2187,7 @@ Line 7" .t count 5.2 foo } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "foo"} +} -returnCodes error -result {bad text index "foo"} test text-10.13 {TextWidgetCmd procedure, "count" option} -setup { text .t } -body { @@ -2608,7 +2608,7 @@ test text-10.32 {TextWidgetCmd procedure, "count" option} -setup { .t count -lines 1.0 2.0 3.0 } -cleanup { destroy .t -} -returnCodes {error} -result {bad option "1.0": must be -chars, -displaychars, -displayindices, -displaylines, -indices, -lines, -update, -xpixels, or -ypixels} +} -returnCodes error -result {bad option "1.0": must be -chars, -displaychars, -displayindices, -displaylines, -indices, -lines, -update, -xpixels, or -ypixels} test text-10.33 {TextWidgetCmd procedure, "count" option} -setup { text .t } -body { @@ -2736,7 +2736,7 @@ test text-10.42 {TextWidgetCmd procedure, "count" option} -setup { set res {} } -body { for {set i 1} {$i < 25} {incr i} { - .t insert end "Line $i\n" + .t insert end "Line $i\n" } .t tag configure hidden -elide true .t tag add hidden 5.7 11.0 @@ -2957,7 +2957,7 @@ test text-11a.2 {TextWidgetCmd procedure, "pendingsync" option} -setup { update set content {} for {set i 1} {$i < 300} {incr i} { - append content [string repeat "$i " 15] \n + append content [string repeat "$i " 15] \n } .top.yt insert 1.0 $content # wait for end of line metrics calculation to get correct $fraction1 @@ -2996,7 +2996,7 @@ test text-11a.12 {TextWidgetCmd procedure, "sync" option} -setup { set content {} # Use long lines so the line metrics will need updating. for {set i 1} {$i < 30} {incr i} { - append content [string repeat "$i " 200] \n + append content [string repeat "$i " 200] \n } .top.yt insert 1.0 $content # wait for end of line metrics calculation to get correct $fraction1 @@ -3040,7 +3040,7 @@ test text-11a.22 {TextWidgetCmd procedure, "sync" option with -command} -setup { update set content {} for {set i 1} {$i < 30} {incr i} { - append content [string repeat "$i " 15] \n + append content [string repeat "$i " 15] \n } .top.yt insert 1.0 $content # first case: line metrics calculation still running when launching 'sync -command' @@ -3067,7 +3067,7 @@ test text-11a.31 {"<<WidgetViewSync>>" event} -setup { update set content {} for {set i 1} {$i < 300} {incr i} { - append content [string repeat "$i " 15] \n + append content [string repeat "$i " 15] \n } # Sync the widget and process <<WidgetViewSync>> events before binding. .top.yt sync @@ -3099,7 +3099,7 @@ test text-11a.41 {"sync" "pendingsync" and <<WidgetViewSync>>} -setup { update set content {} for {set i 1} {$i < 300} {incr i} { - append content [string repeat "$i " 50] \n + append content [string repeat "$i " 50] \n } # Sync the widget and process all <<WidgetViewSync>> events before binding. .top.yt sync @@ -3123,8 +3123,8 @@ test text-11a.41 {"sync" "pendingsync" and <<WidgetViewSync>>} -setup { } -result {Sync:0 Pending:1 Sync:1 Pending:0} test text-11a.51 {<<WidgetViewSync>> calls Tk_SendVirtualEvent(), - NOT Tk_HandleEvent(). - Bug [b362182e45704dd7bbd6aed91e48122035ea3d16]} -setup { + NOT Tk_HandleEvent(). + Bug [b362182e45704dd7bbd6aed91e48122035ea3d16]} -setup { destroy .top.t .top } -body { set res {} @@ -3132,7 +3132,7 @@ test text-11a.51 {<<WidgetViewSync>> calls Tk_SendVirtualEvent(), pack [text .top.t] update 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 @@ -3148,28 +3148,28 @@ test text-12.1 {TextWidgetCmd procedure, "index" option} -setup { .t index } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t index index"} +} -returnCodes error -result {wrong # args: should be ".t index index"} test text-12.2 {TextWidgetCmd procedure, "index" option} -setup { text .t } -body { .t ind a b } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t index index"} +} -returnCodes error -result {wrong # args: should be ".t index index"} test text-12.3 {TextWidgetCmd procedure, "index" option} -setup { text .t } -body { .t in a b } -cleanup { destroy .t -} -returnCodes {error} -result {ambiguous option "in": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, pendingsync, replace, scan, search, see, sync, tag, window, xview, or yview} +} -returnCodes error -result {ambiguous option "in": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, pendingsync, replace, scan, search, see, sync, tag, window, xview, or yview} test text-12.4 {TextWidgetCmd procedure, "index" option} -setup { text .t } -body { .t index @xyz } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "@xyz"} +} -returnCodes error -result {bad text index "@xyz"} test text-12.5 {TextWidgetCmd procedure, "index" option} -setup { [text .t] insert 1.0 "Line 1 aefghijklm @@ -3197,7 +3197,7 @@ Line 7" .t insert 1.2 } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t insert index chars ?tagList chars tagList ...?"} +} -returnCodes error -result {wrong # args: should be ".t insert index chars ?tagList chars tagList ...?"} test text-13.2 {TextWidgetCmd procedure, "insert" option} -setup { text .t } -body { @@ -3277,7 +3277,7 @@ test text-13.8 {TextWidgetCmd procedure, "insert" option} -setup { .t insert 1.0 "Sample text" "a \{b" } -cleanup { destroy .t -} -returnCodes {error} -result {unmatched open brace in list} +} -returnCodes error -result {unmatched open brace in list} test text-13.9 {TextWidgetCmd procedure, "insert" option} -setup { text .t } -body { @@ -3304,7 +3304,7 @@ test text-14.1 {ConfigureText procedure} -setup { .t configure -state foobar } -cleanup { destroy .t -} -returnCodes {error} -result {bad state "foobar": must be disabled or normal} +} -returnCodes error -result {bad state "foobar": must be disabled or normal} test text-14.2 {ConfigureText procedure} -setup { text .t } -body { @@ -3335,7 +3335,7 @@ test text-14.5 {ConfigureText procedure} -setup { .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 { @@ -3363,7 +3363,7 @@ test text-14.8 {ConfigureText procedure} -setup { .t configure -wrap bogus } -cleanup { destroy .t -} -returnCodes {error} -result {bad wrap "bogus": must be char, none, or word} +} -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 } -body { @@ -3378,18 +3378,18 @@ test text-14.9 {ConfigureText procedure} -setup { test text-14.10 {ConfigureText procedure} -setup { text .t -font {Courier -12} -borderwidth 2 -highlightthickness 2 } -body { - .t configure -selectborderwidth {} + .t configure -selectborderwidth 0 .t tag cget sel -borderwidth } -cleanup { destroy .t -} -result {} +} -result 0 test text-14.11 {ConfigureText procedure} -setup { text .t } -body { .t configure -selectborderwidth foo } -cleanup { destroy .t -} -returnCodes {error} -result {expected screen distance or "" but got "foo"} +} -returnCodes error -result {expected screen distance but got "foo"} test text-14.12 {ConfigureText procedure} -body { text .t entry .t.e @@ -3691,13 +3691,13 @@ test text-19.2 {DeleteChars procedure} -body { .t delete foobar } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "foobar"} +} -returnCodes error -result {bad text index "foobar"} test text-19.3 {DeleteChars procedure} -body { text .t .t delete 1.0 lousy } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "lousy"} +} -returnCodes error -result {bad text index "lousy"} test text-19.4 {DeleteChars procedure} -body { text .t .t insert 1.0 "Line 1 @@ -3895,7 +3895,7 @@ test text-20.1 {TextFetchSelection procedure} -setup { update } -body { foreach i {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} { - .t insert end $i.0$i.1$i.2$i.3$i.4\n + .t insert end $i.0$i.1$i.2$i.3$i.4\n } .t tag add sel 1.3 3.4 selection get @@ -3910,7 +3910,7 @@ test text-20.2 {TextFetchSelection procedure} -setup { update } -body { foreach i {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} { - .t insert end $i.0$i.1$i.2$i.3$i.4\n + .t insert end $i.0$i.1$i.2$i.3$i.4\n } .t tag add x 1.2 .t tag add x 1.4 @@ -3930,7 +3930,7 @@ test text-20.3 {TextFetchSelection procedure} -setup { update } -body { foreach i {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} { - .t insert end $i.0$i.1$i.2$i.3$i.4\n + .t insert end $i.0$i.1$i.2$i.3$i.4\n } .t tag remove sel 1.0 end .t tag add sel 13.3 @@ -3944,7 +3944,7 @@ test text-20.4 {TextFetchSelection procedure} -setup { update } -body { foreach i {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} { - .t insert end $i.0$i.1$i.2$i.3$i.4\n + .t insert end $i.0$i.1$i.2$i.3$i.4\n } .t tag remove x 1.0 end .t tag add sel 1.0 3.4 @@ -3965,7 +3965,7 @@ test text-20.5 {TextFetchSelection procedure, long selections} -setup { set x "" } -body { for {set i 1} {$i < 200} {incr i} { - append x "This is line $i, padded to just about 53 characters.\n" + append x "This is line $i, padded to just about 53 characters.\n" } .t insert end $x .t tag add sel 1.0 end @@ -4084,7 +4084,7 @@ test text-22.8 {TextSearchCmd procedure, -count option} -body { .t search -count } -cleanup { destroy .t -} -returnCodes {error} -result {no value given for "-count" option} +} -returnCodes error -result {no value given for "-count" option} test text-22.9 {TextSearchCmd procedure, -nocase option} -body { text .t .t insert end "xxyz xyz x. the\nfoo -forward bar xxxxx BaR foo\nxyz xxyzx" @@ -4112,7 +4112,7 @@ test text-22.12 {TextSearchCmd procedure, -nolinestop option} -body { .t search -nolinestop BaR 1.1 } -cleanup { destroy .t -} -returnCodes {error} -result {the "-nolinestop" option requires the "-regexp" option to be present} +} -returnCodes error -result {the "-nolinestop" option requires the "-regexp" option to be present} test text-22.13 {TextSearchCmd procedure, -nolinestop option} -body { text .t .t insert end "xxyz xyz x. the\nfoo -forward bar xxxxx BaR foo\nxyz xxyzx" @@ -4134,20 +4134,20 @@ test text-22.15 {TextSearchCmd procedure, argument parsing} -body { .t search abc } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t search ?switches? pattern index ?stopIndex?"} +} -returnCodes error -result {wrong # args: should be ".t search ?switches? pattern index ?stopIndex?"} test text-22.16 {TextSearchCmd procedure, argument parsing} -body { text .t .t insert end "xxyz xyz x. the\nfoo -forward bar xxxxx BaR foo\nxyz xxyzx" .t search abc d e f } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t search ?switches? pattern index ?stopIndex?"} +} -returnCodes error -result {wrong # args: should be ".t search ?switches? pattern index ?stopIndex?"} test text-22.17 {TextSearchCmd procedure, check index} -body { text .t .t search abc gorp } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "gorp"} +} -returnCodes error -result {bad text index "gorp"} test text-22.18 {TextSearchCmd procedure, startIndex == "end"} -body { text .t .t insert end "xxyz xyz x. the\nfoo -forward bar xxxxx BaR foo\nxyz xxyzx" @@ -4168,7 +4168,7 @@ test text-22.20 {TextSearchCmd procedure, bad stopIndex} -body { .t search abc 1.0 lousy } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "lousy"} +} -returnCodes error -result {bad text index "lousy"} test text-22.21 {TextSearchCmd procedure, pattern case conversion} -body { text .t .t insert end "xxyz xyz x. the\nfoo -forward bar xxxxx BaR foo\nxyz xxyzx" @@ -4182,7 +4182,7 @@ test text-22.22 {TextSearchCmd procedure, bad regular expression pattern} -body .t search -regexp a( 1.0 } -cleanup { destroy .t -} -returnCodes {error} -result {couldn't compile regular expression pattern: parentheses () not balanced} +} -returnCodes error -result {cannot compile regular expression pattern: parentheses () not balanced} test text-22.23 {TextSearchCmd procedure, skip dummy last line} -body { text .t .t insert end "xxyz xyz x. the\nfoo -forward bar xxxxx BaR foo\nxyz xxyzx" @@ -4486,7 +4486,7 @@ test text-22.56 {TextSearchCmd procedure, error setting variable} -body { .t search -count a(2) xyz 1.0 } -cleanup { destroy .t -} -returnCodes {error} -result {can't set "a(2)": variable isn't array} +} -returnCodes error -result {can't set "a(2)": variable isn't array} test text-22.57 {TextSearchCmd procedure, wrap-around} -body { text .t .t insert end "xxyz xyz x. the\nfoo -forward bar xxxxx BaR foo\nxyz xxyzx" @@ -6117,7 +6117,7 @@ test text-23.1 {TkTextGetTabs procedure} -setup { .t configure -tabs "\{{}" } -cleanup { destroy .t -} -returnCodes {error} -result {unmatched open brace in list} +} -returnCodes error -result {unmatched open brace in list} test text-23.2 {TkTextGetTabs procedure} -setup { text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 150 pack .t @@ -6126,7 +6126,7 @@ test text-23.2 {TkTextGetTabs procedure} -setup { .t configure -tabs xyz } -cleanup { destroy .t -} -returnCodes {error} -result {expected screen distance but got "xyz"} +} -returnCodes error -result {expected screen distance but got "xyz"} test text-23.3 {TkTextGetTabs procedure} -setup { text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 150 pack .t @@ -6174,7 +6174,7 @@ test text-23.6 {TkTextGetTabs procedure} -setup { .t configure -tabs {100 left 200 lork} } -cleanup { destroy .t -} -returnCodes {error} -result {bad tab alignment "lork": must be left, right, center, or numeric} +} -returnCodes error -result {bad tab alignment "lork": must be left, right, center, or numeric} test text-23.7 {TkTextGetTabs procedure} -setup { text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 150 pack .t @@ -6183,7 +6183,7 @@ test text-23.7 {TkTextGetTabs procedure} -setup { .t configure -tabs {100 !44 200 lork} } -cleanup { destroy .t -} -returnCodes {error} -result {expected screen distance but got "!44"} +} -returnCodes error -result {expected screen distance but got "!44"} test text-24.1 {TextDumpCmd procedure, bad args} -body { @@ -6193,7 +6193,7 @@ test text-24.1 {TextDumpCmd procedure, bad args} -body { .t dump } -cleanup { destroy .t -} -returnCodes {error} -result {Usage: .t dump ?-all -image -text -mark -tag -window? ?-command script? index ?index2?} +} -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" @@ -6201,7 +6201,7 @@ test text-24.2 {TextDumpCmd procedure, bad args} -body { .t dump -all } -cleanup { destroy .t -} -returnCodes {error} -result {Usage: .t dump ?-all -image -text -mark -tag -window? ?-command script? index ?index2?} +} -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" @@ -6209,7 +6209,7 @@ test text-24.3 {TextDumpCmd procedure, bad args} -body { .t dump -command } -cleanup { destroy .t -} -returnCodes {error} -result {Usage: .t dump ?-all -image -text -mark -tag -window? ?-command script? index ?index2?} +} -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" @@ -6217,7 +6217,7 @@ test text-24.4 {TextDumpCmd procedure, bad args} -body { .t dump -bogus } -cleanup { destroy .t -} -returnCodes {error} -result {bad option "-bogus": must be -all, -command, -image, -mark, -tag, -text, or -window} +} -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" @@ -6225,7 +6225,7 @@ test text-24.5 {TextDumpCmd procedure, bad args} -body { .t dump bogus } -cleanup { destroy .t -} -returnCodes {error} -result {bad text index "bogus"} +} -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" @@ -6392,8 +6392,8 @@ test text-24.23 {TextDumpCmd procedure, command script} -setup { set x {} pack [text .t] proc Append {varName key value index} { - upvar #0 $varName x - lappend x $key $index $value + upvar #0 $varName x + lappend x $key $index $value } } -body { .t insert end "Line One\nLine Two\nLine Three\nLine Four" @@ -6415,8 +6415,8 @@ test text-24.24 {TextDumpCmd procedure, command script} -setup { set x {} pack [text .t] proc Append {varName key value index} { - upvar #0 $varName x - lappend x $key $index $value + upvar #0 $varName x + lappend x $key $index $value } } -body { .t insert end "Line One\nLine Two\nLine Three\nLine Four" @@ -6481,13 +6481,13 @@ test text-27.1 {TextEditCmd procedure, argument parsing} -body { .t edit } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t edit option ?arg ...?"} +} -returnCodes error -result {wrong # args: should be ".t edit option ?arg ...?"} test text-27.2 {TextEditCmd procedure, argument parsing} -body { pack [text .t] .t edit gorp } -cleanup { destroy .t -} -returnCodes {error} -result {bad edit option "gorp": must be canundo, canredo, modified, redo, reset, separator, or undo} +} -returnCodes error -result {bad edit option "gorp": must be canundo, canredo, modified, redo, reset, separator, or undo} test text-27.3 {TextEditUndo procedure, undoing changes} -body { text .t -undo 1 pack .t @@ -7004,27 +7004,27 @@ test text-27.26 {edit undo and edit redo return ranges} -setup { } -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} ] + {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" + .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} ] + {1.0 4.0} ] test text-27.28 {edit undo and edit redo do not leave \ - spurious temporary marks behind them} -setup { + spurious temporary marks behind them} -setup { destroy .t set res {} } -body { @@ -7068,13 +7068,13 @@ test text-29.1 {tabs - must be positive and must be increasing} -body { .t configure -tabs 0 } -cleanup { destroy .t -} -returnCodes {error} -result {tab stop "0" is not at a positive distance} +} -returnCodes error -result {tab stop "0" is not at a positive distance} test text-29.2 {tabs - must be positive and must be increasing} -body { pack [text .t -wrap none] .t configure -tabs -5 } -cleanup { destroy .t -} -returnCodes {error} -result {tab stop "-5" is not at a positive distance} +} -returnCodes error -result {tab stop "-5" is not at a positive distance} test text-29.3 {tabs - must be positive and must be increasing} -constraints { knownBug } -body { @@ -7084,7 +7084,7 @@ test text-29.3 {tabs - must be positive and must be increasing} -constraints { .t configure -tabs {10c 5c} } -cleanup { destroy .t -} -returnCodes {error} -result {tabs must be monotonically increasing, but "5c" is smaller than or equal to the previous tab} +} -returnCodes error -result {tabs must be monotonically increasing, but "5c" is smaller than or equal to the previous tab} test text-29.4 {tabs - must be positive and must be increasing} -body { pack [text .t -wrap none] .t insert end "a\tb\tc\td\te" @@ -7100,8 +7100,8 @@ test text-29.4 {tabs - must be positive and must be increasing} -body { test text-30.1 {repeated insert and scroll} -body { pack [text .t] for {set i 0} {$i < 30} {incr i} { - .t insert end "blabla\n" - eval .t yview moveto 1 + .t insert end "blabla\n" + eval .t yview moveto 1 } # This test must simply not crash to succeed set result 1 @@ -7111,8 +7111,8 @@ test text-30.1 {repeated insert and scroll} -body { test text-30.2 {repeated insert and scroll} -body { pack [text .t] for {set i 0} {$i < 30} {incr i} { - .t insert end "blabla\n" - eval .t yview scroll 1 pages + .t insert end "blabla\n" + eval .t yview scroll 1 pages } # This test must simply not crash to succeed set result 1 @@ -7122,8 +7122,8 @@ test text-30.2 {repeated insert and scroll} -body { test text-30.3 {repeated insert and scroll} -body { pack [text .t] for {set i 0} {$i < 30} {incr i} { - .t insert end "blabla\n" - eval .t yview scroll 100 pixels + .t insert end "blabla\n" + eval .t yview scroll 100 pixels } # This test must simply not crash to succeed set result 1 @@ -7133,8 +7133,8 @@ test text-30.3 {repeated insert and scroll} -body { test text-30.4 {repeated insert and scroll} -body { pack [text .t] for {set i 0} {$i < 30} {incr i} { - .t insert end "blabla\n" - eval .t yview scroll 10 units + .t insert end "blabla\n" + eval .t yview scroll 10 units } # This test must simply not crash to succeed set result 1 @@ -7260,8 +7260,8 @@ test text-31.9 {peer widgets} -body { test text-31.10 {peer widgets} -body { toplevel .top pack [text .t] - for {set i 1} {$i < 20} {incr i} { - .t insert end "Line $i\n" + for {set i 1} {$i < 20} {incr i} { + .t insert end "Line $i\n" } pack [.t peer create .top.t -startline 5 -endline 11] update ; update @@ -7275,7 +7275,7 @@ test text-31.11 {peer widgets} -setup { set res {} } -body { for {set i 1} {$i < 100} {incr i} { - .t insert end "Line $i\n" + .t insert end "Line $i\n" } .t tag add sel 1.0 end-1c lappend res [.t tag ranges sel] @@ -7419,32 +7419,32 @@ test text-31.19 {peer widgets} -body { .t index sel.first } -cleanup { destroy .t -} -returnCodes {error} -result {text doesn't contain any characters tagged with "sel"} +} -returnCodes error -result {text doesn't contain any characters tagged with "sel"} test text-32.1 {line heights on creation} -setup { text .t proc makeText {} { - set w .g - set font "Times 11" - destroy .g - toplevel .g - frame $w.f -highlightthickness 2 -borderwidth 2 -relief sunken - set t $w.f.text - text $t -yscrollcommand "$w.scroll set" -setgrid true -font $font \ + set w .g + set font "Times 11" + destroy .g + toplevel .g + frame $w.f -highlightthickness 2 -borderwidth 2 -relief sunken + set t $w.f.text + text $t -yscrollcommand "$w.scroll set" -setgrid true -font $font \ -width 70 -height 35 -wrap word -highlightthickness 0 \ -borderwidth 0 - pack $t -expand yes -fill both - scrollbar $w.scroll -command "$t yview" - pack $w.scroll -side right -fill y - pack $w.f -expand yes -fill both - $t tag configure center -justify center -spacing1 5m -spacing3 5m - $t tag configure buttons -lmargin1 1c -lmargin2 1c -rmargin 1c \ - -spacing1 3m -spacing2 0 -spacing3 0 - for {set i 0} {$i < 40} {incr i} { - $t insert end "${i}word " - } - return $t + pack $t -expand yes -fill both + scrollbar $w.scroll -command "$t yview" + pack $w.scroll -side right -fill y + pack $w.f -expand yes -fill both + $t tag configure center -justify center -spacing1 5m -spacing3 5m + $t tag configure buttons -lmargin1 1c -lmargin2 1c -rmargin 1c \ + -spacing1 3m -spacing2 0 -spacing3 0 + for {set i 0} {$i < 40} {incr i} { + $t insert end "${i}word " + } + return $t } } -body { set w [makeText] @@ -7560,14 +7560,14 @@ test text-33.1 {TextWidgetCmd procedure, "peer" option} -setup { .t peer foo 1 } -cleanup { destroy .t -} -returnCodes {error} -result {bad peer option "foo": must be create or names} +} -returnCodes error -result {bad peer option "foo": must be create or names} test text-33.2 {TextWidgetCmd procedure, "peer" option} -setup { text .t } -body { .t peer names foo } -cleanup { destroy .t -} -returnCodes {error} -result {wrong # args: should be ".t peer names"} +} -returnCodes error -result {wrong # args: should be ".t peer names"} test text-33.3 {TextWidgetCmd procedure, "peer" option} -setup { text .t } -body { @@ -7588,7 +7588,7 @@ test text-33.5 {TextWidgetCmd procedure, "peer" option} -setup { .t peer create foo } -cleanup { destroy .t -} -returnCodes {error} -result {bad window path name "foo"} +} -returnCodes error -result {bad window path name "foo"} test text-33.6 {TextWidgetCmd procedure, "peer" option} -setup { text .t set res {} @@ -7616,7 +7616,7 @@ test text-33.8 {peer widget -start, -end} -body { .t configure -startline 10 -endline 5 } -cleanup { destroy .t -} -returnCodes {error} -result {-startline must be less than or equal to -endline} +} -returnCodes error -result {-startline must be less than or equal to -endline} test text-33.9 {peer widget -start, -end} -body { text .t for {set i 1} {$i < 100} {incr i} { @@ -7713,7 +7713,7 @@ test text-35.2 {widget dump -command makes massive changes} -setup { } -result {ok} test text-35.3 {widget dump -command destroys widget} -setup { proc Dumpy {key value index} { - destroy .t + destroy .t } text .t } -body { @@ -7808,7 +7808,7 @@ test text-37.1 "bug #dd9667635d: text anchor not set" -setup { test text-38.1 {Extending selection with mouse going outside the widget - Bug a9cf210a42} -setup { pack [text .t -width 40 -height 10] for {set n 1} {$n <= 5} {incr n} { - .t insert end "This is line $i of text\n" + .t insert end "This is line $i of text\n" } update } -body { diff --git a/tests/textBTree.test b/tests/textBTree.test index 767e7a0..35d274f 100644 --- a/tests/textBTree.test +++ b/tests/textBTree.test @@ -53,7 +53,7 @@ proc setupBig {} { # Level 1: 2002 = 54*36 + 58 # Level 0: 2002 = 332*6 + 10 for {set i 0} {$i < 2000} {incr i} { - append x "Line $i abcd efgh ijkl\n" + append x "Line $i abcd efgh ijkl\n" } .t insert insert $x .t debug 1 @@ -261,7 +261,7 @@ test btree-2.22 {deleting into beginning of elided range} -setup { .t delete 1.0 end } -body { for {set n 1} {$n <= 10} {incr n} { - .t insert end "Line $n\n" + .t insert end "Line $n\n" } .t tag configure Elided -elide 1 .t tag add Elided 6.0 end @@ -273,7 +273,7 @@ test btree-2.22 {deleting into beginning of elided range} -setup { } -result "Line 4\nine 6\nLine 7\n" test btree-2.23 {deleting from within elided range} -body { for {set n 1} {$n <= 10} {incr n} { - .t insert end "Line $n\n" + .t insert end "Line $n\n" } .t tag configure Elided -elide 1 .t tag add Elided 6.0 8.0 @@ -285,7 +285,7 @@ test btree-2.23 {deleting from within elided range} -body { } -result "Line 6\nLine 9\n" test btree-2.24 {deleting whole elided range} -body { for {set n 1} {$n <= 10} {incr n} { - .t insert end "Line $n\n" + .t insert end "Line $n\n" } .t tag configure Elided -elide 1 .t tag add Elided 6.0 8.0 @@ -297,7 +297,7 @@ test btree-2.24 {deleting whole elided range} -body { } -result "Line 4\nLine 9\n" test btree-2.25 {deleting several elided ranges} -body { for {set n 1} {$n <= 10} {incr n} { - .t insert end "Line $n\n" + .t insert end "Line $n\n" } .t tag configure Elided -elide 1 .t tag add Elided 6.0 6.2 6.4 6.5 7.2 7.6 @@ -309,7 +309,7 @@ test btree-2.25 {deleting several elided ranges} -body { } -result "Line 4\nLine 9\nLine 10\n" test btree-2.26 {deleting first char of elided range} -body { for {set n 1} {$n <= 10} {incr n} { - .t insert end "Line $n\n" + .t insert end "Line $n\n" } .t tag configure Elided -elide 1 .t tag add Elided 6.0 end @@ -398,7 +398,7 @@ test btree-4.8 {deleting with tags} -body { test btree-5.1 {very large inserts, with tags} -setup { set bigText1 {} for {set i 0} {$i < 10} {incr i} { - append bigText1 "Line $i\n" + append bigText1 "Line $i\n" } } -body { setup @@ -408,7 +408,7 @@ test btree-5.1 {very large inserts, with tags} -setup { test btree-5.2 {very large inserts, with tags} -setup { set bigText2 {} for {set i 0} {$i < 200} {incr i} { - append bigText2 "Line $i\n" + append bigText2 "Line $i\n" } } -body { setup @@ -418,17 +418,17 @@ test btree-5.2 {very large inserts, with tags} -setup { test btree-5.3 {very large inserts, with tags} -body { setup for {set i 0} {$i < 200} {incr i} { - .t insert 1.8 "longer line $i\n" + .t insert 1.8 "longer line $i\n" } list [.t tag ranges x] [.t tag ranges y] [.t get 1.0 1.100] \ - [.t get 198.0 198.100] + [.t get 198.0 198.100] } -result {{1.1 1.2 1.5 201.5 202.2 202.6} {1.5 1.6} {Text forlonger line 199} {longer line 2}} test btree-6.1 {very large deletes, with tags} -setup { set bigText2 {} for {set i 0} {$i < 200} {incr i} { - append bigText2 "Line $i\n" + append bigText2 "Line $i\n" } } -body { setup @@ -439,20 +439,20 @@ test btree-6.1 {very large deletes, with tags} -setup { test btree-6.2 {very large deletes, with tags} -setup { set bigText2 {} for {set i 0} {$i < 200} {incr i} { - append bigText2 "Line $i\n" + append bigText2 "Line $i\n" } } -body { setup .t insert 1.1 $bigText2 for {set i 0} {$i < 200} {incr i} { - .t delete 1.2 2.2 + .t delete 1.2 2.2 } list [.t tag ranges x] [.t tag ranges y] } -result {{1.4 1.12 2.2 2.6} {1.4 1.5}} test btree-6.3 {very large deletes, with tags} -setup { set bigText2 {} for {set i 0} {$i < 200} {incr i} { - append bigText2 "Line $i\n" + append bigText2 "Line $i\n" } } -body { setup @@ -465,29 +465,29 @@ Lin test btree-6.4 {very large deletes, with tags} -setup { set bigText2 {} for {set i 0} {$i < 200} {incr i} { - append bigText2 "Line $i\n" + append bigText2 "Line $i\n" } } -body { setup .t insert 1.1 $bigText2 for {set i 0} {$i < 100} {incr i} { - .t delete 30.0 31.0 + .t delete 30.0 31.0 } list [.t tag ranges x] [.t tag ranges y] } -result {{101.0 101.1 101.4 101.12 102.2 102.6} {101.4 101.5}} test btree-6.5 {very large deletes, with tags} -setup { set bigText2 {} for {set i 0} {$i < 200} {incr i} { - append bigText2 "Line $i\n" + append bigText2 "Line $i\n" } } -body { setup .t insert 1.1 $bigText2 for {set i 0} {$i < 100} {incr i} { - set j [expr {$i+2}] - set k [expr {1+2*$i}] - .t tag add x $j.1 $j.3 - .t tag add y $k.1 $k.6 + set j [expr {$i+2}] + set k [expr {1+2*$i}] + .t tag add x $j.1 $j.3 + .t tag add y $k.1 $k.6 } .t delete 2.0 200.0 list [.t tag ranges x] [.t tag ranges y] @@ -495,19 +495,19 @@ test btree-6.5 {very large deletes, with tags} -setup { test btree-6.6 {very large deletes, with tags} -setup { set bigText2 {} for {set i 0} {$i < 200} {incr i} { - append bigText2 "Line $i\n" + append bigText2 "Line $i\n" } } -body { setup .t insert 1.1 $bigText2 for {set i 0} {$i < 100} {incr i} { - set j [expr {$i+2}] - set k [expr {1+2*$i}] - .t tag add x $j.1 $j.3 - .t tag add y $k.1 $k.6 + set j [expr {$i+2}] + set k [expr {1+2*$i}] + .t tag add x $j.1 $j.3 + .t tag add y $k.1 $k.6 } for {set i 199} {$i >= 2} {incr i -1} { - .t delete $i.0 [expr {$i+1}].0 + .t delete $i.0 [expr {$i+1}].0 } list [.t tag ranges x] [.t tag ranges y] } -result {{3.0 3.1 3.4 3.12 4.2 4.6} {1.1 1.6 3.4 3.5}} @@ -520,8 +520,8 @@ test btree-7.1 {tag addition and removal} -setup { .t insert 1.0 "Text for first line\nSecond line\n\nLast line of info" set check {1.3 1.6 1.7 2.0} while {[llength $check]} { - .t tag add x [lindex $check 0] [lindex $check 1] - set check [lrange $check 2 end] + .t tag add x [lindex $check 0] [lindex $check 1] + set check [lrange $check 2 end] } .t tag ranges x } -result {1.3 1.6 1.7 2.0} @@ -532,8 +532,8 @@ test btree-7.2 {tag addition and removal} -setup { .t insert 1.0 "Text for first line\nSecond line\n\nLast line of info" set check {1.3 1.6 1.6 2.0} while {[llength $check]} { - .t tag add x [lindex $check 0] [lindex $check 1] - set check [lrange $check 2 end] + .t tag add x [lindex $check 0] [lindex $check 1] + set check [lrange $check 2 end] } .t tag ranges x } -result {1.3 2.0} @@ -544,8 +544,8 @@ test btree-7.3 {tag addition and removal} -setup { .t insert 1.0 "Text for first line\nSecond line\n\nLast line of info" set check {1.3 1.6 1.4 2.0} while {[llength $check]} { - .t tag add x [lindex $check 0] [lindex $check 1] - set check [lrange $check 2 end] + .t tag add x [lindex $check 0] [lindex $check 1] + set check [lrange $check 2 end] } .t tag ranges x } -result {1.3 2.0} @@ -556,8 +556,8 @@ test btree-7.4 {tag addition and removal} -setup { .t insert 1.0 "Text for first line\nSecond line\n\nLast line of info" set check {2.0 4.3 1.4 1.10} while {[llength $check]} { - .t tag add x [lindex $check 0] [lindex $check 1] - set check [lrange $check 2 end] + .t tag add x [lindex $check 0] [lindex $check 1] + set check [lrange $check 2 end] } .t tag ranges x } -result {1.4 1.10 2.0 4.3} @@ -568,8 +568,8 @@ test btree-7.5 {tag addition and removal} -setup { .t insert 1.0 "Text for first line\nSecond line\n\nLast line of info" set check {2.0 4.3 1.4 1.end} while {[llength $check]} { - .t tag add x [lindex $check 0] [lindex $check 1] - set check [lrange $check 2 end] + .t tag add x [lindex $check 0] [lindex $check 1] + set check [lrange $check 2 end] } .t tag ranges x } -result {1.4 1.19 2.0 4.3} @@ -580,8 +580,8 @@ test btree-7.6 {tag addition and removal} -setup { .t insert 1.0 "Text for first line\nSecond line\n\nLast line of info" set check {2.0 4.3 1.4 2.0} while {[llength $check]} { - .t tag add x [lindex $check 0] [lindex $check 1] - set check [lrange $check 2 end] + .t tag add x [lindex $check 0] [lindex $check 1] + set check [lrange $check 2 end] } .t tag ranges x } -result {1.4 4.3} @@ -592,8 +592,8 @@ test btree-7.7 {tag addition and removal} -setup { .t insert 1.0 "Text for first line\nSecond line\n\nLast line of info" set check {2.0 4.3 1.4 3.0} while {[llength $check]} { - .t tag add x [lindex $check 0] [lindex $check 1] - set check [lrange $check 2 end] + .t tag add x [lindex $check 0] [lindex $check 1] + set check [lrange $check 2 end] } .t tag ranges x } -result {1.4 4.3} @@ -604,8 +604,8 @@ test btree-7.8 {tag addition and removal} -setup { .t insert 1.0 "Text for first line\nSecond line\n\nLast line of info" set check {1.2 1.3 1.6 1.7 1.end 2.0 2.4 2.7 3.0 4.0 1.1 4.2} while {[llength $check]} { - .t tag add x [lindex $check 0] [lindex $check 1] - set check [lrange $check 2 end] + .t tag add x [lindex $check 0] [lindex $check 1] + set check [lrange $check 2 end] } .t tag ranges x } -result {1.1 4.2} @@ -616,8 +616,8 @@ test btree-7.9 {tag addition and removal} -setup { .t insert 1.0 "Text for first line\nSecond line\n\nLast line of info" set check {1.2 1.3 1.6 1.7 1.end 2.0 2.4 2.7 3.0 4.0 1.3 4.2} while {[llength $check]} { - .t tag add x [lindex $check 0] [lindex $check 1] - set check [lrange $check 2 end] + .t tag add x [lindex $check 0] [lindex $check 1] + set check [lrange $check 2 end] } .t tag ranges x } -result {1.2 4.2} @@ -628,8 +628,8 @@ test btree-7.10 {tag addition and removal} -setup { .t insert 1.0 "Text for first line\nSecond line\n\nLast line of info" set check {1.2 1.3 1.6 1.7 1.end 2.0 2.4 2.7 3.0 4.0 1.1 3.0} while {[llength $check]} { - .t tag add x [lindex $check 0] [lindex $check 1] - set check [lrange $check 2 end] + .t tag add x [lindex $check 0] [lindex $check 1] + set check [lrange $check 2 end] } .t tag ranges x } -result {1.1 4.0} @@ -640,8 +640,8 @@ test btree-7.11 {tag addition and removal} -setup { .t insert 1.0 "Text for first line\nSecond line\n\nLast line of info" set check {1.2 1.3 1.6 1.7 1.end 2.0 2.4 2.7 3.0 4.0 1.2 3.0} while {[llength $check]} { - .t tag add x [lindex $check 0] [lindex $check 1] - set check [lrange $check 2 end] + .t tag add x [lindex $check 0] [lindex $check 1] + set check [lrange $check 2 end] } .t tag ranges x } -result {1.2 4.0} @@ -719,7 +719,7 @@ test btree-9.2 {tag names} -body { test btree-9.3 {lots of tag names} -setup { set bigText2 {} for {set i 0} {$i < 200} {incr i} { - append bigText2 "Line $i\n" + append bigText2 "Line $i\n" } } -body { setup @@ -735,7 +735,7 @@ test btree-9.3 {lots of tag names} -setup { test btree-9.4 {lots of tag names} -setup { set bigText2 {} for {set i 0} {$i < 200} {incr i} { - append bigText2 "Line $i\n" + append bigText2 "Line $i\n" } } -body { setup @@ -893,7 +893,7 @@ test btree-13.7 {tag searching} -setup { test btree-13.8 {tag searching} -setup { set bigText2 {} for {set i 0} {$i < 200} {incr i} { - append bigText2 "Line $i\n" + append bigText2 "Line $i\n" } } -body { setup @@ -909,7 +909,7 @@ test btree-14.1 {check tag presence} -setup { text .t set bigText2 {} for {set i 0} {$i < 200} {incr i} { - append bigText2 "Line $i\n" + append bigText2 "Line $i\n" } } -body { setup @@ -1026,13 +1026,13 @@ test btree-16.6 {two node splits at once pushes root up} -setup { text .t } -body { for {set i 1} {$i < 10} {incr i} { - .t insert end "Line $i\n" + .t insert end "Line $i\n" } .t tag add x 8.0 8.end .t tag add y 9.0 end set x {} for {} {$i < 50} {incr i} { - append x "Line $i\n" + append x "Line $i\n" } .t insert end $x y list [.t tag ranges x] [.t tag ranges y] @@ -1044,7 +1044,7 @@ test btree-16.7 {Partial tag remove from before first range} -setup { destroy .t text .t for {set i 1} {$i < 10} {incr i} { - .t insert end "Line $i\n" + .t insert end "Line $i\n" } } -body { .t tag add x 2.0 2.6 @@ -1057,7 +1057,7 @@ test btree-16.8 {Partial tag remove from before first range} -setup { destroy .t text .t for {set i 1} {$i < 10} {incr i} { - .t insert end "Line $i\n" + .t insert end "Line $i\n" } } -body { .t tag add x 2.0 2.6 @@ -1070,7 +1070,7 @@ test btree-16.9 {Partial tag remove from before first range} -setup { destroy .t text .t for {set i 1} {$i < 10} {incr i} { - .t insert end "Line $i\n" + .t insert end "Line $i\n" } } -body { .t tag add x 2.0 2.6 @@ -1083,7 +1083,7 @@ test btree-16.10 {Partial tag remove from before first range} -setup { destroy .t text .t for {set i 1} {$i < 10} {incr i} { - .t insert end "Line $i\n" + .t insert end "Line $i\n" } } -body { .t tag add x 1.0 2.6 @@ -1096,7 +1096,7 @@ test btree-16.11 {StartSearchBack boundary case} -setup { destroy .t text .t for {set i 1} {$i < 10} {incr i} { - .t insert end "Line $i\n" + .t insert end "Line $i\n" } } -body { .t tag add x 1.3 1.4 @@ -1108,7 +1108,7 @@ test btree-16.12 {StartSearchBack boundary case} -setup { destroy .t text .t for {set i 1} {$i < 10} {incr i} { - .t insert end "Line $i\n" + .t insert end "Line $i\n" } } -body { .t tag add x 1.3 1.4 @@ -1120,7 +1120,7 @@ test btree-16.13 {StartSearchBack boundary case} -setup { destroy .t text .t for {set i 1} {$i < 10} {incr i} { - .t insert end "Line $i\n" + .t insert end "Line $i\n" } } -body { .t tag add x 1.0 1.4 diff --git a/tests/textDisp.test b/tests/textDisp.test index 7583bc4..3555ae7 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -38,10 +38,10 @@ proc scrollError args { proc lequal {res expected} { if {[llength $res] != [llength $expected]} { - return [list "Lengths differ" result: $res - expected: $expected] + return [list "Lengths differ" result: $res - expected: $expected] } for {set i 0} {$i < [llength $res]} {incr i} { - if {[lindex $res $i] ne [lindex $expected $i]} { + if {[lindex $res $i] ne [lindex $expected $i]} { return [list result: $res - expected: $expected] } } @@ -286,7 +286,7 @@ test textDisp-1.2 {GetStyle procedure, wrapmode} { .t tag add y 1.end 2.2 lappend result [.t bbox 2.20] } [list [list [xchar 0] [yline 3] $fixedWidth $fixedHeight] \ - [list [xchar 5] [yline 3] $fixedWidth $fixedHeight] \ + [list [xchar 5] [yline 3] $fixedWidth $fixedHeight] \ {}] .t tag delete x y @@ -296,35 +296,35 @@ test textDisp-2.1 {LayoutDLine, basics} { .t insert 1.0 "This is some sample text for testing." list [.t bbox 1.19] [.t bbox 1.20] } [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] test textDisp-2.2 {LayoutDLine, basics} { .t configure -wrap char .t delete 1.0 end .t insert 1.0 "This isx some sample text for testing." list [.t bbox 1.19] [.t bbox 1.20] } [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] test textDisp-2.3 {LayoutDLine, basics} { .t configure -wrap char .t delete 1.0 end .t insert 1.0 "This isxxx some sample text for testing." list [.t bbox 1.19] [.t bbox 1.20] } [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] test textDisp-2.4 {LayoutDLine, word wrap} { .t configure -wrap word .t delete 1.0 end .t insert 1.0 "This is some sample text for testing." list [.t bbox 1.19] [.t bbox 1.20] } [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] test textDisp-2.5 {LayoutDLine, word wrap} { .t configure -wrap word .t delete 1.0 end .t insert 1.0 "This isx some sample text for testing." list [.t bbox 1.13] [.t bbox 1.19] [.t bbox 1.20] [.t bbox 1.21] } [list [list [xchar 13] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \ + [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \ [list [xchar 20] [yline 1] 0 $fixedHeight] \ [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] test textDisp-2.6 {LayoutDLine, word wrap} { @@ -333,7 +333,7 @@ test textDisp-2.6 {LayoutDLine, word wrap} { .t insert 1.0 "This isxxx some sample text for testing." list [.t bbox 1.15] [.t bbox 1.16] } [list [list [xchar 15] [yline 1] [xe 15] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] test textDisp-2.7 {LayoutDLine, marks and tags} { .t configure -wrap word .t delete 1.0 end @@ -342,7 +342,7 @@ test textDisp-2.7 {LayoutDLine, marks and tags} { .t mark set insert 1.8 list [.t bbox 1.2] [.t bbox 1.5] [.t bbox 1.11] } [list [list [xchar 2] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 5] [yline 1] $fixedWidth $fixedHeight] \ + [list [xchar 5] [yline 1] $fixedWidth $fixedHeight] \ [list [xchar 11] [yline 1] $fixedWidth $fixedHeight]] foreach m [.t mark names] { catch {.t mark unset $m} @@ -361,14 +361,14 @@ test textDisp-2.8 {LayoutDLine, extra chunk at end of dline} -setup { wm geom . {} update } -result [list [list [xchar 19] [yline 1] [expr {$fixedWidth+1}] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] test textDisp-2.9 {LayoutDLine, marks and tags} { .t configure -wrap word .t delete 1.0 end .t insert 1.0 "This is a very_very_long_word_that_wraps." list [.t bbox 1.9] [.t bbox 1.10] [.t bbox 1.25] } [list [list [xchar 9] [yline 1] [xe 9] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ [list [xchar 15] [yline 2] $fixedWidth $fixedHeight]] test textDisp-2.10 {LayoutDLine, marks and tags} { .t configure -wrap word @@ -380,7 +380,7 @@ test textDisp-2.10 {LayoutDLine, marks and tags} { .t tag add foo 1.19 list [.t bbox 1.9] [.t bbox 1.10] [.t bbox 1.25] } [list [list [xchar 9] [yline 1] [xe 9] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ [list [xchar 15] [yline 2] $fixedWidth $fixedHeight]] test textDisp-2.11 {LayoutDLine, newline width} { .t configure -wrap char @@ -388,7 +388,7 @@ test textDisp-2.11 {LayoutDLine, newline width} { .t insert 1.0 "a\nbb\nccc\ndddd" list [.t bbox 2.2] [.t bbox 3.3] } [list [list [xchar 2] [yline 2] [xe 2] $fixedHeight] \ - [list [xchar 3] [yline 3] [xe 3] $fixedHeight]] + [list [xchar 3] [yline 3] [xe 3] $fixedHeight]] test textDisp-2.12 {LayoutDLine, justification} { .t configure -wrap char .t delete 1.0 end @@ -398,9 +398,9 @@ test textDisp-2.12 {LayoutDLine, justification} { .t tag add y 3.0 3.2 list [.t bbox 1.0] [.t bbox 2.0] [.t bbox 4.0] [.t bbox 4.2] } [list [list [expr {[bo]+[xe 0]/2}] [yline 1] [expr {[xe 0]-[xe 0]/2}] $fixedHeight] \ - [list [expr {[bo]+[xe 1]/2}] [yline 2] $fixedWidth $fixedHeight] \ - [list [expr {[bo]+[xe 3]/2}] [yline 4] $fixedWidth $fixedHeight] \ - [list [expr {[bo]+[xe 3]/2+[xw 2]}] [yline 4] $fixedWidth $fixedHeight]] + [list [expr {[bo]+[xe 1]/2}] [yline 2] $fixedWidth $fixedHeight] \ + [list [expr {[bo]+[xe 3]/2}] [yline 4] $fixedWidth $fixedHeight] \ + [list [expr {[bo]+[xe 3]/2+[xw 2]}] [yline 4] $fixedWidth $fixedHeight]] test textDisp-2.13 {LayoutDLine, justification} { .t configure -wrap char .t delete 1.0 end @@ -410,9 +410,9 @@ test textDisp-2.13 {LayoutDLine, justification} { .t tag add y 3.0 3.2 list [.t bbox 1.0] [.t bbox 2.0] [.t bbox 4.0] [.t bbox 4.2] } [list [list [xcharr 0] [yline 1] 0 $fixedHeight] \ - [list [xcharr 1] [yline 2] $fixedWidth $fixedHeight] \ - [list [xcharr 3] [yline 4] $fixedWidth $fixedHeight] \ - [list [xcharr 1] [yline 4] $fixedWidth $fixedHeight]] + [list [xcharr 1] [yline 2] $fixedWidth $fixedHeight] \ + [list [xcharr 3] [yline 4] $fixedWidth $fixedHeight] \ + [list [xcharr 1] [yline 4] $fixedWidth $fixedHeight]] test textDisp-2.14 {LayoutDLine, justification} { .t configure -wrap char .t delete 1.0 end @@ -424,9 +424,9 @@ test textDisp-2.14 {LayoutDLine, justification} { .t tag raise y list [.t bbox 2.0] [.t bbox 3.0] [.t bbox 3.end] [.t bbox 4.0] } [list [list [expr {[bo]+[xe 1]/2}] [yline 2] $fixedWidth $fixedHeight] \ - [list [xcharr 2] [yline 3] $fixedWidth $fixedHeight] \ - [list [xcharr 0] [yline 3] 0 $fixedHeight] \ - [list [xchar 0] [yline 4] $fixedWidth $fixedHeight]] + [list [xcharr 2] [yline 3] $fixedWidth $fixedHeight] \ + [list [xcharr 0] [yline 3] 0 $fixedHeight] \ + [list [xchar 0] [yline 4] $fixedWidth $fixedHeight]] test textDisp-2.15 {LayoutDLine, justification} { .t configure -wrap char .t delete 1.0 end @@ -438,9 +438,9 @@ test textDisp-2.15 {LayoutDLine, justification} { .t tag lower y list [.t bbox 2.0] [.t bbox 3.0] [.t bbox 3.end] [.t bbox 4.0] } [list [list [expr {[bo]+[xe 1]/2}] [yline 2] $fixedWidth $fixedHeight] \ - [list [expr {[bo]+[xe 2]/2}] [yline 3] $fixedWidth $fixedHeight] \ - [list [expr {[bo]+[xe 2]/2+[xw 2]}] [yline 3] [expr {[xe 2]/2}] $fixedHeight] \ - [list [xchar 0] [yline 4] $fixedWidth $fixedHeight]] + [list [expr {[bo]+[xe 2]/2}] [yline 3] $fixedWidth $fixedHeight] \ + [list [expr {[bo]+[xe 2]/2+[xw 2]}] [yline 3] [expr {[xe 2]/2}] $fixedHeight] \ + [list [xchar 0] [yline 4] $fixedWidth $fixedHeight]] test textDisp-2.16 {LayoutDLine, justification} { .t configure -wrap word .t delete 1.0 end @@ -450,9 +450,9 @@ test textDisp-2.16 {LayoutDLine, justification} { .t tag add x 1.21 1.end list [.t bbox 1.0] [.t bbox 1.20] [.t bbox 1.41] [.t bbox 2.0] } [list [list [xchar 0] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ - [list [expr {[bo]+[xe 4]/2}] [yline 3] $fixedWidth $fixedHeight] \ - [list [xchar 0] [yline 4] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ + [list [expr {[bo]+[xe 4]/2}] [yline 3] $fixedWidth $fixedHeight] \ + [list [xchar 0] [yline 4] $fixedWidth $fixedHeight]] test textDisp-2.17 {LayoutDLine, justification} { .t configure -wrap word .t delete 1.0 end @@ -461,9 +461,9 @@ test textDisp-2.17 {LayoutDLine, justification} { .t tag add x 1.18 list [.t bbox 1.0] [.t bbox 1.18] [.t bbox 1.35] [.t bbox 2.0] } [list [list [xchar 0] [yline 1] $fixedWidth $fixedHeight] \ - [list [expr {[bo]+[xe 17]/2}] [yline 2] $fixedWidth $fixedHeight] \ - [list [xchar 0] [yline 3] $fixedWidth $fixedHeight] \ - [list [xchar 0] [yline 4] $fixedWidth $fixedHeight]] + [list [expr {[bo]+[xe 17]/2}] [yline 2] $fixedWidth $fixedHeight] \ + [list [xchar 0] [yline 3] $fixedWidth $fixedHeight] \ + [list [xchar 0] [yline 4] $fixedWidth $fixedHeight]] test textDisp-2.18 {LayoutDLine, justification} { .t configure -wrap none .t delete 1.0 end @@ -476,7 +476,7 @@ test textDisp-2.18 {LayoutDLine, justification} { .t xview scroll 5 units list [.t bbox 2.0] [.t bbox 3.0] } [list [list [expr {[bo]+[xe 4]/2-[xw 5]}] [yline 2] $fixedWidth $fixedHeight] \ - [list [expr {[xcharr 10]-[xw 5]}] [yline 3] $fixedWidth $fixedHeight]] + [list [expr {[xcharr 10]-[xw 5]}] [yline 3] $fixedWidth $fixedHeight]] .t tag delete x .t tag delete y test textDisp-2.19 {LayoutDLine, margins} { @@ -490,9 +490,9 @@ test textDisp-2.19 {LayoutDLine, margins} { .t tag configure x -lmargin1 $lm1 -lmargin2 $lm2 -rmargin $rm .t tag add x 1.0 end set expected [list [list [expr {[bo]+$lm1}] [yline 1] $fixedWidth $fixedHeight] \ - [list [expr {[bo]+$lm1+[xw 12]}] [yline 1] [expr {[xe 12]-$lm1}] $fixedHeight] \ - [list [expr {[bo]+$lm2}] [yline 2] $fixedWidth $fixedHeight] \ - [list [expr {[bo]+$lm1}] [yline 6] $fixedWidth $fixedHeight]] + [list [expr {[bo]+$lm1+[xw 12]}] [yline 1] [expr {[xe 12]-$lm1}] $fixedHeight] \ + [list [expr {[bo]+$lm2}] [yline 2] $fixedWidth $fixedHeight] \ + [list [expr {[bo]+$lm1}] [yline 6] $fixedWidth $fixedHeight]] lequal [list [.t bbox 1.0] [.t bbox 1.12] [.t bbox 1.13] [.t bbox 2.0]] $expected } {1} test textDisp-2.20 {LayoutDLine, margins} { @@ -506,9 +506,9 @@ test textDisp-2.20 {LayoutDLine, margins} { .t tag add y 1.13 list [.t bbox 1.0] [.t bbox 1.13] [.t bbox 1.30] [.t bbox 2.0] } [list [list [expr {[bo]+20}] [yline 1] $fixedWidth $fixedHeight] \ - [list [expr {[bo]+5}] [yline 2] $fixedWidth $fixedHeight] \ - [list [expr {[bo]+10}] [yline 3] $fixedWidth $fixedHeight] \ - [list [expr {[bo]+20}] [yline 4] $fixedWidth $fixedHeight]] + [list [expr {[bo]+5}] [yline 2] $fixedWidth $fixedHeight] \ + [list [expr {[bo]+10}] [yline 3] $fixedWidth $fixedHeight] \ + [list [expr {[bo]+20}] [yline 4] $fixedWidth $fixedHeight]] test textDisp-2.21 {LayoutDLine, margins} { .t configure -wrap word .t delete 1.0 end @@ -517,8 +517,8 @@ test textDisp-2.21 {LayoutDLine, margins} { .t tag add x 1.0 end list [.t bbox 1.0] [.t bbox 1.1] [.t bbox 1.2] } [list [list [expr {[bo]+80}] [yline 1] [expr {[xe 0]-80}] $fixedHeight] \ - [list [expr {[bo]+80}] [yline 2] [expr {[xe 0]-80}] $fixedHeight] \ - [list [expr {[bo]+80}] [yline 3] [expr {[xe 0]-80}] $fixedHeight]] + [list [expr {[bo]+80}] [yline 2] [expr {[xe 0]-80}] $fixedHeight] \ + [list [expr {[bo]+80}] [yline 3] [expr {[xe 0]-80}] $fixedHeight]] .t tag delete x .t tag delete y test textDisp-2.22 {LayoutDLine, spacing options} { @@ -602,7 +602,7 @@ test textDisp-2.25 {LayoutDLine, tabs, breaking chunks at tabs} { .t tag add x 1.0 end set expected [list [expr {[bo]+$tw}] [expr {[bo]+2*$tw}] [expr {[bo]+3*$tw}] [expr {[bo]+4*$tw}]] set res [list [lindex [.t bbox 1.2] 0] [lindex [.t bbox 1.4] 0] \ - [lindex [.t bbox 1.6] 0] [lindex [.t bbox 1.8] 0]] + [lindex [.t bbox 1.6] 0] [lindex [.t bbox 1.8] 0]] lequal $res $expected } {1} # Next test is currently constrained to not run on mac (aqua) because on @@ -653,7 +653,7 @@ test textDisp-3.1 {different character sizes} haveBigFontTwiceLargerThanTextFont .t tag add big 2.11 2.14 list [.t bbox 1.1] [.t bbox 1.6] [.t dlineinfo 1.0] [.t dlineinfo 3.0] } [list [list [xchar 1] [expr {[yline 1]+$ascentDiff}] $fixedWidth $fixedHeight] \ - [list [expr {[xchar 5]+[font measure $bigFont s]}] [yline 1] [font measure $bigFont a] $bigHeight] \ + [list [expr {[xchar 5]+[font measure $bigFont s]}] [yline 1] [font measure $bigFont a] $bigHeight] \ [list [bo] [yline 1] [expr {[xw 5]+[font measure $bigFont sampl]+[xw 2]}] $bigHeight $bigAscent] \ [list [bo] [expr {[bo]+2*$bigHeight+2*$fixedHeight}] [xw 5] $fixedHeight $fixedAscent]] .t configure -wrap char @@ -669,7 +669,7 @@ test textDisp-4.1 {UpdateDisplayInfo, basic} { update lappend res [.t bbox 1.0] [.t bbox 2.0] [.t bbox 3.0] $tk_textRelayout } [list 2.0 \ - [list [xchar 0] [yline 1] $fixedWidth $fixedHeight] \ + [list [xchar 0] [yline 1] $fixedWidth $fixedHeight] \ [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ [list [xchar 0] [yline 3] $fixedWidth $fixedHeight] \ 2.0] @@ -685,7 +685,7 @@ test textDisp-4.2 {UpdateDisplayInfo, re-use tail of text line} { update lappend res [.t bbox 2.0] [.t bbox x] [.t bbox 3.0] $tk_textRelayout } [list 2.0 2.20 \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ [list [xchar 1] [yline 3] $fixedWidth $fixedHeight] \ [list [xchar 0] [yline 4] $fixedWidth $fixedHeight] \ {2.0 2.20}] @@ -698,7 +698,7 @@ test textDisp-4.3 {UpdateDisplayInfo, tail of text line shifts} { update list [.t bbox 2.0] [.t bbox x] [.t bbox 3.0] $tk_textRelayout } [list [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ - [list [xchar 0] [yline 3] $fixedWidth $fixedHeight] \ + [list [xchar 0] [yline 3] $fixedWidth $fixedHeight] \ [list [xchar 0] [yline 4] $fixedWidth $fixedHeight] \ {2.0 2.20}] .t mark unset x @@ -709,7 +709,7 @@ test textDisp-4.4 {UpdateDisplayInfo, wrap-mode "none"} { update list [.t bbox 2.0] [.t bbox 2.25] [.t bbox 3.0] $tk_textRelayout } [list [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ - {} \ + {} \ [list [xchar 0] [yline 3] $fixedWidth $fixedHeight] \ {1.0 2.0 3.0}] test textDisp-4.5 {UpdateDisplayInfo, tiny window} { @@ -724,7 +724,7 @@ test textDisp-4.5 {UpdateDisplayInfo, tiny window} { update list [.t bbox 2.0] [.t bbox 2.1] [.t bbox 3.0] $tk_textRelayout } [list [list [xchar 0] [yline 2] 1 $fixedHeight] \ - {} \ + {} \ [list [xchar 0] [yline 3] 1 $fixedHeight] \ {1.0 2.0 3.0}] if {[tk windowingsystem] eq "win32"} { @@ -880,8 +880,8 @@ test textDisp-4.17 {UpdateDisplayInfo, horizontal scrolling} { list $tk_textRelayout $tk_textRedraw [.t bbox 2.0] [.t bbox 2.5] \ [.t bbox 2.23] } [list {} {1.0 2.0 3.0 4.0} \ - {} \ - [list [expr {[xchar 5]-[xw 3]}] [yline 2] $fixedWidth $fixedHeight] \ + {} \ + [list [expr {[xchar 5]-[xw 3]}] [yline 2] $fixedWidth $fixedHeight] \ {}] test textDisp-4.18 {UpdateDisplayInfo, horizontal scrolling} { .t configure -wrap none @@ -893,7 +893,7 @@ test textDisp-4.18 {UpdateDisplayInfo, horizontal scrolling} { update list $tk_textRelayout $tk_textRedraw [.t bbox 2.25] } [list {} {1.0 2.0 3.0 4.0} \ - [list [xcharr 19] [yline 2] $fixedWidth $fixedHeight]] + [list [xcharr 19] [yline 2] $fixedWidth $fixedHeight]] test textDisp-4.19 {UpdateDisplayInfo, horizontal scrolling} { .t configure -wrap none .t delete 1.0 end @@ -918,7 +918,7 @@ test textDisp-4.20 {UpdateDisplayInfo, horizontal scrolling} { update list $tk_textRelayout $tk_textRedraw [.t bbox 2.25] } [list 2.0 {1.0 2.0 3.0 4.0} \ - [list [xcharr 5] [yline 2] $fixedWidth $fixedHeight]] + [list [xcharr 5] [yline 2] $fixedWidth $fixedHeight]] test textDisp-4.21 {UpdateDisplayInfo, horizontal scrolling} { .t configure -wrap none .t delete 1.0 end @@ -940,7 +940,7 @@ test textDisp-4.22 {UpdateDisplayInfo, no horizontal scrolling except for -wrap .t configure -wrap word list [.t bbox 2.0] [.t bbox 2.16] } [list [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ - [list [xchar 1] [yline 3] $fixedWidth $fixedHeight]] + [list [xchar 1] [yline 3] $fixedWidth $fixedHeight]] test textDisp-4.23 {UpdateDisplayInfo, no horizontal scrolling except for -wrap none} { .t configure -wrap none .t delete 1.0 end @@ -971,7 +971,7 @@ test textDisp-5.1 {DisplayDLine, handling of spacing} { list [winfo geometry .t.f1] [winfo geometry .t.f2] \ [winfo geometry .t.f3] [winfo geometry .t.f4] } [list 10x4+[xchar 3]+[expr {[yline 1]+8}] \ - 10x4+[expr {[xchar 6]+10}]+[expr {[yline 1]+8+($fixedHeight-4)/2}] \ + 10x4+[expr {[xchar 6]+10}]+[expr {[yline 1]+8+($fixedHeight-4)/2}] \ 10x4+[xchar 1]+[expr {[yline 2]+8+2+8+($fixedHeight-4)}] \ 10x4+[expr {[xchar 9]+10}]+[expr {[yline 2]+8+2+8+($fixedAscent-4)}]] .t tag delete spacing @@ -1107,22 +1107,28 @@ test textDisp-6.9 {DisplayText, horizontal scrollbar updates} { set scrollInfo } [list 0.0 [expr {4.0/11}]] test textDisp-6.10 {DisplayText, redisplay embedded windows after scroll} {aqua} { + # For this test to pass line 8 must be out of the text widget. + # With macOS 14 this requires making the buttons a little larger. + # So we set the pady option. This may depend on the OS version. .t configure -wrap char + update .t delete 1.0 end + update .t insert 1.0 "Line 1" foreach i {2 3 4} { .t insert end "\nLine $i" } .t insert end "\n" .t window create end -create { - button %W.button_one -text "Button 1"} + button %W.button_one -text "Button 1" -pady 5} .t insert end "\nLine 6\n" .t window create end -create { - button %W.button_two -text "Button 2"} + button %W.button_two -text "Button 2" -pady 5} .t insert end "\nLine 8\n" .t window create end -create { - button %W.button_three -text "Button 3"} + button %W.button_three -text "Button 3" -pady 5} update + set tk_textEmbWinDisplay {} .t delete 2.0 3.0 update list $tk_textEmbWinDisplay @@ -1346,7 +1352,7 @@ test textDisp-8.12 {TkTextChanged, moving the insert cursor redraws only past an .t delete 1.0 end .t configure -wrap none for {set i 1} {$i < 25} {incr i} { - .t insert end "Line $i Line $i\n" + .t insert end "Line $i Line $i\n" } .t tag add hidden 5.0 8.0 .t tag configure hidden -elide true @@ -1529,7 +1535,7 @@ test textDisp-9.13 {TkTextRedrawTag} { .t configure -wrap none .t delete 1.0 end for {set i 1} {$i < 10} {incr i} { - .t insert end "Line $i - This is Line [format %c [expr {64+$i}]]\n" + .t insert end "Line $i - This is Line [format %c [expr {64+$i}]]\n" } .t tag add hidden 2.8 2.17 .t tag add hidden 6.8 7.17 @@ -1543,24 +1549,24 @@ test textDisp-9.13 {TkTextRedrawTag} { test textDisp-9.14 {TkTextRedrawTag} { pack [text .tnocrash] for {set i 1} {$i < 6} {incr i} { - .tnocrash insert end \nfoo$i + .tnocrash insert end \nfoo$i } .tnocrash tag configure mytag1 -relief raised .tnocrash tag configure mytag2 -relief solid update proc doit {} { - .tnocrash tag add mytag1 4.0 5.0 - .tnocrash tag add mytag2 4.0 5.0 - after idle { - .tnocrash tag remove mytag1 1.0 end - .tnocrash tag remove mytag2 1.0 end - } - .tnocrash delete 1.0 2.0 + .tnocrash tag add mytag1 4.0 5.0 + .tnocrash tag add mytag2 4.0 5.0 + after idle { + .tnocrash tag remove mytag1 1.0 end + .tnocrash tag remove mytag2 1.0 end + } + .tnocrash delete 1.0 2.0 } doit ; # must not crash after 500 { - destroy .tnocrash - set done 1 + destroy .tnocrash + set done 1 } vwait done } {} @@ -1750,8 +1756,8 @@ test textDisp-11.17 {TkTextSetYView, only a few lines visible} { test textDisp-11.18 {TkTextSetYView, see in elided lines} { .top.t delete 1.0 end for {set i 1} {$i < 20} {incr i} { - .top.t insert end [string repeat "Line $i" 10] - .top.t insert end "\n" + .top.t insert end [string repeat "Line $i" 10] + .top.t insert end "\n" } .top.t yview 4.0 .top.t tag add hidden 4.10 "4.10 lineend" @@ -1765,7 +1771,7 @@ test textDisp-11.18 {TkTextSetYView, see in elided lines} { test textDisp-11.19 {TkTextSetYView, see in elided lines} { .top.t delete 1.0 end for {set i 1} {$i < 50} {incr i} { - .top.t insert end "Line $i\n" + .top.t insert end "Line $i\n" } # button just for having a line with a larger height button .top.t.b -text "Test" -bd 2 -highlightthickness 2 @@ -1797,8 +1803,8 @@ test textDisp-11.20 {TkTextSetYView, see in elided lines} { .top.t delete 1.0 end .top.t configure -wrap none for {set i 1} {$i < 5} {incr i} { - .top.t insert end [string repeat "Line $i " 50] - .top.t insert end "\n" + .top.t insert end [string repeat "Line $i " 50] + .top.t insert end "\n" } .top.t delete 3.11 3.14 .top.t tag add hidden 3.0 4.0 @@ -1808,7 +1814,7 @@ test textDisp-11.20 {TkTextSetYView, see in elided lines} { test textDisp-11.21 {TkTextSetYView, window height smaller than the line height} { .top.t delete 1.0 end for {set i 1} {$i <= 10} {incr i} { - .top.t insert end "Line $i\n" + .top.t insert end "Line $i\n" } set lineheight [font metrics [.top.t cget -font] -linespace] wm geometry .top 200x[expr {$lineheight / 2}] @@ -1819,7 +1825,7 @@ test textDisp-11.21 {TkTextSetYView, window height smaller than the line height} test textDisp-11.22 {TkTextSetYView, peer has -startline} { .top.t delete 1.0 end for {set i 1} {$i <= 50} {incr i} { - .top.t insert end "Line $i\n" + .top.t insert end "Line $i\n" } pack [.top.t peer create .top.p] -side left pack [scrollbar .top.sb -command {.top.p yview}] -side left -fill y @@ -1951,9 +1957,9 @@ test textDisp-13.8 {TkTextSeeCmd procedure} { # therefore take into account that the top line is partially hidden set y [expr {[yline 6] + [lindex [.t bbox @0,0] 1] - [bo]}] set expected [list [list [xchar 10] $y $fixedWidth $fixedHeight] \ - [list [xchar 19] $y $fixedWidth $fixedHeight] \ - [list [xchar 19] $y $fixedWidth $fixedHeight] \ - [list [xchar 10] $y $fixedWidth $fixedHeight]] + [list [xchar 19] $y $fixedWidth $fixedHeight] \ + [list [xchar 19] $y $fixedWidth $fixedHeight] \ + [list [xchar 10] $y $fixedWidth $fixedHeight]] lequal $x $expected } {1} test textDisp-13.9 {TkTextSeeCmd procedure} { @@ -1975,9 +1981,9 @@ test textDisp-13.9 {TkTextSeeCmd procedure} { # therefore take into account that the top line is partially hidden set y [expr {[yline 6] + [lindex [.t bbox @0,0] 1] - [bo]}] set expected [list [list [expr {[bo]+round([winfo width .t]-2*[bo])/2}] $y $fixedWidth $fixedHeight] \ - [list [xcharr 1] $y $fixedWidth $fixedHeight] \ - [list [xcharr 1] $y $fixedWidth $fixedHeight] \ - [list [expr {[bo]+round([winfo width .t]-2*[bo])/2}] $y $fixedWidth $fixedHeight]] + [list [xcharr 1] $y $fixedWidth $fixedHeight] \ + [list [xcharr 1] $y $fixedWidth $fixedHeight] \ + [list [expr {[bo]+round([winfo width .t]-2*[bo])/2}] $y $fixedWidth $fixedHeight]] lequal $x $expected } {1} test textDisp-13.10 {TkTextSeeCmd procedure} { @@ -1998,7 +2004,7 @@ test textDisp-13.11 {TkTextSeeCmd procedure} {} { toplevel .top2 pack [text .top2.t2 -wrap none] for {set i 1} {$i < 5} {incr i} { - .top2.t2 insert end [string repeat "Line $i: éèàçù" 5]\n + .top2.t2 insert end [string repeat "Line $i: éèàçù" 5]\n } wm geometry .top2 300x200+0+0 update @@ -2216,7 +2222,7 @@ update set totpix [.t count -update -ypixels 1.0 end] # check that the wrapping lines wrap exactly 6 times in total (4 times for line 151, and twice for line 153), # this is an assumption of the upcoming tests -if {[expr {double(($totpix-5*$heightDiff)/$fixedHeight)}] != 206.0} { +if {double(($totpix-5*$heightDiff)/$fixedHeight) != 206.0} { puts "---> Warning: the font actually used by the tests, which is \"[font actual [.t cget -font]]\",\ is too different from the requested \"[.t cget -font]\". Some of the upcoming tests will probably fail." } @@ -2279,7 +2285,7 @@ test textDisp-16.14 {TkTextYviewCmd procedure, "moveto" option} { set ytargetline [expr {150*$fixedHeight+5*$heightDiff}] set expected 151.0 while {[expr {$ytargetline+$fixedHeight}] <= [expr {round(0.75*$totpix)}]} { - incr ytargetline $fixedHeight + incr ytargetline $fixedHeight set expected [.t index "$expected + 1 display line"] } lequal [.t index @0,0] $expected @@ -2294,7 +2300,7 @@ test textDisp-16.15 {TkTextYviewCmd procedure, "moveto" option} { set ytargetline [expr {150*$fixedHeight+5*$heightDiff}] set expected 151.0 while {[expr {$ytargetline+$fixedHeight}] <= [expr {round(0.75*$totpix + ($pixtonextline-1))}]} { - incr ytargetline $fixedHeight + incr ytargetline $fixedHeight set expected [.t index "$expected + 1 display line"] } lequal [.t index @0,0] $expected @@ -2309,7 +2315,7 @@ test textDisp-16.16 {TkTextYviewCmd procedure, "moveto" option} { set ytargetline [expr {150*$fixedHeight+5*$heightDiff}] set expected 151.0 while {[expr {$ytargetline+$fixedHeight}] <= [expr {round(0.75*$totpix + $pixtonextline)}]} { - incr ytargetline $fixedHeight + incr ytargetline $fixedHeight set expected [.t index "$expected + 1 display line"] } lequal [.t index @0,0] $expected @@ -2501,8 +2507,8 @@ test textDisp-16.41 {text count -xpixels with indices in elided lines} { set res {} .t delete 1.0 end for {set i 1} {$i < 40} {incr i} { - .t insert end [string repeat "Line $i" 20] - .t insert end "\n" + .t insert end [string repeat "Line $i" 20] + .t insert end "\n" } .t configure -wrap none .t tag add hidden 5.15 20.15 @@ -2524,8 +2530,8 @@ test textDisp-16.42 {TkTextYviewCmd procedure with indices in elided lines} { .t configure -wrap none .t delete 1.0 end for {set i 1} {$i < 100} {incr i} { - .t insert end [string repeat "Line $i" 20] - .t insert end "\n" + .t insert end [string repeat "Line $i" 20] + .t insert end "\n" } .t tag add hidden 5.15 20.15 .t tag configure hidden -elide true @@ -2538,8 +2544,8 @@ test textDisp-16.43 {TkTextYviewCmd procedure with indices in elided lines} { .t configure -wrap none .t delete 1.0 end for {set i 1} {$i < 100} {incr i} { - .t insert end [string repeat "Line $i" 20] - .t insert end "\n" + .t insert end [string repeat "Line $i" 20] + .t insert end "\n" } .t tag add hidden 5.15 20.15 .t tag configure hidden -elide true @@ -3135,7 +3141,7 @@ test textDisp-19.16 {count -ypixels} { [.t count -ypixels 16.0 "16.0 displaylineend +1c"] \ [.t count -ypixels "16.0 +1 displaylines" "16.0 +4 displaylines +3c"] ] } [list [expr {20 * $fixedHeight}] \ - [expr {20 * $fixedHeight}] \ + [expr {20 * $fixedHeight}] \ $fixedHeight \ [expr {2*$fixedHeight}] \ $fixedHeight \ @@ -3144,8 +3150,8 @@ test textDisp-19.17 {count -ypixels with indices in elided lines} { .t configure -wrap none .t delete 1.0 end for {set i 1} {$i < 100} {incr i} { - .t insert end [string repeat "Line $i" 20] - .t insert end "\n" + .t insert end [string repeat "Line $i" 20] + .t insert end "\n" } .t tag add hidden 5.15 20.15 .t tag configure hidden -elide true @@ -3168,7 +3174,7 @@ test textDisp-19.17 {count -ypixels with indices in elided lines} { .t yview 35.0 lappend res [.t count -ypixels 5.0 25.0] } [list [expr {4 * $fixedHeight}] \ - [expr {3 * $fixedHeight}] \ + [expr {3 * $fixedHeight}] \ 0 0 0 0 0 0 \ [expr {5 * $fixedHeight}] \ [expr {- 5 * $fixedHeight}] \ @@ -3179,8 +3185,8 @@ test textDisp-19.18 {count -ypixels with indices in elided lines} { .t configure -wrap none .t delete 1.0 end for {set i 1} {$i < 100} {incr i} { - .t insert end [string repeat "Line $i" 20] - .t insert end "\n" + .t insert end [string repeat "Line $i" 20] + .t insert end "\n" } .t tag add hidden 5.15 20.15 .t tag configure hidden -elide true @@ -3197,8 +3203,8 @@ test textDisp-19.19 {count -ypixels with indices in elided lines} { .t configure -wrap char .t delete 1.0 end for {set i 1} {$i < 25} {incr i} { - .t insert end [string repeat "Line $i -" 6] - .t insert end "\n" + .t insert end [string repeat "Line $i -" 6] + .t insert end "\n" } .t tag add hidden 5.27 11.0 .t tag configure hidden -elide true @@ -3225,8 +3231,8 @@ test textDisp-20.2 {FindDLine} { set centlineY [lindex [.t bbox 53.0] 1] set expectedY [expr {$centlineY - int(($centlineY-[bo])/$fixedHeight)*$fixedHeight - $fixedHeight}] set expected [list [list [bo] $expectedY [xw 20] $fixedHeight $fixedAscent] \ - [list [bo] $expectedY [xw 20] $fixedHeight $fixedAscent] \ - [list [bo] [expr {$expectedY+$fixedHeight}] [xw 19] $fixedHeight $fixedAscent]] + [list [bo] $expectedY [xw 20] $fixedHeight $fixedAscent] \ + [list [bo] [expr {$expectedY+$fixedHeight}] [xw 19] $fixedHeight $fixedAscent]] set res [list [.t dlineinfo 50.0] [.t dlineinfo 50.14] [.t dlineinfo 50.21]] lequal $res $expected } {1} @@ -3235,14 +3241,14 @@ test textDisp-20.3 {FindDLine} { .t yview 49.0 list [.t dlineinfo 50.0] [.t dlineinfo 50.24] [.t dlineinfo 57.0] } [list [list [bo] [yline 2] [xw 20] $fixedHeight $fixedAscent] \ - [list [bo] [yline 3] [xw 19] $fixedHeight $fixedAscent] \ + [list [bo] [yline 3] [xw 19] $fixedHeight $fixedAscent] \ {}] test textDisp-20.4 {FindDLine} { .t yview 100.0 .t yview 42.0 list [.t dlineinfo 50.0] [.t dlineinfo 50.24] [.t dlineinfo 50.40] } [list [list [bo] [yline 9] [xw 20] $fixedHeight $fixedAscent] \ - [list [bo] [yline 10] [xw 19] $fixedHeight $fixedAscent] \ + [list [bo] [yline 10] [xw 19] $fixedHeight $fixedAscent] \ {}] .t config -wrap none test textDisp-20.5 {FindDLine} { @@ -3250,7 +3256,7 @@ test textDisp-20.5 {FindDLine} { .t yview 48.0 list [.t dlineinfo 50.0] [.t dlineinfo 50.20] [.t dlineinfo 50.40] } [list [list [bo] [yline 3] [xw 53] $fixedHeight $fixedAscent] \ - [list [bo] [yline 3] [xw 53] $fixedHeight $fixedAscent] \ + [list [bo] [yline 3] [xw 53] $fixedHeight $fixedAscent] \ [list [bo] [yline 3] [xw 53] $fixedHeight $fixedAscent]] .t config -wrap word @@ -3265,7 +3271,7 @@ test textDisp-21.2 {TkTextPixelIndex} { .t yview 195.0 set off [expr {[xchar 1]+1}] list [.t index @$off,[expr {[yline 6]+2}]] \ - [.t index @$off,[expr {[yline 7]+2}]] \ + [.t index @$off,[expr {[yline 7]+2}]] \ [.t index @$off,[expr {[yline 8]+2}]] \ [.t index @$off,1002] } {197.1 198.1 199.1 201.0} @@ -3320,8 +3326,8 @@ test textDisp-22.1 {TkTextCharBbox} { list [.t bbox 47.2] [.t bbox 48.0] [.t bbox 50.5] [.t bbox 50.40] \ [.t bbox 58.0] } [list {} \ - [list [xchar 0] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 5] [yline 3] $fixedWidth $fixedHeight] \ + [list [xchar 0] [yline 1] $fixedWidth $fixedHeight] \ + [list [xchar 5] [yline 3] $fixedWidth $fixedHeight] \ [list [xchar 0] [yline 5] $fixedWidth $fixedHeight] \ {}] test textDisp-22.2 {TkTextCharBbox} { @@ -3329,7 +3335,7 @@ test textDisp-22.2 {TkTextCharBbox} { .t yview 48.0 list [.t bbox 50.5] [.t bbox 50.40] [.t bbox 57.0] } [list [list [xchar 5] [yline 3] $fixedWidth $fixedHeight] \ - {} \ + {} \ [list [xchar 0] [yline 10] $fixedWidth $fixedHeight]] test textDisp-22.3 {TkTextCharBbox, cut-off lines} { wm geometry . {} @@ -3340,7 +3346,7 @@ test textDisp-22.3 {TkTextCharBbox, cut-off lines} { wm geom . ${width}x[expr {$height-1}] update set expected [list [list [xchar 1] [yline 10] $fixedWidth $fixedHeight] \ - [list [xchar 1] [yline 11] $fixedWidth [expr {($height-1)-$oriHeight}]]] + [list [xchar 1] [yline 11] $fixedWidth [expr {($height-1)-$oriHeight}]]] lequal [list [.t bbox 19.1] [.t bbox 20.1]] $expected } {1} test textDisp-22.4 {TkTextCharBbox, cut-off lines} { @@ -3352,7 +3358,7 @@ test textDisp-22.4 {TkTextCharBbox, cut-off lines} { wm geom . ${width}x[expr {$height+1}] update set expected [list [list [xchar 1] [yline 10] $fixedWidth $fixedHeight] \ - [list [xchar 1] [yline 11] $fixedWidth [expr {($height+1)-$oriHeight}]]] + [list [xchar 1] [yline 11] $fixedWidth [expr {($height+1)-$oriHeight}]]] lequal [list [.t bbox 19.1] [.t bbox 20.1]] $expected } {1} test textDisp-22.5 {TkTextCharBbox, cut-off char} { @@ -3374,8 +3380,8 @@ test textDisp-22.6 {TkTextCharBbox, line visible but not char} haveBigFontTwiceL wm geom . ${width}x[expr {$height+3}] update set expected [list [list [xchar 1] [yline 10] $fixedWidth $fixedHeight] \ - {} \ - [list [xchar 2] [yline 11] [font measure $bigFont "n"] [expr {($height+3)-$oriHeight}]]] + {} \ + [list [xchar 2] [yline 11] [font measure $bigFont "n"] [expr {($height+3)-$oriHeight}]]] lequal [list [.t bbox 19.1] [.t bbox 20.1] [.t bbox 20.2]] $expected } {1} wm geom . {} @@ -3387,7 +3393,7 @@ test textDisp-22.7 {TkTextCharBbox, different character sizes} haveBigFontTwiceL update list [.t bbox 12.1] [.t bbox 12.2] } [list [list [xchar 1] [expr {[yline 3]+$ascentDiff}] $fixedWidth $fixedHeight] \ - [list [xchar 2] [yline 3] [font measure $bigFont "n"] $bigHeight]] + [list [xchar 2] [yline 3] [font measure $bigFont "n"] $bigHeight]] .t tag remove big 1.0 end test textDisp-22.8 {TkTextCharBbox, horizontal scrolling} { .t configure -wrap none @@ -3398,7 +3404,7 @@ test textDisp-22.8 {TkTextCharBbox, horizontal scrolling} { list [.t bbox 1.3] [.t bbox 1.4] [.t bbox 2.3] [.t bbox 2.4] \ [.t bbox 2.23] [.t bbox 2.24] } [list {} \ - [list [xchar 0] [yline 1] $fixedWidth $fixedHeight] \ + [list [xchar 0] [yline 1] $fixedWidth $fixedHeight] \ {} \ [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ [list [xchar 19] [yline 2] $fixedWidth $fixedHeight] \ @@ -3421,7 +3427,7 @@ test textDisp-22.9 {TkTextCharBbox, handling of spacing} { list [.t bbox .t.f1] [.t bbox .t.f2] [.t bbox .t.f3] [.t bbox .t.f4] \ [.t bbox 1.1] [.t bbox 2.9] } [list [list [xchar 3] [expr {[yline 1]+8}] 10 4] \ - [list [expr {[xchar 3]+10+[xw 3]}] [expr {[yline 1]+8+($fixedHeight-4)/2}] 10 4] \ + [list [expr {[xchar 3]+10+[xw 3]}] [expr {[yline 1]+8+($fixedHeight-4)/2}] 10 4] \ [list [xchar 1] [expr {[yline 2]+8+2+8+($fixedHeight-4)}] 10 4] \ [list [expr {[xchar 1]+10+[xw 8]}] [expr {[yline 2]+8+2+8+($fixedAscent-4)}] 10 4] \ [list [xchar 1] [expr {[yline 1]+8}] $fixedWidth $fixedHeight] \ @@ -3431,37 +3437,37 @@ test textDisp-22.10 {TkTextCharBbox, handling of elided lines} { .t configure -wrap char .t delete 1.0 end for {set i 1} {$i < 10} {incr i} { - .t insert end "Line $i - Line [format %c [expr {64+$i}]]\n" + .t insert end "Line $i - Line [format %c [expr {64+$i}]]\n" } .t tag add hidden 2.8 2.13 .t tag add hidden 6.8 7.13 .t tag configure hidden -elide true update list \ - [expr {[lindex [.t bbox 2.9] 0] - [lindex [.t bbox 2.8] 0]}] \ - [expr {[lindex [.t bbox 2.10] 0] - [lindex [.t bbox 2.8] 0]}] \ - [expr {[lindex [.t bbox 2.13] 0] - [lindex [.t bbox 2.8] 0]}] \ - [expr {[lindex [.t bbox 6.9] 0] - [lindex [.t bbox 6.8] 0]}] \ - [expr {[lindex [.t bbox 6.10] 0] - [lindex [.t bbox 6.8] 0]}] \ - [expr {[lindex [.t bbox 6.13] 0] - [lindex [.t bbox 6.8] 0]}] \ - [expr {[lindex [.t bbox 6.14] 0] - [lindex [.t bbox 6.8] 0]}] \ - [expr {[lindex [.t bbox 6.15] 0] - [lindex [.t bbox 6.8] 0]}] \ - [expr {[lindex [.t bbox 7.0] 0] - [lindex [.t bbox 6.8] 0]}] \ - [expr {[lindex [.t bbox 7.1] 0] - [lindex [.t bbox 6.8] 0]}] \ - [expr {[lindex [.t bbox 7.12] 0] - [lindex [.t bbox 6.8] 0]}] + [expr {[lindex [.t bbox 2.9] 0] - [lindex [.t bbox 2.8] 0]}] \ + [expr {[lindex [.t bbox 2.10] 0] - [lindex [.t bbox 2.8] 0]}] \ + [expr {[lindex [.t bbox 2.13] 0] - [lindex [.t bbox 2.8] 0]}] \ + [expr {[lindex [.t bbox 6.9] 0] - [lindex [.t bbox 6.8] 0]}] \ + [expr {[lindex [.t bbox 6.10] 0] - [lindex [.t bbox 6.8] 0]}] \ + [expr {[lindex [.t bbox 6.13] 0] - [lindex [.t bbox 6.8] 0]}] \ + [expr {[lindex [.t bbox 6.14] 0] - [lindex [.t bbox 6.8] 0]}] \ + [expr {[lindex [.t bbox 6.15] 0] - [lindex [.t bbox 6.8] 0]}] \ + [expr {[lindex [.t bbox 7.0] 0] - [lindex [.t bbox 6.8] 0]}] \ + [expr {[lindex [.t bbox 7.1] 0] - [lindex [.t bbox 6.8] 0]}] \ + [expr {[lindex [.t bbox 7.12] 0] - [lindex [.t bbox 6.8] 0]}] } [list 0 0 0 0 0 0 0 0 0 0 0] test textDisp-22.11 {TkTextCharBbox, handling of wrapped elided lines} { .t configure -wrap char .t delete 1.0 end for {set i 1} {$i < 10} {incr i} { - .t insert end "Line $i - Line _$i - Lines .$i - Line [format %c [expr {64+$i}]]\n" + .t insert end "Line $i - Line _$i - Lines .$i - Line [format %c [expr {64+$i}]]\n" } .t tag add hidden 1.30 2.5 .t tag configure hidden -elide true update list \ - [expr {[lindex [.t bbox 1.30] 0] - [lindex [.t bbox 2.4] 0]}] \ - [expr {[lindex [.t bbox 1.30] 0] - [lindex [.t bbox 2.5] 0]}] + [expr {[lindex [.t bbox 1.30] 0] - [lindex [.t bbox 2.4] 0]}] \ + [expr {[lindex [.t bbox 1.30] 0] - [lindex [.t bbox 2.5] 0]}] } [list 0 0] .t delete 1.0 end @@ -3479,7 +3485,7 @@ test textDisp-23.1 {TkTextDLineInfo} { list [.t dlineinfo 47.3] [.t dlineinfo 48.0] [.t dlineinfo 50.40] \ [.t dlineinfo 56.0] } [list {} \ - [list [bo] [yline 1] [xw 7] $fixedHeight $fixedAscent] \ + [list [bo] [yline 1] [xw 7] $fixedHeight $fixedAscent] \ [list [bo] [yline 5] [xw 13] $fixedHeight $fixedAscent] \ {}] .t config -bd 4 @@ -3496,7 +3502,7 @@ test textDisp-23.3 {TkTextDLineInfo} { .t yview 48.0 list [.t dlineinfo 50.40] [.t dlineinfo 57.3] } [list [list [bo] [yline 3] [xw 53] $fixedHeight $fixedAscent] \ - [list [bo] [yline 10] [xw 7] $fixedHeight $fixedAscent]] + [list [bo] [yline 10] [xw 7] $fixedHeight $fixedAscent]] test textDisp-23.4 {TkTextDLineInfo, cut-off lines} { wm geometry . {} update @@ -3506,7 +3512,7 @@ test textDisp-23.4 {TkTextDLineInfo, cut-off lines} { wm geom . ${width}x[expr {$height-1}] update set expected [list [list [bo] [yline 10] [xw 7] $fixedHeight $fixedAscent] \ - [list [bo] [yline 11] [xw 7] [expr {($height-1)-$oriHeight}] $fixedAscent]] + [list [bo] [yline 11] [xw 7] [expr {($height-1)-$oriHeight}] $fixedAscent]] lequal [list [.t dlineinfo 19.0] [.t dlineinfo 20.0]] $expected } {1} test textDisp-23.5 {TkTextDLineInfo, cut-off lines} { @@ -3518,7 +3524,7 @@ test textDisp-23.5 {TkTextDLineInfo, cut-off lines} { wm geom . ${width}x[expr {$height+1}] update set expected [list [list [bo] [yline 10] [xw 7] $fixedHeight $fixedAscent] \ - [list [bo] [yline 11] [xw 7] [expr {($height+1)-$oriHeight}] $fixedAscent]] + [list [bo] [yline 11] [xw 7] [expr {($height+1)-$oriHeight}] $fixedAscent]] lequal [list [.t dlineinfo 19.0] [.t dlineinfo 20.0]] $expected } {1} wm geom . {} @@ -3533,7 +3539,7 @@ test textDisp-23.6 {TkTextDLineInfo, horizontal scrolling} { update list [.t dlineinfo 1.0] [.t dlineinfo 2.0] [.t dlineinfo 3.0] } [list [list [expr {[xw -6]+[bo]}] [yline 1] [xw 10] $fixedHeight $fixedAscent] \ - [list [expr {[xw -6]+[bo]}] [yline 2] [xw 52] $fixedHeight $fixedAscent] \ + [list [expr {[xw -6]+[bo]}] [yline 2] [xw 52] $fixedHeight $fixedAscent] \ [list [expr {[xw -6]+[bo]}] [yline 3] [xw 5] $fixedHeight $fixedAscent]] .t xview moveto 0 test textDisp-23.7 {TkTextDLineInfo, centering} { @@ -3548,7 +3554,7 @@ test textDisp-23.7 {TkTextDLineInfo, centering} { .t tag add y 3.0 list [.t dlineinfo 1.0] [.t dlineinfo 2.0] [.t dlineinfo 3.0] } [list [list [expr {[bo]+[xe 10]/2}] [yline 1] [xw 10] $fixedHeight $fixedAscent] \ - [list [bo] [yline 2] [xw 17] $fixedHeight $fixedAscent] \ + [list [bo] [yline 2] [xw 17] $fixedHeight $fixedAscent] \ [list [xcharr 5] [yline 5] [xw 5] $fixedHeight $fixedAscent]] .t tag delete x y @@ -3558,7 +3564,7 @@ test textDisp-24.1 {TkTextCharLayoutProc} { .t insert 1.0 "abcdefghijklmnopqrstuvwxyz" list [.t bbox 1.19] [.t bbox 1.20] } [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] test textDisp-24.2 {TkTextCharLayoutProc} { wm geometry . {} update @@ -3569,12 +3575,12 @@ test textDisp-24.2 {TkTextCharLayoutProc} { # be tolerant about borderwidth et al. - don't let another char fit on the line set wi $width while {$wi+1-$oriWidth >= $fixedWidth} { - incr wi -$fixedWidth + incr wi -$fixedWidth } wm geom . [expr {$wi+1}]x$height update set expected [list [list [xchar 19] [yline 1] [expr {$fixedWidth+($wi+1-$oriWidth)}] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected } {1} test textDisp-24.3 {TkTextCharLayoutProc} { @@ -3587,7 +3593,7 @@ test textDisp-24.3 {TkTextCharLayoutProc} { wm geom . [expr {$width-1}]x$height update set expected [list [list [xchar 19] [yline 1] [expr {$fixedWidth+($width-1-$oriWidth)}] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected } {1} test textDisp-24.4 {TkTextCharLayoutProc, newline not visible} { @@ -3598,7 +3604,7 @@ test textDisp-24.4 {TkTextCharLayoutProc, newline not visible} { update list [.t bbox 1.19] [.t bbox 1.20] [.t bbox 2.20] } [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 20] [yline 1] 0 $fixedHeight] \ + [list [xchar 20] [yline 1] 0 $fixedHeight] \ [list [xchar 0] [yline 3] $fixedWidth $fixedHeight]] test textDisp-24.5 {TkTextCharLayoutProc, char doesn't fit, newline not visible} {nonwin} { .t configure -wrap char @@ -3611,7 +3617,7 @@ test textDisp-24.5 {TkTextCharLayoutProc, char doesn't fit, newline not visible} update list [.t bbox 1.0] [.t bbox 1.1] [.t bbox 2.0] } [list [list [xchar 0] [yline 1] [expr {$fixedWidth-[bo]}] $fixedHeight] \ - [list [expr {[xchar 1]-[bo]}] [yline 1] 0 $fixedHeight] \ + [list [expr {[xchar 1]-[bo]}] [yline 1] 0 $fixedHeight] \ [list [xchar 0] [yline 2] [expr {$fixedWidth-[bo]}] $fixedHeight]] test textDisp-24.6 {TkTextCharLayoutProc, line ends with space} { .t configure -wrap char @@ -3621,7 +3627,7 @@ test textDisp-24.6 {TkTextCharLayoutProc, line ends with space} { update list [.t bbox 1.19] [.t bbox 1.20] } [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] test textDisp-24.7 {TkTextCharLayoutProc, line ends with space} { wm geometry . {} update @@ -3632,12 +3638,12 @@ test textDisp-24.7 {TkTextCharLayoutProc, line ends with space} { # be tolerant about borderwidth et al. - don't let another char fit on the line set wi $width while {$wi+1-$oriWidth >= $fixedWidth} { - incr wi -$fixedWidth + incr wi -$fixedWidth } wm geom . [expr {$wi+1}]x$height update set expected [list [list [xchar 19] [yline 1] [expr {$fixedWidth+($wi+1-$oriWidth)}] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected } {1} test textDisp-24.8 {TkTextCharLayoutProc, line ends with space} { @@ -3650,7 +3656,7 @@ test textDisp-24.8 {TkTextCharLayoutProc, line ends with space} { wm geom . [expr {$width-1}]x$height update set expected [list [list [xchar 19] [yline 1] [expr {$fixedWidth+($width-1-$oriWidth)}] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected } {1} test textDisp-24.9 {TkTextCharLayoutProc, line ends with space} { @@ -3663,7 +3669,7 @@ test textDisp-24.9 {TkTextCharLayoutProc, line ends with space} { wm geom . [expr {$width-6}]x$height update set expected [list [list [xchar 19] [yline 1] [expr {$fixedWidth+($width-6-$oriWidth)}] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected } {1} test textDisp-24.10 {TkTextCharLayoutProc, line ends with space} { @@ -3676,7 +3682,7 @@ test textDisp-24.10 {TkTextCharLayoutProc, line ends with space} { wm geom . [expr {$width-7}]x$height update set expected [list [list [xchar 19] [yline 1] [expr {$fixedWidth+($width-7-$oriWidth)}] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected } {1} test textDisp-24.11 {TkTextCharLayoutProc, line ends with space that doesn't quite fit} { @@ -3691,7 +3697,7 @@ test textDisp-24.11 {TkTextCharLayoutProc, line ends with space that doesn't qui .t mark set insert 1.21 lappend result [.t bbox 1.21] [.t bbox 2.0] } [list [list [expr {[xchar 20]+2}] [yline 1] 0 $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ [list [expr {[xchar 20]+2}] [yline 1] 0 $fixedHeight] \ [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] wm geom . {} @@ -3703,7 +3709,7 @@ test textDisp-24.12 {TkTextCharLayoutProc, tab causes wrap} { .t mark set insert 1.4 .t insert insert \t\t\t set expected [list [list [expr {[xchar 0]+2*8*$fixedWidth}] [yline 1] [expr {[winfo width .t]-([xchar 0]+2*8*$fixedWidth)-[bo]}] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] lequal [list [.t bbox {insert -1c}] [.t bbox insert]] $expected } {1} test textDisp-24.13 {TkTextCharLayoutProc, -wrap none} { @@ -3724,7 +3730,7 @@ test textDisp-24.14 {TkTextCharLayoutProc, -wrap none} { wm geom . [expr {$width+1}]x$height update set expected [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 20] [yline 1] [expr {$width+1-$oriWidth}] $fixedHeight]] + [list [xchar 20] [yline 1] [expr {$width+1-$oriWidth}] $fixedHeight]] lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected } {1} test textDisp-24.15 {TkTextCharLayoutProc, -wrap none} { @@ -3737,7 +3743,7 @@ test textDisp-24.15 {TkTextCharLayoutProc, -wrap none} { wm geom . [expr {$width-1}]x$height update set expected [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 20] [yline 1] [expr {$width-1-$oriWidth}] $fixedHeight]] + [list [xchar 20] [yline 1] [expr {$width-1-$oriWidth}] $fixedHeight]] lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected } {1} test textDisp-24.16 {TkTextCharLayoutProc, no chars fit} { @@ -3753,7 +3759,7 @@ test textDisp-24.16 {TkTextCharLayoutProc, no chars fit} { update list [.t bbox 1.0] [.t bbox 1.1] [.t bbox 1.2] } [list [list [xchar 0] [yline 1] 1 $fixedHeight] \ - [list [xchar 0] [yline 2] 1 $fixedHeight] \ + [list [xchar 0] [yline 2] 1 $fixedHeight] \ [list [xchar 0] [yline 3] 1 $fixedHeight]] if {[tk windowingsystem] eq "win32"} { wm overrideredirect . 0 @@ -3766,7 +3772,7 @@ test textDisp-24.17 {TkTextCharLayoutProc, -wrap word} { update list [.t bbox 1.19] [.t bbox 1.20] } [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] test textDisp-24.18 {TkTextCharLayoutProc, -wrap word} { .t configure -wrap word .t delete 1.0 end @@ -3775,7 +3781,7 @@ test textDisp-24.18 {TkTextCharLayoutProc, -wrap word} { update list [.t bbox 1.15] [.t bbox 1.16] [.t bbox 1.17] [.t bbox 1.21] } [list [list [xchar 15] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 16] [yline 1] [xe 16] $fixedHeight] \ + [list [xchar 16] [yline 1] [xe 16] $fixedHeight] \ [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \ [list [xchar 4] [yline 2] $fixedWidth $fixedHeight]] test textDisp-24.19 {TkTextCharLayoutProc, -wrap word} { @@ -3786,7 +3792,7 @@ test textDisp-24.19 {TkTextCharLayoutProc, -wrap word} { update list [.t bbox 1.14] [.t bbox 1.15] [.t bbox 1.16] } [list [list [xchar 14] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar 15] [yline 1] $fixedWidth $fixedHeight] \ + [list [xchar 15] [yline 1] $fixedWidth $fixedHeight] \ [list [xchar 16] [yline 1] [xe 16] $fixedHeight]] test textDisp-24.20 {TkTextCharLayoutProc, vertical offset} { .t configure -wrap none @@ -3802,11 +3808,11 @@ test textDisp-24.20 {TkTextCharLayoutProc, vertical offset} { .t tag delete up set result } [list [list [xchar 1] [yline 2] $fixedWidth $fixedHeight] \ - [list [bo] [yline 2] [xw 6] $fixedHeight $fixedAscent] \ + [list [bo] [yline 2] [xw 6] $fixedHeight $fixedAscent] \ [list [xchar 1] [yline 2] $fixedWidth $fixedHeight] \ - [list [bo] [yline 2] [xw 6] [expr {$fixedHeight+6}] [expr {$fixedAscent+6}]] \ + [list [bo] [yline 2] [xw 6] [expr {$fixedHeight+6}] [expr {$fixedAscent+6}]] \ [list [xchar 1] [expr {[yline 2]+2}] $fixedWidth $fixedHeight] \ - [list [bo] [yline 2] [xw 6] [expr {$fixedHeight+2}] $fixedAscent]] + [list [bo] [yline 2] [xw 6] [expr {$fixedHeight+2}] $fixedAscent]] .t configure -width 30 update test textDisp-24.21 {TkTextCharLayoutProc, word breaks} { @@ -3849,7 +3855,7 @@ test textDisp-24.24 {TkTextCharLayoutProc, justification and tabs} notAqua { .t tag add x 1.0 end list [.t bbox 1.0] [.t bbox 1.10] } [list [list [expr {[bo]+[xe 8]/2}] [yline 1] $fixedWidth $fixedHeight] \ - [list [expr {[bo]+[xe 8]/2+[xw 7]}] [yline 1] $fixedWidth $fixedHeight]] + [list [expr {[bo]+[xe 8]/2+[xw 7]}] [yline 1] $fixedWidth $fixedHeight]] test textDisp-24.25 {TkTextCharLayoutProc, justification and tabs} -setup { text .tt -tabs {40 right} -wrap none -font $fixedFont pack .tt @@ -3857,8 +3863,8 @@ test textDisp-24.25 {TkTextCharLayoutProc, justification and tabs} -setup { .tt insert end \t9\n\t99\n\t999 update set expected [list [list [expr {[bo .tt]+40-$fixedWidth}] [yline 1 .tt] $fixedWidth $fixedHeight] \ - [list [expr {[bo .tt]+40-$fixedWidth}] [yline 2 .tt] $fixedWidth $fixedHeight] \ - [list [expr {[bo .tt]+40-$fixedWidth}] [yline 3 .tt] $fixedWidth $fixedHeight]] + [list [expr {[bo .tt]+40-$fixedWidth}] [yline 2 .tt] $fixedWidth $fixedHeight] \ + [list [expr {[bo .tt]+40-$fixedWidth}] [yline 3 .tt] $fixedWidth $fixedHeight]] lequal [list [.tt bbox 1.1] [.tt bbox 2.2] [.tt bbox 3.3]] $expected } -cleanup { destroy .tt @@ -3872,7 +3878,7 @@ test textDisp-25.1 {CharBboxProc procedure, check tab width} { .t insert 1.0 abc\td\tfgh list [.t bbox 1.3] [.t bbox 1.5] [.t bbox 1.6] } [list [list [xchar 3] [yline 1] [expr {100-3*$fixedWidth}] $fixedHeight] \ - [list [expr {[bo]+100+$fixedWidth}] [yline 1] [expr {200-(100+$fixedWidth)}] $fixedHeight] \ + [list [expr {[bo]+100+$fixedWidth}] [yline 1] [expr {200-(100+$fixedWidth)}] $fixedHeight] \ [list [expr {[bo]+200}] [yline 1] $fixedWidth $fixedHeight]] .t configure -width 40 -bd 0 -relief flat -highlightthickness 0 -padx 0 -pady 0 \ @@ -3884,7 +3890,7 @@ test textDisp-26.1 {AdjustForTab procedure, no tabs} { list [lindex [.t bbox 1.2] 0] [lindex [.t bbox 1.12] 0] \ [lindex [.t bbox 1.14] 0] } [list [expr {[bo]+8*$fixedWidth}] \ - [expr {[bo]+2*8*$fixedWidth+2*$fixedWidth}] \ + [expr {[bo]+2*8*$fixedWidth+2*$fixedWidth}] \ [expr {[bo]+3*8*$fixedWidth}]] test textDisp-26.1.2 {AdjustForTab procedure, no tabs} { .t delete 1.0 end @@ -3895,7 +3901,7 @@ test textDisp-26.1.2 {AdjustForTab procedure, no tabs} { .t configure -tabstyle tabular set res } [list [expr {[bo]+8*$fixedWidth}] \ - [expr {[bo]+3*8*$fixedWidth}] \ + [expr {[bo]+3*8*$fixedWidth}] \ [expr {[bo]+4*8*$fixedWidth}]] test textDisp-26.2 {AdjustForTab procedure, not enough tabs specified} { .t delete 1.0 end @@ -4019,7 +4025,7 @@ test textDisp-26.13 {AdjustForTab procedure, not enough space} { .t tag add x 1.0 end set expected [list [xchar 4] [xchar 8] [xchar 12] $t4] set res [list [lindex [.t bbox 1.4] 0] [lindex [.t bbox 1.8] 0] \ - [lindex [.t bbox 1.12] 0] [lindex [.t bbox 1.16] 0]] + [lindex [.t bbox 1.12] 0] [lindex [.t bbox 1.16] 0]] lequal $res $expected } {1} test textDisp-26.13.2 {AdjustForTab procedure, not enough space} { @@ -4068,7 +4074,7 @@ test textDisp-27.1 {SizeOfTab procedure, old-style tabs} { .t insert 1.0 a\tbcdefghij\tc\td list [.t bbox 1.2] [.t bbox 1.10] [.t bbox 1.12] } [list [list [xchar 8] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar [expr {8+8}]] [yline 1] $fixedWidth $fixedHeight] \ + [list [xchar [expr {8+8}]] [yline 1] $fixedWidth $fixedHeight] \ [list [xchar [expr {8+8+1+1}]] [yline 1] $fixedWidth $fixedHeight]] test textDisp-27.1.1 {SizeOfTab procedure, old-style tabs} { .t delete 1.0 end @@ -4078,7 +4084,7 @@ test textDisp-27.1.1 {SizeOfTab procedure, old-style tabs} { .t configure -tabstyle tabular set res } [list [list [xchar 8] [yline 1] $fixedWidth $fixedHeight] \ - [list [xchar [expr {8+8}]] [yline 1] $fixedWidth $fixedHeight] \ + [list [xchar [expr {8+8}]] [yline 1] $fixedWidth $fixedHeight] \ [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] test textDisp-27.2 {SizeOfTab procedure, choosing tabX and alignment} { .t delete 1.0 end @@ -4090,7 +4096,7 @@ test textDisp-27.2 {SizeOfTab procedure, choosing tabX and alignment} { .t tag configure x -tabs $tw .t tag add x 1.0 end set expected [list [list [expr {[bo]+$tw+[xw 1]}] [yline 1] [expr {[winfo width .t]-([bo]+$tw+[xw 1])-[bo]}] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] lequal [list [.t bbox 1.3] [.t bbox 1.4]] $expected } {1} test textDisp-27.3 {SizeOfTab procedure, choosing tabX and alignment} { @@ -4103,7 +4109,7 @@ test textDisp-27.3 {SizeOfTab procedure, choosing tabX and alignment} { .t tag configure x -tabs $tw .t tag add x 1.0 end set expected [list [list [expr {[bo]+3*$tw+[xw 1]}] [yline 1] [expr {[winfo width .t]-([bo]+3*$tw+[xw 1])-[bo]}] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] lequal [list [.t bbox 1.5] [.t bbox 1.6]] $expected } {1} test textDisp-27.4 {SizeOfTab procedure, choosing tabX and alignment} { @@ -4116,7 +4122,7 @@ test textDisp-27.4 {SizeOfTab procedure, choosing tabX and alignment} { .t tag configure x -tabs "20 center $tw left" .t tag add x 1.0 end set expected [list [list [expr {[bo]+$tw+($tw-20)+[xw 1]}] [yline 1] [expr {[winfo width .t]-([bo]+$tw+($tw-20)+[xw 1])-[bo]}] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] lequal [list [.t bbox 1.5] [.t bbox 1.6]] $expected } {1} test textDisp-27.5 {SizeOfTab procedure, center alignment} { @@ -4129,7 +4135,7 @@ test textDisp-27.5 {SizeOfTab procedure, center alignment} { .t tag configure x -tabs "$tw center" .t tag add x 1.0 end set expected [list [list [expr {[bo]+$tw+round(1.5*$fixedWidth)}] [yline 1] [expr {[winfo width .t]-([bo]+$tw+round(1.5*$fixedWidth))-[bo]}] $fixedHeight] \ - [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 0] [yline 2] $fixedWidth $fixedHeight]] lequal [list [.t bbox 1.6] [.t bbox 1.7]] $expected } {1} test textDisp-27.6 {SizeOfTab procedure, center alignment} { @@ -4140,7 +4146,7 @@ test textDisp-27.6 {SizeOfTab procedure, center alignment} { .t tag add x 1.0 end list [.t bbox 1.6] [.t bbox 1.7] } [list [list [xchar 4] [yline 2] $fixedWidth $fixedHeight] \ - [list [xchar 5] [yline 2] $fixedWidth $fixedHeight]] + [list [xchar 5] [yline 2] $fixedWidth $fixedHeight]] test textDisp-27.7 {SizeOfTab procedure, center alignment, wrap -none (potential numerical problems)} { .t delete 1.0 end set cm [winfo fpixels .t 1c] @@ -4210,7 +4216,7 @@ test textDisp-27.8 {SizeOfTab procedure, right alignment} { .t tag add x 1.0 end list [.t bbox 1.6] [.t bbox 1.7] } [list [list [xcharr 1] [yline 1] $fixedWidth $fixedHeight] \ - [list [bo] [yline 2] $fixedWidth $fixedHeight]] + [list [bo] [yline 2] $fixedWidth $fixedHeight]] test textDisp-27.9 {SizeOfTab procedure, left alignment} { .t delete 1.0 end .t insert 1.0 a\txyzzyabc @@ -4219,7 +4225,7 @@ test textDisp-27.9 {SizeOfTab procedure, left alignment} { .t tag add x 1.0 end list [.t bbox 1.3] [.t bbox 1.4] } [list [list [expr {round([bo]+17.14*$fixedWidth+$fixedWidth)}] [yline 1] [expr {[winfo width .t]-round([bo]+17.14*$fixedWidth+$fixedWidth)-[bo]}] $fixedHeight] \ - [list [bo] [yline 2] $fixedWidth $fixedHeight]] + [list [bo] [yline 2] $fixedWidth $fixedHeight]] test textDisp-27.10 {SizeOfTab procedure, numeric alignment} { .t delete 1.0 end .t insert 1.0 a\t123.4 @@ -4228,7 +4234,7 @@ test textDisp-27.10 {SizeOfTab procedure, numeric alignment} { .t tag add x 1.0 end list [.t bbox 1.3] [.t bbox 1.4] } [list [list [expr {round([bo]+17.14*$fixedWidth-$fixedWidth)}] [yline 1] [expr {[winfo width .t]-round([bo]+17.14*$fixedWidth-$fixedWidth)-[bo]}] $fixedHeight] \ - [list [bo] [yline 2] $fixedWidth $fixedHeight]] + [list [bo] [yline 2] $fixedWidth $fixedHeight]] test textDisp-27.11 {SizeOfTab procedure, making tabs at least as wide as a space} { .t delete 1.0 end .t insert 1.0 abc\tdefghijklmnopqrst @@ -4237,7 +4243,7 @@ test textDisp-27.11 {SizeOfTab procedure, making tabs at least as wide as a spac .t tag add x 1.0 end list [.t bbox 1.5] [.t bbox 1.6] } [list [list [expr {round([bo]+17.14*$fixedWidth+$fixedWidth)}] [yline 1] [expr {[winfo width .t]-round([bo]+17.14*$fixedWidth+$fixedWidth)-[bo]}] $fixedHeight] \ - [list [bo] [yline 2] $fixedWidth $fixedHeight]] + [list [bo] [yline 2] $fixedWidth $fixedHeight]] proc bizarre_scroll args { .t2.t delete 5.0 end @@ -4275,8 +4281,8 @@ test textDisp-29.1 {miscellaneous: lines wrap but are still too long} -setup { .t2.t window create 1.1 -window .t2.t.f update set expected [list [list 0.0 [expr {20.0*$fixedWidth/300}]] \ - 300x50+[bo .t2.t]+[yline 2 .t2.t] \ - [list [xchar 1 .t2.t] [expr {[yline 2 .t2.t]+50}] $fixedWidth $fixedHeight]] + 300x50+[bo .t2.t]+[yline 2 .t2.t] \ + [list [xchar 1 .t2.t] [expr {[yline 2 .t2.t]+50}] $fixedWidth $fixedHeight]] lequal [list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3]] $expected } -cleanup { destroy .t2 @@ -4298,8 +4304,8 @@ test textDisp-29.2 {miscellaneous: lines wrap but are still too long} -setup { .t2.t xview scroll 1 unit update set expected [list [list [expr {1.0*$fixedWidth/300}] [expr {21.0*$fixedWidth/300}]] \ - 300x50+[expr {[bo .t2.t]-$fixedWidth}]+[yline 2 .t2.t] \ - [list [expr {[bo .t2.t]-$fixedWidth+$fixedWidth}] [expr {[yline 2 .t2.t]+50}] $fixedWidth $fixedHeight]] + 300x50+[expr {[bo .t2.t]-$fixedWidth}]+[yline 2 .t2.t] \ + [list [expr {[bo .t2.t]-$fixedWidth+$fixedWidth}] [expr {[yline 2 .t2.t]+50}] $fixedWidth $fixedHeight]] lequal [list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3]] $expected } -cleanup { destroy .t2 @@ -4340,8 +4346,8 @@ test textDisp-29.2.2 {miscellaneous: lines wrap but are still too long} -setup { .t2.t xview scroll 2 unit update set expected [list [list [expr {2.0*$fixedWidth/300}] [expr {22.0*$fixedWidth/300}]] \ - 300x50+[expr {[bo .t2.t]-2*$fixedWidth}]+[yline 2 .t2.t] \ - {}] + 300x50+[expr {[bo .t2.t]-2*$fixedWidth}]+[yline 2 .t2.t] \ + {}] lequal [list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3]] $expected } -cleanup { destroy .t2 @@ -4363,8 +4369,8 @@ test textDisp-29.2.3 {miscellaneous: lines wrap but are still too long} -setup { .t2.t xview scroll 7 pixels update set expected [list [list [expr {7.0/300}] [expr {(20.0*$fixedWidth+7)/300}]] \ - 300x50+[expr {[bo .t2.t]-7}]+[yline 2 .t2.t] \ - [list [expr {[bo .t2.t]+$fixedWidth-7}] [expr {[yline 2 .t2.t]+50}] $fixedWidth $fixedHeight]] + 300x50+[expr {[bo .t2.t]-7}]+[yline 2 .t2.t] \ + [list [expr {[bo .t2.t]+$fixedWidth-7}] [expr {[yline 2 .t2.t]+50}] $fixedWidth $fixedHeight]] lequal [list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3]] $expected } -cleanup { destroy .t2 @@ -4386,8 +4392,8 @@ test textDisp-29.2.4 {miscellaneous: lines wrap but are still too long} -setup { .t2.t xview scroll 17 pixels update set expected [list [list [expr {17.0/300}] [expr {(20.0*$fixedWidth+17)/300}]] \ - 300x50+[expr {[bo .t2.t]-17}]+[yline 2 .t2.t] \ - {}] + 300x50+[expr {[bo .t2.t]-17}]+[yline 2 .t2.t] \ + {}] lequal [list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3]] $expected } -cleanup { destroy .t2 @@ -4439,8 +4445,8 @@ test textDisp-29.3 {miscellaneous: lines wrap but are still too long} -setup { .t2.t xview scroll 200 units update set expected [list [list [expr {double(300-20*$fixedWidth)/300}] 1.0] \ - 300x50+[expr {-(300-20*$fixedWidth-[bo .t2.t])}]+[yline 2 .t2.t] \ - {}] + 300x50+[expr {-(300-20*$fixedWidth-[bo .t2.t])}]+[yline 2 .t2.t] \ + {}] lequal [list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3]] $expected } -cleanup { destroy .t2 @@ -4492,7 +4498,7 @@ test textDisp-31.1 {line embedded window height update} { lappend res [.t count -ypixels 1.0 end] lappend res [.t count -update -ypixels 1.0 end] } [list [expr {100+$fixedHeight*6}] \ - [expr {100+$fixedHeight*6}] \ + [expr {100+$fixedHeight*6}] \ [expr {$fixedHeight*7}]] test textDisp-31.2 {line update index shifting} { set res {} @@ -4509,7 +4515,7 @@ test textDisp-31.2 {line update index shifting} { lappend res [.t count -ypixels 1.0 end] lappend res [.t count -update -ypixels 1.0 end] } [list [expr {100+$fixedHeight*6}] \ - [expr {100+$fixedHeight*8}] \ + [expr {100+$fixedHeight*8}] \ [expr {$fixedHeight*9}] \ [expr {$fixedHeight*7}] \ [expr {100+$fixedHeight*6}]] @@ -4536,7 +4542,7 @@ test textDisp-31.3 {line update index shifting} { lappend res [.t count -ypixels 1.0 end] set res } [list [expr {100+$fixedHeight*6}] \ - [expr {100+$fixedHeight*8}] \ + [expr {100+$fixedHeight*8}] \ [expr {$fixedHeight*9}] \ [expr {$fixedHeight*7}] \ [expr {100+$fixedHeight*6}]] @@ -4552,7 +4558,7 @@ test textDisp-31.4 {line embedded image height update} { lappend res [.t count -update -ypixels 1.0 end] set res } [list [expr {100+$fixedHeight*6}] \ - [expr {100+$fixedHeight*6}] \ + [expr {100+$fixedHeight*6}] \ [expr {$fixedHeight*7}]] test textDisp-31.5 {line update index shifting} { set res {} @@ -4570,7 +4576,7 @@ test textDisp-31.5 {line update index shifting} { lappend res [.t count -update -ypixels 1.0 end] set res } [list [expr {100+$fixedHeight*6}] \ - [expr {100+$fixedHeight*8}] \ + [expr {100+$fixedHeight*8}] \ [expr {$fixedHeight*9}] \ [expr {$fixedHeight*7}] \ [expr {100+$fixedHeight*6}]] @@ -4596,7 +4602,7 @@ test textDisp-31.6 {line update index shifting} { lappend res [.t count -ypixels 1.0 end] set res } [list [expr {100+$fixedHeight*6}] \ - [expr {100+$fixedHeight*8}] \ + [expr {100+$fixedHeight*8}] \ [expr {$fixedHeight*9}] \ [expr {$fixedHeight*7}] \ [expr {100+$fixedHeight*6}]] @@ -4620,7 +4626,7 @@ test textDisp-31.7 {line update index shifting, elided} { lappend res [.t count -ypixels 1.0 end] set res } [list [expr {$fixedHeight*1}] \ - [expr {$fixedHeight*3}] \ + [expr {$fixedHeight*3}] \ [expr {$fixedHeight*3}] \ [expr {$fixedHeight*2}] \ [expr {$fixedHeight*1}] \ @@ -4856,7 +4862,7 @@ test textDisp-34.1 {Line heights recalculation problem: bug 2677890} -setup { pack [text .t1] -expand 1 -fill both set txt "" for {set i 1} {$i < 100} {incr i} { - append txt "Line $i\n" + append txt "Line $i\n" } set result {} } -body { diff --git a/tests/textImage.test b/tests/textImage.test index ffc65e7..f3f9c19 100644 --- a/tests/textImage.test +++ b/tests/textImage.test @@ -123,8 +123,8 @@ test textImage-1.11 {basic argument checking} -setup { destroy .t } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 + image create photo small -width 5 -height 5 + small put red -to 0 0 4 4 } text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 pack .t @@ -150,8 +150,8 @@ test textImage-1.13 {names argument checking} -setup { set result "" } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 + image create photo small -width 5 -height 5 + small put red -to 0 0 4 4 } text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 pack .t @@ -181,8 +181,8 @@ test textImage-1.15 {align argument checking} -setup { destroy .t } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 + image create photo small -width 5 -height 5 + small put red -to 0 0 4 4 } text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 pack .t @@ -196,8 +196,8 @@ test textImage-1.16 {configure} -setup { destroy .t } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 + image create photo small -width 5 -height 5 + small put red -to 0 0 4 4 } text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 pack .t @@ -206,43 +206,43 @@ test textImage-1.16 {configure} -setup { } -cleanup { destroy .t image delete small -} -result {{-align {} {} center center} {-padx {} {} 0 0} {-pady {} {} 0 0} {-image {} {} {} small} {-name {} {} {} {}}} +} -result {{-align {} {} center center} {-padx {} {} 0 {}} {-pady {} {} 0 {}} {-image {} {} {} small} {-name {} {} {} {}}} test textImage-1.17 {basic cget options} -setup { destroy .t set result "" } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 + image create photo small -width 5 -height 5 + 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] + 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:} +} -result {align:center padx: pady: image:small name:} test textImage-1.18 {basic configure options} -setup { destroy .t set result "" } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 - image create photo large -width 50 -height 50 - large put green -to 0 0 50 50 + image create photo small -width 5 -height 5 + small put red -to 0 0 4 4 + image create photo large -width 50 -height 50 + 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 + .t image configure small -$option $value } update .t image configure small @@ -255,8 +255,8 @@ test textImage-1.19 {basic image naming} -setup { destroy .t } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 + image create photo small -width 5 -height 5 + small put red -to 0 0 4 4 } text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 pack .t @@ -274,8 +274,8 @@ test textImage-2.1 {debug} -setup { destroy .t } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 + image create photo small -width 5 -height 5 + small put red -to 0 0 4 4 } text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 pack .t @@ -297,8 +297,8 @@ test textImage-3.1 {image change propagation} -setup { set result "" } -body { catch { - image create photo vary -width 5 -height 5 - vary put red -to 0 0 4 4 + image create photo vary -width 5 -height 5 + vary put red -to 0 0 4 4 } text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 pack .t @@ -306,9 +306,9 @@ test textImage-3.1 {image change propagation} -setup { 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] + vary configure -width $i -height $i + update + lappend result $i:[.t bbox vary] } return $result } -cleanup { @@ -321,8 +321,8 @@ test textImage-3.2 {delayed image management, see also bug 1591493} -setup { set result "" } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 + image create photo small -width 5 -height 5 + small put red -to 0 0 4 4 } text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 pack .t @@ -347,10 +347,10 @@ test textImage-4.1 {alignment checking - except baseline} -setup { set result "" } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 - image create photo large -width 50 -height 50 - large put green -to 0 0 50 50 + image create photo small -width 5 -height 5 + small put red -to 0 0 4 4 + image create photo large -width 50 -height 50 + large put green -to 0 0 50 50 } text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 pack .t @@ -360,9 +360,9 @@ test textImage-4.1 {alignment checking - except baseline} -setup { update lappend result default:[.t bbox small] foreach i {top bottom center} { - .t image configure small -align $i - update - lappend result [.t image cget small -align]:[.t bbox small] + .t image configure small -align $i + update + lappend result [.t image cget small -align]:[.t bbox small] } return $result } -cleanup { @@ -375,10 +375,10 @@ test textImage-4.2 {alignment checking - baseline} -setup { set result "" } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 - image create photo large -width 50 -height 50 - large put green -to 0 0 50 50 + image create photo small -width 5 -height 5 + small put red -to 0 0 4 4 + image create photo large -width 50 -height 50 + large put green -to 0 0 50 50 } font create test_font2 -size 5 text .t -font test_font2 -bd 0 -highlightthickness 0 -padx 0 -pady 0 @@ -390,16 +390,16 @@ test textImage-4.2 {alignment checking - baseline} -setup { # Sizes larger than 25 can be too big and lead to a negative 'norm', # at least on Windows XP with certain settings. foreach size {10 15 20 25} { - font configure test_font2 -size $size - array set Metrics [font metrics test_font2] - update ; # services the idle "TheWorldHasChanged" event, queues "TkWorldChanged" events - update ; # services the queued "TkWorldChanged" events - foreach {x y w h} [.t bbox small] {} - set norm [expr { - (([image height large] - $Metrics(-linespace))/2 - + $Metrics(-ascent) - [image height small] - $y) - }] - lappend result "$size $norm" + font configure test_font2 -size $size + array set Metrics [font metrics test_font2] + update ; # services the idle "TheWorldHasChanged" event, queues "TkWorldChanged" events + update ; # services the queued "TkWorldChanged" events + foreach {x y w h} [.t bbox small] {} + set norm [expr { + (([image height large] - $Metrics(-linespace))/2 + + $Metrics(-ascent) - [image height small] - $y) + }] + lappend result "$size $norm" } return $result } -cleanup { @@ -416,10 +416,10 @@ test textImage-4.3 {alignment and padding checking} -constraints { set result "" } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 - image create photo large -width 50 -height 50 - large put green -to 0 0 50 50 + image create photo small -width 5 -height 5 + small put red -to 0 0 4 4 + image create photo large -width 50 -height 50 + large put green -to 0 0 50 50 } text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 pack .t @@ -429,9 +429,9 @@ test textImage-4.3 {alignment and padding checking} -constraints { update lappend result default:[.t bbox small] foreach i {top bottom center baseline} { - .t image configure small -align $i - update - lappend result $i:[.t bbox small] + .t image configure small -align $i + update + lappend result $i:[.t bbox small] } return $result } -cleanup { @@ -444,10 +444,10 @@ test textImage-5.1 {peer widget images} -setup { destroy .t .tt } -body { catch { - image create photo small -width 5 -height 5 - small put red -to 0 0 4 4 - image create photo large -width 50 -height 50 - large put green -to 0 0 50 50 + image create photo small -width 5 -height 5 + small put red -to 0 0 4 4 + image create photo large -width 50 -height 50 + large put green -to 0 0 50 50 } pack [text .t] toplevel .tt diff --git a/tests/textTag.test b/tests/textTag.test index 7818aee..ff51bac 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -388,7 +388,7 @@ test textTag-2.12 {TkTextTagCmd - "add" option} -body { 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 insert end "Line $i\n" } .tt tag configure mytag -offset 2 .tt peer create .ptt @@ -570,16 +570,16 @@ test textTag-5.12 {TkTextTagCmd - "configure" option} -body { 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 + -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] + [.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} \ - ] + {-rmargin {} {} {} 5} \ + {-lmargincolor {} {} {} darkblue} {-rmargincolor {} {} {} lightgreen} \ + ] test textTag-5.14 {TkTextTagCmd - "configure" option} -body { .t tag delete x .t tag configure x -lmargin1 2.0x @@ -615,7 +615,7 @@ test textTag-5.17 {TkTextTagCmd - "configure" option} -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] + [.t tag configure x -spacing3] } -cleanup { .t tag delete x } -result {{-spacing1 {} {} {} 2} {-spacing2 {} {} {} 4} {-spacing3 {} {} {} 6}} @@ -639,11 +639,11 @@ test textTag-5.20 {TkTextTagCmd - "configure" option} -body { } -returnCodes error -result {expected screen distance or "" but got "4.2.3"} test textTag-5.21 {TkTextTagCmd - "configure" option} -body { .t configure -selectborderwidth 2 -selectforeground blue \ - -selectbackground black + -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] + lappend x [lindex [.t configure $i] 4] } return $x } -result {4 green yellow} @@ -748,7 +748,7 @@ test textTag-7.4 {TkTextTagCmd - "lower" option} -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 + .t tag configure $i -background black } } -body { .t tag lower c @@ -760,7 +760,7 @@ test textTag-7.5 {TkTextTagCmd - "lower" option} -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 + .t tag configure $i -background black } } -body { .t tag lower d b @@ -772,7 +772,7 @@ test textTag-7.6 {TkTextTagCmd - "lower" option} -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 + .t tag configure $i -background black } } -body { .t tag lower a c @@ -791,7 +791,7 @@ test textTag-8.2 {TkTextTagCmd - "names" option} -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 + .t tag configure $i -background black } } -body { .t tag names @@ -802,7 +802,7 @@ test textTag-8.3 {TkTextTagCmd - "names" option} -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 + .t tag configure $i -background black } } -body { .t tag add "a b" 2.1 2.6 @@ -1070,7 +1070,7 @@ test textTag-11.4 {TkTextTagCmd - "raise" option} -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 + .t tag configure $i -background black } } -body { .t tag raise c @@ -1082,7 +1082,7 @@ test textTag-11.5 {TkTextTagCmd - "raise" option} -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 + .t tag configure $i -background black } } -body { .t tag raise d b @@ -1094,7 +1094,7 @@ test textTag-11.6 {TkTextTagCmd - "raise" option} -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 + .t tag configure $i -background black } } -body { .t tag raise a c @@ -1164,7 +1164,7 @@ 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 add $i 2.0 2.2 } .t tag names 2.1 } -cleanup { @@ -1175,10 +1175,10 @@ 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 + .t tag configure $i -background black } foreach i {d c b a} { - .t tag add $i 2.0 2.2 + .t tag add $i 2.0 2.2 } .t tag names 2.1 } -cleanup { @@ -1188,7 +1188,7 @@ 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 add x$i 2.0 2.2 } .t tag names 2.1 } -cleanup { @@ -1198,10 +1198,10 @@ 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 + .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 + .t tag add x$i 2.0 2.2 } .t tag names 2.1 } -cleanup { @@ -1373,15 +1373,15 @@ test textTag-16.2 {TkTextPickCurrent procedure} -constraints { test textTag-16.3 {TkTextPickCurrent procedure} -setup { foreach i {a b c d} { - .t tag remove $i 1.0 end + .t tag remove $i 1.0 end } wm geometry . +200+200 ; update event generate {} <Motion> -warp 1 -x 5 -y 5 controlPointerWarpTiming } -body { foreach i {a b c d} { - .t tag bind $i <Enter> "lappend x enter-$i" - .t tag bind $i <Leave> "lappend x leave-$i" + .t tag bind $i <Enter> "lappend x enter-$i" + .t tag bind $i <Leave> "lappend x leave-$i" } .t tag lower b .t tag lower a @@ -1402,15 +1402,15 @@ test textTag-16.3 {TkTextPickCurrent procedure} -setup { test textTag-16.4 {TkTextPickCurrent procedure} -setup { foreach i {a b c d} { - .t tag remove $i 1.0 end + .t tag remove $i 1.0 end } wm geometry . +200+200 ; update event generate {} <Motion> -warp 1 -x 5 -y 5 controlPointerWarpTiming } -body { foreach i {a b c d} { - .t tag bind $i <Enter> "lappend x enter-$i" - .t tag bind $i <Leave> "lappend x leave-$i" + .t tag bind $i <Enter> "lappend x enter-$i" + .t tag bind $i <Leave> "lappend x leave-$i" } .t tag lower b .t tag lower a @@ -1430,7 +1430,7 @@ test textTag-16.4 {TkTextPickCurrent procedure} -setup { test textTag-16.5 {TkTextPickCurrent procedure} -setup { foreach i {big a b c d} { - .t tag remove $i 1.0 end + .t tag remove $i 1.0 end } wm geometry . +200+200 ; update event generate {} <Motion> -warp 1 -x 5 -y 5 @@ -1450,7 +1450,7 @@ test textTag-16.6 {TkTextPickCurrent procedure} -constraints { haveBigFontTwiceLargerThanTextFont } -setup { foreach i {big a b c d} { - .t tag remove $i 1.0 end + .t tag remove $i 1.0 end } wm geometry . +200+200 ; update event generate {} <Motion> -warp 1 -x 5 -y 5 @@ -1471,7 +1471,7 @@ test textTag-16.7 {TkTextPickCurrent procedure} -constraints { haveBigFontTwiceLargerThanTextFont } -setup { foreach i {big a b c d} { - .t tag remove $i 1.0 end + .t tag remove $i 1.0 end } wm geometry . +200+200 ; update event generate {} <Motion> -warp 1 -x 5 -y 5 diff --git a/tests/textWind.test b/tests/textWind.test index ecb433e..56525fd 100644 --- a/tests/textWind.test +++ b/tests/textWind.test @@ -96,7 +96,7 @@ test textWind-1.1 {basic tests of options} -setup { .t window create 2.2 -window .f update list [winfo ismapped .f] [winfo geom .f] [.t bbox .f] \ - [.t window configure .f -window] + [.t window configure .f -window] } -result [list \ 1 \ 3x3+[xchar 2]+[expr {[yline 2]+($fixedHeight-3)/2}] \ @@ -112,7 +112,7 @@ test textWind-1.2 {basic tests of options} -setup { .t window create 2.2 -window .f -align top update list [winfo ismapped .f] [winfo geom .f] [.t bbox .f] \ - [.t window configure .f -align] + [.t window configure .f -align] } -result [list \ 1 \ 3x3+[xchar 2]+[yline 2] \ @@ -258,7 +258,7 @@ test textWind-2.13 {TkTextWindowCmd procedure} -setup { .t window create 2.2 -window .f -align baseline -padx 1 -pady 2 update list [.t window configure .f -padx 14 -pady 15] \ - [.t window configure .f -padx] [.t window configure .f -pady] + [.t window configure .f -padx] [.t window configure .f -pady] } -cleanup { destroy .f } -result {{} {-padx {} {} 0 14} {-pady {} {} 0 15}} @@ -287,7 +287,7 @@ test textWind-2.17 {TkTextWindowCmd procedure} -setup { .t delete 1.0 end } -body { list [catch {.t window create 1.0} msg] $msg [.t window configure 1.0] -} -result {0 {} {{-align {} {} center center} {-create {} {} {} {}} {-padx {} {} 0 0} {-pady {} {} 0 0} {-stretch {} {} 0 0} {-window {} {} {} {}}}} +} -result {0 {} {{-align {} {} center center} {-create {} {} {} {}} {-padx {} {} 0 {}} {-pady {} {} 0 {}} {-stretch {} {} 0 0} {-window {} {} {} {}}}} test textWind-2.18 {TkTextWindowCmd procedure} -setup { destroy .f frame .f -width 20 -height 10 -bg $color @@ -343,8 +343,8 @@ test textWind-2.25 {TkTextWindowCmd procedure, "names" option} -setup { destroy .f .f2 .t.f .t.f2 } -body { foreach i {.f .f2 .t.f .t.f2} { - frame $i -width 20 -height 20 - .t window create end -window $i + frame $i -width 20 -height 20 + .t window create end -window $i } lsort [.t window names] } -cleanup { @@ -693,7 +693,7 @@ test textWind-10.1 {EmbWinLayoutProc procedure} -setup { } -body { .t insert 1.0 "Some sample text" .t window create 1.5 -create { - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -bg $color } update list [winfo exists .f] [winfo width .f] [winfo height .f] [.t index .f] @@ -704,13 +704,13 @@ test textWind-10.1 {EmbWinLayoutProc procedure} -setup { test textWind-10.2 {EmbWinLayoutProc procedure, error in creating window} -setup { .t delete 1.0 end proc bgerror args { - global msg - set msg $args + global msg + set msg $args } } -body { .t insert 1.0 "Some sample text" .t window create 1.5 -create { - error "couldn't create window" + error "couldn't create window" } set msg xyzzy update @@ -724,13 +724,13 @@ test textWind-10.2 {EmbWinLayoutProc procedure, error in creating window} -setup test textWind-10.3 {EmbWinLayoutProc procedure, error in creating window} -setup { .t delete 1.0 end proc bgerror args { - global msg - set msg $args + global msg + set msg $args } } -body { .t insert 1.0 "Some sample text" .t window create 1.5 -create { - concat gorp + concat gorp } set msg xyzzy update @@ -745,24 +745,24 @@ test textWind-10.4 {EmbWinLayoutProc procedure, error in creating window} -setup .t delete 1.0 end destroy .t.f proc bgerror args { - global msg + global msg lappend msg $args } } -body { .t insert 1.0 "Some sample text" set msg {} after idle { - .t window create 1.5 -create { - frame .t.f - frame .t.f.f -width 10 -height 20 -bg $color - } + .t window create 1.5 -create { + frame .t.f + frame .t.f.f -width 10 -height 20 -bg $color + } } set count 0 while {([llength $msg] < 2) && ($count < 100)} { - update - incr count - .t bbox 1.5 - after 10 + update + incr count + .t bbox 1.5 + after 10 } lappend msg [.t bbox 1.5] [winfo exists .t.f.f] } -cleanup { @@ -777,8 +777,8 @@ test textWind-10.5 {EmbWinLayoutProc procedure, error in creating window} -setup .t delete 1.0 end destroy .t.f proc bgerror args { - global msg - if {$msg == ""} { + global msg + if {$msg == ""} { lappend msg $args } } @@ -786,8 +786,8 @@ test textWind-10.5 {EmbWinLayoutProc procedure, error in creating window} -setup .t insert 1.0 "Some sample text" set msg {} .t window create 1.5 -create { - frame .t.f - frame .t.f.f -width 10 -height 20 -bg $color + frame .t.f + frame .t.f.f -width 10 -height 20 -bg $color } update lappend msg [winfo exists .t.f.f] @@ -799,16 +799,16 @@ test textWind-10.5 {EmbWinLayoutProc procedure, error in creating window} -setup test textWind-10.6 {EmbWinLayoutProc procedure, error in creating window} -setup { .t delete 1.0 end proc bgerror args { - global msg - if {[lsearch -exact $msg $args] < 0} { - lappend msg $args - } + global msg + if {[lsearch -exact $msg $args] < 0} { + lappend msg $args + } } } -body { .t insert 1.0 "Some sample text" update .t window create 1.5 -create { - concat .t + concat .t } set msg {} update @@ -823,15 +823,15 @@ test textWind-10.7 {EmbWinLayoutProc procedure, error in creating window} -setup .t delete 1.0 end destroy .t2 proc bgerror args { - global msg + global msg lappend msg $args } } -body { .t insert 1.0 "Some sample text" .t window create 1.5 -create { - toplevel .t2 -width 100 -height 150 - wm geom .t2 +0+0 - concat .t2 + toplevel .t2 -width 100 -height 150 + wm geom .t2 +0+0 + concat .t2 } set msg {} update idletasks ; after 100 ; update @@ -846,15 +846,15 @@ test textWind-10.8 {EmbWinLayoutProc procedure, error in creating window} -setup .t delete 1.0 end destroy .t2 proc bgerror args { - global msg + global msg lappend msg $args } } -body { .t insert 1.0 "Some sample text" .t window create 1.5 -create { - toplevel .t2 -width 100 -height 150 - wm geom .t2 +0+0 - concat .t2 + toplevel .t2 -width 100 -height 150 + wm geom .t2 +0+0 + concat .t2 } set msg {} update @@ -1340,7 +1340,7 @@ test textWind-15.2 {TkTextWindowIndex procedure} -setup { destroy .f } -body { .t configure -spacing1 0 -spacing2 0 -spacing3 0 \ - -wrap none + -wrap none .t insert 1.0 "Some sample text" frame .f -width 30 -height 20 -bg $color .t window create 1.6 -window .f @@ -1373,7 +1373,7 @@ test textWind-16.2 {EmbWinTextStructureProc procedure} -setup { destroy .f .f2 } -body { .t configure -spacing1 0 -spacing2 0 -spacing3 0 \ - -wrap none + -wrap none .t insert 1.0 "Some sample text" frame .f -width 30 -height 20 -bg $color .t window create 1.6 -window .f @@ -1409,7 +1409,7 @@ test textWind-16.4 {EmbWinTextStructureProc procedure} -setup { .t delete 1.0 end } -body { .t configure -spacing1 0 -spacing2 0 -spacing3 0 \ - -wrap none + -wrap none .t insert 1.0 "Some sample text" frame .t.f -width 30 -height 20 -bg $color .t window create 1.6 -window .t.f @@ -1510,7 +1510,7 @@ test textWind-17.6 {peer widget window configuration} -setup { .t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue} update list [.t window configure 1.2 -window] \ - [.tt.t window configure 1.2 -window] + [.tt.t window configure 1.2 -window] } -cleanup { destroy .tt .t } -result {{-window {} {} {} .t.f} {-window {} {} {} .tt.t.f}} @@ -1541,7 +1541,7 @@ test textWind-17.8 {peer widget window configuration} -setup { .t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue] update list [.t window configure 1.2 -window] \ - [.tt.t window configure 1.2 -window] + [.tt.t window configure 1.2 -window] } -cleanup { destroy .tt .t } -result {{-window {} {} {} .t.f} {-window {} {} {} {}}} diff --git a/tests/tk.test b/tests/tk.test index 0316a7b..4fdec1f 100644 --- a/tests/tk.test +++ b/tests/tk.test @@ -74,12 +74,12 @@ test tk-3.9 {tk command: scaling: too big} -body { test tk-3.10 {tk command: scaling: widthmm} -body { tk scaling 1.25 expr {int((25.4*[winfo screenwidth .])/(72*1.25) + 0.5) \ - - [winfo screenmmwidth .]} + - [winfo screenmmwidth .]} } -result 0 test tk-3.11 {tk command: scaling: heightmm} -body { tk scaling 1.25 expr {int((25.4*[winfo screenheight .])/(72*1.25) + 0.5) \ - - [winfo screenmmheight .]} + - [winfo screenmmheight .]} } -result 0 tk scaling $scaling diff --git a/tests/ttk/image.test b/tests/ttk/image.test index 51f0f00..8d58a12 100644 --- a/tests/ttk/image.test +++ b/tests/ttk/image.test @@ -5,7 +5,7 @@ loadTestedCommands test image-1.1 "Bad image element" -body { ttk::style element create BadImage image badimage -} -returnCodes error -result {image "badimage" doesn't exist} +} -returnCodes error -result {image "badimage" does not exist} test image-1.2 "Duplicate element" -setup { image create photo test.element -width 10 -height 10 diff --git a/tests/ttk/labelframe.test b/tests/ttk/labelframe.test index f7cb8ef..b82d2c3 100644 --- a/tests/ttk/labelframe.test +++ b/tests/ttk/labelframe.test @@ -11,13 +11,13 @@ test labelframe-2.1 "Can't use indirect descendant as labelwidget" -body { ttk::frame .lf.t ttk::checkbutton .lf.t.cb .lf configure -labelwidget .lf.t.cb -} -returnCodes error -result "can't *" -match glob \ +} -returnCodes error -result {cannot add ".lf.t.cb" as content of ".lf"} \ -cleanup { destroy .lf.t } ; test labelframe-2.2 "Can't use toplevel as labelwidget" -body { toplevel .lf.t .lf configure -labelwidget .lf.t -} -returnCodes error -result "can't *" -match glob \ +} -returnCodes error -result {cannot add ".lf.t" as content of ".lf"} \ -cleanup { destroy .lf.t } ; test labelframe-2.3 "Can't use non-windows as -labelwidget" -body { diff --git a/tests/ttk/notebook.test b/tests/ttk/notebook.test index f4558bf..152625b 100644 --- a/tests/ttk/notebook.test +++ b/tests/ttk/notebook.test @@ -25,7 +25,7 @@ test notebook-1.3 "Cannot add toplevel" -body { .nb add [toplevel .nb.t] } -cleanup { destroy .t.nb -} -returnCodes error -match glob -result "can't add .nb.t*" +} -returnCodes error -result {cannot add ".nb.t" as content of ".nb"} test notebook-1.4 "Try to select bad tab" -body { .nb select @6000,6000 diff --git a/tests/ttk/panedwindow.test b/tests/ttk/panedwindow.test index d115a9e..10e1188 100644 --- a/tests/ttk/panedwindow.test +++ b/tests/ttk/panedwindow.test @@ -135,11 +135,11 @@ test panedwindow-3.0 "configure pane" -body { test panedwindow-3.1 "configure pane -- errors" -body { .pw pane 1 -weight -4 -} -returnCodes error -match glob -result "-weight must be nonnegative" +} -returnCodes error -match glob -result "-weight must be non-negative" test panedwindow-3.2 "add pane -- errors" -body { .pw add [ttk::label .pw.l] -weight -1 -} -returnCodes error -match glob -result "-weight must be nonnegative" +} -returnCodes error -match glob -result "-weight must be non-negative" test panedwindow-3.end "cleanup" -body { destroy .pw } diff --git a/tests/ttk/pb_image.svg b/tests/ttk/pb_image.svg index b5956f5..2094eb9 100644 --- a/tests/ttk/pb_image.svg +++ b/tests/ttk/pb_image.svg @@ -49,11 +49,11 @@ id="metadata5"> <rdf:RDF> <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> diff --git a/tests/ttk/progressbar.test b/tests/ttk/progressbar.test index 9f9e5f9..b3f1dc6 100644 --- a/tests/ttk/progressbar.test +++ b/tests/ttk/progressbar.test @@ -89,8 +89,8 @@ test progressbar-3.1 "progressbar non-core options" -setup { ttk::progressbar .defaultpb } -body { foreach option {-anchor -foreground -justify -style -text -wraplength \ - -length -maximum -mode -orient -phase -value -variable} { - lappend res [.defaultpb cget $option] + -length -maximum -mode -orient -phase -value -variable} { + lappend res [.defaultpb cget $option] } set res } -cleanup { @@ -104,17 +104,17 @@ test progressbar-3.2 "TIP #442 options are taken into account" -setup { set thefont [font actual {Arial 10}] } -body { .p configure -anchor c -foreground blue -justify right \ - -text "TIP #442\noptions are now tested" -wraplength 100 + -text "TIP #442\noptions are now tested" -wraplength 100 update .p step 10 .p configure -anchor e -font $thefont -foreground green -justify center \ - -text "Changing the value of each option\nfrom TIP #442" -wraplength 250 + -text "Changing the value of each option\nfrom TIP #442" -wraplength 250 update .p step 20 .p configure -orient vertical -text "Cannot be seen" update foreach option {-anchor -foreground -justify -text -wraplength} { - lappend res [list $option [.p cget $option]] + lappend res [list $option [.p cget $option]] } set res } -cleanup { @@ -148,7 +148,7 @@ test progressbar-4.1 "style command" -body { ttk::progressbar .wh ; # default is -orient horizontal ttk::progressbar .wv -orient vertical list [.wh cget -style] [.wh style] [winfo class .wh]\ - [.wv cget -style] [.wv style] [winfo class .wv] + [.wv cget -style] [.wv style] [winfo class .wv] } -cleanup { destroy .wh .wv } -result {{} Horizontal.TProgressbar TProgressbar {} Vertical.TProgressbar TProgressbar} diff --git a/tests/ttk/spinbox.test b/tests/ttk/spinbox.test index 1f32049..030a344 100644 --- a/tests/ttk/spinbox.test +++ b/tests/ttk/spinbox.test @@ -213,12 +213,12 @@ test spinbox-3.0 "textarea should expand to fill widget" -setup { update idletasks set timer [after 500 {set ::spinbox_test timedout}] bind . <Map> { - after idle { - wm geometry . "210x80" + after idle { + wm geometry . "210x80" update idletasks - set ::spinbox_test [.sb identify element 25 5] - } - bind . <Map> {} + set ::spinbox_test [.sb identify element 25 5] + } + bind . <Map> {} } grid .sb -sticky ew vwait ::spinbox_test @@ -234,12 +234,12 @@ test spinbox-4.0 "Increment with duplicates in -values, wrap" -setup { } -body { set ::spinbox_test [.sb get] for {set i 0} {$i < $max} {incr i} { - event generate .sb <<Increment>> - lappend ::spinbox_test [.sb get] + event generate .sb <<Increment>> + lappend ::spinbox_test [.sb get] } for {set i 0} {$i < $max} {incr i} { - event generate .sb <<Decrement>> - lappend ::spinbox_test [.sb get] + event generate .sb <<Decrement>> + lappend ::spinbox_test [.sb get] } set ::spinbox_test } -cleanup { @@ -254,13 +254,13 @@ test spinbox-4.1 "Increment with duplicates in -values, wrap, initial value set" .sb set three set ::spinbox_test [.sb get] for {set i 0} {$i < $max} {incr i} { - event generate .sb <<Increment>> - lappend ::spinbox_test [.sb get] + event generate .sb <<Increment>> + lappend ::spinbox_test [.sb get] } .sb set two ; # the first "two" in the -values list becomes the current value for {set i 0} {$i < $max} {incr i} { - event generate .sb <<Decrement>> - lappend ::spinbox_test [.sb get] + event generate .sb <<Decrement>> + lappend ::spinbox_test [.sb get] } set ::spinbox_test } -cleanup { @@ -274,12 +274,12 @@ test spinbox-4.2 "Increment with duplicates in -values, no wrap" -setup { } -body { set ::spinbox_test [.sb get] for {set i 0} {$i < $max} {incr i} { - event generate .sb <<Increment>> - lappend ::spinbox_test [.sb get] + event generate .sb <<Increment>> + lappend ::spinbox_test [.sb get] } for {set i 0} {$i < $max} {incr i} { - event generate .sb <<Decrement>> - lappend ::spinbox_test [.sb get] + event generate .sb <<Decrement>> + lappend ::spinbox_test [.sb get] } set ::spinbox_test } -cleanup { diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test index d92a979..36749d7 100644 --- a/tests/ttk/treeview.test +++ b/tests/ttk/treeview.test @@ -27,7 +27,7 @@ proc consistencyCheck {tv {item {}}} { proc assert {expr {message ""}} { if {![uplevel 1 [list expr $expr]]} { - set error "PANIC! PANIC! PANIC: $message ($expr failed)" + set error "PANIC! PANIC! PANIC: $message ($expr failed)" puts stderr $error error $error } @@ -54,12 +54,12 @@ proc tvSetupWithItems {} { .tv insert nn end -id nn.n2 -text "nn.3" .tv insert nn end -id nn.n3 -text "nn.3" for {set t 2} {$t < 100} {incr t} { - .tv insert {} end -id nn$t -text "nn$t" - if {$t % 3 == 0} { - .tv insert nn$t end -id nn$t.n1 -text "nn$t.n1" - .tv insert nn$t end -id nn$t.n2 -text "nn$t.n2" - .tv insert nn$t end -id nn$t.n3 -text "nn$t.n3" - } + .tv insert {} end -id nn$t -text "nn$t" + if {$t % 3 == 0} { + .tv insert nn$t end -id nn$t.n1 -text "nn$t.n1" + .tv insert nn$t end -id nn$t.n2 -text "nn$t.n2" + .tv insert nn$t end -id nn$t.n3 -text "nn$t.n3" + } } } @@ -627,7 +627,7 @@ test treeview-9.0 "scroll callback - empty tree" -body { test treeview-9.1 "scrolling" -setup { pack [ttk::treeview .tree -show tree] -fill y for {set i 1} {$i < 100} {incr i} { - .tree insert {} end -text $i + .tree insert {} end -text $i } } -body { .tree yview scroll 5 units @@ -642,19 +642,19 @@ test treeview-9.1 "scrolling" -setup { test treeview-9.2 {scrolling on see command - bug [14188104c3]} -setup { toplevel .top ttk::treeview .top.tree -show {} -height 10 -columns {label} \ - -yscrollcommand [list .top.vs set] + -yscrollcommand [list .top.vs set] ttk::scrollbar .top.vs -command {.top.tree yview} grid .top.tree -row 0 -column 0 -sticky ns grid .top.vs -row 0 -column 1 -sticky ns update proc setrows {n} { - .top.tree delete [.top.tree children {}] - for {set i 1} {$i <= $n} {incr i} { - .top.tree insert {} end -id row$i \ - -values [list [format "Row %2.2d" $i]] - } - .top.tree see row1 - update idletasks + .top.tree delete [.top.tree children {}] + for {set i 1} {$i <= $n} {incr i} { + .top.tree insert {} end -id row$i \ + -values [list [format "Row %2.2d" $i]] + } + .top.tree see row1 + update idletasks } } -body { setrows 10 @@ -668,7 +668,7 @@ test treeview-9.2 {scrolling on see command - bug [14188104c3]} -setup { test treeview-9.3 {scrolling on see command, requested item is closed} -setup { toplevel .top ttk::treeview .top.tree -show tree -height 10 -columns {label} \ - -yscrollcommand [list .top.vs set] + -yscrollcommand [list .top.vs set] ttk::scrollbar .top.vs -command {.top.tree yview} grid .top.tree -row 0 -column 0 -sticky ns grid .top.vs -row 0 -column 1 -sticky ns @@ -679,8 +679,8 @@ test treeview-9.3 {scrolling on see command, requested item is closed} -setup { .top.tree insert c end -id d -text d .top.tree insert d end -id e -text e for {set i 6} {$i <= 15} {incr i} { - .top.tree insert {} end -id row$i \ - -values [list [format "Row %2.2d" $i]] + .top.tree insert {} end -id row$i \ + -values [list [format "Row %2.2d" $i]] } update } -body { @@ -688,10 +688,39 @@ test treeview-9.3 {scrolling on see command, requested item is closed} -setup { .top.tree see e update idletasks set after [lindex [.top.vs get] 1] - expr $after < $before + expr ($after < $before) } -cleanup { destroy .top } -result 1 +test treeview-9.4 {no scrolling on see command on an item below a detached item; bbox on such item is empty} -setup { + toplevel .top + ttk::treeview .top.tree -show tree -height 10 -columns {label} \ + -yscrollcommand [list .top.vs set] + ttk::scrollbar .top.vs -command {.top.tree yview} + grid .top.tree -row 0 -column 0 -sticky ns + grid .top.vs -row 0 -column 1 -sticky ns + + foreach dir {A B C D E F G H} { + set id [string cat dir $dir] + .top.tree insert {} end -id $id -text "dir $dir" -open 1 + for {set i 1} {$i <= 10} {incr i} { + .top.tree insert $id end -id $id-$i -text "dir $dir item $i" + } + } + update + .top.tree detach dirD + .top.tree item dirC -open 0 + update +} -body { + set before [lindex [.top.vs get] 1] + .top.tree see dirD-4 + update + set after [lindex [.top.vs get] 1] + set res [expr ($after == $before)] + lappend res [.top.tree bbox dirD-4] +} -cleanup { + destroy .top +} -result {1 {}} test treeview-10.0 "See command" -setup { # Setup common for all 10.* tests @@ -699,10 +728,10 @@ test treeview-10.0 "See command" -setup { tvSetupWithItems set ::baseBbY [lindex [.tv bbox nn "#1"] 1] proc bbY {item} { - set bb [.tv bbox $item "#1"] - set y [lindex $bb 1] - if {$y eq ""} {return "_"} - return [expr {$y - $::baseBbY}] + set bb [.tv bbox $item "#1"] + set y [lindex $bb 1] + if {$y eq ""} {return "_"} + return [expr {$y - $::baseBbY}] } } -body { set res "" @@ -784,29 +813,29 @@ test treeview-11.5 "Cellselection add rectangle" -body { .tv cellselection add "nn a" "nn.n1 c" .tv cellselection } -result [list \ - "nn a" "nn b" "nn c" \ - "nn.n1 a" "nn.n1 b" "nn.n1 c" \ - "nn.n3 b" \ - "nn2 b"] + "nn a" "nn b" "nn c" \ + "nn.n1 a" "nn.n1 b" "nn.n1 c" \ + "nn.n3 b" \ + "nn2 b"] test treeview-11.6 "Cellselection toggle rectangle" -body { .tv cellselection toggle "nn.n1 b" "nn.n3 c" .tv cellselection } -result [list \ - "nn a" "nn b" "nn c" \ - "nn.n1 a" \ - "nn.n2 b" "nn.n2 c" \ - "nn.n3 c" \ - "nn2 b"] + "nn a" "nn b" "nn c" \ + "nn.n1 a" \ + "nn.n2 b" "nn.n2 c" \ + "nn.n3 c" \ + "nn2 b"] test treeview-11.7 "Cellselection remove rectangle" -body { .tv cellselection remove "nn.n1 a" "nn.n3 b" .tv cellselection } -result [list \ - "nn a" "nn b" "nn c" \ - "nn.n2 c" \ - "nn.n3 c" \ - "nn2 b"] + "nn a" "nn b" "nn c" \ + "nn.n2 c" \ + "nn.n3 c" \ + "nn2 b"] test treeview-11.8 "Cellselection set rectangle" -body { # This tests that "set" clears out all old selections @@ -1048,7 +1077,7 @@ test treeview-identify-10 "identify works when horizontally scrolled" -setup { set result [list] foreach xoffs {0 25 50} { .tv xview $xoffs - update + update lappend result [identify* .tv {region column} 10 10 60 10] lappend result [identify* .tv {region column} 10 50 60 50] } @@ -1067,22 +1096,22 @@ test treeview-identify-10b "bbox works when horizontally scrolled" -body { set base [lindex [.tv bbox branch "#0"] 0] set result [list] foreach tc {0 1 2 3} { - .tv configure -titlecolumns $tc - foreach xoffs {0 25 50} { - .tv xview $xoffs - update - # Extract x coordinate for each column - lappend result [expr {[lindex [.tv bbox branch "#0"] 0] - $base}] - lappend result [expr {[lindex [.tv bbox branch A ] 0] - $base}] - lappend result [expr {[lindex [.tv bbox branch B ] 0] - $base}] - lappend result [expr {[lindex [.tv bbox branch C ] 0] - $base}] - } + .tv configure -titlecolumns $tc + foreach xoffs {0 25 50} { + .tv xview $xoffs + update + # Extract x coordinate for each column + lappend result [expr {[lindex [.tv bbox branch "#0"] 0] - $base}] + lappend result [expr {[lindex [.tv bbox branch A ] 0] - $base}] + lappend result [expr {[lindex [.tv bbox branch B ] 0] - $base}] + lappend result [expr {[lindex [.tv bbox branch C ] 0] - $base}] + } } set result } -result [list 0 50 100 150 -25 25 75 125 -50 0 50 100 \ - 0 50 100 150 0 25 75 125 0 0 50 100 \ - 0 50 100 150 0 50 75 125 0 50 50 100 \ - 0 50 100 150 0 50 100 125 0 50 100 101] + 0 50 100 150 0 25 75 125 0 0 50 100 \ + 0 50 100 150 0 50 75 125 0 50 50 100 \ + 0 50 100 150 0 50 100 125 0 50 100 101] # Followup to trigger crash that happened when title > display test treeview-identify-10c "title more than display" -body { @@ -1113,19 +1142,19 @@ test treeview-identify-11 "bbox supporting -height" -body { set base [lindex [.tv bbox branch A] 1] set result {} foreach yv {0 1} { - .tv yview $yv - update - foreach item {item1 item2 item3} { - set bb [.tv bbox $item A] - set y [lindex $bb 1] - if {$y eq ""} { - # This is to get a clearer error if this goes wrong - lappend result {} - } else { - lappend result [expr {$y - $base}] - } - lappend result [lindex $bb 3] - } + .tv yview $yv + update + foreach item {item1 item2 item3} { + set bb [.tv bbox $item A] + set y [lindex $bb 1] + if {$y eq ""} { + # This is to get a clearer error if this goes wrong + lappend result {} + } else { + lappend result [expr {$y - $base}] + } + lappend result [lindex $bb 3] + } } set result } -result [list 40 40 80 20 100 20 20 40 60 20 80 20] @@ -1260,8 +1289,8 @@ test treeview-368fa4561e "indicators cannot be clicked on leafs" -setup { # using $h even for x computation is intentional here in order to simulate # a mouse click on the (invisible since we're on a leaf) indicator event generate .tv <Button-1> \ - -x [expr {$x + $h / 2}] \ - -y [expr {$y + $h / 2}] + -x [expr {$x + $h / 2}] \ + -y [expr {$y + $h / 2}] lappend res [.tv item foo -open] .tv insert foo end -text "sub" lappend res [.tv item foo -open] @@ -1283,7 +1312,7 @@ test treeview-ce470f20fd-1 "dragging further than the right edge of the treeview proc nostretch {tv} { foreach col [$tv cget -columns] { - $tv column $col -stretch 0 + $tv column $col -stretch 0 } $tv column #0 -stretch 0 update idletasks ; # redisplay $tv @@ -1292,7 +1321,7 @@ proc nostretch {tv} { test treeview-ce470f20fd-2 "changing -stretch resizes columns" -setup { pack [ttk::treeview .tv -columns {bar colA colB colC foo}] foreach col [.tv cget -columns] { - .tv heading $col -text $col + .tv heading $col -text $col } nostretch .tv .tv column colA -width 50 ; .tv column colB -width 50 ; # slack created @@ -1312,7 +1341,7 @@ test treeview-ce470f20fd-2 "changing -stretch resizes columns" -setup { test treeview-ce470f20fd-3 "changing -stretch resizes columns" -setup { pack [ttk::treeview .tv -columns {bar colA colB colC foo}] foreach col [.tv cget -columns] { - .tv heading $col -text $col + .tv heading $col -text $col } .tv configure -displaycolumns {colB colA colC} nostretch .tv @@ -1333,7 +1362,7 @@ test treeview-ce470f20fd-3 "changing -stretch resizes columns" -setup { test treeview-ce470f20fd-4 "changing -stretch resizes columns" -setup { pack [ttk::treeview .tv -columns {bar colA colB colC foo}] foreach col [.tv cget -columns] { - .tv heading $col -text $col + .tv heading $col -text $col } .tv configure -displaycolumns {colB colA colC} nostretch .tv @@ -1352,7 +1381,7 @@ test treeview-ce470f20fd-4 "changing -stretch resizes columns" -setup { .tv configure -displaycolumns {bar colC colA colB} update idletasks ; # no slack anymore because the widget resizes (shrinks) lappend res [.tv column bar -width] [.tv column colA -width] \ - [expr {[winfo width .tv] < $origTreeWidth}] + [expr {[winfo width .tv] < $origTreeWidth}] } -cleanup { destroy .tv } -result {60 50 60 50 60 50 1} @@ -1392,9 +1421,9 @@ test treeview-column0-leak "Test for leak in tree column" -setup { set heading [string range _Hej_ 1 3] } -body { for {set t 0} {$t < 3} {incr t} { - ttk::treeview .tapa -columns "hej hopp" - .tapa heading #0 -text $heading - destroy .tapa + ttk::treeview .tapa -columns "hej hopp" + .tapa heading #0 -text $heading + destroy .tapa } tcl::unsupported::representation $heading } -match glob -result {*refcount of 3,*} @@ -1424,11 +1453,11 @@ test treeview-22.1 "tag bindings" -setup { .tv tag cell add t2 "nn.n2 c" update proc cellEvent {item col} { - # Find midpoint of cell - lassign [.tv bbox $item $col] aX aY aW aH - set aX [expr {$aX + $aW / 2}] - set aY [expr {$aY + $aH / 2}] - event generate .tv <Button-1> -x $aX -y $aY + # Find midpoint of cell + lassign [.tv bbox $item $col] aX aY aW aH + set aX [expr {$aX + $aW / 2}] + set aY [expr {$aY + $aH / 2}] + event generate .tv <Button-1> -x $aX -y $aY } } -body { .tv tag bind t1 <Button-1> {lappend ::tagtest t1} @@ -1470,7 +1499,7 @@ test treeview-23.1 "cell padding" -setup { } -body { .tv tag cell add mytag "nn b" set redcross [image create photo -format gif -data {R0lGODlhBwAHAIABAP8AAP/// - yH5BAEKAAEALAAAAAAHAAcAAAIMBIKmsWrIXnLxuDMLADs=}] + yH5BAEKAAEALAAAAAAHAAcAAAIMBIKmsWrIXnLxuDMLADs=}] .tv tag configure mytag -image $redcross .tv tag configure mytag -imageanchor nw .tv tag configure mytag -padding {2 4 6 8} diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test index 6963a2a..afe147e 100644 --- a/tests/ttk/ttk.test +++ b/tests/ttk/ttk.test @@ -136,6 +136,8 @@ test ttk-selfdestruct-ok-1 "Intentional self-destruction" -body { # Basic tests. # test ttk-1.1 "Create multiline button showing justified text" -body { + wm geometry . +100+100 + event generate . <Motion> -warp 1 -x 600 -y 600 pack [ttk::button .t -text "Hello\nWorld!!" -justify center] -expand true -fill both update } @@ -152,6 +154,8 @@ test ttk-1.4 "Original style preserved" -body { .t cget -style } -result "" +# Tests using this will fail if the top-level window contains the cursor + proc checkstate {w} { foreach statespec { {!active !disabled} @@ -166,7 +170,6 @@ proc checkstate {w} { set result } -# NB: this will fail if the top-level window pops up underneath the cursor test ttk-2.0 "Check state" -body { checkstate .t } -result [list 1 0 0 0 0 0] @@ -388,12 +391,12 @@ test ttk-8.4 "ImageChanged" -body { test ttk-9.1 "Traces on nonexistant namespaces" -body { ttk::checkbutton .tcb -variable foo::bar -} -returnCodes error -result "*parent namespace doesn't exist*" -match glob +} -returnCodes error -result {can't trace "foo::bar": parent namespace doesn't exist} test ttk-9.2 "Traces on nonexistant namespaces II" -body { ttk::checkbutton .tcb -variable X .tcb configure -variable foo::bar -} -returnCodes error -result "*parent namespace doesn't exist*" -match glob +} -returnCodes error -result {can't trace "foo::bar": parent namespace doesn't exist} test ttk-9.3 "Restore saved options on configure error" -body { .tcb cget -variable @@ -666,7 +669,7 @@ test ttk-ensemble-5 "style element create: valid" -body { test ttk-16.1 {ttk::style theme styles - no such theme} -body { ttk::style theme styles noSuchTheme -} -returnCodes 1 -result {theme "noSuchTheme" doesn't exist} +} -returnCodes 1 -result {theme "noSuchTheme" does not exist} test ttk-16.2 {ttk::style theme styles - theme exists} -body { # simply check this produces a list with some style names, # without checking exact content (not needed, and may vary diff --git a/tests/ttk/vsapi.test b/tests/ttk/vsapi.test index 076a815..02f6309 100644 --- a/tests/ttk/vsapi.test +++ b/tests/ttk/vsapi.test @@ -11,7 +11,7 @@ testConstraint xpnative \ test vsapi-1.1 "WINDOW WP_SMALLCLOSEBUTTON" -constraints {xpnative} -body { ttk::style element create smallclose vsapi \ - WINDOW 19 {disabled 4 pressed 3 active 2 {} 1} + WINDOW 19 {disabled 4 pressed 3 active 2 {} 1} ttk::style layout CloseButton {CloseButton.smallclose -sticky news} ttk::button .b -style CloseButton pack .b -expand true -fill both @@ -20,14 +20,14 @@ test vsapi-1.1 "WINDOW WP_SMALLCLOSEBUTTON" -constraints {xpnative} -body { test vsapi-1.2 "EXPLORERBAR EBP_HEADERPIN" -constraints {xpnative} -body { ttk::style element create pin vsapi \ - EXPLORERBAR 3 { - {pressed !selected} 3 - {active !selected} 2 - {pressed selected} 6 - {active selected} 5 - {selected} 4 - {} 1 - } + EXPLORERBAR 3 { + {pressed !selected} 3 + {active !selected} 2 + {pressed selected} 6 + {active selected} 5 + {selected} 4 + {} 1 + } ttk::style layout Explorer.Pin {Explorer.Pin.pin -sticky news} ttk::checkbutton .pin -style Explorer.Pin pack .pin -expand true -fill both @@ -36,9 +36,9 @@ test vsapi-1.2 "EXPLORERBAR EBP_HEADERPIN" -constraints {xpnative} -body { test vsapi-1.3 "EXPLORERBAR EBP_HEADERCLOSE" -constraints {xpnative} -body { ttk::style element create headerclose vsapi \ - EXPLORERBAR 2 {pressed 3 active 2 {} 1} + EXPLORERBAR 2 {pressed 3 active 2 {} 1} ttk::style layout Explorer.CloseButton { - Explorer.CloseButton.headerclose -sticky news + Explorer.CloseButton.headerclose -sticky news } ttk::button .b -style Explorer.CloseButton pack .b -expand true -fill both diff --git a/tests/unixButton.test b/tests/unixButton.test index 1b1ff04..f77ec73 100644 --- a/tests/unixButton.test +++ b/tests/unixButton.test @@ -59,16 +59,16 @@ test unixbutton-1.1 {TkpComputeButtonGeometry procedure} -constraints { 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] + [winfo reqwidth .b2] [winfo reqheight .b2] \ + [winfo reqwidth .b3] [winfo reqheight .b3] \ + [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows image delete image1 } -result [list 68 48 \ - 74 54 \ - [expr {72 + $bigIndicator}] 52 \ - [expr {72 + $bigIndicator}] 52] + 74 54 \ + [expr {72 + $bigIndicator}] 52 \ + [expr {72 + $bigIndicator}] 52] test unixbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints { unix } -setup { @@ -81,15 +81,15 @@ test unixbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints { 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] + [winfo reqwidth .b2] [winfo reqheight .b2] \ + [winfo reqwidth .b3] [winfo reqheight .b3] \ + [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result [list 23 33 \ - 29 39 \ - [expr {27 + $smallIndicator}] 37 \ - [expr {27 + $smallIndicator}] 37] + 29 39 \ + [expr {27 + $smallIndicator}] 37 \ + [expr {27 + $smallIndicator}] 37] test unixbutton-1.3 {TkpComputeButtonGeometry procedure} -constraints { unix } -setup { @@ -98,15 +98,15 @@ test unixbutton-1.3 {TkpComputeButtonGeometry procedure} -constraints { 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 + -indicatoron 0 radiobutton .b4 -bitmap question -bd 3 -highlightthickness 1 \ -indicatoron false 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] + [winfo reqwidth .b2] [winfo reqheight .b2] \ + [winfo reqwidth .b3] [winfo reqheight .b3] \ + [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {31 41 25 35 25 35 25 35} @@ -122,9 +122,9 @@ test unixbutton-1.4 {TkpComputeButtonGeometry procedure} -constraints { 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] + [winfo reqwidth .b2] [winfo reqheight .b2] \ + [winfo reqwidth .b3] [winfo reqheight .b3] \ + [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {82 29 88 35 114 31 121 29} @@ -164,9 +164,9 @@ test unixbutton-1.7 {TkpComputeButtonGeometry procedure} -constraints { 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] + [winfo reqwidth .b2] [winfo reqheight .b2] \ + [winfo reqwidth .b3] [winfo reqheight .b3] \ + [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {74 22 60 84 168 38 61 22} @@ -185,9 +185,9 @@ test unixbutton-1.8 {TkpComputeButtonGeometry procedure} -constraints { 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] + [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} @@ -233,24 +233,24 @@ test unixbutton-2.1 {disabled coloring check, bug 669595} -constraints { set on 1 set off 0 label .l -text "The following widgets should\ - \nshow significant visible diffs\ - \nfor selected vs unselected." + \nshow significant visible diffs\ + \nfor selected vs unselected." checkbutton .cb0 -anchor w -state disabled \ - -text Unselected -variable off + -text Unselected -variable off checkbutton .cb1 -anchor w -state disabled \ - -text Selected -variable on + -text Selected -variable on checkbutton .cb2 -anchor w -state disabled \ - -text Unselected -variable off -disabledforeground "" + -text Unselected -variable off -disabledforeground "" checkbutton .cb3 -anchor w -state disabled \ - -text Selected -variable on -disabledforeground "" + -text Selected -variable on -disabledforeground "" radiobutton .rb0 -anchor w -state disabled \ - -text Unselected -variable off + -text Unselected -variable off radiobutton .rb1 -anchor w -state disabled \ - -text Selected -variable on -value 1 + -text Selected -variable on -value 1 radiobutton .rb2 -anchor w -state disabled \ - -text Unselected -variable off -disabledforeground "" + -text Unselected -variable off -disabledforeground "" radiobutton .rb3 -anchor w -state disabled \ - -text Selected -variable on -value 1 -disabledforeground "" + -text Selected -variable on -value 1 -disabledforeground "" pack .l .cb0 .cb1 .cb2 .cb3 .rb0 .rb1 .rb2 .rb3 -side top -fill x after 400 set on diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test index e67278d..007c2fe 100644 --- a/tests/unixEmbed.test +++ b/tests/unixEmbed.test @@ -162,9 +162,9 @@ test unixEmbed-1.5a {Tk_UseWindow procedure, creating Container records} -constr pack .f1 .f2 child alias w winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t -use [w] - list [testembed] [expr {[lindex [lindex [testembed all] 0] 0] - [w]}] + destroy {*}[winfo children .] + toplevel .t -use [w] + list [testembed] [expr {[lindex [lindex [testembed all] 0] 0] - [w]}] } } -cleanup { interp delete child @@ -203,10 +203,10 @@ test unixEmbed-1.6a {Tk_UseWindow procedure, creating Container records} -constr child alias w1 winfo id .f1 child alias w2 winfo id .f2 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - toplevel .t2 -use [w2] - testembed + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + toplevel .t2 -use [w2] + testembed } } -cleanup { interp delete child @@ -264,14 +264,14 @@ test unixEmbed-2.1a {EmbeddedEventProc procedure} -constraints { pack .f1 child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - testembed + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + testembed } destroy .f1 update child eval { - testembed + testembed } } -cleanup { deleteWindows @@ -306,11 +306,11 @@ test unixEmbed-2.2a {EmbeddedEventProc procedure} -constraints { pack .f1 child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - testembed - destroy .t1 - testembed + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + testembed + destroy .t1 + testembed } } -cleanup { interp delete child @@ -373,9 +373,9 @@ test unixEmbed-3.1a {ContainerEventProc procedure, detect creation} -constraints child alias w1 winfo id .f1 set x [testembed] child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - wm withdraw .t1 + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + wm withdraw .t1 } list $x [testembed] } -cleanup { @@ -412,7 +412,7 @@ test unixEmbed-3.3 {ContainerEventProc procedure, disallow position changes} -co } update dobg { - wm geometry .t1 + wm geometry .t1 } } -cleanup { deleteWindows @@ -429,12 +429,12 @@ test unixEmbed-3.3a {ContainerEventProc procedure, disallow position changes} -c pack .f1 child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] -bd 2 -relief raised - update - wm geometry .t1 +30+40 - update - wm geometry .t1 + destroy {*}[winfo children .] + toplevel .t1 -use [w1] -bd 2 -relief raised + update + wm geometry .t1 +30+40 + update + wm geometry .t1 } } -cleanup { interp delete child @@ -456,7 +456,7 @@ test unixEmbed-3.4 {ContainerEventProc procedure, disallow position changes} -co } update dobg { - wm geometry .t1 + wm geometry .t1 } } -cleanup { deleteWindows @@ -473,12 +473,12 @@ test unixEmbed-3.4a {ContainerEventProc procedure, disallow position changes} -c pack .f1 child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - update - wm geometry .t1 300x100+30+40 - update - wm geometry .t1 + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + update + wm geometry .t1 300x100+30+40 + update + wm geometry .t1 } } -cleanup { interp delete child @@ -517,10 +517,10 @@ test unixEmbed-3.5a {ContainerEventProc procedure, geometry requests} -constrain pack .f1 child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - .t1 configure -width 300 -height 80 - update + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + .t1 configure -width 300 -height 80 + update } list [winfo width .f1] [winfo height .f1] [child eval {wm geometry .t1}] } -cleanup { @@ -562,14 +562,14 @@ test unixEmbed-3.6a {ContainerEventProc procedure, map requests} -constraints { pack .f1 child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - set x unmapped - bind .t1 <Map> {set x mapped} - update - after 100 - update - set x + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + set x unmapped + bind .t1 <Map> {set x mapped} + update + after 100 + update + set x } } -cleanup { interp delete child @@ -612,10 +612,10 @@ test unixEmbed-3.7a {ContainerEventProc procedure, destroy events} -constraints bind .f1 <Destroy> {set x dead} set x alive child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - update - destroy .t1 + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + update + destroy .t1 } update list $x [winfo exists .f1] @@ -659,12 +659,12 @@ test unixEmbed-4.1a {EmbedStructureProc procedure, configure events} -constraint pack .f1 child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - update - .t1 configure -width 180 -height 100 - update - winfo geometry .t1 + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + update + .t1 configure -width 180 -height 100 + update + winfo geometry .t1 } } -cleanup { interp delete child @@ -703,8 +703,8 @@ test unixEmbed-4.2a {EmbedStructureProc procedure, destroy events} -constraints update child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] + destroy {*}[winfo children .] + toplevel .t1 -use [w1] } set x [testembed] destroy .f1 @@ -750,12 +750,12 @@ test unixEmbed-5.1a {EmbedFocusProc procedure, FocusIn events} -constraints { update child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - bind .t1 <FocusIn> {lappend x "focus in %W"} - bind .t1 <FocusOut> {lappend x "focus out %W"} - update - set x {} + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + bind .t1 <FocusIn> {lappend x "focus in %W"} + bind .t1 <FocusOut> {lappend x "focus out %W"} + update + set x {} } focus -force .f1 update @@ -800,10 +800,10 @@ test unixEmbed-5.2a {EmbedFocusProc procedure, focusing on dead window} -constra update child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - update - after 200 {destroy .t1} + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + update + after 200 {destroy .t1} } after 400 focus -force .f1 @@ -850,12 +850,12 @@ test unixEmbed-5.3a {EmbedFocusProc procedure, FocusOut events} -constraints { update child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - set x {} - bind .t1 <FocusIn> {lappend x "focus in %W"} - bind .t1 <FocusOut> {lappend x "focus out %W"} - update + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + set x {} + bind .t1 <FocusIn> {lappend x "focus in %W"} + bind .t1 <FocusOut> {lappend x "focus out %W"} + update } focus -force .f1 update @@ -902,14 +902,14 @@ test unixEmbed-6.1a {EmbedGeometryRequest procedure, window changes size} -const pack .f1 child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - update - bind .t1 <Configure> {set x {configure .t1 %w %h}} - set x {} - .t1 configure -width 300 -height 120 - update - list $x [winfo geom .t1] + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + update + bind .t1 <Configure> {set x {configure .t1 %w %h}} + set x {} + .t1 configure -width 300 -height 120 + update + list $x [winfo geom .t1] } } -cleanup { interp delete child @@ -949,14 +949,14 @@ test unixEmbed-6.2a {EmbedGeometryRequest procedure, window changes size} -const update child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] - update - bind .t1 <Configure> {set x {configure .t1 %w %h}} + destroy {*}[winfo children .] + toplevel .t1 -use [w1] + update + bind .t1 <Configure> {set x {configure .t1 %w %h}} set x {} - .t1 configure -width 300 -height 120 - update - list $x [winfo geom .t1] + .t1 configure -width 300 -height 120 + update + list $x [winfo geom .t1] } } -cleanup { interp delete child @@ -1009,18 +1009,18 @@ test unixEmbed-7.1a {TkpRedirectKeyEvent procedure, forward keystroke} -constrai pack .f1 child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] + destroy {*}[winfo children .] + toplevel .t1 -use [w1] } focus -force . bind . <Key> {lappend x {key %A %E}} set x {} set y [child eval { - update - bind .t1 <Key> {lappend y {key %A}} - set y {} - event generate .t1 <Key> -keysym a - set y + update + bind .t1 <Key> {lappend y {key %A}} + set y {} + event generate .t1 <Key> -keysym a + set y }] update list $x $y @@ -1071,8 +1071,8 @@ test unixEmbed-7.2a {TkpRedirectKeyEvent procedure, don't forward keystroke widt pack .f1 child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] + destroy {*}[winfo children .] + toplevel .t1 -use [w1] } update focus -force .f1 @@ -1080,11 +1080,11 @@ test unixEmbed-7.2a {TkpRedirectKeyEvent procedure, don't forward keystroke widt bind . <Key> {lappend x {key %A}} set x {} set y [child eval { - update - bind .t1 <Key> {lappend y {key %A}} - set y {} - event generate .t1 <Key> -keysym b - set y + update + bind .t1 <Key> {lappend y {key %A}} + set y {} + event generate .t1 <Key> -keysym b + set y }] update list $x $y @@ -1132,17 +1132,17 @@ test unixEmbed-8.1a {TkpClaimFocus procedure} -constraints unix -setup { update child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] -highlightthickness 2 -bd 2 -relief sunken + destroy {*}[winfo children .] + toplevel .t1 -use [w1] -highlightthickness 2 -bd 2 -relief sunken } # This should clear focus from the application embedded in .f1 focus -force .f2 update list [child eval { - set x [list [focus]] - focus .t1 + set x [list [focus]] + focus .t1 update - lappend x [focus] + lappend x [focus] }] [focus] } -cleanup { interp delete child @@ -1228,12 +1228,12 @@ test unixEmbed-9.2a {EmbedWindowDeleted procedure, check embeddedPtr} -constrain pack .f1 child alias w1 winfo id .f1 child eval { - destroy {*}[winfo children .] - toplevel .t1 -use [w1] -highlightthickness 2 -bd 2 -relief sunken - set x {} - lappend x [testembed] - destroy .t1 - lappend x [testembed] + destroy {*}[winfo children .] + toplevel .t1 -use [w1] -highlightthickness 2 -bd 2 -relief sunken + set x {} + lappend x [testembed] + destroy .t1 + lappend x [testembed] } } -cleanup { interp delete child diff --git a/tests/unixFont.test b/tests/unixFont.test index efc2fe9..08757cd 100644 --- a/tests/unixFont.test +++ b/tests/unixFont.test @@ -71,7 +71,7 @@ proc getsize {} { test unixfont-1.1 {TkpGetNativeFont procedure: not native} {x11 noExceed} { list [catch {font measure {} xyz} msg] $msg -} {1 {font "" doesn't exist}} +} {1 {font "" does not exist}} test unixfont-1.2 {TkpGetNativeFont procedure: native} {x11 failsOnUbuntu} { font measure fixed 0 } 6 @@ -88,14 +88,14 @@ test unixfont-2.2 {TkpGetFontFromAttributes procedure: Times relatives} \ lappend x [lindex [font actual {-family "Times"}] 1] } {times times times} test unixfont-2.3 {TkpGetFontFromAttributes procedure: Courier relatives} \ - {x11 noExceed hasCourierNew failsOnUbuntu} { + {x11 noExceed hasCourierNew failsOnUbuntu failsOnXQuarz} { set x {} lappend x [lindex [font actual {-family "Courier New"}] 1] lappend x [lindex [font actual {-family "Monaco"}] 1] lappend x [lindex [font actual {-family "Courier"}] 1] } {courier courier courier} test unixfont-2.4 {TkpGetFontFromAttributes procedure: Helvetica relatives} \ - {x11 noExceed hasArial failsOnUbuntu} { + {x11 noExceed hasArial failsOnUbuntu failsOnXQuarz} { set x {} lappend x [lindex [font actual {-family "Arial"}] 1] lappend x [lindex [font actual {-family "Geneva"}] 1] diff --git a/tests/unixSelect.test b/tests/unixSelect.test index cb1908b..9fb40c9 100644 --- a/tests/unixSelect.test +++ b/tests/unixSelect.test @@ -14,6 +14,8 @@ namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands +testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }] + global longValue selValue selInfo set selValue {} @@ -33,11 +35,11 @@ proc errIncrHandler {type offset count} { global selValue selInfo pass if {$offset == 4000} { if {$pass == 0} { - # Just sizing the selection; don't do anything here. - set pass 1 + # Just sizing the selection; don't do anything here. + set pass 1 } else { - # Fetching the selection; wait long enough to cause a timeout. - after 6000 + # Fetching the selection; wait long enough to cause a timeout. + after 6000 } } lappend selInfo $type $offset $count @@ -66,9 +68,9 @@ proc reallyBadHandler {path type offset count} { global selValue selInfo pass if {$offset == 4000} { if {$pass == 0} { - set pass 1 + set pass 1 } else { - selection handle -type $type $path {} + selection handle -type $type $path {} } } lappend selInfo $path $type $offset $count @@ -124,15 +126,15 @@ test unixSelect-1.1 {TkSelGetSelection procedure: simple i18n text} -constraints } -result 4 test unixSelect-1.2 {TkSelGetSelection procedure: simple i18n text, iso8859-1} -constraints { - x11 + x11 failsOnXQuarz } -setup { setupbg } -body { dobg { - pack [entry .e] - update - .e insert 0 üф - .e selection range 0 end + pack [entry .e] + update + .e insert 0 üф + .e selection range 0 end } selection get } -cleanup { @@ -146,13 +148,13 @@ test unixSelect-1.3 {TkSelGetSelection procedure: simple i18n text, iso2022} -co setup } -body { selection handle -type COMPOUND_TEXT -format COMPOUND_TEXT . \ - {handler COMPOUND_TEXT} + {handler COMPOUND_TEXT} selection own . set selValue üф set selInfo {} set result [dobg { - set x [selection get -type COMPOUND_TEXT] - list [string equal üф $x] [string length $x] + set x [selection get -type COMPOUND_TEXT] + list [string equal üф $x] [string length $x] }] lappend result $selInfo } -cleanup { @@ -170,15 +172,15 @@ test unixSelect-1.4 {TkSelGetSelection procedure: INCR i18n text, iso2022} -cons # The first time through, we don't convert the data to ISO2022, so the # buffer boundaries end up being different in the two passes. selection handle -type COMPOUND_TEXT -format COMPOUND_TEXT . \ - {handler COMPOUND_TEXT} + {handler COMPOUND_TEXT} selection own . set selValue [string repeat x 3999]üф[string repeat x 3999] set selInfo {} set result [dobg { - set x [selection get -type COMPOUND_TEXT] - list [string equal \ - [string repeat x 3999]üф[string repeat x 3999] $x] \ - [string length $x] + set x [selection get -type COMPOUND_TEXT] + list [string equal \ + [string repeat x 3999]üф[string repeat x 3999] $x] \ + [string length $x] }] lappend result $selInfo } -cleanup { @@ -192,13 +194,13 @@ test unixSelect-1.5 {TkSelGetSelection procedure: simple i18n text, iso2022} -co setup } -body { selection handle -type COMPOUND_TEXT -format COMPOUND_TEXT . \ - {handler COMPOUND_TEXT} + {handler COMPOUND_TEXT} selection own . set selValue üф set selInfo {} set result [dobg { - set x [selection get -type COMPOUND_TEXT] - list [string equal üф $x] [string length $x] + set x [selection get -type COMPOUND_TEXT] + list [string equal üф $x] [string length $x] }] lappend result $selInfo } -cleanup { @@ -224,10 +226,10 @@ test unixSelect-1.7 {TkSelGetSelection procedure: INCR i18n text} -constraints { setupbg } -body { dobg { - pack [entry .e] - update - .e insert 0 [string repeat x 3999]ü - .e selection range 0 end + pack [entry .e] + update + .e insert 0 [string repeat x 3999]ü + .e selection range 0 end } selection get } -cleanup { @@ -240,10 +242,10 @@ test unixSelect-1.8 {TkSelGetSelection procedure: INCR i18n text} -constraints { setupbg } -body { dobg { - pack [entry .e] - update - .e insert 0 ü[string repeat x 3999] - .e selection range 0 end + pack [entry .e] + update + .e insert 0 ü[string repeat x 3999] + .e selection range 0 end } selection get } -cleanup { @@ -256,10 +258,10 @@ test unixSelect-1.9 {TkSelGetSelection procedure: INCR i18n text} -constraints { setupbg } -body { dobg { - pack [entry .e] - update - .e insert 0 [string repeat x 3999]ü[string repeat x 4000] - .e selection range 0 end + pack [entry .e] + update + .e insert 0 [string repeat x 3999]ü[string repeat x 4000] + .e selection range 0 end } selection get } -cleanup { @@ -275,10 +277,10 @@ test unixSelect-1.10 {TkSelGetSelection procedure: INCR i18n text, utf-8} -const setupbg } -body { dobg { - pack [entry .e] - update - .e insert 0 [string repeat x 3999]ü - .e selection range 0 end + pack [entry .e] + update + .e insert 0 [string repeat x 3999]ü + .e selection range 0 end } selection get -type UTF8_STRING } -cleanup { @@ -291,10 +293,10 @@ test unixSelect-1.11 {TkSelGetSelection procedure: INCR i18n text, utf-8} -const setupbg } -body { dobg { - pack [entry .e] - update - .e insert 0 ü[string repeat x 3999] - .e selection range 0 end + pack [entry .e] + update + .e insert 0 ü[string repeat x 3999] + .e selection range 0 end } selection get -type UTF8_STRING } -cleanup { @@ -307,10 +309,10 @@ test unixSelect-1.12 {TkSelGetSelection procedure: INCR i18n text, utf-8} -const setupbg } -body { dobg { - pack [entry .e] - update - .e insert 0 [string repeat x 3999]ü[string repeat x 4000] - .e selection range 0 end + pack [entry .e] + update + .e insert 0 [string repeat x 3999]ü[string repeat x 4000] + .e selection range 0 end } selection get -type UTF8_STRING } -cleanup { @@ -318,7 +320,7 @@ test unixSelect-1.12 {TkSelGetSelection procedure: INCR i18n text, utf-8} -const } -result [string repeat x 3999]ü[string repeat x 4000] test unixSelect-1.13 {TkSelGetSelection procedure: simple i18n text, utf-8} -constraints { - x11 + x11 failsOnXQuarz } -setup { destroy .e setupbg @@ -334,15 +336,15 @@ test unixSelect-1.13 {TkSelGetSelection procedure: simple i18n text, utf-8} -con } -result 5 test unixSelect-1.14 {TkSelGetSelection procedure: simple i18n text, utf-8} -constraints { - x11 + x11 failsOnXQuarz } -setup { setupbg } -body { dobg { - pack [entry .e] - update - .e insert 0 üф - .e selection range 0 end + pack [entry .e] + update + .e insert 0 üф + .e selection range 0 end } selection get -type UTF8_STRING } -cleanup { @@ -355,10 +357,10 @@ test unixSelect-1.15 {TkSelGetSelection procedure: INCR i18n text, utf-8} -const setupbg } -body { dobg { - pack [entry .e] - update - .e insert 0 [string repeat [string repeat Ää 50]\n 21] - .e selection range 0 end + pack [entry .e] + update + .e insert 0 [string repeat [string repeat Ää 50]\n 21] + .e selection range 0 end } selection get -type UTF8_STRING } -cleanup { @@ -371,10 +373,10 @@ test unixSelect-1.16 {TkSelGetSelection procedure: INCR i18n text, utf-8} -const setupbg } -body { dobg { - pack [entry .e] - update - .e insert 0 i[string repeat [string repeat Ää 50]\n 21] - .e selection range 0 end + pack [entry .e] + update + .e insert 0 i[string repeat [string repeat Ää 50]\n 21] + .e selection range 0 end } selection get -type UTF8_STRING } -cleanup { @@ -387,11 +389,11 @@ test unixSelect-1.17 {TkSelGetSelection procedure: INCR i18n text, utf-8} -const setupbg } -body { dobg { - pack [text .t] - update - .t insert 1.0 [string repeat [string repeat Ää 50]\n 21] - # Has to be selected in a separate stage - .t tag add sel 1.0 21.end+1c + pack [text .t] + update + .t insert 1.0 [string repeat [string repeat Ää 50]\n 21] + # Has to be selected in a separate stage + .t tag add sel 1.0 21.end+1c } after 10 selection get -type UTF8_STRING @@ -405,11 +407,11 @@ test unixSelect-1.18 {TkSelGetSelection procedure: INCR i18n text, utf-8} -const setupbg } -body { dobg { - pack [text .t] - update - .t insert 1.0 i[string repeat [string repeat Ää 50]\n 21] - # Has to be selected in a separate stage - .t tag add sel 1.0 21.end+1c + pack [text .t] + update + .t insert 1.0 i[string repeat [string repeat Ää 50]\n 21] + # Has to be selected in a separate stage + .t tag add sel 1.0 21.end+1c } after 10 selection get -type UTF8_STRING diff --git a/tests/unixWm.test b/tests/unixWm.test index 2ad40e2..14d6359 100644 --- a/tests/unixWm.test +++ b/tests/unixWm.test @@ -16,18 +16,6 @@ namespace import -force ::tk::test:loadTkCommand testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }] -# Starting with macOS Ventura it became necessary to wait for windows to be restacked -# or to be raised after creation. - -if {[tk windowingsystem] eq "aqua"} { - proc restackDelay {} { - after 200; - update idletasks - } -} else { - proc restackDelay {} {} -} - proc sleep ms { global x after $ms {set x 1} @@ -105,6 +93,7 @@ foreach geom "+20+80 +80+$Y0 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" { set i 1 foreach geom "+20+80 +80+$Y0 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" { test unixWm-3.$i {moving window while iconified} unix { + update wm iconify .t update idletasks wm geom .t $geom @@ -1023,7 +1012,7 @@ wm geom .t +0+0 update test unixWm-28.1 {Tk_WmCmd procedure, "maxsize" option, setting the - maxsize should update WM_NORMAL_HINTS} {testwrapper} { + maxsize should update WM_NORMAL_HINTS} {testwrapper} { destroy .t toplevel .t wm maxsize .t 300 300 @@ -1033,8 +1022,8 @@ test unixWm-28.1 {Tk_WmCmd procedure, "maxsize" option, setting the } {300 300} test unixWm-28.2 {Tk_WmCmd procedure, "maxsize" option, setting the - maxsize to a value smaller than the current size should - set the maxsize in WM_NORMAL_HINTS} {testwrapper} { + maxsize to a value smaller than the current size should + set the maxsize in WM_NORMAL_HINTS} {testwrapper} { destroy .t toplevel .t wm geom .t 400x400 @@ -1045,9 +1034,9 @@ test unixWm-28.2 {Tk_WmCmd procedure, "maxsize" option, setting the } {300 300} test unixWm-28.3 {Tk_WmCmd procedure, "maxsize" option, setting the - maxsize to a value smaller than the current size should - set the maxsize in WM_NORMAL_HINTS even if the - interactive resizable flag is set to 0} {testwrapper} { + maxsize to a value smaller than the current size should + set the maxsize in WM_NORMAL_HINTS even if the + interactive resizable flag is set to 0} {testwrapper} { destroy .t toplevel .t wm geom .t 400x400 @@ -1059,7 +1048,7 @@ test unixWm-28.3 {Tk_WmCmd procedure, "maxsize" option, setting the } {300 300} test unixWm-29.1 {Tk_WmCmd procedure, "minsize" option, setting the - minsize should update WM_NORMAL_HINTS} {testwrapper} { + minsize should update WM_NORMAL_HINTS} {testwrapper} { destroy .t toplevel .t wm minsize .t 300 300 @@ -1069,8 +1058,8 @@ test unixWm-29.1 {Tk_WmCmd procedure, "minsize" option, setting the } {300 300} test unixWm-29.2 {Tk_WmCmd procedure, "minsize" option, setting the - minsize to a value larger than the current size should - set the maxsize in WM_NORMAL_HINTS} {testwrapper} { + minsize to a value larger than the current size should + set the maxsize in WM_NORMAL_HINTS} {testwrapper} { destroy .t toplevel .t wm geom .t 200x200 @@ -1081,9 +1070,9 @@ test unixWm-29.2 {Tk_WmCmd procedure, "minsize" option, setting the } {300 300} test unixWm-29.3 {Tk_WmCmd procedure, "minsize" option, setting the - minsize to a value larger than the current size should - set the minsize in WM_NORMAL_HINTS even if the - interactive resizable flag is set to 0} {testwrapper} { + minsize to a value larger than the current size should + set the minsize in WM_NORMAL_HINTS even if the + interactive resizable flag is set to 0} {testwrapper} { destroy .t toplevel .t wm geom .t 200x200 @@ -1373,7 +1362,9 @@ test unixWm-40.1 {Tk_SetGrid procedure, set grid dimensions before turning on gr wm geometry .t } {30x10+0+0} test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already set} unix { + update destroy .t + update toplevel .t wm geometry .t 200x100+100+$Y0 listbox .t.l -height 20 -width 20 @@ -1798,6 +1789,8 @@ test unixWm-49.2 {Tk_GetRootCoords procedure, menubars} {unix testmenubar} { } {52 7 12 62} deleteWindows +# Make sure that the root window is out of the way! +wm geom . +700+700 wm withdraw . if {[tk windowingsystem] eq "aqua"} { # Modern mac windows have no border. @@ -1834,14 +1827,12 @@ test unixWm-50.2 {Tk_CoordsToWindow procedure, finding a toplevel, y-coords and tkwait visibility .t wm geom .t +100+100 update - restackDelay toplevel .t2 -width 200 -height 100 -bg blue wm overrideredirect .t2 1 tkwait visibility .t2 wm geom .t2 +200+200 update raise .t2 - restackDelay set x [winfo rootx .t] set y [winfo rooty .t] set y2 [winfo rooty .t2] @@ -1855,11 +1846,10 @@ test unixWm-50.2 {Tk_CoordsToWindow procedure, finding a toplevel, y-coords and [winfo containing [expr $x +200] [expr $y + 450]] } {{} {} .t .t .t2 .t2 .t {}} test unixWm-50.3 { - Tk_CoordsToWindow procedure, finding a toplevel with embedding + Tk_CoordsToWindow procedure, finding a toplevel with embedding } tempNotWin { deleteWindows catch {interp delete child} - toplevel .t -width 300 -height 400 -bg blue wm geom .t +100+100 frame .t.f -container 1 -bg red @@ -1871,11 +1861,11 @@ test unixWm-50.3 { child alias frameid winfo id .t.f child eval { wm withdraw . - toplevel .x -width 100 -height 80 -use [frameid] -bg yellow - tkwait visibility .x - update - set x [winfo rootx .x] - set y [winfo rooty .x] + toplevel .x -width 100 -height 80 -use [frameid] -bg yellow + tkwait visibility .x + update + set x [winfo rootx .x] + set y [winfo rooty .x] } set result [list [child eval {winfo containing [expr $x - 1] [expr $y + 50]}] \ [child eval {winfo containing $x [expr $y + 50]}]] @@ -1888,7 +1878,6 @@ test unixWm-50.3 { } {{} .x .t .t.f} test unixWm-50.4 {Tk_CoordsToWindow procedure, window in other application} unix { destroy .t - catch {interp delete child} toplevel .t -width 200 -height 200 -bg green tkwait visibility .t @@ -1897,9 +1886,8 @@ test unixWm-50.4 {Tk_CoordsToWindow procedure, window in other application} unix interp create child load {} Tk child child eval {wm geometry . 200x200+100+100; update} - restackDelay set result [list [winfo containing 200 200] \ - [child eval {winfo containing 200 200}]] + [child eval {winfo containing 200 200}]] interp delete child set result } {{} .} @@ -1979,21 +1967,22 @@ test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} unix { test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} {unix failsOnUbuntu failsOnXQuarz} { destroy .t destroy .t2 + update toplevel .t -width 200 -height 200 -bg green tkwait visibility .t - update - wm geometry .t +0+0 + wm geometry .t +20+20 + after 200 update toplevel .t2 -width 200 -height 200 -bg red tkwait visibility .t2 + wm geometry .t2 +20+20 + after 200 update - wm geometry .t2 +0+0 - update - restackDelay - set result [list [winfo containing 100 100]] - wm iconify .t2 + set result [list [winfo containing 120 120]] + destroy .t2 + after 200 update - lappend result [winfo containing 100 100] + lappend result [winfo containing 120 120] } {.t2 .t} test unixWm-50.10 {Tk_CoordsToWindow procedure, unmapped windows} unix { destroy .t @@ -2071,7 +2060,6 @@ test unixWm-51.6 {TkWmRestackToplevel procedure, window to be stacked isn't mapp tkwait visibility .t wm geometry .t +0+0 update - restackDelay destroy .t2 toplevel .t2 -width 200 -height 200 -bg red # This test assumes that .t2 is not mapped yet, but that is not really guaranteed. @@ -2083,15 +2071,15 @@ test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} {uni toplevel $w -width 200 -height 200 -bg green tkwait visibility $w wm geometry $w +100+100 + after 200 update } + update raise .t .t2 - restackDelay update set result [list [winfo containing 200 200]] lower .t3 - restackDelay - sleep 10 + update lappend result [winfo containing 200 200] } {.t3 .t} test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} unix { @@ -2105,7 +2093,6 @@ test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} unix wm overrideredirect .t2 1 wm geometry .t2 +0+0 tkwait visibility .t2 - restackDelay # Need to use vrootx and vrooty to make tests work correctly with # virtual root window measures managers: overrideredirect windows @@ -2116,15 +2103,14 @@ test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} unix set y [expr 100-[winfo vrooty .]] set result [list [winfo containing $x $y]] raise .t - restackDelay lappend result [winfo containing $x $y] raise .t2 - restackDelay lappend result [winfo containing $x $y] } {.t2 .t .t2} # The mac won't put an overrideredirect window above the root, if {[tk windowingsystem] eq "aqua"} { wm withdraw . + update } test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect} unix { foreach w {.t .t2 .t3} { @@ -2132,12 +2118,11 @@ test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect} update toplevel $w -width 200 -height 200 -bg green wm overrideredirect $w 1 - wm geometry $w +0+0 tkwait visibility $w + wm geometry $w +0+0 update } lower .t3 .t2 - restackDelay update # Need to use vrootx and vrooty to make tests work correctly with @@ -2149,11 +2134,12 @@ test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect} set y [expr 100-[winfo vrooty .]] set result [list [winfo containing $x $y]] lower .t2 - restackDelay + update lappend result [winfo containing $x $y] } {.t2 .t3} if {[tk windowingsystem] eq "aqua"} { wm deiconify . + update } test unixWm-51.10 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix { makeToplevels diff --git a/tests/visual.test b/tests/visual.test index da6c41a..c4e26d2 100644 --- a/tests/visual.test +++ b/tests/visual.test @@ -28,12 +28,12 @@ proc eatColors {w} { canvas $w.c -width 400 -height 200 -bd 0 pack $w.c for {set y 0} {$y < 8} {incr y} { - for {set x 0} {$x < 40} {incr x} { - set color [format #%02x%02x%02x [expr {$x*6}] [expr {$y*30}] 0] - $w.c create rectangle [expr {10*$x}] [expr {20*$y}] \ - [expr {10*$x + 10}] [expr {20*$y + 20}] -outline {} \ - -fill $color - } + for {set x 0} {$x < 40} {incr x} { + set color [format #%02x%02x%02x [expr {$x*6}] [expr {$y*30}] 0] + $w.c create rectangle [expr {10*$x}] [expr {20*$y}] \ + [expr {10*$x + 10}] [expr {20*$y + 20}] -outline {} \ + -fill $color + } } update } @@ -51,7 +51,7 @@ proc eatColors {w} { 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)} + && ([lindex $vals 2]/256 == $blue)} } # If more than one visual type is available for the screen, pick one @@ -62,10 +62,10 @@ set avail [winfo visualsavailable .] set other {} if {[llength $avail] > 1} { foreach visual $avail { - if {$visual != $default} { - set other $visual - break - } + if {$visual != $default} { + set other $visual + break + } } } testConstraint haveOtherVisual [expr {$other ne ""}] @@ -341,7 +341,7 @@ test visual-3.1 {Tk_GetVisual, parsing visual string} -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 \ - -visual "[winfo visual .][winfo depth .]" + -visual "[winfo visual .][winfo depth .]" wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" @@ -529,8 +529,8 @@ test visual-8.1 {Tk_FreeColormap procedure} -setup { toplevel .t1 -width 300 -height 180 -colormap new wm geometry .t1 +0+0 foreach i {.t2 .t3 .t4} { - toplevel $i -width 250 -height 150 -colormap .t1 - wm geometry $i +0+0 + toplevel $i -width 250 -height 150 -colormap .t1 + wm geometry $i +0+0 } destroy .t1 destroy .t3 @@ -545,8 +545,8 @@ test visual-8.2 {Tk_FreeColormap procedure} -constraints haveOtherVisual -setup toplevel .t1 -width 300 -height 180 -visual $other wm geometry .t1 +0+0 foreach i {.t2 .t3 .t4} { - toplevel $i -width 250 -height 150 -visual $other - wm geometry $i +0+0 + toplevel $i -width 250 -height 150 -visual $other + wm geometry $i +0+0 } destroy .t2 destroy .t3 diff --git a/tests/visual_bb.test b/tests/visual_bb.test index c2bed6f..e118838 100644 --- a/tests/visual_bb.test +++ b/tests/visual_bb.test @@ -51,7 +51,7 @@ test 1.1 {running visual tests} -constraints userInteraction -body { 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." + -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 @@ -69,26 +69,26 @@ test 1.1 {running visual tests} -constraints userInteraction -body { 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} + -command {runTest bevel.tcl} .menu.group1.m add command -label "Colormap management" \ - -command {runTest cmap.tcl} + -command {runTest cmap.tcl} .menu.group1.m add command -label "Label/button geometry" \ - -command {runTest butGeom.tcl} + -command {runTest butGeom.tcl} .menu.group1.m add command -label "Label/button colors" \ - -command {runTest butGeom2.tcl} + -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} + -command {runTest canvPsGrph.tcl} .menu.ps.m add command -label "Text" \ - -command {runTest canvPsText.tcl} + -command {runTest canvPsText.tcl} .menu.ps.m add command -label "Bitmaps" \ - -command {runTest canvPsBmap.tcl} + -command {runTest canvPsBmap.tcl} .menu.ps.m add command -label "Images" \ - -command {runTest canvPsImg.tcl} + -command {runTest canvPsImg.tcl} .menu.ps.m add command -label "Arcs" \ - -command {runTest canvPsArc.tcl} + -command {runTest canvPsArc.tcl} pack .menu.file .menu.group1 .menu.ps -side left -padx 1m @@ -96,7 +96,7 @@ test 1.1 {running visual tests} -constraints userInteraction -body { bind . <FocusIn> { if {("%d" == "NotifyVirtual") && ("%m" == "NotifyNormal")} { - focus .menu + focus .menu } } tk_menuBar .menu .menu.file .menu.group1 .menu.ps diff --git a/tests/winButton.test b/tests/winButton.test index a19f4e7..e2107ba 100644 --- a/tests/winButton.test +++ b/tests/winButton.test @@ -33,17 +33,17 @@ test winbutton-1.1 {TkpComputeButtonGeometry procedure} -constraints { label .b1 -image image1 -bd 4 -padx 0 -pady 2 button .b2 -image image1 -bd 4 -padx 0 -pady 2 checkbutton .b3 -image image1 -bd 4 -padx 1 -pady 1 \ - -font {{MS Sans Serif} 8} + -font {{MS Sans Serif} 8} radiobutton .b4 -image image1 -bd 4 -padx 2 -pady 0 \ - -font {{MS Sans Serif} 8} + -font {{MS Sans Serif} 8} pack .b1 .b2 .b3 .b4 update # with patch 463234 with native L&F enabled, this returns: # {68 48 70 50 88 50 88 50} 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] + [winfo reqwidth .b2] [winfo reqheight .b2] \ + [winfo reqwidth .b3] [winfo reqheight .b3] \ + [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows image delete image1 @@ -59,17 +59,17 @@ test winbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints { 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 \ - -font {{MS Sans Serif} 8} + -font {{MS Sans Serif} 8} radiobutton .b4 -bitmap question -bd 3 -padx 2 -pady 0 \ - -font {{MS Sans Serif} 8} + -font {{MS Sans Serif} 8} pack .b1 .b2 .b3 .b4 update # with patch 463234 with native L&F enabled, this returns: # {23 33 25 35 43 35 43 35} 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] + [winfo reqwidth .b2] [winfo reqheight .b2] \ + [winfo reqwidth .b3] [winfo reqheight .b3] \ + [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {23 33 25 35 45 37 45 37} @@ -80,16 +80,16 @@ test winbutton-1.3 {TkpComputeButtonGeometry procedure} -constraints win -setup 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 + -indicatoron 0 radiobutton .b4 -bitmap question -bd 3 -indicatoron false pack .b1 .b2 .b3 .b4 update # with patch 463234 with native L&F enabled, this returns: # {31 41 23 33 25 35 25 35} 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] + [winfo reqwidth .b2] [winfo reqheight .b2] \ + [winfo reqwidth .b3] [winfo reqheight .b3] \ + [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {31 41 23 33 27 37 27 37} @@ -106,9 +106,9 @@ test winbutton-1.4 {TkpComputeButtonGeometry procedure} -constraints { 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] + [winfo reqwidth .b2] [winfo reqheight .b2] \ + [winfo reqwidth .b3] [winfo reqheight .b3] \ + [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {58 24 67 33 88 30 90 28} @@ -119,7 +119,7 @@ test winbutton-1.5 {TkpComputeButtonGeometry procedure} -constraints { deleteWindows } -body { label .l1 -wraplength 1.5i -padx 0 -pady 0 \ - -text "This is a long string that will wrap around on several lines.\n\nIt also has a blank line (above)." + -text "This is a long string that will wrap around on several lines.\n\nIt also has a blank line (above)." pack .l1 update list [winfo reqwidth .l1] [winfo reqheight .l1] @@ -133,7 +133,7 @@ test winbutton-1.6 {TkpComputeButtonGeometry procedure} -constraints { deleteWindows } -body { label .l1 -padx 0 -pady 0 \ - -text "This is a long string without wrapping.\n\nIt also has a blank line (above)." + -text "This is a long string without wrapping.\n\nIt also has a blank line (above)." pack .l1 update list [winfo reqwidth .l1] [winfo reqheight .l1] @@ -153,9 +153,9 @@ test winbutton-1.7 {TkpComputeButtonGeometry procedure} -constraints { 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] + [winfo reqwidth .b2] [winfo reqheight .b2] \ + [winfo reqwidth .b3] [winfo reqheight .b3] \ + [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {74 24 67 97 174 46 64 28} @@ -175,9 +175,9 @@ test winbutton-1.8 {TkpComputeButtonGeometry procedure} -constraints { 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] + [winfo reqwidth .b2] [winfo reqheight .b2] \ + [winfo reqwidth .b3] [winfo reqheight .b3] \ + [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {66 32 65 31 69 31 71 29} diff --git a/tests/winClipboard.test b/tests/winClipboard.test index 28e508b..cb286f0 100644 --- a/tests/winClipboard.test +++ b/tests/winClipboard.test @@ -59,7 +59,7 @@ test winClipboard-1.4 {TkSelGetSelection & TkWinClipboardRender} -constraints { set map [list "\r" "\\r" "\n" "\\n"] clipboard append "line 1\nline 2" list [string map $map [selection get -selection CLIPBOARD]]\ - [string map $map [testclipboard]] + [string map $map [testclipboard]] } -cleanup { clipboard clear } -result [list "line 1\\nline 2" "line 1\\nline 2"] @@ -72,7 +72,7 @@ test winClipboard-1.5 {TkSelGetSelection & TkWinClipboardRender} -constraints { set map [list "\r" "\\r" "\n" "\\n"] clipboard append "line 1Ç\nline 2" list [string map $map [selection get -selection CLIPBOARD]]\ - [string map $map [testclipboard]] + [string map $map [testclipboard]] } -cleanup { clipboard clear } -result [list "line 1Ç\\nline 2" "line 1Ç\\nline 2"] diff --git a/tests/winDialog.test b/tests/winDialog.test index 5fddf19..53a24ef 100755 --- a/tests/winDialog.test +++ b/tests/winDialog.test @@ -65,31 +65,31 @@ proc afterbody {} { # On Vista and later, using the new file dialogs we have to find # the window using its title as tk_dialog will not be set at the C level if {[vista?]} { - if {[catch {testfindwindow "" $::dialogclass} ::tk_dialog]} { - if {[incr ::iter_after] > 30} { - set ::dialogresult ">30 iterations waiting on tk_dialog" - return - } - after 150 {afterbody} - return - } + if {[catch {testfindwindow "" $::dialogclass} ::tk_dialog]} { + if {[incr ::iter_after] > 30} { + set ::dialogresult ">30 iterations waiting on tk_dialog" + return + } + after 150 {afterbody} + return + } } else { - if {$::tk_dialog == 0} { - if {[incr ::iter_after] > 30} { - set ::dialogresult ">30 iterations waiting on tk_dialog" - return - } - after 150 {afterbody} - return - } + if {$::tk_dialog == 0} { + if {[incr ::iter_after] > 30} { + set ::dialogresult ">30 iterations waiting on tk_dialog" + return + } + after 150 {afterbody} + return + } } uplevel #0 {set dialogresult [eval $command]} } proc Click {button} { switch -exact -- $button { - ok { set button 1 } - cancel { set button 2 } + ok { set button 1 } + cancel { set button 2 } } testwinevent $::tk_dialog $button WM_LBUTTONDOWN 1 0x000a000b testwinevent $::tk_dialog $button WM_LBUTTONUP 0 0x000a000b @@ -97,8 +97,8 @@ proc Click {button} { proc GetText {id} { switch -exact -- $id { - ok { set id 1 } - cancel { set id 2 } + ok { set id 1 } + cancel { set id 2 } } return [testwinevent $::tk_dialog $id WM_GETTEXT] } @@ -118,7 +118,7 @@ test winDialog-1.1 {Tk_ChooseColorObjCmd} -constraints { } -body { start {tk_chooseColor} then { - Click cancel + Click cancel } } -result 0 test winDialog-1.2 {Tk_ChooseColorObjCmd} -constraints { @@ -126,7 +126,7 @@ test winDialog-1.2 {Tk_ChooseColorObjCmd} -constraints { } -body { start {set clr [tk_chooseColor -initialcolor "#ff9933"]} then { - set x [Click cancel] + set x [Click cancel] } list $x $clr } -result {0 {}} @@ -135,7 +135,7 @@ test winDialog-1.3 {Tk_ChooseColorObjCmd} -constraints { } -body { start {set clr [tk_chooseColor -initialcolor "#ff9933"]} then { - set x [Click ok] + set x [Click ok] } list $x $clr } -result [list 0 "#ff9933"] @@ -147,11 +147,11 @@ test winDialog-1.4 {Tk_ChooseColorObjCmd: -title} -constraints { set x {} start {set clr [tk_chooseColor -initialcolor "#ff9933" -title "Hello"]} then { - if {[catch { - array set a [testgetwindowinfo $::tk_dialog] - if {[info exists a(text)]} {lappend x $a(text)} - } err]} { lappend x $err } - lappend x [Click ok] + if {[catch { + array set a [testgetwindowinfo $::tk_dialog] + if {[info exists a(text)]} {lappend x $a(text)} + } err]} { lappend x $err } + lappend x [Click ok] } lappend x $clr } -result [list Hello 0 "#ff9933"] @@ -162,15 +162,15 @@ test winDialog-1.5 {Tk_ChooseColorObjCmd: -title} -constraints { } -body { set x {} start { - set clr [tk_chooseColor -initialcolor "#ff9933" \ - -title "Привет"] + set clr [tk_chooseColor -initialcolor "#ff9933" \ + -title "Привет"] } then { - if {[catch { - array set a [testgetwindowinfo $::tk_dialog] - if {[info exists a(text)]} {lappend x $a(text)} - } err]} { lappend x $err } - lappend x [Click ok] + if {[catch { + array set a [testgetwindowinfo $::tk_dialog] + if {[info exists a(text)]} {lappend x $a(text)} + } err]} { lappend x $err } + lappend x [Click ok] } lappend x $clr } -result [list "Привет" 0 "#ff9933"] @@ -182,13 +182,13 @@ test winDialog-1.6 {Tk_ChooseColorObjCmd: -parent} -constraints { start {set clr [tk_chooseColor -initialcolor "#ff9933" -parent .]} set x {} then { - if {[catch { - array set a [testgetwindowinfo $::tk_dialog] - if {[info exists a(parent)]} { - append x [expr {$a(parent) == [wm frame .]}] - } - } err]} {lappend x $err} - Click ok + if {[catch { + array set a [testgetwindowinfo $::tk_dialog] + if {[info exists a(parent)]} { + append x [expr {$a(parent) == [wm frame .]}] + } + } err]} {lappend x $err} + Click ok } list $x $clr } -result [list 1 "#ff9933"] @@ -206,8 +206,8 @@ test winDialog-3.1 {Tk_GetOpenFileObjCmd} -constraints { } -body { start {tk_getOpenFile} then { - set x [GetText cancel] - Click cancel + set x [GetText cancel] + Click cancel } return $x } -result {Cancel} @@ -218,8 +218,8 @@ test winDialog-4.1 {Tk_GetSaveFileObjCmd} -constraints { } -body { start {tk_getSaveFile} then { - set x [GetText cancel] - Click cancel + set x [GetText cancel] + Click cancel } return $x } -result {Cancel} @@ -229,7 +229,7 @@ test winDialog-5.1 {GetFileName: no arguments} -constraints { } -body { start {tk_getOpenFile -title Open} then { - Click cancel + Click cancel } } -result 0 test winDialog-5.2 {GetFileName: one argument} -constraints { @@ -242,7 +242,7 @@ test winDialog-5.3 {GetFileName: many arguments} -constraints { } -body { start {tk_getOpenFile -initialdir [initialdir] -parent . -title test -initialfile foo} then { - Click cancel + Click cancel } } -result 0 test winDialog-5.4 {GetFileName: Tcl_GetIndexFromObj() != TCL_OK} -constraints { @@ -255,7 +255,7 @@ test winDialog-5.5 {GetFileName: Tcl_GetIndexFromObj() == TCL_OK} -constraints { } -body { start {set x [tk_getOpenFile -title bar]} set y [then { - Click cancel + Click cancel }] # Note this also tests fix for # https://core.tcl-lang.org/tk/tktview/4a0451f5291b3c9168cc560747dae9264e1d2ef6 @@ -399,11 +399,11 @@ test winDialog-5.7.7 {tk_getOpenFile: -defaultextension} -constraints { unset -nocomplain x tcltest::makeFile "" "5 7 7.aaa" [initialdir] start {set x [tk_getOpenFile \ - -defaultextension aaa \ - -initialdir [file nativename [initialdir]] \ - -initialfile "5 7 7" -title Foo]} + -defaultextension aaa \ + -initialdir [file nativename [initialdir]] \ + -initialfile "5 7 7" -title Foo]} then { - Click ok + Click ok } return $x } -result [file join [initialdir] "5 7 7.aaa"] @@ -414,11 +414,11 @@ test winDialog-5.7.8 {tk_getOpenFile: -defaultextension} -constraints { unset -nocomplain x tcltest::makeFile "" "5 7 8.aaa" [initialdir] start {set x [tk_getOpenFile \ - -defaultextension aaa \ - -initialdir [file nativename [initialdir]] \ - -initialfile "5 7 8.aaa" -title Foo]} + -defaultextension aaa \ + -initialdir [file nativename [initialdir]] \ + -initialfile "5 7 8.aaa" -title Foo]} then { - Click ok + Click ok } return $x } -result [file join [initialdir] "5 7 8.aaa"] @@ -449,16 +449,16 @@ test winDialog-5.9 {GetFileName: file types} -constraints { # types control has no control ID and we don't have a mechanism to # locate it. if {[vista?]} { - then { - Click cancel - } - return 1 + then { + Click cancel + } + return 1 } else { - then { - set x [GetText 0x470] - Click cancel - } - return [string equal $x {foo files (*.foo)}] + then { + set x [GetText 0x470] + Click cancel + } + return [string equal $x {foo files (*.foo)}] } } -result 1 test winDialog-5.10 {GetFileName: file types: MakeFilter() fails} -constraints { @@ -474,10 +474,10 @@ test winDialog-5.11 {GetFileName: initial directory} -constraints { # case FILE_INITDIR: unset -nocomplain x start {set x [tk_getSaveFile \ - -initialdir [initialdir] \ - -initialfile "12x 455" -title Foo]} + -initialdir [initialdir] \ + -initialfile "12x 455" -title Foo]} then { - Click ok + Click ok } return $x } -result [file join [initialdir] "12x 455"] @@ -493,10 +493,10 @@ test winDialog-5.12.1 {tk_getSaveFile: initial directory: ~} -constraints { } -body { unset -nocomplain x start {set x [tk_getSaveFile \ - -initialdir ~ \ - -initialfile "5 12 1" -title Foo]} + -initialdir ~ \ + -initialfile "5 12 1" -title Foo]} then { - Click ok + Click ok } return $x } -result [file normalize [file join ~ "5 12 1"]] @@ -512,10 +512,10 @@ test winDialog-5.12.2 {tk_getSaveFile: initial directory: ~user} -constraints { unset -nocomplain x start {set x [tk_getSaveFile \ - -initialdir ~$::tcl_platform(user) \ - -initialfile "5 12 2" -title Foo]} + -initialdir ~$::tcl_platform(user) \ + -initialfile "5 12 2" -title Foo]} then { - Click ok + Click ok } return $x } -result [file normalize [file join ~$::tcl_platform(user) "5 12 2"]] @@ -528,16 +528,16 @@ test winDialog-5.12.3 {tk_getSaveFile: initial directory: .} -constraints { set newdir [tcltest::makeDirectory "5 12 3"] set cur [pwd] try { - cd $newdir - unset -nocomplain x - start {set x [tk_getSaveFile \ - -initialdir . \ - -initialfile "testfile" -title Foo]} - then { - Click ok - } + cd $newdir + unset -nocomplain x + start {set x [tk_getSaveFile \ + -initialdir . \ + -initialfile "testfile" -title Foo]} + then { + Click ok + } } finally { - cd $cur + cd $cur } string equal $x [file join $newdir testfile] } -result 1 @@ -548,10 +548,10 @@ test winDialog-5.12.4 {tk_getSaveFile: initial directory: unicode} -constraints set dir [tcltest::makeDirectory "ŧéŝŧ"] unset -nocomplain x start {set x [tk_getSaveFile \ - -initialdir $dir \ - -initialfile "testfile" -title Foo]} + -initialdir $dir \ + -initialfile "testfile" -title Foo]} then { - Click ok + Click ok } string equal $x [file join $dir testfile] } -result 1 @@ -561,10 +561,10 @@ test winDialog-5.12.5 {tk_getSaveFile: initial directory: nativename} -constrain } -body { unset -nocomplain x start {set x [tk_getSaveFile \ - -initialdir [file nativename [initialdir]] \ - -initialfile "5 12 5" -title Foo]} + -initialdir [file nativename [initialdir]] \ + -initialfile "5 12 5" -title Foo]} then { - Click ok + Click ok } return $x } -result [file join [initialdir] "5 12 5"] @@ -577,16 +577,16 @@ test winDialog-5.12.6 {tk_getSaveFile: initial directory: relative} -constraints set dir [tcltest::makeDirectory "5 12 6"] set cur [pwd] try { - cd [file dirname $dir] - unset -nocomplain x - start {set x [tk_getSaveFile \ - -initialdir "5 12 6" \ - -initialfile "testfile" -title Foo]} - then { - Click ok - } + cd [file dirname $dir] + unset -nocomplain x + start {set x [tk_getSaveFile \ + -initialdir "5 12 6" \ + -initialfile "testfile" -title Foo]} + then { + Click ok + } } finally { - cd $cur + cd $cur } string equal $x [file join $dir testfile] } -result 1 @@ -608,10 +608,10 @@ test winDialog-5.12.7 {tk_getOpenFile: initial directory: ~} -setup { set fn [file tail [lindex [glob -types f ~/*] 0]] unset -nocomplain x start {set x [tk_getOpenFile \ - -initialdir ~ \ - -initialfile $fn -title Foo]} + -initialdir ~ \ + -initialfile $fn -title Foo]} then { - Click ok + Click ok } string equal $x [file normalize [file join ~ $fn]] } -cleanup { @@ -629,16 +629,16 @@ test winDialog-5.12.8 {tk_getOpenFile: initial directory: .} -constraints { set path [tcltest::makeFile "" "testfile" $newdir] set cur [pwd] try { - cd $newdir - unset -nocomplain x - start {set x [tk_getOpenFile \ - -initialdir . \ - -initialfile "testfile" -title Foo]} - then { - Click ok - } + cd $newdir + unset -nocomplain x + start {set x [tk_getOpenFile \ + -initialdir . \ + -initialfile "testfile" -title Foo]} + then { + Click ok + } } finally { - cd $cur + cd $cur } string equal $x $path } -result 1 @@ -650,10 +650,10 @@ test winDialog-5.12.9 {tk_getOpenFile: initial directory: unicode} -constraints set path [tcltest::makeFile "" testfile $dir] unset -nocomplain x start {set x [tk_getOpenFile \ - -initialdir $dir \ - -initialfile "testfile" -title Foo]} + -initialdir $dir \ + -initialfile "testfile" -title Foo]} then { - Click ok + Click ok } string equal $x $path } -result 1 @@ -664,10 +664,10 @@ test winDialog-5.12.10 {tk_getOpenFile: initial directory: nativename} -constrai unset -nocomplain x tcltest::makeFile "" "5 12 10" [initialdir] start {set x [tk_getOpenFile \ - -initialdir [file nativename [initialdir]] \ - -initialfile "5 12 10" -title Foo]} + -initialdir [file nativename [initialdir]] \ + -initialfile "5 12 10" -title Foo]} then { - Click ok + Click ok } return $x } -result [file join [initialdir] "5 12 10"] @@ -681,16 +681,16 @@ test winDialog-5.12.11 {tk_getOpenFile: initial directory: relative} -constraint set path [tcltest::makeFile "" testfile $dir] set cur [pwd] try { - cd [file dirname $dir] - unset -nocomplain x - start {set x [tk_getOpenFile \ - -initialdir [file tail $dir] \ - -initialfile "testfile" -title Foo]} - then { - Click ok - } + cd [file dirname $dir] + unset -nocomplain x + start {set x [tk_getOpenFile \ + -initialdir [file tail $dir] \ + -initialfile "testfile" -title Foo]} + then { + Click ok + } } finally { - cd $cur + cd $cur } string equal $x $path } -result 1 @@ -702,7 +702,7 @@ test winDialog-5.13 {GetFileName: initial file} -constraints { start {set x [tk_getSaveFile -initialfile "12x 456" -title Foo]} then { - Click ok + Click ok } file tail $x } -result "12x 456" @@ -716,17 +716,17 @@ if {![vista?]} { # XXX - disabled for Vista because the new dialogs allow long file # names to be specified but force the user to change it. test winDialog-5.15 {GetFileName: initial file: long name} -constraints { - nt testwinevent + nt testwinevent } -body { - start { - set dialogresult [catch { - tk_getSaveFile -initialfile [string repeat a 1024] -title Long - } x] - } - then { - Click ok - } - list $dialogresult [string match "invalid filename *" $x] + start { + set dialogresult [catch { + tk_getSaveFile -initialfile [string repeat a 1024] -title Long + } x] + } + then { + Click ok + } + list $dialogresult [string match "invalid filename *" $x] } -result {1 1} } test winDialog-5.16 {GetFileName: parent} -constraints { @@ -738,7 +738,7 @@ test winDialog-5.16 {GetFileName: parent} -constraints { set x 0 start {tk_getOpenFile -parent .t -title Parent; set x 1} then { - destroy .t + destroy .t } return $x } -result 1 @@ -749,35 +749,35 @@ test winDialog-5.17 {GetFileName: title} -constraints { start {tk_getOpenFile -title Narf} then { - Click cancel + Click cancel } } -result 0 if {[vista?]} { # In the newer file dialogs, the file type widget does not even exist # if no file types specified test winDialog-5.18 {GetFileName: no filter specified} -constraints { - nt testwinevent + nt testwinevent } -body { - # if (ofn.lpstrFilter == NULL) - start {tk_getOpenFile -title Filter} - then { - catch {set x [GetText 0x470]} y - Click cancel - } - return $y + # if (ofn.lpstrFilter == NULL) + start {tk_getOpenFile -title Filter} + then { + catch {set x [GetText 0x470]} y + Click cancel + } + return $y } -result {Could not find control with id 1136} } else { test winDialog-5.18 {GetFileName: no filter specified} -constraints { - nt testwinevent + nt testwinevent } -body { - # if (ofn.lpstrFilter == NULL) - - start {tk_getOpenFile -title Filter} - then { - set x [GetText 0x470] - Click cancel - } - return $x + # if (ofn.lpstrFilter == NULL) + + start {tk_getOpenFile -title Filter} + then { + set x [GetText 0x470] + Click cancel + } + return $x } -result {All Files (*.*)} } test winDialog-5.19 {GetFileName: parent HWND doesn't yet exist} -constraints { @@ -790,7 +790,7 @@ test winDialog-5.19 {GetFileName: parent HWND doesn't yet exist} -constraints { toplevel .t start {tk_getOpenFile -parent .t -title Open} then { - destroy .t + destroy .t } } -result {} test winDialog-5.20 {GetFileName: parent HWND already exists} -constraints { @@ -802,7 +802,7 @@ test winDialog-5.20 {GetFileName: parent HWND already exists} -constraints { update start {tk_getOpenFile -parent .t -title Open} then { - destroy .t + destroy .t } } -result {} test winDialog-5.21 {GetFileName: call GetOpenFileName} -constraints { @@ -812,8 +812,8 @@ test winDialog-5.21 {GetFileName: call GetOpenFileName} -constraints { start {tk_getOpenFile -title Open} then { - set x [GetText ok] - Click cancel + set x [GetText ok] + Click cancel } return $x } -result {&Open} @@ -824,8 +824,8 @@ test winDialog-5.22 {GetFileName: call GetSaveFileName} -constraints { start {tk_getSaveFile -title Save} then { - set x [GetText ok] - Click cancel + set x [GetText ok] + Click cancel } return $x } -result {&Save} @@ -853,7 +853,7 @@ test winDialog-5.24 {GetFileName: file types: MakeFilter() succeeds} -constraint start {set x [catch {tk_getSaveFile -filetypes {{"foo" .foo {\0\0\0\0}}}}]} then { - Click cancel + Click cancel } return $x } -result 0 @@ -864,7 +864,7 @@ test winDialog-5.25 {GetFileName: file types: MakeFilter() succeeds} -constraint start {set x [catch {tk_getSaveFile -filetypes {{"foo" .foo {••••}}}}]} then { - Click cancel + Click cancel } return $x } -result 0 @@ -888,7 +888,7 @@ test winDialog-9.1 {Tk_ChooseDirectoryObjCmd: no arguments} -constraints { } -body { start {set x [tk_chooseDirectory]} set y [then { - Click cancel + Click cancel }] # $x should be "" on a Cancel append x $y @@ -902,10 +902,10 @@ test winDialog-9.3 {Tk_ChooseDirectoryObjCmd: many arguments} -constraints { nt testwinevent } -body { start { - tk_chooseDirectory -initialdir [initialdir] -mustexist 1 -parent . -title test + tk_chooseDirectory -initialdir [initialdir] -mustexist 1 -parent . -title test } then { - Click cancel + Click cancel } } -result 0 test winDialog-9.4 {Tk_ChooseDirectoryObjCmd: Tcl_GetIndexFromObj() != TCL_OK} -constraints { @@ -918,7 +918,7 @@ test winDialog-9.5 {Tk_ChooseDirectoryObjCmd: Tcl_GetIndexFromObj() == TCL_OK} - } -body { start {tk_chooseDirectory -title bar} then { - Click cancel + Click cancel } } -result 0 test winDialog-9.6 {Tk_ChooseDirectoryObjCmd: valid option, but missing value} -constraints { @@ -933,7 +933,7 @@ test winDialog-9.7 {Tk_ChooseDirectoryObjCmd: -initialdir} -constraints { start {set x [tk_chooseDirectory -initialdir [initialdir] -title Foo]} then { - Click ok + Click ok } string tolower [set x] } -result [string tolower [initialdir]] @@ -959,8 +959,8 @@ test winDialog-10.2 {Tk_FontchooserObjCmd: -initialfont} -constraints { nt testwinevent } -body { start { - tk fontchooser configure -command ApplyFont -font system - tk fontchooser show + tk fontchooser configure -command ApplyFont -font system + tk fontchooser show } list [then { Click cancel @@ -970,8 +970,8 @@ test winDialog-10.3 {Tk_FontchooserObjCmd: -initialfont} -constraints { nt testwinevent } -body { start { - tk fontchooser configure -command ApplyFont -font system - tk fontchooser show + tk fontchooser configure -command ApplyFont -font system + tk fontchooser show } list [then { Click 1 @@ -981,8 +981,8 @@ test winDialog-10.4 {Tk_FontchooserObjCmd: -title} -constraints { nt testwinevent } -body { start { - tk fontchooser configure -command ApplyFont -title "tk test" - tk fontchooser show + tk fontchooser configure -command ApplyFont -title "tk test" + tk fontchooser show } list [then { Click cancel @@ -994,11 +994,11 @@ test winDialog-10.5 {Tk_FontchooserObjCmd: -parent} -constraints { array set a {parent {}} } -body { start { - tk fontchooser configure -command ApplyFont -parent . - tk fontchooser show + tk fontchooser configure -command ApplyFont -parent . + tk fontchooser show } then { - array set a [testgetwindowinfo $::tk_dialog] + array set a [testgetwindowinfo $::tk_dialog] Click cancel } list [expr {$a(parent) == [wm frame .]}] $::testfont @@ -1007,8 +1007,8 @@ test winDialog-10.6 {Tk_FontchooserObjCmd: -apply} -constraints { nt testwinevent } -body { start { - tk fontchooser configure -command FooBarBaz - tk fontchooser show + tk fontchooser configure -command FooBarBaz + tk fontchooser show } then { Click cancel @@ -1018,12 +1018,12 @@ test winDialog-10.7 {Tk_FontchooserObjCmd: -apply} -constraints { nt testwinevent } -body { start { - tk fontchooser configure -command ApplyFont -parent . - tk fontchooser show + tk fontchooser configure -command ApplyFont -parent . + tk fontchooser show } list [then { Click [expr {0x0402}] ;# value from XP - Click cancel + Click cancel }] [expr {[llength $::testfont] > 0}] } -result {0 1} test winDialog-10.8 {Tk_FontchooserObjCmd: -title} -constraints { @@ -1032,12 +1032,12 @@ test winDialog-10.8 {Tk_FontchooserObjCmd: -title} -constraints { array set a {text failed} } -body { start { - tk fontchooser configure -command ApplyFont -title "Hello" - tk fontchooser show + tk fontchooser configure -command ApplyFont -title "Hello" + tk fontchooser show } then { - array set a [testgetwindowinfo $::tk_dialog] - Click cancel + array set a [testgetwindowinfo $::tk_dialog] + Click cancel } set a(text) } -result "Hello" @@ -1047,13 +1047,13 @@ test winDialog-10.9 {Tk_FontchooserObjCmd: -title} -constraints { array set a {text failed} } -body { start { - tk fontchooser configure -command ApplyFont \ - -title "Привет" - tk fontchooser show + tk fontchooser configure -command ApplyFont \ + -title "Привет" + tk fontchooser show } then { - array set a [testgetwindowinfo $::tk_dialog] - Click cancel + array set a [testgetwindowinfo $::tk_dialog] + Click cancel } set a(text) } -result "Привет" diff --git a/tests/winFont.test b/tests/winFont.test index 03096f6..495a5d2 100644 --- a/tests/winFont.test +++ b/tests/winFont.test @@ -21,7 +21,7 @@ test winfont-1.1 {TkpGetNativeFont procedure: not native} -constraints { } -body { catch {font delete xyz} font measure {} xyz -} -returnCodes error -result {font "" doesn't exist} +} -returnCodes error -result {font "" does not exist} test winfont-1.2 {TkpGetNativeFont procedure: native} -constraints win -body { font measure ansifixed 0 font measure ansi 0 @@ -136,7 +136,7 @@ test winfont-5.1 {Tk_MeasureChars procedure: unbounded right margin} -constraint destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ - -text "0" -font systemfixed + -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] @@ -144,7 +144,7 @@ test winfont-5.1 {Tk_MeasureChars procedure: unbounded right margin} -constraint .t.l config -wrap 0 -text "000000" list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \ - [expr {[winfo reqheight .t.l] eq $ay}] + [expr {[winfo reqheight .t.l] eq $ay}] } -cleanup { destroy .t.l } -result {1 1} @@ -155,7 +155,7 @@ test winfont-5.2 {Tk_MeasureChars procedure: static width buffer exceeded} -cons destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ - -text "0" -font systemfixed + -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] @@ -163,7 +163,7 @@ test winfont-5.2 {Tk_MeasureChars procedure: static width buffer exceeded} -cons .t.l config -wrap 100000 -text "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" list [expr {[winfo reqwidth .t.l] eq 256*$ax}] \ - [expr {[winfo reqheight .t.l] eq $ay}] + [expr {[winfo reqheight .t.l] eq $ay}] } -cleanup { destroy .t.l } -result {1 1} @@ -174,7 +174,7 @@ test winfont-5.3 {Tk_MeasureChars procedure: all chars did fit} -constraints { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ - -text "0" -font systemfixed + -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] @@ -182,7 +182,7 @@ test winfont-5.3 {Tk_MeasureChars procedure: all chars did fit} -constraints { .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}] + [expr {[winfo reqheight .t.l] eq $ay}] } -cleanup { destroy .t.l } -result {1 1} @@ -193,7 +193,7 @@ test winfont-5.4 {Tk_MeasureChars procedure: not all chars fit} -constraints { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ - -text "0" -font systemfixed + -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] @@ -201,7 +201,7 @@ test winfont-5.4 {Tk_MeasureChars procedure: not all chars fit} -constraints { .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}] + [expr {[winfo reqheight .t.l] eq 2*$ay}] } -cleanup { destroy .t.l } -result {1 1} @@ -229,7 +229,7 @@ test winfont-5.6 {Tk_MeasureChars procedure: at least one char on line} -constra destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ - -text "0" -font systemfixed + -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] @@ -237,7 +237,7 @@ test winfont-5.6 {Tk_MeasureChars procedure: at least one char on line} -constra .t.l config -text "000000" -wrap 1 list [expr {[winfo reqwidth .t.l] eq $ax}] \ - [expr {[winfo reqheight .t.l] eq 6*$ay}] + [expr {[winfo reqheight .t.l] eq 6*$ay}] } -cleanup { destroy .t.l } -result {1 1} @@ -248,7 +248,7 @@ test winfont-5.7 {Tk_MeasureChars procedure: whole words} -constraints { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ - -text "0" -font systemfixed + -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] @@ -256,7 +256,7 @@ test winfont-5.7 {Tk_MeasureChars procedure: whole words} -constraints { .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}] + [expr {[winfo reqheight .t.l] eq 2*$ay}] } -cleanup { destroy .t.l } -result {1 1} @@ -267,7 +267,7 @@ test winfont-5.8 {Tk_MeasureChars procedure: already saw space in line} -constra destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ - -text "0" -font systemfixed + -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] @@ -275,7 +275,7 @@ test winfont-5.8 {Tk_MeasureChars procedure: already saw space in line} -constra .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}] + [expr {[winfo reqheight .t.l] eq 2*$ay}] } -cleanup { destroy .t.l } -result {1 1} @@ -286,7 +286,7 @@ test winfont-5.9 {Tk_MeasureChars procedure: internal spaces significant} -const destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ - -text "0" -font systemfixed + -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] @@ -294,7 +294,7 @@ test winfont-5.9 {Tk_MeasureChars procedure: internal spaces significant} -const .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}] + [expr {[winfo reqheight .t.l] eq 2*$ay}] } -cleanup { destroy .t.l } -result {1 1} @@ -305,7 +305,7 @@ test winfont-5.10 {Tk_MeasureChars procedure: make first part of word fit} -cons destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ - -text "0" -font systemfixed + -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] @@ -313,7 +313,7 @@ test winfont-5.10 {Tk_MeasureChars procedure: make first part of word fit} -cons .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}] + [expr {[winfo reqheight .t.l] eq 2*$ay}] } -cleanup { destroy .t.l } -result {1 1} @@ -324,7 +324,7 @@ test winfont-5.11 {Tk_MeasureChars procedure: check for kerning} -constraints { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ - -text "0" -font systemfixed + -text "0" -font systemfixed pack .t.l update @@ -344,7 +344,7 @@ test winfont-6.1 {Tk_DrawChars procedure: loop test} -constraints win -setup { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ - -text "0" -font systemfixed + -text "0" -font systemfixed pack .t.l update .t.l config -text "a" diff --git a/tests/winMenu.test b/tests/winMenu.test index 2382d13..633034e 100644 --- a/tests/winMenu.test +++ b/tests/winMenu.test @@ -470,8 +470,8 @@ test winMenu-11.3 {TkWinHandleMenuEvent - WM_COMMAND} -constraints { } -body { catch {unset foo} proc bgerror {args} { - global foo errorInfo - set foo [list $args $errorInfo] + global foo errorInfo + set foo [list $args $errorInfo] } menu .m1 .m1 add command -command {error 1} -label "winMenu-11.2: Please select this menu item." diff --git a/tests/winMsgbox.test b/tests/winMsgbox.test index cf7a05f..ea81266 100644 --- a/tests/winMsgbox.test +++ b/tests/winMsgbox.test @@ -25,11 +25,11 @@ proc GetWindowInfo {title button} { array set a $windowInfo set childinfo {} ; set childtext "" foreach child $a(children) { - lappend childinfo $child [set info [testgetwindowinfo $child]] - array set ca $info - if {$ca(class) eq "Static"} { - append childtext $ca(text) - } + lappend childinfo $child [set info [testgetwindowinfo $child]] + array set ca $info + if {$ca(class) eq "Static"} { + append childtext $ca(text) + } } set a(children) $childinfo set a(childtext) $childtext @@ -261,7 +261,7 @@ test winMsgbox-3.1 {tk_messageBox detail (sourceforge bug #1692927)} -constraint set title "winMsgbox-3.0 [pid]" after 100 [list GetWindowInfo $title 2] set r [tk_messageBox -type ok -title $title \ - -message Hello -detail "Pleased to meet you"] + -message Hello -detail "Pleased to meet you"] array set info $windowInfo lappend r $info(childtext) } -cleanup { diff --git a/tests/winWm.test b/tests/winWm.test index 35775a2..783a4e1 100644 --- a/tests/winWm.test +++ b/tests/winWm.test @@ -324,14 +324,14 @@ test winWm-6.6 {wm attributes -alpha} -constraints win -setup { update if {$::tcl_platform(osVersion) >= 5.0} { for {set i 0.2} {$i < 0.99} {set i [expr {$i+0.02}]} { - wm attributes .t -alpha $i - update idle - after 20 + wm attributes .t -alpha $i + update idle + after 20 } for {set i 0.99} {$i > 0.2} {set i [expr {$i-0.02}]} { - wm attributes .t -alpha $i - update idle - after 20 + wm attributes .t -alpha $i + update idle + after 20 } } } -cleanup { @@ -366,7 +366,7 @@ test winWm-6.8 {wm attributes -transparentcolor} -constraints win -setup { test winWm-7.1 {deiconify on an unmapped toplevel will raise \ - the window and set the focus} -constraints { + the window and set the focus} -constraints { win } -setup { destroy .t @@ -382,7 +382,7 @@ test winWm-7.1 {deiconify on an unmapped toplevel will raise \ } -result {1 .t} test winWm-7.2 {deiconify on an already mapped toplevel\ - will raise the window and set the focus} -constraints { + will raise the window and set the focus} -constraints { win } -setup { destroy .t @@ -446,31 +446,31 @@ test winWm-8.2 {Tk_WmCmd procedure, "iconphoto" option} -constraints win -setup test winWm-9.0 "Bug #2799589 - delayed activation of destroyed window" -constraints win -setup { proc winwm90click {w} { - if {![winfo ismapped $w]} { update } - event generate $w <Enter> - focus -force $w - event generate $w <Button-1> -x 5 -y 5 - event generate $w <ButtonRelease-1> -x 5 -y 5 + if {![winfo ismapped $w]} { update } + event generate $w <Enter> + focus -force $w + event generate $w <Button-1> -x 5 -y 5 + event generate $w <ButtonRelease-1> -x 5 -y 5 } proc winwm90proc3 {} { - global winwm90done winwm90check - set w .sd - toplevel $w - pack [button $w.b -text "OK" -command {set winwm90check 1}] - bind $w.b <Map> {after idle {winwm90click %W}} - update idletasks - tkwait visibility $w - grab $w - tkwait variable winwm90check - grab release $w - destroy $w - after idle {set winwm90done ok} + global winwm90done winwm90check + set w .sd + toplevel $w + pack [button $w.b -text "OK" -command {set winwm90check 1}] + bind $w.b <Map> {after idle {winwm90click %W}} + update idletasks + tkwait visibility $w + grab $w + tkwait variable winwm90check + grab release $w + destroy $w + after idle {set winwm90done ok} } proc winwm90proc2 {w} { winwm90proc3; destroy $w } proc winwm90proc1 {w} { - toplevel $w - pack [button $w.b -text "Do dialog" -command [list winwm90proc2 $w]] - bind $w.b <Map> {bind %W <Map> {}; after idle {winwm90click %W}} + 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 @@ -483,38 +483,38 @@ test winWm-9.0 "Bug #2799589 - delayed activation of destroyed window" -constrai set winwm90done } -cleanup { foreach cmd {proc1 proc2 proc3 click} { - rename winwm90$cmd {} + rename winwm90$cmd {} } destroy .tx .t .sd } -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 <Button-1> -x 5 -y 5 - event generate $w <ButtonRelease-1> -x 5 -y 5 + if {![winfo ismapped $w]} { update } + event generate $w <Enter> + focus -force $w + event generate $w <Button-1> -x 5 -y 5 + event generate $w <ButtonRelease-1> -x 5 -y 5 } proc winwm91proc3 {} { - global winwm91done winwm91check - set w .sd - toplevel $w - pack [button $w.b -text "OK" -command {set winwm91check 1}] - bind $w.b <Map> {after idle {winwm91click %W}} - update idletasks - tkwait visibility $w - grab $w - tkwait variable winwm91check - #skip the release: #grab release $w - destroy $w - after idle {set winwm91done ok} + global winwm91done winwm91check + set w .sd + toplevel $w + pack [button $w.b -text "OK" -command {set winwm91check 1}] + bind $w.b <Map> {after idle {winwm91click %W}} + update idletasks + tkwait visibility $w + grab $w + tkwait variable winwm91check + #skip the release: #grab release $w + destroy $w + after idle {set winwm91done ok} } proc winwm91proc2 {w} { winwm91proc3; destroy $w } proc winwm91proc1 {w} { - toplevel $w - pack [button $w.b -text "Do dialog" -command [list winwm91proc2 $w]] - bind $w.b <Map> {bind %W <Map> {}; after idle {winwm91click %W}} + toplevel $w + 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 @@ -528,7 +528,7 @@ test winWm-9.1 "delayed activation of grabbed destroyed window" -constraints win set winwm91done } -cleanup { foreach cmd {proc1 proc2 proc3 click} { - rename winwm91$cmd {} + rename winwm91$cmd {} } destroy .tx .t .sd } -result ok @@ -543,18 +543,18 @@ test winWm-9.2 "check wm forget for unmapped parent (#3205464,#2967911)" -constr pack .t.f.x pack .t.f lappend aid [after 5000 {set ::winwm92 timeout}] [after 500 { - wm manage .t.f - wm iconify .t - lappend aid [after 500 { - wm forget .t.f - wm deiconify .t - lappend aid [after 500 { - pack .t.f - lappend aid [after 500 { + wm manage .t.f + wm iconify .t + lappend aid [after 500 { + wm forget .t.f + wm deiconify .t + lappend aid [after 500 { + pack .t.f + lappend aid [after 500 { set ::winwm92 [expr { [winfo rooty .t.f.x] == 0 ? "failed" : "ok"}]}] - }] - }] + }] + }] }] vwait ::winwm92 foreach id $aid { diff --git a/tests/window.test b/tests/window.test index 8a56d5a..de34221 100644 --- a/tests/window.test +++ b/tests/window.test @@ -11,7 +11,8 @@ tcltest::configure {*}$argv tcltest::loadTestedCommands namespace import ::tk::test::loadTkCommand update - +# Move the mouse out of the way for window-2.1 +event generate {} <Motion> -warp 1 -x 640 -y 10 # XXX This file is woefully incomplete. Right now it only tests # a few parts of a few procedures in tkWindow.c @@ -21,8 +22,8 @@ test window-1.1 {Tk_CreateWindowFromPath procedure, parent dead} -setup { destroy .t } -body { proc bgerror msg { - global x errorInfo - set x [list $msg $errorInfo] + global x errorInfo + set x [list $msg $errorInfo] } set x unchanged @@ -90,15 +91,15 @@ test window-2.4 {Tk_DestroyWindow, cleanup half dead window at exit} -constraint } -body { set code [loadTkCommand] append code { - update - bind . <Destroy> exit - destroy . + update + bind . <Destroy> exit + destroy . } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 + set error 1 } else { - set error 0 + set error 0 } removeFile script list $error $msg @@ -109,16 +110,16 @@ test window-2.5 {Tk_DestroyWindow, cleanup half dead windows at exit} -constrain } -body { set code [loadTkCommand] append code { - toplevel .t - update - bind .t <Destroy> exit - destroy .t + toplevel .t + update + bind .t <Destroy> exit + destroy .t } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 + set error 1 } else { - set error 0 + set error 0 } removeFile script list $error $msg @@ -129,16 +130,16 @@ test window-2.6 {Tk_DestroyWindow, cleanup half dead windows at exit} -constrain } -body { set code [loadTkCommand] append code { - toplevel .t - update - bind .t <Destroy> exit - destroy . + toplevel .t + update + bind .t <Destroy> exit + destroy . } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 + set error 1 } else { - set error 0 + set error 0 } removeFile script list $error $msg @@ -149,17 +150,17 @@ test window-2.7 {Tk_DestroyWindow, cleanup half dead windows at exit} -constrain } -body { set code [loadTkCommand] append code { - toplevel .t - toplevel .t.f - update - bind .t.f <Destroy> exit - destroy . + toplevel .t + toplevel .t.f + update + bind .t.f <Destroy> exit + destroy . } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 + set error 1 } else { - set error 0 + set error 0 } removeFile script list $error $msg @@ -170,20 +171,20 @@ test window-2.8 {Tk_DestroyWindow, cleanup half dead windows at exit} -constrain } -body { set code [loadTkCommand] append code { - toplevel .t1 - toplevel .t2 - toplevel .t3 - update - bind .t3 <Destroy> {destroy .t2} - bind .t2 <Destroy> {destroy .t1} - bind .t1 <Destroy> {exit 0} - destroy .t3 + toplevel .t1 + toplevel .t2 + toplevel .t3 + update + bind .t3 <Destroy> {destroy .t2} + bind .t2 <Destroy> {destroy .t1} + bind .t1 <Destroy> {exit 0} + destroy .t3 } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 + set error 1 } else { - set error 0 + set error 0 } removeFile script list $error $msg @@ -194,18 +195,18 @@ test window-2.9 {Tk_DestroyWindow, Destroy bindings evaluated after exit} -const } -body { set code [loadTkCommand] append code { - toplevel .t1 - toplevel .t2 - update - bind .t2 <Destroy> {puts "Destroy .t2" ; exit 1} - bind .t1 <Destroy> {puts "Destroy .t1" ; exit 0} - destroy .t2 + toplevel .t1 + toplevel .t2 + update + bind .t2 <Destroy> {puts "Destroy .t2" ; exit 1} + bind .t1 <Destroy> {puts "Destroy .t1" ; exit 0} + destroy .t2 } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 + set error 1 } else { - set error 0 + set error 0 } removeFile script list $error $msg @@ -217,19 +218,19 @@ test window-2.10 {Tk_DestroyWindow, Destroy binding evaluated once} -constraints } -body { set code [loadTkCommand] append code { - update - bind . <Destroy> { - puts "Destroy ." - bind . <Destroy> {puts "Re-Destroy ."} - exit 0 - } - destroy . + update + bind . <Destroy> { + puts "Destroy ." + bind . <Destroy> {puts "Re-Destroy ."} + exit 0 + } + destroy . } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 + set error 1 } else { - set error 0 + set error 0 } removeFile script list $error $msg @@ -240,24 +241,24 @@ test window-2.11 {Tk_DestroyWindow, don't reanimate a half-dead window} -constra } -body { set code [loadTkCommand] append code { - toplevel .t1 - toplevel .t2 - update - bind .t1 <Destroy> { - if {[catch {entry .t2.newchild}]} { - puts YES - } else { - puts NO - } - } - bind .t2 <Destroy> {exit} - destroy .t2 + toplevel .t1 + toplevel .t2 + update + bind .t1 <Destroy> { + if {[catch {entry .t2.newchild}]} { + puts YES + } else { + puts NO + } + } + bind .t2 <Destroy> {exit} + destroy .t2 } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 + set error 1 } else { - set error 0 + set error 0 } removeFile script list $error $msg @@ -283,16 +284,16 @@ test window-2.12 {Test for ticket [9b6065d1fd] - restore Tcl [update] command} - } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { - set error 1 + set error 1 } else { - set error 0 + set error 0 } removeFile script list $error $msg } -result {0 {waiting -ringing the bell -> can't invoke "bell" command: application has been destroyed +ringing the bell -> cannot invoke "bell" command: application has been destroyed done waiting -bell -> can't invoke "bell" command: application has been destroyed +bell -> cannot invoke "bell" command: application has been destroyed update -> }} diff --git a/tests/winfo.test b/tests/winfo.test index d4cc1ff..76c57c9 100644 --- a/tests/winfo.test +++ b/tests/winfo.test @@ -29,12 +29,12 @@ proc eatColors {w {options ""}} { canvas $w.c -width 400 -height 200 -bd 0 pack $w.c for {set y 0} {$y < 8} {incr y} { - for {set x 0} {$x < 40} {incr x} { - set color [format #%02x%02x%02x [expr {$x*6}] [expr {$y*30}] 0] - $w.c create rectangle [expr {10*$x}] [expr {20*$y}] \ - [expr {10*$x + 10}] [expr {20*$y + 20}] -outline {} \ - -fill $color - } + for {set x 0} {$x < 40} {incr x} { + set color [format #%02x%02x%02x [expr {$x*6}] [expr {$y*30}] 0] + $w.c create rectangle [expr {10*$x}] [expr {20*$y}] \ + [expr {10*$x + 10}] [expr {20*$y + 20}] -outline {} \ + -fill $color + } } update } @@ -173,7 +173,7 @@ test winfo-4.7 {"winfo containing" command} -setup { update set x [winfo containing -display .t.f [expr {[winfo rootx .t]+600}] \ - [expr {[winfo rooty .t.f]+450}]] + [expr {[winfo rooty .t.f]+450}]] expr {($x == ".") || ($x == "")} } -cleanup { destroy .t @@ -239,7 +239,7 @@ test winfo-7.5 {"winfo pathname" command} -body { } -returnCodes error -result {expected integer but got "xyz"} test winfo-7.6 {"winfo pathname" command} -body { winfo pathname 224 -} -returnCodes error -result {window id "224" doesn't exist in this application} +} -returnCodes error -result {window id "224" does not exist in this application} test winfo-7.7 {"winfo pathname" command} -setup { destroy .b button .b -text "Help" @@ -392,7 +392,7 @@ test winfo-13.1 {root coordinates of embedded toplevel} -setup { update list rootx [expr {[winfo rootx .emb] == [winfo rootx .con]}] \ - rooty [expr {[winfo rooty .emb] == [winfo rooty .con]}] + rooty [expr {[winfo rooty .emb] == [winfo rooty .con]}] } -cleanup { deleteWindows } -result {rootx 1 rooty 1} @@ -441,8 +441,10 @@ test winfo-13.3 {destroying container window} -setup { test winfo-13.4 {[winfo containing] with embedded windows} -setup { deleteWindows } -body { + wm geometry . +100+100 frame .con -container 1 pack .con -expand yes -fill both + update toplevel .emb -use [winfo id .con] -bd 0 -highlightthickness 0 button .emb.b pack .emb.b -expand yes -fill both @@ -452,7 +454,7 @@ test winfo-13.4 {[winfo containing] with embedded windows} -setup { pack .b -expand yes -fill both update string compare .emb.b \ - [winfo containing [winfo rootx .emb.b] [winfo rooty .emb.b]] + [winfo containing [winfo rootx .emb.b] [winfo rooty .emb.b]] } -cleanup { deleteWindows } -result 0 diff --git a/tests/wm.test b/tests/wm.test index d913006..ea366a5 100644 --- a/tests/wm.test +++ b/tests/wm.test @@ -620,7 +620,7 @@ test wm-deiconify-1.6 {usage} -constraints !win -setup { deleteWindows test wm-deiconify-2.1 {a window that has never been mapped\ - should not be mapped by a call to deiconify} -body { + should not be mapped by a call to deiconify} -body { toplevel .t wm deiconify .t winfo ismapped .t @@ -628,7 +628,7 @@ test wm-deiconify-2.1 {a window that has never been mapped\ deleteWindows } -result 0 test wm-deiconify-2.2 {a window that has already been\ - mapped should be mapped by deiconify} -body { + mapped should be mapped by deiconify} -body { toplevel .t update idletasks wm withdraw .t @@ -638,8 +638,8 @@ test wm-deiconify-2.2 {a window that has already been\ deleteWindows } -result 1 test wm-deiconify-2.3 {geometry for an unmapped window\ - should not be calculated by a call to deiconify,\ - it should be done at idle time} -setup { + should not be calculated by a call to deiconify,\ + it should be done at idle time} -setup { set results {} } -body { toplevel .t -width 200 -height 200 @@ -648,13 +648,13 @@ test wm-deiconify-2.3 {geometry for an unmapped window\ lappend results [wm geometry .t] update idletasks lappend results [lindex [split \ - [wm geometry .t] +] 0] + [wm geometry .t] +] 0] } -cleanup { deleteWindows } -result {1x1+0+0 1x1+0+0 200x200} test wm-deiconify-2.4 {invoking destroy after a deiconify\ - should not result in a crash because of a callback\ - set on the toplevel} -body { + should not result in a crash because of a callback\ + set on the toplevel} -body { toplevel .t wm withdraw .t wm deiconify .t @@ -821,10 +821,10 @@ test wm-iconbadge-1.4 {::tk::icons::base_icon($win) must be a Tk photo on X11} - } -returnCodes error -result {can't use "book" as iconphoto: not a photo image} test wm-iconbadge-1.5 {illegal badge number} -body { image create photo book -data { - R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAAC - wAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IM - QCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc - 0yv+DVSEUuFxIAOw== + R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAAC + wAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IM + QCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc + 0yv+DVSEUuFxIAOw== } set ::tk::icons::base_icon(.) book wm iconbadge . illegal @@ -833,10 +833,10 @@ test wm-iconbadge-1.5 {illegal badge number} -body { } -returnCodes error -result {can't use "illegal" as icon badge} test wm-iconbadge-1.6 {non-integer badge number} -body { image create photo book -data { - R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAAC - wAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IM - QCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc - 0yv+DVSEUuFxIAOw== + R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAAC + wAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IM + QCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc + 0yv+DVSEUuFxIAOw== } set ::tk::icons::base_icon(.) book wm iconbadge . 3.2 @@ -845,10 +845,10 @@ test wm-iconbadge-1.6 {non-integer badge number} -body { } -returnCodes error -result {can't use "3.2" as icon badge} test wm-iconbadge-1.7 {negative or zero badge number} -body { image create photo book -data { - R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAAC - wAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IM - QCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc - 0yv+DVSEUuFxIAOw== + R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAAC + wAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IM + QCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc + 0yv+DVSEUuFxIAOw== } set ::tk::icons::base_icon(.) book wm iconbadge . 0 @@ -1016,7 +1016,7 @@ test wm-iconphoto-1.4 {usage} -returnCodes error -body { } -result {wrong # args: should be "wm iconphoto window ?-default? image1 ?image2 ...?"} test wm-iconphoto-1.5.1 {usage} -constraints aquaOrWin32 -returnCodes error -body { wm iconphoto . -default [image create photo -file {}] -} -match {glob} -result {failed to create an iconphoto with image *} +} -match glob -result {failed to create an iconphoto with image *} test wm-iconphoto-1.5.2 {usage} -constraints x11 -body { wm iconphoto . -default [image create photo -file {}] } -result {} @@ -1084,6 +1084,8 @@ test wm-iconwindow-1.5 {usage} -setup { } -result {.icon is already an icon for .t2} test wm-iconwindow-2.1 {setting and reading values} -setup { + # without this macOS crashes for unknown reasons + wm iconwindow .t {} destroy .icon set result {} } -body { @@ -1136,7 +1138,7 @@ test wm-maxsize-1.7 {maxsize must be <= screen size} -setup { destroy .t test wm-maxsize-2.1 {setting the maxsize to a value smaller\ - than the current size will resize a toplevel} -body { + than the current size will resize a toplevel} -body { toplevel .t -width 300 -height 300 update wm maxsize .t 200 150 @@ -1147,7 +1149,7 @@ test wm-maxsize-2.1 {setting the maxsize to a value smaller\ destroy .t } -result {200 150} test wm-maxsize-2.2 {setting the maxsize to a value smaller\ - than the current size will resize a gridded toplevel} -body { + than the current size will resize a gridded toplevel} -body { toplevel .t wm grid .t 0 0 50 50 wm geometry .t 6x6 @@ -1160,7 +1162,7 @@ test wm-maxsize-2.2 {setting the maxsize to a value smaller\ destroy .t } -result {4 3} test wm-maxsize-2.3 {attempting to resize to a value\ - bigger than the current maxsize will set it to the max size} -body { + bigger than the current maxsize will set it to the max size} -body { toplevel .t -width 200 -height 200 wm maxsize .t 300 250 update @@ -1224,7 +1226,7 @@ test wm-minsize-1.6 {usage} -setup { } -result {300 200} test wm-minsize-2.1 {setting the minsize to a value larger\ - than the current size will resize a toplevel} -body { + than the current size will resize a toplevel} -body { toplevel .t -width 200 -height 200 update wm minsize .t 400 300 @@ -1235,7 +1237,7 @@ test wm-minsize-2.1 {setting the minsize to a value larger\ destroy .t } -result {400 300} test wm-minsize-2.2 {setting the minsize to a value larger\ - than the current size will resize a gridded toplevel} -body { + than the current size will resize a gridded toplevel} -body { toplevel .t wm grid .t 1 1 50 50 wm geom .t 4x4 @@ -1248,7 +1250,7 @@ test wm-minsize-2.2 {setting the minsize to a value larger\ destroy .t } -result {8 8} test wm-minsize-2.3 {attempting to resize to a value\ - smaller than the current minsize will set it to the minsize} -body { + smaller than the current minsize will set it to the minsize} -body { toplevel .t -width 400 -height 400 wm minsize .t 300 300 update @@ -1502,18 +1504,24 @@ test wm-stackorder-2.2 {stacking order} -body { destroy .t } -result {.t .} test wm-stackorder-2.3 {stacking order} -body { + set res {} toplevel .t tkwait visibility .t + raiseDelay toplevel .t2 tkwait visibility .t2 + raiseDelay + lappend res [wm stackorder .] raise . raiseDelay + lappend res [wm stackorder .] raise .t2 raiseDelay - wm stackorder . + lappend res [wm stackorder .] + set res } -cleanup { destroy .t .t2 -} -result {.t . .t2} +} -result {{. .t .t2} {.t .t2 .} {.t . .t2}} test wm-stackorder-2.4 {stacking order} -body { toplevel .t ; update toplevel .t2 ; update @@ -1561,7 +1569,9 @@ deleteWindows test wm-stackorder-3.1 {unmapped toplevel} -constraints {failsOnUbuntu failsOnXQuarz} -body { toplevel .t1 ; update + raiseDelay toplevel .t2 ; update + raiseDelay wm iconify .t1 raiseDelay wm stackorder . @@ -1700,7 +1710,7 @@ test wm-stackorder-5.2.1 {A normal toplevel can be raised above an \ destroy .t } -result 1 test wm-stackorder-5.3 {An overrideredirect window\ - can be explicitly lowered} -body { + can be explicitly lowered} -body { toplevel .t wm overrideredirect .t 1 tkwait visibility .t @@ -1833,7 +1843,7 @@ test wm-transient-2.2 {first toplevel parent of non-toplevel container window is } -result {.top} test wm-transient-3.1 {transient toplevel is withdrawn - when mapped if toplevel is withdrawn} -body { + when mapped if toplevel is withdrawn} -body { toplevel .top wm withdraw .top update @@ -1845,7 +1855,7 @@ test wm-transient-3.1 {transient toplevel is withdrawn deleteWindows } -result {withdrawn 0} test wm-transient-3.2 {already mapped transient toplevel - takes on withdrawn state of toplevel} -body { + takes on withdrawn state of toplevel} -body { toplevel .top wm withdraw .top update @@ -1858,7 +1868,7 @@ test wm-transient-3.2 {already mapped transient toplevel deleteWindows } -result {withdrawn 0} test wm-transient-3.3 {withdraw/deiconify on the toplevel - also does a withdraw/deiconify on the transient} -setup { + also does a withdraw/deiconify on the transient} -setup { set results [list] } -body { toplevel .top @@ -1876,7 +1886,7 @@ test wm-transient-3.3 {withdraw/deiconify on the toplevel } -result {withdrawn 0 normal 1} test wm-transient-4.1 {transient toplevel is withdrawn - when mapped if toplevel is iconic} -constraints {failsOnUbuntu failsOnXQuarz} -body { + when mapped if toplevel is iconic} -constraints {failsOnUbuntu failsOnXQuarz} -body { toplevel .top wm iconify .top update @@ -1888,7 +1898,7 @@ test wm-transient-4.1 {transient toplevel is withdrawn deleteWindows } -result {withdrawn 0} test wm-transient-4.2 {already mapped transient toplevel - is withdrawn if toplevel is iconic} -constraints {failsOnUbuntu failsOnXQuarz} -body { + is withdrawn if toplevel is iconic} -constraints {failsOnUbuntu failsOnXQuarz} -body { toplevel .top raiseDelay wm iconify .top @@ -1902,7 +1912,7 @@ test wm-transient-4.2 {already mapped transient toplevel deleteWindows } -result {withdrawn 0} test wm-transient-4.3 {iconify/deiconify on the toplevel - does a withdraw/deiconify on the transient} -constraints {failsOnUbuntu failsOnXQuarz} -setup { + does a withdraw/deiconify on the transient} -constraints {failsOnUbuntu failsOnXQuarz} -setup { set results [list] } -body { toplevel .top @@ -1920,7 +1930,7 @@ test wm-transient-4.3 {iconify/deiconify on the toplevel } -result {withdrawn 0 normal 1} test wm-transient-5.1 {an error during transient command should not - cause the map/unmap binding to be deleted} -setup { + cause the map/unmap binding to be deleted} -setup { set results [list] } -body { toplevel .top @@ -1939,7 +1949,7 @@ test wm-transient-5.1 {an error during transient command should not deleteWindows } -result {1 withdrawn normal} test wm-transient-5.2 {remove transient property when toplevel - is destroyed} -body { + is destroyed} -body { toplevel .top toplevel .subject wm transient .subject .top @@ -1951,7 +1961,7 @@ test wm-transient-5.2 {remove transient property when toplevel deleteWindows } -result {} test wm-transient-5.3 {remove transient property from window - that had never been mapped when toplevel is destroyed} -body { + that had never been mapped when toplevel is destroyed} -body { toplevel .top toplevel .subject wm transient .subject .top @@ -1962,7 +1972,7 @@ test wm-transient-5.3 {remove transient property from window } -result {} test wm-transient-6.1 {a withdrawn transient does not track - state changes in the toplevel} -body { + state changes in the toplevel} -body { toplevel .top toplevel .subject update @@ -1977,7 +1987,7 @@ test wm-transient-6.1 {a withdrawn transient does not track deleteWindows } -result {withdrawn} test wm-transient-6.2 {a withdrawn transient does not track - state changes in the toplevel} -setup { + state changes in the toplevel} -setup { set results [list] } -body { toplevel .top @@ -2002,7 +2012,7 @@ test wm-transient-6.2 {a withdrawn transient does not track deleteWindows } -result {withdrawn normal withdrawn normal} test wm-transient-6.3 {a withdrawn transient does not track - state changes in the toplevel} -body { + state changes in the toplevel} -body { toplevel .top toplevel .subject update @@ -2059,7 +2069,7 @@ test wm-transient-7.4 {Reassign transient, destroy new toplevel} -body { toplevel .transient wm transient .transient .t1 wm transient .transient .t2 - destroy .t2 ;# caused panic in 8.4b1 + destroy .t2 ;# caused panic in 8.4b1 destroy .t1 destroy .transient } -cleanup { @@ -2072,7 +2082,7 @@ test wm-transient-7.5 {Reassign transient, destroy transient} -body { wm transient .transient .t1 wm transient .transient .t2 destroy .transient - destroy .t2 ;# caused panic in 8.4b1 + destroy .t2 ;# caused panic in 8.4b1 destroy .t1 ;# so did this } -cleanup { deleteWindows diff --git a/tests/xmfbox.test b/tests/xmfbox.test index 89eda3c..b584aeb 100644 --- a/tests/xmfbox.test +++ b/tests/xmfbox.test @@ -27,25 +27,25 @@ proc cleanup {} { set err1 [catch { if [file exists ./~nosuchuser1] { - file delete ./~nosuchuser1 + file delete ./~nosuchuser1 } } msg1] set err2 [catch { if [file exists ./~nosuchuser2] { - file delete ./~nosuchuser2 + file delete ./~nosuchuser2 } } msg2] set err3 [catch { if [file exists ./~nosuchuser3] { - file delete ./~nosuchuser3 + file delete ./~nosuchuser3 } } msg3] set err4 [catch { if [file exists ./~nosuchuser4] { - file delete ./~nosuchuser4 + file delete ./~nosuchuser4 } } msg4] @@ -54,6 +54,7 @@ proc cleanup {} { } catch {unset foo} destroy .foo + update } # ---------------------------------------------------------------------- @@ -76,6 +77,7 @@ test xmfbox-1.2 {tk::MotifFDialog_Create, -parent switch} -constraints { } -body { toplevel .bar wm geometry .bar +0+0 + update set x [tk::MotifFDialog_Create foo open {-parent .bar}] } -cleanup { destroy $x @@ -89,6 +91,7 @@ test xmfbox-2.1 {tk::MotifFDialog_InterpFilter, ~ in dir names} -constraints { cleanup file mkdir ./~nosuchuser1 set x [tk::MotifFDialog_Create foo open {}] + update $::tk::dialog::file::foo(fEnt) delete 0 end $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1 file normalize [file join {*}[tk::MotifFDialog_InterpFilter $x]] @@ -100,6 +103,7 @@ test xmfbox-2.2 {tk::MotifFDialog_InterpFilter, ~ in file names} -constraints { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] set x [tk::MotifFDialog_Create foo open {}] + update $::tk::dialog::file::foo(fEnt) delete 0 end $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1 file normalize [file join {*}[tk::MotifFDialog_InterpFilter $x]] @@ -111,6 +115,7 @@ test xmfbox-2.3 {tk::MotifFDialog_Update, ~ in file names} -constraints { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] set x [tk::MotifFDialog_Create foo open {}] + update $::tk::dialog::file::foo(fEnt) delete 0 end $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1 tk::MotifFDialog_InterpFilter $x @@ -124,6 +129,7 @@ test xmfbox-2.4 {tk::MotifFDialog_LoadFile, ~ in file names} -constraints { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] set x [tk::MotifFDialog_Create foo open {}] + update set i [lsearch [$::tk::dialog::file::foo(fList) get 0 end] ~nosuchuser1] expr {$i >= 0} } -result 1 @@ -134,6 +140,7 @@ test xmfbox-2.5 {tk::MotifFDialog_BrowseFList, ~ in file names} -constraints { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] set x [tk::MotifFDialog_Create foo open {}] + update set i [lsearch [$::tk::dialog::file::foo(fList) get 0 end] ~nosuchuser1] $::tk::dialog::file::foo(fList) selection clear 0 end $::tk::dialog::file::foo(fList) selection set $i diff --git a/unix/Makefile.in b/unix/Makefile.in index a157615..2319180 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -266,8 +266,8 @@ TCL_STUB_FLAGS = @TCL_STUB_FLAGS@ # 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@ +LIBS = @LIBS@ $(X11_LIB_SWITCHES) @TCL_LIBS@ @CUPS_LIBS@ +WISH_LIBS = $(TCL_LIB_SPEC) @LIBS@ $(X11_LIB_SWITCHES) @TCL_LIBS@ @CUPS_LIBS@ @EXTRA_WISH_LIBS@ # The symbols below provide support for dynamic loading and shared # libraries. See configure.ac for a description of what the @@ -299,6 +299,10 @@ REZ_SWITCHES = @REZ_FLAGS@ -i $(GENERIC_DIR) -i $(TCL_GENERIC_DIR) XFT_CFLAGS = @XFT_CFLAGS@ XFT_LIBS = @XFT_LIBS@ +# support for libcups +CUPS_CFLAGS = @CUPS_CFLAGS@ +CUPS_LIBS = @CUPS_LIBS@ + #---------------------------------------------------------------- # The information below is modified by the configure script when # Makefile is generated from Makefile.in. You shouldn't normally @@ -394,15 +398,16 @@ X11_OBJS = tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixConfig.o \ tkUnixCursor.o tkUnixDraw.o tkUnixEmbed.o tkUnixEvent.o tkIcu.o \ tkUnixFocus.o $(FONT_OBJS) tkUnixInit.o tkUnixKey.o tkUnixMenu.o \ tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o tkUnixSelect.o \ - tkUnixSend.o tkUnixSysNotify.o tkUnixSysTray.o tkUnixWm.o tkUnixXId.o + tkUnixSend.o tkUnixSysNotify.o tkUnixSysTray.o tkUnixWm.o tkUnixXId.o \ + tkUnixPrint.o AQUA_OBJS = tkMacOSXBitmap.o tkMacOSXButton.o tkMacOSXClipboard.o \ tkMacOSXColor.o tkMacOSXConfig.o tkMacOSXCursor.o tkMacOSXDebug.o \ tkMacOSXDialog.o tkMacOSXDraw.o tkMacOSXEmbed.o tkMacOSXEntry.o \ tkMacOSXEvent.o tkMacOSXFileTypes.o tkMacOSXFont.o tkMacOSXHLEvents.o \ - tkMacOSXImage.o tkMacOSXInit.o tkMacOSXKeyboard.o tkMacOSXKeyEvent.o \ + tkMacOSXImage.o tkMacOSXInit.o tkMacOSXKeyboard.o tkMacOSXKeyEvent.o \ tkMacOSXMenu.o tkMacOSXMenubutton.o tkMacOSXMenus.o \ - tkMacOSXMouseEvent.o tkMacOSXNotify.o tkMacOSXPrint.o tkMacOSXRegion.o \ + tkMacOSXMouseEvent.o tkMacOSXNotify.o tkMacOSXPrint.o tkMacOSXRegion.o \ tkMacOSXScrlbr.o tkMacOSXSend.o tkMacOSXServices.o \ tkMacOSXSubwindows.o tkMacOSXSysTray.o tkMacOSXWindowEvent.o tkMacOSXWm.o \ tkMacOSXXStubs.o tkFileFilter.o tkMacWinMenu.o tkPointer.o tkUnix3d.o \ @@ -516,7 +521,8 @@ X11_SRCS = \ $(UNIX_DIR)/tkUnixScale.c $(UNIX_DIR)/tkUnixScrlbr.c \ $(UNIX_DIR)/tkUnixSelect.c $(UNIX_DIR)/tkUnixSend.c \ $(UNIX_DIR)/tkUnixSysNotify $(UNIX_DIR)/tkUnixSysTray.c \ - $(UNIX_DIR)/tkUnixWm.c $(UNIX_DIR)/tkUnixXId.c + $(UNIX_DIR)/tkUnixWm.c $(UNIX_DIR)/tkUnixXId.c \ + $(UNIX_DIR)/tkUnixPrint.c AQUA_SRCS = \ $(MAC_OSX_DIR)/tkMacOSXBitmap.c $(MAC_OSX_DIR)/tkMacOSXButton.c \ @@ -642,7 +648,7 @@ ${LIB_FILE}: ${STUB_LIB_FILE} @LIB_RSRC_FILE@ ${OBJS} ${TK_ZIP_FILE} if test "x$(MACHER)" = "x" ; then \ cat ${TK_ZIP_FILE} >> ${LIB_FILE}; \ else $(MACHER) append ${LIB_FILE} ${TK_ZIP_FILE} /tmp/macher_output; \ - mv /tmp/macher_output ${LIB_FILE}; chmod u+x ${LIB_FILE}; \ + mv /tmp/macher_output ${LIB_FILE}; chmod u+x ${LIB_FILE}; \ fi; \ ${NATIVE_ZIP} -A ${LIB_FILE} \ || echo 'ignore zip-error by adjust sfx process (not executable?)'; \ @@ -684,7 +690,7 @@ ${WISH_EXE}: $(TK_STUB_LIB_FILE) $(WISH_OBJS) $(TK_LIB_FILE) @APP_RSRC_FILE@ if test "x$(MACHER)" = "x" ; then \ cat ${TK_ZIP_FILE} >> ${WISH_EXE}; \ else $(MACHER) append ${WISH_EXE} ${TK_ZIP_FILE} /tmp/macher_output; \ - mv /tmp/macher_output ${LIB_FILE}; chmod u+x ${LIB_FILE}; \ + mv /tmp/macher_output ${LIB_FILE}; chmod u+x ${LIB_FILE}; \ fi; \ ${NATIVE_ZIP} -A ${WISH_EXE} \ || echo 'ignore zip-error by adjust sfx process (not executable?)'; \ @@ -1330,6 +1336,9 @@ tkUnixMenu.o: $(UNIX_DIR)/tkUnixMenu.c tkUnixMenubu.o: $(UNIX_DIR)/tkUnixMenubu.c $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixMenubu.c +tkUnixPrint.o: $(UNIX_DIR)/tkUnixPrint.c + $(CC) -c $(CC_SWITCHES) $(CUPS_CFLAGS) $(UNIX_DIR)/tkUnixPrint.c + tkUnixScale.o: $(UNIX_DIR)/tkUnixScale.c $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixScale.c @@ -1730,15 +1739,10 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tkConfig.h.in $(UNIX_DIR)/tk.pc.in $(MAC $(DIST_INSTALL_DATA) $(MAC_OSX_DIR)/GNUmakefile $(MAC_OSX_DIR)/README \ $(MAC_OSX_DIR)/*.icns $(MAC_OSX_DIR)/*.tiff \ $(MAC_OSX_DIR)/*.[ch] $(MAC_OSX_DIR)/*.in \ - $(MAC_OSX_DIR)/*.ac $(MAC_OSX_DIR)/*.xcconfig \ - $(MAC_OSX_DIR)/*.sdef \ + $(MAC_OSX_DIR)/*.ac $(MAC_OSX_DIR)/*.sdef \ $(DISTDIR)/macosx $(DIST_INSTALL_SCRIPT) $(MAC_OSX_DIR)/configure $(DISTDIR)/macosx $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(DISTDIR)/macosx - $(INSTALL_DATA_DIR) $(DISTDIR)/macosx/Tk.xcodeproj - $(DIST_INSTALL_DATA) $(MAC_OSX_DIR)/Tk.xcodeproj/project.pbxproj \ - $(MAC_OSX_DIR)/Tk.xcodeproj/default.pbxuser \ - $(DISTDIR)/macosx/Tk.xcodeproj $(INSTALL_DATA_DIR) $(DISTDIR)/compat $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms \ $(TOP_DIR)/compat/stdbool.h $(DISTDIR)/compat @@ -1806,7 +1810,7 @@ alldist: dist # This target creates the HTML folder for Tcl & Tk and places it # in DISTDIR/html. It uses the tcltk-man2html.tcl tool from # the Tcl group's tool workspace. It depends on the Tcl & Tk being -# in directories called tcl8.3 & tk8.3 up two directories from the +# in directories called tcl9.0 & tk9.0 up two directories from the # TOOL_DIR. # diff --git a/unix/configure b/unix/configure index ff77a98..4b7b43d 100755 --- a/unix/configure +++ b/unix/configure @@ -696,6 +696,8 @@ ZIP_PROG MACHER_PROG EXEEXT_FOR_BUILD CC_FOR_BUILD +CUPS_LIBS +CUPS_CFLAGS UNIX_FONT_OBJS XFT_LIBS XFT_CFLAGS @@ -811,6 +813,7 @@ enable_symbols enable_aqua with_x enable_xft +enable_libcups enable_xss enable_framework enable_zipfs @@ -1464,6 +1467,7 @@ Optional Features: --enable-symbols build with debugging symbols (default: off) --enable-aqua=yes|no use Aqua windowingsystem on Mac OS X (default: no) --enable-xft use freetype/fontconfig/xft (default: on) + --enable-libcups use libcups (default: on) --enable-xss use XScreenSaver for activity timer (default: on) --enable-framework package shared libraries in MacOSX frameworks (default: off) @@ -2603,7 +2607,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu TK_VERSION=9.0 TK_MAJOR_VERSION=9 TK_MINOR_VERSION=0 -TK_PATCH_LEVEL="b3" +TK_PATCH_LEVEL=".1" VERSION=${TK_VERSION} LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv" @@ -2743,11 +2747,11 @@ printf "%s\n" "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } printf %s "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: loading" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: loading" >&5 printf "%s\n" "loading" >&6; } . "${TCL_BIN_DIR}/tclConfig.sh" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } fi @@ -2758,9 +2762,9 @@ printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } # instead of TCL_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. if test -f "${TCL_BIN_DIR}/Makefile" ; then - TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}" - TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}" - TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}" + TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}" + TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}" + TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}" elif test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works @@ -4610,7 +4614,7 @@ then : ;; *) # Make sure only first arg gets _r - CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` + CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5 @@ -5184,19 +5188,19 @@ fi if test "$do64bit" = yes then : - if test "$GCC" = yes + if test "$GCC" = yes then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5 printf "%s\n" "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} else case e in #( e) - do64bit_ok=yes - SHLIB_LD="ld -64 -shared -rdata_shared" - CFLAGS="$CFLAGS -64" - LDFLAGS_ARCH="-64" - ;; + do64bit_ok=yes + SHLIB_LD="ld -64 -shared -rdata_shared" + CFLAGS="$CFLAGS -64" + LDFLAGS_ARCH="-64" + ;; esac fi @@ -5519,46 +5523,6 @@ fi esac fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5 -printf %s "checking if ld accepts -single_module flag... " >&6; } -if test ${tcl_cv_ld_single_module+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) - hold_ldflags=$LDFLAGS - LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -int i; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - tcl_cv_ld_single_module=yes -else case e in #( - e) tcl_cv_ld_single_module=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$hold_ldflags ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5 -printf "%s\n" "$tcl_cv_ld_single_module" >&6; } - if test $tcl_cv_ld_single_module = yes -then : - - SHLIB_LD="${SHLIB_LD} -Wl,-single_module" - -fi SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" @@ -5681,7 +5645,7 @@ then : for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' - done + done fi LIBS=$hold_libs ;; esac @@ -5746,7 +5710,7 @@ then : printf "%s\n" "#define NO_COREFOUNDATION_64 1" >>confdefs.h - LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings" + LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings" fi @@ -5767,11 +5731,11 @@ printf "%s\n" "#define _OE_SOCKETS 1" >>confdefs.h if test "$SHARED_BUILD" = 1 then : - SHLIB_LD='${CC} -shared' + SHLIB_LD='${CC} -shared' else case e in #( e) - SHLIB_LD='${CC} -non_shared' + SHLIB_LD='${CC} -non_shared' ;; esac fi @@ -6114,7 +6078,7 @@ esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$hold_ldflags ;; + LDFLAGS=$hold_ldflags ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5 @@ -6232,37 +6196,37 @@ fi if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != "" then : - LIB_SUFFIX=${SHARED_LIB_SUFFIX} - MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${LDFLAGS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - if test "${SHLIB_SUFFIX}" = ".dll" + LIB_SUFFIX=${SHARED_LIB_SUFFIX} + MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${LDFLAGS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' + if test "${SHLIB_SUFFIX}" = ".dll" then : - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)"' - DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)"' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" else case e in #( e) - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' - ;; + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' + ;; esac fi else case e in #( e) - LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} + LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} - if test "$RANLIB" = "" + if test "$RANLIB" = "" then : - MAKE_LIB='$(STLIB_LD) $@ ${OBJS}' + MAKE_LIB='$(STLIB_LD) $@ ${OBJS}' else case e in #( e) - MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@' - ;; + MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@' + ;; esac fi - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' ;; esac fi @@ -6271,11 +6235,11 @@ fi if test "$RANLIB" = "" then : - MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}' + MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}' else case e in #( e) - MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@' + MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@' ;; esac fi @@ -6287,7 +6251,7 @@ fi if test "x${TCL_LIBS}" = x then : - TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}" + TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}" fi @@ -6724,15 +6688,15 @@ else case e in #( # See if we could use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { switch (0) { - case 1: case (sizeof(long long)==sizeof(long)): ; - } + case 1: case (sizeof(long long)==sizeof(long)): ; + } ; return 0; } @@ -6878,7 +6842,7 @@ int main (void) { struct dirent64 *p; DIR64 d = opendir64("."); - p = readdir64(d); rewinddir64(d); closedir64(d); + p = readdir64(d); rewinddir64(d); closedir64(d); ; return 0; } @@ -6945,8 +6909,8 @@ esac fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ - test "x${ac_cv_func_lseek64}" = "xyes" && \ - test "x${ac_cv_func_open64}" = "xyes" ; then + test "x${ac_cv_func_lseek64}" = "xyes" && \ + test "x${ac_cv_func_open64}" = "xyes" ; then printf "%s\n" "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h @@ -7215,11 +7179,11 @@ fi if test "$TCL_PREFIX" != "$prefix"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: - Different --prefix selected for Tk and Tcl! - [package require tk] may not work correctly in tclsh." >&5 + Different --prefix selected for Tk and Tcl! + [package require tk] may not work correctly in tclsh." >&5 printf "%s\n" "$as_me: WARNING: - Different --prefix selected for Tk and Tcl! - [package require tk] may not work correctly in tclsh." >&2;} + Different --prefix selected for Tk and Tcl! + [package require tk] may not work correctly in tclsh." >&2;} fi #-------------------------------------------------------------------- @@ -7794,102 +7758,6 @@ then : fi - if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if weak import is available" >&5 -printf %s "checking if weak import is available... " >&6; } -if test ${tcl_cv_cc_weak_import+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020 - #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020 - #endif - #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020 - #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020 - #endif - int rand(void) __attribute__((weak_import)); - -int -main (void) -{ -rand(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - tcl_cv_cc_weak_import=yes -else case e in #( - e) tcl_cv_cc_weak_import=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS=$hold_cflags ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_weak_import" >&5 -printf "%s\n" "$tcl_cv_cc_weak_import" >&6; } - if test $tcl_cv_cc_weak_import = yes; then - -printf "%s\n" "#define HAVE_WEAK_IMPORT 1" >>confdefs.h - - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Darwin SUSv3 extensions are available" >&5 -printf %s "checking if Darwin SUSv3 extensions are available... " >&6; } -if test ${tcl_cv_cc_darwin_c_source+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 - #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 - #endif - #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1050 - #error MAC_OS_X_VERSION_MIN_REQUIRED < 1050 - #endif - #define _DARWIN_C_SOURCE 1 - #include <sys/cdefs.h> - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - tcl_cv_cc_darwin_c_source=yes -else case e in #( - e) tcl_cv_cc_darwin_c_source=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$hold_cflags ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_darwin_c_source" >&5 -printf "%s\n" "$tcl_cv_cc_darwin_c_source" >&6; } - if test $tcl_cv_cc_darwin_c_source = yes; then - -printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h - - fi - fi else tk_aqua=no fi @@ -7900,10 +7768,10 @@ printf "%s\n" "#define MAC_OSX_TK 1" >>confdefs.h LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit -framework QuartzCore -framework Security -framework CoreGraphics" if test -d /System/Library/Frameworks/UserNotifications.framework; then - LIBS="$LIBS -framework UserNotifications" + LIBS="$LIBS -framework UserNotifications" fi if test -d "/System/Library/Frameworks/UniformTypeIdentifiers.framework"; then - LIBS="$LIBS -weak_framework UniformTypeIdentifiers" + LIBS="$LIBS -weak_framework UniformTypeIdentifiers" fi EXTRA_CC_SWITCHES='-x objective-c' TK_WINDOWINGSYSTEM=AQUA @@ -8613,7 +8481,7 @@ printf "%s\n" "$as_me: WARNING: Can't find xft configuration, or xft is unusable XFT_CFLAGS="" XFT_LIBS="" else - enable_xft=yes + enable_xft=yes fi fi if test $enable_xft = "yes" ; then @@ -8630,6 +8498,66 @@ printf "%s\n" "#define HAVE_XFT 1" >>confdefs.h fi #-------------------------------------------------------------------- +# Check for libcups support +#-------------------------------------------------------------------- + +if test $tk_aqua = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use libcups" >&5 +printf %s "checking whether to use libcups... " >&6; } + # Check whether --enable-libcups was given. +if test ${enable_libcups+y} +then : + enableval=$enable_libcups; enable_libcups=$enableval +else case e in #( + e) enable_libcups="default" ;; +esac +fi + + CUPS_CFLAGS="" + CUPS_LIBS="" + if test "$enable_libcups" = "no" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_libcups" >&5 +printf "%s\n" "$enable_libcups" >&6; } + else + found_cups=`cups-config 2>/dev/null` + if test "$found_cups" = ""; then + found_cups=no + else + found_cups=yes + CUPS_CFLAGS="-DHAVE_CUPS" + CUPS_LIBS=`cups-config --libs` + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $found_cups" >&5 +printf "%s\n" "$found_cups" >&6; } + if test "$found_cups" = "yes" ; then + tk_oldCFlags=$CFLAGS + CFLAGS="$CFLAGS $XINCLUDES $CUPS_CFLAGS" + tk_oldLibs=$LIBS + LIBS="$tk_oldLIBS $CUPS_LIBS $XLIBSW" + ac_fn_c_check_header_compile "$LINENO" "cups/cups.h" "ac_cv_header_cups_cups_h" "#include <cups/cups.h> +" +if test "x$ac_cv_header_cups_cups_h" = xyes +then : + +else case e in #( + e) + found_cups=no + CUPS_CFLAGS="" + CUPS_LIBS="" + ;; +esac +fi + + CFLAGS=$tk_oldCFlags + LIBS=$tk_oldLibs + fi + fi + + +fi + + +#-------------------------------------------------------------------- # XXX Do this last. # It might modify XLIBSW which could affect other tests. # @@ -8950,8 +8878,8 @@ printf "%s\n" "#define TK_FRAMEWORK 1" >>confdefs.h LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then - # override libdir default - libdir="/Library/Frameworks" + # override libdir default + libdir="/Library/Frameworks" fi if test ${TCL_MAJOR_VERSION} = 8 ; then TK_LIB_FILE="Tk" @@ -8994,7 +8922,7 @@ printf "%s\n" "#define TK_FRAMEWORK 1" >>confdefs.h EXTRA_CC_SWITCHES="$EXTRA_CC_SWITCHES"' -DTK_FRAMEWORK_VERSION=\"$(VERSION)\"' else if test $tk_aqua = yes; then - EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done' + EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done' fi # libdir must be a fully qualified path and not ${exec_prefix}/lib eval libdir="$libdir" @@ -9035,28 +8963,28 @@ if test "$tcl_ok" = "yes" -a "x$enable_framework" != "xyes"; then # Put a plausible default for CC_FOR_BUILD in Makefile. if test -z "$CC_FOR_BUILD"; then if test "x$cross_compiling" = "xno"; then - CC_FOR_BUILD='$(CC)' + CC_FOR_BUILD='$(CC)' else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc" >&5 printf %s "checking for gcc... " >&6; } - if test ${ac_cv_path_cc+y} + if test ${ac_cv_path_cc+y} then : printf %s "(cached) " >&6 else case e in #( e) - search_path=`echo ${PATH} | sed -e 's/:/ /g'` - for dir in $search_path ; do - for j in `ls -r $dir/gcc 2> /dev/null` \ - `ls -r $dir/gcc 2> /dev/null` ; do - if test x"$ac_cv_path_cc" = x ; then - if test -f "$j" ; then - ac_cv_path_cc=$j - break - fi - fi - done - done - ;; + search_path=`echo ${PATH} | sed -e 's/:/ /g'` + for dir in $search_path ; do + for j in `ls -r $dir/gcc 2> /dev/null` \ + `ls -r $dir/gcc 2> /dev/null` ; do + if test x"$ac_cv_path_cc" = x ; then + if test -f "$j" ; then + ac_cv_path_cc=$j + break + fi + fi + done + done + ;; esac fi @@ -9076,17 +9004,17 @@ then : printf %s "(cached) " >&6 else case e in #( e) rm -f conftest* - echo 'int main () { return 0; }' > conftest.c - bfd_cv_build_exeext= - ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 - for file in conftest.*; do - case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; - *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - rm -f conftest* - test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no ;; + echo 'int main () { return 0; }' > conftest.c + bfd_cv_build_exeext= + ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 + for file in conftest.*; do + case $file in + *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + rm -f conftest* + test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_build_exeext" >&5 @@ -9114,25 +9042,25 @@ else case e in #( e) search_path=`echo ${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do - for j in `ls -r $dir/macher 2> /dev/null` \ - `ls -r $dir/macher 2> /dev/null` ; do - if test x"$ac_cv_path_macher" = x ; then - if test -f "$j" ; then - ac_cv_path_macher=$j - break - fi - fi - done + for j in `ls -r $dir/macher 2> /dev/null` \ + `ls -r $dir/macher 2> /dev/null` ; do + if test x"$ac_cv_path_macher" = x ; then + if test -f "$j" ; then + ac_cv_path_macher=$j + break + fi + fi + done done ;; esac fi if test -f "$ac_cv_path_macher" ; then - MACHER_PROG="$ac_cv_path_macher" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACHER_PROG" >&5 + MACHER_PROG="$ac_cv_path_macher" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACHER_PROG" >&5 printf "%s\n" "$MACHER_PROG" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found macher in environment" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found macher in environment" >&5 printf "%s\n" "Found macher in environment" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip" >&5 @@ -9144,37 +9072,37 @@ else case e in #( e) search_path=`echo ${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do - for j in `ls -r $dir/zip 2> /dev/null` \ - `ls -r $dir/zip 2> /dev/null` ; do - if test x"$ac_cv_path_zip" = x ; then - if test -f "$j" ; then - ac_cv_path_zip=$j - break - fi - fi - done + for j in `ls -r $dir/zip 2> /dev/null` \ + `ls -r $dir/zip 2> /dev/null` ; do + if test x"$ac_cv_path_zip" = x ; then + if test -f "$j" ; then + ac_cv_path_zip=$j + break + fi + fi + done done ;; esac fi if test -f "$ac_cv_path_zip" ; then - ZIP_PROG="$ac_cv_path_zip" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZIP_PROG" >&5 + ZIP_PROG="$ac_cv_path_zip" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZIP_PROG" >&5 printf "%s\n" "$ZIP_PROG" >&6; } - ZIP_PROG_OPTIONS="-rq" - ZIP_PROG_VFSSEARCH="*" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found INFO Zip in environment" >&5 + ZIP_PROG_OPTIONS="-rq" + ZIP_PROG_VFSSEARCH="*" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found INFO Zip in environment" >&5 printf "%s\n" "Found INFO Zip in environment" >&6; } - # Use standard arguments for zip + # Use standard arguments for zip else - # It is not an error if an installed version of Zip can't be located. - # We can use the locally distributed minizip instead - ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}" - ZIP_PROG_OPTIONS="-o -r" - ZIP_PROG_VFSSEARCH="*" - ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: No zip found on PATH. Building minizip" >&5 + # It is not an error if an installed version of Zip can't be located. + # We can use the locally distributed minizip instead + ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}" + ZIP_PROG_OPTIONS="-o -r" + ZIP_PROG_VFSSEARCH="*" + ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: No zip found on PATH. Building minizip" >&5 printf "%s\n" "No zip found on PATH. Building minizip" >&6; } fi @@ -10450,12 +10378,12 @@ printf "%s\n" "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "Tk.framework":C) n=Tk && - f=$n.framework && v=Versions/$VERSION && - rm -rf $f && mkdir -p $f/$v/Resources && - ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && - ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && - if test $tk_aqua = yes; then ln -s ../../../../$n.rsrc $f/$v/Resources; fi && - unset n f v + f=$n.framework && v=Versions/$VERSION && + rm -rf $f && mkdir -p $f/$v/Resources && + ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && + ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && + if test $tk_aqua = yes; then ln -s ../../../../$n.rsrc $f/$v/Resources; fi && + unset n f v ;; esac diff --git a/unix/configure.ac b/unix/configure.ac index 3bacf8b..0e30571 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -26,7 +26,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ TK_VERSION=9.0 TK_MAJOR_VERSION=9 TK_MINOR_VERSION=0 -TK_PATCH_LEVEL="b3" +TK_PATCH_LEVEL=".1" VERSION=${TK_VERSION} LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv" @@ -141,8 +141,8 @@ fi if test "$TCL_PREFIX" != "$prefix"; then AC_MSG_WARN([ - Different --prefix selected for Tk and Tcl! - [[package require tk]] may not work correctly in tclsh.]) + Different --prefix selected for Tk and Tcl! + [[package require tk]] may not work correctly in tclsh.]) fi #-------------------------------------------------------------------- @@ -236,44 +236,6 @@ if test "`uname -s`" = "Darwin" ; then LDFLAGS=$hold_ldflags]) fi AC_CHECK_HEADERS(AvailabilityMacros.h) - if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - AC_CACHE_CHECK([if weak import is available], tcl_cv_cc_weak_import, [ - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020 - #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020 - #endif - #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020 - #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020 - #endif - int rand(void) __attribute__((weak_import)); - ]], [[rand();]])], - [tcl_cv_cc_weak_import=yes],[tcl_cv_cc_weak_import=no]) - CFLAGS=$hold_cflags]) - if test $tcl_cv_cc_weak_import = yes; then - AC_DEFINE(HAVE_WEAK_IMPORT, 1, [Is weak import available?]) - fi - AC_CACHE_CHECK([if Darwin SUSv3 extensions are available], - tcl_cv_cc_darwin_c_source, [ - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 - #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 - #endif - #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1050 - #error MAC_OS_X_VERSION_MIN_REQUIRED < 1050 - #endif - #define _DARWIN_C_SOURCE 1 - #include <sys/cdefs.h> - ]], [[]])],[tcl_cv_cc_darwin_c_source=yes],[tcl_cv_cc_darwin_c_source=no]) - CFLAGS=$hold_cflags]) - if test $tcl_cv_cc_darwin_c_source = yes; then - AC_DEFINE(_DARWIN_C_SOURCE, 1, - [Are Darwin SUSv3 extensions available?]) - fi - fi else tk_aqua=no fi @@ -282,15 +244,15 @@ if test $tk_aqua = yes; then AC_DEFINE(MAC_OSX_TK, 1, [Are we building TkAqua?]) LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit -framework QuartzCore -framework Security -framework CoreGraphics" if test -d /System/Library/Frameworks/UserNotifications.framework; then - LIBS="$LIBS -framework UserNotifications" + LIBS="$LIBS -framework UserNotifications" fi if test -d "/System/Library/Frameworks/UniformTypeIdentifiers.framework"; then - LIBS="$LIBS -weak_framework UniformTypeIdentifiers" + LIBS="$LIBS -weak_framework UniformTypeIdentifiers" fi EXTRA_CC_SWITCHES='-x objective-c' TK_WINDOWINGSYSTEM=AQUA if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then - AC_DEFINE(TK_MAC_DEBUG, 1, [Are TkAqua debug messages enabled?]) + AC_DEFINE(TK_MAC_DEBUG, 1, [Are TkAqua debug messages enabled?]) fi else #-------------------------------------------------------------------- @@ -452,7 +414,7 @@ if test $tk_aqua = no; then XFT_CFLAGS="" XFT_LIBS="" else - enable_xft=yes + enable_xft=yes fi fi if test $enable_xft = "yes" ; then @@ -467,6 +429,52 @@ if test $tk_aqua = no; then fi #-------------------------------------------------------------------- +# Check for libcups support +#-------------------------------------------------------------------- + +if test $tk_aqua = no; then + AC_MSG_CHECKING([whether to use libcups]) + AC_ARG_ENABLE(libcups, + AS_HELP_STRING([--enable-libcups], + [use libcups (default: on)]), + [enable_libcups=$enableval], [enable_libcups="default"]) + CUPS_CFLAGS="" + CUPS_LIBS="" + if test "$enable_libcups" = "no" ; then + AC_MSG_RESULT([$enable_libcups]) + else + found_cups=`cups-config 2>/dev/null` + dnl make sure package configurator (cups-config) + dnl says that libcups is present. + if test "$found_cups" = ""; then + found_cups=no + else + found_cups=yes + CUPS_CFLAGS="-DHAVE_CUPS" + CUPS_LIBS=`cups-config --libs` + fi + AC_MSG_RESULT([$found_cups]) + dnl make sure that compiling against CUPS header file doesn't bomb + if test "$found_cups" = "yes" ; then + tk_oldCFlags=$CFLAGS + CFLAGS="$CFLAGS $XINCLUDES $CUPS_CFLAGS" + tk_oldLibs=$LIBS + LIBS="$tk_oldLIBS $CUPS_LIBS $XLIBSW" + AC_CHECK_HEADER(cups/cups.h, [], [ + found_cups=no + CUPS_CFLAGS="" + CUPS_LIBS="" + ],[#include <cups/cups.h>]) + CFLAGS=$tk_oldCFlags + LIBS=$tk_oldLibs + fi + fi + AC_SUBST(CUPS_CFLAGS) + AC_SUBST(CUPS_LIBS) +fi + + +#-------------------------------------------------------------------- # XXX Do this last. # It might modify XLIBSW which could affect other tests. # @@ -584,17 +592,17 @@ if test "$FRAMEWORK_BUILD" = "1" ; then # Construct a fake local framework structure to make linking with # '-framework Tk' and running of tktest work AC_CONFIG_COMMANDS([Tk.framework], [n=Tk && - f=$n.framework && v=Versions/$VERSION && - rm -rf $f && mkdir -p $f/$v/Resources && - ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && - ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && - if test $tk_aqua = yes; then ln -s ../../../../$n.rsrc $f/$v/Resources; fi && - unset n f v + f=$n.framework && v=Versions/$VERSION && + rm -rf $f && mkdir -p $f/$v/Resources && + ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && + ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && + if test $tk_aqua = yes; then ln -s ../../../../$n.rsrc $f/$v/Resources; fi && + unset n f v ], VERSION=${TK_VERSION} && tk_aqua=${tk_aqua}) LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then - # override libdir default - libdir="/Library/Frameworks" + # override libdir default + libdir="/Library/Frameworks" fi if test ${TCL_MAJOR_VERSION} = 8 ; then TK_LIB_FILE="Tk" @@ -637,7 +645,7 @@ if test "$FRAMEWORK_BUILD" = "1" ; then EXTRA_CC_SWITCHES="$EXTRA_CC_SWITCHES"' -DTK_FRAMEWORK_VERSION=\"$(VERSION)\"' else if test $tk_aqua = yes; then - EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done' + EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done' fi # libdir must be a fully qualified path and not ${exec_prefix}/lib eval libdir="$libdir" diff --git a/unix/installManPage b/unix/installManPage index 1e29bb0..f2e2f53 100755 --- a/unix/installManPage +++ b/unix/installManPage @@ -12,8 +12,8 @@ Suffix="" while true; do case $1 in - -s | --symlinks ) Sym="-s " ;; - -z | --compress ) Gzip=$2; shift ;; + -s | --symlinks ) Sym="-s " ;; + -z | --compress ) Gzip=$2; shift ;; -e | --extension ) Gz=$2; shift ;; -x | --suffix ) Suffix=$2; shift ;; -*) cat <<EOF diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 7b84923..f968bd2 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -287,10 +287,10 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [ AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh]) if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then - AC_MSG_RESULT([loading]) + AC_MSG_RESULT([loading]) . "${TCL_BIN_DIR}/tclConfig.sh" else - AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh]) + AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh]) fi # If the TCL_BIN_DIR is the build directory (not the install directory), @@ -300,9 +300,9 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [ # instead of TCL_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. if test -f "${TCL_BIN_DIR}/Makefile" ; then - TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}" - TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}" - TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}" + TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}" + TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}" + TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}" elif test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works @@ -360,10 +360,10 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [ AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh]) if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then - AC_MSG_RESULT([loading]) + AC_MSG_RESULT([loading]) . "${TK_BIN_DIR}/tkConfig.sh" else - AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh]) + AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh]) fi # If the TK_BIN_DIR is the build directory (not the install directory), @@ -373,9 +373,9 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [ # instead of TK_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. if test -f "${TK_BIN_DIR}/Makefile" ; then - TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}" - TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}" - TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}" + TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}" + TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}" + TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}" elif test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works @@ -990,7 +990,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ ;; *) # Make sure only first arg gets _r - CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'` + CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'` ;; esac AC_MSG_RESULT([Using $CC for compiling with threads]) @@ -1249,14 +1249,14 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # Check to enable 64-bit flags for compiler/linker AS_IF([test "$do64bit" = yes], [ - AS_IF([test "$GCC" = yes], [ - AC_MSG_WARN([64bit mode not supported by gcc]) - ], [ - do64bit_ok=yes - SHLIB_LD="ld -64 -shared -rdata_shared" - CFLAGS="$CFLAGS -64" - LDFLAGS_ARCH="-64" - ]) + AS_IF([test "$GCC" = yes], [ + AC_MSG_WARN([64bit mode not supported by gcc]) + ], [ + do64bit_ok=yes + SHLIB_LD="ld -64 -shared -rdata_shared" + CFLAGS="$CFLAGS -64" + LDFLAGS_ARCH="-64" + ]) ]) ;; Linux*|GNU*|NetBSD-Debian|DragonFly-*|FreeBSD-*) @@ -1424,15 +1424,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ fat_32_64=yes]) ]) SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [ - hold_ldflags=$LDFLAGS - LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;]])],[tcl_cv_ld_single_module=yes], - [tcl_cv_ld_single_module=no]) - LDFLAGS=$hold_ldflags]) - AS_IF([test $tcl_cv_ld_single_module = yes], [ - SHLIB_LD="${SHLIB_LD} -Wl,-single_module" - ]) SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" @@ -1485,7 +1476,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AS_IF([test "$fat_32_64" = yes], [ for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' - done]) + done]) LIBS=$hold_libs]) AS_IF([test $tcl_cv_lib_corefoundation = yes], [ LIBS="$LIBS -framework CoreFoundation" @@ -1508,7 +1499,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AS_IF([test $tcl_cv_lib_corefoundation_64 = no], [ AC_DEFINE(NO_COREFOUNDATION_64, 1, [Is Darwin CoreFoundation unavailable for 64-bit?]) - LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings" + LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings" ]) ]) ]) @@ -1523,9 +1514,9 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # Digital OSF/1 SHLIB_CFLAGS="" AS_IF([test "$SHARED_BUILD" = 1], [ - SHLIB_LD='${CC} -shared' + SHLIB_LD='${CC} -shared' ], [ - SHLIB_LD='${CC} -non_shared' + SHLIB_LD='${CC} -non_shared' ]) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" @@ -1722,7 +1713,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;]])],[tcl_cv_ld_Bexport=yes],[tcl_cv_ld_Bexport=no]) - LDFLAGS=$hold_ldflags]) + LDFLAGS=$hold_ldflags]) AS_IF([test $tcl_cv_ld_Bexport = yes], [ LDFLAGS="$LDFLAGS -Wl,-Bexport" ]) @@ -1798,30 +1789,30 @@ dnl # preprocessing tests use only CPPFLAGS. DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [ - LIB_SUFFIX=${SHARED_LIB_SUFFIX} - MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${LDFLAGS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - AS_IF([test "${SHLIB_SUFFIX}" = ".dll"], [ - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)"' - DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" - ], [ - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' - ]) + LIB_SUFFIX=${SHARED_LIB_SUFFIX} + MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${LDFLAGS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' + AS_IF([test "${SHLIB_SUFFIX}" = ".dll"], [ + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)"' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + ], [ + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' + ]) ], [ - LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} - - AS_IF([test "$RANLIB" = ""], [ - MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}' - ], [ - MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@' - ]) - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' + LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} + + AS_IF([test "$RANLIB" = ""], [ + MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}' + ], [ + MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@' + ]) + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' ]) # Stub lib does not depend on shared/static configuration AS_IF([test "$RANLIB" = ""], [ - MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}' + MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}' ], [ - MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@' + MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@' ]) INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"' @@ -1829,7 +1820,7 @@ dnl # preprocessing tests use only CPPFLAGS. # The trick here is that we don't want to change the value of TCL_LIBS if # it is already set when tclConfig.sh had been loaded by Tk. AS_IF([test "x${TCL_LIBS}" = x], [ - TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"]) + TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"]) AC_SUBST(TCL_LIBS) # See if the compiler supports casting to a union type. @@ -1931,7 +1922,6 @@ dnl # preprocessing tests use only CPPFLAGS. # Results: # # Defines some of the following vars: -# NO_STRING_H # NO_SYS_WAIT_H # NO_DLFCN_H # HAVE_SYS_PARAM_H @@ -1944,13 +1934,6 @@ AC_DEFUN([SC_MISSING_POSIX_HEADERS], [ AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0) AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0) - # See also memmove check below for a place where NO_STRING_H can be - # set and why. - - if test $tcl_ok = 0; then - AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?]) - fi - AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])]) AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <dlfcn.h>?])]) @@ -2352,9 +2335,9 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [ # See if we could use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[switch (0) { - case 1: case (sizeof(long long)==sizeof(long)): ; - }]])],[tcl_cv_type_64bit="long long"],[])]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[switch (0) { + case 1: case (sizeof(long long)==sizeof(long)): ; + }]])],[tcl_cv_type_64bit="long long"],[])]) if test "${tcl_cv_type_64bit}" = none ; then AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Do 'long' and 'long long' have the same size (64-bit)?]) AC_MSG_RESULT([yes]) @@ -2389,7 +2372,7 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [ AC_CACHE_CHECK([for DIR64], tcl_cv_DIR64,[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> #include <dirent.h>]], [[struct dirent64 *p; DIR64 d = opendir64("."); - p = readdir64(d); rewinddir64(d); closedir64(d);]])], + p = readdir64(d); rewinddir64(d); closedir64(d);]])], [tcl_cv_DIR64=yes], [tcl_cv_DIR64=no])]) if test "x${tcl_cv_DIR64}" = "xyes" ; then AC_DEFINE(HAVE_DIR64, 1, [Is 'DIR64' in <sys/types.h>?]) @@ -2404,8 +2387,8 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [ dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the dnl functions lseek64 and open64 are defined. if test "x${tcl_cv_type_off64_t}" = "xyes" && \ - test "x${ac_cv_func_lseek64}" = "xyes" && \ - test "x${ac_cv_func_open64}" = "xyes" ; then + test "x${ac_cv_func_lseek64}" = "xyes" && \ + test "x${ac_cv_func_open64}" = "xyes" ; then AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?]) AC_MSG_RESULT([yes]) else @@ -2907,7 +2890,7 @@ AC_DEFUN([SC_TCL_IPV6],[ ]]) if test "x$NEED_FAKE_RFC2553" = "x1"; then AC_DEFINE([NEED_FAKE_RFC2553], 1, - [Use compat implementation of getaddrinfo() and friends]) + [Use compat implementation of getaddrinfo() and friends]) AC_LIBOBJ([fake-rfc2553]) AC_CHECK_FUNC(strlcpy) fi @@ -2930,23 +2913,23 @@ dnl Get a default for CC_FOR_BUILD to put into Makefile. AC_DEFUN([AX_CC_FOR_BUILD],[# Put a plausible default for CC_FOR_BUILD in Makefile. if test -z "$CC_FOR_BUILD"; then if test "x$cross_compiling" = "xno"; then - CC_FOR_BUILD='$(CC)' + CC_FOR_BUILD='$(CC)' else - AC_MSG_CHECKING([for gcc]) - AC_CACHE_VAL(ac_cv_path_cc, [ - search_path=`echo ${PATH} | sed -e 's/:/ /g'` - for dir in $search_path ; do - for j in `ls -r $dir/gcc 2> /dev/null` \ - `ls -r $dir/gcc 2> /dev/null` ; do - if test x"$ac_cv_path_cc" = x ; then - if test -f "$j" ; then - ac_cv_path_cc=$j - break - fi - fi - done - done - ]) + AC_MSG_CHECKING([for gcc]) + AC_CACHE_VAL(ac_cv_path_cc, [ + search_path=`echo ${PATH} | sed -e 's/:/ /g'` + for dir in $search_path ; do + for j in `ls -r $dir/gcc 2> /dev/null` \ + `ls -r $dir/gcc 2> /dev/null` ; do + if test x"$ac_cv_path_cc" = x ; then + if test -f "$j" ; then + ac_cv_path_cc=$j + break + fi + fi + done + done + ]) fi fi AC_SUBST(CC_FOR_BUILD) @@ -2957,18 +2940,18 @@ AC_DEFUN([AX_CC_FOR_BUILD],[# Put a plausible default for CC_FOR_BUILD in Makefi else OBJEXT_FOR_BUILD='.no' AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext, - [rm -f conftest* - echo 'int main () { return 0; }' > conftest.c - bfd_cv_build_exeext= - ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 - for file in conftest.*; do - case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; - *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - rm -f conftest* - test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no]) + [rm -f conftest* + echo 'int main () { return 0; }' > conftest.c + bfd_cv_build_exeext= + ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 + for file in conftest.*; do + case $file in + *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + rm -f conftest* + test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no]) EXEEXT_FOR_BUILD="" test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} fi @@ -3004,52 +2987,52 @@ AC_DEFUN([SC_ZIPFS_SUPPORT], [ AC_CACHE_VAL(ac_cv_path_macher, [ search_path=`echo ${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do - for j in `ls -r $dir/macher 2> /dev/null` \ - `ls -r $dir/macher 2> /dev/null` ; do - if test x"$ac_cv_path_macher" = x ; then - if test -f "$j" ; then - ac_cv_path_macher=$j - break - fi - fi - done + for j in `ls -r $dir/macher 2> /dev/null` \ + `ls -r $dir/macher 2> /dev/null` ; do + if test x"$ac_cv_path_macher" = x ; then + if test -f "$j" ; then + ac_cv_path_macher=$j + break + fi + fi + done done ]) if test -f "$ac_cv_path_macher" ; then - MACHER_PROG="$ac_cv_path_macher" - AC_MSG_RESULT([$MACHER_PROG]) - AC_MSG_RESULT([Found macher in environment]) + MACHER_PROG="$ac_cv_path_macher" + AC_MSG_RESULT([$MACHER_PROG]) + AC_MSG_RESULT([Found macher in environment]) fi AC_MSG_CHECKING([for zip]) AC_CACHE_VAL(ac_cv_path_zip, [ search_path=`echo ${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do - for j in `ls -r $dir/zip 2> /dev/null` \ - `ls -r $dir/zip 2> /dev/null` ; do - if test x"$ac_cv_path_zip" = x ; then - if test -f "$j" ; then - ac_cv_path_zip=$j - break - fi - fi - done + for j in `ls -r $dir/zip 2> /dev/null` \ + `ls -r $dir/zip 2> /dev/null` ; do + if test x"$ac_cv_path_zip" = x ; then + if test -f "$j" ; then + ac_cv_path_zip=$j + break + fi + fi + done done ]) if test -f "$ac_cv_path_zip" ; then - ZIP_PROG="$ac_cv_path_zip" - AC_MSG_RESULT([$ZIP_PROG]) - ZIP_PROG_OPTIONS="-rq" - ZIP_PROG_VFSSEARCH="*" - AC_MSG_RESULT([Found INFO Zip in environment]) - # Use standard arguments for zip + ZIP_PROG="$ac_cv_path_zip" + AC_MSG_RESULT([$ZIP_PROG]) + ZIP_PROG_OPTIONS="-rq" + ZIP_PROG_VFSSEARCH="*" + AC_MSG_RESULT([Found INFO Zip in environment]) + # Use standard arguments for zip else - # It is not an error if an installed version of Zip can't be located. - # We can use the locally distributed minizip instead - ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}" - ZIP_PROG_OPTIONS="-o -r" - ZIP_PROG_VFSSEARCH="*" - ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}" - AC_MSG_RESULT([No zip found on PATH. Building minizip]) + # It is not an error if an installed version of Zip can't be located. + # We can use the locally distributed minizip instead + ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}" + ZIP_PROG_OPTIONS="-o -r" + ZIP_PROG_VFSSEARCH="*" + ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}" + AC_MSG_RESULT([No zip found on PATH. Building minizip]) fi AC_SUBST(MACHER_PROG) AC_SUBST(ZIP_PROG) diff --git a/unix/tk.spec b/unix/tk.spec index abb352f..248b38a 100644 --- a/unix/tk.spec +++ b/unix/tk.spec @@ -4,7 +4,7 @@ Name: tk Summary: Tk graphical toolkit for the Tcl scripting language. -Version: 9.0b3 +Version: 9.0.1 Release: 2 License: BSD Group: Development/Languages diff --git a/unix/tkAppInit.c b/unix/tkAppInit.c index c427ac1..09db8e0 100644 --- a/unix/tkAppInit.c +++ b/unix/tkAppInit.c @@ -35,7 +35,7 @@ #undef STATIC_BUILD #include "tk.h" #include "tkPort.h" -#if TCL_MAJOR_VERSION < 9 && TCL_MINOR_VERSION < 7 +#if (TCL_MAJOR_VERSION < 9) && defined(TCL_MINOR_VERSION) && (TCL_MINOR_VERSION < 7) # define Tcl_LibraryInitProc Tcl_PackageInitProc # define Tcl_StaticLibrary Tcl_StaticPackage #endif @@ -107,7 +107,7 @@ main( { #ifdef TK_LOCAL_MAIN_HOOK TK_LOCAL_MAIN_HOOK(&argc, &argv); -#elif (TCL_MAJOR_VERSION > 8) || (TCL_MINOR_VERSION > 6) +#elif TCL_MAJOR_VERSION > 8 || !defined(TCL_MINOR_VERSION) || TCL_MINOR_VERSION > 6 /* This doesn't work with Tcl 8.6 */ TclZipfs_AppHook(&argc, &argv); #endif diff --git a/unix/tkConfig.h.in b/unix/tkConfig.h.in index ffc0e06..695fb3a 100644 --- a/unix/tkConfig.h.in +++ b/unix/tkConfig.h.in @@ -19,28 +19,28 @@ /* Compiler support for module scope symbols */ #undef HAVE_HIDDEN -/* Define to 1 if the system has the type `intptr_t'. */ +/* Define to 1 if the system has the type 'intptr_t'. */ #undef HAVE_INTPTR_T /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `Xft' library (-lXft). */ +/* Define to 1 if you have the 'Xft' library (-lXft). */ #undef HAVE_LIBXFT -/* Define to 1 if you have the `lseek64' function. */ +/* Define to 1 if you have the 'lseek64' function. */ #undef HAVE_LSEEK64 -/* Define to 1 if you have the `open64' function. */ +/* Define to 1 if you have the 'open64' function. */ #undef HAVE_OPEN64 -/* Define to 1 if you have the `posix_spawnattr_setflags' function. */ +/* Define to 1 if you have the 'posix_spawnattr_setflags' function. */ #undef HAVE_POSIX_SPAWNATTR_SETFLAGS -/* Define to 1 if you have the `posix_spawnp' function. */ +/* Define to 1 if you have the 'posix_spawnp' function. */ #undef HAVE_POSIX_SPAWNP -/* Define to 1 if you have the `posix_spawn_file_actions_adddup2' function. */ +/* Define to 1 if you have the 'posix_spawn_file_actions_adddup2' function. */ #undef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 /* Does struct password have a pw_gecos field? */ @@ -82,18 +82,15 @@ /* Is off64_t in <sys/types.h>? */ #undef HAVE_TYPE_OFF64_T -/* Define to 1 if the system has the type `uintptr_t'. */ +/* Define to 1 if the system has the type 'uintptr_t'. */ #undef HAVE_UINTPTR_T /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the `vfork' function. */ +/* Define to 1 if you have the 'vfork' function. */ #undef HAVE_VFORK -/* Is weak import available? */ -#undef HAVE_WEAK_IMPORT - /* Have we turned on XFT (antialiased fonts)? */ #undef HAVE_XFT @@ -139,7 +136,7 @@ /* Is this a static build? */ #undef STATIC_BUILD -/* Define to 1 if all of the C90 standard headers exist (not just the ones +/* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS @@ -189,9 +186,6 @@ /* Are we building with zipfs enabled? */ #undef ZIPFS_BUILD -/* Are Darwin SUSv3 extensions available? */ -#undef _DARWIN_C_SOURCE - /* Add the _FILE_OFFSET_BITS flag when building */ #undef _FILE_OFFSET_BITS @@ -219,25 +213,25 @@ /* Do we want to use the XOPEN network library? */ #undef _XOPEN_SOURCE_EXTENDED -/* Define to 1 if type `char' is unsigned and your compiler does not +/* Define to 1 if type 'char' is unsigned and your compiler does not predefine this macro. */ #ifndef __CHAR_UNSIGNED__ # undef __CHAR_UNSIGNED__ #endif -/* Define to `__inline__' or `__inline' if that's what the C compiler +/* Define to '__inline__' or '__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif -/* Define to `int' if <sys/types.h> does not define. */ +/* Define to 'int' if <sys/types.h> does not define. */ #undef mode_t /* Define as a signed integer type capable of holding a process identifier. */ #undef pid_t -/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* Define as 'unsigned int' if <stddef.h> doesn't define. */ #undef size_t diff --git a/unix/tkUnix3d.c b/unix/tkUnix3d.c index f977624..55e58c3 100644 --- a/unix/tkUnix3d.c +++ b/unix/tkUnix3d.c @@ -446,7 +446,7 @@ TkpGetShadows( if (borderPtr->shadow == None) { borderPtr->shadow = Tk_GetBitmap(NULL, tkwin, - Tk_GetUid("gray50")); + "gray50"); if (borderPtr->shadow == None) { Tcl_Panic("TkpGetShadows couldn't allocate bitmap for border"); } diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c index 8ba2df3..765ddb4 100644 --- a/unix/tkUnixButton.c +++ b/unix/tkUnixButton.c @@ -449,6 +449,7 @@ TkpDisplayButton( int imageXOffset = 0, imageYOffset = 0; /* image information that will be used to * restrict disabled pixmap as well */ + int padX, padY, borderWidth, highlightWidth; butPtr->flags &= ~REDRAW_PENDING; if ((butPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { @@ -533,10 +534,10 @@ TkpDisplayButton( imageWidth = width; imageHeight = height; - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padXPtr, &butPtr->padX); - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padYPtr, &butPtr->padY); - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->borderWidthPtr, &butPtr->borderWidth); - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->highlightWidthPtr, &butPtr->highlightWidth); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padYObj, &padY); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->highlightWidthObj, &highlightWidth); haveText = (butPtr->textWidth != 0 && butPtr->textHeight != 0); @@ -554,11 +555,11 @@ TkpDisplayButton( */ if (butPtr->compound == COMPOUND_TOP) { - textYOffset = height + butPtr->padY; + textYOffset = height + padY; } else { - imageYOffset = butPtr->textHeight + butPtr->padY; + imageYOffset = butPtr->textHeight + padY; } - fullHeight = height + butPtr->textHeight + butPtr->padY; + fullHeight = height + butPtr->textHeight + padY; fullWidth = (width > butPtr->textWidth ? width : butPtr->textWidth); textXOffset = (fullWidth - butPtr->textWidth)/2; @@ -571,11 +572,11 @@ TkpDisplayButton( */ if (butPtr->compound == COMPOUND_LEFT) { - textXOffset = width + butPtr->padX; + textXOffset = width + padX; } else { - imageXOffset = butPtr->textWidth + butPtr->padX; + imageXOffset = butPtr->textWidth + padX; } - fullWidth = butPtr->textWidth + butPtr->padX + width; + fullWidth = butPtr->textWidth + padX + width; fullHeight = (height > butPtr->textHeight ? height : butPtr->textHeight); textYOffset = (fullHeight - butPtr->textHeight)/2; @@ -599,7 +600,7 @@ TkpDisplayButton( break; } - TkComputeAnchor(butPtr->anchor, tkwin, butPtr->padX, butPtr->padY, + TkComputeAnchor(butPtr->anchor, tkwin, padX, padY, butPtr->indicatorSpace + fullWidth, fullHeight, &x, &y); x += butPtr->indicatorSpace; @@ -709,7 +710,7 @@ TkpDisplayButton( } y += height/2; } else { - TkComputeAnchor(butPtr->anchor, tkwin, butPtr->padX, butPtr->padY, + TkComputeAnchor(butPtr->anchor, tkwin, padX, padY, butPtr->indicatorSpace + butPtr->textWidth, butPtr->textHeight, &x, &y); @@ -730,7 +731,7 @@ TkpDisplayButton( if ((butPtr->type == TYPE_CHECK_BUTTON || butPtr->type == TYPE_RADIO_BUTTON) && butPtr->indicatorOn - && butPtr->indicatorDiameter > 2 * butPtr->borderWidth) { + && butPtr->indicatorDiameter > 2 * borderWidth) { TkBorder *selBorder = (TkBorder *) butPtr->selectBorder; XColor *selColor = NULL; int btype = (butPtr->type == TYPE_CHECK_BUTTON ? @@ -792,7 +793,7 @@ TkpDisplayButton( */ if (relief != TK_RELIEF_FLAT) { - int inset = butPtr->highlightWidth; + int inset = highlightWidth; if (butPtr->defaultState == DEFAULT_ACTIVE) { /* @@ -833,9 +834,9 @@ TkpDisplayButton( Tk_Draw3DRectangle(tkwin, pixmap, border, inset, inset, Tk_Width(tkwin) - 2 * inset, Tk_Height(tkwin) - 2 * inset, - butPtr->borderWidth, relief); + borderWidth, relief); } - if (butPtr->highlightWidth > 0) { + if (highlightWidth > 0) { if (butPtr->flags & GOT_FOCUS) { gc = Tk_GCForColor(butPtr->highlightColorPtr, pixmap); } else { @@ -849,10 +850,10 @@ TkpDisplayButton( */ if (butPtr->defaultState == DEFAULT_NORMAL) { - TkDrawInsetFocusHighlight(tkwin, gc, butPtr->highlightWidth, + TkDrawInsetFocusHighlight(tkwin, gc, highlightWidth, pixmap, 5); } else { - Tk_DrawFocusHighlight(tkwin, gc, butPtr->highlightWidth, pixmap); + Tk_DrawFocusHighlight(tkwin, gc, highlightWidth, pixmap); } } @@ -892,13 +893,18 @@ TkpComputeButtonGeometry( int width, height, avgWidth, txtWidth, txtHeight; int haveImage = 0, haveText = 0; Tk_FontMetrics fm; + int padX, padY, borderWidth, highlightWidth, wrapLength; + int butPtrWidth, butPtrHeight; - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthPtr, &butPtr->highlightWidth); - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthPtr, &butPtr->borderWidth); - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padXPtr, &butPtr->padX); - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padYPtr, &butPtr->padY); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthObj, &highlightWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padYObj, &padY); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->wrapLengthObj, &wrapLength); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->widthObj, &butPtrWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->heightObj, &butPtrHeight); - butPtr->inset = butPtr->highlightWidth + butPtr->borderWidth; + butPtr->inset = highlightWidth + borderWidth; /* * Leave room for the default ring if needed. @@ -927,7 +933,7 @@ TkpComputeButtonGeometry( Tk_FreeTextLayout(butPtr->textLayout); butPtr->textLayout = Tk_ComputeTextLayout(butPtr->tkfont, - Tcl_GetString(butPtr->textPtr), TCL_INDEX_NONE, butPtr->wrapLength, + Tcl_GetString(butPtr->textPtr), TCL_INDEX_NONE, wrapLength, butPtr->justify, 0, &butPtr->textWidth, &butPtr->textHeight); txtWidth = butPtr->textWidth; @@ -952,7 +958,7 @@ TkpComputeButtonGeometry( * Image is above or below text. */ - height += txtHeight + butPtr->padY; + height += txtHeight + padY; width = (width > txtWidth ? width : txtWidth); break; case COMPOUND_LEFT: @@ -961,7 +967,7 @@ TkpComputeButtonGeometry( * Image is left or right of text. */ - width += txtWidth + butPtr->padX; + width += txtWidth + padX; height = (height > txtHeight ? height : txtHeight); break; case COMPOUND_CENTER: @@ -975,11 +981,11 @@ TkpComputeButtonGeometry( case COMPOUND_NONE: break; } - if (butPtr->width > 0) { - width = butPtr->width; + if (butPtrWidth > 0) { + width = butPtrWidth; } - if (butPtr->height > 0) { - height = butPtr->height; + if (butPtrHeight > 0) { + height = butPtrHeight; } if ((butPtr->type >= TYPE_CHECK_BUTTON) && butPtr->indicatorOn) { @@ -991,15 +997,15 @@ TkpComputeButtonGeometry( } } - width += 2 * butPtr->padX; - height += 2 * butPtr->padY; + width += 2 * padX; + height += 2 * padY; } else { if (haveImage) { - if (butPtr->width > 0) { - width = butPtr->width; + if (butPtrWidth > 0) { + width = butPtrWidth; } - if (butPtr->height > 0) { - height = butPtr->height; + if (butPtrHeight > 0) { + height = butPtrHeight; } if ((butPtr->type >= TYPE_CHECK_BUTTON) && butPtr->indicatorOn) { @@ -1014,11 +1020,11 @@ TkpComputeButtonGeometry( width = txtWidth; height = txtHeight; - if (butPtr->width > 0) { - width = butPtr->width * avgWidth; + if (butPtrWidth > 0) { + width = butPtrWidth * avgWidth; } - if (butPtr->height > 0) { - height = butPtr->height * fm.linespace; + if (butPtrHeight > 0) { + height = butPtrHeight * fm.linespace; } if ((butPtr->type >= TYPE_CHECK_BUTTON) && butPtr->indicatorOn) { butPtr->indicatorDiameter = fm.linespace; @@ -1035,8 +1041,8 @@ TkpComputeButtonGeometry( */ if ((butPtr->image == NULL) && (butPtr->bitmap == None)) { - width += 2 * butPtr->padX; - height += 2 * butPtr->padY; + width += 2 * padX; + height += 2 * padY; } if ((butPtr->type == TYPE_BUTTON) && !Tk_StrictMotif(butPtr->tkwin)) { width += 2; diff --git a/unix/tkUnixCursor.c b/unix/tkUnixCursor.c index 55d1a08..80dfa86 100644 --- a/unix/tkUnixCursor.c +++ b/unix/tkUnixCursor.c @@ -311,7 +311,7 @@ TkGetCursorByName( if (!inTkTable && Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( - "can't get cursor from a file in a safe interpreter", + "cannot get cursor from a file in a safe interpreter", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TK", "SAFE", "CURSOR_FILE", NULL); cursorPtr = NULL; diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h index 16fdcc6..eccd2c1 100644 --- a/unix/tkUnixDefault.h +++ b/unix/tkUnixDefault.h @@ -490,7 +490,7 @@ #define DEF_TEXT_PADX "1" #define DEF_TEXT_PADY "1" #define DEF_TEXT_RELIEF "sunken" -#define DEF_TEXT_INACTIVE_SELECT_COLOR SELECT_BG +#define DEF_TEXT_INACTIVE_SELECT_BG_COLOR SELECT_BG #define DEF_TEXT_SELECT_COLOR SELECT_BG #define DEF_TEXT_SELECT_MONO BLACK #define DEF_TEXT_SELECT_BD_COLOR "0" diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c index 6215671..a8765bd 100644 --- a/unix/tkUnixEmbed.c +++ b/unix/tkUnixEmbed.c @@ -107,7 +107,7 @@ Tk_UseWindow( Container *containerPtr; XWindowAttributes parentAtts; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (winPtr->window != None) { Tcl_SetObjResult(interp, Tcl_NewStringObj( @@ -139,7 +139,7 @@ Tk_UseWindow( handler = Tk_CreateErrorHandler(winPtr->display, -1, -1, -1, EmbedErrorProc, &anyError); if (!XGetWindowAttributes(winPtr->display, parent, &parentAtts)) { - anyError = 1; + anyError = 1; } XSync(winPtr->display, False); Tk_DeleteErrorHandler(handler); @@ -218,7 +218,7 @@ Tk_MakeWindow( Container *containerPtr; TkWindow *winPtr = (TkWindow *) tkwin; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (winPtr->flags & TK_EMBEDDED) { /* @@ -274,7 +274,7 @@ Tk_MakeContainer( TkWindow *winPtr = (TkWindow *) tkwin; Container *containerPtr; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); /* * Register the window as a container so that, for example, we can find @@ -400,7 +400,7 @@ ContainerEventProc( Container *containerPtr; Tk_ErrorHandler errHandler; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); /* * Ignore any X protocol errors that happen in this function (almost any @@ -505,13 +505,13 @@ EmbedStructureProc( Tk_ErrorHandler errHandler; if (eventPtr->type == ConfigureNotify) { - /* - * Send a ConfigureNotify to the embedded application. - */ + /* + * Send a ConfigureNotify to the embedded application. + */ - if (containerPtr->embeddedPtr != NULL) { - TkDoConfigureNotify(containerPtr->embeddedPtr); - } + if (containerPtr->embeddedPtr != NULL) { + TkDoConfigureNotify(containerPtr->embeddedPtr); + } if (containerPtr->wrapper != None) { /* @@ -715,10 +715,10 @@ Tk_GetOtherWindow( { Container *containerPtr; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); for (containerPtr = tsdPtr->firstContainerPtr; - containerPtr != NULL; + containerPtr != NULL; containerPtr = containerPtr->nextPtr) { if ((Tk_Window)containerPtr->embeddedPtr == tkwin) { return (Tk_Window)containerPtr->parentPtr; @@ -761,7 +761,7 @@ TkpRedirectKeyEvent( Container *containerPtr; Window saved; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); /* * First, find the top-level window corresponding to winPtr. @@ -833,7 +833,7 @@ TkpClaimFocus( XEvent event; Container *containerPtr; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (!(topLevelPtr->flags & TK_EMBEDDED)) { return; @@ -885,7 +885,7 @@ TkpTestembedCmd( char buffer[50]; Tcl_Interp *embeddedInterp = NULL, *parentInterp = NULL; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); (void)dummy; if ((objc > 1) && (strcmp(Tcl_GetString(objv[1]), "all") == 0)) { @@ -923,7 +923,7 @@ TkpTestembedCmd( Tcl_DStringAppendElement(&dString, containerPtr->parentPtr->pathName); } - /* Wrapper */ + /* Wrapper */ if (containerPtr->wrapper == None) { Tcl_DStringAppendElement(&dString, ""); } else if (all) { @@ -971,7 +971,7 @@ EmbedWindowDeleted( { Container *containerPtr, *prevPtr; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); /* * Find the Container structure for this window work. Delete the @@ -1030,10 +1030,10 @@ TkUnixContainerId( { Container *containerPtr; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); for (containerPtr = tsdPtr->firstContainerPtr; - containerPtr != NULL; containerPtr = containerPtr->nextPtr) { + containerPtr != NULL; containerPtr = containerPtr->nextPtr) { if (containerPtr->embeddedPtr == winPtr) { return containerPtr->parent; } diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index da75d0f..6ff53cf 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -242,6 +242,33 @@ static int SeenName(const char *name, Tcl_DString *dsPtr); /* *------------------------------------------------------------------------- * + * XLoadQueryFontNoXError -- + * + * This function is XLoadQueryFont wrapped in a NULL error handler. + * It is a temporary workaround for ticket [36e379c01b], + * "macOS Ventura, X11 build with XQuartz: crash in XLoadQueryFont", + * which actually is issue #216 in XQuartz: + * https://github.com/XQuartz/XQuartz/issues/216 + * + *------------------------------------------------------------------------- + */ + +static XFontStruct * +XLoadQueryFontNoXError(Display *display, char *name) +{ + XFontStruct *fontStructPtr = NULL; + Tk_ErrorHandler handler; + + /* 45 is the major opcode of X_OpenFont */ + handler = Tk_CreateErrorHandler(display, BadValue, 45, -1, NULL, NULL); + fontStructPtr = XLoadQueryFont(display, name); + Tk_DeleteErrorHandler(handler); + return fontStructPtr; +} + +/* + *------------------------------------------------------------------------- + * * FontPkgCleanup -- * * This function is called when an application is created. It initializes @@ -490,7 +517,7 @@ TkpGetNativeFont( return NULL; } - fontStructPtr = XLoadQueryFont(Tk_Display(tkwin), name); + fontStructPtr = XLoadQueryFontNoXError(Tk_Display(tkwin), (char *)name); if (fontStructPtr == NULL) { /* * Handle all names that look like XLFDs here. Otherwise, when @@ -745,7 +772,7 @@ void TkpGetFontAttrsForChar( Tk_Window tkwin, /* Window on the font's display */ Tk_Font tkfont, /* Font to query */ - int c, /* Character of interest */ + int c, /* Character of interest */ TkFontAttributes *faPtr) /* Output: Font attributes */ { FontAttributes atts; @@ -2603,11 +2630,11 @@ GetScreenFont( snprintf(buf, sizeof(buf), "%.200s-%d-*-*-*-*-*%s", nameList[bestIdx[1]], (int)(-wantPtr->fa.size+0.5), rest); *str = '-'; - fontStructPtr = XLoadQueryFont(display, buf); + fontStructPtr = XLoadQueryFontNoXError(display, buf); bestScore[1] = INT_MAX; } if (fontStructPtr == NULL) { - fontStructPtr = XLoadQueryFont(display, nameList[bestIdx[0]]); + fontStructPtr = XLoadQueryFontNoXError(display, nameList[bestIdx[0]]); if (fontStructPtr == NULL) { /* * This shouldn't happen because the font name is one of the names @@ -2647,9 +2674,9 @@ GetSystemFont( { XFontStruct *fontStructPtr; - fontStructPtr = XLoadQueryFont(display, "fixed"); + fontStructPtr = XLoadQueryFontNoXError(display, "fixed"); if (fontStructPtr == NULL) { - fontStructPtr = XLoadQueryFont(display, "*"); + fontStructPtr = XLoadQueryFontNoXError(display, "*"); if (fontStructPtr == NULL) { Tcl_Panic("TkpGetFontFromAttributes: cannot get any font"); } diff --git a/unix/tkUnixInit.c b/unix/tkUnixInit.c index 34b67fc..f11263f 100644 --- a/unix/tkUnixInit.c +++ b/unix/tkUnixInit.c @@ -44,6 +44,7 @@ TkpInit( Tktray_Init(interp); (void)SysNotify_Init (interp); Icu_Init(interp); + Cups_Init(interp); return TCL_OK; } @@ -147,7 +148,7 @@ GetLibraryPath( "com.tcltk.tklibrary", TK_FRAMEWORK_VERSION, 0, PATH_MAX, tkLibPath); if (tkLibPath[0] != '\0') { - Tcl_SetVar2(interp, "tk_library", NULL, tkLibPath, TCL_GLOBAL_ONLY); + Tcl_SetVar2(interp, "tk_library", NULL, tkLibPath, TCL_GLOBAL_ONLY); } return foundInFramework; } diff --git a/unix/tkUnixInt.h b/unix/tkUnixInt.h index 5429236..f46212e 100644 --- a/unix/tkUnixInt.h +++ b/unix/tkUnixInt.h @@ -26,6 +26,7 @@ MODULE_SCOPE int Tktray_Init (Tcl_Interp* interp); MODULE_SCOPE int SysNotify_Init (Tcl_Interp* interp); +MODULE_SCOPE int Cups_Init (Tcl_Interp* interp); #endif /* _TKUNIXINT */ diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index 933a690..f98f011 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -160,7 +160,7 @@ TkpGetString( Tcl_DStringSetLength(&buf, TCL_DSTRING_STATIC_SIZE-1); len = XmbLookupString(winPtr->inputContext, &eventPtr->xkey, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf), - &kePtr->keysym, &status); + &kePtr->keysym, &status); /* * If the buffer wasn't big enough, grow the buffer and try again. @@ -309,7 +309,7 @@ TkpGetKeySym( */ if (eventPtr->xkey.keycode > 0xff) { - return NoSymbol; + return NoSymbol; } /* diff --git a/unix/tkUnixMenu.c b/unix/tkUnixMenu.c index 2ed2e49..3460840 100644 --- a/unix/tkUnixMenu.c +++ b/unix/tkUnixMenu.c @@ -353,13 +353,13 @@ GetMenuIndicatorGeometry( } } } else { - Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthPtr, + Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthObj, &borderWidth); *heightPtr = 0; *widthPtr = borderWidth; } } else { - Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthPtr, + Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthObj, &borderWidth); *heightPtr = 0; *widthPtr = borderWidth; @@ -444,7 +444,7 @@ DrawMenuEntryBackground( || (menuPtr->postedCascade != mePtr))) { relief = TK_RELIEF_FLAT; } else { - Tk_GetReliefFromObj(NULL, menuPtr->activeReliefPtr, &relief); + relief = menuPtr->activeRelief; } Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->activeBorderWidthPtr, &activeBorderWidth); @@ -501,7 +501,7 @@ DrawMenuEntryAccelerator( return; } - Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthPtr, + Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->activeBorderWidthPtr, &activeBorderWidth); @@ -1121,7 +1121,7 @@ TkpComputeMenubarGeometry( maxWindowWidth = 0x7FFFFFF; } currentRowHeight = 0; - Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthPtr, + Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthObj, &borderWidth); x = y = borderWidth; lastRowBreak = 0; @@ -1695,7 +1695,7 @@ TkpComputeStandardMenuGeometry( return; } - Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthPtr, + Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->activeBorderWidthPtr, &activeBorderWidth); diff --git a/unix/tkUnixMenubu.c b/unix/tkUnixMenubu.c index c9a33aa..a1f3aa3 100644 --- a/unix/tkUnixMenubu.c +++ b/unix/tkUnixMenubu.c @@ -74,6 +74,8 @@ TkpDisplayMenuButton( /* Image information that will be used to * restrict disabled pixmap as well */ int haveImage = 0, haveText = 0; + int padX, padY; + int mbPtrBorderWidth, highlightWidth; mbPtr->flags &= ~REDRAW_PENDING; if ((mbPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { @@ -123,6 +125,8 @@ TkpDisplayMenuButton( fullWidth = 0; fullHeight = 0; + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->padYObj, &padY); if (mbPtr->compound != COMPOUND_NONE && haveImage && haveText) { switch ((enum compound) mbPtr->compound) { case COMPOUND_TOP: @@ -132,11 +136,11 @@ TkpDisplayMenuButton( */ if (mbPtr->compound == COMPOUND_TOP) { - textYOffset = height + mbPtr->padY; + textYOffset = height + padY; } else { - imageYOffset = mbPtr->textHeight + mbPtr->padY; + imageYOffset = mbPtr->textHeight + padY; } - fullHeight = height + mbPtr->textHeight + mbPtr->padY; + fullHeight = height + mbPtr->textHeight + padY; fullWidth = (width > mbPtr->textWidth ? width : mbPtr->textWidth); textXOffset = (fullWidth - mbPtr->textWidth)/2; imageXOffset = (fullWidth - width)/2; @@ -148,11 +152,11 @@ TkpDisplayMenuButton( */ if (mbPtr->compound == COMPOUND_LEFT) { - textXOffset = width + mbPtr->padX; + textXOffset = width + padX; } else { - imageXOffset = mbPtr->textWidth + mbPtr->padX; + imageXOffset = mbPtr->textWidth + padX; } - fullWidth = mbPtr->textWidth + mbPtr->padX + width; + fullWidth = mbPtr->textWidth + padX + width; fullHeight = (height > mbPtr->textHeight ? height : mbPtr->textHeight); textYOffset = (fullHeight - mbPtr->textHeight)/2; @@ -211,7 +215,7 @@ TkpDisplayMenuButton( XSetClipOrigin(mbPtr->display, gc, 0, 0); } } else { - TkComputeAnchor(mbPtr->anchor, tkwin, mbPtr->padX, mbPtr->padY, + TkComputeAnchor(mbPtr->anchor, tkwin, padX, padY, mbPtr->textWidth + mbPtr->indicatorWidth, mbPtr->textHeight, &x, &y); Tk_DrawTextLayout(mbPtr->display, pixmap, gc, mbPtr->textLayout, @@ -272,20 +276,22 @@ TkpDisplayMenuButton( * border. */ + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->borderWidthObj, &mbPtrBorderWidth); + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->highlightWidthObj, &highlightWidth); if (mbPtr->relief != TK_RELIEF_FLAT) { Tk_Draw3DRectangle(tkwin, pixmap, border, - mbPtr->highlightWidth, mbPtr->highlightWidth, - Tk_Width(tkwin) - 2*mbPtr->highlightWidth, - Tk_Height(tkwin) - 2*mbPtr->highlightWidth, - mbPtr->borderWidth, mbPtr->relief); + highlightWidth, highlightWidth, + Tk_Width(tkwin) - 2 * highlightWidth, + Tk_Height(tkwin) - 2 * highlightWidth, + mbPtrBorderWidth, mbPtr->relief); } - if (mbPtr->highlightWidth > 0) { + if (highlightWidth > 0) { if (mbPtr->flags & GOT_FOCUS) { gc = Tk_GCForColor(mbPtr->highlightColorPtr, pixmap); } else { gc = Tk_GCForColor(mbPtr->highlightBgColorPtr, pixmap); } - Tk_DrawFocusHighlight(tkwin, gc, mbPtr->highlightWidth, pixmap); + Tk_DrawFocusHighlight(tkwin, gc, highlightWidth, pixmap); } /* @@ -347,8 +353,15 @@ TkpComputeMenuButtonGeometry( int avgWidth, txtWidth, txtHeight; int haveImage = 0, haveText = 0; Tk_FontMetrics fm; + int borderWidth, highlightWidth, wrapLength; + int padX, padY; - mbPtr->inset = mbPtr->highlightWidth + mbPtr->borderWidth; + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->padYObj, &padY); + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->highlightWidthObj, &highlightWidth); + Tk_GetPixelsFromObj(NULL, mbPtr->tkwin, mbPtr->wrapLengthObj, &wrapLength); + mbPtr->inset = highlightWidth + borderWidth; width = 0; height = 0; @@ -367,8 +380,8 @@ TkpComputeMenuButtonGeometry( if (haveImage == 0 || mbPtr->compound != COMPOUND_NONE) { Tk_FreeTextLayout(mbPtr->textLayout); - mbPtr->textLayout = Tk_ComputeTextLayout(mbPtr->tkfont, mbPtr->text, - TCL_INDEX_NONE, mbPtr->wrapLength, mbPtr->justify, 0, &mbPtr->textWidth, + mbPtr->textLayout = Tk_ComputeTextLayout(mbPtr->tkfont, mbPtr->textObj ? Tcl_GetString(mbPtr->textObj) : "", + TCL_INDEX_NONE, wrapLength, mbPtr->justify, 0, &mbPtr->textWidth, &mbPtr->textHeight); txtWidth = mbPtr->textWidth; txtHeight = mbPtr->textHeight; @@ -392,7 +405,7 @@ TkpComputeMenuButtonGeometry( * Image is above or below text. */ - height += txtHeight + mbPtr->padY; + height += txtHeight + padY; width = (width > txtWidth ? width : txtWidth); break; case COMPOUND_LEFT: @@ -401,7 +414,7 @@ TkpComputeMenuButtonGeometry( * Image is left or right of text. */ - width += txtWidth + mbPtr->padX; + width += txtWidth + padX; height = (height > txtHeight ? height : txtHeight); break; case COMPOUND_CENTER: @@ -421,8 +434,8 @@ TkpComputeMenuButtonGeometry( if (mbPtr->height > 0) { height = mbPtr->height; } - width += 2*mbPtr->padX; - height += 2*mbPtr->padY; + width += 2 * padX; + height += 2 * padY; } else { if (haveImage) { if (mbPtr->width > 0) { @@ -444,8 +457,8 @@ TkpComputeMenuButtonGeometry( } if (! haveImage) { - width += 2*mbPtr->padX; - height += 2*mbPtr->padY; + width += 2 * padX; + height += 2 * padY; } if (mbPtr->indicatorOn) { @@ -453,15 +466,15 @@ TkpComputeMenuButtonGeometry( pixels = WidthOfScreen(Tk_Screen(mbPtr->tkwin)); mbPtr->indicatorHeight= (INDICATOR_HEIGHT * pixels)/(10*mm); mbPtr->indicatorWidth = (INDICATOR_WIDTH * pixels)/(10*mm) - + 2*mbPtr->indicatorHeight; + + 2 * mbPtr->indicatorHeight; width += mbPtr->indicatorWidth; } else { mbPtr->indicatorHeight = 0; mbPtr->indicatorWidth = 0; } - Tk_GeometryRequest(mbPtr->tkwin, (int) (width + 2*mbPtr->inset), - (int) (height + 2*mbPtr->inset)); + Tk_GeometryRequest(mbPtr->tkwin, (int) (width + 2 * mbPtr->inset), + (int) (height + 2 * mbPtr->inset)); Tk_SetInternalBorder(mbPtr->tkwin, mbPtr->inset); } diff --git a/unix/tkUnixPrint.c b/unix/tkUnixPrint.c new file mode 100644 index 0000000..830f580 --- /dev/null +++ b/unix/tkUnixPrint.c @@ -0,0 +1,526 @@ +/* + * tkUnixPrint.c -- + * + * tkUnixPrint.c implements a "::tk::print::cups" Tcl command which + * interfaces the libcups2 API with the [tk print] command. + * + * Copyright © 2024 Emiliano Gavilán. + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + */ + +#include "tkUnixInt.h" + +#ifdef HAVE_CUPS +#include <cups/cups.h> + +typedef int (CupsSubCmdOp)(Tcl_Interp *, int, Tcl_Obj *const []); + +static Tcl_ObjCmdProc Cups_Cmd; +static CupsSubCmdOp DefaultPrinterOp; +static CupsSubCmdOp GetPrintersOp; +static CupsSubCmdOp PrintOp; +static Tcl_ArgvGenFuncProc ParseEnumOptions; +static Tcl_ArgvGenFuncProc ParseOptions; +static Tcl_ArgvGenFuncProc ParseMargins; +static Tcl_ArgvGenFuncProc ParseNup; +static cups_dest_t* GetPrinterFromObj(Tcl_Obj *); + +static cups_dest_t * +GetPrinterFromObj(Tcl_Obj *nameObj) +{ + cups_dest_t *printer; + Tcl_Size len; + const char *nameStr = Tcl_GetStringFromObj(nameObj, &len); + char *p; + char *name, *instance = NULL; + Tcl_DString ds; + + Tcl_DStringInit(&ds); + name = Tcl_DStringAppend(&ds, nameStr, len); + p = strchr(name, '/'); + if (p) { + *p = '\0'; + instance = p+1; + } + + printer = cupsGetNamedDest(CUPS_HTTP_DEFAULT, name, instance); + Tcl_DStringFree(&ds); + + return printer; +} + +static int +Cups_Cmd( + TCL_UNUSED(void *), + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + static const struct CupsCmds { + const char *subcmd; + CupsSubCmdOp *subCmd; + } cupsCmds[] = { + {"defaultprinter" , DefaultPrinterOp}, + {"getprinters" , GetPrintersOp}, + {"print" , PrintOp}, + {NULL, NULL} + }; + int index; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?arg ...?"); + return TCL_ERROR; + } + + if (Tcl_GetIndexFromObjStruct(interp, objv[1], cupsCmds, + sizeof(struct CupsCmds), "subcommand", 0, &index) != TCL_OK) { + return TCL_ERROR; + } + + return cupsCmds[index].subCmd(interp, objc, objv); +} + +static int +DefaultPrinterOp( + Tcl_Interp *interp, + TCL_UNUSED(int), + TCL_UNUSED(Tcl_Obj *const *)) +{ + cups_dest_t *printer; + Tcl_Obj *resultObj; + + printer = cupsGetNamedDest(CUPS_HTTP_DEFAULT, NULL, NULL); + if (printer) { + if (printer->instance) { + resultObj = Tcl_ObjPrintf("%s/%s", printer->name, + printer->instance); + } else { + resultObj = Tcl_NewStringObj(printer->name, -1); + } + Tcl_SetObjResult(interp, resultObj); + } + + cupsFreeDests(1, printer); + return TCL_OK; +} + +static int +GetPrintersOp( + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + cups_dest_t *dests; + cups_option_t *option; + int num_dests, i, j; + Tcl_Obj *keyPtr, *optPtr, *resultObj; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } + + num_dests = cupsGetDests2(CUPS_HTTP_DEFAULT, &dests); + resultObj = Tcl_NewObj(); + + for (i = 0; i < num_dests; i++) { + if (dests[i].instance) + keyPtr = Tcl_ObjPrintf("%s/%s", dests[i].name, dests[i].instance); + else + keyPtr = Tcl_NewStringObj(dests[i].name, -1); + + option = dests[i].options; + optPtr = Tcl_NewObj(); + for(j = 0; j < dests[i].num_options; j++) { + Tcl_DictObjPut(NULL, optPtr, + Tcl_NewStringObj(option[j].name, -1), + Tcl_NewStringObj(option[j].value, -1)); + } + + Tcl_DictObjPut(NULL, resultObj, keyPtr, optPtr); + } + + cupsFreeDests(num_dests, dests); + Tcl_SetObjResult(interp, resultObj); + return TCL_OK; +} + +/* Information needed for parsing */ +struct CupsOptions { + const char *name; + const char *cupsName; +}; + +static const struct CupsOptions colormodeOpts[] = { + {"auto", CUPS_PRINT_COLOR_MODE_AUTO}, + {"color", CUPS_PRINT_COLOR_MODE_COLOR}, + {"monochrome", CUPS_PRINT_COLOR_MODE_MONOCHROME}, + {NULL, NULL} +}; + +static const struct CupsOptions formatOpts[] = { + {"auto", CUPS_FORMAT_AUTO}, + {"pdf", CUPS_FORMAT_PDF}, + {"postscript", CUPS_FORMAT_POSTSCRIPT}, + {"text", CUPS_FORMAT_TEXT}, + {NULL, NULL} +}; + +static const struct CupsOptions mediaOpts[] = { + {"a4", CUPS_MEDIA_A4}, + {"legal", CUPS_MEDIA_LEGAL}, + {"letter", CUPS_MEDIA_LETTER}, + {NULL, NULL} +}; + +static const struct CupsOptions orientationOpts[] = { + {"portrait", CUPS_ORIENTATION_PORTRAIT}, + {"landscape", CUPS_ORIENTATION_LANDSCAPE}, + {NULL, NULL} +}; + +enum {PARSECOLORMODE, PARSEFORMAT, PARSEMEDIA, PARSEORIENTATION}; + +static const struct ParseData { + const char *message; + const struct CupsOptions *optionTable; +} parseData[] = { + {"colormode", colormodeOpts}, + {"format", formatOpts}, + {"media", mediaOpts}, + {"orientation", orientationOpts}, + {NULL, NULL} +}; + +static int +PrintOp( + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + cups_dest_t *printer; + cups_dinfo_t *info; + int result = TCL_OK; + int job_id; + + /* variables for Tcl_ParseArgsObjv */ + Tcl_Obj *const *parseObjv; + Tcl_Size count; + + /* options related vaiables */ + cups_option_t *options = NULL; + int num_options = 0; + int copies = 0, pprint = 0; + const char *media = NULL, *color = NULL, *orient = NULL, *format = NULL, + *nup = NULL, *title = NULL; + Tcl_Obj *marginsObj = NULL, *optionsObj = NULL; + double tzoom = 1.0; + + /* Data to print + * this is a binary buffer, since it can contain data such as + * jpg or compressed pdf which might contain any bytes. + * USE [encoding convertto] with a proper encoding when passing + * text data to print. + */ + const unsigned char *buffer; Tcl_Size buflen; + + const Tcl_ArgvInfo argTable[] = { + {TCL_ARGV_GENFUNC, "-colormode", ParseEnumOptions, &color, + "color mode", (void *)&parseData[PARSECOLORMODE]}, + {TCL_ARGV_INT , "-copies", NULL, &copies, + "number of copies", NULL}, + {TCL_ARGV_GENFUNC, "-format", ParseEnumOptions, &format, + "data format", (void *)&parseData[PARSEFORMAT]}, + {TCL_ARGV_GENFUNC, "-margins", ParseMargins, &marginsObj, + "media page size", NULL}, + {TCL_ARGV_GENFUNC, "-media", ParseEnumOptions, &media, + "media page size", (void *)&parseData[PARSEMEDIA]}, + {TCL_ARGV_GENFUNC, "-nup", ParseNup, &nup, + "pages per sheet", NULL}, + {TCL_ARGV_GENFUNC, "-options", ParseOptions, &optionsObj, + "generic options", NULL}, + {TCL_ARGV_GENFUNC, "-orientation", ParseEnumOptions, &orient, + "page orientation", (void *)&parseData[PARSEORIENTATION]}, + {TCL_ARGV_CONSTANT, "-prettyprint", (void *)1, &pprint, + "print header", NULL}, + {TCL_ARGV_STRING, "-title", NULL, &title, + "job title", NULL}, + {TCL_ARGV_FLOAT, "-tzoom", NULL, &tzoom, + "text zoom", NULL}, + TCL_ARGV_TABLE_END + }; + + if (objc < 4) { + Tcl_WrongNumArgs(interp, 2, objv, "printer data ?-opt arg ...?"); + return TCL_ERROR; + } + + printer = GetPrinterFromObj(objv[2]); + if (!printer) { + Tcl_SetObjResult(interp, + Tcl_ObjPrintf("unknown printer or class \"%s\"", + Tcl_GetString(objv[2]))); + return TCL_ERROR; + } + + /* T_PAO discards the first arg, but we have 4 before the options */ + parseObjv = objv+3; + count = objc-3; + + if (Tcl_ParseArgsObjv(interp, argTable, &count, parseObjv, NULL)!=TCL_OK) { + return TCL_ERROR; + } + + if (copies < 0 || copies > 100) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("copies must be an integer" + "between 0 and 100", -1)); + cupsFreeDests(1, printer); + return TCL_ERROR; + } + if (tzoom < 0.5 || tzoom > 2.0) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("tzoom must be a number" + "between 0.5 and 2.0", -1)); + cupsFreeDests(1, printer); + return TCL_ERROR; + } + +/* Add options */ + if (copies != 0) { + char copiesbuf[4]; + + snprintf(copiesbuf, 4, "%d", copies); + num_options = cupsAddOption(CUPS_COPIES, copiesbuf, + num_options, &options); + } + if (color) { + num_options = cupsAddOption(CUPS_PRINT_COLOR_MODE, color, + num_options, &options); + } + if (media) { + num_options = cupsAddOption(CUPS_MEDIA, media, + num_options, &options); + } + if (nup) { + num_options = cupsAddOption(CUPS_NUMBER_UP, nup, + num_options, &options); + } + if (orient) { + num_options = cupsAddOption(CUPS_ORIENTATION, orient, + num_options, &options); + } + if (pprint) { + num_options = cupsAddOption("prettyprint", "yes", + num_options, &options); + } + if (marginsObj) { + Tcl_Size n; + Tcl_Obj **listArr; + + Tcl_ListObjGetElements(NULL, marginsObj, &n, &listArr); + num_options = cupsAddOption("page-top", Tcl_GetString(listArr[0]), + num_options, &options); + num_options = cupsAddOption("page-left", Tcl_GetString(listArr[1]), + num_options, &options); + num_options = cupsAddOption("page-bottom", Tcl_GetString(listArr[2]), + num_options, &options); + num_options = cupsAddOption("page-right", Tcl_GetString(listArr[3]), + num_options, &options); + } + if (optionsObj) { + Tcl_DictSearch search; + int done = 0; + Tcl_Obj *key, *value; + + for (Tcl_DictObjFirst(interp, optionsObj, &search, &key, &value, &done) + ; !done ; Tcl_DictObjNext(&search, &key, &value, &done)) + { + num_options = cupsAddOption(Tcl_GetString(key), + Tcl_GetString(value), num_options, &options); + } + } + /* prettyprint mess with the default values if set, so we force it */ + if (tzoom != 1.0 || pprint) { + char cpibuf[TCL_DOUBLE_SPACE + 1]; + char lpibuf[TCL_DOUBLE_SPACE + 1]; + + Tcl_PrintDouble(interp, 10.0 / tzoom, cpibuf); + Tcl_PrintDouble(interp, 6.0 / tzoom, lpibuf); + num_options = cupsAddOption("cpi", cpibuf, + num_options, &options); + num_options = cupsAddOption("lpi", lpibuf, + num_options, &options); + } + + /* set title and format */ + if (!title) { + title = "Tk print job"; + } + if (!format) { + format = CUPS_FORMAT_AUTO; + } + + info = cupsCopyDestInfo(CUPS_HTTP_DEFAULT, printer); + + if (cupsCreateDestJob(CUPS_HTTP_DEFAULT, printer, info, &job_id, + title, num_options, options) != IPP_STATUS_OK) { + + Tcl_SetObjResult(interp, Tcl_ObjPrintf("Error creating job: \"%s\"", + cupsLastErrorString())); + result = TCL_ERROR; + goto cleanup; + } + + buffer = Tcl_GetByteArrayFromObj(objv[3], &buflen); + + if (cupsStartDestDocument(CUPS_HTTP_DEFAULT, printer, info, job_id, + "(stdin)", format, 0, NULL, 1) != HTTP_STATUS_CONTINUE) { + // Can't start document + Tcl_SetObjResult(interp, Tcl_ObjPrintf("Error starting document: \"%s\"", + cupsLastErrorString())); + result = TCL_ERROR; + goto cleanup; + } + + if (cupsWriteRequestData(CUPS_HTTP_DEFAULT,(char *) buffer, buflen) != + HTTP_STATUS_CONTINUE) { + // some error ocurred + Tcl_SetObjResult(interp, Tcl_ObjPrintf("Error writing data: \"%s\"", + cupsLastErrorString())); + result = TCL_ERROR; + goto cleanup; + } + + if (cupsFinishDestDocument(CUPS_HTTP_DEFAULT, printer, info) == + IPP_STATUS_OK) { + // all OK + Tcl_SetObjResult(interp, Tcl_NewIntObj(job_id)); + } else { + // some error ocurred + Tcl_SetObjResult(interp, Tcl_ObjPrintf("Error finishing document: \"%s\"", + cupsLastErrorString())); + result = TCL_ERROR; + goto cleanup; + } + +cleanup: + cupsFreeDestInfo(info); + cupsFreeOptions(num_options, options); + cupsFreeDests(1, printer); + return result; +} + +static Tcl_Size +ParseEnumOptions( + void *clientData, + Tcl_Interp *interp, + TCL_UNUSED(Tcl_Size), + Tcl_Obj *const *objv, + void *dstPtr) +{ + int index; + const char **dest = (const char **) dstPtr; + struct ParseData *pdata = (struct ParseData *)clientData; + + if (Tcl_GetIndexFromObjStruct(interp, objv[0], pdata->optionTable, + sizeof(struct CupsOptions), pdata->message, 0, &index) != TCL_OK) { + return -1; + } + + *dest = pdata->optionTable[index].cupsName; + return 1; +} + +static Tcl_Size +ParseOptions( + TCL_UNUSED(void *), + Tcl_Interp *interp, + TCL_UNUSED(Tcl_Size), + Tcl_Obj *const *objv, + void *dstPtr) +{ + Tcl_Obj **objPtr = (Tcl_Obj **) dstPtr; + Tcl_Size n; + + /* check for a valid dictionary */ + if (Tcl_DictObjSize(NULL, objv[0], &n) != TCL_OK) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("options must be a proper" + "dictionary", -1)); + return -1; + } + + *objPtr = objv[0]; + return 1; +} + +static Tcl_Size +ParseMargins( + TCL_UNUSED(void *), + Tcl_Interp *interp, + TCL_UNUSED(Tcl_Size), + Tcl_Obj *const *objv, + void *dstPtr) +{ + Tcl_Obj **objPtr = (Tcl_Obj **) dstPtr; + Tcl_Obj **listArr; + Tcl_Size n; + int i; + + if (Tcl_ListObjGetElements(NULL, objv[0], &n, &listArr) != TCL_OK || + n != 4 || + Tcl_GetIntFromObj(NULL, listArr[0], &i) != TCL_OK || + Tcl_GetIntFromObj(NULL, listArr[1], &i) != TCL_OK || + Tcl_GetIntFromObj(NULL, listArr[2], &i) != TCL_OK || + Tcl_GetIntFromObj(NULL, listArr[3], &i) != TCL_OK + ) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("margins must be a list " + "of four integers: top left bottom right" , -1)); + return -1; + } + + *objPtr = objv[0]; + return 1; +} + +static Tcl_Size +ParseNup( + TCL_UNUSED(void *), + Tcl_Interp *interp, + TCL_UNUSED(Tcl_Size), + Tcl_Obj *const *objv, + void *dstPtr) +{ + const char **nup = (const char **) dstPtr; + int n; + + if (Tcl_GetIntFromObj(NULL, objv[0], &n) != TCL_OK || + (n != 1 && n != 2 && n != 4 && n != 6 && n != 9 && n != 16) + ) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("wrong number-up value: " + "should be 1, 2, 4, 6, 9 or 16", -1)); + return -1; + } + + *nup = Tcl_GetString(objv[0]); + return 1; +} +#endif /*HAVE_CUPS*/ + +int +#ifdef HAVE_CUPS +Cups_Init(Tcl_Interp *interp) +{ + Tcl_Namespace *ns; + ns = Tcl_FindNamespace(interp, "::tk::print", NULL, TCL_GLOBAL_ONLY); + if (!ns) + ns = Tcl_CreateNamespace(interp, "::tk::print", NULL, NULL); + Tcl_CreateObjCommand(interp, "::tk::print::cups", Cups_Cmd, NULL, NULL); + Tcl_Export(interp, ns, "cups", 0); +#else +Cups_Init(TCL_UNUSED(Tcl_Interp *)) +{ + /* Do nothing */ +#endif + return TCL_OK; +} diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index a99c57b..d3253e4 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -361,7 +361,7 @@ InitFont( errorFlag = 0; handler = Tk_CreateErrorHandler(Tk_Display(tkwin), - -1, -1, -1, InitFontErrorProc, (void *) &errorFlag); + -1, -1, -1, InitFontErrorProc, (void *)&errorFlag); ftFont = GetFont(fontPtr, 0, 0.0); if ((ftFont == NULL) || errorFlag) { Tk_DeleteErrorHandler(handler); @@ -403,7 +403,7 @@ InitFont( fPtr->underlinePos = fPtr->fm.descent / 2; handler = Tk_CreateErrorHandler(Tk_Display(tkwin), - -1, -1, -1, InitFontErrorProc, (void *) &errorFlag); + -1, -1, -1, InitFontErrorProc, (void *)&errorFlag); errorFlag = 0; Tk_MeasureChars((Tk_Font) fPtr, "I", 1, -1, 0, &iWidth); Tk_DeleteErrorHandler(handler); @@ -786,7 +786,8 @@ Tk_MeasureChars( LOCK; XftTextExtents32(fontPtr->display, ftFont, &c, 1, &extents); UNLOCK; - } else { + } + if (errorFlag) { extents.xOff = 0; errorFlag = 0; } @@ -955,7 +956,7 @@ Tk_DrawChars( XftGlyphFontSpec specs[NUM_SPEC]; XGlyphInfo metrics; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (fontPtr->ftDraw == 0) { DEBUG(("Switch to drawable 0x%lx\n", drawable)); @@ -1088,7 +1089,7 @@ TkDrawAngledChars( XftColor *xftcolor; int xStart = x, yStart = y; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); #ifdef XFT_HAS_FIXED_ROTATED_PLACEMENT int clen, nglyph; FT_UInt glyphs[NUM_SPEC]; @@ -1169,10 +1170,10 @@ TkDrawAngledChars( * at once (or whole blocks with same font), this requires a * dynamic 'glyphs' array. In case of overflow the array has to * be divided until the maximal string will fit. (GC) - * Given the resolution of current displays though, this should - * not be a huge issue since NUM_SPEC is 1024 and thus able to - * cover about 6000 pixels for a 6 pixel wide font (which is - * a very small barely readable font) + * Given the resolution of current displays though, this should + * not be a huge issue since NUM_SPEC is 1024 and thus able to + * cover about 6000 pixels for a 6 pixel wide font (which is + * a very small barely readable font) */ LOCK; @@ -1428,7 +1429,7 @@ TkUnixSetXftClipRegion( Region clipRegion) /* The clipping region to install. */ { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); tsdPtr->clipRegion = clipRegion; } diff --git a/unix/tkUnixScale.c b/unix/tkUnixScale.c index 8f4d23b..69bcb27 100644 --- a/unix/tkUnixScale.c +++ b/unix/tkUnixScale.c @@ -114,17 +114,21 @@ DisplayVerticalScale( int x, y, width, height, shadowWidth; double tickValue, tickInterval = scalePtr->tickInterval; Tk_3DBorder sliderBorder; + int scaleWidth, borderWidth, sliderLength; /* * Display the information from left to right across the window. */ + Tk_GetPixelsFromObj(NULL, tkwin, scalePtr->widthObj, &scaleWidth); + Tk_GetPixelsFromObj(NULL, tkwin, scalePtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, tkwin, scalePtr->sliderLengthObj, &sliderLength); if (!(scalePtr->flags & REDRAW_OTHER)) { drawnAreaPtr->x = scalePtr->vertTickRightX; drawnAreaPtr->y = scalePtr->inset; - drawnAreaPtr->width = scalePtr->vertTroughX + scalePtr->width - + 2*scalePtr->borderWidth - scalePtr->vertTickRightX; - drawnAreaPtr->height -= 2*scalePtr->inset; + drawnAreaPtr->width = scalePtr->vertTroughX + scaleWidth + + 2 * borderWidth - scalePtr->vertTickRightX; + drawnAreaPtr->height -= 2 * scalePtr->inset; } Tk_Fill3DRectangle(tkwin, drawable, scalePtr->bgBorder, drawnAreaPtr->x, drawnAreaPtr->y, drawnAreaPtr->width, @@ -187,33 +191,33 @@ DisplayVerticalScale( Tk_Draw3DRectangle(tkwin, drawable, scalePtr->bgBorder, scalePtr->vertTroughX, scalePtr->inset, - scalePtr->width + 2*scalePtr->borderWidth, - Tk_Height(tkwin) - 2*scalePtr->inset, scalePtr->borderWidth, + scaleWidth + 2 * borderWidth, + Tk_Height(tkwin) - 2 * scalePtr->inset, borderWidth, TK_RELIEF_SUNKEN); XFillRectangle(scalePtr->display, drawable, scalePtr->troughGC, - scalePtr->vertTroughX + scalePtr->borderWidth, - scalePtr->inset + scalePtr->borderWidth, - (unsigned) scalePtr->width, - (unsigned) (Tk_Height(tkwin) - 2*scalePtr->inset - - 2*scalePtr->borderWidth)); + scalePtr->vertTroughX + borderWidth, + scalePtr->inset + borderWidth, + (unsigned) scaleWidth, + (unsigned) (Tk_Height(tkwin) - 2 * scalePtr->inset + - 2 * borderWidth)); if (scalePtr->state == STATE_ACTIVE) { sliderBorder = scalePtr->activeBorder; } else { sliderBorder = scalePtr->bgBorder; } - width = scalePtr->width; - height = scalePtr->sliderLength/2; - x = scalePtr->vertTroughX + scalePtr->borderWidth; + width = scaleWidth; + height = sliderLength / 2; + x = scalePtr->vertTroughX + borderWidth; y = TkScaleValueToPixel(scalePtr, scalePtr->value) - height; - shadowWidth = scalePtr->borderWidth/2; + shadowWidth = borderWidth / 2; if (shadowWidth == 0) { shadowWidth = 1; } Tk_Draw3DRectangle(tkwin, drawable, sliderBorder, x, y, width, - 2*height, shadowWidth, scalePtr->sliderRelief); + 2 * height, shadowWidth, scalePtr->sliderRelief); x += shadowWidth; y += shadowWidth; - width -= 2*shadowWidth; + width -= 2 * shadowWidth; height -= shadowWidth; Tk_Fill3DRectangle(tkwin, drawable, sliderBorder, x, y, width, height, shadowWidth, scalePtr->sliderRelief); @@ -224,13 +228,14 @@ DisplayVerticalScale( * Draw the label to the right of the scale. */ - if ((scalePtr->flags & REDRAW_OTHER) && (scalePtr->labelLength != 0)) { + if ((scalePtr->flags & REDRAW_OTHER) && (scalePtr->labelObj != NULL)) { Tk_FontMetrics fm; + Tcl_Size labelLength; + const char *label = Tcl_GetStringFromObj(scalePtr->labelObj, &labelLength); Tk_GetFontMetrics(scalePtr->tkfont, &fm); Tk_DrawChars(scalePtr->display, drawable, scalePtr->textGC, - scalePtr->tkfont, scalePtr->label, - scalePtr->labelLength, scalePtr->vertLabelX, + scalePtr->tkfont, label, labelLength, scalePtr->vertLabelX, scalePtr->inset + (3 * fm.ascent) / 2); } } @@ -329,17 +334,21 @@ DisplayHorizontalScale( int x, y, width, height, shadowWidth; double tickInterval = scalePtr->tickInterval; Tk_3DBorder sliderBorder; + int scaleWidth, borderWidth, sliderLength; /* * Display the information from bottom to top across the window. */ + Tk_GetPixelsFromObj(NULL, tkwin, scalePtr->widthObj, &scaleWidth); + Tk_GetPixelsFromObj(NULL, tkwin, scalePtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, tkwin, scalePtr->sliderLengthObj, &sliderLength); if (!(scalePtr->flags & REDRAW_OTHER)) { drawnAreaPtr->x = scalePtr->inset; drawnAreaPtr->y = scalePtr->horizValueY; drawnAreaPtr->width -= 2*scalePtr->inset; - drawnAreaPtr->height = scalePtr->horizTroughY + scalePtr->width - + 2*scalePtr->borderWidth - scalePtr->horizValueY; + drawnAreaPtr->height = scalePtr->horizTroughY + scaleWidth + + 2 * borderWidth - scalePtr->horizValueY; } Tk_Fill3DRectangle(tkwin, drawable, scalePtr->bgBorder, drawnAreaPtr->x, drawnAreaPtr->y, drawnAreaPtr->width, @@ -410,25 +419,25 @@ DisplayHorizontalScale( y = scalePtr->horizTroughY; Tk_Draw3DRectangle(tkwin, drawable, scalePtr->bgBorder, scalePtr->inset, y, - Tk_Width(tkwin) - 2*scalePtr->inset, - scalePtr->width + 2*scalePtr->borderWidth, - scalePtr->borderWidth, TK_RELIEF_SUNKEN); + Tk_Width(tkwin) - 2 * scalePtr->inset, + scaleWidth + 2 * borderWidth, + borderWidth, TK_RELIEF_SUNKEN); XFillRectangle(scalePtr->display, drawable, scalePtr->troughGC, - scalePtr->inset + scalePtr->borderWidth, - y + scalePtr->borderWidth, - (unsigned) (Tk_Width(tkwin) - 2*scalePtr->inset - - 2*scalePtr->borderWidth), - (unsigned) scalePtr->width); + scalePtr->inset + borderWidth, + y + borderWidth, + (unsigned) (Tk_Width(tkwin) - 2 * scalePtr->inset + - 2 * borderWidth), + (unsigned) scaleWidth); if (scalePtr->state == STATE_ACTIVE) { sliderBorder = scalePtr->activeBorder; } else { sliderBorder = scalePtr->bgBorder; } - width = scalePtr->sliderLength/2; - height = scalePtr->width; + width = sliderLength / 2; + height = scaleWidth; x = TkScaleValueToPixel(scalePtr, scalePtr->value) - width; - y += scalePtr->borderWidth; - shadowWidth = scalePtr->borderWidth/2; + y += borderWidth; + shadowWidth = borderWidth / 2; if (shadowWidth == 0) { shadowWidth = 1; } @@ -447,13 +456,14 @@ DisplayHorizontalScale( * Draw the label at the top of the scale. */ - if ((scalePtr->flags & REDRAW_OTHER) && (scalePtr->labelLength != 0)) { + if ((scalePtr->flags & REDRAW_OTHER) && (scalePtr->labelObj != NULL)) { Tk_FontMetrics fm; + Tcl_Size labelLength; + const char *label = Tcl_GetStringFromObj(scalePtr->labelObj, &labelLength); Tk_GetFontMetrics(scalePtr->tkfont, &fm); Tk_DrawChars(scalePtr->display, drawable, scalePtr->textGC, - scalePtr->tkfont, scalePtr->label, - scalePtr->labelLength, scalePtr->inset + fm.ascent/2, + scalePtr->tkfont, label, labelLength, scalePtr->inset + fm.ascent/2, scalePtr->horizLabelY + fm.ascent); } } @@ -554,9 +564,10 @@ TkpDisplayScale( char string[TCL_DOUBLE_SPACE]; XRectangle drawnArea; Tcl_DString buf; + int highlightWidth, borderWidth; scalePtr->flags &= ~REDRAW_PENDING; - if ((scalePtr->tkwin == NULL) || !Tk_IsMapped(scalePtr->tkwin)) { + if ((tkwin == NULL) || !Tk_IsMapped(tkwin)) { goto done; } @@ -565,14 +576,14 @@ TkpDisplayScale( */ Tcl_Preserve(scalePtr); - if ((scalePtr->flags & INVOKE_COMMAND) && (scalePtr->command != NULL)) { + if ((scalePtr->flags & INVOKE_COMMAND) && (scalePtr->commandObj != NULL)) { Tcl_Preserve(interp); if (snprintf(string, TCL_DOUBLE_SPACE, scalePtr->valueFormat, scalePtr->value) < 0) { string[TCL_DOUBLE_SPACE - 1] = '\0'; } Tcl_DStringInit(&buf); - Tcl_DStringAppend(&buf, scalePtr->command, TCL_INDEX_NONE); + Tcl_DStringAppend(&buf, Tcl_GetString(scalePtr->commandObj), TCL_INDEX_NONE); Tcl_DStringAppend(&buf, " ", TCL_INDEX_NONE); Tcl_DStringAppend(&buf, string, TCL_INDEX_NONE); result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), TCL_INDEX_NONE, TCL_EVAL_GLOBAL); @@ -624,15 +635,17 @@ TkpDisplayScale( * vertical scales: border and traversal highlight. */ + Tk_GetPixelsFromObj(NULL, tkwin, scalePtr->highlightWidthObj, &highlightWidth); + Tk_GetPixelsFromObj(NULL, tkwin, scalePtr->borderWidthObj, &borderWidth); if (scalePtr->flags & REDRAW_OTHER) { if (scalePtr->relief != TK_RELIEF_FLAT) { Tk_Draw3DRectangle(tkwin, pixmap, scalePtr->bgBorder, - scalePtr->highlightWidth, scalePtr->highlightWidth, - Tk_Width(tkwin) - 2*scalePtr->highlightWidth, - Tk_Height(tkwin) - 2*scalePtr->highlightWidth, - scalePtr->borderWidth, scalePtr->relief); + highlightWidth, highlightWidth, + Tk_Width(tkwin) - 2 * highlightWidth, + Tk_Height(tkwin) - 2 * highlightWidth, + borderWidth, scalePtr->relief); } - if (scalePtr->highlightWidth > 0) { + if (highlightWidth > 0) { GC gc; if (scalePtr->flags & GOT_FOCUS) { @@ -641,7 +654,7 @@ TkpDisplayScale( gc = Tk_GCForColor( Tk_3DBorderColor(scalePtr->highlightBorder), pixmap); } - Tk_DrawFocusHighlight(tkwin, gc, scalePtr->highlightWidth, pixmap); + Tk_DrawFocusHighlight(tkwin, gc, highlightWidth, pixmap); } } @@ -684,12 +697,15 @@ TkpScaleElement( TkScale *scalePtr, /* Widget record for scale. */ int x, int y) /* Coordinates within scalePtr's window. */ { - int sliderFirst; + int sliderFirst, width, borderWidth, sliderLength; + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->widthObj, &width); + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->sliderLengthObj, &sliderLength); if (scalePtr->orient == ORIENT_VERTICAL) { if ((x < scalePtr->vertTroughX) - || (x >= (scalePtr->vertTroughX + 2*scalePtr->borderWidth + - scalePtr->width))) { + || (x >= (scalePtr->vertTroughX + 2 * borderWidth + + width))) { return OTHER; } if ((y < scalePtr->inset) @@ -697,19 +713,19 @@ TkpScaleElement( return OTHER; } sliderFirst = TkScaleValueToPixel(scalePtr, scalePtr->value) - - scalePtr->sliderLength/2; + - sliderLength/2; if (y < sliderFirst) { return TROUGH1; } - if (y < sliderFirst + scalePtr->sliderLength) { + if (y < sliderFirst + sliderLength) { return SLIDER; } return TROUGH2; } if ((y < scalePtr->horizTroughY) - || (y >= (scalePtr->horizTroughY + 2*scalePtr->borderWidth + - scalePtr->width))) { + || (y >= (scalePtr->horizTroughY + 2 * borderWidth + + width))) { return OTHER; } if ((x < scalePtr->inset) @@ -717,11 +733,11 @@ TkpScaleElement( return OTHER; } sliderFirst = TkScaleValueToPixel(scalePtr, scalePtr->value) - - scalePtr->sliderLength/2; + - sliderLength / 2; if (x < sliderFirst) { return TROUGH1; } - if (x < sliderFirst + scalePtr->sliderLength) { + if (x < sliderFirst + sliderLength) { return SLIDER; } return TROUGH2; diff --git a/unix/tkUnixScrlbr.c b/unix/tkUnixScrlbr.c index 65166e4..8a198f6 100644 --- a/unix/tkUnixScrlbr.c +++ b/unix/tkUnixScrlbr.c @@ -102,6 +102,7 @@ TkpDisplayScrollbar( XPoint points[7]; Tk_3DBorder border; int relief, width, elementBorderWidth; + int borderWidth, highlightWidth; Pixmap pixmap; if ((scrollPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { @@ -109,13 +110,15 @@ TkpDisplayScrollbar( } if (scrollPtr->vertical) { - width = Tk_Width(tkwin) - 2*scrollPtr->inset; + width = Tk_Width(tkwin) - 2 * scrollPtr->inset; } else { - width = Tk_Height(tkwin) - 2*scrollPtr->inset; + width = Tk_Height(tkwin) - 2 * scrollPtr->inset; } - elementBorderWidth = scrollPtr->elementBorderWidth; - if (elementBorderWidth < 0) { - elementBorderWidth = scrollPtr->borderWidth; + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->borderWidthObj, &borderWidth); + if (scrollPtr->elementBorderWidthObj) { + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->elementBorderWidthObj, &elementBorderWidth); + } else { + elementBorderWidth = borderWidth; } /* @@ -128,7 +131,8 @@ TkpDisplayScrollbar( pixmap = Tk_GetPixmap(scrollPtr->display, Tk_WindowId(tkwin), Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin)); - if (scrollPtr->highlightWidth > 0) { + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->highlightWidthObj, &highlightWidth); + if (highlightWidth > 0) { GC gc; if (scrollPtr->flags & GOT_FOCUS) { @@ -136,18 +140,18 @@ TkpDisplayScrollbar( } else { gc = Tk_GCForColor(scrollPtr->highlightBgColorPtr, pixmap); } - Tk_DrawFocusHighlight(tkwin, gc, scrollPtr->highlightWidth, pixmap); + Tk_DrawFocusHighlight(tkwin, gc, highlightWidth, pixmap); } Tk_Draw3DRectangle(tkwin, pixmap, scrollPtr->bgBorder, - scrollPtr->highlightWidth, scrollPtr->highlightWidth, - Tk_Width(tkwin) - 2*scrollPtr->highlightWidth, - Tk_Height(tkwin) - 2*scrollPtr->highlightWidth, - scrollPtr->borderWidth, scrollPtr->relief); + highlightWidth, highlightWidth, + Tk_Width(tkwin) - 2 * highlightWidth, + Tk_Height(tkwin) - 2 * highlightWidth, + borderWidth, scrollPtr->relief); XFillRectangle(scrollPtr->display, pixmap, ((UnixScrollbar*)scrollPtr)->troughGC, scrollPtr->inset, scrollPtr->inset, - (unsigned) (Tk_Width(tkwin) - 2*scrollPtr->inset), - (unsigned) (Tk_Height(tkwin) - 2*scrollPtr->inset)); + (unsigned) (Tk_Width(tkwin) - 2 * scrollPtr->inset), + (unsigned) (Tk_Height(tkwin) - 2 * scrollPtr->inset)); /* * Draw the top or left arrow. The coordinates of the polygon points @@ -282,8 +286,11 @@ TkpComputeScrollbarGeometry( * changed. */ { int width, fieldLength; + int borderWidth, highlightWidth; - scrollPtr->inset = scrollPtr->highlightWidth + scrollPtr->borderWidth; + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->highlightWidthObj, &highlightWidth); + scrollPtr->inset = highlightWidth + borderWidth; width = (scrollPtr->vertical) ? Tk_Width(scrollPtr->tkwin) : Tk_Height(scrollPtr->tkwin); @@ -291,10 +298,10 @@ TkpComputeScrollbarGeometry( * Next line assumes that the arrow area is a square. */ - scrollPtr->arrowLength = width - 2*scrollPtr->inset + 1; + scrollPtr->arrowLength = width - 2 * scrollPtr->inset + 1; fieldLength = (scrollPtr->vertical ? Tk_Height(scrollPtr->tkwin) : Tk_Width(scrollPtr->tkwin)) - - 2*(scrollPtr->arrowLength + scrollPtr->inset); + - 2 * (scrollPtr->arrowLength + scrollPtr->inset); if (fieldLength < 0) { fieldLength = 0; } @@ -328,15 +335,16 @@ TkpComputeScrollbarGeometry( * window, if any). Then arrange for the window to be redisplayed. */ + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->widthObj, &width); if (scrollPtr->vertical) { Tk_GeometryRequest(scrollPtr->tkwin, - scrollPtr->width + 2*scrollPtr->inset, - 2*(scrollPtr->arrowLength + scrollPtr->borderWidth + width + 2 * scrollPtr->inset, + 2 * (scrollPtr->arrowLength + borderWidth + scrollPtr->inset)); } else { Tk_GeometryRequest(scrollPtr->tkwin, - 2*(scrollPtr->arrowLength + scrollPtr->borderWidth - + scrollPtr->inset), scrollPtr->width + 2*scrollPtr->inset); + 2 * (scrollPtr->arrowLength + borderWidth + + scrollPtr->inset), width + 2 * scrollPtr->inset); } Tk_SetInternalBorder(scrollPtr->tkwin, scrollPtr->inset); } diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index ecc9566..a06d4af 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -309,7 +309,7 @@ RegOpen( XDeleteProperty(dispPtr->display, RootWindow(dispPtr->display, 0), dispPtr->registryProperty); - XSync(dispPtr->display, False); + XSync(dispPtr->display, False); } Tk_DeleteErrorHandler(handler); @@ -523,7 +523,7 @@ RegClose( Tk_ErrorHandler handler; handler = Tk_CreateErrorHandler(regPtr->dispPtr->display, -1, -1, -1, - NULL, NULL); + NULL, NULL); if (regPtr->modified) { if (!regPtr->locked && !localData.sendDebug) { @@ -1991,14 +1991,14 @@ TkpTestsendCmd( return TCL_ERROR; } if (index == TESTSEND_BOGUS) { - handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, -1, -1, -1, - NULL, NULL); + handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, -1, -1, -1, + NULL, NULL); XChangeProperty(winPtr->dispPtr->display, RootWindow(winPtr->dispPtr->display, 0), winPtr->dispPtr->registryProperty, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "This is bogus information", 6); - Tk_DeleteErrorHandler(handler); + Tk_DeleteErrorHandler(handler); } else if (index == TESTSEND_PROP) { int result, actualFormat; unsigned long length, bytesAfter; @@ -2037,10 +2037,10 @@ TkpTestsendCmd( XFree(property); } } else if (Tcl_GetString(objv[4])[0] == 0) { - handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, - -1, -1, -1, NULL, NULL); + handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, + -1, -1, -1, NULL, NULL); XDeleteProperty(winPtr->dispPtr->display, w, propName); - Tk_DeleteErrorHandler(handler); + Tk_DeleteErrorHandler(handler); } else { Tcl_DString tmp; @@ -2051,12 +2051,12 @@ TkpTestsendCmd( *p = 0; } } - handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, - -1, -1, -1, NULL, NULL); + handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, + -1, -1, -1, NULL, NULL); XChangeProperty(winPtr->dispPtr->display, w, propName, XA_STRING, 8, PropModeReplace, (unsigned char*)Tcl_DStringValue(&tmp), p-Tcl_DStringValue(&tmp)); - Tk_DeleteErrorHandler(handler); + Tk_DeleteErrorHandler(handler); Tcl_DStringFree(&tmp); } } else if (index == TESTSEND_SERIAL) { diff --git a/unix/tkUnixSysTray.c b/unix/tkUnixSysTray.c index 3375472..b3fc5bb 100644 --- a/unix/tkUnixSysTray.c +++ b/unix/tkUnixSysTray.c @@ -90,8 +90,8 @@ TKU_AddInput( { XWindowAttributes xswa; TKU_NO_BAD_WINDOW_BEGIN(dpy) - XGetWindowAttributes(dpy,win,&xswa); - XSelectInput(dpy,win,xswa.your_event_mask|add_to_mask); + XGetWindowAttributes(dpy,win,&xswa); + XSelectInput(dpy,win,xswa.your_event_mask|add_to_mask); TKU_NO_BAD_WINDOW_END } @@ -190,8 +190,8 @@ typedef struct { int requestedWidth, requestedHeight; int visible; /* whether XEMBED_MAPPED should be set */ int docked; /* whether an icon should be docked */ - char *imageString, /* option: -image as string */ - *classString; /* option: -class as string */ + Tcl_Obj *imageObj; /* option: -image */ + Tcl_Obj *classObj; /* option: -class */ } DockIcon; /* @@ -261,9 +261,9 @@ TrayIconObjectCmd( int msgid; enum {XWC_CONFIGURE = 0, XWC_CGET, XWC_BALLOON, XWC_CANCEL, - XWC_BBOX, XWC_DOCKED, XWC_ORIENTATION}; + XWC_BBOX, XWC_DOCKED, XWC_ORIENTATION}; const char *st_wcmd[] = {"configure", "cget", "balloon", "cancel", - "bbox", "docked", "orientation", NULL}; + "bbox", "docked", "orientation", NULL}; long timeout = 0; Tcl_Obj* optionValue; @@ -273,7 +273,7 @@ TrayIconObjectCmd( return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[1], st_wcmd, - "subcommand", TCL_EXACT, &wcmd) != TCL_OK) { + "subcommand", TCL_EXACT, &wcmd) != TCL_OK) { return TCL_ERROR; } @@ -287,7 +287,7 @@ TrayIconObjectCmd( return TCL_ERROR; } optionValue = Tk_GetOptionValue(interp,(char*)icon, - icon->options,objv[2],icon->tkwin); + icon->options,objv[2],icon->tkwin); if (optionValue) { Tcl_SetObjResult(interp,optionValue); return TCL_OK; @@ -323,11 +323,11 @@ TrayIconObjectCmd( case XWC_BBOX: if (icon->drawingWin) { XGetWindowAttributes(Tk_Display(icon->drawingWin), - TKU_XID(icon->drawingWin), &xwa); + TKU_XID(icon->drawingWin), &xwa); XTranslateCoordinates(Tk_Display(icon->drawingWin), - TKU_XID(icon->drawingWin), xwa.root, 0,0, - &icon->x, &icon->y, &bogus); + TKU_XID(icon->drawingWin), xwa.root, 0,0, + &icon->x, &icon->y, &bogus); bbox[0] = icon->x; bbox[1] = icon->y; bbox[2] = bbox[0] + icon->width - 1; @@ -540,15 +540,15 @@ CheckArgbVisual( Colormap cmap = None; TKU_NO_BAD_WINDOW_BEGIN(Tk_Display(icon->tkwin)) - XGetWindowProperty(Tk_Display(icon->tkwin), - icon->trayManager, - icon->a_NET_SYSTEM_TRAY_VISUAL, - /* offset */ 0, - /* length */ 1, - /* delete */ False, - /* type */ XA_VISUALID, - &retType, &retFormat, &retNitems, - &retBytesAfter, &retProp); + XGetWindowProperty(Tk_Display(icon->tkwin), + icon->trayManager, + icon->a_NET_SYSTEM_TRAY_VISUAL, + /* offset */ 0, + /* length */ 1, + /* delete */ False, + /* type */ XA_VISUALID, + &retType, &retFormat, &retNitems, + &retBytesAfter, &retProp); TKU_NO_BAD_WINDOW_END if (retType == XA_VISUALID && retNitems == 1 && @@ -557,7 +557,7 @@ CheckArgbVisual( snprintf(numeric,256,"%ld",*(long*)retProp); XFree(retProp); match = Tk_GetVisual(icon->interp, icon->tkwin, - numeric, &depth, &cmap); + numeric, &depth, &cmap); } if (match&& depth == 32 && match->red_mask == 0xFF0000UL && @@ -602,16 +602,16 @@ CreateTrayIconWindow( * the docs. */ tkwin = icon->drawingWin = Tk_CreateWindow(icon->interp, icon->tkwin, - Tk_Name(icon->tkwin), ""); + Tk_Name(icon->tkwin), ""); if (tkwin) { - Tk_SetClass(icon->drawingWin,icon->classString); + Tk_SetClass(icon->drawingWin, Tcl_GetString(icon->classObj)); Tk_CreateEventHandler(icon->drawingWin,ExposureMask|StructureNotifyMask| - ButtonPressMask|ButtonReleaseMask| - EnterWindowMask|LeaveWindowMask|PointerMotionMask, - TrayIconEvent, icon); + ButtonPressMask|ButtonReleaseMask| + EnterWindowMask|LeaveWindowMask|PointerMotionMask, + TrayIconEvent, icon); if(icon->bestVisual) { Tk_SetWindowVisual(icon->drawingWin,icon->bestVisual, - 32,icon->bestColormap); + 32,icon->bestColormap); icon->flags |= ICON_FLAG_ARGB32; Tk_SetWindowBackground(tkwin, 0); } else { @@ -667,11 +667,11 @@ DockToManager( static const Tk_OptionSpec IconOptionSpec[] = { {TK_OPTION_STRING,"-image","image","Image", - NULL, TCL_INDEX_NONE, offsetof(DockIcon, imageString), + NULL, offsetof(DockIcon, imageObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL, ICON_CONF_IMAGE | ICON_CONF_REDISPLAY}, {TK_OPTION_STRING,"-class","class","Class", - "TrayIcon", TCL_INDEX_NONE, offsetof(DockIcon, classString), + "TrayIcon", offsetof(DockIcon, classObj), TCL_INDEX_NONE, 0, NULL, ICON_CONF_CLASS}, {TK_OPTION_BOOLEAN,"-docked","docked","Docked", "1", TCL_INDEX_NONE, offsetof(DockIcon, docked), 0, NULL, @@ -709,7 +709,7 @@ TrayIconRequestSize( { if (icon->drawingWin) { if (icon->requestedWidth != w || - icon->requestedHeight != h) { + icon->requestedHeight != h) { Tk_SetMinimumRequestSize(icon->drawingWin,w,h); Tk_GeometryRequest(icon->drawingWin,w,h); Tk_SetGrid(icon->drawingWin,1,1,w,h); @@ -898,21 +898,21 @@ DisplayIcon( */ if (icon->offscreenPixmap == None) { icon->offscreenPixmap = Tk_GetPixmap(Tk_Display(icon->drawingWin), - Tk_WindowId(icon->drawingWin), w, h, 32); + Tk_WindowId(icon->drawingWin), w, h, 32); } if (!icon->photo) { - icon->photo = Tk_FindPhoto(icon->interp, icon->imageString); + icon->photo = Tk_FindPhoto(icon->interp, Tcl_GetString(icon->imageObj)); } if (!icon->photo && !icon->imageVisualInstance) { Tcl_InterpState saved = Tcl_SaveInterpState(icon->interp, TCL_OK); icon->imageVisualInstance = Tk_GetImage(icon->interp,icon->drawingWin, - icon->imageString, IgnoreImageChange, NULL); + Tcl_GetString(icon->imageObj), IgnoreImageChange, NULL); Tcl_RestoreInterpState(icon->interp,saved); } if (icon->photo && !icon->offscreenImage) { icon->offscreenImage = XGetImage(Tk_Display(icon->drawingWin), - icon->offscreenPixmap, 0, 0, w, h, AllPlanes, ZPixmap); + icon->offscreenPixmap, 0, 0, w, h, AllPlanes, ZPixmap); } if (icon->offscreenGC == None) { XGCValues gcv; @@ -921,7 +921,7 @@ DisplayIcon( gcv.foreground = 0; gcv.background = 0; icon->offscreenGC = Tk_GetGC(icon->drawingWin, - GCFunction|GCPlaneMask|GCForeground|GCBackground, &gcv); + GCFunction|GCPlaneMask|GCForeground|GCBackground, &gcv); } if (icon->flags & ICON_FLAG_DIRTY_EDGES) { XClearWindow(Tk_Display(icon->drawingWin), TKU_XID(icon->drawingWin)); @@ -967,16 +967,16 @@ DisplayIcon( 0,0,w,h); if (icon->imageVisualInstance) { Tk_RedrawImage(icon->imageVisualInstance, - 0,0,w,h, - icon->offscreenPixmap, - 0,0); + 0,0,w,h, + icon->offscreenPixmap, + 0,0); } } XCopyArea(Tk_Display(icon->drawingWin), - icon->offscreenPixmap, - TKU_XID(icon->drawingWin), - icon->offscreenGC, - imgx,imgy,outw,outh,outx,outy); + icon->offscreenPixmap, + TKU_XID(icon->drawingWin), + icon->offscreenGC, + imgx,imgy,outw,outh,outx,outy); } else { /* Non-argb redraw: clear window and draw an image over it. For photos it gives a correct alpha blending with a parent @@ -984,10 +984,10 @@ DisplayIcon( work with lxpanel fancy backgrounds). */ XClearWindow(Tk_Display(icon->drawingWin), - TKU_XID(icon->drawingWin)); + TKU_XID(icon->drawingWin)); if (icon->image && icon->visible) { Tk_RedrawImage(icon->image,imgx,imgy,outw,outh, - TKU_XID(icon->drawingWin), outx, outy); + TKU_XID(icon->drawingWin), outx, outy); } } } @@ -1086,7 +1086,7 @@ TrayIconWrapperEvent( to check for reparent-to-root is to ask for this root first */ XGetWindowAttributes(ev->xreparent.display, - ev->xreparent.window, &attr); + ev->xreparent.window, &attr); if (attr.root == ev->xreparent.parent) { /* upon reparent to root, */ if (icon->drawingWin) { @@ -1098,7 +1098,7 @@ TrayIconWrapperEvent( } } /* Reparenting into some other embedder is theoretically possible, * and everything would just work in this case. - */ + */ break; } } @@ -1156,7 +1156,7 @@ TrayIconEvent( case ConfigureNotify: Tk_SendVirtualEvent(icon->tkwin,Tk_GetUid("IconConfigure"), NULL); if (icon->width != ev->xconfigure.width || - icon->height != ev->xconfigure.height) { + icon->height != ev->xconfigure.height) { icon->width = ev->xconfigure.width; icon->height = ev->xconfigure.height; icon->flags |= ICON_FLAG_DIRTY_EDGES; @@ -1280,10 +1280,10 @@ PostBalloon( ev.xclient.data.l[4] = ++icon->msgid; TKU_NO_BAD_WINDOW_BEGIN(Tk_Display(icon->tkwin)) XSendEvent(dpy, icon->myManager , True, StructureNotifyMask|SubstructureNotifyMask, &ev); - XSync(dpy, False); + XSync(dpy, False); - /* Sending message elements */ - while (length>0) { + /* Sending message elements */ + while (length>0) { ev.type = ClientMessage; ev.xclient.window = icon->wrapper; ev.xclient.message_type = icon->a_NET_SYSTEM_TRAY_MESSAGE_DATA; @@ -1294,7 +1294,7 @@ PostBalloon( XSync(dpy,False); utf8msg += 20; length -= 20; - } + } TKU_NO_BAD_WINDOW_END; return icon->msgid; } @@ -1340,7 +1340,7 @@ CancelBalloon( ev.xclient.data.l[2] =msgid; TKU_NO_BAD_WINDOW_BEGIN(Tk_Display(icon->tkwin)) XSendEvent(dpy, icon->myManager , True, - StructureNotifyMask|SubstructureNotifyMask, &ev); + StructureNotifyMask|SubstructureNotifyMask, &ev); TKU_NO_BAD_WINDOW_END } @@ -1418,7 +1418,7 @@ TrayIconUpdate( */ if (mask & ICON_CONF_CLASS) { if (icon->drawingWin) - Tk_SetClass(icon->drawingWin,Tk_GetUid(icon->classString)); + Tk_SetClass(icon->drawingWin,Tk_GetUid(Tcl_GetString(icon->classObj))); } /* * First, ensure right icon visibility. @@ -1431,8 +1431,8 @@ TrayIconUpdate( */ if (mask & ICON_CONF_XEMBED) { if (icon->myManager == None && - icon->trayManager != None && - icon->docked) { + icon->trayManager != None && + icon->docked) { CheckArgbVisual(icon); if (icon->drawingWin && ((icon->bestVisual && !(icon->flags & ICON_FLAG_ARGB32)) || @@ -1451,8 +1451,8 @@ TrayIconUpdate( } } if (icon->myManager != None && - icon->drawingWin != NULL && - !icon->docked) { + icon->drawingWin != NULL && + !icon->docked) { Tk_DestroyWindow(icon->drawingWin); icon->drawingWin = NULL; icon->myManager = None; @@ -1501,7 +1501,7 @@ TrayIconConfigureMethod( if (objc <= 1 && !(addflags & ICON_CONF_FIRST_TIME)) { Tcl_Obj* info = Tk_GetOptionInfo(interp, (char*)icon, icon->options, - objc? objv[0] : NULL, icon->tkwin); + objc? objv[0] : NULL, icon->tkwin); if (info) { Tcl_SetObjResult(interp,info); return TCL_OK; @@ -1511,15 +1511,15 @@ TrayIconConfigureMethod( } if (Tk_SetOptions(interp, icon,icon->options,objc,objv, - icon->tkwin,&saved,&mask) != TCL_OK) { + icon->tkwin,&saved,&mask) != TCL_OK) { return TCL_ERROR; /* msg by Tk_SetOptions */ } mask |= addflags; /* now check option validity */ if (mask & ICON_CONF_IMAGE) { - if (icon->imageString) { - newImage = Tk_GetImage(interp, icon->tkwin, icon->imageString, - TrayIconImageChanged, icon); + if (icon->imageObj) { + newImage = Tk_GetImage(interp, icon->tkwin, Tcl_GetString(icon->imageObj), + TrayIconImageChanged, icon); if (!newImage) { Tk_RestoreSavedOptions(&saved); return TCL_ERROR; /* msg by Tk_GetImage */ @@ -1608,23 +1608,23 @@ TrayIconCreateCmd( * because it's not really shown. */ icon->tkwin = Tk_CreateWindowFromPath(interp, mainWindow, - Tcl_GetString(objv[1]),""); + Tcl_GetString(objv[1]),""); if (icon->tkwin == NULL) { goto handleErrors; } /* Subscribe to StructureNotify */ TKU_AddInput(Tk_Display(icon->tkwin), - RootWindowOfScreen(Tk_Screen(icon->tkwin)),StructureNotifyMask); + RootWindowOfScreen(Tk_Screen(icon->tkwin)),StructureNotifyMask); TKU_AddInput(Tk_Display(icon->tkwin), - RootWindow(Tk_Display(icon->tkwin),0),StructureNotifyMask); + RootWindow(Tk_Display(icon->tkwin),0),StructureNotifyMask); /* Spec says "screen 0" not "default", but... */ TKU_AddInput(Tk_Display(icon->tkwin), - DefaultRootWindow(Tk_Display(icon->tkwin)),StructureNotifyMask); + DefaultRootWindow(Tk_Display(icon->tkwin)),StructureNotifyMask); /* Early tracking of DestroyNotify is essential */ Tk_CreateEventHandler(icon->tkwin,StructureNotifyMask, - UserIconEvent, icon); + UserIconEvent, icon); /* Now try setting options */ icon->options = Tk_CreateOptionTable(interp,IconOptionSpec); @@ -1653,13 +1653,13 @@ TrayIconCreateCmd( if (objc>3) { if (TrayIconConfigureMethod(icon, interp, objc-2, objv+2, - ICON_CONF_XEMBED|ICON_CONF_IMAGE|ICON_CONF_FIRST_TIME) != TCL_OK) { + ICON_CONF_XEMBED|ICON_CONF_IMAGE|ICON_CONF_FIRST_TIME) != TCL_OK) { goto handleErrors; } } icon->widgetCmd = Tcl_CreateObjCommand2(interp, Tcl_GetString(objv[1]), - TrayIconObjectCmd, icon, TrayIconDeleteProc); + TrayIconObjectCmd, icon, TrayIconDeleteProc); /* Sometimes a command just can't be created... */ if (!icon->widgetCmd) { @@ -1706,7 +1706,7 @@ Tktray_Init( Tcl_Interp *interp) { Tcl_CreateObjCommand2(interp, "::tk::systray::_systray", - TrayIconCreateCmd, Tk_MainWindow(interp), NULL); + TrayIconCreateCmd, Tk_MainWindow(interp), NULL); return TCL_OK; } diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index 56d59ce..fc83324 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -1829,10 +1829,10 @@ WmForgetCmd( ~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED); RemapWindows(winPtr, winPtr->parentPtr); - /* - * Make sure wm no longer manages this window - */ - Tk_ManageGeometry(frameWin, NULL, NULL); + /* + * Make sure wm no longer manages this window + */ + Tk_ManageGeometry(frameWin, NULL, NULL); /* * Flags (above) must be cleared before calling TkMapTopFrame (below). @@ -2492,7 +2492,7 @@ WmIconphotoCmd( if (photo == NULL) { ckfree(iconPropertyData); Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "failed to create an iconphoto with image \"%s\"", + "failed to create an iconphoto with image \"%s\"", Tcl_GetString(objv[i]))); Tcl_SetErrorCode(interp, "TK", "WM", "ICONPHOTO", "IMAGE", NULL); return TCL_ERROR; @@ -5847,9 +5847,9 @@ static int PointInWindow( { XWindowChanges changes = wmPtr->winPtr->changes; return (x >= changes.x && - x < changes.x + changes.width && - y >= changes.y - wmPtr->menuHeight && - y < changes.y + changes.height); + x < changes.x + changes.width && + y >= changes.y - wmPtr->menuHeight && + y < changes.y + changes.height); } Tk_Window @@ -5922,38 +5922,38 @@ Tk_CoordsToWindow( } for (wmPtr = (WmInfo *) dispPtr->firstWmPtr; wmPtr != NULL; wmPtr = wmPtr->nextPtr) { - if (wmPtr->winPtr->mainPtr == NULL) { - continue; - } + if (wmPtr->winPtr->mainPtr == NULL) { + continue; + } if (child == wmPtr->reparent) { - if (PointInWindow(x, y, wmPtr)) { - goto gotToplevel; - } else { + if (PointInWindow(x, y, wmPtr)) { + goto gotToplevel; + } else { - /* - * Return NULL if the point is in the title bar or border. - */ + /* + * Return NULL if the point is in the title bar or border. + */ - return NULL; - } + return NULL; + } } if (wmPtr->wrapperPtr != NULL) { if (child == wmPtr->wrapperPtr->window) { goto gotToplevel; } else if (wmPtr->winPtr->flags & TK_EMBEDDED && - Tk_GetOtherWindow((Tk_Window)wmPtr->winPtr) == NULL) { - - /* - * This toplevel is embedded in a window belonging to - * a different application. - */ - - int rx, ry; - Tk_GetRootCoords((Tk_Window) wmPtr->winPtr, &rx, &ry); - childX -= rx; - childY -= ry; - goto gotToplevel; - } + Tk_GetOtherWindow((Tk_Window)wmPtr->winPtr) == NULL) { + + /* + * This toplevel is embedded in a window belonging to + * a different application. + */ + + int rx, ry; + Tk_GetRootCoords((Tk_Window) wmPtr->winPtr, &rx, &ry); + childX -= rx; + childY -= ry; + goto gotToplevel; + } } else if (child == wmPtr->winPtr->window) { goto gotToplevel; } @@ -6050,11 +6050,11 @@ Tk_CoordsToWindow( childY = y; goto gotToplevel; } else { - winPtr = nextPtr; - } + winPtr = nextPtr; + } } if (winPtr->mainPtr != ((TkWindow *) tkwin)->mainPtr) { - return NULL; + return NULL; } return (Tk_Window) winPtr; } diff --git a/win/Makefile.in b/win/Makefile.in index a101ac9..f35925d 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -174,7 +174,7 @@ LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ #CFLAGS = $(CFLAGS_DEBUG) #CFLAGS = $(CFLAGS_OPTIMIZE) #CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) -CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -D_ATL_XP_TARGETING=1 -D__USE_MINGW_ANSI_STDIO=0 +CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -D__USE_MINGW_ANSI_STDIO=0 # Special compiler flags to use when building man2tcl on Windows. MAN2TCLFLAGS = @MAN2TCLFLAGS@ @@ -239,21 +239,21 @@ INSTALL_LIBRARIES = @INSTALL_LIBRARIES@ # Minizip MINIZIP_OBJS = \ - adler32.$(HOST_OBJEXT) \ - compress.$(HOST_OBJEXT) \ - crc32.$(HOST_OBJEXT) \ - deflate.$(HOST_OBJEXT) \ - infback.$(HOST_OBJEXT) \ - inffast.$(HOST_OBJEXT) \ - inflate.$(HOST_OBJEXT) \ - inftrees.$(HOST_OBJEXT) \ - ioapi.$(HOST_OBJEXT) \ - iowin32.$(HOST_OBJEXT) \ - trees.$(HOST_OBJEXT) \ - uncompr.$(HOST_OBJEXT) \ - zip.$(HOST_OBJEXT) \ - zutil.$(HOST_OBJEXT) \ - minizip.$(HOST_OBJEXT) + adler32.$(HOST_OBJEXT) \ + compress.$(HOST_OBJEXT) \ + crc32.$(HOST_OBJEXT) \ + deflate.$(HOST_OBJEXT) \ + infback.$(HOST_OBJEXT) \ + inffast.$(HOST_OBJEXT) \ + inflate.$(HOST_OBJEXT) \ + inftrees.$(HOST_OBJEXT) \ + ioapi.$(HOST_OBJEXT) \ + iowin32.$(HOST_OBJEXT) \ + trees.$(HOST_OBJEXT) \ + uncompr.$(HOST_OBJEXT) \ + zip.$(HOST_OBJEXT) \ + zutil.$(HOST_OBJEXT) \ + minizip.$(HOST_OBJEXT) ZIP_INSTALL_OBJS = @ZIP_INSTALL_OBJS@ diff --git a/win/configure b/win/configure index 0af7f10..9cc4e72 100755 --- a/win/configure +++ b/win/configure @@ -2410,7 +2410,7 @@ SHELL=/bin/sh TK_VERSION=9.0 TK_MAJOR_VERSION=9 TK_MINOR_VERSION=0 -TK_PATCH_LEVEL="b3" +TK_PATCH_LEVEL=".1" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ @@ -4048,11 +4048,11 @@ printf "%s\n" "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } printf %s "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: loading" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: loading" >&5 printf "%s\n" "loading" >&6; } . "${TCL_BIN_DIR}/tclConfig.sh" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } fi @@ -4066,9 +4066,9 @@ printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } # if test -f $TCL_BIN_DIR/Makefile ; then - TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} - TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} - TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} + TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} + TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} + TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} fi eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" @@ -4320,9 +4320,9 @@ printf "%s\n" "yes" >&6; } fi if test "$CYGPATH" = "echo"; then - DEPARG='"$<"' + DEPARG='"$<"' else - DEPARG='"$(shell $(CYGPATH) $<)"' + DEPARG='"$(shell $(CYGPATH) $<)"' fi # set various compiler flags depending on whether we are using gcc or cl @@ -4566,7 +4566,7 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_auto_image_base" >&5 printf "%s\n" "$ac_cv_enable_auto_image_base" >&6; } CFLAGS=$hold_cflags - if test "$ac_cv_enable_auto_image_base" == "yes" ; then + if test "$ac_cv_enable_auto_image_base" = "yes" ; then extra_ldflags="$extra_ldflags -Wl,--enable-auto-image-base" fi @@ -4592,20 +4592,20 @@ printf %s "checking compiler flags... " >&6; } if test "${SHARED_BUILD}" = "0" ; then # static - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using static flags" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using static flags" >&5 printf "%s\n" "using static flags" >&6; } runtime= LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s.exe" else # dynamic - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using shared flags" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using shared flags" >&5 printf "%s\n" "using shared flags" >&6; } # ad-hoc check to see if CC supports -shared. if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then as_fn_error $? "${CC} does not support the -shared option. - You will need to upgrade to a newer version of the toolchain." "$LINENO" 5 + You will need to upgrade to a newer version of the toolchain." "$LINENO" 5 fi runtime= @@ -4717,14 +4717,14 @@ printf "%s\n" " Using 64-bit $MACHINE mode" >&6; } else if test "${SHARED_BUILD}" = "0" ; then # static - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using static flags" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using static flags" >&5 printf "%s\n" "using static flags" >&6; } runtime=-MT LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s.exe" else # dynamic - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using shared flags" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using shared flags" >&5 printf "%s\n" "using shared flags" >&6; } runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. @@ -5776,37 +5776,37 @@ else case e in #( e) search_path=`echo ${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do - for j in `ls -r $dir/zip 2> /dev/null` \ - `ls -r $dir/zip 2> /dev/null` ; do - if test x"$ac_cv_path_zip" = x ; then - if test -f "$j" ; then - ac_cv_path_zip=$j - break - fi - fi - done + for j in `ls -r $dir/zip 2> /dev/null` \ + `ls -r $dir/zip 2> /dev/null` ; do + if test x"$ac_cv_path_zip" = x ; then + if test -f "$j" ; then + ac_cv_path_zip=$j + break + fi + fi + done done ;; esac fi if test -f "$ac_cv_path_zip" ; then - ZIP_PROG="$ac_cv_path_zip" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZIP_PROG" >&5 + ZIP_PROG="$ac_cv_path_zip" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZIP_PROG" >&5 printf "%s\n" "$ZIP_PROG" >&6; } - ZIP_PROG_OPTIONS="-rq" - ZIP_PROG_VFSSEARCH="*" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found INFO Zip in environment" >&5 + ZIP_PROG_OPTIONS="-rq" + ZIP_PROG_VFSSEARCH="*" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found INFO Zip in environment" >&5 printf "%s\n" "Found INFO Zip in environment" >&6; } - # Use standard arguments for zip + # Use standard arguments for zip else - # It is not an error if an installed version of Zip can't be located. - # We can use the locally distributed minizip instead - ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}" - ZIP_PROG_OPTIONS="-o -r" - ZIP_PROG_VFSSEARCH="*" - ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: No zip found on PATH building minizip" >&5 + # It is not an error if an installed version of Zip can't be located. + # We can use the locally distributed minizip instead + ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}" + ZIP_PROG_OPTIONS="-o -r" + ZIP_PROG_VFSSEARCH="*" + ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: No zip found on PATH building minizip" >&5 printf "%s\n" "No zip found on PATH building minizip" >&6; } fi @@ -5885,7 +5885,11 @@ else fi fi -eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ; +if test "${TCL_MAJOR_VERSION}" -gt 8 ; then + eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ; +else + eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" ; +fi # FIXME: All of this var junk needs to be done in tcl.m4 !!!! # I left out the other vars that also need to get defined here. # we also need to double check about spaces in path names @@ -5893,7 +5897,7 @@ TK_LIB_FLAG="-l" if test "${TCL_MAJOR_VERSION}" -gt 8 ; then TK_LIB_FLAG="${TK_LIB_FLAG}tcl9" fi -eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}${VER}${LIBFLAGSUFFIX}\"" +eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}tk${VER}${LIBFLAGSUFFIX}\"" TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" eval "TK_BUILD_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TK_LIB_FLAG}\"" diff --git a/win/configure.ac b/win/configure.ac index e56f0e4..d8e207a 100644 --- a/win/configure.ac +++ b/win/configure.ac @@ -15,7 +15,7 @@ SHELL=/bin/sh TK_VERSION=9.0 TK_MAJOR_VERSION=9 TK_MINOR_VERSION=0 -TK_PATCH_LEVEL="b3" +TK_PATCH_LEVEL=".1" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ @@ -242,7 +242,11 @@ else fi fi -eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ; +if test "${TCL_MAJOR_VERSION}" -gt 8 ; then + eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ; +else + eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" ; +fi # FIXME: All of this var junk needs to be done in tcl.m4 !!!! # I left out the other vars that also need to get defined here. # we also need to double check about spaces in path names @@ -250,7 +254,7 @@ TK_LIB_FLAG="-l" if test "${TCL_MAJOR_VERSION}" -gt 8 ; then TK_LIB_FLAG="${TK_LIB_FLAG}tcl9" fi -eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}${VER}${LIBFLAGSUFFIX}\"" +eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}tk${VER}${LIBFLAGSUFFIX}\"" TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" eval "TK_BUILD_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TK_LIB_FLAG}\"" diff --git a/win/makefile.vc b/win/makefile.vc index 3db8eee..fcdf407 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -280,39 +280,39 @@ TKOBJS = \ !endif
TTK_OBJS = \
- $(TMP_DIR)\ttkWinMonitor.obj \
- $(TMP_DIR)\ttkWinTheme.obj \
- $(TMP_DIR)\ttkWinXPTheme.obj \
- $(TMP_DIR)\ttkBlink.obj \
- $(TMP_DIR)\ttkButton.obj \
- $(TMP_DIR)\ttkCache.obj \
- $(TMP_DIR)\ttkClamTheme.obj \
- $(TMP_DIR)\ttkClassicTheme.obj \
- $(TMP_DIR)\ttkDefaultTheme.obj \
- $(TMP_DIR)\ttkElements.obj \
- $(TMP_DIR)\ttkEntry.obj \
- $(TMP_DIR)\ttkFrame.obj \
- $(TMP_DIR)\ttkImage.obj \
- $(TMP_DIR)\ttkInit.obj \
- $(TMP_DIR)\ttkLabel.obj \
- $(TMP_DIR)\ttkLayout.obj \
- $(TMP_DIR)\ttkManager.obj \
- $(TMP_DIR)\ttkNotebook.obj \
- $(TMP_DIR)\ttkPanedwindow.obj \
- $(TMP_DIR)\ttkProgress.obj \
- $(TMP_DIR)\ttkScale.obj \
- $(TMP_DIR)\ttkScrollbar.obj \
- $(TMP_DIR)\ttkScroll.obj \
- $(TMP_DIR)\ttkSeparator.obj \
- $(TMP_DIR)\ttkSquare.obj \
- $(TMP_DIR)\ttkState.obj \
- $(TMP_DIR)\ttkTagSet.obj \
- $(TMP_DIR)\ttkTheme.obj \
- $(TMP_DIR)\ttkTrace.obj \
- $(TMP_DIR)\ttkTrack.obj \
- $(TMP_DIR)\ttkTreeview.obj \
- $(TMP_DIR)\ttkWidget.obj \
- $(TMP_DIR)\ttkStubInit.obj
+ $(TMP_DIR)\ttkWinMonitor.obj \
+ $(TMP_DIR)\ttkWinTheme.obj \
+ $(TMP_DIR)\ttkWinXPTheme.obj \
+ $(TMP_DIR)\ttkBlink.obj \
+ $(TMP_DIR)\ttkButton.obj \
+ $(TMP_DIR)\ttkCache.obj \
+ $(TMP_DIR)\ttkClamTheme.obj \
+ $(TMP_DIR)\ttkClassicTheme.obj \
+ $(TMP_DIR)\ttkDefaultTheme.obj \
+ $(TMP_DIR)\ttkElements.obj \
+ $(TMP_DIR)\ttkEntry.obj \
+ $(TMP_DIR)\ttkFrame.obj \
+ $(TMP_DIR)\ttkImage.obj \
+ $(TMP_DIR)\ttkInit.obj \
+ $(TMP_DIR)\ttkLabel.obj \
+ $(TMP_DIR)\ttkLayout.obj \
+ $(TMP_DIR)\ttkManager.obj \
+ $(TMP_DIR)\ttkNotebook.obj \
+ $(TMP_DIR)\ttkPanedwindow.obj \
+ $(TMP_DIR)\ttkProgress.obj \
+ $(TMP_DIR)\ttkScale.obj \
+ $(TMP_DIR)\ttkScrollbar.obj \
+ $(TMP_DIR)\ttkScroll.obj \
+ $(TMP_DIR)\ttkSeparator.obj \
+ $(TMP_DIR)\ttkSquare.obj \
+ $(TMP_DIR)\ttkState.obj \
+ $(TMP_DIR)\ttkTagSet.obj \
+ $(TMP_DIR)\ttkTheme.obj \
+ $(TMP_DIR)\ttkTrace.obj \
+ $(TMP_DIR)\ttkTrack.obj \
+ $(TMP_DIR)\ttkTreeview.obj \
+ $(TMP_DIR)\ttkWidget.obj \
+ $(TMP_DIR)\ttkStubInit.obj
TKSTUBOBJS = \
$(TMP_DIR)\tkStubLib.obj \
diff --git a/win/rules.vc b/win/rules.vc index 143ea9e..d459559 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -24,7 +24,7 @@ _RULES_VC = 1 # For modifications that are not backward-compatible, you *must* change
# the major version.
RULES_VERSION_MAJOR = 1
-RULES_VERSION_MINOR = 11
+RULES_VERSION_MINOR = 12
# The PROJECT macro must be defined by parent makefile.
!if "$(PROJECT)" == ""
@@ -1135,8 +1135,8 @@ STUBPREFIX = $(PROJECT)stub #
# TIP 430. Unused for 8.6 but no harm defining it to allow a common rules.vc
-TCLSCRIPTZIPNAME = libtcl$(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip
-TKSCRIPTZIPNAME = libtk$(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)$(TK_PATCH_LETTER)$(TK_RELEASE_SERIAL).zip
+TCL_ZIP_FILE = libtcl$(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip
+TK_ZIP_FILE = libtk$(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)$(TK_PATCH_LETTER)$(TK_RELEASE_SERIAL).zip
!if $(DOING_TCL)
TCLSHNAME = $(PROJECT)sh$(VERSION)$(SUFX).exe
@@ -1144,7 +1144,7 @@ TCLSH = $(OUT_DIR)\$(TCLSHNAME) TCLIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
TCLLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT)
TCLLIB = $(OUT_DIR)\$(TCLLIBNAME)
-TCLSCRIPTZIP = $(OUT_DIR)\$(TCLSCRIPTZIPNAME)
+TCLSCRIPTZIP = $(OUT_DIR)\$(TCL_ZIP_FILE)
!if $(TCL_MAJOR_VERSION) == 8
TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib
@@ -1180,7 +1180,7 @@ TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)t$(SUFX:t=).lib TCL_LIBRARY = $(_TCLDIR)\lib
TCLREGLIB = $(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib
TCLDDELIB = $(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib
-TCLSCRIPTZIP = $(_TCLDIR)\lib\$(TCLSCRIPTZIPNAME)
+TCLSCRIPTZIP = $(_TCLDIR)\lib\$(TCL_ZIP_FILE)
TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target
TCL_INCLUDES = -I"$(_TCLDIR)\include"
@@ -1204,7 +1204,7 @@ TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)t$(SUFX:t=).lib TCL_LIBRARY = $(_TCLDIR)\library
TCLREGLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib
TCLDDELIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib
-TCLSCRIPTZIP = $(_TCLDIR)\win\$(BUILDDIRTOP)\$(TCLSCRIPTZIPNAME)
+TCLSCRIPTZIP = $(_TCLDIR)\win\$(BUILDDIRTOP)\$(TCL_ZIP_FILE)
TCLTOOLSDIR = $(_TCLDIR)\tools
TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
@@ -1248,12 +1248,12 @@ TKSTUBLIBNAME = tkstub.lib !endif
!if $(DOING_TK)
-WISH = $(OUT_DIR)\$(WISHNAME)
+WISH = $(OUT_DIR)\$(WISHNAME)
TKSTUBLIB = $(OUT_DIR)\$(TKSTUBLIBNAME)
TKIMPLIB = $(OUT_DIR)\$(TKIMPLIBNAME)
TKLIB = $(OUT_DIR)\$(TKLIBNAME)
TK_INCLUDES = -I"$(WIN_DIR)" -I"$(GENERICDIR)"
-TKSCRIPTZIP = $(OUT_DIR)\$(TKSCRIPTZIPNAME)
+TKSCRIPTZIP = $(OUT_DIR)\$(TK_ZIP_FILE)
!else # effectively NEED_TK
@@ -1268,7 +1268,7 @@ TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX:t=).lib TKIMPLIB = $(_TKDIR)\lib\$(TKIMPLIBNAME)
!endif
TK_INCLUDES = -I"$(_TKDIR)\include"
-TKSCRIPTZIP = $(_TKDIR)\lib\$(TKSCRIPTZIPNAME)
+TKSCRIPTZIP = $(_TKDIR)\lib\$(TK_ZIP_FILE)
!else # Building against Tk sources
@@ -1282,7 +1282,7 @@ TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX:t=).lib TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME)
!endif
TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
-TKSCRIPTZIP = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKSCRIPTZIPNAME)
+TKSCRIPTZIP = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TK_ZIP_FILE)
!endif # TKINSTALL
@@ -1294,7 +1294,8 @@ tklibs = "$(TKSTUBLIB)" "$(TKIMPLIB)" # Various output paths
PRJIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
PRJLIBNAME8 = $(PROJECT)$(VERSION)$(SUFX).$(EXT)
-PRJLIBNAME9 = tcl9$(PROJECT)$(VERSION)$(SUFX).$(EXT)
+# Even when building against Tcl 8, PRJLIBNAME9 must not have "t"
+PRJLIBNAME9 = tcl9$(PROJECT)$(VERSION)$(SUFX:t=).$(EXT)
!if $(TCL_MAJOR_VERSION) == 8 || "$(TCL_BUILD_FOR)" == "8"
PRJLIBNAME = $(PRJLIBNAME8)
!else
@@ -1446,9 +1447,6 @@ OPTDEFINES = $(OPTDEFINES) /DNO_STRTOI64=1 !if "$(_USE_64BIT_TIME_T)" == "1"
OPTDEFINES = $(OPTDEFINES) /D_USE_64BIT_TIME_T=1
!endif
-
-# _ATL_XP_TARGETING - Newer SDK's need this to build for XP
-COMPILERFLAGS = /D_ATL_XP_TARGETING
!endif
!if "$(TCL_BUILD_FOR)" == "8"
OPTDEFINES = $(OPTDEFINES) /DTCL_MAJOR_VERSION=8
@@ -1459,9 +1457,9 @@ OPTDEFINES = $(OPTDEFINES) /DTCL_MAJOR_VERSION=8 # so we pass both
!if !$(DOING_TCL) && !$(DOING_TK)
PKGNAMEFLAGS = /DPACKAGE_NAME="\"$(PRJ_PACKAGE_TCLNAME)\"" \
- /DPACKAGE_TCLNAME="\"$(PRJ_PACKAGE_TCLNAME)\"" \
- /DPACKAGE_VERSION="\"$(DOTVERSION)\"" \
- /DMODULE_SCOPE=extern
+ /DPACKAGE_TCLNAME="\"$(PRJ_PACKAGE_TCLNAME)\"" \
+ /DPACKAGE_VERSION="\"$(DOTVERSION)\"" \
+ /DMODULE_SCOPE=extern
!endif
# crt picks the C run time based on selected OPTS
@@ -1798,18 +1796,18 @@ VS_VERSION_INFO VERSIONINFO BEGIN
BLOCK "StringFileInfo"
BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "FileDescription", "Tcl extension " PROJECT
- VALUE "OriginalFilename", PRJLIBNAME
- VALUE "FileVersion", DOTVERSION
- VALUE "ProductName", "Package " PROJECT " for Tcl"
- VALUE "ProductVersion", DOTVERSION
- END
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "Tcl extension " PROJECT
+ VALUE "OriginalFilename", PRJLIBNAME
+ VALUE "FileVersion", DOTVERSION
+ VALUE "ProductName", "Package " PROJECT " for Tcl"
+ VALUE "ProductVersion", DOTVERSION
+ END
END
BLOCK "VarFileInfo"
BEGIN
- VALUE "Translation", 0x409, 1200
+ VALUE "Translation", 0x409, 1200
END
END
@@ -258,10 +258,10 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [ AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh]) if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then - AC_MSG_RESULT([loading]) + AC_MSG_RESULT([loading]) . "${TCL_BIN_DIR}/tclConfig.sh" else - AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh]) + AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh]) fi # @@ -274,9 +274,9 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [ # if test -f $TCL_BIN_DIR/Makefile ; then - TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} - TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} - TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} + TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} + TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} + TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} fi eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" @@ -318,10 +318,10 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [ AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh]) if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then - AC_MSG_RESULT([loading]) + AC_MSG_RESULT([loading]) . "${TK_BIN_DIR}/tkConfig.sh" else - AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh]) + AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh]) fi @@ -570,9 +570,9 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ fi if test "$CYGPATH" = "echo"; then - DEPARG='"$<"' + DEPARG='"$<"' else - DEPARG='"$(shell $(CYGPATH) $<)"' + DEPARG='"$(shell $(CYGPATH) $<)"' fi # set various compiler flags depending on whether we are using gcc or cl @@ -644,7 +644,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ [ac_cv_enable_auto_image_base=no]) ) CFLAGS=$hold_cflags - if test "$ac_cv_enable_auto_image_base" == "yes" ; then + if test "$ac_cv_enable_auto_image_base" = "yes" ; then extra_ldflags="$extra_ldflags -Wl,--enable-auto-image-base" fi @@ -669,18 +669,18 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ if test "${SHARED_BUILD}" = "0" ; then # static - AC_MSG_RESULT([using static flags]) + AC_MSG_RESULT([using static flags]) runtime= LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s.exe" else # dynamic - AC_MSG_RESULT([using shared flags]) + AC_MSG_RESULT([using shared flags]) # ad-hoc check to see if CC supports -shared. if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then AC_MSG_ERROR([${CC} does not support the -shared option. - You will need to upgrade to a newer version of the toolchain.]) + You will need to upgrade to a newer version of the toolchain.]) fi runtime= @@ -772,13 +772,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ else if test "${SHARED_BUILD}" = "0" ; then # static - AC_MSG_RESULT([using static flags]) + AC_MSG_RESULT([using static flags]) runtime=-MT LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s.exe" else # dynamic - AC_MSG_RESULT([using shared flags]) + AC_MSG_RESULT([using shared flags]) runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. LIBRARIES="\${SHARED_LIBRARIES}" @@ -1246,32 +1246,32 @@ AC_DEFUN([SC_ZIPFS_SUPPORT], [ AC_CACHE_VAL(ac_cv_path_zip, [ search_path=`echo ${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do - for j in `ls -r $dir/zip 2> /dev/null` \ - `ls -r $dir/zip 2> /dev/null` ; do - if test x"$ac_cv_path_zip" = x ; then - if test -f "$j" ; then - ac_cv_path_zip=$j - break - fi - fi - done + for j in `ls -r $dir/zip 2> /dev/null` \ + `ls -r $dir/zip 2> /dev/null` ; do + if test x"$ac_cv_path_zip" = x ; then + if test -f "$j" ; then + ac_cv_path_zip=$j + break + fi + fi + done done ]) if test -f "$ac_cv_path_zip" ; then - ZIP_PROG="$ac_cv_path_zip" - AC_MSG_RESULT([$ZIP_PROG]) - ZIP_PROG_OPTIONS="-rq" - ZIP_PROG_VFSSEARCH="*" - AC_MSG_RESULT([Found INFO Zip in environment]) - # Use standard arguments for zip + ZIP_PROG="$ac_cv_path_zip" + AC_MSG_RESULT([$ZIP_PROG]) + ZIP_PROG_OPTIONS="-rq" + ZIP_PROG_VFSSEARCH="*" + AC_MSG_RESULT([Found INFO Zip in environment]) + # Use standard arguments for zip else - # It is not an error if an installed version of Zip can't be located. - # We can use the locally distributed minizip instead - ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}" - ZIP_PROG_OPTIONS="-o -r" - ZIP_PROG_VFSSEARCH="*" - ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}" - AC_MSG_RESULT([No zip found on PATH building minizip]) + # It is not an error if an installed version of Zip can't be located. + # We can use the locally distributed minizip instead + ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}" + ZIP_PROG_OPTIONS="-o -r" + ZIP_PROG_VFSSEARCH="*" + ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}" + AC_MSG_RESULT([No zip found on PATH building minizip]) fi AC_SUBST(ZIP_PROG) AC_SUBST(ZIP_PROG_OPTIONS) diff --git a/win/tkWin3d.c b/win/tkWin3d.c index 2c2181b..c5dfeb4 100644 --- a/win/tkWin3d.c +++ b/win/tkWin3d.c @@ -350,17 +350,17 @@ TkpGetShadows( if ((TkWinIndexOfColor(borderPtr->bgColorPtr) == COLOR_3DFACE) || (TkWinIndexOfColor(borderPtr->bgColorPtr) == COLOR_WINDOW)) { borderPtr->darkColorPtr = Tk_GetColor(NULL, tkwin, - Tk_GetUid("SystemButtonShadow")); + "SystemButtonShadow"); gcValues.foreground = borderPtr->darkColorPtr->pixel; borderPtr->darkGC = Tk_GetGC(tkwin, GCForeground, &gcValues); borderPtr->lightColorPtr = Tk_GetColor(NULL, tkwin, - Tk_GetUid("SystemButtonHighlight")); + "SystemButtonHighlight"); gcValues.foreground = borderPtr->lightColorPtr->pixel; borderPtr->lightGC = Tk_GetGC(tkwin, GCForeground, &gcValues); ((WinBorder*)borderPtr)->dark2ColorPtr = Tk_GetColor(NULL, tkwin, - Tk_GetUid("System3dDarkShadow")); + "System3dDarkShadow"); ((WinBorder*)borderPtr)->light2ColorPtr = Tk_GetColor(NULL, tkwin, - Tk_GetUid("System3dLight")); + "System3dLight"); return; } darkColor.red = 0; @@ -466,8 +466,7 @@ TkpGetShadows( } if (borderPtr->shadow == None) { - borderPtr->shadow = Tk_GetBitmap((Tcl_Interp *) NULL, tkwin, - Tk_GetUid("gray50")); + borderPtr->shadow = Tk_GetBitmap(NULL, tkwin, "gray50"); if (borderPtr->shadow == None) { Tcl_Panic("TkpGetShadows couldn't allocate bitmap for border"); } diff --git a/win/tkWinButton.c b/win/tkWinButton.c index e0998b5..2281423 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.c @@ -543,7 +543,6 @@ TkpDisplayButton( int y, relief; Tk_Window tkwin = butPtr->tkwin; int width = 0, height = 0, haveImage = 0, haveText = 0, drawRing = 0; - RECT rect; int defaultWidth; /* Width of default ring. */ int offset; /* 0 means this is a label widget. 1 means it * is a flavor of button, so we offset the @@ -556,6 +555,7 @@ TkpDisplayButton( int imageXOffset = 0, imageYOffset = 0; /* Image information that will be used to * restrict disabled pixmap as well. */ + int padX, padY, borderWidth, highlightWidth; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); @@ -565,10 +565,10 @@ TkpDisplayButton( return; } - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->borderWidthPtr, &butPtr->borderWidth); - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->highlightWidthPtr, &butPtr->highlightWidth); - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padXPtr, &butPtr->padX); - Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padYPtr, &butPtr->padY); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->highlightWidthObj, &highlightWidth); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, tkwin, butPtr->padYObj, &padY); border = butPtr->normalBorder; if ((butPtr->state == STATE_DISABLED) && (butPtr->disabledFg != NULL)) { @@ -627,11 +627,11 @@ TkpDisplayButton( */ if (butPtr->type == TYPE_LABEL) { - defaultWidth = butPtr->highlightWidth; + defaultWidth = highlightWidth; offset = 0; } else if (butPtr->type == TYPE_BUTTON) { defaultWidth = ((butPtr->defaultState == DEFAULT_ACTIVE) - ? butPtr->highlightWidth : 0); + ? highlightWidth : 0); offset = 1; } else { defaultWidth = 0; @@ -681,11 +681,11 @@ TkpDisplayButton( */ if (butPtr->compound == COMPOUND_TOP) { - textYOffset = height + butPtr->padY; + textYOffset = height + padY; } else { - imageYOffset = butPtr->textHeight + butPtr->padY; + imageYOffset = butPtr->textHeight + padY; } - fullHeight = height + butPtr->textHeight + butPtr->padY; + fullHeight = height + butPtr->textHeight + padY; fullWidth = (width > butPtr->textWidth ? width : butPtr->textWidth); textXOffset = (fullWidth - butPtr->textWidth)/2; @@ -699,11 +699,11 @@ TkpDisplayButton( */ if (butPtr->compound == COMPOUND_LEFT) { - textXOffset = width + butPtr->padX; + textXOffset = width + padX; } else { - imageXOffset = butPtr->textWidth + butPtr->padX; + imageXOffset = butPtr->textWidth + padX; } - fullWidth = butPtr->textWidth + butPtr->padX + width; + fullWidth = butPtr->textWidth + padX + width; fullHeight = (height > butPtr->textHeight ? height : butPtr->textHeight); textYOffset = (fullHeight - butPtr->textHeight)/2; @@ -727,7 +727,7 @@ TkpDisplayButton( case COMPOUND_NONE: break; } - TkComputeAnchor(butPtr->anchor, tkwin, butPtr->padX, butPtr->padY, + TkComputeAnchor(butPtr->anchor, tkwin, padX, padY, butPtr->indicatorSpace + fullWidth, fullHeight, &x, &y); x += butPtr->indicatorSpace; @@ -812,7 +812,7 @@ TkpDisplayButton( XSetClipOrigin(butPtr->display, gc, 0, 0); } } else { - TkComputeAnchor(butPtr->anchor, tkwin, butPtr->padX, butPtr->padY, + TkComputeAnchor(butPtr->anchor, tkwin, padX, padY, butPtr->indicatorSpace + butPtr->textWidth, butPtr->textHeight, &x, &y); @@ -853,22 +853,17 @@ TkpDisplayButton( */ if (drawRing && butPtr->flags & GOT_FOCUS && butPtr->type != TYPE_LABEL) { - dc = TkWinGetDrawableDC(butPtr->display, pixmap, &state); if (butPtr->type == TYPE_BUTTON || !butPtr->indicatorOn) { - rect.top = butPtr->borderWidth + 1 + defaultWidth; - rect.left = rect.top; - rect.right = Tk_Width(tkwin) - rect.left; - rect.bottom = Tk_Height(tkwin) - rect.top; + int dottedWidth = borderWidth + 1 + defaultWidth; + TkWinDrawDottedRect(butPtr->display, pixmap, gc->foreground, + dottedWidth, dottedWidth, + Tk_Width(tkwin) - 2*dottedWidth, + Tk_Height(tkwin) - 2*dottedWidth); } else { - rect.top = y-1 + textYOffset; - rect.left = x-1 + textXOffset; - rect.right = x+butPtr->textWidth + 1 + textXOffset; - rect.bottom = y+butPtr->textHeight + 2 + textYOffset; + TkWinDrawDottedRect(butPtr->display, pixmap, gc->foreground, + x-1 + textXOffset, y-1 + textYOffset, + butPtr->textWidth + 2, butPtr->textHeight + 3); } - SetTextColor(dc, gc->foreground); - SetBkColor(dc, gc->background); - DrawFocusRect(dc, &rect); - TkWinReleaseDrawableDC(pixmap, dc, &state); } y += height/2; @@ -931,7 +926,7 @@ TkpDisplayButton( defaultWidth, defaultWidth, Tk_Width(tkwin) - 2 * defaultWidth, Tk_Height(tkwin) - 2 * defaultWidth, - butPtr->borderWidth, relief); + borderWidth, relief); } if (defaultWidth != 0) { int highlightColor; @@ -1001,14 +996,20 @@ TkpComputeButtonGeometry( /* Vertical and horizontal dialog units size in pixels. */ double vDLU, hDLU; Tk_FontMetrics fm; + int borderWidth, highlightWidth, wrapLength; + int butPtrWidth, butPtrHeight; + int padX, padY; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthPtr, &butPtr->highlightWidth); - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthPtr, &butPtr->borderWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->highlightWidthObj, &highlightWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->borderWidthObj, &borderWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->wrapLengthObj, &wrapLength); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->widthObj, &butPtrWidth); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->heightObj, &butPtrHeight); - butPtr->inset = butPtr->highlightWidth + butPtr->borderWidth; + butPtr->inset = highlightWidth + borderWidth; butPtr->indicatorSpace = 0; if (!tsdPtr->initialized) { @@ -1039,7 +1040,7 @@ TkpComputeButtonGeometry( Tk_FreeTextLayout(butPtr->textLayout); butPtr->textLayout = Tk_ComputeTextLayout(butPtr->tkfont, - Tcl_GetString(butPtr->textPtr), TCL_INDEX_NONE, butPtr->wrapLength, + Tcl_GetString(butPtr->textPtr), TCL_INDEX_NONE, wrapLength, butPtr->justify, 0, &butPtr->textWidth, &butPtr->textHeight); txtWidth = butPtr->textWidth; @@ -1087,8 +1088,8 @@ TkpComputeButtonGeometry( * = 50 DLU. Therefore, width = -11 -> MWUE compliant buttons. */ - if (butPtr->width < 0) { - minWidth = -(butPtr->width); /* Min width in chars */ + if (butPtrWidth < 0) { + minWidth = -(butPtrWidth); /* Min width in chars */ width = avgWidth * minWidth; /* Allow for characters */ width += (int)(0.5 + (6 * hDLU)); /* Add for padding */ } @@ -1099,7 +1100,7 @@ TkpComputeButtonGeometry( * suit. */ - if (butPtr->width == 0 + if (butPtrWidth == 0 || (txtWidth + (int)(0.5 + (6 * hDLU)) > width)) { width = txtWidth + (int)(0.5 + (6 * hDLU)); } @@ -1200,8 +1201,8 @@ TkpComputeButtonGeometry( * because otherwise it is not really a compound button. */ - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padXPtr, &butPtr->padX); - Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padYPtr, &butPtr->padY); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padXObj, &padX); + Tk_GetPixelsFromObj(NULL, butPtr->tkwin, butPtr->padYObj, &padY); if (butPtr->compound != COMPOUND_NONE && haveImage && haveText) { switch ((enum compound) butPtr->compound) { @@ -1214,7 +1215,7 @@ TkpComputeButtonGeometry( if (imgWidth > width) { width = imgWidth; } - height += imgHeight + butPtr->padY; + height += imgHeight + padY; break; case COMPOUND_LEFT: @@ -1227,8 +1228,8 @@ TkpComputeButtonGeometry( * space of default button width */ - if ((imgWidth + txtWidth + butPtr->padX) > width) { - width = imgWidth + txtWidth + butPtr->padX; + if ((imgWidth + txtWidth + padX) > width) { + width = imgWidth + txtWidth + padX; } if (imgHeight > height) { @@ -1256,33 +1257,33 @@ TkpComputeButtonGeometry( * Fix up for minimum width. */ - if (butPtr->width < 0) { + if (butPtrWidth < 0) { /* * minWidth in pixels (because there's an image. */ - minWidth = -(butPtr->width); + minWidth = -(butPtrWidth); if (width < minWidth) { width = minWidth; } - } else if (butPtr->width > 0) { - width = butPtr->width; + } else if (butPtrWidth > 0) { + width = butPtrWidth; } - if (butPtr->height > 0) { - height = butPtr->height; + if (butPtrHeight > 0) { + height = butPtrHeight; } - width += 2 * butPtr->padX; - height += 2 * butPtr->padY; + width += 2 * padX; + height += 2 * padY; } else if (haveImage) { - if (butPtr->width > 0) { - width = butPtr->width; + if (butPtrWidth > 0) { + width = butPtrWidth; } else { width = imgWidth; } - if (butPtr->height > 0) { - height = butPtr->height; + if (butPtrHeight > 0) { + height = butPtrHeight; } else { height = imgHeight; } @@ -1296,8 +1297,8 @@ TkpComputeButtonGeometry( * characters on the face, not in the over-all button width */ - if (butPtr->width > 0) { - width = butPtr->width * avgWidth; + if (butPtrWidth > 0) { + width = butPtrWidth * avgWidth; } /* @@ -1305,8 +1306,8 @@ TkpComputeButtonGeometry( * lines on the face, not in the over-all button height. */ - if (butPtr->height > 0) { - height = butPtr->height * fm.linespace; + if (butPtrHeight > 0) { + height = butPtrHeight * fm.linespace; /* * Make the same adjustments as above to get same height for e.g. @@ -1326,8 +1327,8 @@ TkpComputeButtonGeometry( } } - width += 2 * butPtr->padX; - height += 2 * butPtr->padY; + width += 2 * padX; + height += 2 * padY; } /* diff --git a/win/tkWinCursor.c b/win/tkWinCursor.c index 635ae66..8cf349b 100644 --- a/win/tkWinCursor.c +++ b/win/tkWinCursor.c @@ -126,13 +126,13 @@ TkGetCursorByName( * -cursor @/winnt/cursors/globe.ani * -cursor @C:/Winnt/cursors/E_arrow.cur * -cursor {@C:/Program\ Files/Cursors/bart.ani} - * -cursor {{@C:/Program Files/Cursors/bart.ani}} + * -cursor {{@C:/Program Files/Cursors/bart.ani}} * -cursor [list @[file join "C:/Program Files" Cursors bart.ani]] */ if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( - "can't get cursor from a file in a safe interpreter", TCL_INDEX_NONE)); + "cannot get cursor from a file in a safe interpreter", TCL_INDEX_NONE)); Tcl_SetErrorCode(interp, "TK", "SAFE", "CURSOR_FILE", NULL); ckfree(argv); ckfree(cursorPtr); diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h index 5af7877..9f546de 100644 --- a/win/tkWinDefault.h +++ b/win/tkWinDefault.h @@ -492,7 +492,7 @@ #define DEF_TEXT_PADX "1" #define DEF_TEXT_PADY "1" #define DEF_TEXT_RELIEF "sunken" -#define DEF_TEXT_INACTIVE_SELECT_COLOR NULL +#define DEF_TEXT_INACTIVE_SELECT_BG_COLOR NULL #define DEF_TEXT_SELECT_COLOR SELECT_BG #define DEF_TEXT_SELECT_MONO BLACK #define DEF_TEXT_SELECT_BD_COLOR "0" diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 4fe1593..1b058ec 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -761,7 +761,7 @@ Tk_ChooseColorObjCmd( case COLOR_INITIAL: { XColor *colorPtr; - colorPtr = Tk_GetColor(interp, tkwin, string); + colorPtr = Tk_AllocColorFromObj(interp, tkwin, valuePtr); if (colorPtr == NULL) { return TCL_ERROR; } diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index 1022be4..b82c7ac 100644 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -1488,6 +1488,74 @@ Tk_DrawHighlightBorder( /* *---------------------------------------------------------------------- * + * TkWinDrawDottedRect -- + * + * This function draws a dotted rectangle, used as focus ring of Ttk + * widgets and for rendering the active element of a listbox. + * + * Results: + * None. + * + * Side effects: + * A dotted rectangle is drawn in the specified Drawable. + * + *---------------------------------------------------------------------- + */ + +void +TkWinDrawDottedRect( + Display *disp, /* Display containing the dotted rectangle. */ + Drawable d, /* Where to draw the rectangle (typically a + * pixmap for double buffering). */ + long pixel, /* Color to use for drawing the rectangle. If + * pixel < 0 then the black color and the + * foreground mix mode R2_NOT are used. */ + int x, int y, /* Coordinates of the top-left corner. */ + int width, int height) /* Width & height, _including the border_. */ +{ + TkWinDCState state; + HDC dc; + LOGBRUSH lb; + HPEN pen; + int widthMod2 = width % 2, heightMod2 = height % 2; + int x2 = x + width - 1, y2 = y + height - 1; + + dc = TkWinGetDrawableDC(disp, d, &state); + + lb.lbStyle = BS_SOLID; + lb.lbColor = pixel < 0 ? RGB(0, 0, 0) : (COLORREF)pixel; + lb.lbHatch = 0; + + if (pixel < 0) { + SetROP2(dc, R2_NOT); + SetBkMode(dc, TRANSPARENT); + } + + pen = ExtCreatePen(PS_COSMETIC | PS_ALTERNATE, 1, &lb, 0, NULL); + SelectObject(dc, pen); + SelectObject(dc, GetStockObject(NULL_BRUSH)); + + if (widthMod2 == 0 && heightMod2 == 0) { + MoveToEx(dc, x+1, y, NULL); LineTo(dc, x2, y); /* N */ + MoveToEx(dc, x+2, y2, NULL); LineTo(dc, x2+1, y2); /* S */ + MoveToEx(dc, x, y+2, NULL); LineTo(dc, x, y2+1); /* W */ + MoveToEx(dc, x2, y+1, NULL); LineTo(dc, x2, y2); /* E */ + } else { + int dx = widthMod2, dy = heightMod2; + + MoveToEx(dc, x+1, y, NULL); LineTo(dc, x2+dx, y); /* N */ + MoveToEx(dc, x+1, y2, NULL); LineTo(dc, x2+dx, y2); /* S */ + MoveToEx(dc, x, y+1, NULL); LineTo(dc, x, y2+dy); /* W */ + MoveToEx(dc, x2, y+1, NULL); LineTo(dc, x2, y2+dy); /* E */ + } + + DeleteObject(pen); + TkWinReleaseDrawableDC(d, dc, &state); +} + +/* + *---------------------------------------------------------------------- + * * TkpDrawFrameEx -- * * This function draws the rectangular frame area. diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c index 34cd8ca..4826119 100644 --- a/win/tkWinEmbed.c +++ b/win/tkWinEmbed.c @@ -281,7 +281,7 @@ Tk_UseWindow( if (!IsWindow(hwnd)) { if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "window \"%s\" doesn't exist", string)); + "window \"%s\" does not exist", string)); Tcl_SetErrorCode(interp, "TK", "EMBED", "EXIST", NULL); } return TCL_ERROR; diff --git a/win/tkWinGDI.c b/win/tkWinGDI.c index 1ecf285..7351ee6 100644 --- a/win/tkWinGDI.c +++ b/win/tkWinGDI.c @@ -955,9 +955,9 @@ static int GdiOval( hDC = printDC; if ((Tcl_GetIntFromObj(interp, objv[2], &x1) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[2], &y1) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[3], &x2) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[4], &y2) != TCL_OK)) { + || (Tcl_GetIntFromObj(interp, objv[3], &y1) != TCL_OK) + || (Tcl_GetIntFromObj(interp, objv[4], &x2) != TCL_OK) + || (Tcl_GetIntFromObj(interp, objv[5], &y2) != TCL_OK)) { return TCL_ERROR; } if (x1 > x2) { diff --git a/win/tkWinInt.h b/win/tkWinInt.h index 03cd825..93b98ca 100644 --- a/win/tkWinInt.h +++ b/win/tkWinInt.h @@ -194,48 +194,49 @@ MODULE_SCOPE void TkWinSetupSystemFonts(TkMainInfo *mainPtr); * The following is implemented in tkWinWm and used by tkWinEmbed.c */ -MODULE_SCOPE void TkpWinToplevelWithDraw(TkWindow *winPtr); -MODULE_SCOPE void TkpWinToplevelIconify(TkWindow *winPtr); -MODULE_SCOPE void TkpWinToplevelDeiconify(TkWindow *winPtr); -MODULE_SCOPE long TkpWinToplevelIsControlledByWm(TkWindow *winPtr); -MODULE_SCOPE long TkpWinToplevelMove(TkWindow *winPtr, int x, int y); -MODULE_SCOPE long TkpWinToplevelOverrideRedirect(TkWindow *winPtr, +MODULE_SCOPE void TkpWinToplevelWithDraw(TkWindow *winPtr); +MODULE_SCOPE void TkpWinToplevelIconify(TkWindow *winPtr); +MODULE_SCOPE void TkpWinToplevelDeiconify(TkWindow *winPtr); +MODULE_SCOPE long TkpWinToplevelIsControlledByWm(TkWindow *winPtr); +MODULE_SCOPE long TkpWinToplevelMove(TkWindow *winPtr, int x, int y); +MODULE_SCOPE long TkpWinToplevelOverrideRedirect(TkWindow *winPtr, int reqValue); -MODULE_SCOPE void TkpWinToplevelDetachWindow(TkWindow *winPtr); -MODULE_SCOPE int TkpWmGetState(TkWindow *winPtr); +MODULE_SCOPE void TkpWinToplevelDetachWindow(TkWindow *winPtr); +MODULE_SCOPE int TkpWmGetState(TkWindow *winPtr); -MODULE_SCOPE int TkTranslateWinEvent(HWND hwnd, UINT message, +MODULE_SCOPE int TkTranslateWinEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); -MODULE_SCOPE void TkWinPointerEvent(HWND hwnd, int x, int y); +MODULE_SCOPE void TkWinPointerEvent(HWND hwnd, int x, int y); /* * The following is implemented in tkWinPointer.c and also used in tkWinWindow.c */ -MODULE_SCOPE void TkSetCursorPos(int x, int y); +MODULE_SCOPE void TkSetCursorPos(int x, int y); /* * The following is implemented in tkWinSysTray.c */ -MODULE_SCOPE int WinIcoInit (Tcl_Interp* interp); +MODULE_SCOPE int WinIcoInit (Tcl_Interp* interp); /* * The following is implemented in tkWinGDI.c */ -MODULE_SCOPE int Winprint_Init(Tcl_Interp* interp); +MODULE_SCOPE int Winprint_Init(Tcl_Interp* interp); /* - * The following is implemented in tkWinSysTray.c + * The following is implemented in tkWinDraw.c and used in tkUtil.c */ -MODULE_SCOPE int WinIcoInit (Tcl_Interp* interp); +MODULE_SCOPE void TkWinDrawDottedRect(Display *disp, Drawable d, + long pixel, int x, int y, int width, int height); /* * Common routines used in Windows implementation */ -MODULE_SCOPE Tcl_Obj * TkWin32ErrorObj(HRESULT hrError); +MODULE_SCOPE Tcl_Obj * TkWin32ErrorObj(HRESULT hrError); /* diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index cc731a2..e69a689 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -1238,11 +1238,13 @@ TkWinHandleMenuEvent( interp = menuPtr->interp; Tcl_Preserve(interp); + Tcl_Preserve(menuPtr); code = TkInvokeMenu(interp, menuPtr, mePtr->index); if (code != TCL_OK && code != TCL_CONTINUE && code != TCL_BREAK) { Tcl_AddErrorInfo(interp, "\n (menu invoke)"); Tcl_BackgroundException(interp, code); } + Tcl_Release(menuPtr); Tcl_Release(interp); *plResult = 0; returnResult = 1; @@ -1433,7 +1435,7 @@ TkWinHandleMenuEvent( TkActivateMenuEntry(menuPtr, TCL_INDEX_NONE); } else { if (mePtr->index >= (int)menuPtr->numEntries) { - Tcl_Panic("Trying to activate an entry which doesn't exist"); + Tcl_Panic("Trying to activate an entry which does not exist"); } TkActivateMenuEntry(menuPtr, mePtr->index); } @@ -1598,7 +1600,7 @@ GetMenuIndicatorGeometry( int borderWidth; Tk_GetPixelsFromObj(menuPtr->interp, menuPtr->tkwin, - menuPtr->borderWidthPtr, &borderWidth); + menuPtr->borderWidthObj, &borderWidth); *widthPtr = indicatorDimensions[1] - borderWidth; /* @@ -1842,7 +1844,7 @@ DrawMenuEntryIndicator( rect.top = y; rect.bottom = y + mePtr->height; Tk_GetPixelsFromObj(menuPtr->interp, menuPtr->tkwin, - menuPtr->borderWidthPtr, &borderWidth); + menuPtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(menuPtr->interp, menuPtr->tkwin, menuPtr->activeBorderWidthPtr, &activeBorderWidth); rect.left = borderWidth + activeBorderWidth + x; @@ -2942,7 +2944,7 @@ DrawMenuEntryBackground( || (menuPtr->postedCascade != mePtr))) { relief = TK_RELIEF_FLAT; } else { - Tk_GetReliefFromObj(NULL, menuPtr->activeReliefPtr, &relief); + relief = menuPtr->activeRelief; } Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->activeBorderWidthPtr, &activeBorderWidth); @@ -2988,7 +2990,7 @@ TkpComputeStandardMenuGeometry( } Tk_GetPixelsFromObj(menuPtr->interp, menuPtr->tkwin, - menuPtr->borderWidthPtr, &borderWidth); + menuPtr->borderWidthObj, &borderWidth); x = y = borderWidth; indicatorSpace = labelWidth = accelWidth = 0; windowHeight = 0; diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c index a54deeb..c9bfba5 100644 --- a/win/tkWinScrlbr.c +++ b/win/tkWinScrlbr.c @@ -388,6 +388,7 @@ TkpComputeScrollbarGeometry( * changed. */ { int fieldLength, minThumbSize; + int width; /* * Windows doesn't use focus rings on scrollbars, but we still perform @@ -403,7 +404,7 @@ TkpComputeScrollbarGeometry( fieldLength = Tk_Width(scrollPtr->tkwin); minThumbSize = hThumb; } - fieldLength -= 2*scrollPtr->arrowLength; + fieldLength -= 2 * scrollPtr->arrowLength; if (fieldLength < 0) { fieldLength = 0; } @@ -440,12 +441,13 @@ TkpComputeScrollbarGeometry( * window, if any). Then arrange for the window to be redisplayed. */ + Tk_GetPixelsFromObj(NULL, scrollPtr->tkwin, scrollPtr->widthObj, &width); if (scrollPtr->vertical) { Tk_GeometryRequest(scrollPtr->tkwin, - scrollPtr->width, 2*scrollPtr->arrowLength + minThumbSize); + width, 2 * scrollPtr->arrowLength + minThumbSize); } else { Tk_GeometryRequest(scrollPtr->tkwin, - 2*scrollPtr->arrowLength + minThumbSize, scrollPtr->width); + 2 * scrollPtr->arrowLength + minThumbSize, width); } Tk_SetInternalBorder(scrollPtr->tkwin, 0); } @@ -504,14 +506,13 @@ ScrollbarProc( * Bail out immediately if there isn't a command to invoke. */ - if (scrollPtr->info.commandSize == 0) { + if (!scrollPtr->info.commandObj) { Tcl_ServiceAll(); return 0; } Tcl_DStringInit(&cmdString); - Tcl_DStringAppend(&cmdString, scrollPtr->info.command, - scrollPtr->info.commandSize); + Tcl_DStringAppend(&cmdString, Tcl_GetString(scrollPtr->info.commandObj), TCL_INDEX_NONE); if (command == SB_LINELEFT || command == SB_LINERIGHT) { Tcl_DStringAppendElement(&cmdString, "scroll"); diff --git a/win/tkWinSysTray.c b/win/tkWinSysTray.c index 78613ac..871650e 100644 --- a/win/tkWinSysTray.c +++ b/win/tkWinSysTray.c @@ -375,7 +375,7 @@ GetIcoPtr( notfound: Tcl_AppendResult(interp, "icon \"", string, - "\" doesn't exist", NULL); + "\" does not exist", NULL); return NULL; } @@ -983,7 +983,7 @@ WinSystrayCmd( photo = Tk_FindPhoto(interp, Tcl_GetString(imageObj)); if (photo == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "image \"%s\" doesn't exist", Tcl_GetString(imageObj))); + "image \"%s\" does not exist", Tcl_GetString(imageObj))); return TCL_ERROR; } Tk_PhotoGetSize(photo, &width, &height); diff --git a/win/tkWinWm.c b/win/tkWinWm.c index b9c56bd..419e9fe 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -2461,6 +2461,41 @@ TkpWmGetState( *-------------------------------------------------------------- */ +static void CheckForPointer(TkWindow *winPtr) +{ + if (winPtr == NULL || winPtr->mainPtr == NULL) { + /* + * Bug [d233f01e2a] - clipboard clean up after main window destroyed + * Nothing to do. + */ + return; + } + + POINT mouse; + int x, y; + unsigned int state = TkWinGetModifierState(); + TkWindow **windows = TkWmStackorderToplevel(winPtr->mainPtr->winPtr); + TkWindow **w; + TkGetPointerCoords(NULL, &x, &y); + mouse.x = x; + mouse.y = y; + if (windows != NULL) { + for (w = windows; *w ; w++) { + RECT windowRect; + HWND hwnd = Tk_GetHWND(Tk_WindowId((Tk_Window) *w)); + if (GetWindowRect(hwnd, &windowRect) == 0) { + continue; + } + if (winPtr != *w && PtInRect(&windowRect, mouse)) { + Tk_Window target = Tk_CoordsToWindow(x, y, (Tk_Window) *w); + Tk_UpdatePointer((Tk_Window) target, x, y, state); + break; + } + } + ckfree(windows); + } +} + void TkWmDeadWindow( TkWindow *winPtr) /* Top-level window that's being deleted. */ @@ -2599,6 +2634,13 @@ TkWmDeadWindow( DecrIconRefCount(wmPtr->iconPtr); } + /* + * Check if the dead window is a toplevel containing the pointer. If so, + * find the window which will inherit the pointer and call + * TkUpdatePointer. + */ + + CheckForPointer(winPtr); ckfree(wmPtr); winPtr->wmInfoPtr = NULL; } @@ -3028,7 +3070,7 @@ WmAttributesCmd( } wmPtr->alpha = dval; } else { /* -transparentcolor */ - const char *crefstr = Tcl_GetStringFromObj(objv[i+1], &length); + (void)Tcl_GetStringFromObj(objv[i+1], &length); if (length == 0) { /* reset to no transparent color */ @@ -3038,7 +3080,7 @@ WmAttributesCmd( } } else { XColor *cPtr = - Tk_GetColor(interp, tkwin, Tk_GetUid(crefstr)); + Tk_AllocColorFromObj(interp, tkwin, objv[i+1]); if (cPtr == NULL) { return TCL_ERROR; } @@ -6590,8 +6632,6 @@ TkWmStackorderToplevelEnumProc( TkWmStackorderToplevelPair *pair = (TkWmStackorderToplevelPair *) lParam; - /*fprintf(stderr, "Looking up HWND %d\n", hwnd);*/ - hPtr = Tcl_FindHashEntry(pair->table, hwnd); if (hPtr != NULL) { childWinPtr = (TkWindow *)Tcl_GetHashValue(hPtr); diff --git a/win/tkWinX.c b/win/tkWinX.c index 656e142..c61601b 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -1165,7 +1165,7 @@ GenerateXEvent( event.key.nbytes = 0; event.x.xkey.state = state; event.x.xany.serial = scrollCounter++; - event.x.xkey.keycode = (unsigned int) delta; + event.x.xkey.keycode = (unsigned int) (delta & 0xffff); } else { event.x.type = MouseWheelEvent; event.x.xany.send_event = -1; diff --git a/win/ttkWinMonitor.c b/win/ttkWinMonitor.c index 0fb362b..32d2a07 100644 --- a/win/ttkWinMonitor.c +++ b/win/ttkWinMonitor.c @@ -122,12 +122,12 @@ WndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) case WM_THEMECHANGED: /* - * Reset the application theme. - * On windows, it is possible to sign in as a second user, change - * the theme to 'winnative' (by setting the ui to 'best performance'), - * which is a machine-wide change, and then sign back on to the original user. - * Ttk_UseTheme needs to be executed again in order to process the fallback - * from vista/xpnative to winnative. + * Reset the application theme. + * On windows, it is possible to sign in as a second user, change + * the theme to 'winnative' (by setting the ui to 'best performance'), + * which is a machine-wide change, and then sign back on to the original user. + * Ttk_UseTheme needs to be executed again in order to process the fallback + * from vista/xpnative to winnative. */ theme = Ttk_GetCurrentTheme(interp); diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c index f50f49f..11262cc 100644 --- a/win/ttkWinTheme.c +++ b/win/ttkWinTheme.c @@ -404,14 +404,16 @@ static void ButtonBorderElementDraw( DFC_BUTTON, /* classId */ DFCS_BUTTONPUSH | Ttk_StateTableLookup(pushbutton_statemap, state)); + TkWinReleaseDrawableDC(d, hdc, &dcState); + /* Draw focus ring: */ if (state & TTK_STATE_FOCUS) { short int borderWidth = 3; /* @@@ Use GetSystemMetrics?*/ - rc = BoxToRect(Ttk_PadBox(b, Ttk_UniformPadding(borderWidth))); - DrawFocusRect(hdc, &rc); + b = Ttk_PadBox(b, Ttk_UniformPadding(borderWidth)); + TkWinDrawDottedRect(Tk_Display(tkwin), d, -1, b.x, b.y, + b.width, b.height); } - TkWinReleaseDrawableDC(d, hdc, &dcState); } static const Ttk_ElementSpec ButtonBorderElementSpec = { @@ -424,7 +426,7 @@ static const Ttk_ElementSpec ButtonBorderElementSpec = { /*------------------------------------------------------------------------ * +++ Focus element. - * Draw dashed focus rectangle. + * Draw dotted focus rectangle. */ static void FocusElementSize( @@ -447,11 +449,8 @@ static void FocusElementDraw( Ttk_State state) { if (state & TTK_STATE_FOCUS) { - RECT rc = BoxToRect(b); - TkWinDCState dcState; - HDC hdc = TkWinGetDrawableDC(Tk_Display(tkwin), d, &dcState); - DrawFocusRect(hdc, &rc); - TkWinReleaseDrawableDC(d, hdc, &dcState); + TkWinDrawDottedRect(Tk_Display(tkwin), d, -1, b.x, b.y, + b.width, b.height); } } @@ -486,19 +485,14 @@ static void FillFocusElementDraw( Ttk_Box b, Ttk_State state) { - FillFocusElement *focus = (FillFocusElement *)elementRecord; - if (state & TTK_STATE_FOCUS) { - RECT rc = BoxToRect(b); - TkWinDCState dcState; + FillFocusElement *focus = (FillFocusElement *)elementRecord; XColor *fillColor = Tk_GetColorFromObj(tkwin, focus->fillColorObj); GC gc = Tk_GCForColor(fillColor, d); - HDC hdc; + XFillRectangle(Tk_Display(tkwin), d, gc, b.x, b.y, b.width, b.height); - XFillRectangle(Tk_Display(tkwin),d,gc, b.x,b.y,b.width,b.height); - hdc = TkWinGetDrawableDC(Tk_Display(tkwin), d, &dcState); - DrawFocusRect(hdc, &rc); - TkWinReleaseDrawableDC(d, hdc, &dcState); + TkWinDrawDottedRect(Tk_Display(tkwin), d, -1, b.x, b.y, + b.width, b.height); } } @@ -964,7 +958,7 @@ TtkWinTheme_Init( parentPtr = Ttk_GetTheme(interp, "alt"); themePtr = Ttk_CreateTheme(interp, "winnative", parentPtr); if (!themePtr) { - return TCL_ERROR; + return TCL_ERROR; } Ttk_RegisterElementSpec(themePtr, "border", &BorderElementSpec, NULL); diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c index 5b97fad..02d33ac 100644 --- a/win/ttkWinXPTheme.c +++ b/win/ttkWinXPTheme.c @@ -25,8 +25,8 @@ typedef HTHEME (STDAPICALLTYPE OpenThemeDataProc)(HWND hwnd, LPCWSTR pszClassList); typedef HRESULT (STDAPICALLTYPE CloseThemeDataProc)(HTHEME hTheme); typedef HRESULT (STDAPICALLTYPE DrawThemeBackgroundProc)(HTHEME hTheme, - HDC hdc, int iPartId, int iStateId, const RECT *pRect, - OPTIONAL const RECT *pClipRect); + HDC hdc, int iPartId, int iStateId, const RECT *pRect, + OPTIONAL const RECT *pClipRect); typedef HRESULT (STDAPICALLTYPE DrawThemeEdgeProc)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pDestRect, unsigned int uEdge, unsigned int uFlags, @@ -892,7 +892,7 @@ static void TreeIndicatorElementDraw( Drawable d, Ttk_Box b, Ttk_State state) { if (!(state & TTK_STATE_LEAF)) { - GenericElementDraw(clientData,elementRecord,tkwin,d,b,state); + GenericElementDraw(clientData,elementRecord,tkwin,d,b,state); } } @@ -1031,7 +1031,7 @@ TTK_LAYOUT("TMenubutton", TTK_NODE("Menubutton.dropdown", TTK_PACK_RIGHT|TTK_FILL_Y) TTK_GROUP("Menubutton.button", TTK_FILL_BOTH, TTK_GROUP("Menubutton.padding", TTK_FILL_X, - TTK_NODE("Menubutton.label", 0)))) + TTK_NODE("Menubutton.label", 0)))) TTK_LAYOUT("Horizontal.TScrollbar", TTK_GROUP("Horizontal.Scrollbar.trough", TTK_FILL_X, @@ -1409,7 +1409,7 @@ TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd) themePtr = Ttk_CreateTheme(interp, "xpnative", parentPtr); if (!themePtr) - return TCL_ERROR; + return TCL_ERROR; /* * Set theme data and cleanup proc diff --git a/win/winMain.c b/win/winMain.c index 6da18b5..2d97089 100644 --- a/win/winMain.c +++ b/win/winMain.c @@ -38,7 +38,7 @@ #include <locale.h> #include <stdlib.h> #include <tchar.h> -#if TCL_MAJOR_VERSION < 9 && TCL_MINOR_VERSION < 7 +#if (TCL_MAJOR_VERSION < 9) && defined(TCL_MINOR_VERSION) && (TCL_MINOR_VERSION < 7) # define Tcl_LibraryInitProc Tcl_PackageInitProc # define Tcl_StaticLibrary Tcl_StaticPackage #endif @@ -56,7 +56,7 @@ extern Tcl_LibraryInitProc Tktest_Init; #endif /* TK_TEST */ #if !defined(TCL_USE_STATIC_PACKAGES) -# if TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6 +# if TCL_MAJOR_VERSION > 8 || !defined(TCL_MINOR_VERSION) || TCL_MINOR_VERSION > 6 # define TCL_USE_STATIC_PACKAGES 1 # else # define TCL_USE_STATIC_PACKAGES 0 @@ -191,7 +191,7 @@ _tWinMain( #ifdef TK_LOCAL_MAIN_HOOK TK_LOCAL_MAIN_HOOK(&argc, &argv); -#elif defined(UNICODE) && ((TCL_MAJOR_VERSION > 8) || (TCL_MINOR_VERSION > 6)) +#elif defined(UNICODE) && ((TCL_MAJOR_VERSION > 8) || !defined(TCL_MINOR_VERSION) || (TCL_MINOR_VERSION > 6)) /* This doesn't work on Windows without UNICODE, neither does it work with Tcl 8.6 */ TclZipfs_AppHook(&argc, &argv); #endif diff --git a/xlib/xcolors.c b/xlib/xcolors.c index d49a437..03aefce 100644 --- a/xlib/xcolors.c +++ b/xlib/xcolors.c @@ -306,7 +306,7 @@ colorcmp( c += 'a' - 'A'; } else if (((unsigned)(c - '1') <= (unsigned)('9' - '1'))) { if (d == '0') { - d += 10; + d += 10; } else if (!d) { num = c - '0'; while ((unsigned)((c = *spec++) - '0') <= (unsigned)('9' - '0')) { @@ -414,11 +414,11 @@ XParseColor( } if (num > (*p)[31]) { if (((*p)[31] != 8) || num > 100) { - return 0; + return 0; } num = (num * 255 + 50) / 100; if ((num == 230) || (num == 128)) { - /* + /* * Those two entries have a deviation i.r.t the table. */ @@ -768,7 +768,7 @@ XRegisterIMInstantiateCallback( Bool XUnregisterIMInstantiateCallback( - TCL_UNUSED(Display *) /* dpy */, + TCL_UNUSED(Display *) /* dpy */, TCL_UNUSED(struct _XrmHashBucketRec *) /* rdb */, TCL_UNUSED(char *) /* res_name */, TCL_UNUSED(char *) /* res_class */, |
