tk8.6.14/0000755003604700454610000000000014567647314010567 5ustar dgp771divtk8.6.14/.github/0000755003604700454610000000000014567647314012127 5ustar dgp771divtk8.6.14/.github/workflows/0000755003604700454610000000000014567647314014164 5ustar dgp771divtk8.6.14/.github/workflows/win-build.yml0000644003604700454610000001233514554263144016574 0ustar dgp771divname: Windows on: push: branches: - "main" - "core-8-branch" - "core-8-6-branch" tags: - "core-**" permissions: contents: read env: ERROR_ON_FAILURES: 1 jobs: msvc: runs-on: windows-2022 defaults: run: shell: powershell working-directory: tk/win # Using powershell means we need to explicitly stop on failure strategy: matrix: config: - "" - "OPTS=symbols" - "OPTS=static" - "OPTS=static,staticpkg" steps: - name: Checkout Tk uses: actions/checkout@v4 with: path: tk - name: Checkout Tcl 8.6 uses: actions/checkout@v4 with: repository: tcltk/tcl ref: core-8-6-branch path: tcl - name: Init MSVC uses: ilammy/msvc-dev-cmd@v1 - name: Make Install Location working-directory: tcl run: | echo "TCLDIR=`pwd`" >> $GITHUB_ENV cd .. mkdir install cd install echo "INSTALLDIR=`pwd`" >> $GITHUB_ENV - name: Build Tcl (${{ matrix.config }}) run: | &nmake -f makefile.vc release install ${{ matrix.config }} if ($lastexitcode -ne 0) { throw "nmake exit code: $lastexitcode" } working-directory: tcl/win - name: Build Tk (${{ matrix.config }}) run: | &nmake -f makefile.vc all ${{ matrix.config }} if ($lastexitcode -ne 0) { throw "nmake exit code: $lastexitcode" } - name: Build Test Harness (${{ matrix.config }}) run: | &nmake -f makefile.vc tktest ${{ matrix.config }} if ($lastexitcode -ne 0) { throw "nmake exit code: $lastexitcode" } - name: Run Tk Tests (${{ matrix.config }}) run: | nmake -f makefile.vc test-classic ${{ matrix.config }} | tee out-classic.txt || { echo "::error::Failure during Test" exit 1 } nmake -f makefile.vc test-ttk ${{ matrix.config }} | tee out-ttk.txt || { echo "::error::Failure during Test" exit 1 } grep -q "Failed 0" out-classic.txt || { echo "::error::Failure during Test" exit 1 } grep -q "Failed 0" out-ttk.txt || { echo "::error::Failure during Test" exit 1 } env: CI_BUILD_WITH_MSVC: 1 shell: bash timeout-minutes: 10 - name: Build Help (${{ matrix.config }}) run: | &nmake -f makefile.vc htmlhelp ${{ matrix.config }} if ($lastexitcode -ne 0) { throw "nmake exit code: $lastexitcode" } - name: Install (${{ matrix.config }}) run: | &nmake -f makefile.vc install ${{ matrix.config }} if ($lastexitcode -ne 0) { throw "nmake exit code: $lastexitcode" } gcc: runs-on: windows-2019 defaults: run: shell: msys2 {0} working-directory: win strategy: matrix: config: - "" - "--enable-config=mem" - "--enable-config=all" - "--disable-shared" steps: - name: Install MSYS2 uses: msys2/setup-msys2@v2 with: msystem: MINGW64 install: git mingw-w64-x86_64-toolchain make - name: Checkout Tk uses: actions/checkout@v4 - name: Checkout Tcl 8.6 uses: actions/checkout@v4 with: repository: tcltk/tcl ref: core-8-6-branch path: tcl - name: Prepare run: | touch tkStubInit.c touch "${HOME}/forWinDialog-5.12.7" mkdir "${HOME}/install_dir" echo "INSTALL_DIR=${HOME}/install_dir" >> $GITHUB_ENV working-directory: generic - name: Configure and Build Tcl (${{ matrix.config }}) run: | ./configure $CFGOPT "--prefix=$INSTALL_DIR" || { cat config.log echo "::warning::Failure during Tcl Configure" exit 1 } make all install || { echo "::warning::Failure during Tcl Build" exit 1 } echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV env: CFGOPT: --enable-64bit ${{ matrix.config }} working-directory: tcl/win - name: Configure Tk (${{ matrix.config }}) run: | ./configure $CFGOPT "--prefix=$HOME/INSTALL_DIR" "--with-tcl=$TCL_CONFIG_PATH" || { cat config.log echo "::error::Failure during Configure" exit 1 } env: CFGOPT: --enable-64bit ${{ matrix.config }} - name: Build Tk run: | make all tktest || { echo "::error::Failure during Build" exit 1 } - name: Run Tk Tests run: | make test-classic | tee out-classic.txt make test-ttk | tee out-ttk.txt grep -q "Failed 0" out-classic.txt || { echo "::error::Failure during Test" exit 1 } grep -q "Failed 0" out-ttk.txt || { echo "::error::Failure during Test" exit 1 } timeout-minutes: 10 tk8.6.14/.github/workflows/mac-build.yml0000644003604700454610000001157714554263144016546 0ustar dgp771divname: macOS on: push: branches: - "main" - "core-8-branch" - "core-8-6-branch" tags: - "core-**" permissions: contents: read env: ERROR_ON_FAILURES: 1 jobs: xcode: runs-on: macos-11 defaults: run: shell: bash working-directory: tk/macosx steps: - name: Checkout Tk uses: actions/checkout@v4 with: path: tk - name: Checkout Tcl uses: actions/checkout@v4 with: repository: tcltk/tcl ref: core-8-6-branch path: tcl - name: Prepare checked out repositories run: | touch tk/generic/tkStubInit.c mkdir build echo "BUILD_DIR=`cd build && pwd`" >> $GITHUB_ENV echo "DESTDIR=`cd build && pwd`" >> $GITHUB_ENV working-directory: . - name: Build Tcl run: | make all working-directory: tcl/macosx - name: Build run: | make all install || { echo "::error::Failure during Build" exit 1 } - name: Run Tests run: | make test | tee out.txt nmatches=$( grep -c "Failed 0" out.txt ) if [ $nmatches -lt 4 ] then echo "::error::Failure during Test" exit 1 fi timeout-minutes: 30 clang: runs-on: macos-11 strategy: matrix: symbols: - 'no' - 'mem' options: - '--enable-aqua' - '--disable-aqua' defaults: run: shell: bash working-directory: tk/unix steps: - name: Checkout Tk uses: actions/checkout@v4 with: path: tk - name: Checkout Tcl uses: actions/checkout@v4 with: repository: tcltk/tcl ref: core-8-6-branch path: tcl - name: Prepare checked out repositories env: SET_DISPLAY: ${{ contains(matrix.options, '--disable-aqua') }} run: | touch ../generic/tkStubInit.c ../doc/man.macros mkdir "$HOME/install dir" echo "USE_XVFB=$SET_DISPLAY" >> $GITHUB_ENV - name: Add X11 (if required) if: ${{ env.USE_XVFB == 'true' }} run: | brew install --cask xquartz sudo /opt/X11/libexec/privileged_startx || true working-directory: . - name: Build Tcl # Note that macOS is always a 64 bit platform run: | ./configure --enable-64bit $CFGOPT "--prefix=$HOME/install dir" || { cat config.log echo "::error::Failure during Tcl Configure" exit 1 } make all || { echo "::error::Failure during Tcl Build" exit 1 } make install || { echo "::error::Failure during Tcl Install" exit 1 } working-directory: tcl/unix env: CFGOPT: --enable-symbols=${{ matrix.symbols }} - name: Configure (symbols=${{ matrix.symbols }} ${{matrix.options }}) # Note that macOS is always a 64 bit platform run: | ./configure --enable-64bit $CFGOPT "--prefix=$HOME/install dir" --disable-xft || { cat config.log echo "::error::Failure during Configure" exit 1 } env: CFGOPT: --enable-symbols=${{ matrix.symbols }} ${{matrix.options }} - name: Build run: | make binaries libraries tktest || { echo "::error::Failure during Build" exit 1 } - name: Run Tests run: | if [ $USE_XVFB == true ]; then function runXvfb { PATH=$PATH:/opt/X11/bin Xvfb $1 & XVFB_PID=$! echo Launched Xvfb $1 as process $XVFB_PID >&2 trap "echo killing process $XVFB_PID... >&2; kill $XVFB_PID" 0 export DISPLAY=$1 sleep 2 } else function runXvfb { echo Xvfb not used, this is a --enable-aqua build } fi ( runXvfb :0; make test-classic; exit $? ) | tee out-classic.txt || { echo "::error::Failure during Test (classic)" exit 1 } ( runXvfb :0; make test-ttk; exit $? ) | tee out-ttk.txt || { echo "::error::Failure during Test (ttk)" exit 1 } cat out-classic.txt | grep -q "Failed 0" || { echo "::error::Failure in classic test results" exit 1 } cat out-ttk.txt | grep -q "Failed 0" || { echo "::error::Failure in ttk test results" exit 1 } timeout-minutes: 20 - name: Carry out trial installation run: | make install || { cat config.log echo "::error::Failure during Install" exit 1 } tk8.6.14/.github/workflows/linux-build.yml0000644003604700454610000001143214554263144017133 0ustar dgp771divname: Linux on: push: branches: - "main" - "core-8-branch" - "core-8-6-branch" tags: - "core-**" permissions: contents: read defaults: run: shell: bash working-directory: tk/unix env: ERROR_ON_FAILURES: 1 jobs: build: runs-on: ubuntu-22.04 strategy: matrix: compiler: - "gcc" - "clang" config: - "" - "--disable-shared" - "--disable-xft" - "--disable-xss" - "--enable-symbols" steps: - name: Checkout Tk uses: actions/checkout@v4 with: path: tk - name: Checkout Tcl 8.6 uses: actions/checkout@v4 with: repository: tcltk/tcl ref: core-8-6-branch path: tcl - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | sudo apt-get install tcl8.6-dev libxss-dev libxft-dev mkdir "$HOME/install dir" touch tk/doc/man.macros tk/generic/tkStubInit.c echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV echo "CC=$COMPILER" >> $GITHUB_ENV echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV working-directory: "." env: CFGOPT: ${{ matrix.config }} COMPILER: ${{ matrix.compiler }} OPTS: ${{ matrix.compiler }}${{ matrix.config }} - name: Configure (opts=${{ matrix.config }}) run: | ./configure $CFGOPT "--prefix=$HOME/install dir" || { cat config.log echo "::error::Failure during Configure" exit 1 } - name: Build run: | make binaries libraries || { echo "::error::Failure during Build" exit 1 } - name: Build Test Harness run: | make tktest || { echo "::error::Failure during Build" exit 1 } - name: Test-Drive Installation run: | make install || { echo "::error::Failure during Install" exit 1 } - name: Create Distribution Package run: | make dist || { echo "::error::Failure during Distribute" exit 1 } - name: Convert Documentation to HTML run: | make html-tk TOOL_DIR=$TOOL_DIR || { echo "::error::Failure during Distribute" exit 1 } - name: Discover Version ID if: ${{ env.BUILD_CONFIG_ID == 'gcc' }} run: | cd /tmp/dist echo "VERSION=`ls -d tk* | sed 's/tk//'`" >> $GITHUB_ENV - name: Upload Source Distribution if: ${{ env.BUILD_CONFIG_ID == 'gcc' }} uses: actions/upload-artifact@v4 with: name: Tk ${{ env.VERSION }} Source distribution (snapshot) path: | /tmp/dist/tk* !/tmp/dist/tk*/html/** - name: Upload Documentation Distribution if: ${{ env.BUILD_CONFIG_ID == 'gcc' }} uses: actions/upload-artifact@v4 with: name: Tk ${{ env.VERSION }} HTML documentation (snapshot) path: /tmp/dist/tk*/html test: runs-on: ubuntu-20.04 strategy: matrix: compiler: - "gcc" config: - "" - "--disable-xft" - "--enable-symbols" steps: - name: Checkout Tk uses: actions/checkout@v4 with: path: tk - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | sudo apt-get install tcl8.6-dev libxss-dev libxft-dev xvfb mkdir "$HOME/install dir" touch tk/doc/man.macros tk/generic/tkStubInit.c echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV echo "CC=$COMPILER" >> $GITHUB_ENV working-directory: "." env: CFGOPT: ${{ matrix.config }} COMPILER: ${{ matrix.compiler }} - name: Configure ${{ matrix.config }} run: | ./configure $CFGOPT "--prefix=$HOME/install dir" || { cat config.log echo "::error::Failure during Configure" exit 1 } - name: Build run: | make binaries libraries tktest || { echo "::error::Failure during Build" exit 1 } - name: Run Tests run: | xvfb-run --auto-servernum make test-classic | tee out-classic.txt xvfb-run --auto-servernum make test-ttk | tee out-ttk.txt grep -q "Failed 0" out-classic.txt || { echo "::error::Failure during Test" exit 1 } grep -q "Failed 0" out-ttk.txt || { echo "::error::Failure during Test" exit 1 } timeout-minutes: 10 tk8.6.14/tests/0000755003604700454610000000000014567647314011731 5ustar dgp771divtk8.6.14/tests/ttk/0000755003604700454610000000000014567647314012533 5ustar dgp771divtk8.6.14/tests/ttk/all.tcl0000644003604700454610000000146314554262361014002 0ustar dgp771div# all.tcl -- # # This file contains a top-level script to run all of the ttk # tests. Execute it by invoking "source all.tcl" when running tktest # in this directory. # # Copyright © 2007 by the Tk developers. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. package require Tk ;# This is the Tk test suite; fail early if no Tk! package require tcltest 2.2 tcltest::configure {*}$argv tcltest::configure -testdir [file normalize [file dirname [info script]]] tcltest::configure -loadfile \ [file join [file dirname [tcltest::testsDirectory]] constraints.tcl] tcltest::configure -singleproc 1 set ErrorOnFailures [info exists env(ERROR_ON_FAILURES)] encoding system utf-8 if {[tcltest::runAllTests] && $ErrorOnFailures} {exit 1} tk8.6.14/tests/ttk/vsapi.test0000644003604700454610000000322514554262361014547 0ustar dgp771div# -*- tcl -*- # package require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands testConstraint xpnative \ [expr {"xpnative" in [ttk::style theme names]}] test vsapi-1.1 "WINDOW WP_SMALLCLOSEBUTTON" -constraints {xpnative} -body { ttk::style element create smallclose vsapi \ WINDOW 19 {disabled 4 pressed 3 active 2 {} 1} ttk::style layout CloseButton {CloseButton.smallclose -sticky news} ttk::button .b -style CloseButton pack .b -expand true -fill both list [winfo reqwidth .b] [winfo reqheight .b] } -cleanup { destroy .b } -result [list 13 13] test vsapi-1.2 "EXPLORERBAR EBP_HEADERPIN" -constraints {xpnative} -body { ttk::style element create pin vsapi \ EXPLORERBAR 3 { {pressed !selected} 3 {active !selected} 2 {pressed selected} 6 {active selected} 5 {selected} 4 {} 1 } ttk::style layout Explorer.Pin {Explorer.Pin.pin -sticky news} ttk::checkbutton .pin -style Explorer.Pin pack .pin -expand true -fill both list [winfo reqwidth .pin] [winfo reqheight .pin] } -cleanup { destroy .pin } -result [list 16 16] test vsapi-1.3 "EXPLORERBAR EBP_HEADERCLOSE" -constraints {xpnative} -body { ttk::style element create headerclose vsapi \ EXPLORERBAR 2 {pressed 3 active 2 {} 1} ttk::style layout Explorer.CloseButton { Explorer.CloseButton.headerclose -sticky news } ttk::button .b -style Explorer.CloseButton pack .b -expand true -fill both list [winfo reqwidth .b] [winfo reqheight .b] } -cleanup { destroy .b } -result [list 16 16] tcltest::cleanupTests tk8.6.14/tests/ttk/validate.test0000644003604700454610000001766014554262361015226 0ustar dgp771div## ## Entry widget validation tests ## Derived from core test suite entry-19.1 through entry-19.20 ## package require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands testConstraint ttkEntry 1 testConstraint coreEntry [expr {![testConstraint ttkEntry]}] eval tcltest::configure $argv test validate-0.0 "Setup" -constraints ttkEntry -body { rename entry {} interp alias {} entry {} ttk::entry return; } test validate-0.1 "More setup" -body { destroy .e catch {unset ::e} catch {unset ::vVals} entry .e -validate all \ -validatecommand [list doval %W %d %i %P %s %S %v %V] \ -invalidcommand bell \ -textvariable ::e \ ; pack .e proc doval {W d i P s S v V} { set ::vVals [list $W $d $i $P $s $S $v $V] return 1 } } # The validation tests build each one upon the previous, so cascading # failures aren't good # test validate-1.1 {entry widget validation - insert} -body { .e insert 0 a set ::vVals } -result {.e 1 0 a {} a all key} test validate-1.2 {entry widget validation - insert} -body { .e insert 1 b set ::vVals } -result {.e 1 1 ab a b all key} test validate-1.3 {entry widget validation - insert} -body { .e insert end c set ::vVals } -result {.e 1 2 abc ab c all key} test validate-1.4 {entry widget validation - insert} -body { .e insert 1 123 list $::vVals $::e } -result {{.e 1 1 a123bc abc 123 all key} a123bc} test validate-1.5 {entry widget validation - delete} -body { .e delete 2 set ::vVals } -result {.e 0 2 a13bc a123bc 2 all key} test validate-1.6 {entry widget validation - delete} -body { .e configure -validate key .e delete 1 3 set ::vVals } -result {.e 0 1 abc a13bc 13 key key} test validate-1.7 {entry widget validation - vmode focus} -body { set ::vVals {} .e configure -validate focus .e insert end d set ::vVals } -result {} test validate-1.8 {entry widget validation - vmode focus} -body { set ::vVals {} set timer [after 300 lappend ::vVals timeout] focus -force .e vwait ::vVals after cancel $timer set ::vVals } -result {.e -1 -1 abcd abcd {} focus focusin} test validate-1.9 {entry widget validation - vmode focus} -body { set ::vVals {} set timer [after 300 lappend ::vVals timeout] focus -force . vwait ::vVals after cancel $timer set ::vVals } -result {.e -1 -1 abcd abcd {} focus focusout} .e configure -validate all test validate-1.10 {entry widget validation - vmode all} -body { set ::vVals {} set timer [after 300 lappend ::vVals timeout] focus -force .e vwait ::vVals after cancel $timer set ::vVals } -result {.e -1 -1 abcd abcd {} all focusin} test validate-1.11 {entry widget validation} -body { set ::vVals {} set timer [after 300 lappend ::vVals timeout] focus -force . vwait ::vVals after cancel $timer set ::vVals } -result {.e -1 -1 abcd abcd {} all focusout} .e configure -validate focusin test validate-1.12 {entry widget validation} -body { set ::vVals {} set timer [after 300 lappend ::vVals timeout] focus -force .e vwait ::vVals after cancel $timer set ::vVals } -result {.e -1 -1 abcd abcd {} focusin focusin} test validate-1.13 {entry widget validation} -body { set ::vVals {} focus -force . update set ::vVals } -result {} .e configure -validate focuso test validate-1.14 {entry widget validation} -body { set ::vVals {} focus -force .e update set ::vVals } -result {} test validate-1.15 {entry widget validation} -body { focus -force . # update necessary to process FocusOut event update set ::vVals } -result {.e -1 -1 abcd abcd {} focusout focusout} # DIFFERENCE: core entry temporarily sets "-validate all", ttk::entry doesn't. test validate-1.16 {entry widget validation} -body { .e configure -validate all list [.e validate] $::vVals } -result {1 {.e -1 -1 abcd abcd {} all forced}} # DIFFERENCE: ttk::entry does not perform validation when setting the -variable test validate-1.17 {entry widget validation} -constraints coreEntry -body { .e configure -validate all set ::e newdata list [.e cget -validate] $::vVals } -result {all {.e -1 -1 newdata abcd {} all forced}} proc doval {W d i P s S v V} { set ::vVals [list $W $d $i $P $s $S $v $V] return 0 } test validate-1.18 {entry widget validation} -constraints coreEntry -body { .e configure -validate all set ::e nextdata list [.e cget -validate] $::vVals } -result {none {.e -1 -1 nextdata newdata {} all forced}} # DIFFERENCE: ttk::entry doesn't validate when setting linked -variable # DIFFERENCE: ttk::entry doesn't disable validation proc doval {W d i P s S v V} { set ::vVals [list $W $d $i $P $s $S $v $V] set ::e mydata return 1 } ## This sets validate to none because it shows that we prevent a possible ## loop condition in the validation, when the entry textvar is also set test validate-1.19 {entry widget validation} -constraints coreEntry -body { .e configure -validate all .e validate list [.e cget -validate] [.e get] $::vVals } -result {none mydata {.e -1 -1 nextdata nextdata {} all forced}} ## This leaves validate alone because we trigger validation through the ## textvar (a write trace), and the write during validation triggers ## nothing (by definition of avoiding loops on var traces). This is ## one of those "dangerous" conditions where the user will have a ## different value in the entry widget shown as is in the textvar. # DIFFERENCE: ttk entry doesn't get out of sync w/textvar test validate-1.20 {entry widget validation} -constraints coreEntry -body { .e configure -validate all set ::e testdata list [.e cget -validate] [.e get] $::e $::vVals } -result {all testdata mydata {.e -1 -1 testdata mydata {} all forced}} # # New tests, -JE: # proc doval {W d i P s S v V} { set ::vVals [list $W $d $i $P $s $S $v $V] .e delete 0 end; .e insert end dovaldata return 0 } test validate-2.1 "Validation script changes value" -body { .e configure -validate none set ::e testdata .e configure -validate all .e validate list [.e get] $::e $::vVals } -result {dovaldata dovaldata {.e -1 -1 testdata testdata {} all forced}} # DIFFERENCE: core entry disables validation, ttk entry does not. destroy .e catch {unset ::e ::vVals} # See bug #1236979 test validate-2.2 "configure in -validatecommand" -body { proc validate-2.2 {win str} { $win configure -foreground black return 1 } ttk::entry .e -textvariable var -validatecommand {validate-2.2 %W %P} .e validate } -result 1 -cleanup { destroy .e } ### invalid state behavior # test validate-3.0 "Setup" -body { set ::E "123" ttk::entry .e \ -validatecommand {string is integer -strict %P} \ -validate all \ -textvariable ::E \ ; return [list [.e get] [.e state]] } -result [list 123 {}] test validate-3.1 "insert - valid" -body { .e insert end "4" return [list [.e get] [.e state]] } -result [list 1234 {}] test validate-3.2 "insert - invalid" -body { .e insert end "X" return [list [.e get] [.e state]] } -result [list 1234 {}] test validate-3.3 "force invalid value" -body { append ::E "XY" return [list [.e get] [.e state]] } -result [list 1234XY {}] test validate-3.4 "revalidate" -body { return [list [.e validate] [.e get] [.e state]] } -result [list 0 1234XY {invalid}] testConstraint NA 0 # the next two tests (used to) exercise validation lockout protection -- # if the widget is currently invalid, all edits are allowed. # This behavior is currently disabled. # test validate-3.5 "all edits allowed while invalid" -constraints NA -body { .e delete 4 return [list [.e get] [.e state]] } -result [list 1234Y {invalid}] test validate-3.6 "...until the value becomes valid" -constraints NA -body { .e delete 4 return [list [.e get] [.e state]] } -result [list 1234 {}] test validate-3.last "Cleanup" -body { destroy .e } ### tcltest::cleanupTests tk8.6.14/tests/ttk/ttk.test0000644003604700454610000004275614563211205014232 0ustar dgp771div package require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands proc skip args {} proc ok {} { return } variable widgetClasses { button checkbutton radiobutton menubutton label entry frame labelframe scrollbar notebook progressbar combobox separator panedwindow treeview sizegrip scale } proc bgerror {error} { variable bgerror $error variable bgerrorInfo $::errorInfo variable bgerrorCode $::errorCode } # Self-destruct tests. # Do these early, so any memory corruption has a longer time to cause a crash. # proc selfdestruct {w args} { destroy $w } test ttk-6.1 "Self-destructing checkbutton" -body { pack [ttk::checkbutton .sd -text "Self-destruction" -variable ::sd] trace add variable sd write [list selfdestruct .sd] update .sd invoke } -returnCodes error test ttk-6.2 "Checkbutton self-destructed" -body { winfo exists .sd } -result 0 # test ttk-6.3 not applicable [see #2175411] test ttk-6.4 "Destroy widget in configure" -setup { set OUCH ouch trace add variable OUCH read { kill.b } proc kill.b {args} { destroy .b } } -cleanup { unset OUCH } -body { pack [ttk::checkbutton .b] set rc [catch { .b configure -variable OUCH } msg] list $rc $msg [winfo exists .b] [info commands .b] } -result [list 1 "widget has been destroyed" 0 {}] test ttk-6.5 "Clean up -textvariable traces" -body { foreach class {ttk::button ttk::checkbutton ttk::radiobutton} { $class .b1 -textvariable V set V "asdf" destroy .b1 set V "" } } test ttk-6.6 "Bad color spec in styles" -body { pack [ttk::button .b1 -text Hi!] ttk::style configure TButton -foreground badColor event generate .b1 update ttk::style configure TButton -foreground black destroy .b1 set ::bgerror } -result {unknown color name "badColor"} test ttk-6.7 "Basic destruction test" -body { foreach widget $widgetClasses { ttk::$widget .w pack .w destroy .w } } test ttk-6.8 "Button command removes itself" -body { ttk::button .b -command ".b configure -command {}; set ::A {it worked}" .b invoke destroy .b set ::A } -result {it worked} test ttk-6.9 "Bad font spec in styles" -setup { ttk::style theme create badfont -settings { ttk::style configure . -font {Helvetica 12 Bogus} } ttk::style theme use badfont } -cleanup { ttk::style theme use default } -body { pack [ttk::label .l -text Hi! -font {}] event generate .l update destroy .l set ::bgerror } -result {unknown font style "Bogus"} test ttk-construction-failure-1 "Excercise construction failure path" -setup { option add *TLabel.cursor badCursor 1 } -cleanup { option add *TLabel.cursor {} 1 } -body { catch {ttk::label .l} errmsg list $errmsg [info commands .l] [winfo exists .l] } -result [list {bad cursor spec "badCursor"} {} 0] test ttk-construction-failure-2 "Destroy widget in constructor" -setup { set OUCH ouch trace add variable OUCH read { kill.b } proc kill.b {args} { destroy .b } } -cleanup { unset OUCH } -body { list \ [catch { ttk::checkbutton .b -variable OUCH } msg] \ $msg \ [winfo exists .b] \ [info commands .b] \ ; } -result [list 1 "widget has been destroyed" 0 {}] test ttk-selfdestruct-ok-1 "Intentional self-destruction" -body { # see #2298720 toplevel .t ttk::button .t.b -command [list destroy .t] .t.b invoke list [winfo exists .t] [winfo exists .t.b] } -result [list 0 0] # # Basic tests. # test ttk-1.1 "Create button" -body { pack [ttk::button .t] -expand true -fill both update } test ttk-1.2 "Check style" -body { .t cget -style } -result {} test ttk-1.3 "Set bad style" -body { .t configure -style "nosuchstyle" } -returnCodes error -result {Layout nosuchstyle not found} test ttk-1.4 "Original style preserved" -body { .t cget -style } -result "" proc checkstate {w} { foreach statespec { {!active !disabled} {!active disabled} {active !disabled} {active disabled} active disabled } { lappend result [$w instate $statespec] } set result } # NB: this will fail if the top-level window pops up underneath the cursor test ttk-2.0 "Check state" -body { checkstate .t } -result [list 1 0 0 0 0 0] test ttk-2.1 "Change state" -body { .t state active } -result !active test ttk-2.2 "Check state again" -body { checkstate .t } -result [list 0 0 1 0 1 0] test ttk-2.3 "Change state again" -body { .t state {!active disabled} } -result {active !disabled} test ttk-2.4 "Check state again" -body { checkstate .t } -result [list 0 1 0 0 0 1] test ttk-2.5 "Change state again" -body { .t state !disabled } -result {disabled} test ttk-2.6 "instate scripts, false" -body { set x 0 .t instate disabled { set x 1 } set x } -result 0 test ttk-2.7 "instate scripts, true" -body { set x 0 .t instate !disabled { set x 1 } set x } -result 1 test ttk-2.8 "bug 3223850: button state disabled during click" -setup { destroy .b set ttk28 {} pack [ttk::button .b -command {set ::ttk28 failed}] update } -body { bind .b {after 0 {.b configure -state disabled}} after 1 {event generate .b } after 50 {event generate .b } set aid [after 100 {set ::ttk28 [.b instate {disabled !pressed}]}] vwait ::ttk28 after cancel $aid set ttk28 } -cleanup { destroy .b unset -nocomplain ttk28 aid } -result 1 foreach wc $widgetClasses { test ttk-coreoptions-$wc "$wc has all core options" -body { ttk::$wc .w foreach option {-class -style -cursor -takefocus} { .w cget $option } } -cleanup { catch {destroy .w} } } # misc. error detection test ttk-3.0 "Bad option" -body { ttk::button .bad -badoption foo } -returnCodes error -result {unknown option "-badoption"} -match glob test ttk-3.1 "Make sure widget command not created" -body { .bad state disabled } -returnCodes error -result {invalid command name ".bad"} -match glob test ttk-3.2 "Propagate errors from variable traces" -body { set A 0 trace add variable A write {error "failure" ;# } ttk::checkbutton .cb -variable A .cb invoke } -cleanup { unset ::A ; destroy .cb } -returnCodes error -result {can't set "A": failure} test ttk-3.3 "Constructor failure with cursor" -body { ttk::button .b -cursor bottom_right_corner -style BadStyle } -returnCodes error -result "Layout BadStyle not found" test ttk-3.4 "SF#2009213" -body { ttk::style configure TScale -sliderrelief {} pack [ttk::scale .s] update } -cleanup { ttk::style configure TScale -sliderrelief raised destroy .s } # Test resource allocation # (@@@ "-font" is a compatibility option now, so tests 4.1-4.3 # don't really test anything useful at the moment.) # test ttk-4.0 "Setup" -body { catch { destroy .t } pack [ttk::label .t -text "Button 1"] testConstraint fontOption [expr {![catch { set prevFont [.t cget -font] }]}] ok } test ttk-4.1 "Change font" -constraints fontOption -body { .t configure -font "Helvetica 18 bold" } test ttk-4.2 "Check font" -constraints fontOption -body { .t cget -font } -result "Helvetica 18 bold" test ttk-4.3 "Restore font" -constraints fontOption -body { .t configure -font $prevFont } test ttk-4.4 "Bad resource specifications" -body { ttk::style theme settings alt { ttk::style configure TButton -font {Bad font} # @@@ it would be best to raise an error at this point, # @@@ but that's not really feasible in the current framework. } pack [ttk::button .tb1 -text "Ouch"] ttk::style theme use alt update; # As long as we haven't crashed, everything's OK ttk::style theme settings alt { ttk::style configure TButton -font TkDefaultFont } ttk::style theme use default destroy .tb1 } # # -compound tests: # variable iconData \ {R0lGODlhIAAgAKIAANnZ2YQAAP8AAISEhP///////////////yH5BAEAAAAALAAAAAAgACAA AAP/CLoMGLqKoMvtGIqiqxEYCLrcioGiyxwIusyBgaLLLRiBoMsQKLrcjYGgu4Giy+2CAkFX A0WX2wXFIOgGii7trkCEohsDCACBoktEKLpKhISiGwAIECiqSKooukiqKKoxgACBooukKiIo SKooujGDECi6iqQqsopEV2MQAkV3kXQZRXdjEAJFl5F0FUWXY3ACRZcFSRdFlyVwJlB0WZB0 UXRZAmcCRZeRdBVFl2NwAkV3kXQZRXdjcAJFV5FURVaR6GoMDgSKLpKqiKAgqaLoxgwOBIoq kiqKLpIqimrM4ECg6BIRiq4SIaHoxgyCBoou7a5AhKIbMzgAAIGiy+2CTWJmBhAAAkWX2wXF zCDoBooud2PMDIKuRqDocgtGzMwg6O4Eii5z4Kgi6DIMhqLoagQGjiqCLvPgYOgqji6CLrfi 6DIj6HI7jq4i6DIkADs=} variable compoundStrings {text image center top bottom left right none} if {0} { proc now {} { set ::now [clock clicks -milliseconds] } proc tick {} { puts -nonewline stderr "+" ; flush stderr } proc tock {} { set then $::now; set ::now [clock clicks -milliseconds] puts stderr " [expr {$::now - $then}] ms" } } else { proc now {} {} ; proc tick {} {} ; proc tock {} {} } now ; tick test ttk-8.0 "Setup for 8.X" -body { ttk::button .ctb image create photo icon -data $::iconData; pack .ctb } tock now test ttk-8.1 "Test -compound options" -body { # Exhaustively test each combination. # Main goal is to make sure no code paths crash. foreach image {icon ""} { foreach text {"Hi!" ""} { foreach compound $::compoundStrings { .ctb configure -image $image -text $text -compound $compound update; tick } } } } tock test ttk-8.2 "Test -compound options with regular button" -body { button .rtb pack .rtb foreach image {"" icon} { foreach text {"Hi!" ""} { foreach compound [lrange $::compoundStrings 2 end] { .rtb configure -image $image -text $text -compound $compound update; tick } } } } tock test ttk-8.3 "Rerun test 8.1" -body { foreach image {icon ""} { foreach text {"Hi!" ""} { foreach compound $::compoundStrings { .ctb configure -image $image -text $text -compound $compound update; tick } } } } tock test ttk-8.4 "ImageChanged" -body { ttk::button .b -image icon icon blank } -cleanup { destroy .b } #------------------------------------------------------------------------ test ttk-9.1 "Traces on nonexistant namespaces" -body { ttk::checkbutton .tcb -variable foo::bar } -returnCodes error -result "*parent namespace doesn't exist*" -match glob test ttk-9.2 "Traces on nonexistant namespaces II" -body { ttk::checkbutton .tcb -variable X .tcb configure -variable foo::bar } -returnCodes error -result "*parent namespace doesn't exist*" -match glob test ttk-9.3 "Restore saved options on configure error" -body { .tcb cget -variable } -result X test ttk-9.4 "Textvariable tests" -body { set tcbLabel "Testing..." .tcb configure -textvariable tcbLabel .tcb cget -text } -result "Testing..." # Changing -text has no effect if there is a linked -textvariable. # Compatible with core widget. test ttk-9.5 "Change -text" -body { .tcb configure -text "Changed -text" .tcb cget -text } -result "Testing..." # Unset -textvariable clears the text. # NOTE: this is different from core widgets, which automagically reinitalize # the -textvariable to the last value of -text. # test ttk-9.6 "Unset -textvariable" -body { unset tcbLabel list [info exists tcbLabel] [.tcb cget -text] } -result [list 0 ""] test ttk-9.7 "Unset textvariable, comparison" -body { # # NB: ttk::label behaves differently from the standard label here; # NB: this is on purpose: I believe the standard behaviour is the Wrong Thing # unset -nocomplain V1 V2 label .l -text Foo ; ttk::label .tl -text Foo .l configure -textvariable V1 ; .tl configure -textvariable V2 list [set V1] [info exists V2] } -cleanup { destroy .l .tl } -result [list Foo 0] test ttk-9.8 "-textvariable overrides -text" -body { ttk::label .tl -textvariable TV set TV Foo .tl configure -text Bar .tl cget -text } -cleanup { destroy .tl } -result "Foo" test ttk-9.9 "default for -justify" -body { ttk::label .tl .tl cget -justify } -cleanup { destroy .tl } -result "left" test ttk-9.10 "default for -anchor" -body { ttk::label .tl .tl cget -anchor } -cleanup { destroy .tl } -result "w" # # Frame widget tests: # test ttk-10.1 "ttk::frame -class resource" -body { ttk::frame .f -class Foo } -result .f test ttk-10.2 "Check widget class" -body { winfo class .f } -result Foo test ttk-10.3 "Check class resource" -body { .f cget -class } -result Foo test ttk-10.4 "Try to modify class resource" -body { .f configure -class Bar } -returnCodes error -match glob -result "*read-only option*" test ttk-10.5 "Check class resource again" -body { .f cget -class } -result Foo test ttk-11.1 "-state test, setup" -body { ttk::button .b .b instate disabled } -result 0 test ttk-11.2 "-state test, disable" -body { .b configure -state disabled .b instate disabled } -result 1 test ttk-11.3 "-state test, reenable" -body { .b configure -state normal .b instate disabled } -result 0 test ttk-11.4 "-state test, unrecognized -state value" -body { .b configure -state bogus .b state } -result [list] test ttk-11.5 "-state test, 'active'" -body { .b configure -state active .b state } -result [list active] -cleanup { .b state !active } test ttk-11.6 "-state test, 'readonly'" -body { .b configure -state readonly .b state } -result [list readonly] -cleanup { .b state !readonly } test ttk-11.7 "-state test, cleanup" -body { destroy .b } test ttk-12.1 "-cursor option" -body { ttk::button .b .b cget -cursor } -result {} test ttk-12.2 "-cursor option" -body { .b configure -cursor arrow .b cget -cursor } -result arrow test ttk-12.2.1 "-cursor option, widget doesn't overwrite it" -setup { ttk::treeview .tr pack .tr update } -body { .tr configure -cursor X_cursor event generate .tr update .tr cget -cursor } -cleanup { destroy .tr } -result {X_cursor} test ttk-12.3 "-borderwidth frame option" -body { destroy .t toplevel .t raise .t pack [set t [ttk::frame .t.f]] -expand true -fill x ; pack [ttk::label $t.l -text "ASDF QWERTY"] -expand true -fill both foreach theme {default alt} { ttk::style theme use $theme foreach relief {flat raised sunken ridge groove solid} { $t configure -relief $relief for {set i 5} {$i >= 0} {incr i -1} { $t configure -borderwidth $i update } } } } test ttk-12.4 "-borderwidth frame option" -body { .t.f configure -relief raised .t.f configure -borderwidth 1 ttk::style theme use alt update } test ttk-13.1 "Custom styles -- bad -style option" -body { ttk::button .tb1 -style badstyle } -returnCodes error -result "*badstyle not found*" -match glob test ttk-13.4 "Custom styles -- bad -style option" -body { ttk::button .tb1 .tb1 configure -style badstyle } -cleanup { destroy .tb1 } -returnCodes error -result "*badstyle not found*" -match glob test ttk-13.5 "Custom layouts -- missing element definition" -body { ttk::style layout badstyle { NoSuchElement } ttk::button .tb1 -style badstyle } -cleanup { destroy .tb1 } -result .tb1 # @@@ Should: signal an error, possibly a background error. # # See #793909 # test ttk-14.1 "-variable in nonexistant namespace" -body { ttk::checkbutton .tw -variable ::nsn::foo } -returnCodes error -result {can't trace *: parent namespace doesn't exist} \ -match glob -cleanup { destroy .tw } test ttk-14.2 "-textvariable in nonexistant namespace" -body { ttk::label .tw -textvariable ::nsn::foo } -returnCodes error -result {can't trace *: parent namespace doesn't exist} \ -match glob -cleanup { destroy .tw } test ttk-14.3 "-textvariable in nonexistant namespace" -body { ttk::entry .tw -textvariable ::nsn::foo } -returnCodes error -result {can't trace *: parent namespace doesn't exist} \ -match glob -cleanup { destroy .tw } test ttk-15.1 {Bug 3062331} -setup { destroy .b } -body { set Y {} ttk::button .b -textvariable Y trace add variable Y unset "destroy .b; #" unset Y } -cleanup { destroy .b } -result {} test ttk-15.2 {Bug 3341056} -setup { proc foo {} { destroy .lf ttk::labelframe .lf ttk::checkbutton .lf.cb -text xxx } } -body { ttk::button .b -text xxx -command foo .b invoke .b invoke .lf.cb invoke destroy .b } -cleanup { rename foo {} destroy .lf } -result {} ## Test ensemble processing: # # (See also: SF#2021443) # proc wrong#args {args} { return "wrong # args: should be \"$args\"" } proc wrong#varargs {varpart args} { set usage $args append usage " ?$varpart ...?" return "wrong # args: should be \"$usage\"" } test ttk-ensemble-0 "style element create: insufficient args" -body { ttk::style } -returnCodes error -result \ [wrong#varargs arg ttk::style option] test ttk-ensemble-1 "style element create: insufficient args" -body { ttk::style element } -returnCodes error -result \ [wrong#varargs arg ttk::style element option] test ttk-ensemble-2 "style element create: insufficient args" -body { ttk::style element create } -returnCodes error -result \ [wrong#varargs {-option value} ttk::style element create name type] test ttk-ensemble-3 "style element create: insufficient args" -body { ttk::style element create plain.background } -returnCodes error -result \ [wrong#varargs {-option value} ttk::style element create name type] test ttk-ensemble-4 "style element create: insufficient args" -body { ttk::style element create plain.background from } -returnCodes error -result [wrong#args theme ?element?] test ttk-ensemble-5 "style element create: valid" -body { ttk::style element create plain.background from default } -returnCodes 0 -result "" destroy {*}[winfo children .] tcltest::cleanupTests #*EOF* tk8.6.14/tests/ttk/treeview.test0000644003604700454610000007376414554262361015276 0ustar dgp771div# # [7Jun2005] TO CHECK: [$tv see {}] -- shouldn't work (at least, shouldn't do # what it currently does) # package require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands # consistencyCheck -- # Traverse the tree to make sure the item data structures # are properly linked. # # Since [$tv children] follows ->next links and [$tv index] # follows ->prev links, this should cover all invariants. # proc consistencyCheck {tv {item {}}} { set i 0 foreach child [$tv children $item] { assert {[$tv parent $child] == $item} "parent $child = $item" assert {[$tv index $child] == $i} "index $child [$tv index $child]=$i" incr i consistencyCheck $tv $child } } proc assert {expr {message ""}} { if {![uplevel 1 [list expr $expr]]} { set error "PANIC! PANIC! PANIC: $message ($expr failed)" puts stderr $error error $error } } proc tvSetup {} { destroy .tv ttk::treeview .tv -columns {a b c} pack .tv -expand true -fill both .tv column #0 -width 50 .tv column a -width 50 .tv column b -width 50 .tv column c -width 50 # Make sure everything is created and updated tkwait visibility .tv update after 10 update } proc tvSetupWithItems {} { tvSetup .tv insert {} end -id nn -text "nn" .tv insert nn end -id nn.n1 -text "nn.1" .tv insert nn end -id nn.n2 -text "nn.3" .tv insert nn end -id nn.n3 -text "nn.3" for {set t 2} {$t < 100} {incr t} { .tv insert {} end -id nn$t -text "nn$t" if {$t % 3 == 0} { .tv insert nn$t end -id nn$t.n1 -text "nn$t.n1" .tv insert nn$t end -id nn$t.n2 -text "nn$t.n2" .tv insert nn$t end -id nn$t.n3 -text "nn$t.n3" } } } test treeview-1.1 "columns" -body { tvSetup .tv configure -columns {a b c} } test treeview-1.2 "Bad columns" -body { #.tv configure -columns {illegal "list"value} ttk::treeview .badtv -columns {illegal "list"value} } -returnCodes error -result "list element in quotes followed by*" -match glob test treeview-1.3 "bad displaycolumns" -body { .tv configure -displaycolumns {a b d} } -returnCodes error -result "Invalid column index d" test treeview-1.4 "more bad displaycolumns" -body { .tv configure -displaycolumns {1 2 3} } -returnCodes error -result "Column index 3 out of bounds" test treeview-1.5 "Don't forget to check negative numbers" -body { .tv configure -displaycolumns {1 -2 3} } -returnCodes error -result "Column index -2 out of bounds" # Item creation. # test treeview-2.1 "insert -- not enough args" -body { .tv insert } -returnCodes error -result "wrong # args: *" -match glob test treeview-2.3 "insert -- bad integer index" -body { .tv insert {} badindex } -returnCodes error -result "expected integer *" -match glob test treeview-2.4 "insert -- bad parent node" -body { .tv insert badparent end } -returnCodes error -result "Item badparent not found" -match glob test treeview-2.5 "insert -- finaly insert a node" -body { .tv insert {} end -id newnode -text "New node" } -result newnode test treeview-2.6 "insert -- make sure node was inserted" -body { .tv children {} } -result [list newnode] test treeview-2.7 "insert -- prevent duplicate node names" -body { .tv insert {} end -id newnode } -returnCodes error -result "Item newnode already exists" test treeview-2.8 "insert -- new node at end" -body { .tv insert {} end -id lastnode consistencyCheck .tv .tv children {} } -result [list newnode lastnode] test treeview-2.9 "insert -- new node at beginning" -body { .tv insert {} 0 -id firstnode consistencyCheck .tv .tv children {} } -result [list firstnode newnode lastnode] test treeview-2.10 "insert -- one more node" -body { .tv insert {} 2 -id onemore consistencyCheck .tv .tv children {} } -result [list firstnode newnode onemore lastnode] test treeview-2.11 "insert -- and another one" -body { .tv insert {} 2 -id anotherone consistencyCheck .tv .tv children {} } -result [list firstnode newnode anotherone onemore lastnode] test treeview-2.12 "insert -- one more at end" -body { .tv insert {} end -id newlastone consistencyCheck .tv .tv children {} } -result [list firstnode newnode anotherone onemore lastnode newlastone] test treeview-2.13 "insert -- one more at beginning" -body { .tv insert {} 0 -id newfirstone consistencyCheck .tv .tv children {} } -result [list newfirstone firstnode newnode anotherone onemore lastnode newlastone] test treeview-2.14 "insert -- bad options" -body { .tv insert {} end -badoption foo } -returnCodes error -result {unknown option "-badoption"} test treeview-2.15 "insert -- at position 0 w/no children" -body { .tv insert newnode 0 -id newnode.n2 -text "Foo" .tv children newnode } -result newnode.n2 ;# don't crash test treeview-2.16 "insert -- insert way past end" -body { .tv insert newnode 99 -id newnode.n3 -text "Foo" consistencyCheck .tv .tv children newnode } -result [list newnode.n2 newnode.n3] test treeview-2.17 "insert -- insert before beginning" -body { .tv insert newnode -1 -id newnode.n1 -text "Foo" consistencyCheck .tv .tv children newnode } -result [list newnode.n1 newnode.n2 newnode.n3] ### # test treeview-3.1 "parent" -body { .tv parent newnode.n1 } -result newnode test treeview-3.2 "parent - top-level node" -body { .tv parent newnode } -result {} test treeview-3.3 "parent - root node" -body { .tv parent {} } -result {} test treeview-3.4 "index" -body { list [.tv index newnode.n3] [.tv index newnode.n2] [.tv index newnode.n1] } -result [list 2 1 0] test treeview-3.5 "index - exhaustive test" -body { set result [list] foreach item [.tv children {}] { lappend result [.tv index $item] } set result } -result [list 0 1 2 3 4 5 6] test treeview-3.6 "detach" -body { .tv detach newnode consistencyCheck .tv .tv children {} } -result [list newfirstone firstnode anotherone onemore lastnode newlastone] # XREF: treeview-2.13 test treeview-3.7 "detach didn't screw up internal links" -body { consistencyCheck .tv set result [list] foreach item [.tv children {}] { lappend result [.tv index $item] } set result } -result [list 0 1 2 3 4 5] test treeview-3.8 "detached node has no parent, index 0" -body { list [.tv parent newnode] [.tv index newnode] } -result [list {} 0] # @@@ Can't distinguish detached nodes from first root node test treeview-3.9 "detached node's children undisturbed" -body { .tv children newnode } -result [list newnode.n1 newnode.n2 newnode.n3] test treeview-3.10 "detach is idempotent" -body { .tv detach newnode consistencyCheck .tv .tv children {} } -result [list newfirstone firstnode anotherone onemore lastnode newlastone] test treeview-3.11 "Can't detach root item" -body { .tv detach [list {}] } -cleanup { update consistencyCheck .tv } -returnCodes error -result "Cannot detach root item" test treeview-3.12 "Reattach" -body { .tv move newnode {} end consistencyCheck .tv .tv children {} } -result [list newfirstone firstnode anotherone onemore lastnode newlastone newnode] # Bug # ????? test treeview-3.13 "Re-reattach" -body { .tv move newnode {} end consistencyCheck .tv .tv children {} } -result [list newfirstone firstnode anotherone onemore lastnode newlastone newnode] catch { .tv insert newfirstone end -id x1 .tv insert newfirstone end -id x2 .tv insert newfirstone end -id x3 } test treeview-3.14 "Duplicated entry in children list" -body { .tv children newfirstone [list x3 x1 x2 x3] # ??? Maybe this should raise an error? consistencyCheck .tv .tv children newfirstone } -result [list x3 x1 x2] test treeview-3.14.1 "Duplicated entry in children list" -body { .tv children newfirstone [list x1 x2 x3 x3 x2 x1] consistencyCheck .tv .tv children newfirstone } -result [list x1 x2 x3] test treeview-3.15 "Consecutive duplicate entries in children list" -body { .tv children newfirstone [list x1 x2 x2 x3] consistencyCheck .tv .tv children newfirstone } -result [list x1 x2 x3] test treeview-3.16 "Insert child after self" -body { .tv move x2 newfirstone 1 consistencyCheck .tv .tv children newfirstone } -result [list x1 x2 x3] test treeview-3.17 "Insert last child after self" -body { .tv move x3 newfirstone 2 consistencyCheck .tv .tv children newfirstone } -result [list x1 x2 x3] test treeview-3.18 "Insert last child after end" -body { .tv move x3 newfirstone 3 consistencyCheck .tv .tv children newfirstone } -result [list x1 x2 x3] test treeview-4.1 "opened - initial state" -body { .tv item newnode -open } -result 0 test treeview-4.2 "opened - open node" -body { .tv item newnode -open 1 .tv item newnode -open } -result 1 test treeview-4.3 "opened - closed node" -body { .tv item newnode -open 0 .tv item newnode -open } -result 0 test treeview-5.1 "item -- error checks" -body { .tv item newnode -text "Bad values" -values "{bad}list" } -returnCodes error -result "list element in braces followed by*" -match glob test treeview-5.2 "item -- error leaves options unchanged " -body { .tv item newnode -text } -result "New node" test treeview-5.3 "Heading" -body { .tv heading #0 -text "Heading" } test treeview-5.4 "get cell" -body { set l [list a b c] .tv item newnode -values $l .tv set newnode 1 } -result b test treeview-5.5 "set cell" -body { .tv set newnode 1 XXX .tv item newnode -values } -result [list a XXX c] test treeview-5.6 "set illegal cell" -body { .tv set newnode #0 YYY } -returnCodes error -result "Display column #0 cannot be set" test treeview-5.7 "set illegal cell" -body { .tv set newnode 3 YY ;# 3 == current #columns } -returnCodes error -result "Column index 3 out of bounds" test treeview-5.8 "set display columns" -body { .tv configure -displaycolumns [list 2 1 0] .tv set newnode #1 X .tv set newnode #2 Y .tv set newnode #3 Z .tv item newnode -values } -result [list Z Y X] test treeview-5.9 "display columns part 2" -body { list [.tv column #1 -id] [.tv column #2 -id] [.tv column #3 -id] } -result [list c b a] test treeview-5.10 "cannot set column -id" -body { .tv column #1 -id X } -returnCodes error -result "Attempt to change read-only option" test treeview-5.11 "get" -body { .tv set newnode #1 } -result X test treeview-5.12 "get dictionary" -body { .tv set newnode } -result [list a Z b Y c X] test treeview-5.13 "get, no value" -body { set newitem [.tv insert {} end] set result [.tv set $newitem #1] .tv delete $newitem set result } -result {} test treeview-6.1 "deletion - setup" -body { .tv insert {} end -id dtest foreach id [list a b c d e] { .tv insert dtest end -id $id } .tv children dtest } -result [list a b c d e] test treeview-6.1.1 "delete" -body { .tv delete b consistencyCheck .tv list [.tv exists b] [.tv children dtest] } -result [list 0 [list a c d e]] test treeview-6.2 "delete - duplicate items in list" -body { .tv delete [list a e a e] consistencyCheck .tv .tv children dtest } -result [list c d] test treeview-6.3 "delete - descendants removed" -body { .tv insert c end -id c1 .tv insert c end -id c2 .tv insert c1 end -id c11 consistencyCheck .tv .tv delete c consistencyCheck .tv list [.tv exists c] [.tv exists c1] [.tv exists c2] [.tv exists c11] } -result [list 0 0 0 0] test treeview-6.4 "delete - delete parent and descendants" -body { .tv insert dtest end -id c .tv insert c end -id c1 .tv insert c end -id c2 .tv insert c1 end -id c11 consistencyCheck .tv .tv delete [list c c1 c2 c11] consistencyCheck .tv list [.tv exists c] [.tv exists c1] [.tv exists c2] [.tv exists c11] } -result [list 0 0 0 0] test treeview-6.5 "delete - delete descendants and parent" -body { .tv insert dtest end -id c .tv insert c end -id c1 .tv insert c end -id c2 .tv insert c1 end -id c11 consistencyCheck .tv .tv delete [list c11 c1 c2 c] consistencyCheck .tv list [.tv exists c] [.tv exists c1] [.tv exists c2] [.tv exists c11] } -result [list 0 0 0 0] test treeview-6.6 "delete - end" -body { consistencyCheck .tv .tv children dtest } -result [list d] test treeview-7.1 "move" -body { .tv insert d end -id d1 .tv insert d end -id d2 .tv insert d end -id d3 .tv move d3 d 0 consistencyCheck .tv .tv children d } -result [list d3 d1 d2] test treeview-7.2 "illegal move" -body { .tv move d d2 end } -returnCodes error -result "Cannot insert d as descendant of d2" test treeview-7.3 "illegal move has no effect" -body { consistencyCheck .tv .tv children d } -result [list d3 d1 d2] test treeview-7.4 "Replace children" -body { .tv children d [list d3 d2 d1] consistencyCheck .tv .tv children d } -result [list d3 d2 d1] test treeview-7.5 "replace children - precondition" -body { # Just check to make sure the test suite so far has left # us in the state we expect to be in: list [.tv parent newnode] [.tv children newnode] } -result [list {} [list newnode.n1 newnode.n2 newnode.n3]] test treeview-7.6 "Replace children - illegal move" -body { .tv children newnode.n1 [list newnode.n1 newnode.n2 newnode.n3] } -cleanup { consistencyCheck .tv } -returnCodes error -result "Cannot insert newnode.n1 as descendant of newnode.n1" test treeview-8.0 "Selection set" -body { .tv selection set [list newnode.n1 newnode.n3 newnode.n2] .tv selection } -result [list newnode.n1 newnode.n2 newnode.n3] test treeview-8.1 "Selection add" -body { .tv selection add [list newnode] .tv selection } -result [list newnode newnode.n1 newnode.n2 newnode.n3] test treeview-8.2 "Selection toggle" -body { .tv selection toggle [list newnode.n2 d3] .tv selection } -result [list newnode newnode.n1 newnode.n3 d3] test treeview-8.3 "Selection remove" -body { .tv selection remove [list newnode.n2 d3] .tv selection } -result [list newnode newnode.n1 newnode.n3] test treeview-8.4 "Selection - clear" -body { .tv selection set {} .tv selection } -result {} test treeview-8.5 "Selection - bad operation" -body { .tv selection badop foo } -returnCodes error -match glob -result {bad selection operation "badop": must be *} test treeview-8.7 "<> when deleting items" -body { .tv delete [.tv children {}] .tv insert "" end -id myItem1 -text FirstItem .tv insert "" end -id myItem2 -text SecondItem .tv selection add myItem1 update bind .tv <> {lappend res $val} set res {} set val 1 .tv delete myItem2 ; # no <> (selection unchanged) update set val 2 .tv delete myItem1 ; # <> triggers update set res } -cleanup { bind .tv <> {} } -result {2} test treeview-8.8 "<> when setting the selection" -body { .tv delete [.tv children {}] .tv insert "" end -id myItem1 -text FirstItem .tv insert "" end -id myItem2 -text SecondItem update bind .tv <> {lappend res $val} set res {} set val 1 .tv selection set "" ; # no <> (selection unchanged) update set val 2 .tv selection set myItem1 ; # <> triggers update # Current implementation generates an event for this case set val 3 .tv selection set myItem1 ; # (already selected) update set val 4 .tv selection set {myItem1 myItem2} ; # <> triggers update set val 5 .tv selection set {myItem2} ; # <> triggers update set res } -cleanup { bind .tv <> {} } -result {2 3 4 5} test treeview-8.9 "<> when removing items from the selection" -body { .tv delete [.tv children {}] .tv insert "" end -id myItem1 -text FirstItem .tv selection set myItem1 update bind .tv <> {lappend res $val} set res {} set val 1 .tv selection remove "" ; # no <> (selection unchanged) update set val 2 .tv selection remove myItem1 ; # <> triggers update set val 3 .tv selection remove myItem1 ; # no <> (selection unchanged) update set res } -cleanup { bind .tv <> {} } -result {2} test treeview-8.10 "<> when adding items in the selection" -body { .tv delete [.tv children {}] .tv insert "" end -id myItem1 -text FirstItem .tv insert "" end -id myItem2 -text SecondItem .tv insert "" end -id myItem3 -text ThirdItem update bind .tv <> {lappend res $val} set res {} set val 1 .tv selection add myItem2 ; # <> triggers update set val 2 .tv selection add myItem2 ; # no <> (selection unchanged) update set val 3 .tv selection add myItem3 ; # <> triggers update set res } -cleanup { bind .tv <> {} } -result {1 3} test treeview-8.11 "<> when toggling" -body { .tv delete [.tv children {}] .tv insert "" end -id myItem1 -text FirstItem .tv insert "" end -id myItem2 -text SecondItem .tv insert "" end -id myItem3 -text ThirdItem update bind .tv <> {lappend res $val} set res {} set val 1 .tv selection toggle "" ; # no <> (selection unchanged) update set val 2 .tv selection toggle {myItem1 myItem3} ; # <> triggers update set val 3 .tv selection toggle {myItem3 myItem2} ; # <> triggers update set val 4 .tv selection toggle {myItem3 myItem2} ; # <> triggers update set res } -cleanup { bind .tv <> {} } -result {2 3 4} ### NEED: more tests for see/yview/scrolling proc scrollcallback {args} { set ::scrolldata $args } test treeview-9.0 "scroll callback - empty tree" -body { tvSetup .tv configure -yscrollcommand scrollcallback .tv delete [.tv children {}] update set ::scrolldata } -result [list 0.0 1.0] test treeview-9.1 "scrolling" -setup { pack [ttk::treeview .tree -show tree] -fill y for {set i 1} {$i < 100} {incr i} { .tree insert {} end -text $i } } -body { .tree yview scroll 5 units # This is sensitive to the exact layout of a tree. # It assumes that (8,8) should be far enough in to be in the tree, # while still being in the first item. .tree identify item 8 8 } -cleanup { destroy .tree } -result {I006} test treeview-9.2 {scrolling on see command - bug [14188104c3]} -setup { toplevel .top ttk::treeview .top.tree -show {} -height 10 -columns {label} \ -yscrollcommand [list .top.vs set] ttk::scrollbar .top.vs -command {.top.tree yview} grid .top.tree -row 0 -column 0 -sticky ns grid .top.vs -row 0 -column 1 -sticky ns update proc setrows {n} { .top.tree delete [.top.tree children {}] for {set i 1} {$i <= $n} {incr i} { .top.tree insert {} end -id row$i \ -values [list [format "Row %2.2d" $i]] } .top.tree see row1 update idletasks } } -body { setrows 10 set res [.top.vs get] setrows 20 lappend res [expr [lindex [.top.vs get] 1] < 1] } -cleanup { destroy .top } -result {0.0 1.0 1} test treeview-9.3 {scrolling on see command, requested item is closed} -setup { toplevel .top ttk::treeview .top.tree -show tree -height 10 -columns {label} \ -yscrollcommand [list .top.vs set] ttk::scrollbar .top.vs -command {.top.tree yview} grid .top.tree -row 0 -column 0 -sticky ns grid .top.vs -row 0 -column 1 -sticky ns .top.tree insert {} end -id a -text a .top.tree insert a end -id b -text b .top.tree insert b end -id c -text c .top.tree insert c end -id d -text d .top.tree insert d end -id e -text e for {set i 6} {$i <= 15} {incr i} { .top.tree insert {} end -id row$i \ -values [list [format "Row %2.2d" $i]] } update } -body { set before [lindex [.top.vs get] 1] .top.tree see e update idletasks set after [lindex [.top.vs get] 1] expr $after < $before } -cleanup { destroy .top } -result 1 ### identify tests: # proc identify* {tv comps args} { foreach {x y} $args { foreach comp $comps { lappend result [$tv identify $comp $x $y] } } return $result } # get list of column IDs from list of display column ids. # proc columnids {tv dcols} { set result [list] foreach dcol $dcols { if {[catch { lappend result [$tv column $dcol -id] }]} { lappend result ERROR } } return $result } test treeview-identify-setup "identify series - setup" -body { destroy .tv ttk::setTheme default ttk::treeview .tv -columns [list A B C] .tv insert {} end -id branch -text branch -open true .tv insert branch end -id item1 -text item1 .tv insert branch end -id item2 -text item2 .tv insert branch end -id item3 -text item3 .tv column #0 -width 50 ;# 0-50 .tv column A -width 50 ;# 50-100 .tv column B -width 50 ;# 100-150 .tv column C -width 50 ;# 150-200 (plus slop for margins) wm geometry . {} ; pack .tv ; update } test treeview-identify-1 "identify heading" -body { .tv configure -show {headings tree} update idletasks identify* .tv {region column} 10 10 } -result [list heading #0] test treeview-identify-2 "identify columns" -body { .tv configure -displaycolumns #all update idletasks columnids .tv [identify* .tv column 25 10 75 10 125 10 175 10] } -result [list {} A B C] test treeview-identify-3 "reordered columns" -body { .tv configure -displaycolumns {B A C} update idletasks columnids .tv [identify* .tv column 25 10 75 10 125 10 175 10] } -result [list {} B A C] test treeview-identify-4 "no tree column" -body { .tv configure -displaycolumns #all -show {headings} update idletasks identify* .tv {region column} 25 10 75 10 125 10 175 10 } -result [list heading #1 heading #2 heading #3 nothing {}] # Item height in default theme is 20px test treeview-identify-5 "vertical scan - no headings" -body { .tv configure -displaycolumns #all -show {tree} update idletasks identify* .tv {region item} 25 10 25 30 25 50 25 70 25 90 } -result [list tree branch tree item1 tree item2 tree item3 nothing {}] test treeview-identify-6 "vertical scan - with headings" -body { .tv configure -displaycolumns #all -show {tree headings} update idletasks identify* .tv {region item} 25 10 25 30 25 50 25 70 25 90 } -result [list heading {} tree branch tree item1 tree item2 tree item3] test treeview-identify-7 "vertical scan - headings, no tree" -body { .tv configure -displaycolumns #all -show {headings} update idletasks identify* .tv {region item} 25 10 25 30 25 50 25 70 25 90 } -result [list heading {} cell branch cell item1 cell item2 cell item3] # In default theme, -indent and -itemheight both 20px # Disclosure element name is "Treeitem.indicator" set disclosure "*.indicator" test treeview-identify-8 "identify element" -body { .tv configure -show {tree} .tv insert branch 0 -id branch2 -open true .tv insert branch2 0 -id branch3 -open true .tv insert branch3 0 -id leaf3 update idletasks; identify* .tv {item element} 10 10 30 30 50 50 } -match glob -result [list \ branch $disclosure branch2 $disclosure branch3 $disclosure] # See #2381555 test treeview-identify-9 "identify works when horizontally scrolled" -setup { .tv configure -show {tree headings} foreach column {#0 A B C} { .tv column $column -stretch 0 -width 50 } # Scrollable area is 200, visible is 100 place .tv -x 0 -y 0 -width 100 } -body { set result [list] foreach xoffs {0 50 100} { .tv xview $xoffs ; update lappend result [identify* .tv {region column} 10 10 60 10] } set result } -result [list \ [list heading #0 heading #1] \ [list heading #1 heading #2] \ [list heading #2 heading #3] ] test treeview-identify-cleanup "identify - cleanup" -body { destroy .tv } ### NEED: tests for focus item, selection ### Misc. tests: destroy .tv test treeview-1541739 "Root node properly initialized (#1541739)" -setup { ttk::treeview .tv .tv insert {} end -id a .tv see a } -cleanup { destroy .tv } test treeview-3006842 "Null bindings" -setup { ttk::treeview .tv -show tree } -body { .tv tag bind empty {} .tv insert {} end -text "Click me" -tags empty event generate .tv -x 10 -y 10 .tv tag bind empty } -result {} -cleanup { destroy .tv } test treeview-3085489-1 "tag add, no -tags" -setup { ttk::treeview .tv } -body { set item [.tv insert {} end] .tv tag add foo $item .tv item $item -tags } -cleanup { destroy .tv } -result [list foo] test treeview-3085489-2 "tag remove, no -tags" -setup { ttk::treeview .tv } -body { set item [.tv insert {} end] .tv tag remove foo $item .tv item $item -tags } -cleanup { destroy .tv } -result [list] test treeview-368fa4561e "indicators cannot be clicked on leafs" -setup { pack [ttk::treeview .tv] .tv insert {} end -id foo -text "<-- (1) Click the blank space to my left" update } -body { foreach {x y w h} [.tv bbox foo #0] {} set res [.tv item foo -open] # using $h even for x computation is intentional here in order to simulate # a mouse click on the (invisible since we're on a leaf) indicator event generate .tv \ -x [expr {$x + $h / 2}] \ -y [expr {$y + $h / 2}] lappend res [.tv item foo -open] .tv insert foo end -text "sub" lappend res [.tv item foo -open] } -cleanup { destroy .tv } -result {0 0 0} test treeview-ce470f20fd-1 "dragging further than the right edge of the treeview is allowed" -setup { pack [ttk::treeview .tv] .tv heading #0 -text "Drag my right edge -->" update } -body { set res [.tv column #0 -width] .tv drag #0 400 lappend res [expr {[.tv column #0 -width] > $res}] } -cleanup { destroy .tv } -result {200 1} proc nostretch {tv} { foreach col [$tv cget -columns] { $tv column $col -stretch 0 } $tv column #0 -stretch 0 update idletasks ; # redisplay $tv } test treeview-ce470f20fd-2 "changing -stretch resizes columns" -setup { pack [ttk::treeview .tv -columns {bar colA colB colC foo}] foreach col [.tv cget -columns] { .tv heading $col -text $col } nostretch .tv .tv column colA -width 50 ; .tv column colB -width 50 ; # slack created update idletasks ; # redisplay treeview } -body { # when no column is stretchable and one of them becomes stretchable # the stretchable column takes the slack and the widget is redisplayed # automatically at idle time set res [.tv column colA -width] .tv column colA -stretch 1 update idletasks ; # no slack anymore, widget redisplayed lappend res [expr {[.tv column colA -width] > $res}] } -cleanup { destroy .tv } -result {50 1} test treeview-ce470f20fd-3 "changing -stretch resizes columns" -setup { pack [ttk::treeview .tv -columns {bar colA colB colC foo}] foreach col [.tv cget -columns] { .tv heading $col -text $col } .tv configure -displaycolumns {colB colA colC} nostretch .tv .tv column colA -width 50 ; .tv column colB -width 50 ; # slack created update idletasks ; # redisplay treeview } -body { # only some columns are displayed (and in a different order than declared # in -columns), a displayed column becomes stretchable --> the stretchable # column expands set res [.tv column colA -width] .tv column colA -stretch 1 update idletasks ; # no slack anymore, widget redisplayed lappend res [expr {[.tv column colA -width] > $res}] } -cleanup { destroy .tv } -result {50 1} test treeview-ce470f20fd-4 "changing -stretch resizes columns" -setup { pack [ttk::treeview .tv -columns {bar colA colB colC foo}] foreach col [.tv cget -columns] { .tv heading $col -text $col } .tv configure -displaycolumns {colB colA colC} nostretch .tv .tv column colA -width 50 ; .tv column bar -width 60 ; # slack created update idletasks ; # redisplay treeview } -body { # only some columns are displayed (and in a different order than declared # in -columns), a non-displayed column becomes stretchable --> nothing # happens set origTreeWidth [winfo width .tv] set res [list [.tv column bar -width] [.tv column colA -width]] .tv column bar -stretch 1 update idletasks ; # no change, widget redisplayed lappend res [.tv column bar -width] [.tv column colA -width] # this column becomes visible --> widget resizes .tv configure -displaycolumns {bar colC colA colB} update idletasks ; # no slack anymore because the widget resizes (shrinks) lappend res [.tv column bar -width] [.tv column colA -width] \ [expr {[winfo width .tv] < $origTreeWidth}] } -cleanup { destroy .tv } -result {60 50 60 50 60 50 1} test treeview-bc602049ab "treeview with custom background does not change size when switching themes" -setup { image create photo tvbg -data { iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAnXAAAJ1wG xbhe3AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAACJJREFUOI 1jPLF9+38GKgImaho2auCogaMGjho4auBQMhAAyR0DXUEyypsAAAAASUVORK5CYII= } ttk::style theme create foo-bc602049ab -parent clam -settings { ttk::style element create Treeview.field image tvbg -width 0 -height 0 } ttk::style theme use foo-bc602049ab pack [ttk::treeview .tv] update idletasks } -body { set g1 [winfo geometry .tv] ttk::style theme use foo-bc602049ab update idletasks set g2 [winfo geometry .tv] expr {$g1 eq $g2 ? 1 : "$g1 --> $g2"} } -cleanup { destroy .tv image delete tvbg } -result {1} test treeview-6ee162c3d9 "style configure Treeview -rowheight 0" -setup { tvSetupWithItems } -body { ttk::style configure Treeview -rowheight 0 ; # shall not crash update } -result {} tcltest::cleanupTests tk8.6.14/tests/ttk/treetags.test0000644003604700454610000001355514554262361015252 0ustar dgp771div package require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands ### treeview tag invariants: # proc assert {expr {message ""}} { if {![uplevel 1 [list expr $expr]]} { error "PANIC: $message ($expr failed)" } } proc itemConstraints {tv item} { # $tag in [$tv item $item -tags] <==> [$tv tag has $tag $item] foreach tag [$tv item $item -tags] { assert {$item in [$tv tag has $tag]} } foreach child [$tv children $item] { itemConstraints $tv $child } } proc treeConstraints {tv} { # $item in [$tv tag has $tag] <==> [$tv tag has $tag $item] # foreach tag [$tv tag names] { foreach item [$tv tag has $tag] { assert {$tag in [$tv item $item -tags]} } } itemConstraints $tv {} } # ### test treetags-1.0 "Setup" -body { set tv [ttk::treeview .tv -columns "A B C"] .tv insert {} end -id item1 -text "Item 1" pack .tv } -cleanup { treeConstraints $tv } test treetags-1.1 "Bad tag list" -body { $tv item item1 -tags {bad {list}here bad} $tv item item1 -tags } -returnCodes error -result "list element in braces *" -match glob test treetags-1.2 "Good tag list" -body { $tv item item1 -tags tag1 $tv item item1 -tags } -cleanup { assert {[$tv tag has tag1 item1]} treeConstraints $tv } -result [list tag1] test treetags-1.3 "tag has - test" -body { $tv insert {} end -id item2 -text "Item 2" -tags tag2 set result [list] foreach item {item1 item2} { foreach tag {tag1 tag2 tag3} { lappend result $item $tag [$tv tag has $tag $item] } } set result } -cleanup { treeConstraints $tv } -result [list \ item1 tag1 1 item1 tag2 0 item1 tag3 0 \ item2 tag1 0 item2 tag2 1 item2 tag3 0 ] test treetags-1.4 "tag has - query" -body { list [$tv tag has tag1] [$tv tag has tag2] [$tv tag has tag3] } -cleanup { treeConstraints $tv } -result [list [list item1] [list item2] [list]] test treetags-1.5 "tag add" -body { $tv tag add tag3 {item1 item2} list [$tv tag has tag1] [$tv tag has tag2] [$tv tag has tag3] } -cleanup { treeConstraints $tv } -result [list [list item1] [list item2] [list item1 item2]] test treetags-1.6 "tag remove - list" -body { $tv tag remove tag3 {item1 item2} list [$tv tag has tag1] [$tv tag has tag2] [$tv tag has tag3] } -cleanup { treeConstraints $tv } -result [list [list item1] [list item2] [list]] test treetags-1.7 "tag remove - all items" -body { $tv tag remove tag1 list [$tv tag has tag1] [$tv tag has tag2] [$tv tag has tag3] } -cleanup { treeConstraints $tv } -result [list [list] [list item2] [list]] test treetags-1.8 "tag names" -body { lsort [$tv tag names] } -result [list tag1 tag2 tag3] test treetags-1.9 "tag names - tag added to item" -body { $tv item item1 -tags tag4 lsort [$tv tag names] } -result [list tag1 tag2 tag3 tag4] test treetags-1.10 "tag names - tag configured" -body { $tv tag configure tag5 lsort [$tv tag names] } -result [list tag1 tag2 tag3 tag4 tag5] test treetags-1.end "cleanup" -body { $tv item item1 -tags tag1 $tv item item2 -tags tag2 list [$tv tag has tag1] [$tv tag has tag2] [$tv tag has tag3] } -cleanup { treeConstraints $tv } -result [list [list item1] [list item2] [list]] test treetags-2.0 "tag bind" -body { $tv tag bind tag1 {set ::KEY %A} $tv tag bind tag1 } -cleanup { treeConstraints $tv } -result {set ::KEY %A} test treetags-2.1 "Events delivered to tags" -body { focus -force $tv ; update ;# needed so [event generate] delivers KeyPress $tv focus item1 event generate $tv set ::KEY } -cleanup { treeConstraints $tv } -result a test treetags-2.2 "Events delivered to correct tags" -body { $tv tag bind tag2 [list set ::KEY2 %A] $tv focus item1 event generate $tv $tv focus item2 event generate $tv list $::KEY $::KEY2 } -cleanup { treeConstraints $tv } -result [list b c] test treetags-2.3 "Virtual events delivered to focus item" -body { set ::bong 0 $tv tag bind tag2 <> { incr bong } $tv focus item2 event generate $tv <> $tv focus item1 event generate $tv <> set bong } -cleanup { treeConstraints $tv } -result 1 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 } -cleanup { treeConstraints $tv } -result {} test treetags-3.1 "tag configure - get" -body { $tv tag configure tag1 -foreground } -cleanup { treeConstraints $tv } -result blue # @@@ fragile test test treetags-3.2 "tag configure - enumerate" -body { $tv tag configure tag1 } -cleanup { treeConstraints $tv } -result [list \ -text {} -image {} -anchor {} -background red -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." # will show up on stderr at program exit. # test treetags-3.3 "tag configure - set font" -body { $tv tag configure tag2 -font {times 20} } test treetags-3.4 "stomp tags in tag binding procedure" -body { set result [list] $tv tag bind rm1 <> { lappend ::result rm1 [%W focus] <> } $tv tag bind rm2 <> { lappend ::result rm2 [%W focus] <> %W item [%W focus] -tags {tag1} } $tv tag bind rm3 <> { lappend ::result rm3 [%W focus] <> } $tv item item1 -tags {rm1 rm2 rm3} $tv focus item1 event generate $tv <> set result } -cleanup { treeConstraints $tv } -result [list rm1 item1 <> rm2 item1 <> rm3 item1 <>] # test treetags-end "Cleanup" -body { destroy $tv } tcltest::cleanupTests tk8.6.14/tests/ttk/spinbox.test0000644003604700454610000002372214560754017015114 0ustar dgp771div# # ttk::spinbox widget tests # package require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands test spinbox-1.0 "Spinbox tests -- setup" -body { ttk::spinbox .sb } -cleanup { destroy .sb } -result .sb test spinbox-1.1 "Bad -values list" -setup { ttk::spinbox .sb } -body { .sb configure -values "bad \{list" } -cleanup { destroy .sb } -returnCodes error -result "unmatched open brace in list" test spinbox-1.3.1 "get retrieves value" -setup { ttk::spinbox .sb -from 0 -to 100 } -body { .sb set 50 .sb get } -cleanup { destroy .sb } -result 50 test spinbox-1.3.2 "get retrieves value" -setup { ttk::spinbox .sb -from 0 -to 100 -values 55 } -body { .sb set 55 .sb get } -cleanup { destroy .sb } -result 55 test spinbox-1.4.1 "set changes value" -setup { ttk::spinbox .sb -from 0 -to 100 } -body { .sb set 33 .sb get } -cleanup { destroy .sb } -result 33 test spinbox-1.4.2 "set changes value" -setup { ttk::spinbox .sb -from 0 -to 100 -values 55 } -body { .sb set 33 .sb get } -cleanup { destroy .sb } -result 33 test spinbox-1.6.1 "insert start" -setup { ttk::spinbox .sb -from 0 -to 100 } -body { .sb set 5 .sb insert 0 4 .sb get } -cleanup { destroy .sb } -result 45 test spinbox-1.6.2 "insert end" -setup { ttk::spinbox .sb -from 0 -to 100 } -body { .sb set 5 .sb insert end 4 .sb get } -cleanup { destroy .sb } -result 54 test spinbox-1.6.3 "insert invalid index" -setup { ttk::spinbox .sb -from 0 -to 100 } -body { .sb set 5 .sb insert 100 4 .sb get } -cleanup { destroy .sb } -result 54 test spinbox-1.7.1 "-command option: set doesnt fire" -setup { ttk::spinbox .sb -from 0 -to 100 -command {set ::spinbox_test 1} } -body { set ::spinbox_test 0 .sb set 50 set ::spinbox_test } -cleanup { destroy .sb } -result 0 test spinbox-1.7.2 "-command option: button handler will fire" -setup { ttk::spinbox .sb -from 0 -to 100 -command {set ::spinbox_test 1} } -body { set ::spinbox_test 0 .sb set 50 event generate .sb <> set ::spinbox_test } -cleanup { destroy .sb } -result 1 test spinbox-1.8.1 "option -validate" -setup { ttk::spinbox .sb -from 0 -to 100 } -body { .sb configure -validate all .sb cget -validate } -cleanup { destroy .sb } -result {all} test spinbox-1.8.2 "option -validate" -setup { ttk::spinbox .sb -from 0 -to 100 } -body { .sb configure -validate key .sb configure -validate focus .sb configure -validate focusin .sb configure -validate focusout .sb configure -validate none .sb cget -validate } -cleanup { destroy .sb } -result none test spinbox-1.8.3 "option -validate" -setup { ttk::spinbox .sb -from 0 -to 100 } -body { .sb configure -validate bogus } -cleanup { destroy .sb } -returnCodes error -result {bad validate "bogus": must be all, key, focus, focusin, focusout, or none} test spinbox-1.8.4 "-validate option: " -setup { ttk::spinbox .sb -from 0 -to 100 set ::spinbox_test {} } -body { .sb configure -validate all -validatecommand {set ::spinbox_test %P} pack .sb update idletasks .sb set 50 focus -force .sb set ::spinbox_wait 0 set timer [after 100 {set ::spinbox_wait 1}] vwait ::spinbox_wait after cancel $timer set ::spinbox_test } -cleanup { destroy .sb } -result 50 test spinbox-2.0 "current command -- unset should be 0" -constraints nyi -setup { ttk::spinbox .sb -values [list a b c d e a] } -body { .sb current } -cleanup { destroy .sb } -result 0 # @@@ for combobox, this is -1. test spinbox-2.1 "current command -- set index" -constraints nyi -setup { ttk::spinbox .sb -values [list a b c d e a] } -body { .sb current 5 .sb get } -cleanup { destroy .sb } -result a test spinbox-2.2 "current command -- change -values" -constraints nyi -setup { ttk::spinbox .sb -values [list a b c d e a] } -body { .sb current 5 .sb configure -values [list c b a d e] .sb current } -cleanup { destroy .sb } -result 2 test spinbox-2.3 "current command -- change value" -constraints nyi -setup { ttk::spinbox .sb -values [list c b a d e] } -body { .sb current 2 .sb set "b" .sb current } -cleanup { destroy .sb } -result 1 test spinbox-2.4 "current command -- value not in list" -constraints nyi -setup { ttk::spinbox .sb -values [list c b a d e] } -body { .sb current 2 .sb set "z" .sb current } -cleanup { destroy .sb } -result -1 test spinbox-3.0 "textarea should expand to fill widget" -setup { set SBV 5 set ::spinbox_test {} ttk::spinbox .sb -from 0 -to 10 -textvariable SBV } -body { grid columnconfigure . 0 -weight 1 update idletasks set timer [after 500 {set ::spinbox_test timedout}] bind . { after idle { wm geometry . "210x80" update idletasks set ::spinbox_test [.sb identify element 25 5] } bind . {} } grid .sb -sticky ew vwait ::spinbox_test set ::spinbox_test } -cleanup { destroy .sb unset -nocomplain ::spinbox_test SBV } -result {textarea} test spinbox-4.0 "Increment with duplicates in -values, wrap" -setup { ttk::spinbox .sb -values {one two three 4 5 two six} -wrap true set max [expr {[llength [.sb cget -values]] + 2}] } -body { set ::spinbox_test [.sb get] for {set i 0} {$i < $max} {incr i} { event generate .sb <> lappend ::spinbox_test [.sb get] } for {set i 0} {$i < $max} {incr i} { event generate .sb <> lappend ::spinbox_test [.sb get] } set ::spinbox_test } -cleanup { destroy .sb unset -nocomplain ::spinbox_test max } -result {one two three 4 5 two six one two one six two 5 4 three two one six} test spinbox-4.1 "Increment with duplicates in -values, wrap, initial value set" -setup { ttk::spinbox .sb -values {one two three 4 5 two six} -wrap true set max [expr {[llength [.sb cget -values]] + 2}] } -body { .sb set three set ::spinbox_test [.sb get] for {set i 0} {$i < $max} {incr i} { event generate .sb <> lappend ::spinbox_test [.sb get] } .sb set two ; # the first "two" in the -values list becomes the current value for {set i 0} {$i < $max} {incr i} { event generate .sb <> lappend ::spinbox_test [.sb get] } set ::spinbox_test } -cleanup { destroy .sb unset -nocomplain ::spinbox_test max } -result {three 4 5 two six one two three 4 5 one six two 5 4 three two one six} test spinbox-4.2 "Increment with duplicates in -values, no wrap" -setup { ttk::spinbox .sb -values {one two three 4 5 two six} -wrap false set max [expr {[llength [.sb cget -values]] + 2}] } -body { set ::spinbox_test [.sb get] for {set i 0} {$i < $max} {incr i} { event generate .sb <> lappend ::spinbox_test [.sb get] } for {set i 0} {$i < $max} {incr i} { event generate .sb <> lappend ::spinbox_test [.sb get] } set ::spinbox_test } -cleanup { destroy .sb unset -nocomplain ::spinbox_test max } -result {one two three 4 5 two six six six two 5 4 three two one one one one} test spinbox-11.2 {Bugs [2a32225cd1] and [9fa3e08243]} -setup { destroy .s pack [ttk::spinbox .s] update } -body { .s insert end "A sample text" .s icursor end event generate .s <> ; # shall move insert to index 9 .s delete insert end .s get } -cleanup { destroy .s } -result {A sample } # nostomp: NB intentional difference between ttk::spinbox and tk::spinbox; # see also #1439266 # test spinbox-nostomp-1 "don't stomp on -variable (init; -from/to)" -body { set SBV 55 ttk::spinbox .sb -textvariable SBV -from 0 -to 100 -increment 5 list $SBV [.sb get] } -cleanup { unset SBV destroy .sb } -result [list 55 55] test spinbox-nostomp-2 "don't stomp on -variable (init; -values)" -body { set SBV Apr ttk::spinbox .sb -textvariable SBV -values {Jan Feb Mar Apr May Jun Jul Aug} list $SBV [.sb get] } -cleanup { unset SBV destroy .sb } -result [list Apr Apr] test spinbox-nostomp-3 "don't stomp on -variable (configure; -from/to)" -body { set SBV 55 ttk::spinbox .sb .sb configure -textvariable SBV -from 0 -to 100 -increment 5 list $SBV [.sb get] } -cleanup { unset SBV destroy .sb } -result [list 55 55] test spinbox-nostomp-4 "don't stomp on -variable (configure; -values)" -body { set SBV Apr ttk::spinbox .sb .sb configure -textvariable SBV -values {Jan Feb Mar Apr May Jun Jul Aug} list $SBV [.sb get] } -cleanup { unset SBV destroy .sb } -result [list Apr Apr] test spinbox-dieoctaldie-1 "Cope with leading zeros" -body { # See SF#2358545 -- ttk::spinbox also affected set secs 07 ttk::spinbox .sb -from 0 -to 59 -format %02.0f -textvariable secs set result [list $secs] event generate .sb <>; lappend result $secs event generate .sb <>; lappend result $secs event generate .sb <>; lappend result $secs event generate .sb <>; lappend result $secs event generate .sb <>; lappend result $secs event generate .sb <>; lappend result $secs event generate .sb <>; lappend result $secs event generate .sb <>; lappend result $secs set result } -result [list 07 08 09 10 11 10 09 08 07] -cleanup { destroy .sb unset secs } test spinbox-dieoctaldie-2 "Cope with general bad input" -body { set result [list] ttk::spinbox .sb -from 0 -to 100 -format %03.0f .sb set asdfasdf ; lappend result [.sb get] event generate .sb <> ; lappend result [.sb get] .sb set asdfasdf ; lappend result [.sb get] event generate .sb <> ; lappend result [.sb get] } -result [list asdfasdf 000 asdfasdf 000] -cleanup { destroy .sb } tcltest::cleanupTests # Local variables: # mode: tcl # End: tk8.6.14/tests/ttk/scrollbar.test0000644003604700454610000000627714554262361015422 0ustar dgp771divpackage require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands testConstraint coreScrollbar [expr {[tk windowingsystem] eq "aqua"}] # Before 2019 the code in library/ttk/scrollbar.tcl would replace the # constructor of ttk::scrollbar with the constructor of tk::scrollbar # unless the -class or -style options were specified.. # Now there is an implementation of ttk::scrollbar for macOS. The # tests are left in place, though, except that scrollbar-swapout-1 # test was changed to expect the class to be TScrollbar instead of # Scrollbar. test scrollbar-swapout-1 "Don't use core scrollbars on OSX..." \ -constraints { coreScrollbar } -body { ttk::scrollbar .sb -command "yadda" list [winfo class .sb] [.sb cget -command] } -result [list TScrollbar yadda] -cleanup { destroy .sb } test scrollbar-swapout-2 "... regardless of whether -style ..." \ -constraints { coreScrollbar } -body { ttk::style layout Vertical.Custom.TScrollbar \ [ttk::style layout Vertical.TScrollbar] ; # See #1833339 ttk::scrollbar .sb -command "yadda" -style Custom.TScrollbar list [winfo class .sb] [.sb cget -command] [.sb cget -style] } -result [list TScrollbar yadda Custom.TScrollbar] -cleanup { destroy .sb } test scrollbar-swapout-3 "... or -class is specified." -constraints { coreScrollbar } -body { ttk::scrollbar .sb -command "yadda" -class Custom.TScrollbar list [winfo class .sb] [.sb cget -command] } -result [list Custom.TScrollbar yadda] -cleanup { destroy .sb } test scrollbar-1.0 "Setup" -body { ttk::scrollbar .tsb } -result .tsb test scrollbar-1.1 "Set method" -body { .tsb set 0.2 0.4 .tsb get } -result [list 0.2 0.4] test scrollbar-1.2 "Set orientation" -body { .tsb configure -orient vertical pack .tsb -side right -anchor e -expand 1 -fill y wm geometry . 200x200 update set w [winfo width .tsb] ; set h [winfo height .tsb] expr {$h > $w} } -result 1 test scrollbar-1.3 "Change orientation" -body { .tsb configure -orient horizontal pack .tsb -side bottom -anchor s -expand 1 -fill x wm geometry . 200x200 update set w [winfo width .tsb] ; set h [winfo height .tsb] expr {$h < $w} } -result 1 # # Scale tests: # test scale-1.0 "Self-destruction" -body { trace add variable v write { destroy .s ;# } ttk::scale .s -variable v pack .s ; update .s set 1 ; update } -returnCodes error -match glob -result "*" test scale-2.1 "-state option" -setup { ttk::scale .s set res "" } -body { # defaults lappend res [.s instate disabled] [.s cget -state] # set -state: instate returns accordingly .s configure -state disabled lappend res [.s instate disabled] [.s cget -state] # back to normal .s configure -state normal lappend res [.s instate disabled] [.s cget -state] # use state command: -state does NOT reflect it .s state disabled lappend res [.s instate disabled] [.s cget -state] # further use state command .s state readonly lappend res [.s state] [.s cget -state] } -cleanup { destroy .s unset -nocomplain res } -result {0 normal 1 disabled 0 normal 1 normal {disabled readonly} normal} tcltest::cleanupTests tk8.6.14/tests/ttk/radiobutton.test0000644003604700454610000000234614554262361015762 0ustar dgp771div# # ttk::radiobutton widget tests. # package require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands test radiobutton-1.1 "Radiobutton check" -body { pack \ [ttk::radiobutton .rb1 -text "One" -variable choice -value 1] \ [ttk::radiobutton .rb2 -text "Two" -variable choice -value 2] \ [ttk::radiobutton .rb3 -text "Three" -variable choice -value 3] \ ; } test radiobutton-1.2 "Radiobutton invoke" -body { .rb1 invoke set ::choice } -result 1 test radiobutton-1.3 "Radiobutton state" -body { .rb1 instate selected } -result 1 test radiobutton-1.4 "Other radiobutton invoke" -body { .rb2 invoke set ::choice } -result 2 test radiobutton-1.5 "Other radiobutton state" -body { .rb2 instate selected } -result 1 test radiobutton-1.6 "First radiobutton state" -body { .rb1 instate selected } -result 0 test radiobutton-1.7 "Unset radiobutton variable" -body { unset ::choice list [info exists ::choice] [.rb1 instate alternate] [.rb2 instate alternate] } -result {0 1 1} test radiobutton-1.8 "Reset radiobutton variable" -body { set ::choice 2 list [info exists ::choice] [.rb1 instate alternate] [.rb2 instate alternate] } -result {1 0 0} tcltest::cleanupTests tk8.6.14/tests/ttk/progressbar.test0000644003604700454610000000375314554262361015764 0ustar dgp771divpackage require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands test progressbar-1.1 "Setup" -body { ttk::progressbar .pb } -result .pb test progressbar-1.2 "Linked variable" -body { set PB 50 .pb configure -variable PB .pb cget -value } -result 50 test progressbar-1.3 "Change linked variable" -body { set PB 80 .pb cget -value } -result 80 test progressbar-1.4 "Set linked variable to bad value" -body { set PB "bogus" .pb instate invalid } -result 1 test progressbar-1.4.1 "Set linked variable back to a good value" -body { set PB 80 .pb instate invalid } -result 0 test progressbar-1.5 "Set -variable to illegal variable" -body { set BAD "bogus" .pb configure -variable BAD .pb instate invalid } -result 1 test progressbar-1.6 "Unset -variable" -body { unset -nocomplain UNSET .pb configure -variable UNSET .pb instate disabled } -result 1 test progressbar-2.0 "step command" -body { .pb configure -variable {} ;# @@@ .pb configure -value 5 -maximum 10 -mode determinate .pb step .pb cget -value } -result 6.0 test progressbar-2.1 "step command, with stepamount" -body { .pb step 3 .pb cget -value } -result 9.0 test progressbar-2.2 "step wraps at -maximum in determinate mode" -body { .pb step .pb cget -value } -result 0.0 test progressbar-2.3 "step doesn't wrap in indeterminate mode" -body { .pb configure -value 8 -maximum 10 -mode indeterminate .pb step .pb step .pb step .pb cget -value } -result 11.0 test progressbar-2.4 "step with linked variable" -body { .pb configure -variable PB ;# @@@ set PB 5 .pb step set PB } -result 6.0 test progressbar-2.5 "error in write trace" -body { trace add variable PB write { error "YIPES!" ;# } .pb step set PB ;# NOTREACHED } -cleanup { unset PB } -returnCodes error -match glob -result "*YIPES!" test progressbar-end "Cleanup" -body { destroy .pb } tcltest::cleanupTests tk8.6.14/tests/ttk/panedwindow.test0000644003604700454610000001636414554262361015754 0ustar dgp771divpackage require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands proc propagate-geometry {} { update idletasks } # Basic sanity checks: # test panedwindow-1.0 "Setup" -body { ttk::panedwindow .pw } -result .pw test panedwindow-1.1 "Make sure empty panedwindow doesn't crash" -body { pack .pw -expand true -fill both update } test panedwindow-1.2 "Add a pane" -body { .pw add [ttk::frame .pw.f1] winfo manager .pw.f1 } -result "panedwindow" test panedwindow-1.3 "Steal pane" -body { pack .pw.f1 -side bottom winfo manager .pw.f1 } -result "pack" test panedwindow-1.4 "Make sure empty panedwindow still doesn't crash" -body { update } test panedwindow-1.5 "Remanage pane" -body { #XXX .pw insert 0 .pw.f1 .pw add .pw.f1 winfo manager .pw.f1 } -result "panedwindow" test panedwindow-1.6 "Forget pane" -body { .pw forget .pw.f1 winfo manager .pw.f1 } -result "" test panedwindow-1.7 "Make sure empty panedwindow still still doesn't crash" -body { update } test panedwindow-1.8 "Re-forget pane" -body { .pw forget .pw.f1 } -returnCodes error -result ".pw.f1 is not managed by .pw" test panedwindow-1.end "Cleanup" -body { destroy .pw } # Resize behavior: # test panedwindow-2.1 "..." -body { ttk::panedwindow .pw -orient horizontal .pw add [listbox .pw.l1] .pw add [listbox .pw.l2] .pw add [listbox .pw.l3] .pw add [listbox .pw.l4] pack .pw -expand true -fill both update set w1 [winfo width .] # This should make the window shrink: destroy .pw.l2 update set w2 [winfo width .] expr {$w2 < $w1} } -result 1 test panedwindow-2.2 "..., cont'd" -body { # This should keep the window from shrinking: wm geometry . [wm geometry .] set rw2 [winfo reqwidth .pw] destroy .pw.l1 update set w3 [winfo width .] set rw3 [winfo reqwidth .pw] expr {$w3 == $w2 && $rw3 < $rw2} # problem: [winfo reqwidth] shrinks, but sashes haven't moved # since we haven't gotten a ConfigureNotify. # How to (a) check for this, and (b) fix it? } -result 1 test panedwindow-2.3 "..., cont'd" -body { .pw add [listbox .pw.l5] update set rw4 [winfo reqwidth .pw] expr {$rw4 > $rw3} } -result 1 test panedwindow-2.end "Cleanup" -body { destroy .pw } # # ... # test panedwindow-3.0 "configure pane" -body { ttk::panedwindow .pw .pw add [listbox .pw.lb1] .pw add [listbox .pw.lb2] .pw pane 1 -weight 2 .pw pane 1 -weight } -result 2 test panedwindow-3.1 "configure pane -- errors" -body { .pw pane 1 -weight -4 } -returnCodes error -match glob -result "-weight must be nonnegative" test panedwindow-3.2 "add pane -- errors" -body { .pw add [ttk::label .pw.l] -weight -1 } -returnCodes error -match glob -result "-weight must be nonnegative" test panedwindow-3.end "cleanup" -body { destroy .pw } test panedwindow-4.1 "forget" -body { pack [ttk::panedwindow .pw -orient vertical] -expand true -fill both .pw add [label .pw.l1 -text "L1"] .pw add [label .pw.l2 -text "L2"] .pw add [label .pw.l3 -text "L3"] .pw add [label .pw.l4 -text "L4"] update .pw forget .pw.l1 .pw forget .pw.l2 .pw forget .pw.l3 .pw forget .pw.l4 update } test panedwindow-4.2 "forget forgotten" -body { .pw forget .pw.l1 } -returnCodes error -result ".pw.l1 is not managed by .pw" # checkorder $winlist -- # Ensure that Y coordinates windows in $winlist are strictly increasing. # proc checkorder {winlist} { set pos -1 set positions [list] foreach win $winlist { lappend positions [set nextpos [winfo y $win]] if {$nextpos <= $pos} { error "window $win out of order ($positions)" } set pos $nextpos } } test panedwindow-4.3 "insert command" -body { .pw insert end .pw.l1 .pw insert end .pw.l3 .pw insert 1 .pw.l2 .pw insert end .pw.l4 update; checkorder {.pw.l1 .pw.l2 .pw.l3 .pw.l4} } test panedwindow-4.END "cleanup" -body { destroy .pw } # See #1292219 test panedwindow-5.1 "Propagate Map/Unmap state to children" -body { set result [list] pack [ttk::panedwindow .pw] .pw add [ttk::button .pw.b] update lappend result [winfo ismapped .pw] [winfo ismapped .pw.b] pack forget .pw update lappend result [winfo ismapped .pw] [winfo ismapped .pw.b] set result } -result [list 1 1 0 0] -cleanup { destroy .pw } ### sashpos tests. # proc sashpositions {pw} { set positions [list] set npanes [llength [winfo children $pw]] for {set i 0} {$i < $npanes - 1} {incr i} { lappend positions [$pw sashpos $i] } return $positions } test paned-sashpos-setup "Setup for sash position test" -body { ttk::style theme use default ttk::style configure -sashthickness 5 ttk::panedwindow .pw .pw add [frame .pw.f1 -width 20 -height 20] .pw add [frame .pw.f2 -width 20 -height 20] .pw add [frame .pw.f3 -width 20 -height 20] .pw add [frame .pw.f4 -width 20 -height 20] propagate-geometry list [winfo reqwidth .pw] [winfo reqheight .pw] } -result [list 20 [expr {20*4 + 5*3}]] test paned-sashpos-attempt-restore "Attempt to set sash positions" -body { # This is not expected to succeed, since .pw isn't large enough yet. # .pw sashpos 0 30 .pw sashpos 1 60 .pw sashpos 2 90 list [winfo reqwidth .pw] [winfo reqheight .pw] [sashpositions .pw] } -result [list 20 95 [list 0 5 10]] test paned-sashpos-restore "Set height then sash positions" -body { # Setting sash positions after setting -height _should_ succeed. # .pw configure -height 120 .pw sashpos 0 30 .pw sashpos 1 60 .pw sashpos 2 90 list [winfo reqwidth .pw] [winfo reqheight .pw] [sashpositions .pw] } -result [list 20 120 [list 30 60 90]] test paned-sashpos-cleanup "Clean up" -body { destroy .pw } test paned-propagation-setup "Setup." -body { ttk::style theme use default ttk::style configure -sashthickness 5 wm geometry . {} ttk::panedwindow .pw -orient vertical frame .pw.f1 -width 100 -height 50 frame .pw.f2 -width 100 -height 50 list [winfo reqwidth .pw.f1] [winfo reqheight .pw.f1] } -result [list 100 50] test paned-propagation-1 "Initial request size" -body { .pw add .pw.f1 .pw add .pw.f2 propagate-geometry list [winfo reqwidth .pw] [winfo reqheight .pw] } -result [list 100 105] test paned-propagation-2 "Pane change before map" -body { .pw.f1 configure -width 200 -height 100 propagate-geometry list [winfo reqwidth .pw] [winfo reqheight .pw] } -result [list 200 155] test paned-propagation-3 "Map window" -body { pack .pw -expand true -fill both update list [winfo width .pw] [winfo height .pw] [.pw sashpos 0] } -result [list 200 155 100] test paned-propagation-4 "Pane change after map, off-axis" -body { .pw.f1 configure -width 100 ;# should be granted propagate-geometry list [winfo reqwidth .pw] [winfo reqheight .pw] [.pw sashpos 0] } -result [list 100 155 100] test paned-propagation-5 "Pane change after map, on-axis" -body { .pw.f1 configure -height 50 ;# should be denied propagate-geometry list [winfo reqwidth .pw] [winfo reqheight .pw] [.pw sashpos 0] } -result [list 100 155 100] test paned-propagation-cleanup "Clean up." -body { destroy .pw } tcltest::cleanupTests tk8.6.14/tests/ttk/notebook.test0000644003604700454610000003656214554262361015257 0ustar dgp771divpackage require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands test notebook-1.0 "Setup" -body { ttk::notebook .nb } -result .nb # # Error handling tests: # test notebook-1.1 "Cannot add ancestor" -body { .nb add . } -returnCodes error -result "*" -match glob proc inoperative {args} {} inoperative test notebook-1.2 "Cannot add siblings" -body { # This is legal now .nb add [frame .sibling] } -returnCodes error -result "*" -match glob test notebook-1.3 "Cannot add toplevel" -body { .nb add [toplevel .nb.t] } -cleanup { destroy .t.nb } -returnCodes error -match glob -result "can't add .nb.t*" test notebook-1.4 "Try to select bad tab" -body { .nb select @6000,6000 } -returnCodes error -match glob -result "* not found" # # Now add stuff: # test notebook-2.0 "Add children" -body { pack .nb -expand true -fill both .nb add [frame .nb.foo] -text "Foo" pack [label .nb.foo.l -text "Foo"] .nb add [frame .nb.bar -relief raised -borderwidth 2] -text "Bar" pack [label .nb.bar.l -text "Bar"] .nb tabs } -result [list .nb.foo .nb.bar] test notebook-2.1 "select pane" -body { .nb select .nb.foo update list [winfo viewable .nb.foo] [winfo viewable .nb.bar] [.nb index current] } -result [list 1 0 0] test notebook-2.2 "select another pane" -body { .nb select 1 update list [winfo viewable .nb.foo] [winfo viewable .nb.bar] [.nb index current] } -result [list 0 1 1] test notebook-2.3 "tab - get value" -body { .nb tab .nb.foo -text } -result "Foo" test notebook-2.4 "tab - set value" -body { .nb tab .nb.foo -text "Changed Foo" .nb tab .nb.foo -text } -result "Changed Foo" test notebook-2.5 "tab - get all options" -body { .nb tab .nb.foo } -result [list \ -padding 0 -sticky nsew \ -state normal -text "Changed Foo" -image "" -compound {} -underline -1] test notebook-4.1 "Test .nb index end" -body { .nb index end } -result 2 test notebook-4.2 "'end' is not a selectable index" -body { .nb select end } -returnCodes error -result "*" -match glob test notebook-4.3 "Select index out of range" -body { .nb select 2 } -returnCodes error -result "*" -match glob test notebook-4.4 "-padding option" -body { .nb configure -padding "5 5 5 5" } test notebook-4.end "Cleanup test suite 1-4.*" -body { destroy .nb } test notebook-5.1 "Virtual events" -body { toplevel .t set ::events [list] bind .t <> { lappend events changed %W } pack [set nb [ttk::notebook .t.nb]] -expand true -fill both; update $nb add [frame $nb.f1] ; # triggers <> (first tab gets autoselected) $nb add [frame $nb.f2] $nb add [frame $nb.f3] update $nb select $nb.f1 ; # does not trigger <> (tab to select is already selected) update; set events } -result [list changed .t.nb] test notebook-5.2 "Virtual events, continued" -body { set events [list] $nb select $nb.f3 update ; set events } -result [list changed .t.nb] # OR: [list deselected .t.nb.f1 selected .t.nb.f3 changed .t.nb] test notebook-5.3 "Disabled tabs" -body { set events [list] $nb tab $nb.f2 -state disabled $nb select $nb.f2 update list $events [$nb index current] } -result [list [list] 2] test notebook-5.4 "Reenable tab" -body { set events [list] $nb tab $nb.f2 -state normal $nb select $nb.f2 update list $events [$nb index current] } -result [list [list changed .t.nb] 1] test notebook-5.end "Virtual events, cleanup" -body { destroy .t } test notebook-6.0 "Select hidden tab" -setup { set nb [ttk::notebook .nb] $nb add [ttk::frame $nb.f1] $nb add [ttk::frame $nb.f2] $nb select $nb.f2 } -cleanup { destroy $nb } -body { set result [list] $nb tab $nb.f1 -state hidden lappend result [$nb tab $nb.f1 -state] $nb select $nb.f1 lappend result [$nb tab $nb.f1 -state] } -result [list hidden normal] test notebook-6.1 "Hide selected tab" -setup { pack [set nb [ttk::notebook .nb]] ; update $nb add [ttk::frame $nb.f1] $nb add [ttk::frame $nb.f2] $nb add [ttk::frame $nb.f3] $nb select $nb.f2 } -cleanup { destroy $nb } -body { set result [list] lappend result [$nb index current] [winfo ismapped $nb.f2] $nb hide $nb.f2 update idletasks lappend result [$nb index current] [winfo ismapped $nb.f2] lappend result [winfo ismapped $nb.f3] } -result [list 1 1 2 0 1] # See 1370833 test notebook-6.2 "Forget selected tab" -setup { ttk::notebook .n pack .n label .n.l -text abc .n add .n.l } -body { update after 100 .n forget .n.l update ;# Yowch! } -cleanup { destroy .n } -result {} test notebook-6.3 "Hide first tab when it's the current" -setup { pack [set nb [ttk::notebook .nb]] ; update $nb add [ttk::frame $nb.f1] $nb add [ttk::frame $nb.f2] $nb add [ttk::frame $nb.f3] $nb select $nb.f1 } -cleanup { destroy $nb } -body { set result [list] lappend result [$nb index current] [winfo ismapped $nb.f1] $nb hide $nb.f1 update idletasks lappend result [$nb index current] [winfo ismapped $nb.f1] } -result [list 0 1 1 0] test notebook-6.4 "Forget first tab when it's the current" -setup { pack [set nb [ttk::notebook .nb]] ; update $nb add [ttk::frame $nb.f1] $nb add [ttk::frame $nb.f2] $nb add [ttk::frame $nb.f3] $nb select $nb.f1 } -cleanup { destroy $nb } -body { set result [list] lappend result [$nb index current] [winfo ismapped $nb.f1] $nb forget $nb.f1 update idletasks lappend result [$nb index current] [winfo ismapped $nb.f1] } -result [list 0 1 0 0] test notebook-6.5 "Hide last tab when it's the current" -setup { pack [set nb [ttk::notebook .nb]] ; update $nb add [ttk::frame $nb.f1] $nb add [ttk::frame $nb.f2] $nb add [ttk::frame $nb.f3] $nb select $nb.f3 } -cleanup { destroy $nb } -body { set result [list] lappend result [$nb index current] [winfo ismapped $nb.f3] $nb hide $nb.f3 update idletasks lappend result [$nb index current] [winfo ismapped $nb.f3] } -result [list 2 1 1 0] test notebook-6.6 "Forget a middle tab when it's the current" -setup { pack [set nb [ttk::notebook .nb]] ; update $nb add [ttk::frame $nb.f1] $nb add [ttk::frame $nb.f2] $nb add [ttk::frame $nb.f3] $nb select $nb.f2 } -cleanup { destroy $nb } -body { set result [list] lappend result [$nb index current] [winfo ismapped $nb.f2] $nb forget $nb.f2 update idletasks lappend result [$nb index current] [winfo ismapped $nb.f2] } -result [list 1 1 1 0] test notebook-6.7 "Hide a middle tab when it's the current" -setup { pack [set nb [ttk::notebook .nb]]; update $nb add [ttk::frame $nb.f1] $nb add [ttk::frame $nb.f2] $nb add [ttk::frame $nb.f3] $nb select $nb.f2 } -cleanup { destroy $nb } -body { set result [list] lappend result [$nb index current] [winfo ismapped $nb.f2] $nb hide $nb.f2 update idletasks lappend result [$nb index current] [winfo ismapped $nb.f2] } -result [list 1 1 2 0] test notebook-6.8 "Forget a non-current tab < current" -setup { pack [set nb [ttk::notebook .nb]] ; update $nb add [ttk::frame $nb.f1] $nb add [ttk::frame $nb.f2] $nb add [ttk::frame $nb.f3] $nb select $nb.f2 } -cleanup { destroy $nb } -body { set result [list] lappend result [$nb index current] [winfo ismapped $nb.f2] $nb forget $nb.f1 update idletasks lappend result [$nb index current] [winfo ismapped $nb.f2] } -result [list 1 1 0 1] test notebook-6.9 "Hide a non-current tab < current" -setup { pack [set nb [ttk::notebook .nb]] ; update $nb add [ttk::frame $nb.f1] $nb add [ttk::frame $nb.f2] $nb add [ttk::frame $nb.f3] $nb select $nb.f2 } -cleanup { destroy $nb } -body { set result [list] lappend result [$nb index current] [winfo ismapped $nb.f2] $nb hide $nb.f1 update idletasks lappend result [$nb index current] [winfo ismapped $nb.f2] } -result [list 1 1 1 1] test notebook-6.10 "Forget a non-current tab > current" -setup { pack [set nb [ttk::notebook .nb]] ; update $nb add [ttk::frame $nb.f1] $nb add [ttk::frame $nb.f2] $nb add [ttk::frame $nb.f3] $nb select $nb.f2 } -cleanup { destroy $nb } -body { set result [list] lappend result [$nb index current] [winfo ismapped $nb.f2] $nb forget $nb.f3 update idletasks lappend result [$nb index current] [winfo ismapped $nb.f2] } -result [list 1 1 1 1] test notebook-6.11 "Hide a non-current tab > current" -setup { pack [set nb [ttk::notebook .nb]]; update $nb add [ttk::frame $nb.f1] $nb add [ttk::frame $nb.f2] $nb add [ttk::frame $nb.f3] $nb select $nb.f2 } -cleanup { destroy $nb } -body { set result [list] lappend result [$nb index current] [winfo ismapped $nb.f2] $nb hide $nb.f3 update idletasks lappend result [$nb index current] [winfo ismapped $nb.f2] } -result [list 1 1 1 1] test notebook-6.12 "Hide and re-add a tab" -setup { pack [set nb [ttk::notebook .nb]]; update $nb add [ttk::frame $nb.f1] $nb add [ttk::frame $nb.f2] $nb add [ttk::frame $nb.f3] $nb select $nb.f2 } -cleanup { destroy $nb } -body { set result [list] lappend result [$nb index current] [$nb tab $nb.f2 -state] $nb hide $nb.f2 update idletasks lappend result [$nb index current] [$nb tab $nb.f2 -state] $nb add $nb.f2 update idletasks lappend result [$nb index current] [$nb tab $nb.f2 -state] } -result [list 1 normal 2 hidden 2 normal] # # Insert: # unset nb test notebook-7.0 "insert - setup" -body { pack [ttk::notebook .nb] for {set i 0} {$i < 5} {incr i} { .nb add [ttk::frame .nb.f$i] -text "$i" } .nb select .nb.f1 list [.nb index current] [.nb tabs] } -result [list 1 [list .nb.f0 .nb.f1 .nb.f2 .nb.f3 .nb.f4]] test notebook-7.1 "insert - move backwards" -body { .nb insert 1 3 list [.nb index current] [.nb tabs] } -result [list 2 [list .nb.f0 .nb.f3 .nb.f1 .nb.f2 .nb.f4]] test notebook-7.2 "insert - move backwards again" -body { .nb insert 1 3 list [.nb index current] [.nb tabs] } -result [list 3 [list .nb.f0 .nb.f2 .nb.f3 .nb.f1 .nb.f4]] test notebook-7.3 "insert - move backwards again" -body { .nb insert 1 3 list [.nb index current] [.nb tabs] } -result [list 1 [list .nb.f0 .nb.f1 .nb.f2 .nb.f3 .nb.f4]] test notebook-7.4 "insert - move forwards" -body { .nb insert 3 1 list [.nb index current] [.nb tabs] } -result [list 3 [list .nb.f0 .nb.f2 .nb.f3 .nb.f1 .nb.f4]] test notebook-7.5 "insert - move forwards again" -body { .nb insert 3 1 list [.nb index current] [.nb tabs] } -result [list 2 [list .nb.f0 .nb.f3 .nb.f1 .nb.f2 .nb.f4]] test notebook-7.6 "insert - move forwards again" -body { .nb insert 3 1 list [.nb index current] [.nb tabs] } -result [list 1 [list .nb.f0 .nb.f1 .nb.f2 .nb.f3 .nb.f4]] test notebook-7.7a "insert - current tab undisturbed" -body { .nb select 0 .nb insert 3 1 .nb index current } -result 0 test notebook-7.7b "insert - current tab undisturbed" -body { .nb select 0 .nb insert 1 3 .nb index current } -result 0 test notebook-7.7c "insert - current tab undisturbed" -body { .nb select 4 .nb insert 3 1 .nb index current } -result 4 test notebook-7.7d "insert - current tab undisturbed" -body { .nb select 4 .nb insert 1 3 .nb index current } -result 4 test notebook-7.8a "move tabs - current tab undisturbed - exhaustive" -body { .nb select .nb.f0 foreach i {0 1 2 3 4} { .nb insert $i .nb.f$i } foreach i {0 1 2 3 4} { .nb select .nb.f$i foreach j {0 1 2 3 4} { foreach k {0 1 2 3 4} { .nb insert $j $k set current [lindex [.nb tabs] [.nb index current]] if {$current != ".nb.f$i"} { error "($i,$j,$k) current = $current" } .nb insert $k $j if {[.nb tabs] ne [list .nb.f0 .nb.f1 .nb.f2 .nb.f3 .nb.f4]} { error "swap $j $k; swap $k $j => [.nb tabs]" } } } } .nb tabs } -result [list .nb.f0 .nb.f1 .nb.f2 .nb.f3 .nb.f4] test notebook-7.8b "insert new - current tab undisturbed - exhaustive" -body { foreach i {0 1 2 3 4} { .nb select .nb.f$i foreach j {0 1 2 3 4} { .nb select .nb.f$i .nb insert $j [frame .nb.newf] set current [lindex [.nb tabs] [.nb index current]] if {$current != ".nb.f$i"} { puts stderr "new tab at $j, current = $current, expect .nb.f$i" } destroy .nb.newf if {[.nb tabs] ne [list .nb.f0 .nb.f1 .nb.f2 .nb.f3 .nb.f4]} { error "tabs disturbed" } } } } test notebook-7.end "insert - cleanup" -body { destroy .nb } test notebook-1817596-1 "insert should autoselect first tab" -body { pack [ttk::notebook .nb] list \ [.nb insert end [ttk::label .nb.l1 -text One] -text One] \ [.nb select] \ ; } -result [list "" .nb.l1] -cleanup { destroy .nb } test notebook-1817596-2 "error in insert should have no effect" -body { pack [ttk::notebook .nb] .nb insert end [ttk::label .nb.l1] .nb insert end [ttk::label .nb.l2] list \ [catch { .nb insert .l2 0 -badoption badvalue } err] \ [.nb tabs] \ } -result [list 1 [list .nb.l1 .nb.l2]] -cleanup { destroy .nb } test notebook-1817596-3 "insert/configure" -body { pack [ttk::notebook .nb] .nb insert end [ttk::label .nb.l0] -text "L0" .nb insert end [ttk::label .nb.l1] -text "L1" .nb insert end [ttk::label .nb.l2] -text "XX" .nb insert 0 2 -text "L2" list [.nb tabs] [.nb tab 0 -text] [.nb tab 1 -text] [.nb tab 2 -text] } -result [list [list .nb.l2 .nb.l0 .nb.l1] L2 L0 L1] -cleanup { destroy .nb } test notebook-readd-1 "add same widget twice" -body { pack [ttk::notebook .nb] .nb add [ttk::button .nb.b1] -text "Button" .nb add .nb.b1 .nb tabs } -result [list .nb.b1] -cleanup { destroy .nb } test notebook-readd-2 "add same widget twice, with options" -body { pack [ttk::notebook .nb] .nb add [ttk::button .nb.b1] -text "Tab label" .nb add .nb.b1 -text "Changed tab label" .nb tabs } -result [list .nb.b1] -cleanup { destroy .nb } test notebook-readd-3 "insert same widget twice, with options" -body { pack [ttk::notebook .nb] .nb insert end [ttk::button .nb.b1] -text "Tab label" .nb insert end .nb.b1 -text "Changed tab label" .nb tabs } -result [list .nb.b1] -cleanup { destroy .nb } # See #1343984 test notebook-1343984-1 "don't autoselect on destroy - setup" -body { ttk::notebook .nb set ::history [list] bind TestFrame { lappend history MAP %W } bind TestFrame { lappend history DESTROY %W } .nb add [ttk::frame .nb.frame1 -class TestFrame] -text "Frame 1" .nb add [ttk::frame .nb.frame2 -class TestFrame] -text "Frame 2" .nb add [ttk::frame .nb.frame3 -class TestFrame] -text "Frame 3" pack .nb -fill both -expand 1 update set ::history } -result [list MAP .nb.frame1] test notebook-1343984-2 "don't autoselect on destroy" -body { set ::history [list] destroy .nb update set ::history } -result [list DESTROY .nb.frame1 DESTROY .nb.frame2 DESTROY .nb.frame3] test notebook-198376af5a {moving tab position to a different edge} -body { destroy .nb ttk::notebook .nb -width 200 -height 100 -padding 0 ttk::frame .nb.f1 ttk::frame .nb.f2 .nb add .nb.f1 -text "One" .nb add .nb.f2 -text "Two" pack .nb update ttk::style configure TNotebook -tabposition s update expr {[winfo y .nb.f1] < 10} } -result 1 tcltest::cleanupTests tk8.6.14/tests/ttk/layout.test0000644003604700454610000000157514554262361014750 0ustar dgp771divpackage require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands test layout-1.1 "Size computations for mixed-orientation layouts" -body { ttk::style theme use default set block [image create photo -width 10 -height 10] ttk::style element create block image $block ttk::style layout Blocks { border -children { block } -side left border -children { block } -side top border -children { block } -side bottom } ttk::style configure Blocks -borderwidth 1 -relief raised ttk::button .b -style Blocks pack .b -expand true -fill both list [winfo reqwidth .b] [winfo reqheight .b] } -cleanup { destroy .b } -result [list 24 24] test layout-2 "Empty -children not allowed" -body { ttk::style layout Test.Tentry {Entry.field -children {}} } -returnCodes error -result {Invalid -children value} tcltest::cleanupTests tk8.6.14/tests/ttk/labelframe.test0000644003604700454610000001003114554262361015510 0ustar dgp771divpackage require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands test labelframe-1.0 "Setup" -body { pack [ttk::labelframe .lf] -expand true -fill both } test labelframe-2.1 "Can't use indirect descendant as labelwidget" -body { ttk::frame .lf.t ttk::checkbutton .lf.t.cb .lf configure -labelwidget .lf.t.cb } -returnCodes error -result "can't *" -match glob \ -cleanup { destroy .lf.t } ; test labelframe-2.2 "Can't use toplevel as labelwidget" -body { toplevel .lf.t .lf configure -labelwidget .lf.t } -returnCodes error -result "can't *" -match glob \ -cleanup { destroy .lf.t } ; test labelframe-2.3 "Can't use non-windows as -labelwidget" -body { .lf configure -labelwidget BogusWindowName } -returnCodes error -result {bad window path name "BogusWindowName"} test labelframe-2.4 "Can't use nonexistent-windows as -labelwidget" -body { .lf configure -labelwidget .nosuchwindow } -returnCodes error -result {bad window path name ".nosuchwindow"} ### # See also series labelframe-4.x # test labelframe-3.1 "Add child content" -body { checkbutton .lf.cb -text "abcde" .lf configure -labelwidget .lf.cb list [update; winfo viewable .lf.cb] [winfo manager .lf.cb] } -result [list 1 labelframe] test labelframe-3.2 "Remove child content" -body { .lf configure -labelwidget {} list [update; winfo viewable .lf.cb] [winfo manager .lf.cb] } -result [list 0 {}] test labelframe-3.3 "Re-add child content" -body { .lf configure -labelwidget .lf.cb list [update; winfo viewable .lf.cb] [winfo manager .lf.cb] } -result [list 1 labelframe] test labelframe-3.4 "Re-manage child content" -body { pack .lf.cb -side right list [update; winfo viewable .lf.cb] [winfo manager .lf.cb] [.lf cget -labelwidget] } -result [list 1 pack {}] test labelframe-3.5 "Re-add child content" -body { .lf configure -labelwidget .lf.cb list [update; winfo viewable .lf.cb] [winfo manager .lf.cb] } -result [list 1 labelframe] test labelframe-3.6 "Destroy child content" -body { destroy .lf.cb .lf cget -labelwidget } -result {} ### # Re-run series labelframe-3.x with nonchild content. # # @@@ ODDITY, 14 Nov 2005: # @@@ labelframe-4.1 fails if .cb is a [checkbutton], # @@@ but seems to succeed if it's some other widget class. # @@@ I suspect a race condition; unable to track it down ATM. # # @@@ FOLLOWUP: This *may* have been caused by a bug in ManagerIdleProc # @@@ (see manager.c r1.11). There's still probably a race condition in here. # test labelframe-4.1 "Add nonchild content" -body { checkbutton .cb -text "abcde" .lf configure -labelwidget .cb update list [winfo ismapped .cb] [winfo viewable .cb] [winfo manager .cb] } -result [list 1 1 labelframe] test labelframe-4.2 "Remove nonchild content" -body { .lf configure -labelwidget {} update; list [winfo ismapped .cb] [winfo viewable .cb] [winfo manager .cb] } -result [list 0 0 {}] test labelframe-4.3 "Re-add nonchild content" -body { .lf configure -labelwidget .cb list [update; winfo viewable .cb] [winfo manager .cb] } -result [list 1 labelframe] test labelframe-4.4 "Re-manage nonchild content" -body { pack .cb -side right list [update; winfo viewable .cb] \ [winfo manager .cb] \ [.lf cget -labelwidget] } -result [list 1 pack {}] test labelframe-4.5 "Re-add nonchild content" -body { .lf configure -labelwidget .cb list [update; winfo viewable .cb] \ [winfo manager .cb] \ [.lf cget -labelwidget] } -result [list 1 labelframe .cb] test labelframe-4.6 "Destroy nonchild content" -body { destroy .cb .lf cget -labelwidget } -result {} test labelframe-5.0 "Cleanup" -body { destroy .lf } # 1342876 -- labelframe should raise sibling -labelwidget above self. # test labelframe-6.1 "Stacking order" -body { toplevel .t pack [ttk::checkbutton .t.x1] pack [ttk::labelframe .t.lf -labelwidget [ttk::label .t.lb]] pack [ttk::checkbutton .t.x2] winfo children .t } -cleanup { destroy .t } -result [list .t.x1 .t.lf .t.lb .t.x2] tcltest::cleanupTests tk8.6.14/tests/ttk/image.test0000644003604700454610000000276014554262361014512 0ustar dgp771divpackage require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands test image-1.1 "Bad image element" -body { ttk::style element create BadImage image badimage } -returnCodes error -result {image "badimage" doesn't exist} test image-1.2 "Duplicate element" -setup { image create photo test.element -width 10 -height 10 ttk::style element create testElement image test.element } -body { ttk::style element create testElement image test.element } -returnCodes error -result "Duplicate element testElement" test image-2.0 "Deletion of displayed image (label)" -setup { image create photo test.image -width 10 -height 10 } -body { pack [set w [ttk::label .ttk_image20 -image test.image]] tkwait visibility $w image delete test.image update } -cleanup { destroy .ttk_image20 } -result {} test image-2.1 "Deletion of displayed image (checkbutton)" -setup { image create photo test.image -width 10 -height 10 } -body { pack [set w [ttk::checkbutton .ttk_image21 -image test.image]] tkwait visibility $w image delete test.image update } -cleanup { destroy .ttk_image21 } -result {} test image-2.2 "Deletion of displayed image (radiobutton)" -setup { image create photo test.image -width 10 -height 10 } -body { pack [set w [ttk::radiobutton .ttk_image22 -image test.image]] tkwait visibility $w image delete test.image update } -cleanup { destroy .ttk_image22 } -result {} # tcltest::cleanupTests tk8.6.14/tests/ttk/entry.test0000644003604700454610000002355014554262361014571 0ustar dgp771div# # Tile package: entry widget tests # package require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }] variable scrollInfo proc scroll args { global scrollInfo set scrollInfo $args } # Some of the tests raise background errors; # override default bgerror to catch them. # variable bgerror "" proc bgerror {error} { variable bgerror $error variable bgerrorInfo $::errorInfo variable bgerrorCode $::errorCode } # test entry-1.1 "Create entry widget" -body { ttk::entry .e } -result .e test entry-1.2 "Insert" -body { .e insert end abcde .e get } -result abcde test entry-1.3 "Selection" -body { .e selection range 1 3 selection get } -result bc test entry-1.4 "Delete" -body { .e delete 1 3 .e get } -result ade test entry-1.5 "Deletion - insert cursor" -body { .e insert end abcde .e icursor 0 .e delete 0 end .e index insert } -result 0 test entry-1.6 "Deletion - insert cursor at end" -body { .e insert end abcde .e icursor end .e delete 0 end .e index insert } -result 0 test entry-1.7 "Deletion - insert cursor in the middle " -body { .e insert end abcde .e icursor 3 .e delete 0 end .e index insert } -result 0 test entry-1.done "Cleanup" -body { destroy .e } # Scrollbar tests. test entry-2.1 "Create entry before scrollbar" -body { pack [ttk::entry .te -xscrollcommand [list .tsb set]] \ -expand true -fill both pack [ttk::scrollbar .tsb -orient horizontal -command [list .te xview]] \ -expand false -fill x } -cleanup {destroy .te .tsb} test entry-2.1.1 "Create entry before scrollbar - scrollbar catches up" -constraints {failsOnUbuntu failsOnXQuarz} -body { pack [ttk::entry .te -xscrollcommand [list .tsb set]] \ -expand true -fill both .te insert end [string repeat "abc" 50] catch {update} ; # error triggers because the -xscrollcommand callback # errors out: invalid command name ".tsb" pack [ttk::scrollbar .tsb -orient horizontal -command [list .te xview]] \ -expand false -fill x update ; # no error set res [expr [lindex [.tsb get] 1] < 1] ; # scrollbar did update } -result 1 -cleanup {destroy .te .tsb} test entry-2.2 "Initial scroll position" -body { ttk::entry .e -font fixed -width 5 -xscrollcommand scroll .e insert end "0123456789" pack .e; set timeout [after 500 {set $scrollInfo "timeout"}] vwait scrollInfo set scrollInfo } -cleanup { destroy .e after cancel $timeout } -result {0.0 0.5} # NOTE: result can vary depending on font. # Bounding box / scrolling tests. test entry-3.0 "Series 3 setup" -body { ttk::style theme use default variable fixed TkFixedFont variable cw [font measure $fixed a] variable ch [font metrics $fixed -linespace] variable bd 2 ;# border + padding variable ux [font measure $fixed \u4e4e] pack [ttk::entry .e -font $fixed -width 20] update } test entry-3.1 "bbox widget command" -body { .e delete 0 end .e bbox 0 } -result [list $bd $bd 0 $ch] test entry-3.2 "xview" -body { .e delete 0 end; .e insert end [string repeat "0" 40] set result [.e xview] } -result {0.0 0.5} test entry-3.3 "xview" -body { .e delete 0 end; .e insert end abcdefghijklmnopqrstuvwxyz .e xview end set result [.e index @0] } -result 7 test entry-3.4 "xview" -body { .e delete 0 end; .e insert end abcdefghijklmnopqrstuvwxyz .e xview moveto 1.0 set result [.e index @0] } -result 7 test entry-3.5 "xview" -body { .e delete 0 end; .e insert end abcdefghijklmnopqrstuvwxyz .e xview scroll 5 units set result [.e index @0] } -result 5 test entry-3.6 "xview" -body { .e delete 0 end; .e insert end [string repeat abcdefghijklmnopqrstuvwxyz 5] .e xview scroll 2 pages set result [.e index @0] } -result 40 test entry-3.last "Series 3 cleanup" -body { destroy .e } # Selection tests: test entry-4.0 "Selection test - setup" -body { ttk::entry .e .e insert end asdfasdf .e selection range 0 end } test entry-4.1 "Selection test" -body { selection get } -result asdfasdf test entry-4.2 "Disable -exportselection" -body { .e configure -exportselection false selection get } -returnCodes error -result "PRIMARY selection doesn't exist*" -match glob test entry-4.3 "Reenable -exportselection" -body { .e configure -exportselection true selection get } -result asdfasdf test entry-4.4 "Force selection loss" -body { selection own . .e index sel.first } -returnCodes error -result "selection isn't in widget .e" test entry-4.5 "Allow selection changes if readonly" -body { .e delete 0 end .e insert end 0123456789 .e selection range 0 end .e configure -state readonly .e selection range 2 4 .e configure -state normal list [.e index sel.first] [.e index sel.last] } -result {2 4} test entry-4.6 "Disallow selection changes if disabled" -body { .e delete 0 end .e insert end 0123456789 .e selection range 0 end .e configure -state disabled .e selection range 2 4 .e configure -state normal list [.e index sel.first] [.e index sel.last] } -result {0 10} test entry-4.7 {sel.first and sel.last gravity} -body { set result [list] .e delete 0 end .e insert 0 0123456789 .e select range 2 6 .e insert 2 XXX lappend result [.e index sel.first] [.e index sel.last] .e insert 6 YYY lappend result [.e index sel.first] [.e index sel.last] [.e get] } -result {5 9 5 12 01XXX2YYY3456789} # Self-destruct tests. test entry-5.1 {widget deletion while active} -body { destroy .e pack [ttk::entry .e] update .e config -xscrollcommand { destroy .e } update idletasks winfo exists .e } -result 0 # TODO: test killing .e in -validatecommand, -invalidcommand, variable trace; # -textvariable tests. test entry-6.1 {Update linked variable in write trace} -body { proc override args { global x set x "Overridden!" } catch {destroy .e} set x "" trace add variable x write override ttk::entry .e -textvariable x .e insert 0 "Some text" set result [list $x [.e get]] set result } -result {Overridden! Overridden!} -cleanup { unset x rename override {} destroy .e } test entry-6.2 {-textvariable tests} -body { set result [list] ttk::entry .e -textvariable x set x "text" lappend result [.e get] unset x lappend result [.e get] .e insert end "newtext" lappend result [.e get] [set x] } -result [list "text" "" "newtext" "newtext"] -cleanup { destroy .e 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 map TEntry -font {readonly ABadFont} ttk::style map TEntry \ -selectbackground {{} BadColor} \ -selectforeground {{} BadColor} \ -insertcolor {{} BadColor} } pack [ttk::entry .e -text "Don't crash"] ttk::style theme use entry-7.1 update .e selection range 0 end update .e state readonly; update } -cleanup { destroy .e ; ttk::style theme use default } test entry-8.1 "Unset linked variable" -body { variable foo "bar" pack [ttk::entry .e -textvariable foo] unset foo .e insert end "baz" list [.e cget -textvariable] [.e get] [set foo] } -result [list foo "baz" "baz"] -cleanup { destroy .e } test entry-8.2 "Unset linked variable by deleting namespace" -body { namespace eval ::test { variable foo "bar" } pack [ttk::entry .e -textvariable ::test::foo] namespace delete ::test .e insert end "baz" ;# <== error here list [.e cget -textvariable] [.e get] [set foo] } -returnCodes error -result "*parent namespace doesn't exist*" -match glob # '-result [list ::test::foo "baz" "baz"]' would also be sensible, # but Tcl namespaces don't work that way. test entry-8.2a "Followup to test 8.2" -body { .e cget -textvariable } -result ::test::foo -cleanup { destroy .e } # For 8.2a, -result {} would also be sensible. test entry-9.1 "Index range invariants" -setup { # See bug#1721532 for discussion proc entry-9.1-trace {n1 n2 op} { set ::V NO! } variable V trace add variable V write entry-9.1-trace ttk::entry .e -textvariable V } -body { set result [list] .e insert insert a ; lappend result [.e index insert] [.e index end] .e insert insert b ; lappend result [.e index insert] [.e index end] .e insert insert c ; lappend result [.e index insert] [.e index end] .e insert insert d ; lappend result [.e index insert] [.e index end] .e insert insert e ; lappend result [.e index insert] [.e index end] set result } -result [list 1 3 2 3 3 3 3 3 3 3] -cleanup { unset V destroy .e } test entry-11.1 {Bug [2830360fff] - Don't loose invalid at focus events} -setup { pack [ttk::entry .e] update } -body { .e state invalid set res [.e state] event generate .e lappend res [.e state] } -result {invalid invalid} -cleanup { destroy .e } test entry-11.2 {Bug [2a32225cd1] - Navigation in a password made of several words} -setup { destroy .e pack [ttk::entry .e -show *] update set res {} } -body { .e insert end "A sample password made of several words" .e icursor end event generate .e <> ; # shall move insert to index 0 .e delete insert end lappend res [.e get] .e insert end "A sample password made of several words" .e icursor 2 event generate .e <> ; # shall move insert to index end .e delete 0 insert lappend res [.e get] } -cleanup { destroy .e } -result {{} {}} tcltest::cleanupTests tk8.6.14/tests/ttk/combobox.test0000644003604700454610000000602714554262361015240 0ustar dgp771div# # ttk::combobox widget tests # package require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands test combobox-1.0 "Combobox tests -- setup" -body { ttk::combobox .cb } -result .cb test combobox-1.1 "Bad -values list" -body { .cb configure -values "bad \{list" } -result "unmatched open brace in list" -returnCodes error test combobox-1.end "Combobox tests -- cleanup" -body { destroy .cb } test combobox-2.0 "current command" -body { ttk::combobox .cb -values [list a b c d e a] .cb current } -result -1 test combobox-2.1 "current -- set index" -body { .cb current 5 .cb get } -result a test combobox-2.2 "current -- change -values" -body { .cb configure -values [list c b a d e] .cb current } -result 2 test combobox-2.3 "current -- change value" -body { .cb set "b" .cb current } -result 1 test combobox-2.4 "current -- value not in list" -body { .cb set "z" .cb current } -result -1 test combobox-2.5 "current -- set to end index" -body { .cb configure -values [list a b c d e thelastone] .cb current end .cb get } -result thelastone test combobox-2.6 "current -- set to unknown index" -body { .cb configure -values [list a b c d e] .cb current notanindex } -returnCodes error -result {Incorrect index notanindex} test combobox-2.7 {current -- set to 0 index when empty [bug 924835c36d]} -body { .cb configure -values {} .cb current 0 } -returnCodes error -result {Index 0 out of range} test combobox-2.8 "current -- set to end index in an empty combobox" -body { .cb configure -values {} .cb current end } -returnCodes error -result {index "end" out of range} test combobox-2.end "Cleanup" -body { destroy .cb } test combobox-3 "Read postoffset value dynamically from current style" -body { ttk::combobox .cb -values [list a b c] -style "DerivedStyle.TCombobox" pack .cb -expand true -fill both update idletasks ttk::style configure DerivedStyle.TCombobox -postoffset [list 25 0 0 0] if {[tk windowingsystem] == "aqua"} { after 500 { pressbutton [expr {[winfo rootx .cb] + 25}] [expr {[winfo rooty .cb] + 25}] } } ttk::combobox::Post .cb expr {[winfo rootx .cb.popdown] - [winfo rootx .cb]} } -result 25 -cleanup { destroy .cb } test combobox-1890211 "ComboboxSelected event after listbox unposted" \ -constraints {notAqua} -body { # whitebox test... pack [ttk::combobox .cb -values [list a b c]] update idletasks set result [list] bind .cb <> { lappend result Event [winfo ismapped .cb.popdown] [.cb get] } lappend result Start 0 [.cb get] ttk::combobox::Post .cb lappend result Post [winfo ismapped .cb.popdown] [.cb get] .cb.popdown.f.l selection clear 0 end; .cb.popdown.f.l selection set 1 ttk::combobox::LBSelected .cb.popdown.f.l lappend result Select [winfo ismapped .cb.popdown] [.cb get] update set result } -result [list Start 0 {} Post 1 {} Select 0 b Event 0 b] -cleanup { destroy .cb } tcltest::cleanupTests tk8.6.14/tests/ttk/checkbutton.test0000644003604700454610000000411114554262361015731 0ustar dgp771div# # ttk::checkbutton widget tests. # package require Tk package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands test checkbutton-1.1 "Checkbutton check" -body { pack [ttk::checkbutton .cb -text "TCheckbutton" -variable cb] } test checkbutton-1.2 "Checkbutton invoke" -body { .cb invoke list [set ::cb] [.cb instate selected] } -result [list 1 1] test checkbutton-1.3 "Checkbutton reinvoke" -body { .cb invoke list [set ::cb] [.cb instate selected] } -result [list 0 0] test checkbutton-1.4 "Checkbutton variable" -body { set result [] set ::cb 1 lappend result [.cb instate selected] set ::cb 0 lappend result [.cb instate selected] } -result {1 0} test checkbutton-1.5 "Unset checkbutton variable" -body { set result [] unset ::cb lappend result [.cb instate alternate] [info exists ::cb] set ::cb 1 lappend result [.cb instate alternate] [info exists ::cb] } -result {1 0 0 1} # See #1257319 test checkbutton-1.6 "Checkbutton default variable" -body { destroy .cb ; unset -nocomplain {} ; set result [list] ttk::checkbutton .cb -onvalue on -offvalue off lappend result [.cb cget -variable] [info exists .cb] [.cb state] .cb invoke lappend result [info exists .cb] [set .cb] [.cb state] .cb invoke lappend result [info exists .cb] [set .cb] [.cb state] } -result [list .cb 0 alternate 1 on selected 1 off {}] # Bug [109865fa01] test checkbutton-1.7 "Button destroyed by click" -body { proc destroy_button {} { destroy .top } toplevel .top ttk::menubutton .top.mb -text Button -style TLabel bind .top.mb destroy_button pack .top.mb focus -force .top.mb update event generate .top.mb <1> event generate .top.mb update ; # shall not trigger error invalid command name ".top.b" } -result {} # Bug [fa8de77936] test checkbutton-1.8 "Empty -variable" -body { # shall simply not crash ttk::checkbutton .cbev -variable {} .cbev invoke } -cleanup { destroy .cbev } -result {} tcltest::cleanupTests tk8.6.14/tests/option.file30000755003604700454610000000057214554262361014163 0ustar dgp771div! This file is a sample option (resource) database used to test ! Tk's option-handling capabilities. ! Comment line \ with a backslash-newline sequence embedded in it. *x1: blue tktest.x2 : green *\ x3 \ : pur\ ple *x 4: brówn # More comments, this time delimited by hash-marks. # Comment-line with space. *x6: *x9: \ \ \\\101\n # comment line as last line of file. tk8.6.14/tests/option.file20000644003604700454610000000004214554262361014147 0ustar dgp771div*foo1: magenta foo2 missing colon tk8.6.14/tests/option.file10000644003604700454610000000057114554262361014155 0ustar dgp771div! This file is a sample option (resource) database used to test ! Tk's option-handling capabilities. ! Comment line \ with a backslash-newline sequence embedded in it. *x1: blue tktest.x2 : green *\ x3 \ : pur\ ple *x 4: brown # More comments, this time delimited by hash-marks. # Comment-line with space. *x6: *x9: \ \ \\\101\n # comment line as last line of file. tk8.6.14/tests/flagup.xbm0000644003604700454610000000353014554262361013707 0ustar dgp771div#define flagup_width 48 #define flagup_height 48 static char flagup_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xef, 0x6a, 0x00, 0x00, 0x00, 0xc0, 0x7b, 0x75, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0x6a, 0x00, 0x00, 0x00, 0x30, 0x60, 0x75, 0x00, 0x00, 0x00, 0x18, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x0c, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x06, 0xe0, 0x04, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x04, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x06, 0x00, 0x00, 0xc0, 0x1f, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x7f, 0xe0, 0x07, 0x00, 0x00, 0x70, 0xe0, 0xe0, 0x05, 0x00, 0x00, 0x38, 0x80, 0xe1, 0x04, 0x00, 0x00, 0x18, 0x80, 0xf1, 0x04, 0x00, 0x00, 0x0c, 0x00, 0xfb, 0x04, 0x00, 0x00, 0x0c, 0x00, 0xff, 0x04, 0x00, 0x00, 0x86, 0x1f, 0xee, 0x04, 0x00, 0x00, 0x06, 0x06, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0x66, 0x04, 0x00, 0x7f, 0x56, 0x52, 0x06, 0xe4, 0xff, 0x00, 0x76, 0x55, 0x06, 0x04, 0x00, 0x00, 0x56, 0x57, 0x06, 0x04, 0x00, 0x00, 0x56, 0x55, 0x06, 0x06, 0x00, 0x00, 0x56, 0xd5, 0x06, 0x03, 0x00, 0x00, 0x06, 0x00, 0x86, 0x01, 0x00, 0x54, 0x06, 0x00, 0xc6, 0x54, 0x55, 0xaa, 0x06, 0x00, 0x66, 0xaa, 0x2a, 0x54, 0x06, 0x00, 0x36, 0x55, 0x55, 0xaa, 0x06, 0x00, 0xbe, 0xaa, 0x2a, 0x54, 0xfe, 0xff, 0x6f, 0x55, 0x55, 0xaa, 0xfc, 0xff, 0xa7, 0xaa, 0x2a, 0x54, 0x01, 0x88, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a, 0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a, 0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a, 0x54, 0x55, 0x8d, 0x50, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa8, 0xaa, 0x2a, 0x54, 0x55, 0x95, 0x54, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x2a, 0x54, 0x55, 0x55, 0x55, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; tk8.6.14/tests/flagdown.xbm0000644003604700454610000000353614554262361014240 0ustar dgp771div#define flagdown_width 48 #define flagdown_height 48 static char flagdown_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, 0x00, 0x03, 0x00, 0x06, 0x06, 0x00, 0x80, 0x01, 0x00, 0x06, 0x07, 0x00, 0xc0, 0x1f, 0x00, 0x87, 0x07, 0x00, 0xe0, 0x7f, 0x80, 0xc7, 0x07, 0x00, 0x70, 0xe0, 0xc0, 0xe5, 0x07, 0x00, 0x38, 0x80, 0xe1, 0x74, 0x07, 0x00, 0x18, 0x80, 0x71, 0x3c, 0x07, 0x00, 0x0c, 0x00, 0x3b, 0x1e, 0x03, 0x00, 0x0c, 0x00, 0x1f, 0x0f, 0x00, 0x00, 0x86, 0x1f, 0x8e, 0x07, 0x00, 0x00, 0x06, 0x06, 0xc6, 0x05, 0x00, 0x00, 0x06, 0x00, 0xc6, 0x05, 0x00, 0x00, 0x06, 0x00, 0xc6, 0x04, 0x00, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, 0x7f, 0x06, 0x00, 0x06, 0xe4, 0xff, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, 0x00, 0x06, 0x00, 0x06, 0x06, 0x00, 0x00, 0x06, 0x00, 0x06, 0x03, 0x00, 0x00, 0x06, 0x00, 0x86, 0x01, 0x00, 0x00, 0x06, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x06, 0x00, 0x66, 0x00, 0x00, 0x00, 0x06, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x2f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x27, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0xf7, 0xbf, 0x8e, 0xfc, 0xdf, 0xf8, 0x9d, 0xeb, 0x9b, 0x76, 0xd2, 0x7a, 0x46, 0x30, 0xe2, 0x0f, 0xe1, 0x47, 0x55, 0x84, 0x48, 0x11, 0x84, 0x19}; tk8.6.14/tests/face.xbm0000644003604700454610000003066014554262361013333 0ustar dgp771div#define face_width 108 #define face_height 144 #define face_x_hot 48 #define face_y_hot 80 static char face_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x09, 0x20, 0x80, 0x24, 0x05, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x88, 0x24, 0x20, 0x80, 0x24, 0x00, 0x00, 0x00, 0x10, 0x80, 0x04, 0x00, 0x01, 0x00, 0x01, 0x40, 0x0a, 0x09, 0x00, 0x92, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x12, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x84, 0x24, 0x40, 0x22, 0xa8, 0x02, 0x14, 0x84, 0x92, 0x40, 0x42, 0x12, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x52, 0x11, 0x00, 0x12, 0x00, 0x40, 0x02, 0x00, 0x20, 0x00, 0x08, 0x00, 0xaa, 0x02, 0x54, 0x85, 0x24, 0x00, 0x10, 0x12, 0x00, 0x00, 0x81, 0x44, 0x00, 0x90, 0x5a, 0x00, 0xea, 0x1b, 0x00, 0x80, 0x40, 0x40, 0x02, 0x00, 0x08, 0x00, 0x20, 0xa2, 0x05, 0x8a, 0xb4, 0x6e, 0x45, 0x12, 0x04, 0x08, 0x00, 0x00, 0x00, 0x10, 0x02, 0xa8, 0x92, 0x00, 0xda, 0x5f, 0x10, 0x00, 0x10, 0xa1, 0x04, 0x20, 0x41, 0x02, 0x00, 0x5a, 0x25, 0xa0, 0xff, 0xfb, 0x05, 0x41, 0x02, 0x04, 0x00, 0x00, 0x08, 0x40, 0x80, 0xec, 0x9b, 0xec, 0xfe, 0x7f, 0x01, 0x04, 0x20, 0x90, 0x02, 0x04, 0x00, 0x08, 0x20, 0xfb, 0x2e, 0xf5, 0xff, 0xff, 0x57, 0x00, 0x04, 0x02, 0x00, 0x00, 0x20, 0x01, 0xc1, 0x6e, 0xab, 0xfa, 0xff, 0xff, 0x05, 0x90, 0x20, 0x48, 0x02, 0x00, 0x04, 0x20, 0xa8, 0xdf, 0xb5, 0xfe, 0xff, 0xff, 0x0b, 0x01, 0x00, 0x01, 0x00, 0x80, 0x80, 0x04, 0xe0, 0xbb, 0xef, 0xff, 0xff, 0x7f, 0x01, 0x00, 0x04, 0x48, 0x02, 0x00, 0x20, 0x80, 0xf4, 0x6f, 0xfb, 0xff, 0xff, 0xff, 0x20, 0x90, 0x40, 0x02, 0x00, 0x00, 0x04, 0x08, 0xb8, 0xf6, 0xff, 0xff, 0xdf, 0xbe, 0x12, 0x45, 0x10, 0x90, 0x04, 0x90, 0x00, 0x22, 0xfa, 0xff, 0xff, 0xff, 0xbb, 0xd7, 0xe9, 0x3a, 0x02, 0x02, 0x00, 0x04, 0x90, 0x80, 0xfe, 0xdf, 0xf6, 0xb7, 0xef, 0xbe, 0x56, 0x57, 0x40, 0x48, 0x09, 0x00, 0x04, 0x00, 0xfa, 0xf5, 0xdf, 0xed, 0x5a, 0xd5, 0xea, 0xbd, 0x09, 0x00, 0x00, 0x40, 0x00, 0x92, 0xfe, 0xbf, 0x7d, 0xb7, 0x6a, 0x55, 0xbf, 0xf7, 0x02, 0x11, 0x01, 0x00, 0x91, 0x00, 0xff, 0xff, 0xaf, 0x55, 0x55, 0x5b, 0xeb, 0xef, 0x22, 0x04, 0x04, 0x04, 0x00, 0xa4, 0xff, 0xf7, 0xad, 0xaa, 0xaa, 0xaa, 0xbe, 0xfe, 0x03, 0x20, 0x00, 0x10, 0x44, 0x80, 0xff, 0x7f, 0x55, 0x12, 0x91, 0x2a, 0xeb, 0xbf, 0x0b, 0x82, 0x02, 0x00, 0x00, 0xd1, 0x7f, 0xdf, 0xa2, 0xa4, 0x54, 0x55, 0xfd, 0xfd, 0x47, 0x08, 0x08, 0x00, 0x21, 0xe4, 0xff, 0x37, 0x11, 0x09, 0xa5, 0xaa, 0xb6, 0xff, 0x0d, 0x80, 0x00, 0x00, 0x04, 0xd0, 0xff, 0x4f, 0x44, 0x20, 0x48, 0x55, 0xfb, 0xff, 0x27, 0x11, 0x02, 0x40, 0x40, 0xe2, 0xfb, 0x15, 0x11, 0x4a, 0x55, 0x4a, 0x7d, 0xf7, 0x0f, 0x00, 0x00, 0x04, 0x08, 0xf8, 0xdf, 0x52, 0x44, 0x01, 0x52, 0xb5, 0xfa, 0xff, 0x0f, 0x49, 0x02, 0x00, 0x02, 0xe9, 0xf6, 0x0a, 0x11, 0xa4, 0x88, 0x4a, 0x6d, 0xff, 0x5f, 0x00, 0x00, 0x10, 0x20, 0xf0, 0x2f, 0x21, 0x44, 0x10, 0x52, 0xb5, 0xfa, 0xff, 0x0f, 0x44, 0x04, 0x80, 0x08, 0xf8, 0xab, 0x8a, 0x00, 0x81, 0xa4, 0xd4, 0xd6, 0xfe, 0x2f, 0x00, 0x00, 0x04, 0x40, 0xb5, 0x2d, 0x21, 0x08, 0x04, 0x90, 0xaa, 0xfa, 0xff, 0x1f, 0x11, 0x01, 0x00, 0x04, 0xf0, 0x57, 0x0a, 0x22, 0x40, 0x4a, 0xda, 0x5e, 0xfb, 0x1f, 0x40, 0x00, 0x40, 0x20, 0xba, 0x95, 0x90, 0x00, 0x01, 0xa0, 0xaa, 0xea, 0xff, 0x5f, 0x02, 0x02, 0x00, 0x01, 0xe8, 0x57, 0x05, 0x00, 0x00, 0x12, 0xd5, 0xfe, 0xfd, 0x1f, 0x48, 0x00, 0x04, 0x48, 0x7a, 0x95, 0x08, 0x02, 0x10, 0x40, 0xaa, 0x55, 0xf7, 0x1f, 0x00, 0x09, 0x20, 0x00, 0xf8, 0x57, 0x22, 0x10, 0x00, 0x28, 0xa9, 0xfa, 0xff, 0x5f, 0x02, 0x00, 0x00, 0x49, 0xdd, 0x29, 0x01, 0x00, 0x80, 0x80, 0xaa, 0xd7, 0xff, 0x0f, 0x10, 0x00, 0x08, 0x00, 0xf8, 0x96, 0x08, 0x00, 0x00, 0x20, 0x54, 0xfa, 0xee, 0x3f, 0x81, 0x04, 0x40, 0x24, 0xfe, 0x55, 0x82, 0x00, 0x00, 0x82, 0xd2, 0xad, 0xff, 0x0f, 0x08, 0x00, 0x04, 0x80, 0x6c, 0x97, 0x00, 0x00, 0x02, 0x20, 0xa9, 0xf6, 0xdf, 0x5f, 0x00, 0x02, 0x20, 0x09, 0xfa, 0x49, 0x12, 0x00, 0x20, 0x84, 0x54, 0xdb, 0xfe, 0x1f, 0x91, 0x00, 0x00, 0x00, 0xf8, 0x2b, 0x00, 0x20, 0x00, 0x40, 0xa4, 0xf6, 0xbb, 0x1f, 0x04, 0x00, 0x44, 0x92, 0x7e, 0x95, 0x02, 0x00, 0x00, 0x89, 0xaa, 0xdd, 0xff, 0x1f, 0x20, 0x09, 0x10, 0x00, 0xf4, 0x57, 0x20, 0x01, 0x08, 0x20, 0xa9, 0x76, 0xff, 0x5f, 0x02, 0x00, 0x00, 0x21, 0xfc, 0x4a, 0x05, 0x00, 0x01, 0x80, 0x54, 0xdb, 0xff, 0x1e, 0x08, 0x02, 0x04, 0x08, 0xf9, 0x2b, 0x00, 0x00, 0x40, 0x28, 0xd2, 0xf6, 0xff, 0xbf, 0x80, 0x00, 0x90, 0x00, 0xbc, 0x92, 0x08, 0x10, 0x00, 0x82, 0x54, 0xdb, 0xff, 0x1f, 0x20, 0x00, 0x00, 0x44, 0xf9, 0x55, 0x02, 0x01, 0x00, 0x20, 0xaa, 0xbd, 0xfd, 0x3f, 0x08, 0x04, 0x04, 0x10, 0xf4, 0x2a, 0x01, 0x00, 0x22, 0x80, 0xd4, 0xf6, 0xff, 0x5f, 0x82, 0x00, 0x40, 0x02, 0xf8, 0x55, 0x20, 0x00, 0x00, 0x50, 0x6a, 0xdf, 0xfe, 0x3f, 0x00, 0x00, 0x00, 0x48, 0xe9, 0x4a, 0x05, 0x08, 0x00, 0xa5, 0xd5, 0xf5, 0xff, 0x3f, 0x10, 0x01, 0x10, 0x01, 0xb0, 0xab, 0x92, 0x02, 0x40, 0xf8, 0xbf, 0xde, 0xfe, 0x5f, 0x02, 0x04, 0x04, 0x48, 0xfa, 0xd4, 0x6f, 0x20, 0x84, 0xef, 0xff, 0xfb, 0xff, 0x1f, 0x20, 0x00, 0x00, 0x00, 0xe0, 0xed, 0xbf, 0x0b, 0xa1, 0x7e, 0xff, 0xbf, 0xfd, 0x5f, 0x04, 0x01, 0x20, 0x49, 0xd2, 0xfb, 0xfe, 0x55, 0xd4, 0xff, 0xff, 0xf6, 0xff, 0x07, 0x00, 0x04, 0x00, 0x00, 0xc0, 0xaa, 0xfb, 0x2b, 0xa2, 0xfe, 0xff, 0xdf, 0xee, 0x1f, 0x91, 0x00, 0x82, 0xa4, 0xa4, 0xf5, 0xff, 0x57, 0xd5, 0xff, 0xbf, 0xfd, 0xff, 0x4d, 0x00, 0x00, 0x20, 0x00, 0x88, 0x5b, 0xff, 0x2f, 0x69, 0xff, 0xff, 0xdb, 0xfe, 0x1f, 0x24, 0x02, 0x00, 0x49, 0xa2, 0xd6, 0xff, 0x5f, 0xea, 0xff, 0x7f, 0x7f, 0x7f, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x40, 0xab, 0xf7, 0xbb, 0xf0, 0xdf, 0xff, 0xd5, 0xff, 0xbf, 0x82, 0x04, 0x42, 0x24, 0x91, 0xd5, 0xaa, 0xae, 0xd4, 0xaa, 0x52, 0x7b, 0xff, 0x15, 0x08, 0x00, 0x00, 0x01, 0x04, 0x55, 0xd5, 0x55, 0x70, 0x5b, 0x75, 0xdd, 0xdf, 0x1f, 0x40, 0x00, 0x08, 0x48, 0xa0, 0x4a, 0xa9, 0x56, 0xea, 0x56, 0xad, 0x6a, 0x7d, 0x9b, 0x04, 0x01, 0x00, 0x02, 0x42, 0x2a, 0xd5, 0xaa, 0xa8, 0xaa, 0xaa, 0xfa, 0xdf, 0x2f, 0x10, 0x04, 0x22, 0x48, 0x08, 0x45, 0x2a, 0x15, 0x68, 0x55, 0x55, 0xd7, 0x76, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x40, 0x2a, 0x80, 0xa0, 0xb2, 0x09, 0x48, 0xb9, 0xdf, 0x17, 0x22, 0x01, 0x00, 0x24, 0x45, 0x8a, 0x24, 0x4a, 0x54, 0x51, 0x91, 0xf6, 0x6e, 0x4b, 0x00, 0x04, 0x90, 0x00, 0x80, 0x52, 0x00, 0x20, 0x69, 0x05, 0xa4, 0xaa, 0xff, 0x1e, 0x48, 0x00, 0x02, 0x92, 0x08, 0x05, 0x81, 0x94, 0xd4, 0x92, 0x40, 0xfd, 0xb6, 0x8b, 0x00, 0x01, 0x40, 0x00, 0x82, 0x54, 0x00, 0x48, 0x68, 0x05, 0x90, 0xa4, 0xef, 0x06, 0x24, 0x00, 0x08, 0x12, 0x10, 0x05, 0x00, 0x10, 0xb5, 0x01, 0x42, 0xfb, 0xbf, 0x43, 0x00, 0x09, 0x00, 0x40, 0x81, 0xa8, 0x08, 0x4a, 0xaa, 0x96, 0x90, 0xac, 0x6d, 0x15, 0x22, 0x00, 0x20, 0x09, 0x04, 0x15, 0x80, 0x28, 0xdc, 0x01, 0x24, 0xfb, 0xbf, 0x01, 0x80, 0x04, 0x09, 0x00, 0x40, 0x48, 0x02, 0x45, 0xb2, 0x2e, 0x41, 0x6d, 0xef, 0x05, 0x11, 0x00, 0x40, 0x52, 0x02, 0x15, 0x29, 0x2a, 0xac, 0x42, 0x54, 0xfb, 0x3b, 0x51, 0x84, 0x00, 0x08, 0x00, 0x20, 0x54, 0x80, 0x05, 0xb5, 0x3d, 0xa2, 0xb6, 0xdf, 0x00, 0x20, 0x04, 0x20, 0x49, 0x89, 0xa8, 0x6a, 0x29, 0xac, 0xd6, 0x54, 0xff, 0x3f, 0x84, 0x00, 0x01, 0x04, 0x10, 0x00, 0x94, 0xa8, 0x56, 0xda, 0x5f, 0xab, 0xd5, 0x1e, 0x10, 0x48, 0x00, 0x90, 0x82, 0x48, 0xa8, 0xb2, 0xac, 0xfd, 0x55, 0xd5, 0xfe, 0x9f, 0x80, 0x00, 0x0a, 0x02, 0x08, 0x02, 0x55, 0x5a, 0x75, 0xff, 0xaf, 0xb6, 0xf7, 0x2d, 0x12, 0x92, 0x00, 0x10, 0x20, 0x10, 0xa8, 0x54, 0xd5, 0xbf, 0x5d, 0xad, 0xdd, 0x0f, 0x00, 0x00, 0x04, 0x40, 0x09, 0x84, 0xa8, 0xaa, 0x5a, 0xed, 0xeb, 0x6a, 0xff, 0x9f, 0xa4, 0x24, 0x01, 0x02, 0xa0, 0x20, 0x50, 0x55, 0xd5, 0xbe, 0xae, 0xad, 0xfd, 0x16, 0x00, 0x10, 0x04, 0x20, 0x0a, 0x08, 0xb4, 0xaa, 0x95, 0xaa, 0x7b, 0xb7, 0xdb, 0x5f, 0x92, 0x04, 0x01, 0x84, 0x20, 0x21, 0x51, 0xd5, 0x2a, 0xa9, 0xee, 0xd5, 0xfe, 0x0d, 0x00, 0x20, 0x04, 0x10, 0x00, 0x08, 0x50, 0xe9, 0xd7, 0xd4, 0xfb, 0xb5, 0xff, 0x9f, 0x24, 0x09, 0x01, 0x42, 0x4a, 0xa2, 0x64, 0xd5, 0x55, 0x7b, 0x7f, 0xda, 0x7d, 0x4f, 0x00, 0x20, 0x04, 0x00, 0x80, 0x00, 0xa0, 0x2a, 0x13, 0x84, 0x6a, 0x55, 0xff, 0x1d, 0x48, 0x8a, 0x00, 0x94, 0x24, 0x8a, 0xc8, 0xaa, 0x42, 0x20, 0x5d, 0xf5, 0xff, 0x5f, 0x01, 0x00, 0x02, 0x01, 0x00, 0x20, 0xa2, 0x4a, 0x1a, 0x82, 0x56, 0xda, 0xbd, 0x3f, 0x92, 0x92, 0x00, 0x90, 0x92, 0x00, 0x40, 0x95, 0x6a, 0xf4, 0x55, 0x6d, 0xff, 0xd6, 0x00, 0x00, 0x0a, 0x04, 0x20, 0x14, 0x49, 0x4b, 0xaa, 0xaa, 0x56, 0xf5, 0xff, 0xbf, 0xab, 0xa4, 0x00, 0x20, 0x89, 0x40, 0x80, 0xaa, 0xaa, 0xaa, 0xaa, 0xde, 0xbf, 0xeb, 0x03, 0x00, 0x02, 0x04, 0x02, 0x0a, 0x10, 0x2b, 0x2a, 0x55, 0x5b, 0xf5, 0xff, 0xd7, 0x2f, 0x92, 0x00, 0x10, 0x28, 0x21, 0x01, 0x56, 0x95, 0xa0, 0x56, 0xdf, 0xef, 0xea, 0x87, 0x40, 0x0a, 0x42, 0x41, 0x00, 0x90, 0xaa, 0x52, 0xb6, 0xad, 0xfa, 0xff, 0xd5, 0x2f, 0x14, 0x00, 0x00, 0x04, 0x95, 0x04, 0xaa, 0xac, 0x55, 0x6b, 0xff, 0xb7, 0xea, 0x9f, 0x40, 0x02, 0x28, 0x51, 0x00, 0x40, 0x58, 0xd5, 0xda, 0xd6, 0x6e, 0x7f, 0xf9, 0x3f, 0x12, 0x04, 0x02, 0x04, 0x49, 0x25, 0x55, 0xaa, 0x77, 0xab, 0xff, 0x2b, 0xfd, 0x3f, 0x48, 0x01, 0x20, 0x41, 0x00, 0x00, 0x58, 0xa9, 0xda, 0xea, 0xfd, 0xaf, 0xfa, 0xff, 0x02, 0x04, 0x08, 0x14, 0x29, 0x49, 0x52, 0x55, 0x55, 0x55, 0xff, 0x8d, 0xfe, 0x3f, 0xa8, 0x00, 0x02, 0x41, 0x00, 0x02, 0xa0, 0xa2, 0xaa, 0xea, 0xff, 0x53, 0xfd, 0xff, 0x02, 0x04, 0x50, 0x04, 0x25, 0xa8, 0x54, 0x49, 0x52, 0xb5, 0xbf, 0x8a, 0xfe, 0xff, 0xa9, 0x08, 0x04, 0x50, 0x80, 0x02, 0xa1, 0x2a, 0x95, 0xea, 0xff, 0xa1, 0xff, 0xff, 0x03, 0x02, 0x90, 0x02, 0x09, 0x08, 0x44, 0x49, 0x52, 0xbd, 0x7f, 0xca, 0xff, 0xff, 0x2b, 0x09, 0x04, 0x48, 0x40, 0x82, 0x90, 0x56, 0xa9, 0xf6, 0xbf, 0xd0, 0xff, 0xff, 0x47, 0x00, 0x50, 0x02, 0x15, 0x11, 0x40, 0x95, 0xaa, 0xfd, 0x2f, 0xe9, 0xff, 0xff, 0x8f, 0x0a, 0x84, 0x50, 0x40, 0x84, 0x14, 0xaa, 0x6a, 0xff, 0x5f, 0xf2, 0xff, 0xff, 0x7f, 0x00, 0x10, 0x02, 0x09, 0x10, 0x40, 0x7d, 0xf7, 0xff, 0x0b, 0xfc, 0xff, 0xff, 0xaf, 0x02, 0x84, 0x50, 0x42, 0x85, 0x12, 0xd0, 0xdd, 0xff, 0xa7, 0xf2, 0xff, 0xff, 0xff, 0x04, 0x00, 0x0a, 0x08, 0x10, 0x48, 0xf8, 0xff, 0xff, 0x0a, 0xfe, 0xff, 0xff, 0x7f, 0x03, 0xa4, 0x80, 0xa2, 0x8a, 0x02, 0x68, 0xff, 0xff, 0x52, 0xfd, 0xff, 0xff, 0xff, 0x07, 0x00, 0x2a, 0x08, 0x20, 0x28, 0xdc, 0xff, 0x5f, 0x05, 0xff, 0xff, 0xff, 0xff, 0x0d, 0x92, 0x40, 0x22, 0x09, 0x02, 0xea, 0xfb, 0xaf, 0x48, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x12, 0x81, 0xa0, 0x48, 0x9c, 0x6e, 0x93, 0xa2, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa8, 0x40, 0x28, 0x0a, 0x02, 0x74, 0xb5, 0x45, 0x81, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x02, 0x0a, 0x81, 0x20, 0x08, 0xae, 0xaa, 0x90, 0xe8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x90, 0x40, 0x28, 0x88, 0x12, 0x58, 0x15, 0x50, 0xd0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x44, 0x0a, 0x41, 0x21, 0x08, 0xae, 0x04, 0x14, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x40, 0x14, 0x88, 0x04, 0xba, 0x02, 0x28, 0xe8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x42, 0x15, 0x41, 0x21, 0x05, 0xad, 0x00, 0x05, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x40, 0x24, 0x8a, 0x0e, 0x36, 0x00, 0x0a, 0xf4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x42, 0x25, 0x90, 0xd0, 0x8b, 0xc2, 0x41, 0x05, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x08, 0x05, 0xe8, 0x8e, 0x58, 0x80, 0x02, 0xfa, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x4a, 0x20, 0xa8, 0xba, 0x0b, 0x2b, 0x51, 0x01, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x8a, 0x02, 0xe8, 0xaf, 0x84, 0x90, 0x04, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x52, 0x21, 0x54, 0xbf, 0x1f, 0x15, 0xa5, 0x02, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x08, 0x01, 0xfa, 0xb6, 0xa4, 0x52, 0x40, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x4a, 0xa2, 0x54, 0xef, 0x5f, 0x4b, 0xa4, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x10, 0x82, 0xfe, 0xbf, 0x92, 0x52, 0x42, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x12, 0x42, 0xa8, 0xbf, 0x1f, 0x24, 0x80, 0xa0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x84, 0x28, 0x8a, 0xf7, 0x37, 0x80, 0x52, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x82, 0xe0, 0xff, 0x1f, 0x00, 0x20, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x84, 0x28, 0xca, 0xff, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x42, 0xf0, 0xfd, 0x1b, 0x00, 0x50, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xa4, 0x10, 0xc5, 0xff, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x22, 0xf8, 0xff, 0x0e, 0x00, 0x00, 0xf0,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}CgCgCgCgCgCgCgCgCgCgCgCgCgCgBgBgBgBgBgBgBfBfBfBfBfBf&J|&J|&J|&J|&J|&J|BfBfBfBfBfBf;HY;HY;GY;GY;GY;GY;,#I=:H82YF?^JA|e[j]n`qctewgyi|k~lnopqssu]v^w^x_y_z_z_{_wwvvv“u“u“t{\{\z[zZyZyYxXpowWvVvVuUuUuTtTlkkkkkksTrTrTrTrTrUrUrVnnnoooppqYqqrrrrqgZ{dYvaXp^WiYU`TRVNOb]aEBH<+[NL^SQWNNKFJ?AI2:HTxTyTyTyUyUyUyUyUy݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇ImImImIm݇݇݇݇އއއއއއއއއއއއއއއއImImImImImImImImImImImImImImImIm'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhDhDhDhDhDhDhDhDhDhDhDhDhDhCh&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}CgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgBgBgBgBgBgBgBfBfBf&J|&J|BfBfBfBfBfBfBfBfBf;HY;HY;HY;HY;HY;HY;GY3("D::B41RB=YG@wcZ}g\k_nbrdug}aRdTgViXkYqrstp^q^w`x`y`z`za{axxwwwvvvuutssrrqqppoovWnnnnnnmtVsVsVsVsVsWsWsXsXpppsYsYrZr[r\q\p]ttssh\{e[vbYo^XhZV`USXPQNJMECJRS[47A+((MYkMYkMYkMZk(5F(5F(5FOHJT=+YML_SRZQQMGJABI2:H/TUyUyUyUyUyUy݇݇݇݇݇އއއއއއއއއއއއއއއއއއއއއއއއއއއއއއއއވވވވވވވImImImImImImImImImImImImވ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhDhDhDhDhDhDhDhDhDhDhDh'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}&K}&K}&K}&K}CgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgBgBgBgBg&J|&J|BfBfBfBfBfBfBfBfBf;HY;HY;HY;HY;HY;HY>DM>DM;HY89<:+#9&B52I94ZHAxd[}g^k`ncrey_R}bTeVgXiYk[l\n]o^vvvawaxaybzb{b{axx|a|a|`{`{_{_{^z^uttssrrwZwZvYvYvYuXuXuXuXpppppppqqtZt[s\s\s]r]r^q^p^o^n^l^j^h]{f\ub[n^YgZW_UTWPQOKOEEKST]JNY>=?JJIMYkMYk(5F(5F(5F(5F(5F)5G)5GK=4S<*XMLbWVYPPLGJ@AI/T/TUyUyUyއއއއއއއއއއއވވވވވވވImImImImވވވވވވވވވވވވވވވވވވވވވވވވވImImImImImImImImވވވ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhDhDhDhDhDhDhDh'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}ChChCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCgCg&J|&J|&J|&J|&J|BgBgBgBfBfBfBfBfBf;HY;HY;HY;HY;HY;HYCIR>DMCIR;HYCIR.$0"8&?*G/V=+w[F{g^kanXMs\Px_S{bU~dWfYhZj\l]m^vwxyyzzzzz{b{b{b{b{a{a{`{`z_z_z^uy]y]x]x\w\w[w[v[v[v[v[rrrsssstuut^s_s_r_r`q`p`wvvu~twd]sb[l^ZeYW]TUUORLJOYYaRU^JOZ>>@!$)RXaMYk39B-3<-3<(5F)5G)5G)5G)5G)5GFDJK9*^K=YONg\\TLMIFJ:>I0T0TImވވވވވވވވވވވވވވވވވImImInInInInInInވވވވވވވވވ߈߈߈߈߈߈߈߈߈߈߈߈߈߈߈InInInInIn߈߈߈߈߈'K~'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DiDiDh'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}ChChChChChCgCgCgCgCgCgCgCgCgCgCg&J}&J}&J}&J}&J|&J|&J|&J|&J|BgBgBgBgBgBfBfEM>EMCIR;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%(######""""""8888888887'vS:jW;)  &3#.$-% .% .& /&!,#,#@70A71XNHXNHWNHWNHZRLYQLYQLXQLWQLWPLUOLSNLQMKOLJMJJ0//.-.,,-&(+"(!' 15;6CT37=MMMKMP^ad_enY`hNZlNZlU\dV\eDQbDQbDQbDQbDQbMUcyl|oiKoኯኯኯኯኯኯዯዯዯዯዯዯዯዯዯKoKoKoKoKoKoKoKpKpKpKpKpKpKpKpKpKpKpKpKpKpKpKp⋯⋯⋯LpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpڄڄڄڄڄۄۄۄۄۄۄۄۄۄۅۅۅۅۅۅGkGkGkGkGkGkGkGkGkۅ܅܅܅܅܅܅܅܅܅܅܅܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHlHl'K}'K}'K}'K}'K}'K}'K}'K}'K}HO\=J[=J[=J[ -> ,> ,>(.7#)2#)2(.7(.7(.7#)2(.7(.7(/7(/7)/8/28114H7,99@.05&,5$&)$$$######"""(((8888888888888884"nO9gXjZE/ (-"  %' %$#" ! !$ 48>7CU:GX JJJLLLKMPagp_enNZlLPVDQbDQbDQbDQbNVcuorjѼዯዯዯዯዯዯዯዯዯዯዯዯዯዯዯዯዯKpKpKpKpKpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLp⋰⋰⋰⌰⌰⌰LpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpۄۄۄۄۄۄۄۄۅۅۅۅۅۅۅۅۅۅۅۅGkGkGkGlGlGl܅܅܅܅܅܅܅܅܆܆܆܆܆܆܆܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHlHlHlHl'K}'K}'K}'K}DhDhDhIP\=J[=J[=J[=J[ -> ->(.7#)2#)2(.7(.7(.7#)2(.7(/7(/7)/8)/8)/803966:E?AC>A856,07%'*%')$$$######(((DDDBBB8888888880 cF1w]OcS{`QS;+57'   *      ;?E7CU;HY=I[ JJJMMMKMPacfbhqEQcHScNVdȵዯዯዯዯዯዯዯ⋯⋯⋯⋯⋯⋰⋰⋰⋰⋰⋰⋰LpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLp⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰LpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpLpۄۄۅۅۅۅۅۅۅۅۅۅۅۅۅۅۅۅۅ܅܅GlGl܅܅܅܅܅܆܆܆܆܆܆܆܆܆܆܆܆܆܆܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHlHlHlHl݇DhDhDhDh=J[=J[=J[=J[=J[=J[ ->(/7#)2#)2(.7(.7(.7#*2(/7)/8)/8)/8)/8)08*0903:56:88@KBB=;@348*08&(+'(*%%%$$$(((EEE(((&&&">-"bF3oXMs[Ow]Py^PqbpXMdH5R<,Q;, &%%#'-"'-&3DS_qP\nR_p>J\?K]AG@B::@66:-29'),)'%BBBFFFEEE)))))))))&&& @@@FFFACFZ\_[ajagpEQcGRcKTdPWd⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰㌰㌰㌰㌰LpLpLqLqLqLqLqLqLq㌱㌱㌱㌱㌱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱MqMqMqMqMqMqMqMqMqMqMqMqMqMqMqۅۅۅۅۅۅ܅܅܅܅܅܅܅܅܅܅܆HlHlHlHlHl܆܆܆܆܆܆܆܆܆܆܆݆݆݆݆݆݆݆݆݆݆݆݇݇݇݇݇HlHlHlHlHlHlHl݇݇݇݇݇݇݇݇އއއށ>J\>J\=J[=J[=J[=J[FLU39B#*2(/7)/7)/8$*3$*3$*3)/8)08*09*09*19',5(-5*.6.17338@<=G@BH@BXW]UUXLPWFHKDFHKKKHHH+++%%%%%%$$$###!!!!!!777777777777777777777AAAFFFACFACF\^aeltbhqDQbDQbDQbERcERcERcERcHScLUdRXd|nj⌰⌰⌰⌰⌰⌰⌰⌰⌰⌰㌰㌰㌰㌰㌱㌱㌱㌱㌱㌱㌱㌱㍱㍱㍱㍱MqMqMqMqMqMq㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱MqMqMqMqMqMqMqMqMqMqMqMqMq܅܅܅܅܅܅܅܅܅܅܆܆܆܆HlHlHlHlHlHlHlHlHl܆܆܆݆݆݆݆݆݆݆݆݆݆݆݇݇݇݇݇݇݇݇݇݇݇݇HlHlHlHlHl݇݇݇އއއއއއއއއއށ>J\=J[=J[FLUFLU(/7(/7*08*08%+3$*3$+3$+3*09*09*19&,5&,5'-6).6*/7-18NPURRVXUVc]^f^_[X]\XYTUZLQYKMPFHJ)))(((&&&%%%%%%$$$$$$###!!!!!!!!!777777777BBBEEEACGADGFIL\ckZ`iTZcDQbDQbDQbagpbiqcircirY`hY_hERcERcERcGSdJTdNVdTYeLpLp㌰㌰㌰㌱㌱㌱㌱㌱㌱㌱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱MqMq㍱㍱㍱䍱䍱䍱䍱䍱䍱䍱䍱䍱䍲䍲䍲䍲䍲䍲䍲䍲䍲䍲䍲䍲䍲MqMqMqMqMqMqMqMqMqMqMq܅܅܅܆܆܆܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHl݆݆݆݆݆݆݆݆݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇HmއއއއއއއއއއއވވވވވށFLUFLUFLU)/8+08+08&+3&+3%+4%+4%+4*19+1:&,5'-5'-6(.6FLTHMTINUKOVOQWSTXYWX`[^lbac]_f_\a_aY\aRX_,.1*,.*+-***((('''&&&%%%%%%$$$$$$$$$###!!!!!!!!!!!!!!!%%%%%%%%%%%%"""""""""KKKJJJFFFGIL]_b^dm\bkV]eDQbEQcEQcEQccirdjsdksektdjsdjscir[ajZ`iOU^ERcERcFRdFRdITdLUdPWeVZeLpLqLqLq㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱㍱䍱䍱䍱䍱䍱䍲䍲䍲Mq䍲䍲䍲䍲䍲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲MrMrMrMrMrMrMrMrMrMr܆܆܆܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHl݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇݇އއއއHmHmHmއއއއވވވވވވވވވވވވށ-18,18',3',4',4&,4%,4+1:,2:'-5DJSEKSEKTFLTFLUHMUINVKOWLPWQSYTUZWWZpjje^`offb\_h`]eaaCCG8;A27?-/2+-/.+)******)))((('''&&&&&&%%%%%%$$$$$$$$$$$$$$$$$$######???EEEEEEEEE((((((###&&&%%%HJMHJMHJMHJM_en]dlZ`i_enEQcEQcEQcEQcbhqektflufluflufluektektdksdjscjr\ckQW`[ajZaiOU^FRdFRdFRdHSdKUdNVeRXeX\fLqMqMqMqMq㍱㍱㍱㍱㍱䍱䍱䍱䍱䍲䍲䍲䍲䍲䍲䍲䍲䎲䎲䎲䎲䎲MrMrMrMrMr䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲䎲厲厲厲厲厲厲厲厲NrNrNrNrNrNrNrNr܆܆܆܆܆HlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHlHl݇݇݇݇݇݇݇݇݇݇݇݇އއއއއއއއHmHmHmHmImImImވވވވވވވވވވވވވވވނPT[KOVJOV(-4(-4'-5'-5JOXEKSEKSEKTFLTFLTGMUGMUHNVIOWKPWLQXMRYPTZTV[\]a_^asljd^azporjkE@CLEBIEFEDG29A28A17@135,.1+-0+,/./1..0'),)))++++++++++++***FFFFFFACFACFEEEACFACFJLOJLOKQZ_en]clY_hU[dEQcEQcEQcEQcEQcagp[aj\bk\bkgnvgnvgmvgmvfluflueltektdksdjscjrcirTZcSYbRYaRXaQW`[bj[ajZ`iFSdFSd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kҥ@e͎ggjrmLFI'8o>NohCpم{uz 0V½i( |e;n ޝ1<`z_a<&>w@_˧p/ud n֞F$\!)hU$ܪ^*nUd/ Wv Z *AB+;J[ !@V%@­J NA V%HB '0IENDB`tk8.6.14/tests/red.gif0000644003604700454610000000013414554262361013157 0ustar dgp771divGIF89a333333333! ,!x-0BwڥJ8U晪kir/3Re7 ;tk8.6.14/tests/pwrdLogo150.gif0000644003604700454610000000467114554262361014442 0ustar dgp771divGIF89aa̙f̙̙̙f̙fff3f333̙̙ffff3333fffffffff3ff333f3f3333f3! -dl-! ,a@pH,Ȥrl:·TBTجVzHj՚h&ѓt"FdgN~Yg}rgogYwWNZWftL~f NewɑפԿWMrڕOq Ǖ W-/i*`z F9/9- $6GSDZzB,nw64e4ޅHOtf) OXCeU(Qh T|P w$ kZF\RuF]Z --(v+)[Y =!W+]]_&/Ap j!b: {^= `U@Hf\?(Lq@ 0La&!]#]G \qAHX[(W,ƌ1aBW(t8AdG)(P=UuuAKM\'rR/Wd2a0訦GÎ?B#HƊ1Q0R %+0I{<QVtz' ynEpĹ0iIg΢L%ʫKAlphQ1eⲁZg2esmU&d;JÌyjL !"..v 䀥.kXůZMY' RlЯKLv%8ʣ~~A/9Mv%|50 J <U5\51\ 8iV=W;s=A tytQ넀K8eO#d"DjKV[wĽ ^mJvUma,9tTjm.A9036Ej;w o~BUyzU'S͌%+mgrP/>~g W˳f]Tw;|OaE^cWb!zghn wc!{wBx.DJLE'3B[2?]!.L@VD{`¦) ;cT6a%J$.aR*P >ᆧ O%>t[ `Ѽ1va Jh %V"h_d  جH6x4.AXy,uD:3$<.cYcxP za!Q>᱑lK! !zd:@ryG8 eU9JacEÝK@+4'`H"Oℎ@J@Mp0tiR¦$?5 r0D 5fsmA җ%]SJhI5E {ijR6L|*'ş4i-AN-(tD3"EE3rKDQfӈ "S iMQ@hBKDkK:#Vc!2XZ ȳ~# )|PԲZ=^Ek9jX̮x%^J ]o+V ="Pњ2Af\  Wlf`W,0Nb l9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IG\1-j Ss%,ELt33 2xkfIC4hٽ«qjNFtSR*2{t/OP/QBVtVn.YB2YRUVkƏ4^ Vio&+uGt[6AR;[Dc5dWiBG. z U_[3?ƺ*4stpLudvOeU'.H`s*6K'ڋoo @sFԵav/)7\_f#cwG6uoF˺/sglu 6l_puuw5&9÷x+nAvqzD_le4J7lCws*#KGM d\kxwצswB4qxkKoW*7q{w]ԅ |wWs7cG9u?v`#9]붆#r~[DRy41jy2}YPI[dW.9S}c9u9+4wN㶍#󛽔m?z,cRǚc"7wNYV6C:c:#ɗ: mSA˓c75:˺#|O'ix^<{Gox6E8}E88{^KӺIs;{N: ÉCm_e;ty:'<+tW<"iw<G A|4ˇM {Hik }ChTӫeǓu_2Eg}#,o#c֏Mؓ=KrB8s=ݫh=ogɀ=;{mv:xKI>㯸WO'D:IS7x{o>臾>闾>ꧾ>뷾>Ǿ>׾>>>??'/?7??GO?W_?go?w?????ǿ?׿???;tk8.6.14/tests/corruptTruncated.gif0000644003604700454610000000004014554262361015751 0ustar dgp771divGIF89a33333333tk8.6.14/tests/corruptMangled.gif0000644003604700454610000000010014554262361015364 0ustar dgp771divGIF89a3333333! ,!x-0BwڥJ8Ukir/3Re7 ;tk8.6.14/tests/corruptMangled4G.gif0000644003604700454610000000010014554262361015557 0ustar dgp771divGIF89af33333333! ,!x-0BwڥJ8Ukir/3Re7 ;tk8.6.14/tests/README0000644003604700454610000000032714554262361012602 0ustar dgp771divREADME -- Tk test suite design document. This directory contains a set of validation tests for the Tk commands. Please see the tests/README file in the Tcl source distribution for information about the test suite. tk8.6.14/tests/constraints.tcl0000644003604700454610000003300514554262361014774 0ustar dgp771divif {[namespace exists tk::test]} { deleteWindows wm geometry . {} raise . return } package require Tk tk appname tktest wm title . tktest # If the main window isn't already mapped (e.g. because the tests are # being run automatically) , specify a precise size for it so that the # user won't have to position it manually. if {![winfo ismapped .]} { wm geometry . +0+0 update } package require tcltest 2.2 namespace eval tk { namespace eval test { namespace export loadTkCommand proc loadTkCommand {} { set tklib {} foreach pair [info loaded {}] { foreach {lib pfx} $pair break if {$pfx eq "Tk"} { set tklib $lib break } } return [list load $tklib Tk] } namespace eval bg { # Manage a background process. # Replace with child interp or thread? namespace import ::tcltest::interpreter namespace import ::tk::test::loadTkCommand namespace export setup cleanup do proc cleanup {} { variable fd # catch in case the background process has closed $fd catch {puts $fd exit} catch {close $fd} set fd "" } proc setup args { variable fd if {[info exists fd] && [string length $fd]} { cleanup } set fd [open "|[list [interpreter] \ -geometry +0+0 -name tktest] $args" r+] puts $fd "puts foo; flush stdout" flush $fd if {[gets $fd data] < 0} { error "unexpected EOF from \"[interpreter]\"" } if {$data ne "foo"} { error "unexpected output from\ background process: \"$data\"" } puts $fd [loadTkCommand] flush $fd fileevent $fd readable [namespace code Ready] } proc Ready {} { variable fd variable Data variable Done set x [gets $fd] if {[eof $fd]} { fileevent $fd readable {} set Done 1 } elseif {$x eq "**DONE**"} { set Done 1 } else { append Data $x } } proc do {cmd {block 0}} { variable fd variable Data variable Done if {$block} { fileevent $fd readable {} } puts $fd "[list catch $cmd msg]; update; puts \$msg;\ puts **DONE**; flush stdout" flush $fd set Data {} if {$block} { while {![eof $fd]} { set line [gets $fd] if {$line eq "**DONE**"} { break } append Data $line } } else { set Done 0 vwait [namespace which -variable Done] } return $Data } } proc Export {internal as external} { uplevel 1 [list namespace import $internal] uplevel 1 [list rename [namespace tail $internal] $external] uplevel 1 [list namespace export $external] } Export bg::setup as setupbg Export bg::cleanup as cleanupbg Export bg::do as dobg namespace export deleteWindows proc deleteWindows {} { destroy {*}[winfo children .] # This update is needed to avoid intermittent failures on macOS in unixEmbed.test # with the (GitHub Actions) CI runner. # Reason for the failures is unclear but could have to do with window ids being deleted # after the destroy command returns. The detailed mechanism of such delayed deletions # is not understood, but it appears that this update prevents the test failures. update } namespace export fixfocus proc fixfocus {} { catch {destroy .focus} toplevel .focus wm geometry .focus +0+0 entry .focus.e .focus.e insert 0 "fixfocus" pack .focus.e update focus -force .focus.e destroy .focus } namespace export imageInit imageFinish imageCleanup imageNames variable ImageNames proc imageInit {} { variable ImageNames if {![info exists ImageNames]} { set ImageNames [lsort [image names]] } imageCleanup if {[lsort [image names]] ne $ImageNames} { return -code error "IMAGE NAMES mismatch: [image names] != $ImageNames" } } proc imageFinish {} { variable ImageNames if {[lsort [image names]] ne $ImageNames} { return -code error "images remaining: [image names] != $ImageNames" } imageCleanup } proc imageCleanup {} { variable ImageNames foreach img [image names] { if {$img ni $ImageNames} {image delete $img} } } proc imageNames {} { variable ImageNames set r {} foreach img [image names] { if {$img ni $ImageNames} {lappend r $img} } return $r } # # CONTROL TIMING ASPECTS OF POINTER WARPING # # The proc [controlPointerWarpTiming] is intended to ensure that the (mouse) # pointer has actually been moved to its new position after a Tk test issued: # # [event generate $w $event -warp 1 ...] # # It takes care of the following timing details of pointer warping: # # a. Allow pointer warping to happen if it was scheduled for execution at # idle time. # - In Tk releases 8.6 and older, pointer warping is scheduled for # execution at idle time # - In release 8.7 and newer this happens synchronously if $w refers to the # whole screen or if the -when option to [event generate] is "now". # The namespace variable idle_pointer_warping records which of these is # the case. # # b. Work around a race condition associated with OS notification of # mouse motion on Windows. # # When calling [event generate $w $event -warp 1 ...], the following # sequence occurs: # - At some point in the processing of this command, either via a # synchronous execution path, or asynchronously at idle time, Tk calls # an OS function* to carry out the mouse cursor motion. # - Tk has previously registered a callback function** with the OS, for # the OS to call in order to notify Tk when a mouse move is completed. # - Tk doesn't wait for the callback function to receive the notification # from the OS, but continues processing. This suits most use cases # because usually the notification arrives fast enough (within a few tens # of microseconds). However ... # - A problem arises if Tk performs some processing, immediately following # up on [event generate $w $event -warp 1 ...], and that processing # relies on the mouse pointer having actually moved. If such processing # happens just before the notification from the OS has been received, # Tk will be using not yet updated info (e.g. mouse coordinates). # # Hickup, choke etc ... ! # # * the function SendInput() of the Win32 API # ** the callback function is TkWinChildProc() # # This timing issue can be addressed by putting the Tk process on hold # (do nothing at all) for a somewhat extended amount of time, while # letting the OS complete its job in the meantime. This is what is # accomplished by calling [after ms]. # # ---- # For the history of this issue please refer to Tk ticket [69b48f427e], # specifically the comment on 2019-10-27 14:24:26. # # # Beware: there are cases, not (yet) exercised by the Tk test suite, where # [controlPointerWarpTiming] doesn't ensure the new position of the pointer. # For example, when issued under Tk8.7+, if the value for the -when option # to [event generate $w] is not "now", and $w refers to a Tk window, i.e. not # the whole screen. # variable idle_pointer_warping [expr {![package vsatisfies [package provide Tk] 8.7-]}] proc controlPointerWarpTiming {{duration 50}} { variable idle_pointer_warping if {$idle_pointer_warping} { update idletasks ;# see a. above } if {[tk windowingsystem] eq "win32"} { after $duration ;# see b. above } } namespace export controlPointerWarpTiming } } namespace import -force tk::test::* namespace import -force tcltest::testConstraint testConstraint notAqua [expr {[tk windowingsystem] ne "aqua"}] testConstraint aqua [expr {[tk windowingsystem] eq "aqua"}] testConstraint x11 [expr {[tk windowingsystem] eq "x11"}] testConstraint nonwin [expr {[tk windowingsystem] ne "win32"}] testConstraint aquaOrWin32 [expr { ([tk windowingsystem] eq "win32") || [testConstraint aqua] }] testConstraint userInteraction 0 testConstraint nonUnixUserInteraction [expr { [testConstraint userInteraction] || ([testConstraint unix] && [testConstraint notAqua]) }] testConstraint haveDISPLAY [expr {[info exists env(DISPLAY)] && [testConstraint x11]}] testConstraint altDisplay [info exists env(TK_ALT_DISPLAY)] testConstraint noExceed [expr { ![testConstraint unix] || [catch {font actual "\{xyz"}] }] # constraint for running a test on all windowing system except aqua # where the test fails due to a known bug testConstraint aquaKnownBug [expr {[testConstraint notAqua] || [testConstraint knownBug]}] # constraints for testing facilities defined in the tktest executable... testConstraint testImageType [expr {"test" in [image types]}] testConstraint testOldImageType [expr {"oldtest" in [image types]}] testConstraint testbitmap [llength [info commands testbitmap]] testConstraint testborder [llength [info commands testborder]] testConstraint testcbind [llength [info commands testcbind]] testConstraint testclipboard [llength [info commands testclipboard]] testConstraint testcolor [llength [info commands testcolor]] testConstraint testcursor [llength [info commands testcursor]] testConstraint testembed [llength [info commands testembed]] testConstraint testfont [llength [info commands testfont]] testConstraint testmakeexist [llength [info commands testmakeexist]] testConstraint testmenubar [llength [info commands testmenubar]] testConstraint testmetrics [llength [info commands testmetrics]] testConstraint testobjconfig [llength [info commands testobjconfig]] testConstraint testsend [llength [info commands testsend]] testConstraint testtext [llength [info commands testtext]] testConstraint testwinevent [llength [info commands testwinevent]] testConstraint testwrapper [llength [info commands testwrapper]] # constraints about what sort of fonts are available testConstraint fonts 1 destroy .e entry .e -width 0 -font {Helvetica -12} -bd 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 pack .t .t insert end "This is\na dot." update set x [list [.t bbox 1.3] [.t bbox 2.5]] destroy .t if {![string match {{22 3 6 15} {31 18 [34] 15}} $x]} { testConstraint fonts 0 } # Although unexpected, some systems may have a very limited set of fonts available. # The following constraints happen to evaluate to false at least on one system: the # Github CI runner for Linux with --disable-xft, which has exactly ONE single font # ([font families] returns a single element: "fixed"), for which [font actual] # returns: # -family fixed -size 9 -weight normal -slant roman -underline 0 # and [font metrics] returns: # -ascent 11 -descent 2 -linespace 13 -fixed 1 # The following constraints are hence tailored to check exactly what is needed in the # tests they constrain (that is: availability of any font having the given font # attributes), so that these constrained tests will in fact run on all systems having # reasonable font dotation. testConstraint haveTimes12Font [expr { [font actual {times 12} -size] == 12 }] testConstraint haveCourier37Font [expr { [font actual {-family courier -size 37} -size] == 37 }] testConstraint haveTimes14BoldFont [expr { ([font actual {times 14 bold} -size] == 14) && ([font actual {times 14 bold} -weight] eq "bold") }] testConstraint haveTimes12BoldItalicUnderlineOverstrikeFont [expr { ([font actual {times 12 bold italic overstrike underline} -weight] eq "bold") && ([font actual {times 12 bold italic overstrike underline} -slant] eq "italic") && ([font actual {times 12 bold italic overstrike underline} -underline] eq "1") && ([font actual {times 12 bold italic overstrike underline} -overstrike] eq "1") }] set fixedFont {Courier 12} ; # warning: must be consistent with the files using the constraint below! set bigFont {Helvetica 24} ; # ditto testConstraint haveBigFontTwiceLargerThanTextFont [expr { [font actual $fixedFont -size] * 2 <= [font actual $bigFont -size] }] unset fixedFont bigFont # constraints for the visuals available testConstraint pseudocolor8 [expr { ([catch { toplevel .t -visual {pseudocolor 8} -colormap new }] == 0) && ([winfo depth .t] == 8) }] destroy .t testConstraint haveTruecolor24 [expr { {truecolor 24} in [winfo visualsavailable .] }] testConstraint haveGrayscale8 [expr { {grayscale 8} in [winfo visualsavailable .] }] testConstraint defaultPseudocolor8 [expr { ([winfo visual .] eq "pseudocolor") && ([winfo depth .] == 8) }] # constraint based on whether our display is secure setupbg set app [dobg {tk appname}] testConstraint secureserver 0 if {[llength [info commands send]]} { testConstraint secureserver 1 if {[catch {send $app set a 0} msg] == 1} { if {[string match "X server insecure *" $msg]} { testConstraint secureserver 0 } } } cleanupbg eval tcltest::configure $argv namespace import -force tcltest::test namespace import -force tcltest::makeFile namespace import -force tcltest::removeFile namespace import -force tcltest::makeDirectory namespace import -force tcltest::removeDirectory namespace import -force tcltest::interpreter namespace import -force tcltest::testsDirectory namespace import -force tcltest::cleanupTests deleteWindows wm geometry . {} raise . tk8.6.14/tests/cmap.tcl0000644003604700454610000000411514554262361013345 0ustar dgp771div# This file creates a visual test for colormaps and the WM_COLORMAP_WINDOWS # property. It is part of the Tk visual test suite, which is invoked # via the "visual" script. catch {destroy .t} toplevel .t -colormap new wm title .t "Visual Test for Colormaps" wm iconname .t "Colormaps" wm geom .t +0+0 # The following procedure creates a whole bunch of frames within a # window, in order to eat up all the colors in a colormap. proc colors {w redInc greenInc blueInc} { 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] place $w.f$x,$y -x [expr {40*$x}] -y [expr {40*$y}] incr red $redInc incr green $greenInc incr blue $blueInc } } } message .t.m -width 6i -text {This window displays two nested frames, each with a whole bunch of subwindows that eat up a lot of colors. The toplevel window has its own colormap, which is inherited by the outer frame. The inner frame has its own colormap. As you move the mouse around, the colors in the frames should change back and forth.} 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 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 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}} catch {destroy .t2} toplevel .t2 wm title .t2 "Visual Test for Colormaps" wm iconname .t2 "Colormaps" wm geom .t2 +0-0 message .t2.m -width 6i -text {This window just eats up most of the colors in the default colormap.} pack .t2.m -side top -fill x button .t2.quit -text Quit -command {destroy .t2} pack .t2.quit -side bottom -pady 3 -ipadx 4 -ipady 2 frame .t2.f -height 320 -width 320 pack .t2.f -side bottom colors .t2.f 0 0 4 tk8.6.14/tests/canvPsText.tcl0000644003604700454610000001001714554262361014522 0ustar dgp771div# This file creates a screen to exercise Postscript generation # for text in canvases. It is part of the Tk visual test suite, # which is invoked via the "visual" script. catch {destroy .t} toplevel .t wm title .t "Postscript Tests for Canvases" wm iconname .t "Postscript" wm geom .t +0+0 wm minsize .t 1 1 set c .t.c message .t.m -text {This screen exercises the Postscript-generation abilities of Tk canvas widgets for text. Click on "Print" to print the canvas to your default printer. The "Stipple" button can be used to turn stippling on and off for the text, but beware: many Postscript printers cannot handle stippled text. You can click on items in the canvas to delete them.} -width 6i pack .t.m -side top -fill both set stipple {} checkbutton .t.stipple -text Stippling -variable stipple -onvalue gray50 \ -offvalue {} -command "setStipple $c" -relief flat pack .t.stipple -side top -pady 2m -expand 1 -anchor w frame .t.bot 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 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 $c create rect 2.95i 0.95i 3.05i 1.05i -fill {} -outline black $c create text 3.0i 1.0i -text "Northwest Helvetica 24" \ -anchor nw -tags text -font {Helvetica 24} -stipple $stipple $c create rect 2.95i 1.45i 3.05i 1.55i -fill {} -outline black $c create text 3.0i 1.5i -text "North Helvetica Oblique 12 " \ -anchor n -tags text -font {Helvetica 12 italic} -stipple $stipple $c create rect 2.95i 1.95i 3.05i 2.05i -fill {} -outline blue $c create text 3.0i 2.0i -text "Northeast Helvetica Bold 24" \ -anchor ne -tags text -font {Helvetica 24 bold} -stipple $stipple $c create rect 2.95i 2.45i 3.05i 2.55i -fill {} -outline black $c create text 3.0i 2.5i -text "East Helvetica Bold Oblique 18" \ -anchor e -tags text -font {Helvetica 18 {bold italic}} -stipple $stipple $c create rect 2.95i 2.95i 3.05i 3.05i -fill {} -outline black $c create text 3.0i 3.0i -text "Southeast Times 10" \ -anchor se -tags text -font {Times 10} -stipple $stipple $c create rect 2.95i 3.45i 3.05i 3.55i -fill {} -outline black $c create text 3.0i 3.5i -text "South Times Italic 24" \ -anchor s -tags text -font {Times 24 italic} -stipple $stipple $c create rect 2.95i 3.95i 3.05i 4.05i -fill {} -outline black $c create text 3.0i 4.0i -text "Southwest Times Bold 18" \ -anchor sw -tags text -font {Times 18 bold} -stipple $stipple $c create rect 2.95i 4.45i 3.05i 4.55i -fill {} -outline black $c create text 3.0i 4.5i -text "West Times Bold Italic 24"\ -anchor w -tags text -font {Times 24 {bold italic}} -stipple $stipple $c create rect 0.95i 5.20i 1.05i 5.30i -fill {} -outline black $c create text 1.0i 5.25i -width 1.9i -anchor c -justify left -tags text \ -font {Times 18 bold} -stipple $stipple \ -text "This is a sample text item to see how left justification works" $c create rect 2.95i 5.20i 3.05i 5.30i -fill {} -outline black $c create text 3.0i 5.25i -width 1.8i -anchor c -justify center -tags text \ -font {Times 18 bold} -stipple $stipple \ -text "This is a sample text item to see how center justification works" $c create rect 4.95i 5.20i 5.05i 5.30i -fill {} -outline black $c create text 5.0i 5.25i -width 1.8i -anchor c -justify right -tags text \ -font {Times 18 bold} -stipple $stipple \ -text "This is a sample text item to see how right justification works" $c create text 3.0i 6.0i -width 5.0i -anchor n -justify right -tags text \ -text "This text is\nright justified\nwith a line length equal to\n\ the size of the enclosing rectangle.\nMake sure it prints right\ justified as well." $c create rect 0.5i 6.0i 5.5i 6.9i -fill {} -outline black proc setStipple c { global stipple $c itemconfigure text -stipple $stipple } tk8.6.14/tests/canvPsImg.tcl0000644003604700454610000000611714554262361014320 0ustar dgp771div# This file creates a screen to exercise Postscript generation # for images in canvases. It is part of the Tk visual test suite, # which is invoked via the "visual" script. # Build a test image in a canvas proc BuildTestImage {} { global BitmapImage PhotoImage visual level catch {destroy .t.f} frame .t.f -visual $visual -colormap new pack .t.f -side top -after .t.top bind .t.f {wm colormapwindows .t {.t.f .t}} bind .t.f {wm colormapwindows .t {.t .t.f}} canvas .t.f.c -width 550 -height 350 -borderwidth 2 -relief raised pack .t.f.c .t.f.c create rectangle 25 25 525 325 -fill {} -outline black .t.f.c create image 50 50 -anchor nw -image $BitmapImage .t.f.c create image 250 50 -anchor nw -image $PhotoImage } # Put postscript in a file proc FilePostscript { canvas } { global level $canvas postscript -file /tmp/test.ps -colormode $level } # Send postscript output to printer proc PrintPostcript { canvas } { global level $canvas postscript -file tmp.ps -colormode $level exec lpr tmp.ps } catch {destroy .t} toplevel .t wm title .t "Postscript Tests for Canvases: Images" wm iconname .t "Postscript" message .t.m -text {This screen exercises the Postscript-generation abilities of Tk canvas widgets for images. Click the buttons below to select a Visual type for the canvas and colormode for the Postscript output. Then click "Print" to send the results to the default printer, or "Print to file" to put the Postscript output in a file called "/tmp/test.ps". You can also click on items in the canvas to delete them. NOTE: Some Postscript printers may not be able to handle Postscript generated in color mode.} -width 6i pack .t.m -side top -fill both frame .t.top pack .t.top -side top frame .t.top.l -relief raised -borderwidth 2 frame .t.top.r -relief raised -borderwidth 2 pack .t.top.l .t.top.r -side left -fill both -expand 1 label .t.visuals -text "Visuals" pack .t.visuals -in .t.top.l set visual [lindex [winfo visualsavailable .] 0] foreach v [winfo visualsavailable .] { # The hack below is necessary for some systems, which have more than one # visual of the same type... if {![winfo exists .t.$v]} { radiobutton .t.$v -text $v -variable visual -value $v \ -command BuildTestImage pack .t.$v -in .t.top.l -anchor w } } label .t.levels -text "Color Levels" pack .t.levels -in .t.top.r set level monochrome foreach l { monochrome gray color } { radiobutton .t.$l -text $l -variable level -value $l 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] set PhotoImage [image create photo \ -file [file join [file dirname [info script]] teapot.ppm]] BuildTestImage frame .t.bot pack .t.bot -side top -fill x -expand 1 button .t.file -text "Print to File" -command { FilePostscript .t.f.c } button .t.print -text "Print" -command { PrintPostscript .t.f.c } button .t.quit -text "Quit" -command { destroy .t } pack .t.file .t.print .t.quit -in .t.bot -side left -fill x -expand 1 tk8.6.14/tests/canvPsGrph.tcl0000644003604700454610000000626114554262361014504 0ustar dgp771div# This file creates a screen to exercise Postscript generation # for some of the graphical objects in canvases. It is part of the Tk # visual test suite, which is invoked via the "visual" script. catch {destroy .t} toplevel .t wm title .t "Postscript Tests for Canvases" wm iconname .t "Postscript" wm geom .t +0+0 wm minsize .t 1 1 set c .t.mid.c message .t.m -text {This screen exercises the Postscript-generation abilities of Tk canvas widgets. Select what you want to display with the buttons below, then click on "Print" to print it to your default printer. You can click on items in the canvas to delete them.} -width 4i pack .t.m -side top -fill both frame .t.top pack .t.top -side top -fill both set what rect radiobutton .t.top.rect -text Rectangles -variable what -value rect \ -command "mkObjs $c" -relief flat radiobutton .t.top.oval -text Ovals -variable what -value oval \ -command "mkObjs $c" -relief flat radiobutton .t.top.poly -text Polygons -variable what -value poly \ -command "mkObjs $c" -relief flat radiobutton .t.top.line -text Lines -variable what -value line \ -command "mkObjs $c" -relief flat pack .t.top.rect .t.top.oval .t.top.poly .t.top.line \ -side left -pady 2m -ipadx 2m -ipady 1m -expand 1 frame .t.bot 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 pack .t.mid -side top -expand yes -fill both -padx 2m -pady 2m canvas $c -width 400 -height 350 -bd 0 -relief sunken pack $c -expand yes -fill both -padx 1 -pady 1 proc mkObjs c { global what $c delete all if {$what == "rect"} { $c create rect 0 0 400 350 -outline black $c create rect 2 2 100 50 -fill black -stipple gray25 $c create rect -20 180 80 320 -fill black -stipple gray50 -width .5c $c create rect 200 -20 240 20 -fill black $c create rect 380 200 420 240 -fill black $c create rect 200 330 240 370 -fill black } if {$what == "oval"} { $c create oval 50 10 150 80 -fill black -stipple gray25 -outline {} $c create oval 100 100 200 150 -outline {} -fill black -stipple gray50 $c create oval 250 100 400 300 -width .5c } if {$what == "poly"} { $c create poly 100 200 200 50 300 200 -smooth yes -stipple gray25 \ -outline black -width 4 $c create poly 100 300 100 250 350 250 350 300 350 300 100 300 100 300 \ -fill red -smooth yes $c create poly 20 10 40 10 40 60 80 60 80 25 30 25 30 \ 35 50 35 50 45 20 45 $c create poly 300 20 300 120 380 80 320 100 -fill blue -outline black $c create poly 20 200 100 220 90 100 40 250 \ -fill {} -outline brown -width 3 } if {$what == "line"} { $c create line 20 20 120 20 -arrow both -width 5 $c create line 20 80 150 80 20 200 150 200 -smooth yes $c create line 150 20 150 150 250 150 -width .5c -smooth yes \ -arrow both -arrowshape {.75c 1.0c .5c} -stipple gray25 $c create line 50 340 100 250 150 340 -join round -cap round -width 10 $c create line 200 340 250 250 300 340 -join bevel -cap project \ -width 10 $c create line 300 20 380 20 300 150 380 150 -join miter -cap butt \ -width 10 -stipple gray25 } } mkObjs $c tk8.6.14/tests/canvPsBmap.tcl0000644003604700454610000000535614554262361014467 0ustar dgp771div# This file creates a screen to exercise Postscript generation # for bitmaps in canvases. It is part of the Tk visual test suite, # which is invoked via the "visual" script. catch {destroy .t} toplevel .t wm title .t "Postscript Tests for Canvases" wm iconname .t "Postscript" wm geom .t +0+0 wm minsize .t 1 1 set c .t.c message .t.m -text {This screen exercises the Postscript-generation abilities of Tk canvas widgets for bitmaps. Click on "Print" to print the canvas to your default printer. You can click on items in the canvas to delete them.} -width 6i pack .t.m -side top -fill both frame .t.bot 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 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 $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 $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 $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 $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 $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 $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 $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 $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 $c create rect 5.47i 5.47i 5.53i 5.53i -fill {} -outline black tk8.6.14/tests/canvPsArc.tcl0000644003604700454610000000340414554262361014305 0ustar dgp771div# This file creates a screen to exercise Postscript generation # for bitmaps in canvases. It is part of the Tk visual test suite, # which is invoked via the "visual" script. catch {destroy .t} toplevel .t wm title .t "Postscript Tests for Canvases" wm iconname .t "Postscript" wm geom .t +0+0 wm minsize .t 1 1 set c .t.c message .t.m -text {This screen exercises the Postscript-generation abilities of Tk canvas widgets for arcs. Click on "Print" to print the canvas to your default printer. You can click on items in the canvas to delete them.} -width 6i pack .t.m -side top -fill both frame .t.bot 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 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 \ -fill {} -outline black -outlinestipple gray50 -width 3m $c create arc 5.0i .5i 6.5i 2i -style pieslice -start 45 -extent 315 \ -fill black -stipple gray25 -outline black -width 1m $c create arc -.5i 2.5i 2.0i 3.5i -style chord -start 90 -extent 270 \ -fill black -outline {} $c create arc 2.5i 2i 4i 6i -style chord -start 20 -extent 140 \ -fill black -stipple gray50 -outline black -width 2m $c create arc 4i 2.5i 8i 4.5i -style chord -start 60 -extent 60 \ -fill {} -outline black $c create arc .5i 4.5i 2i 6i -style arc -start 135 -extent 315 -width 3m \ -outline black -outlinestipple gray25 $c create arc 3.5i 4.5i 5.5i 5.5i -style arc -start 45 -extent -90 -width 1m \ -outline black tk8.6.14/tests/butGeom.tcl0000644003604700454610000001076114554262361014033 0ustar dgp771div# This file creates a visual test for button layout. It is part of # the Tk visual test suite, which is invoked via the "visual" script. catch {destroy .t} toplevel .t wm title .t "Visual Tests for Button Geometry" wm iconname .t "Button Geometry" wm geom .t +0+0 wm minsize .t 1 1 label .t.l -text {This screen exercises the layout mechanisms for various flavors of buttons. Select display options below, and they will be applied to all of the button widgets. In order to see the effects of different anchor positions, expand the window so that there is extra space in the buttons. The letter "o" in "automatically" should be underlined in the right column of widgets.} -wraplength 5i pack .t.l -side top -fill both button .t.quit -text Quit -command {destroy .t} pack .t.quit -side bottom -pady 2m set sepId 1 proc sep {} { global sepId frame .t.sep$sepId -height 2 -bd 1 -relief sunken pack .t.sep$sepId -side top -padx 2m -pady 2m -fill x incr sepId } # Create buttons that control configuration options. frame .t.control pack .t.control -side top -fill x -pady 3m frame .t.control.left frame .t.control.right pack .t.control.left .t.control.right -side left -expand 1 -fill x label .t.anchorLabel -text "Anchor:" frame .t.control.left.f -width 6c -height 3c pack .t.anchorLabel .t.control.left.f -in .t.control.left -side top foreach anchor {nw n ne w center e sw s se} { button .t.anchor-$anchor -text $anchor -command "config -anchor $anchor" } place .t.anchor-nw -in .t.control.left.f -relx 0 -relwidth 0.333 \ -rely 0 -relheight 0.333 place .t.anchor-n -in .t.control.left.f -relx 0.333 -relwidth 0.333 \ -rely 0 -relheight 0.333 place .t.anchor-ne -in .t.control.left.f -relx 0.666 -relwidth 0.333 \ -rely 0 -relheight 0.333 place .t.anchor-w -in .t.control.left.f -relx 0 -relwidth 0.333 \ -rely 0.333 -relheight 0.333 place .t.anchor-center -in .t.control.left.f -relx 0.333 -relwidth 0.333 \ -rely 0.333 -relheight 0.333 place .t.anchor-e -in .t.control.left.f -relx 0.666 -relwidth 0.333 \ -rely 0.333 -relheight 0.333 place .t.anchor-sw -in .t.control.left.f -relx 0 -relwidth 0.333 \ -rely 0.666 -relheight 0.333 place .t.anchor-s -in .t.control.left.f -relx 0.333 -relwidth 0.333 \ -rely 0.666 -relheight 0.333 place .t.anchor-se -in .t.control.left.f -relx 0.666 -relwidth 0.333 \ -rely 0.666 -relheight 0.333 set justify center radiobutton .t.justify-left -text "Justify Left" -relief flat \ -command "config -justify left" -variable justify \ -value left radiobutton .t.justify-center -text "Justify Center" -relief flat \ -command "config -justify center" -variable justify \ -value center radiobutton .t.justify-right -text "Justify Right" -relief flat \ -command "config -justify right" -variable justify \ -value right pack .t.justify-left .t.justify-center .t.justify-right \ -in .t.control.right -anchor w sep frame .t.f1 pack .t.f1 -side top -expand 1 -fill both sep frame .t.f2 pack .t.f2 -side top -expand 1 -fill both sep frame .t.f3 pack .t.f3 -side top -expand 1 -fill both 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 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" button .t.b3 -text "This text is quite long, so it must be wrapped automatically by Tk" -wraplength 2i -underline 50 pack .t.b1 .t.b2 .t.b3 -in .t.f2 -side left -padx 5m -pady 3m \ -expand y -fill both checkbutton .t.c1 -text Checkbutton -variable a checkbutton .t.c2 -text "Explicit\nnewlines\n\nin the text" -variable b checkbutton .t.c3 -text "This text is quite long, so it must be wrapped automatically by Tk" -wraplength 2i -variable c -underline 50 pack .t.c1 .t.c2 .t.c3 -in .t.f3 -side left -padx 5m -pady 3m \ -expand y -fill both radiobutton .t.r1 -text Radiobutton -value a radiobutton .t.r2 -text "Explicit\nnewlines\n\nin the text" -value b radiobutton .t.r3 -text "This text is quite long, so it must be wrapped automatically by Tk" -wraplength 2i -value c -underline 50 pack .t.r1 .t.r2 .t.r3 -in .t.f4 -side left -padx 5m -pady 3m \ -expand y -fill both proc config {option value} { foreach w {.t.l1 .t.l2 .t.l3 .t.b1 .t.b2 .t.b3 .t.c1 .t.c2 .t.c3 .t.r1 .t.r2 .t.r3} { $w configure $option $value } } tk8.6.14/tests/butGeom2.tcl0000644003604700454610000001032114554262361014105 0ustar dgp771div# This file creates a visual test for button layout. It is part of # the Tk visual test suite, which is invoked via the "visual" script. catch {destroy .t} toplevel .t wm title .t "Visual Tests for Button Geometry" wm iconname .t "Button Geometry" wm geom .t +0+0 wm minsize .t 1 1 label .t.l -text {This screen exercises the color options for various flavors of buttons. Select display options below, and they will be applied to the appropriate button widgets.} -wraplength 5i pack .t.l -side top -fill both button .t.quit -text Quit -command {destroy .t} pack .t.quit -side bottom -pady 2m set sepId 1 proc sep {} { global sepId frame .t.sep$sepId -height 2 -bd 1 -relief sunken pack .t.sep$sepId -side top -padx 2m -pady 2m -fill x incr sepId } # Create buttons that control configuration options. frame .t.control pack .t.control -side top -fill x -pady 3m frame .t.control.left frame .t.control.right pack .t.control.left .t.control.right -side left -expand 1 -fill x label .t.anchorLabel -text "Color:" 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 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... \ -command "config -$opt \[tk_chooseColor]" pack .t.color-$opt -in .t.control.left.f -fill x } set default disabled label .t.default -text Default: radiobutton .t.default-normal -text "Default normal" -relief flat \ -command "config-but -default normal" -variable default \ -value normal radiobutton .t.default-active -text "Default active" -relief flat \ -command "config-but -default active" -variable default \ -value active radiobutton .t.default-disabled -text "Default disabled" -relief flat \ -command "config-but -default disabled" -variable default \ -value disabled pack .t.default .t.default-normal .t.default-active .t.default-disabled \ -in .t.control.right -anchor w sep frame .t.f1 pack .t.f1 -side top -expand 1 -fill both sep frame .t.f2 pack .t.f2 -side top -expand 1 -fill both sep frame .t.f3 pack .t.f3 -side top -expand 1 -fill both 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 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" button .t.b3 -text "This text is quite long, so it must be wrapped automatically by Tk" -wraplength 2i -underline 50 pack .t.b1 .t.b2 .t.b3 -in .t.f2 -side left -padx 5m -pady 3m \ -expand y -fill both checkbutton .t.c1 -text Checkbutton -variable a checkbutton .t.c2 -text "Explicit\nnewlines\n\nin the text" -variable b checkbutton .t.c3 -text "This text is quite long, so it must be wrapped automatically by Tk" -wraplength 2i -variable c -underline 50 pack .t.c1 .t.c2 .t.c3 -in .t.f3 -side left -padx 5m -pady 3m \ -expand y -fill both radiobutton .t.r1 -text Radiobutton -value a radiobutton .t.r2 -text "Explicit\nnewlines\n\nin the text" -value b radiobutton .t.r3 -text "This text is quite long, so it must be wrapped automatically by Tk" -wraplength 2i -value c -underline 50 pack .t.r1 .t.r2 .t.r3 -in .t.f4 -side left -padx 5m -pady 3m \ -expand y -fill both proc config {option value} { foreach w {.t.l1 .t.l2 .t.l3 .t.b1 .t.b2 .t.b3 .t.c1 .t.c2 .t.c3 .t.r1 .t.r2 .t.r3} { catch {$w configure $option $value} } } proc config-but {option value} { foreach w {.t.b1 .t.b2 .t.b3} { $w configure $option $value } } tk8.6.14/tests/bevel.tcl0000644003604700454610000001233614554262361013526 0ustar dgp771div# This file creates a visual test for bevels drawn around text in text # widgets. It is part of the Tk visual test suite, which is invoked # via the "visual" script. catch {destroy .t} toplevel .t wm title .t "Visual Tests for Borders in Text Widgets" 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 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 pack .t.v -side right -fill y pack .t.t -expand yes -fill both wm minsize .t 1 1 if {[winfo depth .t] > 1} { .t.t tag configure r1 -relief raised -borderwidth 2 -background #b2dfee .t.t tag configure r2 -relief raised -borderwidth 2 -background #b2dfee \ -offset 2 .t.t tag configure s1 -relief sunken -borderwidth 2 -background #b2dfee } else { .t.t tag configure r1 -relief raised -borderwidth 2 -background white .t.t tag configure r2 -relief raised -borderwidth 2 -background white \ -offset 2 .t.t tag configure s1 -relief sunken -borderwidth 2 -background white } .t.t tag configure indent1 -lmargin1 100 .t.t tag configure indent2 -lmargin1 200 .t.t insert end {This display contains a bunch of raised and sunken regions to exercise the bevel-drawing facilities of DisplayLineBackground. The letters have the following significance: r - should appear raised u - should appear raised and also slightly offset vertically s - should appear sunken S - should appear solid n - preceding relief should extend right to end of line. * - should appear "normal" x - extra long lines to allow horizontal scrolling. Try scrolling the text both vertically and horizontally to be sure that the bevels are still drawn correctly. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Pass 1 (side bevels): } .t.t insert end **** .t.t insert end rrrrrrr r1 .t.t insert end uuuu r2 .t.t insert end ************ .t.t insert end ssssssssssssssssss s1 .t.t insert end \n\n**************** .t.t insert end rrrrrrrrrrrrrrn\n r1 .t.t insert end "\nPass 2 (top bevels):\n\n" .t.t insert end rrrrrrrrrrrrrr r1 .t.t insert end rrrrr {r1 dummy} .t.t insert end rrrrrrrrrrrrrrrrrrr r1 .t.t insert end \n************ .t.t insert end rrrrrrrrrrrrrrrrr r1 .t.t insert end ***********\n .t.t insert end rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r1 .t.t insert end \n\n*** .t.t insert end rrrrrrrrrrrrrrrrrrr r1 .t.t insert end ***********\n* .t.t insert end rrrrrrrrr r1 .t.t insert end ******** .t.t insert end rrrrrrrrrrrrrrrrrrrrrrrrr r1 .t.t insert end \n\n* .t.t insert end *** dummy .t.t insert end rrrrrrrrrrrrrrrrrrrrrrrrr r1 .t.t insert end n\nrrrrrrrrrrrrrrr {r1 indent1} .t.t insert end \n\n*** .t.t insert end rrr r1 .t.t insert end \n .t.t insert end rrrr {r1 indent1} .t.t insert end \n\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n .t.t insert end "Pass 3 (bottom bevels):\n\n" .t.t insert end ******* .t.t insert end ********** dummy .t.t insert end rrrrrrrrrrrrrrrr r1 .t.t insert end **********\n .t.t insert end rrrrrrrrr r1 .t.t insert end uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu r2 .t.t insert end \n******************** .t.t insert end rrrrrrrrrrrrrrr r1 .t.t insert end ************\n\n* .t.t insert end rrrrrrrrrrrr r1 .t.t insert end ******** .t.t insert end rrrrrrrrrrrrrrrrrrrrrrrrr r1 .t.t insert end \n***** .t.t insert end rrrrrrrrrrrrrrrrrrrr r1 .t.t insert end **********\n\n .t.t insert end rrrrrrrrrrrrrrr {r1 indent1} .t.t insert end \n** dummy .t.t insert end ** .t.t insert end rrrrrrrrrrrrrrrrrrrrn\n r1 .t.t insert end \n .t.t insert end rrrr {r1 indent1} .t.t insert end \n*** .t.t insert end rrr r1 .t.t insert end \n\nMiscellaneous:\n\n .t.t insert end rrr r1 .t.t insert end ***** .t.t insert end rrr r1 foreach i {1 2 3} { .t.t insert end \n .t.t insert end *** .t.t insert end rrrrr r1 } .t.t insert end \n .t.t insert end rrr r1 .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 .t.t tag configure sol12 -relief solid -borderwidth 12 \ -foreground 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" .t.t insert end { xxx x} {} S sol100 {x xxx} .t.t insert end "\n\nA very thick border grows toward the inside of the tagged area only" .t.t insert end "\nOnly \"S\" is on dark background" .t.t insert end { xxxx} {} SSSSS sol100 {xxxx x} {} SSSSSSSSSSSSSSSSSS sol100 {x xxx} {} SSSSSSSSS sol100 xxxx {} .t.t insert end "\n\nA thinner border is continuous" .t.t insert end { xxxx} {} SSSSS sol12 {xxxx x} {} SSSSSSSSSSSSSSSSSS sol12 {x xxx} {} SSSSSSSSS sol12 xxxx {} .t.t tag add big $ind end tk8.6.14/tests/arc.tcl0000644003604700454610000000767014554262361013203 0ustar dgp771div# This file creates a visual test for arcs. It is part of the Tk # visual test suite, which is invoked via the "visual" script. catch {destroy .t} toplevel .t wm title .t "Visual Tests for Canvas Arcs" wm iconname .t "Arcs" wm geom .t +0+0 wm minsize .t 1 1 canvas .t.c -width 650 -height 600 -relief raised pack .t.c -expand yes -fill both button .t.quit -text Quit -command {destroy .t} pack .t.quit -side bottom -pady 3 -ipadx 4 -ipady 2 puts "depth is [winfo depth .t]" if {[winfo depth .t] > 1} { set fill1 aquamarine3 set fill2 aquamarine3 set fill3 IndianRed1 set outline2 IndianRed3 } else { set fill1 black set fill2 white set fill3 Black set outline2 white } set outline black .t.c create arc 20 20 220 120 -start 30 -extent 270 -outline $fill1 -width 14 \ -style arc .t.c create arc 260 20 460 120 -start 30 -extent 270 -fill $fill2 -width 14 \ -style chord -outline $outline .t.c create arc 500 20 620 160 -start 30 -extent 270 -fill {} -width 14 \ -style chord -outline $outline -outlinestipple gray50 .t.c create arc 20 260 140 460 -start 45 -extent 90 -fill $fill2 -width 14 \ -style pieslice -outline $outline .t.c create arc 180 260 300 460 -start 45 -extent 90 -fill {} -width 14 \ -style pieslice -outline $outline .t.c create arc 340 260 460 460 -start 30 -extent 150 -fill $fill2 -width 14 \ -style chord -outline $outline -stipple gray50 -outlinestipple gray25 .t.c create arc 500 260 620 460 -start 30 -extent 150 -fill {} -width 14 \ -style chord -outline $outline .t.c create arc 20 450 140 570 -start 135 -extent 270 -fill $fill1 -width 14 \ -style pieslice -outline {} .t.c create arc 180 450 300 570 -start 30 -extent -90 -fill $fill1 -width 14 \ -style pieslice -outline {} .t.c create arc 340 450 460 570 -start 320 -extent 270 -fill $fill1 -width 14 \ -style chord -outline {} .t.c create arc 500 450 620 570 -start 350 -extent -110 -fill $fill1 -width 14 \ -style chord -outline {} .t.c addtag arc withtag all .t.c addtag circle withtag [.t.c create oval 320 200 340 220 -fill MistyRose3] .t.c bind arc { set prevFill [lindex [.t.c itemconf current -fill] 4] set prevOutline [lindex [.t.c itemconf current -outline] 4] if {($prevFill != "") || ($prevOutline == "")} { .t.c itemconf current -fill $fill3 } if {$prevOutline != ""} { .t.c itemconf current -outline $outline2 } } .t.c bind arc {.t.c itemconf current -fill $prevFill -outline $prevOutline} bind .t.c {markarea %x %y} bind .t.c {strokearea %x %y} proc markarea {x y} { global areaX1 areaY1 set areaX1 $x set areaY1 $y } proc strokearea {x y} { global areaX1 areaY1 areaX2 areaY2 if {($areaX1 != $x) && ($areaY1 != $y)} { .t.c delete area .t.c addtag area withtag [.t.c create rect $areaX1 $areaY1 $x $y \ -outline black] set areaX2 $x set areaY2 $y } } bind .t.c { puts stdout "Enclosed: [.t.c find enclosed $areaX1 $areaY1 $areaX2 $areaY2]" puts stdout "Overlapping: [.t.c find overl $areaX1 $areaY1 $areaX2 $areaY2]" } bind .t.c <3> {puts stdout "%x %y"} # The code below allows the circle to be move by shift-dragging. bind .t.c { set curx %x set cury %y } bind .t.c { .t.c move circle [expr {%x-$curx}] [expr {%y-$cury}] set curx %x set cury %y } # The binding below flashes the closest item to the mouse. bind .t.c { set closest [.t.c find closest %x %y] set oldfill [lindex [.t.c itemconf $closest -fill] 4] .t.c itemconf $closest -fill IndianRed1 after 200 [list .t.c itemconfig $closest -fill $oldfill] } proc c {option value} {.t.c itemconf 2 $option $value} bind .t.c a { set go 1 set i 1 while {$go} { if {$i >= 50} { set delta -5 } if {$i <= 5} { set delta 5 } incr i $delta c -start $i c -extent [expr {360-2*$i}] after 20 update } } bind .t.c b {set go 0} bind .t.c {.t.c delete current} tk8.6.14/tests/all.tcl0000644003604700454610000000145414554262361013200 0ustar dgp771div# all.tcl -- # # This file contains a top-level script to run all of the Tk # tests. Execute it by invoking "source all.tcl" when running tktest # in this directory. # # Copyright © 1998-1999 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. package require Tk ;# This is the Tk test suite; fail early if no Tk! package require tcltest 2.2 tcltest::configure {*}$argv tcltest::configure -testdir [file normalize [file dirname [info script]]] tcltest::configure -loadfile \ [file join [tcltest::testsDirectory] constraints.tcl] tcltest::configure -singleproc 1 set ErrorOnFailures [info exists env(ERROR_ON_FAILURES)] encoding system utf-8 if {[tcltest::runAllTests] && $ErrorOnFailures} {exit 1} tk8.6.14/tests/xmfbox.test0000644003604700454610000001121214554262361014121 0ustar dgp771div# xmfbox.test -- # # This file is a Tcl script to test the file dialog that's used # when the tk_strictMotif flag is set. Because the file dialog # runs in a modal loop, the only way to test it sufficiently is # to call the internal Tcl procedures in xmfbox.tcl directly. # # Copyright (c) 1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # Contributions from Don Porter, NIST, 2002. (not subject to US copyright) # All rights reserved. package require tcltest 2.2 namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands set testPWD [pwd] catch {unset data foo} proc cleanup {} { global testPWD set err0 [catch { cd $testPWD } msg0] set err1 [catch { if [file exists ./~nosuchuser1] { file delete ./~nosuchuser1 } } msg1] set err2 [catch { if [file exists ./~nosuchuser2] { file delete ./~nosuchuser2 } } msg2] set err3 [catch { if [file exists ./~nosuchuser3] { file delete ./~nosuchuser3 } } msg3] set err4 [catch { if [file exists ./~nosuchuser4] { file delete ./~nosuchuser4 } } msg4] if {$err0 || $err1 || $err2 || $err3 || $err4} { error [list $msg0 $msg1 $msg2 $msg3 $msg4] } catch {unset foo} destroy .foo } # ---------------------------------------------------------------------- test xmfbox-1.1 {tk::MotifFDialog_Create, -parent switch} -constraints { unix } -setup { catch {unset foo} } -body { set x [tk::MotifFDialog_Create foo open {-parent .}] } -cleanup { destroy $x } -result {.foo} test xmfbox-1.2 {tk::MotifFDialog_Create, -parent switch} -constraints { unix } -setup { catch {unset foo} deleteWindows } -body { toplevel .bar wm geometry .bar +0+0 set x [tk::MotifFDialog_Create foo open {-parent .bar}] } -cleanup { destroy $x destroy .bar } -result {.bar.foo} test xmfbox-2.1 {tk::MotifFDialog_InterpFilter, ~ in dir names} -constraints { unix } -body { cleanup file mkdir ./~nosuchuser1 set x [tk::MotifFDialog_Create foo open {}] $::tk::dialog::file::foo(fEnt) delete 0 end $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1 set kk [tk::MotifFDialog_InterpFilter $x] } -result "$testPWD/~nosuchuser1 *" test xmfbox-2.2 {tk::MotifFDialog_InterpFilter, ~ in file names} -constraints { unix } -body { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] set x [tk::MotifFDialog_Create foo open {}] $::tk::dialog::file::foo(fEnt) delete 0 end $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1 set kk [tk::MotifFDialog_InterpFilter $x] } -result "$testPWD ./~nosuchuser1" test xmfbox-2.3 {tk::MotifFDialog_Update, ~ in file names} -constraints { unix } -body { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] set x [tk::MotifFDialog_Create foo open {}] $::tk::dialog::file::foo(fEnt) delete 0 end $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1 tk::MotifFDialog_InterpFilter $x tk::MotifFDialog_Update $x $::tk::dialog::file::foo(fList) get end } -result {~nosuchuser1} test xmfbox-2.4 {tk::MotifFDialog_LoadFile, ~ in file names} -constraints { unix } -body { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] set x [tk::MotifFDialog_Create foo open {}] set i [lsearch [$::tk::dialog::file::foo(fList) get 0 end] ~nosuchuser1] expr {$i >= 0} } -result 1 test xmfbox-2.5 {tk::MotifFDialog_BrowseFList, ~ in file names} -constraints { unix } -body { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] set x [tk::MotifFDialog_Create foo open {}] set i [lsearch [$::tk::dialog::file::foo(fList) get 0 end] ~nosuchuser1] $::tk::dialog::file::foo(fList) selection clear 0 end $::tk::dialog::file::foo(fList) selection set $i tk::MotifFDialog_BrowseFList $x $::tk::dialog::file::foo(sEnt) get } -result "$testPWD/~nosuchuser1" test xmfbox-2.6 {tk::MotifFDialog_ActivateFList, ~ in file names} -constraints { unix } -body { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] set x [tk::MotifFDialog_Create foo open {}] set i [lsearch [$::tk::dialog::file::foo(fList) get 0 end] ~nosuchuser1] $::tk::dialog::file::foo(fList) selection clear 0 end $::tk::dialog::file::foo(fList) selection set $i tk::MotifFDialog_BrowseFList $x tk::MotifFDialog_ActivateFList $x list $::tk::dialog::file::foo(selectPath) \ $::tk::dialog::file::foo(selectFile) $tk::Priv(selectFilePath) } -result "$testPWD ~nosuchuser1 $testPWD/~nosuchuser1" # cleanup cleanup cleanupTests return # Local variables: # mode: tcl # End: tk8.6.14/tests/wm.test0000644003604700454610000021150314554262361013246 0ustar dgp771div# This file is a Tcl script to test out Tk's interactions with the window # manager, including the "wm" command. It is organized in the standard fashion # for Tcl tests. # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # This file tests window manager interactions that work across platforms. # Window manager tests that only work on a specific platform should be placed # in unixWm.test or winWm.test. package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands wm deiconify . if {![winfo ismapped .]} { tkwait visibility . } proc stdWindow {} { destroy .t toplevel .t -width 100 -height 50 wm geom .t +0+0 update } testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }] # [raise] and [lower] may return before the window manager has completed the # operation. The raiseDelay procedure idles for a while to give the operation # a chance to complete. # proc raiseDelay {} { after 250; update idletasks update } # How to carry out a small delay while processing events proc eventDelay {{delay 200}} { after $delay "set done 1" ; vwait done } deleteWindows ############################################################################## stdWindow test wm-1.1 {Tk_WmObjCmd procedure, miscellaneous errors} -returnCodes error -body { wm } -result {wrong # args: should be "wm option window ?arg ...?"} # Next test will fail every time set of subcommands is changed test wm-1.2 {Tk_WmObjCmd procedure, miscellaneous errors} -returnCodes error -body { wm foo } -result {bad option "foo": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, forget, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, manage, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw} test wm-1.3 {Tk_WmObjCmd procedure, miscellaneous errors} -returnCodes error -body { wm command } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-1.4 {Tk_WmObjCmd procedure, miscellaneous errors} -returnCodes error -body { wm aspect bogus } -result {bad window path name "bogus"} test wm-1.5 {Tk_WmObjCmd procedure, miscellaneous errors} -body { button .b -text hello wm geometry .b } -returnCodes error -cleanup { destroy .b } -result {window ".b" isn't a top-level window} ### wm aspect ### test wm-aspect-1.1 {usage} -returnCodes error -body { wm aspect } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-aspect-1.2 {usage} -returnCodes error -body { wm aspect . _ } -result {wrong # args: should be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"} test wm-aspect-1.3 {usage} -returnCodes error -body { wm aspect . _ _ _ } -result {wrong # args: should be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"} test wm-aspect-1.4 {usage} -returnCodes error -body { wm aspect . _ _ _ _ _ } -result {wrong # args: should be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"} test wm-aspect-1.5 {usage} -returnCodes error -body { wm aspect . bad 14 15 16 } -result {expected integer but got "bad"} test wm-aspect-1.6 {usage} -returnCodes error -body { wm aspect . 13 foo 15 16 } -result {expected integer but got "foo"} test wm-aspect-1.7 {usage} -returnCodes error -body { wm aspect . 13 14 bar 16 } -result {expected integer but got "bar"} test wm-aspect-1.8 {usage} -returnCodes error -body { wm aspect . 13 14 15 baz } -result {expected integer but got "baz"} test wm-aspect-1.9 {usage} -returnCodes error -body { wm aspect . 0 14 15 16 } -result {aspect number can't be <= 0} test wm-aspect-1.10 {usage} -returnCodes error -body { wm aspect . 13 0 15 16 } -result {aspect number can't be <= 0} test wm-aspect-1.11 {usage} -returnCodes error -body { wm aspect . 13 14 0 16 } -result {aspect number can't be <= 0} test wm-aspect-1.12 {usage} -returnCodes error -body { wm aspect . 13 14 15 0 } -result {aspect number can't be <= 0} test wm-aspect-2.1 {setting and reading values} -setup { set result {} } -body { lappend result [wm aspect .t] wm aspect .t 3 4 10 2 lappend result [wm aspect .t] wm aspect .t {} {} {} {} lappend result [wm aspect .t] } -result [list {} {3 4 10 2} {}] ### wm attributes ### test wm-attributes-1.1 {usage} -returnCodes error -body { wm attributes } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-attributes-1.2.1 {usage} -constraints win -returnCodes error -body { wm attributes . _ } -result {bad attribute "_": must be -alpha, -transparentcolor, -disabled, -fullscreen, -toolwindow, or -topmost} test wm-attributes-1.2.2 {usage} -constraints win -returnCodes error -body { wm attributes . -alpha 1.0 -disabled } -result {wrong # args: should be "wm attributes window ?-alpha ?double?? ?-transparentcolor ?color?? ?-disabled ?bool?? ?-fullscreen ?bool?? ?-toolwindow ?bool?? ?-topmost ?bool??"} test wm-attributes-1.2.3 {usage} -constraints win -returnCodes error -body { wm attributes . -to } -result {bad attribute "-to": must be -alpha, -transparentcolor, -disabled, -fullscreen, -toolwindow, or -topmost} test wm-attributes-1.2.4 {usage} -constraints {unix notAqua} -returnCodes error -body { wm attributes . _ } -result {bad attribute "_": must be -alpha, -topmost, -zoomed, -fullscreen, or -type} test wm-attributes-1.2.5 {usage} -constraints aqua -returnCodes error -body { wm attributes . _ } -result {bad attribute "_": must be -alpha, -fullscreen, -modified, -notify, -titlepath, -topmost, -transparent, or -type} ### wm client ### test wm-client-1.1 {usage} -returnCodes error -body { wm client } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-client-1.2 {usage} -returnCodes error -body { wm client . _ _ } -result {wrong # args: should be "wm client window ?name?"} test wm-client-2.1 {setting and reading values} -setup { set result {} } -body { lappend result [wm client .t] wm client .t Miffo lappend result [wm client .t] wm client .t {} lappend result [wm client .t] } -result [list {} Miffo {}] deleteWindows test wm-attributes-1.3.0 {default -fullscreen value} -constraints win -body { toplevel .t wm attributes .t -fullscreen } -cleanup { deleteWindows } -result 0 test wm-attributes-1.3.1 {change -fullscreen before map} -constraints win -body { toplevel .t wm attributes .t -fullscreen 1 wm attributes .t -fullscreen } -cleanup { deleteWindows } -result 1 test wm-attributes-1.3.2 {change -fullscreen before map} -constraints win -body { toplevel .t wm attributes .t -fullscreen 1 update wm attributes .t -fullscreen } -cleanup { deleteWindows } -result 1 test wm-attributes-1.3.3 {change -fullscreen after map} -constraints win -body { toplevel .t update wm attributes .t -fullscreen 1 wm attributes .t -fullscreen } -cleanup { deleteWindows } -result 1 test wm-attributes-1.3.4 {change -fullscreen after map} -setup { set booleans [list] } -constraints win -body { toplevel .t update lappend booleans [wm attributes .t -fullscreen] wm attributes .t -fullscreen 1 lappend booleans [wm attributes .t -fullscreen] # Query above should not clear fullscreen state lappend booleans [wm attributes .t -fullscreen] wm attributes .t -fullscreen 0 lappend booleans [wm attributes .t -fullscreen] } -cleanup { deleteWindows } -result {0 1 1 0} test wm-attributes-1.3.5 {change -fullscreen after map} -setup { set results [list] set normal_geom "301x302+101+102" set fullscreen_geom "[winfo screenwidth .]x[winfo screenheight .]+0+0" } -constraints win -body { toplevel .t wm geom .t $normal_geom update lappend results [string equal [wm geom .t] $normal_geom] wm attributes .t -fullscreen 1 lappend results [string equal [wm geom .t] $fullscreen_geom] wm attributes .t -fullscreen 0 lappend results [string equal [wm geom .t] $normal_geom] } -cleanup { deleteWindows } -result {1 1 1} test wm-attributes-1.3.6 {state change does not change -fullscreen} -constraints win -body { toplevel .t update wm attributes .t -fullscreen 1 wm withdraw .t wm deiconify .t wm attributes .t -fullscreen } -cleanup { deleteWindows } -result 1 test wm-attributes-1.3.7 {state change does not change -fullscreen} -constraints win -body { toplevel .t update wm attributes .t -fullscreen 1 wm iconify .t wm deiconify .t wm attributes .t -fullscreen } -cleanup { deleteWindows } -result 1 test wm-attributes-1.3.8 {override-redirect not compatible with fullscreen attribute} -constraints win -body { toplevel .t update wm overrideredirect .t 1 wm attributes .t -fullscreen 1 } -returnCodes error -cleanup { deleteWindows } -result {can't set fullscreen attribute for ".t": override-redirect flag is set} test wm-attributes-1.3.9 {max height too small} -constraints win -body { toplevel .t update wm maxsize .t 5000 450 wm attributes .t -fullscreen 1 } -returnCodes error -cleanup { deleteWindows } -result {can't set fullscreen attribute for ".t": max width/height is too small} test wm-attributes-1.3.10 {max height too small} -constraints win -body { toplevel .t update wm maxsize .t 450 5000 wm attributes .t -fullscreen 1 } -returnCodes error -cleanup { deleteWindows } -result {can't set fullscreen attribute for ".t": max width/height is too small} test wm-attributes-1.3.11 {another attribute, then -fullscreen} -constraints win -body { toplevel .t update wm attributes .t -alpha 1.0 -fullscreen 1 wm attributes .t -fullscreen } -cleanup { deleteWindows } -result 1 test wm-attributes-1.3.12 {another attribute, then -fullscreen, then another} -constraints win -body { toplevel .t update wm attributes .t -toolwindow 0 -fullscreen 1 -topmost 0 wm attributes .t -fullscreen } -cleanup { deleteWindows } -result 1 test wm-attributes-1.4.0 {setting/unsetting fullscreen does not change the focus} -setup { set results [list] } -constraints win -body { focus -force . toplevel .t lower .t update lappend results [focus] wm attributes .t -fullscreen 1 eventDelay lappend results [focus] wm attributes .t -fullscreen 0 eventDelay lappend results [focus] } -cleanup { deleteWindows } -result {. . .} test wm-attributes-1.4.1 {setting fullscreen does not generate FocusIn on wrapper create} -setup { catch {unset focusin} } -constraints win -body { focus -force . toplevel .t pack [entry .t.e] lower .t bind .t {lappend focusin %W} eventDelay lappend focusin 1 focus -force .t.e eventDelay lappend focusin 2 wm attributes .t -fullscreen 1 eventDelay lappend focusin 3 wm attributes .t -fullscreen 0 eventDelay lappend focusin final [focus] } -cleanup { bind . {} bind .t {} deleteWindows } -result {1 .t .t.e 2 3 final .t.e} test wm-attributes-1.5.0 {fullscreen stackorder} -setup { set results [list] } -constraints win -body { toplevel .t lappend results [wm stackorder .] eventDelay lappend results [wm stackorder .] # Default stacking is on top of other windows on the display. Setting the # fullscreen attribute does not change this. wm attributes .t -fullscreen 1 eventDelay lappend results [wm stackorder .] } -cleanup { deleteWindows } -result {. {. .t} {. .t}} test wm-attributes-1.5.1 {fullscreen stackorder} -setup { set results [list] } -constraints win -body { toplevel .t lower .t eventDelay lappend results [wm stackorder .] # If stacking order is explicitly set, then setting the fullscreen # attribute should not change it. wm attributes .t -fullscreen 1 eventDelay lappend results [wm stackorder .] } -cleanup { deleteWindows } -result {{.t .} {.t .}} test wm-attributes-1.5.2 {fullscreen stackorder} -setup { set results [list] } -constraints win -body { toplevel .t # lower forces the window to be mapped, it would not be otherwise lower .t lappend results [wm stackorder .] # If stacking order is explicitly set for an unmapped window, then setting # the fullscreen attribute should not change it. wm attributes .t -fullscreen 1 eventDelay lappend results [wm stackorder .] } -cleanup { deleteWindows } -result {{.t .} {.t .}} test wm-attributes-1.5.3 {fullscreen stackorder} -setup { set results [list] } -constraints win -body { toplevel .t eventDelay lappend results [wm stackorder .] wm attributes .t -fullscreen 1 eventDelay lappend results [wm stackorder .] # Unsetting the fullscreen attribute should not change the stackorder. wm attributes .t -fullscreen 0 eventDelay lappend results [wm stackorder .] } -cleanup { deleteWindows } -result {{. .t} {. .t} {. .t}} test wm-attributes-1.5.4 {fullscreen stackorder} -setup { set results [list] } -constraints win -body { toplevel .t lower .t eventDelay lappend results [wm stackorder .] wm attributes .t -fullscreen 1 eventDelay lappend results [wm stackorder .] # Unsetting the fullscreen attribute should not change the stackorder. wm attributes .t -fullscreen 0 eventDelay lappend results [wm stackorder .] } -cleanup { deleteWindows } -result {{.t .} {.t .} {.t .}} test wm-attributes-1.5.5 {fullscreen stackorder} -setup { set results [list] } -constraints win -body { toplevel .a toplevel .b toplevel .c raise .a raise .b raise .c eventDelay lappend results [wm stackorder .] wm attributes .b -fullscreen 1 eventDelay lappend results [wm stackorder .] # Unsetting the fullscreen attribute should not change the stackorder. wm attributes .b -fullscreen 0 eventDelay lappend results [wm stackorder .] } -cleanup { deleteWindows } -result {{. .a .b .c} {. .a .b .c} {. .a .b .c}} stdWindow ### wm colormapwindows ### test wm-colormapwindows-1.1 {usage} -returnCodes error -body { wm colormapwindows } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-colormapwindows-1.2 {usage} -returnCodes error -body { wm colormapwindows . _ _ } -result {wrong # args: should be "wm colormapwindows window ?windowList?"} test wm-colormapwindows-1.3 {usage} -returnCodes error -body { wm colormapwindows . "a \{" } -result {unmatched open brace in list} test wm-colormapwindows-1.4 {usage} -returnCodes error -body { wm colormapwindows . foo } -result {bad window path name "foo"} test wm-colormapwindows-2.1 {reading values} -body { toplevel .t2 -width 200 -height 200 -colormap new wm geom .t2 +0+0 frame .t2.a -width 100 -height 30 frame .t2.b -width 100 -height 30 -colormap new pack .t2.a .t2.b -side top update set x [wm colormapwindows .t2] frame .t2.c -width 100 -height 30 -colormap new pack .t2.c -side top update list $x [wm colormapwindows .t2] } -cleanup { destroy .t2 } -result {{.t2.b .t2} {.t2.b .t2.c .t2}} test wm-colormapwindows-2.2 {setting and reading values} -body { toplevel .t2 -width 200 -height 200 wm geom .t2 +0+0 frame .t2.a -width 100 -height 30 frame .t2.b -width 100 -height 30 frame .t2.c -width 100 -height 30 pack .t2.a .t2.b .t2.c -side top wm colormapwindows .t2 {.t2.b .t2.a} wm colormapwindows .t2 } -cleanup { destroy .t2 } -result {.t2.b .t2.a} ### wm command ### test wm-command-1.1 {usage} -returnCodes error -body { wm command } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-command-1.2 {usage} -returnCodes error -body { wm command . _ _ } -result {wrong # args: should be "wm command window ?value?"} test wm-command-1.3 {usage} -returnCodes error -body { wm command . "a \{" } -result {unmatched open brace in list} test wm-command-2.1 {setting and reading values} -setup { set result {} } -body { lappend result [wm command .t] wm command .t [list Miffo Foo] lappend result [wm command .t] wm command .t {} lappend result [wm command .t] } -result [list {} [list Miffo Foo] {}] ### wm deiconify ### test wm-deiconify-1.1 {usage} -returnCodes error -body { wm deiconify } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-deiconify-1.2 {usage} -returnCodes error -body { wm deiconify . _ } -result {wrong # args: should be "wm deiconify window"} test wm-deiconify-1.3 {usage} -returnCodes error -body { 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 wm iconwindow .t .icon wm deiconify .icon } -returnCodes error -cleanup { destroy .icon } -result {can't deiconify .icon: it is an icon for .t} # test embedded window for Windows test wm-deiconify-1.5 {usage} -constraints win -setup { destroy .embed } -body { frame .t.f -container 1 toplevel .embed -use [winfo id .t.f] wm deiconify .embed } -returnCodes error -cleanup { destroy .t.f .embed } -result {can't deiconify .embed: the container does not support the request} # test embedded window for other platforms test wm-deiconify-1.6 {usage} -constraints !win -setup { destroy .embed } -body { frame .t.f -container 1 toplevel .embed -use [winfo id .t.f] wm deiconify .embed } -returnCodes error -cleanup { destroy .t.f .embed } -result {can't deiconify .embed: it is an embedded window} deleteWindows test wm-deiconify-2.1 {a window that has never been mapped\ should not be mapped by a call to deiconify} -body { toplevel .t wm deiconify .t winfo ismapped .t } -cleanup { deleteWindows } -result 0 test wm-deiconify-2.2 {a window that has already been\ mapped should be mapped by deiconify} -body { toplevel .t update idletasks wm withdraw .t wm deiconify .t winfo ismapped .t } -cleanup { deleteWindows } -result 1 test wm-deiconify-2.3 {geometry for an unmapped window\ should not be calculated by a call to deiconify,\ it should be done at idle time} -setup { set results {} } -body { toplevel .t -width 200 -height 200 lappend results [wm geometry .t] wm deiconify .t lappend results [wm geometry .t] update idletasks lappend results [lindex [split \ [wm geometry .t] +] 0] } -cleanup { deleteWindows } -result {1x1+0+0 1x1+0+0 200x200} test wm-deiconify-2.4 {invoking destroy after a deiconify\ should not result in a crash because of a callback\ set on the toplevel} -body { toplevel .t wm withdraw .t wm deiconify .t destroy .t update } -cleanup { deleteWindows } ### wm focusmodel ### test wm-focusmodel-1.1 {usage} -returnCodes error -body { wm focusmodel } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-focusmodel-1.2 {usage} -returnCodes error -body { wm focusmodel . _ _ } -result {wrong # args: should be "wm focusmodel window ?active|passive?"} test wm-focusmodel-1.3 {usage} -returnCodes error -body { wm focusmodel . bogus } -result {bad argument "bogus": must be active or passive} stdWindow test wm-focusmodel-2.1 {setting and reading values} -setup { set result {} } -body { lappend result [wm focusmodel .t] wm focusmodel .t active lappend result [wm focusmodel .t] wm focusmodel .t passive lappend result [wm focusmodel .t] } -result {passive active passive} ### wm frame ### test wm-frame-1.1 {usage} -returnCodes error -body { wm frame } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-frame-1.2 {usage} -returnCodes error -body { wm frame . _ } -result {wrong # args: should be "wm frame window"} ### wm geometry ### test wm-geometry-1.1 {usage} -returnCodes error -body { wm geometry } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-geometry-1.2 {usage} -returnCodes error -body { wm geometry . _ _ } -result {wrong # args: should be "wm geometry window ?newGeometry?"} test wm-geometry-1.3 {usage} -returnCodes error -body { wm geometry . bogus } -result {bad geometry specifier "bogus"} test wm-geometry-2.1 {setting values} -body { wm geometry .t 150x150+50+50 update set result [wm geometry .t] wm geometry .t {} update return [list $result [string equal [wm geometry .t] $result]] } -cleanup { unset result } -match glob -result [list 150x150+*+* 0] ### wm grid ### test wm-grid-1.1 {usage} -returnCodes error -body { wm grid } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-grid-1.2 {usage} -returnCodes error -body { wm grid . _ } -result {wrong # args: should be "wm grid window ?baseWidth baseHeight widthInc heightInc?"} test wm-grid-1.3 {usage} -returnCodes error -body { wm grid . _ _ _ } -result {wrong # args: should be "wm grid window ?baseWidth baseHeight widthInc heightInc?"} test wm-grid-1.4 {usage} -returnCodes error -body { wm grid . _ _ _ _ _ } -result {wrong # args: should be "wm grid window ?baseWidth baseHeight widthInc heightInc?"} test wm-grid-1.5 {usage} -returnCodes error -body { wm grid . bad 14 15 16 } -result {expected integer but got "bad"} test wm-grid-1.6 {usage} -returnCodes error -body { wm grid . 13 foo 15 16 } -result {expected integer but got "foo"} test wm-grid-1.7 {usage} -returnCodes error -body { wm grid . 13 14 bar 16 } -result {expected integer but got "bar"} test wm-grid-1.8 {usage} -returnCodes error -body { wm grid . 13 14 15 baz } -result {expected integer but got "baz"} test wm-grid-1.9 {usage} -returnCodes error -body { wm grid . -1 14 15 16 } -result {baseWidth can't be < 0} test wm-grid-1.10 {usage} -returnCodes error -body { wm grid . 13 -1 15 16 } -result {baseHeight can't be < 0} test wm-grid-1.11 {usage} -returnCodes error -body { wm grid . 13 14 -1 16 } -result {widthInc can't be <= 0} test wm-grid-1.12 {usage} -returnCodes error -body { wm grid . 13 14 15 -1 } -result {heightInc can't be <= 0} test wm-grid-2.1 {setting and reading values} -setup { set result {} } -body { lappend result [wm grid .t] wm grid .t 3 4 10 2 lappend result [wm grid .t] wm grid .t {} {} {} {} lappend result [wm grid .t] } -result [list {} {3 4 10 2} {}] ### wm group ### test wm-group-1.1 {usage} -returnCodes error -body { wm group } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-group-1.2 {usage} -returnCodes error -body { wm group .t 12 13 } -result {wrong # args: should be "wm group window ?pathName?"} test wm-group-1.3 {usage} -returnCodes error -body { wm group .t bogus } -result {bad window path name "bogus"} test wm-group-2.1 {setting and reading values} -setup { set result {} } -body { lappend result [wm group .t] wm group .t . lappend result [wm group .t] wm group .t {} lappend result [wm group .t] } -result [list {} . {}] ### wm iconbitmap ### test wm-iconbitmap-1.1 {usage} -returnCodes error -body { wm iconbitmap } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-iconbitmap-1.2.1 {usage} -constraints unix -returnCodes error -body { wm iconbitmap .t 12 13 } -result {wrong # args: should be "wm iconbitmap window ?bitmap?"} test wm-iconbitmap-1.2.2 {usage} -constraints win -returnCodes error -body { wm iconbitmap .t 12 13 14 } -result {wrong # args: should be "wm iconbitmap window ?-default? ?image?"} test wm-iconbitmap-1.3 {usage} -constraints win -returnCodes error -body { wm iconbitmap .t 12 13 } -result {illegal option "12" must be "-default"} test wm-iconbitmap-1.4 {usage} -constraints notAqua -returnCodes error -body { wm iconbitmap .t bad-bitmap } -result {bitmap "bad-bitmap" not defined} test wm-iconbitmap-2.1 {setting and reading values} -constraints notAqua -setup { set result {} } -body { lappend result [wm iconbitmap .t] wm iconbitmap .t hourglass lappend result [wm iconbitmap .t] wm iconbitmap .t {} lappend result [wm iconbitmap .t] } -result [list {} hourglass {}] ### wm iconify ### test wm-iconify-1.1 {usage} -returnCodes error -body { wm iconify } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-iconify-1.2 {usage} -returnCodes error -body { wm iconify .t _ } -result {wrong # args: should be "wm iconify window"} destroy .t2 test wm-iconify-2.1 {Misc errors} -body { toplevel .t2 wm overrideredirect .t2 1 wm iconify .t2 } -returnCodes error -cleanup { destroy .t2 } -result {can't iconify ".t2": override-redirect flag is set} test wm-iconify-2.2 {Misc errors} -body { toplevel .t2 wm geom .t2 +0+0 wm transient .t2 .t wm iconify .t2 } -returnCodes error -cleanup { destroy .t2 } -result {can't iconify ".t2": it is a transient} test wm-iconify-2.3 {Misc errors} -body { toplevel .t2 wm geom .t2 +0+0 wm iconwindow .t .t2 wm iconify .t2 } -returnCodes error -cleanup { destroy .t2 } -result {can't iconify .t2: it is an icon for .t} # test embedded window for Windows test wm-iconify-2.4.1 {Misc errors} -constraints win -setup { destroy .t2 } -body { frame .t.f -container 1 toplevel .t2 -use [winfo id .t.f] wm iconify .t2 } -returnCodes error -cleanup { destroy .t2 .r.f } -result {can't iconify .t2: the container does not support the request} # test embedded window for other platforms test wm-iconify-2.4.2 {Misc errors} -constraints !win -setup { destroy .t2 } -body { frame .t.f -container 1 toplevel .t2 -use [winfo id .t.f] wm iconify .t2 } -returnCodes error -cleanup { destroy .t2 .r.f } -result {can't iconify .t2: it is an embedded window} test wm-iconify-3.1 {iconify behavior} -constraints {failsOnUbuntu failsOnXQuarz} -body { toplevel .t2 wm geom .t2 -0+0 update idletasks set result [winfo ismapped .t2] wm iconify .t2 update idletasks lappend result [winfo ismapped .t2] } -cleanup { destroy .t2 } -result {1 0} ### wm iconmask ### test wm-iconmask-1.1 {usage} -returnCodes error -body { wm iconmask } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-iconmask-1.2 {usage} -returnCodes error -body { wm iconmask .t 12 13 } -result {wrong # args: should be "wm iconmask window ?bitmap?"} test wm-iconmask-1.3 {usage} -returnCodes error -body { wm iconmask .t bad-bitmap } -result {bitmap "bad-bitmap" not defined} test wm-iconmask-2.1 {setting and reading values} -setup { set result {} } -body { lappend result [wm iconmask .t] wm iconmask .t hourglass lappend result [wm iconmask .t] wm iconmask .t {} lappend result [wm iconmask .t] } -result [list {} hourglass {}] ### wm iconname ### test wm-iconname-1.1 {usage} -returnCodes error -body { wm iconname } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-iconname-1.2 {usage} -returnCodes error -body { wm iconname .t 12 13 } -result {wrong # args: should be "wm iconname window ?newName?"} test wm-iconname-2.1 {setting and reading values} -setup { set result {} } -body { lappend result [wm iconname .t] wm iconname .t ThisIconHasAName lappend result [wm iconname .t] wm iconname .t {} lappend result [wm iconname .t] } -result [list {} ThisIconHasAName {}] ### wm iconphoto ### test wm-iconphoto-1.1 {usage} -returnCodes error -body { wm iconphoto } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-iconphoto-1.2 {usage} -returnCodes error -body { wm iconphoto . } -result {wrong # args: should be "wm iconphoto window ?-default? image1 ?image2 ...?"} test wm-iconphoto-1.3 {usage} -returnCodes error -body { wm iconphoto . notanimage } -result {can't use "notanimage" as iconphoto: not a photo image} test wm-iconphoto-1.4 {usage} -returnCodes error -body { # we currently have no return info wm iconphoto . -default } -result {wrong # args: should be "wm iconphoto window ?-default? image1 ?image2 ...?"} test wm-iconphoto-1.5.1 {usage} -constraints aquaOrWin32 -returnCodes error -body { wm iconphoto . -default [image create photo -file {}] } -match {glob} -result {failed to create an iconphoto with image *} test wm-iconphoto-1.5.2 {usage} -constraints x11 -body { wm iconphoto . -default [image create photo -file {}] } -result {} # All other iconphoto tests are platform specific ### wm iconposition ### test wm-iconposition-1.1 {usage} -returnCodes error -body { wm iconposition } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-iconposition-1.2 {usage} -returnCodes error -body { wm iconposition .t 12 } -result {wrong # args: should be "wm iconposition window ?x y?"} test wm-iconposition-1.3 {usage} -returnCodes error -body { wm iconposition .t 12 13 14 } -result {wrong # args: should be "wm iconposition window ?x y?"} test wm-iconposition-1.4 {usage} -returnCodes error -body { wm iconposition .t bad 13 } -result {expected integer but got "bad"} test wm-iconposition-1.5 {usage} -returnCodes error -body { wm iconposition .t 13 lousy } -result {expected integer but got "lousy"} test wm-iconposition-2.1 {setting and reading values} -setup { set result {} } -body { lappend result [wm iconposition .t] wm iconposition .t 10 20 lappend result [wm iconposition .t] wm iconposition .t {} {} lappend result [wm iconposition .t] } -result [list {} {10 20} {}] ### wm iconwindow ### test wm-iconwindow-1.1 {usage} -returnCodes error -body { wm iconwindow } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-iconwindow-1.2 {usage} -returnCodes error -body { wm iconwindow .t 12 13 } -result {wrong # args: should be "wm iconwindow window ?pathName?"} test wm-iconwindow-1.3 {usage} -returnCodes error -body { wm iconwindow .t bogus } -result {bad window path name "bogus"} test wm-iconwindow-1.4 {usage} -setup { destroy .b } -body { button .b -text Help wm iconwindow .t .b } -returnCodes error -cleanup { 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 .t2 wm geom .t2 -0+0 wm iconwindow .t2 .icon wm iconwindow .t .icon } -returnCodes error -cleanup { destroy .t2 .icon } -result {.icon is already an icon for .t2} 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 wm iconwindow .t .icon lappend result [wm iconwindow .t] wm iconwindow .t {} destroy .icon lappend result [wm iconwindow .t] } -result {{} .icon {}} ### wm maxsize ### test wm-maxsize-1.1 {usage} -returnCodes error -body { wm maxsize } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-maxsize-1.2 {usage} -returnCodes error -body { wm maxsize . a } -result {wrong # args: should be "wm maxsize window ?width height?"} test wm-maxsize-1.3 {usage} -returnCodes error -body { wm maxsize . a b c } -result {wrong # args: should be "wm maxsize window ?width height?"} test wm-maxsize-1.4 {usage} -returnCodes error -body { wm maxsize . x 100 } -result {expected integer but got "x"} test wm-maxsize-1.5 {usage} -returnCodes error -body { wm maxsize . 100 bogus } -result {expected integer but got "bogus"} test wm-maxsize-1.6 {usage} -setup { destroy .t2 } -body { toplevel .t2 wm maxsize .t2 300 200 wm maxsize .t2 } -cleanup { destroy .t2 } -result {300 200} test wm-maxsize-1.7 {maxsize must be <= screen size} -setup { destroy .t } -body { toplevel .t lassign [wm maxsize .t] t_width t_height set s_width [winfo screenwidth .t] set s_height [winfo screenheight .t] expr {($t_width <= $s_width) && ($t_height <= $s_height)} } -cleanup { destroy .t } -result 1 destroy .t test wm-maxsize-2.1 {setting the maxsize to a value smaller\ than the current size will resize a toplevel} -body { toplevel .t -width 300 -height 300 update wm maxsize .t 200 150 # UpdateGeometryInfo invoked at idle update lrange [split [wm geom .t] x+] 0 1 } -cleanup { destroy .t } -result {200 150} test wm-maxsize-2.2 {setting the maxsize to a value smaller\ than the current size will resize a gridded toplevel} -body { toplevel .t wm grid .t 0 0 50 50 wm geometry .t 6x6 update wm maxsize .t 4 3 # UpdateGeometryInfo invoked at idle update lrange [split [wm geom .t] x+] 0 1 } -cleanup { destroy .t } -result {4 3} test wm-maxsize-2.3 {attempting to resize to a value\ bigger than the current maxsize will set it to the max size} -body { toplevel .t -width 200 -height 200 wm maxsize .t 300 250 update wm geom .t 400x300 update lrange [split [wm geom .t] x+] 0 1 } -cleanup { destroy .t } -result {300 250} test wm-maxsize-2.4 {attempting to resize to a value bigger than the\ current maxsize will set it to the max size when gridded} -body { toplevel .t wm grid .t 1 1 50 50 wm geom .t 4x4 wm maxsize .t 6 5 update wm geom .t 8x6 update lrange [split [wm geom .t] x+] 0 1 } -cleanup { destroy .t } -result {6 5} test wm-maxsize-2.5 {Use max size if window size is not explicitly set\ and the reqWidth/reqHeight are bigger than the max size} -body { toplevel .t pack [frame .t.f -width 400 -height 400] update idletasks set req [list [winfo reqwidth .t] [winfo reqheight .t]] wm maxsize .t 300 300 update list $req [lrange [split [wm geom .t] x+] 0 1] } -cleanup { destroy .t } -result {{400 400} {300 300}} ### wm minsize ### test wm-minsize-1.1 {usage} -returnCodes error -body { wm minsize } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-minsize-1.2 {usage} -returnCodes error -body { wm minsize . a } -result {wrong # args: should be "wm minsize window ?width height?"} test wm-minsize-1.3 {usage} -returnCodes error -body { wm minsize . a b c } -result {wrong # args: should be "wm minsize window ?width height?"} test wm-minsize-1.4 {usage} -returnCodes error -body { wm minsize . x 100 } -result {expected integer but got "x"} test wm-minsize-1.5 {usage} -returnCodes error -body { wm minsize . 100 bogus } -result {expected integer but got "bogus"} test wm-minsize-1.6 {usage} -setup { destroy .t2 } -body { toplevel .t2 wm minsize .t2 300 200 wm minsize .t2 } -cleanup { destroy .t2 } -result {300 200} test wm-minsize-2.1 {setting the minsize to a value larger\ than the current size will resize a toplevel} -body { toplevel .t -width 200 -height 200 update wm minsize .t 400 300 # UpdateGeometryInfo invoked at idle update lrange [split [wm geom .t] x+] 0 1 } -cleanup { destroy .t } -result {400 300} test wm-minsize-2.2 {setting the minsize to a value larger\ than the current size will resize a gridded toplevel} -body { toplevel .t wm grid .t 1 1 50 50 wm geom .t 4x4 update wm minsize .t 8 8 # UpdateGeometryInfo invoked at idle update lrange [split [wm geom .t] x+] 0 1 } -cleanup { destroy .t } -result {8 8} test wm-minsize-2.3 {attempting to resize to a value\ smaller than the current minsize will set it to the minsize} -body { toplevel .t -width 400 -height 400 wm minsize .t 300 300 update wm geom .t 200x200 update lrange [split [wm geom .t] x+] 0 1 } -cleanup { destroy .t } -result {300 300} test wm-minsize-2.4 {attempting to resize to a value smaller than the\ current minsize will set it to the minsize when gridded} -body { toplevel .t wm grid .t 1 1 50 50 wm geom .t 8x8 wm minsize .t 6 6 update wm geom .t 4x4 update lrange [split [wm geom .t] x+] 0 1 } -cleanup { destroy .t } -result {6 6} test wm-minsize-2.5 {Use min size if window size is not explicitly set\ and the reqWidth/reqHeight are smaller than the min size} -setup { set result [list] } -body { toplevel .t pack [frame .t.f -width 250 -height 250] update idletasks lappend result [list [winfo reqwidth .t] [winfo reqheight .t]] wm minsize .t 300 300 update lappend result [lrange [split [wm geom .t] x+] 0 1] } -cleanup { destroy .t } -result {{250 250} {300 300}} stdWindow ### wm overrideredirect ### test wm-overrideredirect-1.1 {usage} -returnCodes error -body { wm overrideredirect } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-overrideredirect-1.2 {usage} -returnCodes error -body { wm overrideredirect .t 1 2 } -result {wrong # args: should be "wm overrideredirect window ?boolean?"} test wm-overrideredirect-1.3 {usage} -returnCodes error -body { wm overrideredirect .t boo } -result {expected boolean value but got "boo"} test wm-overrideredirect-2.1 {setting and reading values} -setup { set result {} } -body { lappend result [wm overrideredirect .t] wm overrideredirect .t true lappend result [wm overrideredirect .t] wm overrideredirect .t off lappend result [wm overrideredirect .t] } -result {0 1 0} ### wm positionfrom ### test wm-positionfrom-1.1 {usage} -returnCodes error -body { wm positionfrom } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-positionfrom-1.2 {usage} -returnCodes error -body { wm positionfrom .t 1 2 } -result {wrong # args: should be "wm positionfrom window ?user/program?"} test wm-positionfrom-1.3 {usage} -returnCodes error -body { wm positionfrom .t none } -result {bad argument "none": must be program or user} test wm-positionfrom-2.1 {setting and reading values} -setup { destroy .t2 set result {} } -body { toplevel .t2 wm positionfrom .t user lappend result [wm positionfrom .t] wm positionfrom .t program lappend result [wm positionfrom .t] wm positionfrom .t {} lappend result [wm positionfrom .t] } -cleanup { destroy .t2 } -result {user program {}} ### wm protocol ### test wm-protocol-1.1 {usage} -returnCodes error -body { wm protocol } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-protocol-1.2 {usage} -returnCodes error -body { wm protocol .t 1 2 3 } -result {wrong # args: should be "wm protocol window ?name? ?command?"} test wm-protocol-2.1 {setting and reading values} -body { wm protocol .t {foo a} {a b c} wm protocol .t bar {test script for bar} wm protocol .t } -cleanup { wm protocol .t {foo a} {} wm protocol .t bar {} } -result {bar {foo a}} test wm-protocol-2.2 {setting and reading values} -setup { set result {} } -body { wm protocol .t foo {a b c} wm protocol .t bar {test script for bar} lappend result [wm protocol .t foo] [wm protocol .t bar] wm protocol .t foo {} wm protocol .t bar {} lappend result [wm protocol .t foo] [wm protocol .t bar] } -result {{a b c} {test script for bar} {} {}} test wm-protocol-2.3 {setting and reading values} -body { wm protocol .t foo {a b c} wm protocol .t foo {test script} wm protocol .t foo } -cleanup { wm protocol .t foo {} } -result {test script} ### wm resizable ### test wm-resizable-1.1 {usage} -returnCodes error -body { wm resizable } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-resizable-1.2 {usage} -returnCodes error -body { wm resizable .t 1 } -result {wrong # args: should be "wm resizable window ?width height?"} test wm-resizable-1.3 {usage} -returnCodes error -body { wm resizable .t 1 2 3 } -result {wrong # args: should be "wm resizable window ?width height?"} test wm-resizable-1.4 {usage} -returnCodes error -body { wm resizable .t bad 0 } -result {expected boolean value but got "bad"} test wm-resizable-1.5 {usage} -returnCodes error -body { wm resizable .t 1 bad } -result {expected boolean value but got "bad"} test wm-resizable-2.1 {setting and reading values} { wm resizable .t 0 0 set result [wm resizable .t] wm resizable .t 0 1 lappend result [wm resizable .t] wm resizable .t 1 0 lappend result [wm resizable .t] wm resizable .t 1 1 lappend result [wm resizable .t] } {0 0 {0 1} {1 0} {1 1}} ### wm sizefrom ### test wm-sizefrom-1.1 {usage} -returnCodes error -body { wm sizefrom } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-sizefrom-1.2 {usage} -returnCodes error -body { wm sizefrom .t 1 2 } -result {wrong # args: should be "wm sizefrom window ?user|program?"} test wm-sizefrom-1.4 {usage} -returnCodes error -body { wm sizefrom .t bad } -result {bad argument "bad": must be program or user} test wm-sizefrom-2.1 {setting and reading values} { set result [list [wm sizefrom .t]] wm sizefrom .t user lappend result [wm sizefrom .t] wm sizefrom .t program lappend result [wm sizefrom .t] wm sizefrom .t {} lappend result [wm sizefrom .t] } {{} user program {}} destroy .t ### wm stackorder ### test wm-stackorder-1.1 {usage} -returnCodes error -body { wm stackorder } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-stackorder-1.2 {usage} -returnCodes error -body { wm stackorder . _ } -result {wrong # args: should be "wm stackorder window ?isabove|isbelow window?"} test wm-stackorder-1.3 {usage} -returnCodes error -body { wm stackorder . _ _ _ } -result {wrong # args: should be "wm stackorder window ?isabove|isbelow window?"} test wm-stackorder-1.4 {usage} -returnCodes error -body { wm stackorder . is . } -result {ambiguous argument "is": must be isabove or isbelow} test wm-stackorder-1.5 {usage} -returnCodes error -body { wm stackorder _ } -result {bad window path name "_"} test wm-stackorder-1.6 {usage} -returnCodes error -body { wm stackorder . isabove _ } -result {bad window path name "_"} test wm-stackorder-1.7 {usage} -body { toplevel .t button .t.b wm stackorder .t.b } -cleanup { destroy .t } -returnCodes error -result {window ".t.b" isn't a top-level window} test wm-stackorder-1.8 {usage} -body { toplevel .t button .t.b pack .t.b update wm stackorder . isabove .t.b } -cleanup { destroy .t } -returnCodes error -result {window ".t.b" isn't a top-level window} test wm-stackorder-1.9 {usage} -body { toplevel .t button .t.b pack .t.b update wm stackorder . isbelow .t.b } -cleanup { destroy .t } -returnCodes error -result {window ".t.b" isn't a top-level window} test wm-stackorder-1.10 {usage, isabove|isbelow toplevels must be mapped} -body { toplevel .t update wm withdraw .t wm stackorder .t isabove . } -cleanup { destroy .t } -returnCodes error -result {window ".t" isn't mapped} test wm-stackorder-1.11 {usage, isabove|isbelow toplevels must be mapped} -body { toplevel .t update wm withdraw .t wm stackorder . isbelow .t } -cleanup { destroy .t } -returnCodes error -result {window ".t" isn't mapped} deleteWindows test wm-stackorder-2.1 {stacking order} -body { toplevel .t ; update raiseDelay wm stackorder . } -cleanup { destroy .t } -result {. .t} test wm-stackorder-2.2 {stacking order} -body { toplevel .t ; update raise . raiseDelay wm stackorder . } -cleanup { destroy .t } -result {.t .} test wm-stackorder-2.3 {stacking order} -body { toplevel .t tkwait visibility .t toplevel .t2 tkwait visibility .t2 raise . raiseDelay raise .t2 raiseDelay wm stackorder . } -cleanup { destroy .t .t2 } -result {.t . .t2} test wm-stackorder-2.4 {stacking order} -body { toplevel .t ; update toplevel .t2 ; update raise . lower .t2 raiseDelay wm stackorder . } -cleanup { destroy .t .t2 } -result {.t2 .t .} test wm-stackorder-2.5 {stacking order} -setup { destroy .parent } -body { toplevel .parent ; update destroy .parent.child1 toplevel .parent.child1 ; update destroy .parent.child2 toplevel .parent.child2 ; update destroy .extra toplevel .extra ; update raise .parent lower .parent.child2 raiseDelay wm stackorder .parent } -cleanup { deleteWindows } -result {.parent.child2 .parent.child1 .parent} test wm-stackorder-2.6 {stacking order: non-toplevel widgets ignored} -body { toplevel .t1 raiseDelay button .t1.b pack .t1.b update wm stackorder . } -cleanup { destroy .t1 } -result {. .t1} test wm-stackorder-2.7 {stacking order: no children returns self} -setup { deleteWindows } -body { wm stackorder . } -result {.} deleteWindows test wm-stackorder-3.1 {unmapped toplevel} -constraints {failsOnUbuntu failsOnXQuarz} -body { toplevel .t1 ; update toplevel .t2 ; update wm iconify .t1 raiseDelay wm stackorder . } -cleanup { destroy .t1 .t2 } -result {. .t2} test wm-stackorder-3.2 {unmapped toplevel} -body { toplevel .t1 ; update toplevel .t2 ; update wm withdraw .t2 raiseDelay wm stackorder . } -cleanup { destroy .t1 .t2 } -result {. .t1} test wm-stackorder-3.3 {unmapped toplevel} -body { toplevel .t1 ; update toplevel .t2 ; update wm withdraw .t2 wm stackorder .t2 } -cleanup { destroy .t1 .t2 } -result {} test wm-stackorder-3.4 {unmapped toplevel} -body { toplevel .t1 ; update toplevel .t1.t2 ; update wm withdraw .t1.t2 wm stackorder .t1 } -cleanup { destroy .t1 } -result {.t1} test wm-stackorder-3.5 {unmapped toplevel} -body { toplevel .t1 ; update toplevel .t1.t2 ; update wm withdraw .t1 wm stackorder .t1 } -cleanup { destroy .t1 } -result {.t1.t2} test wm-stackorder-3.6 {unmapped toplevel} -body { toplevel .t1 tkwait visibility .t1 toplevel .t1.t2 tkwait visibility .t1.t2 toplevel .t1.t2.t3 tkwait visibility .t1.t2.t3 wm withdraw .t1.t2 raiseDelay wm stackorder .t1 } -cleanup { destroy .t1 } -result {.t1 .t1.t2.t3} test wm-stackorder-3.7 {unmapped toplevel, mapped children returned} -body { toplevel .t1 ; update toplevel .t1.t2 ; update wm withdraw .t1 wm stackorder .t1 } -cleanup { destroy .t1 } -result {.t1.t2} test wm-stackorder-3.8 {toplevel mapped in idle callback} -body { toplevel .t1 wm stackorder . } -cleanup { destroy .t1 } -result {.} deleteWindows test wm-stackorder-4.1 {wm stackorder isabove|isbelow} -body { toplevel .t ; update raise .t wm stackorder . isabove .t } -cleanup { destroy .t } -result 0 test wm-stackorder-4.2 {wm stackorder isabove|isbelow} -body { toplevel .t ; update raise .t wm stackorder . isbelow .t } -cleanup { destroy .t } -result 1 test wm-stackorder-4.3 {wm stackorder isabove|isbelow} -body { toplevel .t tkwait visibility .t raise . raiseDelay wm stackorder .t isabove . } -cleanup { destroy .t } -result 0 test wm-stackorder-4.4 {wm stackorder isabove|isbelow} -body { toplevel .t ; update raise . raiseDelay wm stackorder .t isb . } -cleanup { destroy .t } -result 1 deleteWindows test wm-stackorder-5.1 {a menu is not a toplevel} -body { toplevel .t menu .t.m -type menubar .t.m add cascade -label "File" .t configure -menu .t.m update raise . raiseDelay wm stackorder . } -cleanup { destroy .t } -result {.t .} test wm-stackorder-5.2 {A normal toplevel can't be raised above an \ overrideredirect toplevel on unix} -constraints {x11 failsOnUbuntu failsOnXQuarz} -body { toplevel .t wm overrideredirect .t 1 tkwait visibility .t raise . update raiseDelay wm stackorder . isabove .t } -cleanup { destroy .t } -result 0 test wm-stackorder-5.2.1 {A normal toplevel can be raised above an \ overrideredirect toplevel on macOS or win} -constraints aquaOrWin32 -body { toplevel .t wm overrideredirect .t 1 tkwait visibility .t raise . update raiseDelay wm stackorder . isabove .t } -cleanup { destroy .t } -result 1 test wm-stackorder-5.3 {An overrideredirect window\ can be explicitly lowered} -body { toplevel .t wm overrideredirect .t 1 tkwait visibility .t lower .t update raiseDelay wm stackorder .t isbelow . } -cleanup { destroy .t } -result 1 test wm-stackorder-6.1 {An embedded toplevel does not appear in the \ stacking order} -body { toplevel .real -container 1 raiseDelay toplevel .embd -bg blue -use [winfo id .real] raiseDelay wm stackorder . } -cleanup { deleteWindows } -result {. .real} stdWindow ### wm title ### test wm-title-1.1 {usage} -returnCodes error -body { wm title } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-title-1.2 {usage} -returnCodes error -body { wm title . 1 2 } -result {wrong # args: should be "wm title window ?newTitle?"} test wm-title-2.1 {setting and reading values} -setup { destroy .t } -body { toplevel .t set result [wm title .t] wm title .t Apa lappend result [wm title .t] wm title .t {} lappend result [wm title .t] } -result {t Apa {}} ### wm transient ### test wm-transient-1.1 {usage} -returnCodes error -body { catch {destroy .t} ; toplevel .t wm transient .t 1 2 } -result {wrong # args: should be "wm transient window ?master?"} test wm-transient-1.2 {usage} -returnCodes error -body { catch {destroy .t} ; toplevel .t wm transient .t foo } -result {bad window path name "foo"} test wm-transient-1.3 {usage} -returnCodes error -body { catch {destroy .t} ; toplevel .t wm transient foo .t } -result {bad window path name "foo"} deleteWindows test wm-transient-1.4 {usage} -returnCodes error -body { toplevel .top toplevel .subject wm transient .subject .top 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 .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 .top wm iconwindow .top .icon toplevel .dummy wm transient .dummy .icon } -cleanup { deleteWindows } -result {can't make ".icon" a master: it is an icon for .top} test wm-transient-1.7 {usage} -returnCodes error -body { toplevel .top wm transient .top .top } -cleanup { deleteWindows } -result {setting ".top" as master creates a transient/master cycle} test wm-transient-1.8 {usage} -returnCodes error -body { toplevel .t1 toplevel .t2 toplevel .t3 wm transient .t2 .t1 wm transient .t3 .t2 wm transient .t1 .t3 } -cleanup { deleteWindows } -result {setting ".t3" as master creates a transient/master cycle} test wm-transient-1.9 {usage} -returnCodes error -body { toplevel .top frame .top.f wm transient .top .top.f } -cleanup { deleteWindows } -result {setting ".top" as master creates a transient/master cycle} test wm-transient-2.1 {basic get/set of toplevel} -setup { set results [list] } -body { toplevel .top toplevel .subject lappend results [wm transient .subject] wm transient .subject .top lappend results [wm transient .subject] wm transient .subject {} lappend results [wm transient .subject] } -cleanup { deleteWindows } -result {{} .top {}} test wm-transient-2.2 {first toplevel parent of non-toplevel container window is used} -body { toplevel .top frame .top.f toplevel .subject wm transient .subject .top.f wm transient .subject } -cleanup { deleteWindows } -result {.top} test wm-transient-3.1 {transient toplevel is withdrawn when mapped if toplevel is withdrawn} -body { toplevel .top wm withdraw .top update toplevel .subject wm transient .subject .top update list [wm state .subject] [winfo ismapped .subject] } -cleanup { deleteWindows } -result {withdrawn 0} test wm-transient-3.2 {already mapped transient toplevel takes on withdrawn state of toplevel} -body { toplevel .top wm withdraw .top update toplevel .subject update wm transient .subject .top update list [wm state .subject] [winfo ismapped .subject] } -cleanup { deleteWindows } -result {withdrawn 0} test wm-transient-3.3 {withdraw/deiconify on the toplevel also does a withdraw/deiconify on the transient} -setup { set results [list] } -body { toplevel .top toplevel .subject update wm transient .subject .top wm withdraw .top update lappend results [wm state .subject] [winfo ismapped .subject] wm deiconify .top update lappend results [wm state .subject] [winfo ismapped .subject] } -cleanup { deleteWindows } -result {withdrawn 0 normal 1} test wm-transient-4.1 {transient toplevel is withdrawn when mapped if toplevel is iconic} -constraints {failsOnUbuntu failsOnXQuarz} -body { toplevel .top wm iconify .top update toplevel .subject wm transient .subject .top update list [wm state .subject] [winfo ismapped .subject] } -cleanup { deleteWindows } -result {withdrawn 0} test wm-transient-4.2 {already mapped transient toplevel is withdrawn if toplevel is iconic} -constraints {failsOnUbuntu failsOnXQuarz} -body { toplevel .top raiseDelay wm iconify .top update idletasks toplevel .subject update idletasks wm transient .subject .top update idletasks list [wm state .subject] [winfo ismapped .subject] } -cleanup { deleteWindows } -result {withdrawn 0} test wm-transient-4.3 {iconify/deiconify on the toplevel does a withdraw/deiconify on the transient} -constraints {failsOnUbuntu failsOnXQuarz} -setup { set results [list] } -body { toplevel .top toplevel .subject update idletasks wm transient .subject .top wm iconify .top update idletasks lappend results [wm state .subject] [winfo ismapped .subject] wm deiconify .top update idletasks lappend results [wm state .subject] [winfo ismapped .subject] } -cleanup { deleteWindows } -result {withdrawn 0 normal 1} test wm-transient-5.1 {an error during transient command should not cause the map/unmap binding to be deleted} -setup { set results [list] } -body { toplevel .top toplevel .subject update wm transient .subject .top # Expect a bad window path error here lappend results [catch {wm transient .subject .bad}] wm withdraw .top update lappend results [wm state .subject] wm deiconify .top update lappend results [wm state .subject] } -cleanup { deleteWindows } -result {1 withdrawn normal} test wm-transient-5.2 {remove transient property when toplevel is destroyed} -body { toplevel .top toplevel .subject wm transient .subject .top update destroy .top update wm transient .subject } -cleanup { deleteWindows } -result {} test wm-transient-5.3 {remove transient property from window that had never been mapped when toplevel is destroyed} -body { toplevel .top toplevel .subject wm transient .subject .top destroy .top wm transient .subject } -cleanup { deleteWindows } -result {} test wm-transient-6.1 {a withdrawn transient does not track state changes in the toplevel} -body { toplevel .top toplevel .subject update wm transient .subject .top wm withdraw .subject wm withdraw .top wm deiconify .top # idle handler should not map the transient update wm state .subject } -cleanup { deleteWindows } -result {withdrawn} test wm-transient-6.2 {a withdrawn transient does not track state changes in the toplevel} -setup { set results [list] } -body { toplevel .top toplevel .subject update wm transient .subject .top wm withdraw .subject wm withdraw .top wm deiconify .top # idle handler should not map the transient update lappend results [wm state .subject] wm deiconify .subject lappend results [wm state .subject] wm withdraw .top lappend results [wm state .subject] wm deiconify .top # idle handler should map transient update lappend results [wm state .subject] } -cleanup { deleteWindows } -result {withdrawn normal withdrawn normal} test wm-transient-6.3 {a withdrawn transient does not track state changes in the toplevel} -body { toplevel .top toplevel .subject update # withdraw before making window a transient wm withdraw .subject wm transient .subject .top wm withdraw .top wm deiconify .top # idle handler should not map the transient update wm state .subject } -cleanup { deleteWindows } -result {withdrawn} # wm-transient-7.*: See SF Tk Bug #592201 "wm transient fails with two toplevels" # wm-transient-7.3 through 7.5 all caused panics on Unix in Tk 8.4b1. # 7.1 and 7.2 added to catch (potential) future errors. # test wm-transient-7.1 {Destroying transient} -body { toplevel .t toplevel .transient wm transient .transient .t destroy .transient destroy .t # OK: the above did not cause a panic. } -cleanup { deleteWindows } test wm-transient-7.2 {Destroying toplevel} -body { toplevel .top toplevel .transient wm transient .transient .top destroy .top wm transient .transient } -cleanup { deleteWindows } -result {} test wm-transient-7.3 {Reassign transient, destroy old toplevel} -body { toplevel .t1 toplevel .t2 toplevel .transient wm transient .transient .t1 wm transient .transient .t2 destroy .t1 ;# Caused panic in 8.4b1 destroy .t2 destroy .transient } -cleanup { deleteWindows } test wm-transient-7.4 {Reassign transient, destroy new toplevel} -body { toplevel .t1 toplevel .t2 toplevel .transient wm transient .transient .t1 wm transient .transient .t2 destroy .t2 ;# caused panic in 8.4b1 destroy .t1 destroy .transient } -cleanup { deleteWindows } test wm-transient-7.5 {Reassign transient, destroy transient} -body { toplevel .t1 toplevel .t2 toplevel .transient wm transient .transient .t1 wm transient .transient .t2 destroy .transient destroy .t2 ;# caused panic in 8.4b1 destroy .t1 ;# so did this } -cleanup { deleteWindows } test wm-transient-8.1 {transient to withdrawn window, Bug 1163496} -constraints {failsOnUbuntu failsOnXQuarz} -setup { deleteWindows set result {} } -body { # Verifies that transients stay on top of their toplevels, even if they were # made transients when those toplevels were withdrawn. toplevel .t1; wm withdraw .t1; update toplevel .t2; wm transient .t2 .t1; update lappend result [winfo ismapped .t1] [winfo ismapped .t2] wm deiconify .t1; update lappend result [winfo ismapped .t1] [winfo ismapped .t2] raise .t1; raiseDelay; update lappend result [lsearch -all -inline -glob [wm stackorder .] ".t?"] } -cleanup { deleteWindows } -result {0 0 1 1 {.t1 .t2}} ### wm state ### test wm-state-1.1 {usage} -returnCodes error -body { wm state } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-state-1.2 {usage} -returnCodes error -body { wm state . _ _ } -result {wrong # args: should be "wm state window ?state?"} deleteWindows test wm-state-2.1 {initial state} -body { toplevel .t wm state .t } -cleanup { deleteWindows } -result {normal} test wm-state-2.2 {state change before map} -body { toplevel .t wm state .t withdrawn wm state .t } -cleanup { deleteWindows } -result {withdrawn} test wm-state-2.3 {state change before map} -body { toplevel .t wm withdraw .t wm state .t } -cleanup { deleteWindows } -result {withdrawn} test wm-state-2.4 {state change after map} -body { toplevel .t update wm state .t withdrawn wm state .t } -cleanup { deleteWindows } -result {withdrawn} test wm-state-2.5 {state change after map} -body { toplevel .t update wm withdraw .t wm state .t } -cleanup { deleteWindows } -result {withdrawn} test wm-state-2.6 {state change before map} -body { toplevel .t wm state .t iconic wm state .t } -cleanup { deleteWindows } -result {iconic} test wm-state-2.7 {state change before map} -body { toplevel .t wm iconify .t wm state .t } -cleanup { deleteWindows } -result {iconic} test wm-state-2.8 {state change after map} -constraints {failsOnUbuntu failsOnXQuarz} -body { toplevel .t update wm state .t iconic wm state .t } -cleanup { deleteWindows } -result {iconic} test wm-state-2.9 {state change after map} -constraints {failsOnUbuntu failsOnXQuarz} -body { toplevel .t update wm iconify .t wm state .t } -cleanup { deleteWindows } -result {iconic} test wm-state-2.10 {state change before map} -body { toplevel .t wm withdraw .t wm state .t normal wm state .t } -cleanup { deleteWindows } -result {normal} test wm-state-2.11 {state change before map} -body { toplevel .t wm withdraw .t wm deiconify .t wm state .t } -cleanup { deleteWindows } -result {normal} test wm-state-2.12 {state change after map} -body { toplevel .t update wm withdraw .t wm state .t normal wm state .t } -cleanup { deleteWindows } -result {normal} test wm-state-2.13 {state change after map} -body { toplevel .t update wm withdraw .t wm deiconify .t wm state .t } -cleanup { deleteWindows } -result {normal} test wm-state-2.14 {state change before map} -body { toplevel .t wm iconify .t wm state .t normal wm state .t } -cleanup { deleteWindows } -result {normal} test wm-state-2.15 {state change before map} -body { toplevel .t wm iconify .t wm deiconify .t wm state .t } -cleanup { deleteWindows } -result {normal} test wm-state-2.16 {state change after map} -body { toplevel .t update wm iconify .t wm state .t normal wm state .t } -cleanup { deleteWindows } -result {normal} test wm-state-2.17 {state change after map} -body { toplevel .t update wm iconify .t wm deiconify .t wm state .t } -cleanup { deleteWindows } -result {normal} test wm-state-2.18 {state change after map} -constraints win -body { toplevel .t update wm state .t zoomed wm state .t } -cleanup { deleteWindows } -result {zoomed} ### wm withdraw ### test wm-withdraw-1.1 {usage} -returnCodes error -body { wm withdraw } -result {wrong # args: should be "wm option window ?arg ...?"} test wm-withdraw-1.2 {usage} -returnCodes error -body { wm withdraw . _ } -result {wrong # args: should be "wm withdraw window"} deleteWindows test wm-withdraw-2.1 {Misc errors} -body { toplevel .t toplevel .t2 wm iconwindow .t .t2 wm withdraw .t2 } -returnCodes error -cleanup { deleteWindows } -result {can't withdraw .t2: it is an icon for .t} test wm-withdraw-3.1 {} -setup { set result {} } -body { toplevel .t update wm withdraw .t lappend result [wm state .t] [winfo ismapped .t] wm deiconify .t lappend result [wm state .t] [winfo ismapped .t] } -cleanup { deleteWindows } -result {withdrawn 0 normal 1} ### Misc. wm tests ### test wm-deletion-epoch-1.1 {Deletion epoch on multiple displays} -constraints altDisplay -body { # See Tk Bug #671330 "segfault when e.g. deiconifying destroyed window" set w [toplevel .t -screen $env(TK_ALT_DISPLAY)] wm deiconify $w ;# this caches the WindowRep destroy .t wm deiconify $w } -returnCodes error -result {bad window path name ".t"} -cleanup { deleteWindows } ### Docking test (manage, forget) ### test wm-manage-1.1 {managing a frame} -setup { set result [list] } -body { toplevel .t frame .t.f pack [label .t.f.l -text hello] wm manage .t.f raise .t.f update lappend result [winfo manage .t.f] lappend result [winfo toplevel .t.f] } -cleanup { deleteWindows } -result {wm .t.f} test wm-manage-1.2 {managing a toplevel} -setup { set result [list] } -body { toplevel .t pack [label .t.l -text hello] wm manage .t raise .t update lappend result [winfo manage .t] lappend result [winfo toplevel .t] } -cleanup { deleteWindows } -result {wm .t} test wm-manage-1.3 {managing a labelframe} -setup { set result [list] } -body { toplevel .t labelframe .t.f -text Labelframe pack [label .t.f.l -text hello] wm manage .t.f raise .t.f update lappend result [winfo manage .t.f] lappend result [winfo toplevel .t.f] } -cleanup { deleteWindows } -result {wm .t.f} test wm-manage-1.4 {managing a ttk::frame} -setup { set result [list] } -body { toplevel .t ttk::frame .t.f pack [label .t.f.l -text hello] wm manage .t.f raise .t.f update lappend result [winfo manage .t.f] lappend result [winfo toplevel .t.f] } -cleanup { deleteWindows } -returnCodes error -result "window \".t.f\" is not manageable: must be a frame, labelframe or toplevel" test wm-manage-1.5 {managing a text widget} -setup { set result [list] } -body { toplevel .t text .t.f .t.f insert end "Manage text\n" {} wm manage .t.f raise .t.f update lappend result [winfo manage .t.f] lappend result [winfo toplevel .t.f] } -cleanup { deleteWindows } -returnCodes error -result "window \".t.f\" is not manageable: must be a frame, labelframe or toplevel" test wm-manage-1.6 {managing a button} -setup { set result [list] } -body { toplevel .t button .t.f -text Button wm manage .t.f raise .t.f update lappend result [winfo manage .t.f] lappend result [winfo toplevel .t.f] } -cleanup { deleteWindows } -returnCodes error -result "window \".t.f\" is not manageable: must be a frame, labelframe or toplevel" test wm-manage-1.7 {managing a frame} -setup { set result [list] } -body { toplevel .t frame .t.f pack [label .t.f.l -text Label] pack .t.f update lappend result [winfo manage .t.f] lappend result [winfo toplevel .t.f] wm manage .t.f raise .t.f update lappend result [winfo manage .t.f] lappend result [winfo toplevel .t.f] wm forget .t.f pack .t.f update lappend result [winfo manage .t.f] lappend result [winfo toplevel .t.f] } -cleanup { deleteWindows } -result {pack .t wm .t.f pack .t} test wm-manage-1.8 {unmanaging a toplevel} -setup { set result [list] } -body { toplevel .t toplevel .t.t button .t.t.b -text "Manage This" pack .t.t.b update lappend result [winfo manage .t.t] lappend result [winfo toplevel .t.t.b] wm forget .t.t wm forget .t.t ; # second call should be a no-op pack .t.t update lappend result [winfo manage .t.t] lappend result [winfo toplevel .t.t.b] wm manage .t.t wm manage .t.t ; # second call should be a no-op wm deiconify .t.t update lappend result [winfo manage .t.t] lappend result [winfo toplevel .t.t.b] } -cleanup { deleteWindows } -result {wm .t.t pack .t wm .t.t} test wm-forget-1.1 "bug #2009788: forget toplevel can cause crash" -body { toplevel .parent toplevel .parent.child wm forget .parent.child winfo exists .parent.child } -cleanup { deleteWindows } -result 1 test wm-forget-1.2 "bug #2009788: forget toplevel can cause crash" -body { toplevel .parent update toplevel .parent.child wm forget .parent.child winfo exists .parent.child } -cleanup { deleteWindows } -result 1 test wm-forget-1.3 "bug #2009788: forget toplevel can cause crash" -body { toplevel .parent toplevel .parent.child wm forget .parent.child wm manage .parent.child winfo exists .parent.child } -cleanup { deleteWindows } -result 1 test wm-forget-1.4 "pack into unmapped toplevel causes crash" -body { toplevel .parent toplevel .parent.child wm forget .parent.child pack [button .parent.child.button -text Hello] after 250 {destroy .parent} tkwait window .parent } -cleanup { deleteWindows } -result {} test wm-forget-2 {bug [e9112ef96e] - [wm forget] doesn't completely} -setup { catch {destroy .l .f.b .f} set res {} } -body { label .l -text "Top Dot" frame .f button .f.b -text Hello -command "puts Hello!" pack .l -side top pack .f.b pack .f -side bottom set res [winfo manager .f] pack forget .f update lappend res [winfo manager .f] wm manage .f update lappend res [winfo manager .f] wm forget .f update lappend res [winfo manager .f] } -cleanup { destroy .l .f.b .f unset res } -result {pack {} wm {}} # FIXME: # Test delivery of virtual events to the WM. We could check to see if the # window was raised after a button click for example. This sort of testing may # not be possible. ############################################################################## deleteWindows cleanupTests catch {unset results} catch {unset focusin} return # Local variables: # mode: tcl # End: tk8.6.14/tests/winWm.test0000644003604700454610000003572614554262361013737 0ustar dgp771div# This file tests is a Tcl script to test the procedures in the file # tkWinWm.c. It is organized in the standard fashion for Tcl tests. # # This file contains a collection of tests for one or more of the Tcl # built-in commands. Sourcing this file into Tcl runs the tests and # generates output for errors. No output means no errors were found. # # Copyright (c) 1996 by Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. package require tcltest 2.2 namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }] test winWm-1.1 {TkWmMapWindow} -constraints win -setup { destroy .t } -body { toplevel .t wm override .t 1 wm geometry .t +0+0 update list [winfo rootx .t] [winfo rooty .t] } -cleanup { destroy .t } -result {0 0} test winWm-1.2 {TkWmMapWindow} -constraints win -setup { destroy .t } -body { toplevel .t wm transient .t . update wm iconify . update wm deiconify . update wm iconify .t } -cleanup { destroy .t } -returnCodes error -result {can't iconify ".t": it is a transient} test winWm-1.3 {TkWmMapWindow} -constraints win -setup { destroy .t } -body { toplevel .t update toplevel .t2 update expr {[winfo x .t] != [winfo x .t2]} } -cleanup { destroy .t .t2 } -result 1 test winWm-1.4 {TkWmMapWindow} -constraints win -setup { destroy .t } -body { toplevel .t wm geometry .t +10+10 update toplevel .t2 wm geometry .t2 +40+10 update list [winfo x .t] [winfo x .t2] } -cleanup { destroy .t .t2 } -result {10 40} test winWm-1.5 {TkWmMapWindow} -constraints win -setup { destroy .t } -body { toplevel .t wm iconify .t update wm state .t } -result {iconic} test winWm-2.1 {TkpWmSetState} -constraints win -setup { destroy .t } -body { toplevel .t wm geometry .t 150x50+10+10 update set result [wm state .t] wm iconify .t update lappend result [wm state .t] wm deiconify .t update lappend result [wm state .t] } -cleanup { destroy .t } -result {normal iconic normal} test winWm-2.2 {TkpWmSetState} -constraints win -setup { destroy .t } -body { toplevel .t wm geometry .t 150x50+10+10 update set result [wm state .t] wm withdraw .t update lappend result [wm state .t] wm iconify .t update lappend result [wm state .t] wm deiconify .t update lappend result [wm state .t] } -cleanup { destroy .t } -result {normal withdrawn iconic normal} test winWm-2.3 {TkpWmSetState} -constraints win -setup { destroy .t } -body { toplevel .t wm geometry .t 150x50+10+10 update set result [wm state .t] wm state .t withdrawn update lappend result [wm state .t] wm state .t iconic update lappend result [wm state .t] wm state .t normal update lappend result [wm state .t] } -cleanup { destroy .t } -result {normal withdrawn iconic normal} test winWm-2.4 {TkpWmSetState} -constraints win -setup { destroy .t set result {} } -body { toplevel .t wm geometry .t 150x50+10+10 update lappend result [list [wm state .t] [wm geometry .t]] wm iconify .t update lappend result [list [wm state .t] [wm geometry .t]] wm geometry .t 200x50+10+10 update lappend result [list [wm state .t] [wm geometry .t]] wm deiconify .t update lappend result [list [wm state .t] [wm geometry .t]] } -cleanup { destroy .t } -result {{normal 150x50+10+10} {iconic 150x50+10+10} {iconic 150x50+10+10} {normal 200x50+10+10}} test winWm-3.1 {ConfigureTopLevel: window geometry propagation} -constraints { win } -setup { destroy .t } -body { toplevel .t wm geometry .t +0+0 button .t.b pack .t.b update set x [winfo x .t.b] destroy .t toplevel .t wm geometry .t +0+0 button .t.b update pack .t.b update expr {$x == [winfo x .t.b]} } -cleanup { destroy .t } -result 1 test winWm-4.1 {ConfigureTopLevel: menu resizing} -constraints win -setup { destroy .t } -body { toplevel .t frame .t.f -width 100 -height 50 pack .t.f menu .t.m .t.m add command -label "thisisreallylong" .t configure -menu .t.m wm geometry .t -0-0 update set menuheight [winfo y .t] .t.m add command -label "thisisreallylong" wm geometry .t -0-0 update set menuheight [expr {$menuheight - [winfo y .t]}] destroy .t toplevel .t frame .t.f -width 150 -height 50 -background red pack .t.f wm geometry .t -0-0 update set y [winfo y .t] menu .t.m .t.m add command -label foo .t configure -menu .t.m update expr {$y - [winfo y .t] eq $menuheight + 1} } -cleanup { destroy .t } -result 1 # This test works on 8.0p2 but has not worked on anything since 8.2. # It would be very strange to have a windows application increase the size # of the clientarea when a menu wraps so I believe this test to be wrong. # Original result was {50 50 50} new result may depend on the default menu # font test winWm-5.1 {UpdateGeometryInfo: menu resizing} -constraints win -setup { destroy .t set result {} } -body { toplevel .t frame .t.f -width 150 -height 50 -background red pack .t.f update set result [winfo height .t] menu .t.m .t.m add command -label foo .t configure -menu .t.m update lappend result [winfo height .t] .t.m add command -label "thisisreallylong" .t.m add command -label "thisisreallylong" update lappend result [winfo height .t] } -cleanup { destroy .t } -result {50 50 31} test winWm-5.2 {UpdateGeometryInfo: menu resizing} -constraints win -setup { destroy .t } -body { set result {} toplevel .t frame .t.f -width 150 -height 50 -background red pack .t.f wm geometry .t -0-0 update set y [winfo rooty .t] lappend result [winfo height .t] menu .t.m -tearoff 1 .t configure -menu .t.m .t.m add command -label foo .t.m add command -label "thisisreallylong" .t.m add command -label "thisisreallylong" update lappend result [winfo height .t] lappend result [expr {$y - [winfo rooty .t]}] destroy .t return $result } -cleanup { destroy .t } -result {50 50 0} test winWm-6.1 {wm attributes} -constraints win -setup { destroy .t } -body { toplevel .t wm attributes .t } -cleanup { destroy .t } -result {-alpha 1.0 -transparentcolor {} -disabled 0 -fullscreen 0 -toolwindow 0 -topmost 0} test winWm-6.2 {wm attributes} -constraints win -setup { destroy .t } -body { toplevel .t wm attributes .t -disabled } -cleanup { destroy .t } -result 0 test winWm-6.3 {wm attributes} -constraints win -setup { destroy .t } -body { toplevel .t wm attributes .t -foo } -cleanup { destroy .t } -returnCodes error -result {bad attribute "-foo": must be -alpha, -transparentcolor, -disabled, -fullscreen, -toolwindow, or -topmost} test winWm-6.4 {wm attributes -alpha} -constraints win -setup { destroy .t } -body { # Expect this to return all 1.0 {} on pre-2K/XP toplevel .t set res [wm attributes .t -alpha] # we don't return on set yet lappend res [wm attributes .t -alpha 0.5] lappend res [wm attributes .t -alpha] lappend res [wm attributes .t -alpha -100] lappend res [wm attributes .t -alpha] lappend res [wm attributes .t -alpha 100] lappend res [wm attributes .t -alpha] return $res } -cleanup { destroy .t } -result {1.0 {} 0.5 {} 0.0 {} 1.0} test winWm-6.5 {wm attributes -alpha} -constraints win -setup { destroy .t } -body { toplevel .t wm attributes .t -alpha foo } -cleanup { destroy .t } -returnCodes error -result {expected floating-point number but got "foo"} test winWm-6.6 {wm attributes -alpha} -constraints win -setup { destroy .t } -body { # This test is just to show off -alpha toplevel .t wm attributes .t -alpha 0.2 pack [label .t.l -text "Alpha Toplevel" -font "Helvetica 18 bold"] tk::PlaceWindow .t center update if {$::tcl_platform(osVersion) >= 5.0} { for {set i 0.2} {$i < 0.99} {set i [expr {$i+0.02}]} { wm attributes .t -alpha $i update idle after 20 } for {set i 0.99} {$i > 0.2} {set i [expr {$i-0.02}]} { wm attributes .t -alpha $i update idle after 20 } } } -cleanup { destroy .t } -result {} test winWm-6.7 {wm attributes -transparentcolor} -constraints win -setup { destroy .t set res {} } -body { # Expect this to return all "" on pre-2K/XP toplevel .t lappend res [wm attributes .t -transparentcolor] # we don't return on set yet lappend res [wm attributes .t -trans black] lappend res [wm attributes .t -trans] lappend res [wm attributes .t -trans "#FFFFFF"] lappend res [wm attributes .t -trans] } -cleanup { destroy .t } -result [list {} {} black {} "#FFFFFF"] test winWm-6.8 {wm attributes -transparentcolor} -constraints win -setup { destroy .t } -body { destroy .t toplevel .t wm attributes .t -tr foo } -cleanup { destroy .t } -returnCodes error -result {unknown color name "foo"} test winWm-7.1 {deiconify on an unmapped toplevel will raise \ the window and set the focus} -constraints { win } -setup { destroy .t } -body { toplevel .t lower .t focus -force . wm deiconify .t update list [wm stackorder .t isabove .] [focus] } -cleanup { destroy .t } -result {1 .t} test winWm-7.2 {deiconify on an already mapped toplevel\ will raise the window and set the focus} -constraints { win } -setup { destroy .t } -body { toplevel .t lower .t update focus -force . wm deiconify .t update list [wm stackorder .t isabove .] [focus] } -cleanup { destroy .t } -result {1 .t} test winWm-7.3 {UpdateWrapper must maintain Z order} -constraints win -setup { destroy .t } -body { destroy .t toplevel .t lower .t update set res [wm stackorder .t isbelow .] wm resizable .t 0 0 update list $res [wm stackorder .t isbelow .] } -cleanup { destroy .t } -result {1 1} test winWm-7.4 {UpdateWrapper must maintain focus} -constraints win -setup { destroy .t } -body { toplevel .t focus -force .t update set res [focus] wm resizable .t 0 0 update list $res [focus] } -cleanup { destroy .t } -result {.t .t} test winWm-8.1 {Tk_WmCmd procedure, "iconphoto" option} -constraints win -body { wm iconph . } -returnCodes error -result {wrong # args: should be "wm iconphoto window ?-default? image1 ?image2 ...?"} test winWm-8.2 {Tk_WmCmd procedure, "iconphoto" option} -constraints win -setup { destroy .t } -body { toplevel .t image create photo blank16 -width 16 -height 16 image create photo blank32 -width 32 -height 32 # This should just make blank icons for the window wm iconphoto .t blank16 blank32 image delete blank16 blank32 } -cleanup { destroy .t } -result {} test winWm-9.0 "Bug #2799589 - delayed activation of destroyed window" -constraints win -setup { proc winwm90click {w} { if {![winfo ismapped $w]} { update } event generate $w focus -force $w event generate $w -x 5 -y 5 event generate $w -x 5 -y 5 } proc winwm90proc3 {} { global winwm90done winwm90check set w .sd toplevel $w pack [button $w.b -text "OK" -command {set winwm90check 1}] bind $w.b {after idle {winwm90click %W}} update idletasks tkwait visibility $w grab $w tkwait variable winwm90check grab release $w destroy $w after idle {set winwm90done ok} } proc winwm90proc2 {w} { winwm90proc3; destroy $w } proc winwm90proc1 {w} { toplevel $w pack [button $w.b -text "Do dialog" -command [list winwm90proc2 $w]] bind $w.b {bind %W {}; after idle {winwm90click %W}} } global winwm90done set winwm90done wait toplevel .t } -body { pack [button .t.b -text "Show" -command {winwm90proc1 .tx}] bind .t.b {bind %W {}; after idle {winwm90click %W}} after 5000 {set winwm90done timeout} vwait winwm90done set winwm90done } -cleanup { foreach cmd {proc1 proc2 proc3 click} { rename winwm90$cmd {} } destroy .tx .t .sd } -result ok test winWm-9.1 "delayed activation of grabbed destroyed window" -constraints win -setup { proc winwm91click {w} { if {![winfo ismapped $w]} { update } event generate $w focus -force $w event generate $w -x 5 -y 5 event generate $w -x 5 -y 5 } proc winwm91proc3 {} { global winwm91done winwm91check set w .sd toplevel $w pack [button $w.b -text "OK" -command {set winwm91check 1}] bind $w.b {after idle {winwm91click %W}} update idletasks tkwait visibility $w grab $w tkwait variable winwm91check #skip the release: #grab release $w destroy $w after idle {set winwm91done ok} } proc winwm91proc2 {w} { winwm91proc3; destroy $w } proc winwm91proc1 {w} { toplevel $w pack [button $w.b -text "Do dialog" -command [list winwm91proc2 $w]] bind $w.b {bind %W {}; after idle {winwm91click %W}} } destroy .t global winwm91done set winwm91done wait toplevel .t } -body { pack [button .t.b -text "Show" -command {winwm91proc1 .tx}] bind .t.b {bind %W {}; after idle {winwm91click %W}} after 5000 {set winwm91done timeout} vwait winwm91done set winwm91done } -cleanup { foreach cmd {proc1 proc2 proc3 click} { rename winwm91$cmd {} } destroy .tx .t .sd } -result ok test winWm-9.2 "check wm forget for unmapped parent (#3205464,#2967911)" -constraints {failsOnUbuntu failsOnXQuarz} -setup { destroy .t toplevel .t set winwm92 {} frame .t.f -background blue -height 200 -width 200 frame .t.f.x -background red -height 100 -width 100 } -body { pack .t.f.x pack .t.f lappend aid [after 5000 {set ::winwm92 timeout}] [after 500 { wm manage .t.f wm iconify .t lappend aid [after 500 { wm forget .t.f wm deiconify .t lappend aid [after 500 { pack .t.f lappend aid [after 500 { set ::winwm92 [expr { [winfo rooty .t.f.x] == 0 ? "failed" : "ok"}]}] }] }] }] vwait ::winwm92 foreach id $aid { after cancel $id } set winwm92 } -cleanup { destroy .t.f.x .t.f .t unset -nocomplain winwm92 aid id } -result ok destroy .t # cleanup cleanupTests return # Local variables: # mode: tcl # End: tk8.6.14/tests/winSend.test0000644003604700454610000003330114554262361014230 0ustar dgp771div# This file is a Tcl script to test out the "send" command and the # other procedures in the file tkSend.c. It is organized in the # standard fashion for Tcl tests. # # Copyright (c) 1994 Sun Microsystems, Inc. # Copyright (c) 1994-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands # Compute a script that will load Tk into a child interpreter. foreach pkg [info loaded] { if {[lindex $pkg 1] == "Tk"} { set loadTk "load $pkg" break } } # Procedure to create a new application with a given name and class. proc newApp {name {safe {}}} { global loadTk if {[string compare $safe "-safe"] == 0} { interp create -safe $name } else { interp create $name } $name eval [list set argv [list -name $name]] catch {eval $loadTk $name} } set currentInterps [winfo interps] if { [testConstraint win] && [llength [info commands send]] && [catch {exec [interpreter] &}] == 0 } then { # Wait until the child application has launched. while {[llength [winfo interps]] == [llength $currentInterps]} {} # Now find an interp to send to set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch -exact $currentInterps $interp] < 0} { break } } # Now we have found our interpreter we are going to send to. # Make sure that it works first. testConstraint winSend [expr {![catch { send $interp { console hide update } }]}] } else { testConstraint winSend 0 } # setting up dde server is done when the first interp is created and # cannot be tested very easily. test winSend-1.1 {Tk_SetAppName - changing name of interp} winSend { newApp testApp list [testApp eval tk appname testApp2] [interp delete testApp] } {testApp2 {}} test winSend-1.2 {Tk_SetAppName - changing name - not front of linked list} winSend { newApp testApp newApp testApp2 list [testApp eval tk appname testApp3] [interp delete testApp] [interp delete testApp2] } {testApp3 {} {}} test winSend-1.3 {Tk_SetAppName - unique name - no conflicts} winSend { newApp testApp list [testApp eval tk appname testApp] [interp delete testApp] } {testApp {}} test winSend-1.4 {Tk_SetAppName - unique name - one conflict} winSend { newApp testApp newApp foobar list [foobar eval tk appname testApp] [interp delete foobar] [interp delete testApp] } {{testApp #2} {} {}} test winSend-1.5 {Tk_SetAppName - unique name - one conflict} winSend { newApp testApp newApp foobar newApp blaz foobar eval tk appname testApp list [blaz eval tk appname testApp] [interp delete foobar] [interp delete testApp] [interp delete blaz] } {{testApp #3} {} {} {}} test winSend-1.6 {Tk_SetAppName - safe interps} winSend { newApp testApp -safe list [catch {testApp eval send testApp {set foo a}} msg] $msg [interp delete testApp] } {1 {invalid command name "send"} {}} test winSend-2.1 {Tk_SendObjCmd - # of args} winSend { list [catch {send tktest} msg] $msg } {1 {wrong # args: should be "send ?-option value ...? interpName arg ?arg ...?"}} test winSend-2.1a {Tk_SendObjCmd: arguments} winSend { list [catch {send -bogus tktest} msg] $msg } {1 {bad option "-bogus": must be -async, -displayof, or --}} test winSend-2.1b {Tk_SendObjCmd: arguments} winSend { list [catch {send -async bogus foo} msg] $msg } {1 {no registered server named "bogus"}} test winSend-2.1c {Tk_SendObjCmd: arguments} winSend { list [catch {send -displayof . bogus foo} msg] $msg } {1 {no registered server named "bogus"}} test winSend-2.1d {Tk_SendObjCmd: arguments} winSend { list [catch {send -- -bogus foo} msg] $msg } {1 {no registered server named "-bogus"}} test winSend-2.2 {Tk_SendObjCmd - sending to ourselves} winSend { list [send [tk appname] {set foo a}] } {a} test winSend-2.3 {Tk_SendObjCmd - sending to ourselves in a different interpreter} winSend { newApp testApp list [catch {send testApp {set foo b}} msg] $msg [interp delete testApp] } {0 b {}} test winSend-2.4 {Tk_SendObjCmd - sending to ourselves in a different interp with errors} winSend { newApp testApp list [catch {send testApp {expr {2 / 0}}} msg] $msg $errorCode $errorInfo [interp delete testApp] } "1 {divide by zero} {ARITH DIVZERO {divide by zero}} {divide by zero\n while executing\n\"expr {2 / 0}\"\n invoked from within\n\"send testApp {expr {2 / 0}}\"} {}" test winSend-2.5 {Tk_SendObjCmd - sending to another app async} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } list [catch {send -async $interp {set foo a}} msg] $msg } {0 {}} test winSend-2.6 {Tk_SendObjCmd - sending to another app sync - no error} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } list [catch {send $interp {set foo a}} msg] $msg } {0 a} test winSend-2.7 {Tk_SendObjCmd - sending to another app - error} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } list [catch {send $interp {expr {2 / 0}}} msg] $msg $errorCode $errorInfo } "1 {divide by zero} {ARITH DIVZERO {divide by zero}} {divide by zero\n while executing\n\"expr {2 / 0}\"\n invoked from within\n\"send \$interp {expr {2 / 0}}\"}" test winSend-3.1 {TkGetInterpNames} winSend { set origLength [llength $currentInterps] set newLength [llength [winfo interps]] expr {($newLength - 2) == $origLength} } 1 test winSend-4.1 {DeleteProc - changing name of app} winSend { newApp a list [a eval tk appname foo] [interp delete a] } {foo {}} test winSend-4.2 {DeleteProc - normal} winSend { newApp a list [interp delete a] } {{}} test winSend-5.1 {ExecuteRemoteObject - no error} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } list [send $interp {send [tk appname] {expr {2 / 1}}}] } 2 test winSend-5.2 {ExecuteRemoteObject - error} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } list [catch {send $interp {send [tk appname] {expr {2 / 0}}}} msg] $msg } {1 {divide by zero}} test winSend-6.1 {SendDDEServer - XTYP_CONNECT} winSend { set foo "Hello, World" set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } set command "dde request Tk [tk appname] foo" list [catch "send \{$interp\} \{$command\}" msg] $msg } {0 {Hello, World}} test winSend-6.2 {SendDDEServer - XTYP_CONNECT_CONFIRM} winSend { set foo "Hello, World" set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } set command "dde request Tk [tk appname] foo" list [catch "send \{$interp\} \{$command\}" msg] $msg } {0 {Hello, World}} test winSend-6.3 {SendDDEServer - XTYP_DISCONNECT} winSend { set foo "Hello, World" set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } set command "dde request Tk [tk appname] foo" list [catch "send \{$interp\} \{$command\}" msg] $msg } {0 {Hello, World}} test winSend-6.4 {SendDDEServer - XTYP_REQUEST variable} winSend { set foo "Hello, World" set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } set command "dde request Tk [tk appname] foo" list [catch "send \{$interp\} \{$command\}" msg] $msg } {0 {Hello, World}} test winSend-6.5 {SendDDEServer - XTYP_REQUEST array} winSend { catch {unset foo} set foo(test) "Hello, World" set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } set command "dde request Tk [tk appname] foo(test)" list [catch "send \{$interp\} \{$command\}" msg] $msg [catch {unset foo}] } {0 {Hello, World} 0} test winSend-6.6 {SendDDEServer - XTYP_REQUEST return results} winSend { set foo 3 set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } set command "send [tk appname] {expr {$foo + 1}}" list [catch "send \{$interp\} \{$command\}" msg] $msg } {0 4} test winSend-6.7 {SendDDEServer - XTYP_EXECUTE} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } set command "send [tk appname] {expr {4 / 2}}" list [catch "send \{$interp\} \{$command\}" msg] $msg } {0 2} test winSend-6.8 {SendDDEServer - XTYP_WILDCONNECT} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } set command "dde services Tk {}" list [catch "send \{$interp\} \{$command\}"] } 0 test winSend-7.1 {DDEExitProc} winSend { newApp testApp list [interp delete testApp] } {{}} test winSend-8.1 {SendDdeConnect} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } list [send $interp {set tk foo}] } {foo} test winSend-9.1 {SetDDEError} winSend { list [catch {dde execute Tk foo {set foo hello}} msg] $msg } {1 {dde command failed}} test winSend-10.1 {Tk_DDEObjCmd - wrong num args} winSend { list [catch {dde} msg] $msg } {1 {wrong # args: should be "dde ?-async? serviceName topicName value"}} test winSend-10.2 {Tk_DDEObjCmd - unknown subcommand} winSend { list [catch {dde foo} msg] $msg } {1 {bad command "foo": must be execute, request, or services}} test winSend-10.3 {Tk_DDEObjCmd - execute - wrong num args} winSend { list [catch {dde execute} msg] $msg } {1 {wrong # args: should be "dde execute ?-async? serviceName topicName value"}} test winSend-10.4 {Tk_DDEObjCmd - execute - wrong num args} winSend { list [catch {dde execute 3 4 5 6 7} msg] $msg } {1 {wrong # args: should be "dde execute ?-async? serviceName topicName value"}} test winSend-10.5 {Tk_DDEObjCmd - execute async - wrong num args} winSend { list [catch {dde execute -async} msg] $msg } {1 {wrong # args: should be "dde execute ?-async? serviceName topicName value"}} test winSend-10.6 {Tk_DDEObjCmd - request - wrong num args} winSend { list [catch {dde request} msg] $msg } {1 {wrong # args: should be "dde request serviceName topicName value"}} test winSend-10.7 {Tk_DDEObjCmd - services wrong num args} winSend { list [catch {dde services} msg] $msg } {1 {wrong # args: should be "dde services serviceName topicName"}} test winSend-10.8 {Tk_DDEObjCmd - null service name} winSend { list [catch {dde services {} {tktest #2}}] } 0 test winSend-10.9 {Tk_DDEObjCmd - null topic name} winSend { list [catch {dde services {Tk} {}}] } 0 test winSend-10.10 {Tk_DDEObjCmd - execute - nothing to execute} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } list [catch {dde execute Tk $interp {}} msg] $msg } {1 {cannot execute null data}} test winSend-10.11 {Tk_DDEObjCmd - execute - no such conversation} winSend { list [catch {dde execute Tk foo {set foo hello}} msg] $msg } {1 {dde command failed}} test winSend-10.12 {Tk_DDEObjCmd - execute - async} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } list [catch {dde execute -async Tk $interp {set foo hello}} msg] $msg } {0 {}} test winSend-10.13 {Tk_DDEObjCmd - execute} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } list [catch {dde execute Tk $interp {set foo goodbye}} msg] $msg } {0 {}} test winSend-10.14 {Tk_DDEObjCmd - request - nothing to request} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } list [catch {dde request Tk $interp {}} msg] $msg } {1 {cannot request value of null data}} test winSend-10.15 {Tk_DDEObjCmd - request - invalid interp} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } list [catch {dde request Tk foo foo} msg] $msg } {1 {dde command failed}} test winSend-10.16 {Tk_DDEObjCmd - invalid variable} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } send $interp {unset foo} list [catch {dde request Tk $interp foo} msg] $msg } {1 {remote server cannot handle this command}} test winSend-10.17 {Tk_DDEObjCmd - valid variable} winSend { set newInterps [winfo interps] foreach interp $newInterps { if {[lsearch $currentInterps $interp] < 0} { break } } send $interp {set foo winSend-10.17} list [catch {dde request Tk $interp foo} msg] $msg } {0 winSend-10.17} test winSend-10.18 {Tk_DDEObjCmd - services} winSend { set currentService [list Tk [tk appname]] list [catch {dde services Tk {}} msg] [expr {[lsearch $msg $currentService] >= 0}] } {0 1} # Get rid of the other app and all of its interps set newInterps [winfo interps] while {[llength $newInterps] != [llength $currentInterps]} { foreach interp $newInterps { if {[lsearch -exact $currentInterps $interp] < 0} { catch {send $interp exit} set newInterps [winfo interps] break } } } # cleanup cleanupTests return tk8.6.14/tests/winMsgbox.test0000644003604700454610000002176114554262361014605 0ustar dgp771div# This file is a Tcl script to test the Windows specific message box # # Copyright (c) 2007 Pat Thoyts package require tcltest 2.2 namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands testConstraint getwindowinfo [expr {[llength [info command ::testgetwindowinfo]] > 0}] if {[testConstraint testwinevent]} { catch {testwinevent debug 1} } proc Click {hwnd button} { testwinevent $hwnd $button WM_COMMAND } proc GetWindowInfo {title button} { global windowInfo set windowInfo {} set hwnd [testfindwindow $title "#32770"] set windowInfo [testgetwindowinfo $hwnd] array set a $windowInfo set childinfo {} ; set childtext "" foreach child $a(children) { lappend childinfo $child [set info [testgetwindowinfo $child]] array set ca $info if {$ca(class) eq "Static"} { append childtext $ca(text) } } set a(children) $childinfo set a(childtext) $childtext set windowInfo [array get a] testwinevent $hwnd $button WM_COMMAND } # ------------------------------------------------------------------------- test winMsgbox-1.1 {tk_messageBox ok} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.0 [pid]" after 100 [list GetWindowInfo $title 2] tk_messageBox -icon info -type ok -title $title -message Message } -cleanup { wm deiconify . } -result {ok} test winMsgbox-1.2 {tk_messageBox okcancel} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.1 [pid]" after 100 [list GetWindowInfo $title 1] tk_messageBox -icon info -type okcancel -title $title -message Message } -cleanup { wm deiconify . } -result {ok} test winMsgbox-1.3 {tk_messageBox okcancel} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.2 [pid]" after 100 [list GetWindowInfo $title 2] tk_messageBox -icon info -type okcancel -title $title -message Message } -cleanup { wm deiconify . } -result {cancel} test winMsgbox-1.4 {tk_messageBox yesno} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.3 [pid]" after 100 [list GetWindowInfo $title 6] tk_messageBox -icon info -type yesno -title $title -message Message } -cleanup { wm deiconify . } -result {yes} test winMsgbox-1.5 {tk_messageBox yesno} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.4 [pid]" after 100 [list GetWindowInfo $title 7] tk_messageBox -icon info -type yesno -title $title -message Message } -cleanup { wm deiconify . } -result {no} test winMsgbox-1.6 {tk_messageBox abortretryignore} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.5 [pid]" after 100 [list GetWindowInfo $title 3] tk_messageBox -icon info -type abortretryignore -title $title -message Message } -cleanup { wm deiconify . } -result {abort} test winMsgbox-1.7 {tk_messageBox abortretryignore} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.6 [pid]" after 100 [list GetWindowInfo $title 4] tk_messageBox -icon info -type abortretryignore -title $title -message Message } -cleanup { wm deiconify . } -result {retry} test winMsgbox-1.8 {tk_messageBox abortretryignore} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.7 [pid]" after 100 [list GetWindowInfo $title 5] tk_messageBox -icon info -type abortretryignore -title $title -message Message } -cleanup { wm deiconify . } -result {ignore} test winMsgbox-1.9 {tk_messageBox retrycancel} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.8 [pid]" after 100 [list GetWindowInfo $title 4] tk_messageBox -icon info -type retrycancel -title $title -message Message } -cleanup { wm deiconify . } -result {retry} test winMsgbox-1.10 {tk_messageBox retrycancel} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.9 [pid]" after 100 [list GetWindowInfo $title 2] tk_messageBox -icon info -type retrycancel -title $title -message Message } -cleanup { wm deiconify . } -result {cancel} test winMsgbox-1.11 {tk_messageBox yesnocancel} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.10 [pid]" after 100 [list GetWindowInfo $title 6] tk_messageBox -icon info -type yesnocancel -title $title -message Message } -cleanup { wm deiconify . } -result {yes} test winMsgbox-1.12 {tk_messageBox yesnocancel} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.11 [pid]" after 100 [list GetWindowInfo $title 7] tk_messageBox -icon info -type yesnocancel -title $title -message Message } -cleanup { wm deiconify . } -result {no} test winMsgbox-1.13 {tk_messageBox yesnocancel} -constraints {win getwindowinfo} -setup { wm iconify . } -body { global windowInfo set title "winMsgbox-1.12 [pid]" after 100 [list GetWindowInfo $title 2] tk_messageBox -icon info -type yesnocancel -title $title -message Message } -cleanup { wm deiconify . } -result {cancel} # ------------------------------------------------------------------------- test winMsgbox-2.1 {tk_messageBox message} -constraints {win getwindowinfo} -setup { wm iconify . unset -nocomplain info } -body { global windowInfo set title "winMsgbox-2.0 [pid]" set message "message" after 100 [list GetWindowInfo $title 2] set r [tk_messageBox -type ok -title $title -message $message] array set info $windowInfo lappend r $info(childtext) } -cleanup { wm deiconify . } -result [list ok "message"] test winMsgbox-2.2 {tk_messageBox message (long)} -constraints { win getwindowinfo } -setup { wm iconify . unset -nocomplain info } -body { global windowInfo set title "winMsgbox-2.1 [pid]" set message [string repeat Ab 80] after 100 [list GetWindowInfo $title 2] set r [tk_messageBox -type ok -title $title -message $message] array set info $windowInfo lappend r $info(childtext) } -cleanup { wm deiconify . } -result [list ok [string repeat Ab 80]] test winMsgbox-2.3 {tk_messageBox message (unicode)} -constraints { win getwindowinfo } -setup { wm iconify . unset -nocomplain info } -body { global windowInfo set title "winMsgbox-2.2 [pid]" set message "\u041f\u043e\u0438\u0441\u043a\u0020\u0441\u0442\u0440\u0430\u043d\u0438\u0446" after 100 [list GetWindowInfo $title 2] set r [tk_messageBox -type ok -title $title -message $message] array set info $windowInfo lappend r $info(childtext) } -cleanup { wm deiconify . } -result [list ok "\u041f\u043e\u0438\u0441\u043a\u0020\u0441\u0442\u0440\u0430\u043d\u0438\u0446"] test winMsgbox-2.4 {tk_messageBox message (empty)} -constraints { win getwindowinfo } -setup { wm iconify . unset -nocomplain info } -body { global windowInfo set title "winMsgbox-2.3 [pid]" after 100 [list GetWindowInfo $title 2] set r [tk_messageBox -type ok -title $title] array set info $windowInfo lappend r $info(childtext) } -cleanup { wm deiconify . } -result [list ok ""] # ------------------------------------------------------------------------- test winMsgbox-3.1 {tk_messageBox detail (sourceforge bug #1692927)} -constraints { win getwindowinfo } -setup { wm iconify . unset -nocomplain info } -body { global windowInfo set title "winMsgbox-3.0 [pid]" after 100 [list GetWindowInfo $title 2] set r [tk_messageBox -type ok -title $title \ -message Hello -detail "Pleased to meet you"] array set info $windowInfo lappend r $info(childtext) } -cleanup { wm deiconify . } -result [list ok "Hello\n\nPleased to meet you"] test winMsgbox-3.2 {tk_messageBox detail (unicode)} -constraints { win getwindowinfo } -setup { wm iconify . unset -nocomplain info } -body { global windowInfo set title "winMsgbox-3.1 [pid]" set message "\u041f\u043e\u0438\u0441\u043a" set detail "\u0441\u0442\u0440\u0430\u043d\u0438\u0446" after 100 [list GetWindowInfo $title 2] set r [tk_messageBox -type ok -title $title -message $message -detail $detail] array set info $windowInfo lappend r $info(childtext) } -cleanup { wm deiconify . } -result [list ok "\u041f\u043e\u0438\u0441\u043a\n\n\u0441\u0442\u0440\u0430\u043d\u0438\u0446"] # ------------------------------------------------------------------------- if {[testConstraint testwinevent]} { catch {testwinevent debug 0} } cleanupTests return # Local variables: # mode: tcl # indent-tabs-mode: nil # End: tk8.6.14/tests/winMenu.test0000644003604700454610000011443314554262361014251 0ustar dgp771div# This file is a Tcl script to test menus in Tk. It is # organized in the standard fashion for Tcl tests. This # file tests the Macintosh-specific features of the menu # system. # # Copyright (c) 1995-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. package require tcltest 2.2 namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands test winMenu-1.1 {GetNewID} -constraints win -setup { destroy .m1 } -body { menu .m1 } -cleanup { destroy .m1 } -returnCodes ok -result {.m1} test winMenu-1.2 {GetNewID} -constraints win -setup { destroy .m1 } -body { menu .m1 destroy .m1 } -result {} # Basically impossible to test menu IDs wrapping. test winMenu-2.1 {FreeID} -constraints win -setup { destroy .m1 } -body { menu .m1 destroy .m1 } -returnCodes ok test winMenu-3.1 {TkpNewMenu} -constraints win -setup { destroy .m1 } -body { list [catch {menu .m1} msg] $msg [catch {destroy .m1} msg2] $msg2 } -result {0 .m1 0 {}} test winMenu-3.2 {TkpNewMenu} -constraints win -setup { destroy .m1 } -body { . configure -menu "" menu .m1 .m1 add command -label "foo" list [catch {. configure -menu .m1} msg] $msg [. configure -menu ""] [catch {destroy .m1} msg2] $msg2 } -result {0 {} {} 0 {}} test winMenu-4.1 {TkpDestroyMenu} -constraints win -setup { destroy .m1 } -body { menu .m1 destroy .m1 } -returnCodes ok test winMenu-4.2 {TkpDestroyMenu - help menu} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add cascade -menu .m1.system . configure -menu .m1 list [catch {destroy .m1.system} msg] $msg [. configure -menu ""] [destroy .m1] } -result {0 {} {} {}} test winMenu-5.1 {TkpDestroyMenuEntry} -constraints win -setup { destroy .m1 } -body { . configure -menu "" menu .m1 .m1 add command -label "test" update idletasks list [catch {.m1 delete 1} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.1 {GetEntryText} -constraints win -setup { destroy .m1 } -body { list [catch {menu .m1} msg] $msg [destroy .m1] } -result {0 .m1 {}} test winMenu-6.2 {GetEntryText} -constraints { testImageType win } -setup { destroy .m1 } -body { catch {image delete image1} menu .m1 image create test image1 list [catch {.m1 add command -image image1} msg] $msg [destroy .m1] [image delete image1] } -result {0 {} {} {}} test winMenu-6.3 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -bitmap questhead} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.4 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.5 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -label "foo"} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.6 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -label "This string has one & in it"} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.7 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -label "The & should be underlined." -underline 4} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.8 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -label "The * should be underlined." -underline 4} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.9 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -label "foo" -accel "bar"} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.10 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -label "This string has one & in it" -accel "bar"} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.11 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -label "The & should be underlined." -underline 4 -accel "bar"} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.12 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -label "The * should be underlined." -underline 4 -accel "bar"} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.13 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -label "foo" -accel "&bar"} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.14 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -label "This string has one & in it" -accel "&bar"} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.15 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -label "The & should be underlined." -underline 4 -accel "&bar"} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-6.16 {GetEntryText} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command -label "The * should be underlined." -underline 4 -accel "&bar"} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.1 {ReconfigureWindowsMenu - system menu item removal} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add cascade -menu .m1.system menu .m1.system .m1.system add command -label foo update idletasks .m1.system add command -label bar list [catch {update idletasks} msg] $msg [. configure -menu ""] [destroy .m1] } -result {0 {} {} {}} test winMenu-7.2 {ReconfigureWindowsMenu - menu item removal} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label Hello update idletasks .m1 add command -label foo list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.3 {ReconfigureWindowsMenu - zero items} -constraints win -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add command -label Hello .m1 delete Hello list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.4 {ReconfigureWindowsMenu - one item} -constraints win -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add command -label Hello list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.5 {ReconfigureWindowsMenu - two items} -constraints win -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add command -label One .m1 add command -label Two list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.6 {ReconfigureWindowsMenu - separator item} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add separator list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.7 {ReconfigureWindowsMenu - non-text item} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add command -label Hello list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.8 {ReconfigureWindowsMenu - disabled item} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add command -label Hello -state disabled list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.9 {ReconfigureWindowsMenu - non-selected checkbutton} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add checkbutton -label Hello list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.10 {ReconfigureWindowsMenu - non-selected radiobutton} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add radiobutton -label Hello list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.11 {ReconfigureWindowsMenu - selected checkbutton} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add checkbutton -label Hello .m1 invoke Hello list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.12 {ReconfigureWindowsMenu - selected radiobutton} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add radiobutton -label Hello .m1 invoke Hello list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.13 {ReconfigureWindowsMenu - cascade missing} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add cascade -label Hello list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-7.14 {ReconfigureWindowsMenu - cascade} -constraints win -setup { destroy .m1 } -body { catch {destroy .m2} menu .m1 -tearoff 0 menu .m2 .m1 add cascade -menu .m2 -label Hello list [catch {update idletasks} msg] $msg [destroy .m1] [destroy .m2] } -result {0 {} {} {}} test winMenu-7.15 {ReconfigureWindowsMenu - menubar without system menu} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add cascade -menu .m1.file menu .m1.file -tearoff 0 . configure -menu .m1 list [catch {update idletasks} msg] $msg [. configure -menu ""] [destroy .m1] } -result {0 {} {} {}} test winMenu-7.16 {ReconfigureWindowsMenu - system menu already created} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add cascade -menu .m1.system menu .m1.system -tearoff 0 . configure -menu .m1 update idletasks .m1.system add command -label Hello list [catch {update idletasks} msg] $msg [. configure -menu ""] [destroy .m1] } -result {0 {} {} {}} test winMenu-7.17 {ReconfigureWindowsMenu - system menu update pending} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add cascade -menu .m1.system menu .m1.system -tearoff 0 . configure -menu .m1 list [catch {update idletasks} msg] $msg [. configure -menu ""] [destroy .m1] } -result {0 {} {} {}} test winMenu-7.18 {ReconfigureWindowsMenu - system menu update not pending} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add cascade -menu .m1.system menu .m1.system -tearoff 0 .m1.system add command -label Hello update idletasks . configure -menu .m1 list [catch {update idletasks} msg] $msg [. configure -menu ""] [destroy .m1] } -result {0 {} {} {}} test winMenu-7.19 {ReconfigureWindowsMenu - column break} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add command -label one .m1 add command -label two -columnbreak 1 list [catch {update idletasks} msg] $msg [destroy .m1] } -result {0 {} {}} #Don't know how to generate nested post menus test winMenu-8.1 {TkpPostMenu} -constraints win -setup { destroy .m1 } -body { menu .m1 -postcommand "blork" .m1 post 40 40 } -returnCodes error -result {invalid command name "blork"} test winMenu-8.2 {TkpPostMenu} -constraints win -setup { destroy .m1 } -body { menu .m1 -postcommand "blork" .m1 post 40 40 destroy .m1 } -returnCodes error -result {invalid command name "blork"} test winMenu-8.3 {TkpPostMenu} -constraints win -setup { destroy .m1 } -body { menu .m1 -postcommand "destroy .m1" list [.m1 post 40 40] [winfo exists .m1] } -result {{} 0} test winMenu-8.4 {TkpPostMenu - popup menu} -constraints { win userInteraction } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "winMenu-8.3: Hit ESCAPE." list [.m1 post 40 40] [destroy .m1] } -result {{} {}} test winMenu-8.5 {TkpPostMenu - menu button} -constraints { win userInteraction } -setup { destroy .mb } -body { menubutton .mb -text test -menu .mb.menu menu .mb.menu .mb.menu add command -label "winMenu-8.4 - Hit ESCAPE." pack .mb list [tk::MbPost .mb] [destroy .mb] } -result {{} {}} test winMenu-8.6 {TkpPostMenu - update not pending} -constraints { win userInteraction } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "winMenu-8.5 - Hit ESCAPE." update idletasks list [catch {.m1 post 40 40} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-9.1 {TkpMenuNewEntry} -constraints win -setup { destroy .m1 } -body { menu .m1 list [catch {.m1 add command} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-10.1 {TkwinMenuProc} -constraints { win userInteraction } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "winMenu-10.1: Hit ESCAPE." list [.m1 post 40 40] [destroy .m1] } -result {{} {}} # Can't generate a WM_INITMENU without a Tk menu yet. test winMenu-11.1 {TkWinHandleMenuEvent - WM_INITMENU} -constraints { win userInteraction } -setup { destroy .m1 } -body { catch {unset foo} menu .m1 -postcommand "set foo test" .m1 add command -label "winMenu-11.1: Hit ESCAPE." list [.m1 post 40 40] [set foo] [unset foo] [destroy .m1] } -result {test test {} {}} test winMenu-11.2 {TkWinHandleMenuEvent - WM_COMMAND} -constraints { win userInteraction } -setup { destroy .m1 } -body { catch {unset foo} menu .m1 .m1 add checkbutton -variable foo -label "winMenu-11.2: Please select this menu item." list [.m1 post 40 40] [update] [set foo] [unset foo] [destroy .m1] } -result {{} {} 1 {} {}} test winMenu-11.3 {TkWinHandleMenuEvent - WM_COMMAND} -constraints { win userInteraction } -setup { destroy .m1 } -body { catch {unset foo} proc bgerror {args} { global foo errorInfo set foo [list $args $errorInfo] } menu .m1 .m1 add command -command {error 1} -label "winMenu-11.2: Please select this menu item." list [.m1 post 40 40] [update] [set foo] [unset foo] [destroy .m1] } -result {{} {} {1 {1 while executing "error 1" (menu invoke)}} {} {}} # Can't test WM_MENUCHAR test winMenu-11.4 {TkWinHandleMenuEvent - WM_MEASUREITEM} -constraints { win userInteraction } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "winMenu-11.3: Hit ESCAPE." list [.m1 post 40 40] [destroy .m1] } -result {{} {}} test winMenu-11.5 {TkWinHandleMenuEvent - WM_MEASUREITEM} -constraints { win userInteraction } -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label "winMenu-11.4: Hit ESCAPE" -hidemargin 1 list [.m1 post 40 40] [destroy .m1] } -result {{} {}} test winMenu-11.6 {TkWinHandleMenuEvent - WM_DRAWITEM} -constraints { win userInteraction } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "winMenu-11.5: Hit ESCAPE." list [.m1 post 40 40] [destroy .m1] } -result {{} {}} test winMenu-11.7 {TkWinHandleMenuEvent - WM_DRAWITEM - item disabled} -constraints { win userInteraction } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "winMenu-11.6: Hit ESCAPE." -state disabled list [.m1 post 40 40] [destroy .m1] } -result {{} {}} test winMenu-11.8 {TkWinHandleMenuEvent - WM_INITMENU - not pending} -constraints { win userInteraction } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add command -label "winMenu-11.7: Hit ESCAPE" update idletasks list [catch {.m1 post 40 40} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-12.1 {TkpSetWindowMenuBar} -constraints win -setup { destroy .m1 } -body { . configure -menu "" menu .m1 .m1 add command -label foo list [catch {. configure -menu .m1} msg] $msg [. configure -menu ""] [catch {destroy .m1} msg2] $msg2 } -result {0 {} {} 0 {}} test winMenu-12.2 {TkpSetWindowMenuBar} -constraints win -setup { destroy .m1 } -body { . configure -menu "" menu .m1 .m1 add command -label foo . configure -menu .m1 list [catch {. configure -menu ""} msg] $msg [catch {destroy .m1} msg2] $msg2 } -result {0 {} 0 {}} test winMenu-12.3 {TkpSetWindowMenuBar - no update pending} -constraints { win } -setup { destroy .m1 } -body { . configure -menu "" menu .m1 -tearoff 0 .m1 add command -label foo update idletasks list [catch {. configure -menu .m1} msg] $msg [. configure -menu ""] [destroy .m1] } -result {0 {} {} {}} test winMenu-13.1 {TkpSetMainMenubar - nothing to do} -constraints { emptyTest win } -body {} test winMenu-14.1 {GetMenuIndicatorGeometry} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label foo tk::TearOffMenu .m1 40 40 destroy .m1 } -returnCodes ok test winMenu-14.2 {GetMenuIndicatorGeometry} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label foo -hidemargin 1 tk::TearOffMenu .m1 40 40 destroy .m1 } -returnCodes ok test winMenu-15.1 {GetMenuAccelGeometry} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add cascade -label foo -accel Ctrl+U tk::TearOffMenu .m1 40 40 destroy .m1 } -returnCodes ok test winMenu-15.2 {GetMenuAccelGeometry} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo tk::TearOffMenu .m1 40 40 destroy .m1 } -returnCodes ok test winMenu-15.3 {GetMenuAccelGeometry} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo -accel "Ctrl+U" tk::TearOffMenu .m1 40 40 destroy .m1 } -returnCodes ok test winMenu-16.1 {GetTearoffEntryGeometry} -constraints { win userInteraction } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "winMenu-19.1: Hit ESCAPE." list [.m1 post 40 40] [destroy .m1] } -result {{} {}} test winMenu-17.1 {GetMenuSeparatorGeometry} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add separator tk::TearOffMenu .m1 40 40 destroy .m1 } -returnCodes ok # Currently, the only callers to DrawWindowsSystemBitmap want things # centered vertically, and either centered or right aligned horizontally. test winMenu-18.1 {DrawWindowsSystemBitmap - center aligned} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label foo .m1 invoke foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-18.2 {DrawWindowsSystemBitmap - right aligned} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add cascade -label foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-19.1 {DrawMenuEntryIndicator - not checkbutton or radiobutton} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-19.2 {DrawMenuEntryIndicator - not selected} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-19.3 {DrawMenuEntryIndicator - checkbutton} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label foo .m1 invoke foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-19.4 {DrawMenuEntryIndicator - radiobutton} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add radiobutton -label foo .m1 invoke foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-19.5 {DrawMenuEntryIndicator - disabled} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label foo .m1 invoke foo .m1 entryconfigure foo -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-19.6 {DrawMenuEntryIndicator - indicator not on} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label foo -indicatoron 0 .m1 invoke foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-20.1 {DrawMenuEntryAccelerator - disabled} -constraints win -setup { destroy .m1 } -body { menu .m1 -disabledforeground 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 { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo -accel "Ctrl+U" set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-20.3 {DrawMenuEntryAccelerator - disabled, no disabledforeground} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -disabledforeground "" .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 { win } -setup { destroy .m1 } -body { menu .m1 .m1 add cascade -label foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-20.5 {DrawMenuEntryAccelerator - cascade, drawArrow false} -constraints { win userInteraction } -setup { destroy .m1 } -body { menu .m1 .m1 add cascade -label "winMenu-23.5: Hit ESCAPE." list [.m1 post 40 40] [destroy .m1] } -result {{} {}} test winMenu-21.1 {DrawMenuSeparator} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add separator set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-22.1 {DrawMenuUnderline} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo -underline 0 set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-23.1 {Don't know how to test MenuKeyBindProc} -constraints { win emptyTest } -body {} test winMenu-24.1 {TkpInitializeMenuBindings called at boot time} -constraints { win emptyTest } -body {} test winMenu-25.1 {DrawMenuEntryLabel - normal} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-25.2 {DrawMenuEntryLabel - disabled with fg} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -disabledforeground 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 "" .m1 add command -label foo -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-26.1 {TkpComputeMenubarGeometry} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add cascade -label File list [. configure -menu .m1] [. configure -menu ""] [destroy .m1] } -result {{} {} {}} test winMenu-27.1 {DrawTearoffEntry} -constraints { win userInteraction } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "winMenu-24.4: Hit ESCAPE." list [.m1 post 40 40] [destroy .m1] } -result {{} {}} test winMenu-28.1 {TkpConfigureMenuEntry - update pending} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add command -label Hello list [catch {.m1 add command -label Two} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-28.2 {TkpConfigureMenuEntry - update not pending} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add command -label One update idletasks list [catch {.m1 add command -label Two} msg] $msg [destroy .m1] } -result {0 {} {}} test winMenu-29.1 {TkpDrawMenuEntry - gc for active and not strict motif} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } -result {{} {}} test winMenu-29.2 {TkpDrawMenuEntry - gc for active menu item with its own gc} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo -activeforeground red set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } -result {{} {}} test winMenu-29.3 {TkpDrawMenuEntry - gc for active and strict motif} -constraints { win } -setup { destroy .m1 } -body { menu .m1 set tk_strictMotif 1 .m1 add command -label foo set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] [set tk_strictMotif 0] } -result {{} {} 0} test winMenu-29.4 {TkpDrawMenuEntry - gc for disabled with disabledfg and custom entry} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -disabledforeground blue .m1 add command -label foo -state disabled -background red set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.5 {TkpDrawMenuEntry - gc for disabled with disabledFg} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -disabledforeground blue .m1 add command -label foo -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.6 {TkpDrawMenuEntry - gc for disabled - no disabledFg} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -disabledforeground "" .m1 add command -label foo -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.7 {TkpDrawMenuEntry - gc for normal - custom entry} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo -foreground red set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.8 {TkpDrawMenuEntry - gc for normal} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.9 {TkpDrawMenuEntry - gc for indicator - custom entry} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label foo -selectcolor orange .m1 invoke 1 set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.10 {TkpDrawMenuEntry - gc for indicator} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label foo .m1 invoke 1 set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.11 {TkpDrawMenuEntry - border - custom entry} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo -activebackground green set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } -result {{} {}} test winMenu-29.12 {TkpDrawMenuEntry - border} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } -result {{} {}} test winMenu-29.13 {TkpDrawMenuEntry - active border - strict motif} -constraints { win } -setup { destroy .m1 } -body { set tk_strictMotif 1 menu .m1 .m1 add command -label foo set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] [set tk_strictMotif 0] } -result {{} {} 0} test winMenu-29.14 {TkpDrawMenuEntry - active border - custom entry} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo -activeforeground yellow set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } -result {{} {}} test winMenu-29.15 {TkpDrawMenuEntry - active border} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } -result {{} {}} test winMenu-29.16 {TkpDrawMenuEntry - font - custom entry} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo -font "Helvectica 72" set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.17 {TkpDrawMenuEntry - font} -constraints win -setup { destroy .m1 } -body { menu .m1 -font "Courier 72" .m1 add command -label foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.18 {TkpDrawMenuEntry - separator} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add separator set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.19 {TkpDrawMenuEntry - standard} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.20 {TkpDrawMenuEntry - disabled cascade item} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add cascade -label File -menu .m1.file menu .m1.file .m1.file add command -label foo .m1 entryconfigure File -state disabled set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.21 {TkpDrawMenuEntry - indicator} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label winMenu-31.20 .m1 invoke winMenu-31.20 set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-29.22 {TkpDrawMenuEntry - indicator} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label winMenu-31.21 -hidemargin 1 .m1 invoke winMenu-31.21 set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-30.1 {GetMenuLabelGeometry - image} -constraints { testImageType win } -setup { destroy .m1 catch {image delete image1} } -body { menu .m1 image create test image1 .m1 add command -image image1 list [update idletasks] [destroy .m1] [image delete image1] } -result {{} {} {}} test winMenu-30.2 {GetMenuLabelGeometry - bitmap} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command -bitmap questhead list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-30.3 {GetMenuLabelGeometry - no text} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-30.4 {GetMenuLabelGeometry - text} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "This is a test." list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-31.1 {DrawMenuEntryBackground} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } -result {{} {}} test winMenu-31.2 {DrawMenuEntryBackground} -constraints win -setup { destroy .m1 } -body { menu .m1 .m1 add command -label foo set tearoff [tk::TearOffMenu .m1 40 40] $tearoff activate 0 list [update] [destroy .m1] } -result {{} {}} test winMenu-32.1 {TkpComputeStandardMenuGeometry - no entries} -constraints { win } -setup { destroy .m1 } -body { menu .m1 list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.2 {TkpComputeStandardMenuGeometry - one entry} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "one" list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.3 {TkpComputeStandardMenuGeometry - more than one entry} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "one" .m1 add command -label "two" list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.4 {TkpComputeStandardMenuGeometry - separator} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add separator list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.5 {TkpComputeStandardMenuGeometry - tearoff entry} -constraints { unix nonUnixUserInteraction } -setup { destroy .mb } -body { menubutton .mb -text "test" -menu .mb.m menu .mb.m .mb.m add command -label test pack .mb catch {tk::MbPost .mb} list [update] [destroy .mb] } -result {{} {}} test winMenu-32.6 {TkpComputeStandardMenuGeometry - standard label geometry} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "test" list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.7 {TkpComputeStandardMenuGeometry - different font for entry} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -font "Helvetica 12" .m1 add command -label "test" -font "Courier 12" list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.8 {TkpComputeStandardMenuGeometry - second entry larger} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "test" .m1 add command -label "test test" list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.9 {TkpComputeStandardMenuGeometry - first entry larger} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "test test" .m1 add command -label "test" list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.10 {TkpComputeStandardMenuGeometry - accelerator} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "test" -accel "Ctrl+S" list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.11 {TkpComputeStandardMenuGeometry - second accel larger} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "test" -accel "1" .m1 add command -label "test" -accel "1 1" list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.12 {TkpComputeStandardMenuGeometry - second accel smaller} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label "test" -accel "1 1" .m1 add command -label "test" -accel "1" list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.13 {TkpComputeStandardMenuGeometry - indicator} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add checkbutton -label test .m1 invoke 1 list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.14 {TkpComputeStandardMenuGeometry - second indicator less or equal} -constraints { testImageType win } -setup { destroy .m1 catch {image delete image1} } -body { image create test image1 menu .m1 .m1 add checkbutton -image image1 .m1 invoke 1 .m1 add checkbutton -label test .m1 invoke 2 list [update idletasks] [destroy .m1] [image delete image1] } -result {{} {} {}} test winMenu-32.15 {TkpComputeStandardMenuGeometry - second indicator larger} -constraints { testImageType unix } -setup { destroy .m1 catch {image delete image1} } -body { image create test image1 menu .m1 .m1 add checkbutton -image image1 .m1 invoke 1 .m1 add checkbutton -label test .m1 invoke 2 list [update idletasks] [destroy .m1] [image delete image1] } -result {{} {} {}} test winMenu-32.16 {TkpComputeStandardMenuGeometry - zero sized menus} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.17 {TkpComputeStandardMenuGeometry - first column bigger} -constraints { win } -setup { destroy .m1 } -body { menu .m1 .m1 add command -label one .m1 add command -label two .m1 add command -label three -columnbreak 1 list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.18 {TkpComputeStandardMenuGeometry - second column bigger} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add command -label one .m1 add command -label two -columnbreak 1 .m1 add command -label three list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-32.19 {TkpComputeStandardMenuGeometry - three columns} -constraints { win } -setup { destroy .m1 } -body { menu .m1 -tearoff 0 .m1 add command -label one .m1 add command -label two -columnbreak 1 .m1 add command -label three .m1 add command -label four .m1 add command -label five -columnbreak 1 .m1 add command -label six list [update idletasks] [destroy .m1] } -result {{} {}} test winMenu-33.1 {TkpNotifyTopLevelCreate - no menu yet} -constraints { win } -setup { destroy .m1 .t2 } -body { toplevel .t2 -menu .m1 wm geometry .t2 +0+0 list [update idletasks] [destroy .t2] } -result {{} {}} test winMenu-33.2 {TkpNotifyTopLevelCreate - menu} -constraints win -setup { destroy .m1 .t2 } -body { menu .m1 menu .m1.system .m1 add cascade -menu .m1.system .m1.system add separator .m1.system add command -label foo toplevel .t2 -menu .m1 wm geometry .t2 +0+0 list [update idletasks] [destroy .m1] [destroy .t2] } -result {{} {} {}} test winMenu-34.1 {TkpMenuInit called at boot time} -constraints { emptyTest win } -body {} # cleanup deleteWindows cleanupTests return # Local variables: # mode: tcl # End: tk8.6.14/tests/winfo.test0000644003604700454610000003674414554262361013761 0ustar dgp771div# This file is a Tcl script to test out the "winfo" command. It is # organized in the standard fashion for Tcl tests. # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. package require tcltest 2.2 namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }] # eatColors -- # Creates a toplevel window and allocates enough colors in it to # use up all the slots in the colormap. # # Arguments: # w - Name of toplevel window to create. # options - Options for w, such as "-colormap new". proc eatColors {w {options ""}} { destroy $w eval toplevel $w $options wm geom $w +0+0 canvas $w.c -width 400 -height 200 -bd 0 pack $w.c for {set y 0} {$y < 8} {incr y} { for {set x 0} {$x < 40} {incr x} { set color [format #%02x%02x%02x [expr {$x*6}] [expr {$y*30}] 0] $w.c create rectangle [expr {10*$x}] [expr {20*$y}] \ [expr {10*$x + 10}] [expr {20*$y + 20}] -outline {} \ -fill $color } } update } # XXX - This test file is woefully incomplete. At present, only a # few of the winfo options are tested. # ---------------------------------------------------------------------- test winfo-1.1 {"winfo atom" command} -body { winfo atom } -returnCodes error -result {wrong # args: should be "winfo atom ?-displayof window? name"} test winfo-1.2 {"winfo atom" command} -body { winfo atom a b } -returnCodes error -result {wrong # args: should be "winfo atom ?-displayof window? name"} test winfo-1.3 {"winfo atom" command} -body { winfo atom a b c d } -returnCodes error -result {wrong # args: should be "winfo atom ?-displayof window? name"} test winfo-1.4 {"winfo atom" command} -body { winfo atom -displayof geek foo } -returnCodes error -result {bad window path name "geek"} test winfo-1.5 {"winfo atom" command} -body { winfo atom PRIMARY } -result 1 test winfo-1.6 {"winfo atom" command} -body { winfo atom -displayof . PRIMARY } -result 1 test winfo-2.1 {"winfo atomname" command} -body { winfo atomname } -returnCodes error -result {wrong # args: should be "winfo atomname ?-displayof window? id"} test winfo-2.2 {"winfo atomname" command} -body { winfo atomname a b } -returnCodes error -result {wrong # args: should be "winfo atomname ?-displayof window? id"} test winfo-2.3 {"winfo atomname" command} -body { winfo atomname a b c d } -returnCodes error -result {wrong # args: should be "winfo atomname ?-displayof window? id"} test winfo-2.4 {"winfo atomname" command} -body { winfo atomname -displayof geek foo } -returnCodes error -result {bad window path name "geek"} test winfo-2.5 {"winfo atomname" command} -body { winfo atomname 44215 } -returnCodes error -result {no atom exists with id "44215"} test winfo-2.6 {"winfo atomname" command} -body { winfo atomname 2 } -result SECONDARY test winfo-2.7 {"winfo atom" command} -body { winfo atomname -displayof . 2 } -result SECONDARY test winfo-3.1 {"winfo colormapfull" command} -constraints { defaultPseudocolor8 } -body { winfo colormapfull } -returnCodes error -result {wrong # args: should be "winfo colormapfull window"} test winfo-3.2 {"winfo colormapfull" command} -constraints { defaultPseudocolor8 } -body { winfo colormapfull a b } -returnCodes error -result {wrong # args: should be "winfo colormapfull window"} test winfo-3.3 {"winfo colormapfull" command} -constraints { defaultPseudocolor8 } -body { winfo colormapfull foo } -returnCodes error -result {bad window path name "foo"} test winfo-3.4 {"winfo colormapfull" command} -constraints { unix defaultPseudocolor8 } -body { eatColors .t {-colormap new} set result [list [winfo colormapfull .] [winfo colormapfull .t]] .t.c delete 34 lappend result [winfo colormapfull .t] .t.c create rectangle 30 30 80 80 -fill #441739 lappend result [winfo colormapfull .t] .t.c create rectangle 40 40 90 90 -fill #ffeedd lappend result [winfo colormapfull .t] destroy .t.c lappend result [winfo colormapfull .t] } -cleanup { destroy .t } -result {0 1 0 0 1 0} test winfo-4.1 {"winfo containing" command} -body { winfo containing 22 } -returnCodes error -result {wrong # args: should be "winfo containing ?-displayof window? rootX rootY"} test winfo-4.2 {"winfo containing" command} -body { winfo containing a b c } -returnCodes error -result {wrong # args: should be "winfo containing ?-displayof window? rootX rootY"} test winfo-4.3 {"winfo containing" command} -body { winfo containing a b c d e } -returnCodes error -result {wrong # args: should be "winfo containing ?-displayof window? rootX rootY"} test winfo-4.4 {"winfo containing" command} -body { winfo containing -displayof geek 25 30 } -returnCodes error -result {bad window path name "geek"} 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 place .t.f -x 50 -y 50 wm geom .t +0+0 update raise .t winfo containing [winfo rootx .t.f] [winfo rooty .t.f] } -cleanup { destroy .t } -result .t.f test winfo-4.6 {"winfo containing" command} -constraints { nonPortable } -setup { destroy .t } -body { toplevel .t -width 550 -height 400 frame .t.f -width 80 -height 60 -bd 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}] } -cleanup { destroy .t } -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 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}] \ [expr {[winfo rooty .t.f]+450}]] expr {($x == ".") || ($x == "")} } -cleanup { destroy .t } -result 1 test winfo-5.1 {"winfo interps" command} -body { winfo interps a } -returnCodes error -result {wrong # args: should be "winfo interps ?-displayof window?"} test winfo-5.2 {"winfo interps" command} -body { winfo interps a b c } -returnCodes error -result {wrong # args: should be "winfo interps ?-displayof window?"} test winfo-5.3 {"winfo interps" command} -body { winfo interps -displayof geek } -returnCodes error -result {bad window path name "geek"} test winfo-5.4 {"winfo interps" command} -constraints unix -body { expr {[lsearch -exact [winfo interps] [tk appname]] >= 0} } -result 1 test winfo-5.5 {"winfo interps" command} -constraints unix -body { expr {[lsearch -exact [winfo interps -displayof .] [tk appname]] >= 0} } -result 1 test winfo-6.1 {"winfo exists" command} -body { winfo exists } -returnCodes error -result {wrong # args: should be "winfo exists window"} test winfo-6.2 {"winfo exists" command} -body { winfo exists a b } -returnCodes error -result {wrong # args: should be "winfo exists window"} test winfo-6.3 {"winfo exists" command} -body { winfo exists gorp } -result 0 test winfo-6.4 {"winfo exists" command} -body { winfo exists . } -result 1 test winfo-6.5 {"winfo exists" command} -setup { destroy .b } -body { button .b -text "Test button" set x [winfo exists .b] pack .b update bind .b {lappend x [winfo exists .x]} destroy .b lappend x [winfo exists .x] } -result {1 0 0} test winfo-7.1 {"winfo pathname" command} -body { winfo pathname } -returnCodes error -result {wrong # args: should be "winfo pathname ?-displayof window? id"} test winfo-7.2 {"winfo pathname" command} -body { winfo pathname a b } -returnCodes error -result {wrong # args: should be "winfo pathname ?-displayof window? id"} test winfo-7.3 {"winfo pathname" command} -body { winfo pathname a b c d } -returnCodes error -result {wrong # args: should be "winfo pathname ?-displayof window? id"} test winfo-7.4 {"winfo pathname" command} -body { winfo pathname -displayof geek 25 } -returnCodes error -result {bad window path name "geek"} test winfo-7.5 {"winfo pathname" command} -body { winfo pathname xyz } -returnCodes error -result {expected integer but got "xyz"} test winfo-7.6 {"winfo pathname" command} -body { winfo pathname 224 } -returnCodes error -result {window id "224" doesn't exist in this application} test winfo-7.7 {"winfo pathname" command} -setup { destroy .b button .b -text "Help" update } -body { winfo pathname -displayof .b [winfo id .] } -cleanup { destroy .b } -result {.} test winfo-7.8 {"winfo pathname" command} -constraints { unix testwrapper } -body { winfo pathname [testwrapper .] } -result {} test winfo-8.1 {"winfo pointerx" command} -setup { destroy .b button .b -text "Help" update } -body { catch [winfo pointerx .b] } -body { catch [winfo pointerx .b] } -result 1 test winfo-8.2 {"winfo pointery" command} -setup { destroy .b button .b -text "Help" update } -body { catch [winfo pointery .b] } -body { catch [winfo pointerx .b] } -result 1 test winfo-8.3 {"winfo pointerxy" command} -setup { destroy .b button .b -text "Help" update } -body { catch [winfo pointerxy .b] } -body { catch [winfo pointerx .b] } -result 1 test winfo-9.1 {"winfo viewable" command} -body { winfo viewable } -returnCodes error -result {wrong # args: should be "winfo viewable window"} test winfo-9.2 {"winfo viewable" command} -body { winfo viewable foo } -returnCodes error -result {bad window path name "foo"} test winfo-9.3 {"winfo viewable" command} -body { winfo viewable . } -result 1 test winfo-9.4 {"winfo viewable" command} -constraints {failsOnUbuntu failsOnXQuarz} -body { wm iconify . winfo viewable . } -cleanup { wm deiconify . } -result 0 test winfo-9.5 {"winfo viewable" command} -setup { deleteWindows } -body { frame .f1 -width 100 -height 100 -relief raised -bd 2 place .f1 -x 0 -y 0 frame .f1.f2 -width 50 -height 50 -relief raised -bd 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 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 place .f1 -x 0 -y 0 frame .f1.f2 -width 50 -height 50 -relief raised -bd 2 place .f1.f2 -x 0 -y 0 update wm iconify . list [winfo viewable .f1] [winfo viewable .f1.f2] } -cleanup { wm deiconify . deleteWindows } -result {0 0} test winfo-10.1 {"winfo visualid" command} -body { winfo visualid } -returnCodes error -result {wrong # args: should be "winfo visualid window"} test winfo-10.2 {"winfo visualid" command} -body { winfo visualid gorp } -returnCodes error -result {bad window path name "gorp"} test winfo-10.3 {"winfo visualid" command} -body { expr {2 + [winfo visualid .] - [winfo visualid .]} } -result 2 test winfo-11.1 {"winfo visualid" command} -body { winfo visualsavailable } -returnCodes error -result {wrong # args: should be "winfo visualsavailable window ?includeids?"} test winfo-11.2 {"winfo visualid" command} -body { winfo visualsavailable gorp } -returnCodes error -result {bad window path name "gorp"} test winfo-11.3 {"winfo visualid" command} -body { winfo visualsavailable . includeids foo } -returnCodes error -result {wrong # args: should be "winfo visualsavailable window ?includeids?"} test winfo-11.4 {"winfo visualid" command} -body { llength [lindex [winfo visualsa .] 0] } -result 2 test winfo-11.5 {"winfo visualid" command} -body { llength [lindex [winfo visualsa . includeids] 0] } -result 3 test winfo-11.6 {"winfo visualid" command} -body { set x [lindex [lindex [winfo visualsa . includeids] 0] 2] expr {$x + 2 - $x} } -result 2 test winfo-12.1 {GetDisplayOf procedure} -body { winfo atom - foo x } -returnCodes error -result {wrong # args: should be "winfo atom ?-displayof window? name"} test winfo-12.2 {GetDisplayOf procedure} -body { winfo atom -d bad_window x } -returnCodes error -result {bad window path name "bad_window"} # Some embedding tests # 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 button .emb.b pack .emb.b -expand yes -fill both update list rootx [expr {[winfo rootx .emb] == [winfo rootx .con]}] \ rooty [expr {[winfo rooty .emb] == [winfo rooty .con]}] } -cleanup { deleteWindows } -result {rootx 1 rooty 1} # Windows does not destroy the container when an embedded window is # destroyed. Unix and macOS do destroy it. See ticket [67384bce7d]. if {[tk windowingsystem] eq "win32"} { set result_13_2 {embedded 0 container 1} } else { set result_13_2 {embedded 0 container 0} } 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 button .emb.b pack .emb.b -expand yes -fill both update destroy .emb update list embedded [winfo exists .emb.b] container [winfo exists .con] } -cleanup { deleteWindows } -result $result_13_2 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 button .emb.b pack .emb.b -expand yes -fill both update destroy .con update list child [winfo exists .emb.b] parent [winfo exists .emb] } -cleanup { deleteWindows } -result {child 0 parent 0} 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 button .emb.b pack .emb.b -expand yes -fill both update button .b pack .b -expand yes -fill both update string compare .emb.b \ [winfo containing [winfo rootx .emb.b] [winfo rooty .emb.b]] } -cleanup { deleteWindows } -result 0 test winfo-14.1 {usage} -body { winfo ismapped } -returnCodes error -result {wrong # args: should be "winfo ismapped window"} test winfo-14.2 {usage} -body { winfo ismapped . . } -returnCodes error -result {wrong # args: should be "winfo ismapped window"} test winfo-14.3 {initially unmapped} -setup { destroy .t } -body { toplevel .t winfo ismapped .t } -cleanup { destroy .t } -result 0 test winfo-14.4 {mapped at idle time} -setup { destroy .t } -body { toplevel .t update idletasks winfo ismapped .t } -cleanup { destroy .t } -result 1 deleteWindows # cleanup cleanupTests return # Local variables: # mode: tcl # End: tk8.6.14/tests/winFont.test0000644003604700454610000002603014554262361014246 0ustar dgp771div# This file is a Tcl script to test out the procedures in tkWinFont.c. # It is organized in the standard fashion for Tcl tests. # # Many of these tests are visually oriented and cannot be checked # programmatically (such as "does an underlined font appear to be # underlined?"); these tests attempt to exercise the code in question, # but there are no results that can be checked. # # Copyright (c) 1996-1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. package require tcltest 2.2 namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands test winfont-1.1 {TkpGetNativeFont procedure: not native} -constraints { win } -body { catch {font delete xyz} font measure {} xyz } -returnCodes error -result {font "" doesn't exist} test winfont-1.2 {TkpGetNativeFont procedure: native} -constraints win -body { font measure ansifixed 0 font measure ansi 0 font measure device 0 font measure oemfixed 0 font measure systemfixed 0 font measure system 0 set x {} } -result {} test winfont-2.1 {TkpGetFontFromAttributes procedure: pointsize} -constraints { win } -body { expr {[font actual {-size -10} -size] > 0} } -result 1 test winfont-2.2 {TkpGetFontFromAttributes procedure: pointsize} -constraints { win } -body { expr {[font actual {-family Arial} -size] > 0} } -result 1 test winfont-2.3 {TkpGetFontFromAttributes procedure: normal weight} -constraints { win } -body { font actual {-weight normal} -weight } -result {normal} test winfont-2.4 {TkpGetFontFromAttributes procedure: bold weight} -constraints { win } -body { font actual {-weight bold} -weight } -result {bold} test winfont-2.5 {TkpGetFontFromAttributes procedure: no family} -constraints { win } -body { catch {expr {[font actual {-size 10} -size]}} } -result 0 test winfont-2.6 {TkpGetFontFromAttributes procedure: family} -constraints { win } -body { font actual {-family Arial} -family } -result {Arial} test winfont-2.7 {TkpGetFontFromAttributes procedure: Times fonts} -constraints { win } -setup { set x {} } -body { lappend x [font actual {-family "Times"} -family] lappend x [font actual {-family "New York"} -family] lappend x [font actual {-family "Times New Roman"} -family] } -result {{Times New Roman} {Times New Roman} {Times New Roman}} test winfont-2.8 {TkpGetFontFromAttributes procedure: Courier fonts} -constraints { win } -setup { set x {} } -body { lappend x [font actual {-family "Courier"} -family] lappend x [font actual {-family "Monaco"} -family] lappend x [font actual {-family "Courier New"} -family] } -result {{Courier New} {Courier New} {Courier New}} test winfont-2.9 {TkpGetFontFromAttributes procedure: Helvetica fonts} -constraints { win } -setup { set x {} } -body { lappend x [font actual {-family "Helvetica"} -family] lappend x [font actual {-family "Geneva"} -family] lappend x [font actual {-family "Arial"} -family] } -result {Arial Arial Arial} test winfont-2.10 {TkpGetFontFromAttributes procedure: fallback} -constraints { win } -body { # No way to get it to fail! Any font name is acceptable. } -result {} test winfont-3.1 {TkpDeleteFont procedure} -constraints win -body { catch {font delete xyz} font actual {-family xyz} set x {} } -result {} test winfont-4.1 {TkpGetFontFamilies procedure} -constraints win -body { font families set x {} } -result {} 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 pack .t.l canvas .t.c -closeenough 0 set courier {Courier 14} set cx [font measure $courier 0] set t [.t.c create text 0 0 -anchor nw -just left -font $courier] pack .t.c update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] proc getsize {} { update return "[winfo reqwidth .t.l] [winfo reqheight .t.l]" } 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 \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] .t.l config -wrap 0 -text "000000" list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \ [expr {[winfo reqheight .t.l] eq $ay}] } -cleanup { destroy .t.l } -result {1 1} test winfont-5.2 {Tk_MeasureChars procedure: static width buffer exceeded} -constraints { win } -setup { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] .t.l config -wrap 100000 -text "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" list [expr {[winfo reqwidth .t.l] eq 256*$ax}] \ [expr {[winfo reqheight .t.l] eq $ay}] } -cleanup { destroy .t.l } -result {1 1} test winfont-5.3 {Tk_MeasureChars procedure: all chars did fit} -constraints { win } -setup { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] .t.l config -wrap [expr {$ax*10}] -text "00000000" list [expr {[winfo reqwidth .t.l] eq 8*$ax}] \ [expr {[winfo reqheight .t.l] eq $ay}] } -cleanup { destroy .t.l } -result {1 1} test winfont-5.4 {Tk_MeasureChars procedure: not all chars fit} -constraints { win } -setup { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] .t.l config -wrap [expr {$ax*6}] -text "00000000" list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \ [expr {[winfo reqheight .t.l] eq 2*$ay}] } -cleanup { destroy .t.l } -result {1 1} test winfont-5.5 {Tk_MeasureChars procedure: include last partial char} -constraints { win } -setup { destroy .t.c } -body { canvas .t.c -closeenough 0 set t [.t.c create text 0 0 -anchor nw -just left -font $courier] pack .t.c update .t.c dchars $t 0 end .t.c insert $t 0 "0000" .t.c index $t @[expr {int($cx*2.5)}],1 } -cleanup { destroy .t.c } -result 2 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 \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] .t.l config -text "000000" -wrap 1 list [expr {[winfo reqwidth .t.l] eq $ax}] \ [expr {[winfo reqheight .t.l] eq 6*$ay}] } -cleanup { destroy .t.l } -result {1 1} test winfont-5.7 {Tk_MeasureChars procedure: whole words} -constraints { win } -setup { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] .t.l config -wrap [expr {$ax*8}] -text "000000 0000" list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \ [expr {[winfo reqheight .t.l] eq 2*$ay}] } -cleanup { destroy .t.l } -result {1 1} test winfont-5.8 {Tk_MeasureChars procedure: already saw space in line} -constraints { win } -setup { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] .t.l config -wrap [expr {$ax*12}] -text "000000 0000000" list [expr {[winfo reqwidth .t.l] eq 7*$ax}] \ [expr {[winfo reqheight .t.l] eq 2*$ay}] } -cleanup { destroy .t.l } -result {1 1} test winfont-5.9 {Tk_MeasureChars procedure: internal spaces significant} -constraints { win } -setup { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] .t.l config -wrap [expr {$ax*12}] -text "000 00 00000" list [expr {[winfo reqwidth .t.l] eq 7*$ax}] \ [expr {[winfo reqheight .t.l] eq 2*$ay}] } -cleanup { destroy .t.l } -result {1 1} test winfont-5.10 {Tk_MeasureChars procedure: make first part of word fit} -constraints { win } -setup { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set ax [winfo reqwidth .t.l] set ay [winfo reqheight .t.l] .t.l config -wrap [expr {$ax*12}] -text "0000000000000000" list [expr {[winfo reqwidth .t.l] eq 12*$ax}] \ [expr {[winfo reqheight .t.l] eq 2*$ay}] } -cleanup { destroy .t.l } -result {1 1} test winfont-5.11 {Tk_MeasureChars procedure: check for kerning} -constraints { win nonPortable } -setup { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update set font [.t.l cget -font] .t.l config -font {{MS Sans Serif} 8} -text "W" set width [winfo reqwidth .t.l] .t.l config -text "XaYoYaKaWx" set x [lindex [getsize] 0] .t.l config -font $font expr {$x < ($width*10)} } -cleanup { destroy .t.l } -result 1 test winfont-6.1 {Tk_DrawChars procedure: loop test} -constraints win -setup { destroy .t.l } -body { label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \ -text "0" -font systemfixed pack .t.l update .t.l config -text "a" update } -cleanup { destroy .t.l } -result {} test winfont-7.1 {InitFont procedure: use old font} -constraints win -setup { destroy .c } -setup { catch {font delete xyz} } -body { font create xyz button .c -font xyz font configure xyz -family times update destroy .c font delete xyz } -result {} test winfont-7.2 {InitFont procedure: extract info from logfont} -constraints { win } -body { font actual {arial 10 bold italic underline overstrike} } -result {-family Arial -size 10 -weight bold -slant italic -underline 1 -overstrike 1} test winfont-7.3 {InitFont procedure: extract info from textmetric} -constraints { win } -body { font metric {arial 10 bold italic underline overstrike} -fixed } -result 0 test winfont-7.4 {InitFont procedure: extract info from textmetric} -constraints { win } -body { font metric systemfixed -fixed } -result 1 # cleanup cleanupTests return # Local variables: # mode: tcl # End: tk8.6.14/tests/window.test0000644003604700454610000002330014554262361014126 0ustar dgp771div# This file is a Tcl script to test the procedures in the file # tkWindow.c. It is organized in the standard fashion for Tcl tests. # # Copyright (c) 1995 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. package require tcltest 2.2 namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands namespace import ::tk::test::loadTkCommand update # XXX This file is woefully incomplete. Right now it only tests # a few parts of a few procedures in tkWindow.c # ---------------------------------------------------------------------- test window-1.1 {Tk_CreateWindowFromPath procedure, parent dead} -setup { destroy .t } -body { proc bgerror msg { global x errorInfo set x [list $msg $errorInfo] } set x unchanged frame .t -width 100 -height 50 place .t -x 10 -y 10 bind .t {button .t.b -text hello; pack .t.b} update destroy .t update set x } -cleanup { rename bgerror {} } -result {{can't create window: parent has been destroyed} {can't create window: parent has been destroyed while executing "button .t.b -text hello" (command bound to event)}} # Most of the tests below don't produce meaningful results; they # will simply dump core if there are bugs. 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 place .t.f -x 0 -y 0 frame .t.f.f -width 100 -height 100 -relief raised -bd 2 place .t.f.f -relx 1 -rely 1 -anchor se bind .t.f {destroy .t} update destroy .t.f } -result {} 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 place .t.f -x 0 -y 0 frame .t.f.f -width 100 -height 100 -relief raised -bd 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 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 place .f.t.f -x 0 -y 0 frame .f.t.f.f -width 100 -height 100 -relief raised -bd 2 place .f.t.f.f -relx 1 -rely 1 -anchor se update destroy .f } -result {} test window-2.4 {Tk_DestroyWindow, cleanup half dead window at exit} -constraints { unixOrWin } -body { set code [loadTkCommand] append code { update bind . exit destroy . } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { set error 1 } else { set error 0 } removeFile script list $error $msg } -result {0 {}} test window-2.5 {Tk_DestroyWindow, cleanup half dead windows at exit} -constraints { unixOrWin } -body { set code [loadTkCommand] append code { toplevel .t update bind .t exit destroy .t } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { set error 1 } else { set error 0 } removeFile script list $error $msg } -result {0 {}} test window-2.6 {Tk_DestroyWindow, cleanup half dead windows at exit} -constraints { unixOrWin } -body { set code [loadTkCommand] append code { toplevel .t update bind .t exit destroy . } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { set error 1 } else { set error 0 } removeFile script list $error $msg } -result {0 {}} test window-2.7 {Tk_DestroyWindow, cleanup half dead windows at exit} -constraints { unixOrWin } -body { set code [loadTkCommand] append code { toplevel .t toplevel .t.f update bind .t.f exit destroy . } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { set error 1 } else { set error 0 } removeFile script list $error $msg } -result {0 {}} test window-2.8 {Tk_DestroyWindow, cleanup half dead windows at exit} -constraints { unixOrWin } -body { set code [loadTkCommand] append code { toplevel .t1 toplevel .t2 toplevel .t3 update bind .t3 {destroy .t2} bind .t2 {destroy .t1} bind .t1 {exit 0} destroy .t3 } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { set error 1 } else { set error 0 } removeFile script list $error $msg } -result {0 {}} test window-2.9 {Tk_DestroyWindow, Destroy bindings evaluated after exit} -constraints { unixOrWin } -body { set code [loadTkCommand] append code { toplevel .t1 toplevel .t2 update bind .t2 {puts "Destroy .t2" ; exit 1} bind .t1 {puts "Destroy .t1" ; exit 0} destroy .t2 } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { set error 1 } else { set error 0 } removeFile script list $error $msg } -result {0 {Destroy .t2 Destroy .t1}} test window-2.10 {Tk_DestroyWindow, Destroy binding evaluated once} -constraints { unixOrWin } -body { set code [loadTkCommand] append code { update bind . { puts "Destroy ." bind . {puts "Re-Destroy ."} exit 0 } destroy . } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { set error 1 } else { set error 0 } removeFile script list $error $msg } -result {0 {Destroy .}} test window-2.11 {Tk_DestroyWindow, don't reanimate a half-dead window} -constraints { unixOrWin } -body { set code [loadTkCommand] append code { toplevel .t1 toplevel .t2 update bind .t1 { if {[catch {entry .t2.newchild}]} { puts YES } else { puts NO } } bind .t2 {exit} destroy .t2 } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { set error 1 } else { set error 0 } removeFile script list $error $msg } -result {0 YES} test window-2.12 {Test for ticket [9b6065d1fd] - restore Tcl [update] command} -constraints { unixOrWin } -body { set code [loadTkCommand] append code { after 1000 {set forever 1} after 100 {destroy .} after 200 {catch bell msg; puts "ringing the bell -> $msg"} after 250 {update idletasks} after 300 {update} puts "waiting" vwait forever puts "done waiting" catch {bell} msg puts "bell -> $msg" catch update msg puts "update -> $msg" } set script [makeFile $code script] if {[catch {exec [interpreter] $script -geometry 10x10+0+0} msg]} { set error 1 } else { set error 0 } removeFile script list $error $msg } -result {0 {waiting ringing the bell -> can't invoke "bell" command: application has been destroyed done waiting bell -> can't invoke "bell" command: application has been destroyed update -> }} test window-3.1 {Tk_MakeWindowExist procedure, stacking order and menubars} -constraints { unix testmenubar } -setup { 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 testmenubar window .t .t.f update # If stacking order isn't handle properly, generates an X error. } -cleanup { destroy .t } -result {} test window-3.2 {Tk_MakeWindowExist procedure, stacking order and menubars} -constraints { unix testmenubar } -setup { destroy .t } -body { 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 raise .t.f .t.e testmenubar window .t .t.f update # If stacking order isn't handled properly, generates an X error. } -cleanup { destroy .t } -result {} test window-4.1 {Tk_NameToWindow procedure} -constraints { testmenubar } -setup { destroy .t } -body { winfo geometry .t } -cleanup { destroy .t } -returnCodes error -result {bad window path name ".t"} test window-4.2 {Tk_NameToWindow procedure} -constraints { testmenubar } -setup { destroy .t } -body { frame .t -width 100 -height 50 place .t -x 10 -y 10 update winfo geometry .t } -cleanup { destroy .t } -returnCodes ok -result {100x50+10+10} test window-5.1 {Tk_MakeWindowExist procedure, stacking order and menubars} -constraints { unix testmenubar } -setup { destroy .t } -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 testmenubar window .t .t.f update lower .t.e2 .t.f update # If stacking order isn't handled properly, generates an X error. } -cleanup { destroy .t } -result {} # cleanup cleanupTests return # Local variables: # mode: tcl # End: tk8.6.14/tests/winDialog.test0000755003604700454610000007234014554262361014547 0ustar dgp771div# -*- tcl -*- # This file is a Tcl script to test the Windows specific behavior of # the common dialog boxes. It is organized in the standard # fashion for Tcl tests. # # Copyright (c) 1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # Copyright (c) 1998-1999 ActiveState Corporation. package require tcltest 2.2 namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands if {[testConstraint testwinevent]} { catch {testwinevent debug 1} } # Locale identifier LANG_ENGLISH is 0x09 testConstraint english [expr { [llength [info commands testwinlocale]] && (([testwinlocale] & 0xff) == 9) }] proc vista? {{prevista 0} {postvista 1}} { lassign [split $::tcl_platform(osVersion) .] major return [expr {$major >= 6 ? $postvista : $prevista}] } # What directory to use in initialdir tests. Old code used to use # c:/. However, on Vista/later that is a protected directory if you # are not running privileged. Moreover, not everyone has a drive c: # but not having a TEMP would break a lot Windows programs proc initialdir {} { # file join to return in Tcl canonical format (/ separator, not \) #return [file join $::env(TEMP)] return [tcltest::temporaryDirectory] } proc start {arg} { set ::tk_dialog 0 set ::iter_after 0 set ::dialogclass "#32770" after 1 $arg } proc then {cmd} { set ::command $cmd set ::dialogresult {} set ::testfont {} # Do not make the delay too short. The newer Vista dialogs take # time to come up. Even if the testforwindow returns true, the # controls are not ready to accept messages after 500 afterbody vwait ::dialogresult return $::dialogresult } proc afterbody {} { # On Vista and later, using the new file dialogs we have to find # the window using its title as tk_dialog will not be set at the C level if {[vista?]} { if {[catch {testfindwindow "" $::dialogclass} ::tk_dialog]} { if {[incr ::iter_after] > 30} { set ::dialogresult ">30 iterations waiting on tk_dialog" return } after 150 {afterbody} return } } else { if {$::tk_dialog == 0} { if {[incr ::iter_after] > 30} { set ::dialogresult ">30 iterations waiting on tk_dialog" return } after 150 {afterbody} return } } uplevel #0 {set dialogresult [eval $command]} } proc Click {button} { switch -exact -- $button { ok { set button 1 } cancel { set button 2 } } testwinevent $::tk_dialog $button WM_LBUTTONDOWN 1 0x000a000b testwinevent $::tk_dialog $button WM_LBUTTONUP 0 0x000a000b } proc GetText {id} { switch -exact -- $id { ok { set id 1 } cancel { set id 2 } } return [testwinevent $::tk_dialog $id WM_GETTEXT] } proc SetText {id text} { return [testwinevent $::tk_dialog $id WM_SETTEXT $text] } proc ApplyFont {font} { set ::testfont $font } # ---------------------------------------------------------------------- test winDialog-1.1 {Tk_ChooseColorObjCmd} -constraints { testwinevent } -body { start {tk_chooseColor} then { Click cancel } } -result 0 test winDialog-1.2 {Tk_ChooseColorObjCmd} -constraints { testwinevent } -body { start {set clr [tk_chooseColor -initialcolor "#ff9933"]} then { set x [Click cancel] } list $x $clr } -result {0 {}} test winDialog-1.3 {Tk_ChooseColorObjCmd} -constraints { testwinevent } -body { start {set clr [tk_chooseColor -initialcolor "#ff9933"]} then { set x [Click ok] } list $x $clr } -result [list 0 "#ff9933"] test winDialog-1.4 {Tk_ChooseColorObjCmd: -title} -constraints { testwinevent } -setup { catch {unset a x} } -body { set x {} start {set clr [tk_chooseColor -initialcolor "#ff9933" -title "Hello"]} then { if {[catch { array set a [testgetwindowinfo $::tk_dialog] if {[info exists a(text)]} {lappend x $a(text)} } err]} { lappend x $err } lappend x [Click ok] } lappend x $clr } -result [list Hello 0 "#ff9933"] test winDialog-1.5 {Tk_ChooseColorObjCmd: -title} -constraints { testwinevent } -setup { catch {unset a x} } -body { set x {} start { set clr [tk_chooseColor -initialcolor "#ff9933" \ -title "\u041f\u0440\u0438\u0432\u0435\u0442"] } then { if {[catch { array set a [testgetwindowinfo $::tk_dialog] if {[info exists a(text)]} {lappend x $a(text)} } err]} { lappend x $err } lappend x [Click ok] } lappend x $clr } -result [list "\u041f\u0440\u0438\u0432\u0435\u0442" 0 "#ff9933"] test winDialog-1.6 {Tk_ChooseColorObjCmd: -parent} -constraints { testwinevent } -setup { catch {unset a x} } -body { start {set clr [tk_chooseColor -initialcolor "#ff9933" -parent .]} set x {} then { if {[catch { array set a [testgetwindowinfo $::tk_dialog] if {[info exists a(parent)]} { append x [expr {$a(parent) == [wm frame .]}] } } err]} {lappend x $err} Click ok } list $x $clr } -result [list 1 "#ff9933"] test winDialog-1.7 {Tk_ChooseColorObjCmd: -parent} -constraints { testwinevent } -body { tk_chooseColor -initialcolor "#ff9933" -parent .xyzzy12 } -returnCodes error -match glob -result {bad window path name*} test winDialog-2.1 {ColorDlgHookProc} -constraints {emptyTest nt} -body {} test winDialog-3.1 {Tk_GetOpenFileObjCmd} -constraints { nt testwinevent english } -body { start {tk_getOpenFile} then { set x [GetText cancel] Click cancel } return $x } -result {Cancel} test winDialog-4.1 {Tk_GetSaveFileObjCmd} -constraints { nt testwinevent english } -body { start {tk_getSaveFile} then { set x [GetText cancel] Click cancel } return $x } -result {Cancel} test winDialog-5.1 {GetFileName: no arguments} -constraints { nt testwinevent } -body { start {tk_getOpenFile -title Open} then { Click cancel } } -result 0 test winDialog-5.2 {GetFileName: one argument} -constraints { nt } -body { tk_getOpenFile -foo } -returnCodes error -result {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, -title, or -typevariable} test winDialog-5.3 {GetFileName: many arguments} -constraints { nt testwinevent } -body { start {tk_getOpenFile -initialdir [initialdir] -parent . -title test -initialfile foo} then { Click cancel } } -result 0 test winDialog-5.4 {GetFileName: Tcl_GetIndexFromObj() != TCL_OK} -constraints { nt } -body { tk_getOpenFile -foo bar -abc } -returnCodes error -result {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, -title, or -typevariable} test winDialog-5.5 {GetFileName: Tcl_GetIndexFromObj() == TCL_OK} -constraints { nt testwinevent } -body { start {set x [tk_getOpenFile -title bar]} set y [then { Click cancel }] # Note this also tests fix for # https://core.tcl-lang.org/tk/tktview/4a0451f5291b3c9168cc560747dae9264e1d2ef6 # $x is expected to be empty append x $y } -result 0 test winDialog-5.6 {GetFileName: valid option, but missing value} -constraints { nt } -body { tk_getOpenFile -initialdir bar -title } -returnCodes error -result {value for "-title" missing} test winDialog-5.7 {GetFileName: extension begins with .} -constraints { nt testwinevent } -body { start {set x [tk_getSaveFile -defaultextension .foo -title Save]} set msg {} then { if {[catch {SetText [vista? 0x47C 0x3e9] bar} msg]} { Click cancel } else { Click ok } } set x "[file tail $x]$msg" } -cleanup { unset msg } -result bar.foo test winDialog-5.7.1 {GetFileName: extension {} } -constraints { nt testwinevent } -body { start {set x [tk_getSaveFile -defaultextension {} -title Save]} set msg {} then { if {[catch {SetText [vista? 0x47C 0x3e9] bar} msg]} { Click cancel } else { Click ok } } set x "[file tail $x]$msg" } -cleanup { unset msg } -result bar test winDialog-5.7.2 {GetFileName: extension {} Bug 47af31bd3ac6fbbb33cde1a5bab1e756ff2a6e00 } -constraints { nt testwinevent } -body { start {set x [tk_getSaveFile -filetypes {{All *}} -defaultextension {} -title Save]} set msg {} then { if {[catch {SetText [vista? 0x47C 0x3e9] bar} msg]} { Click cancel } else { Click ok } } set x "[file tail $x]$msg" } -cleanup { unset msg } -result bar test winDialog-5.7.3 {GetFileName: extension {} Bug 47af31bd3ac6fbbb33cde1a5bab1e756ff2a6e00 } -constraints { nt testwinevent } -body { start {set x [tk_getSaveFile -filetypes {{All *}} -defaultextension {} -title Save]} set msg {} then { if {[catch {SetText [vista? 0x47C 0x3e9] bar.c} msg]} { Click cancel } else { Click ok } } set x "[file tail $x]$msg" } -cleanup { unset msg } -result bar.c test winDialog-5.7.4 {GetFileName: extension {} } -constraints { nt testwinevent } -body { # Although the docs do not explicitly mention, -filetypes seems to # override -defaultextension start {set x [tk_getSaveFile -filetypes {{C .c} {Tcl .tcl}} -defaultextension {foo} -title Save]} set msg {} then { if {[catch {SetText [vista? 0x47C 0x3e9] bar} msg]} { Click cancel } else { Click ok } } set x "[file tail $x]$msg" } -cleanup { unset msg } -result bar.c test winDialog-5.7.5 {GetFileName: extension {} } -constraints { nt testwinevent } -body { # Although the docs do not explicitly mention, -filetypes seems to # override -defaultextension start {set x [tk_getSaveFile -filetypes {{C .c} {Tcl .tcl}} -defaultextension {} -title Save]} set msg {} then { if {[catch {SetText [vista? 0x47C 0x3e9] bar} msg]} { Click cancel } else { Click ok } } set x "[file tail $x]$msg" } -cleanup { unset msg } -result bar.c test winDialog-5.7.6 {GetFileName: All/extension } -constraints { nt testwinevent } -body { # In 8.6.4 this combination resulted in bar.aaa.aaa which is bad start {set x [tk_getSaveFile -filetypes {{All *}} -defaultextension {aaa} -title Save]} set msg {} then { if {[catch {SetText [vista? 0x47C 0x3e9] bar} msg]} { Click cancel } else { Click ok } } set x "[file tail $x]$msg" } -cleanup { unset msg } -result bar.aaa test winDialog-5.7.7 {tk_getOpenFile: -defaultextension} -constraints { nt testwinevent } -body { unset -nocomplain x tcltest::makeFile "" "5 7 7.aaa" [initialdir] start {set x [tk_getOpenFile \ -defaultextension aaa \ -initialdir [file nativename [initialdir]] \ -initialfile "5 7 7" -title Foo]} then { Click ok } return $x } -result [file join [initialdir] "5 7 7.aaa"] test winDialog-5.7.8 {tk_getOpenFile: -defaultextension} -constraints { nt testwinevent } -body { unset -nocomplain x tcltest::makeFile "" "5 7 8.aaa" [initialdir] start {set x [tk_getOpenFile \ -defaultextension aaa \ -initialdir [file nativename [initialdir]] \ -initialfile "5 7 8.aaa" -title Foo]} then { Click ok } return $x } -result [file join [initialdir] "5 7 8.aaa"] test winDialog-5.8 {GetFileName: extension doesn't begin with .} -constraints { nt testwinevent } -body { start {set x [tk_getSaveFile -defaultextension foo -title Save]} set msg {} then { if {[catch {SetText [vista? 0x47C 0x3e9] bar} msg]} { Click cancel } else { Click ok } } set x "[file tail $x]$msg" } -cleanup { unset msg } -result bar.foo test winDialog-5.9 {GetFileName: file types} -constraints { nt testwinevent } -body { # case FILE_TYPES: start {tk_getSaveFile -filetypes {{"foo files" .foo FOOF}} -title Foo} # XXX - currently disabled for vista style dialogs because the file # types control has no control ID and we don't have a mechanism to # locate it. if {[vista?]} { then { Click cancel } return 1 } else { then { set x [GetText 0x470] Click cancel } return [string equal $x {foo files (*.foo)}] } } -result 1 test winDialog-5.10 {GetFileName: file types: MakeFilter() fails} -constraints { nt } -body { # if (MakeFilter(interp, string, &utfFilterString) != TCL_OK) tk_getSaveFile -filetypes {{"foo" .foo FOO}} } -returnCodes error -result {bad Macintosh file type "FOO"} test winDialog-5.11 {GetFileName: initial directory} -constraints { nt testwinevent } -body { # case FILE_INITDIR: unset -nocomplain x start {set x [tk_getSaveFile \ -initialdir [initialdir] \ -initialfile "12x 455" -title Foo]} then { Click ok } return $x } -result [file join [initialdir] "12x 455"] test winDialog-5.12 {GetFileName: initial directory: Tcl_TranslateFilename()} -constraints { nt } -body { # if (Tcl_TranslateFileName(interp, string, &ds) == NULL) tk_getOpenFile -initialdir ~12x/455 } -returnCodes error -result {user "12x" doesn't exist} test winDialog-5.12.1 {tk_getSaveFile: initial directory: ~} -constraints { nt testwinevent } -body { unset -nocomplain x start {set x [tk_getSaveFile \ -initialdir ~ \ -initialfile "5 12 1" -title Foo]} then { Click ok } return $x } -result [file normalize [file join ~ "5 12 1"]] test winDialog-5.12.2 {tk_getSaveFile: initial directory: ~user} -constraints { nt testwinevent } -body { # Note: this test will fail on Tcl versions 8.6.4 and earlier due # to a bug in file normalize for names of the form ~xxx that # returns the wrong dir on Windows. In particular (in Win8 at # least) it returned /users/Default instead of /users/USERNAME... unset -nocomplain x start {set x [tk_getSaveFile \ -initialdir ~$::tcl_platform(user) \ -initialfile "5 12 2" -title Foo]} then { Click ok } return $x } -result [file normalize [file join ~$::tcl_platform(user) "5 12 2"]] test winDialog-5.12.3 {tk_getSaveFile: initial directory: .} -constraints { nt testwinevent } -body { # Windows remembers dirs from previous selections so use # a subdir for this test, not [initialdir] itself set newdir [tcltest::makeDirectory "5 12 3"] set cur [pwd] try { cd $newdir unset -nocomplain x start {set x [tk_getSaveFile \ -initialdir . \ -initialfile "testfile" -title Foo]} then { Click ok } } finally { cd $cur } string equal $x [file join $newdir testfile] } -result 1 test winDialog-5.12.4 {tk_getSaveFile: initial directory: unicode} -constraints { nt testwinevent } -body { set dir [tcltest::makeDirectory "\u0167\u00e9\u015d\u0167"] unset -nocomplain x start {set x [tk_getSaveFile \ -initialdir $dir \ -initialfile "testfile" -title Foo]} then { Click ok } string equal $x [file join $dir testfile] } -result 1 test winDialog-5.12.5 {tk_getSaveFile: initial directory: nativename} -constraints { nt testwinevent } -body { unset -nocomplain x start {set x [tk_getSaveFile \ -initialdir [file nativename [initialdir]] \ -initialfile "5 12 5" -title Foo]} then { Click ok } return $x } -result [file join [initialdir] "5 12 5"] test winDialog-5.12.6 {tk_getSaveFile: initial directory: relative} -constraints { nt testwinevent } -body { # Windows remembers dirs from previous selections so use # a subdir for this test, not [initialdir] itself set dir [tcltest::makeDirectory "5 12 6"] set cur [pwd] try { cd [file dirname $dir] unset -nocomplain x start {set x [tk_getSaveFile \ -initialdir "5 12 6" \ -initialfile "testfile" -title Foo]} then { Click ok } } finally { cd $cur } string equal $x [file join $dir testfile] } -result 1 test winDialog-5.12.7 {tk_getOpenFile: initial directory: ~} -setup { # Ensure there's at least one file in the home directory in CI environments set makeEmpty [expr {![llength [glob -nocomplain -type f -directory ~ *]]}] if {$makeEmpty} { for {set i 1} {$i < 1000} {incr i} { # Technically a race condition... set actualFilename [format "~/tkWinDialog5_12_7_%03d" $i] if {![file exists $actualFilename]} break } close [open $actualFilename w] } } -constraints { nt testwinevent } -body { set fn [file tail [lindex [glob -types f ~/*] 0]] unset -nocomplain x start {set x [tk_getOpenFile \ -initialdir ~ \ -initialfile $fn -title Foo]} then { Click ok } string equal $x [file normalize [file join ~ $fn]] } -cleanup { if {$makeEmpty} { file delete $actualFilename } } -result 1 test winDialog-5.12.8 {tk_getOpenFile: initial directory: .} -constraints { nt testwinevent } -body { # Windows remembers dirs from previous selections so use # a subdir for this test, not [initialdir] itself set newdir [tcltest::makeDirectory "5 12 8"] set path [tcltest::makeFile "" "testfile" $newdir] set cur [pwd] try { cd $newdir unset -nocomplain x start {set x [tk_getOpenFile \ -initialdir . \ -initialfile "testfile" -title Foo]} then { Click ok } } finally { cd $cur } string equal $x $path } -result 1 test winDialog-5.12.9 {tk_getOpenFile: initial directory: unicode} -constraints { nt testwinevent } -body { set dir [tcltest::makeDirectory "\u0167\u00e9\u015d\u0167"] set path [tcltest::makeFile "" testfile $dir] unset -nocomplain x start {set x [tk_getOpenFile \ -initialdir $dir \ -initialfile "testfile" -title Foo]} then { Click ok } string equal $x $path } -result 1 test winDialog-5.12.10 {tk_getOpenFile: initial directory: nativename} -constraints { nt testwinevent } -body { unset -nocomplain x tcltest::makeFile "" "5 12 10" [initialdir] start {set x [tk_getOpenFile \ -initialdir [file nativename [initialdir]] \ -initialfile "5 12 10" -title Foo]} then { Click ok } return $x } -result [file join [initialdir] "5 12 10"] test winDialog-5.12.11 {tk_getOpenFile: initial directory: relative} -constraints { nt testwinevent } -body { # Windows remembers dirs from previous selections so use # a subdir for this test, not [initialdir] itself set dir [tcltest::makeDirectory "5 12 11"] set path [tcltest::makeFile "" testfile $dir] set cur [pwd] try { cd [file dirname $dir] unset -nocomplain x start {set x [tk_getOpenFile \ -initialdir [file tail $dir] \ -initialfile "testfile" -title Foo]} then { Click ok } } finally { cd $cur } string equal $x $path } -result 1 test winDialog-5.13 {GetFileName: initial file} -constraints { nt testwinevent } -body { # case FILE_INITFILE: start {set x [tk_getSaveFile -initialfile "12x 456" -title Foo]} then { Click ok } file tail $x } -result "12x 456" test winDialog-5.14 {GetFileName: initial file: Tcl_TranslateFileName()} -constraints { nt } -body { # if (Tcl_TranslateFileName(interp, string, &ds) == NULL) tk_getOpenFile -initialfile ~12x/455 } -returnCodes error -result {user "12x" doesn't exist} if {![vista?]} { # XXX - disabled for Vista because the new dialogs allow long file # names to be specified but force the user to change it. test winDialog-5.15 {GetFileName: initial file: long name} -constraints { nt testwinevent } -body { start { set dialogresult [catch { tk_getSaveFile -initialfile [string repeat a 1024] -title Long } x] } then { Click ok } list $dialogresult [string match "invalid filename *" $x] } -result {1 1} } test winDialog-5.16 {GetFileName: parent} -constraints { nt } -body { # case FILE_PARENT: toplevel .t set x 0 start {tk_getOpenFile -parent .t -title Parent; set x 1} then { destroy .t } return $x } -result 1 test winDialog-5.17 {GetFileName: title} -constraints { nt testwinevent } -body { # case FILE_TITLE: start {tk_getOpenFile -title Narf} then { Click cancel } } -result 0 if {[vista?]} { # In the newer file dialogs, the file type widget does not even exist # if no file types specified test winDialog-5.18 {GetFileName: no filter specified} -constraints { nt testwinevent } -body { # if (ofn.lpstrFilter == NULL) start {tk_getOpenFile -title Filter} then { catch {set x [GetText 0x470]} y Click cancel } return $y } -result {Could not find control with id 1136} } else { test winDialog-5.18 {GetFileName: no filter specified} -constraints { nt testwinevent } -body { # if (ofn.lpstrFilter == NULL) start {tk_getOpenFile -title Filter} then { set x [GetText 0x470] Click cancel } return $x } -result {All Files (*.*)} } test winDialog-5.19 {GetFileName: parent HWND doesn't yet exist} -constraints { nt } -setup { destroy .t } -body { # if (Tk_WindowId(parent) == None) toplevel .t start {tk_getOpenFile -parent .t -title Open} then { destroy .t } } -result {} test winDialog-5.20 {GetFileName: parent HWND already exists} -constraints { nt } -setup { destroy .t } -body { toplevel .t update start {tk_getOpenFile -parent .t -title Open} then { destroy .t } } -result {} test winDialog-5.21 {GetFileName: call GetOpenFileName} -constraints { nt testwinevent english } -body { # winCode = GetOpenFileName(&ofn); start {tk_getOpenFile -title Open} then { set x [GetText ok] Click cancel } return $x } -result {&Open} test winDialog-5.22 {GetFileName: call GetSaveFileName} -constraints { nt testwinevent english } -body { # winCode = GetSaveFileName(&ofn); start {tk_getSaveFile -title Save} then { set x [GetText ok] Click cancel } return $x } -result {&Save} test winDialog-5.23 {GetFileName: convert \ to /} -constraints { nt testwinevent } -body { set msg {} start {set x [tk_getSaveFile -title Back]} then { if {[catch {SetText [vista? 0x47C 0x3e9] [file nativename \ [file join [initialdir] "12x 457"]]} msg]} { Click cancel } else { Click ok } } return $x$msg } -cleanup { unset msg } -result [file join [initialdir] "12x 457"] test winDialog-5.24 {GetFileName: file types: MakeFilter() succeeds} -constraints { nt } -body { # MacOS type that is correct, but has embedded nulls. start {set x [catch {tk_getSaveFile -filetypes {{"foo" .foo {\0\0\0\0}}}}]} then { Click cancel } return $x } -result 0 test winDialog-5.25 {GetFileName: file types: MakeFilter() succeeds} -constraints { nt } -body { # MacOS type that is correct, but has embedded high-bit chars. start {set x [catch {tk_getSaveFile -filetypes {{"foo" .foo {\u2022\u2022\u2022\u2022}}}}]} then { Click cancel } return $x } -result 0 test winDialog-6.1 {MakeFilter} -constraints {emptyTest nt} -body {} test winDialog-7.1 {Tk_MessageBoxObjCmd} -constraints {emptyTest nt} -body {} test winDialog-8.1 {OFNHookProc} -constraints {emptyTest nt} -body {} ## The Tk_ChooseDirectoryObjCmd hang on the static build of Windows ## because somehow the GetOpenFileName ends up a noop in the static ## build. ## test winDialog-9.1 {Tk_ChooseDirectoryObjCmd: no arguments} -constraints { nt testwinevent } -body { start {set x [tk_chooseDirectory]} set y [then { Click cancel }] # $x should be "" on a Cancel append x $y } -result 0 test winDialog-9.2 {Tk_ChooseDirectoryObjCmd: one argument} -constraints { nt } -body { tk_chooseDirectory -foo } -returnCodes error -result {bad option "-foo": must be -initialdir, -mustexist, -parent, or -title} test winDialog-9.3 {Tk_ChooseDirectoryObjCmd: many arguments} -constraints { nt testwinevent } -body { start { tk_chooseDirectory -initialdir [initialdir] -mustexist 1 -parent . -title test } then { Click cancel } } -result 0 test winDialog-9.4 {Tk_ChooseDirectoryObjCmd: Tcl_GetIndexFromObj() != TCL_OK} -constraints { nt } -body { tk_chooseDirectory -foo bar -abc } -returnCodes error -result {bad option "-foo": must be -initialdir, -mustexist, -parent, or -title} test winDialog-9.5 {Tk_ChooseDirectoryObjCmd: Tcl_GetIndexFromObj() == TCL_OK} -constraints { nt testwinevent } -body { start {tk_chooseDirectory -title bar} then { Click cancel } } -result 0 test winDialog-9.6 {Tk_ChooseDirectoryObjCmd: valid option, but missing value} -constraints { nt } -body { tk_chooseDirectory -initialdir bar -title } -returnCodes error -result {value for "-title" missing} test winDialog-9.7 {Tk_ChooseDirectoryObjCmd: -initialdir} -constraints { nt testwinevent } -body { # case DIR_INITIAL: start {set x [tk_chooseDirectory -initialdir [initialdir] -title Foo]} then { Click ok } string tolower [set x] } -result [string tolower [initialdir]] test winDialog-9.8 {Tk_ChooseDirectoryObjCmd: initial directory: Tcl_TranslateFilename()} -constraints { nt } -body { # if (Tcl_TranslateFileName(interp, string, # &utfDirString) == NULL) tk_chooseDirectory -initialdir ~12x/455 } -returnCodes error -result {user "12x" doesn't exist} test winDialog-10.1 {Tk_FontchooserObjCmd: no arguments} -constraints { nt testwinevent } -body { start {tk fontchooser show} list [then { Click cancel }] $::testfont } -result {0 {}} test winDialog-10.2 {Tk_FontchooserObjCmd: -initialfont} -constraints { nt testwinevent } -body { start { tk fontchooser configure -command ApplyFont -font system tk fontchooser show } list [then { Click cancel }] $::testfont } -result {0 {}} test winDialog-10.3 {Tk_FontchooserObjCmd: -initialfont} -constraints { nt testwinevent } -body { start { tk fontchooser configure -command ApplyFont -font system tk fontchooser show } list [then { Click 1 }] [expr {[llength $::testfont] ne {}}] } -result {0 1} test winDialog-10.4 {Tk_FontchooserObjCmd: -title} -constraints { nt testwinevent } -body { start { tk fontchooser configure -command ApplyFont -title "tk test" tk fontchooser show } list [then { Click cancel }] $::testfont } -result {0 {}} test winDialog-10.5 {Tk_FontchooserObjCmd: -parent} -constraints { nt testwinevent } -setup { array set a {parent {}} } -body { start { tk fontchooser configure -command ApplyFont -parent . tk fontchooser show } then { array set a [testgetwindowinfo $::tk_dialog] Click cancel } list [expr {$a(parent) == [wm frame .]}] $::testfont } -result {1 {}} test winDialog-10.6 {Tk_FontchooserObjCmd: -apply} -constraints { nt testwinevent } -body { start { tk fontchooser configure -command FooBarBaz tk fontchooser show } then { Click cancel } } -result 0 test winDialog-10.7 {Tk_FontchooserObjCmd: -apply} -constraints { nt testwinevent } -body { start { tk fontchooser configure -command ApplyFont -parent . tk fontchooser show } list [then { Click [expr {0x0402}] ;# value from XP Click cancel }] [expr {[llength $::testfont] > 0}] } -result {0 1} test winDialog-10.8 {Tk_FontchooserObjCmd: -title} -constraints { nt testwinevent } -setup { array set a {text failed} } -body { start { tk fontchooser configure -command ApplyFont -title "Hello" tk fontchooser show } then { array set a [testgetwindowinfo $::tk_dialog] Click cancel } set a(text) } -result "Hello" test winDialog-10.9 {Tk_FontchooserObjCmd: -title} -constraints { nt testwinevent } -setup { array set a {text failed} } -body { start { tk fontchooser configure -command ApplyFont \ -title "\u041f\u0440\u0438\u0432\u0435\u0442" tk fontchooser show } then { array set a [testgetwindowinfo $::tk_dialog] Click cancel } set a(text) } -result "\u041f\u0440\u0438\u0432\u0435\u0442" if {[testConstraint testwinevent]} { catch {testwinevent debug 0} } # cleanup cleanupTests return # Local variables: # mode: tcl # End: tk8.6.14/tests/winClipboard.test0000644003604700454610000000743214554262361015244 0ustar dgp771div# This file is a Tcl script to test out Tk's Windows specific # clipboard code. It is organized in the standard fashion for Tcl # tests. # # This file contains a collection of tests for one or more of the Tcl # built-in commands. Sourcing this file into Tcl runs the tests and # generates output for errors. No output means no errors were found. # # Copyright (c) 1997 by Sun Microsystems, Inc. # Copyright (c) 1998-2000 by Scriptics Corporation. # All rights reserved. package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands namespace import -force tcltest::test ################################################################# # Note that some of these tests may fail if another application # # is grabbing the clipboard (e.g. an X server, or a VNC viewer) # ################################################################# test winClipboard-1.1 {TkSelGetSelection} -constraints win -setup { clipboard clear } -body { selection get -selection CLIPBOARD } -cleanup { clipboard clear } -returnCodes error -result {CLIPBOARD selection doesn't exist or form "STRING" not defined} test winClipboard-1.2 {TkSelGetSelection} -constraints { win testclipboard } -setup { clipboard clear } -body { clipboard append {} list [selection get -selection CLIPBOARD] [testclipboard] } -cleanup { clipboard clear } -result {{} {}} test winClipboard-1.3 {TkSelGetSelection & TkWinClipboardRender} -constraints { win testclipboard } -setup { clipboard clear } -body { clipboard append abcd update list [selection get -selection CLIPBOARD] [testclipboard] } -cleanup { clipboard clear } -result {abcd abcd} test winClipboard-1.4 {TkSelGetSelection & TkWinClipboardRender} -constraints { win testclipboard } -setup { clipboard clear } -body { set map [list "\r" "\\r" "\n" "\\n"] clipboard append "line 1\nline 2" list [string map $map [selection get -selection CLIPBOARD]]\ [string map $map [testclipboard]] } -cleanup { clipboard clear } -result [list "line 1\\nline 2" "line 1\\nline 2"] test winClipboard-1.5 {TkSelGetSelection & TkWinClipboardRender} -constraints { win testclipboard } -setup { clipboard clear } -body { set map [list "\r" "\\r" "\n" "\\n"] clipboard append "line 1\u00c7\nline 2" list [string map $map [selection get -selection CLIPBOARD]]\ [string map $map [testclipboard]] } -cleanup { clipboard clear } -result [list "line 1\u00c7\\nline 2" "line 1\u00c7\\nline 2"] test winClipboard-1.6 {TkSelGetSelection & TkWinClipboardRender} -constraints { win testclipboard } -setup { clipboard clear } -body { clipboard append "\u043f\u0440\u0438\u0432\u0435\u0442 \u043c\u0438\u0444" list [selection get -selection CLIPBOARD] [testclipboard] } -cleanup { clipboard clear } -result [list "\u043f\u0440\u0438\u0432\u0435\u0442 \u043c\u0438\u0444"\ "\u043f\u0440\u0438\u0432\u0435\u0442 \u043c\u0438\u0444"] test winClipboard-2.1 {TkSelUpdateClipboard reentrancy problem} -constraints { win testclipboard } -setup { clipboard clear } -body { clipboard append -type OUR_ACTION "action data" clipboard append "string data" update list [selection get -selection CLIPBOARD -type OUR_ACTION] [testclipboard] } -cleanup { clipboard clear } -result {{action data} {string data}} test winClipboard-2.2 {TkSelUpdateClipboard reentrancy problem} -constraints { win testclipboard } -setup { clipboard clear } -body { clipboard append -type OUR_ACTION "new data" clipboard append "more data in string" update list [testclipboard] [selection get -selection CLIPBOARD -type OUR_ACTION] } -cleanup { clipboard clear } -result {{more data in string} {new data}} # cleanup cleanupTests return # Local variables: # mode: tcl # End: tk8.6.14/tests/winButton.test0000644003604700454610000001547614554262361014627 0ustar dgp771div# This file is a Tcl script to test the Windows specific behavior of # labels, buttons, checkbuttons, and radiobuttons in Tk (i.e., all the # widgets defined in tkWinButton.c). It is organized in the standard # fashion for Tcl tests. # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. package require tcltest 2.2 namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands imageInit proc bogusTrace args { error "trace aborted" } option clear # ---------------------------------------------------------------------- test winbutton-1.1 {TkpComputeButtonGeometry procedure} -constraints { testImageType win nonPortable } -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 { 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 \ -font {{MS Sans Serif} 8} radiobutton .b4 -image image1 -bd 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} list [winfo reqwidth .b1] [winfo reqheight .b1] \ [winfo reqwidth .b2] [winfo reqheight .b2] \ [winfo reqwidth .b3] [winfo reqheight .b3] \ [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows image delete image1 } -result {68 48 70 50 90 52 90 52} test winbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints { win nonPortable } -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 \ -font {{MS Sans Serif} 8} radiobutton .b4 -bitmap question -bd 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} list [winfo reqwidth .b1] [winfo reqheight .b1] \ [winfo reqwidth .b2] [winfo reqheight .b2] \ [winfo reqwidth .b3] [winfo reqheight .b3] \ [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {23 33 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 \ -indicatoron 0 radiobutton .b4 -bitmap question -bd 3 -indicatoron false pack .b1 .b2 .b3 .b4 update # with patch 463234 with native L&F enabled, this returns: # {31 41 23 33 25 35 25 35} list [winfo reqwidth .b1] [winfo reqheight .b1] \ [winfo reqwidth .b2] [winfo reqheight .b2] \ [winfo reqwidth .b3] [winfo reqheight .b3] \ [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {31 41 23 33 27 37 27 37} 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} pack .b1 .b2 .b3 .b4 update list [winfo reqwidth .b1] [winfo reqheight .b1] \ [winfo reqwidth .b2] [winfo reqheight .b2] \ [winfo reqwidth .b3] [winfo reqheight .b3] \ [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {58 24 67 33 88 30 90 28} test winbutton-1.5 {TkpComputeButtonGeometry procedure} -constraints { win nonPortable } -setup { deleteWindows } -body { label .l1 -wraplength 1.5i -padx 0 -pady 0 \ -text "This is a long string that will wrap around on several lines.\n\nIt also has a blank line (above)." pack .l1 update list [winfo reqwidth .l1] [winfo reqheight .l1] } -cleanup { deleteWindows } -result {178 84} test winbutton-1.6 {TkpComputeButtonGeometry procedure} -constraints { win nonPortable } -setup { deleteWindows } -body { label .l1 -padx 0 -pady 0 \ -text "This is a long string without wrapping.\n\nIt also has a blank line (above)." pack .l1 update list [winfo reqwidth .l1] [winfo reqheight .l1] } -cleanup { deleteWindows } -result {222 52} 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 pack .b1 .b2 .b3 .b4 update list [winfo reqwidth .b1] [winfo reqheight .b1] \ [winfo reqwidth .b2] [winfo reqheight .b2] \ [winfo reqwidth .b3] [winfo reqheight .b3] \ [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {74 24 67 97 174 46 64 28} test winbutton-1.8 {TkpComputeButtonGeometry procedure} -constraints { win nonPortable } -setup { deleteWindows } -body { label .b1 -text Xagqpim -bd 2 -padx 0 -pady 2 \ -highlightthickness 4 button .b2 -text Xagqpim -bd 2 -padx 0 -pady 2 \ -highlightthickness 0 checkbutton .b3 -text Xagqpim -bd 2 -padx 1 -pady 1 \ -highlightthickness 1 -indicatoron no radiobutton .b4 -text Xagqpim -bd 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] \ [winfo reqwidth .b4] [winfo reqheight .b4] } -cleanup { deleteWindows } -result {66 32 65 31 69 31 71 29} test winbutton-1.9 {TkpComputeButtonGeometry procedure} -constraints win -setup { deleteWindows } -body { button .b2 -bitmap question -default normal list [winfo reqwidth .b2] [winfo reqheight .b2] } -cleanup { deleteWindows } -result {23 33} # cleanup imageFinish deleteWindows cleanupTests return # Local variables: # mode: tcl # End: tk8.6.14/tests/visual.test0000644003604700454610000003773414554262361014142 0ustar dgp771div# This file is a Tcl script to test the visual- and colormap-handling # procedures in the file tkVisual.c. It is organized in the standard # fashion for Tcl tests. # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. package require tcltest 2.2 namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands update # eatColors -- # Creates a toplevel window and allocates enough colors in it to # use up all the slots in the colormap. # # Arguments: # w - Name of toplevel window to create. proc eatColors {w} { catch {destroy $w} toplevel $w wm geom $w +0+0 canvas $w.c -width 400 -height 200 -bd 0 pack $w.c for {set y 0} {$y < 8} {incr y} { for {set x 0} {$x < 40} {incr x} { set color [format #%02x%02x%02x [expr {$x*6}] [expr {$y*30}] 0] $w.c create rectangle [expr {10*$x}] [expr {20*$y}] \ [expr {10*$x + 10}] [expr {20*$y + 20}] -outline {} \ -fill $color } } update } # colorsFree -- # # Returns 1 if there appear to be free colormap entries in a window, # 0 otherwise. # # Arguments: # w - Name of window in which to check. # red, green, blue - Intensities to use in a trial color allocation # to see if there are colormap entries free. proc colorsFree {w {red 31} {green 245} {blue 192}} { set vals [winfo rgb $w [format #%02x%02x%02x $red $green $blue]] expr {([lindex $vals 0]/256 == $red) && ([lindex $vals 1]/256 == $green) && ([lindex $vals 2]/256 == $blue)} } # If more than one visual type is available for the screen, pick one # that is *not* the default. set default "[winfo visual .] [winfo depth .]" set avail [winfo visualsavailable .] set other {} if {[llength $avail] > 1} { foreach visual $avail { if {$visual != $default} { set other $visual break } } } testConstraint haveOtherVisual [expr {$other ne ""}] testConstraint havePseudocolorVisual [string match *pseudocolor* $avail] testConstraint haveMultipleVisuals [expr {[llength $avail] > 1}] # ---------------------------------------------------------------------- test visual-1.1 {Tk_GetVisual, copying from other window} -body { toplevel .t -visual .foo.bar } -returnCodes error -result {bad window path name ".foo.bar"} test visual-1.2 {Tk_GetVisual, copying from other window} -constraints { haveOtherVisual nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual $other wm geom .t1 +0+0 toplevel .t2 -width 200 -height 80 -visual .t1 wm geom .t2 +5+5 concat "[winfo visual .t2] [winfo depth .t2]" } -cleanup { deleteWindows } -result $other test visual-1.3 {Tk_GetVisual, copying from other window} -constraints { haveOtherVisual } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual $other wm geom .t1 +0+0 toplevel .t2 -width 200 -height 80 -visual . wm geom .t2 +5+5 concat "[winfo visual .t2] [winfo depth .t2]" } -cleanup { deleteWindows } -result $default # Make sure reference count is incremented when copying visual (the # following test will cause the colormap to be freed prematurely if # the reference count isn't incremented). test visual-1.4 {Tk_GetVisual, colormap reference count} -constraints { haveOtherVisual } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual $other wm geom .t1 +0+0 set result [toplevel .t2 -gorp 80 -visual .t1] update return $result } -cleanup { deleteWindows } -returnCodes error -result {unknown option "-gorp"} test visual-1.5 {Tk_GetVisual, default colormap} -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual default wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result $default test visual-2.1 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {truecolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {truecolor 24} test visual-2.2 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {truecolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {truecolor 24} test visual-2.3 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {truecolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {truecolor 24} test visual-2.4 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {truecolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {truecolor 24} test visual-2.5 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {truecolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {truecolor 24} test visual-2.6 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {truecolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {truecolor 24} test visual-2.7 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {truecolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {truecolor 24} test visual-2.8 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {truecolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {truecolor 24} test visual-2.9 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {directcolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {directcolor 24} test visual-2.10 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {directcolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {directcolor 24} test visual-2.11 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {directcolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {directcolor 24} test visual-2.12 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {directcolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {directcolor 24} test visual-2.13 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {directcolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {directcolor 24} test visual-2.14 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {directcolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {directcolor 24} test visual-2.15 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {directcolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {directcolor 24} test visual-2.16 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {directcolor 24} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {directcolor 24} test visual-2.17 {Tk_GetVisual, different visual types} -constraints { nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual {truecolor 32} wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result {truecolor 32} test visual-3.1 {Tk_GetVisual, parsing visual string} -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 \ -visual "[winfo visual .][winfo depth .]" wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" } -cleanup { deleteWindows } -result $default test visual-3.2 {Tk_GetVisual, parsing visual string} -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual goop20 wm geometry .t1 +0+0 } -cleanup { deleteWindows } -returnCodes error -result {unknown or ambiguous visual name "goop20": class must be best, directcolor, grayscale, greyscale, pseudocolor, staticcolor, staticgray, staticgrey, truecolor, or default} test visual-3.3 {Tk_GetVisual, parsing visual string} -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual d wm geometry .t1 +0+0 } -cleanup { deleteWindows } -returnCodes error -result {unknown or ambiguous visual name "d": class must be best, directcolor, grayscale, greyscale, pseudocolor, staticcolor, staticgray, staticgrey, truecolor, or default} test visual-3.4 {Tk_GetVisual, parsing visual string} -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual static wm geometry .t1 +0+0 } -cleanup { deleteWindows } -returnCodes error -result {unknown or ambiguous visual name "static": class must be best, directcolor, grayscale, greyscale, pseudocolor, staticcolor, staticgray, staticgrey, truecolor, or default} test visual-3.5 {Tk_GetVisual, parsing visual string} -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual "pseudocolor 48x" wm geometry .t1 +0+0 } -cleanup { deleteWindows } -returnCodes error -result {expected integer but got "48x"} test visual-4.1 {Tk_GetVisual, numerical visual id} -constraints { haveOtherVisual nonPortable } -setup { deleteWindows toplevel .t1 -width 250 -height 100 -visual $other wm geom .t1 +0+0 toplevel .t2 -width 200 -height 80 -visual [winfo visual .] wm geom .t2 +5+5 toplevel .t3 -width 150 -height 250 -visual [winfo visual .t1] wm geom .t3 +10+10 } -body { set v1 [list [winfo visualid .t2] [winfo visualid .t3]] set v2 [list [winfo visualid .] [winfo visualid .t1]] expr {$v1 eq $v2 ? "OK" : "[list $v1] ne [list $v2]"} } -cleanup { deleteWindows } -result OK test visual-4.2 {Tk_GetVisual, numerical visual id} -setup { deleteWindows } -body { toplevel .t1 -visual 12xyz } -cleanup { deleteWindows } -returnCodes error -result {bad X identifier for visual: "12xyz"} test visual-4.3 {Tk_GetVisual, numerical visual id} -setup { deleteWindows } -body { toplevel .t1 -visual 1291673 } -cleanup { deleteWindows } -returnCodes error -result {couldn't find an appropriate visual} test visual-5.1 {Tk_GetVisual, no matching visual} -constraints { !havePseudocolorVisual } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual "pseudocolor 8" wm geometry .t1 +0+0 } -cleanup { deleteWindows } -returnCodes error -result {couldn't find an appropriate visual} test visual-6.1 {Tk_GetVisual, no matching visual} -constraints { havePseudocolorVisual haveMultipleVisuals nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 -visual "best" wm geometry .t1 +0+0 update winfo visual .t1 } -cleanup { deleteWindows } -result {pseudocolor} # These tests are non-portable due to variations in how many colors # are already in use on the screen. test visual-7.1 {Tk_GetColormap, "new"} -constraints { defaultPseudocolor8 nonPortable } -setup { deleteWindows } -body { eatColors .t1 toplevel .t2 -width 30 -height 20 wm geom .t2 +0+0 update colorsFree .t2 } -cleanup { deleteWindows } -result 0 test visual-7.2 {Tk_GetColormap, "new"} -constraints { defaultPseudocolor8 nonPortable } -setup { deleteWindows } -body { eatColors .t1 toplevel .t2 -width 30 -height 20 -colormap new wm geom .t2 +0+0 update colorsFree .t2 } -cleanup { deleteWindows } -result 1 test visual-7.3 {Tk_GetColormap, copy from other window} -constraints { defaultPseudocolor8 nonPortable } -setup { deleteWindows } -body { eatColors .t1 toplevel .t3 -width 400 -height 50 -colormap new wm geom .t3 +0+0 toplevel .t2 -width 30 -height 20 -colormap .t3 wm geom .t2 +0+0 update destroy .t3 colorsFree .t2 } -cleanup { deleteWindows } -result 1 test visual-7.4 {Tk_GetColormap, copy from other window} -constraints { defaultPseudocolor8 nonPortable } -setup { deleteWindows } -body { eatColors .t1 toplevel .t3 -width 400 -height 50 -colormap new wm geom .t3 +0+0 toplevel .t2 -width 30 -height 20 -colormap . wm geom .t2 +0+0 update destroy .t3 colorsFree .t2 } -cleanup { deleteWindows } -result 0 test visual-7.5 {Tk_GetColormap, copy from other window} -constraints { defaultPseudocolor8 nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 400 -height 50 -colormap .choke.lots } -cleanup { deleteWindows } -returnCodes error -result {bad window path name ".choke.lots"} test visual-7.6 {Tk_GetColormap, copy from other window} -constraints { defaultPseudocolor8 haveOtherVisual nonPortable } -setup { deleteWindows } -body { toplevel .t1 -width 300 -height 150 -visual $other wm geometry .t1 +0+0 toplevel .t2 -width 400 -height 50 -colormap .t1 } -cleanup { deleteWindows } -returnCodes error -result {can't use colormap for .t1: incompatible visuals} test visual-8.1 {Tk_FreeColormap procedure} -setup { deleteWindows } -body { toplevel .t1 -width 300 -height 180 -colormap new wm geometry .t1 +0+0 foreach i {.t2 .t3 .t4} { toplevel $i -width 250 -height 150 -colormap .t1 wm geometry $i +0+0 } destroy .t1 destroy .t3 destroy .t4 update } -cleanup { deleteWindows } -result {} test visual-8.2 {Tk_FreeColormap procedure} -constraints haveOtherVisual -setup { deleteWindows } -body { toplevel .t1 -width 300 -height 180 -visual $other wm geometry .t1 +0+0 foreach i {.t2 .t3 .t4} { toplevel $i -width 250 -height 150 -visual $other wm geometry $i +0+0 } destroy .t2 destroy .t3 destroy .t4 update } -cleanup { deleteWindows } -result {} deleteWindows rename eatColors {} rename colorsFree {} # cleanup cleanupTests return # Local variables: # mode: tcl # End: tk8.6.14/tests/visual_bb.test0000644003604700454610000000777414554262361014606 0ustar dgp771div#!/usr/local/bin/wish -f # # This script displays provides visual tests for many of Tk's features. # Each test displays a window with various information in it, along # with instructions about how the window should appear. You can look # at the window to make sure it appears as expected. Individual tests # are kept in separate ".tcl" files in this directory. package require tcltest 2.2 namespace import ::tcltest::* tcltest::configure {*}$argv tcltest::loadTestedCommands set auto_path ". $auto_path" wm title . "Visual Tests for Tk" set testNum 1 # Each menu entry invokes a visual test file proc runTest {file} { global testNum test "2.$testNum" "testing $file" {userInteraction} { uplevel \#0 source [file join [testsDirectory] $file] concat "" } {} incr testNum } # The following procedure is invoked to print the contents of a canvas: proc lpr {c args} { exec lpr <<[eval [list $c postscript] $args] } proc end {} { cleanupTests set ::EndOfVisualTests 1 } # ---------------------------------------------------------------------- test 1.1 {running visual tests} -constraints userInteraction -body { #------------------------------------------------------- # The code below create the main window, consisting of a # menu bar and a message explaining the basic operation # of the program. #------------------------------------------------------- frame .menu -relief raised -borderwidth 1 message .msg -font {Times 18} -relief raised -width 4i \ -borderwidth 1 -text "This application provides a collection of visual tests for the Tk toolkit. Each menu entry invokes a test, which displays information on the screen. You can then verify visually that the information is being displayed in the correct way. The tests under the \"Postscript\" menu exercise the Postscript-generation capabilities of canvas widgets." pack .menu -side top -fill x pack .msg -side bottom -expand yes -fill both #------------------------------------------------------- # The code below creates all the menus, which invoke procedures # to create particular demonstrations of various widgets. #------------------------------------------------------- menubutton .menu.file -text "File" -menu .menu.file.m menu .menu.file.m .menu.file.m add command -label "Quit" -command end menubutton .menu.group1 -text "Group 1" -menu .menu.group1.m menu .menu.group1.m .menu.group1.m add command -label "Canvas arcs" -command {runTest arc.tcl} .menu.group1.m add command -label "Beveled borders in text widgets" \ -command {runTest bevel.tcl} .menu.group1.m add command -label "Colormap management" \ -command {runTest cmap.tcl} .menu.group1.m add command -label "Label/button geometry" \ -command {runTest butGeom.tcl} .menu.group1.m add command -label "Label/button colors" \ -command {runTest butGeom2.tcl} menubutton .menu.ps -text "Canvas Postscript" -menu .menu.ps.m menu .menu.ps.m .menu.ps.m add command -label "Rectangles and other graphics" \ -command {runTest canvPsGrph.tcl} .menu.ps.m add command -label "Text" \ -command {runTest canvPsText.tcl} .menu.ps.m add command -label "Bitmaps" \ -command {runTest canvPsBmap.tcl} .menu.ps.m add command -label "Images" \ -command {runTest canvPsImg.tcl} .menu.ps.m add command -label "Arcs" \ -command {runTest canvPsArc.tcl} pack .menu.file .menu.group1 .menu.ps -side left -padx 1m # Set up for keyboard-based menu traversal bind . { if {("%d" == "NotifyVirtual") && ("%m" == "NotifyNormal")} { focus .menu } } tk_menuBar .menu .menu.file .menu.group1 .menu.ps # Set up a class binding to allow objects to be deleted from a canvas # by clicking with mouse button 1: bind Canvas <1> {%W delete [%W find closest %x %y]} concat "" } -result {} if {![testConstraint userInteraction]} { cleanupTests } else { vwait EndOfVisualTests } tk8.6.14/tests/util.test0000644003604700454610000000443614554262361013605 0ustar dgp771div# This file is a Tcl script to test out the procedures in the file # tkUtil.c. It is organized in the standard fashion for Tcl tests. # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. 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 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 } -returnCodes error -result {wrong # args: should be ".l yview moveto fraction"} test util-1.2 {Tk_GetScrollInfo procedure} -body { .l yview moveto xyz } -returnCodes error -result {expected floating-point number but got "xyz"} test util-1.3 {Tk_GetScrollInfo procedure} -body { .l yview 0 .l yview moveto .5 .l yview } -result {0.5 0.75} test util-1.4 {Tk_GetScrollInfo procedure} -body { .l yview scroll a } -returnCodes error -result {wrong # args: should be ".l yview scroll number units|pages"} test util-1.5 {Tk_GetScrollInfo procedure} -body { .l yview scroll a b c } -returnCodes error -result {wrong # args: should be ".l yview scroll number units|pages"} test util-1.6 {Tk_GetScrollInfo procedure} -body { .l yview scroll xyz units } -returnCodes error -result {expected integer but got "xyz"} test util-1.7 {Tk_GetScrollInfo procedure} -body { .l yview 0 .l yview scroll 2 pages .l nearest 0 } -result 6 test util-1.8 {Tk_GetScrollInfo procedure} -body { .l yview 15 .l yview scroll -2 pages .l nearest 0 } -result 9 test util-1.9 {Tk_GetScrollInfo procedure} -body { .l yview 0 .l yview scroll 2 units .l nearest 0 } -result 2 test util-1.10 {Tk_GetScrollInfo procedure} -body { .l yview 15 .l yview scroll -2 units .l nearest 0 } -result 13 test util-1.11 {Tk_GetScrollInfo procedure} -body { .l yview scroll 3 zips } -returnCodes error -result {bad argument "zips": must be units or pages} test util-1.12 {Tk_GetScrollInfo procedure} -body { .l yview dropdead 3 times } -returnCodes error -result {unknown option "dropdead": must be moveto or scroll} # cleanup cleanupTests return tk8.6.14/tests/unixWm.test0000644003604700454610000025453214554262361014123 0ustar dgp771div# This file is a Tcl script to test out Tk's interactions with # the window manager, including the "wm" command. It is organized # in the standard fashion for Tcl tests. # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands namespace import -force ::tk::test:loadTkCommand testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }] # Starting with macOS Ventura it became necessary to wait for windows to be restacked # or to be raised after creation. if {[tk windowingsystem] eq "aqua"} { proc restackDelay {} { after 200; update idletasks } } else { proc restackDelay {} {} } proc sleep ms { global x after $ms {set x 1} vwait x } # Procedure to set up a collection of top-level windows proc makeToplevels {} { deleteWindows foreach i {.raise1 .raise2 .raise3} { toplevel $i wm geom $i 150x100+0+0 update } } # On macOS windows are not allowed to overlap the menubar at the top of the # screen or the dock. So tests which move a window and then check whether it # got moved to the requested location should use a y coordinate larger than the # height of the menubar (normally 23 pixels) and an x coordinate larger than the # width of the dock, if it happens to be on the left. if {[tk windowingsystem] eq "aqua"} { set mb [expr [menubarheight] + 1] set X 100 set Y0 $mb set Y2 [expr $mb + 2] set Y5 [expr $mb + 5] } else { set X 20 set Y0 0 set Y2 2 set Y5 5 } set i 1 foreach geom "+$X+80 +80+$Y0 +$X+$Y0" { destroy .t test unixWm-1.$i {initial window position} unix { toplevel .t -width 200 -height 150 wm geom .t $geom update wm geom .t } 200x150$geom incr i } # The tests below are tricky because window managers don't all move # windows correctly. Try one motion and compute the window manager's # error, then factor this error into the actual tests. In other words, # this just makes sure that things are consistent between moves. set i 1 destroy .t toplevel .t -width 100 -height 150 wm geom .t +200+200 update wm geom .t +150+150 update scan [wm geom .t] %dx%d+%d+%d width height x y set xerr [expr 150-$x] set yerr [expr 150-$y] foreach geom "+20+80 +80+$Y0 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" { test unixWm-2.$i {moving window while mapped} unix { wm geom .t $geom update scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign \ [eval expr $y$ysign$yerr] } $geom incr i } set i 1 foreach geom "+20+80 +80+$Y0 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" { test unixWm-3.$i {moving window while iconified} unix { wm iconify .t update idletasks wm geom .t $geom update idletasks wm deiconify .t update idletasks scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign \ [eval expr $y$ysign$yerr] } $geom incr i } set i 1 foreach geom "+$X+80 +$X+40 +$X+$Y0" { test unixWm-4.$i {moving window while withdrawn} unix { wm withdraw .t sleep 10 wm geom .t $geom update idletasks wm deiconify .t sleep 10 wm geom .t } 100x150$geom incr i } test unixWm-5.1 {compounded state changes} {unix nonPortable} { destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update wm withdraw .t wm deiconify .t list [winfo ismapped .t] [wm state .t] } {1 normal} test unixWm-5.2 {compounded state changes} {unix nonPortable} { destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update wm withdraw .t wm deiconify .t wm withdraw .t list [winfo ismapped .t] [wm state .t] } {0 withdrawn} test unixWm-5.3 {compounded state changes} {unix nonPortable} { destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update wm iconify .t wm deiconify .t wm iconify .t wm deiconify .t list [winfo ismapped .t] [wm state .t] } {1 normal} test unixWm-5.4 {compounded state changes} {unix nonPortable} { destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update wm iconify .t wm deiconify .t wm iconify .t list [winfo ismapped .t] [wm state .t] } {0 iconic} test unixWm-5.5 {compounded state changes} {unix nonPortable} { destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update wm iconify .t wm withdraw .t list [winfo ismapped .t] [wm state .t] } {0 withdrawn} test unixWm-5.6 {compounded state changes} {unix nonPortable} { destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update wm iconify .t wm withdraw .t wm deiconify .t list [winfo ismapped .t] [wm state .t] } {1 normal} test unixWm-5.7 {compounded state changes} {unix nonPortable} { destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update wm withdraw .t wm iconify .t list [winfo ismapped .t] [wm state .t] } {0 iconic} destroy .t toplevel .t -width 200 -height 100 wm geom .t +100+$Y0 wm minsize .t 1 1 update test unixWm-6.1 {size changes} unix { .t config -width 180 -height 150 update wm geom .t } 180x150+100+$Y0 test unixWm-6.2 {size changes} unix { wm geom .t 250x60 .t config -width 170 -height 140 update wm geom .t } 250x60+100+$Y0 test unixWm-6.3 {size changes} unix { wm geom .t 250x60 .t config -width 170 -height 140 wm geom .t {} update wm geom .t } 170x140+100+$Y0 test unixWm-6.4 {size changes} {unix nonPortable userInteraction} { wm minsize .t 1 1 update puts stdout "Please resize window \"t\" with the mouse (but don't move it!)," puts -nonewline stdout "then hit return: " flush stdout gets stdin update set width [winfo width .t] set height [winfo height .t] .t config -width 230 -height 110 update incr width -[winfo width .t] incr height -[winfo height .t] wm geom .t {} update set w2 [winfo width .t] set h2 [winfo height .t] .t config -width 114 -height 261 update list $width $height $w2 $h2 [wm geom .t] } {0 0 230 110 114x261+10+10} test unixWm-6.5 {window initially iconic} {unix nonPortable} { destroy .t toplevel .t -width 100 -height 30 wm geometry .t +0+0 wm title .t 2 wm iconify .t update idletasks wm withdraw .t wm deiconify .t list [winfo ismapped .t] [wm state .t] } {1 normal} destroy .m toplevel .m wm overrideredirect .m 1 foreach i {{Test label} Another {Yet another} {Last label}} j {1 2 3} { label .m.$j -text $i } wm geometry .m +[expr 100 - [winfo vrootx .]]+[expr 200 - [winfo vrooty .]] update test unixWm-7.1 {override_redirect and Tk_MoveTopLevelWindow} unix { list [winfo ismapped .m] [wm state .m] [winfo x .m] [winfo y .m] } {1 normal 100 200} wm geometry .m +[expr 150 - [winfo vrootx .]]+[expr 210 - [winfo vrooty .]] update test unixWm-7.2 {override_redirect and Tk_MoveTopLevelWindow} unix { list [winfo ismapped .m] [wm state .m] [winfo x .m] [winfo y .m] } {1 normal 150 210} wm withdraw .m test unixWm-7.3 {override_redirect and Tk_MoveTopLevelWindow} unix { list [winfo ismapped .m] } 0 destroy .m destroy .t 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 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 toplevel .t -width 100 -height 30 list [catch {wm iconwindow} msg] $msg } {1 {wrong # args: should be "wm option window ?arg ...?"}} test unixWm-8.3 {icon windows} unix { destroy .t toplevel .t -width 100 -height 30 list [catch {wm iconwindow .t b c} msg] $msg } {1 {wrong # args: should be "wm iconwindow window ?pathName?"}} test unixWm-8.4 {icon windows} {unix failsOnUbuntu failsOnXQuarz} { destroy .t 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 wm iconwindow .t .icon lappend result [wm iconwindow .t] [wm state .icon] wm iconwindow .t {} lappend result [wm iconwindow .t] [wm state .icon] update lappend result [winfo ismapped .t] [winfo ismapped .icon] wm iconify .t update idletasks lappend result [winfo ismapped .t] [winfo ismapped .icon] } {.icon icon {} withdrawn 1 0 0 0} test unixWm-8.5 {icon windows} unix { destroy .t toplevel .t -width 100 -height 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 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 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 wm geom .icon +0+0 update set result [winfo ismapped .icon] toplevel .t -width 100 -height 30 wm geom .t +0+0 tkwait visibility .t ;# Needed to keep tvtwm happy. wm iconwindow .t .icon lappend result [winfo ismapped .t] [winfo ismapped .icon] } {1 1 0} test unixWm-8.9 {icon windows} {unix nonPortable} { # This test is non-portable because some window managers will # 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 wm geom .t +0+0 wm iconwindow .t .icon update set result "[wm state .icon] [winfo ismapped .t] [winfo ismapped .icon]" destroy .t wm geom .icon +0+0 update lappend result [winfo ismapped .icon] [wm state .icon] wm deiconify .icon update lappend result [winfo ismapped .icon] [wm state .icon] } {icon 1 0 0 withdrawn 1 normal} test unixWm-8.10.1 {test for memory leaks} unix { wm title .t "This is a long long long long long long title" wm title .t "This is a long long long long long long title" wm title .t "This is a long long long long long long title" wm title .t "This is a long long long long long long title" wm title .t "This is a long long long long long long title" wm title .t "This is a long long long long long long title" wm title .t "This is a long long long long long long title" wm title .t "This is a long long long long long long title" set x 1 } 1 test unixWm-8.10.2 {test for memory leaks} unix { wm group .t . wm group .t . wm group .t . wm group .t . wm group .t . wm group .t . wm group .t . wm group .t . wm group .t . wm group .t . set x 1 } 1 test unixWm-9.1 {TkWmMapWindow procedure, client property} {unix testwrapper} { destroy .t toplevel .t -width 100 -height 50 wm geom .t +0+0 wm client .t Test_String update testprop [testwrapper .t] WM_CLIENT_MACHINE } {Test_String} test unixWm-9.2 {TkWmMapWindow procedure, command property} {unix testwrapper} { destroy .t toplevel .t -width 100 -height 50 wm geom .t +0+0 wm command .t "test command" update testprop [testwrapper .t] WM_COMMAND } {test command } test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} unix { destroy .t toplevel .t -width 100 -height 300 -bg 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 tkwait visibility .t wm iconwindow . .t update set result [winfo ismapped .t] } 0 test unixWm-9.5 {TkWmMapWindow procedure, normal windows} unix { destroy .t toplevel .t -width 200 -height 20 wm geom .t +0+0 update winfo ismapped .t } 1 test unixWm-10.1 {TkWmDeadWindow procedure, canceling UpdateGeometry idle handler} unix { destroy .t toplevel .t -width 100 -height 50 wm geom .t +0+0 update .t configure -width 200 -height 100 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 wm geom .t +0+0 update frame .f -width 400 -height 30 -bd 2 -relief raised -bg green bind .f {lappend result destroyed} testmenubar window .t .f update set result {} destroy .t lappend result [winfo exists .f] } {destroyed 0} test unixWm-11.1 {Tk_WmCmd procedure, miscellaneous errors} unix { list [catch {wm} msg] $msg } {1 {wrong # args: should be "wm option window ?arg ...?"}} test unixWm-11.2 {Tk_WmCmd procedure, miscellaneous errors} unix { list [catch {wm aspect} msg] $msg } {1 {wrong # args: should be "wm option window ?arg ...?"}} test unixWm-11.3 {Tk_WmCmd procedure, miscellaneous errors} unix { list [catch {wm iconify bogus} msg] $msg } {1 {bad window path name "bogus"}} test unixWm-11.4 {Tk_WmCmd procedure, miscellaneous errors} unix { destroy .b button .b -text hello list [catch {wm geometry .b} msg] $msg } {1 {window ".b" isn't a top-level window}} destroy .t destroy .icon toplevel .t -width 100 -height 50 wm geom .t +0+0 update test unixWm-12.1 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 12} msg] $msg } {1 {wrong # args: should be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"}} test unixWm-12.2 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 12 13 14 15 16} msg] $msg } {1 {wrong # args: should be "wm aspect window ?minNumer minDenom maxNumer maxDenom?"}} test unixWm-12.3 {Tk_WmCmd procedure, "aspect" option} unix { set result {} lappend result [wm aspect .t] wm aspect .t 3 4 10 2 lappend result [wm aspect .t] wm aspect .t {} {} {} {} lappend result [wm aspect .t] } {{} {3 4 10 2} {}} test unixWm-12.4 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t bad 14 15 16} msg] $msg } {1 {expected integer but got "bad"}} test unixWm-12.5 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 13 foo 15 16} msg] $msg } {1 {expected integer but got "foo"}} test unixWm-12.6 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 13 14 bar 16} msg] $msg } {1 {expected integer but got "bar"}} test unixWm-12.7 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 13 14 15 baz} msg] $msg } {1 {expected integer but got "baz"}} test unixWm-12.8 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 0 14 15 16} msg] $msg } {1 {aspect number can't be <= 0}} test unixWm-12.9 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 13 0 15 16} msg] $msg } {1 {aspect number can't be <= 0}} test unixWm-12.10 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 13 14 0 16} msg] $msg } {1 {aspect number can't be <= 0}} test unixWm-12.11 {Tk_WmCmd procedure, "aspect" option} unix { list [catch {wm aspect .t 13 14 15 0} msg] $msg } {1 {aspect number can't be <= 0}} test unixWm-13.1 {Tk_WmCmd procedure, "client" option} unix { list [catch {wm client .t x y} msg] $msg } {1 {wrong # args: should be "wm client window ?name?"}} test unixWm-13.2 {Tk_WmCmd procedure, "client" option} {unix testwrapper} { set result {} lappend result [wm client .t] wm client .t Test_String lappend result [testprop [testwrapper .t] WM_CLIENT_MACHINE] wm client .t New lappend result [wm client .t] wm client .t {} lappend result [wm client .t] [testprop [testwrapper .t] WM_CLIENT_MACHINE] } {{} Test_String New {} {}} test unixWm-13.3 {Tk_WmCmd procedure, "client" option, unmapped window} unix { destroy .t2 toplevel .t2 wm client .t2 Test_String wm client .t2 {} wm client .t2 Test_String destroy .t2 } {} test unixWm-14.1 {Tk_WmCmd procedure, "colormapwindows" option} unix { list [catch {wm colormapwindows .t 12 13} msg] $msg } {1 {wrong # args: should be "wm colormapwindows window ?windowList?"}} test unixWm-14.2 {Tk_WmCmd procedure, "colormapwindows" option} unix { destroy .t2 toplevel .t2 -width 200 -height 200 -colormap new wm geom .t2 +0+0 frame .t2.a -width 100 -height 30 frame .t2.b -width 100 -height 30 -colormap new pack .t2.a .t2.b -side top update set x [wm colormapwindows .t2] frame .t2.c -width 100 -height 30 -colormap new pack .t2.c -side top update list $x [wm colormapwindows .t2] } {{.t2.b .t2} {.t2.b .t2.c .t2}} test unixWm-14.3 {Tk_WmCmd procedure, "colormapwindows" option} unix { list [catch {wm col . "a \{"} msg] $msg } {1 {unmatched open brace in list}} test unixWm-14.4 {Tk_WmCmd procedure, "colormapwindows" option} unix { list [catch {wm colormapwindows . foo} msg] $msg } {1 {bad window path name "foo"}} test unixWm-14.5 {Tk_WmCmd procedure, "colormapwindows" option} unix { destroy .t2 toplevel .t2 -width 200 -height 200 -colormap new wm geom .t2 +0+0 frame .t2.a -width 100 -height 30 frame .t2.b -width 100 -height 30 frame .t2.c -width 100 -height 30 pack .t2.a .t2.b .t2.c -side top wm colormapwindows .t2 {.t2.c .t2 .t2.a} wm colormapwindows .t2 } {.t2.c .t2 .t2.a} test unixWm-14.6 {Tk_WmCmd procedure, "colormapwindows" option} unix { destroy .t2 toplevel .t2 -width 200 -height 200 wm geom .t2 +0+0 frame .t2.a -width 100 -height 30 frame .t2.b -width 100 -height 30 frame .t2.c -width 100 -height 30 pack .t2.a .t2.b .t2.c -side top wm colormapwindows .t2 {.t2.b .t2.a} wm colormapwindows .t2 } {.t2.b .t2.a} test unixWm-14.7 {Tk_WmCmd procedure, "colormapwindows" option} unix { destroy .t2 toplevel .t2 -width 200 -height 200 -colormap new wm geom .t2 +0+0 set x [wm colormapwindows .t2] wm colormapwindows .t2 {} list $x [wm colormapwindows .t2] } {{} {}} destroy .t2 test unixWm-15.1 {Tk_WmCmd procedure, "command" option} unix { list [catch {wm command .t 12 13} msg] $msg } {1 {wrong # args: should be "wm command window ?value?"}} test unixWm-15.2 {Tk_WmCmd procedure, "command" option} unix { list [catch {wm command .t 12 13} msg] $msg } {1 {wrong # args: should be "wm command window ?value?"}} test unixWm-15.3 {Tk_WmCmd procedure, "command" option} {unix testwrapper} { set result {} lappend result [wm command .t] wm command .t "test command" lappend result [testprop [testwrapper .t] WM_COMMAND] wm command .t "new command" lappend result [wm command .t] wm command .t {} lappend result [wm command .t] [testprop [testwrapper .t] WM_COMMAND] } {{} {test command } {new command} {} {}} test unixWm-15.4 {Tk_WmCmd procedure, "command" option, window not mapped} unix { destroy .t2 toplevel .t2 wm geom .t2 +0+0 wm command .t2 "test command" wm command .t2 "new command" wm command .t2 {} destroy .t2 } {} test unixWm-15.5 {Tk_WmCmd procedure, "command" option} unix { list [catch {wm command .t "a \{b"} msg] $msg } {1 {unmatched open brace in list}} 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 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}} test unixWm-16.3 {Tk_WmCmd procedure, "deiconify" option} {unix failsOnUbuntu failsOnXQuarz} { wm iconify .t set result {} lappend result [winfo ismapped .t] [wm state .t] wm deiconify .t lappend result [winfo ismapped .t] [wm state .t] } {0 iconic 1 normal} test unixWm-17.1 {Tk_WmCmd procedure, "focusmodel" option} unix { list [catch {wm focusmodel .t 12 13} msg] $msg } {1 {wrong # args: should be "wm focusmodel window ?active|passive?"}} test unixWm-17.2 {Tk_WmCmd procedure, "focusmodel" option} unix { list [catch {wm focusmodel .t bogus} msg] $msg } {1 {bad argument "bogus": must be active or passive}} test unixWm-17.3 {Tk_WmCmd procedure, "focusmodel" option} unix { set result {} lappend result [wm focusmodel .t] wm focusmodel .t active lappend result [wm focusmodel .t] wm focusmodel .t passive lappend result [wm focusmodel .t] set result } {passive active passive} test unixWm-18.1 {Tk_WmCmd procedure, "frame" option} unix { list [catch {wm frame .t 12} msg] $msg } {1 {wrong # args: should be "wm frame window"}} test unixWm-18.2 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} { expr [wm frame .t] == [winfo id .t] } 0 test unixWm-18.3 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} { destroy .t2 toplevel .t2 wm geom .t2 +0+0 wm overrideredirect .t2 1 update set result [expr [wm frame .t2] == [winfo id .t2]] destroy .t2 set result } 1 test unixWm-19.1 {Tk_WmCmd procedure, "geometry" option} unix { list [catch {wm geometry .t 12 13} msg] $msg } {1 {wrong # args: should be "wm geometry window ?newGeometry?"}} test unixWm-19.2 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} { wm geometry .t -1+5 update wm geometry .t } {100x50-1+5} test unixWm-19.3 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} { wm geometry .t +10-4 update wm geometry .t } {100x50+10-4} test unixWm-19.4 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} { destroy .t2 toplevel .t2 wm geom .t2 -5+10 listbox .t2.l -width 30 -height 12 -setgrid 1 pack .t2.l update set result [wm geometry .t2] destroy .t2 set result } {30x12-5+10} test unixWm-19.5 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} { wm geometry .t 150x300+5+6 update set result {} lappend result [wm geometry .t] wm geometry .t {} update lappend result [wm geometry .t] } {150x300+5+6 100x50+5+6} test unixWm-19.6 {Tk_WmCmd procedure, "geometry" option} unix { list [catch {wm geometry .t qrs} msg] $msg } {1 {bad geometry specifier "qrs"}} test unixWm-20.1 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 12 13} msg] $msg } {1 {wrong # args: should be "wm grid window ?baseWidth baseHeight widthInc heightInc?"}} test unixWm-20.2 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 12 13 14 15 16} msg] $msg } {1 {wrong # args: should be "wm grid window ?baseWidth baseHeight widthInc heightInc?"}} test unixWm-20.3 {Tk_WmCmd procedure, "grid" option} unix { set result {} lappend result [wm grid .t] wm grid .t 5 6 20 10 lappend result [wm grid .t] wm grid .t {} {} {} {} lappend result [wm grid .t] } {{} {5 6 20 10} {}} test unixWm-20.4 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t bad 10 11 12} msg] $msg } {1 {expected integer but got "bad"}} test unixWm-20.5 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t -1 11 12 13} msg] $msg } {1 {baseWidth can't be < 0}} test unixWm-20.6 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 foo 12 13} msg] $msg } {1 {expected integer but got "foo"}} test unixWm-20.7 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 -11 12 13} msg] $msg } {1 {baseHeight can't be < 0}} test unixWm-20.8 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 11 bar 13} msg] $msg } {1 {expected integer but got "bar"}} test unixWm-20.9 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 11 -2 13} msg] $msg } {1 {widthInc can't be <= 0}} test unixWm-20.10 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 11 12 bogus} msg] $msg } {1 {expected integer but got "bogus"}} test unixWm-20.11 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 11 12 -1} msg] $msg } {1 {heightInc can't be <= 0}} destroy .t destroy .icon toplevel .t -width 100 -height 50 wm geom .t +0+0 update test unixWm-21.1 {Tk_WmCmd procedure, "group" option} unix { list [catch {wm group .t 12 13} msg] $msg } {1 {wrong # args: should be "wm group window ?pathName?"}} test unixWm-21.2 {Tk_WmCmd procedure, "group" option} unix { list [catch {wm group .t bogus} msg] $msg } {1 {bad window path name "bogus"}} test unixWm-21.3 {Tk_WmCmd procedure, "group" option} {unix testwrapper} { set result {} lappend result [wm group .t] wm group .t . set bit [format 0x%x [expr 0x40 & [lindex [testprop [testwrapper .t] \ WM_HINTS] 0]]] lappend result [wm group .t] $bit wm group .t {} set bit [format 0x%x [expr 0x40 & [lindex [testprop [testwrapper .t] \ WM_HINTS] 0]]] lappend result [wm group .t] $bit } {{} . 0x40 {} 0x0} test unixWm-21.4 {Tk_WmCmd procedure, "group" option, make window exist} {unix testwrapper} { destroy .t2 toplevel .t2 wm geom .t2 +0+0 wm group .t .t2 set hints [testprop [testwrapper .t] WM_HINTS] set result [expr [testwrapper .t2] - [lindex $hints 8]] destroy .t2 set result } 0 test unixWm-21.5 {Tk_WmCmd procedure, "group" option, create leader wrapper} {unix testwrapper} { destroy .t2 destroy .t3 toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 toplevel .t3 -width 120 -height 300 wm geometry .t2 +0+0 set result [list [testwrapper .t2]] wm group .t3 .t2 lappend result [expr {[testwrapper .t2] == ""}] destroy .t2 .t3 set result } {{} 0} test unixWm-22.1 {Tk_WmCmd procedure, "iconbitmap" option} unix { list [catch {wm iconbitmap .t 12 13} msg] $msg } {1 {wrong # args: should be "wm iconbitmap window ?bitmap?"}} test unixWm-22.2 {Tk_WmCmd procedure, "iconbitmap" option} {unix testwrapper} { set result {} lappend result [wm iconbitmap .t] wm iconbitmap .t questhead set bit [format 0x%x [expr 0x4 & [lindex [testprop [testwrapper .t] \ WM_HINTS] 0]]] lappend result [wm iconbitmap .t] $bit wm iconbitmap .t {} set bit [format 0x%x [expr 0x4 & [lindex [testprop [testwrapper .t] \ WM_HINTS] 0]]] lappend result [wm iconbitmap .t] $bit } {{} questhead 0x4 {} 0x0} if {[tk windowingsystem] eq "aqua"} { set result_22_3 {0 {}} } else { set result_22_3 {1 {bitmap "bad-bitmap" not defined}} } test unixWm-22.3 {Tk_WmCmd procedure, "iconbitmap" option for unix only} \ unix { list [catch {wm iconbitmap .t bad-bitmap} msg] $msg } $result_22_3 test unixWm-23.1 {Tk_WmCmd procedure, "iconify" option} unix { list [catch {wm iconify .t 12} msg] $msg } {1 {wrong # args: should be "wm iconify window"}} test unixWm-23.2 {Tk_WmCmd procedure, "iconify" option} unix { destroy .t2 toplevel .t2 wm overrideredirect .t2 1 set result [list [catch {wm iconify .t2} msg] $msg] destroy .t2 set result } {1 {can't iconify ".t2": override-redirect flag is set}} test unixWm-23.3 {Tk_WmCmd procedure, "iconify" option} unix { destroy .t2 toplevel .t2 wm geom .t2 +0+0 wm transient .t2 .t set result [list [catch {wm iconify .t2} msg] $msg] destroy .t2 set result } {1 {can't iconify ".t2": it is a transient}} test unixWm-23.4 {Tk_WmCmd procedure, "iconify" option} unix { destroy .t2 toplevel .t2 wm geom .t2 +0+0 wm iconwindow .t .t2 set result [list [catch {wm iconify .t2} msg] $msg] destroy .t2 set result } {1 {can't iconify .t2: it is an icon for .t}} test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} {unix failsOnUbuntu failsOnXQuarz} { destroy .t2 toplevel .t2 wm geom .t2 +0+0 update idletasks wm iconify .t2 update idletasks set result [winfo ismapped .t2] destroy .t2 set result } 0 test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} {unix failsOnUbuntu failsOnXQuarz} { destroy .t2 toplevel .t2 wm geom .t2 -0+0 update idletasks set result [winfo ismapped .t2] wm iconify .t2 update idletasks lappend result [winfo ismapped .t2] destroy .t2 set result } {1 0} test unixWm-24.1 {Tk_WmCmd procedure, "iconmask" option} unix { list [catch {wm iconmask .t 12 13} msg] $msg } {1 {wrong # args: should be "wm iconmask window ?bitmap?"}} test unixWm-24.2 {Tk_WmCmd procedure, "iconmask" option} {unix testwrapper} { set result {} lappend result [wm iconmask .t] wm iconmask .t questhead set bit [format 0x%x [expr 0x20 & [lindex [testprop [testwrapper .t] \ WM_HINTS] 0]]] lappend result [wm iconmask .t] $bit wm iconmask .t {} set bit [format 0x%x [expr 0x20 & [lindex [testprop [testwrapper .t] \ WM_HINTS] 0]]] lappend result [wm iconmask .t] $bit } {{} questhead 0x20 {} 0x0} test unixWm-24.3 {Tk_WmCmd procedure, "iconmask" option} unix { list [catch {wm iconmask .t bogus} msg] $msg } {1 {bitmap "bogus" not defined}} test unixWm-25.1 {Tk_WmCmd procedure, "iconname" option} unix { list [catch {wm icon .t} msg] $msg } {1 {ambiguous option "icon": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, forget, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, manage, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}} test unixWm-25.2 {Tk_WmCmd procedure, "iconname" option} unix { list [catch {wm iconname .t 12 13} msg] $msg } {1 {wrong # args: should be "wm iconname window ?newName?"}} test unixWm-25.3 {Tk_WmCmd procedure, "iconname" option} {unix testwrapper} { set result {} lappend result [wm iconname .t] wm iconname .t test_name lappend result [wm iconname .t] [testprop [testwrapper .t] WM_ICON_NAME] wm iconname .t {} lappend result [wm iconname .t] [testprop [testwrapper .t] WM_ICON_NAME] } {{} test_name test_name {} {}} test unixWm-26.1 {Tk_WmCmd procedure, "iconposition" option} unix { list [catch {wm iconposition .t 12} msg] $msg } {1 {wrong # args: should be "wm iconposition window ?x y?"}} test unixWm-26.2 {Tk_WmCmd procedure, "iconposition" option} unix { list [catch {wm iconposition .t 12 13 14} msg] $msg } {1 {wrong # args: should be "wm iconposition window ?x y?"}} test unixWm-26.3 {Tk_WmCmd procedure, "iconposition" option} {unix testwrapper} { set result {} lappend result [wm iconposition .t] wm iconposition .t 10 15 set prop [testprop [testwrapper .t] WM_HINTS] lappend result [wm iconposition .t] [lindex $prop 5] [lindex $prop 6] lappend result [format 0x%x [expr 0x10 & [lindex $prop 0]]] wm iconposition .t {} {} set bit [format 0x%x [expr 0x10 & [lindex [testprop [testwrapper .t] \ WM_HINTS] 0]]] lappend result [wm iconposition .t] $bit } {{} {10 15} 0xa 0xf 0x10 {} 0x0} test unixWm-26.4 {Tk_WmCmd procedure, "iconposition" option} unix { list [catch {wm iconposition .t bad 13} msg] $msg } {1 {expected integer but got "bad"}} test unixWm-26.5 {Tk_WmCmd procedure, "iconposition" option} unix { list [catch {wm iconposition .t 13 lousy} msg] $msg } {1 {expected integer but got "lousy"}} 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 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] lappend result [format 0x%x [expr 0x8 & [lindex $prop 0]]] lappend result [expr [testwrapper .icon] == [lindex $prop 4]] wm iconwindow .t {} set bit [format 0x%x [expr 0x8 & [lindex [testprop [testwrapper .t] \ WM_HINTS] 0]]] lappend result [wm iconwindow .t] [wm state .icon] $bit destroy .icon set result } {{} .icon icon 0x8 1 {} withdrawn 0x0} test unixWm-27.3 {Tk_WmCmd procedure, "iconwindow" option} unix { list [catch {wm iconwindow .t bogus} msg] $msg } {1 {bad window path name "bogus"}} test unixWm-27.4 {Tk_WmCmd procedure, "iconwindow" option} unix { destroy .b button .b -text Help set result [list [catch {wm iconwindow .t .b} msg] $msg] 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 destroy .t2 toplevel .t2 wm geom .t2 -0+0 wm iconwindow .t2 .icon set result [list [catch {wm iconwindow .t .icon} msg] $msg] destroy .t2 destroy .icon 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 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] 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 wm geometry .icon +0+0 update set result {} lappend result [wm state .icon] [winfo viewable .icon] wm iconwindow .t .icon lappend result [wm state .icon] [winfo viewable .icon] destroy .icon set result } {normal 1 icon 0} destroy .t destroy .icon toplevel .t -width 100 -height 50 wm geom .t +0+0 update test unixWm-28.1 {Tk_WmCmd procedure, "maxsize" option, setting the maxsize should update WM_NORMAL_HINTS} {testwrapper} { destroy .t toplevel .t wm maxsize .t 300 300 update set hints [testprop [testwrapper .t] WM_NORMAL_HINTS] format {%d %d} [lindex $hints 7] [lindex $hints 8] } {300 300} test unixWm-28.2 {Tk_WmCmd procedure, "maxsize" option, setting the maxsize to a value smaller than the current size should set the maxsize in WM_NORMAL_HINTS} {testwrapper} { destroy .t toplevel .t wm geom .t 400x400 wm maxsize .t 300 300 update set hints [testprop [testwrapper .t] WM_NORMAL_HINTS] format {%d %d} [lindex $hints 7] [lindex $hints 8] } {300 300} test unixWm-28.3 {Tk_WmCmd procedure, "maxsize" option, setting the maxsize to a value smaller than the current size should set the maxsize in WM_NORMAL_HINTS even if the interactive resizable flag is set to 0} {testwrapper} { destroy .t toplevel .t wm geom .t 400x400 wm resizable .t 0 0 wm maxsize .t 300 300 update set hints [testprop [testwrapper .t] WM_NORMAL_HINTS] format {%d %d} [lindex $hints 7] [lindex $hints 8] } {300 300} test unixWm-29.1 {Tk_WmCmd procedure, "minsize" option, setting the minsize should update WM_NORMAL_HINTS} {testwrapper} { destroy .t toplevel .t wm minsize .t 300 300 update set hints [testprop [testwrapper .t] WM_NORMAL_HINTS] format {%d %d} [lindex $hints 5] [lindex $hints 6] } {300 300} test unixWm-29.2 {Tk_WmCmd procedure, "minsize" option, setting the minsize to a value larger than the current size should set the maxsize in WM_NORMAL_HINTS} {testwrapper} { destroy .t toplevel .t wm geom .t 200x200 wm minsize .t 300 300 update set hints [testprop [testwrapper .t] WM_NORMAL_HINTS] format {%d %d} [lindex $hints 5] [lindex $hints 6] } {300 300} test unixWm-29.3 {Tk_WmCmd procedure, "minsize" option, setting the minsize to a value larger than the current size should set the minsize in WM_NORMAL_HINTS even if the interactive resizable flag is set to 0} {testwrapper} { destroy .t toplevel .t wm geom .t 200x200 wm resizable .t 0 0 wm minsize .t 300 300 update set hints [testprop [testwrapper .t] WM_NORMAL_HINTS] format {%d %d} [lindex $hints 5] [lindex $hints 6] } {300 300} destroy .t .icon toplevel .t -width 100 -height 50 wm geom .t +0+0 update test unixWm-30.1 {Tk_WmCmd procedure, "overrideredirect" option} unix { list [catch {wm overrideredirect .t 1 2} msg] $msg } {1 {wrong # args: should be "wm overrideredirect window ?boolean?"}} test unixWm-30.2 {Tk_WmCmd procedure, "overrideredirect" option} unix { list [catch {wm overrideredirect .t boo} msg] $msg } {1 {expected boolean value but got "boo"}} test unixWm-30.3 {Tk_WmCmd procedure, "overrideredirect" option} unix { set result {} lappend result [wm overrideredirect .t] wm overrideredirect .t true lappend result [wm overrideredirect .t] wm overrideredirect .t off lappend result [wm overrideredirect .t] } {0 1 0} test unixWm-31.1 {Tk_WmCmd procedure, "positionfrom" option} unix { list [catch {wm positionfrom .t 1 2} msg] $msg } {1 {wrong # args: should be "wm positionfrom window ?user/program?"}} test unixWm-31.2 {Tk_WmCmd procedure, "positionfrom" option} {unix testwrapper} { set result {} lappend result [wm positionfrom .t] wm positionfrom .t program update set bit [format 0x%x [expr 0x5 & [lindex [testprop [testwrapper .t] \ WM_NORMAL_HINTS] 0]]] lappend result [wm positionfrom .t] $bit wm positionfrom .t user update set bit [format 0x%x [expr 0x5 & [lindex [testprop [testwrapper .t] \ WM_NORMAL_HINTS] 0]]] lappend result [wm positionfrom .t] $bit } {user program 0x4 user 0x1} test unixWm-31.3 {Tk_WmCmd procedure, "positionfrom" option} unix { list [catch {wm positionfrom .t none} msg] $msg } {1 {bad argument "none": must be program or user}} test unixWm-32.1 {Tk_WmCmd procedure, "protocol" option} unix { list [catch {wm protocol .t 1 2 3} msg] $msg } {1 {wrong # args: should be "wm protocol window ?name? ?command?"}} test unixWm-32.2 {Tk_WmCmd procedure, "protocol" option} unix { wm protocol .t {foo a} {a b c} wm protocol .t bar {test script for bar} set result [wm protocol .t] wm protocol .t {foo a} {} wm protocol .t bar {} set result } {bar {foo a}} test unixWm-32.3 {Tk_WmCmd procedure, "protocol" option} {unix testwrapper} { set result {} lappend result [wm protocol .t] set x {} foreach i [testprop [testwrapper .t] WM_PROTOCOLS] { lappend x [winfo atomname $i] } lappend result $x wm protocol .t foo {test script} wm protocol .t bar {test script} set x {} foreach i [testprop [testwrapper .t] WM_PROTOCOLS] { lappend x [winfo atomname $i] } lappend result [wm protocol .t] $x wm protocol .t foo {} wm protocol .t bar {} set x {} foreach i [testprop [testwrapper .t] WM_PROTOCOLS] { lappend x [winfo atomname $i] } lappend result [wm protocol .t] $x } {{} WM_DELETE_WINDOW {bar foo} {WM_DELETE_WINDOW bar foo} {} WM_DELETE_WINDOW} test unixWm-32.4 {Tk_WmCmd procedure, "protocol" option} unix { set result {} wm protocol .t foo {a b c} wm protocol .t bar {test script for bar} lappend result [wm protocol .t foo] [wm protocol .t bar] wm protocol .t foo {} wm protocol .t bar {} lappend result [wm protocol .t foo] [wm protocol .t bar] } {{a b c} {test script for bar} {} {}} test unixWm-32.5 {Tk_WmCmd procedure, "protocol" option} unix { wm protocol .t foo {a b c} wm protocol .t foo {test script} set result [wm protocol .t foo] wm protocol .t foo {} set result } {test script} test unixWm-33.1 {Tk_WmCmd procedure, "resizable" option} unix { list [catch {wm resizable . a} msg] $msg } {1 {wrong # args: should be "wm resizable window ?width height?"}} test unixWm-33.2 {Tk_WmCmd procedure, "resizable" option} unix { list [catch {wm resizable . a b c} msg] $msg } {1 {wrong # args: should be "wm resizable window ?width height?"}} test unixWm-33.3 {Tk_WmCmd procedure, "resizable" option} unix { list [catch {wm resizable .foo a b c} msg] $msg } {1 {bad window path name ".foo"}} test unixWm-33.4 {Tk_WmCmd procedure, "resizable" option} unix { list [catch {wm resizable . x 1} msg] $msg } {1 {expected boolean value but got "x"}} test unixWm-33.5 {Tk_WmCmd procedure, "resizable" option} unix { list [catch {wm resizable . 0 gorp} msg] $msg } {1 {expected boolean value but got "gorp"}} test unixWm-33.6 {Tk_WmCmd procedure, "resizable" option} unix { destroy .t2 toplevel .t2 -width 200 -height 100 wm geom .t2 +0+0 set result "" lappend result [wm resizable .t2] wm resizable .t2 1 0 lappend result [wm resizable .t2] wm resizable .t2 no off lappend result [wm resizable .t2] wm resizable .t2 false true lappend result [wm resizable .t2] destroy .t2 set result } {{1 1} {1 0} {0 0} {0 1}} test unixWm-34.1 {Tk_WmCmd procedure, "sizefrom" option} unix { list [catch {wm sizefrom .t 1 2} msg] $msg } {1 {wrong # args: should be "wm sizefrom window ?user|program?"}} test unixWm-34.2 {Tk_WmCmd procedure, "sizefrom" option} {unix testwrapper} { set result {} lappend result [wm sizefrom .t] wm sizefrom .t program update set bit [format 0x%x [expr 0xa & [lindex [testprop [testwrapper .t] \ WM_NORMAL_HINTS] 0]]] lappend result [wm sizefrom .t] $bit wm sizefrom .t user update set bit [format 0x%x [expr 0xa & [lindex [testprop [testwrapper .t] \ WM_NORMAL_HINTS] 0]]] lappend result [wm sizefrom .t] $bit } {{} program 0x8 user 0x2} test unixWm-34.3 {Tk_WmCmd procedure, "sizefrom" option} unix { list [catch {wm sizefrom .t none} msg] $msg } {1 {bad argument "none": must be program or user}} if {[tk windowingsystem] eq "aqua"} { set result_35_1 {1 {bad argument "1": must be normal, iconic, withdrawn, or zoomed}} } else { set result_35_1 {1 {bad argument "1": must be normal, iconic, or withdrawn}} } test unixWm-35.1 {Tk_WmCmd procedure, "state" option} {unix notAqua} { list [catch {wm state .t 1} msg] $msg } $result_35_1 test unixWm-35.2 {Tk_WmCmd procedure, "state" option} unix { list [catch {wm state .t iconic 1} msg] $msg } {1 {wrong # args: should be "wm state window ?state?"}} test unixWm-35.3 {Tk_WmCmd procedure, "state" option} unix { set result {} destroy .t2 toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 lappend result [wm state .t2] update lappend result [wm state .t2] wm withdraw .t2 lappend result [wm state .t2] wm iconify .t2 lappend result [wm state .t2] wm deiconify .t2 lappend result [wm state .t2] destroy .t2 set result } {normal normal withdrawn iconic normal} test unixWm-35.4 {Tk_WmCmd procedure, "state" option} unix { set result {} destroy .t2 toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 lappend result [wm state .t2] update lappend result [wm state .t2] wm state .t2 withdrawn lappend result [wm state .t2] wm state .t2 iconic lappend result [wm state .t2] wm state .t2 normal lappend result [wm state .t2] destroy .t2 set result } {normal normal withdrawn iconic normal} test unixWm-36.1 {Tk_WmCmd procedure, "title" option} unix { list [catch {wm title .t 1 2} msg] $msg } {1 {wrong # args: should be "wm title window ?newTitle?"}} test unixWm-36.2 {Tk_WmCmd procedure, "title" option} {unix testwrapper} { set result {} lappend result [wm title .t] [testprop [testwrapper .t] WM_NAME] wm title .t "Test window" set bit [format 0x%x [expr 0xa & [lindex [testprop [testwrapper .t] \ WM_NORMAL_HINTS] 0]]] lappend result [wm title .t] [testprop [testwrapper .t] WM_NAME] } {t t {Test window} {Test window}} test unixWm-37.3 {Tk_WmCmd procedure, "transient" option} {unix testwrapper} { set result {} destroy .t2 toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 update lappend result [wm transient .t2] \ [testprop [testwrapper .t2] WM_TRANSIENT_FOR] wm transient .t2 .t set transient [testprop [testwrapper .t2] WM_TRANSIENT_FOR] lappend result [wm transient .t2] [expr [testwrapper .t] - $transient] wm transient .t2 {} lappend result [wm transient .t2] \ [testprop [testwrapper .t2] WM_TRANSIENT_FOR] destroy .t2 set result } {{} {} .t 0 {} {}} test unixWm-37.4 {TkWmDeadWindow, destroy on toplevel should clear transient} {unix testwrapper} { destroy .t2 toplevel .t2 destroy .t3 toplevel .t3 wm transient .t2 .t3 update destroy .t3 update list [wm transient .t2] [testprop [testwrapper .t2] WM_TRANSIENT_FOR] } {{} {}} test unixWm-37.5 {Tk_WmCmd procedure, "transient" option, create toplevel wrapper} {unix testwrapper} { destroy .t2 destroy .t3 toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 toplevel .t3 -width 120 -height 300 wm geometry .t2 +0+0 set result [list [testwrapper .t2]] wm transient .t3 .t2 lappend result [expr {[testwrapper .t2] == ""}] destroy .t2 .t3 set result } {{} 0} test unixWm-38.1 {Tk_WmCmd procedure, "withdraw" option} unix { list [catch {wm withdraw .t 1} msg] $msg } {1 {wrong # args: should be "wm withdraw window"}} test unixWm-38.2 {Tk_WmCmd procedure, "withdraw" option} unix { destroy .t2 toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 wm iconwindow .t .t2 set result [list [catch {wm withdraw .t2} msg] $msg] destroy .t2 set result } {1 {can't withdraw .t2: it is an icon for .t}} test unixWm-38.3 {Tk_WmCmd procedure, "withdraw" option} unix { set result {} wm withdraw .t lappend result [wm state .t] [winfo ismapped .t] wm deiconify .t lappend result [wm state .t] [winfo ismapped .t] } {withdrawn 0 normal 1} test unixWm-39.1 {Tk_WmCmd procedure, miscellaneous} unix { list [catch {wm unknown .t} msg] $msg } {1 {bad option "unknown": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, forget, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, manage, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}} destroy .t .icon test unixWm-40.1 {Tk_SetGrid procedure, set grid dimensions before turning on grid} {unix nonPortable} { destroy .t toplevel .t wm geometry .t 30x10+0+0 listbox .t.l -height 20 -width 20 -setgrid 1 pack .t.l -fill both -expand 1 update wm geometry .t } {30x10+0+0} test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already set} unix { destroy .t toplevel .t wm geometry .t 200x100+100+$Y0 listbox .t.l -height 20 -width 20 pack .t.l -fill both -expand 1 update .t.l configure -setgrid 1 update wm geometry .t } "20x20+100+$Y0" test unixWm-41.1 {ConfigureEvent procedure, internally generated size changes} unix { destroy .t toplevel .t -width 400 -height 150 tkwait visibility .t wm geometry .t +0+0 update idletasks set result {} lappend result [winfo width .t] [winfo height .t] .t configure -width 200 -height 300 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 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 testmenubar window .t .t.m update set result {} bind .t { if {"%W" == ".t"} { lappend result "%W: %wx%h" } } bind .t.m {lappend result "%W: %wx%h"} wm geometry .t 200x300 update lappend result [expr [winfo rootx .t.m] - $x] \ [expr [winfo rooty .t.m] - $y] \ [winfo width .t.m] [winfo height .t.m] \ [expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y] \ [winfo width .t] [winfo height .t] } {{.t.m: 200x20} {.t: 200x300} 0 0 200 20 0 20 200 300} test unixWm-41.3 {ConfigureEvent procedure, synthesized Configure events} unix { destroy .t toplevel .t -width 400 -height 150 wm geometry .t +0+0 tkwait visibility .t set result {no event} bind .t {set result "configured: %w %h"} wm geometry .t +10+20 update set result } {configured: 400 150} test unixWm-41.4 {ConfigureEvent procedure, synthesized Configure events} unix { destroy .t toplevel .t -width 400 -height 150 wm geometry .t +0+0 tkwait visibility .t set result {no event} bind .t {set result "configured: %w %h"} wm geometry .t 130x200 update set result } {configured: 130 200} # No tests for ReparentEvent or ComputeReparentGeometry; I can't figure # out how to exercise these procedures reliably. test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} {unix failsOnUbuntu failsOnXQuarz} { destroy .t toplevel .t -width 400 -height 150 wm geometry .t +0+0 tkwait visibility .t set result {} bind .t {set x "mapped"} bind .t {set x "unmapped"} set x {no event} wm iconify .t update idletasks lappend result $x [winfo ismapped .t] set x {no event} wm deiconify .t update idletasks lappend result $x [winfo ismapped .t] } {unmapped 0 mapped 1} 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 place .t.f -x 20 -y 10 tkwait visibility .t.f toplevel .t2 -use [winfo id .t.f] -width 30 -height 20 -bg blue tkwait visibility .t2 set result {} .t2 configure -width 70 -height 120 update lappend result [winfo reqwidth .t.f] [winfo reqheight .t.f] lappend result [winfo width .t2] [winfo height .t2] # destroy .t2 set result } {70 120 70 120} test unixWm-43.2 {TopLevelReqProc procedure, resize causes window to move} \ {unix nonPortable} { destroy .t toplevel .t -width 200 -height 200 wm geom .t +0+0 update wm geom .t -0-0 update set x [winfo x .t] set y [winfo y .t] .t configure -width 300 -height 150 update list [expr [winfo x .t] - $x] [expr [winfo y .t] - $y] \ [winfo width .t] [winfo height .t] } {-100 50 300 150} test unixWm-44.1 {UpdateGeometryInfo procedure, width/height computation} unix { destroy .t toplevel .t -width 100 -height 200 wm geometry .t +30+40 wm overrideredirect .t 1 tkwait visibility .t .t configure -width 180 -height 20 update list [winfo width .t] [winfo height .t] } {180 20} test unixWm-44.2 {UpdateGeometryInfo procedure, width/height computation} unix { destroy .t toplevel .t -width 80 -height 60 wm grid .t 5 4 10 12 wm geometry .t +30+40 wm overrideredirect .t 1 tkwait visibility .t wm geometry .t 10x2 update list [winfo width .t] [winfo height .t] } {130 36} test unixWm-44.3 {UpdateGeometryInfo procedure, width/height computation} unix { destroy .t toplevel .t -width 80 -height 60 wm grid .t 5 4 10 12 wm geometry .t +30+40 wm overrideredirect .t 1 tkwait visibility .t wm geometry .t 1x10 update list [winfo width .t] [winfo height .t] } {40 132} test unixWm-44.4 {UpdateGeometryInfo procedure, width/height computation} unix { destroy .t toplevel .t -width 100 -height 200 wm geometry .t +30+40 wm overrideredirect .t 1 tkwait visibility .t wm geometry .t 300x150 update list [winfo width .t] [winfo height .t] } {300 150} test unixWm-44.5 {UpdateGeometryInfo procedure, negative width} unix { destroy .t toplevel .t -width 80 -height 60 wm grid .t 18 7 10 12 wm geometry .t +30+40 wm overrideredirect .t 1 tkwait visibility .t wm geometry .t 5x8 update list [winfo width .t] [winfo height .t] } {1 72} destroy .t toplevel .t -width 80 -height 60 test unixWm-44.6 {UpdateGeometryInfo procedure, negative height} unix { wm grid .t 18 7 10 12 wm geometry .t +30+40 wm overrideredirect .t 1 tkwait visibility .t wm geometry .t 20x1 update list [winfo width .t] [winfo height .t] } {100 1} destroy .t toplevel .t -width 80 -height 60 test unixWm-44.7 {UpdateGeometryInfo procedure, computing position} {unix} { wm overrideredirect .t 1 tkwait visibility .t update wm geometry .t +5-10 update list [winfo x .t] [winfo y .t] } [list 5 [expr [winfo screenheight .t] - 70]] destroy .t toplevel .t -width 80 -height 60 test unixWm-44.8 {UpdateGeometryInfo procedure, computing position} {unix} { wm overrideredirect .t 1 tkwait visibility .t update wm geometry .t -30+$Y2 update list [winfo x .t] [winfo y .t] } [list [expr [winfo screenwidth .t] - 110] $Y2] destroy .t test unixWm-44.9 {UpdateGeometryInfo procedure, updating fixed dimensions} {unix testwrapper} { destroy .t toplevel .t -width 80 -height 60 wm resizable .t 0 0 wm geometry .t +0+0 tkwait visibility .t .t configure -width 180 -height 20 update set property [testprop [testwrapper .t] WM_NORMAL_HINTS] list [expr [lindex $property 5]] [expr [lindex $property 6]] \ [expr [lindex $property 7]] [expr [lindex $property 8]] } {180 20 180 20} test unixWm-44.10 {UpdateGeometryInfo procedure, menubar changing} testmenubar { destroy .t 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 testmenubar window .t .t.m update .t configure -height 70 .t.m configure -height 30 list [update] [destroy .t] } {{} {}} test unixWm-45.1 {UpdateSizeHints procedure, grid information} {unix testwrapper} { destroy .t toplevel .t -width 80 -height 60 wm grid .t 6 10 10 5 wm minsize .t 2 4 wm maxsize .t 30 40 wm geometry .t +0+0 tkwait visibility .t set property [testprop [testwrapper .t] WM_NORMAL_HINTS] list [expr [lindex $property 5]] [expr [lindex $property 6]] \ [expr [lindex $property 7]] [expr [lindex $property 8]] \ [expr [lindex $property 9]] [expr [lindex $property 10]] } {40 30 320 210 10 5} test unixWm-45.2 {UpdateSizeHints procedure} {unix testwrapper} { destroy .t toplevel .t -width 80 -height 60 wm minsize .t 30 40 wm maxsize .t 200 500 wm geometry .t +0+0 tkwait visibility .t set property [testprop [testwrapper .t] WM_NORMAL_HINTS] list [expr [lindex $property 5]] [expr [lindex $property 6]] \ [expr [lindex $property 7]] [expr [lindex $property 8]] \ [expr [lindex $property 9]] [expr [lindex $property 10]] } {30 40 200 500 1 1} test unixWm-45.3 {UpdateSizeHints procedure, grid with menu} {testmenubar testwrapper} { destroy .t toplevel .t -width 80 -height 60 frame .t.menu -height 23 -width 50 testmenubar window .t .t.menu wm grid .t 6 10 10 5 wm minsize .t 2 4 wm maxsize .t 30 40 wm geometry .t +0+0 tkwait visibility .t set property [testprop [testwrapper .t] WM_NORMAL_HINTS] list [winfo height .t] \ [expr [lindex $property 5]] [expr [lindex $property 6]] \ [expr [lindex $property 7]] [expr [lindex $property 8]] \ [expr [lindex $property 9]] [expr [lindex $property 10]] } {60 40 53 320 233 10 5} test unixWm-45.4 {UpdateSizeHints procedure, not resizable with menu} {testmenubar testwrapper} { destroy .t toplevel .t -width 80 -height 60 frame .t.menu -height 23 -width 50 testmenubar window .t .t.menu wm resizable .t 0 0 wm geometry .t +0+0 tkwait visibility .t set property [testprop [testwrapper .t] WM_NORMAL_HINTS] list [winfo height .t] \ [expr [lindex $property 5]] [expr [lindex $property 6]] \ [expr [lindex $property 7]] [expr [lindex $property 8]] \ [expr [lindex $property 9]] [expr [lindex $property 10]] } {60 80 83 80 83 1 1} # I don't know how to test WaitForConfigureNotify. test unixWm-46.1 {WaitForEvent procedure, use of modal timeout} unix { destroy .t toplevel .t -width 200 -height 200 wm geom .t +0+0 update wm iconify .t set x no after 0 {set x yes} wm deiconify .t set result $x update list $result $x } {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 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}} bind .t {lappend result {map on .t}} bind .t {lappend result {unmap on .t}; bind .t {}} bind .t