Index: .travis.yml ================================================================== --- .travis.yml +++ .travis.yml @@ -179,57 +179,35 @@ os: osx osx_image: xcode12 env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib CC=clang++ --enable-aqua CFLAGS=-I/usr/local/opt/tcl-tk/include CPPFLAGS=-D__private_extern__=extern" - - name: "macOS/Xcode 12/Shared" - os: osx - osx_image: xcode12 - env: - - BUILD_DIR=unix - - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CFLAGS=-I/usr/local/opt/tcl-tk/include" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: &mactest - - make all tktest - name: "macOS/Xcode 12/Static" os: osx osx_image: xcode12 env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua --disable-shared CFLAGS=-I/usr/local/opt/tcl-tk/include" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: *mactest - name: "macOS/Xcode 12/Debug" os: osx osx_image: xcode12 env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua --enable-symbols CFLAGS=-I/usr/local/opt/tcl-tk/include" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: *mactest - name: "macOS/Xcode 12/Shared/XQuartz" os: osx osx_image: xcode12 env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --disable-corefoundation --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib CFLAGS=-I/usr/local/opt/tcl-tk/include" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: *mactest # Older MacOS versions - name: "macOS/Xcode 11/Shared" os: osx osx_image: xcode11.7 env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CFLAGS=-I/usr/local/opt/tcl-tk/include CPPFLAGS=-mmacosx-version-min=10.14" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: *mactest - name: "macOS/Xcode 10/Shared" os: osx osx_image: xcode10.3 addons: homebrew: @@ -237,13 +215,10 @@ - tcl-tk update: true env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CFLAGS=-I/usr/local/opt/tcl-tk/include CPPFLAGS=-mmacosx-version-min=10.14" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: *mactest - name: "macOS/Xcode 9/Shared" os: osx osx_image: xcode9.4 addons: homebrew: @@ -251,13 +226,10 @@ - tcl-tk update: true env: - BUILD_DIR=unix - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --enable-aqua CFLAGS=-I/usr/local/opt/tcl-tk/include CPPFLAGS=-mmacosx-version-min=10.13" - install: - - ./configure ${CFGOPT} "--prefix=$HOME" || (cat config.log && exit 1) - script: *mactest # Test on Windows with MSVC native # - name: "Windows/MSVC/Shared" # os: windows # compiler: cl # env: &vcenv Index: doc/CanvTxtInfo.3 ================================================================== --- doc/CanvTxtInfo.3 +++ doc/CanvTxtInfo.3 @@ -50,11 +50,11 @@ .CE The \fBselBorder\fR field identifies a Tk_3DBorder that should be used for drawing the background under selected text. \fIselBorderWidth\fR gives the width of the raised border around selected text, in pixels. -\fIselFgColorPtr\fR points to an XColor that describes the foreground +\fIselFgColorPtr\fR points to an XColor that describes the color to be used when drawing selected text. \fIselItemPtr\fR points to the item that is currently selected, or NULL if there is no item selected or if the canvas does not have the selection. \fIselectFirst\fR and \fIselectLast\fR give the indices of the first Index: doc/ConfigWidg.3 ================================================================== --- doc/ConfigWidg.3 +++ doc/ConfigWidg.3 @@ -117,11 +117,11 @@ an integer value). The \fItype\fR field indicates how to use the value of the option (more on this below). The \fIargvName\fR field is a string such as .QW \-font or -.QW \-bg , +.QW \-background , which is compared with the values in \fIargv\fR (if \fIargvName\fR is NULL it means this is a grouped entry; see \fBGROUPED ENTRIES\fR below). The \fIdbName\fR and \fIdbClass\fR fields are used to look up a value for this option in the option database. The \fIdefValue\fR field specifies a default value for this configuration option if no Index: doc/GetColor.3 ================================================================== --- doc/GetColor.3 +++ doc/GetColor.3 @@ -153,11 +153,11 @@ that could be passed to \fBTk_GetColor\fR to return the same color. Note: the string returned by \fBTk_NameOfColor\fR is only guaranteed to persist until the next call to \fBTk_NameOfColor\fR. .PP -\fBTk_GCForColor\fR returns a graphics context whose \fBforeground\fR +\fBTk_GCForColor\fR returns a graphics context whose \fBcolor\fR field is the pixel allocated for \fIcolorPtr\fR and whose other fields all have default values. This provides an easy way to do basic drawing with a color. The graphics context is cached with the color and will exist only as long as \fIcolorPtr\fR exists; it is freed when the last reference Index: doc/GetCursor.3 ================================================================== --- doc/GetCursor.3 +++ doc/GetCursor.3 @@ -22,11 +22,11 @@ .sp Tk_Cursor \fBTk_GetCursorFromObj(\fItkwin, objPtr\fB)\fR .sp Tk_Cursor -\fBTk_GetCursorFromData(\fIinterp, tkwin, source, mask, width, height, xHot, yHot, fg, bg\fB)\fR +\fBTk_GetCursorFromData(\fIinterp, tkwin, source, mask, width, height, xHot, yHot, color, background\fB)\fR .sp const char * \fBTk_NameOfCursor(\fIdisplay, cursor\fB)\fR .sp \fBTk_FreeCursorFromObj(\fItkwin, objPtr\fB)\fR @@ -54,13 +54,13 @@ Height of \fIsource\fR and \fImask\fR. .AP "int" xHot in X-location of cursor hot-spot. .AP "int" yHot in Y-location of cursor hot-spot. -.AP Tk_Uid fg in -Textual description of foreground color for cursor. -.AP Tk_Uid bg in +.AP Tk_Uid color in +Textual description of color for cursor. +.AP Tk_Uid background in Textual description of background color for cursor. .AP Display *display in Display for which \fIcursor\fR was allocated. .AP Tk_Cursor cursor in Opaque Tk identifier for cursor. If passed to \fBTk_FreeCursor\fR, must @@ -84,21 +84,21 @@ such as when \fIobjPtr\fR refers to a non-existent file, then \fBNone\fR is returned and an error message will be stored in \fIinterp\fR's result if \fIinterp\fR is not NULL. \fIObjPtr\fR must contain a standard Tcl list with one of the following forms: .TP -\fIname\fR\0[\fIfgColor\fR\0[\fIbgColor\fR]] +\fIname\fR\0[\fIcolor\fR\0[\fIbackground\fR]] \fIName\fR is the name of a cursor in the standard X cursor cursor, i.e., any of the names defined in \fBcursorcursor.h\fR, without the \fBXC_\fR. Some example values are \fBX_cursor\fR, \fBhand2\fR, or \fBleft_ptr\fR. Appendix B of .QW "The X Window System" by Scheifler & Gettys has illustrations showing what each of these -cursors looks like. If \fIfgColor\fR and \fIbgColor\fR are both +cursors looks like. If \fIcolor\fR and \fIbackground\fR are both specified, they give the foreground and background colors to use for the cursor (any of the forms acceptable to \fBTk_GetColor\fR -may be used). If only \fIfgColor\fR is specified, then there +may be used). If only \fIcolor\fR is specified, then there will be no background color: the background will be transparent. If no colors are specified, then the cursor will use black for its foreground color and white for its background color. .RS @@ -112,20 +112,20 @@ dynamic library's resource files will be searched for the named cursor. If there are conflicts color cursors will always be loaded in preference to black and white cursors. .RE .TP -\fB@\fIsourceName\0maskName\0fgColor\0bgColor\fR +\fB@\fIsourceName\0maskName\0color\0background\fR In this form, \fIsourceName\fR and \fImaskName\fR are the names of files describing cursors for the cursor's source bits and mask. Each file must be in standard X11 cursor format. -\fIFgColor\fR and \fIbgColor\fR +\fIColor\fR and \fIbackground\fR indicate the colors to use for the cursor, in any of the forms acceptable to \fBTk_GetColor\fR. This form of the command will not work on Macintosh or Windows computers. .TP -\fB@\fIsourceName\0fgColor\fR +\fB@\fIsourceName\0color\fR This form is similar to the one above, except that the source is used as mask also. This means that the cursor's background is transparent. This form of the command will not work on Macintosh or Windows computers. .TP @@ -155,11 +155,11 @@ \fImask\fR points to standard cursor data describing which pixels of \fIsource\fR are to be drawn and which are to be considered transparent. \fIWidth\fR and \fIheight\fR give the dimensions of the cursor, \fIxHot\fR and \fIyHot\fR indicate the location of the cursor's hot-spot (the point that is reported when -an event occurs), and \fIfg\fR and \fIbg\fR describe the cursor's +an event occurs), and \fIcolor\fR and \fIbackground\fR describe the cursor's foreground and background colors textually (any of the forms suitable for \fBTk_GetColor\fR may be used). Typically, the arguments to \fBTk_GetCursorFromData\fR are created by including a cursor file directly into the source code for a program, as in the following example: Index: doc/ParseArgv.3 ================================================================== --- doc/ParseArgv.3 +++ doc/ParseArgv.3 @@ -78,11 +78,11 @@ } \fBTk_ArgvInfo\fR; .CE The \fIkey\fR field is a string such as .QW \-display or -.QW \-bg +.QW \-background that is compared with the values in \fIargv\fR. \fIType\fR indicates how to process an argument that matches \fIkey\fR (more on this below). \fISrc\fR and \fIdst\fR are additional values used in processing the argument. Their exact usage depends on \fItype\fR, but typically \fIsrc\fR indicates Index: doc/SetOptions.3 ================================================================== --- doc/SetOptions.3 +++ doc/SetOptions.3 @@ -258,11 +258,11 @@ .CE The \fItype\fR field indicates what kind of configuration option this is (e.g. \fBTK_OPTION_COLOR\fR for a color value, or \fBTK_OPTION_INT\fR for an integer value). \fIType\fR determines how the value of the option is parsed (more on this below). -The \fIoptionName\fR field is a string such as \fB\-font\fR or \fB\-bg\fR; +The \fIoptionName\fR field is a string such as \fB\-font\fR or \fB\-background\fR; it is the name used for the option in Tcl commands and passed to procedures via the \fIobjc\fR or \fInamePtr\fR arguments. The \fIdbName\fR and \fIdbClass\fR fields are used by \fBTk_InitOptions\fR to look up a default value for this option in the option database; if \fIdbName\fR is NULL then the option database is not used by Index: doc/bitmap.n ================================================================== --- doc/bitmap.n +++ doc/bitmap.n @@ -22,18 +22,18 @@ .SH DESCRIPTION .PP A bitmap is an image whose pixels can display either of two colors or be transparent. A bitmap image is defined by four things: a background color, -a foreground color, and two bitmaps, called the \fIsource\fR +a color, and two bitmaps, called the \fIsource\fR and the \fImask\fR. Each of the bitmaps specifies 0/1 values for a rectangular array of pixels, and the two bitmaps must have the same dimensions. For pixels where the mask is zero, the image displays nothing, producing a transparent effect. -For other pixels, the image displays the foreground color if +For other pixels, the image displays the color if the source data is one and the background color if the source data is zero. .SH "CREATING BITMAPS" .PP Like all images, bitmaps are created using the \fBimage create\fR @@ -61,13 +61,13 @@ \fIname\fR gives the name of a file whose contents define the source bitmap. The file must adhere to X11 bitmap format (e.g., as generated by the \fBbitmap\fR program). .TP -\fB\-foreground \fIcolor\fR +\fB\-color \fIcolor\fR . -Specifies a foreground color for the image in any of the standard +Specifies a color for the image in any of the standard ways accepted by Tk. .TP \fB\-maskdata \fIstring\fR . Specifies the contents of the mask as a string. Index: doc/button.n ================================================================== --- doc/button.n +++ doc/button.n @@ -12,19 +12,19 @@ .SH NAME button \- Create and manipulate 'button' action widgets .SH SYNOPSIS \fBbutton\fR \fIpathName \fR?\fIoptions\fR? .SO -\-activebackground \-font \-relief -\-activeforeground \-foreground \-repeatdelay +\-activebackground \-disabledcolor \-relief +\-activecolor \-font \-repeatdelay \-anchor \-highlightbackground \-repeatinterval \-background \-highlightcolor \-takefocus \-bitmap \-highlightthickness \-text \-borderwidth \-image \-textvariable -\-compound \-justify \-underline -\-cursor \-padx \-wraplength -\-disabledforeground \-pady +\-color \-justify \-underline +\-compound \-padx \-wraplength +-cursor \-pady .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-command command Command Specifies a Tcl command to associate with the button. This command is typically invoked when mouse button 1 is released over the button @@ -55,17 +55,17 @@ alternative relief is used when the mouse cursor is over the button. The empty string is the default value. .OP \-state state State Specifies one of three states for the button: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the button is displayed using the -\fB\-foreground\fR and \fB\-background\fR options. The active state is +\fB\-color\fR and \fB\-background\fR options. The active state is typically used when the pointer is over the button. In active state -the button is displayed using the \fB\-activeforeground\fR and +the button is displayed using the \fB\-activecolor\fR and \fB\-activebackground\fR options. Disabled state means that the button should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. -In this state the \fB\-disabledforeground\fR and +In this state the \fB\-disabledcolor\fR and \fB\-background\fR options determine how the button is displayed. .OP \-width width Width Specifies a desired width for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR). Index: doc/canvas.n ================================================================== --- doc/canvas.n +++ doc/canvas.n @@ -17,11 +17,11 @@ .SO \-background \-borderwidth \-cursor \-highlightbackground \-highlightcolor \-highlightthickness \-insertbackground \-insertborderwidth \-insertofftime \-insertontime \-insertwidth \-relief -\-selectbackground \-selectborderwidth \-selectforeground +\-selectbackground \-selectborderwidth \-selectcolor \-takefocus \-xscrollcommand \-yscrollcommand .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-closeenough closeEnough CloseEnough Specifies a floating-point value indicating how close the mouse cursor @@ -1257,11 +1257,11 @@ . Specifies the color to be used to fill item's area. in its normal, active, and disabled states, \fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR. For the line item, it specifies the color of the line drawn. -For the text item, it specifies the foreground color of the text. +For the text item, it specifies the color of the text. If \fIcolor\fR is an empty string (the default for all canvas items except line and text), then the item will not be filled. .TP \fB\-outline \fIcolor\fR .TP @@ -1501,15 +1501,15 @@ \fB\-disabledbitmap \fIbitmap\fR Specifies the bitmaps to display in the item in its normal, active and disabled states. \fIBitmap\fR may have any of the forms accepted by \fBTk_GetBitmap\fR. .TP -\fB\-foreground \fIcolor\fR +\fB\-colord \fIcolor\fR .TP -\fB\-activeforeground \fIcolor\fR +\fB\-activecolor \fIcolor\fR .TP -\fB\-disabledforeground \fIcolor\fR +\fB\-disabledcolor \fIcolor\fR Specifies the color to use for each of the bitmap's .QW 1 valued pixels in its normal, active and disabled states. \fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR. .SS "IMAGE ITEMS" Index: doc/checkbutton.n ================================================================== --- doc/checkbutton.n +++ doc/checkbutton.n @@ -12,18 +12,18 @@ .SH NAME checkbutton \- Create and manipulate 'checkbutton' boolean selection widgets .SH SYNOPSIS \fBcheckbutton\fI pathName \fR?\fIoptions\fR? .SO -\-activebackground \-disabledforeground \-padx -\-activeforeground \-font \-pady -\-anchor \-foreground \-relief +\-activebackground \-cursor \-padx +\-activecolor \-disabledcolor \-pady +\-anchor \-font \-relief \-background \-highlightbackground \-takefocus \-bitmap \-highlightcolor \-text \-borderwidth \-highlightthickness \-textvariable -\-compound \-image \-underline -\-cursor \-justify \-wraplength +\-color \-image \-underline +\-compound \-justify \-wraplength .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-command command Command Specifies a Tcl command to associate with the button. This command is typically invoked when mouse button 1 is released over the button @@ -84,17 +84,17 @@ This option is ignored unless the \fB\-image\fR option has been specified. .OP \-state state State Specifies one of three states for the checkbutton: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the checkbutton is displayed using the -\fB\-foreground\fR and \fB\-background\fR options. The active state is +\fB\-color\fR and \fB\-background\fR options. The active state is typically used when the pointer is over the checkbutton. In active state -the checkbutton is displayed using the \fB\-activeforeground\fR and +the checkbutton is displayed using the \fB\-activecolor\fR and \fB\-activebackground\fR options. Disabled state means that the checkbutton should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. -In this state the \fB\-disabledforeground\fR and +In this state the \fB\-disabledcolor\fR and \fB\-background\fR options determine how the checkbutton is displayed. .OP \-tristateimage tristateImage TristateImage Specifies an image to display (in place of the \fB\-image\fR option) when the checkbutton is in tri-state mode. This option is ignored unless the \fB\-image\fR option has been Index: doc/chooseColor.n ================================================================== --- doc/chooseColor.n +++ doc/chooseColor.n @@ -37,11 +37,11 @@ user cancels the operation, both commands will return the empty string. .SH EXAMPLE .PP .CS -button .b \-bg [tk_chooseColor \-initialcolor gray \-title "Choose color"] +button .b \-background [tk_chooseColor \-initialcolor gray \-title "Choose color"] .CE .SH KEYWORDS color, color selection, dialog '\" Local Variables: '\" mode: nroff Index: doc/entry.n ================================================================== --- doc/entry.n +++ doc/entry.n @@ -15,25 +15,25 @@ .SH SYNOPSIS \fBentry\fR \fIpathName \fR?\fIoptions\fR? .SO \-background \-highlightthickness \-selectbackground \-borderwidth \-insertbackground \-selectborderwidth -\-cursor \-insertborderwidth \-selectforeground -\-exportselection \-insertofftime \-takefocus -\-font \-insertontime \-textvariable -\-foreground \-insertwidth \-xscrollcommand +\-color \-insertborderwidth \-selectcolor +\-cursor \-insertofftime \-takefocus +\-exportselection \-insertontime \-textvariable +\-font \-insertwidth \-xscrollcommand \-highlightbackground \-justify \-highlightcolor \-relief -\-placeholder \-placeholderforeground +\-placeholder \-placeholdercolor .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-disabledbackground disabledBackground DisabledBackground Specifies the background color to use when the entry is disabled. If this option is the empty string, the normal background color is used. -.OP \-disabledforeground disabledForeground DisabledForeground -Specifies the foreground color to use when the entry is disabled. If -this option is the empty string, the normal foreground color is used. +.OP \-disabledcolor disabledForeground DisabledForeground +Specifies the color to use when the entry is disabled. If +this option is the empty string, the normal color is used. .OP "\-invalidcommand or \-invcmd" invalidCommand InvalidCommand Specifies a script to eval when \fB\-validatecommand\fR returns 0. Setting it to {} disables this feature (the default). The best use of this option is to set it to \fIbell\fR. See \fBVALIDATION\fR below for more information. @@ -58,11 +58,11 @@ will be displayed, even if the input focus is in the widget; the contents of the widget may still be selected. If the entry is disabled, the value may not be changed, no insertion cursor will be displayed, the contents will not be selectable, and the entry may be displayed in a different color, depending on the values of the -\fB\-disabledforeground\fR and \fB\-disabledbackground\fR options. +\fB\-disabledcolor\fR and \fB\-disabledbackground\fR options. .OP \-validate validate Validate Specifies the mode in which validation should operate: \fBnone\fR, \fBfocus\fR, \fBfocusin\fR, \fBfocusout\fR, \fBkey\fR, or \fBall\fR. It defaults to \fBnone\fR. When you want validation, you must explicitly state which mode you wish to use. See \fBVALIDATION\fR below for more. Index: doc/label.n ================================================================== --- doc/label.n +++ doc/label.n @@ -12,13 +12,13 @@ .SH NAME label \- Create and manipulate 'label' non-interactive text or image widgets .SH SYNOPSIS \fBlabel\fR \fIpathName \fR?\fIoptions\fR? .SO -\-activebackground \-disabledforeground \-padx -\-activeforeground \-font \-pady -\-anchor \-foreground \-relief +\-activebackground \-disabledcolor \-padx +\-activecolor \-font \-pady +\-anchor \-color \-relief \-background \-highlightbackground \-takefocus \-bitmap \-highlightcolor \-text \-borderwidth \-highlightthickness \-textvariable \-compound \-image \-underline \-cursor \-justify \-wraplength @@ -32,14 +32,14 @@ If this option is not specified, the label's desired height is computed from the size of the image or bitmap or text being displayed in it. .OP \-state state State Specifies one of three states for the label: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the button is displayed using the -\fB\-foreground\fR and \fB\-background\fR options. In active state -the label is displayed using the \fB\-activeforeground\fR and +\fB\-color\fR and \fB\-background\fR options. In active state +the label is displayed using the \fB\-activecolor\fR and \fB\-activebackground\fR options. In the disabled state the -\fB\-disabledforeground\fR and \fB\-background\fR options determine how +\fB\-disabledcolor\fR and \fB\-background\fR options determine how the button is displayed. .OP \-width width Width Specifies a desired width for the label. If an image or bitmap is being displayed in the label then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); @@ -106,12 +106,12 @@ labels are not intended to be interactive. .SH EXAMPLE .PP .CS # Make the widgets -\fBlabel\fR .t \-text "This widget is at the top" \-bg red -\fBlabel\fR .b \-text "This widget is at the bottom" \-bg green +\fBlabel\fR .t \-text "This widget is at the top" \-background red +\fBlabel\fR .b \-text "This widget is at the bottom" \-background green \fBlabel\fR .l \-text "Left\enHand\enSide" \fBlabel\fR .r \-text "Right\enHand\enSide" text .mid \&.mid insert end "This layout is like Java's BorderLayout" # Lay them out Index: doc/labelframe.n ================================================================== --- doc/labelframe.n +++ doc/labelframe.n @@ -15,11 +15,11 @@ \fBlabelframe\fR \fIpathName\fR ?\fIoptions\fR? .SO \-borderwidth \-highlightbackground \-pady \-cursor \-highlightcolor \-relief \-font \-highlightthickness \-takefocus -\-foreground \-padx \-text +\-color \-padx \-text .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-background background Background This option is the same as the standard \fB\-background\fR option except that its value may also be specified as an empty string. Index: doc/listbox.n ================================================================== --- doc/listbox.n +++ doc/listbox.n @@ -13,14 +13,14 @@ listbox \- Create and manipulate 'listbox' item list widgets .SH SYNOPSIS \fBlistbox\fR \fIpathName \fR?\fIoptions\fR? .SO \-background \-borderwidth \-cursor -\-disabledforeground \-exportselection \-font -\-foreground \-highlightbackground \-highlightcolor +\-disabledcolor \-exportselection \-font +\-color \-highlightbackground \-highlightcolor \-highlightthickness \-justify \-relief -\-selectbackground \-selectborderwidth \-selectforeground +\-selectbackground \-selectborderwidth \-selectcolor \-setgrid \-takefocus \-xscrollcommand \-yscrollcommand .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-activestyle activeStyle ActiveStyle @@ -46,11 +46,11 @@ expect it to be either \fBsingle\fR, \fBbrowse\fR, \fBmultiple\fR, or \fBextended\fR; the default value is \fBbrowse\fR. .OP \-state state State Specifies one of two states for the listbox: \fBnormal\fR or \fBdisabled\fR. If the listbox is disabled then items may not be inserted or deleted, -items are drawn in the \fB\-disabledforeground\fR color, and selection +items are drawn in the \fB\-disabledcolor\fR color, and selection cannot be modified and is not shown (though selection information is retained). .OP \-width width Width Specifies the desired width for the window in characters. If the font does not have a uniform width then the width of the character .QW 0 @@ -250,24 +250,24 @@ \fB\-background \fIcolor\fR . \fIColor\fR specifies the background color to use when displaying the item. It may have any of the forms accepted by \fBTk_GetColor\fR. .TP -\fB\-foreground \fIcolor\fR +\fB\-color \fIcolor\fR . -\fIColor\fR specifies the foreground color to use when displaying the +\fIColor\fR specifies the color to use when displaying the item. It may have any of the forms accepted by \fBTk_GetColor\fR. .TP \fB\-selectbackground \fIcolor\fR . \fIcolor\fR specifies the background color to use when displaying the item while it is selected. It may have any of the forms accepted by \fBTk_GetColor\fR. .TP -\fB\-selectforeground \fIcolor\fR +\fB\-selectcolor \fIcolor\fR . -\fIcolor\fR specifies the foreground color to use when displaying the +\fIcolor\fR specifies the color to use when displaying the item while it is selected. It may have any of the forms accepted by \fBTk_GetColor\fR. .RE .TP \fIpathName \fBnearest \fIy\fR Index: doc/menu.n ================================================================== --- doc/menu.n +++ doc/menu.n @@ -14,13 +14,13 @@ .SH SYNOPSIS .nf \fBmenu\fR \fIpathName \fR?\fIoptions\fR? \fBtk_menuSetFocus\fR \fIpathName\fR .SO -\-activebackground \-borderwidth \-foreground +\-activebackground \-borderwidth \-color \-activeborderwidth \-cursor \-relief -\-activeforeground \-disabledforeground \-takefocus +\-activecolor \-disabledcolor \-takefocus \-background \-font \-activerelief .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-postcommand postCommand Command If this option is specified then it provides a Tcl command to execute @@ -529,16 +529,16 @@ If the \fBtk_strictMotif\fR variable has been set to request strict Motif compliance, then this option is ignored and the \fB\-background\fR option is used in its place. This option is not available for separator or tear-off entries. .TP -\fB\-activeforeground \fIvalue\fR +\fB\-activecolor \fIvalue\fR . -Specifies a foreground color to use for displaying this entry when it +Specifies a color to use for displaying this entry when it is active. If this option is specified as an empty string (the default), then the -\fB\-activeforeground\fR option for the overall menu is used. +\fB\-activecolor\fR option for the overall menu is used. This option is not available for separator or tear-off entries. .TP \fB\-accelerator \fIvalue\fR . Specifies a string to display at the right side of the menu entry. @@ -597,16 +597,16 @@ string in this entry. If this option is specified as an empty string (the default) then the \fB\-font\fR option for the overall menu is used. This option is not available for separator or tear-off entries. .TP -\fB\-foreground \fIvalue\fR +\fB\-color \fIvalue\fR . -Specifies a foreground color to use for displaying this entry when it +Specifies a color to use for displaying this entry when it is in the normal state (neither active nor disabled). If this option is specified as an empty string (the default), then the -\fB\-foreground\fR option for the overall menu is used. +\fB\-color\fR option for the overall menu is used. This option is not available for separator or tear-off entries. .TP \fB\-hidemargin \fIvalue\fR . Specifies whether the standard margins should be drawn for this menu @@ -674,20 +674,20 @@ .TP \fB\-state \fIvalue\fR . Specifies one of three states for the entry: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the entry is displayed using the -\fB\-foreground\fR option for the menu and the \fB\-background\fR +\fB\-color\fR option for the menu and the \fB\-background\fR option from the entry or the menu. The active state is typically used when the pointer is over the entry. -In active state the entry is displayed using the \fB\-activeforeground\fR +In active state the entry is displayed using the \fB\-activecolor\fR option for the menu along with the \fB\-activebackground\fR option from the entry. Disabled state means that the entry should be insensitive: the default bindings will refuse to activate or invoke the entry. In this state the entry is displayed according to the -\fB\-disabledforeground\fR option for the menu and the +\fB\-disabledcolor\fR option for the menu and the \fB\-background\fR option from the entry. This option is not available for separator entries. .TP \fB\-underline \fIvalue\fR . Index: doc/menubutton.n ================================================================== --- doc/menubutton.n +++ doc/menubutton.n @@ -12,13 +12,13 @@ .SH NAME menubutton \- Create and manipulate 'menubutton' pop-up menu indicator widgets .SH SYNOPSIS \fBmenubutton\fR \fIpathName \fR?\fIoptions\fR? .SO -\-activebackground \-disabledforeground \-padx -\-activeforeground \-font \-pady -\-anchor \-foreground \-relief +\-activebackground \-disabledcolor \-padx +\-activecolor \-font \-pady +\-anchor \-color \-relief \-background \-highlightbackground \-takefocus \-bitmap \-highlightcolor \-text \-borderwidth \-highlightthickness \-textvariable \-cursor \-image \-underline \-compound \-justify \-wraplength @@ -49,17 +49,17 @@ Specifies the path name of the menu associated with this menubutton. The menu must be a child of the menubutton. .OP \-state state State Specifies one of three states for the menubutton: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the menubutton is displayed using the -\fBforeground\fR and \fBbackground\fR options. The active state is +\fBcolor\fR and \fBbackground\fR options. The active state is typically used when the pointer is over the menubutton. In active state -the menubutton is displayed using the \fB\-activeforeground\fR and +the menubutton is displayed using the \fB\-activecolor\fR and \fB\-activebackground\fR options. Disabled state means that the menubutton should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. -In this state the \fB\-disabledforeground\fR and +In this state the \fB\-disabledcolor\fR and \fB\-background\fR options determine how the button is displayed. .OP \-width width Width Specifies a desired width for the menubutton. If an image or bitmap is being displayed in the menubutton then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); Index: doc/message.n ================================================================== --- doc/message.n +++ doc/message.n @@ -13,11 +13,11 @@ message \- Create and manipulate 'message' non-interactive text widgets .SH SYNOPSIS \fBmessage\fR \fIpathName \fR?\fIoptions\fR? .SO \-anchor \-background \-borderwidth -\-cursor \-font \-foreground +\-cursor \-font \-color \-highlightbackground \-highlightcolor \-highlightthickness \-padx \-pady \-relief \-takefocus \-text \-textvariable .SE .SH "WIDGET-SPECIFIC OPTIONS" Index: doc/option.n ================================================================== --- doc/option.n +++ doc/option.n @@ -115,14 +115,14 @@ .QW \fB.\fR \fBtoplevel\fR, which are usually set by options to \fBwish\fR. .SH EXAMPLES .PP Instruct every button in the application to have red text on it unless -explicitly overridden, by setting the \fBforeground\fR for the \fBButton\fR +explicitly overridden, by setting the \fBcolor\fR for the \fBButton\fR class (note that on some platforms the option is ignored): .CS -\fBoption add\fR *Button.foreground red startupFile +\fBoption add\fR *Button.color red startupFile .CE .PP Allow users to control what happens in an entry widget when the Return key is pressed by specifying a script in the option database and add a default option for that which rings the bell: Index: doc/options.n ================================================================== --- doc/options.n +++ doc/options.n @@ -24,14 +24,14 @@ In the descriptions below, .QW "Command-Line Name" refers to the switch used in class commands and \fBconfigure\fR widget commands to set this value. For example, if an option's command-line switch is -\fB\-foreground\fR and there exists a widget \fB.a.b.c\fR, then the +\fB\-color\fR and there exists a widget \fB.a.b.c\fR, then the command .CS -\&\fB.a.b.c\0\0configure\0\0\-foreground black\fR +\&\fB.a.b.c\0\0configure\0\0\-color black\fR .CE may be used to specify the value \fBblack\fR for the option in the widget \fB.a.b.c\fR. Command-line switches may be abbreviated, as long as the abbreviation is unambiguous. .QW "Database Name" @@ -53,12 +53,12 @@ the width of the 3-D border drawn around active elements. See above for definition of active elements. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. This option is typically only available in widgets displaying more than one element at a time (e.g. menus but not buttons). -.OP \-activeforeground activeForeground Background -Specifies foreground color to use when drawing active elements. +.OP \-activecolor activeColor ActiveColor +Specifies color to use when drawing active elements. See above for definition of active elements. .OP \-activerelief activeRelief Relief Specifies the 3-D effect desired for the active item of the widget. See the \fB-relief\fR option for details. .OP \-anchor anchor Anchor @@ -103,15 +103,15 @@ (default) value \fBnone\fR specifies that the bitmap or image should (if defined) be displayed instead of the text, the value \fBleft\fR specifies that the bitmap or image should be displayed to the left of the text, and the value \fBcenter\fR specifies that the bitmap or image should be displayed on top of the text. -.OP \-disabledforeground disabledForeground DisabledForeground -Specifies foreground color to use when drawing a disabled element. +.OP \-disabledcolor disabledColor DisabledColor +Specifies color to use when drawing a disabled element. If the option is specified as an empty string (which is typically the case on monochrome displays), disabled elements are drawn with the -normal foreground color but they are dimmed by drawing them +normal color but they are dimmed by drawing them with a stippled fill pattern. .OP \-exportselection exportSelection ExportSelection Specifies whether or not a selection in the widget should also be the X selection. The value may have any of the forms accepted by \fBTcl_GetBoolean\fR, @@ -123,12 +123,12 @@ to export selections. .OP \-font font Font Specifies the font to use when drawing text inside the widget. The value may have any of the forms described in the \fBfont\fR manual page under \fBFONT DESCRIPTION\fR. -.OP "\-foreground or \-fg" foreground Foreground -Specifies the normal foreground color to use when displaying the widget. +.OP \-color color Color +Specifies the normal color to use when displaying the widget. .OP \-highlightbackground highlightBackground HighlightBackground Specifies the color to display in the traversal highlight region when the widget does not have the input focus. .OP \-highlightcolor highlightColor HighlightColor Specifies the color to use for the traversal highlight rectangle that is @@ -226,12 +226,12 @@ options. .OP \-placeholder placeHolder PlaceHolder Specifies a help text string to display if no text is otherwise displayed, that is when the widget is empty. The placeholder text is displayed using the values of the \fB\-font\fR and \fB\-justify\fR options. -.OP \-placeholderforeground placeholderForeground PlaceholderForeground -Specifies the foreground color to use when the placeholder text is +.OP \-placeholdercolor placeholderColor PlaceholderColor +Specifies the color to use when the placeholder text is displayed. The default color is platform-specific. .OP \-relief relief Relief Specifies the 3-D effect desired for the widget. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, \fBsolid\fR, and \fBgroove\fR. @@ -253,12 +253,12 @@ items. .OP \-selectborderwidth selectBorderWidth BorderWidth Specifies a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. -.OP \-selectforeground selectForeground Background -Specifies the foreground color to use when displaying selected +.OP \-selectcolor selectColor SelectColor +Specifies the color to use when displaying selected items. .OP \-setgrid setGrid SetGrid Specifies a boolean value that determines whether this widget controls the resizing grid for its top-level window. This option is typically used in text widgets, where the information Index: doc/pack.n ================================================================== --- doc/pack.n +++ doc/pack.n @@ -271,12 +271,12 @@ the stacking order of either the container or the content. .SH EXAMPLE .PP .CS # Make the widgets -label .t \-text "This widget is at the top" \-bg red -label .b \-text "This widget is at the bottom" \-bg green +label .t \-text "This widget is at the top" \-background red +label .b \-text "This widget is at the bottom" \-background green label .l \-text "Left\enHand\enSide" label .r \-text "Right\enHand\enSide" text .mid \&.mid insert end "This layout is like Java's BorderLayout" # Lay them out Index: doc/palette.n ================================================================== --- doc/palette.n +++ doc/palette.n @@ -31,14 +31,14 @@ is the name of an option in the Tk option database and the second argument is the new value to use for that option. The following database names are currently supported: .DS .ta 4c 8c -\fBactiveBackground\fR \fBforeground\fR \fBselectColor\fR -\fBactiveForeground\fR \fBhighlightBackground\fR \fBselectBackground\fR -\fBbackground\fR \fBhighlightColor\fR \fBselectForeground\fR -\fBdisabledForeground\fR \fBinsertBackground\fR \fBtroughColor\fR +\fBactiveBackground\fR \fBcolor\fR \fBselectColor\fR +\fBactiveColor\fR \fBhighlightBackground\fR \fBselectBackground\fR +\fBbackground\fR \fBhighlightColor\fR \fBselectColor\fR +\fBdisabledColor\fR \fBinsertBackground\fR \fBtroughColor\fR .DE \fBtk_setPalette\fR tries to compute reasonable defaults for any options that you do not specify. You can specify options other than the above ones and Tk will change those options on widgets as well. This feature may be useful if you are using custom widgets with Index: doc/place.n ================================================================== --- doc/place.n +++ doc/place.n @@ -245,11 +245,11 @@ .SH EXAMPLE .PP Make the label occupy the middle bit of the toplevel, no matter how it is resized: .CS -label .l \-text "In the\enMiddle!" \-bg black \-fg white +label .l \-text "In the\enMiddle!" \-background black \-color white \fBplace\fR .l \-relwidth .3 \-relx .35 \-relheight .3 \-rely .35 .CE .SH "SEE ALSO" grid(n), pack(n) .SH KEYWORDS Index: doc/radiobutton.n ================================================================== --- doc/radiobutton.n +++ doc/radiobutton.n @@ -12,13 +12,13 @@ .SH NAME radiobutton \- Create and manipulate 'radiobutton' pick-one widgets .SH SYNOPSIS \fBradiobutton\fR \fIpathName \fR?\fIoptions\fR? .SO -\-activebackground \-disabledforeground \-padx -\-activeforeground \-font \-pady -\-anchor \-foreground \-relief +\-activebackground \-disabledcolor \-padx +\-activecolor \-font \-pady +\-anchor \-color \-relief \-background \-highlightbackground \-takefocus \-bitmap \-highlightcolor \-text \-borderwidth \-highlightthickness \-textvariable \-compound \-image \-underline \-cursor \-justify \-wraplength @@ -76,17 +76,17 @@ This option is ignored unless the \fB\-image\fR option has been specified. .OP \-state state State Specifies one of three states for the radiobutton: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. In normal state the radiobutton is displayed using the -\fB\-foreground\fR and \fB\-background\fR options. The active state is +\fB\-color\fR and \fB\-background\fR options. The active state is typically used when the pointer is over the radiobutton. In active state -the radiobutton is displayed using the \fB\-activeforeground\fR and +the radiobutton is displayed using the \fB\-activecolor\fR and \fB\-activebackground\fR options. Disabled state means that the radiobutton should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. -In this state the \fB\-disabledforeground\fR and +In this state the \fB\-disabledcolor\fR and \fB\-background\fR options determine how the radiobutton is displayed. .OP \-tristateimage tristateImage TristateImage Specifies an image to display (in place of the \fB\-image\fR option) when the radiobutton is selected. This option is ignored unless the \fB\-image\fR option has been Index: doc/scale.n ================================================================== --- doc/scale.n +++ doc/scale.n @@ -12,11 +12,11 @@ .SH NAME scale \- Create and manipulate 'scale' value-controlled slider widgets .SH SYNOPSIS \fBscale\fR \fIpathName \fR?\fIoptions\fR? .SO -\-activebackground \-foreground \-relief +\-activebackground \-color \-relief \-background \-highlightbackground \-repeatdelay \-borderwidth \-highlightcolor \-repeatinterval \-cursor \-highlightthickness \-takefocus \-font \-orient \-troughcolor .SE Index: doc/spinbox.n ================================================================== --- doc/spinbox.n +++ doc/spinbox.n @@ -15,17 +15,17 @@ \fBspinbox\fR \fIpathName \fR?\fIoptions\fR? .SO \-activebackground \-highlightthickness \-repeatinterval \-background \-insertbackground \-selectbackground \-borderwidth \-insertborderwidth \-selectborderwidth -\-cursor \-insertontime \-selectforeground +\-cursor \-insertontime \-selectcolor \-exportselection \-insertwidth \-takefocus \-font \-insertofftime \-textvariable -\-foreground \-justify \-xscrollcommand +\-color \-justify \-xscrollcommand \-highlightbackground \-relief \-highlightcolor \-repeatdelay -\-placeholder \-placeholderforeground +\-placeholder \-placeholdercolor .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-buttonbackground buttonBackground Background The background color to be used for the spin buttons. .OP \-buttoncursor buttonCursor Cursor @@ -41,13 +41,13 @@ the widget path, \fB%s\fR for the current value of the widget, and \fB%d\fR for the direction of the button pressed (\fBup\fR or \fBdown\fR). .OP \-disabledbackground disabledBackground DisabledBackground Specifies the background color to use when the spinbox is disabled. If this option is the empty string, the normal background color is used. -.OP \-disabledforeground disabledForeground DisabledForeground -Specifies the foreground color to use when the spinbox is disabled. If -this option is the empty string, the normal foreground color is used. +.OP \-disabledcolor disabledColor DisabledColor +Specifies the color to use when the spinbox is disabled. If +this option is the empty string, the normal color is used. .OP \-format format Format Specifies an alternate format to use when setting the string value when using the \fB\-from\fR and \fB\-to\fR range. This must be a format specifier of the form \fB%.f\fR, as it will format a floating-point number. @@ -78,11 +78,11 @@ will be displayed, even if the input focus is in the widget; the contents of the widget may still be selected. If the spinbox is disabled, the value may not be changed, no insertion cursor will be displayed, the contents will not be selectable, and the spinbox may be displayed in a different color, depending on the values of the -\fB\-disabledforeground\fR and \fB\-disabledbackground\fR options. +\fB\-disabledcolor\fR and \fB\-disabledbackground\fR options. .OP \-to to To A floating-point value corresponding to the highest value for the spinbox, to be used in conjunction with \fB\-from\fR and \fB\-increment\fR. When all are specified correctly, the spinbox will use these values to control its contents. If this value is less than the \fB\-from\fR option, then @@ -222,11 +222,11 @@ .PP Also, the \fB-validate\fR option will set itself to \fBnone\fR when the spinbox value gets changed because of adjustment of \fB-from\fR or \fB-to\fR and the \fB-validatecommand\fR returns false. For instance .CS - \fIspinbox pathName \-from 1 \-to 10 \-validate all \-vcmd {return 0}\fR + \fIspinbox pathName \-from 1 \-to 10 \-validate all \-validatecommand {return 0}\fR .CE will in fact set the \fB-validate\fR option to \fBnone\fR because the default value for the spinbox gets changed (due to the \fB-from\fR and \fB-to\fR options) to a value not accepted by the validation script. .PP Index: doc/text.n ================================================================== --- doc/text.n +++ doc/text.n @@ -19,13 +19,13 @@ \fBtk_textPaste\fR \fIpathName\fR .SO \-background \-highlightthickness \-relief \-borderwidth \-insertbackground \-selectbackground \-cursor \-insertborderwidth \-selectborderwidth -\-exportselection \-insertofftime \-selectforeground +\-exportselection \-insertofftime \-selectcolor \-font \-insertontime \-setgrid -\-foreground \-insertwidth \-takefocus +\-color \-insertwidth \-takefocus \-highlightbackground \-padx \-xscrollcommand \-highlightcolor \-pady \-yscrollcommand .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-autoseparators autoSeparators AutoSeparators @@ -406,11 +406,11 @@ .QW "\fIpathName \fBtag lower\fR" widget commands. .PP Tags serve three purposes in text widgets. First, they control the way information is displayed on the screen. By default, characters are displayed -as determined by the \fB\-background\fR, \fB\-font\fR, and \fB\-foreground\fR +as determined by the \fB\-background\fR, \fB\-font\fR, and \fB\-color\fR options for the text widget. However, display options may be associated with individual tags using the .QW "\fIpathName \fBtag configure\fR" widget command. If a character has been tagged, then the display options associated with the tag override the default display style. The following @@ -419,11 +419,11 @@ \fB\-background \fIcolor\fR . \fIColor\fR specifies the background color to use for characters associated with the tag. It may have any of the forms accepted by \fBTk_GetColor\fR. .TP -\fB\-bgstipple \fIbitmap\fR +\fB\-backgroundstipple \fIbitmap\fR . \fIBitmap\fR specifies a bitmap that is used as a stipple pattern for the background. It may have any of the forms accepted by \fBTk_GetBitmap\fR. If \fIbitmap\fR has not been specified, or if it is specified as an empty string, then a solid fill will be used for the background. @@ -438,11 +438,11 @@ . \fIElide\fR specifies whether the data should be elided. Elided data (characters, images, embedded windows, etc.) is not displayed and takes no space on screen, but further on behaves just as normal data. .TP -\fB\-fgstipple \fIbitmap\fR +\fB\-stipple \fIbitmap\fR . \fIBitmap\fR specifies a bitmap that is used as a stipple pattern when drawing text and other foreground information such as underlines. It may have any of the forms accepted by \fBTk_GetBitmap\fR. If \fIbitmap\fR has not been specified, or if it is specified as an empty string, then a solid fill will be @@ -451,11 +451,11 @@ \fB\-font \fIfontName\fR . \fIFontName\fR is the name of a font to use for drawing characters. It may have any of the forms accepted by \fBTk_GetFont\fR. .TP -\fB\-foreground \fIcolor\fR +\fB\-color \fIcolor\fR . \fIColor\fR specifies the color to use when drawing text and other foreground information such as underlines. It may have any of the forms accepted by \fBTk_GetColor\fR. .TP @@ -508,16 +508,16 @@ . Specifies whether or not to draw a horizontal rule through the middle of characters. \fIBoolean\fR may have any of the forms accepted by \fBTcl_GetBoolean\fR. .TP -\fB\-overstrikefg \fIcolor\fR +\fB\-overstrikecolor \fIcolor\fR . \fIColor\fR specifies the color to use when displaying the overstrike. It may have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR has not been specified, or if it is specified as an empty string, then the color -specified by the \fB\-foreground\fR tag option is used. +specified by the \fB\-color\fR tag option is used. .TP \fB\-relief \fIrelief\fR . \fIRelief\fR specifies the relief style to use for drawing the border, in any of the forms accepted by \fBTk_GetRelief\fR. This option is used in @@ -548,15 +548,15 @@ items. It may have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR has not been specified, or if it is specified as an empty string, then the color specified by the \fB\-background\fR tag option is used. .TP -\fB\-selectforeground \fIcolor\fR -\fIColor\fR specifies the foreground color to use when displaying selected +\fB\-selectcolor \fIcolor\fR +\fIColor\fR specifies the color to use when displaying selected items. It may have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR has not been specified, or if it is specified as an empty -string, then the color specified by the \fB\-foreground\fR tag option is +string, then the color specified by the \fB\-color\fR tag option is used. .TP \fB\-spacing1 \fIpixels\fR . \fIPixels\fR specifies how much additional space should be left above each @@ -597,16 +597,16 @@ \fB\-underline \fIboolean\fR . \fIBoolean\fR specifies whether or not to draw an underline underneath characters. It may have any of the forms accepted by \fBTcl_GetBoolean\fR. .TP -\fB\-underlinefg \fIcolor\fR +\fB\-underlinecolor \fIcolor\fR . \fIColor\fR specifies the color to use when displaying the underline. It may have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR has not been specified, or if it is specified as an empty string, then the color -specified by the \fB\-foreground\fR tag option is used. +specified by the \fB\-color\fR tag option is used. .TP \fB\-wrap \fImode\fR . \fIMode\fR specifies how to handle lines that are wider than the text's window. This option only applies to a display line if it applies to the @@ -850,13 +850,13 @@ .PP The \fBsel\fR tag is automatically defined when a text widget is created, and it may not be deleted with the .QW "\fIpathName \fBtag delete\fR" widget command. Furthermore, the \fB\-selectbackground\fR, -\fB\-selectborderwidth\fR, and \fB\-selectforeground\fR options for the text +\fB\-selectborderwidth\fR, and \fB\-selectcolor\fR options for the text widget are tied to the \fB\-background\fR, \fB\-borderwidth\fR, and -\fB\-foreground\fR options for the \fBsel\fR tag: changes in either will +\fB\-color\fR options for the \fBsel\fR tag: changes in either will automatically be reflected in the other. Also the \fB\-inactiveselectbackground\fR option for the text widget is used instead of \fB\-selectbackground\fR when the text widget does not have the focus. This allows programmatic control over the visualization of the \fBsel\fR tag for foreground and background windows, or to have \fBsel\fR not shown at all (when Index: doc/ttk_button.n ================================================================== --- doc/ttk_button.n +++ doc/ttk_button.n @@ -39,11 +39,11 @@ Depending on the theme, the default button may be displayed with an extra highlight ring, or with a different border color. .RE .\" Not documented -- may go away .\" .OP \-padding padding Padding -.\" .OP \-foreground foreground Foreground +.\" .OP \-color color Color .\" .OP \-font font Font .\" .OP \-anchor anchor Anchor .\" .OP \-relief relief Relief .SH "WIDGET COMMAND" .PP @@ -69,17 +69,17 @@ \fB\-anchor\fP \fIanchor\fP .br \fB\-background\fP \fIcolor\fP .br \fB\-bordercolor\fP \fIcolor\fP +.br +\fB\-color\fP \fIcolor\fP .br \fB\-compound\fP \fIcompound\fP .br \fB\-darkcolor\fP \fIcolor\fP .br -\fB\-foreground\fP \fIcolor\fP -.br \fB\-font\fP \fIfont\fP .br \fB\-highlightcolor\fP \fIcolor\fP .br \fB\-highlightthickness\fP \fIamount\fP Index: doc/ttk_checkbutton.n ================================================================== --- doc/ttk_checkbutton.n +++ doc/ttk_checkbutton.n @@ -78,13 +78,13 @@ \fBTCheckbutton\fP styling options configurable with \fBttk::style\fP are: .PP \fB\-background\fP \fIcolor\fP .br -\fB\-compound\fP \fIcompound\fP +\fB\-color\fP \fIcolor\fP .br -\fB\-foreground\fP \fIcolor\fP +\fB\-compound\fP \fIcompound\fP .br \fB\-indicatorbackground\fP \fIcolor\fP .br \fB\-indicatorcolor\fP \fIcolor\fP .br Index: doc/ttk_combobox.n ================================================================== --- doc/ttk_combobox.n +++ doc/ttk_combobox.n @@ -17,11 +17,11 @@ A \fBttk::combobox\fR combines a text field with a pop-down list of values; the user may select the value of the text field from among the values in the list. .SO ttk_widget \-class \-cursor \-takefocus -\-style \-placeholder \-placeholderforeground +\-style \-placeholder \-placeholdercolor .SE .\" ALSO: Other entry widget options .SH "WIDGET-SPECIFIC OPTIONS" .OP \-exportselection exportSelection ExportSelection Boolean value. @@ -129,17 +129,17 @@ \fB\-arrowsize\fP \fIamount\fP .br \fB\-background\fP \fIcolor\fP .br \fB\-bordercolor\fP \fIcolor\fP +.br +\fB\-color\fP \fIcolor\fP .br \fB\-darkcolor\fP \fIcolor\fP .br \fB\-focusfill\fP \fIcolor\fP .br -\fB\-foreground\fP \fIcolor\fP -.br \fB\-fieldbackground\fP \fIcolor\fP .RS Can only be changed when using non-native and non-graphical themes. .RE \fB\-insertcolor\fP \fIcolor\fP @@ -148,21 +148,21 @@ .br \fB\-lightcolor\fP \fIcolor\fP .br \fB\-padding\fP \fIpadding\fP .br -\fB\-placeholderforeground\fP \fIcolor\fP +\fB\-placeholdercolor\fP \fIcolor\fP .br \fB\-postoffset\fP \fIpadding\fP .br \fB\-selectbackground\fP \fIcolor\fP .RS Text entry select background. .RE -\fB\-selectforeground\fP \fIcolor\fP +\fB\-selectcolor\fP \fIcolor\fP .RS -Text entry select foreground. +Text entry select color. .RE .PP The \fBttk::combobox\fP popdown listbox cannot be configured using \fBttk::style\fP nor via the widget \fBconfigure\fP command. The listbox can be configured using the option database. @@ -169,15 +169,15 @@ .PP option add *TCombobox*Listbox.background \fIcolor\fP .br option add *TCombobox*Listbox.font \fIfont\fP .br -option add *TCombobox*Listbox.foreground \fIcolor\fP +option add *TCombobox*Listbox.color \fIcolor\fP .br option add *TCombobox*Listbox.selectBackground \fIcolor\fP .br -option add *TCombobox*Listbox.selectForeground \fIcolor\fP +option add *TCombobox*Listbox.selectColor \fIcolor\fP .PP To configure a specific listbox (subject to future change): .CS set popdown [ttk::combobox::PopdownWindow .mycombobox] $popdown.f.l configure \-font \fIfont\fP Index: doc/ttk_entry.n ================================================================== --- doc/ttk_entry.n +++ doc/ttk_entry.n @@ -22,13 +22,13 @@ with the \fB\-textvariable\fR option. Entry widgets support horizontal scrolling with the standard \fB\-xscrollcommand\fR option and \fBxview\fR widget command. .SO ttk_widget \-class \-cursor -\-font \-foreground +\-font \-color \-style -\-takefocus \-xscrollcommand \-placeholder \-placeholderforeground +\-takefocus \-xscrollcommand \-placeholder \-placeholdercolor .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-exportselection exportSelection ExportSelection A boolean value specifying whether or not a selection in the widget should be linked to the X selection. @@ -44,11 +44,11 @@ .OP \-justify justify Justify Specifies how the text is aligned within the entry widget. One of \fBleft\fR, \fBcenter\fR, or \fBright\fR. .\" MAYBE: .OP \-selectbackground selectBackground Foreground .\" MAYBE: .OP \-selectborderwidth selectBorderWidth BorderWidth -.\" MAYBE: .OP \-selectforeground selectForeground Background +.\" MAYBE: .OP \-selectcolor selectForeground Background .OP \-show show Show If this option is specified, then the true contents of the entry are not displayed in the window. Instead, each character in the entry's value will be displayed as the first character in the value of this option, such as @@ -444,29 +444,29 @@ .br \fB\-fieldbackground\fP \fIcolor\fP .RS Some themes use a graphical background and their field background colors cannot be changed. .RE -\fB\-foreground\fP \fIcolor\fP +\fB\-color\fP \fIcolor\fP .br \fB\-insertcolor\fP \fIcolor\fP .br \fB\-insertwidth\fP \fIamount\fP .br \fB\-lightcolor\fP \fIcolor\fP .br \fB\-padding\fP \fIpadding\fP .br -\fB\-placeholderforeground\fP \fIcolor\fP +\fB\-placeholdercolor\fP \fIcolor\fP .br \fB\-relief\fP \fIrelief\fP .br \fB\-selectbackground\fP \fIcolor\fP .br \fB\-selectborderwidth\fP \fIamount\fP .br -\fB\-selectforeground\fP \fIcolor\fP +\fB\-selectcolor\fP \fIcolor\fP .PP See the \fBttk::style\fP manual page for information on how to configure ttk styles. .SH "SEE ALSO" ttk::widget(n), entry(n) Index: doc/ttk_intro.n ================================================================== --- doc/ttk_intro.n +++ doc/ttk_intro.n @@ -56,11 +56,11 @@ .PP Like widgets, elements have \fIoptions\fR which specify what to display and how to display it. For example, the \fBtext\fR element (which displays a text string) has -\fB\-text\fR, \fB\-font\fR, \fB\-foreground\fR, \fB\-background\fR, +\fB\-text\fR, \fB\-font\fR, \fB\-color\fR, \fB\-background\fR, \fB\-underline\fR, and \fB\-width\fR options. The value of an element option is taken from (in precedence order): .IP \(bu an option of the same name and type in the widget containing the element; .IP \(bu @@ -150,28 +150,28 @@ For example: .PP .CS ttk::\fBstyle configure\fR TButton \e \-background #d9d9d9 \e - \-foreground black \e + \-color black \e \-relief raised \e ; .CE .PP Many elements are displayed differently depending on the widget state. For example, buttons have a different background when they are active, -a different foreground when disabled, and a different relief when pressed. +a different color when disabled, and a different relief when pressed. The \fBstyle map\fR command specifies dynamic option settings for a particular style: .PP .CS ttk::\fBstyle map\fR TButton \e \-background [list disabled #d9d9d9 active #ececec] \e - \-foreground [list disabled #a3a3a3] \e + \-color [list disabled #a3a3a3] \e \-relief [list {pressed !disabled} sunken] \e ; .CE .SH "SEE ALSO" ttk::widget(n), ttk::style(n) '\" Local Variables: '\" mode: nroff '\" End: Index: doc/ttk_label.n ================================================================== --- doc/ttk_label.n +++ doc/ttk_label.n @@ -17,11 +17,11 @@ A \fBttk::label\fR widget displays a textual label and/or image. The label may be linked to a Tcl variable to automatically change the displayed text. .SO ttk_widget \-anchor \-class \-compound \-cursor -\-font \-foreground +\-font \-color \-image \-justify \-padding \-state \-style \-takefocus \-text \-textvariable \-underline \-width \-wraplength .SE .SH "WIDGET-SPECIFIC OPTIONS" @@ -54,13 +54,13 @@ \fBTLabel\fP styling options configurable with \fBttk::style\fP are: .PP \fB\-background\fP \fIcolor\fP .br -\fB\-compound\fP \fIcompound\fP +\fB\-color\fP \fIcolor\fP .br -\fB\-foreground\fP \fIcolor\fP +\fB\-compound\fP \fIcompound\fP .br \fB\-font\fP \fIfont\fP .PP Some options are only available for specific themes. .PP Index: doc/ttk_labelframe.n ================================================================== --- doc/ttk_labelframe.n +++ doc/ttk_labelframe.n @@ -95,13 +95,13 @@ \fBTLabelframe.Label\fP styling options configurable with \fBttk::style\fP are: .PP \fB\-background\fP \fIcolor\fP .br -\fB\-font\fP \fIfont\fP +\fB\-color\fP \fIcolor\fP .br -\fB\-foreground\fP \fIcolor\fP +\fB\-font\fP \fIfont\fP .PP Some options are only available for specific themes. .PP See the \fBttk::style\fP manual page for information on how to configure ttk styles. Index: doc/ttk_menubutton.n ================================================================== --- doc/ttk_menubutton.n +++ doc/ttk_menubutton.n @@ -56,13 +56,13 @@ .PP \fB\-arrowsize\fP \fIamount\fP .br \fB\-background\fP \fIcolor\fP .br -\fB\-compound\fP \fIcompound\fP +\fB\-color\fP \fIcolor\fP .br -\fB\-foreground\fP \fIcolor\fP +\fB\-compound\fP \fIcompound\fP .br \fB\-font\fP \fIfont\fP .br \fB\-padding\fP \fIpadding\fP .br Index: doc/ttk_notebook.n ================================================================== --- doc/ttk_notebook.n +++ doc/ttk_notebook.n @@ -222,11 +222,11 @@ .br \fB\-bordercolor\fP \fIcolor\fP .br \fB\-darkcolor\fP \fIcolor\fP .br -\fB\-foreground\fP \fIcolor\fP +\fB\-color\fP \fIcolor\fP .br \fB\-lightcolor\fP \fIcolor\fP .br \fB\-padding\fP \fIpadding\fP .br @@ -239,10 +239,12 @@ are: .PP \fB\-background\fP \fIcolor\fP .br \fB\-bordercolor\fP \fIcolor\fP +.br +\fB\-color\fP \fIcolor\fP .br \fB\-compound\fP \fIcompound\fP .br \fB\-expand\fP \fIpadding\fP .RS @@ -250,12 +252,10 @@ \fBselected\fP dynamic state. \fB\-tabmargins\fP should be set appropriately so that there is room for the tab growth. .RE \fB\-font\fP \fIfont\fP .br -\fB\-foreground\fP \fIcolor\fP -.br \fB\-padding\fP \fIpadding\fP .PP Some options are only available for specific themes. .PP See the \fBttk::style\fP manual page for information on how to configure Index: doc/ttk_progressbar.n ================================================================== --- doc/ttk_progressbar.n +++ doc/ttk_progressbar.n @@ -20,16 +20,16 @@ \fIindeterminate\fR mode provides an animated display to let the user know that something is happening. .PP If the value of \fB-orient\fR is \fBhorizontal\fR a text string can be displayed inside the progressbar. This string can be configured using -the \fB-anchor\fR, \fB-font\fR, \fB-foreground\fR, \fB-justify\fR, +the \fB-anchor\fR, \fB-color\fR, \fB-font\fR, \fB-justify\fR, \fB-text\fR and \fB-wraplength\fR options. If the value of \fB-orient\fR is \fBvertical\fR then these options are ignored. .SO ttk_widget \-anchor \-class \-cursor -\-font \-foreground \-justify \-style +\-font \-color \-justify \-style \-takefocus \-text \-wraplength .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-length length Length Specifies the length of the long axis of the progress bar Index: doc/ttk_radiobutton.n ================================================================== --- doc/ttk_radiobutton.n +++ doc/ttk_radiobutton.n @@ -75,13 +75,13 @@ \fBTRadiobutton\fP styling options configurable with \fBttk::style\fP are: .PP \fB\-background\fP \fIcolor\fP .br -\fB\-compound\fP \fIcompound\fP +\fB\-color\fP \fIcolor\fP .br -\fB\-foreground\fP \fIcolor\fP +\fB\-compound\fP \fIcompound\fP .br \fB\-indicatorbackground\fP \fIcolor\fP .br \fB\-indicatorcolor\fP \fIcolor\fP .br Index: doc/ttk_scrollbar.n ================================================================== --- doc/ttk_scrollbar.n +++ doc/ttk_scrollbar.n @@ -171,13 +171,13 @@ .br \fB\-background\fP \fIcolor\fP .br \fB\-bordercolor\fP \fIcolor\fP .br -\fB\-darkcolor\fP \fIcolor\fP (color of the dark part of the 3D relief) +\fB\-color\fP \fIcolor\fP .br -\fB\-foreground\fP \fIcolor\fP +\fB\-darkcolor\fP \fIcolor\fP (color of the dark part of the 3D relief) .br \fB\-gripcount\fP \fIcount\fP (number of lines on the thumb) .br \fB\-lightcolor\fP \fIcolor\fP (color of the light part of the 3D relief) .br Index: doc/ttk_spinbox.n ================================================================== --- doc/ttk_spinbox.n +++ doc/ttk_spinbox.n @@ -20,11 +20,11 @@ of the \fBttk::entry\fR widget including support of the \fB\-textvariable\fR option to link the value displayed by the widget to a Tcl variable. .SO ttk_widget \-class \-cursor \-state \-style -\-takefocus \-xscrollcommand \-placeholder \-placeholderforeground +\-takefocus \-xscrollcommand \-placeholder \-placeholdercolor .SE .SO ttk_entry \-validate \-validatecommand .SE .SH "WIDGET-SPECIFIC OPTIONS" @@ -98,30 +98,30 @@ For backwards compatibility, when using the aqua theme (for macOS), this option behaves as an alias for the \fB\-fieldbackground\fP provided that no value is specified for \fB\-fieldbackground\fP. Otherwise it is ignored. .RE \fB\-bordercolor\fP \fIcolor\fP +.br +\fB\-color\fP \fIcolor\fP .br \fB\-darkcolor\fP \fIcolor\fP .br \fB\-fieldbackground\fP \fIcolor\fP .br -\fB\-foreground\fP \fIcolor\fP -.br \fB\-insertcolor\fP \fIcolor\fP .br \fB\-insertwidth\fP \fIamount\fP .br \fB\-lightcolor\fP \fIcolor\fP .br \fB\-padding\fP \fIpadding\fP .br -\fB\-placeholderforeground\fP \fIcolor\fP +\fB\-placeholdercolor\fP \fIcolor\fP .br \fB\-selectbackground\fP \fIcolor\fP .br -\fB\-selectforeground\fP \fIcolor\fP +\fB\-selectcolor\fP \fIcolor\fP .PP Some options are only available for specific themes. .PP See the \fBttk::style\fP manual page for information on how to configure ttk styles. Index: doc/ttk_treeview.n ================================================================== --- doc/ttk_treeview.n +++ doc/ttk_treeview.n @@ -430,12 +430,12 @@ .OP \-tags tags Tags A list of tags associated with this item. .SH "TAG OPTIONS" .PP The following options may be specified on tags: -.IP \fB\-foreground\fR -Specifies the text foreground color. +.IP \fB\-color\fR +Specifies the text color. .IP \fB\-background\fR Specifies the cell or item background color. .IP \fB\-font\fR Specifies the font to use when drawing text. .\" ??? Maybe: .IP \-anchor @@ -499,17 +499,17 @@ .PP \fBTreeview\fP styling options configurable with \fBttk::style\fP are: .PP \fB\-background\fP \fIcolor\fP +.br +\fB\-color\fP \fIcolor\fP .br \fB\-fieldbackground\fP \fIcolor\fP .br \fB\-font\fP \fIfont\fP .br -\fB\-foreground\fP \fIcolor\fP -.br \fB\-rowheight\fP \fIamount\fP .RS The \fB\-rowheight\fP value is not corrected by the \fBtk scaling\fP value or by the configured font size and must always be set. Also make sure that the \fB\-rowheight\fP is large enough to contain any images. @@ -535,11 +535,11 @@ \fB\-relief\fP \fIrelief\fP .PP \fBItem\fP styling options configurable with \fBttk::style\fP are: .PP -\fB\-foreground\fP \fIcolor\fP +\fB\-color\fP \fIcolor\fP .br \fB\-indicatormargins\fP \fIpadding\fP .br \fB\-indicatorsize\fP \fIamount\fP .br Index: doc/ttk_widget.n ================================================================== --- doc/ttk_widget.n +++ doc/ttk_widget.n @@ -99,12 +99,12 @@ .IP none Display the image if present, otherwise the text. .RE .OP \-font font Font Font to use for the text displayed by the widget. -.OP \-foreground textColor TextColor -The widget's foreground color. +.OP \-color textColor TextColor +The widget's color. If unspecified, the theme default is used. .OP \-image image Image Specifies an image to display. This is a list of 1 or more elements. The first element is the default image name. @@ -155,13 +155,13 @@ The following options are supported by entry, spinbox and combobox: .OP \-placeholder placeHolder PlaceHolder Specifies a help text string to display if no text is otherwise displayed, that is when the widget is empty. The placeholder text is displayed using the values of the \fB\-font\fR, \fB\-justify\fR and -\fB\-placeholderforeground\fR options. -.OP \-placeholderforeground placeHolderForeground PlaceHolderForeground -Specifies the foreground color of the placeholder text. +\fB\-placeholdercolor\fR options. +.OP \-placeholdercolor placeHolderForeground PlaceHolderForeground +Specifies the color of the placeholder text. .SH "COMPATIBILITY OPTIONS" This option is only available for themed widgets that have .QW corresponding traditional Tk widgets. .OP \-state state State Index: generic/tkButton.c ================================================================== --- generic/tkButton.c +++ generic/tkButton.c @@ -67,47 +67,61 @@ * Information used for parsing configuration options. There is a * separate table for each of the four widget classes. */ static const Tk_OptionSpec labelOptionSpecs[] = { - {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", + {TK_OPTION_BORDER, "-activebackground", "activeBackground", "ActiveBackground", DEF_BUTTON_ACTIVE_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, activeBorder), 0, DEF_BUTTON_ACTIVE_BG_MONO, 0}, - {TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background", + {TK_OPTION_COLOR, "-activecolor", "activeColor", "ActiveColor", DEF_BUTTON_ACTIVE_FG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, activeFg), TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-activeforeground", "activecolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-activecolor", 0}, +#endif {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_BUTTON_ANCHOR, TCL_INDEX_NONE, offsetof(TkButton, anchor), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_BUTTON_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, normalBorder), 0, DEF_BUTTON_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", 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}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_BUTTON_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound", - DEF_BUTTON_COMPOUND, TCL_INDEX_NONE, offsetof(TkButton, compound), 0, - compoundStrings, 0}, + DEF_BUTTON_COMPOUND, TCL_INDEX_NONE, offsetof(TkButton, compound), 0, + compoundStrings, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_BUTTON_CURSOR, TCL_INDEX_NONE, offsetof(TkButton, cursor), TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_COLOR, "-disabledforeground", "disabledForeground", - "DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR, + {TK_OPTION_COLOR, "-disabledcolor", "disabledColor", + "DisabledColor", DEF_BUTTON_DISABLED_FG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0}, - {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-disabledforeground", "disabledcolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-disabledcolor", 0}, + {TK_OPTION_SYNONYM, "-fg", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", DEF_BUTTON_FONT, TCL_INDEX_NONE, offsetof(TkButton, tkfont), 0, 0, 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_BUTTON_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_STRING, "-height", "height", "Height", DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_BORDER, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, highlightBorder), 0, @@ -152,31 +166,39 @@ offsetof(TkButton, wrapLength), 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0} }; static const Tk_OptionSpec buttonOptionSpecs[] = { - {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", + {TK_OPTION_BORDER, "-activebackground", "activeBackground", "ActiveBackground", DEF_BUTTON_ACTIVE_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, activeBorder), 0, DEF_BUTTON_ACTIVE_BG_MONO, 0}, - {TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background", + {TK_OPTION_COLOR, "-activecolor", "activeColor", "ActiveColor", DEF_BUTTON_ACTIVE_FG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, activeFg), TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-activeforeground", "activecolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-activecolor", 0}, +#endif {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_BUTTON_ANCHOR, TCL_INDEX_NONE, offsetof(TkButton, anchor), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_BUTTON_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, normalBorder), 0, DEF_BUTTON_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", 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}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_BUTTON_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0}, {TK_OPTION_STRING, "-command", "command", "Command", DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound", DEF_BUTTON_COMPOUND, TCL_INDEX_NONE, offsetof(TkButton, compound), 0, @@ -185,20 +207,26 @@ DEF_BUTTON_CURSOR, TCL_INDEX_NONE, offsetof(TkButton, cursor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-default", "default", "Default", DEF_BUTTON_DEFAULT, TCL_INDEX_NONE, offsetof(TkButton, defaultState), 0, defaultStrings, 0}, - {TK_OPTION_COLOR, "-disabledforeground", "disabledForeground", - "DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR, + {TK_OPTION_COLOR, "-disabledcolor", "disabledColor", + "DisabledColor", DEF_BUTTON_DISABLED_FG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0}, - {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-disabledforeground", "disabledcolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-disabledcolor", 0}, + {TK_OPTION_SYNONYM, "-fg", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", DEF_BUTTON_FONT, TCL_INDEX_NONE, offsetof(TkButton, tkfont), 0, 0, 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_BUTTON_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_STRING, "-height", "height", "Height", DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_BORDER, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, highlightBorder), 0, @@ -253,50 +281,64 @@ offsetof(TkButton, wrapLength), 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, 0, 0} }; static const Tk_OptionSpec checkbuttonOptionSpecs[] = { - {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", + {TK_OPTION_BORDER, "-activebackground", "activeBackground", "ActiveBackground", DEF_BUTTON_ACTIVE_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, activeBorder), 0, DEF_BUTTON_ACTIVE_BG_MONO, 0}, - {TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background", + {TK_OPTION_COLOR, "-activecolor", "activeColor", "ActiveColor", DEF_CHKRAD_ACTIVE_FG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, activeFg), TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-activeforeground", "activecolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-activecolor", 0}, +#endif {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_BUTTON_ANCHOR, TCL_INDEX_NONE, offsetof(TkButton, anchor), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_BUTTON_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, normalBorder), 0, DEF_BUTTON_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", 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}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_CHKRAD_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0}, {TK_OPTION_STRING, "-command", "command", "Command", DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound", DEF_BUTTON_COMPOUND, TCL_INDEX_NONE, offsetof(TkButton, compound), 0, compoundStrings, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_BUTTON_CURSOR, TCL_INDEX_NONE, offsetof(TkButton, cursor), TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_COLOR, "-disabledforeground", "disabledForeground", - "DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR, + {TK_OPTION_COLOR, "-disabledcolor", "disabledColor", + "DisabledColor", DEF_BUTTON_DISABLED_FG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0}, - {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-disabledforeground", "disabledcolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-disabledcolor", 0}, + {TK_OPTION_SYNONYM, "-fg", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", DEF_BUTTON_FONT, TCL_INDEX_NONE, offsetof(TkButton, tkfont), 0, 0, 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_CHKRAD_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_STRING, "-height", "height", "Height", DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_BORDER, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, highlightBorder), 0, @@ -366,50 +408,64 @@ offsetof(TkButton, wrapLength), 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, 0, 0} }; static const Tk_OptionSpec radiobuttonOptionSpecs[] = { - {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", + {TK_OPTION_BORDER, "-activebackground", "activeBackground", "ActiveBackground", DEF_BUTTON_ACTIVE_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, activeBorder), 0, DEF_BUTTON_ACTIVE_BG_MONO, 0}, - {TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background", + {TK_OPTION_COLOR, "-activecolor", "activeColor", "ActiveColor", DEF_CHKRAD_ACTIVE_FG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, activeFg), TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-activeforeground", "activecolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-activecolor", 0}, +#endif {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_BUTTON_ANCHOR, TCL_INDEX_NONE, offsetof(TkButton, anchor), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_BUTTON_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, normalBorder), 0, DEF_BUTTON_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", 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}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_CHKRAD_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0}, {TK_OPTION_STRING, "-command", "command", "Command", DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound", DEF_BUTTON_COMPOUND, TCL_INDEX_NONE, offsetof(TkButton, compound), 0, compoundStrings, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_BUTTON_CURSOR, TCL_INDEX_NONE, offsetof(TkButton, cursor), TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_COLOR, "-disabledforeground", "disabledForeground", - "DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR, + {TK_OPTION_COLOR, "-disabledcolor", "disabledColor", + "DisabledColor", DEF_BUTTON_DISABLED_FG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0}, - {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-disabledforeground", "disabledcolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-disabledcolor", 0}, + {TK_OPTION_SYNONYM, "-fg", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", DEF_BUTTON_FONT, TCL_INDEX_NONE, offsetof(TkButton, tkfont), 0, 0, 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_CHKRAD_FG, TCL_INDEX_NONE, offsetof(TkButton, normalFg), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_STRING, "-height", "height", "Height", DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_BORDER, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR, TCL_INDEX_NONE, offsetof(TkButton, highlightBorder), 0, Index: generic/tkButton.h ================================================================== --- generic/tkButton.h +++ generic/tkButton.h @@ -143,18 +143,18 @@ * Indicates how much interior stuff must be * offset from outside edges to leave room for * borders. */ Tk_Font tkfont; /* Value of -font option: specifies font to * use for display text. */ - XColor *normalFg; /* Value of -font option: specifies foreground + XColor *normalFg; /* Value of -font option: specifies * color in normal mode. */ - XColor *activeFg; /* Value of -activeforeground option: - * foreground color in active mode. NULL means - * use -foreground instead. */ - XColor *disabledFg; /* Value of -disabledforeground option: - * foreground color when disabled. NULL means - * use normalFg with a 50% stipple instead. */ + XColor *activeFg; /* Value of -activecolor option: + * color in active mode. NULL means + * use -color instead. */ + XColor *disabledFg; /* Value of -disabledcolor option: + * color when disabled. NULL means + * use -color with a 50% stipple instead. */ GC normalTextGC; /* GC for drawing text in normal mode. Also * used to copy from off-screen pixmap onto * screen. */ GC activeTextGC; /* GC for drawing text in active mode (NULL * means use normalTextGC). */ Index: generic/tkCanvBmap.c ================================================================== --- generic/tkCanvBmap.c +++ generic/tkCanvBmap.c @@ -47,33 +47,40 @@ static const Tk_CustomOption tagsOption = { TkCanvasTagsParseProc, TkCanvasTagsPrintProc, NULL }; static const Tk_ConfigSpec configSpecs[] = { - {TK_CONFIG_COLOR, "-activebackground", NULL, NULL, + {TK_CONFIG_COLOR, "-activebackground", "activebackground", "Activebackground", NULL, offsetof(BitmapItem, activeBgColor), TK_CONFIG_NULL_OK, NULL}, - {TK_CONFIG_BITMAP, "-activebitmap", NULL, NULL, + {TK_CONFIG_BITMAP, "-activebitmap", "activebitmap", "Activebitmap", NULL, offsetof(BitmapItem, activeBitmap), TK_CONFIG_NULL_OK, NULL}, - {TK_CONFIG_COLOR, "-activeforeground", NULL, NULL, + {TK_CONFIG_COLOR, "-activecolor", "activecolor", "Activecolor", NULL, offsetof(BitmapItem, activeFgColor), TK_CONFIG_NULL_OK, NULL}, +#ifndef TK_NO_DEPRECATED + {TK_CONFIG_SYNONYM, "-activeforeground", "activecolor", NULL, NULL, 0, 0, NULL}, +#endif {TK_CONFIG_ANCHOR, "-anchor", NULL, NULL, "center", offsetof(BitmapItem, anchor), TK_CONFIG_DONT_SET_DEFAULT, NULL}, - {TK_CONFIG_COLOR, "-background", NULL, NULL, + {TK_CONFIG_COLOR, "-background", "background", "Background", NULL, offsetof(BitmapItem, bgColor), TK_CONFIG_NULL_OK, NULL}, - {TK_CONFIG_BITMAP, "-bitmap", NULL, NULL, + {TK_CONFIG_BITMAP, "-bitmap", "bitmap", "Bitmap", NULL, offsetof(BitmapItem, bitmap), TK_CONFIG_NULL_OK, NULL}, - {TK_CONFIG_COLOR, "-disabledbackground", NULL, NULL, + {TK_CONFIG_COLOR, "-color", "color", "Color", + DEF_CANVBMAP_FG, offsetof(BitmapItem, fgColor), 0, NULL}, + {TK_CONFIG_COLOR, "-disabledbackground", "disabledbackground", "Disabledbackground", NULL, offsetof(BitmapItem, disabledBgColor), TK_CONFIG_NULL_OK, NULL}, - {TK_CONFIG_BITMAP, "-disabledbitmap", NULL, NULL, + {TK_CONFIG_BITMAP, "-disabledbitmap", "disabledbitmap", "Disabledbitmap", NULL, offsetof(BitmapItem, disabledBitmap), TK_CONFIG_NULL_OK, NULL}, - {TK_CONFIG_COLOR, "-disabledforeground", NULL, NULL, + {TK_CONFIG_COLOR, "-disabledcolor", "disabledcolor", "Disabledcolor", NULL, offsetof(BitmapItem, disabledFgColor), TK_CONFIG_NULL_OK, NULL}, - {TK_CONFIG_COLOR, "-foreground", NULL, NULL, - DEF_CANVBMAP_FG, offsetof(BitmapItem, fgColor), 0, NULL}, +#ifndef TK_NO_DEPRECATED + {TK_CONFIG_SYNONYM, "-disabledforeground", "disabledcolor", NULL, NULL, 0, 0, NULL}, + {TK_CONFIG_SYNONYM, "-foreground", "color", NULL, NULL, 0, 0, NULL}, +#endif {TK_CONFIG_CUSTOM, "-state", NULL, NULL, NULL, offsetof(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption}, {TK_CONFIG_CUSTOM, "-tags", NULL, NULL, NULL, 0, TK_CONFIG_NULL_OK, &tagsOption}, Index: generic/tkCanvas.c ================================================================== --- generic/tkCanvas.c +++ generic/tkCanvas.c @@ -94,12 +94,14 @@ DEF_CANVAS_BG_COLOR, offsetof(TkCanvas, bgBorder), TK_CONFIG_COLOR_ONLY, NULL}, {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_CANVAS_BG_MONO, offsetof(TkCanvas, bgBorder), TK_CONFIG_MONO_ONLY, NULL}, +#ifndef TK_NO_DEPRECATED {TK_CONFIG_SYNONYM, "-bd", "borderWidth", NULL, NULL, 0, 0, NULL}, {TK_CONFIG_SYNONYM, "-bg", "background", NULL, NULL, 0, 0, NULL}, +#endif {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_CANVAS_BORDER_WIDTH, offsetof(TkCanvas, borderWidth), 0, NULL}, {TK_CONFIG_DOUBLE, "-closeenough", "closeEnough", "CloseEnough", DEF_CANVAS_CLOSE_ENOUGH, offsetof(TkCanvas, closeEnough), 0, NULL}, {TK_CONFIG_BOOLEAN, "-confine", "confine", "Confine", @@ -114,21 +116,21 @@ {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", DEF_CANVAS_HIGHLIGHT, offsetof(TkCanvas, highlightColorPtr), 0, NULL}, {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", DEF_CANVAS_HIGHLIGHT_WIDTH, offsetof(TkCanvas, highlightWidth), 0, NULL}, - {TK_CONFIG_BORDER, "-insertbackground", "insertBackground", "Foreground", + {TK_CONFIG_BORDER, "-insertbackground", "insertBackground", "InsertBackground", DEF_CANVAS_INSERT_BG, offsetof(TkCanvas, textInfo.insertBorder), 0, NULL}, - {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth", + {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "InsertBorderWidth", DEF_CANVAS_INSERT_BD_COLOR, offsetof(TkCanvas, textInfo.insertBorderWidth), TK_CONFIG_COLOR_ONLY, NULL}, - {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth", + {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "InsertBorderWidth", DEF_CANVAS_INSERT_BD_MONO, offsetof(TkCanvas, textInfo.insertBorderWidth), TK_CONFIG_MONO_ONLY, NULL}, - {TK_CONFIG_INT, "-insertofftime", "insertOffTime", "OffTime", + {TK_CONFIG_INT, "-insertofftime", "insertOffTime", "InsertOffTime", DEF_CANVAS_INSERT_OFF_TIME, offsetof(TkCanvas, insertOffTime), 0, NULL}, - {TK_CONFIG_INT, "-insertontime", "insertOnTime", "OnTime", + {TK_CONFIG_INT, "-insertontime", "insertOnTime", "InsertOnTime", 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}, {TK_CONFIG_CUSTOM, "-offset", "offset", "Offset", "0,0", offsetof(TkCanvas, tsoffset),TK_CONFIG_DONT_SET_DEFAULT, @@ -136,48 +138,51 @@ {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}, - {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground", + {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "SelectBackground", DEF_CANVAS_SELECT_COLOR, offsetof(TkCanvas, textInfo.selBorder), TK_CONFIG_COLOR_ONLY, NULL}, - {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground", + {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "SelectBackground", DEF_CANVAS_SELECT_MONO, offsetof(TkCanvas, textInfo.selBorder), TK_CONFIG_MONO_ONLY, NULL}, - {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", + {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "SelectBorderWidth", DEF_CANVAS_SELECT_BD_COLOR, offsetof(TkCanvas, textInfo.selBorderWidth), TK_CONFIG_COLOR_ONLY, NULL}, - {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", + {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "SelectBorderWidth", DEF_CANVAS_SELECT_BD_MONO, offsetof(TkCanvas, textInfo.selBorderWidth), TK_CONFIG_MONO_ONLY, NULL}, - {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background", + {TK_CONFIG_COLOR, "-selectcolor", "selectColor", "SelectColor", DEF_CANVAS_SELECT_FG_COLOR, offsetof(TkCanvas, textInfo.selFgColorPtr), TK_CONFIG_COLOR_ONLY|TK_CONFIG_NULL_OK, NULL}, - {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background", + {TK_CONFIG_COLOR, "-selectcolor", "selectColor", "SelectColor", DEF_CANVAS_SELECT_FG_MONO, offsetof(TkCanvas, textInfo.selFgColorPtr), TK_CONFIG_MONO_ONLY|TK_CONFIG_NULL_OK, NULL}, +#ifndef TK_NO_DEPRECATED + {TK_CONFIG_SYNONYM, "-selectforeground", "selectColor", NULL, NULL, 0, 0, NULL}, +#endif {TK_CONFIG_CUSTOM, "-state", "state", "State", "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}, {TK_CONFIG_PIXELS, "-width", "width", "Width", DEF_CANVAS_WIDTH, offsetof(TkCanvas, width), 0, NULL}, - {TK_CONFIG_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand", + {TK_CONFIG_STRING, "-xscrollcommand", "xScrollCommand", "XScrollCommand", DEF_CANVAS_X_SCROLL_CMD, offsetof(TkCanvas, xScrollCmd), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_PIXELS, "-xscrollincrement", "xScrollIncrement", - "ScrollIncrement", + "XScrollIncrement", DEF_CANVAS_X_SCROLL_INCREMENT, offsetof(TkCanvas, xScrollIncrement), 0, NULL}, {TK_CONFIG_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand", DEF_CANVAS_Y_SCROLL_CMD, offsetof(TkCanvas, yScrollCmd), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_PIXELS, "-yscrollincrement", "yScrollIncrement", - "ScrollIncrement", + "YScrollIncrement", DEF_CANVAS_Y_SCROLL_INCREMENT, offsetof(TkCanvas, yScrollIncrement), 0, NULL}, {TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL} }; Index: generic/tkEntry.c ================================================================== --- generic/tkEntry.c +++ generic/tkEntry.c @@ -63,35 +63,47 @@ static const Tk_OptionSpec entryOptSpec[] = { {TK_OPTION_BORDER, "-background", "background", "Background", DEF_ENTRY_BG_COLOR, TCL_INDEX_NONE, offsetof(Entry, normalBorder), 0, DEF_ENTRY_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_ENTRY_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Entry, borderWidth), 0, 0, 0}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_ENTRY_FG, TCL_INDEX_NONE, offsetof(Entry, fgColorPtr), 0, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_ENTRY_CURSOR, TCL_INDEX_NONE, offsetof(Entry, cursor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_BORDER, "-disabledbackground", "disabledBackground", "DisabledBackground", DEF_ENTRY_DISABLED_BG_COLOR, TCL_INDEX_NONE, offsetof(Entry, disabledBorder), TK_OPTION_NULL_OK, (ClientData) DEF_ENTRY_DISABLED_BG_MONO, 0}, - {TK_OPTION_COLOR, "-disabledforeground", "disabledForeground", - "DisabledForeground", DEF_ENTRY_DISABLED_FG, TCL_INDEX_NONE, + {TK_OPTION_COLOR, "-disabledcolor", "disabledColor", + "DisabledColor", DEF_ENTRY_DISABLED_FG, TCL_INDEX_NONE, offsetof(Entry, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-disabledforeground", "disabledcolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-disabledcolor", 0}, +#endif {TK_OPTION_BOOLEAN, "-exportselection", "exportSelection", "ExportSelection", DEF_ENTRY_EXPORT_SELECTION, TCL_INDEX_NONE, offsetof(Entry, exportSelection), 0, 0, 0}, - {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-fg", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", DEF_ENTRY_FONT, TCL_INDEX_NONE, offsetof(Entry, tkfont), 0, 0, 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_ENTRY_FG, TCL_INDEX_NONE, offsetof(Entry, fgColorPtr), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_ENTRY_HIGHLIGHT_BG, TCL_INDEX_NONE, offsetof(Entry, highlightBgColorPtr), 0, 0, 0}, {TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", DEF_ENTRY_HIGHLIGHT, TCL_INDEX_NONE, offsetof(Entry, highlightColorPtr), 0, 0, 0}, @@ -112,20 +124,26 @@ {TK_OPTION_PIXELS, "-insertwidth", "insertWidth", "InsertWidth", DEF_ENTRY_INSERT_WIDTH, TCL_INDEX_NONE, offsetof(Entry, insertWidth), 0, 0, 0}, {TK_OPTION_STRING, "-invalidcommand", "invalidCommand", "InvalidCommand", DEF_ENTRY_INVALIDCMD, TCL_INDEX_NONE, offsetof(Entry, invalidCmd), TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-invcmd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-invalidcommand", 0}, +#endif {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_ENTRY_JUSTIFY, TCL_INDEX_NONE, offsetof(Entry, justify), 0, 0, 0}, {TK_OPTION_STRING, "-placeholder", "placeHolder", "PlaceHolder", DEF_ENTRY_PLACEHOLDER, TCL_INDEX_NONE, offsetof(Entry, placeholderString), TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_COLOR, "-placeholderforeground", "placeholderForeground", - "PlaceholderForeground", DEF_ENTRY_PLACEHOLDERFG, TCL_INDEX_NONE, - offsetof(Entry, placeholderColorPtr), 0, 0, 0}, + {TK_OPTION_COLOR, "-placeholdercolor", "placeholderColor", + "PlaceholderColor", DEF_ENTRY_PLACEHOLDERFG, TCL_INDEX_NONE, + offsetof(Entry, placeholderColorPtr), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-placeholderforeground", "placeholdercolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-placeholdercolor", 0}, +#endif {TK_OPTION_BORDER, "-readonlybackground", "readonlyBackground", "ReadonlyBackground", DEF_ENTRY_READONLY_BG_COLOR, TCL_INDEX_NONE, offsetof(Entry, readonlyBorder), TK_OPTION_NULL_OK, (ClientData) DEF_ENTRY_READONLY_BG_MONO, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", @@ -135,13 +153,17 @@ 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}, - {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", + {TK_OPTION_COLOR, "-selectcolor", "selectColor", "SelectColor", DEF_ENTRY_SELECT_FG_COLOR, TCL_INDEX_NONE, offsetof(Entry, selFgColorPtr), TK_OPTION_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-selectforeground", "selectcolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-selectcolor", 0}, +#endif {TK_OPTION_STRING, "-show", "show", "Show", DEF_ENTRY_SHOW, TCL_INDEX_NONE, offsetof(Entry, showChar), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_ENTRY_STATE, TCL_INDEX_NONE, offsetof(Entry, state), @@ -155,12 +177,14 @@ {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}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-vcmd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-validatecommand", 0}, +#endif {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), TK_OPTION_NULL_OK, 0, 0}, @@ -189,14 +213,16 @@ DEF_BUTTON_ACTIVE_BG_COLOR, TCL_INDEX_NONE, offsetof(Spinbox, activeBorder), 0, DEF_BUTTON_ACTIVE_BG_MONO, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_ENTRY_BG_COLOR, TCL_INDEX_NONE, offsetof(Entry, normalBorder), 0, DEF_ENTRY_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_ENTRY_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Entry, borderWidth), 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}, @@ -205,10 +231,12 @@ TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_RELIEF, "-buttondownrelief", "buttonDownRelief", "Relief", DEF_BUTTON_RELIEF, TCL_INDEX_NONE, offsetof(Spinbox, bdRelief), 0, 0, 0}, {TK_OPTION_RELIEF, "-buttonuprelief", "buttonUpRelief", "Relief", DEF_BUTTON_RELIEF, TCL_INDEX_NONE, offsetof(Spinbox, buRelief), 0, 0, 0}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_ENTRY_FG, TCL_INDEX_NONE, offsetof(Entry, fgColorPtr), 0, 0, 0}, {TK_OPTION_STRING, "-command", "command", "Command", DEF_SPINBOX_CMD, TCL_INDEX_NONE, offsetof(Spinbox, command), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_ENTRY_CURSOR, TCL_INDEX_NONE, offsetof(Entry, cursor), @@ -215,22 +243,30 @@ TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_BORDER, "-disabledbackground", "disabledBackground", "DisabledBackground", DEF_ENTRY_DISABLED_BG_COLOR, TCL_INDEX_NONE, offsetof(Entry, disabledBorder), TK_OPTION_NULL_OK, (ClientData) DEF_ENTRY_DISABLED_BG_MONO, 0}, - {TK_OPTION_COLOR, "-disabledforeground", "disabledForeground", - "DisabledForeground", DEF_ENTRY_DISABLED_FG, TCL_INDEX_NONE, + {TK_OPTION_COLOR, "-disabledcolor", "disabledColor", + "DisabledColor", DEF_ENTRY_DISABLED_FG, TCL_INDEX_NONE, offsetof(Entry, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-disabledforeground", "disabledcolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-disabledcolor", 0}, +#endif {TK_OPTION_BOOLEAN, "-exportselection", "exportSelection", "ExportSelection", DEF_ENTRY_EXPORT_SELECTION, TCL_INDEX_NONE, offsetof(Entry, exportSelection), 0, 0, 0}, - {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-fg", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", DEF_ENTRY_FONT, TCL_INDEX_NONE, offsetof(Entry, tkfont), 0, 0, 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_ENTRY_FG, TCL_INDEX_NONE, offsetof(Entry, fgColorPtr), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_STRING, "-format", "format", "Format", DEF_SPINBOX_FORMAT, TCL_INDEX_NONE, offsetof(Spinbox, reqFormat), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_DOUBLE, "-from", "from", "From", DEF_SPINBOX_FROM, TCL_INDEX_NONE, offsetof(Spinbox, fromValue), 0, 0, 0}, @@ -258,20 +294,26 @@ {TK_OPTION_PIXELS, "-insertwidth", "insertWidth", "InsertWidth", DEF_ENTRY_INSERT_WIDTH, TCL_INDEX_NONE, offsetof(Entry, insertWidth), 0, 0, 0}, {TK_OPTION_STRING, "-invalidcommand", "invalidCommand", "InvalidCommand", DEF_ENTRY_INVALIDCMD, TCL_INDEX_NONE, offsetof(Entry, invalidCmd), TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-invcmd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-invalidcommand", 0}, +#endif {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_ENTRY_JUSTIFY, TCL_INDEX_NONE, offsetof(Entry, justify), 0, 0, 0}, {TK_OPTION_STRING, "-placeholder", "placeHolder", "PlaceHolder", DEF_ENTRY_PLACEHOLDER, TCL_INDEX_NONE, offsetof(Entry, placeholderString), TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_COLOR, "-placeholderforeground", "placeholderForeground", - "PlaceholderForeground", DEF_ENTRY_PLACEHOLDERFG, TCL_INDEX_NONE, - offsetof(Entry, placeholderColorPtr), 0, 0, 0}, + {TK_OPTION_COLOR, "-placeholdercolor", "placeholderColor", + "PlaceholderColor", DEF_ENTRY_PLACEHOLDERFG, TCL_INDEX_NONE, + offsetof(Entry, placeholderColorPtr), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-placeholderforeground", "placeholdercolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-placeholdercolor", 0}, +#endif {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_ENTRY_RELIEF, TCL_INDEX_NONE, offsetof(Entry, relief), 0, 0, 0}, {TK_OPTION_BORDER, "-readonlybackground", "readonlyBackground", "ReadonlyBackground", DEF_ENTRY_READONLY_BG_COLOR, TCL_INDEX_NONE, offsetof(Entry, readonlyBorder), TK_OPTION_NULL_OK, @@ -287,13 +329,17 @@ 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}, - {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", + {TK_OPTION_COLOR, "-selectcolor", "selectColor", "SelectColor", DEF_ENTRY_SELECT_FG_COLOR, TCL_INDEX_NONE, offsetof(Entry, selFgColorPtr), TK_OPTION_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-selectforeground", "selectcolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-selectcolor", 0}, +#endif {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), @@ -309,12 +355,14 @@ {TK_OPTION_STRING, "-validatecommand", "validateCommand","ValidateCommand", NULL, TCL_INDEX_NONE, offsetof(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-values", "values", "Values", DEF_SPINBOX_VALUES, TCL_INDEX_NONE, offsetof(Spinbox, valueStr), TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-vcmd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-validatecommand", 0}, +#endif {TK_OPTION_INT, "-width", "width", "Width", DEF_ENTRY_WIDTH, TCL_INDEX_NONE, offsetof(Entry, prefWidth), 0, 0, 0}, {TK_OPTION_BOOLEAN, "-wrap", "wrap", "Wrap", DEF_SPINBOX_WRAP, TCL_INDEX_NONE, offsetof(Spinbox, wrap), 0, 0, 0}, {TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand", @@ -3320,12 +3368,12 @@ * the entry widget, or a focus has trigerred validation. * * Results: * TCL_OK if the validatecommand passes the new string. TCL_BREAK if the - * vcmd executed OK, but rejects the string. TCL_ERROR if an error - * occurred while executing the vcmd or a valid Tcl_Bool is not returned. + * validatecommand executed OK, but rejects the string. TCL_ERROR if an error + * occurred while executing the validatecommand or a valid Tcl_Bool is not returned. * * Side effects: * An error condition may arise * *-------------------------------------------------------------- Index: generic/tkFrame.c ================================================================== --- generic/tkFrame.c +++ generic/tkFrame.c @@ -184,12 +184,14 @@ static const Tk_OptionSpec commonOptSpec[] = { {TK_OPTION_BORDER, "-background", "background", "Background", DEF_FRAME_BG_COLOR, TCL_INDEX_NONE, offsetof(Frame, border), TK_OPTION_NULL_OK, DEF_FRAME_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_STRING, "-colormap", "colormap", "Colormap", DEF_FRAME_COLORMAP, TCL_INDEX_NONE, offsetof(Frame, colormapName), TK_OPTION_NULL_OK, 0, 0}, /* * Having -container is useless in a labelframe since a container has @@ -230,14 +232,16 @@ static const Tk_OptionSpec frameOptSpec[] = { {TK_OPTION_STRING, "-backgroundimage", "backgroundImage", "BackgroundImage", DEF_FRAME_BG_IMAGE, offsetof(Frame, bgimgPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bgimg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-backgroundimage", 0}, +#endif {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_FRAME_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Frame, borderWidth), 0, 0, 0}, {TK_OPTION_STRING, "-class", "class", "Class", DEF_FRAME_CLASS, TCL_INDEX_NONE, offsetof(Frame, className), 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", @@ -250,14 +254,16 @@ static const Tk_OptionSpec toplevelOptSpec[] = { {TK_OPTION_STRING, "-backgroundimage", "backgroundImage", "BackgroundImage", DEF_FRAME_BG_IMAGE, offsetof(Frame, bgimgPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bgimg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-backgroundimage", 0}, +#endif {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_FRAME_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Frame, borderWidth), 0, 0, 0}, {TK_OPTION_STRING, "-class", "class", "Class", DEF_TOPLEVEL_CLASS, TCL_INDEX_NONE, offsetof(Frame, className), 0, 0, 0}, {TK_OPTION_STRING, "-menu", "menu", "Menu", @@ -283,16 +289,22 @@ {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_LABELFRAME_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Frame, borderWidth), 0, 0, 0}, {TK_OPTION_STRING, "-class", "class", "Class", DEF_LABELFRAME_CLASS, TCL_INDEX_NONE, offsetof(Frame, className), 0, 0, 0}, - {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_LABELFRAME_FG, TCL_INDEX_NONE, offsetof(Labelframe, textColorPtr), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-fg", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", DEF_LABELFRAME_FONT, TCL_INDEX_NONE, offsetof(Labelframe, tkfont), 0, 0, 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_LABELFRAME_FG, TCL_INDEX_NONE, offsetof(Labelframe, textColorPtr), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_STRING_TABLE, "-labelanchor", "labelAnchor", "LabelAnchor", DEF_LABELFRAME_LABELANCHOR, TCL_INDEX_NONE, offsetof(Labelframe, labelAnchor), 0, labelAnchorStrings, 0}, {TK_OPTION_WINDOW, "-labelwidget", "labelWidget", "LabelWidget", NULL, TCL_INDEX_NONE, offsetof(Labelframe, labelWin), TK_OPTION_NULL_OK, 0, 0}, @@ -826,11 +838,11 @@ continue; } c = arg[1]; if (((c == 'c') && (length >= 2) && (strncmp(arg, "-class", length) == 0)) - || ((c == 'c') && (length >= 3) + || ((c == 'c') && (length >= 7) && (strncmp(arg, "-colormap", length) == 0)) || ((c == 'c') && (length >= 3) && (strncmp(arg, "-container", length) == 0)) || ((c == 's') && (framePtr->type == TYPE_TOPLEVEL) && (strncmp(arg, "-screen", length) == 0)) Index: generic/tkImgBmap.c ================================================================== --- generic/tkImgBmap.c +++ generic/tkImgBmap.c @@ -105,18 +105,21 @@ /* * Information used for parsing configuration specs: */ static const Tk_ConfigSpec configSpecs[] = { - {TK_CONFIG_UID, "-background", NULL, NULL, + {TK_CONFIG_UID, "-background", "background", "Background", "", offsetof(BitmapModel, bgUid), 0, NULL}, + {TK_CONFIG_UID, "-color", "color", "Color", + "#000000", offsetof(BitmapModel, fgUid), 0, NULL}, {TK_CONFIG_STRING, "-data", NULL, NULL, NULL, offsetof(BitmapModel, dataString), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_STRING, "-file", NULL, NULL, NULL, offsetof(BitmapModel, fileString), TK_CONFIG_NULL_OK, NULL}, - {TK_CONFIG_UID, "-foreground", NULL, NULL, - "#000000", offsetof(BitmapModel, fgUid), 0, NULL}, +#ifndef TK_NO_DEPRECATED + {TK_CONFIG_SYNONYM, "-foreground", "color", NULL, NULL, 0, 0, NULL}, +#endif {TK_CONFIG_STRING, "-maskdata", NULL, NULL, NULL, offsetof(BitmapModel, maskDataString), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_STRING, "-maskfile", NULL, NULL, NULL, offsetof(BitmapModel, maskFileString), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL} Index: generic/tkListbox.c ================================================================== --- generic/tkListbox.c +++ generic/tkListbox.c @@ -240,80 +240,96 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-activestyle", "activeStyle", "ActiveStyle", DEF_LISTBOX_ACTIVE_STYLE, TCL_INDEX_NONE, offsetof(Listbox, activeStyle), 0, activeStyleStrings, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", - DEF_LISTBOX_BG_COLOR, TCL_INDEX_NONE, offsetof(Listbox, normalBorder), - 0, DEF_LISTBOX_BG_MONO, 0}, + DEF_LISTBOX_BG_COLOR, TCL_INDEX_NONE, offsetof(Listbox, normalBorder), + 0, DEF_LISTBOX_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, + NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, + NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_LISTBOX_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Listbox, borderWidth), - 0, 0, 0}, + DEF_LISTBOX_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(Listbox, borderWidth), + 0, 0, 0}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_LISTBOX_FG, TCL_INDEX_NONE, offsetof(Listbox, fgColorPtr), 0, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", - DEF_LISTBOX_CURSOR, TCL_INDEX_NONE, offsetof(Listbox, cursor), - TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_COLOR, "-disabledforeground", "disabledForeground", - "DisabledForeground", DEF_LISTBOX_DISABLED_FG, TCL_INDEX_NONE, - offsetof(Listbox, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0}, + DEF_LISTBOX_CURSOR, TCL_INDEX_NONE, offsetof(Listbox, cursor), + TK_OPTION_NULL_OK, 0, 0}, + {TK_OPTION_COLOR, "-disabledcolor", "disabledColor", + "DisabledColor", DEF_LISTBOX_DISABLED_FG, TCL_INDEX_NONE, + offsetof(Listbox, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-disabledforeground", "disabledcolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-disabledcolor", 0}, +#endif {TK_OPTION_BOOLEAN, "-exportselection", "exportSelection", - "ExportSelection", DEF_LISTBOX_EXPORT_SELECTION, TCL_INDEX_NONE, - offsetof(Listbox, exportSelection), 0, 0, 0}, - {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, + "ExportSelection", DEF_LISTBOX_EXPORT_SELECTION, TCL_INDEX_NONE, + offsetof(Listbox, exportSelection), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-fg", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", - DEF_LISTBOX_FONT, TCL_INDEX_NONE, offsetof(Listbox, tkfont), 0, 0, 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_LISTBOX_FG, TCL_INDEX_NONE, offsetof(Listbox, fgColorPtr), 0, 0, 0}, + DEF_LISTBOX_FONT, TCL_INDEX_NONE, offsetof(Listbox, tkfont), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_INT, "-height", "height", "Height", - DEF_LISTBOX_HEIGHT, TCL_INDEX_NONE, offsetof(Listbox, height), 0, 0, 0}, + DEF_LISTBOX_HEIGHT, TCL_INDEX_NONE, offsetof(Listbox, height), 0, 0, 0}, {TK_OPTION_COLOR, "-highlightbackground", "highlightBackground", - "HighlightBackground", DEF_LISTBOX_HIGHLIGHT_BG, TCL_INDEX_NONE, - offsetof(Listbox, highlightBgColorPtr), 0, 0, 0}, + "HighlightBackground", DEF_LISTBOX_HIGHLIGHT_BG, TCL_INDEX_NONE, + offsetof(Listbox, highlightBgColorPtr), 0, 0, 0}, {TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", - DEF_LISTBOX_HIGHLIGHT, TCL_INDEX_NONE, offsetof(Listbox, highlightColorPtr), - 0, 0, 0}, + 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, TCL_INDEX_NONE, + offsetof(Listbox, highlightWidth), 0, 0, 0}, {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_LISTBOX_JUSTIFY, TCL_INDEX_NONE, offsetof(Listbox, justify), 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", - DEF_LISTBOX_RELIEF, TCL_INDEX_NONE, offsetof(Listbox, relief), 0, 0, 0}, - {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground", - DEF_LISTBOX_SELECT_COLOR, TCL_INDEX_NONE, offsetof(Listbox, selBorder), - 0, DEF_LISTBOX_SELECT_MONO, 0}, + DEF_LISTBOX_RELIEF, TCL_INDEX_NONE, offsetof(Listbox, relief), 0, 0, 0}, + {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "SelectBackground", + 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, + "SelectBorderWidth", DEF_LISTBOX_SELECT_BD, TCL_INDEX_NONE, offsetof(Listbox, selBorderWidth), 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_COLOR, "-selectcolor", "selectColor", "SelectColor", + DEF_LISTBOX_SELECT_FG_COLOR, TCL_INDEX_NONE, offsetof(Listbox, selFgColorPtr), + TK_OPTION_NULL_OK, DEF_LISTBOX_SELECT_FG_MONO, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-selectforeground", "selectcolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-selectcolor", 0}, +#endif {TK_OPTION_STRING, "-selectmode", "selectMode", "SelectMode", - DEF_LISTBOX_SELECT_MODE, TCL_INDEX_NONE, offsetof(Listbox, selectMode), - TK_OPTION_NULL_OK, 0, 0}, + DEF_LISTBOX_SELECT_MODE, TCL_INDEX_NONE, offsetof(Listbox, selectMode), + 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}, + DEF_LISTBOX_SET_GRID, TCL_INDEX_NONE, offsetof(Listbox, setGrid), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_LISTBOX_STATE, TCL_INDEX_NONE, offsetof(Listbox, state), 0, stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", - DEF_LISTBOX_TAKE_FOCUS, TCL_INDEX_NONE, offsetof(Listbox, takeFocus), - TK_OPTION_NULL_OK, 0, 0}, + DEF_LISTBOX_TAKE_FOCUS, TCL_INDEX_NONE, offsetof(Listbox, takeFocus), + 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), - TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand", - DEF_LISTBOX_SCROLL_COMMAND, TCL_INDEX_NONE, offsetof(Listbox, yScrollCmd), - TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_STRING, "-listvariable", "listVariable", "Variable", - DEF_LISTBOX_LIST_VARIABLE, TCL_INDEX_NONE, offsetof(Listbox, listVarName), - TK_OPTION_NULL_OK, 0, 0}, + DEF_LISTBOX_WIDTH, TCL_INDEX_NONE, offsetof(Listbox, width), 0, 0, 0}, + {TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "XScrollCommand", + DEF_LISTBOX_SCROLL_COMMAND, TCL_INDEX_NONE, offsetof(Listbox, xScrollCmd), + TK_OPTION_NULL_OK, 0, 0}, + {TK_OPTION_STRING, "-yscrollcommand", "yScrollCommand", "YScrollCommand", + DEF_LISTBOX_SCROLL_COMMAND, TCL_INDEX_NONE, offsetof(Listbox, yScrollCmd), + TK_OPTION_NULL_OK, 0, 0}, + {TK_OPTION_STRING, "-listvariable", "listVariable", "ListVariable", + DEF_LISTBOX_LIST_VARIABLE, TCL_INDEX_NONE, offsetof(Listbox, listVarName), + TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, 0, 0} }; /* * The itemAttrOptionSpecs table defines the valid configuration options for @@ -320,28 +336,40 @@ * listbox items. */ static const Tk_OptionSpec itemAttrOptionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", - NULL, TCL_INDEX_NONE, offsetof(ItemAttr, border), - TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, - DEF_LISTBOX_BG_MONO, 0}, + NULL, TCL_INDEX_NONE, offsetof(ItemAttr, border), + TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, + DEF_LISTBOX_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, - {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - NULL, TCL_INDEX_NONE, offsetof(ItemAttr, fgColor), - TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0}, - {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground", - NULL, TCL_INDEX_NONE, offsetof(ItemAttr, selBorder), - TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, - DEF_LISTBOX_SELECT_MONO, 0}, - {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", - NULL, TCL_INDEX_NONE, offsetof(ItemAttr, selFgColor), - TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, - DEF_LISTBOX_SELECT_FG_MONO, 0}, + NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif + {TK_OPTION_COLOR, "-color", "color", "Color", + NULL, TCL_INDEX_NONE, offsetof(ItemAttr, fgColor), + TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-fg", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif + {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "SelectBackground", + NULL, TCL_INDEX_NONE, offsetof(ItemAttr, selBorder), + TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, + DEF_LISTBOX_SELECT_MONO, 0}, + {TK_OPTION_COLOR, "-selectcolor", "selectColor", "SelectColor", + NULL, TCL_INDEX_NONE, offsetof(ItemAttr, selFgColor), + TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, + DEF_LISTBOX_SELECT_FG_MONO, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-selectfg", "selectcolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-selectcolor", 0}, + {TK_OPTION_SYNONYM, "-selectforeground", "selectcolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-selectcolor", 0}, +#endif {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, 0, 0} }; /* * The following tables define the listbox widget commands (and sub-commands) Index: generic/tkMenu.c ================================================================== --- generic/tkMenu.c +++ generic/tkMenu.c @@ -115,20 +115,24 @@ static const char *const compoundStrings[] = { "bottom", "center", "left", "none", "right", "top", NULL }; static const Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { - {TK_OPTION_BORDER, "-activebackground", NULL, NULL, - DEF_MENU_ENTRY_ACTIVE_BG, offsetof(TkMenuEntry, activeBorderPtr), TCL_INDEX_NONE, - TK_OPTION_NULL_OK, NULL, 0}, - {TK_OPTION_COLOR, "-activeforeground", NULL, NULL, - DEF_MENU_ENTRY_ACTIVE_FG, - offsetof(TkMenuEntry, activeFgPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_STRING, "-accelerator", NULL, NULL, DEF_MENU_ENTRY_ACCELERATOR, offsetof(TkMenuEntry, accelPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL, 0}, - {TK_OPTION_BORDER, "-background", NULL, NULL, + {TK_OPTION_BORDER, "-activebackground", "activeBackground", "ActiveBackground", + DEF_MENU_ENTRY_ACTIVE_BG, offsetof(TkMenuEntry, activeBorderPtr), TCL_INDEX_NONE, + TK_OPTION_NULL_OK, NULL, 0}, + {TK_OPTION_COLOR, "-activecolor", "activeColor", "ActiveColor", + DEF_MENU_ENTRY_ACTIVE_FG, + offsetof(TkMenuEntry, activeFgPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-activeforeground", NULL , NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-activecolor", 0}, +#endif + {TK_OPTION_BORDER, "-background", "background", "Background", DEF_MENU_ENTRY_BG, offsetof(TkMenuEntry, borderPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_BITMAP, "-bitmap", NULL, NULL, DEF_MENU_ENTRY_BITMAP, offsetof(TkMenuEntry, bitmapPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL, 0}, @@ -142,13 +146,17 @@ DEF_MENU_ENTRY_COMPOUND, TCL_INDEX_NONE, offsetof(TkMenuEntry, compound), 0, (ClientData) compoundStrings, 0}, {TK_OPTION_FONT, "-font", NULL, NULL, DEF_MENU_ENTRY_FONT, offsetof(TkMenuEntry, fontPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL, 0}, - {TK_OPTION_COLOR, "-foreground", NULL, NULL, + {TK_OPTION_COLOR, "-color", "color", "Color", DEF_MENU_ENTRY_FG, offsetof(TkMenuEntry, fgPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color" , NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_BOOLEAN, "-hidemargin", NULL, NULL, DEF_MENU_ENTRY_HIDE_MARGIN, TCL_INDEX_NONE, offsetof(TkMenuEntry, hideMargin), 0, NULL, 0}, {TK_OPTION_STRING, "-image", NULL, NULL, DEF_MENU_ENTRY_IMAGE, @@ -247,46 +255,60 @@ "normal", "tearoff", "menubar", NULL }; static const Tk_OptionSpec tkMenuConfigSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", - "Foreground", DEF_MENU_ACTIVE_BG_COLOR, + "ActiveBackground", DEF_MENU_ACTIVE_BG_COLOR, offsetof(TkMenu, activeBorderPtr), TCL_INDEX_NONE, 0, (ClientData) DEF_MENU_ACTIVE_BG_MONO, 0}, {TK_OPTION_PIXELS, "-activeborderwidth", "activeBorderWidth", - "BorderWidth", DEF_MENU_ACTIVE_BORDER_WIDTH, + "ActiveBorderWidth", DEF_MENU_ACTIVE_BORDER_WIDTH, offsetof(TkMenu, activeBorderWidthPtr), TCL_INDEX_NONE, 0, NULL, 0}, - {TK_OPTION_COLOR, "-activeforeground", "activeForeground", - "Background", DEF_MENU_ACTIVE_FG_COLOR, + {TK_OPTION_COLOR, "-activecolor", "activeColor", + "ActiveColor", DEF_MENU_ACTIVE_FG_COLOR, offsetof(TkMenu, activeFgPtr), TCL_INDEX_NONE, 0, (ClientData) DEF_MENU_ACTIVE_FG_MONO, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-activeforeground", NULL , NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-activecolor", 0}, +#endif {TK_OPTION_RELIEF, "-activerelief", "activeRelief", "Relief", DEF_MENU_ACTIVE_RELIEF, offsetof(TkMenu, activeReliefPtr), TCL_INDEX_NONE, 0, NULL, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_MENU_BG_COLOR, offsetof(TkMenu, borderPtr), TCL_INDEX_NONE, 0, (ClientData) DEF_MENU_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_MENU_BORDER_WIDTH, offsetof(TkMenu, borderWidthPtr), TCL_INDEX_NONE, 0, NULL, 0}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_MENU_FG, offsetof(TkMenu, fgPtr), 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}, - {TK_OPTION_COLOR, "-disabledforeground", "disabledForeground", - "DisabledForeground", DEF_MENU_DISABLED_FG_COLOR, + {TK_OPTION_COLOR, "-disabledcolor", "disabledColor", + "DisabledColor", DEF_MENU_DISABLED_FG_COLOR, offsetof(TkMenu, disabledFgPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, (ClientData) DEF_MENU_DISABLED_FG_MONO, 0}, - {TK_OPTION_SYNONYM, "-fg", NULL, NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-disabledforeground", NULL , NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-disabledcolor", 0}, + {TK_OPTION_SYNONYM, "-fg", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", DEF_MENU_FONT, offsetof(TkMenu, fontPtr), TCL_INDEX_NONE, 0, NULL, 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_MENU_FG, offsetof(TkMenu, fgPtr), TCL_INDEX_NONE, 0, NULL, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color" , NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_STRING, "-postcommand", "postCommand", "Command", DEF_MENU_POST_COMMAND, offsetof(TkMenu, postCommandPtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_MENU_RELIEF, offsetof(TkMenu, reliefPtr), TCL_INDEX_NONE, 0, NULL, 0}, Index: generic/tkMenubutton.c ================================================================== --- generic/tkMenubutton.c +++ generic/tkMenubutton.c @@ -56,50 +56,64 @@ /* * Information used for parsing configuration specs: */ static const Tk_OptionSpec optionSpecs[] = { - {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", + {TK_OPTION_BORDER, "-activebackground", "activeBackground", "ActiveBackground", DEF_MENUBUTTON_ACTIVE_BG_COLOR, TCL_INDEX_NONE, offsetof(TkMenuButton, activeBorder), 0, (ClientData) DEF_MENUBUTTON_ACTIVE_BG_MONO, 0}, - {TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background", + {TK_OPTION_COLOR, "-activecolor", "activeColor", "ActiveColor", DEF_MENUBUTTON_ACTIVE_FG_COLOR, TCL_INDEX_NONE, offsetof(TkMenuButton, activeFg), 0, DEF_MENUBUTTON_ACTIVE_FG_MONO, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-activeforeground", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, + (ClientData) "-activecolor", 0}, +#endif {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MENUBUTTON_ANCHOR, TCL_INDEX_NONE, offsetof(TkMenuButton, anchor), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_MENUBUTTON_BG_COLOR, TCL_INDEX_NONE, offsetof(TkMenuButton, normalBorder), 0, DEF_MENUBUTTON_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, (ClientData) "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, (ClientData) "-background", 0}, +#endif {TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", 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}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_MENUBUTTON_FG, TCL_INDEX_NONE, offsetof(TkMenuButton, normalFg), 0, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_MENUBUTTON_CURSOR, TCL_INDEX_NONE, offsetof(TkMenuButton, cursor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-direction", "direction", "Direction", DEF_MENUBUTTON_DIRECTION, TCL_INDEX_NONE, offsetof(TkMenuButton, direction), 0, directionStrings, 0}, - {TK_OPTION_COLOR, "-disabledforeground", "disabledForeground", - "DisabledForeground", DEF_MENUBUTTON_DISABLED_FG_COLOR, + {TK_OPTION_COLOR, "-disabledcolor", "disabledColor", + "DisabledColor", DEF_MENUBUTTON_DISABLED_FG_COLOR, TCL_INDEX_NONE, offsetof(TkMenuButton, disabledFg), TK_OPTION_NULL_OK, (ClientData) DEF_MENUBUTTON_DISABLED_FG_MONO, 0}, - {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, NULL, 0, TCL_INDEX_NONE, 0, - (ClientData) "-foreground", 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-disabledforeground", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, + (ClientData) "-disabledcolor", 0}, + {TK_OPTION_SYNONYM, "-fg", "color", NULL, NULL, 0, TCL_INDEX_NONE, 0, + (ClientData) "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", DEF_MENUBUTTON_FONT, TCL_INDEX_NONE, offsetof(TkMenuButton, tkfont), 0, 0, 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_MENUBUTTON_FG, TCL_INDEX_NONE, offsetof(TkMenuButton, normalFg), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, NULL, 0, TCL_INDEX_NONE, 0, + (ClientData) "-color", 0}, +#endif {TK_OPTION_STRING, "-height", "height", "Height", DEF_MENUBUTTON_HEIGHT, TCL_INDEX_NONE, offsetof(TkMenuButton, heightString), 0, 0, 0}, {TK_OPTION_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_MENUBUTTON_HIGHLIGHT_BG_COLOR, @@ -119,14 +133,14 @@ {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_MENUBUTTON_JUSTIFY, TCL_INDEX_NONE, offsetof(TkMenuButton, justify), 0, 0, 0}, {TK_OPTION_STRING, "-menu", "menu", "Menu", DEF_MENUBUTTON_MENU, TCL_INDEX_NONE, offsetof(TkMenuButton, menuName), TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_PIXELS, "-padx", "padX", "Pad", + {TK_OPTION_PIXELS, "-padx", "padX", "PadX", DEF_MENUBUTTON_PADX, TCL_INDEX_NONE, offsetof(TkMenuButton, padX), 0, 0, 0}, - {TK_OPTION_PIXELS, "-pady", "padY", "Pad", + {TK_OPTION_PIXELS, "-pady", "padY", "PadY", DEF_MENUBUTTON_PADY, TCL_INDEX_NONE, offsetof(TkMenuButton, padY), 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_MENUBUTTON_RELIEF, TCL_INDEX_NONE, offsetof(TkMenuButton, relief), 0, 0, 0}, @@ -139,11 +153,11 @@ {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_MENUBUTTON_TAKE_FOCUS, TCL_INDEX_NONE, offsetof(TkMenuButton, takeFocus), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-text", "text", "Text", DEF_MENUBUTTON_TEXT, TCL_INDEX_NONE, offsetof(TkMenuButton, text), 0, 0, 0}, - {TK_OPTION_STRING, "-textvariable", "textVariable", "Variable", + {TK_OPTION_STRING, "-textvariable", "textVariable", "TextVariable", DEF_MENUBUTTON_TEXT_VARIABLE, TCL_INDEX_NONE, offsetof(TkMenuButton, textVarName), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_INT, "-underline", "underline", "Underline", DEF_MENUBUTTON_UNDERLINE, TCL_INDEX_NONE, offsetof(TkMenuButton, underline), 0, 0, 0}, Index: generic/tkMessage.c ================================================================== --- generic/tkMessage.c +++ generic/tkMessage.c @@ -107,49 +107,57 @@ * Information used for argv parsing. */ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MESSAGE_ANCHOR, - TCL_INDEX_NONE, offsetof(Message, anchor), 0, 0, 0}, + TCL_INDEX_NONE, offsetof(Message, anchor), 0, 0, 0}, {TK_OPTION_INT, "-aspect", "aspect", "Aspect", DEF_MESSAGE_ASPECT, - TCL_INDEX_NONE, offsetof(Message, aspect), 0, 0, 0}, + TCL_INDEX_NONE, offsetof(Message, aspect), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", - DEF_MESSAGE_BG_COLOR, TCL_INDEX_NONE, offsetof(Message, border), 0, - DEF_MESSAGE_BG_MONO, 0}, + DEF_MESSAGE_BG_COLOR, TCL_INDEX_NONE, offsetof(Message, border), 0, + DEF_MESSAGE_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, - 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, + 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, - 0, TCL_INDEX_NONE, 0, "-background", 0}, + 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_MESSAGE_BORDER_WIDTH, TCL_INDEX_NONE, - offsetof(Message, borderWidth), 0, 0, 0}, + DEF_MESSAGE_BORDER_WIDTH, TCL_INDEX_NONE, + offsetof(Message, borderWidth), 0, 0, 0}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_MESSAGE_FG, TCL_INDEX_NONE, offsetof(Message, fgColorPtr), 0, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", - DEF_MESSAGE_CURSOR, TCL_INDEX_NONE, offsetof(Message, cursor), - TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL, - 0, TCL_INDEX_NONE, 0, "-foreground", 0}, + DEF_MESSAGE_CURSOR, TCL_INDEX_NONE, offsetof(Message, cursor), + TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-fg", "color", NULL, NULL, + 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", DEF_MESSAGE_FONT, TCL_INDEX_NONE, offsetof(Message, tkfont), 0, 0, 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_MESSAGE_FG, TCL_INDEX_NONE, offsetof(Message, fgColorPtr), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color" , NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_COLOR, "-highlightbackground", "highlightBackground", - "HighlightBackground", DEF_MESSAGE_HIGHLIGHT_BG, TCL_INDEX_NONE, - offsetof(Message, highlightBgColorPtr), 0, 0, 0}, + "HighlightBackground", DEF_MESSAGE_HIGHLIGHT_BG, TCL_INDEX_NONE, + offsetof(Message, highlightBgColorPtr), 0, 0, 0}, {TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", - DEF_MESSAGE_HIGHLIGHT, TCL_INDEX_NONE, offsetof(Message, highlightColorPtr), - 0, 0, 0}, + DEF_MESSAGE_HIGHLIGHT, TCL_INDEX_NONE, offsetof(Message, highlightColorPtr), + 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", DEF_MESSAGE_HIGHLIGHT_WIDTH, TCL_INDEX_NONE, offsetof(Message, highlightWidth), 0, 0, 0}, {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_MESSAGE_JUSTIFY, TCL_INDEX_NONE, offsetof(Message, justify), 0, 0, 0}, {TK_OPTION_PIXELS, "-padx", "padX", "Pad", - DEF_MESSAGE_PADX, offsetof(Message, padXPtr), - offsetof(Message, padX), 0, 0, 0}, + DEF_MESSAGE_PADX, offsetof(Message, padXPtr), + offsetof(Message, padX), 0, 0, 0}, {TK_OPTION_PIXELS, "-pady", "padY", "Pad", - DEF_MESSAGE_PADY, offsetof(Message, padYPtr), - offsetof(Message, padY), 0, 0, 0}, + DEF_MESSAGE_PADY, offsetof(Message, padYPtr), + offsetof(Message, padY), 0, 0, 0}, {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), TK_OPTION_NULL_OK, 0, 0}, Index: generic/tkOption.c ================================================================== --- generic/tkOption.c +++ generic/tkOption.c @@ -437,11 +437,11 @@ * won't get that option. * * To work around this, the option name field syntax was extended to allow * for a "." in the name; if this character occurs in the name, then it * indicates that this name contains a new window class and an option - * name, ie, "Button.foreground". If we see this form in the name field, + * name, ie, "Button.color". If we see this form in the name field, * we query the option database directly (since the option stacks will not * have the information we need). */ masqName = strchr(name, (int)'.'); Index: generic/tkPanedWindow.c ================================================================== --- generic/tkPanedWindow.c +++ generic/tkPanedWindow.c @@ -275,14 +275,16 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", DEF_PANEDWINDOW_BG_COLOR, TCL_INDEX_NONE, offsetof(PanedWindow, background), 0, DEF_PANEDWINDOW_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_PANEDWINDOW_BORDERWIDTH, TCL_INDEX_NONE, offsetof(PanedWindow, borderWidth), 0, 0, GEOMETRY}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_PANEDWINDOW_CURSOR, TCL_INDEX_NONE, offsetof(PanedWindow, cursor), Index: generic/tkScale.c ================================================================== --- generic/tkScale.c +++ generic/tkScale.c @@ -51,33 +51,41 @@ DEF_SCALE_BG_COLOR, TCL_INDEX_NONE, offsetof(TkScale, bgBorder), 0, DEF_SCALE_BG_MONO, 0}, {TK_OPTION_DOUBLE, "-bigincrement", "bigIncrement", "BigIncrement", DEF_SCALE_BIG_INCREMENT, TCL_INDEX_NONE, offsetof(TkScale, bigIncrement), 0, 0, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_SCALE_BORDER_WIDTH, TCL_INDEX_NONE, offsetof(TkScale, borderWidth), 0, 0, 0}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_SCALE_FG_COLOR, TCL_INDEX_NONE, offsetof(TkScale, textColorPtr), 0, + (ClientData) DEF_SCALE_FG_MONO, 0}, {TK_OPTION_STRING, "-command", "command", "Command", DEF_SCALE_COMMAND, TCL_INDEX_NONE, offsetof(TkScale, command), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_SCALE_CURSOR, TCL_INDEX_NONE, offsetof(TkScale, cursor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_INT, "-digits", "digits", "Digits", DEF_SCALE_DIGITS, TCL_INDEX_NONE, offsetof(TkScale, digits), 0, 0, 0}, - {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-fg", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", DEF_SCALE_FONT, TCL_INDEX_NONE, offsetof(TkScale, tkfont), 0, 0, 0}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_SCALE_FG_COLOR, TCL_INDEX_NONE, offsetof(TkScale, textColorPtr), 0, - (ClientData) DEF_SCALE_FG_MONO, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color" , NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_DOUBLE, "-from", "from", "From", DEF_SCALE_FROM, TCL_INDEX_NONE, offsetof(TkScale, fromValue), 0, 0, 0}, {TK_OPTION_BORDER, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_SCALE_HIGHLIGHT_BG_COLOR, TCL_INDEX_NONE, offsetof(TkScale, highlightBorder), Index: generic/tkScrollbar.c ================================================================== --- generic/tkScrollbar.c +++ generic/tkScrollbar.c @@ -44,12 +44,14 @@ DEF_SCROLLBAR_BG_COLOR, offsetof(TkScrollbar, bgBorder), TK_CONFIG_COLOR_ONLY, NULL}, {TK_CONFIG_BORDER, "-background", "background", "Background", DEF_SCROLLBAR_BG_MONO, offsetof(TkScrollbar, bgBorder), TK_CONFIG_MONO_ONLY, NULL}, +#ifndef TK_NO_DEPRECATED {TK_CONFIG_SYNONYM, "-bd", "borderWidth", NULL, NULL, 0, 0, NULL}, {TK_CONFIG_SYNONYM, "-bg", "background", NULL, NULL, 0, 0, NULL}, +#endif {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_SCROLLBAR_BORDER_WIDTH, offsetof(TkScrollbar, borderWidth), 0, NULL}, {TK_CONFIG_STRING, "-command", "command", "Command", DEF_SCROLLBAR_COMMAND, offsetof(TkScrollbar, command), TK_CONFIG_NULL_OK, NULL}, Index: generic/tkSquare.c ================================================================== --- generic/tkSquare.c +++ generic/tkSquare.c @@ -66,23 +66,29 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", "#d9d9d9", offsetof(Square, bgBorderPtr), TCL_INDEX_NONE, 0, "white", 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", "2", offsetof(Square, borderWidthPtr), TCL_INDEX_NONE, 0, NULL, 0}, + {TK_OPTION_BORDER, "-color", "color", "Color", + "#b03060", offsetof(Square, fgBorderPtr), TCL_INDEX_NONE, 0, + "black", 0}, {TK_OPTION_BOOLEAN, "-dbl", "doubleBuffer", "DoubleBuffer", "1", offsetof(Square, doubleBufferPtr), TCL_INDEX_NONE, 0 , NULL, 0}, - {TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, - "-foreground", 0}, - {TK_OPTION_BORDER, "-foreground", "foreground", "Foreground", - "#b03060", offsetof(Square, fgBorderPtr), TCL_INDEX_NONE, 0, - "black", 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-fg", "color", NULL, NULL, 0, TCL_INDEX_NONE, 0, + "-color", 0}, + {TK_OPTION_SYNONYM, "-foreground", "color" , NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_PIXELS, "-posx", "posx", "PosX", "0", offsetof(Square, xPtr), TCL_INDEX_NONE, 0, NULL, 0}, {TK_OPTION_PIXELS, "-posy", "posy", "PosY", "0", offsetof(Square, yPtr), TCL_INDEX_NONE, 0, NULL, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", Index: generic/tkText.c ================================================================== --- generic/tkText.c +++ generic/tkText.c @@ -125,38 +125,46 @@ offsetof(TkText, autoSeparators), TK_OPTION_DONT_SET_DEFAULT, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_TEXT_BG_COLOR, TCL_INDEX_NONE, offsetof(TkText, border), 0, DEF_TEXT_BG_MONO, 0}, +#ifndef TK_NO_DEPRECATED {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-borderwidth", TK_TEXT_LINE_GEOMETRY}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, "-background", 0}, +#endif {TK_OPTION_BOOLEAN, "-blockcursor", "blockCursor", "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), 0, 0, TK_TEXT_LINE_GEOMETRY}, + {TK_OPTION_COLOR, "-color", "color", "Color", + DEF_TEXT_FG, TCL_INDEX_NONE, offsetof(TkText, fgColor), 0, + 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_TEXT_CURSOR, TCL_INDEX_NONE, offsetof(TkText, cursor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_CUSTOM, "-endline", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkText, end), TK_OPTION_NULL_OK, &lineOption, TK_TEXT_LINE_RANGE}, {TK_OPTION_BOOLEAN, "-exportselection", "exportSelection", "ExportSelection", DEF_TEXT_EXPORT_SELECTION, TCL_INDEX_NONE, offsetof(TkText, exportSelection), 0, 0, 0}, - {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, TCL_INDEX_NONE, 0, "-foreground", 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-fg", "color" , NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", DEF_TEXT_FONT, TCL_INDEX_NONE, offsetof(TkText, tkfont), 0, 0, TK_TEXT_LINE_GEOMETRY}, - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_TEXT_FG, TCL_INDEX_NONE, offsetof(TkText, fgColor), 0, - 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color" , NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_PIXELS, "-height", "height", "Height", DEF_TEXT_HEIGHT, TCL_INDEX_NONE, offsetof(TkText, height), 0, 0, 0}, {TK_OPTION_COLOR, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_TEXT_HIGHLIGHT_BG, TCL_INDEX_NONE, offsetof(TkText, highlightBgColorPtr), @@ -201,21 +209,25 @@ TK_TEXT_LINE_GEOMETRY}, {TK_OPTION_PIXELS, "-pady", "padY", "Pad", DEF_TEXT_PADY, TCL_INDEX_NONE, offsetof(TkText, padY), 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", + {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "SelectBackground", DEF_TEXT_SELECT_COLOR, TCL_INDEX_NONE, offsetof(TkText, selBorder), 0, DEF_TEXT_SELECT_MONO, 0}, {TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth", - "BorderWidth", DEF_TEXT_SELECT_BD_COLOR, + "SelectBorderWidth", DEF_TEXT_SELECT_BD_COLOR, offsetof(TkText, selBorderWidthPtr), offsetof(TkText, selBorderWidth), TK_OPTION_NULL_OK, DEF_TEXT_SELECT_BD_MONO, 0}, - {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", + {TK_OPTION_COLOR, "-selectcolor", "selectColor", "SelectColor", DEF_TEXT_SELECT_FG_COLOR, TCL_INDEX_NONE, offsetof(TkText, selFgColorPtr), TK_OPTION_NULL_OK, DEF_TEXT_SELECT_FG_MONO, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-selectforeground", NULL , NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-selectcolor", 0}, +#endif {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 }, Index: generic/tkTextTag.c ================================================================== --- generic/tkTextTag.c +++ generic/tkTextTag.c @@ -39,24 +39,34 @@ }; static const Tk_OptionSpec tagOptionSpecs[] = { {TK_OPTION_BORDER, "-background", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, border), TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_BITMAP, "-bgstipple", NULL, NULL, + {TK_OPTION_BITMAP, "-backgroundstipple", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, bgStipple), TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-bgstipple", NULL, NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-backgroundstipple", 0}, +#endif {TK_OPTION_PIXELS, "-borderwidth", NULL, NULL, NULL, offsetof(TkTextTag, borderWidthPtr), offsetof(TkTextTag, borderWidth), TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0}, + {TK_OPTION_COLOR, "-color", NULL, NULL, + NULL, TCL_INDEX_NONE, offsetof(TkTextTag, fgColor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-elide", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, elideString), TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0}, - {TK_OPTION_BITMAP, "-fgstipple", NULL, NULL, - NULL, TCL_INDEX_NONE, offsetof(TkTextTag, fgStipple), TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-fgstipple", NULL, NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-stipple", 0}, +#endif {TK_OPTION_FONT, "-font", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, tkfont), TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_COLOR, "-foreground", NULL, NULL, - NULL, TCL_INDEX_NONE, offsetof(TkTextTag, fgColor), TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_STRING, "-justify", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, justifyString), TK_OPTION_NULL_OK, 0,0}, {TK_OPTION_STRING, "-lmargin1", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, lMargin1String), TK_OPTION_NULL_OK,0,0}, {TK_OPTION_STRING, "-lmargin2", NULL, NULL, @@ -66,40 +76,54 @@ {TK_OPTION_STRING, "-offset", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, offsetString), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-overstrike", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, overstrikeString), TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_COLOR, "-overstrikefg", NULL, NULL, + {TK_OPTION_COLOR, "-overstrikecolor", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, overstrikeColor), - TK_OPTION_NULL_OK, 0, 0}, + TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-overstrikefg", "overstrikecolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-overstrikecolor", 0}, +#endif {TK_OPTION_STRING, "-relief", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, reliefString), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-rmargin", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, rMarginString), 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, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, selBorder), TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_COLOR, "-selectforeground", NULL, NULL, + {TK_OPTION_COLOR, "-selectcolor", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, selFgColor), TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-selectforeground", NULL, NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-selectcolor", 0}, +#endif {TK_OPTION_STRING, "-spacing1", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, spacing1String), TK_OPTION_NULL_OK,0,0}, {TK_OPTION_STRING, "-spacing2", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, spacing2String), TK_OPTION_NULL_OK,0,0}, {TK_OPTION_STRING, "-spacing3", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, spacing3String), TK_OPTION_NULL_OK,0,0}, + {TK_OPTION_BITMAP, "-stipple", NULL, NULL, + NULL, TCL_INDEX_NONE, offsetof(TkTextTag, fgStipple), 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, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, tabStyle), TK_OPTION_NULL_OK, tabStyleStrings, 0}, {TK_OPTION_STRING, "-underline", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, underlineString), TK_OPTION_NULL_OK, 0, 0}, - {TK_OPTION_COLOR, "-underlinefg", NULL, NULL, + {TK_OPTION_COLOR, "-underlinecolor", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, underlineColor), - TK_OPTION_NULL_OK, 0, 0}, + TK_OPTION_NULL_OK, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-underlinefg", "underlinecolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-underlinecolor", 0}, +#endif {TK_OPTION_STRING_TABLE, "-wrap", NULL, NULL, NULL, TCL_INDEX_NONE, offsetof(TkTextTag, wrapMode), TK_OPTION_NULL_OK, wrapStrings, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0} }; Index: generic/ttk/ttkButton.c ================================================================== --- generic/ttk/ttkButton.c +++ generic/ttk/ttkButton.c @@ -244,13 +244,17 @@ static const Tk_OptionSpec LabelOptionSpecs[] = { {TK_OPTION_BORDER, "-background", "frameColor", "FrameColor", NULL, offsetof(Label,label.backgroundObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0 }, - {TK_OPTION_COLOR, "-foreground", "textColor", "TextColor", + {TK_OPTION_COLOR, "-color", "color", "Color", NULL, offsetof(Label,label.foregroundObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0 }, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", NULL, offsetof(Label,label.fontObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED }, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", NULL, offsetof(Label,label.borderWidthObj), TCL_INDEX_NONE, Index: generic/ttk/ttkClamTheme.c ================================================================== --- generic/ttk/ttkClamTheme.c +++ generic/ttk/ttkClamTheme.c @@ -297,11 +297,11 @@ offsetof(IndicatorElement,sizeObj), "10" }, { "-indicatormargin", TK_OPTION_STRING, offsetof(IndicatorElement,marginObj), "1" }, { "-indicatorbackground", TK_OPTION_COLOR, offsetof(IndicatorElement,backgroundObj), "white" }, - { "-indicatorforeground", TK_OPTION_COLOR, + { "-indicatorcolor", TK_OPTION_COLOR, offsetof(IndicatorElement,foregroundObj), "black" }, { "-upperbordercolor", TK_OPTION_COLOR, offsetof(IndicatorElement,upperColorObj), DARKEST_COLOR }, { "-lowerbordercolor", TK_OPTION_COLOR, offsetof(IndicatorElement,lowerColorObj), DARK_COLOR }, Index: generic/ttk/ttkDefaultTheme.c ================================================================== --- generic/ttk/ttkDefaultTheme.c +++ generic/ttk/ttkDefaultTheme.c @@ -400,12 +400,12 @@ "B c #000080800000 s highlight", "C c #808080800000 s 3dlight", "D c #000000008080 s window", "E c #808000008080 s 3ddark", "F c #000080808080 s frame", - "G c #000000000000 s foreground", - "H c #000080800000 s disabledfg", + "G c #000000000000 s color", + "H c #000080800000 s disabledcolor", }; #endif static const Ttk_StateTable checkbutton_states[] = { { 0, 0, TTK_STATE_SELECTED|TTK_STATE_DISABLED }, @@ -478,11 +478,11 @@ } IndicatorElement; static const Ttk_ElementOptionSpec IndicatorElementOptions[] = { { "-background", TK_OPTION_COLOR, offsetof(IndicatorElement,backgroundObj), DEFAULT_BACKGROUND }, - { "-foreground", TK_OPTION_COLOR, + { "-color", TK_OPTION_COLOR, offsetof(IndicatorElement,foregroundObj), DEFAULT_FOREGROUND }, { "-indicatorcolor", TK_OPTION_COLOR, offsetof(IndicatorElement,colorObj), "#FFFFFF" }, { "-lightcolor", TK_OPTION_COLOR, offsetof(IndicatorElement,lightColorObj), "#DDDDDD" }, @@ -1101,11 +1101,11 @@ Tcl_Obj *marginObj; Tcl_Obj *diameterObj; } TreeitemIndicator; static const Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = { - { "-foreground", TK_OPTION_COLOR, + { "-color", TK_OPTION_COLOR, offsetof(TreeitemIndicator,colorObj), DEFAULT_FOREGROUND }, { "-diameter", TK_OPTION_PIXELS, offsetof(TreeitemIndicator,diameterObj), "9" }, { "-indicatormargins", TK_OPTION_STRING, offsetof(TreeitemIndicator,marginObj), "2 2 4 2" }, Index: generic/ttk/ttkEntry.c ================================================================== --- generic/ttk/ttkEntry.c +++ generic/ttk/ttkEntry.c @@ -195,18 +195,25 @@ /* EntryStyleData options: */ {TK_OPTION_COLOR, "-background", "windowColor", "WindowColor", NULL, offsetof(Entry, entry.styleData.backgroundObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0}, - {TK_OPTION_COLOR, "-foreground", "textColor", "TextColor", + {TK_OPTION_COLOR, "-color", "color", "Color", NULL, offsetof(Entry, entry.styleData.foregroundObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0}, - {TK_OPTION_COLOR, "-placeholderforeground", "placeholderForeground", - "PlaceholderForeground", NULL, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif + {TK_OPTION_COLOR, "-placeholdercolor", "placeholderColor", + "PlaceholderColor", NULL, offsetof(Entry, entry.styleData.placeholderForegroundObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0}, - +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-placeholderforeground", "placeholdercolor", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-placeholdercolor", 0}, +#endif WIDGET_TAKEFOCUS_TRUE, WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs) }; /*------------------------------------------------------------------------ @@ -260,15 +267,15 @@ *es = entryPtr->entry.styleDefaults; # define INIT(member, name) \ if ((tmp=Ttk_QueryOption(entryPtr->core.layout,name,state))) \ es->member=tmp; - INIT(placeholderForegroundObj, "-placeholderforeground"); - INIT(foregroundObj, "-foreground"); + INIT(placeholderForegroundObj, "-placeholdercolor"); + INIT(foregroundObj, "-color"); INIT(selBorderObj, "-selectbackground") INIT(selBorderWidthObj, "-selectborderwidth") - INIT(selForegroundObj, "-selectforeground") + INIT(selForegroundObj, "-selectcolor") INIT(insertColorObj, "-insertcolor") INIT(insertWidthObj, "-insertwidth") #undef INIT /* Reacquire color & border resources from resource cache. Index: generic/ttk/ttkLabel.c ================================================================== --- generic/ttk/ttkLabel.c +++ generic/ttk/ttkLabel.c @@ -49,11 +49,11 @@ static const Ttk_ElementOptionSpec TextElementOptions[] = { { "-text", TK_OPTION_STRING, offsetof(TextElement,textObj), "" }, { "-font", TK_OPTION_FONT, offsetof(TextElement,fontObj), DEFAULT_FONT }, - { "-foreground", TK_OPTION_COLOR, + { "-color", TK_OPTION_COLOR, offsetof(TextElement,foregroundObj), "black" }, { "-underline", TK_OPTION_INT, offsetof(TextElement,underlineObj), "-1"}, { "-width", TK_OPTION_INT, offsetof(TextElement,widthObj), "-1"}, @@ -459,11 +459,11 @@ */ { "-text", TK_OPTION_STRING, offsetof(LabelElement,text.textObj), "" }, { "-font", TK_OPTION_FONT, offsetof(LabelElement,text.fontObj), DEFAULT_FONT }, - { "-foreground", TK_OPTION_COLOR, + { "-color", TK_OPTION_COLOR, offsetof(LabelElement,text.foregroundObj), "black" }, { "-underline", TK_OPTION_INT, offsetof(LabelElement,text.underlineObj), "-1"}, { "-width", TK_OPTION_INT, offsetof(LabelElement,text.widthObj), ""}, Index: generic/ttk/ttkProgress.c ================================================================== --- generic/ttk/ttkProgress.c +++ generic/ttk/ttkProgress.c @@ -54,13 +54,17 @@ "w", offsetof(Progressbar,progress.anchorObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, GEOMETRY_CHANGED}, {TK_OPTION_FONT, "-font", "font", "Font", DEFAULT_FONT, offsetof(Progressbar,progress.fontObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED }, - {TK_OPTION_COLOR, "-foreground", "textColor", "TextColor", + {TK_OPTION_COLOR, "-color", "color", "Color", "black", offsetof(Progressbar,progress.foregroundObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0 }, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", "left", offsetof(Progressbar,progress.justifyObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED }, {TK_OPTION_PIXELS, "-length", "length", "Length", DEF_PROGRESSBAR_LENGTH, offsetof(Progressbar,progress.lengthObj), TCL_INDEX_NONE, Index: generic/ttk/ttkSquare.c ================================================================== --- generic/ttk/ttkSquare.c +++ generic/ttk/ttkSquare.c @@ -49,32 +49,35 @@ */ static const Tk_OptionSpec SquareOptionSpecs[] = { {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEFAULT_BORDERWIDTH, offsetof(Square,square.borderWidthObj), TCL_INDEX_NONE, - 0,0,GEOMETRY_CHANGED }, - {TK_OPTION_BORDER, "-foreground", "foreground", "Foreground", - DEFAULT_BACKGROUND, offsetof(Square,square.foregroundObj), - TCL_INDEX_NONE, 0, 0, 0}, - + DEFAULT_BORDERWIDTH, offsetof(Square,square.borderWidthObj), TCL_INDEX_NONE, + 0,0,GEOMETRY_CHANGED }, + {TK_OPTION_BORDER, "-color", "color", "Color", + DEFAULT_BACKGROUND, offsetof(Square,square.foregroundObj), + TCL_INDEX_NONE, 0, 0, 0}, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_PIXELS, "-width", "width", "Width", - "50", offsetof(Square,square.widthObj), TCL_INDEX_NONE, 0, 0, - GEOMETRY_CHANGED}, + "50", offsetof(Square,square.widthObj), TCL_INDEX_NONE, 0, 0, + GEOMETRY_CHANGED}, {TK_OPTION_PIXELS, "-height", "height", "Height", - "50", offsetof(Square,square.heightObj), TCL_INDEX_NONE, 0, 0, - GEOMETRY_CHANGED}, + "50", offsetof(Square,square.heightObj), TCL_INDEX_NONE, 0, 0, + GEOMETRY_CHANGED}, {TK_OPTION_STRING, "-padding", "padding", "Pad", NULL, - offsetof(Square,square.paddingObj), TCL_INDEX_NONE, - TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED }, + offsetof(Square,square.paddingObj), TCL_INDEX_NONE, + TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED }, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", - NULL, offsetof(Square,square.reliefObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, + NULL, offsetof(Square,square.reliefObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", - NULL, offsetof(Square,square.anchorObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, + NULL, offsetof(Square,square.anchorObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, WIDGET_TAKEFOCUS_TRUE, WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs) }; @@ -178,11 +181,11 @@ static const Ttk_ElementOptionSpec SquareElementOptions[] = { { "-background", TK_OPTION_BORDER, offsetof(SquareElement,borderObj), DEFAULT_BACKGROUND }, - { "-foreground", TK_OPTION_BORDER, offsetof(SquareElement,foregroundObj), + { "-color", TK_OPTION_BORDER, offsetof(SquareElement,foregroundObj), DEFAULT_BACKGROUND }, { "-borderwidth", TK_OPTION_PIXELS, offsetof(SquareElement,borderWidthObj), DEFAULT_BORDERWIDTH }, { "-relief", TK_OPTION_RELIEF, offsetof(SquareElement,reliefObj), "raised" }, Index: generic/ttk/ttkTreeview.c ================================================================== --- generic/ttk/ttkTreeview.c +++ generic/ttk/ttkTreeview.c @@ -201,13 +201,17 @@ NULL, offsetof(DisplayItem,anchorObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, GEOMETRY_CHANGED}, /* <> */ {TK_OPTION_COLOR, "-background", "windowColor", "WindowColor", NULL, offsetof(DisplayItem,backgroundObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0 }, - {TK_OPTION_COLOR, "-foreground", "textColor", "TextColor", + {TK_OPTION_COLOR, "-color", "color", "Color", NULL, offsetof(DisplayItem,foregroundObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,0 }, +#ifndef TK_NO_DEPRECATED + {TK_OPTION_SYNONYM, "-foreground", "color", NULL, + NULL, 0, TCL_INDEX_NONE, 0, "-color", 0}, +#endif {TK_OPTION_FONT, "-font", "font", "Font", NULL, offsetof(DisplayItem,fontObj), TCL_INDEX_NONE, TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED }, {TK_OPTION_END, 0,0,0, NULL, TCL_INDEX_NONE,TCL_INDEX_NONE, 0,0,0} @@ -3373,11 +3377,11 @@ Tcl_Obj *sizeObj; Tcl_Obj *marginsObj; } TreeitemIndicator; static const Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = { - { "-foreground", TK_OPTION_COLOR, + { "-color", TK_OPTION_COLOR, offsetof(TreeitemIndicator,colorObj), DEFAULT_FOREGROUND }, { "-indicatorsize", TK_OPTION_PIXELS, offsetof(TreeitemIndicator,sizeObj), "12" }, { "-indicatormargins", TK_OPTION_STRING, offsetof(TreeitemIndicator,marginsObj), "2 2 4 2" }, Index: library/clrpick.tcl ================================================================== --- library/clrpick.tcl +++ library/clrpick.tcl @@ -207,11 +207,11 @@ proc ::tk::dialog::color::BuildDialog {w} { upvar ::tk::dialog::color::[winfo name $w] data # TopFrame contains the color strips and the color selection # - set topFrame [frame $w.top -relief raised -bd 1] + set topFrame [frame $w.top -relief raised -borderwidth 1] # StripsFrame contains the colorstrips and the individual RGB entries set stripsFrame [frame $topFrame.colorStrip] set maxWidth [::tk::mcmaxamp &Red &Green &Blue] @@ -239,15 +239,15 @@ pack $box.entry -side left -anchor n -pady 0 pack $box -side left -fill both set height [expr { [winfo reqheight $box.entry] - - 2*([$box.entry cget -highlightthickness] + [$box.entry cget -bd]) + 2*([$box.entry cget -highlightthickness] + [$box.entry cget -borderwidth]) }] canvas $f.color -height $height \ - -width $data(BARS_WIDTH) -relief sunken -bd 2 + -width $data(BARS_WIDTH) -relief sunken -borderwidth 2 canvas $f.sel -height $data(PLGN_HEIGHT) \ -width $data(canvasWidth) -highlightthickness 0 pack $f.color -expand yes -fill both pack $f.sel -expand yes -fill both @@ -281,12 +281,12 @@ set lab [::tk::AmpWidget label $selFrame.lab \ -text [mc "&Selection:"] -anchor sw] set ent [entry $selFrame.ent \ -textvariable ::tk::dialog::color::[winfo name $w](selection) \ -width 16] - set f1 [frame $selFrame.f1 -relief sunken -bd 2] - set data(finalCanvas) [frame $f1.demo -bd 0 -width 100 -height 70] + set f1 [frame $selFrame.f1 -relief sunken -borderwidth 2] + set data(finalCanvas) [frame $f1.demo -borderwidth 0 -width 100 -height 70] pack $lab $ent -side top -fill x -padx 4 -pady 2 pack $f1 -expand yes -anchor nw -fill both -padx 6 -pady 10 pack $data(finalCanvas) -expand yes -fill both @@ -295,11 +295,11 @@ pack $selFrame -side left -fill none -anchor nw pack $topFrame -side top -expand yes -fill both -anchor nw # the botFrame frame contains the buttons # - set botFrame [frame $w.bot -relief raised -bd 1] + set botFrame [frame $w.bot -relief raised -borderwidth 1] ::tk::AmpWidget button $botFrame.ok -text [mc "&OK"] \ -command [list tk::dialog::color::OkCmd $w] ::tk::AmpWidget button $botFrame.cancel -text [mc "&Cancel"] \ -command [list tk::dialog::color::CancelCmd $w] @@ -426,11 +426,11 @@ # l is the canvas index of the first colorbar. set l $data(lines,$c,start) } # Draw the color bars. - set highlightW [expr {[$col cget -highlightthickness] + [$col cget -bd]}] + set highlightW [expr {[$col cget -highlightthickness] + [$col cget -borderwidth]}] for {set i 0} { $i < $data(NUM_COLORBARS)} { incr i} { set intensity [expr {$i * $data(intensityIncr)}] set startx [expr {$i * $data(colorbarWidth) + $highlightW}] if {$c eq "red"} { set color [format "#%02x%02x%02x" \ @@ -486,11 +486,11 @@ upvar ::tk::dialog::color::[winfo name $w] data set color [format "#%02x%02x%02x" $data(red,intensity) \ $data(green,intensity) $data(blue,intensity)] - $data(finalCanvas) configure -bg $color + $data(finalCanvas) configure -background $color set data(finalColor) $color set data(selection) $color set data(finalRGB) [list \ $data(red,intensity) \ $data(green,intensity) \ Index: library/console.tcl ================================================================== --- library/console.tcl +++ library/console.tcl @@ -156,14 +156,14 @@ pack $con -in .consoleframe -fill both -expand 1 -side left -padx 1 -pady 1 pack .consoleframe -fill both -expand 1 -side left ConsoleBind $con - $con tag configure stderr -foreground red - $con tag configure stdin -foreground blue - $con tag configure prompt -foreground \#8F4433 - $con tag configure proc -foreground \#008800 + $con tag configure stderr -color red + $con tag configure stdin -color blue + $con tag configure prompt -color \#8F4433 + $con tag configure proc -color \#008800 $con tag configure var -background \#FFC0D0 $con tag raise sel $con tag configure blink -background \#FFFF00 $con tag configure find -background \#FFFF00 Index: library/demos/anilabel.tcl ================================================================== --- library/demos/anilabel.tcl +++ library/demos/anilabel.tcl @@ -110,16 +110,16 @@ labelframe $w.left -text "Scrolling Texts" labelframe $w.right -text "GIF Image" pack $w.left $w.right -side left -padx 10 -pady 10 -expand yes # This method of scrolling text looks far better with a fixed-width font -label $w.left.l1 -bd 4 -relief ridge -font fixedFont -label $w.left.l2 -bd 4 -relief groove -font fixedFont -label $w.left.l3 -bd 4 -relief flat -font fixedFont -width 18 +label $w.left.l1 -borderwidth 4 -relief ridge -font fixedFont +label $w.left.l2 -borderwidth 4 -relief groove -font fixedFont +label $w.left.l3 -borderwidth 4 -relief flat -font fixedFont -width 18 pack $w.left.l1 $w.left.l2 $w.left.l3 -side top -expand yes -padx 10 -pady 10 -anchor w # Don't need to do very much with this label except turn off the border -label $w.right.l -bd 0 +label $w.right.l -borderwidth 0 pack $w.right.l -side top -expand yes -padx 10 -pady 10 # This is a base-64-encoded animated GIF file. set tclPoweredData { R0lGODlhKgBAAPQAAP//////zP//AP/MzP/Mmf/MAP+Zmf+ZZv+ZAMz//8zM Index: library/demos/bind.tcl ================================================================== --- library/demos/bind.tcl +++ library/demos/bind.tcl @@ -30,12 +30,12 @@ if {[winfo depth $w] > 1} { set bold "-background #43ce80 -relief raised -borderwidth 1" set normal "-background {} -relief flat" } else { - set bold "-foreground white -background black" - set normal "-foreground {} -background {}" + set bold "-color white -background black" + set normal "-color {} -background {}" } # Add text to widget. $w.text insert 0.0 {\ Index: library/demos/button.tcl ================================================================== --- library/demos/button.tcl +++ library/demos/button.tcl @@ -21,11 +21,11 @@ ## See Code / Dismiss buttons pack [addSeeDismiss $w.buttons $w] -side bottom -fill x proc colorrefresh {w col} { - $w configure -bg $col + $w configure -background $col if {[tk windowingsystem] eq "aqua"} { # set highlightbackground of all buttons in $w set l [list $w] while {[llength $l]} { set l [concat [lassign $l b] [winfo children $b]] Index: library/demos/clrpick.tcl ================================================================== --- library/demos/clrpick.tcl +++ library/demos/clrpick.tcl @@ -25,11 +25,11 @@ button $w.back -text "Set background color ..." \ -command \ "setColor $w $w.back background {-background -highlightbackground}" button $w.fore -text "Set foreground color ..." \ -command \ - "setColor $w $w.back foreground -foreground" + "setColor $w $w.back foreground -color" pack $w.back $w.fore -side top -anchor c -pady 2m proc setColor {w button name options} { grab $w Index: library/demos/combo.tcl ================================================================== --- library/demos/combo.tcl +++ library/demos/combo.tcl @@ -42,11 +42,11 @@ set secondValue unchangable set ozCity Sydney ttk::labelframe $w.c1 -text "Fully Editable" ttk::combobox $w.c1.c -textvariable firstValue -placeholder {Enter text here} -ttk::style configure TEntry -placeholderforeground gray50 +ttk::style configure TEntry -placeholdercolor gray50 ttk::labelframe $w.c2 -text Disabled ttk::combobox $w.c2.c -textvariable secondValue -state disabled ttk::labelframe $w.c3 -text "Defined List Only" ttk::combobox $w.c3.c -textvariable ozCity -state readonly \ -values $australianCities Index: library/demos/cscroll.tcl ================================================================== --- library/demos/cscroll.tcl +++ library/demos/cscroll.tcl @@ -40,11 +40,11 @@ -row 0 -column 1 -rowspan 1 -columnspan 1 -sticky news grid $w.hscroll -in $w.grid -padx 1 -pady 1 \ -row 1 -column 0 -rowspan 1 -columnspan 1 -sticky news -set bg [lindex [$c config -bg] 4] +set bg [lindex [$c config -background] 4] for {set i 0} {$i < 20} {incr i} { set x [expr {-10 + 3*$i}] for {set j 0; set y -10} {$j < 10} {incr j; incr y 3} { $c create rect ${x}c ${y}c [expr {$x+2}]c [expr {$y+2}]c \ -fill $bg -tags rect Index: library/demos/entry1.tcl ================================================================== --- library/demos/entry1.tcl +++ library/demos/entry1.tcl @@ -23,11 +23,11 @@ set btns [addSeeDismiss $w.buttons $w] pack $btns -side bottom -fill x entry $w.e1 entry $w.e2 -entry $w.e3 -placeholder {Enter text here} -placeholderforeground gray75 +entry $w.e3 -placeholder {Enter text here} -placeholdercolor gray75 pack $w.e1 $w.e2 $w.e3 -side top -pady 5 -padx 10 -fill x $w.e1 insert 0 "Initial value" $w.e2 insert end "This entry contains a long value, much too long " $w.e2 insert end "to fit in the window at one time, so long in fact " Index: library/demos/entry2.tcl ================================================================== --- library/demos/entry2.tcl +++ library/demos/entry2.tcl @@ -42,6 +42,6 @@ $w.frame.e1 insert 0 "Initial value" $w.frame.e2 insert end "This entry contains a long value, much too long " $w.frame.e2 insert end "to fit in the window at one time, so long in fact " $w.frame.e2 insert end "that you'll have to scan or scroll to see the end." -$w.frame.e3 configure -placeholder {Enter text here} -placeholderforeground gray75 +$w.frame.e3 configure -placeholder {Enter text here} -placeholdercolor gray75 Index: library/demos/entry3.tcl ================================================================== --- library/demos/entry3.tcl +++ library/demos/entry3.tcl @@ -48,31 +48,31 @@ # count - Counter to control the number of times flashed proc focusAndFlash {W fg bg {count 9}} { focus -force $W if {$count<1} { - $W configure -foreground $fg -background $bg + $W configure -color $fg -background $bg } else { if {$count%2} { - $W configure -foreground $bg -background $fg + $W configure -color $bg -background $fg } else { - $W configure -foreground $fg -background $bg + $W configure -color $fg -background $bg } after 200 [list focusAndFlash $W $fg $bg [expr {$count-1}]] } } labelframe $w.l1 -text "Integer Entry" # Alternatively try using {string is digit} for arbitrary length numbers, # and not just 32-bit ones. -entry $w.l1.e -validate focus -vcmd {string is integer %P} +entry $w.l1.e -validate focus -validatecommand {string is integer %P} $w.l1.e configure -invalidcommand \ - "focusAndFlash %W [$w.l1.e cget -fg] [$w.l1.e cget -bg]" + "focusAndFlash %W [$w.l1.e cget -fg] [$w.l1.e cget -background]" pack $w.l1.e -fill x -expand 1 -padx 1m -pady 1m labelframe $w.l2 -text "Length-Constrained Entry" -entry $w.l2.e -validate key -invcmd bell -vcmd {expr {[string length %P]<10}} +entry $w.l2.e -validate key -invalidcmd bell -validatecommand {expr {[string length %P]<10}} pack $w.l2.e -fill x -expand 1 -padx 1m -pady 1m ### PHONE NUMBER ENTRY ### # Note that the source to this is quite a bit longer as the behaviour # demonstrated is a lot more ambitious than with the others. @@ -101,11 +101,11 @@ # refused) to be overwritten at that point. proc validatePhoneChange {W vmode idx char} { global phoneNumberMap entry3content if {$idx < 0} {return 1} - after idle [list $W configure -validate $vmode -invcmd bell] + after idle [list $W configure -validate $vmode -invalidcmd bell] if { !($idx<3 || $idx==6 || $idx==7 || $idx==11 || $idx>15) && [string match {[0-9A-Za-z]} $char] } then { $W delete $idx @@ -158,12 +158,12 @@ return -code break } } labelframe $w.l3 -text "US Phone-Number Entry" -entry $w.l3.e -validate key -invcmd bell -textvariable entry3content \ - -vcmd {validatePhoneChange %W %v %i %S} +entry $w.l3.e -validate key -invalidcmd bell -textvariable entry3content \ + -validatecommand {validatePhoneChange %W %v %i %S} # Click to focus goes to the first editable character... bind $w.l3.e { if {"%d" ne "NotifyAncestor"} { %W icursor 3 after idle {%W selection clear} @@ -172,14 +172,14 @@ bind $w.l3.e <> {phoneSkipLeft %W} bind $w.l3.e <> {phoneSkipRight %W} pack $w.l3.e -fill x -expand 1 -padx 1m -pady 1m labelframe $w.l4 -text "Password Entry" -entry $w.l4.e -validate key -show "*" -vcmd {expr {[string length %P]<=8}} +entry $w.l4.e -validate key -show "*" -validatecommand {expr {[string length %P]<=8}} pack $w.l4.e -fill x -expand 1 -padx 1m -pady 1m lower [frame $w.mid] grid $w.l1 $w.l2 -in $w.mid -padx 3m -pady 1m -sticky ew grid $w.l3 $w.l4 -in $w.mid -padx 3m -pady 1m -sticky ew grid columnconfigure $w.mid {0 1} -uniform 1 pack $w.msg -side top pack $w.mid -fill both -expand 1 Index: library/demos/form.tcl ================================================================== --- library/demos/form.tcl +++ library/demos/form.tcl @@ -22,11 +22,11 @@ ## See Code / Dismiss buttons set btns [addSeeDismiss $w.buttons $w] pack $btns -side bottom -fill x foreach i {f1 f2 f3 f4 f5} { - frame $w.$i -bd 2 + frame $w.$i -borderwidth 2 entry $w.$i.entry -relief sunken -width 40 label $w.$i.label pack $w.$i.entry -side right pack $w.$i.label -side left } Index: library/demos/goldberg.tcl ================================================================== --- library/demos/goldberg.tcl +++ library/demos/goldberg.tcl @@ -95,14 +95,14 @@ proc DoDisplay {w} { global S C ttk::frame $w.ctrl -relief ridge -borderwidth 2 -padding 5 - pack [frame $w.screen -bd 2 -relief raised] \ + pack [frame $w.screen -borderwidth 2 -relief raised] \ -side left -fill both -expand 1 - canvas $w.c -width 860 -height 730 -bg $C(bg) -highlightthickness 0 + canvas $w.c -width 860 -height 730 -background $C(bg) -highlightthickness 0 $w.c config -scrollregion {0 0 1000 1000} ;# Kludge: move everything up $w.c yview moveto .05 pack $w.c -in $w.screen -side top -fill both -expand 1 bind $w.c [list $w.pause invoke] @@ -405,13 +405,13 @@ set xy {628 335 660 383} ;# Strike box $w.c create rect $xy -fill {} -outline $::C(fg) for {set y 0} {$y < 3} {incr y} { set yy [expr {335+$y*16}] $w.c create bitmap 628 $yy -bitmap gray25 -anchor nw \ - -foreground $::C(fg) + -color $::C(fg) $w.c create bitmap 644 $yy -bitmap gray25 -anchor nw \ - -foreground $::C(fg) + -color $::C(fg) } set xy {702 366 798 366} ;# Lever $w.c create line $xy -fill $::C(fg) -width 6 -tag I2_0 set xy {712 363 712 355} ;# R strap Index: library/demos/hscale.tcl ================================================================== --- library/demos/hscale.tcl +++ library/demos/hscale.tcl @@ -23,11 +23,11 @@ pack $btns -side bottom -fill x frame $w.frame -borderwidth 10 pack $w.frame -side top -fill x -canvas $w.frame.canvas -width 50 -height 50 -bd 0 -highlightthickness 0 +canvas $w.frame.canvas -width 50 -height 50 -borderwidth 0 -highlightthickness 0 $w.frame.canvas create polygon 0 0 1 1 2 2 -fill DeepSkyBlue3 -tags poly $w.frame.canvas create line 0 0 1 1 2 2 0 0 -fill black -tags line scale $w.frame.scale -orient horizontal -length 284 -from 0 -to 250 \ -command "setWidth $w.frame.canvas" -tickinterval 50 pack $w.frame.canvas -side top -expand yes -anchor s -fill x -padx 15 Index: library/demos/image1.tcl ================================================================== --- library/demos/image1.tcl +++ library/demos/image1.tcl @@ -23,13 +23,13 @@ pack $btns -side bottom -fill x # Main widget program sets variable tk_demoDirectory catch {image delete image1a} image create photo image1a -file [file join $tk_demoDirectory images earth.gif] -label $w.l1 -image image1a -bd 1 -relief sunken +label $w.l1 -image image1a -borderwidth 1 -relief sunken catch {image delete image1b} image create photo image1b \ -file [file join $tk_demoDirectory images earthris.gif] -label $w.l2 -image image1b -bd 1 -relief sunken +label $w.l2 -image image1b -borderwidth 1 -relief sunken pack $w.l1 $w.l2 -side top -padx .5m -pady .5m Index: library/demos/image2.tcl ================================================================== --- library/demos/image2.tcl +++ library/demos/image2.tcl @@ -57,11 +57,11 @@ set file [file join $dirName [$w.f.list get @$x,$y]] if {[catch { image2a configure -file $file }]} then { # Mark the file as not loadable - $w.f.list itemconfigure @$x,$y -bg \#c00000 -selectbackground \#ff0000 + $w.f.list itemconfigure @$x,$y -background \#c00000 -selectbackground \#ff0000 } } set w .image2 catch {destroy $w} Index: library/demos/menu.tcl ================================================================== --- library/demos/menu.tcl +++ library/demos/menu.tcl @@ -25,11 +25,11 @@ } pack $w.msg -side top set menustatus " " frame $w.statusBar -label $w.statusBar.label -textvariable menustatus -relief sunken -bd 1 -font "Helvetica 10" -anchor w +label $w.statusBar.label -textvariable menustatus -relief sunken -borderwidth 1 -font "Helvetica 10" -anchor w pack $w.statusBar.label -side left -padx 2 -expand yes -fill both pack $w.statusBar -side bottom -fill x -pady 2 ## See Code / Dismiss buttons set btns [addSeeDismiss $w.buttons $w] Index: library/demos/msgbox.tcl ================================================================== --- library/demos/msgbox.tcl +++ library/demos/msgbox.tcl @@ -26,11 +26,11 @@ frame $w.left frame $w.right pack $w.left $w.right -side left -expand yes -fill y -pady .5c -padx .5c label $w.left.label -text "Icon" -frame $w.left.sep -relief ridge -bd 1 -height 2 +frame $w.left.sep -relief ridge -borderwidth 1 -height 2 pack $w.left.label -side top pack $w.left.sep -side top -fill x -expand no set msgboxIcon info foreach i {error info question warning} { @@ -38,11 +38,11 @@ -relief flat -value $i -width 16 -anchor w pack $w.left.b$i -side top -pady 2 -anchor w -fill x } label $w.right.label -text "Type" -frame $w.right.sep -relief ridge -bd 1 -height 2 +frame $w.right.sep -relief ridge -borderwidth 1 -height 2 pack $w.right.label -side top pack $w.right.sep -side top -fill x -expand no set msgboxType ok foreach t {abortretryignore ok okcancel retrycancel yesno yesnocancel} { Index: library/demos/paned1.tcl ================================================================== --- library/demos/paned1.tcl +++ library/demos/paned1.tcl @@ -24,9 +24,9 @@ pack $btns -side bottom -fill x panedwindow $w.pane pack $w.pane -side top -expand yes -fill both -pady 2 -padx 2m -label $w.pane.left -text "This is the\nleft side" -fg black -bg yellow -label $w.pane.right -text "This is the\nright side" -fg black -bg cyan +label $w.pane.left -text "This is the\nleft side" -fg black -background yellow +label $w.pane.right -text "This is the\nright side" -fg black -background cyan $w.pane add $w.pane.left $w.pane.right Index: library/demos/paned2.tcl ================================================================== --- library/demos/paned2.tcl +++ library/demos/paned2.tcl @@ -51,11 +51,11 @@ } set f [frame $w.pane.top] listbox $f.list -listvariable paneList -yscrollcommand "$f.scr set" # Invert the first item to highlight it $f.list itemconfigure 0 \ - -background [$f.list cget -fg] -foreground [$f.list cget -bg] + -background [$f.list cget -fg] -color [$f.list cget -background] ttk::scrollbar $f.scr -orient vertical -command "$f.list yview" pack $f.scr -side right -fill y pack $f.list -fill both -expand 1 # The bottom window is a text widget with scrollbar Index: library/demos/pendulum.tcl ================================================================== --- library/demos/pendulum.tcl +++ library/demos/pendulum.tcl @@ -28,11 +28,11 @@ $w.p add [labelframe $w.p.l1 -text "Pendulum Simulation"] $w.p add [labelframe $w.p.l2 -text "Phase Space"] # Create the canvas containing the graphical representation of the # simulated system. -canvas $w.c -width 320 -height 200 -background white -bd 2 -relief sunken +canvas $w.c -width 320 -height 200 -background white -borderwidth 2 -relief sunken $w.c create text 5 5 -anchor nw -text "Click to Adjust Bob Start Position" # Coordinates of these items don't matter; they will be set properly below $w.c create line 0 25 320 25 -tags plate -fill grey50 -width 2 $w.c create oval 155 20 165 30 -tags pivot -fill grey50 -outline {} $w.c create line 1 1 1 1 -tags rod -fill black -width 3 @@ -40,11 +40,11 @@ pack $w.c -in $w.p.l1 -fill both -expand true # Create the canvas containing the phase space graph; this consists of # a line that gets gradually paler as it ages, which is an extremely # effective visual trick. -canvas $w.k -width 320 -height 200 -background white -bd 2 -relief sunken +canvas $w.k -width 320 -height 200 -background white -borderwidth 2 -relief sunken $w.k create line 160 200 160 0 -fill grey75 -arrow last -tags y_axis $w.k create line 0 100 320 100 -fill grey75 -arrow last -tags x_axis for {set i 90} {$i>=0} {incr i -10} { # Coordinates of these items don't matter; they will be set properly below $w.k create line 0 0 1 1 -smooth true -tags graph$i -fill grey$i Index: library/demos/puzzle.tcl ================================================================== --- library/demos/puzzle.tcl +++ library/demos/puzzle.tcl @@ -62,20 +62,20 @@ } else { set frameSize 120 } frame $w.frame -width $frameSize -height $frameSize -borderwidth 2\ - -relief sunken -bg [$w.s cget -troughcolor] + -relief sunken -background [$w.s cget -troughcolor] pack $w.frame -side top -pady 1c -padx 1c destroy $w.s set order {3 1 6 2 5 7 15 13 4 11 8 9 14 10 12} for {set i 0} {$i < 15} {set i [expr {$i+1}]} { set num [lindex $order $i] set xpos($num) [expr {($i%4)*.25}] set ypos($num) [expr {($i/4)*.25}] - button $w.frame.$num -relief raised -text $num -bd 0 -highlightthickness 0 \ + button $w.frame.$num -relief raised -text $num -borderwidth 0 -highlightthickness 0 \ -command "puzzleSwitch $w $num" place $w.frame.$num -relx $xpos($num) -rely $ypos($num) \ -relwidth .25 -relheight .25 } set xpos(space) .75 Index: library/demos/ruler.tcl ================================================================== --- library/demos/ruler.tcl +++ library/demos/ruler.tcl @@ -71,11 +71,11 @@ $c create line $x.5c 1c $x.5c 0.7c -width 1 $c create line $x.75c 1c $x.75c 0.8c -width 1 $c create text $x.15c .75c -text $i -anchor sw } $c addtag well withtag [$c create rect 13.2c 1c 13.8c 0.5c \ - -fill [lindex [$c config -bg] 4]] + -fill [lindex [$c config -background] 4]] $c addtag well withtag [rulerMkTab $c [winfo pixels $c 13.5c] \ [winfo pixels $c .65c]] $c bind well "rulerNewTab $c %x %y" $c bind tab "rulerSelectTab $c %x %y" Index: library/demos/search.tcl ================================================================== --- library/demos/search.tcl +++ library/demos/search.tcl @@ -116,16 +116,16 @@ # Set up display styles for text highlighting. if {[winfo depth $w] > 1} { textToggle "$w.text tag configure search -background \ - #ce5555 -foreground white" 800 "$w.text tag configure \ - search -background {} -foreground {}" 200 + #ce5555 -color white" 800 "$w.text tag configure \ + search -background {} -color {}" 200 } else { textToggle "$w.text tag configure search -background \ - black -foreground white" 800 "$w.text tag configure \ - search -background {} -foreground {}" 200 + black -color white" 800 "$w.text tag configure \ + search -background {} -color {}" 200 } $w.text insert 1.0 \ {This window demonstrates how to use the tagging facilities in text widgets to implement a searching mechanism. First, type a file name in the top entry, then type or click on "Load File". Then Index: library/demos/spin.tcl ================================================================== --- library/demos/spin.tcl +++ library/demos/spin.tcl @@ -36,11 +36,11 @@ Canberra Sydney Melbourne Perth Adelaide Brisbane Hobart Darwin "Alice Springs" } spinbox $w.s1 -from 1 -to 10 -width 10 -validate key \ - -vcmd {string is integer %P} + -validatecommand {string is integer %P} spinbox $w.s2 -from 0 -to 3 -increment .5 -format %05.2f -width 10 spinbox $w.s3 -values $australianCities -width 10 #entry $w.e1 #entry $w.e2 Index: library/demos/style.tcl ================================================================== --- library/demos/style.tcl +++ library/demos/style.tcl @@ -36,24 +36,24 @@ $w.text tag configure big -font "$family 14 bold" $w.text tag configure verybig -font "Helvetica 24 bold" $w.text tag configure tiny -font "Times 8 bold" if {[winfo depth $w] > 1} { $w.text tag configure color1 -background #a0b7ce - $w.text tag configure color2 -foreground red + $w.text tag configure color2 -color red $w.text tag configure raised -relief raised -borderwidth 1 $w.text tag configure sunken -relief sunken -borderwidth 1 } else { - $w.text tag configure color1 -background black -foreground white - $w.text tag configure color2 -background black -foreground white + $w.text tag configure color1 -background black -color white + $w.text tag configure color2 -background black -color white $w.text tag configure raised -background white -relief raised \ -borderwidth 1 $w.text tag configure sunken -background white -relief sunken \ -borderwidth 1 } -$w.text tag configure bgstipple -background black -borderwidth 0 \ - -bgstipple gray12 -$w.text tag configure fgstipple -fgstipple gray50 +$w.text tag configure backgroundstipple -background black -borderwidth 0 \ + -backgroundstipple gray12 +$w.text tag configure stipple -stipple gray50 $w.text tag configure underline -underline on $w.text tag configure overstrike -overstrike on $w.text tag configure right -justify right $w.text tag configure center -justify center $w.text tag configure super -offset 4p -font "$family 10" @@ -85,13 +85,13 @@ $w.text insert end "\ncolor, or " $w.text insert end both {color1 color2} $w.text insert end ".\n" $w.text insert end "\n3. Stippling." big $w.text insert end " You can cause either the " -$w.text insert end background bgstipple +$w.text insert end background backgroundstipple $w.text insert end " or " -$w.text insert end foreground fgstipple +$w.text insert end foreground stipple $w.text insert end { information to be drawn with a stipple fill instead of a solid fill. } $w.text insert end "\n4. Underlining." big $w.text insert end " You can " Index: library/demos/tcolor ================================================================== --- library/demos/tcolor +++ library/demos/tcolor @@ -162,11 +162,11 @@ set green [lindex $list 1] set blue [lindex $list 2] } } set color [format "#%04x%04x%04x" $red $green $blue] - .sample.swatch config -bg $color + .sample.swatch config -background $color if {$autoUpdate} doUpdate update idletasks } # The procedure below is invoked to update the scales from the @@ -225,11 +225,11 @@ set green [expr {$green<<$shift}] set blue [expr {$blue<<$shift}] } tc_setScales set color [format "#%04x%04x%04x" $red $green $blue] - .sample.swatch config -bg $color + .sample.swatch config -background $color if {$autoUpdate} doUpdate } # The procedure below is invoked when a new color space is selected. # It changes the labels on the scales and re-loads the scales with Index: library/demos/ttkscale.tcl ================================================================== --- library/demos/ttkscale.tcl +++ library/demos/ttkscale.tcl @@ -8,11 +8,11 @@ package require Tk set w .ttkscale catch {destroy $w} -toplevel $w -bg [ttk::style lookup TLabel -background] +toplevel $w -background [ttk::style lookup TLabel -background] wm title $w "Themed Scale Demonstration" wm iconname $w "ttkscale" positionWindow $w pack [ttk::frame [set w $w.contents]] -fill both -expand 1 @@ -30,10 +30,10 @@ # List of colors from rainbox; "Indigo" is not a standard color set colorList {Red Orange Yellow Green Blue Violet} ttk::label $w.frame.label ttk::scale $w.frame.scale -from 0 -to 5 -command [list apply {{w idx} { set c [lindex $::colorList [tcl::mathfunc::int $idx]] - $w.frame.label configure -foreground $c -text "Color: $c" + $w.frame.label configure -color $c -text "Color: $c" }} $w] # Trigger the setting of the label's text $w.frame.scale set 0 pack $w.frame.label $w.frame.scale Index: library/demos/vscale.tcl ================================================================== --- library/demos/vscale.tcl +++ library/demos/vscale.tcl @@ -25,11 +25,11 @@ frame $w.frame -borderwidth 10 pack $w.frame scale $w.frame.scale -orient vertical -length 284 -from 0 -to 250 \ -command "setHeight $w.frame.canvas" -tickinterval 50 -canvas $w.frame.canvas -width 50 -height 50 -bd 0 -highlightthickness 0 +canvas $w.frame.canvas -width 50 -height 50 -borderwidth 0 -highlightthickness 0 $w.frame.canvas create polygon 0 0 1 1 2 2 -fill SeaGreen3 -tags poly $w.frame.canvas create line 0 0 1 1 2 2 0 0 -fill black -tags line frame $w.frame.right -borderwidth 15 pack $w.frame.scale -side left -anchor ne pack $w.frame.canvas -side left -anchor nw -fill y Index: library/dialog.tcl ================================================================== --- library/dialog.tcl +++ library/dialog.tcl @@ -72,12 +72,12 @@ } frame $w.bot frame $w.top if {$windowingsystem eq "x11"} { - $w.bot configure -relief raised -bd 1 - $w.top configure -relief raised -bd 1 + $w.bot configure -relief raised -borderwidth 1 + $w.top configure -relief raised -borderwidth 1 } pack $w.bot -side bottom -fill both pack $w.top -side top -fill both -expand 1 grid anchor $w.bot center Index: library/iconlist.tcl ================================================================== --- library/iconlist.tcl +++ library/iconlist.tcl @@ -264,11 +264,11 @@ if {$rTag < 0 || $rTag >= [llength $list]} { return } set bbox [$canvas bbox item$rTag] - set pad [expr {[$canvas cget -highlightthickness]+[$canvas cget -bd]}] + set pad [expr {[$canvas cget -highlightthickness]+[$canvas cget -borderwidth]}] set x1 [lindex $bbox 0] set x2 [lindex $bbox 2] incr x1 [expr {$pad * -2}] incr x2 [expr {$pad * -1}] @@ -309,11 +309,11 @@ return } set W [winfo width $canvas] set H [winfo height $canvas] - set pad [expr {[$canvas cget -highlightthickness]+[$canvas cget -bd]}] + set pad [expr {[$canvas cget -highlightthickness]+[$canvas cget -borderwidth]}] if {$pad < 2} { set pad 2 } incr W [expr {$pad*-2}] @@ -378,11 +378,11 @@ method DrawSelection {} { $canvas delete selection $canvas itemconfigure selectionText -fill black $canvas dtag selectionText set cbg [ttk::style lookup TEntry -selectbackground focus] - set cfg [ttk::style lookup TEntry -selectforeground focus] + set cfg [ttk::style lookup TEntry -selectcolor focus] foreach item $selection { set rTag [lindex $list $item 2] foreach {iTag tTag text serial} $itemList($rTag) { break } Index: library/msgbox.tcl ================================================================== --- library/msgbox.tcl +++ library/msgbox.tcl @@ -11,11 +11,11 @@ # Ensure existence of ::tk::dialog namespace # namespace eval ::tk::dialog {} -image create bitmap ::tk::dialog::b1 -foreground black \ +image create bitmap ::tk::dialog::b1 -color black \ -data "#define b1_width 32\n#define b1_height 32 static unsigned char q1_bits[] = { 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x07, 0xe0, 0x00, 0xc0, 0x00, 0x00, 0x03, 0x20, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, @@ -25,11 +25,11 @@ 0x04, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x08, 0x60, 0x00, 0x00, 0x04, 0x80, 0x03, 0x80, 0x03, 0x00, 0x0c, 0x78, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};" -image create bitmap ::tk::dialog::b2 -foreground white \ +image create bitmap ::tk::dialog::b2 -color white \ -data "#define b2_width 32\n#define b2_height 32 static unsigned char b2_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, @@ -39,11 +39,11 @@ 0xf8, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x0f, 0xe0, 0xff, 0xff, 0x07, 0x80, 0xff, 0xff, 0x03, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};" -image create bitmap ::tk::dialog::q -foreground blue \ +image create bitmap ::tk::dialog::q -color blue \ -data "#define q_width 32\n#define q_height 32 static unsigned char q_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x10, 0x0f, 0x00, 0x00, 0x18, 0x1e, 0x00, 0x00, 0x38, 0x1e, 0x00, @@ -53,11 +53,11 @@ 0x00, 0xe0, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};" -image create bitmap ::tk::dialog::i -foreground blue \ +image create bitmap ::tk::dialog::i -color blue \ -data "#define i_width 32\n#define i_height 32 static unsigned char i_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -67,11 +67,11 @@ 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};" -image create bitmap ::tk::dialog::w1 -foreground black \ +image create bitmap ::tk::dialog::w1 -color black \ -data "#define w1_width 32\n#define w1_height 32 static unsigned char w1_bits[] = { 0x00, 0x80, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x04, 0x20, 0x00, @@ -81,11 +81,11 @@ 0x20, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x20, 0xfc, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00};" -image create bitmap ::tk::dialog::w2 -foreground yellow \ +image create bitmap ::tk::dialog::w2 -color yellow \ -data "#define w2_width 32\n#define w2_height 32 static unsigned char w2_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf8, 0x1f, 0x00, @@ -95,11 +95,11 @@ 0xc0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};" -image create bitmap ::tk::dialog::w3 -foreground black \ +image create bitmap ::tk::dialog::w3 -color black \ -data "#define w3_width 32\n#define w3_height 32 static unsigned char w3_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -249,11 +249,11 @@ # 3. Create the top-level window and divide it into top # and bottom parts. catch {destroy $w} - toplevel $w -class Dialog -bg $bg + toplevel $w -class Dialog -background $bg wm title $w $data(-title) wm iconname $w Dialog wm protocol $w WM_DELETE_WINDOW [list $w.$cancel invoke] # Message boxes should be transient with respect to their parent so that Index: library/palette.tcl ================================================================== --- library/palette.tcl +++ library/palette.tcl @@ -17,11 +17,11 @@ # Arguments: # The arguments consist of either a single color name, which # will be used as the new background color (all other colors will # be computed from this) or an even number of values consisting of # option names and values. The name for an option is the one used -# for the option database, such as activeForeground, not -activeforeground. +# for the option database, such as activeColor, not -activecolor. proc ::tk_setPalette {args} { if {[winfo depth .] == 1} { # Just return on monochrome displays, otherwise errors will occur return @@ -38,34 +38,34 @@ if {![info exists new(background)]} { return -code error -errorcode {TK SET_PALETTE BACKGROUND} \ "must specify a background color" } set bg [winfo rgb . $new(background)] - if {![info exists new(foreground)]} { + if {![info exists new(color)]} { # Note that the range of each value in the triple returned by # [winfo rgb] is 0-65535, and your eyes are more sensitive to # green than to red, and more to red than to blue. foreach {r g b} $bg {break} if {$r+1.5*$g+0.5*$b > 100000} { - set new(foreground) black + set new(color) black } else { - set new(foreground) white + set new(color) white } } - lassign [winfo rgb . $new(foreground)] fg_r fg_g fg_b + lassign [winfo rgb . $new(color)] fg_r fg_g fg_b lassign $bg bg_r bg_g bg_b set darkerBg [format #%02x%02x%02x [expr {(9*$bg_r)/2560}] \ [expr {(9*$bg_g)/2560}] [expr {(9*$bg_b)/2560}]] - foreach i {activeForeground insertBackground selectForeground \ + foreach i {activeColor insertBackground selectColor \ highlightColor} { if {![info exists new($i)]} { - set new($i) $new(foreground) + set new($i) $new(color) } } - if {![info exists new(disabledForeground)]} { - set new(disabledForeground) [format #%02x%02x%02x \ + if {![info exists new(disabledColor)]} { + set new(disabledColor) [format #%02x%02x%02x \ [expr {(3*$bg_r + $fg_r)/1024}] \ [expr {(3*$bg_g + $fg_g)/1024}] \ [expr {(3*$bg_b + $fg_b)/1024}]] } if {![info exists new(highlightBackground)]} { @@ -233,12 +233,12 @@ # # Arguments: # None. proc ::tk_bisque {} { - tk_setPalette activeBackground #e6ceb1 activeForeground black \ - background #ffe4c4 disabledForeground #b0b0b0 foreground black \ + tk_setPalette activeBackground #e6ceb1 activeColor black \ + background #ffe4c4 disabledColor #b0b0b0 color black \ highlightBackground #ffe4c4 highlightColor black \ insertBackground black \ - selectBackground #e6ceb1 selectForeground black \ + selectBackground #e6ceb1 selectColor black \ troughColor #cdb79e } Index: library/ttk/altTheme.tcl ================================================================== --- library/ttk/altTheme.tcl +++ library/ttk/altTheme.tcl @@ -8,32 +8,32 @@ array set colors { -frame "#d9d9d9" -window "#ffffff" -darker "#c3c3c3" -border "#414141" - -activebg "#ececec" - -disabledfg "#a3a3a3" - -selectbg "#4a6984" - -selectfg "#ffffff" + -activebackground "#ececec" + -disabledcolor "#a3a3a3" + -selectbackground "#4a6984" + -selectcolor "#ffffff" -altindicator "#aaaaaa" } ttk::style theme settings alt { ttk::style configure "." \ -background $colors(-frame) \ - -foreground black \ + -color black \ -troughcolor $colors(-darker) \ -bordercolor $colors(-border) \ - -selectbackground $colors(-selectbg) \ - -selectforeground $colors(-selectfg) \ + -selectbackground $colors(-selectbackground) \ + -selectcolor $colors(-selectcolor) \ -font TkDefaultFont \ ; ttk::style map "." -background \ - [list disabled $colors(-frame) active $colors(-activebg)] ; - ttk::style map "." -foreground [list disabled $colors(-disabledfg)] ; + [list disabled $colors(-frame) active $colors(-activebackground)] ; + ttk::style map "." -color [list disabled $colors(-disabledcolor)] ; ttk::style map "." -embossed [list disabled 1] ; ttk::style configure TButton \ -anchor center -width -11 -padding "1 1" \ -relief raised -shiftrelief 1 \ @@ -62,24 +62,24 @@ ttk::style map TEntry -fieldbackground \ [list readonly $colors(-frame) disabled $colors(-frame)] ttk::style configure TCombobox -padding 1 ttk::style map TCombobox -fieldbackground \ [list readonly $colors(-frame) disabled $colors(-frame)] \ - -arrowcolor [list disabled $colors(-disabledfg)] + -arrowcolor [list disabled $colors(-disabledcolor)] ttk::style configure ComboboxPopdownFrame \ -relief solid -borderwidth 1 ttk::style configure TSpinbox -arrowsize 10 -padding {2 0 10 0} ttk::style map TSpinbox -fieldbackground \ [list readonly $colors(-frame) disabled $colors(-frame)] \ - -arrowcolor [list disabled $colors(-disabledfg)] + -arrowcolor [list disabled $colors(-disabledcolor)] ttk::style configure Toolbutton -relief flat -padding 2 ttk::style map Toolbutton -relief \ {disabled flat selected sunken pressed sunken active raised} ttk::style map Toolbutton -background \ - [list pressed $colors(-darker) active $colors(-activebg)] + [list pressed $colors(-darker) active $colors(-activebackground)] ttk::style configure TScrollbar -relief raised ttk::style configure TLabelframe -relief groove -borderwidth 2 @@ -94,16 +94,16 @@ # Treeview: ttk::style configure Heading -font TkHeadingFont -relief raised ttk::style configure Treeview -background $colors(-window) ttk::style map Treeview \ -background [list disabled $colors(-frame)\ - selected $colors(-selectbg)] \ - -foreground [list disabled $colors(-disabledfg) \ - selected $colors(-selectfg)] + selected $colors(-selectbackground)] \ + -color [list disabled $colors(-disabledcolor) \ + selected $colors(-selectcolor)] ttk::style configure TScale \ -groovewidth 4 -troughrelief sunken \ -sliderwidth raised -borderwidth 2 ttk::style configure TProgressbar \ - -background $colors(-selectbg) -borderwidth 0 + -background $colors(-selectbackground) -borderwidth 0 } } Index: library/ttk/aquaTheme.tcl ================================================================== --- library/ttk/aquaTheme.tcl +++ library/ttk/aquaTheme.tcl @@ -6,46 +6,46 @@ ttk::style theme settings aqua { ttk::style configure . \ -font TkDefaultFont \ -background systemWindowBackgroundColor \ - -foreground systemLabelColor \ + -color systemLabelColor \ -selectbackground systemSelectedTextBackgroundColor \ - -selectforeground systemSelectedTextColor \ + -selectcolor systemSelectedTextColor \ -selectborderwidth 0 \ -insertwidth 1 ttk::style map . \ - -foreground { + -color { disabled systemDisabledControlTextColor background systemLabelColor} \ -selectbackground { background systemSelectedTextBackgroundColor !focus systemSelectedTextBackgroundColor} \ - -selectforeground { + -selectcolor { background systemSelectedTextColor !focus systemSelectedTextColor} # Button ttk::style configure TButton -anchor center -width -6 \ - -foreground systemControlTextColor + -color systemControlTextColor ttk::style map TButton \ - -foreground { + -color { pressed white {alternate !pressed !background} white} ttk::style configure TMenubutton -anchor center -padding {2 0 0 2} ttk::style configure Toolbutton -anchor center # Entry ttk::style configure TEntry \ - -foreground systemTextColor \ + -color systemTextColor \ -background systemTextBackgroundColor ttk::style map TEntry \ - -foreground { + -color { disabled systemDisabledControlTextColor } \ - -selectforeground { + -selectcolor { background systemTextColor } \ -selectbackground { background systemTextBackgroundColor } @@ -58,43 +58,43 @@ # Notebook ttk::style configure TNotebook -tabmargins {10 0} -tabposition n ttk::style configure TNotebook -padding {18 8 18 17} ttk::style configure TNotebook.Tab -padding {12 3 12 2} - ttk::style configure TNotebook.Tab -foreground systemControlTextColor + ttk::style configure TNotebook.Tab -color systemControlTextColor ttk::style map TNotebook.Tab \ - -foreground { + -color { background systemControlTextColor disabled systemDisabledControlTextColor selected systemSelectedTabTextColor} # Combobox: ttk::style configure TCombobox \ - -foreground systemTextColor \ + -color systemTextColor \ -background systemTransparent ttk::style map TCombobox \ - -foreground { + -color { disabled systemDisabledControlTextColor } \ - -selectforeground { + -selectcolor { background systemTextColor } \ -selectbackground { background systemTransparent } # Spinbox ttk::style configure TSpinbox \ - -foreground systemTextColor \ + -color systemTextColor \ -background systemTextBackgroundColor \ - -selectforeground systemSelectedTextColor \ + -selectcolor systemSelectedTextColor \ -selectbackground systemSelectedTextBackgroundColor ttk::style map TSpinbox \ - -foreground { + -color { disabled systemDisabledControlTextColor } \ - -selectforeground { + -selectcolor { !active systemTextColor } \ -selectbackground { !active systemTextBackgroundColor !focus systemTextBackgroundColor @@ -102,15 +102,15 @@ } # Treeview: ttk::style configure Heading \ -font TkHeadingFont \ - -foreground systemTextColor \ + -color systemTextColor \ -background systemWindowBackgroundColor ttk::style configure Treeview -rowheight 18 \ -background systemTextBackgroundColor \ - -foreground systemTextColor \ + -color systemTextColor \ -fieldbackground systemTextBackgroundColor ttk::style map Treeview \ -background { selected systemSelectedTextBackgroundColor } Index: library/ttk/clamTheme.tcl ================================================================== --- library/ttk/clamTheme.tcl +++ library/ttk/clamTheme.tcl @@ -5,45 +5,45 @@ # namespace eval ttk::theme::clam { variable colors array set colors { - -disabledfg "#999999" + -disabledcolor "#999999" -frame "#dcdad5" -window "#ffffff" -dark "#cfcdc8" -darker "#bab5ab" -darkest "#9e9a91" -lighter "#eeebe7" -lightest "#ffffff" - -selectbg "#4a6984" - -selectfg "#ffffff" + -selectbackground "#4a6984" + -selectcolor "#ffffff" -altindicator "#5895bc" -disabledaltindicator "#a0a0a0" } ttk::style theme settings clam { ttk::style configure "." \ -background $colors(-frame) \ - -foreground black \ + -color black \ -bordercolor $colors(-darkest) \ -darkcolor $colors(-dark) \ -lightcolor $colors(-lighter) \ -troughcolor $colors(-darker) \ - -selectbackground $colors(-selectbg) \ - -selectforeground $colors(-selectfg) \ + -selectbackground $colors(-selectbackground) \ + -selectcolor $colors(-selectcolor) \ -selectborderwidth 0 \ -font TkDefaultFont \ ; ttk::style map "." \ -background [list disabled $colors(-frame) \ active $colors(-lighter)] \ - -foreground [list disabled $colors(-disabledfg)] \ + -color [list disabled $colors(-disabledcolor)] \ -selectbackground [list !focus $colors(-darkest)] \ - -selectforeground [list !focus white] \ + -selectcolor [list !focus white] \ ; # -selectbackground [list !focus "#847d73"] ttk::style configure TButton \ -anchor center -width -11 -padding 5 -relief raised @@ -96,30 +96,30 @@ -width -11 -padding 5 -relief raised ttk::style configure TEntry -padding 1 -insertwidth 1 ttk::style map TEntry \ -background [list readonly $colors(-frame)] \ - -bordercolor [list focus $colors(-selectbg)] \ + -bordercolor [list focus $colors(-selectbackground)] \ -lightcolor [list focus "#6f9dc6"] \ -darkcolor [list focus "#6f9dc6"] \ ; ttk::style configure TCombobox -padding 1 -insertwidth 1 ttk::style map TCombobox \ -background [list active $colors(-lighter) \ pressed $colors(-lighter)] \ - -fieldbackground [list {readonly focus} $colors(-selectbg) \ + -fieldbackground [list {readonly focus} $colors(-selectbackground) \ readonly $colors(-frame)] \ - -foreground [list {readonly focus} $colors(-selectfg)] \ - -arrowcolor [list disabled $colors(-disabledfg)] + -color [list {readonly focus} $colors(-selectcolor)] \ + -arrowcolor [list disabled $colors(-disabledcolor)] ttk::style configure ComboboxPopdownFrame \ -relief solid -borderwidth 1 ttk::style configure TSpinbox -arrowsize 10 -padding {2 0 10 0} ttk::style map TSpinbox \ -background [list readonly $colors(-frame)] \ - -arrowcolor [list disabled $colors(-disabledfg)] + -arrowcolor [list disabled $colors(-disabledcolor)] ttk::style configure TNotebook.Tab -padding {6 2 6 2} ttk::style map TNotebook.Tab \ -padding [list selected {6 4 6 2}] \ -background [list selected $colors(-frame) {} $colors(-darker)] \ @@ -130,13 +130,13 @@ ttk::style configure Heading \ -font TkHeadingFont -relief raised -padding {3} ttk::style configure Treeview -background $colors(-window) ttk::style map Treeview \ -background [list disabled $colors(-frame)\ - selected $colors(-selectbg)] \ - -foreground [list disabled $colors(-disabledfg) \ - selected $colors(-selectfg)] + selected $colors(-selectbackground)] \ + -color [list disabled $colors(-disabledcolor) \ + selected $colors(-selectcolor)] ttk::style configure TLabelframe \ -labeloutside true -labelmargins {0 0 0 4} \ -borderwidth 2 -relief raised Index: library/ttk/classicTheme.tcl ================================================================== --- library/ttk/classicTheme.tcl +++ library/ttk/classicTheme.tcl @@ -7,27 +7,27 @@ namespace eval ttk::theme::classic { variable colors; array set colors { -frame "#d9d9d9" -window "#ffffff" - -activebg "#ececec" - -troughbg "#c3c3c3" - -selectbg "#c3c3c3" - -selectfg "#000000" - -disabledfg "#a3a3a3" + -activebackground "#ececec" + -troughbackground "#c3c3c3" + -selectbackground "#c3c3c3" + -selectcolor "#000000" + -disabledcolor "#a3a3a3" -indicator "#b03060" -altindicator "#b05e5e" } ttk::style theme settings classic { ttk::style configure "." \ -font TkDefaultFont \ -background $colors(-frame) \ - -foreground black \ - -selectbackground $colors(-selectbg) \ - -selectforeground $colors(-selectfg) \ - -troughcolor $colors(-troughbg) \ + -color black \ + -selectbackground $colors(-selectbackground) \ + -selectcolor $colors(-selectcolor) \ + -troughcolor $colors(-troughbackground) \ -indicatorcolor $colors(-frame) \ -highlightcolor $colors(-frame) \ -highlightthickness 1 \ -selectborderwidth 1 \ -insertwidth 2 \ @@ -35,13 +35,13 @@ # To match pre-Xft X11 appearance, use: # ttk::style configure . -font {Helvetica 12 bold} ttk::style map "." -background \ - [list disabled $colors(-frame) active $colors(-activebg)] - ttk::style map "." -foreground \ - [list disabled $colors(-disabledfg)] + [list disabled $colors(-frame) active $colors(-activebackground)] + ttk::style map "." -color \ + [list disabled $colors(-disabledcolor)] ttk::style map "." -highlightcolor [list focus black] ttk::style configure TButton \ -anchor center -padding "3m 1m" -relief raised -shiftrelief 1 @@ -89,27 +89,27 @@ ttk::style map TScale -sliderrelief {{pressed !disabled} sunken} ttk::style configure TProgressbar -background SteelBlue ttk::style configure TNotebook.Tab \ -padding {3m 1m} \ - -background $colors(-troughbg) + -background $colors(-troughbackground) ttk::style map TNotebook.Tab -background [list selected $colors(-frame)] # Treeview: ttk::style configure Heading -font TkHeadingFont -relief raised ttk::style configure Treeview -background $colors(-window) ttk::style map Treeview \ -background [list disabled $colors(-frame)\ - selected $colors(-selectbg)] \ - -foreground [list disabled $colors(-disabledfg) \ - selected $colors(-selectfg)] + selected $colors(-selectbackground)] \ + -color [list disabled $colors(-disabledcolor) \ + selected $colors(-selectcolor)] # # Toolbar buttons: # ttk::style configure Toolbutton -padding 2 -relief flat -shiftrelief 2 ttk::style map Toolbutton -relief \ {disabled flat selected sunken pressed sunken active raised} ttk::style map Toolbutton -background \ - [list pressed $colors(-troughbg) active $colors(-activebg)] + [list pressed $colors(-troughbackground) active $colors(-activebackground)] } } Index: library/ttk/defaults.tcl ================================================================== --- library/ttk/defaults.tcl +++ library/ttk/defaults.tcl @@ -4,18 +4,18 @@ namespace eval ttk::theme::default { variable colors array set colors { -frame "#d9d9d9" - -foreground "#000000" + -color "#000000" -window "#ffffff" -text "#000000" - -activebg "#ececec" - -selectbg "#4a6984" - -selectfg "#ffffff" + -activebackground "#ececec" + -selectbackground "#4a6984" + -selectcolor "#ffffff" -darker "#c3c3c3" - -disabledfg "#a3a3a3" + -disabledcolor "#a3a3a3" -indicator "#4a6984" -disabledindicator "#a3a3a3" -altindicator "#9fbdd8" -disabledaltindicator "#c0c0c0" } @@ -23,34 +23,34 @@ ttk::style theme settings default { ttk::style configure "." \ -borderwidth 1 \ -background $colors(-frame) \ - -foreground $colors(-foreground) \ + -color $colors(-color) \ -troughcolor $colors(-darker) \ -font TkDefaultFont \ -selectborderwidth 1 \ - -selectbackground $colors(-selectbg) \ - -selectforeground $colors(-selectfg) \ + -selectbackground $colors(-selectbackground) \ + -selectcolor $colors(-selectcolor) \ -insertwidth 1 \ -indicatordiameter 10 \ ; ttk::style map "." -background \ - [list disabled $colors(-frame) active $colors(-activebg)] - ttk::style map "." -foreground \ - [list disabled $colors(-disabledfg)] + [list disabled $colors(-frame) active $colors(-activebackground)] + ttk::style map "." -color \ + [list disabled $colors(-disabledcolor)] ttk::style configure TButton \ -anchor center -padding "3 3" -width -9 \ -relief raised -shiftrelief 1 ttk::style map TButton -relief [list {!disabled pressed} sunken] ttk::style configure TCheckbutton \ -indicatorcolor "#ffffff" -indicatorrelief sunken -padding 1 ttk::style map TCheckbutton -indicatorcolor \ - [list pressed $colors(-activebg) \ + [list pressed $colors(-activebackground) \ {!disabled alternate} $colors(-altindicator) \ {disabled alternate} $colors(-disabledaltindicator) \ {!disabled selected} $colors(-indicator) \ {disabled selected} $colors(-disabledindicator)] ttk::style map TCheckbutton -indicatorrelief \ @@ -57,11 +57,11 @@ [list alternate raised] ttk::style configure TRadiobutton \ -indicatorcolor "#ffffff" -indicatorrelief sunken -padding 1 ttk::style map TRadiobutton -indicatorcolor \ - [list pressed $colors(-activebg) \ + [list pressed $colors(-activebackground) \ {!disabled alternate} $colors(-altindicator) \ {disabled alternate} $colors(-disabledaltindicator) \ {!disabled selected} $colors(-indicator) \ {disabled selected} $colors(-disabledindicator)] ttk::style map TRadiobutton -indicatorrelief \ @@ -76,29 +76,29 @@ [list readonly $colors(-frame) disabled $colors(-frame)] ttk::style configure TCombobox -arrowsize 12 -padding 1 ttk::style map TCombobox -fieldbackground \ [list readonly $colors(-frame) disabled $colors(-frame)] \ - -arrowcolor [list disabled $colors(-disabledfg)] + -arrowcolor [list disabled $colors(-disabledcolor)] ttk::style configure TSpinbox -arrowsize 10 -padding {2 0 10 0} ttk::style map TSpinbox -fieldbackground \ [list readonly $colors(-frame) disabled $colors(-frame)] \ - -arrowcolor [list disabled $colors(-disabledfg)] + -arrowcolor [list disabled $colors(-disabledcolor)] ttk::style configure TLabelframe \ -relief groove -borderwidth 2 ttk::style configure TScrollbar \ -width 12 -arrowsize 12 ttk::style map TScrollbar \ - -arrowcolor [list disabled $colors(-disabledfg)] + -arrowcolor [list disabled $colors(-disabledcolor)] ttk::style configure TScale \ -sliderrelief raised ttk::style configure TProgressbar \ - -background $colors(-selectbg) + -background $colors(-selectbackground) ttk::style configure TNotebook.Tab \ -padding {4 2} -background $colors(-darker) ttk::style map TNotebook.Tab \ -background [list selected $colors(-frame)] @@ -106,16 +106,16 @@ # Treeview. # ttk::style configure Heading -font TkHeadingFont -relief raised ttk::style configure Treeview \ -background $colors(-window) \ - -foreground $colors(-text) ; + -color $colors(-text) ; ttk::style map Treeview \ -background [list disabled $colors(-frame)\ - selected $colors(-selectbg)] \ - -foreground [list disabled $colors(-disabledfg) \ - selected $colors(-selectfg)] + selected $colors(-selectbackground)] \ + -color [list disabled $colors(-disabledcolor) \ + selected $colors(-selectcolor)] # Combobox popdown frame ttk::style layout ComboboxPopdownFrame { ComboboxPopdownFrame.border -sticky nswe } @@ -136,8 +136,8 @@ ttk::style configure Toolbutton \ -padding 2 -relief flat ttk::style map Toolbutton -relief \ [list disabled flat selected sunken pressed sunken active raised] ttk::style map Toolbutton -background \ - [list pressed $colors(-darker) active $colors(-activebg)] + [list pressed $colors(-darker) active $colors(-activebackground)] } } Index: library/ttk/vistaTheme.tcl ================================================================== --- library/ttk/vistaTheme.tcl +++ library/ttk/vistaTheme.tcl @@ -16,19 +16,19 @@ ttk::style theme settings vista { ttk::style configure . \ -background SystemButtonFace \ - -foreground SystemWindowText \ - -selectforeground SystemHighlightText \ + -color SystemWindowText \ + -selectcolor SystemHighlightText \ -selectbackground SystemHighlight \ -insertcolor SystemWindowText \ -font TkDefaultFont \ ; ttk::style map "." \ - -foreground [list disabled SystemGrayText] \ + -color [list disabled SystemGrayText] \ ; ttk::style configure TButton -anchor center -padding {1 1} -width -11 ttk::style configure TRadiobutton -padding 2 ttk::style configure TCheckbutton -padding 2 @@ -47,15 +47,15 @@ ttk::style configure Heading -font TkHeadingFont ttk::style configure Treeview -background SystemWindow ttk::style map Treeview \ -background [list disabled SystemButtonFace \ selected SystemHighlight] \ - -foreground [list disabled SystemGrayText \ + -color [list disabled SystemGrayText \ selected SystemHighlightText] # Label and Toolbutton - ttk::style configure TLabelframe.Label -foreground SystemButtonText + ttk::style configure TLabelframe.Label -color SystemButtonText ttk::style configure Toolbutton -padding {4 4} # Combobox ttk::style configure TCombobox -padding 2 @@ -86,12 +86,12 @@ ComboboxPopdownFrame.padding -sticky news } } ttk::style map TCombobox \ -selectbackground [list !focus SystemWindow] \ - -selectforeground [list !focus SystemWindowText] \ - -foreground [list \ + -selectcolor [list !focus SystemWindowText] \ + -color [list \ disabled SystemGrayText \ {readonly focus} SystemHighlightText \ ] \ -focusfill [list {readonly focus} SystemHighlight] \ ; @@ -111,11 +111,11 @@ } } } ttk::style map TEntry \ -selectbackground [list !focus SystemWindow] \ - -selectforeground [list !focus SystemWindowText] \ + -selectcolor [list !focus SystemWindowText] \ ; # Spinbox ttk::style configure TSpinbox -padding 0 ttk::style element create Spinbox.field vsapi \ @@ -146,11 +146,11 @@ } } } ttk::style map TSpinbox \ -selectbackground [list !focus SystemWindow] \ - -selectforeground [list !focus SystemWindowText] \ + -selectcolor [list !focus SystemWindowText] \ ; # SCROLLBAR elements (Vista includes a state for 'hover') ttk::style element create Vertical.Scrollbar.uparrow vsapi \ Index: library/ttk/winTheme.tcl ================================================================== --- library/ttk/winTheme.tcl +++ library/ttk/winTheme.tcl @@ -5,20 +5,20 @@ namespace eval ttk::theme::winnative { ttk::style theme settings winnative { ttk::style configure "." \ -background SystemButtonFace \ - -foreground SystemWindowText \ - -selectforeground SystemHighlightText \ + -color SystemWindowText \ + -selectcolor SystemHighlightText \ -selectbackground SystemHighlight \ -fieldbackground SystemWindow \ -insertcolor SystemWindowText \ -troughcolor SystemScrollbar \ -font TkDefaultFont \ ; - ttk::style map "." -foreground [list disabled SystemGrayText] ; + ttk::style map "." -color [list disabled SystemGrayText] ; ttk::style map "." -embossed [list disabled 1] ; ttk::style configure TButton \ -anchor center -width -11 -relief raised -shiftrelief 1 ttk::style configure TCheckbutton -padding "2 4" @@ -32,21 +32,21 @@ -padding 2 -selectborderwidth 0 -insertwidth 1 ttk::style map TEntry \ -fieldbackground \ [list readonly SystemButtonFace disabled SystemButtonFace] \ -selectbackground [list !focus SystemWindow] \ - -selectforeground [list !focus SystemWindowText] \ + -selectcolor [list !focus SystemWindowText] \ ; ttk::style configure TCombobox -padding 2 ttk::style map TCombobox \ -selectbackground [list !focus SystemWindow] \ - -selectforeground [list !focus SystemWindowText] \ + -selectcolor [list !focus SystemWindowText] \ -fieldbackground [list \ readonly SystemButtonFace \ disabled SystemButtonFace] \ - -foreground [list \ + -color [list \ disabled SystemGrayText \ {readonly focus} SystemHighlightText \ ] \ -focusfill [list {readonly focus} SystemHighlight] \ ; @@ -73,12 +73,12 @@ ttk::style configure Heading -font TkHeadingFont -relief raised ttk::style configure Treeview -background SystemWindow ttk::style map Treeview \ -background [list disabled SystemButtonFace \ selected SystemHighlight] \ - -foreground [list disabled SystemGrayText \ + -color [list disabled SystemGrayText \ selected SystemHighlightText] ttk::style configure TProgressbar \ -background SystemHighlight -borderwidth 0 ; } } Index: library/ttk/xpTheme.tcl ================================================================== --- library/ttk/xpTheme.tcl +++ library/ttk/xpTheme.tcl @@ -6,19 +6,19 @@ ttk::style theme settings xpnative { ttk::style configure . \ -background SystemButtonFace \ - -foreground SystemWindowText \ - -selectforeground SystemHighlightText \ + -color SystemWindowText \ + -selectcolor SystemHighlightText \ -selectbackground SystemHighlight \ -insertcolor SystemWindowText \ -font TkDefaultFont \ ; ttk::style map "." \ - -foreground [list disabled SystemGrayText] \ + -color [list disabled SystemGrayText] \ ; ttk::style configure TButton -anchor center -padding {1 1} -width -11 ttk::style configure TRadiobutton -padding 2 ttk::style configure TCheckbutton -padding 2 @@ -26,33 +26,33 @@ ttk::style configure TNotebook -tabmargins {2 2 2 0} ttk::style map TNotebook.Tab \ -expand [list selected {2 2 2 2}] - ttk::style configure TLabelframe.Label -foreground "#0046d5" + ttk::style configure TLabelframe.Label -color "#0046d5" # OR: -padding {3 3 3 6}, which some apps seem to use. ttk::style configure TEntry -padding {2 2 2 4} ttk::style map TEntry \ -selectbackground [list !focus SystemWindow] \ - -selectforeground [list !focus SystemWindowText] \ + -selectcolor [list !focus SystemWindowText] \ ; ttk::style configure TCombobox -padding 2 ttk::style map TCombobox \ -selectbackground [list !focus SystemWindow] \ - -selectforeground [list !focus SystemWindowText] \ - -foreground [list \ + -selectcolor [list !focus SystemWindowText] \ + -color [list \ disabled SystemGrayText \ {readonly focus} SystemHighlightText \ ] \ -focusfill [list {readonly focus} SystemHighlight] \ ; ttk::style configure TSpinbox -padding {2 0 14 0} ttk::style map TSpinbox \ -selectbackground [list !focus SystemWindow] \ - -selectforeground [list !focus SystemWindowText] \ + -selectcolor [list !focus SystemWindowText] \ ; ttk::style configure Toolbutton -padding {4 4} # Treeview: @@ -59,9 +59,9 @@ ttk::style configure Heading -font TkHeadingFont -relief raised ttk::style configure Treeview -background SystemWindow ttk::style map Treeview \ -background [list disabled SystemButtonFace \ selected SystemHighlight] \ - -foreground [list disabled SystemGrayText \ + -color [list disabled SystemGrayText \ selected SystemHighlightText]; } } Index: library/xmfbox.tcl ================================================================== --- library/xmfbox.tcl +++ library/xmfbox.tcl @@ -325,12 +325,12 @@ upvar ::tk::dialog::file::$dataName data # Create the dialog toplevel and internal frames. # toplevel $w -class TkMotifFDialog - set top [frame $w.top -relief raised -bd 1] - set bot [frame $w.bot -relief raised -bd 1] + set top [frame $w.top -relief raised -borderwidth 1] + set bot [frame $w.bot -relief raised -borderwidth 1] pack $w.bot -side bottom -fill x pack $w.top -side top -expand yes -fill both set f1 [frame $top.f1] Index: macosx/tkMacOSXDialog.c ================================================================== --- macosx/tkMacOSXDialog.c +++ macosx/tkMacOSXDialog.c @@ -21,11 +21,11 @@ #define modalCancel NSCancelButton #else #define modalOK NSModalResponseOK #define modalCancel NSModalResponseCancel #endif // MAC_OS_X_VERSION_MIN_REQUIRED < 1090 -#define modalOther -1 // indicates that the -command option was used. +#define modalOther -1 // indicates that the -command option was used. #define modalError -2 /* * Vars for filtering in "open file" and "save file" dialogs. */ @@ -373,11 +373,11 @@ } else { modalReturnCode = [NSApp runModalForWindow:panel]; } } else { - /* + /* * For the standalone file dialog, completion handlers do not work * at all on macOS 10.14 and earlier. */ if ([NSApp macOSVersion] > 101400) { Index: tests/bevel.tcl ================================================================== --- tests/bevel.tcl +++ tests/bevel.tcl @@ -8,11 +8,11 @@ wm iconname .t "Text Borders" wm geom .t +0+0 text .t.t -width 60 -height 30 -setgrid true -xscrollcommand {.t.h set} \ -font {Courier 12} \ - -yscrollcommand {.t.v set} -wrap none -relief raised -bd 2 + -yscrollcommand {.t.v set} -wrap none -relief raised -borderwidth 2 scrollbar .t.v -orient vertical -command ".t.t yview" scrollbar .t.h -orient horizontal -command ".t.t xview" button .t.quit -text Quit -command {destroy .t} pack .t.quit -side bottom -pady 3 -ipadx 4 -ipady 2 pack .t.h -side bottom -fill x @@ -126,13 +126,13 @@ .t.t insert end ***** .t.t insert end rrr r1 font configure TkFixedFont -size 20 .t.t tag configure sol100 -relief solid -borderwidth 100 \ - -foreground red -font TkFixedFont + -color red -font TkFixedFont .t.t tag configure sol12 -relief solid -borderwidth 12 \ - -foreground red -font TkFixedFont + -color red -font TkFixedFont .t.t tag configure big -font TkFixedFont set ind [.t.t index end] .t.t insert end "\n\nBorders do not leak on the neighbour chars" .t.t insert end "\nOnly \"S\" is on dark background" Index: tests/bind.test ================================================================== --- tests/bind.test +++ tests/bind.test @@ -13,11 +13,10 @@ tcltest::loadTestedCommands tk useinputmethods 0 testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] - toplevel .t -width 100 -height 50 wm geom .t +0+0 update idletasks foreach p [event info] {event delete $p} @@ -7015,11 +7014,11 @@ event generate {} -warp 1 -x 50 -y 50 toplevel .top 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 -background yellow -text "My label" pack .top.l -side bottom update # On KDE/Plasma _with_the_Aurorae_theme_ (at least), setting up the toplevel # and the label will not be finished after the above 'update'. The WM still # needs some time before the window is fully ready. For me 50 ms is enough, Index: tests/border.test ================================================================== --- tests/border.test +++ tests/border.test @@ -13,11 +13,11 @@ test border-1.1 {Tk_AllocBorderFromObj - converting internal reps} -constraints { testborder } -body { set x orange lindex $x 0 - button .b1 -bg $x -text .b1 + button .b1 -background $x -text .b1 lindex $x 0 testborder orange } -cleanup { destroy .b1 } -result {{1 0}} @@ -25,14 +25,14 @@ testborder } -setup { set result {} } -body { set x orange - button .b1 -bg $x -text First + button .b1 -background $x -text First destroy .b1 lappend result [testborder orange] - button .b2 -bg $x -text Second + button .b2 -background $x -text Second lappend result [testborder orange] } -cleanup { destroy .b1 .b2 } -result {{} {{1 1}}} test border-1.3 {Tk_AllocBorderFromObj - reuse existing border} -constraints { @@ -39,13 +39,13 @@ testborder } -setup { set result {} } -body { set x orange - button .b1 -bg $x -text First + button .b1 -background $x -text First lappend result [testborder orange] - button .b2 -bg $x -text Second + button .b2 -background $x -text Second pack .b1 .b2 -side top lappend result [testborder orange] } -cleanup { destroy .b1 .b2 } -result {{{1 1}} {{2 1}}} @@ -55,17 +55,17 @@ toplevel .t -visual {pseudocolor 8} -colormap new wm geom .t +0+0 set result {} } -body { set x purple - button .b1 -bg $x -text First + button .b1 -background $x -text First pack .b1 -side top lappend result [testborder purple] - button .t.b -bg $x -text Second + button .t.b -background $x -text Second pack .t.b -side top lappend result [testborder purple] - button .b2 -bg $x -text Third + button .b2 -background $x -text Third pack .b2 -side top lappend result [testborder purple] } -cleanup { destroy .b1 .b2 .t } -result {{{1 1}} {{1 1} {1 0}} {{1 0} {2 1}}} @@ -76,15 +76,15 @@ toplevel .t -visual {pseudocolor 8} -colormap new wm geom .t +0+0 set result {} } -body { set x purple - button .b1 -bg $x -text First + button .b1 -background $x -text First pack .b1 -side top - button .t.b -bg $x -text Second + button .t.b -background $x -text Second pack .t.b -side top - button .b2 -bg $x -text Third + button .b2 -background $x -text Third pack .b2 -side top lappend result [testborder purple] destroy .b1 lappend result [testborder purple] destroy .b2 @@ -102,20 +102,20 @@ toplevel .t2 -visual {pseudocolor 8} -colormap new toplevel .t3 -visual {pseudocolor 8} -colormap new set result {} } -body { set x purple - button .b -bg $x -text .b1 - button .t.b1 -bg $x -text .t.b1 - button .t.b2 -bg $x -text .t.b2 - button .t2.b1 -bg $x -text .t2.b1 - button .t2.b2 -bg $x -text .t2.b2 - button .t2.b3 -bg $x -text .t2.b3 - button .t3.b1 -bg $x -text .t3.b1 - button .t3.b2 -bg $x -text .t3.b2 - button .t3.b3 -bg $x -text .t3.b3 - button .t3.b4 -bg $x -text .t3.b4 + button .b -background $x -text .b1 + button .t.b1 -background $x -text .t.b1 + button .t.b2 -background $x -text .t.b2 + button .t2.b1 -background $x -text .t2.b1 + button .t2.b2 -background $x -text .t2.b2 + button .t2.b3 -background $x -text .t2.b3 + button .t3.b1 -background $x -text .t3.b1 + button .t3.b2 -background $x -text .t3.b2 + button .t3.b3 -background $x -text .t3.b3 + button .t3.b4 -background $x -text .t3.b4 lappend result [testborder purple] destroy .t2 lappend result [testborder purple] destroy .b lappend result [testborder purple] @@ -133,15 +133,15 @@ } -setup { set result {} proc copy {s} {return [string index $s 0][string range $s 1 end]} } -body { set x [copy purple] - button .b -bg $x -text .b1 + button .b -background $x -text .b1 set y [copy purple] - .b configure -bg $y + .b configure -background $y set z [copy purple] - .b configure -bg $z + .b configure -background $z lappend result [testborder purple] set x red lappend result [testborder purple] set z 32 lappend result [testborder purple] Index: tests/butGeom.tcl ================================================================== --- tests/butGeom.tcl +++ tests/butGeom.tcl @@ -15,11 +15,11 @@ pack .t.quit -side bottom -pady 2m set sepId 1 proc sep {} { global sepId - frame .t.sep$sepId -height 2 -bd 1 -relief sunken + frame .t.sep$sepId -height 2 -borderwidth 1 -relief sunken pack .t.sep$sepId -side top -padx 2m -pady 2m -fill x incr sepId } # Create buttons that control configuration options. @@ -79,13 +79,13 @@ sep frame .t.f4 pack .t.f4 -side top -expand 1 -fill both sep -label .t.l1 -text Label -bd 2 -relief sunken -label .t.l2 -text "Explicit\nnewlines\n\nin the text" -bd 2 -relief sunken -label .t.l3 -text "This text is quite long, so it must be wrapped automatically by Tk" -wraplength 2i -bd 2 -relief sunken -underline 50 +label .t.l1 -text Label -borderwidth 2 -relief sunken +label .t.l2 -text "Explicit\nnewlines\n\nin the text" -borderwidth 2 -relief sunken +label .t.l3 -text "This text is quite long, so it must be wrapped automatically by Tk" -wraplength 2i -borderwidth 2 -relief sunken -underline 50 pack .t.l1 .t.l2 .t.l3 -in .t.f1 -side left -padx 5m -pady 3m \ -expand y -fill both button .t.b1 -text Button button .t.b2 -text "Explicit\nnewlines\n\nin the text" Index: tests/butGeom2.tcl ================================================================== --- tests/butGeom2.tcl +++ tests/butGeom2.tcl @@ -15,11 +15,11 @@ pack .t.quit -side bottom -pady 2m set sepId 1 proc sep {} { global sepId - frame .t.sep$sepId -height 2 -bd 1 -relief sunken + frame .t.sep$sepId -height 2 -borderwidth 1 -relief sunken pack .t.sep$sepId -side top -padx 2m -pady 2m -fill x incr sepId } # Create buttons that control configuration options. @@ -33,11 +33,11 @@ frame .t.control.left.f -width 6c -height 3c pack .t.anchorLabel .t.control.left.f -in .t.control.left -side top -anchor w foreach opt {activebackground activeforeground background disabledforeground foreground highlightbackground highlightcolor } { #button .t.color-$opt -text $opt -command "config -$opt \[tk_chooseColor]" menubutton .t.color-$opt -text $opt -menu .t.color-$opt.m -indicatoron 1 \ - -relief raised -bd 2 + -relief raised -borderwidth 2 menu .t.color-$opt.m -tearoff 0 .t.color-$opt.m add command -label Red -command "config -$opt red" .t.color-$opt.m add command -label Green -command "config -$opt green" .t.color-$opt.m add command -label Blue -command "config -$opt blue" .t.color-$opt.m add command -label Other... \ @@ -71,13 +71,13 @@ sep frame .t.f4 pack .t.f4 -side top -expand 1 -fill both sep -label .t.l1 -text Label -bd 2 -relief sunken -label .t.l2 -text "Explicit\nnewlines\n\nin the text" -bd 2 -relief sunken -label .t.l3 -text "This text is quite long, so it must be wrapped automatically by Tk" -wraplength 2i -bd 2 -relief sunken -underline 50 +label .t.l1 -text Label -borderwidth 2 -relief sunken +label .t.l2 -text "Explicit\nnewlines\n\nin the text" -borderwidth 2 -relief sunken +label .t.l3 -text "This text is quite long, so it must be wrapped automatically by Tk" -wraplength 2i -borderwidth 2 -relief sunken -underline 50 pack .t.l1 .t.l2 .t.l3 -in .t.f1 -side left -padx 5m -pady 3m \ -expand y -fill both button .t.b1 -text Button button .t.b2 -text "Explicit\nnewlines\n\nin the text" Index: tests/button.test ================================================================== --- tests/button.test +++ tests/button.test @@ -11,10 +11,12 @@ namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands imageInit +testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] + proc bogusTrace args { error "trace aborted" } test button-1.1 {configuration option: "activebackground" for label} -setup { @@ -97,78 +99,78 @@ test button-1.9 {configuration option: "activeforeground" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .l update } -body { - .l configure -activeforeground #ff0000 - .l cget -activeforeground + .l configure -activecolor #ff0000 + .l cget -activecolor } -cleanup { destroy .l } -result {#ff0000} test button-1.10 {configuration option: "activeforeground" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .l update } -body { - .l configure -activeforeground non-existent + .l configure -activecolor non-existent } -cleanup { destroy .l } -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 update } -body { - .b configure -activeforeground #ff0000 - .b cget -activeforeground + .b configure -activecolor #ff0000 + .b cget -activecolor } -cleanup { destroy .b } -result {#ff0000} test button-1.12 {configuration option: "activeforeground" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b update } -body { - .b configure -activeforeground non-existent + .b configure -activecolor non-existent } -cleanup { destroy .b } -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 update } -body { - .c configure -activeforeground #ff0000 - .c cget -activeforeground + .c configure -activecolor #ff0000 + .c cget -activecolor } -cleanup { destroy .c } -result {#ff0000} test button-1.14 {configuration option: "activeforeground" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c update } -body { - .c configure -activeforeground non-existent + .c configure -activecolor non-existent } -cleanup { destroy .c } -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 update } -body { - .r configure -activeforeground #ff0000 - .r cget -activeforeground + .r configure -activecolor #ff0000 + .r cget -activecolor } -cleanup { destroy .r } -result {#ff0000} test button-1.16 {configuration option: "activeforeground" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r update } -body { - .r configure -activeforeground non-existent + .r configure -activecolor non-existent } -cleanup { destroy .r } -returnCodes {error} -result {unknown color name "non-existent"} test button-1.17 {configuration option: "anchor" for label} -setup { @@ -328,155 +330,155 @@ test button-1.33 {configuration option: "bd" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .l update } -body { - .l configure -bd 4 - .l cget -bd + .l configure -borderwidth 4 + .l cget -borderwidth } -cleanup { destroy .l } -result 4 test button-1.34 {configuration option: "bd" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .l update } -body { - .l configure -bd badValue + .l configure -borderwidth badValue } -cleanup { destroy .l } -returnCodes {error} -result {bad screen distance "badValue"} test button-1.35 {configuration option: "bd" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b update } -body { - .b configure -bd 4 - .b cget -bd + .b configure -borderwidth 4 + .b cget -borderwidth } -cleanup { destroy .b } -result 4 test button-1.36 {configuration option: "bd" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b update } -body { - .b configure -bd badValue + .b configure -borderwidth badValue } -cleanup { destroy .b } -returnCodes {error} -result {bad screen distance "badValue"} test button-1.37 {configuration option: "bd" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c update } -body { - .c configure -bd 4 - .c cget -bd + .c configure -borderwidth 4 + .c cget -borderwidth } -cleanup { destroy .c } -result 4 test button-1.38 {configuration option: "bd" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c update } -body { - .c configure -bd badValue + .c configure -borderwidth badValue } -cleanup { destroy .c } -returnCodes {error} -result {bad screen distance "badValue"} test button-1.39 {configuration option: "bd" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r update } -body { - .r configure -bd 4 - .r cget -bd + .r configure -borderwidth 4 + .r cget -borderwidth } -cleanup { destroy .r } -result 4 test button-1.40 {configuration option: "bd" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r update } -body { - .r configure -bd badValue + .r configure -borderwidth badValue } -cleanup { destroy .r } -returnCodes {error} -result {bad screen distance "badValue"} test button-1.41 {configuration option: "bg" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .l update } -body { - .l configure -bg #ff0000 - .l cget -bg + .l configure -background #ff0000 + .l cget -background } -cleanup { destroy .l } -result {#ff0000} test button-1.42 {configuration option: "bg" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .l update } -body { - .l configure -bg non-existent + .l configure -background non-existent } -cleanup { destroy .l } -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 update } -body { - .b configure -bg #ff0000 - .b cget -bg + .b configure -background #ff0000 + .b cget -background } -cleanup { destroy .b } -result {#ff0000} test button-1.44 {configuration option: "bg" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b update } -body { - .b configure -bg non-existent + .b configure -background non-existent } -cleanup { destroy .b } -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 update } -body { - .c configure -bg #ff0000 - .c cget -bg + .c configure -background #ff0000 + .c cget -background } -cleanup { destroy .c } -result {#ff0000} test button-1.46 {configuration option: "bg" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c update } -body { - .c configure -bg non-existent + .c configure -background non-existent } -cleanup { destroy .c } -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 update } -body { - .r configure -bg #ff0000 - .r cget -bg + .r configure -background #ff0000 + .r cget -background } -cleanup { destroy .r } -result {#ff0000} test button-1.48 {configuration option: "bg" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r update } -body { - .r configure -bg non-existent + .r configure -background non-existent } -cleanup { destroy .r } -returnCodes {error} -result {unknown color name "non-existent"} test button-1.49 {configuration option: "bitmap" for label} -setup { @@ -851,155 +853,155 @@ test button-1.87 {configuration option: "disabledforeground" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .l update } -body { - .l configure -disabledforeground #00ff00 - .l cget -disabledforeground + .l configure -disabledcolor #00ff00 + .l cget -disabledcolor } -cleanup { destroy .l } -result {#00ff00} test button-1.88 {configuration option: "disabledforeground" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .l update } -body { - .l configure -disabledforeground non-existent + .l configure -disabledcolor non-existent } -cleanup { destroy .l } -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 update } -body { - .b configure -disabledforeground #00ff00 - .b cget -disabledforeground + .b configure -disabledcolor #00ff00 + .b cget -disabledcolor } -cleanup { destroy .b } -result {#00ff00} test button-1.90 {configuration option: "disabledforeground" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b update } -body { - .b configure -disabledforeground non-existent + .b configure -disabledcolor non-existent } -cleanup { destroy .b } -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 update } -body { - .c configure -disabledforeground #00ff00 - .c cget -disabledforeground + .c configure -disabledcolor #00ff00 + .c cget -disabledcolor } -cleanup { destroy .c } -result {#00ff00} test button-1.92 {configuration option: "disabledforeground" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c update } -body { - .c configure -disabledforeground non-existent + .c configure -disabledcolor non-existent } -cleanup { destroy .c } -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 update } -body { - .r configure -disabledforeground #00ff00 - .r cget -disabledforeground + .r configure -disabledcolor #00ff00 + .r cget -disabledcolor } -cleanup { destroy .r } -result {#00ff00} test button-1.94 {configuration option: "disabledforeground" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r update } -body { - .r configure -disabledforeground non-existent + .r configure -disabledcolor non-existent } -cleanup { destroy .r } -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} pack .l update } -body { - .l configure -fg #110022 - .l cget -fg + .l configure -color #110022 + .l cget -color } -cleanup { destroy .l } -result {#110022} test button-1.96 {configuration option: "fg" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .l update } -body { - .l configure -fg non-existent + .l configure -color non-existent } -cleanup { destroy .l } -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 update } -body { - .b configure -fg #110022 - .b cget -fg + .b configure -color #110022 + .b cget -color } -cleanup { destroy .b } -result {#110022} test button-1.98 {configuration option: "fg" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b update } -body { - .b configure -fg non-existent + .b configure -color non-existent } -cleanup { destroy .b } -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 update } -body { - .c configure -fg #110022 - .c cget -fg + .c configure -color #110022 + .c cget -color } -cleanup { destroy .c } -result {#110022} test button-1.100 {configuration option: "fg" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c update } -body { - .c configure -fg non-existent + .c configure -color non-existent } -cleanup { destroy .c } -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 update } -body { - .r configure -fg #110022 - .r cget -fg + .r configure -color #110022 + .r cget -color } -cleanup { destroy .r } -result {#110022} test button-1.102 {configuration option: "fg" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r update } -body { - .r configure -fg non-existent + .r configure -color non-existent } -cleanup { destroy .r } -returnCodes {error} -result {unknown color name "non-existent"} test button-1.103 {configuration option: "font" for label} -setup { @@ -1082,78 +1084,78 @@ test button-1.111 {configuration option: "foreground" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .l update } -body { - .l configure -foreground #110022 - .l cget -foreground + .l configure -color #110022 + .l cget -color } -cleanup { destroy .l } -result {#110022} test button-1.112 {configuration option: "foreground" for label} -setup { label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .l update } -body { - .l configure -foreground non-existent + .l configure -color non-existent } -cleanup { destroy .l } -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 update } -body { - .b configure -foreground #110022 - .b cget -foreground + .b configure -color #110022 + .b cget -color } -cleanup { destroy .b } -result {#110022} test button-1.114 {configuration option: "foreground" for button} -setup { button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .b update } -body { - .b configure -foreground non-existent + .b configure -color non-existent } -cleanup { destroy .b } -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 update } -body { - .c configure -foreground #110022 - .c cget -foreground + .c configure -color #110022 + .c cget -color } -cleanup { destroy .c } -result {#110022} test button-1.116 {configuration option: "foreground" for checkbutton} -setup { checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .c update } -body { - .c configure -foreground non-existent + .c configure -color non-existent } -cleanup { destroy .c } -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 update } -body { - .r configure -foreground #110022 - .r cget -foreground + .r configure -color #110022 + .r cget -color } -cleanup { destroy .r } -result {#110022} test button-1.118 {configuration option: "foreground" for radiobutton} -setup { radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .r update } -body { - .r configure -foreground non-existent + .r configure -color non-existent } -cleanup { destroy .r } -returnCodes {error} -result {unknown color name "non-existent"} test button-1.119 {configuration option: "height" for label} -setup { @@ -2783,17 +2785,17 @@ } -returnCodes {error} -result {unknown option "-gorp"} #ex 4.7 test button-3.6 {ButtonWidgetCmd procedure, "cget" option} -body { label .l - .l cget -disabledforeground + .l cget -disabledcolor } -cleanup { destroy .l } -returnCodes {ok} -match {glob} -result {*} test button-3.7 {ButtonWidgetCmd procedure, "cget" option} -body { button .b - .b cget -disabledforeground + .b cget -disabledcolor } -cleanup { destroy .b } -returnCodes {ok} -match {glob} -result {*} test button-3.8 {ButtonWidgetCmd procedure, "cget" option} -body { button .b @@ -2833,35 +2835,35 @@ button .b -highlightthickness 3 lindex [.b configure -highlightthickness] 4 } -cleanup { destroy .b } -result 3 -test button-3.14 {ButtonWidgetCmd procedure, "configure" option} -body { +test button-3.14 {ButtonWidgetCmd procedure, "configure" option} -constraints nodeprecated -body { checkbutton .c llength [.c configure] } -cleanup { destroy .c -} -result 41 +} -result 44 test button-3.15 {ButtonWidgetCmd procedure, "configure" option} -body { button .b .b configure -gorp } -cleanup { destroy .b } -returnCodes {error} -result {unknown option "-gorp"} test button-3.16 {ButtonWidgetCmd procedure, "configure" option} -setup { button .b } -body { - .b co -bg #ffffff -fg + .b co -background #ffffff -color } -cleanup { destroy .b -} -returnCodes {error} -result {value for "-fg" missing} +} -returnCodes {error} -result {value for "-color" missing} test button-3.17 {ButtonWidgetCmd procedure, "configure" option} -setup { button .b } -body { - .b configure -fg #123456 - .b configure -bg #654321 - lindex [.b configure -fg] 4 + .b configure -color #123456 + .b configure -background #654321 + lindex [.b configure -color] 4 } -cleanup { destroy .b } -result {#123456} test button-3.18 {ButtonWidgetCmd procedure, "deselect" option} -body { checkbutton .c @@ -3201,13 +3203,13 @@ } -setup { image create test image1 unset -nocomplain x } -body { button .b1 -image image1 - button .b2 -fg #ff0000 -text "Button 2" + button .b2 -color #ff0000 -text "Button 2" button .b3 -state active -text "Button 3" - button .b4 -disabledforeground #0000ff -state disabled -text "Button 4" + button .b4 -disabledcolor #0000ff -state disabled -text "Button 4" checkbutton .b5 -variable x -text "Checkbutton 5" set x 1 pack .b1 .b2 .b3 .b4 .b5 update deleteWindows @@ -3215,19 +3217,19 @@ destroy .b1 .b2 .b3 .b4 .b5 image delete image1 } -result {} test button-5.1 {ConfigureButton - textvariable trace} -body { - button .b -bd 4 -bg green - .b configure -bd 7 -bg red -fg bogus + button .b -borderwidth 4 -background green + .b configure -borderwidth 7 -background red -color bogus } -cleanup { destroy .b } -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} - list [.b cget -bd] [.b cget -bg] + button .b -borderwidth 4 -background green + catch {.b configure -borderwidth 7 -background red -color bogus} + list [.b cget -borderwidth] [.b cget -background] } -cleanup { destroy .b } -result {4 green} test button-5.3 {ConfigureButton - textvariable trace} -body { button .b -textvariable x @@ -3501,14 +3503,14 @@ } -result {0 {}} test button-6.2 {ButtonEventProc procedure} -setup { set x {} } -body { - button .b1 -bg #543210 + button .b1 -background #543210 rename .b1 .b2 lappend x [winfo children .] - lappend x [.b2 cget -bg] + lappend x [.b2 cget -background] destroy .b1 lappend x [info command .b*] [winfo children .] } -cleanup { destroy .b1 } -result {.b1 #543210 {} {}} @@ -3757,11 +3759,11 @@ testImageType } -setup { label .l -highlightthickness 0 -font {Helvetica -12 bold} image create test image1 } -body { - .l configure -image image1 -padx 0 -pady 0 -bd 0 + .l configure -image image1 -padx 0 -pady 0 -borderwidth 0 pack .l set result "[winfo reqwidth .l] [winfo reqheight .l]" image1 changed 0 0 0 0 80 100 lappend result [winfo reqwidth .l] [winfo reqheight .l] } -cleanup { Index: tests/canvMoveto.test ================================================================== --- tests/canvMoveto.test +++ tests/canvMoveto.test @@ -8,11 +8,11 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands -canvas .c -width 400 -height 300 -bd 2 -relief sunken +canvas .c -width 400 -height 300 -borderwidth 2 -relief sunken .c create rectangle 20 20 80 80 -tag {test rect1} .c create rectangle 40 40 90 100 -tag {test rect2} test canvMoveto-1.1 {Bad args handling for "moveto" command} -body { .c moveto test Index: tests/canvPs.test ================================================================== --- tests/canvPs.test +++ tests/canvPs.test @@ -11,11 +11,11 @@ eval tcltest::configure $argv tcltest::loadTestedCommands imageInit # canvas used in 1.* and 2.* test cases -canvas .c -width 400 -height 300 -bd 2 -relief sunken +canvas .c -width 400 -height 300 -borderwidth 2 -relief sunken .c create rectangle 20 20 80 80 -fill red pack .c update test canvPs-1.1 {test writing to a file} -constraints { @@ -146,11 +146,11 @@ image create photo logo \ -file [file join [file dirname [info script]] pwrdLogo150.gif] .c create image 200 50 -image logo -anchor nw - entry .c.e -background pink -foreground blue -width 14 + entry .c.e -background pink -color blue -width 14 .c.e insert 0 "we gonna be postscripted" .c create window 50 180 -anchor nw -window .c.e update .c postscript -file $bar file exists $bar @@ -162,11 +162,11 @@ test canvPs-3.2 {test ps generation with an embedded window not mapped} -setup { set bar [makeFile {} bar.ps] file delete $bar } -body { pack [canvas .c -width 200 -height 200 -background white] - entry .c.e -background pink -foreground blue -width 14 + entry .c.e -background pink -color blue -width 14 .c.e insert 0 "we gonna be postscripted" .c create window 50 180 -anchor nw -window .c.e .c postscript -file $bar file exists $bar } -cleanup { Index: tests/canvPsArc.tcl ================================================================== --- tests/canvPsArc.tcl +++ tests/canvPsArc.tcl @@ -18,11 +18,11 @@ pack .t.bot -side bottom -fill both button .t.bot.quit -text Quit -command {destroy .t} button .t.bot.print -text Print -command "lpr $c" pack .t.bot.print .t.bot.quit -side left -pady 1m -expand 1 -canvas $c -width 6i -height 6i -bd 2 -relief sunken +canvas $c -width 6i -height 6i -borderwidth 2 -relief sunken pack $c -expand yes -fill both -padx 2m -pady 2m $c create arc .5i .5i 2i 2i -style pieslice -start 20 -extent 90 \ -fill black -outline {} $c create arc 2.5i 0 4.5i 1i -style pieslice -start -45 -extent -135 \ Index: tests/canvPsBmap.tcl ================================================================== --- tests/canvPsBmap.tcl +++ tests/canvPsBmap.tcl @@ -18,58 +18,58 @@ pack .t.bot -side bottom -fill both button .t.bot.quit -text Quit -command {destroy .t} button .t.bot.print -text Print -command "lpr $c" pack .t.bot.print .t.bot.quit -side left -pady 1m -expand 1 -canvas $c -width 6i -height 6i -bd 2 -relief sunken +canvas $c -width 6i -height 6i -borderwidth 2 -relief sunken pack $c -expand yes -fill both -padx 2m -pady 2m set canvPsBmapImageDir [file join [file dirname [info script]] images] $c create bitmap 0.5i 0.5i \ -bitmap @[file join $canvPsBmapImageDir flagdown.xbm] \ - -background {} -foreground black -anchor nw + -background {} -color black -anchor nw $c create rect 0.47i 0.47i 0.53i 0.53i -fill {} -outline black $c create bitmap 3.0i 0.5i \ -bitmap @[file join $canvPsBmapImageDir flagdown.xbm] \ - -background {} -foreground black -anchor n + -background {} -color black -anchor n $c create rect 2.97i 0.47i 3.03i 0.53i -fill {} -outline black $c create bitmap 5.5i 0.5i \ -bitmap @[file join $canvPsBmapImageDir flagdown.xbm] \ - -background black -foreground white -anchor ne + -background black -color white -anchor ne $c create rect 5.47i 0.47i 5.53i 0.53i -fill {} -outline black $c create bitmap 0.5i 3.0i \ -bitmap @[file join $canvPsBmapImageDir face.xbm] \ - -background {} -foreground black -anchor w + -background {} -color black -anchor w $c create rect 0.47i 2.97i 0.53i 3.03i -fill {} -outline black $c create bitmap 3.0i 3.0i \ -bitmap @[file join $canvPsBmapImageDir face.xbm] \ - -background {} -foreground black -anchor center + -background {} -color black -anchor center $c create rect 2.97i 2.97i 3.03i 3.03i -fill {} -outline black $c create bitmap 5.5i 3.0i \ -bitmap @[file join $canvPsBmapImageDir face.xbm] \ - -background blue -foreground black -anchor e + -background blue -color black -anchor e $c create rect 5.47i 2.97i 5.53i 3.03i -fill {} -outline black $c create bitmap 0.5i 5.5i \ -bitmap @[file join $canvPsBmapImageDir flagup.xbm] \ - -background black -foreground white -anchor sw + -background black -color white -anchor sw $c create rect 0.47i 5.47i 0.53i 5.53i -fill {} -outline black $c create bitmap 3.0i 5.5i \ -bitmap @[file join $canvPsBmapImageDir flagup.xbm] \ - -background green -foreground white -anchor s + -background green -color white -anchor s $c create rect 2.97i 5.47i 3.03i 5.53i -fill {} -outline black $c create bitmap 5.5i 5.5i \ -bitmap @[file join $canvPsBmapImageDir flagup.xbm] \ - -background {} -foreground black -anchor se + -background {} -color black -anchor se $c create rect 5.47i 5.47i 5.53i 5.53i -fill {} -outline black Index: tests/canvPsGrph.tcl ================================================================== --- tests/canvPsGrph.tcl +++ tests/canvPsGrph.tcl @@ -32,13 +32,13 @@ pack .t.bot -side bottom -fill both button .t.bot.quit -text Quit -command {destroy .t} button .t.bot.print -text Print -command "lpr $c" pack .t.bot.print .t.bot.quit -side left -pady 1m -expand 1 -frame .t.mid -relief sunken -bd 2 +frame .t.mid -relief sunken -borderwidth 2 pack .t.mid -side top -expand yes -fill both -padx 2m -pady 2m -canvas $c -width 400 -height 350 -bd 0 -relief sunken +canvas $c -width 400 -height 350 -borderwidth 0 -relief sunken pack $c -expand yes -fill both -padx 1 -pady 1 proc mkObjs c { global what $c delete all Index: tests/canvPsImg.tcl ================================================================== --- tests/canvPsImg.tcl +++ tests/canvPsImg.tcl @@ -67,11 +67,11 @@ pack .t.$l -in .t.top.r -anchor w } set BitmapImage [image create bitmap \ -file [file join [file dirname [info script]] face.xbm] \ - -background white -foreground black] + -background white -color black] set PhotoImage [image create photo \ -file [file join [file dirname [info script]] teapot.ppm]] BuildTestImage Index: tests/canvPsText.tcl ================================================================== --- tests/canvPsText.tcl +++ tests/canvPsText.tcl @@ -23,11 +23,11 @@ pack .t.bot -side bottom -fill both button .t.bot.quit -text Quit -command {destroy .t} button .t.bot.print -text Print -command "lpr $c" pack .t.bot.print .t.bot.quit -side left -pady 1m -expand 1 -canvas $c -width 6i -height 7i -bd 2 -relief sunken +canvas $c -width 6i -height 7i -borderwidth 2 -relief sunken pack $c -expand yes -fill both -padx 2m -pady 2m $c create rect 2.95i 0.45i 3.05i 0.55i -fill {} -outline black $c create text 3.0i 0.5i -text "Center Courier Oblique 24" \ -anchor center -tags text -font {Courier 24 italic} -stipple $stipple Index: tests/canvRect.test ================================================================== --- tests/canvRect.test +++ tests/canvRect.test @@ -10,11 +10,11 @@ namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands # Canvas used in every test case of the whole file -canvas .c -width 400 -height 300 -bd 2 -relief sunken +canvas .c -width 400 -height 300 -borderwidth 2 -relief sunken pack .c update # Rectangle used in canvRect-1.* tests .c create rectangle 20 20 80 80 -tag test @@ -435,11 +435,11 @@ # Crashes on Mac because the XGetImage() call isn't implemented, causing a # dereference of NULL. # This test is non-portable because different color information # will get generated on different displays (e.g. mono displays # vs. color). - .c configure -bd 0 -highlightthickness 0 + .c configure -borderwidth 0 -highlightthickness 0 .c create rect 50 60 90 80 -fill black -stipple gray50 -outline {} .c create oval 100 150 200 200 -fill {} -outline #ff0000 -width 5 update set x [.c postscript] string range $x [string first "-200 -150 translate" $x] end Index: tests/canvText.test ================================================================== --- tests/canvText.test +++ tests/canvText.test @@ -13,11 +13,11 @@ testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] 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 +canvas .c -width 400 -height 300 -borderwidth 2 -relief sunken pack .c update # Item used in 1.* tests .c create text 20 20 -tag test @@ -463,11 +463,11 @@ .c create text 20 20 -tag test .c itemconfig test -text "abcd\nefghi\njklmnopq" focus .c .c focus test } -body { - .c config -selectforeground blue + .c config -selectcolor blue .c itemconfig test -anchor n update } -cleanup { .c delete test } -result {} @@ -870,11 +870,11 @@ } } -body { set font {Courier 12 italic} set ax [font measure $font 0] set ay [font metrics $font -linespace] - .c config -height 300 -highlightthickness 0 -bd 0 + .c config -height 300 -highlightthickness 0 -borderwidth 0 update .c create text 100 100 -tags test .c itemconfig test -font $font -text "00000000" -width [expr 3*$ax] .c itemconfig test -anchor n -fill black set x [.c postscript] @@ -898,11 +898,11 @@ unset -nocomplain bbox x2 y2 } -result 1 test canvText-19.1 {patch 1006286, leading space caused wrap under Win32} -setup { destroy .c - set c [canvas .c -bg black -width 964] + set c [canvas .c -background black -width 964] pack $c $c delete all after 100 "set done 1"; vwait done } -body { set f {Arial 28 bold} @@ -967,11 +967,11 @@ rename transpose {} } -result {ok ok ok} test canvText-20.2 {crash on angled text selection (X11, without xft) - bug 2712f43f6e} -setup { destroy .c - canvas .c -background bisque -selectforeground green2 + canvas .c -background bisque -selectcolor green2 grid .c set id [.c create text 50 150 -anchor w -text "Angled text" \ -angle 30 -font {Helvetica 32} -fill darkblue] } -body { .c select clear Index: tests/canvWind.test ================================================================== --- tests/canvWind.test +++ tests/canvWind.test @@ -13,17 +13,17 @@ test canvWind-1.1 {DisplayWinItem, windows off-screen vertically} -setup { destroy .t } -body { toplevel .t - canvas .t.c -scrollregion {0 0 1000 800} -width 250 -height 200 -bd 2 \ + canvas .t.c -scrollregion {0 0 1000 800} -width 250 -height 200 -borderwidth 2 \ -relief sunken -xscrollincrement 1 -yscrollincrement 1 \ -highlightthickness 1 pack .t.c -fill both -expand 1 -padx 20 -pady 20 wm geometry .t +0+0 set f .t.f - frame $f -width 80 -height 50 -bg red + frame $f -width 80 -height 50 -background red .t.c create window 300 400 -window $f -anchor nw .t.c xview moveto .3 .t.c yview moveto .50 update set x [list [list [winfo ismapped $f] [winfo y $f]]] @@ -45,17 +45,17 @@ test canvWind-1.2 {DisplayWinItem, windows off-screen vertically} -setup { destroy .t } -body { toplevel .t - canvas .t.c -scrollregion {0 0 1000 800} -width 250 -height 200 -bd 2 \ + canvas .t.c -scrollregion {0 0 1000 800} -width 250 -height 200 -borderwidth 2 \ -relief sunken -xscrollincrement 1 -yscrollincrement 1 \ -highlightthickness 1 pack .t.c -fill both -expand 1 -padx 20 -pady 20 wm geometry .t +0+0 set f .t.c.f - frame $f -width 80 -height 50 -bg red + frame $f -width 80 -height 50 -background red .t.c create window 300 400 -window $f -anchor nw .t.c xview moveto .3 .t.c yview moveto .50 update set x [list [list [winfo ismapped $f] [winfo y $f]]] @@ -77,17 +77,17 @@ test canvWind-1.3 {DisplayWinItem, windows off-screen horizontally} -setup { destroy .t } -body { toplevel .t - canvas .t.c -scrollregion {0 0 1000 800} -width 250 -height 200 -bd 2 \ + canvas .t.c -scrollregion {0 0 1000 800} -width 250 -height 200 -borderwidth 2 \ -relief sunken -xscrollincrement 1 -yscrollincrement 1 \ -highlightthickness 1 pack .t.c -fill both -expand 1 -padx 20 -pady 20 wm geometry .t +0+0 set f .t.f - frame $f -width 80 -height 50 -bg red + frame $f -width 80 -height 50 -background red .t.c create window 300 400 -window $f -anchor nw .t.c xview moveto .3 .t.c yview moveto .50 update set x [list [list [winfo ismapped $f] [winfo x $f]]] @@ -109,17 +109,17 @@ test canvWind-1.4 {DisplayWinItem, windows off-screen horizontally} -setup { destroy .t } -body { toplevel .t - canvas .t.c -scrollregion {0 0 1000 800} -width 250 -height 200 -bd 2 \ + canvas .t.c -scrollregion {0 0 1000 800} -width 250 -height 200 -borderwidth 2 \ -relief sunken -xscrollincrement 1 -yscrollincrement 1 \ -highlightthickness 1 pack .t.c -fill both -expand 1 -padx 20 -pady 20 wm geometry .t +0+0 set f .t.c.f - frame $f -width 80 -height 50 -bg red + frame $f -width 80 -height 50 -background red .t.c create window 300 400 -window $f -anchor nw .t.c xview moveto .3 .t.c yview moveto .50 update set x [list [list [winfo ismapped $f] [winfo x $f]]] Index: tests/canvas.test ================================================================== --- tests/canvas.test +++ tests/canvas.test @@ -26,22 +26,22 @@ } -result {#ff0000} test canvas-1.2 {configuration options: bad value for "background"} -body { .c configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test canvas-1.3 {configuration options: good value for "bg"} -body { - .c configure -bg #ff0000 - .c cget -bg + .c configure -background #ff0000 + .c cget -background } -result {#ff0000} test canvas-1.4 {configuration options: bad value for "bg"} -body { - .c configure -bg non-existent + .c configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test canvas-1.5 {configuration options: good value for "bd"} -body { - .c configure -bd 4 - .c cget -bd + .c configure -borderwidth 4 + .c cget -borderwidth } -result 4 test canvas-1.6 {configuration options: bad value for "bd"} -body { - .c configure -bd badValue + .c configure -borderwidth badValue } -returnCodes error -result {bad screen distance "badValue"} test canvas-1.7 {configuration options: good value for "borderwidth"} -body { .c configure -borderwidth 1.3 .c cget -borderwidth } -result 1 @@ -152,15 +152,15 @@ } -result 1 test canvas-1.38 {configuration options: bad value for "selectborderwidth"} -body { .c configure -selectborderwidth badValue } -returnCodes error -result {bad screen distance "badValue"} test canvas-1.39 {configuration options: good value for "selectforeground"} -body { - .c configure -selectforeground #654321 - .c cget -selectforeground + .c configure -selectcolor #654321 + .c cget -selectcolor } -result {#654321} test canvas-1.40 {configuration options: bad value for "selectforeground"} -body { - .c configure -selectforeground bogus + .c configure -selectcolor bogus } -returnCodes error -result {unknown color name "bogus"} test canvas-1.41 {configuration options: good value for "takefocus"} -body { .c configure -takefocus "any string" .c cget -takefocus } -result {any string} @@ -188,11 +188,11 @@ .c configure -gorp foo } -returnCodes error -match glob -result {*} catch {destroy .c} # Canvas used in 2.* test cases -canvas .c -width 60 -height 40 -scrollregion {0 0 200 150} -bd 0 \ +canvas .c -width 60 -height 40 -scrollregion {0 0 200 150} -borderwidth 0 \ -highlightthickness 0 pack .c update test canvas-2.1 {CanvasWidgetCmd, bind option} -body { @@ -267,14 +267,14 @@ test canvas-4.1 {ButtonEventProc procedure} -setup { deleteWindows set x {} } -body { - canvas .c1 -bg #543210 + canvas .c1 -background #543210 rename .c1 .c2 lappend x [winfo children .] - lappend x [.c2 cget -bg] + lappend x [.c2 cget -background] destroy .c1 lappend x [info command .c*] [winfo children .] } -result {.c1 #543210 {} {}} test canvas-5.1 {ButtonCmdDeletedProc procedure} -body { Index: tests/cmap.tcl ================================================================== --- tests/cmap.tcl +++ tests/cmap.tcl @@ -15,12 +15,12 @@ set red 0 set green 0 set blue 0 for {set y 0} {$y < 8} {incr y} { for {set x 0} {$x < 8} {incr x} { - frame $w.f$x,$y -width 40 -height 40 -bd 2 -relief raised \ - -bg [format #%02x%02x%02x $red $green $blue] + frame $w.f$x,$y -width 40 -height 40 -borderwidth 2 -relief raised \ + -background [format #%02x%02x%02x $red $green $blue] place $w.f$x,$y -x [expr {40*$x}] -y [expr {40*$y}] incr red $redInc incr green $greenInc incr blue $blueInc } @@ -31,14 +31,14 @@ pack .t.m -side top -fill x button .t.quit -text Quit -command {destroy .t} pack .t.quit -side bottom -pady 3 -ipadx 4 -ipady 2 -frame .t.f -width 700 -height 450 -relief raised -bd 2 +frame .t.f -width 700 -height 450 -relief raised -borderwidth 2 pack .t.f -side top -padx 1c -pady 1c colors .t.f 4 0 0 -frame .t.f.f -width 350 -height 350 -colormap new -bd 2 -relief raised +frame .t.f.f -width 350 -height 350 -colormap new -borderwidth 2 -relief raised place .t.f.f -relx 1.0 -rely 0 -anchor ne colors .t.f.f 0 4 0 bind .t.f.f {wm colormapwindows .t {.t.f.f .t}} bind .t.f.f {wm colormapwindows .t {.t .t.f.f}} Index: tests/color.test ================================================================== --- tests/color.test +++ tests/color.test @@ -34,11 +34,11 @@ # rx, gx, bx - Change in intensities between adjacent elements in row. # ry, gy, by - Change in intensities between adjacent elements in column. proc mkColors {c width height r g b rx gx bx ry gy by} { catch {destroy $c} - canvas $c -width 400 -height 200 -bd 0 + canvas $c -width 400 -height 200 -borderwidth 0 for {set y 0} {$y < $height} {incr y} { for {set x 0} {$x < $width} {incr x} { set color [format #%02x%02x%02x [expr $r + $y*$ry + $x*$rx] \ [expr $g + $y*$gy + $x*$gx] [expr $b + $y*$by + $x*$bx]] $c create rectangle [expr 10*$x] [expr 20*$y] \ @@ -119,45 +119,45 @@ test color-1.1 {Tk_AllocColorFromObj - converting internal reps} colorsFree { set x green lindex $x 0 destroy .b1 - button .b1 -foreground $x -text .b1 + button .b1 -color $x -text .b1 lindex $x 0 testcolor green } {{1 0}} test color-1.2 {Tk_AllocColorFromObj - discard stale color} colorsFree { set x green destroy .b1 .b2 - button .b1 -foreground $x -text First + button .b1 -color $x -text First destroy .b1 set result {} lappend result [testcolor green] - button .b2 -foreground $x -text Second + button .b2 -color $x -text Second lappend result [testcolor green] } {{} {{1 1}}} test color-1.3 {Tk_AllocColorFromObj - reuse existing color} colorsFree { set x green destroy .b1 .b2 - button .b1 -foreground $x -text First + button .b1 -color $x -text First set result {} lappend result [testcolor green] - button .b2 -foreground $x -text Second + button .b2 -color $x -text Second pack .b1 .b2 -side top lappend result [testcolor green] } {{{1 1}} {{2 1}}} test color-1.4 {Tk_AllocColorFromObj - try other colors in list} colorsFree { set x purple destroy .b1 .b2 .t.b - button .b1 -foreground $x -text First + button .b1 -color $x -text First pack .b1 -side top set result {} lappend result [testcolor purple] - button .t.b -foreground $x -text Second + button .t.b -color $x -text Second pack .t.b -side top lappend result [testcolor purple] - button .b2 -foreground $x -text Third + button .b2 -color $x -text Third pack .b2 -side top lappend result [testcolor purple] } {{{1 1}} {{1 1} {1 0}} {{1 0} {2 1}}} test color-1.5 {Color table} nonPortable { set fd [open ../xlib/rgb.txt] @@ -233,15 +233,15 @@ closest .t 241 241 1 } {240 240 0} test color-3.3 {Tk_FreeColorFromObj - reference counts} colorsFree { set x purple destroy .b1 .b2 .t.b - button .b1 -foreground $x -text First + button .b1 -color $x -text First pack .b1 -side top - button .t.b -foreground $x -text Second + button .t.b -color $x -text Second pack .t.b -side top - button .b2 -foreground $x -text Third + button .b2 -color $x -text Third pack .b2 -side top set result {} lappend result [testcolor purple] destroy .b1 lappend result [testcolor purple] @@ -253,20 +253,20 @@ test color-3.4 {Tk_FreeColorFromObj - unlinking from list} colorsFree { destroy .b .t.b .t2 .t3 toplevel .t2 -visual {pseudocolor 8} -colormap new toplevel .t3 -visual {pseudocolor 8} -colormap new set x purple - button .b -foreground $x -text .b1 - button .t.b1 -foreground $x -text .t.b1 - button .t.b2 -foreground $x -text .t.b2 - button .t2.b1 -foreground $x -text .t2.b1 - button .t2.b2 -foreground $x -text .t2.b2 - button .t2.b3 -foreground $x -text .t2.b3 - button .t3.b1 -foreground $x -text .t3.b1 - button .t3.b2 -foreground $x -text .t3.b2 - button .t3.b3 -foreground $x -text .t3.b3 - button .t3.b4 -foreground $x -text .t3.b4 + button .b -color $x -text .b1 + button .t.b1 -color $x -text .t.b1 + button .t.b2 -color $x -text .t.b2 + button .t2.b1 -color $x -text .t2.b1 + button .t2.b2 -color $x -text .t2.b2 + button .t2.b3 -color $x -text .t2.b3 + button .t3.b1 -color $x -text .t3.b1 + button .t3.b2 -color $x -text .t3.b2 + button .t3.b3 -color $x -text .t3.b3 + button .t3.b4 -color $x -text .t3.b4 set result {} lappend result [testcolor purple] destroy .t2 lappend result [testcolor purple] destroy .b @@ -282,15 +282,15 @@ } -setup { proc copy {s} {return [string index $s 0][string range $s 1 end]} } -body { destroy .b set x [copy purple] - button .b -foreground $x -text .b1 + button .b -color $x -text .b1 set y [copy purple] - .b configure -foreground $y + .b configure -color $y set z [copy purple] - .b configure -foreground $z + .b configure -color $z set result {} lappend result [testcolor purple] set x red lappend result [testcolor purple] set z 32 Index: tests/constraints.tcl ================================================================== --- tests/constraints.tcl +++ tests/constraints.tcl @@ -217,18 +217,18 @@ testConstraint testwrapper [llength [info commands testwrapper]] # constraint to see what sort of fonts are available testConstraint fonts 1 destroy .e -entry .e -width 0 -font {Helvetica -12} -bd 1 -highlightthickness 1 +entry .e -width 0 -font {Helvetica -12} -borderwidth 1 -highlightthickness 1 .e insert end a.bcd if {([winfo reqwidth .e] != 37) || ([winfo reqheight .e] != 20)} { testConstraint fonts 0 } destroy .e destroy .t -text .t -width 80 -height 20 -font {Times -14} -bd 1 +text .t -width 80 -height 20 -font {Times -14} -borderwidth 1 pack .t .t insert end "This is\na dot." update set x [list [.t bbox 1.3] [.t bbox 2.5]] destroy .t Index: tests/entry.test ================================================================== --- tests/entry.test +++ tests/entry.test @@ -9,10 +9,11 @@ package require tcltest 2.2 namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] testConstraint failsOnUbuntuNoXft [expr {[testConstraint failsOnUbuntu] || (![catch {tk::pkgconfig get fontsystem} fs] && ($fs eq "xft"))}] testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }] # For xscrollcommand @@ -68,41 +69,41 @@ test entry-1.3 {configuration option: "bd" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { - .e configure -bd 4 - .e cget -bd + .e configure -borderwidth 4 + .e cget -borderwidth } -cleanup { destroy .e } -result 4 test entry-1.4 {configuration option: "bd" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { - .e configure -bd badValue + .e configure -borderwidth badValue } -cleanup { destroy .e } -returnCodes {error} -result {bad screen distance "badValue"} test entry-1.5 {configuration option: "bg" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { - .e configure -bg #ff0000 - .e cget -bg + .e configure -background #ff0000 + .e cget -background } -cleanup { destroy .e } -result {#ff0000} test entry-1.6 {configuration option: "bg" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { - .e configure -bg non-existent + .e configure -background non-existent } -cleanup { destroy .e } -returnCodes {error} -result {unknown color name "non-existent"} test entry-1.7 {configuration option: "borderwidth" for entry} -setup { @@ -168,21 +169,21 @@ test entry-1.13 {configuration option: "disabledforeground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { - .e configure -disabledforeground blue - .e cget -disabledforeground + .e configure -disabledcolor blue + .e cget -disabledcolor } -cleanup { destroy .e } -result {blue} test entry-1.14 {configuration option: "disabledforeground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { - .e configure -disabledforeground non-existent + .e configure -disabledcolor non-existent } -cleanup { destroy .e } -returnCodes {error} -result {unknown color name "non-existent"} test entry-1.15 {configuration option: "exportselection" for entry} -setup { @@ -208,21 +209,21 @@ test entry-1.17 {configuration option: "fg" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { - .e configure -fg #110022 - .e cget -fg + .e configure -color #110022 + .e cget -color } -cleanup { destroy .e } -result {#110022} test entry-1.18 {configuration option: "fg" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { - .e configure -fg non-existent + .e configure -color non-existent } -cleanup { destroy .e } -returnCodes {error} -result {unknown color name "non-existent"} test entry-1.19 {configuration option: "font" for entry} -setup { @@ -248,21 +249,21 @@ test entry-1.21 {configuration option: "foreground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { - .e configure -foreground #110022 - .e cget -foreground + .e configure -color #110022 + .e cget -color } -cleanup { destroy .e } -result {#110022} test entry-1.22 {configuration option: "foreground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { - .e configure -foreground non-existent + .e configure -color non-existent } -cleanup { destroy .e } -returnCodes {error} -result {unknown color name "non-existent"} test entry-1.23 {configuration option: "highlightbackground" for entry} -setup { @@ -424,11 +425,11 @@ .e cget -invalidcommand } -cleanup { destroy .e } -result {any string} -test entry-1.39 {configuration option: "invcmd" for entry} -setup { +test entry-1.39 {configuration option: "invcmd" for entry} -constraints nodeprecated -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { .e configure -invcmd "any string" @@ -531,21 +532,21 @@ test entry-1.49 {configuration option: "selectforeground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { - .e configure -selectforeground #110022 - .e cget -selectforeground + .e configure -selectcolor #110022 + .e cget -selectcolor } -cleanup { destroy .e } -result {#110022} test entry-1.50 {configuration option: "selectforeground" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e update } -body { - .e configure -selectforeground non-existent + .e configure -selectcolor non-existent } -cleanup { destroy .e } -returnCodes {error} -result {unknown color name "non-existent"} test entry-1.51 {configuration option: "show" for entry} -setup { @@ -639,15 +640,15 @@ .e cget -placeholder } -cleanup { destroy .e } -result {Some text} -test entry-1.60 {configuration option: "-placeholderforeground"} -setup { +test entry-1.60 {configuration option: "-placeholdercolor"} -setup { pack [entry .e] } -body { - .e configure -placeholder {Some text} -placeholderforeground red - .e cget -placeholderforeground + .e configure -placeholder {Some text} -placeholdercolor red + .e cget -placeholdercolor } -cleanup { destroy .e } -result {red} @@ -815,24 +816,24 @@ destroy .e } -returnCodes error -result {unknown option "-gorp"} test entry-3.14 {EntryWidgetCmd procedure, "cget" widget command} -setup { entry .e } -body { - .e configure -bd 4 - .e cget -bd + .e configure -borderwidth 4 + .e cget -borderwidth } -cleanup { destroy .e } -result 4 -test entry-3.15 {EntryWidgetCmd procedure, "configure" widget command} -setup { +test entry-3.15 {EntryWidgetCmd procedure, "configure" widget command} -constraints nodeprecated -setup { entry .e pack .e update } -body { llength [.e configure] } -cleanup { destroy .e -} -result 38 +} -result 42 test entry-3.16 {EntryWidgetCmd procedure, "configure" widget command} -setup { entry .e } -body { .e configure -foo } -cleanup { @@ -839,13 +840,13 @@ destroy .e } -returnCodes error -result {unknown option "-foo"} test entry-3.17 {EntryWidgetCmd procedure, "configure" widget command} -setup { entry .e } -body { - .e configure -bd 4 - .e configure -bg #ffffff - lindex [.e configure -bd] 4 + .e configure -borderwidth 4 + .e configure -background #ffffff + lindex [.e configure -borderwidth] 4 } -cleanup { destroy .e } -result 4 test entry-3.18 {EntryWidgetCmd procedure, "delete" widget command} -setup { entry .e @@ -1723,11 +1724,11 @@ fonts } -setup { entry .e -borderwidth 2 -highlightthickness 2 pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised + .e configure -font {Courier -12} -borderwidth 2 -relief raised .e insert end "0123" update list [.e index @10] [.e index @11] [.e index @12] [.e index @13] } -cleanup { destroy .e @@ -1736,11 +1737,11 @@ fonts } -setup { entry .e -borderwidth 2 -highlightthickness 2 pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief flat + .e configure -font {Courier -12} -borderwidth 2 -relief flat .e insert end "0123" update list [.e index @10] [.e index @11] [.e index @12] [.e index @13] } -cleanup { destroy .e @@ -1763,11 +1764,11 @@ fonts } -setup { entry .e pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised -width 20 \ + .e configure -font {Courier -12} -borderwidth 2 -relief raised -width 20 \ -highlightthickness 3 .e insert end 012\t45 update list [.e index @61] [.e index @62] } -cleanup { @@ -1777,11 +1778,11 @@ fonts } -setup { entry .e pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised -width 20 \ + .e configure -font {Courier -12} -borderwidth 2 -relief raised -width 20 \ -justify center -highlightthickness 3 .e insert end 012\t45 update list [.e index @96] [.e index @97] } -cleanup { @@ -1791,11 +1792,11 @@ fonts } -setup { entry .e pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised -width 20 \ + .e configure -font {Courier -12} -borderwidth 2 -relief raised -width 20 \ -justify right -highlightthickness 3 .e insert end 012\t45 update list [.e index @131] [.e index @132] } -cleanup { @@ -1803,11 +1804,11 @@ } -result {3 4} test entry-6.4 {EntryComputeGeometry procedure} -setup { entry .e pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised -width 5 + .e configure -font {Courier -12} -borderwidth 2 -relief raised -width 5 .e insert end "01234567890" update .e xview 6 .e index @0 } -cleanup { @@ -1815,11 +1816,11 @@ } -result 6 test entry-6.5 {EntryComputeGeometry procedure} -setup { entry .e -highlightthickness 2 pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised -width 5 + .e configure -font {Courier -12} -borderwidth 2 -relief raised -width 5 .e insert end "01234567890" update .e xview 7 .e index @0 } -cleanup { @@ -1829,11 +1830,11 @@ fonts } -setup { entry .e -highlightthickness 2 pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised -width 10 + .e configure -font {Courier -12} -borderwidth 2 -relief raised -width 10 .e insert end "01234\t67890" update .e xview 3 list [.e index @39] [.e index @40] } -cleanup { @@ -1843,11 +1844,11 @@ fonts } -setup { entry .e -highlightthickness 2 pack .e } -body { - .e configure -font {Helvetica -24} -bd 3 -relief raised -width 5 + .e configure -font {Helvetica -24} -borderwidth 3 -relief raised -width 5 .e insert end "01234567" update list [winfo reqwidth .e] [winfo reqheight .e] } -cleanup { destroy .e @@ -1856,11 +1857,11 @@ fonts } -setup { entry .e -highlightthickness 2 pack .e } -body { - .e configure -font {Helvetica -24} -bd 3 -relief raised -width 0 + .e configure -font {Helvetica -24} -borderwidth 3 -relief raised -width 0 .e insert end "01234567" update list [winfo reqwidth .e] [winfo reqheight .e] } -cleanup { destroy .e @@ -1869,11 +1870,11 @@ fonts } -setup { entry .e -highlightthickness 2 pack .e } -body { - .e configure -font {Helvetica -24} -bd 3 -relief raised -width 0 + .e configure -font {Helvetica -24} -borderwidth 3 -relief raised -width 0 update list [winfo reqwidth .e] [winfo reqheight .e] } -cleanup { destroy .e } -result {25 39} @@ -1881,11 +1882,11 @@ unix fonts } -setup { entry .e -highlightthickness 2 -font {Helvetica -12} pack .e } -body { - .e configure -bd 1 -relief raised -width 0 -show . + .e configure -borderwidth 1 -relief raised -width 0 -show . .e insert 0 12345 update set x [winfo reqwidth .e] .e configure -show X lappend x [winfo reqwidth .e] @@ -1898,11 +1899,11 @@ win } -setup { entry .e -highlightthickness 2 pack .e } -body { - .e configure -bd 1 -relief raised -width 0 -show . -font {helvetica 12} + .e configure -borderwidth 1 -relief raised -width 0 -show . -font {helvetica 12} .e insert 0 12345 update set x1 [winfo reqwidth .e] set x2 [expr {8+5*[font measure {helvetica 12} .]}] set x [expr {$x1 eq $x2}] @@ -1919,11 +1920,11 @@ } -result {1 1 1} test entry-6.12 {EntryComputeGeometry procedure} -constraints { fonts } -setup { catch {destroy .e} - entry .e -font {Courier -12} -bd 2 -relief raised -width 20 + entry .e -font {Courier -12} -borderwidth 2 -relief raised -width 20 pack .e } -body { .e insert end "012\t456\t" update list [.e index @80] [.e index @81] [.e index @115] [.e index @116] @@ -1932,11 +1933,11 @@ } -result {6 7 7 8} test entry-7.1 {InsertChars procedure} -setup { unset -nocomplain contents - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e configure -textvariable contents -xscrollcommand scroll set timeout [after 500 {set scrollInfo {-1000000 -1000000}}] @@ -1949,11 +1950,11 @@ after cancel $timeout } -result {abXXXcde abXXXcde {0.000000 1.000000}} test entry-7.2 {InsertChars procedure} -setup { unset -nocomplain contents - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e configure -textvariable contents -xscrollcommand scroll set timeout [after 500 {set scrollInfo {-1000000 -1000000}}] @@ -1964,11 +1965,11 @@ } -cleanup { destroy .e after cancel $timeout } -result {abcdeXXX abcdeXXX {0.000000 1.000000}} test entry-7.3 {InsertChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 0123456789 .e select from 2 .e select to 6 @@ -1978,11 +1979,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {5 9 5 8} test entry-7.4 {InsertChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 0123456789 .e select from 2 .e select to 6 @@ -1992,11 +1993,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {2 9 2 8} test entry-7.5 {InsertChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 0123456789 .e select from 2 .e select to 6 @@ -2006,11 +2007,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {2 9 2 8} test entry-7.6 {InsertChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 0123456789 .e select from 2 .e select to 6 @@ -2020,11 +2021,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {2 6 2 5} test entry-7.7 {InsertChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -xscrollcommand scroll .e insert 0 0123456789 .e icursor 4 @@ -2032,11 +2033,11 @@ .e index insert } -cleanup { destroy .e } -result 7 test entry-7.8 {InsertChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 0123456789 .e icursor 4 .e insert 5 XXX @@ -2043,11 +2044,11 @@ .e index insert } -cleanup { destroy .e } -result 4 test entry-7.9 {InsertChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 "This is a very long string" update .e xview 4 @@ -2055,11 +2056,11 @@ .e index @0 } -cleanup { destroy .e } -result 7 test entry-7.10 {InsertChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 "This is a very long string" update .e xview 4 @@ -2070,11 +2071,11 @@ } -result 4 test entry-7.11 {InsertChars procedure} -constraints { fonts } -setup { - entry .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 0 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 "xyzzy" update .e insert 2 00 @@ -2083,11 +2084,11 @@ destroy .e } -result 59 test entry-8.1 {DeleteChars procedure} -setup { unset -nocomplain contents - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e configure -textvariable contents -xscrollcommand scroll set timeout [after 500 {set scrollInfo {-1000000 -1000000}}] @@ -2099,11 +2100,11 @@ destroy .e after cancel $timeout } -result {abe abe {0.000000 1.000000}} test entry-8.2 {DeleteChars procedure} -setup { unset -nocomplain contents - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e configure -textvariable contents -xscrollcommand scroll set timeout [after 500 {set scrollInfo {-1000000 -1000000}}] @@ -2115,11 +2116,11 @@ destroy .e after cancel $timeout } -result {cde cde {0.000000 1.000000}} test entry-8.3 {DeleteChars procedure} -setup { unset -nocomplain contents - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e configure -textvariable contents -xscrollcommand scroll set timeout [after 500 {set scrollInfo {-1000000 -1000000}}] @@ -2130,11 +2131,11 @@ } -cleanup { destroy .e after cancel $timeout } -result {abc abc {0.000000 1.000000}} test entry-8.4 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 3 @@ -2146,11 +2147,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {1 6 1 5} test entry-8.5 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 3 @@ -2162,11 +2163,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {1 5 1 4} test entry-8.6 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 3 @@ -2178,11 +2179,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {1 2 1 5} test entry-8.7 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 3 @@ -2192,11 +2193,11 @@ .e index sel.first } -cleanup { destroy .e } -returnCodes error -result {selection isn't in widget .e} test entry-8.8 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 3 @@ -2208,11 +2209,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {3 4 3 8} test entry-8.9 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 0123456789abcde .e select from 3 .e select to 8 @@ -2221,11 +2222,11 @@ .e index sel.first } -cleanup { destroy .e } -returnCodes error -result {selection isn't in widget .e} test entry-8.10 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 8 @@ -2237,11 +2238,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {3 5 5 8} test entry-8.11 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 8 @@ -2253,11 +2254,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {3 8 4 8} test entry-8.12 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e icursor 4 @@ -2266,11 +2267,11 @@ .e index insert } -cleanup { destroy .e } -result 1 test entry-8.13 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e icursor 4 @@ -2279,11 +2280,11 @@ .e index insert } -cleanup { destroy .e } -result 1 test entry-8.14 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e icursor 4 @@ -2292,11 +2293,11 @@ .e index insert } -cleanup { destroy .e } -result 4 test entry-8.15 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 "This is a very long string" .e xview 4 @@ -2305,11 +2306,11 @@ .e index @0 } -cleanup { destroy .e } -result 1 test entry-8.16 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 "This is a very long string" .e xview 4 @@ -2318,11 +2319,11 @@ .e index @0 } -cleanup { destroy .e } -result 1 test entry-8.17 {DeleteChars procedure} -setup { - entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 "This is a very long string" .e xview 4 @@ -2331,11 +2332,11 @@ .e index @0 } -cleanup { destroy .e } -result 4 test entry-8.18 {DeleteChars procedure} -constraints failsOnUbuntuNoXft -setup { - entry .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2 + entry .e -width 0 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 "xyzzy" update @@ -2370,11 +2371,11 @@ test entry-10.1 {EntrySetValue procedure} -constraints fonts -body { set x abcde set y ab - entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2 -width 0 + entry .e -font {Helvetica -12} -highlightthickness 2 -borderwidth 2 -width 0 pack .e .e configure -textvariable x .e configure -textvariable y update list [.e get] [winfo reqwidth .e] @@ -2381,11 +2382,11 @@ } -cleanup { destroy .e } -result {ab 24} test entry-10.2 {EntrySetValue procedure, updating selection} -setup { unset -nocomplain x - entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2 + entry .e -font {Helvetica -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -textvariable x .e insert 0 "abcdefghjklmnopqrstu" .e selection range 4 10 @@ -2394,11 +2395,11 @@ } -cleanup { destroy .e } -returnCodes error -result {selection isn't in widget .e} test entry-10.3 {EntrySetValue procedure, updating selection} -setup { unset -nocomplain x - entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2 + entry .e -font {Helvetica -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -textvariable x .e insert 0 "abcdefghjklmnopqrstu" .e selection range 4 10 @@ -2407,11 +2408,11 @@ } -cleanup { destroy .e } -result {4 7} test entry-10.4 {EntrySetValue procedure, updating selection} -setup { unset -nocomplain x - entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2 + entry .e -font {Helvetica -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -textvariable x .e insert 0 "abcdefghjklmnopqrstu" .e selection range 4 10 @@ -2420,11 +2421,11 @@ } -cleanup { destroy .e } -result {4 10} test entry-10.5 {EntrySetValue procedure, updating display position} -setup { unset -nocomplain x - entry .e -highlightthickness 2 -bd 2 + entry .e -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -width 10 -font {Courier -12} -textvariable x .e insert 0 "abcdefghjklmnopqrstuvwxyz" .e xview 10 @@ -2435,11 +2436,11 @@ } -cleanup { destroy .e } -result 0 test entry-10.6 {EntrySetValue procedure, updating display position} -setup { unset -nocomplain x - entry .e -highlightthickness 2 -bd 2 + entry .e -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -width 10 -font {Courier -12} -textvariable x pack .e .e insert 0 "abcdefghjklmnopqrstuvwxyz" @@ -2451,11 +2452,11 @@ } -cleanup { destroy .e } -result 10 test entry-10.7 {EntrySetValue procedure, updating insertion cursor} -setup { unset -nocomplain x - entry .e -highlightthickness 2 -bd 2 + entry .e -highlightthickness 2 -borderwidth 2 pack .e update } -body { .e configure -width 10 -font {Courier -12} -textvariable x pack .e @@ -2466,11 +2467,11 @@ } -cleanup { destroy .e } -result 3 test entry-10.8 {EntrySetValue procedure, updating insertion cursor} -setup { unset -nocomplain x - entry .e -highlightthickness 2 -bd 2 + entry .e -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -width 10 -font {Courier -12} -textvariable x pack .e .e insert 0 "abcdefghjklmnopqrstuvwxyz" @@ -2480,11 +2481,11 @@ } -cleanup { destroy .e } -result 5 test entry-11.1 {EntryEventProc procedure} -setup { - entry .e -highlightthickness 2 -bd 2 -font {Helvetica -12} + entry .e -highlightthickness 2 -borderwidth 2 -font {Helvetica -12} pack .e } -body { .e insert 0 abcdefg destroy .e update @@ -2492,14 +2493,14 @@ destroy .e } -result {} test entry-11.2 {EntryEventProc procedure} -setup { set x {} } -body { - entry .e1 -fg #112233 + entry .e1 -color #112233 rename .e1 .e2 lappend x [winfo children .] - lappend x [.e2 cget -fg] + lappend x [.e2 cget -color] destroy .e1 lappend x [info command .e*] [winfo children .] } -cleanup { destroy .e1 } -result {.e1 #112233 {} {}} @@ -2512,11 +2513,11 @@ destroy .b } -result {{} {}} test entry-13.1 {GetEntryIndex procedure} -setup { - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e } -body { .e insert 0 012345678901234567890 .e xview 4 update @@ -2529,11 +2530,11 @@ .e index abogus } -cleanup { destroy .e } -returnCodes error -result {bad entry index "abogus"} test entry-13.3 {GetEntryIndex procedure} -setup { - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e } -body { .e insert 0 012345678901234567890 .e xview 4 update @@ -2542,11 +2543,11 @@ .e index anchor } -cleanup { destroy .e } -result 1 test entry-13.4 {GetEntryIndex procedure} -setup { - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e } -body { .e insert 0 012345678901234567890 .e xview 4 update @@ -2555,11 +2556,11 @@ .e index anchor } -cleanup { destroy .e } -result 4 test entry-13.5 {GetEntryIndex procedure} -setup { - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e } -body { .e insert 0 012345678901234567890 .e xview 4 update @@ -2576,11 +2577,11 @@ .e index ebogus } -cleanup { destroy .e } -returnCodes error -result {bad entry index "ebogus"} test entry-13.7 {GetEntryIndex procedure} -setup { - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e } -body { .e insert 0 012345678901234567890 .e xview 4 update @@ -2595,11 +2596,11 @@ .e index ibogus } -cleanup { destroy .e } -returnCodes error -result {bad entry index "ibogus"} test entry-13.9 {GetEntryIndex procedure} -setup { - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e } -body { .e insert 0 012345678901234567890 .e xview 4 update @@ -2617,11 +2618,11 @@ test entry-13.10 {GetEntryIndex procedure} -constraints x11 -body { # On unix, when selection is cleared, entry widget's internal # selection range is reset. # Previous settings: - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -2637,11 +2638,11 @@ test entry-13.11 {GetEntryIndex procedure} -constraints aquaOrWin32 -body { # On mac and pc, when selection is cleared, entry widget remembers # last selected range. When selection ownership is restored to # entry, the old range will be rehighlighted. # Previous settings: - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -2655,11 +2656,11 @@ destroy .e } -result 1 test entry-13.12 {GetEntryIndex procedure} -constraints x11 -body { # Previous settings: - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -2674,11 +2675,11 @@ # why when string in .e index changed to not beginning with s, # it behaves differently? test entry-13.12.1 {GetEntryIndex procedure} -constraints unix -body { # Previous settings: - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -2691,11 +2692,11 @@ destroy .e } -returnCodes error -result {bad entry index "bogus"} test entry-13.13 {GetEntryIndex procedure} -constraints win -body { # Previous settings: - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -2711,11 +2712,11 @@ test entry-13.14 {GetEntryIndex procedure} -constraints win -body { # On mac and pc, when selection is cleared, entry widget remembers # last selected range. When selection ownership is restored to # entry, the old range will be rehighlighted. # Previous settings: - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -2731,11 +2732,11 @@ test entry-13.14.1 {GetEntryIndex procedure} -constraints win -body { # On mac and pc, when selection is cleared, entry widget remembers # last selected range. When selection ownership is restored to # entry, the old range will be rehighlighted. # Previous settings: - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + entry .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -2756,11 +2757,11 @@ } -cleanup { destroy .e } -returnCodes error -result {bad entry index "@xyz"} test entry-13.16 {GetEntryIndex procedure} -constraints fonts -body { - entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ + entry .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2\ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -2767,11 +2768,11 @@ .e index @4 } -cleanup { destroy .e } -result 4 test entry-13.17 {GetEntryIndex procedure} -constraints fonts -body { - entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ + entry .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2\ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -2778,11 +2779,11 @@ .e index @11 } -cleanup { destroy .e } -result 4 test entry-13.18 {GetEntryIndex procedure} -constraints fonts -body { - entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ + entry .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2\ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -2789,11 +2790,11 @@ .e index @12 } -cleanup { destroy .e } -result 5 test entry-13.19 {GetEntryIndex procedure} -constraints fonts -body { - entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ + entry .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2\ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -2800,11 +2801,11 @@ .e index @[expr {[winfo width .e] - 6}] } -cleanup { destroy .e } -result 8 test entry-13.20 {GetEntryIndex procedure} -constraints fonts -body { - entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ + entry .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2\ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -2811,11 +2812,11 @@ .e index @[expr {[winfo width .e] - 5}] } -cleanup { destroy .e } -result 9 test entry-13.21 {GetEntryIndex procedure} -body { - entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ + entry .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2\ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -2831,11 +2832,11 @@ .e index 1xyz } -cleanup { destroy .e } -returnCodes error -result {bad entry index "1xyz"} test entry-13.23 {GetEntryIndex procedure} -body { - entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ + entry .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2\ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -2842,11 +2843,11 @@ .e index -1 } -cleanup { destroy .e } -result 0 test entry-13.24 {GetEntryIndex procedure} -body { - entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ + entry .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2\ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -2853,11 +2854,11 @@ .e index 12 } -cleanup { destroy .e } -result 12 test entry-13.25 {GetEntryIndex procedure} -body { - entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ + entry .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2\ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -2864,11 +2865,11 @@ .e index 49 } -cleanup { destroy .e } -result 21 test entry-13.26 {GetEntryIndex procedure} -constraints fonts -body { - entry .e -highlightthickness 2 -bd 2 -font {Helvetica -12} + entry .e -highlightthickness 2 -borderwidth 2 -font {Helvetica -12} selection clear .e .e configure -show . .e insert 0 XXXYZZY pack .e update @@ -3051,11 +3052,11 @@ } -body { entry .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 a set ::vVals } -cleanup { destroy .e @@ -3066,11 +3067,11 @@ } -body { entry .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 a ;# previous settings .e insert 1 b return $::vVals } -cleanup { @@ -3082,11 +3083,11 @@ } -body { entry .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 ab ;# previous settings .e insert end c set ::vVals } -cleanup { @@ -3098,11 +3099,11 @@ } -body { entry .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 abc ;# previous settings .e insert 1 123 list $::vVals $::e } -cleanup { @@ -3114,11 +3115,11 @@ } -body { entry .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 a123bc ;# previous settings .e delete 2 set ::vVals } -cleanup { @@ -3130,11 +3131,11 @@ } -body { entry .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 a13bc ;# previous settings .e configure -validate key .e delete 1 3 set ::vVals @@ -3147,11 +3148,11 @@ } -body { entry .e -validate focus \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abc ;# previous settings set ::vVals {} .e insert end d set ::vVals @@ -3164,11 +3165,11 @@ } -body { entry .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e configure -validate focus ;# previous settings .e insert end abcd ;# previous settings focus -force .e # update necessary to process FocusIn event @@ -3183,11 +3184,11 @@ } -body { entry .e -validate focus \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings focus -force .e ;# previous settings update ;# previous settings # update necessary to process FocusIn event @@ -3204,11 +3205,11 @@ } -body { entry .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings focus -force .e # update necessary to process FocusIn event update @@ -3222,11 +3223,11 @@ } -body { entry .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings focus -force .e ;# previous settings # update necessary to process FocusIn event update ;# previous settings @@ -3243,11 +3244,11 @@ } -body { entry .e -validate focusin \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 abcd ;# previous settings focus -force .e # update necessary to process FocusIn event update @@ -3261,11 +3262,11 @@ } -body { entry .e -validate focusin \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings set ::vVals {} focus -force . # update necessary to process FocusOut event @@ -3280,11 +3281,11 @@ } -body { entry .e -validate focuso \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings set ::vVals {} ;# previous settings focus -force .e # update necessary to process FocusIn event @@ -3299,11 +3300,11 @@ } -body { entry .e -validate focuso \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings set ::vVals {} ;# previous settings focus -force .e ;# previous settings # update necessary to process FocusIn event @@ -3322,11 +3323,11 @@ } -body { entry .e -validate focuso \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings set ::vVals {} ;# previous settings focus -force .e ;# previous settings # update necessary to process FocusIn event @@ -3345,11 +3346,11 @@ } -body { entry .e -validate focuso \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings set ::e newdata list [.e cget -validate] $::vVals } -cleanup { @@ -3363,11 +3364,11 @@ } -body { entry .e -validate all \ -validatecommand [list doval3 %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e set ::e newdata ;# previous settings .e configure -validate all set ::e nextdata list [.e cget -validate] $::vVals @@ -3383,11 +3384,11 @@ } -body { entry .e -validate all \ -validatecommand [list doval3 %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e set ::e nextdata ;# previous settings .e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V] .e validate @@ -3406,11 +3407,11 @@ } -body { entry .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e set ::e nextdata ;# previous settings .e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V] ;# prev .e validate ;# previous settings @@ -3504,11 +3505,11 @@ test entry-20.7 {widget deletion with textvariable active} -body { # SF bugs 607390 and 617446 set FOO init entry .e -textvariable FOO -validate all \ - -vcmd {%W configure -bg white; format 1} + -validatecommand {%W configure -background white; format 1} bind .e { set FOO hello } destroy .e winfo exists .e } -cleanup { destroy .e Index: tests/focus.test ================================================================== --- tests/focus.test +++ tests/focus.test @@ -17,21 +17,21 @@ proc focusSetup {} { destroy .t toplevel .t wm geom .t +0+0 foreach i {b1 b2 b3 b4} { - button .t.$i -text .t.$i -relief raised -bd 2 + button .t.$i -text .t.$i -relief raised -borderwidth 2 pack .t.$i } tkwait visibility .t.b4 } proc focusSetupAlt {} { global env destroy .alt toplevel .alt -screen $env(TK_ALT_DISPLAY) foreach i {a b c d} { - button .alt.$i -text .alt.$i -relief raised -bd 2 + button .alt.$i -text .alt.$i -relief raised -borderwidth 2 pack .alt.$i } tkwait visibility .alt.d } @@ -50,11 +50,11 @@ update } # Button used in some tests in the whole test file -button .b -text .b -relief raised -bd 2 +button .b -text .b -relief raised -borderwidth 2 pack .b # Make sure the window manager knows who has focus catch {fixfocus} @@ -112,12 +112,12 @@ destroy .t2 } -body { focusClear toplevel .t2 wm geom .t2 +10+10 - frame .t2.f -width 200 -height 100 -bd 2 -relief raised - frame .t2.f2 -width 200 -height 100 -bd 2 -relief raised + frame .t2.f -width 200 -height 100 -borderwidth 2 -relief raised + frame .t2.f2 -width 200 -height 100 -borderwidth 2 -relief raised pack .t2.f .t2.f2 bind .t2.f {focus .t2.f} bind .t2.f2 {focus .t2} focus -force .t2.f2 tkwait visibility .t2.f2 @@ -632,19 +632,19 @@ toplevel .t wm geometry .t +0+0 frame .t.f1 -container 1 frame .t.f2 pack .t.f1 .t.f2 - entry .t.f2.e1 -bg red + entry .t.f2.e1 -background red pack .t.f2.e1 bind all {lappend x "focus in %W %d"} bind all {lappend x "focus out %W %d"} interp create child child eval "set argv {-use [winfo id .t.f1]}" load {} Tk child child eval { - entry .e1 -bg lightBlue + entry .e1 -background lightBlue pack .e1 bind all {lappend x "focus in %W %d"} bind all {lappend x "focus out %W %d"} set x {} } @@ -687,17 +687,17 @@ toplevel .t wm geometry .t +0+0 frame .t.f1 -container 1 frame .t.f2 pack .t.f1 .t.f2 - entry .t.f2.e1 -bg red + entry .t.f2.e1 -background red pack .t.f2.e1 bind all {lappend x "focus in %W %d"} bind all {lappend x "focus out %W %d"} setupbg -use [winfo id .t.f1] dobg { - entry .e1 -bg lightBlue + entry .e1 -background lightBlue pack .e1 bind all {lappend x "focus in %W %d"} bind all {lappend x "focus out %W %d"} set x {} } Index: tests/focusTcl.test ================================================================== --- tests/focusTcl.test +++ tests/focusTcl.test @@ -20,11 +20,11 @@ if {$w == "."} { set w "" } foreach i {a b c d} { destroy $w.$i - frame $w.$i -width 200 -height 50 -bd 2 -relief raised + frame $w.$i -width 200 -height 50 -borderwidth 2 -relief raised pack $w.$i } .b configure -width 0 -height 0 foreach i {x y z} { destroy $w.b.$i Index: tests/font.test ================================================================== --- tests/font.test +++ tests/font.test @@ -524,11 +524,11 @@ catch {font delete xyz} pack [label .t.f] update } -body { font create xyz -family times -size 20 - .t.f config -font xyz -text "abcd" -padx 0 -bd 0 -highlightthickness 0 + .t.f config -font xyz -text "abcd" -padx 0 -borderwidth 0 -highlightthickness 0 set a1 [font measure xyz "abcd"] update set b1 [winfo reqwidth .t.f] font configure xyz -family helvetica -size 20 set a2 [font measure xyz "abcd"] @@ -712,11 +712,11 @@ } -result {-family} test font-15.12 {Tk_AllocFontFromObj procedure: setup tab width} -setup { destroy .l } -body { # Tk_MeasureChars(fontPtr, "0", ...) - label .l -bd 0 -padx 0 -highlightthickness 0 -font $fixed -text "a\tb" + label .l -borderwidth 0 -padx 0 -highlightthickness 0 -font $fixed -text "a\tb" update set res1 [winfo reqwidth .l] set res2 [expr [font measure $fixed "0"]*9] expr {$res1 eq $res2} } -cleanup { @@ -1451,11 +1451,11 @@ test font-22.1 {Tk_TextWidth procedure} -setup { destroy .t.l } -body { - label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ + label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font "Courier -12" pack .t.l set ax [winfo reqwidth .t.l] expr {[font measure [.t.l cget -font] "000"] eq $ax*3} } -cleanup { @@ -1476,11 +1476,11 @@ } -result {} # Data used in 24.* tests destroy .t.l -label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ +label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font "Courier -12" pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] Index: tests/frame.test ================================================================== --- tests/frame.test +++ tests/frame.test @@ -10,10 +10,11 @@ package require tcltest 2.2 namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands +tcltest::testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] tcltest::testConstraint x11 [expr {[tk windowingsystem] eq "x11"}] # eatColors -- # Creates a toplevel window and allocates enough colors in it to use up all # the slots in an 8-bit colormap. @@ -23,11 +24,11 @@ proc eatColors {w} { catch {destroy $w} toplevel $w wm geom $w +0+0 - canvas $w.c -width 400 -height 200 -bd 0 + canvas $w.c -width 400 -height 200 -borderwidth 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}] \ @@ -189,26 +190,26 @@ } -result "#ff0000" test frame-1.14 {frame configuration options} -body { .f configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test frame-1.15 {frame configuration options} -body { - .f configure -bd 4 - lindex [.f configure -bd] 4 + .f configure -borderwidth 4 + lindex [.f configure -borderwidth] 4 } -cleanup { - .f configure -bd [lindex [.f configure -bd] 3] + .f configure -borderwidth [lindex [.f configure -borderwidth] 3] } -result 4 test frame-1.16 {frame configuration options} -body { - .f configure -bd badValue + .f configure -borderwidth badValue } -returnCodes error -result {bad screen distance "badValue"} test frame-1.17 {frame configuration options} -body { - .f configure -bg #00ff00 - lindex [.f configure -bg] 4 + .f configure -background #00ff00 + lindex [.f configure -background] 4 } -cleanup { - .f configure -bg [lindex [.f configure -bg] 3] + .f configure -background [lindex [.f configure -background] 3] } -result "#00ff00" test frame-1.18 {frame configuration options} -body { - .f configure -bg non-existent + .f configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test frame-1.19 {frame configuration options} -body { .f configure -borderwidth 1.3 lindex [.f configure -borderwidth] 4 } -cleanup { @@ -496,22 +497,22 @@ } -result "#ff0000" test frame-2.21 {toplevel configuration options} -body { .t configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test frame-2.22 {toplevel configuration options} -body { - .t configure -bd 4 - lindex [.t configure -bd] 4 + .t configure -borderwidth 4 + lindex [.t configure -borderwidth] 4 } -result 4 test frame-2.23 {toplevel configuration options} -body { - .t configure -bd badValue + .t configure -borderwidth badValue } -returnCodes error -result {bad screen distance "badValue"} test frame-2.24 {toplevel configuration options} -body { - .t configure -bg #00ff00 - lindex [.t configure -bg] 4 + .t configure -background #00ff00 + lindex [.t configure -background] 4 } -result "#00ff00" test frame-2.25 {toplevel configuration options} -body { - .t configure -bg non-existent + .t configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test frame-2.26 {toplevel configuration options} -body { .t configure -borderwidth 1.3 lindex [.t configure -borderwidth] 4 } -result 1 @@ -597,11 +598,11 @@ deleteWindows } -result {-class class Class Toplevel Toplevel} test frame-3.4 {TkCreateFrame procedure} -setup { deleteWindows } -body { - toplevel .t -width 350 -class NewClass -bg black -visual default -height 90 + toplevel .t -width 350 -class NewClass -background black -visual default -height 90 wm geometry .t +0+0 update list [lindex [.t configure -width] 4] \ [lindex [.t configure -background] 4] \ [lindex [.t configure -height] 4] @@ -647,11 +648,11 @@ } -setup { deleteWindows } -body { toplevel .t -container 1 -width 300 -height 120 wm geometry .t +0+0 - toplevel .x -width 140 -height 300 -use [winfo id .t] -bg green + toplevel .x -width 140 -height 300 -use [winfo id .t] -background green tkwait visibility .x list [expr {[winfo rootx .x] - [winfo rootx .t]}] \ [expr {[winfo rooty .x] - [winfo rooty .t]}] \ [winfo width .t] [winfo height .t] } -cleanup { @@ -674,11 +675,11 @@ update idletasks } else { update } option add *x.use [winfo id .t] - toplevel .x -width 140 -height 300 -bg green + toplevel .x -width 140 -height 300 -background green if {[tk windowingsystem] eq "aqua"} { update idletasks } else { tkwait visibility .x update @@ -699,11 +700,11 @@ test frame-3.11 {TkCreateFrame procedure} -constraints { defaultPseudocolor8 nonPortable } -setup { destroy .t } -body { - toplevel .t -width 300 -height 200 -bg #475601 + toplevel .t -width 300 -height 200 -background #475601 wm geometry .t +0+0 update colorsFree .t } -cleanup { destroy .t @@ -711,11 +712,11 @@ test frame-3.12 {TkCreateFrame procedure} -constraints { defaultPseudocolor8 nonPortable } -setup { destroy .t } -body { - toplevel .t -width 300 -height 200 -bg #475601 -colormap new + toplevel .t -width 300 -height 200 -background #475601 -colormap new wm geometry .t +0+0 update colorsFree .t } -cleanup { destroy .t @@ -725,11 +726,11 @@ } -setup { destroy .t } -body { option add *t.class Toplevel2 option add *Toplevel2.colormap new - toplevel .t -width 300 -height 200 -bg #475601 + toplevel .t -width 300 -height 200 -background #475601 wm geometry .t +0+0 update option clear colorsFree .t } -cleanup { @@ -740,11 +741,11 @@ } -setup { destroy .t } -body { option add *t.class Toplevel3 option add *Toplevel3.Colormap new - toplevel .t -width 300 -height 200 -bg #475601 -colormap new + toplevel .t -width 300 -height 200 -background #475601 -colormap new wm geometry .t +0+0 update option clear colorsFree .t } -cleanup { @@ -755,11 +756,11 @@ } -setup { destroy .t } -body { toplevel .t -container 1 -width 300 -height 120 wm geometry .t +0+0 - toplevel .x -width 140 -height 300 -use [winfo id .t] -bg green -colormap new + toplevel .x -width 140 -height 300 -use [winfo id .t] -background green -colormap new tkwait visibility .x list [colorsFree .t] [colorsFree .x] } -cleanup { destroy .t } -result {0 1} @@ -766,11 +767,11 @@ test frame-3.16 {TkCreateFrame procedure} -constraints { defaultPseudocolor8 nonPortable } -setup { destroy .t } -body { - toplevel .t -width 300 -height 200 -bg #475601 -visual default + toplevel .t -width 300 -height 200 -background #475601 -visual default wm geometry .t +0+0 update colorsFree .t } -cleanup { destroy .t @@ -778,11 +779,11 @@ test frame-3.17 {TkCreateFrame procedure} -constraints { defaultPseudocolor8 nonPortable } -setup { destroy .t } -body { - toplevel .t -width 300 -height 200 -bg #475601 -visual default \ + toplevel .t -width 300 -height 200 -background #475601 -visual default \ -colormap new wm geometry .t +0+0 update colorsFree .t } -cleanup { @@ -791,11 +792,11 @@ test frame-3.18 {TkCreateFrame procedure} -constraints { defaultPseudocolor8 haveGrayscale8 nonPortable } -setup { destroy .t } -body { - toplevel .t -visual {grayscale 8} -width 300 -height 200 -bg #434343 + toplevel .t -visual {grayscale 8} -width 300 -height 200 -background #434343 wm geometry .t +0+0 update colorsFree .t 131 131 131 } -cleanup { destroy .t @@ -805,11 +806,11 @@ } -setup { destroy .t } -body { option add *t.class T4 option add *T4.visual {grayscale 8} - toplevel .t -width 300 -height 200 -bg #434343 + toplevel .t -width 300 -height 200 -background #434343 wm geometry .t +0+0 update option clear list [colorsFree .t 131 131 131] [lindex [.t configure -visual] 4] } -cleanup { @@ -820,11 +821,11 @@ } -setup { destroy .t } -body { option add *t.class T5 option add *T5.Visual {grayscale 8} - toplevel .t -width 300 -height 200 -bg #434343 + toplevel .t -width 300 -height 200 -background #434343 wm geometry .t +0+0 update option clear list [colorsFree .t 131 131 131] [lindex [.t configure -visual] 4] } -cleanup { @@ -833,11 +834,11 @@ test frame-3.21 {TkCreateFrame procedure} -constraints { defaultPseudocolor8 haveGrayscale8 nonPortable } -setup { destroy .t } -body { - toplevel .t -visual {grayscale 8} -width 300 -height 200 -bg #434343 + toplevel .t -visual {grayscale 8} -width 300 -height 200 -background #434343 wm geometry .t +0+0 update colorsFree .t 131 131 131 } -cleanup { destroy .t @@ -850,11 +851,11 @@ } -body { toplevel .t wm geometry .t +0+0 update set result "[winfo reqwidth .t] [winfo reqheight .t]" - frame .t.f -bg red + frame .t.f -background red pack .t.f update lappend result [winfo reqwidth .t.f] [winfo reqheight .t.f] } -cleanup { deleteWindows @@ -910,11 +911,11 @@ toplevel .t .t cget -screen } -cleanup { destroy .t } -returnCodes ok -match glob -result * -test frame-5.8 {FrameWidgetCommand procedure, configure option} -body { +test frame-5.8 {FrameWidgetCommand procedure, configure option} -constraints nodeprecated -body { optnames [.f configure] } -result {-background -backgroundimage -bd -bg -bgimg -borderwidth -class -colormap -container -cursor -height -highlightbackground -highlightcolor -highlightthickness -padx -pady -relief -takefocus -tile -visual -width} test frame-5.9 {FrameWidgetCommand procedure, configure option} -body { .f configure -gorp } -returnCodes error -result {unknown option "-gorp"} @@ -925,11 +926,11 @@ .f configure -width 200 -height } -returnCodes error -result {value for "-height" missing} test frame-5.12 {FrameWidgetCommand procedure} -body { .f swizzle } -returnCodes error -result {bad option "swizzle": must be cget or configure} -test frame-5.13 {FrameWidgetCommand procedure, configure option} -body { +test frame-5.13 {FrameWidgetCommand procedure, configure option} -constraints nodeprecated -body { optnames [. configure] } -result {-background -backgroundimage -bd -bg -bgimg -borderwidth -class -colormap -container -cursor -height -highlightbackground -highlightcolor -highlightthickness -menu -padx -pady -relief -screen -takefocus -tile -use -visual -width} destroy .f test frame-6.1 {ConfigureFrame procedure} -setup { @@ -972,14 +973,14 @@ } -result {.frame2 {}} test frame-7.2 {FrameEventProc procedure} -setup { deleteWindows set x {} } -body { - frame .f1 -bg #543210 + frame .f1 -background #543210 rename .f1 .f2 lappend x [winfo children .] - lappend x [.f2 cget -bg] + lappend x [.f2 cget -background] destroy .f1 lappend x [info command .f*] [winfo children .] } -cleanup { deleteWindows } -result {.f1 #543210 {} {}} @@ -1094,11 +1095,11 @@ } -result {} test frame-12.1 {FrameWorldChanged procedure} -setup { deleteWindows } -body { - # Test -bd -padx and -pady + # Test -borderwidth -padx and -pady frame .f -borderwidth 2 -padx 3 -pady 4 place .f -x 0 -y 0 -width 40 -height 40 pack [frame .f.f] -fill both -expand 1 update list [winfo x .f.f] [winfo y .f.f] [winfo width .f.f] [winfo height .f.f] @@ -1108,11 +1109,11 @@ test frame-12.2 {FrameWorldChanged procedure} -setup { deleteWindows } -body { # Test all -labelanchor positions set font {helvetica 12} - labelframe .f -highlightthickness 1 -bd 3 -padx 1 -pady 2 -font $font \ + labelframe .f -highlightthickness 1 -borderwidth 3 -padx 1 -pady 2 -font $font \ -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 @@ -1246,26 +1247,26 @@ } -result "#ff0000" test frame-13.11 {labelframe configuration options} -body { .f configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test frame-13.12 {labelframe configuration options} -body { - .f configure -bd 4 - lindex [.f configure -bd] 4 + .f configure -borderwidth 4 + lindex [.f configure -borderwidth] 4 } -cleanup { - .f configure -bd [lindex [.f configure -bd] 3] + .f configure -borderwidth [lindex [.f configure -borderwidth] 3] } -result 4 test frame-13.13 {labelframe configuration options} -body { - .f configure -bd badValue + .f configure -borderwidth badValue } -returnCodes error -result {bad screen distance "badValue"} test frame-13.14 {labelframe configuration options} -body { - .f configure -bg #00ff00 - lindex [.f configure -bg] 4 + .f configure -background #00ff00 + lindex [.f configure -background] 4 } -cleanup { - .f configure -bg [lindex [.f configure -bg] 3] + .f configure -background [lindex [.f configure -background] 3] } -result "#00ff00" test frame-13.15 {labelframe configuration options} -body { - .f configure -bg non-existent + .f configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test frame-13.16 {labelframe configuration options} -body { .f configure -borderwidth 1.3 lindex [.f configure -borderwidth] 4 } -cleanup { @@ -1281,33 +1282,33 @@ .f configure -cursor [lindex [.f configure -cursor] 3] } -result {arrow} test frame-13.19 {labelframe configuration options} -body { .f configure -cursor badValue } -returnCodes error -result {bad cursor spec "badValue"} -test frame-13.20 {labelframe configuration options} -body { - .f configure -fg #0000ff - lindex [.f configure -fg] 4 +test frame-13.20 {labelframe configuration options} -constraints nodeprecated -body { + .f configure -color #0000ff + lindex [.f configure -color] 4 } -cleanup { - .f configure -fg [lindex [.f configure -fg] 3] + .f configure -color [lindex [.f configure -color] 3] } -result "#0000ff" -test frame-13.21 {labelframe configuration options} -body { - .f configure -fg non-existent +test frame-13.21 {labelframe configuration options} -constraints nodeprecated -body { + .f configure -color non-existent } -returnCodes error -result {unknown color name "non-existent"} test frame-13.22 {labelframe configuration options} -body { .f configure -font {courier 8} lindex [.f configure -font] 4 } -cleanup { .f configure -font [lindex [.f configure -font] 3] } -result {courier 8} test frame-13.23 {labelframe configuration options} -body { - .f configure -foreground #ff0000 - lindex [.f configure -foreground] 4 + .f configure -color #ff0000 + lindex [.f configure -color] 4 } -cleanup { - .f configure -foreground [lindex [.f configure -foreground] 3] + .f configure -color [lindex [.f configure -color] 3] } -result "#ff0000" test frame-13.24 {labelframe configuration options} -body { - .f configure -foreground non-existent + .f configure -color non-existent } -returnCodes error -result {unknown color name "non-existent"} test frame-13.25 {labelframe configuration options} -body { .f configure -height 100 lindex [.f configure -height] 4 } -cleanup { @@ -1539,11 +1540,11 @@ } -body { frame .f -width 100 -height 100 -backgroundimage gorp pack .f .f configure -tile yes update - list [.f cget -bgimg] [.f cget -tile] + list [.f cget -backgroundimage] [.f cget -tile] } -cleanup { image delete gorp deleteWindows } -result {gorp 1} test frame-15.4 {TIP 262: frame background images} -setup { @@ -1555,11 +1556,11 @@ pack .f .f configure -tile yes update gorp put red -to 15 15 20 20 update - list [.f cget -bgimg] [.f cget -tile] + list [.f cget -backgroundimage] [.f cget -tile] } -cleanup { image delete gorp deleteWindows } -result {gorp 1} test frame-15.5 {TIP 262: frame background images} -setup { @@ -1572,11 +1573,11 @@ pack .f .f configure -tile yes update image delete gorp update - set result [list [.f cget -bgimg] [.f cget -tile]] + set result [list [.f cget -backgroundimage] [.f cget -tile]] image create photo gorp -width 250 -height 250 update lappend result [.f cget -backgroundimage] } -cleanup { catch {image delete gorp} @@ -1586,11 +1587,11 @@ deleteWindows set result {} . configure -width 200 -height 200 } -constraints testImageType -body { image create test gorp -variable result - pack [frame .f -width 100 -height 100 -bgimg gorp] + pack [frame .f -width 100 -height 100 -backgroundimage gorp] update idletasks; update return [uniq $result] } -cleanup { deleteWindows catch {image delete gorp} @@ -1599,11 +1600,11 @@ deleteWindows set result {} . configure -width 200 -height 200 } -constraints testImageType -body { image create test gorp -variable result - pack [frame .f -width 10 -height 10 -bgimg gorp] + pack [frame .f -width 10 -height 10 -backgroundimage gorp] update idletasks; update # On MacOS must wait for the test image display procedure to run. set timer [after 300 {lappend result "timedout"}] while {"timedout" ni $result && "gorp display 10 2 10 10" ni $result} { @@ -1620,11 +1621,11 @@ deleteWindows set result {} . configure -width 200 -height 200 } -constraints testImageType -body { image create test gorp -variable result - pack [frame .f -width 50 -height 25 -bgimg gorp -tile 1] + pack [frame .f -width 50 -height 25 -backgroundimage gorp -tile 1] update idletasks; update # On MacOS must wait for the test image display procedure to run. set timer [after 300 {lappend result "timedout"}] while {"timedout" ni $result && "gorp display 0 0 20 10" ni $result} { @@ -1643,11 +1644,11 @@ deleteWindows set result {} . configure -width 200 -height 200 } -constraints testImageType -body { image create test gorp -variable result - pack [frame .f -width 50 -height 25 -bgimg gorp -tile 1 -highlightthick 1] + pack [frame .f -width 50 -height 25 -backgroundimage gorp -tile 1 -highlightthick 1] update idletasks; update # On MacOS must wait for the test image display procedure to run. set timer [after 300 {lappend result "timedout"}] while {"timedout" ni $result && "gorp display 0 0 18 8" ni $result} { @@ -1663,11 +1664,11 @@ deleteWindows set result {} . configure -width 200 -height 200 } -constraints testImageType -body { image create test gorp -variable result - pack [frame .f -width 50 -height 25 -bgimg gorp -tile 1 -bd 2] + pack [frame .f -width 50 -height 25 -backgroundimage gorp -tile 1 -borderwidth 2] update idletasks; update return [uniq $result] } -cleanup { deleteWindows catch {image delete gorp} @@ -1676,11 +1677,11 @@ deleteWindows set result {} . configure -width 200 -height 200 } -constraints testImageType -body { image create test gorp -variable result - pack [frame .f -width 50 -height 25 -bgimg gorp -tile 1 -bd 2 -highlightthick 1] + pack [frame .f -width 50 -height 25 -backgroundimage gorp -tile 1 -borderwidth 2 -highlightthick 1] update idletasks; update return [uniq $result] } -cleanup { deleteWindows catch {image delete gorp} @@ -1717,11 +1718,11 @@ image create photo gorp -width 10 -height 10 gorp put black -to 2 2 7 7 } -body { toplevel .t -width 100 -height 100 -backgroundimage gorp -tile yes update - list [.t cget -bgimg] [.t cget -tile] + list [.t cget -backgroundimage] [.t cget -tile] } -cleanup { image delete gorp deleteWindows } -result {gorp 1} test frame-15.11 {TIP 262: toplevel background images} -setup { @@ -1731,11 +1732,11 @@ } -body { toplevel .t -width 100 -height 100 -backgroundimage gorp -tile yes update gorp put red -to 15 15 20 20 update - list [.t cget -bgimg] [.t cget -tile] + list [.t cget -backgroundimage] [.t cget -tile] } -cleanup { image delete gorp deleteWindows } -result {gorp 1} test frame-15.12 {TIP 262: toplevel background images} -setup { @@ -1746,11 +1747,11 @@ } -body { toplevel .t -width 100 -height 100 -backgroundimage gorp -tile yes update image delete gorp update - set result [list [.t cget -bgimg] [.t cget -tile]] + set result [list [.t cget -backgroundimage] [.t cget -tile]] image create photo gorp -width 250 -height 250 update lappend result [.t cget -backgroundimage] } -cleanup { catch {image delete gorp} @@ -1759,11 +1760,11 @@ test frame-15.13 {TIP 262: toplevel background images} -setup { deleteWindows set result {} } -constraints testImageType -body { image create test gorp -variable result - toplevel .t -width 100 -height 100 -bgimg gorp + toplevel .t -width 100 -height 100 -backgroundimage gorp wm overrideredirect .t 1; # Reduce trouble from window managers update idletasks; update return [uniq $result] } -cleanup { deleteWindows @@ -1772,11 +1773,11 @@ test frame-15.14 {TIP 262: toplevel background images} -setup { deleteWindows set result {} } -constraints testImageType -body { image create test gorp -variable result - toplevel .t -width 50 -height 25 -bgimg gorp -tile 1 + toplevel .t -width 50 -height 25 -backgroundimage gorp -tile 1 wm overrideredirect .t 1; # Reduce trouble from window managers update idletasks; update # On MacOS must wait for the test image display procedure to run. set timer [after 300 {lappend result "timedout"}] while {"timedout" ni $result && Index: tests/geometry.test ================================================================== --- tests/geometry.test +++ tests/geometry.test @@ -20,13 +20,13 @@ wm geometry . 300x300 raise . update -frame .f -bd 2 -relief raised -frame .f.f -bd 2 -relief sunken -frame .f.f.f -bd 2 -relief raised +frame .f -borderwidth 2 -relief raised +frame .f.f -borderwidth 2 -relief sunken +frame .f.f.f -borderwidth 2 -relief raised button .b1 -text .b1 button .b2 -text .b2 button .b3 -text .b3 button .f.f.b4 -text .b4 @@ -84,15 +84,15 @@ } -body { place .f -x 20 -y 30 -width 200 -height 200 place .b1 -in .f -x 50 -y 5 update set x [list [winfo x .b1] [winfo y .b1]] - .f configure -bd 5 + .f configure -borderwidth 5 update lappend x [winfo x .b1] [winfo y .b1] } -cleanup { - .f configure -bd 2 + .f configure -borderwidth 2 } -result {72 37 75 40} test geometry-4.1 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup { foreach w {.f .f.f .f.f.f .b1 .b2 .b3} { @@ -232,12 +232,12 @@ place .b1 -in .f.f.f -x 50 -y 5 place .b2 -in .f.f.f -x 10 -y 25 place .b3 -in .f.f.f -x 50 -y 25 update destroy .f.f - frame .f.f -bd 2 -relief raised - frame .f.f.f -bd 2 -relief raised + frame .f.f -borderwidth 2 -relief raised + frame .f.f.f -borderwidth 2 -relief raised 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] Index: tests/grid.test ================================================================== --- tests/grid.test +++ tests/grid.test @@ -108,12 +108,12 @@ } -returnCodes error -result {expected integer but got "x"} test grid-2.8 {bbox} -body { grid bbox . 0 0 0 x } -returnCodes error -result {expected integer but got "x"} test grid-2.9 {bbox} -body { - frame .1 -width 75 -height 75 -bg red - frame .2 -width 90 -height 90 -bg red + frame .1 -width 75 -height 75 -background red + frame .2 -width 90 -height 90 -background red grid .1 -row 0 -column 0 grid .2 -row 1 -column 1 update set a "" lappend a [grid bbox .] @@ -123,12 +123,12 @@ return $a } -cleanup { grid_reset 2.9 } -result {{0 0 165 165} {0 0 75 75} {0 0 165 165} {75 75 90 90}} test grid-2.10 {bbox} -body { - frame .1 -width 75 -height 75 -bg red - frame .2 -width 90 -height 90 -bg red + frame .1 -width 75 -height 75 -background red + frame .2 -width 90 -height 90 -background red grid .1 -row 0 -column 0 grid .2 -row 1 -column 1 update set a "" lappend a [grid bbox . 10 10 0 0] @@ -248,13 +248,13 @@ grid info .c } -cleanup { grid_reset 4.3.1 } -result {-in . -column 0 -row 0 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}} test grid-4.5 {forget, calling Tk_UnmaintainGeometry} -body { - frame .f -bd 2 -relief raised + frame .f -borderwidth 2 -relief raised place .f -x 10 -y 20 -width 200 -height 100 - frame .f2 -width 50 -height 30 -bg red + frame .f2 -width 50 -height 30 -background red grid .f2 -in .f update set x [winfo ismapped .f2] grid forget .f2 place .f -x 30 @@ -266,27 +266,27 @@ test grid-5.1 {info: basic argument checking} -body { grid info a b } -returnCodes error -result {wrong # args: should be "grid info window"} test grid-5.2 {info} -body { - frame .1 -width 75 -height 75 -bg red + frame .1 -width 75 -height 75 -background red grid .1 -row 0 -column 0 update grid info .x } -cleanup { grid_reset 5.2 } -returnCodes error -result {bad window path name ".x"} test grid-5.3 {info} -body { - frame .1 -width 75 -height 75 -bg red + frame .1 -width 75 -height 75 -background red grid .1 -row 0 -column 0 update grid info .1 } -cleanup { grid_reset 5.3 } -result {-in . -column 0 -row 0 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}} test grid-5.4 {info} -body { - frame .1 -width 75 -height 75 -bg red + frame .1 -width 75 -height 75 -background red update grid info .1 } -cleanup { grid_reset 5.4 } -returnCodes ok -result {} @@ -308,11 +308,11 @@ grid location .f 10 10 } -cleanup { grid_reset 6.5 } -result {-1 -1} test grid-6.6 {location (x)} -body { - frame .f -width 200 -height 100 -highlightthickness 0 -bg red + frame .f -width 200 -height 100 -highlightthickness 0 -background red grid .f update set got "" set result "" for {set x -10} { $x < 220} { incr x} { @@ -325,11 +325,11 @@ return $result } -cleanup { grid_reset 6.6 } -result {{-10->-1 0} {0->0 0} {201->1 0}} test grid-6.7 {location (y)} -body { - frame .f -width 200 -height 100 -highlightthickness 0 -bg red + frame .f -width 200 -height 100 -highlightthickness 0 -background red grid .f update set got "" set result "" for {set y -10} { $y < 110} { incr y} { @@ -342,11 +342,11 @@ return $result } -cleanup { grid_reset 6.7 } -result {{-10->0 -1} {0->0 0} {101->0 1}} test grid-6.8 {location (weights)} -body { - frame .f -width 300 -height 100 -highlightthickness 0 -bg red + frame .f -width 300 -height 100 -highlightthickness 0 -background red frame .a grid .a grid .f -in .a grid rowconfigure .f 0 -weight 1 grid columnconfigure .f 0 -weight 1 @@ -369,11 +369,11 @@ test grid-6.9 {location: check updates pending} -constraints { nonPortable } -body { set a "" foreach i {0 1 2} { - frame .$i -width 120 -height 75 -bg red + frame .$i -width 120 -height 75 -background red lappend a [grid location . 150 90] grid .$i -row $i -column $i } return $a } -cleanup { @@ -404,16 +404,16 @@ grid propagate . x } -cleanup { grid_reset 7.5 } -returnCodes error -result {expected boolean value but got "x"} test grid-7.6 {propagate} -body { - frame .f -width 100 -height 100 -bg red + frame .f -width 100 -height 100 -background red grid .f -row 0 -column 0 update set a [winfo width .f]x[winfo height .f] grid propagate .f 0 - frame .g -width 75 -height 85 -bg green + frame .g -width 75 -height 85 -background green grid .g -in .f -row 0 -column 0 update lappend a [winfo width .f]x[winfo height .f] grid propagate .f 1 update @@ -881,11 +881,11 @@ } -cleanup { grid_reset 11.5 } -returnCodes error -result {must specify window before shortcut '-'} test grid-11.6 {default widget placement} -body { foreach i {1 2 3 4 5 6} { - frame .f$i -width 50 -height 50 -highlightthickness 0 -bg red + frame .f$i -width 50 -height 50 -highlightthickness 0 -background red } grid .f1 .f2 .f3 .f4 grid .f5 - x .f6 -sticky nsew update set a "" @@ -896,33 +896,33 @@ return $a } -cleanup { grid_reset 11.6 } -result {{0,50 100,50} {150,50 50,50}} test grid-11.7 {default widget placement} -body { - frame .f -width 20 -height 20 -highlightthickness 0 -bg red + frame .f -width 20 -height 20 -highlightthickness 0 -background red grid .f -row 5 -column 5 grid .f x - } -cleanup { grid_reset 11.7 } -returnCodes error -result {must specify window before shortcut '-'} test grid-11.8 {default widget placement} -body { - frame .f -width 20 -height 20 -highlightthickness 0 -bg red + frame .f -width 20 -height 20 -highlightthickness 0 -background red grid .f -row 5 -column 5 grid .f ^ - } -cleanup { grid_reset 11.8 } -returnCodes error -result {must specify window before shortcut '-'} test grid-11.9 {default widget placement} -body { - frame .f -width 20 -height 20 -highlightthickness 0 -bg red + frame .f -width 20 -height 20 -highlightthickness 0 -background red grid .f -row 5 -column 5 grid .f x ^ } -cleanup { grid_reset 11.9 } -returnCodes error -result {can't find content to extend with "^"} test grid-11.10 {default widget placement} -body { foreach i {1 2 3} { - frame .f$i -width 100 -height 50 -highlightthickness 0 -bg red + frame .f$i -width 100 -height 50 -highlightthickness 0 -background red } grid .f1 .f2 -sticky nsew grid .f3 ^ -sticky nsew update set a "" @@ -991,11 +991,11 @@ } -cleanup { grid_reset 11.13 } -result {{0,50 120,50} {120,50 80,50}} test grid-11.14 {default widget placement} -body { foreach i {1 2 3} { - frame .f$i -width 60 -height 60 -highlightthickness 0 -bg red + frame .f$i -width 60 -height 60 -highlightthickness 0 -background red } grid .f1 .f2 grid ^ .f3 update set a "" @@ -1007,11 +1007,11 @@ } -cleanup { grid_reset 11.14 } -result {{0,30 60,60} {60,0 60,60} {60,60 60,60}} test grid-11.15 {^ ^ test with multiple windows} -body { foreach i {1 2 3 4} { - frame .f$i -width 50 -height 50 -bd 1 -relief solid + frame .f$i -width 50 -height 50 -borderwidth 1 -relief solid } grid .f1 .f2 .f3 -sticky ns grid .f4 ^ ^ update set a "" @@ -1086,11 +1086,11 @@ grid_reset 11.19 } -result {50 100 100 50} test grid-12.1 {-sticky} -body { catch {unset data} - frame .f -width 200 -height 100 -highlightthickness 0 -bg red + frame .f -width 200 -height 100 -highlightthickness 0 -background red set a "" grid .f grid rowconfigure . 0 -weight 1 grid columnconfigure . 0 -weight 1 grid propagate . 0 @@ -1120,66 +1120,66 @@ (esw) 0 50 250 100 (new) 0 0 250 100 (nesw) 0 0 250 150 } test grid-12.2 {-sticky} -body { - frame .f -bg red + frame .f -background red grid .f -sticky glue } -cleanup { grid_reset 12.2 } -returnCodes error -result {bad stickyness value "glue": must be a string containing n, e, s, and/or w} test grid-12.3 {-sticky} -body { - frame .f -bg red + frame .f -background red grid .f -sticky {n,s,e,w} array set A [grid info .f] set A(-sticky) } -cleanup { grid_reset 12.3 } -result {nesw} test grid-13.1 {-in} -body { - frame .f -bg red + frame .f -background red grid .f -in .f } -cleanup { grid_reset 13.1 } -returnCodes error -result {window can't be managed in itself} test grid-13.2 {-in} -body { - frame .f -bg red + frame .f -background red list [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} {}} test grid-13.3 {-in} -body { - frame .f -bg red + frame .f -background red grid .f -in .bad } -cleanup { grid_reset 13.2 } -returnCodes error -result {bad window path name ".bad"} test grid-13.4 {-in} -body { - frame .f -bg red + frame .f -background red toplevel .top grid .f -in .top } -cleanup { grid_reset 13.3 } -returnCodes error -result {can't put ".f" inside ".top"} destroy .top test grid-13.5 {-ipadx} -body { - frame .f -width 20 -height 20 -highlightthickness 0 -bg red + frame .f -width 20 -height 20 -highlightthickness 0 -background red grid .f -ipadx x } -cleanup { grid_reset 13.4 } -returnCodes error -result {bad ipadx value "x": must be positive screen distance} test grid-13.6 {-ipadx} -body { - frame .f -width 20 -height 20 -highlightthickness 0 -bg red + frame .f -width 20 -height 20 -highlightthickness 0 -background red grid .f -ipadx {5 5} } -cleanup { grid_reset 13.4.1 } -returnCodes error -result {bad ipadx value "5 5": must be positive screen distance} test grid-13.7 {-ipadx} -body { - frame .f -width 200 -height 100 -highlightthickness 0 -bg red + frame .f -width 200 -height 100 -highlightthickness 0 -background red grid .f update set a [winfo width .f] grid .f -ipadx 1 update @@ -1186,23 +1186,23 @@ list $a [winfo width .f] } -cleanup { grid_reset 13.5 } -result {200 202} test grid-13.8 {-ipady} -body { - frame .f -width 20 -height 20 -highlightthickness 0 -bg red + frame .f -width 20 -height 20 -highlightthickness 0 -background red grid .f -ipady x } -cleanup { grid_reset 13.6 } -returnCodes error -result {bad ipady value "x": must be positive screen distance} test grid-13.9 {-ipady} -body { - frame .f -width 20 -height 20 -highlightthickness 0 -bg red + frame .f -width 20 -height 20 -highlightthickness 0 -background red grid .f -ipady {5 5} } -cleanup { grid_reset 13.6.1 } -returnCodes error -result {bad ipady value "5 5": must be positive screen distance} test grid-13.10 {-ipady} -body { - frame .f -width 200 -height 100 -highlightthickness 0 -bg red + frame .f -width 200 -height 100 -highlightthickness 0 -background red grid .f update set a [winfo height .f] grid .f -ipady 1 update @@ -1209,23 +1209,23 @@ list $a [winfo height .f] } -cleanup { grid_reset 13.7 } -result {100 102} test grid-13.11 {-padx} -body { - frame .f -width 20 -height 20 -highlightthickness 0 -bg red + frame .f -width 20 -height 20 -highlightthickness 0 -background red grid .f -padx x } -cleanup { grid_reset 13.8 } -returnCodes error -result {bad pad value "x": must be positive screen distance} test grid-13.12 {-padx} -body { - frame .f -width 20 -height 20 -highlightthickness 0 -bg red + frame .f -width 20 -height 20 -highlightthickness 0 -background red grid .f -padx {10 x} } -cleanup { grid_reset 13.8.1 } -returnCodes error -result {bad 2nd pad value "x": must be positive screen distance} test grid-13.13 {-padx} -body { - frame .f -width 200 -height 100 -highlightthickness 0 -bg red + frame .f -width 200 -height 100 -highlightthickness 0 -background red grid .f update set a "[winfo width .f] [winfo width .]" grid .f -padx 1 update @@ -1232,11 +1232,11 @@ list $a "[winfo width .f] [winfo width .] [winfo x .f]" } -cleanup { grid_reset 13.9 } -result {{200 200} {200 202 1}} test grid-13.14 {-padx} -body { - frame .f -width 200 -height 100 -highlightthickness 0 -bg red + frame .f -width 200 -height 100 -highlightthickness 0 -background red grid .f update set a "[winfo width .f] [winfo width .]" grid .f -padx {10 5} update @@ -1243,23 +1243,23 @@ list $a "[winfo width .f] [winfo width .] [winfo x .f]" } -cleanup { grid_reset 13.9.1 } -result {{200 200} {200 215 10}} test grid-13.15 {-pady} -body { - frame .f -width 20 -height 20 -highlightthickness 0 -bg red + frame .f -width 20 -height 20 -highlightthickness 0 -background red grid .f -pady x } -cleanup { grid_reset 13.10 } -returnCodes error -result {bad pad value "x": must be positive screen distance} test grid-13.16 {-pady} -body { - frame .f -width 20 -height 20 -highlightthickness 0 -bg red + frame .f -width 20 -height 20 -highlightthickness 0 -background red grid .f -pady {10 x} } -cleanup { grid_reset 13.10.1 } -returnCodes error -result {bad 2nd pad value "x": must be positive screen distance} test grid-13.17 {-pady} -body { - frame .f -width 200 -height 100 -highlightthickness 0 -bg red + frame .f -width 200 -height 100 -highlightthickness 0 -background red grid .f update set a "[winfo height .f] [winfo height .]" grid .f -pady 1 update @@ -1266,11 +1266,11 @@ list $a "[winfo height .f] [winfo height .] [winfo y .f]" } -cleanup { grid_reset 13.11 } -result {{100 100} {100 102 1}} test grid-13.18 {-pady} -body { - frame .f -width 200 -height 100 -highlightthickness 0 -bg red + frame .f -width 200 -height 100 -highlightthickness 0 -background red grid .f update set a "[winfo height .f] [winfo height .]" grid .f -pady {4 16} update @@ -1277,11 +1277,11 @@ list $a "[winfo height .f] [winfo height .] [winfo y .f]" } -cleanup { grid_reset 13.11.1 } -result {{100 100} {100 120 4}} test grid-13.19 {-ipad x and y} -body { - frame .f -width 20 -height 20 -highlightthickness 0 -bg red + frame .f -width 20 -height 20 -highlightthickness 0 -background red grid columnconfigure . 0 -minsize 150 grid rowconfigure . 0 -minsize 100 set a "" foreach x {0 5} { foreach y {0 5} { @@ -1314,19 +1314,19 @@ } -cleanup { grid_reset 13.13 } -result {.b,,.1 ,.b,.2} test grid-14.1 {structure notify} -body { - frame .f -width 200 -height 100 -highlightthickness 0 -bg red - frame .g -width 200 -height 100 -highlightthickness 0 -bg red + frame .f -width 200 -height 100 -highlightthickness 0 -background red + frame .g -width 200 -height 100 -highlightthickness 0 -background red grid .f grid .g -in .f update set a "" lappend a "[winfo x .g],[winfo y .g] \ [winfo width .g],[winfo height .g]" - .f configure -bd 5 -relief raised + .f configure -borderwidth 5 -relief raised update lappend a "[winfo x .g],[winfo y .g] \ [winfo width .g],[winfo height .g]" return $a } -cleanup { @@ -1338,11 +1338,11 @@ grid .f grid .f.g update set a "" lappend a [grid bbox .],[grid bbox .f] - .f config -bd 20 + .f config -borderwidth 20 update lappend a [grid bbox .],[grid bbox .f] } -cleanup { grid_reset 14.2 } -result {{0 0 200 100,0 0 200 100} {0 0 240 140,20 20 200 100}} @@ -1359,11 +1359,11 @@ set A(.$i) 0 } grid .0 .1 .2 update bind .1 {destroy .0} - .2 configure -bd 10 + .2 configure -borderwidth 10 update bind . {} array get A } -cleanup { grid_reset 14.3 @@ -1394,11 +1394,11 @@ grid_reset 15.2 } -result {.b {} .b} test grid-16.1 {layout centering} -body { foreach i {0 1 2} { - frame .$i -bg gray -width 75 -height 50 -bd 2 -relief ridge + frame .$i -background gray -width 75 -height 50 -borderwidth 2 -relief ridge grid .$i -row $i -column $i -sticky nswe } grid propagate . 0 grid anchor . center . configure -width 300 -height 250 @@ -1407,11 +1407,11 @@ } -cleanup { grid_reset 16.1 } -result {37 50 225 150} test grid-16.2 {layout weights (expanding)} -body { foreach i {0 1 2} { - frame .$i -bg gray -width 75 -height 50 -bd 2 -relief ridge + frame .$i -background gray -width 75 -height 50 -borderwidth 2 -relief ridge grid .$i -row $i -column $i -sticky nswe grid rowconfigure . $i -weight [expr $i + 1] grid columnconfigure . $i -weight [expr $i + 1] } grid propagate . 0 @@ -1425,11 +1425,11 @@ } -cleanup { grid_reset 16.2 } -result {120-75 167-100 213-125} test grid-16.3 {layout weights (shrinking)} -body { foreach i {0 1 2} { - frame .$i -bg gray -width 100 -height 75 -bd 2 -relief ridge + frame .$i -background gray -width 100 -height 75 -borderwidth 2 -relief ridge grid .$i -row $i -column $i -sticky nswe grid rowconfigure . $i -weight [expr $i + 1] grid columnconfigure . $i -weight [expr $i + 1] } grid propagate . 0 @@ -1443,11 +1443,11 @@ } -cleanup { grid_reset 16.3 } -result {84-63 66-50 50-37} test grid-16.4 {layout weights (shrinking with minsize)} -body { foreach i {0 1 2} { - frame .$i -bg gray -width 100 -height 75 -bd 2 -relief ridge + frame .$i -background gray -width 100 -height 75 -borderwidth 2 -relief ridge grid .$i -row $i -column $i -sticky nswe grid rowconfigure . $i -weight [expr $i + 1] -minsize 45 grid columnconfigure . $i -weight [expr $i + 1] -minsize 65 } grid propagate . 0 @@ -1461,11 +1461,11 @@ } -cleanup { grid_reset 16.4 } -result {70-60 65-45 65-45} test grid-16.5 {layout weights (shrinking at minsize)} -body { foreach i {0 1 2} { - frame .$i -bg gray -width 100 -height 75 -bd 2 -relief ridge + frame .$i -background gray -width 100 -height 75 -borderwidth 2 -relief ridge grid .$i -row $i -column $i -sticky nswe grid rowconfigure . $i -weight 0 -minsize 70 grid columnconfigure . $i -weight 0 -minsize 90 } grid propagate . 0 @@ -1479,11 +1479,11 @@ } -cleanup { grid_reset 16.5 } -result {100-75 100-75 100-75} test grid-16.6 {layout weights (shrinking at minsize)} -body { foreach i {0 1 2} { - frame .$i -bg gray -width 100 -height 75 -bd 2 -relief ridge + frame .$i -background gray -width 100 -height 75 -borderwidth 2 -relief ridge grid .$i -row $i -column $i -sticky nswe grid rowconfigure . $i -weight [expr $i + 1] -minsize 52 grid columnconfigure . $i -weight [expr $i + 1] -minsize 69 } grid propagate . 0 @@ -1503,11 +1503,11 @@ # not responding for width ang height settings, so that # [winfo width .$i] [winfo height .$i] take different values # That doesn't happen if previous tests run test grid-16.7 {layout weights (shrinking at minsize)} -body { foreach i {0 1 2} { - frame .$i -bg gray -width 100 -height 75 -bd 2 -relief ridge + frame .$i -background gray -width 100 -height 75 -borderwidth 2 -relief ridge grid .$i -row $i -column $i -sticky nswe } grid propagate . 0 grid columnconfigure . 1 -weight 1 -minsize 0 grid rowconfigure . 1 -weight 1 -minsize 0 @@ -1521,15 +1521,15 @@ } -cleanup { grid_reset 16.7 } -result {100-75-1 1-1-0 100-75-1} test grid-16.8 {layout internal constraints} -body { foreach i {0 1 2 3 4} { - frame .$i -bg gray -width 30 -height 25 -bd 2 -relief ridge + frame .$i -background gray -width 30 -height 25 -borderwidth 2 -relief ridge grid .$i -row $i -column $i -sticky nswe } - frame .f -bg red -width 250 -height 200 - frame .g -bg green -width 200 -height 180 + frame .f -background red -width 250 -height 200 + frame .g -background green -width 200 -height 180 lower .f raise .g .f grid .f -row 1 -column 1 -rowspan 3 -columnspan 3 -sticky nswe grid .g -row 1 -column 1 -rowspan 2 -columnspan 2 -sticky nswe update @@ -1735,11 +1735,11 @@ 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]] 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 + frame .$i -background gray -width 100 -height 75 -borderwidth 2 -relief ridge grid .$i -row $i -column $i -sticky nswe } grid propagate . 0 grid columnconfigure . {0 1} -weight 1 -minsize 0 grid rowconfigure . {0 1} -weight 1 -minsize 0 @@ -1920,11 +1920,11 @@ } -cleanup { grid_reset 21.5 } -returnCodes error -result {bad anchor "x": must be n, ne, e, se, s, sw, w, nw, or center} test grid-21.6 {anchor} -body { foreach i {0 1 2} { - frame .$i -bg gray -width 75 -height 50 -bd 2 -relief ridge + frame .$i -background gray -width 75 -height 50 -borderwidth 2 -relief ridge grid .$i -row $i -column $i -sticky nswe } grid propagate . 0 . configure -width 300 -height 250 set res {} @@ -1941,16 +1941,16 @@ {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 # it assymetric horizontally. - labelframe .f -bd 0 + labelframe .f -borderwidth 0 frame .f.x -width 20 -height 20 .f configure -labelwidget .f.x pack .f -fill both -expand 1 foreach i {0 1 2} { - frame .$i -bg gray -width 75 -height 50 -bd 2 -relief ridge + frame .$i -background gray -width 75 -height 50 -borderwidth 2 -relief ridge grid .$i -in .f -row $i -column $i -sticky nswe } pack propagate . 0 grid propagate .f 0 . configure -width 300 -height 250 @@ -1996,13 +1996,13 @@ grid .c -row 0 -column 0 grid info .c } {-in .a -column 0 -row 0 -columnspan 2 -rowspan 2 -ipadx 0 -ipady 0 -padx {3 5} -pady {4 7} -sticky ns} grid_reset 22.3.1 test grid-22.4 {remove, calling Tk_UnmaintainGeometry} { - frame .f -bd 2 -relief raised + frame .f -borderwidth 2 -relief raised place .f -x 10 -y 20 -width 200 -height 100 - frame .f2 -width 50 -height 30 -bg red + frame .f2 -width 50 -height 30 -background red grid .f2 -in .f update set x [winfo ismapped .f2] grid remove .f2 place .f -x 30 Index: tests/imgBmap.test ================================================================== --- tests/imgBmap.test +++ tests/imgBmap.test @@ -11,10 +11,12 @@ namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands imageInit +testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] + set data1 {#define foo_width 16 #define foo_height 16 #define foo_x_hot 3 #define foo_y_hot 3 static unsigned char foo_bits[] = { @@ -79,22 +81,22 @@ } -result foo.bm test imageBmap-1.6 {options for bitmap images} -body { list [catch {image create bitmap i1 -file bogus} msg] [string tolower $msg] } -result {1 {couldn't read bitmap file "bogus": no such file or directory}} test imageBmap-1.7 {options for bitmap images} -body { - image create bitmap i1 -foreground #00ff00 - lindex [i1 configure -foreground] 4 + image create bitmap i1 -color #00ff00 + lindex [i1 configure -color] 4 } -cleanup { image delete i1 } -result {#00ff00} test imageBmap-1.8 {options for bitmap images} -setup { destroy .c pack [canvas .c] update } -body { set errMsg {} - image create bitmap i1 -foreground bad_color + image create bitmap i1 -color bad_color .c create image 200 100 -image i1 update list $errMsg $errorInfo } -cleanup { destroy .c @@ -128,11 +130,11 @@ imageCleanup } -body { image create bitmap image1 list [info commands image1] [imageNames] \ [image width image1] [image height image1] \ - [lindex [image1 configure -foreground] 4] \ + [lindex [image1 configure -color] 4] \ [lindex [image1 configure -background] 4] } -cleanup { image delete image1 } -result {image1 image1 0 0 #000000 {}} @@ -208,11 +210,11 @@ } -body { proc bgerror args {} image create bitmap i1 -file foo.bm .c create image 100 100 -image i1 update - i1 configure -foreground bogus + i1 configure -color bogus update } -cleanup { image delete i1 destroy .c } -result {} @@ -356,28 +358,28 @@ } -returnCodes error -result {wrong # args: should be "i1 cget option"} test imageBmap-7.3 {ImgBmapCmd procedure, "cget" option} -body { i1 cget a b } -returnCodes error -result {wrong # args: should be "i1 cget option"} test imageBmap-7.4 {ImgBmapCmd procedure, "cget" option} -body { - i1 co -foreground #123456 - i1 cget -foreground + i1 co -color #123456 + i1 cget -color } -result {#123456} test imageBmap-7.5 {ImgBmapCmd procedure, "cget" option} -body { i1 cget -stupid } -returnCodes error -result {unknown option "-stupid"} -test imageBmap-7.6 {ImgBmapCmd procedure} -body { +test imageBmap-7.6 {ImgBmapCmd procedure} -constraints nodeprecated -body { llength [i1 configure] -} -result 6 +} -result 7 test imageBmap-7.7 {ImgBmapCmd procedure} -body { - i1 co -foreground #001122 - i1 configure -foreground -} -result {-foreground {} {} #000000 #001122} + i1 co -color #001122 + i1 configure -color +} -result {-color color Color #000000 #001122} test imageBmap-7.8 {ImgBmapCmd procedure} -body { i1 configure -gorp } -returnCodes error -result {unknown option "-gorp"} test imageBmap-7.9 {ImgBmapCmd procedure} -body { - i1 configure -foreground #221100 -background + i1 configure -color #221100 -background } -returnCodes error -result {value for "-background" missing} test imageBmap-7.10 {ImgBmapCmd procedure} -body { i1 gorp } -returnCodes error -result {bad option "gorp": must be cget or configure} # Clean it up after use!! @@ -431,11 +433,11 @@ proc bgerror args {} imageCleanup .c delete all image create bitmap i1 -data $data1 .c create image 50 100 -image i1 -tags i1.1 - i1 configure -foreground bogus + i1 configure -color bogus update } -cleanup { image delete i1 destroy .c } -result {} @@ -448,11 +450,11 @@ destroy .c pack [canvas .c] update } -body { imageCleanup - image create bitmap i1 -data $data1 -maskdata $data2 -foreground #112233 \ + image create bitmap i1 -data $data1 -maskdata $data2 -color #112233 \ -background #445566 .c create image 100 100 -image i1 update .c delete all image delete i1 @@ -463,11 +465,11 @@ destroy .c pack [canvas .c] update } -body { imageCleanup - image create bitmap i1 -data $data1 -maskdata $data2 -foreground #112233 \ + image create bitmap i1 -data $data1 -maskdata $data2 -color #112233 \ -background #445566 .c create image 100 100 -image i1 button .b1 -image i1 button .b2 -image i1 button .b3 -image i1 Index: tests/listbox.test ================================================================== --- tests/listbox.test +++ tests/listbox.test @@ -9,10 +9,12 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands namespace import -force tcltest::test +testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] + set fixed {Courier -12} proc record {name args} { global log lappend log [format {%s %.6g %.6g} $name {*}$args] @@ -83,26 +85,26 @@ } -result {{#ff0000} #ff0000} test listbox-1.4 {configuration options} -body { .l configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test listbox-1.5 {configuration options} -body { - .l configure -bd 4 - list [lindex [.l configure -bd] 4] [.l cget -bd] + .l configure -borderwidth 4 + list [lindex [.l configure -borderwidth] 4] [.l cget -borderwidth] } -cleanup { - .l configure -bd [lindex [.l configure -bd] 3] + .l configure -borderwidth [lindex [.l configure -borderwidth] 3] } -result {4 4} test listbox-1.6 {configuration options} -body { - .l configure -bd badValue + .l configure -borderwidth badValue } -returnCodes error -result {bad screen distance "badValue"} test listbox-1.7 {configuration options} -body { - .l configure -bg #ff0000 - list [lindex [.l configure -bg] 4] [.l cget -bg] + .l configure -background #ff0000 + list [lindex [.l configure -background] 4] [.l cget -background] } -cleanup { - .l configure -bg [lindex [.l configure -bg] 3] + .l configure -background [lindex [.l configure -background] 3] } -result {{#ff0000} #ff0000} test listbox-1.8 {configuration options} -body { - .l configure -bg non-existent + .l configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test listbox-1.9 {configuration options} -body { .l configure -borderwidth 1.3 list [lindex [.l configure -borderwidth] 4] [.l cget -borderwidth] } -cleanup { @@ -119,17 +121,17 @@ } -result {arrow arrow} test listbox-1.12 {configuration options} -body { .l configure -cursor badValue } -returnCodes error -result {bad cursor spec "badValue"} test listbox-1.13 {configuration options} -body { - .l configure -disabledforeground #110022 - list [lindex [.l configure -disabledforeground] 4] [.l cget -disabledforeground] + .l configure -disabledcolor #110022 + list [lindex [.l configure -disabledcolor] 4] [.l cget -disabledcolor] } -cleanup { - .l configure -disabledforeground [lindex [.l configure -disabledforeground] 3] + .l configure -disabledcolor [lindex [.l configure -disabledcolor] 3] } -result {{#110022} #110022} test listbox-1.14 {configuration options} -body { - .l configure -disabledforeground bogus + .l configure -disabledcolor bogus } -returnCodes error -result {unknown color name "bogus"} test listbox-1.15 {configuration options} -body { .l configure -exportselection yes list [lindex [.l configure -exportselection] 4] [.l cget -exportselection] } -cleanup { @@ -137,32 +139,32 @@ } -result {1 1} test listbox-1.16 {configuration options} -body { .l configure -exportselection xyzzy } -returnCodes error -result {expected boolean value but got "xyzzy"} test listbox-1.17 {configuration options} -body { - .l configure -fg #110022 - list [lindex [.l configure -fg] 4] [.l cget -fg] + .l configure -color #110022 + list [lindex [.l configure -color] 4] [.l cget -color] } -cleanup { - .l configure -fg [lindex [.l configure -fg] 3] + .l configure -color [lindex [.l configure -color] 3] } -result {{#110022} #110022} test listbox-1.18 {configuration options} -body { - .l configure -fg bogus + .l configure -color bogus } -returnCodes error -result {unknown color name "bogus"} test listbox-1.19 {configuration options} -body { .l configure -font {Helvetica 12} list [lindex [.l configure -font] 4] [.l cget -font] } -cleanup { .l configure -font [lindex [.l configure -font] 3] } -result {{Helvetica 12} {Helvetica 12}} test listbox-1.21 {configuration options} -body { - .l configure -foreground #110022 - list [lindex [.l configure -foreground] 4] [.l cget -foreground] + .l configure -color #110022 + list [lindex [.l configure -color] 4] [.l cget -color] } -cleanup { - .l configure -foreground [lindex [.l configure -foreground] 3] + .l configure -color [lindex [.l configure -color] 3] } -result {{#110022} #110022} test listbox-1.22 {configuration options} -body { - .l configure -foreground bogus + .l configure -color bogus } -returnCodes error -result {unknown color name "bogus"} test listbox-1.23 {configuration options} -body { .l configure -height 30 list [lindex [.l configure -height] 4] [.l cget -height] } -cleanup { @@ -245,17 +247,17 @@ } -result {1 1} test listbox-1.38 {configuration options} -body { .l configure -selectborderwidth badValue } -returnCodes error -result {bad screen distance "badValue"} test listbox-1.39 {configuration options} -body { - .l configure -selectforeground #654321 - list [lindex [.l configure -selectforeground] 4] [.l cget -selectforeground] + .l configure -selectcolor #654321 + list [lindex [.l configure -selectcolor] 4] [.l cget -selectcolor] } -cleanup { - .l configure -selectforeground [lindex [.l configure -selectforeground] 3] + .l configure -selectcolor [lindex [.l configure -selectcolor] 3] } -result {{#654321} #654321} test listbox-1.40 {configuration options} -body { - .l configure -selectforeground bogus + .l configure -selectcolor bogus } -returnCodes error -result {unknown color name "bogus"} test listbox-1.41 {configuration options} -body { .l configure -selectmode string list [lindex [.l configure -selectmode] 4] [.l cget -selectmode] } -cleanup { @@ -350,11 +352,11 @@ } -result {.l} # Listbox used in 3.1 -3.115 tests destroy .l -listbox .l -width 20 -height 5 -bd 4 -highlightthickness 1 -selectborderwidth 2 +listbox .l -width 20 -height 5 -borderwidth 4 -highlightthickness 1 -selectborderwidth 2 pack .l .l insert 0 el0 el1 el2 el3 el4 el5 el6 el7 el8 el9 el10 el11 el12 el13 el14 \ el15 el16 el17 update test listbox-3.1 {ListboxWidgetCmd procedure} -body { @@ -519,13 +521,13 @@ .l cget -gorp } -returnCodes error -result {unknown option "-gorp"} test listbox-3.22 {ListboxWidgetCmd procedure, "cget" option} -body { .l cget -setgrid } -result 0 -test listbox-3.23 {ListboxWidgetCmd procedure, "configure" option} -body { +test listbox-3.23 {ListboxWidgetCmd procedure, "configure" option} -constraints nodeprecated -body { llength [.l configure] -} -result 28 +} -result 31 test listbox-3.24 {ListboxWidgetCmd procedure, "configure" option} -body { .l configure -gorp } -returnCodes error -result {unknown option "-gorp"} test listbox-3.25 {ListboxWidgetCmd procedure, "configure" option} -body { .l configure -setgrid @@ -532,15 +534,15 @@ } -result {-setgrid setGrid SetGrid 0 0} test listbox-3.26 {ListboxWidgetCmd procedure, "configure" option} -body { .l configure -gorp is_messy } -returnCodes error -result {unknown option "-gorp"} test listbox-3.27 {ListboxWidgetCmd procedure, "configure" option} -body { - set oldbd [.l cget -bd] + set oldbd [.l cget -borderwidth] set oldht [.l cget -highlightthickness] - .l configure -bd 3 -highlightthickness 0 - set x "[.l cget -bd] [.l cget -highlightthickness]" - .l configure -bd $oldbd -highlightthickness $oldht + .l configure -borderwidth 3 -highlightthickness 0 + set x "[.l cget -borderwidth] [.l cget -highlightthickness]" + .l configure -borderwidth $oldbd -highlightthickness $oldht set x } -result {3 0} test listbox-3.28 {ListboxWidgetCmd procedure, "curselection" option} -body { .l curselection a } -returnCodes error -result {wrong # args: should be ".l curselection"} @@ -1126,11 +1128,11 @@ destroy .l } -result {0 0.266667} # Listbox used in 3.127 -3.137 tests destroy .l -listbox .l -width 20 -height 5 -bd 4 -highlightthickness 1 -selectborderwidth 2 +listbox .l -width 20 -height 5 -borderwidth 4 -highlightthickness 1 -selectborderwidth 2 pack .l .l insert 0 el0 el1 el2 el3 el4 el5 el6 el7 el8 el9 el10 el11 el12 el13 el14 \ el15 el16 el17 update test listbox-3.127 {ListboxWidgetCmd procedure, "xview" option} -body { @@ -1359,11 +1361,11 @@ } -body { listbox .l2 -width 15 -height 20 -xscrollcommand "record x" \ -yscrollcommand "record y" pack .l2 update - .l2 configure -fg black + .l2 configure -color black set log {} update set log } -cleanup { destroy .l2 @@ -1513,11 +1515,11 @@ test listbox-5.3 {ListboxComputeGeometry procedure} -constraints { fonts } -setup { destroy .l } -body { - listbox .l -font $fixed -width 0 -height 10 -bd 3 + listbox .l -font $fixed -width 0 -height 10 -borderwidth 3 .l insert 0 Short "Really much longer" Longer pack .l update list [winfo reqwidth .l] [winfo reqheight .l] } -result {138 170} @@ -1889,15 +1891,15 @@ destroy .l } -result {{0 0.222222} {0 0.333333}} test listbox-8.3 {ListboxEventProc procedure} -setup { deleteWindows } -body { - listbox .l1 -bg #543210 + listbox .l1 -background #543210 rename .l1 .l2 set x {} lappend x [winfo children .] - lappend x [.l2 cget -bg] + lappend x [.l2 cget -background] destroy .l1 lappend x [info command .l*] [winfo children .] } -cleanup { deleteWindows } -result {.l1 #543210 {} {}} @@ -2707,50 +2709,50 @@ test listbox-21.12 {ListboxListVarProc, cleanup item attributes} -setup { destroy .l } -body { set x [list a b c d e f g] listbox .l -listvar x - .l itemconfigure end -fg red + .l itemconfigure end -color red set x [list a b c d] set x [list 0 1 2 3 4 5 6] - .l itemcget end -fg + .l itemcget end -color } -cleanup { destroy .l } -result {} test listbox-21.12a {ListboxListVarProc, cleanup item attributes} -setup { destroy .l } -body { set x [list a b c d e f g] listbox .l -listvar x - .l itemconfigure end -fg red + .l itemconfigure end -color red set x [list a b c d] set x [list 0 1 2 3 4 5 6] - .l itemcget end -fg + .l itemcget end -color } -cleanup { destroy .l } -result {} test listbox-21.13 {listbox item configurations and listvar based deletions} -setup { destroy .l } -body { catch {unset x} listbox .l -listvar x .l insert end a b c - .l itemconfigure 1 -fg red + .l itemconfigure 1 -color red set x [list b c] - .l itemcget 1 -fg + .l itemcget 1 -color } -cleanup { destroy .l } -result red test listbox-21.14 {listbox item configurations and listvar based inserts} -setup { destroy .l } -body { catch {unset x} listbox .l -listvar x .l insert end a b c - .l itemconfigure 0 -fg red + .l itemconfigure 0 -color red set x [list 1 2 3 4 a b c] - .l itemcget 0 -fg + .l itemcget 0 -color } -cleanup { destroy .l } -result red test listbox-21.15 {ListboxListVarProc, update vertical scrollbar} -setup { destroy .l @@ -2820,24 +2822,27 @@ catch {.l itemconfigure 0} result set result } -cleanup { destroy .l } -result {item number "0" out of range} -test listbox-23.2 {ConfigureListboxItem} -setup { +test listbox-23.2 {ConfigureListboxItem} -constraints nodeprecated -setup { destroy .l } -body { listbox .l .l insert end a b c d .l itemconfigure 0 } -cleanup { destroy .l } -result [list {-background background Background {} {}} \ {-bg -background} \ - {-fg -foreground} \ - {-foreground foreground Foreground {} {}} \ - {-selectbackground selectBackground Foreground {} {}} \ - {-selectforeground selectForeground Background {} {}}] + {-color color Color {} {}} \ + {-fg -color} \ + {-foreground -color} \ + {-selectbackground selectBackground SelectBackground {} {}} \ + {-selectcolor selectColor SelectColor {} {}} \ + {-selectfg -selectcolor} \ + {-selectforeground -selectcolor}] test listbox-23.3 {ConfigureListboxItem, itemco shortcut} -setup { destroy .l } -body { listbox .l .l insert end a b c d @@ -2860,18 +2865,18 @@ } -body { listbox .l set i 0 foreach color {red orange yellow green blue white violet} { .l insert end $color - .l itemconfigure $i -bg $color + .l itemconfigure $i -background $color incr i } pack .l update - list [.l itemcget 0 -bg] [.l itemcget 1 -bg] [.l itemcget 2 -bg] \ - [.l itemcget 3 -bg] [.l itemcget 4 -bg] [.l itemcget 5 -bg] \ - [.l itemcget 6 -bg] + list [.l itemcget 0 -background] [.l itemcget 1 -background] [.l itemcget 2 -background] \ + [.l itemcget 3 -background] [.l itemcget 4 -background] [.l itemcget 5 -background] \ + [.l itemcget 6 -background] } -cleanup { destroy .l } -result {red orange yellow green blue white violet} # Listbox used in 23.6 -23.17 tests @@ -2886,35 +2891,35 @@ } -result {{#ff0000} #ff0000} test listbox-23.7 {configuration options} -body { .l configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test listbox-23.8 {configuration options} -body { - .l itemconfigure 0 -bg #ff0000 - list [lindex [.l itemconfigure 0 -bg] 4] [.l itemcget 0 -bg] + .l itemconfigure 0 -background #ff0000 + list [lindex [.l itemconfigure 0 -background] 4] [.l itemcget 0 -background] } -cleanup { - .l configure -bg #ffffff + .l configure -background #ffffff } -result {{#ff0000} #ff0000} test listbox-23.9 {configuration options} -body { - .l configure -bg non-existent + .l configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test listbox-23.10 {configuration options} -body { - .l itemconfigure 0 -fg #110022 - list [lindex [.l itemconfigure 0 -fg] 4] [.l itemcget 0 -fg] + .l itemconfigure 0 -color #110022 + list [lindex [.l itemconfigure 0 -color] 4] [.l itemcget 0 -color] } -cleanup { - .l configure -fg #000000 + .l configure -color #000000 } -result {{#110022} #110022} test listbox-23.11 {configuration options} -body { - .l configure -fg bogus + .l configure -color bogus } -returnCodes error -result {unknown color name "bogus"} test listbox-23.12 {configuration options} -body { - .l itemconfigure 0 -foreground #110022 - list [lindex [.l itemconfigure 0 -foreground] 4] [.l itemcget 0 -foreground] + .l itemconfigure 0 -color #110022 + list [lindex [.l itemconfigure 0 -color] 4] [.l itemcget 0 -color] } -cleanup { - .l configure -foreground #000000 + .l configure -color #000000 } -result {{#110022} #110022} test listbox-23.13 {configuration options} -body { - .l configure -foreground bogus + .l configure -color bogus } -returnCodes error -result {unknown color name "bogus"} test listbox-23.14 {configuration options} -body { .l itemconfigure 0 -selectbackground #110022 list [lindex [.l itemconfigure 0 -selectbackground] 4] [.l itemcget 0 -selectbackground] } -cleanup { @@ -2922,37 +2927,37 @@ } -result {{#110022} #110022} test listbox-23.15 {configuration options} -body { .l configure -selectbackground bogus } -returnCodes error -result {unknown color name "bogus"} test listbox-23.16 {configuration options} -body { - .l itemconfigure 0 -selectforeground #654321 - list [lindex [.l itemconfigure 0 -selectforeground] 4] [.l itemcget 0 -selectforeground] + .l itemconfigure 0 -selectcolor #654321 + list [lindex [.l itemconfigure 0 -selectcolor] 4] [.l itemcget 0 -selectcolor] } -cleanup { - .l configure -selectforeground #000000 + .l configure -selectcolor #000000 } -result {{#654321} #654321} test listbox-23.17 {configuration options} -body { - .l configure -selectforeground bogus + .l configure -selectcolor bogus } -returnCodes error -result {unknown color name "bogus"} # ListboxWidgetObjCmd, itemcget test listbox-24.1 {itemcget} -setup { destroy .l } -body { listbox .l .l insert end a b c d - .l itemcget 0 -fg + .l itemcget 0 -color } -cleanup { destroy .l } -result {} test listbox-24.2 {itemcget} -setup { destroy .l } -body { listbox .l .l insert end a b c d - .l itemconfigure 0 -fg red - .l itemcget 0 -fg + .l itemconfigure 0 -color red + .l itemcget 0 -color } -cleanup { destroy .l } -result red test listbox-24.3 {itemcget} -setup { destroy .l @@ -2980,25 +2985,25 @@ test listbox-25.1 {listbox item configurations and widget based deletions} -setup { destroy .l } -body { listbox .l .l insert end a - .l itemconfigure 0 -fg red + .l itemconfigure 0 -color red .l delete 0 end .l insert end a - .l itemcget 0 -fg + .l itemcget 0 -color } -cleanup { destroy .l } -result {} test listbox-25.2 {listbox item configurations and widget based inserts} -setup { destroy .l } -body { listbox .l .l insert end a b c - .l itemconfigure 0 -fg red + .l itemconfigure 0 -color red .l insert 0 1 2 3 4 - list [.l itemcget 0 -fg] [.l itemcget 4 -fg] + list [.l itemcget 0 -color] [.l itemcget 4 -color] } -cleanup { destroy .l } -result {{} red} Index: tests/menu.test ================================================================== --- tests/menu.test +++ tests/menu.test @@ -9,10 +9,12 @@ namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands imageInit +testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] + # find the earth.gif file for use in these tests (tests 2.*) set earthPhotoFile [file join [file dirname [info script]] earth.gif] testConstraint hasEarthPhoto [file exists $earthPhotoFile] test menu-1.1 {Tk_MenuCmd procedure} -body { @@ -165,16 +167,16 @@ } -result {1.3} test menu-2.4 {configuration options -activeborderwidth badValue} -body { .m1 configure -activeborderwidth badValue } -returnCodes error -result {bad screen distance "badValue"} -test menu-2.5 {configuration options -activeforeground #ff0000} -body { - .m1 configure -activeforeground #ff0000 - .m1 cget -activeforeground +test menu-2.5 {configuration options -activecolor #ff0000} -body { + .m1 configure -activecolor #ff0000 + .m1 cget -activecolor } -result {#ff0000} -test menu-2.6 {configuration options -activeforeground non-existent} -body { - .m1 configure -activeforeground non-existent +test menu-2.6 {configuration options -activecolor non-existent} -body { + .m1 configure -activecolor non-existent } -returnCodes error -result {unknown color name "non-existent"} test menu-2.6a {configuration options -activerelief sunken} -body { .m1 configure -activerelief sunken .m1 cget -activerelief @@ -189,16 +191,16 @@ } -result {#ff0000} test menu-2.8 {configuration options -background non-existent} -body { .m1 configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} -test menu-2.9 {configuration options -bg #110022} -body { - .m1 configure -bg #110022 - .m1 cget -bg +test menu-2.9 {configuration options -background #110022} -body { + .m1 configure -background #110022 + .m1 cget -background } -result {#110022} -test menu-2.10 {configuration options -bg bogus} -body { - .m1 configure -bg bogus +test menu-2.10 {configuration options -background bogus} -body { + .m1 configure -background bogus } -returnCodes error -result {unknown color name "bogus"} test menu-2.11 {configuration options -borderwidth 1.3} -body { .m1 configure -borderwidth 1.3 .m1 cget -borderwidth @@ -213,36 +215,36 @@ } -result {arrow} test menu-2.14 {configuration options -cursor badValue} -body { .m1 configure -cursor badValue } -returnCodes error -result {bad cursor spec "badValue"} -test menu-2.15 {configuration options -disabledforeground #00ff00} -body { - .m1 configure -disabledforeground #00ff00 - .m1 cget -disabledforeground +test menu-2.15 {configuration options -disabledcolor #00ff00} -body { + .m1 configure -disabledcolor #00ff00 + .m1 cget -disabledcolor } -result {#00ff00} -test menu-2.16 {configuration options -disabledforeground xyzzy} -body { - .m1 configure -disabledforeground xyzzy +test menu-2.16 {configuration options -disabledcolor xyzzy} -body { + .m1 configure -disabledcolor xyzzy } -returnCodes error -result {unknown color name "xyzzy"} -test menu-2.17 {configuration options -fg #110022} -body { - .m1 configure -fg #110022 - .m1 cget -fg +test menu-2.17 {configuration options -color #110022} -body { + .m1 configure -color #110022 + .m1 cget -color } -result {#110022} -test menu-2.18 {configuration options -fg bogus} -body { - .m1 configure -fg bogus +test menu-2.18 {configuration options -color bogus} -body { + .m1 configure -color bogus } -returnCodes error -result {unknown color name "bogus"} test menu-2.19 {configuration options -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*} -body { .m1 configure -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* .m1 cget -font } -result {-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*} -test menu-2.20 {configuration options -foreground #110022} -body { - .m1 configure -foreground #110022 - .m1 cget -foreground +test menu-2.20 {configuration options -color #110022} -body { + .m1 configure -color #110022 + .m1 cget -color } -result {#110022} -test menu-2.21 {configuration options -foreground bogus} -body { - .m1 configure -foreground bogus +test menu-2.21 {configuration options -color bogus} -body { + .m1 configure -color bogus } -returnCodes error -result {unknown color name "bogus"} test menu-2.22 {configuration options -postcommand {any old string}} -body { .m1 configure -postcommand {any old string} .m1 cget -postcommand @@ -350,60 +352,60 @@ test menu-2.42 {entry configuration options 5 -activebackground non-existent radiobutton} -body { .m1 entryconfigure 5 -activebackground non-existent } -returnCodes error -result {unknown color name "non-existent"} -test menu-2.43 {entry configuration options 0 -activeforeground #ff0000 tearoff} -body { - .m1 entryconfigure 0 -activeforeground #ff0000 -} -returnCodes error -result {unknown option "-activeforeground"} - -test menu-2.44 {entry configuration options 1 -activeforeground #ff0000 command} -body { - .m1 entryconfigure 1 -activeforeground #ff0000 - lindex [.m1 entryconfigure 1 -activeforeground] 4 -} -result {#ff0000} - -test menu-2.45 {entry configuration options 2 -activeforeground #ff0000 cascade} -body { - .m1 entryconfigure 2 -activeforeground #ff0000 - lindex [.m1 entryconfigure 2 -activeforeground] 4 -} -result {#ff0000} - -test menu-2.46 {entry configuration options 3 -activeforeground #ff0000 separator} -body { - .m1 entryconfigure 3 -activeforeground #ff0000 -} -returnCodes error -result {unknown option "-activeforeground"} - -test menu-2.47 {entry configuration options 4 -activeforeground #ff0000 checkbutton} -body { - .m1 entryconfigure 4 -activeforeground #ff0000 - lindex [.m1 entryconfigure 4 -activeforeground] 4 -} -result {#ff0000} - -test menu-2.48 {entry configuration options 5 -activeforeground #ff0000 radiobutton} -body { - .m1 entryconfigure 5 -activeforeground #ff0000 - lindex [.m1 entryconfigure 5 -activeforeground] 4 -} -result {#ff0000} - -test menu-2.49 {entry configuration options 0 -activeforeground non-existent tearoff} -body { - .m1 entryconfigure 0 -activeforeground non-existent -} -returnCodes error -result {unknown option "-activeforeground"} - -test menu-2.50 {entry configuration options 1 -activeforeground non-existent command} -body { - .m1 entryconfigure 1 -activeforeground non-existent -} -returnCodes error -result {unknown color name "non-existent"} - -test menu-2.51 {entry configuration options 2 -activeforeground non-existent cascade} -body { - .m1 entryconfigure 2 -activeforeground non-existent -} -returnCodes error -result {unknown color name "non-existent"} - -test menu-2.52 {entry configuration options 3 -activeforeground non-existent separator} -body { - .m1 entryconfigure 3 -activeforeground non-existent -} -returnCodes error -result {unknown option "-activeforeground"} - -test menu-2.53 {entry configuration options 4 -activeforeground non-existent checkbutton} -body { - .m1 entryconfigure 4 -activeforeground non-existent -} -returnCodes error -result {unknown color name "non-existent"} - -test menu-2.54 {entry configuration options 5 -activeforeground non-existent radiobutton} -body { - .m1 entryconfigure 5 -activeforeground non-existent +test menu-2.43 {entry configuration options 0 -activecolor #ff0000 tearoff} -body { + .m1 entryconfigure 0 -activecolor #ff0000 +} -returnCodes error -result {unknown option "-activecolor"} + +test menu-2.44 {entry configuration options 1 -activecolor #ff0000 command} -body { + .m1 entryconfigure 1 -activecolor #ff0000 + lindex [.m1 entryconfigure 1 -activecolor] 4 +} -result {#ff0000} + +test menu-2.45 {entry configuration options 2 -activecolor #ff0000 cascade} -body { + .m1 entryconfigure 2 -activecolor #ff0000 + lindex [.m1 entryconfigure 2 -activecolor] 4 +} -result {#ff0000} + +test menu-2.46 {entry configuration options 3 -activecolor #ff0000 separator} -body { + .m1 entryconfigure 3 -activecolor #ff0000 +} -returnCodes error -result {unknown option "-activecolor"} + +test menu-2.47 {entry configuration options 4 -activecolor #ff0000 checkbutton} -body { + .m1 entryconfigure 4 -activecolor #ff0000 + lindex [.m1 entryconfigure 4 -activecolor] 4 +} -result {#ff0000} + +test menu-2.48 {entry configuration options 5 -activecolor #ff0000 radiobutton} -body { + .m1 entryconfigure 5 -activecolor #ff0000 + lindex [.m1 entryconfigure 5 -activecolor] 4 +} -result {#ff0000} + +test menu-2.49 {entry configuration options 0 -activecolor non-existent tearoff} -body { + .m1 entryconfigure 0 -activecolor non-existent +} -returnCodes error -result {unknown option "-activecolor"} + +test menu-2.50 {entry configuration options 1 -activecolor non-existent command} -body { + .m1 entryconfigure 1 -activecolor non-existent +} -returnCodes error -result {unknown color name "non-existent"} + +test menu-2.51 {entry configuration options 2 -activecolor non-existent cascade} -body { + .m1 entryconfigure 2 -activecolor non-existent +} -returnCodes error -result {unknown color name "non-existent"} + +test menu-2.52 {entry configuration options 3 -activecolor non-existent separator} -body { + .m1 entryconfigure 3 -activecolor non-existent +} -returnCodes error -result {unknown option "-activecolor"} + +test menu-2.53 {entry configuration options 4 -activecolor non-existent checkbutton} -body { + .m1 entryconfigure 4 -activecolor non-existent +} -returnCodes error -result {unknown color name "non-existent"} + +test menu-2.54 {entry configuration options 5 -activecolor non-existent radiobutton} -body { + .m1 entryconfigure 5 -activecolor non-existent } -returnCodes error -result {unknown color name "non-existent"} test menu-2.55 {entry configuration options 0 -accelerator Ctrl+S tearoff} -body { .m1 entryconfigure 0 -accelerator Ctrl+S } -returnCodes error -result {unknown option "-accelerator"} @@ -644,60 +646,60 @@ test menu-2.108 {entry configuration options 5 -font {kill rock stars} radiobutton} -body { .m1 entryconfigure 5 -font {kill rock stars} } -returnCodes error -result {expected integer but got "rock"} -test menu-2.109 {entry configuration options 0 -foreground #110022 tearoff} -body { - .m1 entryconfigure 0 -foreground #110022 -} -returnCodes error -result {unknown option "-foreground"} - -test menu-2.110 {entry configuration options 1 -foreground #110022 command} -body { - .m1 entryconfigure 1 -foreground #110022 - lindex [.m1 entryconfigure 1 -foreground] 4 -} -result {#110022} - -test menu-2.111 {entry configuration options 2 -foreground #110022 cascade} -body { - .m1 entryconfigure 2 -foreground #110022 - lindex [.m1 entryconfigure 2 -foreground] 4 -} -result {#110022} - -test menu-2.112 {entry configuration options 3 -foreground #110022 separator} -body { - .m1 entryconfigure 3 -foreground #110022 -} -returnCodes error -result {unknown option "-foreground"} - -test menu-2.113 {entry configuration options 4 -foreground #110022 checkbutton} -body { - .m1 entryconfigure 4 -foreground #110022 - lindex [.m1 entryconfigure 4 -foreground] 4 -} -result {#110022} - -test menu-2.114 {entry configuration options 5 -foreground #110022 radiobutton} -body { - .m1 entryconfigure 5 -foreground #110022 - lindex [.m1 entryconfigure 5 -foreground] 4 -} -result {#110022} - -test menu-2.115 {entry configuration options 0 -foreground non-existent tearoff} -body { - .m1 entryconfigure 0 -foreground non-existent -} -returnCodes error -result {unknown option "-foreground"} - -test menu-2.116 {entry configuration options 1 -foreground non-existent command} -body { - .m1 entryconfigure 1 -foreground non-existent -} -returnCodes error -result {unknown color name "non-existent"} - -test menu-2.117 {entry configuration options 2 -foreground non-existent cascade} -body { - .m1 entryconfigure 2 -foreground non-existent -} -returnCodes error -result {unknown color name "non-existent"} - -test menu-2.118 {entry configuration options 3 -foreground non-existent separator} -body { - .m1 entryconfigure 3 -foreground non-existent -} -returnCodes error -result {unknown option "-foreground"} - -test menu-2.119 {entry configuration options 4 -foreground non-existent checkbutton} -body { - .m1 entryconfigure 4 -foreground non-existent -} -returnCodes error -result {unknown color name "non-existent"} - -test menu-2.120 {entry configuration options 5 -foreground non-existent radiobutton} -body { - .m1 entryconfigure 5 -foreground non-existent +test menu-2.109 {entry configuration options 0 -color #110022 tearoff} -body { + .m1 entryconfigure 0 -color #110022 +} -returnCodes error -result {unknown option "-color"} + +test menu-2.110 {entry configuration options 1 -color #110022 command} -body { + .m1 entryconfigure 1 -color #110022 + lindex [.m1 entryconfigure 1 -color] 4 +} -result {#110022} + +test menu-2.111 {entry configuration options 2 -color #110022 cascade} -body { + .m1 entryconfigure 2 -color #110022 + lindex [.m1 entryconfigure 2 -color] 4 +} -result {#110022} + +test menu-2.112 {entry configuration options 3 -color #110022 separator} -body { + .m1 entryconfigure 3 -color #110022 +} -returnCodes error -result {unknown option "-color"} + +test menu-2.113 {entry configuration options 4 -color #110022 checkbutton} -body { + .m1 entryconfigure 4 -color #110022 + lindex [.m1 entryconfigure 4 -color] 4 +} -result {#110022} + +test menu-2.114 {entry configuration options 5 -color #110022 radiobutton} -body { + .m1 entryconfigure 5 -color #110022 + lindex [.m1 entryconfigure 5 -color] 4 +} -result {#110022} + +test menu-2.115 {entry configuration options 0 -color non-existent tearoff} -body { + .m1 entryconfigure 0 -color non-existent +} -returnCodes error -result {unknown option "-color"} + +test menu-2.116 {entry configuration options 1 -color non-existent command} -body { + .m1 entryconfigure 1 -color non-existent +} -returnCodes error -result {unknown color name "non-existent"} + +test menu-2.117 {entry configuration options 2 -color non-existent cascade} -body { + .m1 entryconfigure 2 -color non-existent +} -returnCodes error -result {unknown color name "non-existent"} + +test menu-2.118 {entry configuration options 3 -color non-existent separator} -body { + .m1 entryconfigure 3 -color non-existent +} -returnCodes error -result {unknown option "-color"} + +test menu-2.119 {entry configuration options 4 -color non-existent checkbutton} -body { + .m1 entryconfigure 4 -color non-existent +} -returnCodes error -result {unknown color name "non-existent"} + +test menu-2.120 {entry configuration options 5 -color non-existent radiobutton} -body { + .m1 entryconfigure 5 -color non-existent } -returnCodes error -result {unknown color name "non-existent"} test menu-2.121 {entry configuration options 0 -image image1 tearoff} -constraints { hasEarthPhoto } -body { @@ -1358,18 +1360,18 @@ menu .m1 .m1 clone .m1.clone1 tearoff } -cleanup { destroy .m1 } -result {} -test menu-3.18 {MenuWidgetCmd procedure, "configure" option} -setup { +test menu-3.18 {MenuWidgetCmd procedure, "configure" option} -constraints nodeprecated -setup { destroy .m1 } -body { menu .m1 llength [.m1 configure] } -cleanup { destroy .m1 -} -result 21 +} -result 24 test menu-3.19 {MenuWidgetCmd procedure, "configure" option} -setup { destroy .m1 } -body { menu .m1 .m1 configure -gorp @@ -1509,19 +1511,19 @@ destroy .m1 } -body { menu .m1 .m1 entryconfigure foo } -returnCodes error -result {bad menu entry index "foo"} -test menu-3.36 {MenuWidgetCmd procedure, "entryconfigure" option} -setup { +test menu-3.36 {MenuWidgetCmd procedure, "entryconfigure" option} -constraints nodeprecated -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "test" llength [.m1 entryconfigure 1] } -cleanup { destroy .m1 -} -result 15 +} -result 17 test menu-3.37 {MenuWidgetCmd procedure, "entryconfigure" option} -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "test" @@ -2422,21 +2424,21 @@ test menu-9.4 {ConfigureMenu} -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "test" - .m1 configure -fg red + .m1 configure -color red } -cleanup { deleteWindows } -result {} test menu-9.5 {ConfigureMenu} -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "test" .m1 add command -label "two" - .m1 configure -fg red + .m1 configure -color red } -cleanup { deleteWindows } -result {} test menu-9.6 {ConfigureMenu} -setup { destroy .m1 @@ -2443,29 +2445,29 @@ } -body { menu .m1 .m1 add command -label "test" .m1 add command -label "two" .m1 add command -label "three" - .m1 configure -fg red + .m1 configure -color red } -cleanup { deleteWindows } -result {} test menu-9.7 {ConfigureMenu} -setup { deleteWindows } -body { menu .m1 .m1 clone .m2 tearoff - list [.m1 configure -fg red] [.m2 cget -fg] + list [.m1 configure -color red] [.m2 cget -color] } -cleanup { deleteWindows } -result {{} red} test menu-9.8 {ConfigureMenu} -setup { deleteWindows } -body { menu .m1 .m1 clone .m2 tearoff - list [.m2 configure -fg red] [.m1 cget -fg] + list [.m2 configure -color red] [.m1 cget -color] } -cleanup { deleteWindows } -result {{} red} test menu-9.9 {ConfigureMenu} -setup { destroy .m1 Index: tests/menuDraw.test ================================================================== --- tests/menuDraw.test +++ tests/menuDraw.test @@ -48,11 +48,11 @@ test menuDraw-4.2 {TkMenuEntryFreeDrawOptions} -setup { deleteWindows } -body { menu .m1 .m1 add checkbutton -label "This is a test." -font "Courier 12" \ - -activeforeground red -background green -selectcolor purple + -activecolor red -background green -selectcolor purple destroy .m1 } -result {} test menuDraw-5.1 {TkMenuConfigureDrawOptions - new menu} -setup { @@ -64,18 +64,18 @@ } -result {.m1} test menuDraw-5.2 {TkMenuConfigureDrawOptions - old menu} -setup { deleteWindows } -body { menu .m1 - .m1 configure -fg red + .m1 configure -color red } -cleanup { deleteWindows } -result {} test menuDraw-5.3 {TkMenuConfigureDrawOptions - no disabledFg} -setup { deleteWindows } -body { - menu .m1 -disabledforeground "" + menu .m1 -disabledcolor "" } -cleanup { deleteWindows } -result {.m1} @@ -151,11 +151,11 @@ } -result {} test menuDraw-6.9 {TkMenuConfigureEntryDrawOptions - foreground specified} -setup { deleteWindows } -body { menu .m1 - .m1 add command -label "foo" -foreground "red" + .m1 add command -label "foo" -color "red" } -cleanup { deleteWindows } -result {} test menuDraw-6.10 {TkMenuConfigureEntryDrawOptions - activeBorder specified} -setup { deleteWindows @@ -167,11 +167,11 @@ } -result {} test menuDraw-6.11 {TkMenuConfigureEntryDrawOptions - activeforeground specified} -setup { deleteWindows } -body { menu .m1 - .m1 add command -label "foo" -activeforeground "red" + .m1 add command -label "foo" -activecolor "red" } -cleanup { deleteWindows } -result {} test menuDraw-6.12 {TkMenuConfigureEntryDrawOptions - selectcolor specified} -setup { deleteWindows @@ -192,21 +192,21 @@ } -result {} test menuDraw-6.14 {TkMenuConfigureEntryDrawOptions - activeGC disposal} -setup { deleteWindows } -body { menu .m1 - .m1 add command -label "foo" -activeforeground "red" - .m1 entryconfigure 1 -activeforeground "green" + .m1 add command -label "foo" -activecolor "red" + .m1 entryconfigure 1 -activecolor "green" } -cleanup { deleteWindows } -result {} test menuDraw-6.15 {TkMenuConfigureEntryDrawOptions - disabledGC disposal} -setup { deleteWindows } -body { - menu .m1 -disabledforeground "red" + menu .m1 -disabledcolor "red" .m1 add command -label "foo" - .m1 configure -disabledforeground "green" + .m1 configure -disabledcolor "green" } -cleanup { deleteWindows } -result {} test menuDraw-6.16 {TkMenuConfigureEntryDrawOptions - indicatorGC disposal} -setup { deleteWindows Index: tests/menubut.test ================================================================== --- tests/menubut.test +++ tests/menubut.test @@ -14,10 +14,12 @@ eval tcltest::configure $argv tcltest::loadTestedCommands namespace import -force tcltest::test imageInit +testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] + # Create entries in the option database to be sure that geometry options # like border width have predictable values. option add *Menubutton.borderWidth 2 option add *Menubutton.highlightThickness 2 @@ -38,17 +40,17 @@ } -result {#012345} test menubutton-1.2 {configuration options} -body { .mb configure -activebackground non-existent } -returnCodes error -result {unknown color name "non-existent"} test menubutton-1.3 {configuration options} -body { - .mb configure -activeforeground #ff0000 - .mb cget -activeforeground + .mb configure -activecolor #ff0000 + .mb cget -activecolor } -cleanup { - .mb configure -activeforeground [lindex [.mb configure -activeforeground] 3] + .mb configure -activecolor [lindex [.mb configure -activecolor] 3] } -result {#ff0000} test menubutton-1.4 {configuration options} -body { - .mb configure -activeforeground non-existent + .mb configure -activecolor non-existent } -returnCodes error -result {unknown color name "non-existent"} test menubutton-1.5 {configuration options} -body { .mb configure -anchor nw .mb cget -anchor } -cleanup { @@ -65,26 +67,26 @@ } -result {#ff0000} test menubutton-1.8 {configuration options} -body { .mb configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test menubutton-1.9 {configuration options} -body { - .mb configure -bd 4 - .mb cget -bd + .mb configure -borderwidth 4 + .mb cget -borderwidth } -cleanup { - .mb configure -bd [lindex [.mb configure -bd] 3] + .mb configure -borderwidth [lindex [.mb configure -borderwidth] 3] } -result 4 test menubutton-1.10 {configuration options} -body { - .mb configure -bd badValue + .mb configure -borderwidth badValue } -returnCodes error -result {bad screen distance "badValue"} test menubutton-1.11 {configuration options} -body { - .mb configure -bg #ff0000 - .mb cget -bg + .mb configure -background #ff0000 + .mb cget -background } -cleanup { - .mb configure -bg [lindex [.mb configure -bg] 3] + .mb configure -background [lindex [.mb configure -background] 3] } -result {#ff0000} test menubutton-1.12 {configuration options} -body { - .mb configure -bg non-existent + .mb configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test menubutton-1.13 {configuration options} -body { .mb configure -bitmap questhead .mb cget -bitmap } -cleanup { @@ -119,41 +121,41 @@ } -result {below} test menubutton-1.20 {configuration options} -body { .mb configure -direction badValue } -returnCodes error -result {bad direction "badValue": must be above, below, flush, left, or right} test menubutton-1.21 {configuration options} -body { - .mb configure -disabledforeground #00ff00 - .mb cget -disabledforeground + .mb configure -disabledcolor #00ff00 + .mb cget -disabledcolor } -cleanup { - .mb configure -disabledforeground [lindex [.mb configure -disabledforeground] 3] + .mb configure -disabledcolor [lindex [.mb configure -disabledcolor] 3] } -result {#00ff00} test menubutton-1.22 {configuration options} -body { - .mb configure -disabledforeground xyzzy + .mb configure -disabledcolor xyzzy } -returnCodes error -result {unknown color name "xyzzy"} test menubutton-1.23 {configuration options} -body { - .mb configure -fg #110022 - .mb cget -fg + .mb configure -color #110022 + .mb cget -color } -cleanup { - .mb configure -fg [lindex [.mb configure -fg] 3] + .mb configure -color [lindex [.mb configure -color] 3] } -result {#110022} test menubutton-1.24 {configuration options} -body { - .mb configure -fg bogus + .mb configure -color bogus } -returnCodes error -result {unknown color name "bogus"} test menubutton-1.25 {configuration options} -body { .mb configure -font {Helvetica 12} .mb cget -font } -cleanup { .mb configure -font [lindex [.mb configure -font] 3] } -result {Helvetica 12} test menubutton-1.26 {configuration options} -body { - .mb configure -foreground #110022 - .mb cget -foreground + .mb configure -color #110022 + .mb cget -color } -cleanup { - .mb configure -foreground [lindex [.mb configure -foreground] 3] + .mb configure -color [lindex [.mb configure -color] 3] } -result {#110022} test menubutton-1.27 {configuration options} -body { - .mb configure -foreground bogus + .mb configure -color bogus } -returnCodes error -result {unknown color name "bogus"} test menubutton-1.28 {configuration options} -body { .mb configure -height 18 .mb cget -height } -cleanup { @@ -363,23 +365,23 @@ } -returnCodes error -result {unknown option "-gorp"} test menubutton-3.6 {ButtonWidgetCmd procedure, "cget" option} -body { .mb configure -highlightthickness 3 .mb cget -highlightthickness } -result 3 -test menubutton-3.7 {ButtonWidgetCmd procedure, "configure" option} -body { +test menubutton-3.7 {ButtonWidgetCmd procedure, "configure" option} -constraints nodeprecated -body { llength [.mb configure] -} -result 33 +} -result 36 test menubutton-3.8 {ButtonWidgetCmd procedure, "configure" option} -body { .mb configure -gorp } -returnCodes error -result {unknown option "-gorp"} test menubutton-3.9 {ButtonWidgetCmd procedure, "configure" option} -body { - .mb co -bg #ffffff -fg -} -returnCodes error -result {value for "-fg" missing} + .mb co -background #ffffff -color +} -returnCodes error -result {value for "-color" missing} test menubutton-3.10 {ButtonWidgetCmd procedure, "configure" option} -body { - .mb configure -fg #123456 - .mb configure -bg #654321 - lindex [.mb configure -fg] 4 + .mb configure -color #123456 + .mb configure -background #654321 + lindex [.mb configure -color] 4 } -result {#123456} test menubutton-3.11 {ButtonWidgetCmd procedure, "configure" option} -body { .mb foobar } -returnCodes error -result {bad option "foobar": must be cget or configure} deleteWindows @@ -519,14 +521,14 @@ test menubutton-5.1 {MenuButtonEventProc procedure} -setup { deleteWindows set x {} } -body { - menubutton .mb1 -bg #543210 + menubutton .mb1 -background #543210 rename .mb1 .mb2 lappend x [winfo children .] - lappend x [.mb2 cget -bg] + lappend x [.mb2 cget -background] destroy .mb1 lappend x [info command .mb*] [winfo children .] } -cleanup { deleteWindows } -result {.mb1 #543210 {} {}} @@ -551,11 +553,11 @@ testImageType } -setup { deleteWindows image create test image1 } -body { - menubutton .mb -image image1 -bd 4 -highlightthickness 0 + menubutton .mb -image image1 -borderwidth 4 -highlightthickness 0 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows imageCleanup @@ -564,11 +566,11 @@ testImageType } -setup { deleteWindows image create test image1 } -body { - menubutton .mb -image image1 -bd 3 -highlightthickness 1 + menubutton .mb -image image1 -borderwidth 3 -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows imageCleanup @@ -577,11 +579,11 @@ testImageType } -setup { deleteWindows image create test image1 } -body { - menubutton .mb -image image1 -bd 1 -highlightthickness 3 -padx 5 -pady 5 + menubutton .mb -image image1 -borderwidth 1 -highlightthickness 3 -padx 5 -pady 5 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows imageCleanup @@ -590,11 +592,11 @@ testImageType } -setup { deleteWindows image create test image1 } -body { - menubutton .mb -image image1 -bd 2 -relief raised -width 40 \ + menubutton .mb -image image1 -borderwidth 2 -relief raised -width 40 \ -highlightthickness 2 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows @@ -604,11 +606,11 @@ testImageType } -setup { deleteWindows image create test image1 } -body { - menubutton .mb -image image1 -bd 2 -relief raised -height 30 \ + menubutton .mb -image image1 -borderwidth 2 -relief raised -height 30 \ -highlightthickness 2 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows @@ -615,31 +617,31 @@ imageCleanup } -result [list [expr {38 + $extraWidth}] 38] test menubutton-7.6 {ComputeMenuButtonGeometry procedure} -setup { deleteWindows } -body { - menubutton .mb -bitmap question -bd 2 -relief raised \ + menubutton .mb -bitmap question -borderwidth 2 -relief raised \ -highlightthickness 2 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows } -result [list [expr {25 + $extraWidth}] 35] test menubutton-7.7 {ComputeMenuButtonGeometry procedure} -setup { deleteWindows } -body { - menubutton .mb -bitmap question -bd 2 -relief raised -width 40 \ + menubutton .mb -bitmap question -borderwidth 2 -relief raised -width 40 \ -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows } -result [list [expr {46 + $extraWidth}] 33] test menubutton-7.8 {ComputeMenuButtonGeometry procedure} -setup { deleteWindows } -body { - menubutton .mb -bitmap question -bd 2 -relief raised -height 50 \ + menubutton .mb -bitmap question -borderwidth 2 -relief raised -height 50 \ -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows @@ -647,11 +649,11 @@ test menubutton-7.9 {ComputeMenuButtonGeometry procedure} -constraints { fonts } -setup { deleteWindows } -body { - menubutton .mb -text String -bd 2 -relief raised -padx 0 -pady 0 \ + menubutton .mb -text String -borderwidth 2 -relief raised -padx 0 -pady 0 \ -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows @@ -659,11 +661,11 @@ test menubutton-7.10 {ComputeMenuButtonGeometry procedure} -constraints { fonts } -setup { deleteWindows } -body { - menubutton .mb -text String -bd 2 -relief raised -width 20 \ + menubutton .mb -text String -borderwidth 2 -relief raised -width 20 \ -padx 0 -pady 0 -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows @@ -671,11 +673,11 @@ test menubutton-7.11 {ComputeMenuButtonGeometry procedure} -constraints { fonts } -setup { deleteWindows } -body { - menubutton .mb -text String -bd 2 -relief raised -height 2 \ + menubutton .mb -text String -borderwidth 2 -relief raised -height 2 \ -padx 0 -pady 0 -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows @@ -683,11 +685,11 @@ test menubutton-7.12 {ComputeMenuButtonGeometry procedure} -constraints { fonts } -setup { deleteWindows } -body { - menubutton .mb -text String -bd 2 -relief raised -padx 10 -pady 5 \ + menubutton .mb -text String -borderwidth 2 -relief raised -padx 10 -pady 5 \ -highlightthickness 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows @@ -695,11 +697,11 @@ test menubutton-7.13 {ComputeMenuButtonGeometry procedure} -constraints { nonPortable fonts } -setup { deleteWindows } -body { - menubutton .mb -text String -bd 2 -relief raised \ + menubutton .mb -text String -borderwidth 2 -relief raised \ -highlightthickness 1 -indicatoron 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows @@ -711,11 +713,11 @@ image create test image1 } -body { # The following test is non-portable because the indicator's pixel # size varies to maintain constant absolute size. - menubutton .mb -image image1 -bd 2 -relief raised \ + menubutton .mb -image image1 -borderwidth 2 -relief raised \ -highlightthickness 2 -indicatoron 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows @@ -728,11 +730,11 @@ image create test image1 } -body { # The following test is non-portable because the indicator's pixel # size varies to maintain constant absolute size. - menubutton .mb -image image1 -bd 2 -relief raised \ + menubutton .mb -image image1 -borderwidth 2 -relief raised \ -highlightthickness 2 -indicatoron 1 pack .mb list [winfo reqwidth .mb] [winfo reqheight .mb] } -cleanup { deleteWindows Index: tests/message.test ================================================================== --- tests/message.test +++ tests/message.test @@ -9,10 +9,11 @@ package require tcltest 2.2 namespace import ::tcltest::* tcltest::loadTestedCommands eval tcltest::configure $argv +testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] test message-1.1 {configuration option: "anchor"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .m update @@ -75,41 +76,41 @@ test message-1.7 {configuration option: "bd"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .m update } -body { - .m configure -bd 4 - .m cget -bd + .m configure -borderwidth 4 + .m cget -borderwidth } -cleanup { destroy .m } -result 4 test message-1.8 {configuration option: "bd"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .m update } -body { - .m configure -bd badValue + .m configure -borderwidth badValue } -cleanup { destroy .m } -returnCodes {error} -result {bad screen distance "badValue"} -test message-1.9 {configuration option: "bg"} -setup { +test message-1.9 {configuration option: "background"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .m update } -body { - .m configure -bg #ff0000 - .m cget -bg + .m configure -background #ff0000 + .m cget -background } -cleanup { destroy .m } -result {#ff0000} -test message-1.10 {configuration option: "bg"} -setup { +test message-1.10 {configuration option: "background"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .m update } -body { - .m configure -bg non-existent + .m configure -background non-existent } -cleanup { destroy .m } -returnCodes {error} -result {unknown color name "non-existent"} test message-1.11 {configuration option: "borderwidth"} -setup { @@ -155,21 +156,21 @@ test message-1.15 {configuration option: "fg"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .m update } -body { - .m configure -fg #00ff00 - .m cget -fg + .m configure -color #00ff00 + .m cget -color } -cleanup { destroy .m } -result {#00ff00} test message-1.16 {configuration option: "fg"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .m update } -body { - .m configure -fg badValue + .m configure -color badValue } -cleanup { destroy .m } -returnCodes {error} -result {unknown color name "badValue"} test message-1.17 {configuration option: "font"} -setup { @@ -190,26 +191,26 @@ .m configure -font {} } -cleanup { destroy .m } -returnCodes {error} -result {font "" doesn't exist} -test message-1.19 {configuration option: "-foreground"} -setup { +test message-1.19 {configuration option: "-color"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .m update } -body { - .m configure -foreground green - .m cget -foreground + .m configure -color green + .m cget -color } -cleanup { destroy .m } -result {green} -test message-1.20 {configuration option: "-foreground"} -setup { +test message-1.20 {configuration option: "-color"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .m update } -body { - .m configure -foreground badValue + .m configure -color badValue } -cleanup { destroy .m } -returnCodes {error} -result {unknown color name "badValue"} test message-1.21 {configuration option: "highlightbackground"} -setup { @@ -444,17 +445,17 @@ .m configure -text foobar lindex [.m configure -text] 4 } -cleanup { destroy .m } -result {foobar} -test message-3.5 {MessageWidgetObjCmd procedure, "configure"} -setup { +test message-3.5 {MessageWidgetObjCmd procedure, "configure"} -constraints nodeprecated -setup { message .m } -body { llength [.m configure] } -cleanup { destroy .m -} -result 21 +} -result 22 test message-3.6 {MessageWidgetObjCmd procedure, "configure"} -setup { message .m } -body { .m configure -foo } -cleanup { @@ -461,13 +462,13 @@ destroy .m } -returnCodes error -result {unknown option "-foo"} test message-3.7 {MessageWidgetObjCmd procedure, "configure"} -setup { message .m } -body { - .m configure -bd 4 - .m configure -bg #ffffff - lindex [.m configure -bd] 4 + .m configure -borderwidth 4 + .m configure -background #ffffff + lindex [.m configure -borderwidth] 4 } -cleanup { destroy .m } -result 4 test message-4.1 {Bug [5d991b822e]} { Index: tests/oldpack.test ================================================================== --- tests/oldpack.test +++ tests/oldpack.test @@ -16,20 +16,20 @@ destroy .pack frame .pack place .pack -width 100 -height 100 frame .pack.red -width 10 -height 20 -label .pack.red.l -text R -bd 2 -relief raised +label .pack.red.l -text R -borderwidth 2 -relief raised place .pack.red.l -relwidth 1.0 -relheight 1.0 frame .pack.green -width 30 -height 40 -label .pack.green.l -text G -bd 2 -relief raised +label .pack.green.l -text G -borderwidth 2 -relief raised place .pack.green.l -relwidth 1.0 -relheight 1.0 frame .pack.blue -width 40 -height 40 -label .pack.blue.l -text B -bd 2 -relief raised +label .pack.blue.l -text B -borderwidth 2 -relief raised place .pack.blue.l -relwidth 1.0 -relheight 1.0 frame .pack.violet -width 80 -height 20 -label .pack.violet.l -text P -bd 2 -relief raised +label .pack.violet.l -text P -borderwidth 2 -relief raised place .pack.violet.l -relwidth 1.0 -relheight 1.0 if {![catch {pack ap .pack .pack.red top}]} { # Don't execute any of this file if Tk is compiled with -DTCL_NO_DEPRECATED @@ -366,12 +366,12 @@ update test oldpack-6.3 {geometry propagation} -body { winfo reqwidth .pack} -result 40 test oldpack-6.4 {geometry propagation} -body { winfo reqheight .pack} -result 100 -frame .pack.violet -width 80 -height 20 -bg violet -label .pack.violet.l -text P -bd 2 -relief raised +frame .pack.violet -width 80 -height 20 -background violet +label .pack.violet.l -text P -borderwidth 2 -relief raised place .pack.violet.l -relwidth 1.0 -relheight 1.0 pack append .pack .pack.red left .pack.green right .pack.blue bottom \ .pack.violet top update test oldpack-6.5 {geometry propagation} -body { @@ -465,11 +465,11 @@ pack after foobar } -returnCodes error -result {bad window path name "foobar"} test oldpack-8.6 {syntax errors} -setup { destroy .pack.yellow } -body { - frame .pack.yellow -bg yellow + frame .pack.yellow -background yellow pack after .pack.yellow } -cleanup { destroy .pack.yellow } -returnCodes error -result {window ".pack.yellow" isn't packed} test oldpack-8.7 {syntax errors} -body { @@ -479,11 +479,11 @@ pack before foobar } -returnCodes error -result {bad window path name "foobar"} test oldpack-8.9 {syntax errors} -setup { destroy .pack.yellow } -body { - frame .pack.yellow -bg yellow + frame .pack.yellow -background yellow pack before .pack.yellow } -cleanup { destroy .pack.yellow } -returnCodes error -result {window ".pack.yellow" isn't packed} test oldpack-8.10 {syntax errors} -body { Index: tests/pack.test ================================================================== --- tests/pack.test +++ tests/pack.test @@ -696,11 +696,11 @@ 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 + frame .pack2.$i -width 30 -height 30 -borderwidth 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 @@ -712,11 +712,11 @@ test pack-6.13 {-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 + frame .pack2.$i -width 30 -height 30 -borderwidth 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 \ @@ -790,12 +790,12 @@ # be done this way rather than shrinking the whole window, because # some window managers like mwm won't let a top-level window get # very small. pack forget .pack.a .pack.b .pack.c .pack.d -frame .pack.right -width 200 -height 10 -bd 2 -relief raised -frame .pack.bottom -width 10 -height 150 -bd 2 -relief raised +frame .pack.right -width 200 -height 10 -borderwidth 2 -relief raised +frame .pack.bottom -width 10 -height 150 -borderwidth 2 -relief raised pack .pack.right -side right pack .pack.bottom -side bottom pack .pack.a .pack.b .pack.c -side top update test pack-8.1 {insufficient space} -body { @@ -1458,11 +1458,11 @@ test pack-15.4 {managing geometry with -in option} -setup { pack forget .pack.a .pack.b .pack.c .pack.d destroy .pack.f1 .pack.f2 } -body { foreach i {1 2} { - frame .pack.f$i -width 100 -height 40 -bd 2 -relief raised + frame .pack.f$i -width 100 -height 40 -borderwidth 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 @@ -1484,11 +1484,11 @@ test pack-15.5 {managing geometry with -in option} -setup { pack forget .pack.a .pack.b .pack.c .pack.d destroy .pack.f1 .pack.f2 } -body { foreach i {1 2} { - frame .pack.f$i -width 100 -height 20 -bd 2 -relief raised + frame .pack.f$i -width 100 -height 20 -borderwidth 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 @@ -1557,11 +1557,11 @@ # On the PC, when the width/height is configured while the window is # unmapped, the changes don't take effect until the window is remapped. # Who knows why? eval destroy [winfo child .pack] - frame .pack.a -width 100 -height 50 -relief raised -bd 2 + frame .pack.a -width 100 -height 50 -relief raised -borderwidth 2 pack .pack.a update idletasks set result [winfo ismapped .pack.a] wm iconify .pack lappend result [winfo ismapped .pack.a] @@ -1580,12 +1580,12 @@ # adjust the position of .pack before test to avoid a screen switch # that occurs with window managers that have desktops four times as big # as the screen (screen switch causes scale and other tests to fail). wm geometry .pack +100+100 - frame .pack.a -relief raised -bd 2 - frame .pack.b -width 70 -height 30 -relief sunken -bd 2 + frame .pack.a -relief raised -borderwidth 2 + frame .pack.b -width 70 -height 30 -relief sunken -borderwidth 2 pack .pack.a pack .pack.b -in .pack.a update idletasks set result [winfo ismapped .pack.b] wm iconify .pack Index: tests/panedwindow.test ================================================================== --- tests/panedwindow.test +++ tests/panedwindow.test @@ -24,27 +24,27 @@ .p configure -background [lindex [.p configure -background] 3] } -result {{#ff0000} #ff0000} test panedwindow-1.2 {configuration options: -background (bad)} -body { .p configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} -test panedwindow-1.3 {configuration options: -bd (good)} -body { - .p configure -bd 4 - list [lindex [.p configure -bd] 4] [.p cget -bd] +test panedwindow-1.3 {configuration options: -borderwidth (good)} -body { + .p configure -borderwidth 4 + list [lindex [.p configure -borderwidth] 4] [.p cget -borderwidth] } -cleanup { - .p configure -bd [lindex [.p configure -bd] 3] + .p configure -borderwidth [lindex [.p configure -borderwidth] 3] } -result {4 4} -test panedwindow-1.4 {configuration options: -bd (bad)} -body { - .p configure -bd badValue +test panedwindow-1.4 {configuration options: -borderwidth (bad)} -body { + .p configure -borderwidth badValue } -returnCodes error -result {bad screen distance "badValue"} -test panedwindow-1.5 {configuration options: -bg (good)} -body { - .p configure -bg #ff0000 - list [lindex [.p configure -bg] 4] [.p cget -bg] +test panedwindow-1.5 {configuration options: -background (good)} -body { + .p configure -background #ff0000 + list [lindex [.p configure -background] 4] [.p cget -background] } -cleanup { - .p configure -bg [lindex [.p configure -bg] 3] + .p configure -background [lindex [.p configure -background] 3] } -result {{#ff0000} #ff0000} -test panedwindow-1.6 {configuration options: -bg (bad)} -body { - .p configure -bg non-existent +test panedwindow-1.6 {configuration options: -background (bad)} -body { + .p configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test panedwindow-1.7 {configuration options: -borderwidth (good)} -body { .p configure -borderwidth 1.3 list [lindex [.p configure -borderwidth] 4] [.p cget -borderwidth] } -cleanup { @@ -734,11 +734,11 @@ } -result [list 15 0] test panedwindow-10.9 {sash place subcommand, respects minsize} -setup { deleteWindows } -body { panedwindow .p - .p add [frame .f -width 20 -height 20 -bg pink] + .p add [frame .f -width 20 -height 20 -background pink] .p sash place 0 2 0 } -cleanup { deleteWindows } -returnCodes error -result {invalid sash index} @@ -957,11 +957,11 @@ test panedwindow-12.3 {horizontal panedwindow lays out widgets properly} -setup { deleteWindows } -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 \ + .p add [frame $win -width 20 -height 20 -background $color] -padx 10 -pady 5 \ -sticky "" } pack .p update set result [list [winfo reqwidth .p] [winfo reqheight .p]] @@ -1318,11 +1318,11 @@ test panedwindow-15.1 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky {} + .p add [frame .p.f -height 20 -width 20 -background red] -sticky {} place .p -width 40 -height 40 update list {} [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1329,11 +1329,11 @@ } -result {{} 10 10 20 20} test panedwindow-15.2 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky n + .p add [frame .p.f -height 20 -width 20 -background red] -sticky n place .p -width 40 -height 40 update list n [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1340,11 +1340,11 @@ } -result {n 10 0 20 20} test panedwindow-15.3 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky s + .p add [frame .p.f -height 20 -width 20 -background red] -sticky s place .p -width 40 -height 40 update list s [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1351,11 +1351,11 @@ } -result {s 10 20 20 20} test panedwindow-15.4 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky e + .p add [frame .p.f -height 20 -width 20 -background red] -sticky e place .p -width 40 -height 40 update list e [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1362,11 +1362,11 @@ } -result {e 20 10 20 20} test panedwindow-15.5 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky w + .p add [frame .p.f -height 20 -width 20 -background red] -sticky w place .p -width 40 -height 40 update list w [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1373,11 +1373,11 @@ } -result {w 0 10 20 20} test panedwindow-15.6 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky ns + .p add [frame .p.f -height 20 -width 20 -background red] -sticky ns place .p -width 40 -height 40 update list ns [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1384,11 +1384,11 @@ } -result {ns 10 0 20 40} test panedwindow-15.7 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky ew + .p add [frame .p.f -height 20 -width 20 -background red] -sticky ew place .p -width 40 -height 40 update list ew [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1395,11 +1395,11 @@ } -result {ew 0 10 40 20} test panedwindow-15.8 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky nw + .p add [frame .p.f -height 20 -width 20 -background red] -sticky nw place .p -width 40 -height 40 update list nw [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1406,11 +1406,11 @@ } -result {nw 0 0 20 20} test panedwindow-15.9 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky ne + .p add [frame .p.f -height 20 -width 20 -background red] -sticky ne place .p -width 40 -height 40 update list ne [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1417,11 +1417,11 @@ } -result {ne 20 0 20 20} test panedwindow-15.10 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky se + .p add [frame .p.f -height 20 -width 20 -background red] -sticky se place .p -width 40 -height 40 update list se [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1428,11 +1428,11 @@ } -result {se 20 20 20 20} test panedwindow-15.11 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky sw + .p add [frame .p.f -height 20 -width 20 -background red] -sticky sw place .p -width 40 -height 40 update list sw [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1439,11 +1439,11 @@ } -result {sw 0 20 20 20} test panedwindow-15.12 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky nse + .p add [frame .p.f -height 20 -width 20 -background red] -sticky nse place .p -width 40 -height 40 update list nse [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1450,11 +1450,11 @@ } -result {nse 20 0 20 40} test panedwindow-15.13 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky nsw + .p add [frame .p.f -height 20 -width 20 -background red] -sticky nsw place .p -width 40 -height 40 update list nsw [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1461,11 +1461,11 @@ } -result {nsw 0 0 20 40} test panedwindow-15.14 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky sew + .p add [frame .p.f -height 20 -width 20 -background red] -sticky sew place .p -width 40 -height 40 update list sew [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1472,11 +1472,11 @@ } -result {sew 0 20 40 20} test panedwindow-15.15 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky new + .p add [frame .p.f -height 20 -width 20 -background red] -sticky new place .p -width 40 -height 40 update list new [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1483,11 +1483,11 @@ } -result {new 0 0 40 20} test panedwindow-15.16 {panedwindow sticky works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 - .p add [frame .p.f -height 20 -width 20 -bg red] -sticky news + .p add [frame .p.f -height 20 -width 20 -background red] -sticky news place .p -width 40 -height 40 update list news [winfo x .p.f] [winfo y .p.f] [winfo width .p.f] [winfo height .p.f] } -cleanup { deleteWindows @@ -1496,11 +1496,11 @@ test panedwindow-16.1 {setting minsize when pane is too small snaps width} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 - .p add [frame .p.f -height 20 -width 20 -bg red] + .p add [frame .p.f -height 20 -width 20 -background red] set result [winfo reqwidth .p] .p paneconfigure .p.f -minsize 40 lappend result [winfo reqwidth .p] } -cleanup { deleteWindows @@ -1511,11 +1511,11 @@ deleteWindows set result {} } -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 -background $c] -sticky nsew } # Get the requested width of the paned window lappend result [winfo reqwidth .p] @@ -1532,11 +1532,11 @@ test panedwindow-17.2 {MoveSash, move right (unmapped) clipped by reqwidth} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } .p sash place 0 100 0 # Get the new sash coord; it should be clipped by the reqwidth of @@ -1548,11 +1548,11 @@ test panedwindow-17.3 {MoveSash, move right (mapped, width < reqwidth) clipped by width} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } # Put the panedwindow up on the display and give it a width < reqwidth place .p -x 0 -y 0 -width 32 update @@ -1568,11 +1568,11 @@ test panedwindow-17.4 {MoveSash, move right (mapped, width > reqwidth) clipped by width} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } # Put the panedwindow up on the display and give it a width > reqwidth place .p -x 0 -y 0 -width 102 update @@ -1588,11 +1588,11 @@ test panedwindow-17.5 {MoveSash, move right respects minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew -minsize 10 } .p sash place 0 100 0 # Get the new sash coord; it should have moved as far as possible while @@ -1604,11 +1604,11 @@ test panedwindow-17.6 {MoveSash, move right respects minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew -minsize 10 } .p sash place 0 100 0 # Get the new sash coord; it should have moved as far as possible. @@ -1619,11 +1619,11 @@ test panedwindow-17.7 {MoveSash, move right pushes other sashes} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } .p sash place 0 100 0 # Get the new sash coord; it should have moved as far as possible while @@ -1635,11 +1635,11 @@ test panedwindow-17.8 {MoveSash, move right pushes other sashes, respects minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew -minsize 10 } .p sash place 0 100 0 # Get the new sash coord; it should have moved as far as possible while @@ -1651,11 +1651,11 @@ test panedwindow-17.9 {MoveSash, move right respects minsize, exludes pad} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] \ + .p add [frame $w -height 20 -width 20 -background $c] \ -sticky nsew -minsize 10 -padx 5 } .p sash place 0 100 0 @@ -1668,11 +1668,11 @@ test panedwindow-17.10 {MoveSash, move right, negative minsize becomes 0} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] \ + .p add [frame $w -height 20 -width 20 -background $c] \ -sticky nsew -minsize -50 } .p sash place 0 50 0 @@ -1686,11 +1686,11 @@ deleteWindows } -body { set result {} panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } # Get the requested width of the paned window lappend result [winfo reqwidth .p] @@ -1707,11 +1707,11 @@ test panedwindow-17.12 {MoveSash, move left, can't move outside of window} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } .p sash place 0 -100 0 # Get the new sash coord; it should be clipped by the reqwidth of @@ -1723,11 +1723,11 @@ test panedwindow-17.13 {MoveSash, move left respects minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew -minsize 10 } .p sash place 0 0 0 # Get the new sash coord; it should have moved as far as possible while @@ -1739,11 +1739,11 @@ test panedwindow-17.14 {MoveSash, move left respects minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew -minsize 10 } .p sash place 1 0 0 # Get the new sash coord; it should have moved as far as possible. @@ -1754,11 +1754,11 @@ test panedwindow-17.15 {MoveSash, move left pushes other sashes} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } .p sash place 1 0 0 # Get the new sash coord; it should have moved as far as possible while @@ -1770,11 +1770,11 @@ test panedwindow-17.16 {MoveSash, move left pushes other sashes, respects minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew -minsize 10 } .p sash place 1 0 0 # Get the new sash coord; it should have moved as far as possible while @@ -1786,11 +1786,11 @@ test panedwindow-17.17 {MoveSash, move left respects minsize, exludes pad} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] \ + .p add [frame $w -height 20 -width 20 -background $c] \ -sticky nsew -minsize 10 -padx 5 } .p sash place 1 0 0 @@ -1803,11 +1803,11 @@ test panedwindow-17.18 {MoveSash, move left, negative minsize becomes 0} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2 .f3} c {red blue green} { - .p add [frame $w -height 20 -width 20 -bg $c] \ + .p add [frame $w -height 20 -width 20 -background $c] \ -sticky nsew -minsize -50 } .p sash place 1 10 0 @@ -1824,11 +1824,11 @@ } -body { set result {} panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } # Get the requested width of the paned window lappend result [winfo reqheight .p] @@ -1846,11 +1846,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } .p sash place 0 0 100 # Get the new sash coord; it should be clipped by the reqheight of @@ -1863,11 +1863,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } # Put the panedwindow up on the display and give it a height < reqheight place .p -x 0 -y 0 -height 32 update @@ -1884,11 +1884,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } # Put the panedwindow up on the display and give it a width > reqwidth place .p -x 0 -y 0 -height 102 update @@ -1905,11 +1905,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew -minsize 10 } .p sash place 0 0 100 # Get the new sash coord; it should have moved as far as possible while @@ -1922,11 +1922,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew -minsize 10 } .p sash place 0 0 100 # Get the new sash coord; it should have moved as far as possible while @@ -1939,11 +1939,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } .p sash place 0 0 100 # Get the new sash coord; it should have moved as far as possible while @@ -1956,11 +1956,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew -minsize 10 } .p sash place 0 0 100 # Get the new sash coord; it should have moved as far as possible while @@ -1973,11 +1973,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] \ + .p add [frame $w -height 20 -width 20 -background $c] \ -sticky nsew -minsize 10 -pady 5 } .p sash place 0 0 100 @@ -1991,11 +1991,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] \ + .p add [frame $w -height 20 -width 20 -background $c] \ -sticky nsew -minsize -50 } .p sash place 0 0 50 @@ -2010,11 +2010,11 @@ } -body { set result {} panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } # Get the requested width of the paned window lappend result [winfo reqheight .p] @@ -2032,11 +2032,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } .p sash place 0 0 -100 # Get the new sash coord; it should be clipped by the reqwidth of @@ -2049,11 +2049,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew -minsize 10 } .p sash place 0 0 0 # Get the new sash coord; it should have moved as far as possible while @@ -2066,11 +2066,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew -minsize 10 } .p sash place 1 0 0 # Get the new sash coord; it should have moved as far as possible. @@ -2082,11 +2082,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew } .p sash place 1 0 0 # Get the new sash coord; it should have moved as far as possible while @@ -2099,11 +2099,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10 + .p add [frame $w -height 20 -width 20 -background $c] -sticky nsew -minsize 10 } .p sash place 1 0 0 # Get the new sash coord; it should have moved as far as possible while @@ -2116,11 +2116,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2 .f3} c {red blue} { - .p add [frame $w -height 20 -width 20 -bg $c] \ + .p add [frame $w -height 20 -width 20 -background $c] \ -sticky nsew -minsize 10 -pady 5 } .p sash place 1 0 0 @@ -2134,11 +2134,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2 .f3} c {red blue green} { - .p add [frame $w -height 20 -width 20 -bg $c] \ + .p add [frame $w -height 20 -width 20 -background $c] \ -sticky nsew -minsize -50 } .p sash place 1 0 10 @@ -2157,11 +2157,11 @@ test panedwindow-19.1 {ComputeGeometry, reqheight taken from widgets} -setup { deleteWindows } -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 -background blue] } set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]] .f3 configure -height 40 lappend result [list [winfo reqwidth .p] [winfo reqheight .p]] } -cleanup { @@ -2171,11 +2171,11 @@ test panedwindow-19.2 {ComputeGeometry, reqheight taken from widgets} -setup { deleteWindows } -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 -background blue] } set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]] .p paneconfigure .f3 -height 40 lappend result [list [winfo reqwidth .p] [winfo reqheight .p]] } -cleanup { @@ -2185,11 +2185,11 @@ test panedwindow-19.3 {ComputeGeometry, reqheight taken from widgets} -setup { deleteWindows } -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 -background blue] -pady 20 } set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]] .p paneconfigure .f3 -height 40 lappend result [list [winfo reqwidth .p] [winfo reqheight .p]] } -cleanup { @@ -2200,11 +2200,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 \ -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 -background blue] } set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]] .f3 configure -width 40 lappend result [list [winfo reqwidth .p] [winfo reqheight .p]] } -cleanup { @@ -2215,11 +2215,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 \ -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 -background blue] } set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]] .p paneconfigure .f3 -width 40 lappend result [list [winfo reqwidth .p] [winfo reqheight .p]] } -cleanup { @@ -2230,11 +2230,11 @@ deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 \ -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 -background blue] -padx 20 } set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]] .p paneconfigure .f3 -width 40 lappend result [list [winfo reqwidth .p] [winfo reqheight .p]] } -cleanup { @@ -2247,11 +2247,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 0 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {20 20} @@ -2259,11 +2259,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {60 20} @@ -2272,11 +2272,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -2286,11 +2286,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -2310,11 +2310,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 0 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {20 20} @@ -2324,11 +2324,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -2339,11 +2339,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -2354,11 +2354,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -2376,11 +2376,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 1 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {22 20} @@ -2388,11 +2388,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {72 20} @@ -2401,11 +2401,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -2415,11 +2415,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -2439,11 +2439,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 1 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {20 22} @@ -2453,11 +2453,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -2468,11 +2468,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -2483,11 +2483,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -2505,11 +2505,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 0 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {20 20} @@ -2517,11 +2517,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {66 20} @@ -2530,11 +2530,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -2544,11 +2544,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -2568,11 +2568,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 0 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {20 20} @@ -2582,11 +2582,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -2597,11 +2597,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -2612,11 +2612,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -2634,11 +2634,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 1 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {22 20} @@ -2646,11 +2646,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {72 20} @@ -2659,11 +2659,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -2673,11 +2673,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -2697,11 +2697,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 1 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {20 22} @@ -2711,11 +2711,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -2726,11 +2726,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -2741,11 +2741,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 0 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -2763,11 +2763,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 0 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {20 20} @@ -2775,11 +2775,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {80 20} @@ -2788,11 +2788,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -2802,11 +2802,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -2826,11 +2826,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 0 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {20 20} @@ -2840,11 +2840,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -2855,11 +2855,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -2870,11 +2870,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -2892,11 +2892,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 1 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {22 20} @@ -2904,11 +2904,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {92 20} @@ -2917,11 +2917,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -2931,11 +2931,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -2955,11 +2955,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 1 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {20 22} @@ -2969,11 +2969,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -2984,11 +2984,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -2999,11 +2999,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -3021,11 +3021,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 0 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {20 20} @@ -3033,11 +3033,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {86 20} @@ -3046,11 +3046,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3060,11 +3060,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -3084,11 +3084,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 0 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {20 20} @@ -3098,11 +3098,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3113,11 +3113,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3128,11 +3128,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -3150,11 +3150,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 1 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {22 20} @@ -3162,11 +3162,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {92 20} @@ -3175,11 +3175,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3189,11 +3189,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -3213,11 +3213,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 1 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {20 22} @@ -3227,11 +3227,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3242,11 +3242,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3257,11 +3257,11 @@ } -body { panedwindow .p -borderwidth 0 -sashpad 5 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -3279,11 +3279,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 0 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {24 24} @@ -3291,11 +3291,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {64 24} @@ -3304,11 +3304,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3318,11 +3318,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -3342,11 +3342,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 0 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {24 24} @@ -3356,11 +3356,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3371,11 +3371,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3386,11 +3386,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -3408,11 +3408,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 1 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {26 24} @@ -3420,11 +3420,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {76 24} @@ -3433,11 +3433,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3447,11 +3447,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -3471,11 +3471,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 1 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {24 26} @@ -3485,11 +3485,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3500,11 +3500,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 0 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3515,11 +3515,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -3537,11 +3537,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 0 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {24 24} @@ -3549,11 +3549,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {70 24} @@ -3562,11 +3562,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3576,11 +3576,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -3600,11 +3600,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 0 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {24 24} @@ -3614,11 +3614,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3629,11 +3629,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3644,11 +3644,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -3666,11 +3666,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 1 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {26 24} @@ -3678,11 +3678,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {76 24} @@ -3691,11 +3691,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3705,11 +3705,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -3729,11 +3729,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 1 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {24 26} @@ -3743,11 +3743,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3758,11 +3758,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -sashwidth 3 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3773,11 +3773,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 0 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -3795,11 +3795,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 0 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {24 24} @@ -3807,11 +3807,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {84 24} @@ -3820,11 +3820,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3834,11 +3834,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -3858,11 +3858,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 0 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {24 24} @@ -3872,11 +3872,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -3887,11 +3887,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3902,11 +3902,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -3924,11 +3924,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 1 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {26 24} @@ -3936,11 +3936,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {96 24} @@ -3949,11 +3949,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -3963,11 +3963,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -3987,11 +3987,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 1 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {24 26} @@ -4001,11 +4001,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -4016,11 +4016,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 0 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -4031,11 +4031,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -4053,11 +4053,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 0 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 0 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 0 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {24 24} @@ -4065,11 +4065,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {90 24} @@ -4078,11 +4078,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -4092,11 +4092,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 0 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -4116,11 +4116,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 0 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 0 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {24 24} @@ -4130,11 +4130,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -4145,11 +4145,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 0 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -4160,11 +4160,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -4182,11 +4182,11 @@ # With just one pane, sashpad and sashwidth should not # affect the panedwindow's geometry, since no sash should # ever be drawn. panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 1 - .p add [frame .p.f -width 20 -height 20 -bg red] -padx 1 -sticky "" + .p add [frame .p.f -width 20 -height 20 -background red] -padx 1 -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {26 24} @@ -4194,11 +4194,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -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 -background blue] -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {96 24} @@ -4207,11 +4207,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.f1 .f2 .f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -4221,11 +4221,11 @@ deleteWindows } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 1 foreach w {.p.f1 .p.f2 .p.f3} { - .p add [frame $w -width 20 -height 20 -bg blue] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 3 -padx 11 } pack .p update set result {} @@ -4245,11 +4245,11 @@ # 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 - .p add [frame .f -width 20 -height 20 -bg red] -pady 1 \ + .p add [frame .f -width 20 -height 20 -background red] -pady 1 \ -sticky "" list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows } -result {24 26} @@ -4259,11 +4259,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [winfo reqwidth .p] [winfo reqheight .p] } -cleanup { deleteWindows @@ -4274,11 +4274,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -sashwidth 3 -handlesize 6 -showhandle 1 \ -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 -background blue] \ -sticky "" } list [.p sash coord 0] [.p sash coord 1] } -cleanup { deleteWindows @@ -4289,11 +4289,11 @@ } -body { panedwindow .p -borderwidth 2 -sashpad 5 \ -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] \ + .p add [frame $w -width 20 -height 20 -background blue] \ -sticky nsew -pady 11 -padx 3 } pack .p update set result {} @@ -4309,22 +4309,22 @@ test panedwindow-20.1 {destroyed widgets are removed from panedwindow} -setup { deleteWindows } -body { panedwindow .p - .p add [frame .f -width 20 -height 20 -bg blue] + .p add [frame .f -width 20 -height 20 -background blue] destroy .f .p panes } -cleanup { deleteWindows } -result {} test panedwindow-20.2 {destroyed pane causes geometry recomputation} -setup { deleteWindows } -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] + .p add [frame .f -width 20 -height 20 -background blue] \ + [frame .f2 -width 20 -height 20 -background red] destroy .f winfo reqwidth .p } -cleanup { deleteWindows } -result 20 @@ -4332,12 +4332,12 @@ test panedwindow-21.1 {ArrangePanes, extra space is given to the last pane} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 - .p add [frame .f1 -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 20 -bg red] -sticky nsew + .p add [frame .f1 -width 20 -height 20 -background blue] \ + [frame .f2 -width 20 -height 20 -background red] -sticky nsew place .p -width 100 -x 0 -y 0 update winfo width .f2 } -cleanup { deleteWindows @@ -4345,12 +4345,12 @@ test panedwindow-21.2 {ArrangePanes, extra space is given to the last pane} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical - .p add [frame .f1 -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 20 -bg red] -sticky nsew + .p add [frame .f1 -width 20 -height 20 -background blue] \ + [frame .f2 -width 20 -height 20 -background red] -sticky nsew place .p -height 100 -x 0 -y 0 update winfo height .f2 } -cleanup { deleteWindows @@ -4357,12 +4357,12 @@ } -result 78 test panedwindow-21.3 {ArrangePanes, explicit height/width are preferred} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 - .p add [frame .f1 -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 20 -bg red] -sticky "" + .p add [frame .f1 -width 20 -height 20 -background blue] \ + [frame .f2 -width 20 -height 20 -background red] -sticky "" .p paneconfigure .f1 -width 10 -height 15 pack .p update list [winfo width .f1] [winfo height .f1] } -cleanup { @@ -4370,12 +4370,12 @@ } -result {10 15} test panedwindow-21.4 {ArrangePanes, panes clipped by size of pane} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 - .p add [frame .f1 -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 20 -bg red] + .p add [frame .f1 -width 20 -height 20 -background blue] \ + [frame .f2 -width 20 -height 20 -background red] .p sash place 0 10 0 pack .p update list [winfo width .f1] [winfo height .f1] } -cleanup { @@ -4384,12 +4384,12 @@ 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 - .p add [frame .f1 -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 20 -bg red] + .p add [frame .f1 -width 20 -height 20 -background blue] \ + [frame .f2 -width 20 -height 20 -background red] .p sash place 0 0 10 pack .p update list [winfo width .f1] [winfo height .f1] } -cleanup { @@ -4397,12 +4397,12 @@ } -result {20 10} test panedwindow-21.6 {ArrangePanes, height of pane taken from total height} -setup { deleteWindows } -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 "" + .p add [frame .p.f1 -width 20 -height 20 -background blue] \ + [frame .p.f2 -width 20 -height 40 -background red] -sticky "" pack .p update winfo y .p.f1 } -cleanup { deleteWindows @@ -4410,12 +4410,12 @@ test panedwindow-21.7 {ArrangePanes, width of pane taken from total width} -setup { deleteWindows } -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 40 -height 40 -bg red] -sticky "" + .p add [frame .p.f1 -width 20 -height 20 -background blue] \ + [frame .p.f2 -width 40 -height 40 -background red] -sticky "" pack .p update winfo x .p.f1 } -cleanup { deleteWindows @@ -4422,12 +4422,12 @@ } -result 10 test panedwindow-21.8 {ArrangePanes, panes with width <= 0 are unmapped} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 - .p add [frame .f1 -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 40 -bg red] + .p add [frame .f1 -width 20 -height 20 -background blue] \ + [frame .f2 -width 20 -height 40 -background red] pack .p update set result [winfo ismapped .f1] .p sash place 0 0 0 update @@ -4437,12 +4437,12 @@ } -result {1 0} test panedwindow-21.9 {ArrangePanes, panes with width <= 0 are unmapped} -setup { deleteWindows } -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] + .p add [frame .p.f1 -width 20 -height 20 -background blue] \ + [frame .p.f2 -width 20 -height 40 -background red] pack .p update set result [winfo ismapped .p.f1] .p sash place 0 0 0 update @@ -4452,12 +4452,12 @@ } -result {1 0} test panedwindow-21.10 {ArrangePanes, panes with width <= 0 are unmapped} -setup { deleteWindows } -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] + .p add [frame .p.f1 -width 20 -height 20 -background blue] \ + [frame .p.f2 -width 20 -height 40 -background red] pack .p update set result [winfo ismapped .p.f1] .p sash place 0 0 0 update @@ -4467,12 +4467,12 @@ } -result {1 0} test panedwindow-21.11 {ArrangePanes, last pane shrinks} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 - .p add [frame .f1 -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 20 -bg red] -sticky nsew + .p add [frame .f1 -width 20 -height 20 -background blue] \ + [frame .f2 -width 20 -height 20 -background red] -sticky nsew place .p -width 40 -x 0 -y 0 update winfo width .f2 } -cleanup { deleteWindows @@ -4480,12 +4480,12 @@ test panedwindow-21.12 {ArrangePanes, last pane shrinks} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical - .p add [frame .f1 -width 20 -height 20 -bg blue] \ - [frame .f2 -width 20 -height 20 -bg red] -sticky nsew + .p add [frame .f1 -width 20 -height 20 -background blue] \ + [frame .f2 -width 20 -height 20 -background red] -sticky nsew place .p -height 40 -x 0 -y 0 update winfo height .f2 } -cleanup { deleteWindows @@ -4492,11 +4492,11 @@ } -result 18 test panedwindow-21.13 {ArrangePanes, panedwindow resizes} -setup { deleteWindows } -body { panedwindow .p -width 200 -borderwidth 0 - frame .f1 -height 50 -bg blue + frame .f1 -height 50 -background blue set result [list] lappend result [winfo reqwidth .p] [winfo reqheight .p] .p add .f1 pack .p lappend result [winfo reqwidth .p] [winfo reqheight .p] @@ -4505,11 +4505,11 @@ } -result {200 1 200 50} test panedwindow-21.14 {ArrangePanes, panedwindow resizes} -setup { deleteWindows } -body { panedwindow .p -height 200 -borderwidth 0 -orient vertical - frame .f1 -width 50 -bg blue + frame .f1 -width 50 -background blue set result [list] lappend result [winfo reqwidth .p] [winfo reqheight .p] .p add .f1 pack .p lappend result [winfo reqwidth .p] [winfo reqheight .p] @@ -4518,12 +4518,12 @@ } -result {1 200 50 200} test panedwindow-21.15 {ArrangePanes, last pane grows} -setup { deleteWindows } -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] + .p add [frame .f1 -width 50 -background red] [frame .f2 -width 50 -background white] \ + [frame .f3 -width 50 -background blue] [frame .f4 -width 50 -background green] .p sash place 1 250 0 pack .p update set result [list] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ @@ -4540,12 +4540,12 @@ test panedwindow-22.1 {PanedWindowReqProc, react to pane geometry changes} -setup { deleteWindows } -body { # 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] + .p add [frame .f1 -width 20 -height 20 -background blue] \ + [frame .f2 -width 20 -height 40 -background red] set result [winfo reqheight .p] .f1 configure -height 80 lappend result [winfo reqheight .p] } -cleanup { deleteWindows @@ -4907,14 +4907,14 @@ } -result {} test panedwindow-23.29 {ConfigurePanes, -hide works} -setup { deleteWindows } -body { panedwindow .p -showhandle false - frame .f1 -width 40 -height 100 -bg red - frame .f2 -width 40 -height 100 -bg white - frame .f3 -width 40 -height 100 -bg blue - frame .f4 -width 40 -height 100 -bg green + frame .f1 -width 40 -height 100 -background red + frame .f2 -width 40 -height 100 -background white + frame .f3 -width 40 -height 100 -background blue + frame .f4 -width 40 -height 100 -background green .p add .f1 .f2 .f3 .f4 pack .p update set result [list] lappend result [winfo ismapped .f1] [winfo ismapped .f2] \ @@ -4932,14 +4932,14 @@ } -result {1 1 1 1 40 40 40 40 171 1 0 1 1 40 40 40 40 128} test panedwindow-23.30 {ConfigurePanes, -hide works} -setup { deleteWindows } -body { panedwindow .p -showhandle false -width 130 -height 100 - frame .f1 -width 40 -bg red - frame .f2 -width 40 -bg white - frame .f3 -width 40 -bg blue - frame .f4 -width 40 -bg green + frame .f1 -width 40 -background red + frame .f2 -width 40 -background white + frame .f3 -width 40 -background blue + frame .f4 -width 40 -background green .p add .f1 .f2 .f3 .f4 pack .p update set result [list] lappend result [winfo ismapped .f1] [winfo ismapped .f2] \ @@ -4989,13 +4989,13 @@ } -result {{1 1 1 1 1} {1 1 0 1 1} {1 0 0 0 0} {1 1 0 1 1}} test panedwindow-23.31 {ConfigurePanes, -hide works, last pane stretches} -setup { deleteWindows } -body { panedwindow .p -showhandle false -width 200 -height 200 -borderwidth 0 - frame .f1 -width 50 -bg red - frame .f2 -width 50 -bg green - frame .f3 -width 50 -bg blue + frame .f1 -width 50 -background red + frame .f2 -width 50 -background green + frame .f3 -width 50 -background blue .p add .f1 .f2 .f3 pack .p update set result [list] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] @@ -5008,13 +5008,13 @@ 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 - frame .f1 -height 50 -bg red - frame .f2 -height 50 -bg green - frame .f3 -height 50 -bg blue + frame .f1 -height 50 -background red + frame .f2 -height 50 -background green + frame .f3 -height 50 -background blue .p add .f1 .f2 .f3 pack .p update set result [list] lappend result [winfo height .f1] [winfo height .f2] [winfo height .f3] @@ -5027,14 +5027,14 @@ test panedwindow-23.33 {ConfigurePanes, -stretch first} -setup { deleteWindows } -body { panedwindow .p -showhandle false -height 100 -width 182 - frame .f1 -width 40 -bg red - frame .f2 -width 40 -bg white - frame .f3 -width 40 -bg blue - frame .f4 -width 40 -bg green + frame .f1 -width 40 -background red + frame .f2 -width 40 -background white + frame .f3 -width 40 -background blue + frame .f4 -width 40 -background green .p add .f1 .f2 .f3 .f4 -stretch first pack .p update set result [list] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ @@ -5048,14 +5048,14 @@ } -result {51 40 40 40 94 40 40 40} test panedwindow-23.34 {ConfigurePanes, -stretch middle} -setup { deleteWindows } -body { panedwindow .p -showhandle false -height 100 -width 182 - frame .f1 -width 40 -bg red - frame .f2 -width 40 -bg white - frame .f3 -width 40 -bg blue - frame .f4 -width 40 -bg green + frame .f1 -width 40 -background red + frame .f2 -width 40 -background white + frame .f3 -width 40 -background blue + frame .f4 -width 40 -background green .p add .f1 .f2 .f3 .f4 -stretch middle pack .p update set result [list] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ @@ -5069,14 +5069,14 @@ } -result {40 45 46 40 40 45 94 40} test panedwindow-23.35 {ConfigurePanes, -stretch always} -setup { deleteWindows } -body { panedwindow .p -showhandle false -height 100 -width 182 - frame .f1 -width 40 -bg red - frame .f2 -width 40 -bg white - frame .f3 -width 40 -bg blue - frame .f4 -width 40 -bg green + frame .f1 -width 40 -background red + frame .f2 -width 40 -background white + frame .f3 -width 40 -background blue + frame .f4 -width 40 -background green .p add .f1 .f2 .f3 .f4 -stretch always pack .p update set result [list] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ @@ -5090,14 +5090,14 @@ } -result {42 43 43 43 58 43 58 58} test panedwindow-23.36 {ConfigurePanes, -stretch never} -setup { deleteWindows } -body { panedwindow .p -showhandle false -height 100 -width 182 - frame .f1 -width 40 -bg red - frame .f2 -width 40 -bg white - frame .f3 -width 40 -bg blue - frame .f4 -width 40 -bg green + frame .f1 -width 40 -background red + frame .f2 -width 40 -background white + frame .f3 -width 40 -background blue + frame .f4 -width 40 -background green .p add .f1 .f2 .f3 .f4 -stretch never pack .p update set result [list] lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \ @@ -5170,128 +5170,128 @@ test panedwindow-26.1 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 0 0 } -cleanup { deleteWindows } -result {} test panedwindow-26.2 {PanedWindowIdentifyCoords, padding is included} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 20 0 } -cleanup { deleteWindows } -result {0 sash} test panedwindow-26.3 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 22 0 } -cleanup { deleteWindows } -result {0 sash} test panedwindow-26.4 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 24 0 } -cleanup { deleteWindows } -result {0 sash} test panedwindow-26.5 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 26 0 } -cleanup { deleteWindows } -result {0 sash} test panedwindow-26.6 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 26 -1 } -cleanup { deleteWindows } -result {} test panedwindow-26.7 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 26 100 } -cleanup { deleteWindows } -result {} test panedwindow-26.8 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { - panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ -handlesize 6 - .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 22 4 } -cleanup { deleteWindows } -result {0 sash} test panedwindow-26.9 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { - panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ -handlesize 6 - .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 22 5 } -cleanup { deleteWindows } -result {0 handle} test panedwindow-26.10 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { - panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ -handlesize 8 - .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 20 5 } -cleanup { deleteWindows } -result {0 handle} test panedwindow-26.11 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { - panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ -handlesize 8 - .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 20 0 } -cleanup { deleteWindows } -result {0 sash} test panedwindow-26.12 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -showhandle false -borderwidth 0 -sashwidth 2 -sashpad 2 + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] \ + [frame .f3 -background green -width 20 -height 20] .p identify 48 0 } -cleanup { deleteWindows } -result {1 sash} test panedwindow-26.13 {identify subcommand errors} -setup { @@ -5319,128 +5319,128 @@ deleteWindows } -returnCodes error -result {expected integer but got "bar"} test panedwindow-26.16 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -orient vertical + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 0 0 } -cleanup { deleteWindows } -result {} test panedwindow-26.17 {PanedWindowIdentifyCoords, padding is included} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -orient vertical + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 0 20 } -cleanup { deleteWindows } -result {0 sash} test panedwindow-26.18 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -orient vertical + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 0 22 } -cleanup { deleteWindows } -result {0 sash} test panedwindow-26.19 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -orient vertical + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 0 24 } -cleanup { deleteWindows } -result {0 sash} test panedwindow-26.20 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -orient vertical + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 0 26 } -cleanup { deleteWindows } -result {0 sash} test panedwindow-26.21 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -orient vertical + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify -1 26 } -cleanup { deleteWindows } -result {} test panedwindow-26.22 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -orient vertical + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 100 26 } -cleanup { deleteWindows } -result {} test panedwindow-26.23 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { - panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ -handlesize 6 -orient vertical - .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 4 22 } -cleanup { deleteWindows } -result {0 sash} test panedwindow-26.24 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { - panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ -handlesize 6 -orient vertical - .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 5 22 } -cleanup { deleteWindows } -result {0 handle} test panedwindow-26.25 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { - panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ -handlesize 8 -orient vertical - .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 5 20 } -cleanup { deleteWindows } -result {0 handle} test panedwindow-26.26 {PanedWindowIdentifyCoords} -setup { deleteWindows } -body { - panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ + panedwindow .p -borderwidth 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \ -handlesize 8 -orient vertical - .p add [frame .f -bg red -width 20 -height 20] \ - [frame .f2 -bg blue -width 20 -height 20] + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] .p identify 0 20 } -cleanup { deleteWindows } -result {0 sash} test panedwindow-26.27 {PanedWindowIdentifyCoords} -setup { deleteWindows } -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] + panedwindow .p -showhandle false -borderwidth 0 -sashwidth 2 -sashpad 2 -orient vertical + .p add [frame .f -background red -width 20 -height 20] \ + [frame .f2 -background blue -width 20 -height 20] \ + [frame .f3 -background green -width 20 -height 20] .p identify 0 48 } -cleanup { deleteWindows } -result {1 sash} @@ -5465,13 +5465,13 @@ test panedwindow-28.1 {resizing width} -setup { deleteWindows } -body { - panedwindow .p -bd 5 - frame .f1 -width 100 -height 50 -bg blue - frame .f2 -width 100 -height 50 -bg red + panedwindow .p -borderwidth 5 + frame .f1 -width 100 -height 50 -background blue + frame .f2 -width 100 -height 50 -background red .p add .f1 -sticky news .p add .f2 -sticky news pack .p -side top -fill both -expand 1 wm geometry . "" @@ -5488,13 +5488,13 @@ } -result {100 110} test panedwindow-28.2 {resizing height} -setup { deleteWindows } -body { - panedwindow .p -orient vertical -bd 5 - frame .f1 -width 50 -height 100 -bg blue - frame .f2 -width 50 -height 100 -bg red + panedwindow .p -orient vertical -borderwidth 5 + frame .f1 -width 50 -height 100 -background blue + frame .f2 -width 50 -height 100 -background red .p add .f1 -sticky news .p add .f2 -sticky news pack .p -side top -fill both -expand 1 wm geometry . "" Index: tests/place.test ================================================================== --- tests/place.test +++ tests/place.test @@ -18,15 +18,15 @@ # XXX - This test file is woefully incomplete. At present, only a # few of the features are tested. # Widgets used in tests 1.* - 8.* -toplevel .t -width 300 -height 200 -bd 0 +toplevel .t -width 300 -height 200 -borderwidth 0 wm geom .t +0+0 -frame .t.f -width 154 -height 84 -bd 2 -relief raised +frame .t.f -width 154 -height 84 -borderwidth 2 -relief raised place .t.f -x 48 -y 38 -frame .t.f2 -width 30 -height 60 -bd 2 -relief raised +frame .t.f2 -width 30 -height 60 -borderwidth 2 -relief raised update test place-1.1 {Tk_PlaceCmd procedure, "info" option} -setup { place forget .t.f2 } -body { @@ -219,11 +219,11 @@ winfo geometry .t.f2 } -result {30x60+52+43} test place-7.6 {ReconfigurePlacement procedure, position rounding} -setup { destroy .t.f3 } -body { - frame .t.f3 -width 100 -height 100 -bg #f00000 -bd 0 + frame .t.f3 -width 100 -height 100 -background #f00000 -borderwidth 0 place .t.f3 -x 0 -y 0 raise .t.f2 place forget .t.f2 place .t.f2 -in .t.f3 -relx .303 -rely .406 -relwidth .304 -relheight .206 update Index: tests/raise.test ================================================================== --- tests/raise.test +++ tests/raise.test @@ -19,11 +19,11 @@ proc raise_setup {} { foreach i [winfo child .raise] { destroy $i } foreach i {a b c d e} { - label .raise.$i -text $i -relief raised -bd 2 + label .raise.$i -text $i -relief raised -borderwidth 2 } place .raise.a -x 20 -y 60 -width 60 -height 80 place .raise.b -x 60 -y 60 -width 60 -height 80 place .raise.c -x 100 -y 60 -width 60 -height 80 place .raise.d -x 40 -y 20 -width 100 -height 60 Index: tests/scale.test ================================================================== --- tests/scale.test +++ tests/scale.test @@ -9,10 +9,12 @@ package require tcltest 2.2 namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] + # Create entries in the option database to be sure that geometry options # like border width have predictable values. option add *Scale.borderWidth 2 option add *Scale.highlightThickness 2 @@ -40,17 +42,17 @@ } -result {#ff0000} test scale-1.4 {configuration options} -body { .s configure -background non-existent } -returnCodes error -result {unknown color name "non-existent"} test scale-1.5 {configuration options} -body { - .s configure -bd 4 - .s cget -bd + .s configure -borderwidth 4 + .s cget -borderwidth } -cleanup { - .s configure -bd [lindex [.s configure -bd] 3] + .s configure -borderwidth [lindex [.s configure -borderwidth] 3] } -result 4 test scale-1.6 {configuration options} -body { - .s configure -bd badValue + .s configure -borderwidth badValue } -returnCodes error -result {bad screen distance "badValue"} test scale-1.7 {configuration options} -body { .s configure -bigincrement 12.5 .s cget -bigincrement } -cleanup { @@ -58,17 +60,17 @@ } -result {12.5} test scale-1.8 {configuration options} -body { .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 - .s cget -bg + .s configure -background #ff0000 + .s cget -background } -cleanup { - .s configure -bg [lindex [.s configure -bg] 3] + .s configure -background [lindex [.s configure -background] 3] } -result {#ff0000} test scale-1.10 {configuration options} -body { - .s configure -bg non-existent + .s configure -background 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 { @@ -100,32 +102,32 @@ } -result 5 test scale-1.18 {configuration options} -body { .s configure -digits badValue } -returnCodes error -result {expected integer but got "badValue"} test scale-1.19 {configuration options} -body { - .s configure -fg #00ff00 - .s cget -fg + .s configure -color #00ff00 + .s cget -color } -cleanup { - .s configure -fg [lindex [.s configure -fg] 3] + .s configure -color [lindex [.s configure -color] 3] } -result {#00ff00} test scale-1.20 {configuration options} -body { - .s configure -fg badValue + .s configure -color badValue } -returnCodes error -result {unknown color name "badValue"} test scale-1.21 {configuration options} -body { .s configure -font fixed .s cget -font } -cleanup { .s configure -font [lindex [.s configure -font] 3] } -result {fixed} test scale-1.23 {configuration options} -body { - .s configure -foreground green - .s cget -foreground + .s configure -color green + .s cget -color } -cleanup { - .s configure -foreground [lindex [.s configure -foreground] 3] + .s configure -color [lindex [.s configure -color] 3] } -result {green} test scale-1.24 {configuration options} -body { - .s configure -foreground badValue + .s configure -color badValue } -returnCodes error -result {unknown color name "badValue"} test scale-1.25 {configuration options} -body { .s configure -from -15.0 .s cget -from } -cleanup { @@ -358,19 +360,19 @@ } -returnCodes error -result {unknown option "-gorp"} test scale-3.5 {ScaleWidgetCmd procedure, cget option} -body { .s configure -highlightthickness 2 .s cget -highlightthickness } -result 2 -test scale-3.6 {ScaleWidgetCmd procedure, configure option} -body { - list [llength [.s configure]] [lindex [.s configure] 6] -} -result {33 {-command command Command {} {}}} +test scale-3.6 {ScaleWidgetCmd procedure, configure option} -constraints nodeprecated -body { + list [llength [.s configure]] [lindex [.s configure] 7] +} -result {34 {-command command Command {} {}}} test scale-3.7 {ScaleWidgetCmd procedure, configure option} -body { .s configure -foo } -returnCodes error -result {unknown option "-foo"} test scale-3.8 {ScaleWidgetCmd procedure, configure option} -body { - .s configure -borderwidth 2 -bg -} -returnCodes error -result {value for "-bg" missing} + .s configure -borderwidth 2 -background +} -returnCodes error -result {value for "-background" missing} test scale-3.9 {ScaleWidgetCmd procedure, coords option} -body { .s coords a b } -returnCodes error -result {wrong # args: should be ".s coords ?value?"} test scale-3.10 {ScaleWidgetCmd procedure, coords option} -body { .s coords bad @@ -736,11 +738,11 @@ test scale-7.4 {ComputeScaleGeometry procedure} -constraints { fonts } -setup { deleteWindows } -body { - scale .s -from 0 -to 1000 -orient vertical -showvalue 0 -bd 5 \ + scale .s -from 0 -to 1000 -orient vertical -showvalue 0 -borderwidth 5 \ -relief sunken pack .s update list [winfo reqwidth .s] [winfo reqheight .s] } -cleanup { @@ -784,11 +786,11 @@ deleteWindows } -result {108 27} test scale-7.8 {ComputeScaleGeometry procedure} -setup { deleteWindows } -body { - scale .s -from 0 -to 1000 -orient horizontal -showvalue 0 -bd 5 \ + scale .s -from 0 -to 1000 -orient horizontal -showvalue 0 -borderwidth 5 \ -relief raised -highlightthickness 2 pack .s update list [winfo reqwidth .s] [winfo reqheight .s] } -cleanup { @@ -799,11 +801,11 @@ test scale-8.1 {ScaleElement procedure} -constraints { fonts } -setup { deleteWindows } -body { - scale .s -from 0 -to 100 -orient vertical -bd 1 -tick 20 -length 300 + scale .s -from 0 -to 100 -orient vertical -borderwidth 1 -tick 20 -length 300 pack .s .s set 30 update list [.s identify 53 52] [.s identify 54 52] [.s identify 70 52] \ [.s identify 71 52] @@ -813,11 +815,11 @@ test scale-8.2 {ScaleElement procedure} -constraints { fonts } -setup { deleteWindows } -body { - scale .s -from 0 -to 100 -orient vertical -bd 1 -tick 20 -length 300 + scale .s -from 0 -to 100 -orient vertical -borderwidth 1 -tick 20 -length 300 pack .s .s set 30 update list [.s identify 60 2] [.s identify 60 3] [.s identify 60 302] \ [.s identify 60 303] @@ -827,11 +829,11 @@ test scale-8.3 {ScaleElement procedure} -constraints { fonts } -setup { deleteWindows } -body { - scale .s -from 0 -to 100 -orient vertical -bd 1 -tick 20 -length 300 + scale .s -from 0 -to 100 -orient vertical -borderwidth 1 -tick 20 -length 300 pack .s .s set 30 update list [.s identify 60 83] [.s identify 60 84] [.s identify 60 113] \ [.s identify 60 114] \ @@ -839,11 +841,11 @@ deleteWindows } -result {trough1 slider slider trough2} test scale-8.4 {ScaleElement procedure} -setup { deleteWindows } -body { - scale .s -from 0 -to 100 -orient vertical -bd 4 -width 10 \ + scale .s -from 0 -to 100 -orient vertical -borderwidth 4 -width 10 \ -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] \ @@ -854,11 +856,11 @@ test scale-8.5 {ScaleElement procedure} -constraints { fonts } -setup { deleteWindows } -body { - scale .s -from 0 -to 100 -orient horizontal -bd 1 \ + scale .s -from 0 -to 100 -orient horizontal -borderwidth 1 \ -highlightthickness 2 -tick 20 -sliderlength 20 \ -length 200 -label Test pack .s .s set 30 update @@ -870,11 +872,11 @@ test scale-8.6 {ScaleElement procedure} -constraints { fonts } -setup { deleteWindows } -body { - scale .s -from 0 -to 100 -orient horizontal -bd 2 \ + scale .s -from 0 -to 100 -orient horizontal -borderwidth 2 \ -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] \ @@ -883,11 +885,11 @@ deleteWindows } -result {{} trough2 trough2 {}} test scale-8.7 {ScaleElement procedure} -setup { deleteWindows } -body { - scale .s -from 0 -to 100 -orient horizontal -bd 4 -highlightthickness 2 \ + scale .s -from 0 -to 100 -orient horizontal -borderwidth 4 -highlightthickness 2 \ -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] \ @@ -896,11 +898,11 @@ deleteWindows } -result {{} trough1 trough1 {}} test scale-8.8 {ScaleElement procedure} -setup { deleteWindows } -body { - scale .s -from 0 -to 100 -orient horizontal -bd 1 -highlightthickness 2 \ + scale .s -from 0 -to 100 -orient horizontal -borderwidth 1 -highlightthickness 2 \ -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] \ @@ -909,11 +911,11 @@ deleteWindows } -result {{} trough1 trough2 {}} test scale-8.9 {ScaleElement procedure} -setup { deleteWindows } -body { - scale .s -from 0 -to 100 -orient horizontal -bd 1 -highlightthickness 2 \ + scale .s -from 0 -to 100 -orient horizontal -borderwidth 1 -highlightthickness 2 \ -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] \ @@ -925,51 +927,51 @@ #widget used in 9.* tests destroy .s pack [scale .s] test scale-9.1 {PixelToValue procedure} -body { - .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 + .s configure -from 0 -to 100 -sliderlength 10 -length 114 -borderwidth 2 update .s get 46 0 } -result 0 test scale-9.2 {PixelToValue procedure} -body { - .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 + .s configure -from 0 -to 100 -sliderlength 10 -length 114 -borderwidth 2 update .s get -10 9 } -result 0 test scale-9.3 {PixelToValue procedure} -body { - .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 + .s configure -from 0 -to 100 -sliderlength 10 -length 114 -borderwidth 2 update .s get -10 12 } -result 1 test scale-9.4 {PixelToValue procedure} -body { - .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 + .s configure -from 0 -to 100 -sliderlength 10 -length 114 -borderwidth 2 update .s get -10 46 } -result 35 test scale-9.5 {PixelToValue procedure} -body { - .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 + .s configure -from 0 -to 100 -sliderlength 10 -length 114 -borderwidth 2 update .s get -10 110 } -result 99 test scale-9.6 {PixelToValue procedure} -body { - .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 + .s configure -from 0 -to 100 -sliderlength 10 -length 114 -borderwidth 2 update .s get -10 111 } -result 100 test scale-9.7 {PixelToValue procedure} -body { - .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 + .s configure -from 0 -to 100 -sliderlength 10 -length 114 -borderwidth 2 update .s get -10 112 } -result 100 test scale-9.8 {PixelToValue procedure} -body { - .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 + .s configure -from 0 -to 100 -sliderlength 10 -length 114 -borderwidth 2 update .s get -10 154 } -result 100 test scale-9.9 {PixelToValue procedure} -body { - .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 \ + .s configure -from 0 -to 100 -sliderlength 10 -length 114 -borderwidth 2 \ -orient horizontal update .s get 76 152 } -result 65 destroy .s @@ -978,11 +980,11 @@ test scale-10.1 {ValueToPixel procedure} -constraints { fonts } -setup { deleteWindows } -body { - scale .s -from 0 -to 100 -sliderlength 20 -length 124 -bd 2 \ + scale .s -from 0 -to 100 -sliderlength 20 -length 124 -borderwidth 2 \ -orient horizontal -label Test -tick 20 pack .s update list [.s coords -10] [.s coords 40] [.s coords 1000] } -cleanup { @@ -991,11 +993,11 @@ test scale-10.2 {ValueToPixel procedure} -constraints { fonts } -setup { deleteWindows } -body { - scale .s -from 100 -to 0 -sliderlength 20 -length 122 -bd 1 \ + scale .s -from 100 -to 0 -sliderlength 20 -length 122 -borderwidth 1 \ -orient vertical -label Test -tick 20 pack .s update list [.s coords -10] [.s coords 40] [.s coords 1000] } -cleanup { @@ -1028,14 +1030,14 @@ } -result {initial 1 0 {}} test scale-11.2 {ScaleEventProc procedure} -setup { deleteWindows set x {} } -body { - scale .s1 -bg #543210 + scale .s1 -background #543210 rename .s1 .s2 lappend x [winfo children .] - lappend x [.s2 cget -bg] + lappend x [.s2 cget -background] destroy .s1 lappend x [info command .s*] [winfo children .] } -cleanup { deleteWindows } -result {.s1 #543210 {} {}} @@ -1103,82 +1105,82 @@ # Widget used in 14.* tests destroy .s pack [scale .s] update test scale-14.1 {RoundValueToResolution procedure} -body { - .s configure -from 0 -to 100 -sliderlength 10 -length 114 -bd 2 \ + .s configure -from 0 -to 100 -sliderlength 10 -length 114 -borderwidth 2 \ -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 \ + .s configure -from 0 -to 100 -sliderlength 10 -length 114 -borderwidth 2 \ -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 \ + .s configure -from 100 -to 0 -sliderlength 10 -length 114 -borderwidth 2 \ -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 \ + .s configure -from 100 -to 0 -sliderlength 10 -length 114 -borderwidth 2 \ -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 \ + .s configure -from -100 -to 0 -sliderlength 10 -length 114 -borderwidth 2 \ -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 \ + .s configure -from -100 -to 0 -sliderlength 10 -length 114 -borderwidth 2 \ -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 \ + .s configure -from 0 -to -100 -sliderlength 10 -length 114 -borderwidth 2 \ -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 \ + .s configure -from 0 -to -100 -sliderlength 10 -length 114 -borderwidth 2 \ -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 \ + .s configure -from 0 -to 2.25 -sliderlength 10 -length 114 -borderwidth 2 \ -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 \ + .s configure -from 0 -to 2.25 -sliderlength 10 -length 114 -borderwidth 2 \ -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 \ + .s configure -from 0 -to 225 -sliderlength 10 -length 114 -borderwidth 2 \ -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 \ + .s configure -from 0 -to 225 -sliderlength 10 -length 114 -borderwidth 2 \ -orient horizontal -resolution 0 -digits 5 update .s get 86 152 } -result {168.75} destroy .s @@ -1198,21 +1200,21 @@ test scale-14a.1 {RoundValueToResolution, RoundIntervalToResolution procedures} -setup { pack [scale .s -orient horizontal] update } -body { - .s configure -length 400 -bd 0 -from 1 -to 9 -resolution 2 -tickinterval 1 + .s configure -length 400 -borderwidth 0 -from 1 -to 9 -resolution 2 -tickinterval 1 update .s get 200 0 } -cleanup { destroy .s } -result 5 test scale-14a.2 {RoundValueToResolution, RoundIntervalToResolution procedures} -setup { pack [scale .s -orient horizontal] update } -body { - .s configure -length 400 -bd 0 -from -1.5 -to 1.5 -resolution 1 \ + .s configure -length 400 -borderwidth 0 -from -1.5 -to 1.5 -resolution 1 \ -tickinterval 1 -digits 2 update .s get 250 0 } -cleanup { destroy .s Index: tests/scrollbar.test ================================================================== --- tests/scrollbar.test +++ tests/scrollbar.test @@ -9,13 +9,13 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }] -testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] proc scroll args { global scrollInfo set scrollInfo $args } @@ -33,27 +33,27 @@ # 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] \ - [$w cget -highlightthickness] \ - - [$w cget -bd] + 1)*2}] + - [$w cget -borderwidth] + 1)*2}] } else { return [expr {[winfo width $w] \ - ([winfo height $w] \ - [$w cget -highlightthickness] \ - - [$w cget -bd] + 1)*2}] + - [$w cget -borderwidth] + 1)*2}] } } else { # macOS aqua if [string match v* [$w cget -orient]] { return [expr {[winfo height $w] \ - ([$w cget -highlightthickness] \ - +[$w cget -bd])*2}] + +[$w cget -borderwidth])*2}] } else { return [expr {[winfo width $w] \ - ([$w cget -highlightthickness] \ - +[$w cget -bd])*2}] + +[$w cget -borderwidth])*2}] } } } } @@ -77,12 +77,12 @@ {unknown color name "non-existent"}} {-activerelief sunken sunken non-existent {bad relief "non-existent": must be flat, groove, raised, ridge, solid, or sunken}} {-background #ff0000 #ff0000 non-existent {unknown color name "non-existent"}} - {-bd 4 4 badValue {bad screen distance "badValue"}} - {-bg #ff0000 #ff0000 non-existent + {-borderwidth 4 4 badValue {bad screen distance "badValue"}} + {-background #ff0000 #ff0000 non-existent {unknown color name "non-existent"}} {-borderwidth 1.3 1 badValue {bad screen distance "badValue"}} {-command "set x" {set x} {} {}} {-elementborderwidth 4 4 badValue {bad screen distance "badValue"}} {-cursor arrow arrow badValue {bad cursor spec "badValue"}} @@ -139,11 +139,11 @@ scrollbar .s } -cleanup { destroy .s } -result .s -scrollbar .s -orient vertical -command scroll -highlightthickness 2 -bd 2 +scrollbar .s -orient vertical -command scroll -highlightthickness 2 -borderwidth 2 pack .s -side right -fill y update test scrollbar-3.1 {ScrollbarWidgetCmd procedure} { list [catch {.s} msg] $msg } {1 {wrong # args: should be ".s option ?arg ...?"}} @@ -179,11 +179,11 @@ test scrollbar-3.10 {ScrollbarWidgetCmd procedure, "cget" option} { list [catch {.s cget -orient} msg] $msg } {0 vertical} scrollbar .s2 test scrollbar-3.11 {ScrollbarWidgetCmd procedure, "cget" option} { - expr {[.s2 cget -bd] == [lindex [.s2 configure -bd] 3]} + expr {[.s2 cget -borderwidth] == [lindex [.s2 configure -borderwidth] 3]} } 1 test scrollbar-3.12 {ScrollbarWidgetCmd procedure, "cget" option} emptyTest { # empty test; duplicated scrollbar-3.11 } {} test scrollbar-3.12.1 {ScrollbarWidgetCmd procedure, "cget" option} emptyTest { @@ -197,11 +197,11 @@ } {} test scrollbar-3.14.1 {ScrollbarWidgetCmd procedure, "cget" option} emptyTest { # empty test; duplicated scrollbar-3.13 } {} destroy .s2 -test scrollbar-3.15 {ScrollbarWidgetCmd procedure, "configure" option} { +test scrollbar-3.15 {ScrollbarWidgetCmd procedure, "configure" option} nodeprecated { llength [.s configure] } 20 test scrollbar-3.16 {ScrollbarWidgetCmd procedure, "configure" option} { list [catch {.s configure -bad} msg] $msg } {1 {unknown option "-bad"}} @@ -302,14 +302,14 @@ if {[testConstraint testmetrics]} { # Only Windows has [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 -borderwidth] + 1)}] } else { # macOS aqua - place configure .t.s -width [expr {2*([.t.s cget -highlightthickness] + [.t.s cget -bd])}] + place configure .t.s -width [expr {2*([.t.s cget -highlightthickness] + [.t.s cget -borderwidth])}] } } update test scrollbar-3.42 {ScrollbarWidgetCmd procedure, "fraction" option} { format {%.6g} [.t.s fraction 100 0] @@ -440,15 +440,15 @@ list [catch {.s c} msg] $msg } {1 {ambiguous option "c": must be activate, cget, configure, delta, fraction, get, identify, or set}} test scrollbar-4.1 {ScrollbarEventProc procedure} { catch {destroy .s1} - scrollbar .s1 -bg #543210 + scrollbar .s1 -background #543210 rename .s1 .s2 set x {} lappend x [winfo exists .s1] - lappend x [.s2 cget -bg] + lappend x [.s2 cget -background] destroy .s1 lappend x [info command .s?] [winfo exists .s1] [winfo exists .s2] } {1 #543210 {} 0 0} test scrollbar-5.1 {ScrollbarCmdDeletedProc procedure} { @@ -457,11 +457,11 @@ rename .s1 {} list [info command .s?] [winfo exists .s1] } {{} 0} catch {destroy .s} -scrollbar .s -orient vertical -relief sunken -bd 2 -highlightthickness 2 +scrollbar .s -orient vertical -relief sunken -borderwidth 2 -highlightthickness 2 pack .s -side left -fill y .s set .2 .4 update test scrollbar-6.1 {ScrollbarPosition procedure} unix { @@ -588,11 +588,11 @@ } {trough2} catch {destroy .t} toplevel .t -width 250 -height 150 wm geometry .t +0+0 -scrollbar .t.s -orient horizontal -relief sunken -bd 2 -highlightthickness 2 +scrollbar .t.s -orient horizontal -relief sunken -borderwidth 2 -highlightthickness 2 place .t.s -width 200 .t.s set .2 .4 update test scrollbar-6.39.1 {ScrollbarPosition procedure} x11 { Index: tests/spinbox.test ================================================================== --- tests/spinbox.test +++ tests/spinbox.test @@ -9,10 +9,11 @@ package require tcltest 2.2 namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] testConstraint failsOnUbuntuNoXft [expr {[testConstraint failsOnUbuntu] || (![catch {tk::pkgconfig get fontsystem} fs] && ($fs eq "xft"))}] # For xscrollcommand set scrollInfo {} @@ -91,22 +92,22 @@ spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ -relief sunken pack .e update } -body { - .e configure -bd 4 - .e cget -bd + .e configure -borderwidth 4 + .e cget -borderwidth } -cleanup { 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 pack .e update } -body { - .e configure -bd badValue + .e configure -borderwidth badValue } -cleanup { destroy .e } -returnCodes {error} -result {bad screen distance "badValue"} test spinbox-1.7 {configuration option: "bg"} -setup { @@ -113,22 +114,22 @@ spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ -relief sunken pack .e update } -body { - .e configure -bg #ff0000 - .e cget -bg + .e configure -background #ff0000 + .e cget -background } -cleanup { 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 pack .e update } -body { - .e configure -bg non-existent + .e configure -background non-existent } -cleanup { destroy .e } -returnCodes {error} -result {unknown color name "non-existent"} test spinbox-1.9 {configuration option: "borderwidth"} -setup { @@ -257,22 +258,22 @@ spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ -relief sunken pack .e update } -body { - .e configure -disabledforeground #110022 - .e cget -disabledforeground + .e configure -disabledcolor #110022 + .e cget -disabledcolor } -cleanup { 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 pack .e update } -body { - .e configure -disabledforeground bogus + .e configure -disabledcolor bogus } -cleanup { destroy .e } -returnCodes {error} -result {unknown color name "bogus"} test spinbox-1.22 {configuration option: "exportselection"} -setup { @@ -301,22 +302,22 @@ spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ -relief sunken pack .e update } -body { - .e configure -fg #110022 - .e cget -fg + .e configure -color #110022 + .e cget -color } -cleanup { 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 pack .e update } -body { - .e configure -fg bogus + .e configure -color bogus } -cleanup { destroy .e } -returnCodes {error} -result {unknown color name "bogus"} test spinbox-1.26 {configuration option: "font"} -setup { @@ -345,22 +346,22 @@ spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ -relief sunken pack .e update } -body { - .e configure -foreground #110022 - .e cget -foreground + .e configure -color #110022 + .e cget -color } -cleanup { 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 pack .e update } -body { - .e configure -foreground bogus + .e configure -color bogus } -cleanup { destroy .e } -returnCodes {error} -result {unknown color name "bogus"} test spinbox-1.30 {configuration option: "format"} -setup { @@ -605,11 +606,11 @@ .e cget -invalidcommand } -cleanup { destroy .e } -result {a command} -test spinbox-1.52 {configuration option: "invcmd"} -setup { +test spinbox-1.52 {configuration option: "invcmd"} -constraints nodeprecated -setup { spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ -relief sunken pack .e update } -body { @@ -777,22 +778,22 @@ spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ -relief sunken pack .e update } -body { - .e configure -selectforeground #654321 - .e cget -selectforeground + .e configure -selectcolor #654321 + .e cget -selectcolor } -cleanup { 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 pack .e update } -body { - .e configure -selectforeground bogus + .e configure -selectcolor bogus } -cleanup { destroy .e } -returnCodes {error} -result {unknown color name "bogus"} test spinbox-1.69 {configuration option: "state"} -setup { @@ -917,11 +918,11 @@ .e configure -values {bad {}list} } -cleanup { destroy .e } -returnCodes {error} -result {list element in braces followed by "list" instead of space} -test spinbox-1.80 {configuration option: "vcmd"} -setup { +test spinbox-1.80 {configuration option: "vcmd"} -constraints nodeprecated -setup { spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ -relief sunken pack .e update } -body { @@ -1152,24 +1153,24 @@ destroy .e } -returnCodes error -result {unknown option "-gorp"} test spinbox-3.14 {SpinboxWidgetCmd procedure, "cget" widget command} -setup { spinbox .e } -body { - .e configure -bd 4 - .e cget -bd + .e configure -borderwidth 4 + .e cget -borderwidth } -cleanup { destroy .e } -result 4 -test spinbox-3.15 {SpinboxWidgetCmd procedure, "configure" widget command} -setup { +test spinbox-3.15 {SpinboxWidgetCmd procedure, "configure" widget command} -constraints nodeprecated -setup { spinbox .e pack .e update } -body { llength [.e configure] } -cleanup { destroy .e -} -result 51 +} -result 55 test spinbox-3.16 {SpinboxWidgetCmd procedure, "configure" widget command} -setup { spinbox .e } -body { .e configure -foo } -cleanup { @@ -1176,13 +1177,13 @@ destroy .e } -returnCodes error -result {unknown option "-foo"} test spinbox-3.17 {SpinboxWidgetCmd procedure, "configure" widget command} -setup { spinbox .e } -body { - .e configure -bd 4 - .e configure -bg #ffffff - lindex [.e configure -bd] 4 + .e configure -borderwidth 4 + .e configure -background #ffffff + lindex [.e configure -borderwidth] 4 } -cleanup { destroy .e } -result 4 test spinbox-3.18 {SpinboxWidgetCmd procedure, "delete" widget command} -setup { spinbox .e @@ -2046,11 +2047,11 @@ fonts } -setup { spinbox .e -borderwidth 2 -highlightthickness 2 pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised + .e configure -font {Courier -12} -borderwidth 2 -relief raised .e insert end "0123" update list [.e index @10] [.e index @11] [.e index @12] [.e index @13] } -cleanup { destroy .e @@ -2059,11 +2060,11 @@ fonts } -setup { spinbox .e -borderwidth 2 -highlightthickness 2 pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief flat + .e configure -font {Courier -12} -borderwidth 2 -relief flat .e insert end "0123" update list [.e index @10] [.e index @11] [.e index @12] [.e index @13] } -cleanup { destroy .e @@ -2101,11 +2102,11 @@ fonts } -setup { spinbox .e pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised -width 20 -highlightthickness 3 + .e configure -font {Courier -12} -borderwidth 2 -relief raised -width 20 -highlightthickness 3 .e insert end 012\t45 update list [.e index @61] [.e index @62] } -cleanup { destroy .e @@ -2114,11 +2115,11 @@ fonts } -setup { spinbox .e pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised -width 20 -justify center \ + .e configure -font {Courier -12} -borderwidth 2 -relief raised -width 20 -justify center \ -highlightthickness 3 .e insert end 012\t45 update list [.e index @96] [.e index @97] } -cleanup { @@ -2128,11 +2129,11 @@ fonts } -setup { spinbox .e pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised -width 20 -justify right \ + .e configure -font {Courier -12} -borderwidth 2 -relief raised -width 20 -justify right \ -highlightthickness 3 .e insert end 012\t45 update list [.e index @131] [.e index @132] } -cleanup { @@ -2140,11 +2141,11 @@ } -result {3 4} test spinbox-6.4 {SpinboxComputeGeometry procedure} -setup { spinbox .e pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised -width 5 + .e configure -font {Courier -12} -borderwidth 2 -relief raised -width 5 .e insert end "01234567890" update .e xview 6 .e index @0 } -cleanup { @@ -2152,11 +2153,11 @@ } -result 6 test spinbox-6.5 {SpinboxComputeGeometry procedure} -setup { spinbox .e -highlightthickness 2 pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised -width 5 + .e configure -font {Courier -12} -borderwidth 2 -relief raised -width 5 .e insert end "01234567890" update .e xview 7 .e index @0 } -cleanup { @@ -2166,11 +2167,11 @@ fonts } -setup { spinbox .e -highlightthickness 2 pack .e } -body { - .e configure -font {Courier -12} -bd 2 -relief raised -width 10 + .e configure -font {Courier -12} -borderwidth 2 -relief raised -width 10 .e insert end "01234\t67890" update .e xview 3 list [.e index @39] [.e index @40] } -cleanup { @@ -2180,11 +2181,11 @@ fonts } -setup { spinbox .e -highlightthickness 2 pack .e } -body { - .e configure -font {Helvetica -24} -bd 3 -relief raised -width 5 + .e configure -font {Helvetica -24} -borderwidth 3 -relief raised -width 5 .e insert end "01234567" update list [winfo reqwidth .e] [winfo reqheight .e] } -cleanup { destroy .e @@ -2193,11 +2194,11 @@ fonts } -setup { spinbox .e -highlightthickness 2 pack .e } -body { - .e configure -font {Helvetica -24} -bd 3 -relief raised -width 0 + .e configure -font {Helvetica -24} -borderwidth 3 -relief raised -width 0 .e insert end "01234567" update list [winfo reqwidth .e] [winfo reqheight .e] } -cleanup { destroy .e @@ -2206,21 +2207,21 @@ fonts } -setup { spinbox .e -highlightthickness 2 pack .e } -body { - .e configure -font {Helvetica -24} -bd 3 -relief raised -width 0 + .e configure -font {Helvetica -24} -borderwidth 3 -relief raised -width 0 update list [winfo reqwidth .e] [winfo reqheight .e] } -cleanup { destroy .e } -result {42 39} test spinbox-7.1 {InsertChars procedure} -setup { unset -nocomplain contents - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e configure -textvariable contents -xscrollcommand scroll .e insert 0 abcde @@ -2234,11 +2235,11 @@ after cancel $timeout } -result {abXXXcde abXXXcde {0.000000 1.000000}} test spinbox-7.2 {InsertChars procedure} -setup { unset -nocomplain contents - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e configure -textvariable contents -xscrollcommand scroll .e insert 0 abcde @@ -2250,11 +2251,11 @@ } -cleanup { destroy .e after cancel $timeout } -result {abcdeXXX abcdeXXX {0.000000 1.000000}} test spinbox-7.3 {InsertChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 0123456789 .e select from 2 .e select to 6 @@ -2264,11 +2265,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {5 9 5 8} test spinbox-7.4 {InsertChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 0123456789 .e select from 2 .e select to 6 @@ -2278,11 +2279,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {2 9 2 8} test spinbox-7.5 {InsertChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 0123456789 .e select from 2 .e select to 6 @@ -2292,11 +2293,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {2 9 2 8} test spinbox-7.6 {InsertChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 0123456789 .e select from 2 .e select to 6 @@ -2306,11 +2307,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {2 6 2 5} test spinbox-7.7 {InsertChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -xscrollcommand scroll .e insert 0 0123456789 .e icursor 4 @@ -2318,11 +2319,11 @@ .e index insert } -cleanup { destroy .e } -result 7 test spinbox-7.8 {InsertChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 0123456789 .e icursor 4 .e insert 5 XXX @@ -2329,11 +2330,11 @@ .e index insert } -cleanup { destroy .e } -result 4 test spinbox-7.9 {InsertChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 "This is a very long string" update .e xview 4 @@ -2341,11 +2342,11 @@ .e index @0 } -cleanup { destroy .e } -result 7 test spinbox-7.10 {InsertChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 "This is a very long string" update .e xview 4 @@ -2356,11 +2357,11 @@ } -result 4 test spinbox-7.11 {InsertChars procedure} -constraints { fonts } -setup { - spinbox .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 0 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 "xyzzy" update .e insert 2 00 @@ -2369,11 +2370,11 @@ destroy .e } -result 70 test spinbox-8.1 {DeleteChars procedure} -setup { unset -nocomplain contents - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e configure -textvariable contents -xscrollcommand scroll .e insert 0 abcde @@ -2386,11 +2387,11 @@ destroy .e after cancel $timeout } -result {abe abe {0.000000 1.000000}} test spinbox-8.2 {DeleteChars procedure} -setup { unset -nocomplain contents - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e configure -textvariable contents -xscrollcommand scroll .e insert 0 abcde @@ -2403,11 +2404,11 @@ destroy .e after cancel $timeout } -result {cde cde {0.000000 1.000000}} test spinbox-8.3 {DeleteChars procedure} -setup { unset -nocomplain contents - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e configure -textvariable contents -xscrollcommand scroll .e insert 0 abcde @@ -2419,11 +2420,11 @@ } -cleanup { destroy .e after cancel $timeout } -result {abc abc {0.000000 1.000000}} test spinbox-8.4 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 3 @@ -2435,11 +2436,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {1 6 1 5} test spinbox-8.5 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 3 @@ -2451,11 +2452,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {1 5 1 4} test spinbox-8.6 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 3 @@ -2467,11 +2468,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {1 2 1 5} test spinbox-8.7 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 3 @@ -2481,11 +2482,11 @@ .e index sel.first } -cleanup { destroy .e } -returnCodes error -result {selection isn't in widget .e} test spinbox-8.8 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 3 @@ -2497,11 +2498,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {3 4 3 8} test spinbox-8.9 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e insert 0 0123456789abcde .e select from 3 .e select to 8 @@ -2510,11 +2511,11 @@ .e index sel.first } -cleanup { destroy .e } -returnCodes error -result {selection isn't in widget .e} test spinbox-8.10 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 8 @@ -2526,11 +2527,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {3 5 5 8} test spinbox-8.11 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e select from 8 @@ -2542,11 +2543,11 @@ lappend x [.e index sel.first] [.e index sel.last] } -cleanup { destroy .e } -result {3 8 4 8} test spinbox-8.12 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e icursor 4 @@ -2555,11 +2556,11 @@ .e index insert } -cleanup { destroy .e } -result 1 test spinbox-8.13 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e icursor 4 @@ -2568,11 +2569,11 @@ .e index insert } -cleanup { destroy .e } -result 1 test spinbox-8.14 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 0123456789abcde .e icursor 4 @@ -2581,11 +2582,11 @@ .e index insert } -cleanup { destroy .e } -result 4 test spinbox-8.15 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 "This is a very long string" .e xview 4 @@ -2594,11 +2595,11 @@ .e index @0 } -cleanup { destroy .e } -result 1 test spinbox-8.16 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 "This is a very long string" .e xview 4 @@ -2607,11 +2608,11 @@ .e index @0 } -cleanup { destroy .e } -result 1 test spinbox-8.17 {DeleteChars procedure} -setup { - spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 "This is a very long string" .e xview 4 @@ -2620,11 +2621,11 @@ .e index @0 } -cleanup { destroy .e } -result 4 test spinbox-8.18 {DeleteChars procedure} -constraints failsOnUbuntuNoXft -setup { - spinbox .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2 + spinbox .e -width 0 -font {Courier -12} -highlightthickness 2 -borderwidth 2 pack .e focus .e } -body { .e insert 0 "xyzzy" update @@ -2663,11 +2664,11 @@ test spinbox-10.1 {SpinboxSetValue procedure} -constraints fonts -body { set x abcde set y ab - spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2 -width 0 + spinbox .e -font {Helvetica -12} -highlightthickness 2 -borderwidth 2 -width 0 pack .e .e configure -textvariable x .e configure -textvariable y update list [.e get] [winfo reqwidth .e] @@ -2674,11 +2675,11 @@ } -cleanup { destroy .e } -result {ab 35} test spinbox-10.2 {SpinboxSetValue procedure, updating selection} -setup { unset -nocomplain x - spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2 + spinbox .e -font {Helvetica -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -textvariable x .e insert 0 "abcdefghjklmnopqrstu" .e selection range 4 10 @@ -2687,11 +2688,11 @@ } -cleanup { destroy .e } -returnCodes error -result {selection isn't in widget .e} test spinbox-10.3 {SpinboxSetValue procedure, updating selection} -setup { unset -nocomplain x - spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2 + spinbox .e -font {Helvetica -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -textvariable x .e insert 0 "abcdefghjklmnopqrstu" .e selection range 4 10 @@ -2700,11 +2701,11 @@ } -cleanup { destroy .e } -result {4 7} test spinbox-10.4 {SpinboxSetValue procedure, updating selection} -setup { unset -nocomplain x - spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2 + spinbox .e -font {Helvetica -12} -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -textvariable x .e insert 0 "abcdefghjklmnopqrstu" .e selection range 4 10 @@ -2713,11 +2714,11 @@ } -cleanup { destroy .e } -result {4 10} test spinbox-10.5 {SpinboxSetValue procedure, updating display position} -setup { unset -nocomplain x - spinbox .e -highlightthickness 2 -bd 2 + spinbox .e -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -width 10 -font {Courier -12} -textvariable x .e insert 0 "abcdefghjklmnopqrstuvwxyz" .e xview 10 @@ -2728,11 +2729,11 @@ } -cleanup { destroy .e } -result 0 test spinbox-10.6 {SpinboxSetValue procedure, updating display position} -setup { unset -nocomplain x - spinbox .e -highlightthickness 2 -bd 2 + spinbox .e -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -width 10 -font {Courier -12} -textvariable x pack .e .e insert 0 "abcdefghjklmnopqrstuvwxyz" @@ -2744,11 +2745,11 @@ } -cleanup { destroy .e } -result 10 test spinbox-10.7 {SpinboxSetValue procedure, updating insertion cursor} -setup { unset -nocomplain x - spinbox .e -highlightthickness 2 -bd 2 + spinbox .e -highlightthickness 2 -borderwidth 2 pack .e update } -body { .e configure -width 10 -font {Courier -12} -textvariable x pack .e @@ -2759,11 +2760,11 @@ } -cleanup { destroy .e } -result 3 test spinbox-10.8 {SpinboxSetValue procedure, updating insertion cursor} -setup { unset -nocomplain x - spinbox .e -highlightthickness 2 -bd 2 + spinbox .e -highlightthickness 2 -borderwidth 2 pack .e } -body { .e configure -width 10 -font {Courier -12} -textvariable x pack .e .e insert 0 "abcdefghjklmnopqrstuvwxyz" @@ -2773,11 +2774,11 @@ } -cleanup { destroy .e } -result 5 test spinbox-11.1 {SpinboxEventProc procedure} -setup { - spinbox .e -highlightthickness 2 -bd 2 -font {Helvetica -12} + spinbox .e -highlightthickness 2 -borderwidth 2 -font {Helvetica -12} pack .e } -body { .e insert 0 abcdefg destroy .e update @@ -2785,14 +2786,14 @@ destroy .e } -result {} test spinbox-11.2 {SpinboxEventProc procedure} -setup { set x {} } -body { - spinbox .e1 -fg #112233 + spinbox .e1 -color #112233 rename .e1 .e2 lappend x [winfo children .] - lappend x [.e2 cget -fg] + lappend x [.e2 cget -color] destroy .e1 lappend x [info command .e*] [winfo children .] } -cleanup { destroy .e1 } -result {.e1 #112233 {} {}} @@ -2805,11 +2806,11 @@ destroy .b } -result {{} {}} test spinbox-13.1 {GetSpinboxIndex procedure} -setup { - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken + spinbox .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e } -body { .e insert 0 012345678901234567890 .e xview 4 update @@ -2822,11 +2823,11 @@ .e index abogus } -cleanup { destroy .e } -returnCodes error -result {bad spinbox index "abogus"} test spinbox-13.3 {GetSpinboxIndex procedure} -setup { - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken + spinbox .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e } -body { .e insert 0 012345678901234567890 .e xview 4 update @@ -2835,11 +2836,11 @@ .e index anchor } -cleanup { destroy .e } -result 1 test spinbox-13.4 {GetSpinboxIndex procedure} -setup { - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken + spinbox .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e } -body { .e insert 0 012345678901234567890 .e xview 4 update @@ -2848,11 +2849,11 @@ .e index anchor } -cleanup { destroy .e } -result 4 test spinbox-13.5 {GetSpinboxIndex procedure} -setup { - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken + spinbox .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e } -body { .e insert 0 012345678901234567890 .e xview 4 update @@ -2869,11 +2870,11 @@ .e index ebogus } -cleanup { destroy .e } -returnCodes error -result {bad spinbox index "ebogus"} test spinbox-13.7 {GetSpinboxIndex procedure} -setup { - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken + spinbox .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e } -body { .e insert 0 012345678901234567890 .e xview 4 update @@ -2888,11 +2889,11 @@ .e index ibogus } -cleanup { destroy .e } -returnCodes error -result {bad spinbox index "ibogus"} test spinbox-13.9 {GetSpinboxIndex procedure} -setup { - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken + spinbox .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e } -body { .e insert 0 012345678901234567890 .e xview 4 update @@ -2905,11 +2906,11 @@ 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 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -2925,11 +2926,11 @@ test spinbox-13.11 {GetSpinboxIndex procedure} -constraints aquaOrWin32 -body { # On mac and pc, when selection is cleared, spinbox widget remembers # last selected range. When selection ownership is restored to # spinbox, the old range will be rehighlighted. # Previous settings: - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken + spinbox .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -2943,11 +2944,11 @@ destroy .e } -result 1 test spinbox-13.12 {GetSpinboxIndex procedure} -constraints x11 -body { # Previous settings: - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken + spinbox .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -2960,11 +2961,11 @@ destroy .e } -returnCodes error -result {selection isn't in widget .e} test spinbox-13.12.1 {GetSpinboxIndex procedure} -constraints unix -body { # Previous settings: - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken + spinbox .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -2977,11 +2978,11 @@ destroy .e } -returnCodes error -result {bad spinbox index "bogus"} test spinbox-13.13 {GetSpinboxIndex procedure} -constraints win -body { # Previous settings: - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken + spinbox .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -2997,11 +2998,11 @@ test spinbox-13.14 {GetSpinboxIndex procedure} -constraints win -body { # On mac and pc, when selection is cleared, spinbox widget remembers # last selected range. When selection ownership is restored to # spinbox, the old range will be rehighlighted. # Previous settings: - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken + spinbox .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -3017,11 +3018,11 @@ test spinbox-13.14.1 {GetSpinboxIndex procedure} -constraints win -body { # On mac and pc, when selection is cleared, spinbox widget remembers # last selected range. When selection ownership is restored to # spinbox, the old range will be rehighlighted. # Previous settings: - spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken + spinbox .e -font {Courier -12} -width 5 -borderwidth 2 -relief sunken pack .e .e insert 0 012345678901234567890 .e xview 4 update .e select from 1 @@ -3042,11 +3043,11 @@ } -cleanup { destroy .e } -returnCodes error -result {bad spinbox index "@xyz"} test spinbox-13.16 {GetSpinboxIndex procedure} -constraints fonts -body { - spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \ + spinbox .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2 \ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -3053,11 +3054,11 @@ .e index @4 } -cleanup { destroy .e } -result 4 test spinbox-13.17 {GetSpinboxIndex procedure} -constraints fonts -body { - spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \ + spinbox .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2 \ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -3064,11 +3065,11 @@ .e index @11 } -cleanup { destroy .e } -result 4 test spinbox-13.18 {GetSpinboxIndex procedure} -constraints fonts -body { - spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \ + spinbox .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2 \ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -3075,11 +3076,11 @@ .e index @12 } -cleanup { destroy .e } -result 5 test spinbox-13.19 {GetSpinboxIndex procedure} -constraints fonts -body { - spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \ + spinbox .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2 \ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -3086,11 +3087,11 @@ .e index @[expr {[winfo width .e] - 6-11}] } -cleanup { destroy .e } -result 8 test spinbox-13.20 {GetSpinboxIndex procedure} -constraints fonts -body { - spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \ + spinbox .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2 \ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -3097,11 +3098,11 @@ .e index @[expr {[winfo width .e] - 5}] } -cleanup { destroy .e } -result 9 test spinbox-13.21 {GetSpinboxIndex procedure} -body { - spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \ + spinbox .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2 \ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -3117,11 +3118,11 @@ .e index 1xyz } -cleanup { destroy .e } -returnCodes error -result {bad spinbox index "1xyz"} test spinbox-13.23 {GetSpinboxIndex procedure} -body { - spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \ + spinbox .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2 \ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -3128,11 +3129,11 @@ .e index -1 } -cleanup { destroy .e } -result 0 test spinbox-13.24 {GetSpinboxIndex procedure} -body { - spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \ + spinbox .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2 \ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -3139,11 +3140,11 @@ .e index 12 } -cleanup { destroy .e } -result 12 test spinbox-13.25 {GetSpinboxIndex procedure} -body { - spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \ + spinbox .e -width 5 -relief sunken -highlightthickness 2 -borderwidth 2 \ -font {Courier -12} pack .e .e insert 0 012345678901234567890 .e xview 4 update @@ -3295,11 +3296,11 @@ } -body { spinbox .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 a set ::vVals } -cleanup { destroy .e @@ -3310,11 +3311,11 @@ } -body { spinbox .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 a ;# previous settings .e insert 1 b set ::vVals } -cleanup { @@ -3326,11 +3327,11 @@ } -body { spinbox .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 ab ;# previous settings .e insert end c set ::vVals } -cleanup { @@ -3342,11 +3343,11 @@ } -body { spinbox .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 abc ;# previous settings .e insert 1 123 list $::vVals $::e } -cleanup { @@ -3358,11 +3359,11 @@ } -body { spinbox .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 a123bc ;# previous settings .e delete 2 set ::vVals } -cleanup { @@ -3374,11 +3375,11 @@ } -body { spinbox .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 a13bc ;# previous settings .e configure -validate key .e delete 1 3 set ::vVals @@ -3391,11 +3392,11 @@ } -body { spinbox .e -validate focus \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abc ;# previous settings set ::vVals {} .e insert end d set ::vVals @@ -3408,11 +3409,11 @@ } -body { spinbox .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e configure -validate focus ;# previous settings .e insert end abcd ;# previous settings focus -force .e # update necessary to process FocusIn event @@ -3427,11 +3428,11 @@ } -body { spinbox .e -validate focus \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings focus -force .e ;# previous settings update ;# previous settings # update necessary to process FocusIn event @@ -3448,11 +3449,11 @@ } -body { spinbox .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings focus -force .e # update necessary to process FocusIn event update @@ -3466,11 +3467,11 @@ } -body { spinbox .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings focus -force .e ;# previous settings # update necessary to process FocusIn event update ;# previous settings @@ -3487,11 +3488,11 @@ } -body { spinbox .e -validate focusin \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert 0 abcd ;# previous settings focus -force .e # update necessary to process FocusIn event update @@ -3505,11 +3506,11 @@ } -body { spinbox .e -validate focusin \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings set ::vVals {} focus -force . # update necessary to process FocusOut event @@ -3524,11 +3525,11 @@ } -body { spinbox .e -validate focuso \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings set ::vVals {} ;# previous settings focus -force .e # update necessary to process FocusIn event @@ -3543,11 +3544,11 @@ } -body { spinbox .e -validate focuso \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings set ::vVals {} ;# previous settings focus -force .e ;# previous settings # update necessary to process FocusIn event @@ -3566,11 +3567,11 @@ } -body { spinbox .e -validate focuso \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings set ::vVals {} ;# previous settings focus -force .e ;# previous settings # update necessary to process FocusIn event @@ -3589,11 +3590,11 @@ } -body { spinbox .e -validate focuso \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e .e insert end abcd ;# previous settings set ::e newdata list [.e cget -validate] $::vVals } -cleanup { @@ -3607,11 +3608,11 @@ } -body { spinbox .e -validate all \ -validatecommand [list doval3 %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e set ::e newdata ;# previous settings .e configure -validate all set ::e nextdata list [.e cget -validate] $::vVals @@ -3628,11 +3629,11 @@ } -body { spinbox .e -validate all \ -validatecommand [list doval3 %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e set ::e nextdata ;# previous settings .e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V] .e validate @@ -3651,11 +3652,11 @@ } -body { spinbox .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ - -background red -foreground white + -background red -color white pack .e set ::e nextdata ;# previous settings .e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V] ;# prev .e validate ;# previous settings Index: tests/text.test ================================================================== --- tests/text.test +++ tests/text.test @@ -69,40 +69,40 @@ test text-1.5 {configuration option: "bd"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t update } -body { - .t configure -bd 4 - .t cget -bd + .t configure -borderwidth 4 + .t cget -borderwidth } -cleanup { destroy .t } -result 4 test text-1.6 {configuration option: "bd"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t update } -body { - .t configure -bd foo + .t configure -borderwidth foo } -cleanup { destroy .t } -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 update } -body { - .t configure -bg blue - .t cget -bg + .t configure -background blue + .t cget -background } -cleanup { destroy .t } -result {blue} test text-1.8 {configuration option: "bg"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t update } -body { - .t configure -bg #xx + .t configure -background #xx } -cleanup { destroy .t } -match glob -returnCodes {error} -result {*} test text-1.9 {configuration option: "blockcursor"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} @@ -183,21 +183,21 @@ test text-1.17 {configuration option: "fg"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t update } -body { - .t configure -fg red - .t cget -fg + .t configure -color red + .t cget -color } -cleanup { destroy .t } -result {red} test text-1.18 {configuration option: "fg"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t update } -body { - .t configure -fg stupid + .t configure -color stupid } -cleanup { destroy .t } -match glob -returnCodes {error} -result {*} test text-1.19 {configuration option: "font"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} @@ -216,26 +216,26 @@ } -body { .t configure -font {} } -cleanup { destroy .t } -match glob -returnCodes {error} -result {*} -test text-1.21 {configuration option: "foreground"} -setup { +test text-1.21 {configuration option: "color"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t update } -body { - .t configure -foreground #012 - .t cget -foreground + .t configure -color #012 + .t cget -color } -cleanup { destroy .t } -result {#012} -test text-1.22 {configuration option: "foreground"} -setup { +test text-1.22 {configuration option: "color"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t update } -body { - .t configure -foreground bogus + .t configure -color bogus } -cleanup { destroy .t } -match glob -returnCodes {error} -result {*} test text-1.23 {configuration option: "height"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} @@ -548,26 +548,26 @@ } -body { .t configure -selectborderwidth 3x } -cleanup { destroy .t } -match glob -returnCodes {error} -result {*} -test text-1.55 {configuration option: "selectforeground"} -setup { +test text-1.55 {configuration option: "selectcolor"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t update } -body { - .t configure -selectforeground yellow - .t cget -selectforeground + .t configure -selectcolor yellow + .t cget -selectcolor } -cleanup { destroy .t } -result {yellow} -test text-1.56 {configuration option: "selectforeground"} -setup { +test text-1.56 {configuration option: "selectcolor"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} pack .t update } -body { - .t configure -selectforeground #12345 + .t configure -selectcolor #12345 } -cleanup { destroy .t } -match glob -returnCodes {error} -result {*} test text-1.57 {configuration option: "spacing1"} -setup { text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} @@ -893,17 +893,17 @@ winfo exists .t } -cleanup { destroy .t } -result 0 test text-2.5 {Tk_TextCmd procedure} -body { - text .t -bd 2 -fg red + text .t -borderwidth 2 -color red } -cleanup { destroy .t } -returnCodes ok -result {.t} test text-2.6 {Tk_TextCmd procedure} -body { - text .t -bd 2 -fg red - list [lindex [.t config -bd] 4] [lindex [.t config -fg] 4] + text .t -borderwidth 2 -color red + list [lindex [.t config -borderwidth] 4] [lindex [.t config -color] 4] } -cleanup { destroy .t } -result {2 red} test text-2.7 {Tk_TextCmd procedure} -constraints { win @@ -998,12 +998,12 @@ destroy .t } -returnCodes {error} -result {unknown option "-gorp"} test text-5.4 {TextWidgetCmd procedure, "cget" option} -setup { text .t } -body { - .t configure -bd 17 - .t cget -bd + .t configure -borderwidth 17 + .t cget -borderwidth } -cleanup { destroy .t } -result 17 @@ -2707,11 +2707,11 @@ } -cleanup { destroy .t } -result 0 test text-10.41 {TextWidgetCmd procedure, "count" option} -setup { toplevel .mytop - pack [text .mytop.t -font TkFixedFont -bd 0 -padx 0 -wrap char] + pack [text .mytop.t -font TkFixedFont -borderwidth 0 -padx 0 -wrap char] set spec [font measure TkFixedFont "Line 1+++Line 1---Li"] ; # 20 chars append spec x300+0+0 wm geometry .mytop $spec .mytop.t delete 1.0 end update @@ -3365,14 +3365,14 @@ destroy .t } -returnCodes {error} -result {bad wrap "bogus": must be char, none, or word} test text-14.9 {ConfigureText procedure} -setup { text .t -font {Courier -12} -borderwidth 2 -highlightthickness 2 } -body { - .t configure -selectborderwidth 17 -selectforeground #332211 \ + .t configure -selectborderwidth 17 -selectcolor #332211 \ -selectbackground #abc list [lindex [.t tag config sel -borderwidth] 4] \ - [lindex [.t tag config sel -foreground] 4] \ + [lindex [.t tag config sel -color] 4] \ [lindex [.t tag config sel -background] 4] } -cleanup { destroy .t } -result {17 #332211 #abc} test text-14.10 {ConfigureText procedure} -setup { @@ -3546,15 +3546,15 @@ destroy .t } -result {140 160 170 150} test text-16.1 {TextEventProc procedure} -body { - text .tx1 -bg #543210 + text .tx1 -background #543210 rename .tx1 .tx2 set x {} lappend x [winfo exists .tx1] - lappend x [.tx2 cget -bg] + lappend x [.tx2 cget -background] destroy .tx1 lappend x [info command .tx*] [winfo exists .tx1] [winfo exists .tx2] } -cleanup { destroy .txt1 } -result {1 #543210 {} 0 0} @@ -3871,11 +3871,11 @@ destroy .top } -result {1.1} test text-19.16 {DeleteChars procedure, updates affecting topIndex} -setup { toplevel .top text .top.t -width 6 -height 10 -wrap word - frame .top.f -width 200 -height 20 -relief raised -bd 2 + frame .top.f -width 200 -height 20 -relief raised -borderwidth 2 pack .top.f .top.t -side left wm geometry .top +0+0 update } -body { .top.t insert end "abc def\n01 2a345 678 9101112\nLine 3\nLine 4\nLine 5\n6\n7\n8\n" @@ -4320,11 +4320,11 @@ text .top.t -width 30 -height 10 -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .top.t } -body { .top.t insert 1.0 "This is a line\nand this is another" .top.t insert end "\nand this is yet another" - frame .top.f -width 20 -height 20 -bd 2 -relief raised + frame .top.f -width 20 -height 20 -borderwidth 2 -relief raised .top.t window create 2.5 -window .top.f .top.t search his 2.6 } -cleanup { destroy .top } -result {2.6} @@ -4333,11 +4333,11 @@ text .top.t -width 30 -height 10 -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .top.t } -body { .top.t insert 1.0 "This is a line\nand this is another" .top.t insert end "\nand this is yet another" - frame .top.f -width 20 -height 20 -bd 2 -relief raised + frame .top.f -width 20 -height 20 -borderwidth 2 -relief raised .top.t window create 2.5 -window .top.f .top.t search this 2.6 } -cleanup { destroy .top } -result {3.4} @@ -4346,11 +4346,11 @@ text .top.t -width 30 -height 10 -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .top.t } -body { .top.t insert 1.0 "This is a line\nand this is another" .top.t insert end "\nand this is yet another" - frame .top.f -width 20 -height 20 -bd 2 -relief raised + frame .top.f -width 20 -height 20 -borderwidth 2 -relief raised .top.t window create 2.5 -window .top.f .top.t search is 2.6 } -cleanup { destroy .top } -result {2.7} @@ -4359,11 +4359,11 @@ text .top.t -width 30 -height 10 -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .top.t } -body { .top.t insert 1.0 "This is a line\nand this is another" .top.t insert end "\nand this is yet another" - frame .top.f -width 20 -height 20 -bd 2 -relief raised + frame .top.f -width 20 -height 20 -borderwidth 2 -relief raised .top.t window create 2.5 -window .top.f .top.t search his 2.7 } -cleanup { destroy .top } -result {3.5} @@ -4372,11 +4372,11 @@ text .top.t -width 30 -height 10 -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .top.t } -body { .top.t insert 1.0 "This is a line\nand this is another" .top.t insert end "\nand this is yet another" - frame .top.f -width 20 -height 20 -bd 2 -relief raised + frame .top.f -width 20 -height 20 -borderwidth 2 -relief raised .top.t window create 2.5 -window .top.f .top.t search -backwards "his is another" 2.6 } -cleanup { destroy .top } -result {2.6} @@ -4385,11 +4385,11 @@ text .top.t -width 30 -height 10 -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .top.t } -body { .top.t insert 1.0 "This is a line\nand this is another" .top.t insert end "\nand this is yet another" - frame .top.f -width 20 -height 20 -bd 2 -relief raised + frame .top.f -width 20 -height 20 -borderwidth 2 -relief raised .top.t window create 2.5 -window .top.f .top.t search -backwards "his is" 2.6 } -cleanup { destroy .top } -result {1.1} @@ -4460,14 +4460,14 @@ } -cleanup { destroy .t } -result {2.13 {} {} {}} test text-22.55 {TextSearchCmd procedure, embedded windows and index/count} -setup { text .t - frame .t.f1 -width 20 -height 20 -relief raised -bd 2 - frame .t.f2 -width 20 -height 20 -relief raised -bd 2 - frame .t.f3 -width 20 -height 20 -relief raised -bd 2 - frame .t.f4 -width 20 -height 20 -relief raised -bd 2 + frame .t.f1 -width 20 -height 20 -relief raised -borderwidth 2 + frame .t.f2 -width 20 -height 20 -relief raised -borderwidth 2 + frame .t.f3 -width 20 -height 20 -relief raised -borderwidth 2 + frame .t.f4 -width 20 -height 20 -relief raised -borderwidth 2 set result "" } -body { .t insert end "xxyz xyz x. the\nfoo -forward bar xxxxx BaR foo\nxyz xxyzx" .t window create 2.10 -window .t.f3 .t window create 2.8 -window .t.f2 @@ -6108,29 +6108,29 @@ } -cleanup { destroy .t } -result {1.1 1.0 1.0} test text-23.1 {TkTextGetTabs procedure} -setup { - text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100 + text .t -highlightthickness 0 -borderwidth 0 -relief flat -padx 0 -width 100 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" .t configure -tabs "\{{}" } -cleanup { destroy .t } -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 100 + text .t -highlightthickness 0 -borderwidth 0 -relief flat -padx 0 -width 100 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" .t configure -tabs xyz } -cleanup { destroy .t } -returnCodes {error} -result {bad screen distance "xyz"} test text-23.3 {TkTextGetTabs procedure} -setup { - text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100 + text .t -highlightthickness 0 -borderwidth 0 -relief flat -padx 0 -width 100 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" .t configure -tabs {100 200} update idletasks @@ -6137,11 +6137,11 @@ list [lindex [.t bbox 1.2] 0] [lindex [.t bbox 1.4] 0] } -cleanup { destroy .t } -result {100 200} test text-23.4 {TkTextGetTabs procedure} -setup { - text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100 + text .t -highlightthickness 0 -borderwidth 0 -relief flat -padx 0 -width 100 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" .t configure -tabs {100 right 200 left 300 center 400 numeric} update idletasks @@ -6151,11 +6151,11 @@ [lindex [.t bbox 1.10] 0] } -cleanup { destroy .t } -result {100 200 300 400} test text-23.5 {TkTextGetTabs procedure} -setup { - text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100 + text .t -highlightthickness 0 -borderwidth 0 -relief flat -padx 0 -width 100 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" .t configure -tabs {105 r 205 l 305 c 405 n} update idletasks @@ -6165,20 +6165,20 @@ [lindex [.t bbox 1.10] 0] } -cleanup { destroy .t } -result {105 205 305 405} test text-23.6 {TkTextGetTabs procedure} -setup { - text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 100 + text .t -highlightthickness 0 -borderwidth 0 -relief flat -padx 0 -width 100 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" .t configure -tabs {100 left 200 lork} } -cleanup { destroy .t } -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 100 + text .t -highlightthickness 0 -borderwidth 0 -relief flat -padx 0 -width 100 pack .t } -body { .t insert end "1\t2\t3\t4\t55.5" .t configure -tabs {100 !44 200 lork} } -cleanup { Index: tests/textBTree.test ================================================================== --- tests/textBTree.test +++ tests/textBTree.test @@ -39,11 +39,11 @@ # setup procedure for tests 16.*, 17.*, 18.9 proc setupBig {} { .t delete 1.0 end .t tag delete x y - .t tag configure x -foreground blue + .t tag configure x -color blue .t tag configure y -underline true # Create a Btree with 2002 lines (2000 + already existing + phantom at end) # This generates a level 3 node with 9 children # Most level 2 nodes cover 216 lines and have 6 children, except the last # level 2 node covers 274 lines and has 7 children. Index: tests/textDisp.test ================================================================== --- tests/textDisp.test +++ tests/textDisp.test @@ -225,11 +225,11 @@ test textDisp-1.1 {GetStyle procedure, priorities and tab stops} { .t delete 1.0 end .t insert 1.0 "x\ty" .t tag delete x y z .t tag configure x -tabs 50 - .t tag configure y -foreground black + .t tag configure y -color black .t tag configure z -tabs 70 .t tag add x 1.0 1.end .t tag add y 1.0 1.end .t tag add z 1.0 1.end update idletasks @@ -710,11 +710,11 @@ list [.t index @0,0] $tk_textRelayout $tk_textRedraw } {6.40 {13.0 7.0 6.80 6.60 6.40} {6.40 6.60 6.80 7.0 13.0}} test textDisp-4.12 {UpdateDisplayInfo, filling in extra vertical space} { .t delete 1.0 end .t insert end "1\n2\n3\n4\n5\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16" - button .b -text "Test" -bd 2 -highlightthickness 2 + button .b -text "Test" -borderwidth 2 -highlightthickness 2 .t window create 3.end -window .b .t yview moveto 1 updateText .t yview moveto 0 updateText @@ -840,14 +840,14 @@ .t configure -wrap char .t delete 1.0 end .t insert 1.0 "abcdefghijkl\nmnopqrstuvwzyz" .t tag configure spacing -spacing1 8 -spacing3 2 .t tag add spacing 1.0 end - frame .t.f1 -width 10 -height 4 -bg black - frame .t.f2 -width 10 -height 4 -bg black - frame .t.f3 -width 10 -height 4 -bg black - frame .t.f4 -width 10 -height 4 -bg black + frame .t.f1 -width 10 -height 4 -background black + frame .t.f2 -width 10 -height 4 -background black + frame .t.f3 -width 10 -height 4 -background black + frame .t.f4 -width 10 -height 4 -background black .t window create 1.3 -window .t.f1 -align top .t window create 1.7 -window .t.f2 -align center .t window create 2.1 -window .t.f3 -align bottom .t window create 2.10 -window .t.f4 -align baseline updateText @@ -860,11 +860,11 @@ # effect is to produce a core dump if Tk doesn't handle display # relayout that occurs during redisplay. test textDisp-5.2 {DisplayDLine, line resizes during display} { .t delete 1.0 end - frame .t.f -width 20 -height 20 -bd 2 -relief raised + frame .t.f -width 20 -height 20 -borderwidth 2 -relief raised bind .t.f {.t.f configure -width 30 -height 30} .t window create insert -window .t.f updateText list [winfo width .t.f] [winfo height .t.f] } [list 30 30] @@ -918,11 +918,11 @@ updateText list $tk_textRelayout $tk_textRedraw } {{2.0 2.20 2.40 2.60 4.0 4.20} {2.0 2.20 2.40 2.60 4.0 4.20 6.0}} test textDisp-6.5 {scrolling in DisplayText, scroll source obscured} {nonPortable} { .t configure -wrap char - frame .f2 -bg red + frame .f2 -background red place .f2 -in .t -relx 0.5 -rely 0.5 -relwidth 0.5 -relheight 0.5 .t delete 1.0 end .t insert 1.0 "Line 1 is so long that it wraps around, a couple of times" foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} { .t insert end "\nLine $i" @@ -934,13 +934,13 @@ list $tk_textRelayout $tk_textRedraw } {{1.0 9.0 10.0} {1.0 4.0 5.0 9.0 10.0}} test textDisp-6.6 {scrolling in DisplayText, Expose events after scroll} {unix nonPortable} { # this test depends on all of the expose events being handled at once .t configure -wrap char - frame .f2 -bg #ff0000 + frame .f2 -background #ff0000 place .f2 -in .t -relx 0.2 -rely 0.5 -relwidth 0.5 -relheight 0.5 - .t configure -bd 2 -relief raised + .t configure -borderwidth 2 -relief raised .t delete 1.0 end .t insert 1.0 "Line 1 is so long that it wraps around, a couple of times" foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} { .t insert end "\nLine $i" } @@ -948,11 +948,11 @@ .t delete 1.6 1.end destroy .f2 updateText list $tk_textRelayout $tk_textRedraw } {{1.0 9.0 10.0} {borders 1.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0}} -.t configure -bd 0 +.t configure -borderwidth 0 test textDisp-6.7 {DisplayText, vertical scrollbar updates} { .t configure -wrap char .t delete 1.0 end updateText .t count -update -ypixels 1.0 end @@ -1009,69 +1009,69 @@ # The following group of tests is marked non-portable because # they result in a lot of extra redisplay under Ultrix. I don't # know why this is so. -.t configure -bd 2 -relief raised -wrap char +.t configure -borderwidth 2 -relief raised -wrap char .t delete 1.0 end .t insert 1.0 "Line 1 is so long that it wraps around, a couple of times" foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} { .t insert end "\nLine $i" } test textDisp-7.1 {TkTextRedrawRegion} {nonPortable} { - frame .f2 -bg #ff0000 + frame .f2 -background #ff0000 place .f2 -in .t -relx 0.2 -relwidth 0.6 -rely 0.22 -relheight 0.55 updateText destroy .f2 updateText list $tk_textRelayout $tk_textRedraw } {{} {1.40 2.0 3.0 4.0 5.0 6.0}} test textDisp-7.2 {TkTextRedrawRegion} {nonPortable} { - frame .f2 -bg #ff0000 + frame .f2 -background #ff0000 place .f2 -in .t -relx 0 -relwidth 0.5 -rely 0 -relheight 0.5 updateText destroy .f2 updateText list $tk_textRelayout $tk_textRedraw } {{} {borders 1.0 1.20 1.40 2.0 3.0}} test textDisp-7.3 {TkTextRedrawRegion} {nonPortable} { - frame .f2 -bg #ff0000 + frame .f2 -background #ff0000 place .f2 -in .t -relx 0.5 -relwidth 0.5 -rely 0.5 -relheight 0.5 updateText destroy .f2 updateText list $tk_textRelayout $tk_textRedraw } {{} {borders 4.0 5.0 6.0 7.0 8.0}} test textDisp-7.4 {TkTextRedrawRegion} {nonPortable} { - frame .f2 -bg #ff0000 + frame .f2 -background #ff0000 place .f2 -in .t -relx 0.4 -relwidth 0.2 -rely 0 -relheight 0.2 \ -bordermode ignore updateText destroy .f2 updateText list $tk_textRelayout $tk_textRedraw } {{} {borders 1.0 1.20}} test textDisp-7.5 {TkTextRedrawRegion} {nonPortable} { - frame .f2 -bg #ff0000 + frame .f2 -background #ff0000 place .f2 -in .t -relx 0.4 -relwidth 0.2 -rely 1.0 -relheight 0.2 \ -anchor s -bordermode ignore updateText destroy .f2 updateText list $tk_textRelayout $tk_textRedraw } {{} {borders 7.0 8.0}} test textDisp-7.6 {TkTextRedrawRegion} {nonPortable} { - frame .f2 -bg #ff0000 + frame .f2 -background #ff0000 place .f2 -in .t -relx 0 -relwidth 0.2 -rely 0.55 -relheight 0.2 \ -anchor w -bordermode ignore updateText destroy .f2 updateText list $tk_textRelayout $tk_textRedraw } {{} {borders 3.0 4.0 5.0}} test textDisp-7.7 {TkTextRedrawRegion} {nonPortable} { - frame .f2 -bg #ff0000 + frame .f2 -background #ff0000 place .f2 -in .t -relx 1.0 -relwidth 0.2 -rely 0.55 -relheight 0.2 \ -anchor e -bordermode ignore updateText destroy .f2 updateText @@ -1078,19 +1078,19 @@ list $tk_textRelayout $tk_textRedraw } {{} {borders 3.0 4.0 5.0}} test textDisp-7.8 {TkTextRedrawRegion} {nonPortable} { .t delete 1.0 end .t insert 1.0 "Line 1\nLine 2\nLine 3\nLine 4\nLine 5\nLine 6\n" - frame .f2 -bg #ff0000 + frame .f2 -background #ff0000 place .f2 -in .t -relx 0.0 -relwidth 0.4 -rely 0.35 -relheight 0.4 \ -anchor nw -bordermode ignore updateText destroy .f2 updateText list $tk_textRelayout $tk_textRedraw } {{} {borders 4.0 5.0 6.0 7.0 eof}} -.t configure -bd 0 +.t configure -borderwidth 0 test textDisp-8.1 {TkTextChanged: redisplay whole lines} {textfonts} { .t configure -wrap word .t delete 1.0 end .t insert 1.0 "Line 1\nLine 2 is so long that it wraps around, two times" @@ -1420,20 +1420,20 @@ test textDisp-10.1 {TkTextRelayoutWindow} { .t configure -wrap char .t delete 1.0 end .t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4" updateText - .t configure -bg black + .t configure -background black updateText list $tk_textRelayout $tk_textRedraw } {{1.0 2.0 2.20 3.0 3.20 4.0} {borders 1.0 2.0 2.20 3.0 3.20 4.0 eof}} -.t configure -bg [lindex [.t configure -bg] 3] +.t configure -background [lindex [.t configure -background] 3] catch {destroy .top} test textDisp-10.2 {TkTextRelayoutWindow} { toplevel .top -width 300 -height 200 wm geometry .top +0+0 - text .top.t -font $fixedFont -width 20 -height 10 -relief raised -bd 2 + text .top.t -font $fixedFont -width 20 -height 10 -relief raised -borderwidth 2 place .top.t -x 0 -y 0 -width 20 -height 20 .top.t insert end "First line" .top.t see insert tkwait visibility .top.t place .top.t -width 150 -height 100 @@ -1618,11 +1618,11 @@ .top.t delete 1.0 end for {set i 1} {$i < 50} {incr i} { .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 + button .top.t.b -text "Test" -borderwidth 2 -highlightthickness 2 .top.t window create 21.0 -window .top.t.b .top.t tag add hidden 15.36 21.0 .top.t tag configure hidden -elide true .top.t configure -height 15 wm geometry .top 300x200+0+0 @@ -1800,11 +1800,11 @@ } [list [list 74 [expr {9*$fixedDiff/2 + 66}] 7 $fixedHeight] [list 138 [expr {9*$fixedDiff/2 + 66}] 7 $fixedHeight] [list 138 [expr {9*$fixedDiff/2 + 66}] 7 $fixedHeight] [list 74 [expr {9*$fixedDiff/2 + 66}] 7 $fixedHeight]] test textDisp-13.10 {TkTextSeeCmd procedure} {} { # SF Bug 641778 set w .tsee destroy $w - text $w -font {Helvetica 8 normal} -bd 16 + text $w -font {Helvetica 8 normal} -borderwidth 16 $w insert end Hello $w see end set res [$w bbox end] destroy $w set res @@ -2996,11 +2996,11 @@ Using 8.5a4 (ActiveState beta 4) under Linux. No problem with ActiveState beta 3. } toplevel .tt pack [text .tt.u] -side right -.tt.u configure -width 30 -height 27 -wrap word -bg #FFFFFF +.tt.u configure -width 30 -height 27 -wrap word -background #FFFFFF .tt.u insert end $message .tt.u mark set insert 3.10 tkwait visibility .tt.u set res [.tt.u count -displaylines 3.10 2.173] destroy .tt @@ -3081,14 +3081,14 @@ .t configure -wrap char .t delete 1.0 end .t insert 1.0 "abcdefghijkl\nmnopqrstuvwzyz" .t tag configure spacing -spacing1 8 -spacing3 2 .t tag add spacing 1.0 end - frame .t.f1 -width 10 -height 4 -bg black - frame .t.f2 -width 10 -height 4 -bg black - frame .t.f3 -width 10 -height 4 -bg black - frame .t.f4 -width 10 -height 4 -bg black + frame .t.f1 -width 10 -height 4 -background black + frame .t.f2 -width 10 -height 4 -background black + frame .t.f3 -width 10 -height 4 -background black + frame .t.f4 -width 10 -height 4 -background black .t window create 1.3 -window .t.f1 -align top .t window create 1.7 -window .t.f2 -align center .t window create 2.1 -window .t.f3 -align bottom .t window create 2.10 -window .t.f4 -align baseline updateText @@ -3147,16 +3147,16 @@ .t yview 48.0 list [.t dlineinfo 47.3] [.t dlineinfo 48.0] [.t dlineinfo 50.40] \ [.t dlineinfo 56.0] } [list {} [list 3 3 49 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] [list 3 [expr {4*$fixedDiff + 55}] 91 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] {}] test textDisp-23.2 {TkTextDLineInfo} {textfonts} { - .t config -bd 4 -wrap word + .t config -borderwidth 4 -wrap word updateText .t yview 48.0 .t dlineinfo 50.40 } [list 7 [expr {4*$fixedDiff + 59}] 91 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] -.t config -bd 0 +.t config -borderwidth 0 test textDisp-23.3 {TkTextDLineInfo} {textfonts} { .t config -wrap none updateText .t yview 48.0 list [.t dlineinfo 50.40] [.t dlineinfo 57.3] @@ -3379,27 +3379,27 @@ updateText test textDisp-24.21 {TkTextCharLayoutProc, word breaks} {textfonts} { .t configure -wrap word .t delete 1.0 end .t insert 1.0 "Sample text xxxxxxx yyyyy zzzzzzz qqqqq rrrr ssss tt u vvvvv" - frame .t.f -width 30 -height 20 -bg black + frame .t.f -width 30 -height 20 -background black .t window create 1.36 -window .t.f .t bbox 1.26 } [list 3 [expr {$fixedDiff/2 + 19}] 7 $fixedHeight] test textDisp-24.22 {TkTextCharLayoutProc, word breaks} {textfonts} { .t configure -wrap word .t delete 1.0 end - frame .t.f -width 30 -height 20 -bg black + frame .t.f -width 30 -height 20 -background black .t insert 1.0 "Sample text xxxxxxx yyyyyyy" .t window create end -window .t.f .t insert end "zzzzzzz qqqqq rrrr ssss tt u vvvvv" .t bbox 1.28 } [list 33 [expr {$fixedDiff/2 + 19}] 7 $fixedHeight] test textDisp-24.23 {TkTextCharLayoutProc, word breaks} {textfonts} { .t configure -wrap word .t delete 1.0 end - frame .t.f -width 30 -height 20 -bg black + frame .t.f -width 30 -height 20 -background black .t insert 1.0 "Sample text xxxxxxx yyyyyyy " .t insert end "zzzzzzz qqqqq rrrr ssss tt" .t window create end -window .t.f .t insert end "u vvvvv" .t bbox .t.f @@ -3423,20 +3423,20 @@ list [.tt bbox 1.1] [.tt bbox 2.2] [.tt bbox 3.3] } -cleanup { destroy .tt } -result [list [list 38 5 7 $fixedHeight] [list 38 20 7 $fixedHeight] [list 38 35 7 $fixedHeight]] -.t configure -width 40 -bd 0 -relief flat -highlightthickness 0 -padx 0 \ +.t configure -width 40 -borderwidth 0 -relief flat -highlightthickness 0 -padx 0 \ -tabs 100 updateText test textDisp-25.1 {CharBboxProc procedure, check tab width} {textfonts} { .t delete 1.0 end .t insert 1.0 abc\td\tfgh list [.t bbox 1.3] [.t bbox 1.5] [.t bbox 1.6] } [list [list 21 1 79 $fixedHeight] [list 107 1 93 $fixedHeight] [list 200 1 7 $fixedHeight]] -.t configure -width 40 -bd 0 -relief flat -highlightthickness 0 -padx 0 \ +.t configure -width 40 -borderwidth 0 -relief flat -highlightthickness 0 -padx 0 \ -tabs {} updateText test textDisp-26.1 {AdjustForTab procedure, no tabs} {textfonts} { .t delete 1.0 end .t insert 1.0 a\tbcdefghij\tc\td @@ -3602,11 +3602,11 @@ [lindex [.t bbox 3.11] 0] [lindex [.t bbox 3.24] 0]] .t configure -tabstyle tabular set res } [list 112 56 112 56] -.t configure -width 20 -bd 2 -highlightthickness 2 -relief sunken -tabs {} \ +.t configure -width 20 -borderwidth 2 -highlightthickness 2 -relief sunken -tabs {} \ -wrap char updateText test textDisp-27.1 {SizeOfTab procedure, old-style tabs} {textfonts} { .t delete 1.0 end .t insert 1.0 a\tbcdefghij\tc\td @@ -3781,11 +3781,11 @@ -wrap char -xscrollcommand ".t2.s set" pack .t2.t -side top scrollbar .t2.s -orient horizontal -command ".t2.t xview" pack .t2.s -side bottom -fill x .t2.t insert end 123 - frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised + frame .t2.t.f -width 300 -height 50 -borderwidth 2 -relief raised .t2.t window create 1.1 -window .t2.t.f updateText list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] } [list [list 0.0 [expr {20.0*$fixedWidth/300}]] 300x50+[expr {$twbw + $twht + 1}]+[expr {$twbw + $twht + $fixedHeight + 1}] [list [expr {$twbw + $twht + $fixedWidth + 1}] [expr {$twbw + $twht + $fixedHeight + 50 + 1}] $fixedWidth $fixedHeight]] test textDisp-29.2 {miscellaneous: lines wrap but are still too long} {textfonts} { @@ -3796,11 +3796,11 @@ -wrap char -xscrollcommand ".t2.s set" pack .t2.t -side top scrollbar .t2.s -orient horizontal -command ".t2.t xview" pack .t2.s -side bottom -fill x .t2.t insert end 123 - frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised + frame .t2.t.f -width 300 -height 50 -borderwidth 2 -relief raised .t2.t window create 1.1 -window .t2.t.f updateText .t2.t xview scroll 1 unit updateText list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] @@ -3829,11 +3829,11 @@ -wrap char -xscrollcommand ".t2.s set" pack .t2.t -side top scrollbar .t2.s -orient horizontal -command ".t2.t xview" pack .t2.s -side bottom -fill x .t2.t insert end 123 - frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised + frame .t2.t.f -width 300 -height 50 -borderwidth 2 -relief raised .t2.t window create 1.1 -window .t2.t.f updateText .t2.t xview scroll 2 unit updateText list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] @@ -3846,11 +3846,11 @@ -wrap char -xscrollcommand ".t2.s set" pack .t2.t -side top scrollbar .t2.s -orient horizontal -command ".t2.t xview" pack .t2.s -side bottom -fill x .t2.t insert end 123 - frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised + frame .t2.t.f -width 300 -height 50 -borderwidth 2 -relief raised .t2.t window create 1.1 -window .t2.t.f updateText .t2.t xview scroll 7 pixels updateText list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] @@ -3863,11 +3863,11 @@ -wrap char -xscrollcommand ".t2.s set" pack .t2.t -side top scrollbar .t2.s -orient horizontal -command ".t2.t xview" pack .t2.s -side bottom -fill x .t2.t insert end 123 - frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised + frame .t2.t.f -width 300 -height 50 -borderwidth 2 -relief raised .t2.t window create 1.1 -window .t2.t.f updateText .t2.t xview scroll 17 pixels updateText list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] @@ -3876,11 +3876,11 @@ catch {destroy .t2} toplevel .t2 wm geometry .t2 121x141+200+200 text .t2.t -width 5 -height 5 -font {Arial 10} \ -wrap none -xscrollcommand ".t2.s set" \ - -bd 2 -highlightthickness 0 -padx 1 + -borderwidth 2 -highlightthickness 0 -padx 1 .t2.t insert end "WWWWWWWWWWWWi" scrollbar .t2.s -orient horizontal -command ".t2.t xview" grid .t2.t -row 0 -column 0 -sticky nsew grid .t2.s -row 1 -column 0 -sticky ew grid columnconfigure .t2 0 -weight 1 @@ -3908,11 +3908,11 @@ -wrap char -xscrollcommand ".t2.s set" pack .t2.t -side top scrollbar .t2.s -orient horizontal -command ".t2.t xview" pack .t2.s -side bottom -fill x .t2.t insert end 123 - frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised + frame .t2.t.f -width 300 -height 50 -borderwidth 2 -relief raised .t2.t window create 1.1 -window .t2.t.f updateText .t2.t xview scroll 200 units updateText list [.t2.t xview] [winfo geom .t2.t.f] [.t2.t bbox 1.3] @@ -4084,11 +4084,11 @@ .tt tag add HIDE 0.0 end updateText destroy .tt } {} test textDisp-32.2 {elide and tags} { - pack [text .tt -height 30 -width 100 -bd 0 \ + pack [text .tt -height 30 -width 100 -borderwidth 0 \ -highlightthickness 0 -padx 0] .tt insert end \ {test text using tags 1 and 3 } \ {testtag1 testtag3} \ {[this bit here uses tags 2 and 3]} \ Index: tests/textImage.test ================================================================== --- tests/textImage.test +++ tests/textImage.test @@ -20,101 +20,101 @@ destroy .t test textImage-1.1 {basic argument checking} -setup { destroy .t } -body { - text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image } -cleanup { destroy .t } -returnCodes error -result {wrong # args: should be ".t image option ?arg ...?"} test textImage-1.2 {basic argument checking} -setup { destroy .t } -body { - text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image c } -cleanup { destroy .t } -returnCodes error -result {ambiguous option "c": must be cget, configure, create, or names} test textImage-1.3 {cget argument checking} -setup { destroy .t } -body { - text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image cget } -cleanup { destroy .t } -returnCodes error -result {wrong # args: should be ".t image cget index option"} test textImage-1.4 {cget argument checking} -setup { destroy .t } -body { - text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image cget blurf -flurp } -cleanup { destroy .t } -returnCodes error -result {bad text index "blurf"} test textImage-1.5 {cget argument checking} -setup { destroy .t } -body { - text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image cget 1.1 -flurp } -cleanup { destroy .t } -returnCodes error -result {no embedded image at index "1.1"} test textImage-1.6 {configure argument checking} -setup { destroy .t } -body { - text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image configure } -cleanup { destroy .t } -returnCodes error -result {wrong # args: should be ".t image configure index ?-option value ...?"} test textImage-1.7 {configure argument checking} -setup { destroy .t } -body { - text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image configure blurf } -cleanup { destroy .t } -returnCodes error -result {bad text index "blurf"} test textImage-1.8 {configure argument checking} -setup { destroy .t } -body { - text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image configure 1.1 } -cleanup { destroy .t } -returnCodes error -result {no embedded image at index "1.1"} test textImage-1.9 {create argument checking} -setup { destroy .t } -body { - text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image create } -cleanup { destroy .t } -returnCodes error -result {wrong # args: should be ".t image create index ?-option value ...?"} test textImage-1.10 {create argument checking} -setup { destroy .t } -body { - text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image create blurf } -cleanup { destroy .t } -returnCodes error -result {bad text index "blurf"} @@ -124,11 +124,11 @@ } -body { catch { 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 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image create 1000.1000 -image small } -cleanup { destroy .t image delete small @@ -135,11 +135,11 @@ } -returnCodes ok -result {small} test textImage-1.12 {names argument checking} -setup { destroy .t } -body { - text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image names dates places } -cleanup { destroy .t } -returnCodes error -result {wrong # args: should be ".t image names"} @@ -151,11 +151,11 @@ } -body { catch { 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 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t lappend result [.t image names] .t image create insert -image small lappend result [.t image names] .t image create insert -image small @@ -168,11 +168,11 @@ } -result {{} small {small small#1} {little small small#1}} test textImage-1.14 {basic argument checking} -setup { destroy .t } -body { - text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image huh } -cleanup { destroy .t } -returnCodes error -result {bad option "huh": must be cget, configure, create, or names} @@ -182,11 +182,11 @@ } -body { catch { 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 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image create end -image small -align wrong } -cleanup { destroy .t image delete small @@ -197,11 +197,11 @@ } -body { catch { 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 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image create end -image small .t image configure small } -cleanup { destroy .t @@ -214,11 +214,11 @@ } -body { catch { 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 + text .t -font test_font -borderwidth 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] } @@ -236,11 +236,11 @@ 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 + text .t -font test_font -borderwidth 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 } @@ -256,11 +256,11 @@ } -body { catch { 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 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image create end -image small .t image create end -image small -name small .t image create end -image small -name small#6342 .t image create end -image small -name small @@ -275,11 +275,11 @@ } -body { catch { 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 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t debug 1 .t insert end front .t image create end -image small .t insert end back @@ -298,11 +298,11 @@ } -body { catch { 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 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image create end -image vary -align top update lappend result base:[.t bbox vary] foreach i {10 20 40} { @@ -322,11 +322,11 @@ } -body { catch { 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 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image create end -name test update foreach {x1 y1 w1 h1} [.t bbox test] {} lappend result [list $x1 $w1 $h1] @@ -350,11 +350,11 @@ 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 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image create end -image large .t image create end -image small .t insert end test update @@ -379,11 +379,11 @@ 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 + text .t -font test_font2 -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image create end -image large .t image create end -image small -align baseline .t insert end test # Sizes larger than 25 can be too big and lead to a negative 'norm', @@ -417,11 +417,11 @@ 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 + text .t -font test_font -borderwidth 0 -highlightthickness 0 -padx 0 -pady 0 pack .t .t image create end -image large .t image create end -image small -padx 5 -pady 10 .t insert end test update Index: tests/textTag.test ================================================================== --- tests/textTag.test +++ tests/textTag.test @@ -64,19 +64,19 @@ .t tag configure x -background non-existent } -cleanup { .t tag configure x -background [lindex [.t tag configure x -background] 3] } -returnCodes error -result {unknown color name "non-existent"} test textTag-1.3 {tag configuration options} -body { - .t tag configure x -bgstipple gray50 - .t tag cget x -bgstipple + .t tag configure x -backgroundstipple gray50 + .t tag cget x -backgroundstipple } -cleanup { - .t tag configure x -bgstipple [lindex [.t tag configure x -bgstipple] 3] + .t tag configure x -backgroundstipple [lindex [.t tag configure x -backgroundstipple] 3] } -result {gray50} test textTag-1.4 {configuration options} -body { - .t tag configure x -bgstipple badStipple + .t tag configure x -backgroundstipple badStipple } -cleanup { - .t tag configure x -bgstipple [lindex [.t tag configure x -bgstipple] 3] + .t tag configure x -backgroundstipple [lindex [.t tag configure x -backgroundstipple] 3] } -returnCodes error -result {bitmap "badStipple" not defined} test textTag-1.5 {tag configuration options} -body { .t tag configure x -borderwidth 2 .t tag cget x -borderwidth } -cleanup { @@ -86,36 +86,36 @@ .t tag configure x -borderwidth 46q } -cleanup { .t tag configure x -borderwidth [lindex [.t tag configure x -borderwidth] 3] } -returnCodes error -result {bad screen distance "46q"} test textTag-1.7 {tag configuration options} -body { - .t tag configure x -fgstipple gray25 - .t tag cget x -fgstipple + .t tag configure x -stipple gray25 + .t tag cget x -stipple } -cleanup { - .t tag configure x -fgstipple [lindex [.t tag configure x -fgstipple] 3] + .t tag configure x -stipple [lindex [.t tag configure x -stipple] 3] } -result {gray25} test textTag-1.8 {configuration options} -body { - .t tag configure x -fgstipple bogus + .t tag configure x -stipple bogus } -cleanup { - .t tag configure x -fgstipple [lindex [.t tag configure x -fgstipple] 3] + .t tag configure x -stipple [lindex [.t tag configure x -stipple] 3] } -returnCodes error -result {bitmap "bogus" not defined} test textTag-1.9 {tag configuration options} -body { .t tag configure x -font fixed .t tag cget x -font } -cleanup { .t tag configure x -font [lindex [.t tag configure x -font] 3] } -result {fixed} test textTag-1.10 {tag configuration options} -body { - .t tag configure x -foreground #001122 - .t tag cget x -foreground + .t tag configure x -color #001122 + .t tag cget x -color } -cleanup { - .t tag configure x -foreground [lindex [.t tag configure x -foreground] 3] + .t tag configure x -color [lindex [.t tag configure x -color] 3] } -result {#001122} test textTag-1.11 {configuration options} -body { - .t tag configure x -foreground {silly color} + .t tag configure x -color {silly color} } -cleanup { - .t tag configure x -foreground [lindex [.t tag configure x -foreground] 3] + .t tag configure x -color [lindex [.t tag configure x -color] 3] } -returnCodes error -result {unknown color name "silly color"} test textTag-1.12 {tag configuration options} -body { .t tag configure x -justify left .t tag cget x -justify } -cleanup { @@ -180,19 +180,19 @@ .t tag configure x -overstrike stupid } -cleanup { .t tag configure x -overstrike [lindex [.t tag configure x -overstrike] 3] } -returnCodes error -result {expected boolean value but got "stupid"} test textTag-1.21a {tag configuration options} -body { - .t tag configure x -overstrikefg red - .t tag cget x -overstrikefg + .t tag configure x -overstrikecolor red + .t tag cget x -overstrikecolor } -cleanup { - .t tag configure x -overstrikefg [lindex [.t tag configure x -overstrikefg] 3] + .t tag configure x -overstrikecolor [lindex [.t tag configure x -overstrikecolor] 3] } -result {red} test textTag-1.21b {configuration options} -body { - .t tag configure x -overstrikefg stupid + .t tag configure x -overstrikecolor stupid } -cleanup { - .t tag configure x -overstrikefg [lindex [.t tag configure x -overstrikefg] 3] + .t tag configure x -overstrikecolor [lindex [.t tag configure x -overstrikecolor] 3] } -returnCodes error -result {unknown color name "stupid"} test textTag-1.22 {tag configuration options} -body { .t tag configure x -relief raised .t tag cget x -relief } -cleanup { @@ -235,19 +235,19 @@ .t tag configure x -selectbackground non-existent } -cleanup { .t tag configure x -selectbackground [lindex [.t tag configure x -selectbackground] 3] } -returnCodes error -result {unknown color name "non-existent"} test textTag-1.25e {tag configuration options} -body { - .t tag configure x -selectforeground #012345 - .t tag cget x -selectforeground + .t tag configure x -selectcolor #012345 + .t tag cget x -selectcolor } -cleanup { - .t tag configure x -selectforeground [lindex [.t tag configure x -selectforeground] 3] + .t tag configure x -selectcolor [lindex [.t tag configure x -selectcolor] 3] } -result {#012345} test textTag-1.25f {configuration options} -body { - .t tag configure x -selectforeground non-existent + .t tag configure x -selectcolor non-existent } -cleanup { - .t tag configure x -selectforeground [lindex [.t tag configure x -selectforeground] 3] + .t tag configure x -selectcolor [lindex [.t tag configure x -selectcolor] 3] } -returnCodes error -result {unknown color name "non-existent"} test textTag-1.26 {tag configuration options} -body { .t tag configure x -spacing1 10 .t tag cget x -spacing1 } -cleanup { @@ -301,19 +301,19 @@ .t tag configure x -underline stupid } -cleanup { .t tag configure x -underline [lindex [.t tag configure x -underline] 3] } -returnCodes error -result {expected boolean value but got "stupid"} test textTag-1.36 {tag configuration options} -body { - .t tag configure x -underlinefg red - .t tag cget x -underlinefg + .t tag configure x -underlinecolor red + .t tag cget x -underlinecolor } -cleanup { - .t tag configure x -underlinefg [lindex [.t tag configure x -underlinefg] 3] + .t tag configure x -underlinecolor [lindex [.t tag configure x -underlinecolor] 3] } -result {red} test textTag-1.37 {configuration options} -body { - .t tag configure x -underlinefg stupid + .t tag configure x -underlinecolor stupid } -cleanup { - .t tag configure x -underlinefg [lindex [.t tag configure x -underlinefg] 3] + .t tag configure x -underlinecolor [lindex [.t tag configure x -underlinecolor] 3] } -returnCodes error -result {unknown color name "stupid"} test textTag-2.1 {TkTextTagCmd - "add" option} -body { .t tag @@ -507,29 +507,29 @@ } -cleanup { .t tag delete x } -result {-underline {} {} {} yes} test textTag-5.4a {TkTextTagCmd - "configure" option} -body { .t tag delete x - .t tag configure x -underlinefg lightgreen - .t tag configure x -underlinefg + .t tag configure x -underlinecolor lightgreen + .t tag configure x -underlinecolor } -cleanup { .t tag delete x -} -result {-underlinefg {} {} {} lightgreen} +} -result {-underlinecolor {} {} {} lightgreen} test textTag-5.5 {TkTextTagCmd - "configure" option} -body { .t tag delete x .t tag configure x -overstrike on .t tag cget x -overstrike } -cleanup { .t tag delete x } -result {on} test textTag-5.5a {TkTextTagCmd - "configure" option} -body { .t tag delete x - .t tag configure x -overstrikefg lightgreen - .t tag configure x -overstrikefg + .t tag configure x -overstrikecolor lightgreen + .t tag configure x -overstrikecolor } -cleanup { .t tag delete x -} -result {-overstrikefg {} {} {} lightgreen} +} -result {-overstrikecolor {} {} {} lightgreen} test textTag-5.6 {TkTextTagCmd - "configure" option} -body { .t tag configure x -overstrike foo } -cleanup { .t tag delete x } -returnCodes error -result {expected boolean value but got "foo"} @@ -640,15 +640,15 @@ .t tag configure x -spacing1 4.2.3 } -cleanup { .t tag delete x } -returnCodes error -result {bad screen distance "4.2.3"} test textTag-5.21 {TkTextTagCmd - "configure" option} -body { - .t configure -selectborderwidth 2 -selectforeground blue \ + .t configure -selectborderwidth 2 -selectcolor blue \ -selectbackground black - .t tag configure sel -borderwidth 4 -foreground green -background yellow + .t tag configure sel -borderwidth 4 -color green -background yellow set x {} - foreach i {-selectborderwidth -selectforeground -selectbackground} { + foreach i {-selectborderwidth -selectcolor -selectbackground} { lappend x [lindex [.t configure $i] 4] } return $x } -result {4 green yellow} test textTag-5.22 {TkTextTagCmd - "configure" option} -body { @@ -679,29 +679,29 @@ lappend x [.t cget -selectbackground] return $x } -result {yellow blue red white} test textTag-5.24 {TkTextTagCmd - "configure" option} -body { set x {} - # when [.t tag cget sel -selectforeground] == "", mirroring happens between - # the text widget option -selectforeground - # and the tag option -foreground - .t tag configure sel -selectforeground {} - .t configure -selectforeground black - .t tag configure sel -foreground yellow - lappend x [.t cget -selectforeground] - .t tag configure sel -foreground orange - .t configure -selectforeground blue - lappend x [.t tag cget sel -foreground] - # when [.t tag cget sel -selectforeground] != "", mirroring happens between - # the text widget option -selectforeground - # and the tag option -selectforeground - .t tag configure sel -selectforeground green - .t configure -selectforeground red - lappend x [.t tag cget sel -selectforeground] - .t configure -selectforeground black - .t tag configure sel -selectforeground white - lappend x [.t cget -selectforeground] + # when [.t tag cget sel -selectcolor] == "", mirroring happens between + # the text widget option -selectcolor + # and the tag option -color + .t tag configure sel -selectcolor {} + .t configure -selectcolor black + .t tag configure sel -color yellow + lappend x [.t cget -selectcolor] + .t tag configure sel -color orange + .t configure -selectcolor blue + lappend x [.t tag cget sel -color] + # when [.t tag cget sel -selectcolor] != "", mirroring happens between + # the text widget option -selectcolor + # and the tag option -selectcolor + .t tag configure sel -selectcolor green + .t configure -selectcolor red + lappend x [.t tag cget sel -selectcolor] + .t configure -selectcolor black + .t tag configure sel -selectcolor white + lappend x [.t cget -selectcolor] return $x } -result {yellow blue red white} test textTag-6.1 {TkTextTagCmd - "delete" option} -body { .t tag delete @@ -711,11 +711,11 @@ } -returnCodes ok -result {} test textTag-6.3 {TkTextTagCmd - "delete" option} -setup { .t tag delete {*}[.t tag names] } -body { .t tag config x -background black - .t tag config y -foreground white + .t tag config y -color white .t tag config z -background black .t tag delete y z lsort [.t tag names] } -cleanup { .t tag delete x @@ -722,11 +722,11 @@ } -result {sel x} test textTag-6.4 {TkTextTagCmd - "delete" option} -setup { .t tag delete {*}[.t tag names] } -body { .t tag config x -background black - .t tag config y -foreground white + .t tag config y -color white .t tag config z -background black eval .t tag delete [.t tag names] .t tag names } -result {sel} test textTag-6.5 {TkTextTagCmd - "delete" option} -body { Index: tests/textWind.test ================================================================== --- tests/textWind.test +++ tests/textWind.test @@ -21,11 +21,11 @@ set fixedAscent [font metrics $fixedFont -ascent] # Widget used in almost all tests set tWidth 30 set tHeight 6 -text .t -width $tWidth -height $tHeight -bd 2 -highlightthickness 2 \ +text .t -width $tWidth -height $tHeight -borderwidth 2 -highlightthickness 2 \ -font $fixedFont pack .t -expand 1 -fill both update .t debug on @@ -58,11 +58,11 @@ test textWind-1.1 {basic tests of options} -setup { .t delete 1.0 end } -body { .t insert end "This is the first line" .t insert end "\nAnd this is a second line, which wraps around" - frame .f -width 3 -height 3 -bg $color + frame .f -width 3 -height 3 -background $color .t window create 2.2 -window .f update list [winfo ismapped .f] [winfo geom .f] [.t bbox .f] \ [.t window configure .f -window] } -result [list \ @@ -74,11 +74,11 @@ test textWind-1.2 {basic tests of options} -setup { .t delete 1.0 end } -body { .t insert end "This is the first line" .t insert end "\nAnd this is a second line, which wraps around" - frame .f -width 3 -height 3 -bg $color + frame .f -width 3 -height 3 -background $color .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] } -result [list \ @@ -100,11 +100,11 @@ .t delete 1.0 end } -body { .t insert end "This is the first line" .t insert end "\nAnd this is a second line, which wraps around" # the window .f should be wider than the fixed width - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 2.2 -window .f -padx 5 update list [winfo geom .f] [.t window configure .f -padx] [.t bbox 2.3] } -result [list \ 10x20+[expr {$padx+2*$fixedWidth+5}]+[expr {$pady+$fixedHeight}] \ @@ -114,11 +114,11 @@ test textWind-1.5 {basic tests of options} -setup { .t delete 1.0 end } -body { .t insert end "This is the first line" .t insert end "\nAnd this is a second line, which wraps around" - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 2.2 -window .f -pady 4 update list [winfo geom .f] [.t window configure .f -pady] [.t bbox 2.31] } -result [list \ 10x20+[expr {$padx+2*$fixedWidth}]+[expr {$pady+$fixedHeight+4}] \ @@ -128,11 +128,11 @@ test textWind-1.6 {basic tests of options} -setup { .t delete 1.0 end } -body { .t insert end "This is the first line" .t insert end "\nAnd this is a second line, which wraps around" - frame .f -width 5 -height 5 -bg $color + frame .f -width 5 -height 5 -background $color .t window create 2.2 -window .f -stretch 1 update list [winfo geom .f] [.t window configure .f -stretch] } -result [list \ 5x$fixedHeight+[expr {$padx+2*$fixedWidth}]+[expr {$pady+$fixedHeight}] \ @@ -157,20 +157,20 @@ .t window cget 1.2 -padx } -returnCodes error -result {no embedded window at index "1.2"} test textWind-2.6 {TkTextWindowCmd procedure, "cget" option} -setup { destroy .f } -body { - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color .t window create 1.3 -window .f -padx 1 -pady 2 .t window cget .f -bogus } -cleanup { destroy .f } -returnCodes error -result {unknown option "-bogus"} test textWind-2.7 {TkTextWindowCmd procedure, "cget" option} -setup { destroy .f } -body { - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color .t window create 1.3 -window .f -padx 1 -pady 2 .t window cget .f -pady } -cleanup { destroy .f } -returnCodes ok -result 2 @@ -185,49 +185,49 @@ .t window configure 1.0 } -returnCodes error -result {no embedded window at index "1.0"} test textWind-2.11 {TkTextWindowCmd procedure} -setup { # I kept this as it "influenced" the test case in previous releases destroy .f - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color .t window create 1.3 -window .f -padx 1 -pady 2 .t delete 1.0 end } -body { .t insert end "This is the first line" .t insert end "\nAnd this is a second line, which wraps around" - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color .t window create 2.2 -window .f -align baseline -padx 1 -pady 2 -create foo update .t window configure .f } -cleanup { destroy .f } -result {{-align {} {} center baseline} {-create {} {} {} foo} {-padx {} {} 0 1} {-pady {} {} 0 2} {-stretch {} {} 0 0} {-window {} {} {} .f}} test textWind-2.12 {TkTextWindowCmd procedure} -setup { # I kept this as it "influenced" the test case in previous releases destroy .f - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color .t window create 2.2 -window .f -align baseline -padx 1 -pady 2 -create foo .t delete 1.0 end } -body { .t insert end "This is the first line" .t insert end "\nAnd this is a second line, which wraps around" - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color .t window create 2.2 -window .f -align baseline -padx 1 -pady 2 -create foo update list [.t window configure .f -padx 33] [.t window configure .f -padx] } -cleanup { destroy .f } -result {{} {-padx {} {} 0 33}} test textWind-2.13 {TkTextWindowCmd procedure} -setup { # I kept this as it "influenced" the test case in previous releases destroy .f - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color .t window create 2.2 -window .f -align baseline -padx 1 -pady 2 -create foo .t delete 1.0 end } -body { .t insert end "This is the first line" .t insert end "\nAnd this is a second line, which wraps around" - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color .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] } -cleanup { @@ -244,16 +244,16 @@ .t window create gorp } -returnCodes error -result {bad text index "gorp"} test textWind-2.16 {TkTextWindowCmd procedure, don't insert after end} -setup { # I kept this as it "influenced" the test case in previous releases destroy .f - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color .t window create 2.2 -window .f -align baseline -padx 1 -pady 2 .t delete 1.0 end } -body { .t insert end "Line 1\nLine 2" - frame .f -width 20 -height 10 -bg $color + frame .f -width 20 -height 10 -background $color .t window create end -window .f .t index .f } -result {2.6} test textWind-2.17 {TkTextWindowCmd procedure} -setup { .t delete 1.0 end @@ -261,40 +261,40 @@ 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 {} {} {} {}}}} test textWind-2.18 {TkTextWindowCmd procedure} -setup { # I kept this as it "influenced" the test case in previous releases destroy .f - frame .f -width 20 -height 10 -bg $color + frame .f -width 20 -height 10 -background $color .t window create end -window .f .t delete 1.0 end } -body { - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color .t window create 1.0 -window .f -gorp stupid } -returnCodes error -result {unknown option "-gorp"} test textWind-2.19 {TkTextWindowCmd procedure} -setup { # I kept this as it "influenced" the test case in previous releases destroy .f - frame .f -width 20 -height 10 -bg $color + frame .f -width 20 -height 10 -background $color .t window create end -window .f .t delete 1.0 end } -body { - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color catch {.t window create 1.0 -window .f -gorp stupid} list [winfo exists .f] [.t index 1.end] [catch {.t index .f}] } -result {0 1.0 1} test textWind-2.20 {TkTextWindowCmd procedure} -setup { .t delete 1.0 end destroy .f } -body { - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color .t window create 1.0 -gorp -window .f stupid } -returnCodes error -result {unknown option "-gorp"} test textWind-2.21 {TkTextWindowCmd procedure} -setup { .t delete 1.0 end destroy .f } -body { - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color catch {.t window create 1.0 -gorp -window .f stupid} list [winfo exists .f] [.t index 1.end] [catch {.t index .f}] } -result {1 1.0 1} test textWind-2.22 {TkTextWindowCmd procedure} -setup { .t delete 1.0 end @@ -327,11 +327,11 @@ test textWind-3.1 {EmbWinConfigure procedure} -setup { destroy .f } -body { - frame .f -width 10 -height 6 -bg $color + frame .f -width 10 -height 6 -background $color .t window create 1.0 -window .f .t window configure 1.0 -foo bar } -cleanup { destroy .f } -returnCodes error -result {unknown option "-foo"} @@ -338,11 +338,11 @@ test textWind-3.2 {EmbWinConfigure procedure} -setup { destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 1.3 -window .f update .t window configure 1.3 -window {} update .t index .f @@ -352,11 +352,11 @@ test textWind-3.3 {EmbWinConfigure procedure} -setup { destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 1.3 -window .f update .t window configure 1.3 -window {} update catch {.t index .f} @@ -368,11 +368,11 @@ test textWind-3.4 {EmbWinConfigure procedure} -setup { destroy .t.f } -body { .t insert 1.0 "Some sample text" - frame .t.f -width 10 -height 20 -bg $color + frame .t.f -width 10 -height 20 -background $color .t window create 1.3 -window .t.f update .t window configure 1.3 -window {} update .t index .t.f @@ -382,11 +382,11 @@ test textWind-3.5 {EmbWinConfigure procedure} -setup { destroy .t.f } -body { .t insert 1.0 "Some sample text" - frame .t.f -width 10 -height 20 -bg $color + frame .t.f -width 10 -height 20 -background $color .t window create 1.3 -window .t.f update .t window configure 1.3 -window {} update catch {.t index .t.f} @@ -398,11 +398,11 @@ test textWind-3.6 {EmbWinConfigure procedure} -setup { destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 1.3 update .t window configure 1.3 -window .f update list [catch {.t index .f} msg] $msg [winfo ismapped .f] [.t bbox 1.4] @@ -414,31 +414,31 @@ test textWind-3.7 {EmbWinConfigure procedure} -setup { destroy .f } -body { .t insert 1.0 "Some sample text" frame .f - frame .f.f -width 15 -height 20 -bg $color + frame .f.f -width 15 -height 20 -background $color pack .f.f .t window create 1.3 -window .f.f } -cleanup { destroy .f } -returnCodes error -result {can't embed .f.f in .t} test textWind-3.8 {EmbWinConfigure procedure} -setup { destroy .t2 } -body { .t insert 1.0 "Some sample text" - toplevel .t2 -width 20 -height 10 -bg $color + toplevel .t2 -width 20 -height 10 -background $color .t window create 1.3 .t window configure 1.3 -window .t2 } -cleanup { destroy .t2 } -returnCodes error -result {can't embed .t2 in .t} test textWind-3.9 {EmbWinConfigure procedure} -setup { destroy .t2 } -body { .t insert 1.0 "Some sample text" - toplevel .t2 -width 20 -height 10 -bg $color + toplevel .t2 -width 20 -height 10 -background $color .t window create 1.3 catch {.t window configure 1.3 -window .t2} .t window configure 1.3 -window } -cleanup { destroy .t2 @@ -463,11 +463,11 @@ .t index .t.b } -result {1.6} .t delete 1.0 end -frame .f -width 10 -height 20 -bg $color +frame .f -width 10 -height 20 -background $color .t window create 1.0 -window .f test textWind-4.1 {AlignParseProc and AlignPrintProc procedures} -body { .t window configure 1.0 -align baseline .t window configure 1.0 -align } -result {-align {} {} center baseline} @@ -496,11 +496,11 @@ test textWind-5.1 {EmbWinStructureProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 1.2 -window .f update destroy .f .t index .f } -returnCodes error -result {bad text index ".f"} @@ -508,11 +508,11 @@ test textWind-5.2 {EmbWinStructureProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 1.2 -window .f update destroy .f catch {.t index .f} list [.t bbox 1.2] [.t bbox 1.3] @@ -523,11 +523,11 @@ test textWind-5.3 {EmbWinStructureProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 1.2 -align bottom .t window configure 1.2 -window .f update destroy .f .t index .f @@ -535,11 +535,11 @@ test textWind-5.4 {EmbWinStructureProc procedure} -setup { .t delete 1.0 end } -body { .t insert 1.0 "Some sample text" - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 1.2 -align bottom .t window configure 1.2 -window .f update destroy .f catch {.t index .f} @@ -551,13 +551,13 @@ test textWind-5.5 {EmbWinStructureProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - .t window create 1.2 -create {frame .f -width 10 -height 20 -bg $color} + .t window create 1.2 -create {frame .f -width 10 -height 20 -background $color} update - .t window configure 1.2 -create {frame .f -width 20 -height 10 -bg $color} + .t window configure 1.2 -create {frame .f -width 20 -height 10 -background $color} destroy .f update list [catch {.t index .f} msg] $msg [.t bbox 1.2] [.t bbox 1.3] } -result [list 0 1.2 \ [list [expr {$padx+2*$fixedWidth}] [expr {$pady+(($fixedHeight-10)/2)}] 20 10] \ @@ -568,11 +568,11 @@ .t delete 1.0 end destroy .f set result {} } -body { .t insert 1.0 "Some sample text" - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 1.2 -window .f lappend result [.t bbox 1.2] [.t bbox 1.3] .f configure -width 25 -height 30 lappend result [.t bbox 1.2] [.t bbox 1.3] } -cleanup { @@ -587,11 +587,11 @@ test textWind-7.1 {EmbWinLostContentProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 1.2 -window .f update place .f -in .t -x 100 -y 50 update list [winfo geom .f] [.t bbox 1.2] @@ -604,11 +604,11 @@ test textWind-7.2 {EmbWinLostContentProc procedure} -setup { .t delete 1.0 end destroy .t.f } -body { .t insert 1.0 "Some sample text" - frame .t.f -width 10 -height 20 -bg $color + frame .t.f -width 10 -height 20 -background $color .t window create 1.2 -window .t.f update place .t.f -x 100 -y 50 update list [winfo geom .t.f] [.t bbox 1.2] @@ -621,11 +621,11 @@ test textWind-8.1 {EmbWinDeleteProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 1.2 -window .f bind .f {set x destroyed} set x XXX .t delete 1.2 list $x [.t bbox 1.2] [.t bbox 1.3] [winfo exists .f] @@ -637,11 +637,11 @@ test textWind-8.2 {EmbWinDeleteProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 1.2 -window .f bind .f {set x destroyed} set x XXX .t delete 1.2 .t index .f @@ -651,11 +651,11 @@ test textWind-9.1 {EmbWinCleanupProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text\nA second line." - frame .f -width 10 -height 20 -bg $color + frame .f -width 10 -height 20 -background $color .t window create 2.3 -window .f .t delete 1.5 2.1 .t index .f } -cleanup { destroy .f @@ -666,11 +666,11 @@ .t delete 1.0 end destroy .f } -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 -background $color } update list [winfo exists .f] [winfo width .f] [winfo height .f] [.t index .f] } -cleanup { destroy .f @@ -727,11 +727,11 @@ .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 + frame .t.f.f -width 10 -height 20 -background $color } } set count 0 while {([llength $msg] < 2) && ($count < 100)} { update @@ -760,11 +760,11 @@ } -body { .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.f -width 10 -height 20 -background $color } update idletasks lappend msg [winfo exists .t.f.f] } -cleanup { destroy .t.f @@ -860,11 +860,11 @@ .t delete 1.0 end destroy .f } -body { .t configure -wrap char .t insert 1.0 "Some sample text" - frame .f -width [expr {($tWidth-12)*$fixedWidth-1}] -height 20 -bg $color -bd 2 -relief raised + frame .f -width [expr {($tWidth-12)*$fixedWidth-1}] -height 20 -background $color -borderwidth 2 -relief raised .t window create 1.12 -window .f list [.t bbox .f] [.t bbox 1.13] } -cleanup { destroy .f } -result [list \ @@ -875,11 +875,11 @@ .t delete 1.0 end destroy .f } -body { .t configure -wrap char .t insert 1.0 "Some sample text" - frame .f -width [expr {($tWidth-12)*$fixedWidth}] -height 20 -bg $color -bd 2 -relief raised + frame .f -width [expr {($tWidth-12)*$fixedWidth}] -height 20 -background $color -borderwidth 2 -relief raised .t window create 1.12 -window .f update list [.t bbox .f] [.t bbox 1.13] } -cleanup { destroy .f @@ -891,11 +891,11 @@ .t delete 1.0 end destroy .f } -body { .t configure -wrap char .t insert 1.0 "Some sample text" - frame .f -width [expr {($tWidth-12)*$fixedWidth+1}] -height 20 -bg $color -bd 2 -relief raised + frame .f -width [expr {($tWidth-12)*$fixedWidth+1}] -height 20 -background $color -borderwidth 2 -relief raised .t window create 1.12 -window .f update list [.t bbox .f] [.t bbox 1.13] } -cleanup { destroy .f @@ -907,11 +907,11 @@ .t delete 1.0 end destroy .f } -body { .t configure -wrap none .t insert 1.0 "Some sample text" - frame .f -width [expr {($tWidth-12)*$fixedWidth+5}] -height 20 -bg $color -bd 2 -relief raised + frame .f -width [expr {($tWidth-12)*$fixedWidth+5}] -height 20 -background $color -borderwidth 2 -relief raised .t window create 1.12 -window .f update list [.t bbox .f] [.t bbox 1.13] } -cleanup { destroy .f @@ -923,11 +923,11 @@ .t delete 1.0 end destroy .f } -body { .t configure -wrap none .t insert 1.0 "Some sample text" - frame .f -width [expr {($tWidth-12)*$fixedWidth+5}] -height 220 -bg $color -bd 2 -relief raised + frame .f -width [expr {($tWidth-12)*$fixedWidth+5}] -height 220 -background $color -borderwidth 2 -relief raised .t window create 1.12 -window .f update list [.t bbox .f] [.t bbox 1.13] } -cleanup { destroy .f @@ -939,11 +939,11 @@ .t delete 1.0 end destroy .f } -body { .t configure -wrap char .t insert 1.0 "Some sample text" - frame .f -width 250 -height 220 -bg $color -bd 2 -relief raised + frame .f -width 250 -height 220 -background $color -borderwidth 2 -relief raised .t window create 1.12 -window .f update list [.t bbox .f] [.t bbox 1.13] } -cleanup { destroy .f @@ -960,11 +960,11 @@ update } -body { .t insert 1.0 "Some sample text" pack forget .t place .t -x 30 -y 50 - frame .f -width 30 -height 20 -bg $color + frame .f -width 30 -height 20 -background $color .t window create 1.12 -window .f update ; after 100 ; update winfo geom .f } -cleanup { destroy .f @@ -980,11 +980,11 @@ update } -body { .t insert 1.0 "Some sample text" pack forget .t place .t -x 30 -y 50 - frame .t.f -width 30 -height 20 -bg $color + frame .t.f -width 30 -height 20 -background $color .t window create 1.12 -window .t.f update ; after 100 ; update winfo geom .t.f } -cleanup { destroy .t.f @@ -999,11 +999,11 @@ pack .t # Make sure the Text is mapped before we start update } -body { .t insert 1.0 "Some sample text" - frame .f -width 30 -height 20 -bg $color + frame .f -width 30 -height 20 -background $color .t window create 1.12 -window .f update bind .f {set x ".f configured"} set x {no configures} .t delete 1.0 @@ -1020,14 +1020,14 @@ .t delete 1.0 end destroy .f .f2 } -body { .t insert 1.0 "xyzzy\nFirst window here: " .t configure -wrap none - frame .f -width 30 -height 20 -bg $color + frame .f -width 30 -height 20 -background $color .t window create end -window .f .t insert end " and second here: " - frame .f2 -width 40 -height 10 -bg $color + frame .f2 -width 40 -height 10 -background $color .t window create end -window .f2 .t insert end " with junk after it." .t xview moveto 0 .t xview scroll 5 units update @@ -1043,14 +1043,14 @@ .t delete 1.0 end destroy .f .f2 } -body { .t insert 1.0 "xyzzy\nFirst window here: " .t configure -wrap none - frame .f -width 30 -height 20 -bg $color + frame .f -width 30 -height 20 -background $color .t window create end -window .f .t insert end " and second here: " - frame .f2 -width 40 -height 10 -bg $color + frame .f2 -width 40 -height 10 -background $color .t window create end -window .f2 .t insert end " with junk after it." update .t xview moveto 0 .t xview scroll 25 units @@ -1066,11 +1066,11 @@ test textWind-12.1 {EmbWinUndisplayProc procedure, mapping/unmapping} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 30 -height 20 -bg $color + frame .f -width 30 -height 20 -background $color .t window create 1.2 -window .f bind .f {lappend x mapped} bind .f {lappend x unmapped} set x created update @@ -1095,11 +1095,11 @@ test textWind-13.1 {EmbWinBboxProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 5 -height 5 -bg $color + frame .f -width 5 -height 5 -background $color .t window create 1.2 -window .f -align top -padx 2 -pady 1 update list [winfo geom .f] [.t bbox .f] } -cleanup { destroy .f @@ -1110,11 +1110,11 @@ test textWind-13.2 {EmbWinBboxProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 5 -height 5 -bg $color + frame .f -width 5 -height 5 -background $color .t window create 1.2 -window .f -align center -padx 2 -pady 1 update list [winfo geom .f] [.t bbox .f] } -cleanup { destroy .f @@ -1125,11 +1125,11 @@ test textWind-13.3 {EmbWinBboxProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 5 -height 5 -bg $color + frame .f -width 5 -height 5 -background $color .t window create 1.2 -window .f -align baseline -padx 2 -pady 1 update list [winfo geom .f] [.t bbox .f] } -cleanup { destroy .f @@ -1140,11 +1140,11 @@ test textWind-13.4 {EmbWinBboxProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 5 -height 5 -bg $color + frame .f -width 5 -height 5 -background $color .t window create 1.2 -window .f -align bottom -padx 2 -pady 1 update list [winfo geom .f] [.t bbox .f] } -cleanup { destroy .f @@ -1155,11 +1155,11 @@ test textWind-13.5 {EmbWinBboxProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 5 -height 5 -bg $color + frame .f -width 5 -height 5 -background $color .t window create 1.2 -window .f -align top -padx 2 -pady 1 -stretch 1 update list [winfo geom .f] [.t bbox .f] } -cleanup { destroy .f @@ -1170,11 +1170,11 @@ test textWind-13.6 {EmbWinBboxProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 5 -height 5 -bg $color + frame .f -width 5 -height 5 -background $color .t window create 1.2 -window .f -align center -padx 2 -pady 1 -stretch 1 update list [winfo geom .f] [.t bbox .f] } -cleanup { destroy .f @@ -1185,11 +1185,11 @@ test textWind-13.7 {EmbWinBboxProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 5 -height 5 -bg $color + frame .f -width 5 -height 5 -background $color .t window create 1.2 -window .f -align baseline -padx 2 -pady 1 -stretch 1 update list [winfo geom .f] [.t bbox .f] } -cleanup { destroy .f @@ -1200,11 +1200,11 @@ test textWind-13.8 {EmbWinBboxProc procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 5 -height 5 -bg $color + frame .f -width 5 -height 5 -background $color .t window create 1.2 -window .f -align bottom -padx 2 -pady 1 -stretch 1 update list [winfo geom .f] [.t bbox .f] } -cleanup { destroy .f @@ -1217,11 +1217,11 @@ destroy .f } -body { .t configure -spacing1 5 -spacing3 2 .t delete 1.0 end .t insert 1.0 "Some sample text" - frame .f -width 5 -height 5 -bg $color + frame .f -width 5 -height 5 -background $color .t window create 1.2 -window .f -align center -padx 2 -pady 1 update list [winfo geom .f] [.t bbox .f] } -cleanup { .t configure -spacing1 0 -spacing3 0 @@ -1234,11 +1234,11 @@ test textWind-14.1 {EmbWinDelayedUnmap procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 30 -height 20 -bg $color + frame .f -width 30 -height 20 -background $color .t window create 1.2 -window .f update bind .f {lappend x unmapped} set x modified .t insert 1.0 x @@ -1254,11 +1254,11 @@ test textWind-14.2 {EmbWinDelayedUnmap procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text" - frame .f -width 30 -height 20 -bg $color + frame .f -width 30 -height 20 -background $color .t window create 1.2 -window .f update bind .f {lappend x unmapped} set x modified .t insert 1.0 x @@ -1274,11 +1274,11 @@ test textWind-14.3 {EmbWinDelayedUnmap procedure} -setup { .t delete 1.0 end destroy .f } -body { .t insert 1.0 "Some sample text\nAnother line\n3\n4\n5\n6\n7\n8\n9" - frame .f -width 30 -height 20 -bg $color + frame .f -width 30 -height 20 -background $color .t window create 1.2 -window .f update .t yview 2.0 set result [winfo ismapped .f] update ; after 10 @@ -1290,11 +1290,11 @@ test textWind-14.4 {EmbWinDelayedUnmap procedure} -setup { .t delete 1.0 end destroy .t.f } -body { .t insert 1.0 "Some sample text\nAnother line\n3\n4\n5\n6\n7\n8\n9" - frame .t.f -width 30 -height 20 -bg $color + frame .t.f -width 30 -height 20 -background $color .t window create 1.2 -window .t.f update .t yview 2.0 set result [winfo ismapped .t.f] update @@ -1314,11 +1314,11 @@ destroy .f } -body { .t configure -spacing1 0 -spacing2 0 -spacing3 0 \ -wrap none .t insert 1.0 "Some sample text" - frame .f -width 30 -height 20 -bg $color + frame .f -width 30 -height 20 -background $color .t window create 1.6 -window .f .t tag add a 1.1 .t tag add a 1.3 list [.t index .f] [.t bbox 1.7] } -cleanup { @@ -1331,11 +1331,11 @@ .t delete 1.0 end destroy .f } -body { .t configure -wrap none .t insert 1.0 "Some sample text" - frame .f -width 30 -height 20 -bg $color + frame .f -width 30 -height 20 -background $color .t window create 1.6 -window .f update pack forget .t update winfo ismapped .f @@ -1348,16 +1348,16 @@ destroy .f .f2 } -body { .t configure -spacing1 0 -spacing2 0 -spacing3 0 \ -wrap none .t insert 1.0 "Some sample text" - frame .f -width 30 -height 20 -bg $color + frame .f -width 30 -height 20 -background $color .t window create 1.6 -window .f update set result {} lappend result [winfo geom .f] [.t bbox .f] - frame .f2 -width 150 -height 30 -bd 2 -relief raised + frame .f2 -width 150 -height 30 -borderwidth 2 -relief raised pack .f2 -before .t update lappend result [winfo geom .f] [.t bbox .f] } -cleanup { destroy .f .f2 @@ -1384,11 +1384,11 @@ .t delete 1.0 end } -body { .t configure -spacing1 0 -spacing2 0 -spacing3 0 \ -wrap none .t insert 1.0 "Some sample text" - frame .t.f -width 30 -height 20 -bg $color + frame .t.f -width 30 -height 20 -background $color .t window create 1.6 -window .t.f update pack forget .t update list [winfo ismapped .t.f] [.t bbox .t.f] @@ -1400,11 +1400,11 @@ test textWind-17.1 {peer widgets and embedded windows} -setup { destroy .t .tt .f } -body { pack [text .t] .t insert end "Line 1" - frame .f -width 20 -height 10 -bg blue + frame .f -width 20 -height 10 -background blue .t window create 1.3 -window .f toplevel .tt pack [.t peer create .tt.t] update ; update destroy .t .tt @@ -1414,11 +1414,11 @@ test textWind-17.2 {peer widgets and embedded windows} -setup { destroy .t .f .tt } -body { pack [text .t] .t insert end "Line 1\nLine 2" - frame .f -width 20 -height 10 -bg blue + frame .f -width 20 -height 10 -background blue .t window create 1.4 -window .f toplevel .tt pack [.t peer create .tt.t] update ; update destroy .t @@ -1434,11 +1434,11 @@ .t delete 1.0 end .t insert 1.0 "Some sample text" toplevel .tt pack [.t peer create .tt.t] update ; update - .t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue} + .t window create 1.2 -create {frame %W.f -width 10 -height 20 -background blue} update destroy .t .tt } -result {} test textWind-17.4 {peer widget deleted one window shouldn't delete others} -setup { @@ -1448,11 +1448,11 @@ pack [text .t] .t delete 1.0 end .t insert 1.0 "Some sample text" toplevel .tt pack [.t peer create .tt.t] - .t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue} + .t window create 1.2 -create {frame %W.f -width 10 -height 20 -background blue} update ; update destroy .tt lappend res [.t get 1.2] update lappend res [.t get 1.2] @@ -1466,11 +1466,11 @@ pack [text .t] .t delete 1.0 end .t insert 1.0 "Some sample text" toplevel .tt pack [.t peer create .tt.t] - .t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue} + .t window create 1.2 -create {frame %W.f -width 10 -height 20 -background blue} update ; update list [.t window cget 1.2 -window] [.tt.t window cget 1.2 -window] } -cleanup { destroy .tt .t } -result {.t.f .tt.t.f} @@ -1481,11 +1481,11 @@ pack [text .t] .t delete 1.0 end .t insert 1.0 "Some sample text" toplevel .tt pack [.t peer create .tt.t] - .t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue} + .t window create 1.2 -create {frame %W.f -width 10 -height 20 -background blue} update ; update list [.t window configure 1.2 -window] \ [.tt.t window configure 1.2 -window] } -cleanup { destroy .tt .t @@ -1497,11 +1497,11 @@ pack [text .t] .t delete 1.0 end .t insert 1.0 "Some sample text" toplevel .tt pack [.t peer create .tt.t] - .t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue] + .t window create 1.2 -window [frame .t.f -width 10 -height 20 -background blue] update ; update list [.t window cget 1.2 -window] [.tt.t window cget 1.2 -window] } -cleanup { destroy .tt .t } -result {.t.f {}} @@ -1512,11 +1512,11 @@ pack [text .t] .t delete 1.0 end .t insert 1.0 "Some sample text" toplevel .tt pack [.t peer create .tt.t] - .t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue] + .t window create 1.2 -window [frame .t.f -width 10 -height 20 -background blue] update ; update list [.t window configure 1.2 -window] \ [.tt.t window configure 1.2 -window] } -cleanup { destroy .tt .t @@ -1528,13 +1528,13 @@ pack [text .t] .t delete 1.0 end .t insert 1.0 "Some sample text" toplevel .tt pack [.t peer create .tt.t] - .t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue] + .t window create 1.2 -window [frame .t.f -width 10 -height 20 -background blue] update ; update - .tt.t window configure 1.2 -window [frame .tt.t.f -width 10 -height 20 -bg red] + .tt.t window configure 1.2 -window [frame .tt.t.f -width 10 -height 20 -background red] list [.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}} @@ -1544,15 +1544,15 @@ pack [text .t] .t delete 1.0 end .t insert 1.0 "Some sample text" toplevel .tt pack [.t peer create .tt.t] - .t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue] - .tt.t window create 1.2 -window [frame .tt.t.f -width 25 -height 20 -bg blue] + .t window create 1.2 -window [frame .t.f -width 10 -height 20 -background blue] + .tt.t window create 1.2 -window [frame .tt.t.f -width 25 -height 20 -background blue] update ; update .t window configure 1.2 -create \ - {destroy %W.f ; frame %W.f -width 50 -height 7 -bg red} + {destroy %W.f ; frame %W.f -width 50 -height 7 -background red} .tt.t window configure 1.2 -window {} .t window configure 1.2 -window {} set res [list [.t window configure 1.2 -window] \ [.tt.t window configure 1.2 -window]] update Index: tests/ttk/entry.test ================================================================== --- tests/ttk/entry.test +++ tests/ttk/entry.test @@ -264,16 +264,16 @@ unset -nocomplain x } test entry-7.1 {Bad style options} -body { ttk::style theme create entry-7.1 -settings { - ttk::style configure TEntry -foreground BadColor - ttk::style map TEntry -foreground {readonly AnotherBadColor} + ttk::style configure TEntry -color BadColor + ttk::style map TEntry -color {readonly AnotherBadColor} ttk::style map TEntry -font {readonly ABadFont} ttk::style map TEntry \ -selectbackground {{} BadColor} \ - -selectforeground {{} BadColor} \ + -selectcolor {{} BadColor} \ -insertcolor {{} BadColor} } pack [ttk::entry .e -text "Don't crash"] ttk::style theme use entry-7.1 update @@ -334,26 +334,26 @@ .e cget -placeholder } -cleanup { destroy .e } -result {Some text} -test entry-10.2 {configuration option: "-placeholderforeground"} -setup { +test entry-10.2 {configuration option: "-placeholdercolor"} -setup { pack [ttk::entry .e] } -body { - .e configure -placeholder {Some text} -placeholderforeground red - .e cget -placeholderforeground + .e configure -placeholder {Some text} -placeholdercolor red + .e cget -placeholdercolor } -cleanup { destroy .e } -result {red} -test entry-10.3 {styling option: "-placeholderforeground"} -setup { +test entry-10.3 {styling option: "-placeholdercolor"} -setup { pack [ttk::entry .e] } -body { - set current [ttk::style configure TEntry -placeholderforeground] - ttk::style configure TEntry -placeholderforeground blue - set res [ttk::style configure TEntry -placeholderforeground] - ttk::style configure TEntry -placeholderforeground $current + set current [ttk::style configure TEntry -placeholdercolor] + ttk::style configure TEntry -placeholdercolor blue + set res [ttk::style configure TEntry -placeholdercolor] + ttk::style configure TEntry -placeholdercolor $current set res } -cleanup { destroy .e } -result {blue} Index: tests/ttk/progressbar.test ================================================================== --- tests/ttk/progressbar.test +++ tests/ttk/progressbar.test @@ -86,11 +86,11 @@ # check existence and default value of each non-core option of the widget test progressbar-3.1 "progressbar non-core options" -setup { set res {} ttk::progressbar .defaultpb } -body { - foreach option {-anchor -foreground -justify -style -text -wraplength \ + foreach option {-anchor -color -justify -style -text -wraplength \ -length -maximum -mode -orient -phase -value -variable} { lappend res [.defaultpb cget $option] } set res } -cleanup { @@ -101,25 +101,25 @@ test progressbar-3.2 "TIP #442 options are taken into account" -setup { set res {} pack [ttk::progressbar .p -value 0 -maximum 50 -orient horizontal -mode determinate -length 500] set thefont [font actual {Arial 10}] } -body { - .p configure -anchor c -foreground blue -justify right \ + .p configure -anchor c -color blue -justify right \ -text "TIP #442\noptions are now tested" -wraplength 100 update .p step 10 - .p configure -anchor e -font $thefont -foreground green -justify center \ + .p configure -anchor e -font $thefont -color green -justify center \ -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} { + foreach option {-anchor -color -justify -text -wraplength} { lappend res [list $option [.p cget $option]] } set res } -cleanup { unset res thefont destroy .p -} -result {{-anchor e} {-foreground green} {-justify center} {-text {Cannot be seen}} {-wraplength 250}} +} -result {{-anchor e} {-color green} {-justify center} {-text {Cannot be seen}} {-wraplength 250}} tcltest::cleanupTests Index: tests/ttk/treetags.test ================================================================== --- tests/ttk/treetags.test +++ tests/ttk/treetags.test @@ -2,10 +2,12 @@ package require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands +testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] + ### treeview tag invariants: # proc assert {expr {message ""}} { if {![uplevel 1 [list expr $expr]]} { @@ -172,28 +174,28 @@ test treetags-2.4 "Bad events" -body { $tv tag bind bad { puts "Entered!" } } -returnCodes error -result "unsupported event *" -match glob test treetags-3.0 "tag configure - set" -body { - $tv tag configure tag1 -foreground blue -background red + $tv tag configure tag1 -color blue -background red } -cleanup { treeConstraints $tv } -result {} test treetags-3.1 "tag configure - get" -body { - $tv tag configure tag1 -foreground + $tv tag configure tag1 -color } -cleanup { treeConstraints $tv } -result blue # @@@ fragile test -test treetags-3.2 "tag configure - enumerate" -body { +test treetags-3.2 "tag configure - enumerate" -constraints nodeprecated -body { $tv tag configure tag1 } -cleanup { treeConstraints $tv } -result [list \ - -text {} -image {} -anchor {} -background red -foreground blue -font {} \ + -text {} -image {} -anchor {} -background red -color blue -foreground blue -font {} \ ] # The next test exercises tag resource management. # If options are not properly freed, the message: # Test file error: "Font times 20 still in cache." Index: tests/ttk/ttk.test ================================================================== --- tests/ttk/ttk.test +++ tests/ttk/ttk.test @@ -60,14 +60,14 @@ } } test ttk-6.6 "Bad color spec in styles" -body { pack [ttk::button .b1 -text Hi!] - ttk::style configure TButton -foreground badColor + ttk::style configure TButton -color badColor event generate .b1 update - ttk::style configure TButton -foreground black + ttk::style configure TButton -color black destroy .b1 set ::bgerror } -result {unknown color name "badColor"} test ttk-6.7 "Basic destruction test" -body { Index: tests/ttk/validate.test ================================================================== --- tests/ttk/validate.test +++ tests/ttk/validate.test @@ -213,11 +213,11 @@ # See bug #1236979 test validate-2.2 "configure in -validatecommand" -body { proc validate-2.2 {win str} { - $win configure -foreground black + $win configure -color black return 1 } ttk::entry .e -textvariable var -validatecommand {validate-2.2 %W %P} .e validate } -result 1 -cleanup { destroy .e } Index: tests/unixButton.test ================================================================== --- tests/unixButton.test +++ tests/unixButton.test @@ -50,14 +50,14 @@ deleteWindows imageCleanup } -body { image create test image1 image1 changed 0 0 0 0 60 40 - 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 - radiobutton .b4 -image image1 -bd 4 -padx 2 -pady 0 + label .b1 -image image1 -borderwidth 4 -padx 0 -pady 2 + button .b2 -image image1 -borderwidth 4 -padx 0 -pady 2 + checkbutton .b3 -image image1 -borderwidth 4 -padx 1 -pady 1 + radiobutton .b4 -image image1 -borderwidth 4 -padx 2 -pady 0 pack .b1 .b2 .b3 .b4 update list [winfo reqwidth .b1] [winfo reqheight .b1] \ [winfo reqwidth .b2] [winfo reqheight .b2] \ [winfo reqwidth .b3] [winfo reqheight .b3] \ @@ -72,14 +72,14 @@ test unixbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints { unix } -setup { deleteWindows } -body { - label .b1 -bitmap question -bd 3 -padx 0 -pady 2 - button .b2 -bitmap question -bd 3 -padx 0 -pady 2 - checkbutton .b3 -bitmap question -bd 3 -padx 1 -pady 1 - radiobutton .b4 -bitmap question -bd 3 -padx 2 -pady 0 + label .b1 -bitmap question -borderwidth 3 -padx 0 -pady 2 + button .b2 -bitmap question -borderwidth 3 -padx 0 -pady 2 + checkbutton .b3 -bitmap question -borderwidth 3 -padx 1 -pady 1 + radiobutton .b4 -bitmap question -borderwidth 3 -padx 2 -pady 0 pack .b1 .b2 .b3 .b4 update list [winfo reqwidth .b1] [winfo reqheight .b1] \ [winfo reqwidth .b2] [winfo reqheight .b2] \ [winfo reqwidth .b3] [winfo reqheight .b3] \ @@ -93,15 +93,15 @@ test unixbutton-1.3 {TkpComputeButtonGeometry procedure} -constraints { unix } -setup { deleteWindows } -body { - label .b1 -bitmap question -bd 3 -highlightthickness 4 - button .b2 -bitmap question -bd 3 -highlightthickness 0 - checkbutton .b3 -bitmap question -bd 3 -highlightthickness 1 \ + label .b1 -bitmap question -borderwidth 3 -highlightthickness 4 + button .b2 -bitmap question -borderwidth 3 -highlightthickness 0 + checkbutton .b3 -bitmap question -borderwidth 3 -highlightthickness 1 \ -indicatoron 0 - radiobutton .b4 -bitmap question -bd 3 -highlightthickness 1 \ + radiobutton .b4 -bitmap question -borderwidth 3 -highlightthickness 1 \ -indicatoron false pack .b1 .b2 .b3 .b4 update list [winfo reqwidth .b1] [winfo reqheight .b1] \ [winfo reqwidth .b2] [winfo reqheight .b2] \ @@ -155,14 +155,14 @@ test unixbutton-1.7 {TkpComputeButtonGeometry procedure} -constraints { unix nonPortable fonts } -setup { deleteWindows } -body { - label .b1 -text Xagqpim -bd 2 -padx 0 -pady 2 -width 10 - button .b2 -text Xagqpim -bd 2 -padx 0 -pady 2 -height 5 - checkbutton .b3 -text Xagqpim -bd 2 -padx 1 -pady 1 -width 20 -height 2 - radiobutton .b4 -text Xagqpim -bd 2 -padx 2 -pady 0 -width 4 + label .b1 -text Xagqpim -borderwidth 2 -padx 0 -pady 2 -width 10 + button .b2 -text Xagqpim -borderwidth 2 -padx 0 -pady 2 -height 5 + checkbutton .b3 -text Xagqpim -borderwidth 2 -padx 1 -pady 1 -width 20 -height 2 + radiobutton .b4 -text Xagqpim -borderwidth 2 -padx 2 -pady 0 -width 4 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] \ @@ -173,17 +173,17 @@ test unixbutton-1.8 {TkpComputeButtonGeometry procedure} -constraints { unix nonPortable fonts } -setup { deleteWindows } -body { - label .b1 -text Xagqpim -bd 2 -padx 0 -pady 2 \ + label .b1 -text Xagqpim -borderwidth 2 -padx 0 -pady 2 \ -highlightthickness 4 - button .b2 -text Xagqpim -bd 2 -padx 0 -pady 2 \ + button .b2 -text Xagqpim -borderwidth 2 -padx 0 -pady 2 \ -highlightthickness 0 - checkbutton .b3 -text Xagqpim -bd 2 -padx 1 -pady 1 \ + checkbutton .b3 -text Xagqpim -borderwidth 2 -padx 1 -pady 1 \ -highlightthickness 1 -indicatoron no - radiobutton .b4 -text Xagqpim -bd 2 -padx 2 -pady 0 -indicatoron 0 + radiobutton .b4 -text Xagqpim -borderwidth 2 -padx 2 -pady 0 -indicatoron 0 pack .b1 .b2 .b3 .b4 update list [winfo reqwidth .b1] [winfo reqheight .b1] \ [winfo reqwidth .b2] [winfo reqheight .b2] \ [winfo reqwidth .b3] [winfo reqheight .b3] \ @@ -238,21 +238,21 @@ checkbutton .cb0 -anchor w -state disabled \ -text Unselected -variable off checkbutton .cb1 -anchor w -state disabled \ -text Selected -variable on checkbutton .cb2 -anchor w -state disabled \ - -text Unselected -variable off -disabledforeground "" + -text Unselected -variable off -disabledcolor "" checkbutton .cb3 -anchor w -state disabled \ - -text Selected -variable on -disabledforeground "" + -text Selected -variable on -disabledcolor "" radiobutton .rb0 -anchor w -state disabled \ -text Unselected -variable off radiobutton .rb1 -anchor w -state disabled \ -text Selected -variable on -value 1 radiobutton .rb2 -anchor w -state disabled \ - -text Unselected -variable off -disabledforeground "" + -text Unselected -variable off -disabledcolor "" radiobutton .rb3 -anchor w -state disabled \ - -text Selected -variable on -value 1 -disabledforeground "" + -text Selected -variable on -value 1 -disabledcolor "" pack .l .cb0 .cb1 .cb2 .cb3 .rb0 .rb1 .rb2 .rb3 -side top -fill x after 400 set on } -cleanup { deleteWindows Index: tests/unixEmbed.test ================================================================== --- tests/unixEmbed.test +++ tests/unixEmbed.test @@ -57,11 +57,11 @@ proc eatColors {w} { catch {destroy $w} toplevel $w wm geom $w +0+0 - canvas $w.c -width 400 -height 200 -bd 0 + canvas $w.c -width 400 -height 200 -borderwidth 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] \ @@ -388,11 +388,11 @@ deleteWindows update } -body { toplevel .t1 -container 1 wm geometry .t1 +0+0 - toplevel .t2 -use [winfo id .t1] -bg red + toplevel .t2 -use [winfo id .t1] -background red update wm geometry .t2 } -cleanup { deleteWindows } -result {200x200+0+0} @@ -404,11 +404,11 @@ frame .f1 -container 1 -width 200 -height 50 pack .f1 dobg "set w1 [winfo id .f1]" dobg { eval destroy [winfo child .] - toplevel .t1 -use $w1 -bd 2 -relief raised + toplevel .t1 -use $w1 -borderwidth 2 -relief raised update wm geometry .t1 +30+40 } update dobg { @@ -428,11 +428,11 @@ frame .f1 -container 1 -width 200 -height 50 pack .f1 child alias w1 winfo id .f1 child eval { destroy [winfo child .] - toplevel .t1 -use [w1] -bd 2 -relief raised + toplevel .t1 -use [w1] -borderwidth 2 -relief raised update wm geometry .t1 +30+40 update wm geometry .t1 } @@ -1097,11 +1097,11 @@ frame .f2 -width 200 -height 50 pack .f1 .f2 dobg "set w1 [winfo id .f1]" dobg { eval destroy [winfo child .] - toplevel .t1 -use $w1 -highlightthickness 2 -bd 2 -relief sunken + toplevel .t1 -use $w1 -highlightthickness 2 -borderwidth 2 -relief sunken } focus -force .f2 update list [dobg { focus .t1 @@ -1125,11 +1125,11 @@ pack .f1 .f2 update child alias w1 winfo id .f1 child eval { destroy [winfo child .] - toplevel .t1 -use [w1] -highlightthickness 2 -bd 2 -relief sunken + toplevel .t1 -use [w1] -highlightthickness 2 -borderwidth 2 -relief sunken } # This should clear focus from the application embedded in .f1 focus -force .f2 update list [child eval { @@ -1153,11 +1153,11 @@ update set w1 [winfo id .f1] child eval "set argv {-use [winfo id .f1]}" load {} Tk child child eval { - . configure -bd 2 -highlightthickness 2 -relief sunken + . configure -borderwidth 2 -highlightthickness 2 -relief sunken } focus -force .f2 update list [child eval { focus . @@ -1199,11 +1199,11 @@ pack .f1 update dobg "set w1 [winfo id .f1]" dobg { eval destroy [winfo child .] - toplevel .t1 -use $w1 -highlightthickness 2 -bd 2 -relief sunken + toplevel .t1 -use $w1 -highlightthickness 2 -borderwidth 2 -relief sunken set x {} lappend x [testembed] destroy .t1 lappend x [testembed] } @@ -1221,11 +1221,11 @@ frame .f1 -container 1 -width 200 -height 50 pack .f1 child alias w1 winfo id .f1 child eval { destroy [winfo child .] - toplevel .t1 -use [w1] -highlightthickness 2 -bd 2 -relief sunken + toplevel .t1 -use [w1] -highlightthickness 2 -borderwidth 2 -relief sunken set x {} lappend x [testembed] destroy .t1 lappend x [testembed] } @@ -1274,11 +1274,11 @@ deleteWindows } -body { toplevel .t pack [frame .t.f -container 1 -width 200 -height 200] -fill both update idletasks - toplevel .embed -use [winfo id .t.f] -bg green + toplevel .embed -use [winfo id .t.f] -background green update idletasks focus -force .t focus -force .embed focus } -cleanup { @@ -1293,11 +1293,11 @@ set result {} pack [button .main.b -text "Main Button" \ -command {lappend result ".main.b"}] -padx 30 -pady 30 pack [frame .main.f -container 1 -width 200 -height 200] -fill both update idletasks - toplevel .embed -use [winfo id .main.f] -bg green + toplevel .embed -use [winfo id .main.f] -background green pack [button .embed.b -text "Emb Button" \ -command {lappend result ".embed.b"}] -padx 30 -pady 30 wm geometry .main 200x400+100+100 update idletasks focus -force .main Index: tests/unixFont.test ================================================================== --- tests/unixFont.test +++ tests/unixFont.test @@ -53,11 +53,11 @@ # test control char expansion and missing character code. set courier {Courier -10} set cx [font measure $courier 0] -label .b.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left -text "0" -font fixed +label .b.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left -text "0" -font fixed pack .b.l canvas .b.c -closeenough 0 set t [.b.c create text 0 0 -anchor nw -just left -font $courier] pack .b.c Index: tests/unixMenu.test ================================================================== --- tests/unixMenu.test +++ tests/unixMenu.test @@ -815,11 +815,11 @@ unix } -setup { destroy .m1 } -body { menu .m1 - .m1 add command -label foo -activeforeground red + .m1 add command -label foo -activecolor red set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } -result {{} {}} test unixMenu-23.3 {TkpDrawMenuEntry - gc for active and strict motif} -constraints { @@ -837,31 +837,31 @@ test unixMenu-23.4 {TkpDrawMenuEntry - gc for disabled with disabledfg and custom entry} -constraints { unix } -setup { destroy .m1 } -body { - menu .m1 -disabledforeground blue + menu .m1 -disabledcolor blue .m1 add command -label foo -state disabled -background red set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test unixMenu-23.5 {TkpDrawMenuEntry - gc for disabled with disabledFg} -constraints { unix } -setup { destroy .m1 } -body { - menu .m1 -disabledforeground blue + menu .m1 -disabledcolor blue .m1 add command -label foo -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test unixMenu-23.6 {TkpDrawMenuEntry - gc for disabled - no disabledFg} -constraints { unix } -setup { destroy .m1 } -body { - menu .m1 -disabledforeground "" + menu .m1 -disabledcolor "" .m1 add command -label foo -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test unixMenu-23.7 {TkpDrawMenuEntry - gc for normal - custom entry} -constraints { @@ -868,11 +868,11 @@ unix } -setup { destroy .m1 } -body { menu .m1 - .m1 add command -label foo -foreground red + .m1 add command -label foo -color red set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test unixMenu-23.8 {TkpDrawMenuEntry - gc for normal} -constraints unix -setup { destroy .m1 @@ -940,11 +940,11 @@ unix } -setup { destroy .m1 } -body { menu .m1 - .m1 add command -label foo -activeforeground yellow + .m1 add command -label foo -activecolor yellow set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } -result {{} {}} test unixMenu-23.15 {TkpDrawMenuEntry - active border} -constraints unix -setup { Index: tests/unixWm.test ================================================================== --- tests/unixWm.test +++ tests/unixWm.test @@ -274,11 +274,11 @@ test unixWm-8.1 {icon windows} unix { destroy .t destroy .icon toplevel .t -width 100 -height 30 wm geometry .t +0+0 - toplevel .icon -width 50 -height 50 -bg red + toplevel .icon -width 50 -height 50 -background red wm iconwindow .t .icon list [catch {wm withdraw .icon} msg] $msg } {1 {can't withdraw .icon: it is an icon for .t}} test unixWm-8.2 {icon windows} unix { destroy .t @@ -295,11 +295,11 @@ destroy .icon toplevel .t -width 100 -height 30 wm geom .t +0+0 update idletasks set result [wm iconwindow .t] - toplevel .icon -width 50 -height 50 -bg red + toplevel .icon -width 50 -height 50 -background red wm iconwindow .t .icon lappend result [wm iconwindow .t] [wm state .icon] wm iconwindow .t {} lappend result [wm iconwindow .t] [wm state .icon] update @@ -314,30 +314,30 @@ list [catch {wm iconwindow .t .gorp} msg] $msg } {1 {bad window path name ".gorp"}} test unixWm-8.6 {icon windows} unix { destroy .t toplevel .t -width 100 -height 30 - frame .t.icon -width 50 -height 50 -bg red + frame .t.icon -width 50 -height 50 -background red list [catch {wm iconwindow .t .t.icon} msg] $msg } {1 {can't use .t.icon as icon window: not at top level}} test unixWm-8.7 {icon windows} unix { destroy .t destroy .icon toplevel .t -width 100 -height 30 wm geom .t +0+0 - toplevel .icon -width 50 -height 50 -bg red - toplevel .icon2 -width 50 -height 50 -bg green + toplevel .icon -width 50 -height 50 -background red + toplevel .icon2 -width 50 -height 50 -background green wm iconwindow .t .icon set result "[wm iconwindow .t] [wm state .icon] [wm state .icon2]" wm iconwindow .t .icon2 lappend result [wm iconwindow .t] [wm state .icon] [wm state .icon2] } {.icon icon normal .icon2 withdrawn icon} destroy .icon2 test unixWm-8.8 {icon windows} unix { destroy .t destroy .icon - toplevel .icon -width 50 -height 50 -bg red + toplevel .icon -width 50 -height 50 -background red wm geom .icon +0+0 update set result [winfo ismapped .icon] toplevel .t -width 100 -height 30 wm geom .t +0+0 @@ -350,11 +350,11 @@ # destroy an icon window when it's associated window is destroyed. destroy .t destroy .icon toplevel .t -width 100 -height 30 - toplevel .icon -width 50 -height 50 -bg red + toplevel .icon -width 50 -height 50 -background red wm geom .t +0+0 wm iconwindow .t .icon update set result "[wm state .icon] [winfo ismapped .t] [winfo ismapped .icon]" destroy .t @@ -409,18 +409,18 @@ } {test command } test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} unix { destroy .t - toplevel .t -width 100 -height 300 -bg blue + toplevel .t -width 100 -height 300 -background blue wm geom .t +0+0 wm iconify .t winfo ismapped .t } 0 test unixWm-9.4 {TkWmMapWindow procedure, icon windows} unix { destroy .t - toplevel .t -width 100 -height 50 -bg blue + toplevel .t -width 100 -height 50 -background blue tkwait visibility .t wm iconwindow . .t update set result [winfo ismapped .t] } 0 @@ -441,14 +441,14 @@ destroy .t } {} test unixWm-10.2 {TkWmDeadWindow procedure, destroying menubar} {unix testmenubar} { destroy .t destroy .f - toplevel .t -width 300 -height 200 -bd 2 -relief raised + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised wm geom .t +0+0 update - frame .f -width 400 -height 30 -bd 2 -relief raised -bg green + frame .f -width 400 -height 30 -borderwidth 2 -relief raised -background green bind .f {lappend result destroyed} testmenubar window .t .f update set result {} destroy .t @@ -627,11 +627,11 @@ test unixWm-16.1 {Tk_WmCmd procedure, "deiconify" option} unix { list [catch {wm deiconify .t 12} msg] $msg } {1 {wrong # args: should be "wm deiconify window"}} test unixWm-16.2 {Tk_WmCmd procedure, "deiconify" option} unix { destroy .icon - toplevel .icon -width 50 -height 50 -bg red + toplevel .icon -width 50 -height 50 -background red wm iconwindow .t .icon set result [list [catch {wm deiconify .icon} msg] $msg] destroy .icon set result } {1 {can't deiconify .icon: it is an icon for .t}} @@ -940,11 +940,11 @@ test unixWm-27.1 {Tk_WmCmd procedure, "iconwindow" option} unix { list [catch {wm iconwindow .t 12 13} msg] $msg } {1 {wrong # args: should be "wm iconwindow window ?pathName?"}} test unixWm-27.2 {Tk_WmCmd procedure, "iconwindow" option} {unix testwrapper} { destroy .icon - toplevel .icon -width 50 -height 50 -bg green + toplevel .icon -width 50 -height 50 -background green set result {} lappend result [wm iconwindow .t] wm iconwindow .t .icon set prop [testprop [testwrapper .t] WM_HINTS] lappend result [wm iconwindow .t] [wm state .icon] @@ -967,11 +967,11 @@ destroy .b set result } {1 {can't use .b as icon window: not at top level}} test unixWm-27.5 {Tk_WmCmd procedure, "iconwindow" option} unix { destroy .icon - toplevel .icon -width 50 -height 50 -bg green + toplevel .icon -width 50 -height 50 -background green destroy .t2 toplevel .t2 wm geom .t2 -0+0 wm iconwindow .t2 .icon set result [list [catch {wm iconwindow .t .icon} msg] $msg] @@ -980,12 +980,12 @@ set result } {1 {.icon is already an icon for .t2}} test unixWm-27.6 {Tk_WmCmd procedure, "iconwindow" option, changing icons} unix { destroy .icon destroy .icon2 - toplevel .icon -width 50 -height 50 -bg green - toplevel .icon2 -width 50 -height 50 -bg red + toplevel .icon -width 50 -height 50 -background green + toplevel .icon2 -width 50 -height 50 -background red set result {} wm iconwindow .t .icon lappend result [wm state .icon] [wm state .icon2] wm iconwindow .t .icon2 lappend result [wm state .icon] [wm state .icon2] @@ -992,11 +992,11 @@ destroy .icon .icon2 set result } {icon normal withdrawn icon} test unixWm-27.7 {Tk_WmCmd procedure, "iconwindow" option, withdrawing icon} unix { destroy .icon - toplevel .icon -width 50 -height 50 -bg green + toplevel .icon -width 50 -height 50 -background green wm geometry .icon +0+0 update set result {} lappend result [wm state .icon] [winfo viewable .icon] wm iconwindow .t .icon @@ -1385,16 +1385,16 @@ update idletasks lappend result [winfo width .t] [winfo height .t] } {400 150 200 300} test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} { destroy .t - toplevel .t -width 300 -height 200 -bd 2 -relief raised + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised wm geom .t +0+0 update set x [winfo rootx .t] set y [winfo rooty .t] - frame .t.m -bd 2 -relief raised -height 20 + frame .t.m -borderwidth 2 -relief raised -height 20 testmenubar window .t .t.m update set result {} bind .t { if {"%W" == ".t"} { @@ -1456,14 +1456,14 @@ test unixWm-43.1 {TopLevelReqProc procedure, embedded in same process} unix { destroy .t toplevel .t -width 200 -height 200 wm geom .t +0+0 - frame .t.f -container 1 -bd 2 -relief raised + frame .t.f -container 1 -borderwidth 2 -relief raised place .t.f -x 20 -y 10 tkwait visibility .t.f - toplevel .t2 -use [winfo id .t.f] -width 30 -height 20 -bg blue + toplevel .t2 -use [winfo id .t.f] -width 30 -height 20 -background blue tkwait visibility .t2 set result {} .t2 configure -width 70 -height 120 update lappend result [winfo reqwidth .t.f] [winfo reqheight .t.f] @@ -1590,11 +1590,11 @@ toplevel .t -width 80 -height 60 wm resizable .t 0 0 wm geometry .t +0+0 tkwait visibility .t .t configure -width 180 -height 50 - frame .t.m -bd 2 -relief raised -width 100 -height 50 + frame .t.m -borderwidth 2 -relief raised -width 100 -height 50 testmenubar window .t .t.m update .t configure -height 70 .t.m configure -height 30 list [update] [destroy .t] @@ -1673,11 +1673,11 @@ } {no yes} test unixWm-47.1 {WaitRestrictProc procedure} {unix nonPortable} { destroy .t toplevel .t -width 300 -height 200 - frame .t.f -bd 2 -relief raised + frame .t.f -borderwidth 2 -relief raised place .t.f -x 20 -y 30 -width 100 -height 20 wm geometry .t +0+0 tkwait visibility .t set result {} bind .t.f {lappend result {configure on .t.f}} @@ -1757,30 +1757,30 @@ } {50 -100 150 300} test unixWm-49.1 {Tk_GetRootCoords procedure} unix { destroy .t toplevel .t -width 300 -height 200 - frame .t.f -width 150 -height 100 -bd 2 -relief raised + frame .t.f -width 150 -height 100 -borderwidth 2 -relief raised place .t.f -x 150 -y 120 - frame .t.f.f -width 20 -height 20 -bd 2 -relief raised + frame .t.f.f -width 20 -height 20 -borderwidth 2 -relief raised place .t.f.f -x 10 -y 20 wm overrideredirect .t 1 wm geometry .t +40+50 tkwait visibility .t list [winfo rootx .t.f.f] [winfo rooty .t.f.f] } {202 192} test unixWm-49.2 {Tk_GetRootCoords procedure, menubars} {unix testmenubar} { destroy .t - toplevel .t -width 300 -height 200 -bd 2 -relief raised + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised wm geom .t +0+0 update set x [winfo rootx .t] set y [winfo rooty .t] - frame .t.m -bd 2 -relief raised -width 100 -height 30 - frame .t.m.f -width 20 -height 10 -bd 2 -relief raised + frame .t.m -borderwidth 2 -relief raised -width 100 -height 30 + frame .t.m.f -width 20 -height 10 -borderwidth 2 -relief raised place .t.m.f -x 50 -y 5 - frame .t.f -width 20 -height 30 -bd 2 -relief raised + frame .t.f -width 20 -height 30 -borderwidth 2 -relief raised place .t.f -x 10 -y 30 testmenubar window .t .t.m update list [expr [winfo rootx .t.m.f] - $x] [expr [winfo rooty .t.m.f] - $y] \ [expr [winfo rootx .t.f] - $x] [expr [winfo rooty .t.f] - $y] @@ -1795,14 +1795,14 @@ # Windows are assumed to have a border (invisible in Gnome 3). set result_50_1 {{} {} .t {} .t2 {} .t2 {} .t} } test unixWm-50.1 {Tk_CoordsToWindow procedure, finding a toplevel, x-coords, title bar} {unix failsOnUbuntu failsOnXQuarz} { update - toplevel .t -width 300 -height 400 -bg green + toplevel .t -width 300 -height 400 -background green wm geom .t +100+100 tkwait visibility .t - toplevel .t2 -width 100 -height 200 -bg red + toplevel .t2 -width 100 -height 200 -background red wm geom .t2 +200+200 tkwait visibility .t2 raise .t2 update set x [winfo rootx .t] @@ -1817,14 +1817,14 @@ [winfo containing [expr $x + 200] [expr $y + 250]] \ [winfo containing [expr $x + 220] [expr $y + 250]] \ } $result_50_1 test unixWm-50.2 {Tk_CoordsToWindow procedure, finding a toplevel, y-coords and overrideredirect} unix { deleteWindows - toplevel .t -width 400 -height 300 -bg yellow + toplevel .t -width 400 -height 300 -background yellow wm geom .t +100+100 tkwait visibility .t - toplevel .t2 -width 200 -height 100 -bg blue + toplevel .t2 -width 200 -height 100 -background blue wm overrideredirect .t2 1 wm geom .t2 +200+200 tkwait visibility .t2 raise .t2 set x [winfo rootx .t] @@ -1843,22 +1843,22 @@ Tk_CoordsToWindow procedure, finding a toplevel with embedding } tempNotWin { deleteWindows catch {interp delete child} - toplevel .t -width 300 -height 400 -bg blue + toplevel .t -width 300 -height 400 -background blue wm geom .t +100+100 - frame .t.f -container 1 -bg red + frame .t.f -container 1 -background red place .t.f -x 150 -y 50 tkwait visibility .t.f update interp create child load {} Tk child child alias frameid winfo id .t.f child eval { wm withdraw . - toplevel .x -width 100 -height 80 -use [frameid] -bg yellow + toplevel .x -width 100 -height 80 -use [frameid] -background yellow tkwait visibility .x update set x [winfo rootx .x] set y [winfo rooty .x] } @@ -1873,11 +1873,11 @@ } {{} .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 + toplevel .t -width 200 -height 200 -background green wm geometry .t +100+100 tkwait visibility .t update interp create child load {} Tk child @@ -1887,16 +1887,16 @@ interp delete child set result } {{} .} test unixWm-50.5 {Tk_CoordsToWindow procedure, handling menubars} {unix testmenubar} { deleteWindows - toplevel .t -width 300 -height 400 -bd 2 -relief raised - frame .t.f -width 150 -height 120 -bg green + toplevel .t -width 300 -height 400 -borderwidth 2 -relief raised + frame .t.f -width 150 -height 120 -background green place .t.f -x 10 -y 150 wm geom .t +0+50 - frame .t.menu -width 100 -height 30 -bd 2 -relief raised - frame .t.menu.f -width 40 -height 20 -bg purple + frame .t.menu -width 100 -height 30 -borderwidth 2 -relief raised + frame .t.menu.f -width 40 -height 20 -background purple place .t.menu.f -x 30 -y 10 testmenubar window .t .t.menu tkwait visibility .t.menu update set x [winfo rootx .t] @@ -1909,16 +1909,16 @@ [winfo containing [expr $x + 11] [expr $y + 152]] \ [winfo containing [expr $x + 12] [expr $y + 152]] } {{} .t.menu .t.menu .t.menu.f .t .t .t.f} test unixWm-50.6 {Tk_CoordsToWindow procedure, embedding within one app.} unix { deleteWindows - toplevel .t -width 300 -height 400 -bg orange + toplevel .t -width 300 -height 400 -background orange wm geom .t +0+50 frame .t.f -container 1 place .t.f -x 150 -y 50 tkwait visibility .t.f - toplevel .t2 -width 100 -height 80 -bg green -use [winfo id .t.f] + toplevel .t2 -width 100 -height 80 -background green -use [winfo id .t.f] tkwait visibility .t2 update set x [winfo rootx .t] set y [winfo rooty .t] list [winfo containing [expr $x +149] [expr $y + 80]] \ @@ -1926,15 +1926,15 @@ [winfo containing [expr $x +249] [expr $y +80]] \ [winfo containing [expr $x +250] [expr $y +80]] } {.t .t2 .t2 .t} test unixWm-50.7 {Tk_CoordsToWindow procedure, more basics} unix { destroy .t - toplevel .t -width 300 -height 400 -bg green + toplevel .t -width 300 -height 400 -background green wm geom .t +0+0 - frame .t.f -width 100 -height 200 -bd 2 -relief raised + frame .t.f -width 100 -height 200 -borderwidth 2 -relief raised place .t.f -x 100 -y 100 - frame .t.f.f -width 100 -height 200 -bd 2 -relief raised + frame .t.f.f -width 100 -height 200 -borderwidth 2 -relief raised place .t.f.f -x 0 -y 100 tkwait visibility .t.f.f set x [expr [winfo rootx .t] + 150] set y [winfo rooty .t] list [winfo containing $x [expr $y + 50]] \ @@ -1943,15 +1943,15 @@ [winfo containing $x [expr $y + 350]] \ [winfo containing $x [expr $y + 450]] } {.t .t.f .t.f.f .t {}} test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} unix { destroy .t - toplevel .t -width 400 -height 300 -bg green + toplevel .t -width 400 -height 300 -background green wm geom .t +0+30 - frame .t.f -width 200 -height 100 -bd 2 -relief raised + frame .t.f -width 200 -height 100 -borderwidth 2 -relief raised place .t.f -x 100 -y 100 - frame .t.f.f -width 200 -height 100 -bd 2 -relief raised + frame .t.f.f -width 200 -height 100 -borderwidth 2 -relief raised place .t.f.f -x 100 -y 0 update set x [winfo rootx .t] set y [expr [winfo rooty .t] + 150] list [winfo containing [expr $x + 50] $y] \ @@ -1961,26 +1961,26 @@ [winfo containing [expr $x + 450] $y] } {.t .t.f .t.f.f .t {}} test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} {unix failsOnUbuntu} { destroy .t destroy .t2 - toplevel .t -width 200 -height 200 -bg green + toplevel .t -width 200 -height 200 -background green wm geometry .t +0+0 tkwait visibility .t - toplevel .t2 -width 200 -height 200 -bg red + toplevel .t2 -width 200 -height 200 -background red wm geometry .t2 +0+0 tkwait visibility .t2 set result [list [winfo containing 100 100]] wm iconify .t2 update idletasks lappend result [winfo containing 100 100] } {.t2 .t} test unixWm-50.10 {Tk_CoordsToWindow procedure, unmapped windows} unix { destroy .t - toplevel .t -width 200 -height 200 -bg green + toplevel .t -width 200 -height 200 -background green wm geometry .t +0+0 - frame .t.f -width 150 -height 150 -bd 2 -relief raised + frame .t.f -width 150 -height 150 -borderwidth 2 -relief raised place .t.f -x 25 -y 25 tkwait visibility .t.f update idletasks set result [list [winfo containing 100 100]] place forget .t.f @@ -2042,23 +2042,23 @@ [winfo rooty .raise2]] } {.raise1 .raise3} deleteWindows test unixWm-51.6 {TkWmRestackToplevel procedure, window to be stacked isn't mapped} unix { destroy .t - toplevel .t -width 200 -height 200 -bg green + toplevel .t -width 200 -height 200 -background green wm geometry .t +0+0 tkwait visibility .t destroy .t2 - toplevel .t2 -width 200 -height 200 -bg red + toplevel .t2 -width 200 -height 200 -background red wm geometry .t2 +0+0 winfo containing 100 100 } {.t} test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} {unix failsOnXQuarz} { foreach w {.t .t2 .t3} { destroy $w update - toplevel $w -width 200 -height 200 -bg green + toplevel $w -width 200 -height 200 -background green wm geometry $w +0+0 } raise .t .t2 update set result [list [winfo containing 100 100]] @@ -2065,16 +2065,16 @@ lower .t3 lappend result [winfo containing 100 100] } {.t3 .t} test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} unix { destroy .t - toplevel .t -width 200 -height 200 -bg green + toplevel .t -width 200 -height 200 -background green wm overrideredirect .t 1 wm geometry .t +0+0 tkwait visibility .t destroy .t2 - toplevel .t2 -width 200 -height 200 -bg red + toplevel .t2 -width 200 -height 200 -background red wm overrideredirect .t2 1 wm geometry .t2 +0+0 tkwait visibility .t2 # Need to use vrootx and vrooty to make tests work correctly with @@ -2096,11 +2096,11 @@ } test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect} unix { foreach w {.t .t2 .t3} { destroy $w update - toplevel $w -width 200 -height 200 -bg green + toplevel $w -width 200 -height 200 -background green wm overrideredirect $w 1 wm geometry $w +0+0 tkwait visibility $w update } @@ -2143,68 +2143,68 @@ expr {$time < 2000000} } 1 test unixWm-52.1 {TkWmAddToColormapWindows procedure} unix { destroy .t - toplevel .t -width 200 -height 200 -colormap new -relief raised -bd 2 + toplevel .t -width 200 -height 200 -colormap new -relief raised -borderwidth 2 wm geom .t +0+0 update wm colormap .t } {} test unixWm-52.2 {TkWmAddToColormapWindows procedure} unix { destroy .t - toplevel .t -colormap new -relief raised -bd 2 + toplevel .t -colormap new -relief raised -borderwidth 2 wm geom .t +0+0 - frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2 + frame .t.f -width 100 -height 100 -colormap new -relief sunken -borderwidth 2 pack .t.f update wm colormap .t } {.t.f .t} test unixWm-52.3 {TkWmAddToColormapWindows procedure} unix { destroy .t toplevel .t -colormap new wm geom .t +0+0 - frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2 + frame .t.f -width 100 -height 100 -colormap new -relief sunken -borderwidth 2 pack .t.f - frame .t.f2 -width 100 -height 100 -colormap new -relief sunken -bd 2 + frame .t.f2 -width 100 -height 100 -colormap new -relief sunken -borderwidth 2 pack .t.f2 update wm colormap .t } {.t.f .t.f2 .t} test unixWm-52.4 {TkWmAddToColormapWindows procedure} unix { destroy .t toplevel .t -colormap new wm geom .t +0+0 - frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2 + frame .t.f -width 100 -height 100 -colormap new -relief sunken -borderwidth 2 pack .t.f update wm colormapwindows .t .t.f - frame .t.f2 -width 100 -height 100 -colormap new -relief sunken -bd 2 + frame .t.f2 -width 100 -height 100 -colormap new -relief sunken -borderwidth 2 pack .t.f2 update wm colormapwindows .t } {.t.f} test unixWm-53.1 {TkWmRemoveFromColormapWindows procedure} unix { destroy .t toplevel .t -colormap new wm geom .t +0+0 - frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2 + frame .t.f -width 100 -height 100 -colormap new -relief sunken -borderwidth 2 pack .t.f - frame .t.f2 -width 100 -height 100 -colormap new -relief sunken -bd 2 + frame .t.f2 -width 100 -height 100 -colormap new -relief sunken -borderwidth 2 pack .t.f2 update destroy .t.f2 wm colormap .t } {.t.f .t} test unixWm-53.2 {TkWmRemoveFromColormapWindows procedure} unix { destroy .t toplevel .t -colormap new wm geom .t +0+0 - frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2 + frame .t.f -width 100 -height 100 -colormap new -relief sunken -borderwidth 2 pack .t.f - frame .t.f2 -width 100 -height 100 -colormap new -relief sunken -bd 2 + frame .t.f2 -width 100 -height 100 -colormap new -relief sunken -borderwidth 2 pack .t.f2 update wm colormapwindows .t .t.f2 destroy .t.f2 wm colormap .t @@ -2211,11 +2211,11 @@ } {} test unixWm-54.1 {TkpMakeMenuWindow procedure, setting save_under} {unix nonUnixUserInteraction} { destroy .t destroy .m - toplevel .t -width 300 -height 200 -bd 2 -relief raised + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised bind .t {set x exposed} wm geom .t +0+0 update menu .m .m add command -label First @@ -2242,29 +2242,29 @@ # No tests for TkGetPointerCoords, CreateWrapper, or GetMaxSize. test unixWm-55.1 {TkUnixSetMenubar procedure} {unix testmenubar} { destroy .t - toplevel .t -width 300 -height 200 -bd 2 -relief raised + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised wm geom .t +0+0 update - frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green + frame .t.f -width 400 -height 30 -borderwidth 2 -relief raised -background green testmenubar window .t .t.f update list [winfo ismapped .t.f] [winfo geometry .t.f] \ [expr [winfo rootx .t] - [winfo rootx .t.f]] \ [expr [winfo rooty .t] - [winfo rooty .t.f]] } {1 300x30+0+0 0 30} test unixWm-55.2 {TkUnixSetMenubar procedure, removing menubar} {unix testmenubar} { destroy .t destroy .f - toplevel .t -width 300 -height 200 -bd 2 -relief raised + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised wm geom .t +0+0 update set x [winfo rootx .t] set y [winfo rooty .t] - frame .f -width 400 -height 30 -bd 2 -relief raised -bg green + frame .f -width 400 -height 30 -borderwidth 2 -relief raised -background green testmenubar window .t .f update testmenubar window .t {} update list [winfo ismapped .f] [winfo geometry .f] \ @@ -2273,16 +2273,16 @@ [expr [winfo rootx .] - [winfo rootx .f]] \ [expr [winfo rooty .] - [winfo rooty .f]] } {0 300x30+0+0 0 0 0 0} test unixWm-55.3 {TkUnixSetMenubar procedure, removing geometry manager} {unix testmenubar} { destroy .t - toplevel .t -width 300 -height 200 -bd 2 -relief raised + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised wm geom .t +0+0 update set x [winfo rootx .t] set y [winfo rooty .t] - frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green + frame .t.f -width 400 -height 30 -borderwidth 2 -relief raised -background green testmenubar window .t .t.f update testmenubar window .t {} update set result "[expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y]" @@ -2290,12 +2290,12 @@ update lappend result [expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y] } {0 0 0 0} test unixWm-55.4 {TkUnixSetMenubar procedure, toplevel not yet created} {unix testmenubar} { destroy .t - toplevel .t -width 300 -height 200 -bd 2 -relief raised - frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised + frame .t.f -width 400 -height 30 -borderwidth 2 -relief raised -background green testmenubar window .t .t.f wm geom .t +0+0 update list [winfo ismapped .t.f] [winfo geometry .t.f] \ [expr [winfo rootx .t] - [winfo rootx .t.f]] \ @@ -2302,16 +2302,16 @@ [expr [winfo rooty .t] - [winfo rooty .t.f]] } {1 300x30+0+0 0 30} test unixWm-55.5 {TkUnixSetMenubar procedure, changing menubar} {unix testmenubar} { destroy .t destroy .f - toplevel .t -width 300 -height 200 -bd 2 -relief raised - frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised + frame .t.f -width 400 -height 30 -borderwidth 2 -relief raised -background green wm geom .t +0+0 update set y [winfo rooty .t] - frame .f -width 400 -height 50 -bd 2 -relief raised -bg green + frame .f -width 400 -height 50 -borderwidth 2 -relief raised -background green testmenubar window .t .t.f update set result {} lappend result [winfo ismapped .f] [winfo ismapped .t.f] lappend result [expr [winfo rooty .t.f] - $y] @@ -2320,12 +2320,12 @@ lappend result [winfo ismapped .f] [winfo ismapped .t.f] lappend result [expr [winfo rooty .f] - $y] } {0 1 0 1 0 0} test unixWm-55.6 {TkUnixSetMenubar procedure, changing menubar to self} {unix testmenubar} { destroy .t - toplevel .t -width 300 -height 200 -bd 2 -relief raised - frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised + frame .t.f -width 400 -height 30 -borderwidth 2 -relief raised -background green testmenubar window .t .t.f wm geom .t +0+0 update testmenubar window .t .t.f update @@ -2334,13 +2334,13 @@ [expr [winfo rooty .t] - [winfo rooty .t.f]] } {1 300x30+0+0 0 30} test unixWm-55.7 {TkUnixSetMenubar procedure, unsetting event handler} {unix testmenubar} { destroy .t destroy .f - toplevel .t -width 300 -height 200 -bd 2 -relief raised - frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green - frame .f -width 400 -height 40 -bd 2 -relief raised -bg blue + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised + frame .t.f -width 400 -height 30 -borderwidth 2 -relief raised -background green + frame .f -width 400 -height 40 -borderwidth 2 -relief raised -background blue wm geom .t +0+0 update set y [winfo rooty .t] testmenubar window .t .t.f update @@ -2353,15 +2353,15 @@ lappend result [expr [winfo rooty .t] - $y] } {30 40 40} test unixWm-56.1 {MenubarDestroyProc procedure} {unix testmenubar} { destroy .t - toplevel .t -width 300 -height 200 -bd 2 -relief raised + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised wm geom .t +0+0 update set y [winfo rooty .t] - frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green + frame .t.f -width 400 -height 30 -borderwidth 2 -relief raised -background green testmenubar window .t .t.f update set result [expr [winfo rooty .t] - $y] destroy .t.f update @@ -2368,31 +2368,31 @@ lappend result [expr [winfo rooty .t] - $y] } {30 0} test unixWm-57.1 {MenubarReqProc procedure} {unix testmenubar} { destroy .t - toplevel .t -width 300 -height 200 -bd 2 -relief raised + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised wm geom .t +0+0 update set x [winfo rootx .t] set y [winfo rooty .t] - frame .t.f -width 400 -height 10 -bd 2 -relief raised -bg green + frame .t.f -width 400 -height 10 -borderwidth 2 -relief raised -background green testmenubar window .t .t.f update set result "[expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y]" .t.f configure -height 100 update lappend result [expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y] } {0 10 0 100} test unixWm-57.2 {MenubarReqProc procedure} {unix testmenubar} { destroy .t - toplevel .t -width 300 -height 200 -bd 2 -relief raised + toplevel .t -width 300 -height 200 -borderwidth 2 -relief raised wm geom .t +0+0 update set x [winfo rootx .t] set y [winfo rooty .t] - frame .t.f -width 400 -height 20 -bd 2 -relief raised -bg green + frame .t.f -width 400 -height 20 -borderwidth 2 -relief raised -background green testmenubar window .t .t.f update set result "[expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y]" .t.f configure -height 0 update Index: tests/util.test ================================================================== --- tests/util.test +++ tests/util.test @@ -9,11 +9,11 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands namespace import -force tcltest::test -listbox .l -width 20 -height 5 -relief sunken -bd 2 +listbox .l -width 20 -height 5 -relief sunken -borderwidth 2 pack .l .l insert 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 update test util-1.1 {Tk_GetScrollInfo procedure} -body { .l yview moveto a b Index: tests/visual.test ================================================================== --- tests/visual.test +++ tests/visual.test @@ -23,11 +23,11 @@ proc eatColors {w} { catch {destroy $w} toplevel $w wm geom $w +0+0 - canvas $w.c -width 400 -height 200 -bd 0 + canvas $w.c -width 400 -height 200 -borderwidth 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}] \ Index: tests/winButton.test ================================================================== --- tests/winButton.test +++ tests/winButton.test @@ -28,15 +28,15 @@ # the smallest size (i.e. 8) is not available for "MS Sans Serif" font deleteWindows } -body { image create test image1 image1 changed 0 0 0 0 60 40 - 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 \ + label .b1 -image image1 -borderwidth 4 -padx 0 -pady 2 + button .b2 -image image1 -borderwidth 4 -padx 0 -pady 2 + checkbutton .b3 -image image1 -borderwidth 4 -padx 1 -pady 1 \ -font {{MS Sans Serif} 8} - radiobutton .b4 -image image1 -bd 4 -padx 2 -pady 0 \ + radiobutton .b4 -image image1 -borderwidth 4 -padx 2 -pady 0 \ -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} @@ -54,15 +54,15 @@ } -setup { # nonPortable because of [3e3e25f483]: on Win7 first started with a high DPI screen # the smallest size (i.e. 8) is not available for "MS Sans Serif" font deleteWindows } -body { - label .b1 -bitmap question -bd 3 -padx 0 -pady 2 - button .b2 -bitmap question -bd 3 -padx 0 -pady 2 - checkbutton .b3 -bitmap question -bd 3 -padx 1 -pady 1 \ + label .b1 -bitmap question -borderwidth 3 -padx 0 -pady 2 + button .b2 -bitmap question -borderwidth 3 -padx 0 -pady 2 + checkbutton .b3 -bitmap question -borderwidth 3 -padx 1 -pady 1 \ -font {{MS Sans Serif} 8} - radiobutton .b4 -bitmap question -bd 3 -padx 2 -pady 0 \ + radiobutton .b4 -bitmap question -borderwidth 3 -padx 2 -pady 0 \ -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} @@ -75,15 +75,15 @@ } -result {23 33 25 35 45 37 45 37} test winbutton-1.3 {TkpComputeButtonGeometry procedure} -constraints win -setup { deleteWindows } -body { - label .b1 -bitmap question -bd 3 -highlightthickness 4 - button .b2 -bitmap question -bd 3 -highlightthickness 0 - checkbutton .b3 -bitmap question -bd 3 -highlightthickness 1 \ + label .b1 -bitmap question -borderwidth 3 -highlightthickness 4 + button .b2 -bitmap question -borderwidth 3 -highlightthickness 0 + checkbutton .b3 -bitmap question -borderwidth 3 -highlightthickness 1 \ -indicatoron 0 - radiobutton .b4 -bitmap question -bd 3 -indicatoron false + radiobutton .b4 -bitmap question -borderwidth 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] \ @@ -97,14 +97,14 @@ test winbutton-1.4 {TkpComputeButtonGeometry procedure} -constraints { win nonPortable } -setup { deleteWindows } -body { - label .b1 -text Xagqpim -bd 2 -padx 0 -pady 2 -font {{MS Sans Serif} 8} - button .b2 -text Xagqpim -bd 2 -padx 0 -pady 2 -font {{MS Sans Serif} 8} - checkbutton .b3 -text Xagqpim -bd 2 -padx 1 -pady 1 -font {{MS Sans Serif} 8} - radiobutton .b4 -text Xagqpim -bd 2 -padx 2 -pady 0 -font {{MS Sans Serif} 8} + label .b1 -text Xagqpim -borderwidth 2 -padx 0 -pady 2 -font {{MS Sans Serif} 8} + button .b2 -text Xagqpim -borderwidth 2 -padx 0 -pady 2 -font {{MS Sans Serif} 8} + checkbutton .b3 -text Xagqpim -borderwidth 2 -padx 1 -pady 1 -font {{MS Sans Serif} 8} + radiobutton .b4 -text Xagqpim -borderwidth 2 -padx 2 -pady 0 -font {{MS Sans Serif} 8} 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] \ @@ -144,14 +144,14 @@ test winbutton-1.7 {TkpComputeButtonGeometry procedure} -constraints { win nonPortable } -setup { deleteWindows } -body { - label .b1 -text Xagqpim -bd 2 -padx 0 -pady 2 -width 10 - button .b2 -text Xagqpim -bd 2 -padx 0 -pady 2 -height 5 - checkbutton .b3 -text Xagqpim -bd 2 -padx 1 -pady 1 -width 20 -height 2 - radiobutton .b4 -text Xagqpim -bd 2 -padx 2 -pady 0 -width 4 + label .b1 -text Xagqpim -borderwidth 2 -padx 0 -pady 2 -width 10 + button .b2 -text Xagqpim -borderwidth 2 -padx 0 -pady 2 -height 5 + checkbutton .b3 -text Xagqpim -borderwidth 2 -padx 1 -pady 1 -width 20 -height 2 + radiobutton .b4 -text Xagqpim -borderwidth 2 -padx 2 -pady 0 -width 4 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] \ @@ -163,17 +163,17 @@ test winbutton-1.8 {TkpComputeButtonGeometry procedure} -constraints { win nonPortable } -setup { deleteWindows } -body { - label .b1 -text Xagqpim -bd 2 -padx 0 -pady 2 \ + label .b1 -text Xagqpim -borderwidth 2 -padx 0 -pady 2 \ -highlightthickness 4 - button .b2 -text Xagqpim -bd 2 -padx 0 -pady 2 \ + button .b2 -text Xagqpim -borderwidth 2 -padx 0 -pady 2 \ -highlightthickness 0 - checkbutton .b3 -text Xagqpim -bd 2 -padx 1 -pady 1 \ + checkbutton .b3 -text Xagqpim -borderwidth 2 -padx 1 -pady 1 \ -highlightthickness 1 -indicatoron no - radiobutton .b4 -text Xagqpim -bd 2 -padx 2 -pady 0 -indicatoron 0 + radiobutton .b4 -text Xagqpim -borderwidth 2 -padx 2 -pady 0 -indicatoron 0 pack .b1 .b2 .b3 .b4 update list [winfo reqwidth .b1] [winfo reqheight .b1] \ [winfo reqwidth .b2] [winfo reqheight .b2] \ [winfo reqwidth .b3] [winfo reqheight .b3] \ Index: tests/winFont.test ================================================================== --- tests/winFont.test +++ tests/winFont.test @@ -111,11 +111,11 @@ destroy .t toplevel .t wm geometry .t +0+0 update idletasks -label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left -text "0" -font systemfixed +label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left -text "0" -font systemfixed pack .t.l canvas .t.c -closeenough 0 set courier {Courier 14} set cx [font measure $courier 0] @@ -133,11 +133,11 @@ test winfont-5.1 {Tk_MeasureChars procedure: unbounded right margin} -constraints { win } -setup { destroy .t.l } -body { - label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ + label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] @@ -152,11 +152,11 @@ test winfont-5.2 {Tk_MeasureChars procedure: static width buffer exceeded} -constraints { win } -setup { destroy .t.l } -body { - label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ + label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] @@ -171,11 +171,11 @@ test winfont-5.3 {Tk_MeasureChars procedure: all chars did fit} -constraints { win } -setup { destroy .t.l } -body { - label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ + label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] @@ -190,11 +190,11 @@ test winfont-5.4 {Tk_MeasureChars procedure: not all chars fit} -constraints { win } -setup { destroy .t.l } -body { - label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ + label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] @@ -226,11 +226,11 @@ test winfont-5.6 {Tk_MeasureChars procedure: at least one char on line} -constraints { win } -setup { destroy .t.l } -body { - label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ + label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] @@ -245,11 +245,11 @@ test winfont-5.7 {Tk_MeasureChars procedure: whole words} -constraints { win } -setup { destroy .t.l } -body { - label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ + label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] @@ -264,11 +264,11 @@ test winfont-5.8 {Tk_MeasureChars procedure: already saw space in line} -constraints { win } -setup { destroy .t.l } -body { - label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ + label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] @@ -283,11 +283,11 @@ test winfont-5.9 {Tk_MeasureChars procedure: internal spaces significant} -constraints { win } -setup { destroy .t.l } -body { - label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ + label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] @@ -302,11 +302,11 @@ test winfont-5.10 {Tk_MeasureChars procedure: make first part of word fit} -constraints { win } -setup { destroy .t.l } -body { - label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ + label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] @@ -321,11 +321,11 @@ test winfont-5.11 {Tk_MeasureChars procedure: check for kerning} -constraints { win nonPortable } -setup { destroy .t.l } -body { - label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ + label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set font [.t.l cget -font] @@ -341,11 +341,11 @@ 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 \ + label .t.l -padx 0 -pady 0 -borderwidth 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update .t.l config -text "a" update Index: tests/winMenu.test ================================================================== --- tests/winMenu.test +++ tests/winMenu.test @@ -723,11 +723,11 @@ test winMenu-20.1 {DrawMenuEntryAccelerator - disabled} -constraints win -setup { destroy .m1 } -body { - menu .m1 -disabledforeground red + menu .m1 -disabledcolor red .m1 add command -label foo -accel "Ctrl+U" -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-20.2 {DrawMenuEntryAccelerator - normal text} -constraints { @@ -743,11 +743,11 @@ test winMenu-20.3 {DrawMenuEntryAccelerator - disabled, no disabledforeground} -constraints { win } -setup { destroy .m1 } -body { - menu .m1 -disabledforeground "" + menu .m1 -disabledcolor "" .m1 add command -label foo -accel "Ctrl+U" -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-20.4 {DrawMenuEntryAccelerator - cascade, drawArrow true} -constraints { @@ -812,21 +812,21 @@ test winMenu-25.2 {DrawMenuEntryLabel - disabled with fg} -constraints { win } -setup { destroy .m1 } -body { - menu .m1 -disabledforeground red + menu .m1 -disabledcolor red .m1 add command -label foo -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-25.3 {DrawMenuEntryLabel - disabled with no fg} -constraints { win } -setup { destroy .m1 } -body { - menu .m1 -disabledforeground "" + menu .m1 -disabledcolor "" .m1 add command -label foo -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} @@ -887,11 +887,11 @@ win } -setup { destroy .m1 } -body { menu .m1 - .m1 add command -label foo -activeforeground red + .m1 add command -label foo -activecolor red set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } -result {{} {}} test winMenu-29.3 {TkpDrawMenuEntry - gc for active and strict motif} -constraints { @@ -909,31 +909,31 @@ test winMenu-29.4 {TkpDrawMenuEntry - gc for disabled with disabledfg and custom entry} -constraints { win } -setup { destroy .m1 } -body { - menu .m1 -disabledforeground blue + menu .m1 -disabledcolor blue .m1 add command -label foo -state disabled -background red set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.5 {TkpDrawMenuEntry - gc for disabled with disabledFg} -constraints { win } -setup { destroy .m1 } -body { - menu .m1 -disabledforeground blue + menu .m1 -disabledcolor blue .m1 add command -label foo -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.6 {TkpDrawMenuEntry - gc for disabled - no disabledFg} -constraints { win } -setup { destroy .m1 } -body { - menu .m1 -disabledforeground "" + menu .m1 -disabledcolor "" .m1 add command -label foo -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.7 {TkpDrawMenuEntry - gc for normal - custom entry} -constraints { @@ -940,11 +940,11 @@ win } -setup { destroy .m1 } -body { menu .m1 - .m1 add command -label foo -foreground red + .m1 add command -label foo -color red set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.8 {TkpDrawMenuEntry - gc for normal} -constraints win -setup { destroy .m1 @@ -1012,11 +1012,11 @@ win } -setup { destroy .m1 } -body { menu .m1 - .m1 add command -label foo -activeforeground yellow + .m1 add command -label foo -activecolor yellow set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } -result {{} {}} test winMenu-29.15 {TkpDrawMenuEntry - active border} -constraints win -setup { Index: tests/window.test ================================================================== --- tests/window.test +++ tests/window.test @@ -47,13 +47,13 @@ test window-2.1 {Tk_DestroyWindow procedure, destroy handler deletes parent} -setup { destroy .t } -body { toplevel .t -width 300 -height 200 wm geometry .t +0+0 - frame .t.f -width 200 -height 200 -relief raised -bd 2 + frame .t.f -width 200 -height 200 -relief raised -borderwidth 2 place .t.f -x 0 -y 0 - frame .t.f.f -width 100 -height 100 -relief raised -bd 2 + frame .t.f.f -width 100 -height 100 -relief raised -borderwidth 2 place .t.f.f -relx 1 -rely 1 -anchor se bind .t.f {destroy .t} update destroy .t.f } -result {} @@ -60,28 +60,28 @@ test window-2.2 {Tk_DestroyWindow procedure, destroy handler deletes parent} -setup { destroy .t } -body { toplevel .t -width 300 -height 200 wm geometry .t +0+0 - frame .t.f -width 200 -height 200 -relief raised -bd 2 + frame .t.f -width 200 -height 200 -relief raised -borderwidth 2 place .t.f -x 0 -y 0 - frame .t.f.f -width 100 -height 100 -relief raised -bd 2 + frame .t.f.f -width 100 -height 100 -relief raised -borderwidth 2 place .t.f.f -relx 1 -rely 1 -anchor se bind .t.f.f {destroy .t} update destroy .t.f } -result {} test window-2.3 {Tk_DestroyWindow procedure, destroy handler deletes parent} -setup { destroy .f } -body { - frame .f -width 80 -height 120 -relief raised -bd 2 + frame .f -width 80 -height 120 -relief raised -borderwidth 2 place .f -relx 0.5 -rely 0.5 -anchor center toplevel .f.t -width 300 -height 200 wm geometry .f.t +0+0 - frame .f.t.f -width 200 -height 200 -relief raised -bd 2 + frame .f.t.f -width 200 -height 200 -relief raised -borderwidth 2 place .f.t.f -x 0 -y 0 - frame .f.t.f.f -width 100 -height 100 -relief raised -bd 2 + frame .f.t.f.f -width 100 -height 100 -relief raised -borderwidth 2 place .f.t.f.f -relx 1 -rely 1 -anchor se update destroy .f } -result {} @@ -270,11 +270,11 @@ destroy .t } -body { toplevel .t -width 300 -height 200 wm geometry .t +0+0 pack [entry .t.e] - frame .t.f -bd 2 -relief raised + frame .t.f -borderwidth 2 -relief raised testmenubar window .t .t.f update # If stacking order isn't handle properly, generates an X error. } -cleanup { destroy .t @@ -287,11 +287,11 @@ toplevel .t -width 300 -height 200 wm geometry .t +0+0 pack [entry .t.e] pack [entry .t.e2] update - frame .t.f -bd 2 -relief raised + frame .t.f -borderwidth 2 -relief raised raise .t.f .t.e testmenubar window .t .t.f update # If stacking order isn't handled properly, generates an X error. } -cleanup { @@ -329,11 +329,11 @@ } -body { toplevel .t -width 300 -height 200 wm geometry .t +0+0 pack [entry .t.e] pack [entry .t.e2] - frame .t.f -bd 2 -relief raised + frame .t.f -borderwidth 2 -relief raised testmenubar window .t .t.f update lower .t.e2 .t.f update # If stacking order isn't handled properly, generates an X error. Index: tests/winfo.test ================================================================== --- tests/winfo.test +++ tests/winfo.test @@ -24,11 +24,11 @@ proc eatColors {w {options ""}} { destroy $w eval toplevel $w $options wm geom $w +0+0 - canvas $w.c -width 400 -height 200 -bd 0 + canvas $w.c -width 400 -height 200 -borderwidth 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}] \ @@ -136,11 +136,11 @@ test winfo-4.5 {"winfo containing" command} -body { } -setup { destroy .t } -body { toplevel .t -width 550 -height 400 - frame .t.f -width 80 -height 60 -bd 2 -relief raised + frame .t.f -width 80 -height 60 -borderwidth 2 -relief raised place .t.f -x 50 -y 50 wm geom .t +0+0 update raise .t @@ -152,11 +152,11 @@ nonPortable } -setup { destroy .t } -body { toplevel .t -width 550 -height 400 - frame .t.f -width 80 -height 60 -bd 2 -relief raised + frame .t.f -width 80 -height 60 -borderwidth 2 -relief raised place .t.f -x 50 -y 50 wm geom .t +0+0 update winfo containing [expr {[winfo rootx .t.f]-1}] [expr {[winfo rooty .t.f]-1}] @@ -165,11 +165,11 @@ } -result .t test winfo-4.7 {"winfo containing" command} -setup { destroy .t } -body { toplevel .t -width 550 -height 400 - frame .t.f -width 80 -height 60 -bd 2 -relief raised + frame .t.f -width 80 -height 60 -borderwidth 2 -relief raised place .t.f -x 50 -y 50 wm geom .t +0+0 update set x [winfo containing -display .t.f [expr {[winfo rootx .t]+600}] \ @@ -301,36 +301,36 @@ wm deiconify . } -result 0 test winfo-9.5 {"winfo viewable" command} -setup { deleteWindows } -body { - frame .f1 -width 100 -height 100 -relief raised -bd 2 + frame .f1 -width 100 -height 100 -relief raised -borderwidth 2 place .f1 -x 0 -y 0 - frame .f1.f2 -width 50 -height 50 -relief raised -bd 2 + frame .f1.f2 -width 50 -height 50 -relief raised -borderwidth 2 place .f1.f2 -x 0 -y 0 update list [winfo viewable .f1] [winfo viewable .f1.f2] } -cleanup { deleteWindows } -result {1 1} test winfo-9.6 {"winfo viewable" command} -setup { deleteWindows } -body { - frame .f1 -width 100 -height 100 -relief raised -bd 2 - frame .f1.f2 -width 50 -height 50 -relief raised -bd 2 + frame .f1 -width 100 -height 100 -relief raised -borderwidth 2 + frame .f1.f2 -width 50 -height 50 -relief raised -borderwidth 2 place .f1.f2 -x 0 -y 0 update list [winfo viewable .f1] [winfo viewable .f1.f2] } -cleanup { deleteWindows } -result {0 0} test winfo-9.7 {"winfo viewable" command} -constraints {failsOnUbuntu failsOnXQuarz} -setup { deleteWindows } -body { - frame .f1 -width 100 -height 100 -relief raised -bd 2 + frame .f1 -width 100 -height 100 -relief raised -borderwidth 2 place .f1 -x 0 -y 0 - frame .f1.f2 -width 50 -height 50 -relief raised -bd 2 + frame .f1.f2 -width 50 -height 50 -relief raised -borderwidth 2 place .f1.f2 -x 0 -y 0 update wm iconify . list [winfo viewable .f1] [winfo viewable .f1.f2] } -cleanup { @@ -384,11 +384,11 @@ test winfo-13.1 {root coordinates of embedded toplevel} -setup { deleteWindows } -body { frame .con -container 1 pack .con -expand yes -fill both - toplevel .emb -use [winfo id .con] -bd 0 -highlightthickness 0 + toplevel .emb -use [winfo id .con] -borderwidth 0 -highlightthickness 0 button .emb.b pack .emb.b -expand yes -fill both update list rootx [expr {[winfo rootx .emb] == [winfo rootx .con]}] \ @@ -407,11 +407,11 @@ test winfo-13.2 {destroying embedded toplevel} -setup { deleteWindows } -body { frame .con -container 1 pack .con -expand yes -fill both - toplevel .emb -use [winfo id .con] -bd 0 -highlightthickness 0 + toplevel .emb -use [winfo id .con] -borderwidth 0 -highlightthickness 0 button .emb.b pack .emb.b -expand yes -fill both update destroy .emb @@ -424,11 +424,11 @@ test winfo-13.3 {destroying container window} -setup { deleteWindows } -body { frame .con -container 1 pack .con -expand yes -fill both - toplevel .emb -use [winfo id .con] -bd 0 -highlightthickness 0 + toplevel .emb -use [winfo id .con] -borderwidth 0 -highlightthickness 0 button .emb.b pack .emb.b -expand yes -fill both update destroy .con @@ -441,11 +441,11 @@ test winfo-13.4 {[winfo containing] with embedded windows} -setup { deleteWindows } -body { frame .con -container 1 pack .con -expand yes -fill both - toplevel .emb -use [winfo id .con] -bd 0 -highlightthickness 0 + toplevel .emb -use [winfo id .con] -borderwidth 0 -highlightthickness 0 button .emb.b pack .emb.b -expand yes -fill both update button .b Index: tests/wm.test ================================================================== --- tests/wm.test +++ tests/wm.test @@ -526,11 +526,11 @@ wm deiconify _ } -result {bad window path name "_"} test wm-deiconify-1.4 {usage} -setup { destroy .icon } -body { - toplevel .icon -width 50 -height 50 -bg red + toplevel .icon -width 50 -height 50 -background red wm iconwindow .t .icon wm deiconify .icon } -returnCodes error -cleanup { destroy .icon } -result {can't deiconify .icon: it is an icon for .t} @@ -935,11 +935,11 @@ destroy .b } -result {can't use .b as icon window: not at top level} test wm-iconwindow-1.5 {usage} -setup { destroy .icon .t2 } -body { - toplevel .icon -width 50 -height 50 -bg green + toplevel .icon -width 50 -height 50 -background green toplevel .t2 wm geom .t2 -0+0 wm iconwindow .t2 .icon wm iconwindow .t .icon } -returnCodes error -cleanup { @@ -949,11 +949,11 @@ test wm-iconwindow-2.1 {setting and reading values} -setup { destroy .icon set result {} } -body { lappend result [wm iconwindow .t] - toplevel .icon -width 50 -height 50 -bg green + toplevel .icon -width 50 -height 50 -background green wm iconwindow .t .icon lappend result [wm iconwindow .t] wm iconwindow .t {} destroy .icon lappend result [wm iconwindow .t] @@ -1565,11 +1565,11 @@ } -result 1 test wm-stackorder-6.1 {An embedded toplevel does not appear in the \ stacking order} -body { toplevel .real -container 1 - toplevel .embd -bg blue -use [winfo id .real] + toplevel .embd -background blue -use [winfo id .real] update wm stackorder . } -cleanup { deleteWindows } -result {. .real} @@ -1617,20 +1617,20 @@ wm iconify .subject } -cleanup { deleteWindows } -result {can't iconify ".subject": it is a transient} test wm-transient-1.5 {usage} -returnCodes error -body { - toplevel .icon -bg blue + toplevel .icon -background blue toplevel .top wm iconwindow .top .icon toplevel .dummy wm transient .icon .dummy } -cleanup { deleteWindows } -result {can't make ".icon" a transient: it is an icon for .top} test wm-transient-1.6 {usage} -returnCodes error -body { - toplevel .icon -bg blue + toplevel .icon -background blue toplevel .top wm iconwindow .top .icon toplevel .dummy wm transient .dummy .icon } -cleanup {