summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2022-10-02 20:57:30 (GMT)
committerfvogel <fvogelnew1@free.fr>2022-10-02 20:57:30 (GMT)
commit9549fdb1087bd31f052077f48fcb1cd88d514774 (patch)
treecf5b9295c33dc82f024e9b088e096cf35a879da2
parent5f3ebd7781c0bc6d08487ac6d7315265714c9cb5 (diff)
parentfac20a34f64505188060e147b12ccb661cc9ca41 (diff)
downloadtk-9549fdb1087bd31f052077f48fcb1cd88d514774.zip
tk-9549fdb1087bd31f052077f48fcb1cd88d514774.tar.gz
tk-9549fdb1087bd31f052077f48fcb1cd88d514774.tar.bz2
Merge unstable_tests branch. This commit stabilizes a lot of tests that could sporadically fail, mainly on macOS. No test results were changed, except for entry-5.7 and spinbox-5.7 which expected results were found to be wrong (these tests passes due to a race condition that is now fixed).
-rw-r--r--tests/constraints.tcl31
-rw-r--r--tests/entry.test72
-rw-r--r--tests/frame.test12
-rw-r--r--tests/panedwindow.test1390
-rw-r--r--tests/spinbox.test70
-rw-r--r--tests/textDisp.test867
-rw-r--r--tests/textImage.test17
-rw-r--r--tests/textIndex.test2
-rw-r--r--tests/textWind.test221
-rw-r--r--tests/ttk/notebook.test20
-rw-r--r--tests/ttk/ttk.test2
-rw-r--r--tests/unixEmbed.test424
12 files changed, 1545 insertions, 1583 deletions
diff --git a/tests/constraints.tcl b/tests/constraints.tcl
index b0dbbec..23b48d1 100644
--- a/tests/constraints.tcl
+++ b/tests/constraints.tcl
@@ -137,7 +137,6 @@ namespace eval tk {
destroy .focus
}
-
namespace export imageInit imageFinish imageCleanup imageNames
variable ImageNames
proc imageInit {} {
@@ -244,36 +243,6 @@ namespace eval tk {
}
namespace export controlPointerWarpTiming
- namespace export updateWidgets
- # Platform specific procedure for updating the display.
- if {[tk windowingsystem] == "aqua"} {
- proc updateWidgets {} {
- update idletasks
- }
- } else {
- proc updateWidgets {} {
- update
- }
- }
-
- namespace export waitForMap waitForUnmap
- # Procedures waiting for a window to be mapped or unmapped, with timeout
- proc waitForMap {w} {
- set count 0
- while {$count < 10 && ![winfo ismapped $w]} {
- updateWidgets
- incr count
- after 50
- }
- }
- proc waitForUnmap {w} {
- set count 0
- while {$count < 10 && [winfo ismapped $w]} {
- updateWidgets
- incr count
- after 50
- }
- }
}
}
diff --git a/tests/entry.test b/tests/entry.test
index d67980a..6c2291c 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -1676,15 +1676,14 @@ test entry-5.7 {ConfigureEntry procedure} -setup {
} -body {
.e configure -font {Courier -12} -width 4 -xscrollcommand scroll
.e insert end "01234567890"
- update idletasks
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e configure -width 5
- vwait scrollInfo
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
- after cancel $timeout
-} -result {0.000000 0.363636}
+} -result {0.000000 0.454545}
test entry-5.8 {ConfigureEntry procedure} -constraints {
@@ -1922,14 +1921,14 @@ test entry-7.1 {InsertChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e insert 0 abcde
.e insert 2 XXX
- vwait scrollInfo
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
- after cancel $timeout
} -result {abXXXcde abXXXcde {0.000000 1.000000}}
test entry-7.2 {InsertChars procedure} -setup {
@@ -1939,14 +1938,14 @@ test entry-7.2 {InsertChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e insert 0 abcde
.e insert 500 XXX
- vwait scrollInfo
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
- after cancel $timeout
} -result {abcdeXXX abcdeXXX {0.000000 1.000000}}
test entry-7.3 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
@@ -2073,14 +2072,14 @@ test entry-8.1 {DeleteChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e insert 0 abcde
.e delete 2 4
- vwait scrollInfo
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
- after cancel $timeout
} -result {abe abe {0.000000 1.000000}}
test entry-8.2 {DeleteChars procedure} -setup {
unset -nocomplain contents
@@ -2089,14 +2088,14 @@ test entry-8.2 {DeleteChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e insert 0 abcde
.e delete -1 2
- vwait scrollInfo
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
- after cancel $timeout
} -result {cde cde {0.000000 1.000000}}
test entry-8.3 {DeleteChars procedure} -setup {
unset -nocomplain contents
@@ -2105,14 +2104,14 @@ test entry-8.3 {DeleteChars procedure} -setup {
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e insert 0 abcde
.e delete 3 1000
- vwait scrollInfo
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
- after cancel $timeout
} -result {abc abc {0.000000 1.000000}}
test entry-8.4 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
@@ -2942,41 +2941,39 @@ test entry-16.4 {EntryVisibleRange procedure} -body {
test entry-17.1 {EntryUpdateScrollbar procedure} -body {
entry .e -width 10 -xscrollcommand scroll -font {Courier -12}
- pack .e ; update idletasks
- update idletasks
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ pack .e
+ update
+ set scrollInfo wrong
.e delete 0 end
.e insert 0 123
- vwait scrollInfo
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
- after cancel $timeout
} -result {0.000000 1.000000}
test entry-17.2 {EntryUpdateScrollbar procedure} -body {
entry .e -width 10 -xscrollcommand scroll -font {Courier -12}
- pack .e ; update idletasks
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ pack .e
+ update
+ set scrollInfo wrong
.e insert 0 0123456789abcdef
.e xview 3
- vwait scrollInfo
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
- after cancel $timeout
} -result {0.187500 0.812500}
test entry-17.3 {EntryUpdateScrollbar procedure} -body {
entry .e -width 10 -xscrollcommand scroll -font {Courier -12}
- pack .e ; update idletasks
- update idletasks
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ pack .e
+ update
+ set scrollInfo wrong
.e insert 0 abcdefghijklmnopqrs
.e xview 6
- vwait scrollInfo
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
- after cancel $timeout
} -result {0.315789 0.842105}
test entry-17.4 {EntryUpdateScrollbar procedure} -setup {
proc bgerror msg {
@@ -2985,10 +2982,11 @@ test entry-17.4 {EntryUpdateScrollbar procedure} -setup {
}
} -body {
entry .e -width 5
- pack .e ; update idletasks
- update idletasks
+ pack .e
+ update
+ set scrollInfo wrong
.e configure -xscrollcommand thisisnotacommand
- vwait x
+ update
list $x $errorInfo
} -cleanup {
destroy .e
diff --git a/tests/frame.test b/tests/frame.test
index 63bb187..01b4687 100644
--- a/tests/frame.test
+++ b/tests/frame.test
@@ -1169,19 +1169,11 @@ test frame-12.3 {FrameWorldChanged procedure} -setup {
labelframe .f -font myfont -text Mupp
place .f -x 0 -y 0 -width 40 -height 40
pack [frame .f.f] -fill both -expand 1
- if {[tk windowingsystem] eq "aqua"} {
- update idletasks
- } else {
- update
- }
+ update
set h1 [font metrics myfont -linespace]
set y1 [winfo y .f.f]
font configure myfont -size 20
- if {[tk windowingsystem] eq "aqua"} {
- update idletasks
- } else {
- update
- }
+ update
set h2 [font metrics myfont -linespace]
set y2 [winfo y .f.f]
expr {($h2 - $h1) - ($y2 - $y1)}
diff --git a/tests/panedwindow.test b/tests/panedwindow.test
index bb3a7fd..29e0ced 100644
--- a/tests/panedwindow.test
+++ b/tests/panedwindow.test
@@ -293,17 +293,17 @@ deleteWindows
test panedwindow-2.1 {panedwindow widget command} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p foo
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {bad command "foo": must be add, cget, configure, forget, identify, panecget, paneconfigure, panes, proxy, or sash}
test panedwindow-3.1 {panedwindow panes subcommand} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b]
@@ -312,20 +312,20 @@ test panedwindow-3.1 {panedwindow panes subcommand} -setup {
.p forget .b
lappend result [.p panes]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list [list .b .c] [list .c]]
test panedwindow-4.1 {forget subcommand} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p forget
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {wrong # args: should be ".p forget widget ?widget ...?"}
test panedwindow-4.2 {forget subcommand, forget one from start} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b]
@@ -334,10 +334,10 @@ test panedwindow-4.2 {forget subcommand, forget one from start} -setup {
.p forget .b
lappend result [.p panes]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list {.b .c} .c]
test panedwindow-4.3 {forget subcommand, forget one from end} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b]
@@ -348,10 +348,10 @@ test panedwindow-4.3 {forget subcommand, forget one from end} -setup {
update
lappend result [.p panes]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list {.b .c .d} {.b .c}]
test panedwindow-4.4 {forget subcommand, forget multiple} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b]
@@ -362,10 +362,10 @@ test panedwindow-4.4 {forget subcommand, forget multiple} -setup {
update
lappend result [.p panes]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list {.b .c .d} .d]
test panedwindow-4.5 {forget subcommand, panes are unmapped} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b]
@@ -377,10 +377,10 @@ test panedwindow-4.5 {forget subcommand, panes are unmapped} -setup {
update
lappend result [winfo ismapped .b] [winfo ismapped .c]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 1 1 0 1]
test panedwindow-4.6 {forget subcommand, changes reqsize of panedwindow} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 4 -showhandle false
.p add [frame .f -width 20 -height 20] [frame .g -width 20 -height 20]
@@ -388,244 +388,244 @@ test panedwindow-4.6 {forget subcommand, changes reqsize of panedwindow} -setup
.p forget .f
lappend result [winfo reqwidth .p]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 44 20]
test panedwindow-5.1 {sash subcommand} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {wrong # args: should be ".p sash option ?arg ...?"}
test panedwindow-5.2 {sash subcommand} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash foo
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {bad option "foo": must be coord, dragto, mark, or place}
test panedwindow-6.1 {sash coord subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash coord
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {wrong # args: should be ".p sash coord index"}
test panedwindow-6.2 {sash coord subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 4
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {invalid sash index}
test panedwindow-6.3 {sash coord subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash coord foo
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {expected integer but got "foo"}
test panedwindow-6.4 {sash coord subcommand sashes correctly placed} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 2 -sashwidth 4 -showhandle false
.p add [frame .p.f -width 20 -height 20] \
- [frame .p.f2 -width 20 -height 20] \
- [frame .p.f3 -width 20 -height 20]
+ [frame .p.f2 -width 20 -height 20] \
+ [frame .p.f3 -width 20 -height 20]
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 22 0]
test panedwindow-6.5 {sash coord subcommand sashes correctly placed} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 2 -sashwidth 4 -showhandle false
.p add [frame .p.f -width 20 -height 20] \
- [frame .p.f2 -width 20 -height 20] \
- [frame .p.f3 -width 20 -height 20]
+ [frame .p.f2 -width 20 -height 20] \
+ [frame .p.f3 -width 20 -height 20]
.p sash coord 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 50 0]
test panedwindow-6.6 {sash coord subcommand, sashes correctly placed} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 2 -sashwidth 4 -orient vertical \
-showhandle false
.p add [frame .p.f -width 20 -height 20] \
- [frame .p.f2 -width 20 -height 20] \
- [frame .p.f3 -width 20 -height 20]
+ [frame .p.f2 -width 20 -height 20] \
+ [frame .p.f3 -width 20 -height 20]
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 22]
test panedwindow-6.7 {sash coord subcommand, sashes correctly placed} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 2 -sashwidth 4 -orient vertical \
-showhandle false
.p add [frame .p.f -width 20 -height 20] \
- [frame .p.f2 -width 20 -height 20] \
- [frame .p.f3 -width 20 -height 20]
+ [frame .p.f2 -width 20 -height 20] \
+ [frame .p.f3 -width 20 -height 20]
.p sash coord 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 50]
test panedwindow-6.8 {sash coord subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
list [catch {.p sash coord -1} msg] $msg \
[catch {.p sash coord 0} msg] $msg \
[catch {.p sash coord 1} msg] $msg
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 1 "invalid sash index" 1 "invalid sash index" 1 "invalid sash index"]
test panedwindow-6.9 {sash coord subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
# There are no sashes until you have 2 panes
panedwindow .p
.p add [frame .p.f]
list [catch {.p sash coord -1} msg] $msg \
- [catch {.p sash coord 0} msg] $msg \
- [catch {.p sash coord 1} msg] $msg
+ [catch {.p sash coord 0} msg] $msg \
+ [catch {.p sash coord 1} msg] $msg
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 1 "invalid sash index" 1 "invalid sash index" 1 "invalid sash index"]
test panedwindow-6.10 {sash coord subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
# There are no sashes until you have 2 panes
panedwindow .p
.p add [frame .p.f] [frame .p.f2]
list [catch {.p sash coord -1} msg] $msg \
- [catch {.p sash coord 0} msg] \
- [catch {.p sash coord 1} msg] $msg \
- [catch {.p sash coord 2} msg] $msg
+ [catch {.p sash coord 0} msg] \
+ [catch {.p sash coord 1} msg] $msg \
+ [catch {.p sash coord 2} msg] $msg
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 1 "invalid sash index" 0 1 "invalid sash index" 1 "invalid sash index"]
test panedwindow-7.1 {sash mark subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash mark
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {wrong # args: should be ".p sash mark index ?x y?"}
test panedwindow-7.2 {sash mark subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash mark foo
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {expected integer but got "foo"}
test panedwindow-7.3 {sash mark subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash mark 0 foo bar
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {invalid sash index}
test panedwindow-7.4 {sash mark subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] [button .c]
.p sash mark 0 foo bar
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {expected integer but got "foo"}
test panedwindow-7.5 {sash mark subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] [button .c]
.p sash mark 0 0 bar
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {expected integer but got "bar"}
test panedwindow-7.6 {sash mark subcommand, mark defaults to 0 0} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] [button .c]
.p sash mark 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 0]
test panedwindow-7.7 {sash mark subcommand, set mark} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] [button .c]
.p sash mark 0 10 10
.p sash mark 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 10 10]
test panedwindow-8.1 {sash dragto subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash dragto
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {wrong # args: should be ".p sash dragto index x y"}
test panedwindow-8.2 {sash dragto subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash dragto foo bar baz
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {expected integer but got "foo"}
test panedwindow-8.3 {sash dragto subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash dragto 0 foo bar
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {invalid sash index}
test panedwindow-8.4 {sash dragto subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] [button .c]
.p sash dragto 0 foo bar
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {expected integer but got "foo"}
test panedwindow-8.5 {sash dragto subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] [button .c]
.p sash dragto 0 0 bar
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {expected integer but got "bar"}
test panedwindow-9.1 {sash mark/sash dragto interaction} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 4 -showhandle false
.p add [frame .f -width 20 -height 20] [button .c -text foobar]
@@ -633,10 +633,10 @@ test panedwindow-9.1 {sash mark/sash dragto interaction} -setup {
.p sash dragto 0 20 10
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 30 0]
test panedwindow-9.2 {sash mark/sash dragto interaction} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 4 -orient vertical \
-showhandle false
@@ -645,10 +645,10 @@ test panedwindow-9.2 {sash mark/sash dragto interaction} -setup {
.p sash dragto 0 10 20
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 30]
test panedwindow-9.3 {sash mark/sash dragto, respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 4 -showhandle false
.p add [frame .f -width 20 -height 20] [button .c] -minsize 15
@@ -656,95 +656,95 @@ test panedwindow-9.3 {sash mark/sash dragto, respects minsize} -setup {
.p sash dragto 0 10 10
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 15 0]
test panedwindow-10.1 {sash place subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash place
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {wrong # args: should be ".p sash place index x y"}
test panedwindow-10.2 {sash place subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash place foo bar baz
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {expected integer but got "foo"}
test panedwindow-10.3 {sash place subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p sash place 0 foo bar
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {invalid sash index}
test panedwindow-10.4 {sash place subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] [button .c]
.p sash place 0 foo bar
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {expected integer but got "foo"}
test panedwindow-10.5 {sash place subcommand, errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] [button .c]
.p sash place 0 0 bar
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {expected integer but got "bar"}
test panedwindow-10.6 {sash place subcommand, moves sash} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 4
.p add [frame .f -width 20 -height 20] [button .c]
.p sash place 0 10 0
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 10 0]
test panedwindow-10.7 {sash place subcommand, moves sash} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 4 -orient vertical
.p add [frame .f -width 20 -height 20] [button .c]
.p sash place 0 0 10
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 10]
test panedwindow-10.8 {sash place subcommand, respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 4 -showhandle false
.p add [frame .f -width 20 -height 20] [button .c] -minsize 15
.p sash place 0 10 0
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 15 0]
test panedwindow-10.9 {sash place subcommand, respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [frame .f -width 20 -height 20 -bg pink]
.p sash place 0 2 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {invalid sash index}
test panedwindow-11.1 {moving sash changes size of pane to left} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 4 -showhandle false
.p add [frame .f -width 20 -height 20] [button .c -text foobar] -sticky nsew
@@ -754,7 +754,7 @@ test panedwindow-11.1 {moving sash changes size of pane to left} -setup {
winfo width .f
} -result 30
test panedwindow-11.2 {moving sash changes size of pane to right} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4
.p add [frame .f -width 20 -height 20] [frame .f2 -width 20 -height 20]
@@ -765,10 +765,10 @@ test panedwindow-11.2 {moving sash changes size of pane to right} -setup {
update
lappend result [winfo width .f2]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {20 10}
test panedwindow-11.3 {moving sash does not change reqsize of panedwindow} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4
.p add [frame .f -width 20 -height 20] [frame .f2 -width 20 -height 20]
@@ -776,7 +776,7 @@ test panedwindow-11.3 {moving sash does not change reqsize of panedwindow} -setu
winfo reqwidth .p
} -result 44
test panedwindow-11.4 {moving sash changes size of pane above} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \
-orient vertical
@@ -788,7 +788,7 @@ test panedwindow-11.4 {moving sash changes size of pane above} -setup {
set result
} -result 20
test panedwindow-11.5 {moving sash changes size of pane below} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \
-orient vertical
@@ -801,10 +801,10 @@ test panedwindow-11.5 {moving sash changes size of pane below} -setup {
lappend result [winfo height .f2]
set result
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {10 5}
test panedwindow-11.6 {moving sash does not change reqsize of panedwindow} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \
-orient vertical
@@ -814,10 +814,10 @@ test panedwindow-11.6 {moving sash does not change reqsize of panedwindow} -setu
lappend result [winfo reqheight .p]
set result
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 24 24]
test panedwindow-11.7 {moving sash does not alter reqsize of widget} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \
-orient vertical
@@ -826,10 +826,10 @@ test panedwindow-11.7 {moving sash does not alter reqsize of widget} -setup {
.p sash place 0 0 20
lappend result [winfo reqheight .f]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 10 10]
test panedwindow-11.8 {moving sash restricted to minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4
.p add [frame .f -width 20 -height 20] [button .c] -minsize 15
@@ -839,7 +839,7 @@ test panedwindow-11.8 {moving sash restricted to minsize} -setup {
winfo width .f
} -result 15
test panedwindow-11.9 {moving sash restricted to minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \
-orient vertical
@@ -850,7 +850,7 @@ test panedwindow-11.9 {moving sash restricted to minsize} -setup {
winfo height .f
} -result 10
test panedwindow-11.10 {moving sash in unmapped window restricted to reqsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4
.p add [frame .f -width 20 -height 30] [frame .f2 -width 20 -height 20]
@@ -858,64 +858,64 @@ test panedwindow-11.10 {moving sash in unmapped window restricted to reqsize} -s
.p sash place 0 100 0
lappend result [.p sash coord 0]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list {20 0} {40 0}]
test panedwindow-11.11 {moving sash right pushes other sashes} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4
.p add [frame .f -width 20 -height 30] [frame .f2 -width 20 -height 20] \
- [frame .f3 -width 20 -height 30]
+ [frame .f3 -width 20 -height 30]
.p sash place 0 80 0
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{60 0} {64 0}}
test panedwindow-11.12 {moving sash left pushes other sashes} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4
.p add [frame .f -width 20 -height 30] [frame .f2 -width 20 -height 20] \
- [frame .f3 -width 20 -height 30]
+ [frame .f3 -width 20 -height 30]
.p sash place 1 0 0
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{0 0} {4 0}}
test panedwindow-11.13 {move sash in mapped window restricted to visible win} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4
.p add [frame .f -width 20 -height 30] [frame .f2 -width 20 -height 20] \
- [frame .f3 -width 20 -height 30]
+ [frame .f3 -width 20 -height 30]
place .p -width 50
update
.p sash place 1 100 0
update
.p sash coord 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {46 0}
test panedwindow-11.14 {move sash in mapped window restricted to visible win} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4
.p add [frame .f -width 20 -height 30] [frame .f2 -width 20 -height 20] \
- [frame .f3 -width 20 -height 30]
+ [frame .f3 -width 20 -height 30]
place .p -width 100
update
.p sash place 1 200 0
update
.p sash coord 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {96 0}
test panedwindow-11.15 {moving sash into "virtual" space on last pane increases reqsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4
.p add [frame .f -width 20 -height 30] [frame .f2 -width 20 -height 20] \
- [frame .f3 -width 20 -height 30]
+ [frame .f3 -width 20 -height 30]
place .p -width 100
set result [winfo reqwidth .p]
update
@@ -923,12 +923,12 @@ test panedwindow-11.15 {moving sash into "virtual" space on last pane increases
update
lappend result [winfo reqwidth .p]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {68 100}
test panedwindow-12.1 {horizontal panedwindow lays out widgets properly} -setup {
- deleteWindows
+ deleteWindows
set result {}
} -body {
panedwindow .p -showhandle false -borderwidth 2 -sashpad 2 -sashwidth 2
@@ -938,10 +938,10 @@ test panedwindow-12.1 {horizontal panedwindow lays out widgets properly} -setup
foreach w [.p panes] {lappend result [winfo x $w] [winfo y $w]}
return $result
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 2 2 28 2 54 2]
test panedwindow-12.2 {vertical panedwindow lays out widgets properly} -setup {
- deleteWindows
+ deleteWindows
set result {}
} -body {
panedwindow .p -showhandle false -borderwidth 2 -sashpad 2 -sashwidth 2 \
@@ -952,15 +952,15 @@ test panedwindow-12.2 {vertical panedwindow lays out widgets properly} -setup {
foreach w [.p panes] {lappend result [winfo x $w] [winfo y $w]}
return $result
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 2 2 2 18 2 34]
test panedwindow-12.3 {horizontal panedwindow lays out widgets properly} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0
foreach {win color} {.p.f blue .p.f2 green} {
- .p add [frame $win -width 20 -height 20 -bg $color] -padx 10 -pady 5 \
- -sticky ""
+ .p add [frame $win -width 20 -height 20 -bg $color] -padx 10 -pady 5 \
+ -sticky ""
}
pack .p
update
@@ -972,15 +972,15 @@ test panedwindow-12.3 {horizontal panedwindow lays out widgets properly} -setup
foreach win {.p.f .p.f2} {lappend result [winfo x $win] [winfo y $win]}
return $result
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 80 30 10 5 50 5 60 30 0 5 30 5]
test panedwindow-12.4 {vertical panedwindow lays out widgets properly} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 \
-orient vertical
foreach win {.p.f .p.f2} {
- .p add [frame $win -width 20 -height 20] -padx 10 -pady 5 -sticky ""
+ .p add [frame $win -width 20 -height 20] -padx 10 -pady 5 -sticky ""
}
pack .p
update
@@ -992,10 +992,10 @@ test panedwindow-12.4 {vertical panedwindow lays out widgets properly} -setup {
foreach win {.p.f .p.f2} {lappend result [winfo x $win] [winfo y $win]}
return $result
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 40 60 10 5 10 35 40 50 10 0 10 25]
test panedwindow-12.5 {panedwindow respects reqsize of panes when possible} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0
.p add [frame .p.f -width 20 -height 20] -sticky ""
@@ -1006,10 +1006,10 @@ test panedwindow-12.5 {panedwindow respects reqsize of panes when possible} -set
update
lappend result [winfo width .p.f]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 20 30]
test panedwindow-12.6 {panedwindow takes explicit widget width over reqwidth} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0
.p add [frame .p.f -width 20 -height 20] -width 20 -sticky ""
@@ -1020,10 +1020,10 @@ test panedwindow-12.6 {panedwindow takes explicit widget width over reqwidth} -s
update
lappend result [winfo width .p.f]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 20 20]
test panedwindow-12.7 {horizontal panedwindow reqheight is max pane height} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4
.p add [frame .p.f -width 20 -height 20] [frame .p.f2 -width 20 -height 20]
@@ -1031,10 +1031,10 @@ test panedwindow-12.7 {horizontal panedwindow reqheight is max pane height} -set
.p.f config -height 40
lappend result [winfo reqheight .p]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {20 40}
test panedwindow-12.8 {horizontal panedwindow reqheight is max pane height} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4
foreach win {.p.f .p.f2} {.p add [frame $win -width 20 -height 20]}
@@ -1043,10 +1043,10 @@ test panedwindow-12.8 {horizontal panedwindow reqheight is max pane height} -set
.p.f config -height 40
lappend result [winfo reqheight .p]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {20 20}
test panedwindow-12.9 {panedwindow pane width overrides widget width} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4
foreach win {.p.f .p.f2} {.p add [frame $win -width 20 -height 20]}
@@ -1057,10 +1057,10 @@ test panedwindow-12.9 {panedwindow pane width overrides widget width} -setup {
.p paneconfigure .p.f -width 30
lappend result [winfo width .p.f]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 10 10]
test panedwindow-12.10 {panedwindow respects reqsize of panes when possible} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0
.p add [frame .p.f -width 20 -height 20] -sticky ""
@@ -1071,10 +1071,10 @@ test panedwindow-12.10 {panedwindow respects reqsize of panes when possible} -se
update
lappend result [winfo height .p.f]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 20 30]
test panedwindow-12.11 {panedwindow takes explicit height over reqheight} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0
.p add [frame .p.f -width 20 -height 20] -height 20 -sticky ""
@@ -1085,10 +1085,10 @@ test panedwindow-12.11 {panedwindow takes explicit height over reqheight} -setup
update
lappend result [winfo height .p.f]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 20 20]
test panedwindow-12.12 {vertical panedwindow reqwidth is max pane width} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \
-orient vertical
@@ -1097,10 +1097,10 @@ test panedwindow-12.12 {vertical panedwindow reqwidth is max pane width} -setup
.p.f config -width 40
lappend result [winfo reqwidth .p]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {20 40}
test panedwindow-12.13 {vertical panedwindow reqwidth is max pane width} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \
-orient vertical
@@ -1110,10 +1110,10 @@ test panedwindow-12.13 {vertical panedwindow reqwidth is max pane width} -setup
.p.f config -width 40
lappend result [winfo reqwidth .p]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {20 20}
test panedwindow-12.14 {panedwindow pane height overrides widget width} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 4 \
-orient vertical
@@ -1125,12 +1125,12 @@ test panedwindow-12.14 {panedwindow pane height overrides widget width} -setup {
.p paneconfigure .p.f -height 30
lappend result [winfo height .p.f]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 10 10]
test panedwindow-13.1 {PanestructureProc, widget yields managements} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Check that the panedwindow correctly yields geometry management of
# a pane when the pane is destroyed.
@@ -1145,7 +1145,7 @@ test panedwindow-13.1 {PanestructureProc, widget yields managements} -setup {
set result ""
} -result {}
test panedwindow-13.2 {PanedWindowLostPaneProc, widget yields management} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Check that the paned window correctly yields geometry management of
# a pane when some other geometry manager steals the pane from us.
@@ -1495,7 +1495,7 @@ test panedwindow-15.16 {panedwindow sticky works} -setup {
test panedwindow-16.1 {setting minsize when pane is too small snaps width} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
.p add [frame .p.f -height 20 -width 20 -bg red]
@@ -1503,17 +1503,17 @@ test panedwindow-16.1 {setting minsize when pane is too small snaps width} -setu
.p paneconfigure .p.f -minsize 40
lappend result [winfo reqwidth .p]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 20 40]
test panedwindow-17.1 {MoveSash, move right} -setup {
- deleteWindows
+ deleteWindows
set result {}
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Get the requested width of the paned window
@@ -1527,14 +1527,14 @@ test panedwindow-17.1 {MoveSash, move right} -setup {
# Check that the sash moved
lappend result [.p sash coord 0]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 42 42 {30 0}]
test panedwindow-17.2 {MoveSash, move right (unmapped) clipped by reqwidth} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 0 100 0
@@ -1543,14 +1543,14 @@ test panedwindow-17.2 {MoveSash, move right (unmapped) clipped by reqwidth} -set
# the panedwindow.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 40 0]
test panedwindow-17.3 {MoveSash, move right (mapped, width < reqwidth) clipped by width} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Put the panedwindow up on the display and give it a width < reqwidth
@@ -1563,14 +1563,14 @@ test panedwindow-17.3 {MoveSash, move right (mapped, width < reqwidth) clipped b
# the panedwindow.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 30 0]
test panedwindow-17.4 {MoveSash, move right (mapped, width > reqwidth) clipped by width} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Put the panedwindow up on the display and give it a width > reqwidth
@@ -1583,14 +1583,14 @@ test panedwindow-17.4 {MoveSash, move right (mapped, width > reqwidth) clipped b
# the panedwindow.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 100 0]
test panedwindow-17.5 {MoveSash, move right respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 100 0
@@ -1599,14 +1599,14 @@ test panedwindow-17.5 {MoveSash, move right respects minsize} -setup {
# respecting minsizes.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 30 0]
test panedwindow-17.6 {MoveSash, move right respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 100 0
@@ -1614,14 +1614,14 @@ test panedwindow-17.6 {MoveSash, move right respects minsize} -setup {
# Get the new sash coord; it should have moved as far as possible.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 40 0]
test panedwindow-17.7 {MoveSash, move right pushes other sashes} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 0 100 0
@@ -1630,14 +1630,14 @@ test panedwindow-17.7 {MoveSash, move right pushes other sashes} -setup {
# respecting minsizes.
.p sash coord 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 62 0]
test panedwindow-17.8 {MoveSash, move right pushes other sashes, respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 100 0
@@ -1646,15 +1646,15 @@ test panedwindow-17.8 {MoveSash, move right pushes other sashes, respects minsiz
# respecting minsizes.
.p sash coord 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 52 0]
test panedwindow-17.9 {MoveSash, move right respects minsize, exludes pad} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] \
- -sticky nsew -minsize 10 -padx 5
+ .p add [frame $w -height 20 -width 20 -bg $c] \
+ -sticky nsew -minsize 10 -padx 5
}
.p sash place 0 100 0
@@ -1663,15 +1663,15 @@ test panedwindow-17.9 {MoveSash, move right respects minsize, exludes pad} -setu
# respecting minsizes.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 50 0]
test panedwindow-17.10 {MoveSash, move right, negative minsize becomes 0} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] \
- -sticky nsew -minsize -50
+ .p add [frame $w -height 20 -width 20 -bg $c] \
+ -sticky nsew -minsize -50
}
.p sash place 0 50 0
@@ -1680,15 +1680,15 @@ test panedwindow-17.10 {MoveSash, move right, negative minsize becomes 0} -setup
# respecting minsizes.
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list [list 50 0] [list 52 0]]
test panedwindow-17.11 {MoveSash, move left} -setup {
- deleteWindows
+ deleteWindows
} -body {
set result {}
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Get the requested width of the paned window
@@ -1702,14 +1702,14 @@ test panedwindow-17.11 {MoveSash, move left} -setup {
# Check that the sash moved
lappend result [.p sash coord 0]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 42 42 {10 0}]
test panedwindow-17.12 {MoveSash, move left, can't move outside of window} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 0 -100 0
@@ -1718,14 +1718,14 @@ test panedwindow-17.12 {MoveSash, move left, can't move outside of window} -setu
# the panedwindow.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 0]
test panedwindow-17.13 {MoveSash, move left respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 0 0
@@ -1734,14 +1734,14 @@ test panedwindow-17.13 {MoveSash, move left respects minsize} -setup {
# respecting minsizes.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 10 0]
test panedwindow-17.14 {MoveSash, move left respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 1 0 0
@@ -1749,14 +1749,14 @@ test panedwindow-17.14 {MoveSash, move left respects minsize} -setup {
# Get the new sash coord; it should have moved as far as possible.
.p sash coord 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 22 0]
test panedwindow-17.15 {MoveSash, move left pushes other sashes} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 1 0 0
@@ -1765,14 +1765,14 @@ test panedwindow-17.15 {MoveSash, move left pushes other sashes} -setup {
# respecting minsizes.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 0]
test panedwindow-17.16 {MoveSash, move left pushes other sashes, respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 1 0 0
@@ -1781,15 +1781,15 @@ test panedwindow-17.16 {MoveSash, move left pushes other sashes, respects minsiz
# respecting minsizes.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 10 0]
test panedwindow-17.17 {MoveSash, move left respects minsize, exludes pad} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] \
- -sticky nsew -minsize 10 -padx 5
+ .p add [frame $w -height 20 -width 20 -bg $c] \
+ -sticky nsew -minsize 10 -padx 5
}
.p sash place 1 0 0
@@ -1798,15 +1798,15 @@ test panedwindow-17.17 {MoveSash, move left respects minsize, exludes pad} -setu
# respecting minsizes.
.p sash coord 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 42 0]
test panedwindow-17.18 {MoveSash, move left, negative minsize becomes 0} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
foreach w {.f1 .f2 .f3} c {red blue green} {
- .p add [frame $w -height 20 -width 20 -bg $c] \
- -sticky nsew -minsize -50
+ .p add [frame $w -height 20 -width 20 -bg $c] \
+ -sticky nsew -minsize -50
}
.p sash place 1 10 0
@@ -1815,18 +1815,18 @@ test panedwindow-17.18 {MoveSash, move left, negative minsize becomes 0} -setup
# respecting minsizes.
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list [list 8 0] [list 10 0]]
test panedwindow-18.1 {MoveSash, move down} -setup {
- deleteWindows
+ deleteWindows
} -body {
set result {}
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Get the requested width of the paned window
@@ -1840,15 +1840,15 @@ test panedwindow-18.1 {MoveSash, move down} -setup {
# Check that the sash moved
lappend result [.p sash coord 0]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 42 42 {0 30}]
test panedwindow-18.2 {MoveSash, move down (unmapped) clipped by reqheight} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 0 0 100
@@ -1857,15 +1857,15 @@ test panedwindow-18.2 {MoveSash, move down (unmapped) clipped by reqheight} -set
# the panedwindow.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 40]
test panedwindow-18.3 {MoveSash, move down (mapped, height < reqheight) clipped by height} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Put the panedwindow up on the display and give it a height < reqheight
@@ -1878,15 +1878,15 @@ test panedwindow-18.3 {MoveSash, move down (mapped, height < reqheight) clipped
# the panedwindow.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 30]
test panedwindow-18.4 {MoveSash, move down (mapped, height > reqheight) clipped by height} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Put the panedwindow up on the display and give it a width > reqwidth
@@ -1899,15 +1899,15 @@ test panedwindow-18.4 {MoveSash, move down (mapped, height > reqheight) clipped
# the panedwindow.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 100]
test panedwindow-18.5 {MoveSash, move down respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 0 100
@@ -1916,15 +1916,15 @@ test panedwindow-18.5 {MoveSash, move down respects minsize} -setup {
# respecting minsizes.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 30]
test panedwindow-18.6 {MoveSash, move down respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 0 100
@@ -1933,15 +1933,15 @@ test panedwindow-18.6 {MoveSash, move down respects minsize} -setup {
# respecting minsizes.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 40]
test panedwindow-18.7 {MoveSash, move down pushes other sashes} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 0 0 100
@@ -1950,15 +1950,15 @@ test panedwindow-18.7 {MoveSash, move down pushes other sashes} -setup {
# respecting minsizes.
.p sash coord 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 62]
test panedwindow-18.8 {MoveSash, move down pushes other sashes, respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 0 100
@@ -1967,16 +1967,16 @@ test panedwindow-18.8 {MoveSash, move down pushes other sashes, respects minsize
# respecting minsizes.
.p sash coord 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 52]
test panedwindow-18.9 {MoveSash, move down respects minsize, exludes pad} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] \
- -sticky nsew -minsize 10 -pady 5
+ .p add [frame $w -height 20 -width 20 -bg $c] \
+ -sticky nsew -minsize 10 -pady 5
}
.p sash place 0 0 100
@@ -1985,16 +1985,16 @@ test panedwindow-18.9 {MoveSash, move down respects minsize, exludes pad} -setup
# respecting minsizes.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 50]
test panedwindow-18.10 {MoveSash, move right, negative minsize becomes 0} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] \
- -sticky nsew -minsize -50
+ .p add [frame $w -height 20 -width 20 -bg $c] \
+ -sticky nsew -minsize -50
}
.p sash place 0 0 50
@@ -2003,16 +2003,16 @@ test panedwindow-18.10 {MoveSash, move right, negative minsize becomes 0} -setup
# respecting minsizes.
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list [list 0 50] [list 0 52]]
test panedwindow-18.11 {MoveSash, move up} -setup {
- deleteWindows
+ deleteWindows
} -body {
set result {}
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
# Get the requested width of the paned window
@@ -2026,15 +2026,15 @@ test panedwindow-18.11 {MoveSash, move up} -setup {
# Check that the sash moved
lappend result [.p sash coord 0]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 42 42 {0 10}]
test panedwindow-18.12 {MoveSash, move up, can't move outside of window} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 0 0 -100
@@ -2043,15 +2043,15 @@ test panedwindow-18.12 {MoveSash, move up, can't move outside of window} -setup
# the panedwindow.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 0]
test panedwindow-18.13 {MoveSash, move up respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 0 0 0
@@ -2060,15 +2060,15 @@ test panedwindow-18.13 {MoveSash, move up respects minsize} -setup {
# respecting minsizes.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 10]
test panedwindow-18.14 {MoveSash, move up respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 1 0 0
@@ -2076,15 +2076,15 @@ test panedwindow-18.14 {MoveSash, move up respects minsize} -setup {
# Get the new sash coord; it should have moved as far as possible.
.p sash coord 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 22]
test panedwindow-18.15 {MoveSash, move up pushes other sashes} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
.p sash place 1 0 0
@@ -2093,15 +2093,15 @@ test panedwindow-18.15 {MoveSash, move up pushes other sashes} -setup {
# respecting minsizes.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 0]
test panedwindow-18.16 {MoveSash, move up pushes other sashes, respects minsize} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
+ .p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew -minsize 10
}
.p sash place 1 0 0
@@ -2110,16 +2110,16 @@ test panedwindow-18.16 {MoveSash, move up pushes other sashes, respects minsize}
# respecting minsizes.
.p sash coord 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 10]
test panedwindow-18.17 {MoveSash, move up respects minsize, exludes pad} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue} {
- .p add [frame $w -height 20 -width 20 -bg $c] \
- -sticky nsew -minsize 10 -pady 5
+ .p add [frame $w -height 20 -width 20 -bg $c] \
+ -sticky nsew -minsize 10 -pady 5
}
.p sash place 1 0 0
@@ -2128,16 +2128,16 @@ test panedwindow-18.17 {MoveSash, move up respects minsize, exludes pad} -setup
# respecting minsizes.
.p sash coord 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list 0 42]
test panedwindow-18.18 {MoveSash, move up, negative minsize becomes 0} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
foreach w {.f1 .f2 .f3} c {red blue green} {
- .p add [frame $w -height 20 -width 20 -bg $c] \
- -sticky nsew -minsize -50
+ .p add [frame $w -height 20 -width 20 -bg $c] \
+ -sticky nsew -minsize -50
}
.p sash place 1 0 10
@@ -2146,7 +2146,7 @@ test panedwindow-18.18 {MoveSash, move up, negative minsize becomes 0} -setup {
# respecting minsizes.
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list [list 0 8] [list 0 10]]
@@ -2155,90 +2155,90 @@ test panedwindow-18.18 {MoveSash, move up, negative minsize becomes 0} -setup {
# geometry.
test panedwindow-19.1 {ComputeGeometry, reqheight taken from widgets} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0
foreach w {.f1 .f2 .f3} {
- .p add [frame $w -width 20 -height 20 -bg blue]
+ .p add [frame $w -width 20 -height 20 -bg blue]
}
set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]]
.f3 configure -height 40
lappend result [list [winfo reqwidth .p] [winfo reqheight .p]]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list [list 60 20] [list 60 40]]
test panedwindow-19.2 {ComputeGeometry, reqheight taken from widgets} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0
foreach w {.f1 .f2 .f3} {
- .p add [frame $w -width 20 -height 20 -bg blue]
+ .p add [frame $w -width 20 -height 20 -bg blue]
}
set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]]
.p paneconfigure .f3 -height 40
lappend result [list [winfo reqwidth .p] [winfo reqheight .p]]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list [list 60 20] [list 60 40]]
test panedwindow-19.3 {ComputeGeometry, reqheight taken from widgets} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0
foreach w {.f1 .f2 .f3} {
- .p add [frame $w -width 20 -height 20 -bg blue] -pady 20
+ .p add [frame $w -width 20 -height 20 -bg blue] -pady 20
}
set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]]
.p paneconfigure .f3 -height 40
lappend result [list [winfo reqwidth .p] [winfo reqheight .p]]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list [list 60 60] [list 60 80]]
test panedwindow-19.4 {ComputeGeometry, reqwidth taken from widgets} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 \
-orient vertical
foreach w {.f1 .f2 .f3} {
- .p add [frame $w -width 20 -height 20 -bg blue]
+ .p add [frame $w -width 20 -height 20 -bg blue]
}
set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]]
.f3 configure -width 40
lappend result [list [winfo reqwidth .p] [winfo reqheight .p]]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list [list 20 60] [list 40 60]]
test panedwindow-19.5 {ComputeGeometry, reqwidth taken from widgets} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 \
-orient vertical
foreach w {.f1 .f2 .f3} {
- .p add [frame $w -width 20 -height 20 -bg blue]
+ .p add [frame $w -width 20 -height 20 -bg blue]
}
set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]]
.p paneconfigure .f3 -width 40
lappend result [list [winfo reqwidth .p] [winfo reqheight .p]]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list [list 20 60] [list 40 60]]
test panedwindow-19.6 {ComputeGeometry, reqwidth taken from widgets} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 0 \
-orient vertical
foreach w {.f1 .f2 .f3} {
- .p add [frame $w -width 20 -height 20 -bg blue] -padx 20
+ .p add [frame $w -width 20 -height 20 -bg blue] -padx 20
}
set result [list [list [winfo reqwidth .p] [winfo reqheight .p]]]
.p paneconfigure .f3 -width 40
lappend result [list [winfo reqwidth .p] [winfo reqheight .p]]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list [list 60 60] [list 80 60]]
test panedwindow-19.7 {ComputeGeometry, one pane, reqsize set properly} -setup {
@@ -4308,21 +4308,21 @@ test panedwindow-19.134 {ComputeGeometry/ArrangePanes, pane coords, vert} -setup
test panedwindow-20.1 {destroyed widgets are removed from panedwindow} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [frame .f -width 20 -height 20 -bg blue]
destroy .f
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test panedwindow-20.2 {destroyed pane causes geometry recomputation} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 2
.p add [frame .f -width 20 -height 20 -bg blue] \
- [frame .f2 -width 20 -height 20 -bg red]
+ [frame .f2 -width 20 -height 20 -bg red]
destroy .f
winfo reqwidth .p
} -cleanup {
@@ -4331,11 +4331,11 @@ test panedwindow-20.2 {destroyed pane causes geometry recomputation} -setup {
test panedwindow-21.1 {ArrangePanes, extra space is given to the last pane} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
.p add [frame .f1 -width 20 -height 20 -bg blue] \
- [frame .f2 -width 20 -height 20 -bg red] -sticky nsew
+ [frame .f2 -width 20 -height 20 -bg red] -sticky nsew
place .p -width 100 -x 0 -y 0
update
winfo width .f2
@@ -4343,12 +4343,12 @@ test panedwindow-21.1 {ArrangePanes, extra space is given to the last pane} -set
deleteWindows
} -result 78
test panedwindow-21.2 {ArrangePanes, extra space is given to the last pane} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
.p add [frame .f1 -width 20 -height 20 -bg blue] \
- [frame .f2 -width 20 -height 20 -bg red] -sticky nsew
+ [frame .f2 -width 20 -height 20 -bg red] -sticky nsew
place .p -height 100 -x 0 -y 0
update
winfo height .f2
@@ -4356,51 +4356,51 @@ test panedwindow-21.2 {ArrangePanes, extra space is given to the last pane} -set
deleteWindows
} -result 78
test panedwindow-21.3 {ArrangePanes, explicit height/width are preferred} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
.p add [frame .f1 -width 20 -height 20 -bg blue] \
- [frame .f2 -width 20 -height 20 -bg red] -sticky ""
+ [frame .f2 -width 20 -height 20 -bg red] -sticky ""
.p paneconfigure .f1 -width 10 -height 15
pack .p
update
list [winfo width .f1] [winfo height .f1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {10 15}
test panedwindow-21.4 {ArrangePanes, panes clipped by size of pane} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
.p add [frame .f1 -width 20 -height 20 -bg blue] \
- [frame .f2 -width 20 -height 20 -bg red]
+ [frame .f2 -width 20 -height 20 -bg red]
.p sash place 0 10 0
pack .p
update
list [winfo width .f1] [winfo height .f1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {10 20}
test panedwindow-21.5 {ArrangePanes, panes clipped by size of pane} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
.p add [frame .f1 -width 20 -height 20 -bg blue] \
- [frame .f2 -width 20 -height 20 -bg red]
+ [frame .f2 -width 20 -height 20 -bg red]
.p sash place 0 0 10
pack .p
update
list [winfo width .f1] [winfo height .f1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {20 10}
test panedwindow-21.6 {ArrangePanes, height of pane taken from total height} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
.p add [frame .p.f1 -width 20 -height 20 -bg blue] \
- [frame .p.f2 -width 20 -height 40 -bg red] -sticky ""
+ [frame .p.f2 -width 20 -height 40 -bg red] -sticky ""
pack .p
update
winfo y .p.f1
@@ -4408,12 +4408,12 @@ test panedwindow-21.6 {ArrangePanes, height of pane taken from total height} -se
deleteWindows
} -result 10
test panedwindow-21.7 {ArrangePanes, width of pane taken from total width} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
.p add [frame .p.f1 -width 20 -height 20 -bg blue] \
- [frame .p.f2 -width 40 -height 40 -bg red] -sticky ""
+ [frame .p.f2 -width 40 -height 40 -bg red] -sticky ""
pack .p
update
winfo x .p.f1
@@ -4421,11 +4421,11 @@ test panedwindow-21.7 {ArrangePanes, width of pane taken from total width} -setu
deleteWindows
} -result 10
test panedwindow-21.8 {ArrangePanes, panes with width <= 0 are unmapped} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
.p add [frame .f1 -width 20 -height 20 -bg blue] \
- [frame .f2 -width 20 -height 40 -bg red]
+ [frame .f2 -width 20 -height 40 -bg red]
pack .p
update
set result [winfo ismapped .f1]
@@ -4433,14 +4433,14 @@ test panedwindow-21.8 {ArrangePanes, panes with width <= 0 are unmapped} -setup
update
lappend result [winfo ismapped .f1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {1 0}
test panedwindow-21.9 {ArrangePanes, panes with width <= 0 are unmapped} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
.p add [frame .p.f1 -width 20 -height 20 -bg blue] \
- [frame .p.f2 -width 20 -height 40 -bg red]
+ [frame .p.f2 -width 20 -height 40 -bg red]
pack .p
update
set result [winfo ismapped .p.f1]
@@ -4448,14 +4448,14 @@ test panedwindow-21.9 {ArrangePanes, panes with width <= 0 are unmapped} -setup
update
lappend result [winfo ismapped .p.f1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {1 0}
test panedwindow-21.10 {ArrangePanes, panes with width <= 0 are unmapped} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 -orient vertical
.p add [frame .p.f1 -width 20 -height 20 -bg blue] \
- [frame .p.f2 -width 20 -height 40 -bg red]
+ [frame .p.f2 -width 20 -height 40 -bg red]
pack .p
update
set result [winfo ismapped .p.f1]
@@ -4463,14 +4463,14 @@ test panedwindow-21.10 {ArrangePanes, panes with width <= 0 are unmapped} -setup
update
lappend result [winfo ismapped .p.f1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {1 0}
test panedwindow-21.11 {ArrangePanes, last pane shrinks} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2
.p add [frame .f1 -width 20 -height 20 -bg blue] \
- [frame .f2 -width 20 -height 20 -bg red] -sticky nsew
+ [frame .f2 -width 20 -height 20 -bg red] -sticky nsew
place .p -width 40 -x 0 -y 0
update
winfo width .f2
@@ -4478,12 +4478,12 @@ test panedwindow-21.11 {ArrangePanes, last pane shrinks} -setup {
deleteWindows
} -result 18
test panedwindow-21.12 {ArrangePanes, last pane shrinks} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \
-orient vertical
.p add [frame .f1 -width 20 -height 20 -bg blue] \
- [frame .f2 -width 20 -height 20 -bg red] -sticky nsew
+ [frame .f2 -width 20 -height 20 -bg red] -sticky nsew
place .p -height 40 -x 0 -y 0
update
winfo height .f2
@@ -4491,67 +4491,67 @@ test panedwindow-21.12 {ArrangePanes, last pane shrinks} -setup {
deleteWindows
} -result 18
test panedwindow-21.13 {ArrangePanes, panedwindow resizes} -setup {
- deleteWindows
+ deleteWindows
} -body {
- panedwindow .p -width 200 -borderwidth 0
- frame .f1 -height 50 -bg blue
- set result [list]
- lappend result [winfo reqwidth .p] [winfo reqheight .p]
- .p add .f1
- pack .p
- lappend result [winfo reqwidth .p] [winfo reqheight .p]
+ panedwindow .p -width 200 -borderwidth 0
+ frame .f1 -height 50 -bg blue
+ set result [list]
+ lappend result [winfo reqwidth .p] [winfo reqheight .p]
+ .p add .f1
+ pack .p
+ lappend result [winfo reqwidth .p] [winfo reqheight .p]
} -cleanup {
deleteWindows
} -result {200 1 200 50}
test panedwindow-21.14 {ArrangePanes, panedwindow resizes} -setup {
- deleteWindows
+ deleteWindows
} -body {
- panedwindow .p -height 200 -borderwidth 0 -orient vertical
- frame .f1 -width 50 -bg blue
- set result [list]
- lappend result [winfo reqwidth .p] [winfo reqheight .p]
- .p add .f1
- pack .p
- lappend result [winfo reqwidth .p] [winfo reqheight .p]
+ panedwindow .p -height 200 -borderwidth 0 -orient vertical
+ frame .f1 -width 50 -bg blue
+ set result [list]
+ lappend result [winfo reqwidth .p] [winfo reqheight .p]
+ .p add .f1
+ pack .p
+ lappend result [winfo reqwidth .p] [winfo reqheight .p]
} -cleanup {
deleteWindows
} -result {1 200 50 200}
test panedwindow-21.15 {ArrangePanes, last pane grows} -setup {
- deleteWindows
-} -body {
- panedwindow .p -showhandle false -height 50
- .p add [frame .f1 -width 50 -bg red] [frame .f2 -width 50 -bg white] \
- [frame .f3 -width 50 -bg blue] [frame .f4 -width 50 -bg green]
- .p sash place 1 250 0
- pack .p
- update
- set result [list]
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4] [winfo width .p]
- .p configure -width 300
- update
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4] [winfo width .p]
+ deleteWindows
+} -body {
+ panedwindow .p -showhandle false -height 50
+ .p add [frame .f1 -width 50 -bg red] [frame .f2 -width 50 -bg white] \
+ [frame .f3 -width 50 -bg blue] [frame .f4 -width 50 -bg green]
+ .p sash place 1 250 0
+ pack .p
+ update
+ set result [list]
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4] [winfo width .p]
+ .p configure -width 300
+ update
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4] [winfo width .p]
} -cleanup {
deleteWindows
} -result {50 150 1 1 211 50 150 1 89 300}
test panedwindow-22.1 {PanedWindowReqProc, react to pane geometry changes} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Basically just want to make sure that the PanedWindowReqProc is called
panedwindow .p -borderwidth 0 -sashpad 0 -sashwidth 2
.p add [frame .f1 -width 20 -height 20 -bg blue] \
- [frame .f2 -width 20 -height 40 -bg red]
+ [frame .f2 -width 20 -height 40 -bg red]
set result [winfo reqheight .p]
.f1 configure -height 80
lappend result [winfo reqheight .p]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {40 80}
test panedwindow-22.2 {PanedWindowReqProc, react to pane geometry changes} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -orient horizontal -sashpad 0 -sashwidth 2
.p add [frame .f1 -width 10] [frame .f2 -width 10]
@@ -4561,97 +4561,97 @@ test panedwindow-22.2 {PanedWindowReqProc, react to pane geometry changes} -setu
destroy .p .f1 .f2
expr {[lindex $result 1] - [lindex $result 0]}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {10}
test panedwindow-23.1 {ConfigurePanes, can't add panedwindow to itself} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add .p
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {can't add .p to itself}
test panedwindow-23.2 {ConfigurePanes, bad window throws error} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add .b
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {bad window path name ".b"}
test panedwindow-23.3 {ConfigurePanes, bad window aborts processing} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .b
catch {.p add .b .a}
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test panedwindow-23.4 {ConfigurePanes, bad option aborts processing} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .b
catch {.p add .b -sticky foobar}
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test panedwindow-23.5 {ConfigurePanes, after win isn't managed by panedwin} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .b
button .c
.p add .b -after .c
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {window ".c" is not managed by .p}
test panedwindow-23.6 {ConfigurePanes, before win isn't managed by panedwin} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .b
button .c
.p add .b -before .c
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {window ".c" is not managed by .p}
test panedwindow-23.7 {ConfigurePanes, -after {} is a no-op} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] [button .c]
.p paneconfigure .b -after {}
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.b .c}
test panedwindow-23.8 {ConfigurePanes, -before {} is a no-op} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] [button .c]
.p paneconfigure .b -before {}
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.b .c}
test panedwindow-23.9 {ConfigurePanes, new panes are added} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] [button .c]
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.b .c}
test panedwindow-23.10 {ConfigurePanes, options applied to all panes} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] [button .c] -sticky ne -height 5 -width 5 -minsize 10
@@ -4665,22 +4665,22 @@ test panedwindow-23.10 {ConfigurePanes, options applied to all panes} -setup {
}
return $result
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.b {-sticky ne -height 5 -width 5 -minsize 10} .c {-sticky ne -height 5 -width 5 -minsize 10}}
test panedwindow-23.11 {ConfigurePanes, existing panes are reconfigured} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b] -sticky nw -height 10
.p add .b [button .c] -sticky se -height 2
list [.p panes] [.p panecget .b -sticky] [.p panecget .b -height] \
- [.p panecget .c -sticky] [.p panecget .c -height]
+ [.p panecget .c -sticky] [.p panecget .c -height]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result [list {.b .c} es 2 es 2]
test panedwindow-23.12 {ConfigurePanes, widgets added to end by default} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p add [button .b]
@@ -4688,10 +4688,10 @@ test panedwindow-23.12 {ConfigurePanes, widgets added to end by default} -setup
.p add [button .d]
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.b .c .d}
test panedwindow-23.13 {ConfigurePanes, -after, single addition} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .a
@@ -4702,10 +4702,10 @@ test panedwindow-23.13 {ConfigurePanes, -after, single addition} -setup {
.p add .c -after .a
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.a .c .b}
test panedwindow-23.14 {ConfigurePanes, -after, multiple additions} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .a
@@ -4717,10 +4717,10 @@ test panedwindow-23.14 {ConfigurePanes, -after, multiple additions} -setup {
.p add .c .d -after .a
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.a .c .d .b}
test panedwindow-23.15 {ConfigurePanes, -after, relocates existing widget} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .a
@@ -4732,10 +4732,10 @@ test panedwindow-23.15 {ConfigurePanes, -after, relocates existing widget} -setu
.p add .d -after .a
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.a .d .b .c}
test panedwindow-23.16 {ConfigurePanes, -after, relocates existing widgets} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .a
@@ -4747,10 +4747,10 @@ test panedwindow-23.16 {ConfigurePanes, -after, relocates existing widgets} -set
.p add .b .d -after .a
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.a .b .d .c}
test panedwindow-23.17 {ConfigurePanes, -after, relocates existing widgets} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .a
@@ -4762,10 +4762,10 @@ test panedwindow-23.17 {ConfigurePanes, -after, relocates existing widgets} -set
.p add .d .a -after .b
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.b .d .a .c}
test panedwindow-23.18 {ConfigurePanes, -after, relocates existing widgets} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .a
@@ -4777,10 +4777,10 @@ test panedwindow-23.18 {ConfigurePanes, -after, relocates existing widgets} -set
.p add .d .a -after .a
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.d .a .b .c}
test panedwindow-23.19 {ConfigurePanes, -after, after last window} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .a
@@ -4792,10 +4792,10 @@ test panedwindow-23.19 {ConfigurePanes, -after, after last window} -setup {
.p add .d -after .c
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.a .b .c .d}
test panedwindow-23.20 {ConfigurePanes, -before, before first window} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .a
@@ -4807,10 +4807,10 @@ test panedwindow-23.20 {ConfigurePanes, -before, before first window} -setup {
.p add .d -before .a
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.d .a .b .c}
test panedwindow-23.21 {ConfigurePanes, -before, relocate existing windows} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .a
@@ -4822,10 +4822,10 @@ test panedwindow-23.21 {ConfigurePanes, -before, relocate existing windows} -set
.p add .d .b -before .a
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.d .b .a .c}
test panedwindow-23.22 {ConfigurePanes, pane specified multiple times} -setup {
- deleteWindows
+ deleteWindows
} -body {
# This test should not cause a core dump
@@ -4837,10 +4837,10 @@ test panedwindow-23.22 {ConfigurePanes, pane specified multiple times} -setup {
.p add .a .a .b .c
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.a .b .c}
test panedwindow-23.23 {ConfigurePanes, pane specified multiple times} -setup {
- deleteWindows
+ deleteWindows
} -body {
# This test should not cause a core dump
@@ -4853,48 +4853,48 @@ test panedwindow-23.23 {ConfigurePanes, pane specified multiple times} -setup {
.p add .a .b .a -after .c
.p panes
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.c .a .b}
test panedwindow-23.24 {ConfigurePanes, panedwindow cannot manage toplevels} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
toplevel .t
.p add .t
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {can't add toplevel .t to .p}
test panedwindow-23.25 {ConfigurePanes, restrict possible panes} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
frame .f
button .f.b
.p add .f.b
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {can't add .f.b to .p}
test panedwindow-23.26 {ConfigurePanes, restrict possible panes} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f
panedwindow .f.p
button .b
.f.p add .b
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test panedwindow-23.27 {ConfigurePanes, restrict possible panes} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
button .p.b
.p add .p.b
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test panedwindow-23.28 {ConfigurePanes, restrict possible panes} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f
frame .f.f
@@ -4903,60 +4903,60 @@ test panedwindow-23.28 {ConfigurePanes, restrict possible panes} -setup {
button .b
.f.f.f.p add .b
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test panedwindow-23.29 {ConfigurePanes, -hide works} -setup {
- deleteWindows
-} -body {
- panedwindow .p -showhandle false
- frame .f1 -width 40 -height 100 -bg red
- frame .f2 -width 40 -height 100 -bg white
- frame .f3 -width 40 -height 100 -bg blue
- frame .f4 -width 40 -height 100 -bg green
- .p add .f1 .f2 .f3 .f4
- pack .p
- update
- set result [list]
- lappend result [winfo ismapped .f1] [winfo ismapped .f2] \
- [winfo ismapped .f3] [winfo ismapped .f4]
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4] [winfo width .p]
- .p paneconfigure .f2 -hide 1
- update
- lappend result [winfo ismapped .f1] [winfo ismapped .f2] \
- [winfo ismapped .f3] [winfo ismapped .f4]
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4] [winfo width .p]
+ deleteWindows
+} -body {
+ panedwindow .p -showhandle false
+ frame .f1 -width 40 -height 100 -bg red
+ frame .f2 -width 40 -height 100 -bg white
+ frame .f3 -width 40 -height 100 -bg blue
+ frame .f4 -width 40 -height 100 -bg green
+ .p add .f1 .f2 .f3 .f4
+ pack .p
+ update
+ set result [list]
+ lappend result [winfo ismapped .f1] [winfo ismapped .f2] \
+ [winfo ismapped .f3] [winfo ismapped .f4]
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4] [winfo width .p]
+ .p paneconfigure .f2 -hide 1
+ update
+ lappend result [winfo ismapped .f1] [winfo ismapped .f2] \
+ [winfo ismapped .f3] [winfo ismapped .f4]
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4] [winfo width .p]
} -cleanup {
deleteWindows
} -result {1 1 1 1 40 40 40 40 171 1 0 1 1 40 40 40 40 128}
test panedwindow-23.30 {ConfigurePanes, -hide works} -setup {
- deleteWindows
-} -body {
- panedwindow .p -showhandle false -width 130 -height 100
- frame .f1 -width 40 -bg red
- frame .f2 -width 40 -bg white
- frame .f3 -width 40 -bg blue
- frame .f4 -width 40 -bg green
- .p add .f1 .f2 .f3 .f4
- pack .p
- update
- set result [list]
- lappend result [winfo ismapped .f1] [winfo ismapped .f2] \
- [winfo ismapped .f3] [winfo ismapped .f4]
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4] [winfo width .p]
- .p paneconfigure .f2 -hide 1
- update
- lappend result [winfo ismapped .f1] [winfo ismapped .f2] \
- [winfo ismapped .f3] [winfo ismapped .f4]
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4] [winfo width .p]
+ deleteWindows
+} -body {
+ panedwindow .p -showhandle false -width 130 -height 100
+ frame .f1 -width 40 -bg red
+ frame .f2 -width 40 -bg white
+ frame .f3 -width 40 -bg blue
+ frame .f4 -width 40 -bg green
+ .p add .f1 .f2 .f3 .f4
+ pack .p
+ update
+ set result [list]
+ lappend result [winfo ismapped .f1] [winfo ismapped .f2] \
+ [winfo ismapped .f3] [winfo ismapped .f4]
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4] [winfo width .p]
+ .p paneconfigure .f2 -hide 1
+ update
+ lappend result [winfo ismapped .f1] [winfo ismapped .f2] \
+ [winfo ismapped .f3] [winfo ismapped .f4]
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4] [winfo width .p]
} -cleanup {
deleteWindows
} -result {1 1 1 0 39 40 40 1 130 1 0 1 1 40 40 40 42 130}
test panedwindow-23.30a {ConfigurePanes, hidden panes are unmapped} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p1 -sashrelief raised
panedwindow .p2 -sashrelief raised
@@ -4968,151 +4968,151 @@ test panedwindow-23.30a {ConfigurePanes, hidden panes are unmapped} -setup {
.p1 add .p2 -sticky nsew
.p1 add .l1 -sticky nsew
pack .p1 -side top -expand 1 -fill both
- update
- set result [list]
- lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
- [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
+ update
+ set result [list]
+ lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
+ [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
.p2 paneconfigure .l1 -hide 1
- update
- lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
- [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
+ update
+ lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
+ [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
.p1 paneconfigure .p2 -hide 1
- update
- lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
- [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
+ update
+ lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
+ [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
.p1 paneconfigure .p2 -hide 0
- update
- lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
- [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
+ update
+ lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
+ [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
} -cleanup {
deleteWindows
} -result {{1 1 1 1 1} {1 1 0 1 1} {1 0 0 0 0} {1 1 0 1 1}}
test panedwindow-23.31 {ConfigurePanes, -hide works, last pane stretches} -setup {
- deleteWindows
-} -body {
- panedwindow .p -showhandle false -width 200 -height 200 -borderwidth 0
- frame .f1 -width 50 -bg red
- frame .f2 -width 50 -bg green
- frame .f3 -width 50 -bg blue
- .p add .f1 .f2 .f3
- pack .p
- update
- set result [list]
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3]
- .p paneconfigure .f2 -hide 1
- update
+ deleteWindows
+} -body {
+ panedwindow .p -showhandle false -width 200 -height 200 -borderwidth 0
+ frame .f1 -width 50 -bg red
+ frame .f2 -width 50 -bg green
+ frame .f3 -width 50 -bg blue
+ .p add .f1 .f2 .f3
+ pack .p
+ update
+ set result [list]
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3]
+ .p paneconfigure .f2 -hide 1
+ update
lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3]
} -cleanup {
deleteWindows
} -result {50 50 94 50 50 147}
test panedwindow-23.32 {ConfigurePanes, -hide works, last pane stretches} -setup {
- deleteWindows
-} -body {
- panedwindow .p -showhandle false -width 200 -height 200 \
- -borderwidth 0 -orient vertical
- frame .f1 -height 50 -bg red
- frame .f2 -height 50 -bg green
- frame .f3 -height 50 -bg blue
- .p add .f1 .f2 .f3
- pack .p
- update
- set result [list]
- lappend result [winfo height .f1] [winfo height .f2] [winfo height .f3]
- .p paneconfigure .f2 -hide 1
- update
- lappend result [winfo height .f1] [winfo height .f2] [winfo height .f3]
+ deleteWindows
+} -body {
+ panedwindow .p -showhandle false -width 200 -height 200 \
+ -borderwidth 0 -orient vertical
+ frame .f1 -height 50 -bg red
+ frame .f2 -height 50 -bg green
+ frame .f3 -height 50 -bg blue
+ .p add .f1 .f2 .f3
+ pack .p
+ update
+ set result [list]
+ lappend result [winfo height .f1] [winfo height .f2] [winfo height .f3]
+ .p paneconfigure .f2 -hide 1
+ update
+ lappend result [winfo height .f1] [winfo height .f2] [winfo height .f3]
} -cleanup {
deleteWindows
} -result {50 50 94 50 50 147}
test panedwindow-23.33 {ConfigurePanes, -stretch first} -setup {
- deleteWindows
-} -body {
- panedwindow .p -showhandle false -height 100 -width 182
- frame .f1 -width 40 -bg red
- frame .f2 -width 40 -bg white
- frame .f3 -width 40 -bg blue
- frame .f4 -width 40 -bg green
- .p add .f1 .f2 .f3 .f4 -stretch first
- pack .p
- update
- set result [list]
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4]
- .p paneconfigure .f2 -hide 1
- update
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4]
+ deleteWindows
+} -body {
+ panedwindow .p -showhandle false -height 100 -width 182
+ frame .f1 -width 40 -bg red
+ frame .f2 -width 40 -bg white
+ frame .f3 -width 40 -bg blue
+ frame .f4 -width 40 -bg green
+ .p add .f1 .f2 .f3 .f4 -stretch first
+ pack .p
+ update
+ set result [list]
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4]
+ .p paneconfigure .f2 -hide 1
+ update
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4]
} -cleanup {
deleteWindows
} -result {51 40 40 40 94 40 40 40}
test panedwindow-23.34 {ConfigurePanes, -stretch middle} -setup {
- deleteWindows
-} -body {
- panedwindow .p -showhandle false -height 100 -width 182
- frame .f1 -width 40 -bg red
- frame .f2 -width 40 -bg white
- frame .f3 -width 40 -bg blue
- frame .f4 -width 40 -bg green
- .p add .f1 .f2 .f3 .f4 -stretch middle
- pack .p
- update
- set result [list]
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4]
- .p paneconfigure .f2 -hide 1
- update
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4]
+ deleteWindows
+} -body {
+ panedwindow .p -showhandle false -height 100 -width 182
+ frame .f1 -width 40 -bg red
+ frame .f2 -width 40 -bg white
+ frame .f3 -width 40 -bg blue
+ frame .f4 -width 40 -bg green
+ .p add .f1 .f2 .f3 .f4 -stretch middle
+ pack .p
+ update
+ set result [list]
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4]
+ .p paneconfigure .f2 -hide 1
+ update
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4]
} -cleanup {
deleteWindows
} -result {40 45 46 40 40 45 94 40}
test panedwindow-23.35 {ConfigurePanes, -stretch always} -setup {
- deleteWindows
-} -body {
- panedwindow .p -showhandle false -height 100 -width 182
- frame .f1 -width 40 -bg red
- frame .f2 -width 40 -bg white
- frame .f3 -width 40 -bg blue
- frame .f4 -width 40 -bg green
- .p add .f1 .f2 .f3 .f4 -stretch always
- pack .p
- update
- set result [list]
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4]
- .p paneconfigure .f2 -hide 1
- update
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4]
+ deleteWindows
+} -body {
+ panedwindow .p -showhandle false -height 100 -width 182
+ frame .f1 -width 40 -bg red
+ frame .f2 -width 40 -bg white
+ frame .f3 -width 40 -bg blue
+ frame .f4 -width 40 -bg green
+ .p add .f1 .f2 .f3 .f4 -stretch always
+ pack .p
+ update
+ set result [list]
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4]
+ .p paneconfigure .f2 -hide 1
+ update
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4]
} -cleanup {
deleteWindows
} -result {42 43 43 43 58 43 58 58}
test panedwindow-23.36 {ConfigurePanes, -stretch never} -setup {
- deleteWindows
-} -body {
- panedwindow .p -showhandle false -height 100 -width 182
- frame .f1 -width 40 -bg red
- frame .f2 -width 40 -bg white
- frame .f3 -width 40 -bg blue
- frame .f4 -width 40 -bg green
- .p add .f1 .f2 .f3 .f4 -stretch never
- pack .p
- update
- set result [list]
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4]
- .p paneconfigure .f2 -hide 1
- update
- lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
- [winfo width .f4]
+ deleteWindows
+} -body {
+ panedwindow .p -showhandle false -height 100 -width 182
+ frame .f1 -width 40 -bg red
+ frame .f2 -width 40 -bg white
+ frame .f3 -width 40 -bg blue
+ frame .f4 -width 40 -bg green
+ .p add .f1 .f2 .f3 .f4 -stretch never
+ pack .p
+ update
+ set result [list]
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4]
+ .p paneconfigure .f2 -hide 1
+ update
+ lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] \
+ [winfo width .f4]
} -cleanup {
deleteWindows
} -result {40 40 40 40 40 40 40 40}
test panedwindow-24.1 {Unlink, remove a paned with -before/-after refs} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Bug 928413
set result {}
@@ -5129,20 +5129,20 @@ test panedwindow-24.1 {Unlink, remove a paned with -before/-after refs} -setup {
.pw paneconfigure .pw.l2 -before .pw.l1
lappend result [.pw panecget .pw.l2 -before]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.pw.l3 {} .pw.l1}
test panedwindow-25.1 {DestroyPanedWindow} -setup {
- deleteWindows
+ deleteWindows
} -body {
# This test should not result in any memory leaks.
panedwindow .p
foreach w {.a .b .c .d .e .f .g .h .i .j .k .l .m .n .o .q .r .s .t} {
- .p add [button $w]
+ .p add [button $w]
}
foreach w {.a .b .c .d .e .f .g .h .i .j .k .l .m .n .o .p .q .r .s .t} {
- destroy $w
+ destroy $w
}
set result {}
} -result {}
@@ -5165,307 +5165,307 @@ test panedwindow-25.2 {UnmapNotify and MapNotify events are propagated to panes}
destroy .pw .pw.b
set result
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {1 0 0 1 1}
test panedwindow-26.1 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 0 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test panedwindow-26.2 {PanedWindowIdentifyCoords, padding is included} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 20 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 sash}
test panedwindow-26.3 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 22 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 sash}
test panedwindow-26.4 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 24 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 sash}
test panedwindow-26.5 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 26 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 sash}
test panedwindow-26.6 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 26 -1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test panedwindow-26.7 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 26 100
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test panedwindow-26.8 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \
- -handlesize 6
+ -handlesize 6
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 22 4
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 sash}
test panedwindow-26.9 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \
- -handlesize 6
+ -handlesize 6
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 22 5
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 handle}
test panedwindow-26.10 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \
- -handlesize 8
+ -handlesize 8
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 20 5
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 handle}
test panedwindow-26.11 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \
- -handlesize 8
+ -handlesize 8
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 20 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 sash}
test panedwindow-26.12 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -bd 0 -sashwidth 2 -sashpad 2
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20] \
- [frame .f3 -bg green -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20] \
+ [frame .f3 -bg green -width 20 -height 20]
.p identify 48 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {1 sash}
test panedwindow-26.13 {identify subcommand errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -borderwidth 0 -sashpad 2 -sashwidth 4
.p identify
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {wrong # args: should be ".p identify x y"}
test panedwindow-26.14 {identify subcommand errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p identify foo bar
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {expected integer but got "foo"}
test panedwindow-26.15 {identify subcommand errors} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p
.p identify 0 bar
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {expected integer but got "bar"}
test panedwindow-26.16 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 0 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test panedwindow-26.17 {PanedWindowIdentifyCoords, padding is included} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 0 20
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 sash}
test panedwindow-26.18 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 0 22
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 sash}
test panedwindow-26.19 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 0 24
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 sash}
test panedwindow-26.20 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 0 26
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 sash}
test panedwindow-26.21 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify -1 26
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test panedwindow-26.22 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -orient vertical
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 100 26
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test panedwindow-26.23 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \
- -handlesize 6 -orient vertical
+ -handlesize 6 -orient vertical
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 4 22
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 sash}
test panedwindow-26.24 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \
- -handlesize 6 -orient vertical
+ -handlesize 6 -orient vertical
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 5 22
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 handle}
test panedwindow-26.25 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \
- -handlesize 8 -orient vertical
+ -handlesize 8 -orient vertical
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 5 20
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 handle}
test panedwindow-26.26 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 -showhandle 1 -handlepad 5 \
- -handlesize 8 -orient vertical
+ -handlesize 8 -orient vertical
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20]
.p identify 0 20
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 sash}
test panedwindow-26.27 {PanedWindowIdentifyCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -showhandle false -bd 0 -sashwidth 2 -sashpad 2 -orient vertical
.p add [frame .f -bg red -width 20 -height 20] \
- [frame .f2 -bg blue -width 20 -height 20] \
- [frame .f3 -bg green -width 20 -height 20]
+ [frame .f2 -bg blue -width 20 -height 20] \
+ [frame .f3 -bg green -width 20 -height 20]
.p identify 0 48
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {1 sash}
test panedwindow-27.1 {destroy the window cleanly on error [Bug #616589]} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bogusopt bogus
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes error -result {unknown option "-bogusopt"}
test panedwindow-27.2 {destroy the window cleanly on rename [Bug #616589]} -setup {
- deleteWindows
+ deleteWindows
} -body {
destroy .p
panedwindow .p
rename .p {}
winfo exists .p
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0}
test panedwindow-28.1 {resizing width} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -bd 5
frame .f1 -width 100 -height 50 -bg blue
@@ -5488,7 +5488,7 @@ test panedwindow-28.1 {resizing width} -setup {
} -result {100 110}
test panedwindow-28.2 {resizing height} -setup {
- deleteWindows
+ deleteWindows
} -body {
panedwindow .p -orient vertical -bd 5
frame .f1 -width 50 -height 100 -bg blue
@@ -5514,13 +5514,13 @@ test panedwindow-28.2 {resizing height} -setup {
test panedwindow-29.1 {display on depths other than the default one} -constraints {
pseudocolor8 haveTruecolor24
} -setup {
- deleteWindows
+ deleteWindows
} -body {
- toplevel .t -visual {truecolor 24}
- pack [panedwindow .t.p]
- .t.p add [frame .t.p.f1] [frame .t.p.f2]
- update
- # If we got here, we didn't crash and that's good
+ toplevel .t -visual {truecolor 24}
+ pack [panedwindow .t.p]
+ .t.p add [frame .t.p.f1] [frame .t.p.f2]
+ update
+ # If we got here, we didn't crash and that's good
} -cleanup {
deleteWindows
} -result {}
@@ -5529,16 +5529,16 @@ test panedwindow-29.2 {display on depths other than the default one} -constraint
} -setup {
deleteWindows
} -body {
- toplevel .t -visual {pseudocolor 8}
- pack [frame .t.f -visual {truecolor 24}]
- pack [panedwindow .t.f.p]
- .t.f.p add [frame .t.f.p.f1 -width 5] [frame .t.f.p.f2 -width 5]
- update
- .t.f.p proxy place 1 1
- update
- .t.f.p proxy forget
- update
- # If we got here, we didn't crash and that's good
+ toplevel .t -visual {pseudocolor 8}
+ pack [frame .t.f -visual {truecolor 24}]
+ pack [panedwindow .t.f.p]
+ .t.f.p add [frame .t.f.p.f1 -width 5] [frame .t.f.p.f2 -width 5]
+ update
+ .t.f.p proxy place 1 1
+ update
+ .t.f.p proxy forget
+ update
+ # If we got here, we didn't crash and that's good
} -cleanup {
deleteWindows
} -result {}
diff --git a/tests/spinbox.test b/tests/spinbox.test
index e4f1c5e..661f10b 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -2017,15 +2017,14 @@ test spinbox-5.7 {ConfigureSpinbox procedure} -setup {
} -body {
.e configure -font {Courier -12} -width 4 -xscrollcommand scroll
.e insert end "01234567890"
- update idletasks
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e configure -width 5
- vwait scrollInfo
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
- after cancel $timeout
-} -result {0.000000 0.363636}
+} -result {0.000000 0.454545}
test spinbox-5.8 {ConfigureSpinbox procedure} -constraints {
fonts
@@ -2209,14 +2208,13 @@ test spinbox-7.1 {InsertChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
- update idletasks
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e insert 2 XXX
- vwait scrollInfo
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
- after cancel $timeout
} -result {abXXXcde abXXXcde {0.000000 1.000000}}
test spinbox-7.2 {InsertChars procedure} -setup {
@@ -2227,14 +2225,13 @@ test spinbox-7.2 {InsertChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
- update idletasks
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e insert 500 XXX
- vwait scrollInfo
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
- after cancel $timeout
} -result {abcdeXXX abcdeXXX {0.000000 1.000000}}
test spinbox-7.3 {InsertChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
@@ -2362,14 +2359,13 @@ test spinbox-8.1 {DeleteChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
- update idletasks
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e delete 2 4
- vwait scrollInfo
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
- after cancel $timeout
} -result {abe abe {0.000000 1.000000}}
test spinbox-8.2 {DeleteChars procedure} -setup {
unset -nocomplain contents
@@ -2379,14 +2375,13 @@ test spinbox-8.2 {DeleteChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
- update idletasks
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e delete -1 2
- vwait scrollInfo
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
- after cancel $timeout
} -result {cde cde {0.000000 1.000000}}
test spinbox-8.3 {DeleteChars procedure} -setup {
unset -nocomplain contents
@@ -2396,14 +2391,13 @@ test spinbox-8.3 {DeleteChars procedure} -setup {
} -body {
.e configure -textvariable contents -xscrollcommand scroll
.e insert 0 abcde
- update idletasks
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e delete 3 1000
- vwait scrollInfo
+ update
list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
- after cancel $timeout
} -result {abc abc {0.000000 1.000000}}
test spinbox-8.4 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
@@ -3183,41 +3177,38 @@ test spinbox-16.2 {SpinboxVisibleRange procedure} -body {
test spinbox-17.1 {SpinboxUpdateScrollbar procedure} -body {
spinbox .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
- update idletasks
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e delete 0 end
.e insert 0 123
- vwait scrollInfo
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
- after cancel $timeout
} -result {0.000000 1.000000}
test spinbox-17.2 {SpinboxUpdateScrollbar procedure} -body {
spinbox .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
.e insert 0 0123456789abcdef
- update idletasks
- set timeout [after 500 {set $scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e xview 3
- vwait scrollInfo
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
- after cancel $timeout
} -result {0.187500 0.812500}
test spinbox-17.3 {SpinboxUpdateScrollbar procedure} -body {
spinbox .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
- update idletasks
- set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
+ update
+ set scrollInfo wrong
.e insert 0 abcdefghijklmnopqrs
.e xview
- vwait scrollInfo
+ update
format {%.6f %.6f} {*}$scrollInfo
} -cleanup {
destroy .e
- after cancel $timeout
} -result {0.000000 0.526316}
test spinbox-17.4 {SpinboxUpdateScrollbar procedure} -setup {
proc bgerror msg {
@@ -3227,9 +3218,10 @@ test spinbox-17.4 {SpinboxUpdateScrollbar procedure} -setup {
} -body {
spinbox .e -width 5
pack .e
- update idletasks
+ update
+ set scrollInfo wrong
.e configure -xscrollcommand thisisnotacommand
- vwait x
+ update
list $x $errorInfo
} -cleanup {
destroy .e
diff --git a/tests/textDisp.test b/tests/textDisp.test
index 4859b29..de6fd22 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -11,19 +11,12 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
namespace import -force tcltest::test
-# Procedures for updating the text widget. These are isolated here
-# to allow for variations between platforms, but are currently the
-# same for all platforms (see ticket [bfea11a916]). The delay
-# procedure needs to wait long enough for the asynchronous updates
+# The delay procedure needs to wait long enough for the asynchronous updates
# performed by the text widget to run.
-
-proc updateText {} {
- update
-}
proc delay {} {
- update
- after 100
- update
+ update
+ after 100
+ update
}
# The procedure below is used as the scrolling command for the text;
@@ -147,7 +140,7 @@ wm withdraw .
wm minsize . 1 1
wm positionfrom . user
wm deiconify .
-updateText
+update
# Some window managers (like olwm under SunOS 4.1.3) misbehave in a way
# that tends to march windows off the top and left of the screen. If
@@ -228,7 +221,7 @@ test textDisp-0.3 {double tag elide transition} {
.txt tag configure SYSTEM -elide 0
.txt tag configure TRAFFIC -elide 1
.txt insert end "\n" {TRAFFIC SYSTEM}
- updateText
+ update
destroy .txt
} {}
@@ -241,7 +234,7 @@ test textDisp-0.4 {double tag elide transition} {
.txt tag configure TRAFFIC -elide 1
.txt insert end "\n" {SYSTEM TRAFFIC}
# Crash was here.
- updateText
+ update
destroy .txt
} {}
@@ -255,7 +248,7 @@ test textDisp-0.5 {double tag elide transition} {
.txt insert end "\n" {SYSTEM TRAFFIC}
.txt insert end "\n" WELCOME
# Crash was here.
- updateText
+ update
destroy .txt
} {}
@@ -286,7 +279,7 @@ test textDisp-1.2 {GetStyle procedure, wrapmode} {
.t tag configure x -wrap word
.t tag configure y -wrap none
.t tag raise y
- updateText
+ update
set result [list [.t bbox 2.20]]
.t tag add x 2.0 2.1
lappend result [.t bbox 2.20]
@@ -358,7 +351,7 @@ test textDisp-2.8 {LayoutDLine, extra chunk at end of dline} -setup {
scan [wm geom .] %dx%d width height
} -body {
wm geom . [expr {$width+1}]x$height
- updateText
+ update
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "This isxx some sample text for testing."
@@ -366,7 +359,7 @@ test textDisp-2.8 {LayoutDLine, extra chunk at end of dline} -setup {
list [.t bbox 1.19] [.t bbox 1.20]
} -cleanup {
wm geom . {}
- updateText
+ update
} -result [list [list [xchar 19] [yline 1] [expr {$fixedWidth+1}] $fixedHeight] \
[list [xchar 0] [yline 2] $fixedWidth $fixedHeight]]
test textDisp-2.9 {LayoutDLine, marks and tags} {
@@ -668,12 +661,12 @@ test textDisp-3.1 {different character sizes} {
test textDisp-4.1 {UpdateDisplayInfo, basic} {
.t delete 1.0 end
.t insert end "Line 1\nLine 2\nLine 3\n"
- updateText
+ update
.t delete 2.0 2.end
- updateText
+ update
set res $tk_textRelayout
.t insert 2.0 "New Line 2"
- updateText
+ update
lappend res [.t bbox 1.0] [.t bbox 2.0] [.t bbox 3.0] $tk_textRelayout
} [list 2.0 \
[list [xchar 0] [yline 1] $fixedWidth $fixedHeight] \
@@ -683,13 +676,13 @@ test textDisp-4.1 {UpdateDisplayInfo, basic} {
test textDisp-4.2 {UpdateDisplayInfo, re-use tail of text line} {
.t delete 1.0 end
.t insert end "Line 1\nLine 2 is so long that it wraps around\nLine 3"
- updateText
+ update
.t mark set x 2.21
.t delete 2.2
- updateText
+ update
set res $tk_textRelayout
.t insert 2.0 X
- updateText
+ update
lappend res [.t bbox 2.0] [.t bbox x] [.t bbox 3.0] $tk_textRelayout
} [list 2.0 2.20 \
[list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \
@@ -699,10 +692,10 @@ test textDisp-4.2 {UpdateDisplayInfo, re-use tail of text line} {
test textDisp-4.3 {UpdateDisplayInfo, tail of text line shifts} {
.t delete 1.0 end
.t insert end "Line 1\nLine 2 is so long that it wraps around\nLine 3"
- updateText
+ update
.t mark set x 2.21
.t delete 2.2
- updateText
+ update
list [.t bbox 2.0] [.t bbox x] [.t bbox 3.0] $tk_textRelayout
} [list [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \
[list [xchar 0] [yline 3] $fixedWidth $fixedHeight] \
@@ -713,7 +706,7 @@ test textDisp-4.4 {UpdateDisplayInfo, wrap-mode "none"} {
.t configure -wrap none
.t delete 1.0 end
.t insert end "Line 1\nLine 2 is so long that it wraps around\nLine 3"
- updateText
+ update
list [.t bbox 2.0] [.t bbox 2.25] [.t bbox 3.0] $tk_textRelayout
} [list [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \
{} \
@@ -724,11 +717,11 @@ test textDisp-4.5 {UpdateDisplayInfo, tiny window} {
wm overrideredirect . 1
}
wm geom . 103x$height
- updateText
+ update
.t configure -wrap none
.t delete 1.0 end
.t insert end "Line 1\nLine 2 is so long that it wraps around\nLine 3"
- updateText
+ update
list [.t bbox 2.0] [.t bbox 2.1] [.t bbox 3.0] $tk_textRelayout
} [list [list [xchar 0] [yline 2] 1 $fixedHeight] \
{} \
@@ -751,21 +744,21 @@ test textDisp-4.6 {UpdateDisplayInfo, tiny window} {
frame .f2 -width 20 -height 100
pack .f2 -before .f
wm geom . 103x103
- updateText
+ update
.t configure -wrap none -borderwidth 2
.t delete 1.0 end
.t insert end "Line 1\nLine 2 is so long that it wraps around\nLine 3"
- updateText
+ update
set x [list [.t bbox 1.0] [.t bbox 2.0] $tk_textRelayout]
wm overrideredirect . 0
- updateText
+ update
set expected [list [list [xchar 0] [yline 1] 1 1] {} 1.0]
lequal $x $expected
} {1}
catch {destroy .f2}
.t configure -borderwidth 0 -wrap char
wm geom . {}
-updateText
+update
test textDisp-4.7 {UpdateDisplayInfo, filling in extra vertical space} {
# This test was failing on Windows because the title bar on .
# was a certain minimum size and it was interfering with the size
@@ -780,28 +773,28 @@ test textDisp-4.7 {UpdateDisplayInfo, filling in extra vertical space} {
.t delete 1.0 end
.t insert end "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
.t yview 1.0
- updateText
+ update
.t yview 16.0
- updateText
+ update
set x [list [.t index @0,0] $tk_textRelayout $tk_textRedraw]
wm overrideredirect . 0
- updateText
+ update
set x
} {8.0 {16.0 17.0 15.0 14.0 13.0 12.0 11.0 10.0 9.0 8.0} {8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0}}
test textDisp-4.8 {UpdateDisplayInfo, filling in extra vertical space} {
.t delete 1.0 end
.t insert end "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
.t yview 16.0
- updateText
+ update
.t delete 5.0 14.0
- updateText
+ update
set x [list [.t index @0,0] $tk_textRelayout $tk_textRedraw]
} {1.0 {5.0 4.0 3.0 2.0 1.0} {1.0 2.0 3.0 4.0 5.0 eof}}
test textDisp-4.9 {UpdateDisplayInfo, filling in extra vertical space} {
.t delete 1.0 end
.t insert end "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
.t yview 16.0
- updateText
+ update
.t delete 15.0 end
list [.t bbox 7.0] [.t bbox 12.0]
} [list [list [xchar 0] [yline 3] $fixedWidth $fixedHeight] \
@@ -810,18 +803,18 @@ test textDisp-4.10 {UpdateDisplayInfo, filling in extra vertical space} {
.t delete 1.0 end
.t insert end "1\n2\n3\n4\n5\nLine 6 is such a long line that it wraps around.\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
.t yview end
- updateText
+ update
.t delete 13.0 end
- updateText
+ update
list [.t index @0,0] $tk_textRelayout $tk_textRedraw
} {5.0 {12.0 7.0 6.40 6.20 6.0 5.0} {5.0 6.0 6.20 6.40 7.0 12.0}}
test textDisp-4.11 {UpdateDisplayInfo, filling in extra vertical space} {
.t delete 1.0 end
.t insert end "1\n2\n3\n4\n5\nLine 6 is such a long line that it wraps around, not once but really quite a few times.\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
.t yview end
- updateText
+ update
.t delete 14.0 end
- updateText
+ update
list [.t index @0,0] $tk_textRelayout $tk_textRedraw
} {6.40 {13.0 7.0 6.80 6.60 6.40} {6.40 6.60 6.80 7.0 13.0}}
test textDisp-4.12 {UpdateDisplayInfo, filling in extra vertical space} {
@@ -830,11 +823,11 @@ test textDisp-4.12 {UpdateDisplayInfo, filling in extra vertical space} {
button .b -text "Test" -bd 2 -highlightthickness 2
.t window create 3.end -window .b
.t yview moveto 1
- updateText
+ update
.t yview moveto 0
- updateText
+ update
.t yview moveto 1
- updateText
+ update
winfo ismapped .b
} {0}
.t configure -wrap word
@@ -847,33 +840,33 @@ test textDisp-4.12 {UpdateDisplayInfo, filling in extra vertical space} {
test textDisp-4.13 {UpdateDisplayInfo, special handling for top/bottom lines} {
.t tag add x 1.0 end
.t yview 1.0
- updateText
+ update
.t yview scroll 3 units
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{11.0 12.0 13.0} {4.0 10.0 11.0 12.0 13.0}}
test textDisp-4.14 {UpdateDisplayInfo, special handling for top/bottom lines} {
.t tag remove x 1.0 end
.t yview 1.0
- updateText
+ update
.t yview scroll 3 units
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{11.0 12.0 13.0} {11.0 12.0 13.0}}
test textDisp-4.15 {UpdateDisplayInfo, special handling for top/bottom lines} {
.t tag add x 1.0 end
.t yview 4.0
- updateText
+ update
.t yview scroll -2 units
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{2.0 3.0} {2.0 3.0 4.0 11.0}}
test textDisp-4.16 {UpdateDisplayInfo, special handling for top/bottom lines} {
.t tag remove x 1.0 end
.t yview 4.0
- updateText
+ update
.t yview scroll -2 units
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{2.0 3.0} {2.0 3.0}}
test textDisp-4.17 {UpdateDisplayInfo, horizontal scrolling} {
@@ -881,9 +874,9 @@ test textDisp-4.17 {UpdateDisplayInfo, horizontal scrolling} {
.t delete 1.0 end
.t insert end "Short line 1\nLine 2 is long enough to scroll horizontally"
.t insert end "\nLine 3\nLine 4"
- updateText
+ update
.t xview scroll 3 units
- updateText
+ update
list $tk_textRelayout $tk_textRedraw [.t bbox 2.0] [.t bbox 2.5] \
[.t bbox 2.23]
} [list {} {1.0 2.0 3.0 4.0} \
@@ -895,9 +888,9 @@ test textDisp-4.18 {UpdateDisplayInfo, horizontal scrolling} {
.t delete 1.0 end
.t insert end "Short line 1\nLine 2 is long enough to scroll horizontally"
.t insert end "\nLine 3\nLine 4"
- updateText
+ update
.t xview scroll 100 units
- updateText
+ update
list $tk_textRelayout $tk_textRedraw [.t bbox 2.25]
} [list {} {1.0 2.0 3.0 4.0} \
[list [xcharr 19] [yline 2] $fixedWidth $fixedHeight]]
@@ -906,10 +899,10 @@ test textDisp-4.19 {UpdateDisplayInfo, horizontal scrolling} {
.t delete 1.0 end
.t insert end "Short line 1\nLine 2 is long enough to scroll horizontally"
.t insert end "\nLine 3\nLine 4"
- updateText
+ update
.t xview moveto 0
.t xview scroll -10 units
- updateText
+ update
list $tk_textRelayout $tk_textRedraw [.t bbox 2.5]
} [list {} {1.0 2.0 3.0 4.0} \
[list [xchar 5] [yline 2] $fixedWidth $fixedHeight]]
@@ -920,9 +913,9 @@ test textDisp-4.20 {UpdateDisplayInfo, horizontal scrolling} {
.t insert end "\nLine 3\nLine 4"
.t xview moveto 0.0
.t xview scroll 100 units
- updateText
+ update
.t delete 2.30 2.44
- updateText
+ update
list $tk_textRelayout $tk_textRedraw [.t bbox 2.25]
} [list 2.0 {1.0 2.0 3.0 4.0} \
[list [xcharr 5] [yline 2] $fixedWidth $fixedHeight]]
@@ -932,9 +925,9 @@ test textDisp-4.21 {UpdateDisplayInfo, horizontal scrolling} {
.t insert end "Short line 1\nLine 2 is long enough to scroll horizontally"
.t insert end "\nLine 3\nLine 4"
.t xview moveto .9
- updateText
+ update
.t xview moveto .6
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{} {}}
test textDisp-4.22 {UpdateDisplayInfo, no horizontal scrolling except for -wrap none} {
@@ -943,7 +936,7 @@ test textDisp-4.22 {UpdateDisplayInfo, no horizontal scrolling except for -wrap
.t insert end "Short line 1\nLine 2 is long enough to scroll horizontally"
.t insert end "\nLine 3\nLine 4"
.t xview scroll 25 units
- updateText
+ update
.t configure -wrap word
list [.t bbox 2.0] [.t bbox 2.16]
} [list [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \
@@ -954,7 +947,7 @@ test textDisp-4.23 {UpdateDisplayInfo, no horizontal scrolling except for -wrap
.t insert end "Short line 1\nLine 2 is long enough to scroll horizontally"
.t insert end "\nLine 3\nLine 4"
.t xview scroll 25 units
- updateText
+ update
.t configure -wrap char
list [.t bbox 2.0] [.t bbox 2.16]
} [list [list [xchar 0] [yline 2] $fixedWidth $fixedHeight] \
@@ -974,7 +967,7 @@ test textDisp-5.1 {DisplayDLine, handling of spacing} {
.t window create 1.7 -window .t.f2 -align center
.t window create 2.1 -window .t.f3 -align bottom
.t window create 2.10 -window .t.f4 -align baseline
- updateText
+ update
list [winfo geometry .t.f1] [winfo geometry .t.f2] \
[winfo geometry .t.f3] [winfo geometry .t.f4]
} [list 10x4+[xchar 3]+[expr {[yline 1]+8}] \
@@ -991,7 +984,7 @@ test textDisp-5.2 {DisplayDLine, line resizes during display} {
frame .t.f -width 20 -height 20 -bd 2 -relief raised
bind .t.f <Configure> {.t.f configure -width 30 -height 30}
.t window create insert -window .t.f
- updateText
+ update
list [winfo width .t.f] [winfo height .t.f]
} [list 30 30]
@@ -1002,9 +995,9 @@ test textDisp-6.1 {scrolling in DisplayText, scroll up} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t delete 2.0 3.0
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{2.0 10.0} {2.0 10.0}}
test textDisp-6.2 {scrolling in DisplayText, scroll down} {
@@ -1013,9 +1006,9 @@ test textDisp-6.2 {scrolling in DisplayText, scroll down} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t insert 2.0 "New Line 2\n"
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{2.0 3.0} {2.0 3.0}}
test textDisp-6.3 {scrolling in DisplayText, multiple scrolls} {
@@ -1025,10 +1018,10 @@ test textDisp-6.3 {scrolling in DisplayText, multiple scrolls} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t insert 2.end "is so long that it wraps"
.t insert 4.end "is so long that it wraps"
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{2.0 2.20 4.0 4.20} {2.0 2.20 4.0 4.20}}
test textDisp-6.4 {scrolling in DisplayText, scrolls interfere} {
@@ -1038,10 +1031,10 @@ test textDisp-6.4 {scrolling in DisplayText, scrolls interfere} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t insert 2.end "is so long that it wraps around, not once but three times"
.t insert 4.end "is so long that it wraps"
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{2.0 2.20 2.40 2.60 4.0 4.20} {2.0 2.20 2.40 2.60 4.0 4.20 6.0}}
test textDisp-6.5 {scrolling in DisplayText, scroll source obscured} {aquaKnownBug} {
@@ -1054,9 +1047,9 @@ test textDisp-6.5 {scrolling in DisplayText, scroll source obscured} {aquaKnownB
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t delete 1.6 1.end
- updateText
+ update
destroy .f2
list $tk_textRelayout $tk_textRedraw
} {{1.0 9.0 10.0} {1.0 4.0 5.0 9.0 10.0}}
@@ -1073,31 +1066,31 @@ test textDisp-6.6 {scrolling in DisplayText, Expose events after scroll} {aquaKn
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t delete 1.6 1.end
destroy .f2
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{1.0 9.0 10.0} {1.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0}}
.t configure -bd 0
test textDisp-6.7 {DisplayText, vertical scrollbar updates} {
.t configure -wrap char
.t delete 1.0 end
- updateText
+ update
.t count -update -ypixels 1.0 end
- updateText
+ update
set scrollInfo
} {0.0 1.0}
test textDisp-6.8 {DisplayText, vertical scrollbar updates} {
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "Line 1"
- updateText
+ update
set scrollInfo "unchanged"
foreach i {2 3 4 5 6 7 8 9 10 11 12 13} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t count -update -ypixels 1.0 end ; update
set scrollInfo
} [list 0.0 [expr {10.0/13}]]
@@ -1105,12 +1098,12 @@ test textDisp-6.8 {DisplayText, vertical scrollbar updates} {
test textDisp-6.9 {DisplayText, horizontal scrollbar updates} {
.t configure -wrap none
.t delete 1.0 end
- updateText
+ update
set scrollInfo unchanged
.t insert end xxxxxxxxx\n
.t insert end xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n
.t insert end xxxxxxxxxxxxxxxxxxxxxxxxxx
- updateText
+ update
set scrollInfo
} [list 0.0 [expr {4.0/11}]]
test textDisp-6.10 {DisplayText, redisplay embedded windows after scroll} {aqua} {
@@ -1129,9 +1122,9 @@ test textDisp-6.10 {DisplayText, redisplay embedded windows after scroll} {aqua}
.t insert end "\nLine 8\n"
.t window create end -create {
button %W.button_three -text "Button 3"}
- updateText
+ update
.t delete 2.0 3.0
- updateText
+ update
list $tk_textEmbWinDisplay
} {{4.0 6.0}}
@@ -1146,27 +1139,27 @@ test textDisp-7.1 {TkTextRedrawRegion} {aquaKnownBug} {
# constrained by aquaKnownBug until ticket [aad0231f07] is fixed
frame .f2 -bg #ff0000
place .f2 -in .t -relx 0.2 -relwidth 0.6 -rely 0.22 -relheight 0.55
- updateText
+ update
destroy .f2
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{} {1.40 2.0 3.0 4.0 5.0 6.0}}
test textDisp-7.2 {TkTextRedrawRegion} {aquaKnownBug} {
# constrained by aquaKnownBug until ticket [aad0231f07] is fixed
frame .f2 -bg #ff0000
place .f2 -in .t -relx 0 -relwidth 0.5 -rely 0 -relheight 0.5
- updateText
+ update
destroy .f2
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{} {1.0 1.20 1.40 2.0 3.0}}
test textDisp-7.3 {TkTextRedrawRegion} {aquaKnownBug} {
# constrained by aquaKnownBug until ticket [aad0231f07] is fixed
frame .f2 -bg #ff0000
place .f2 -in .t -relx 0.5 -relwidth 0.5 -rely 0.5 -relheight 0.5
- updateText
+ update
destroy .f2
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{} {4.0 5.0 6.0 7.0 8.0}}
test textDisp-7.4 {TkTextRedrawRegion} {aquaKnownBug} {
@@ -1174,9 +1167,9 @@ test textDisp-7.4 {TkTextRedrawRegion} {aquaKnownBug} {
frame .f2 -bg #ff0000
place .f2 -in .t -relx 0.4 -relwidth 0.2 -rely 0 -relheight 0.2 \
-bordermode ignore
- updateText
+ update
destroy .f2
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{} {borders 1.0 1.20}}
test textDisp-7.5 {TkTextRedrawRegion} {aquaKnownBug} {
@@ -1184,9 +1177,9 @@ test textDisp-7.5 {TkTextRedrawRegion} {aquaKnownBug} {
frame .f2 -bg #ff0000
place .f2 -in .t -relx 0.4 -relwidth 0.2 -rely 1.0 -relheight 0.2 \
-anchor s -bordermode ignore
- updateText
+ update
destroy .f2
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{} {borders 7.0 8.0}}
test textDisp-7.6 {TkTextRedrawRegion} {aquaKnownBug} {
@@ -1194,9 +1187,9 @@ test textDisp-7.6 {TkTextRedrawRegion} {aquaKnownBug} {
frame .f2 -bg #ff0000
place .f2 -in .t -relx 0 -relwidth 0.2 -rely 0.55 -relheight 0.2 \
-anchor w -bordermode ignore
- updateText
+ update
destroy .f2
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{} {borders 3.0 4.0 5.0}}
test textDisp-7.7 {TkTextRedrawRegion} {aquaKnownBug} {
@@ -1204,9 +1197,9 @@ test textDisp-7.7 {TkTextRedrawRegion} {aquaKnownBug} {
frame .f2 -bg #ff0000
place .f2 -in .t -relx 1.0 -relwidth 0.2 -rely 0.55 -relheight 0.2 \
-anchor e -bordermode ignore
- updateText
+ update
destroy .f2
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{} {borders 3.0 4.0 5.0}}
test textDisp-7.8 {TkTextRedrawRegion} {aquaKnownBug} {
@@ -1216,9 +1209,9 @@ test textDisp-7.8 {TkTextRedrawRegion} {aquaKnownBug} {
frame .f2 -bg #ff0000
place .f2 -in .t -relx 0.0 -relwidth 0.4 -rely 0.35 -relheight 0.4 \
-anchor nw -bordermode ignore
- updateText
+ update
destroy .f2
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{} {borders 4.0 5.0 6.0 7.0 eof}}
.t configure -bd 0
@@ -1230,9 +1223,9 @@ test textDisp-8.1 {TkTextChanged: redisplay whole lines} {
foreach i {3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t delete 2.36 2.38
- updateText
+ update
list $tk_textRelayout $tk_textRedraw [.t bbox 2.32]
} [list {2.0 2.18 2.38} {2.0 2.18 2.38} [list [xchar 14] [yline 3] $fixedWidth $fixedHeight]]
.t configure -wrap char
@@ -1242,9 +1235,9 @@ test textDisp-8.2 {TkTextChanged, redisplay whole lines} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t insert 1.2 xx
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{1.0 1.20 1.40} {1.0 1.20 1.40}}
test textDisp-8.3 {TkTextChanged} {
@@ -1253,9 +1246,9 @@ test textDisp-8.3 {TkTextChanged} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t insert 2.0 xx
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {2.0 2.0}
test textDisp-8.4 {TkTextChanged} {
@@ -1264,9 +1257,9 @@ test textDisp-8.4 {TkTextChanged} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t delete 1.5
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{1.0 1.20 1.40} {1.0 1.20 1.40}}
test textDisp-8.5 {TkTextChanged} {
@@ -1275,9 +1268,9 @@ test textDisp-8.5 {TkTextChanged} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t delete 1.40 1.44
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{1.0 1.20 1.40} {1.0 1.20 1.40}}
test textDisp-8.6 {TkTextChanged} {
@@ -1286,9 +1279,9 @@ test textDisp-8.6 {TkTextChanged} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t delete 1.41 1.44
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{1.0 1.20 1.40} {1.0 1.20 1.40}}
test textDisp-8.7 {TkTextChanged} {
@@ -1297,9 +1290,9 @@ test textDisp-8.7 {TkTextChanged} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t delete 1.2 1.end
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{1.0 9.0 10.0} {1.0 9.0 10.0}}
test textDisp-8.8 {TkTextChanged} {
@@ -1308,9 +1301,9 @@ test textDisp-8.8 {TkTextChanged} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t delete 2.2
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {2.0 2.0}
test textDisp-8.9 {TkTextChanged} {
@@ -1319,9 +1312,9 @@ test textDisp-8.9 {TkTextChanged} {
foreach i {2 3 4 5 6 7 8 9 10 11 12 13 14 15} {
.t insert end "\nLine $i"
}
- updateText
+ update
.t delete 2.0 3.0
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{2.0 8.0} {2.0 8.0}}
test textDisp-8.10 {TkTextChanged} {
@@ -1329,23 +1322,23 @@ test textDisp-8.10 {TkTextChanged} {
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4"
.t tag add big 2.19
- updateText
+ update
.t delete 2.19
- updateText
+ update
set tk_textRedraw
} {2.0 2.20 eof}
test textDisp-8.11 {TkTextChanged, scrollbar notification when changes are off-screen} {
.t delete 1.0 end
.t insert end "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n"
.t configure -yscrollcommand scroll
- updateText
+ update
set scrollInfo ""
.t insert end "a\nb\nc\n"
# We need to wait for our asychronous callbacks to update the
# scrollbar
- updateText
+ update
.t count -update -ypixels 1.0 end
- updateText
+ update
.t configure -yscrollcommand ""
set scrollInfo
} {0.0 0.625}
@@ -1358,27 +1351,27 @@ test textDisp-8.12 {TkTextChanged, moving the insert cursor redraws only past an
.t tag add hidden 5.0 8.0
.t tag configure hidden -elide true
.t mark set insert 9.0
- updateText
+ update
.t mark set insert 8.0 ; # up one line
- updateText
+ update
set res [list $tk_textRedraw]
.t mark set insert 12.2 ; # in the visible text
- updateText
+ update
lappend res $tk_textRedraw
.t mark set insert 6.5 ; # in the hidden text
- updateText
+ update
lappend res $tk_textRedraw
.t mark set insert 3.5 ; # in the visible text again
- updateText
+ update
lappend res $tk_textRedraw
.t mark set insert 3.8 ; # within the same line
- updateText
+ update
lappend res $tk_textRedraw
} {{8.0 9.0} {8.0 12.0} {8.0 12.0} {3.0 8.0} {3.0 4.0}}
test textDisp-8.13 {TkTextChanged, used to crash, see [06c1433906]} {
.t delete 1.0 end
.t insert 1.0 \nLine2\nLine3\n
- updateText
+ update
.t insert 3.0 ""
.t delete 1.0 2.0
update idletasks
@@ -1388,9 +1381,9 @@ test textDisp-9.1 {TkTextRedrawTag} -body {
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap around\nLine 3\nLine 4"
- updateText
+ update
.t tag add big 2.2 2.4
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
# glob matching is to have some tolerance on actually used font size
# while still testing what we want to test
@@ -1399,9 +1392,9 @@ test textDisp-9.2 {TkTextRedrawTag} -body {
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap around\nLine 3\nLine 4"
- updateText
+ update
.t tag add big 1.2 2.4
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
# glob matching is to have some tolerance on actually used font size
# while still testing what we want to test
@@ -1410,22 +1403,22 @@ test textDisp-9.3 {TkTextRedrawTag} {
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap around\nLine 3\nLine 4"
- updateText
+ update
.t tag add big 2.2 2.4
- updateText
+ update
.t tag remove big 1.0 end
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{2.0 2.20} {2.0 2.20 eof}}
test textDisp-9.4 {TkTextRedrawTag} {
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap around\nLine 3\nLine 4"
- updateText
+ update
.t tag add big 2.2 2.20
- updateText
+ update
.t tag remove big 1.0 end
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{2.0 2.20} {2.0 2.20 eof}}
test textDisp-9.5 {TkTextRedrawTag} -setup {
@@ -1433,25 +1426,25 @@ test textDisp-9.5 {TkTextRedrawTag} -setup {
} -body {
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap around\nLine 3\nLine 4"
- updateText
+ update
.t tag add big 2.2 2.end
- updateText
+ update
.t tag remove big 1.0 end
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} -cleanup {
.t configure -height [expr {[.t cget -height]-10}]
- updateText
+ update
} -result {{2.0 2.20} {2.0 2.20 eof}}
test textDisp-9.6 {TkTextRedrawTag} {
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap"
- updateText
+ update
.t tag add big 2.2 3.5
- updateText
+ update
.t tag remove big 1.0 end
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{2.0 2.20 3.0 3.20} {2.0 2.20 3.0 3.20 eof}}
test textDisp-9.7 {TkTextRedrawTag} {
@@ -1459,9 +1452,9 @@ test textDisp-9.7 {TkTextRedrawTag} {
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4"
.t tag add big 2.19
- updateText
+ update
.t tag remove big 2.19
- updateText
+ update
set tk_textRedraw
} {2.0 2.20 eof}
test textDisp-9.8 {TkTextRedrawTag} -body {
@@ -1469,9 +1462,9 @@ test textDisp-9.8 {TkTextRedrawTag} -body {
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4"
.t tag add big 1.0 2.0
- updateText
+ update
.t tag add big 2.0 2.5
- updateText
+ update
set tk_textRedraw
# glob matching is to have some tolerance on actually used font size
# while still testing what we want to test
@@ -1481,9 +1474,9 @@ test textDisp-9.9 {TkTextRedrawTag} -body {
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4"
.t tag add big 1.0 2.0
- updateText
+ update
.t tag add big 1.5 2.5
- updateText
+ update
set tk_textRedraw
# glob matching is to have some tolerance on actually used font size
# while still testing what we want to test
@@ -1493,10 +1486,10 @@ test textDisp-9.10 {TkTextRedrawTag} {
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4"
.t tag add big 1.0 2.0
- updateText
+ update
set tk_textRedraw none
.t tag add big 1.3 1.5
- updateText
+ update
set tk_textRedraw
} none
test textDisp-9.11 {TkTextRedrawTag} {
@@ -1504,9 +1497,9 @@ test textDisp-9.11 {TkTextRedrawTag} {
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4"
.t tag add big 1.0 2.0
- updateText
+ update
.t tag add big 1.0 2.0
- updateText
+ update
set tk_textRedraw
} {}
test textDisp-9.12 {TkTextRedrawTag} {
@@ -1517,9 +1510,9 @@ test textDisp-9.12 {TkTextRedrawTag} {
}
.t tag configure hidden -elide true
.t tag add hidden 2.6 3.6
- updateText
+ update
.t tag add hidden 3.11 4.6
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {2.0 {2.0 eof}}
test textDisp-9.13 {TkTextRedrawTag} {
@@ -1532,9 +1525,9 @@ test textDisp-9.13 {TkTextRedrawTag} {
.t tag add hidden 6.8 7.17
.t tag configure hidden -background red
.t tag configure hidden -elide true
- updateText
+ update
.t tag configure hidden -elide false
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{2.0 6.0 7.0} {2.0 6.0 7.0}}
test textDisp-9.14 {TkTextRedrawTag} {
@@ -1544,7 +1537,7 @@ test textDisp-9.14 {TkTextRedrawTag} {
}
.tnocrash tag configure mytag1 -relief raised
.tnocrash tag configure mytag2 -relief solid
- updateText
+ update
proc doit {} {
.tnocrash tag add mytag1 4.0 5.0
.tnocrash tag add mytag2 4.0 5.0
@@ -1566,9 +1559,9 @@ test textDisp-10.1 {TkTextRelayoutWindow} {
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "Line 1\nLine 2 is long enough to wrap\nLine 3 is also long enough to wrap\nLine 4"
- updateText
+ update
.t configure -bg black
- updateText
+ update
list $tk_textRelayout $tk_textRedraw
} {{1.0 2.0 2.20 3.0 3.20 4.0} {borders 1.0 2.0 2.20 3.0 3.20 4.0 eof}}
.t configure -bg [lindex [.t configure -bg] 3]
@@ -1582,7 +1575,7 @@ test textDisp-10.2 {TkTextRelayoutWindow} {
.top.t see insert
tkwait visibility .top.t
place .top.t -width 150 -height 100
- updateText
+ update
.top.t index @0,0
} {1.0}
catch {destroy .top}
@@ -1592,96 +1585,96 @@ catch {destroy .top}
for {set i 2} {$i <= 200} {incr i} {
.t insert end "\nLine $i"
}
-updateText
+update
test textDisp-11.1 {TkTextSetYView} {
.t yview 30.0
- updateText
+ update
.t index @0,0
} {30.0}
test textDisp-11.2 {TkTextSetYView} {
.t yview 30.0
- updateText
+ update
.t yview 32.0
- updateText
+ update
list [.t index @0,0] $tk_textRedraw
} {32.0 {40.0 41.0}}
test textDisp-11.3 {TkTextSetYView} {
.t yview 30.0
- updateText
+ update
.t yview 28.0
- updateText
+ update
list [.t index @0,0] $tk_textRedraw
} {28.0 {28.0 29.0}}
test textDisp-11.4 {TkTextSetYView} {
.t yview 30.0
- updateText
+ update
.t yview 31.4
- updateText
+ update
list [.t index @0,0] $tk_textRedraw
} {31.0 40.0}
test textDisp-11.5 {TkTextSetYView} {
.t yview 30.0
- updateText
+ update
set tk_textRedraw {}
.t yview -pickplace 31.0
- updateText
+ update
list [.t index @0,0] $tk_textRedraw
} {30.0 {}}
test textDisp-11.6 {TkTextSetYView} {
.t yview 30.0
- updateText
+ update
set tk_textRedraw {}
.t yview -pickplace 28.0
- updateText
+ update
list [.t index @0,0] $tk_textRedraw
} {28.0 {28.0 29.0}}
test textDisp-11.7 {TkTextSetYView} {
.t yview 30.0
- updateText
+ update
set tk_textRedraw {}
.t yview -pickplace 26.0
- updateText
+ update
list [.t index @0,0] $tk_textRedraw
} {21.0 {21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0}}
test textDisp-11.8 {TkTextSetYView} {
.t yview 30.0
- updateText
+ update
set tk_textRedraw {}
.t yview -pickplace 41.0
- updateText
+ update
list [.t index @0,0] $tk_textRedraw
} {32.0 {40.0 41.0}}
test textDisp-11.9 {TkTextSetYView} {
.t yview 30.0
- updateText
+ update
set tk_textRedraw {}
.t yview -pickplace 43.0
- updateText
+ update
list [.t index @0,0] $tk_textRedraw
} {38.0 {40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0}}
test textDisp-11.10 {TkTextSetYView} {
.t yview 30.0
- updateText
+ update
set tk_textRedraw {}
.t yview 10000.0
- updateText
+ update
list [.t index @0,0] $tk_textRedraw
} {191.0 {191.0 192.0 193.0 194.0 195.0 196.0 197.0 198.0 199.0 200.0}}
test textDisp-11.11 {TkTextSetYView} {
.t yview 195.0
- updateText
+ update
set tk_textRedraw {}
.t yview 197.0
- updateText
+ update
list [.t index @0,0] $tk_textRedraw
} {191.0 {191.0 192.0 193.0 194.0 195.0 196.0}}
test textDisp-11.12 {TkTextSetYView, wrapped line is off-screen} {
.t insert 10.0 "Long line with enough text to wrap\n"
.t yview 1.0
- updateText
+ update
set tk_textRedraw {}
.t see 10.30
- updateText
+ update
list [.t index @0,0] $tk_textRedraw
} {2.0 10.20}
.t delete 10.0 11.0
@@ -1695,15 +1688,15 @@ test textDisp-11.13 {TkTestSetYView, partially visible last line} {
for {set i 2} {$i <= 100} {incr i} {
.top.t insert end "\nLine $i"
}
- updateText
+ update
scan [wm geometry .top] "%dx%d" w2 h2
wm geometry .top ${w2}x[expr {$h2-2}]
- updateText
+ update
.top.t yview 1.0
- updateText
+ update
set tk_textRedraw {}
.top.t see 5.0
- updateText
+ update
# Note, with smooth scrolling, the results of this test
# have changed, and the old '2.0 {5.0 6.0}' is quite wrong.
list [.top.t index @0,0] $tk_textRedraw
@@ -1717,29 +1710,29 @@ pack .top.t
for {set i 2} {$i <= 20} {incr i} {
.top.t insert end "\nLine $i"
}
-updateText
+update
test textDisp-11.14 {TkTextSetYView, only a few lines visible} {
.top.t yview 5.0
- updateText
+ update
.top.t see 10.0
.top.t index @0,0
} {8.0}
test textDisp-11.15 {TkTextSetYView, only a few lines visible} {
.top.t yview 5.0
- updateText
+ update
.top.t see 11.0
.top.t index @0,0
# The index 9.0 should be just visible by a couple of pixels
} {9.0}
test textDisp-11.16 {TkTextSetYView, only a few lines visible} {
.top.t yview 8.0
- updateText
+ update
.top.t see 5.0
.top.t index @0,0
} {5.0}
test textDisp-11.17 {TkTextSetYView, only a few lines visible} {
.top.t yview 8.0
- updateText
+ update
.top.t see 4.0
.top.t index @0,0
# The index 2.0 should be just visible by a couple of pixels
@@ -1754,7 +1747,7 @@ test textDisp-11.18 {TkTextSetYView, see in elided lines} {
.top.t tag add hidden 4.10 "4.10 lineend"
.top.t tag add hidden 5.15 10.3
.top.t tag configure hidden -elide true
- updateText
+ update
.top.t see "8.0 lineend"
# The index "8.0 lineend" is on screen despite elided -> no scroll
.top.t index @0,0
@@ -1774,19 +1767,19 @@ test textDisp-11.19 {TkTextSetYView, see in elided lines} {
# Indices 21.0, 17.0 and 15.0 are all on the same display line
# therefore index @0,0 shall be the same for all of them
.top.t see end
- updateText
+ update
.top.t see 21.0
- updateText
+ update
set ind1 [.top.t index @0,0]
.top.t see end
- updateText
+ update
.top.t see 17.0
- updateText
+ update
set ind2 [.top.t index @0,0]
.top.t see end
- updateText
+ update
.top.t see 15.0
- updateText
+ update
set ind3 [.top.t index @0,0]
list [expr {$ind1 == $ind2}] [expr {$ind1 == $ind3}]
} {1 1}
@@ -1809,7 +1802,7 @@ test textDisp-11.21 {TkTextSetYView, window height smaller than the line height}
}
set lineheight [font metrics [.top.t cget -font] -linespace]
wm geometry .top 200x[expr {$lineheight / 2}]
- updateText
+ update
.top.t see 1.0
.top.t index @0,[expr {$lineheight - 2}]
} {1.0}
@@ -1821,9 +1814,9 @@ test textDisp-11.22 {TkTextSetYView, peer has -startline} {
pack [.top.t peer create .top.p] -side left
pack [scrollbar .top.sb -command {.top.p yview}] -side left -fill y
.top.p configure -startline 5 -endline 35 -yscrollcommand {.top.sb set}
- updateText
+ update
.top.p yview moveto 0
- updateText
+ update
set res [.top.p get @0,0 "@0,0 lineend"]
destroy .top.p
set res
@@ -1834,38 +1827,38 @@ test textDisp-11.22 {TkTextSetYView, peer has -startline} {
.t insert 50.0 "This is a long line, one that will wrap around twice.\n"
test textDisp-12.1 {MeasureUp} {
.t yview 100.0
- updateText
+ update
.t yview -pickplace 52.0
- updateText
+ update
.t index @0,0
} {49.0}
test textDisp-12.2 {MeasureUp} {
.t yview 100.0
- updateText
+ update
.t yview -pickplace 53.0
- updateText
+ update
.t index @0,0
} {50.0}
test textDisp-12.3 {MeasureUp} {
.t yview 100.0
- updateText
+ update
.t yview -pickplace 50.10
- updateText
+ update
.t index @0,0
} {45.0}
.t configure -wrap none
test textDisp-12.4 {MeasureUp} {
.t yview 100.0
- updateText
+ update
.t yview -pickplace 53.0
- updateText
+ update
.t index @0,0
} {48.0}
test textDisp-12.5 {MeasureUp} {
.t yview 100.0
- updateText
+ update
.t yview -pickplace 50.10
- updateText
+ update
.t index @0,0
} {45.0}
@@ -1888,7 +1881,7 @@ test textDisp-13.3 {TkTextSeeCmd procedure} {
test textDisp-13.4 {TkTextSeeCmd procedure} {
.t xview moveto 0
.t yview moveto 0
- updateText
+ update
.t see 4.2
.t index @0,0
} {1.0}
@@ -1896,7 +1889,7 @@ test textDisp-13.5 {TkTextSeeCmd procedure} {
.t configure -wrap char
.t xview moveto 0
.t yview moveto 0
- updateText
+ update
.t see 12.1
.t index @0,0
} {3.0}
@@ -1904,7 +1897,7 @@ test textDisp-13.6 {TkTextSeeCmd procedure} {
.t configure -wrap char
.t xview moveto 0
.t yview moveto 0
- updateText
+ update
.t see 30.50
set x [.t index @0,0]
.t configure -wrap none
@@ -1915,7 +1908,7 @@ test textDisp-13.7 {TkTextSeeCmd procedure} {
.t yview moveto 0
.t tag add sel 30.20
.t tag add sel 30.40
- updateText
+ update
.t see 30.50
.t yview 25.0
.t see 30.50
@@ -1935,7 +1928,7 @@ test textDisp-13.8 {TkTextSeeCmd procedure} {
.t yview moveto 0
.t tag add sel 30.20
.t tag add sel 30.50
- updateText
+ update
.t see 30.50
set x [list [.t bbox 30.50]]
.t see 30.60
@@ -1959,7 +1952,7 @@ test textDisp-13.9 {TkTextSeeCmd procedure} {
.t yview moveto 0
.t tag add sel 30.20
.t tag add sel 30.50
- updateText
+ update
.t see 30.50
set x [list [.t bbox 30.50]]
.t see 30.60
@@ -1998,13 +1991,13 @@ test textDisp-13.11 {TkTextSeeCmd procedure} {} {
.top2.t2 insert end [string repeat "Line $i: éèàçù" 5]\n
}
wm geometry .top2 300x200+0+0
- updateText
+ update
.top2.t2 see "1.0 lineend"
- updateText
+ update
set ref [.top2.t2 index @0,0]
.top2.t2 insert "1.0 lineend" ç
.top2.t2 see "1.0 lineend"
- updateText
+ update
set new [.top2.t2 index @0,0]
set res [.top2.t2 compare $ref == $new]
destroy .top2
@@ -2015,7 +2008,7 @@ wm geom . {}
.t configure -wrap none
test textDisp-14.1 {TkTextXviewCmd procedure} {
.t delete 1.0 end
- updateText
+ update
.t insert end xxxxxxxxx\n
.t insert end "xxxxx xxxxxxxxxxx xxxx xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx\n"
.t insert end "xxxx xxxxxxxxx xxxxxxxxxxxxx"
@@ -2025,7 +2018,7 @@ test textDisp-14.1 {TkTextXviewCmd procedure} {
.t configure -wrap char
test textDisp-14.2 {TkTextXviewCmd procedure} {
.t delete 1.0 end
- updateText
+ update
.t insert end xxxxxxxxx\n
.t insert end "xxxxx\n"
.t insert end "xxxx"
@@ -2034,7 +2027,7 @@ test textDisp-14.2 {TkTextXviewCmd procedure} {
.t configure -wrap none
test textDisp-14.3 {TkTextXviewCmd procedure} {
.t delete 1.0 end
- updateText
+ update
.t insert end xxxxxxxxx\n
.t insert end "xxxxx\n"
.t insert end "xxxx"
@@ -2127,43 +2120,43 @@ for {set i 1} {$i < 99} {incr i} {
.t insert 50.0 "This is a long line, one that will wrap around twice.\n"
test textDisp-15.1 {ScrollByLines procedure, scrolling backwards} {
.t yview 45.0
- updateText
+ update
.t yview scroll -3 units
.t index @0,0
} {42.0}
test textDisp-15.2 {ScrollByLines procedure, scrolling backwards} {
.t yview 51.0
- updateText
+ update
.t yview scroll -2 units
.t index @0,0
} {50.20}
test textDisp-15.3 {ScrollByLines procedure, scrolling backwards} {
.t yview 51.0
- updateText
+ update
.t yview scroll -4 units
.t index @0,0
} {49.0}
test textDisp-15.4 {ScrollByLines procedure, scrolling backwards} {
.t yview 50.20
- updateText
+ update
.t yview scroll -2 units
.t index @0,0
} {49.0}
test textDisp-15.5 {ScrollByLines procedure, scrolling backwards} {
.t yview 50.40
- updateText
+ update
.t yview scroll -2 units
.t index @0,0
} {50.0}
test textDisp-15.6 {ScrollByLines procedure, scrolling backwards} {
.t yview 3.2
- updateText
+ update
.t yview scroll -5 units
.t index @0,0
} {1.0}
test textDisp-15.7 {ScrollByLines procedure, scrolling forwards} {
.t yview 48.0
- updateText
+ update
.t yview scroll 4 units
.t index @0,0
} {50.40}
@@ -2189,7 +2182,7 @@ test textDisp-15.8 {Scrolling near end of window} {
for {set i 1} {$i < $textheight} {incr i} {
.tf.f.t insert end "\nLine $i"
}
- updateText
+ update
set refind [.tf.f.t index @0,[winfo height .tf.f.t]]
# Should scroll and should not crash!
.tf.f.t yview scroll 1 unit
@@ -2209,7 +2202,7 @@ for {set i 2} {$i <= 200} {incr i} {
.t tag add big 100.0 105.0
.t insert 151.end { has a lot of extra text, so that it wraps around on the screen several times over.}
.t insert 153.end { also has largely enough extra text to wrap.}
-updateText
+update
set totpix [.t count -update -ypixels 1.0 end]
# check that the wrapping lines wrap exactly 6 times in total (4 times for line 151, and twice for line 153),
# this is an assumption of the upcoming tests
@@ -2237,7 +2230,7 @@ test textDisp-16.5 {TkTextYviewCmd procedure} {
} {1 {bad option "-bogus": must be moveto or scroll}}
test textDisp-16.6 {TkTextYviewCmd procedure, integer position} {
.t yview 100.0
- updateText
+ update
.t yview 98
.t index @0,0
} {99.0}
@@ -2321,7 +2314,7 @@ test textDisp-16.18 {TkTextYviewCmd procedure, "moveto" roundoff} {
text .top1.t -height 3 -width 4 -wrap none -setgrid 1 -padx 6 \
-spacing3 6
pack .top1.t
- updateText
+ update
.top1.t insert end "1\n2\n3\n4\n5\n6"
.top1.t yview moveto 0.3333
set result [.top1.t yview]
@@ -2342,7 +2335,7 @@ test textDisp-16.21.2 {TkTextYviewCmd procedure, "scroll" option} {
} {1 {expected integer but got "badInt"}}
test textDisp-16.22 {TkTextYviewCmd procedure, "scroll" option, back pages} {
.t yview 50.0
- updateText
+ update
.t yview scroll -1 pages
.t index @0,0
} {42.0}
@@ -2351,13 +2344,13 @@ test textDisp-16.22.1 {TkTextYviewCmd procedure, "scroll" option, back pages} {
} {1 {ambiguous argument "p": must be units, pages, or pixels}}
test textDisp-16.23 {TkTextYviewCmd procedure, "scroll" option, back pages} {
.t yview 50.0
- updateText
+ update
.t yview scroll -3 pa
.t index @0,0
} {26.0}
test textDisp-16.24 {TkTextYviewCmd procedure, "scroll" option, back pages} {
.t yview 5.0
- updateText
+ update
.t yview scroll -3 pa
.t index @0,0
} {1.0}
@@ -2368,32 +2361,32 @@ test textDisp-16.25 {TkTextYviewCmd procedure, "scroll" option, back pages} -set
pack .f2 -side top
} -body {
.t configure -height 1
- updateText
+ update
.t yview 50.0
- updateText
+ update
.t yview scroll -1 pages
set x [.t index @0,0]
.t configure -height 10
- updateText
+ update
set x
} -cleanup {
destroy .f2
} -result {49.0}
test textDisp-16.26 {TkTextYviewCmd procedure, "scroll" option, forward pages} {
.t yview 50.0
- updateText
+ update
.t yview scroll 1 pages
.t index @0,0
} {58.0}
test textDisp-16.27 {TkTextYviewCmd procedure, "scroll" option, forward pages} {
.t yview 50.0
- updateText
+ update
.t yview scroll 2 pages
.t index @0,0
} {66.0}
test textDisp-16.28 {TkTextYviewCmd procedure, "scroll" option, forward pages} {
.t yview 98.0
- updateText
+ update
# The man page does not say it but the code does: scrolling 1 page actually uses the
# window height minus two lines, so that there's some overlap between adjacent pages.
# Note: it's a bit tricky but we only need to subtract one [bo] from [winfo height .t] here
@@ -2404,24 +2397,24 @@ test textDisp-16.28 {TkTextYviewCmd procedure, "scroll" option, forward pages} {
} {1}
test textDisp-16.29 {TkTextYviewCmd procedure, "scroll" option, forward pages} {
.t configure -height 1
- updateText
+ update
.t yview 50.0
- updateText
+ update
.t yview scroll 1 pages
set x [.t index @0,0]
.t configure -height 10
- updateText
+ update
set x
} {51.0}
test textDisp-16.30 {TkTextYviewCmd procedure, "scroll units" option} {
.t yview 45.0
- updateText
+ update
.t yview scroll -3 units
.t index @0,0
} {42.0}
test textDisp-16.31 {TkTextYviewCmd procedure, "scroll units" option} {
.t yview 149.0
- updateText
+ update
.t yview scroll 4 units
.t index @0,0
} {151.40}
@@ -2526,7 +2519,7 @@ test textDisp-16.42 {TkTextYviewCmd procedure with indices in elided lines} {
.t tag configure hidden -elide true
.t yview 35.0
.t yview scroll [expr {- 15 * $fixedHeight}] pixels
- updateText
+ update
.t index @0,0
} {5.0}
test textDisp-16.43 {TkTextYviewCmd procedure with indices in elided lines} {
@@ -2540,7 +2533,7 @@ test textDisp-16.43 {TkTextYviewCmd procedure with indices in elided lines} {
.t tag configure hidden -elide true
.t yview 35.0
.t yview scroll -15 units
- updateText
+ update
.t index @0,0
} {5.0}
test textDisp-16.44 {TkTextYviewCmd procedure, scroll down, with elided lines} {
@@ -2551,9 +2544,9 @@ test textDisp-16.44 {TkTextYviewCmd procedure, scroll down, with elided lines} {
.t insert end "$x 1111\n$x 2222\n$x 3333\n$x 4444\n$x 5555\n$x 6666" hidden
}
.t tag configure hidden -elide true ; # 5 hidden lines
- updateText
+ update
.t see [expr {5 + [winfo height .t] / $fixedHeight + 1}].0
- updateText
+ update
.t index @0,0
} {2.0}
@@ -2581,83 +2574,83 @@ test textDisp-17.5 {TkTextScanCmd procedure} {
test textDisp-17.6 {TkTextScanCmd procedure} {
.t yview 1.0
.t xview moveto 0
- updateText
+ update
set expected [.t index @[expr {[bo]+50}],[expr {[bo]+50}]]
.t scan mark 40 60
.t scan dragto 35 55
- updateText
+ update
lequal [.t index @0,0] $expected
} {1}
test textDisp-17.7 {TkTextScanCmd procedure} {
# 1st result
.t yview 1.0
.t xview moveto 0
- updateText
+ update
set expected [.t index @[expr {[bo]+20*$fixedWidth-50}],[expr {[bo]+9*$fixedHeight-50}]]
.t yview 10.0
.t xview scroll 20 units
- updateText
+ update
.t scan mark -10 60
.t scan dragto -5 65
- updateText
+ update
set x [.t index @0,0]
# 2nd result
.t yview 1.0
.t xview moveto 0
- updateText
+ update
lappend expected [.t index @[expr {[bo]+20*$fixedWidth-50-50}],[expr {[bo]+9*$fixedHeight-50-70}]]
.t yview 10.0
.t xview scroll 20 units
- updateText
+ update
.t scan mark -10 60
.t scan dragto -5 65
- updateText
+ update
.t scan dragto 0 72
- updateText
+ update
lequal [list $x [.t index @0,0]] $expected
} {1}
test textDisp-17.8 {TkTextScanCmd procedure} {
.t yview 1.0
.t xview moveto 0
- updateText
+ update
set expected [.t index @[expr {[bo]+50}],[expr {[bo]+50}]]
.t scan mark 0 60
.t scan dragto 30 100
- updateText
+ update
.t scan dragto 25 95
- updateText
+ update
lequal [.t index @0,0] $expected
} {1}
test textDisp-17.9 {TkTextScanCmd procedure} {
.t yview end
.t xview moveto 0
- updateText
+ update
# this brings us at lower right corner of the text
.t xview scroll 100 units
- updateText
+ update
# this does not trigger any scroll, we're already at the corner
.t scan mark 90 60
.t scan dragto 10 0
- updateText
+ update
set expected [.t index @[expr {[winfo width .t]-[bo]-40}],[expr {[winfo height .t]-[bo]-50}]]
set expected [.t index "$expected - [.t cget -height] lines - [.t cget -width] chars"]
.t scan dragto 14 5
- updateText
+ update
lequal [.t index @0,0] $expected
} {1}
.t configure -wrap word
test textDisp-17.10 {TkTextScanCmd procedure, word wrapping} {
.t yview 10.0
- updateText
+ update
set origin [.t index @0,0]
set expected [.t index "$origin - [expr {int(ceil(50.0/$fixedHeight))}] display lines"]
.t scan mark -10 60
.t scan dragto -5 65
- updateText
+ update
set x [.t index @0,0]
lappend expected [.t index "$origin - [expr {int(ceil((50.0+70.0)/$fixedHeight))}] display lines"]
.t scan dragto 0 72
- updateText
+ update
lequal [list $x [.t index @0,0]] $expected
} {1}
.t configure -xscrollcommand scroll -yscrollcommand {}
@@ -2668,7 +2661,7 @@ test textDisp-18.1 {GetXView procedure} {
.t insert end xxxxxxxxx\n
.t insert end xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n
.t insert end xxxxxxxxxxxxxxxxxxxxxxxxxx
- updateText
+ update
set scrollInfo
} [list 0.0 [expr {4.0/11}]]
test textDisp-18.2 {GetXView procedure} {
@@ -2677,13 +2670,13 @@ test textDisp-18.2 {GetXView procedure} {
.t insert end xxxxxxxxx\n
.t insert end xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n
.t insert end xxxxxxxxxxxxxxxxxxxxxxxxxx
- updateText
+ update
set scrollInfo
} {0.0 1.0}
test textDisp-18.3 {GetXView procedure} {
.t configure -wrap none
.t delete 1.0 end
- updateText
+ update
set scrollInfo
} {0.0 1.0}
test textDisp-18.4 {GetXView procedure} {
@@ -2692,7 +2685,7 @@ test textDisp-18.4 {GetXView procedure} {
.t insert end xxxxxxxxx\n
.t insert end xxxxxx\n
.t insert end xxxxxxxxxxxxxxxxx
- updateText
+ update
set scrollInfo
} {0.0 1.0}
test textDisp-18.5 {GetXView procedure} {
@@ -2702,7 +2695,7 @@ test textDisp-18.5 {GetXView procedure} {
.t insert end xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n
.t insert end xxxxxxxxxxxxxxxxxxxxxxxxxx
.t xview scroll 31 units
- updateText
+ update
set scrollInfo
} [list [expr {31.0/55}] [expr {51.0/55}]]
test textDisp-18.6 {GetXView procedure} {
@@ -2713,27 +2706,27 @@ test textDisp-18.6 {GetXView procedure} {
.t insert end "xxxx xxxxxxxxx xxxxxxxxxxxxx"
.t xview moveto 0
.t xview scroll 31 units
- updateText
+ update
set x {}
lappend x $scrollInfo
.t configure -wrap char
- updateText
+ update
lappend x $scrollInfo
.t configure -wrap word
- updateText
+ update
lappend x $scrollInfo
.t configure -wrap none
- updateText
+ update
lappend x $scrollInfo
} [list [list [expr {31.0/56}] [expr {51.0/56}]] {0.0 1.0} {0.0 1.0} [list 0.0 [expr {5.0/14}]]]
test textDisp-18.7 {GetXView procedure} {
.t configure -wrap none
.t delete 1.0 end
- updateText
+ update
set scrollInfo unchanged
.t insert end xxxxxx\n
.t insert end xxx
- updateText
+ update
set scrollInfo
} {unchanged}
test textDisp-18.8 {GetXView procedure} {
@@ -2747,10 +2740,10 @@ test textDisp-18.8 {GetXView procedure} {
.t configure -wrap none
.t delete 1.0 end
.t insert end xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n
- updateText
+ update
.t delete 1.0 end
.t configure -xscrollcommand scrollError
- updateText
+ update
set x
} {{scrolling error} {scrolling error
while executing
@@ -2766,37 +2759,37 @@ catch {rename bogus {}}
test textDisp-19.1 {GetYView procedure} {
.t configure -wrap char
.t delete 1.0 end
- updateText
+ update
set scrollInfo
} {0.0 1.0}
test textDisp-19.2 {GetYView procedure} {
.t configure -wrap char
.t delete 1.0 end
- updateText
+ update
set scrollInfo "unchanged"
.t insert 1.0 "Line1\nLine2"
- updateText
+ update
set scrollInfo
} {unchanged}
test textDisp-19.3 {GetYView procedure} {
.t configure -wrap char
.t delete 1.0 end
- updateText
+ update
set scrollInfo "unchanged"
.t insert 1.0 "Line 1\nLine 2 is so long that it wraps around\nLine 3"
- updateText
+ update
set scrollInfo
} {unchanged}
test textDisp-19.4 {GetYView procedure} {
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "Line 1"
- updateText
+ update
set scrollInfo "unchanged"
foreach i {2 3 4 5 6 7 8 9 10 11 12 13} {
.t insert end "\nLine $i"
}
- updateText
+ update
set scrollInfo
} [list 0.0 [expr {70.0/91}]]
test textDisp-19.5 {GetYView procedure} {
@@ -2807,7 +2800,7 @@ test textDisp-19.5 {GetYView procedure} {
.t insert end "\nLine $i"
}
.t insert 2.end " is really quite long; in fact it's so long that it wraps three times"
- updateText
+ update
set x $scrollInfo
} {0.0 0.625}
test textDisp-19.6 {GetYView procedure} {
@@ -2819,7 +2812,7 @@ test textDisp-19.6 {GetYView procedure} {
}
.t insert 2.end " is really quite long; in fact it's so long that it wraps three times"
.t yview 4.0
- updateText
+ update
set x $scrollInfo
} {0.375 1.0}
test textDisp-19.7 {GetYView procedure} {
@@ -2831,7 +2824,7 @@ test textDisp-19.7 {GetYView procedure} {
}
.t insert 2.end " is really quite long; in fact it's so long that it wraps three times"
.t yview 2.26
- updateText
+ update
set x $scrollInfo
} {0.125 0.75}
test textDisp-19.8 {GetYView procedure} {
@@ -2843,7 +2836,7 @@ test textDisp-19.8 {GetYView procedure} {
}
.t insert 10.end " is really quite long; in fact it's so long that it wraps three times"
.t yview 2.0
- updateText
+ update
.t count -update -ypixels 1.0 end
set x $scrollInfo
} {0.0625 0.6875}
@@ -2855,7 +2848,7 @@ test textDisp-19.9 {GetYView procedure} {
.t insert end "\nLine $i"
}
.t yview 3.0
- updateText
+ update
set scrollInfo
} [list [expr {4.0/30}] 0.8]
test textDisp-19.10 {GetYView procedure} {
@@ -2866,7 +2859,7 @@ test textDisp-19.10 {GetYView procedure} {
.t insert end "\nLine $i"
}
.t yview 11.0
- updateText
+ update
set scrollInfo
} [list [expr {1.0/3}] 1.0]
test textDisp-19.10.1 {Widget manipulation causes height miscount} {
@@ -2877,7 +2870,7 @@ test textDisp-19.10.1 {Widget manipulation causes height miscount} {
.t insert end "\nLine $i"
}
.t yview 11.0
- updateText
+ update
.t configure -wrap word
.t delete 1.0 end
.t insert 1.0 "Line 1"
@@ -2887,7 +2880,7 @@ test textDisp-19.10.1 {Widget manipulation causes height miscount} {
.t insert end "\nThis last line wraps around four "
.t insert end "times with a little bit left on the last line."
.t yview insert
- updateText
+ update
.t count -update -ypixels 1.0 end
set scrollInfo
} {0.5 1.0}
@@ -2901,7 +2894,7 @@ test textDisp-19.11 {GetYView procedure} {
.t insert end "\nThis last line wraps around four "
.t insert end "times with a little bit left on the last line."
.t yview insert
- updateText
+ update
.t count -update -ypixels 1.0 end
set scrollInfo
} {0.5 1.0}
@@ -3039,10 +3032,10 @@ test textDisp-19.12 {GetYView procedure, partially visible last line} {
pack .top.t -expand yes -fill both
.top.t insert end "Line 1\nLine 2\nLine 3\nLine 4\nLine 5"
# Need to wait for asychronous calculations to complete.
- updateText
+ update
scan [wm geom .top] %dx%d twidth theight
wm geom .top ${twidth}x[expr {$theight - 3}]
- updateText
+ update
.top.t yview
} [list 0.0 [expr {(5.0 * $fixedHeight - 3.0)/ (5.0 * $fixedHeight)}]]
test textDisp-19.13 {GetYView procedure, partially visible last line} {
@@ -3053,10 +3046,10 @@ test textDisp-19.13 {GetYView procedure, partially visible last line} {
pack .top.t -expand yes -fill both
.top.t insert end "Line 1\nLine 2\nLine 3\nLine 4 has enough text to wrap around at least once"
# Need to wait for asychronous calculations to complete.
- updateText
+ update
scan [wm geom .top] %dx%d twidth theight
wm geom .top ${twidth}x[expr {$theight - 3}]
- updateText
+ update
.top.t yview
} [list 0.0 [expr {(5.0 * $fixedHeight - 3.0)/ (5.0 * $fixedHeight)}]]
catch {destroy .top}
@@ -3070,14 +3063,14 @@ test textDisp-19.14 {GetYView procedure} {
.t insert end "\nThis last line wraps around four "
.t insert end "times with a little bit left on the last line."
# Need to update so everything is calculated.
- updateText
+ update
.t count -update -ypixels 1.0 end
- updateText
+ delay
set scrollInfo "unchanged"
.t mark set insert 3.0
.t tag configure x -background red
.t tag add x 1.0 5.0
- updateText
+ update
.t tag delete x
set scrollInfo
} {unchanged}
@@ -3090,14 +3083,14 @@ test textDisp-19.15 {GetYView procedure} {
}
.t insert end "\nThis last line wraps around four "
.t insert end "times with a bit little left on the last line."
- updateText
+ update
.t configure -yscrollcommand scrollError
proc bgerror args {
global x errorInfo errorCode
set x [list $args $errorInfo $errorCode]
}
.t delete 1.0 end
- updateText
+ update
rename bgerror {}
.t configure -yscrollcommand scroll
set x
@@ -3119,9 +3112,9 @@ test textDisp-19.16 {count -ypixels} {
.t insert end "\nThis last line wraps around four "
.t insert end "times with a little bit left on the last line."
# Need to update so everything is calculated.
- updateText
+ update
.t count -update -ypixels 1.0 end
- updateText
+ update
set res [list \
[.t count -ypixels 1.0 end] \
[.t count -update -ypixels 1.0 end] \
@@ -3144,9 +3137,9 @@ test textDisp-19.17 {count -ypixels with indices in elided lines} {
}
.t tag add hidden 5.15 20.15
.t tag configure hidden -elide true
- updateText
+ update
.t count -update -ypixels 1.0 end
- updateText
+ update
set res [list \
[.t count -ypixels 1.0 6.0] \
[.t count -ypixels 2.0 7.5] \
@@ -3180,12 +3173,12 @@ test textDisp-19.18 {count -ypixels with indices in elided lines} {
.t tag add hidden 5.15 20.15
.t tag configure hidden -elide true
.t yview 35.0
- updateText
+ update
.t count -update -ypixels 1.0 end
- updateText
+ update
set res [.t count -ypixels 5.0 25.0]
.t yview scroll [expr {- 15 * $fixedHeight}] pixels
- updateText
+ update
lappend res [.t count -ypixels 5.0 25.0]
} [list [expr {5 * $fixedHeight}] [expr {5 * $fixedHeight}]]
test textDisp-19.19 {count -ypixels with indices in elided lines} {
@@ -3198,7 +3191,7 @@ test textDisp-19.19 {count -ypixels with indices in elided lines} {
.t tag add hidden 5.27 11.0
.t tag configure hidden -elide true
.t yview 5.0
- updateText
+ update
set res [list [.t count -ypixels 5.0 11.0] [.t count -ypixels 5.0 11.20]]
} [list [expr {1 * $fixedHeight}] [expr {2 * $fixedHeight}]]
.t delete 1.0 end
@@ -3307,7 +3300,7 @@ for {set i 2} {$i <= 200} {incr i} {
.t configure -wrap word
.t delete 50.0 51.0
.t insert 50.0 "This is a long line, one that will wrap around twice.\n"
-updateText
+update
.t tag add x 50.1
test textDisp-22.1 {TkTextCharBbox} {
.t config -wrap word
@@ -3328,58 +3321,58 @@ test textDisp-22.2 {TkTextCharBbox} {
[list [xchar 0] [yline 10] $fixedWidth $fixedHeight]]
test textDisp-22.3 {TkTextCharBbox, cut-off lines} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t config -wrap char
.t yview 10.0
wm geom . ${width}x[expr {$height-1}]
- updateText
+ update
set expected [list [list [xchar 1] [yline 10] $fixedWidth $fixedHeight] \
[list [xchar 1] [yline 11] $fixedWidth [expr {($height-1)-$oriHeight}]]]
lequal [list [.t bbox 19.1] [.t bbox 20.1]] $expected
} {1}
test textDisp-22.4 {TkTextCharBbox, cut-off lines} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t config -wrap char
.t yview 10.0
wm geom . ${width}x[expr {$height+1}]
- updateText
+ update
set expected [list [list [xchar 1] [yline 10] $fixedWidth $fixedHeight] \
[list [xchar 1] [yline 11] $fixedWidth [expr {($height+1)-$oriHeight}]]]
lequal [list [.t bbox 19.1] [.t bbox 20.1]] $expected
} {1}
test textDisp-22.5 {TkTextCharBbox, cut-off char} {
wm geometry . {}
- updateText
+ update
.t config -wrap none
.t yview 10.0
wm geom . [expr {$width-(20-7)*$fixedWidth}]x$height
- updateText
+ update
.t bbox 15.6
} [list [xchar 6] [yline 6] $fixedWidth $fixedHeight]
test textDisp-22.6 {TkTextCharBbox, line visible but not char} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t config -wrap char
.t yview 10.0
.t tag add big 20.2 20.5
wm geom . ${width}x[expr {$height+3}]
- updateText
+ update
set expected [list [list [xchar 1] [yline 10] $fixedWidth $fixedHeight] \
{} \
[list [xchar 2] [yline 11] [font measure $bigFont "n"] [expr {($height+3)-$oriHeight}]]]
lequal [list [.t bbox 19.1] [.t bbox 20.1] [.t bbox 20.2]] $expected
} {1}
wm geom . {}
-updateText
+update
test textDisp-22.7 {TkTextCharBbox, different character sizes} {
.t config -wrap char
.t yview 10.0
.t tag add big 12.2 12.5
- updateText
+ update
list [.t bbox 12.1] [.t bbox 12.2]
} [list [list [xchar 1] [expr {[yline 3]+$ascentDiff}] $fixedWidth $fixedHeight] \
[list [xchar 2] [yline 3] [font measure $bigFont "n"] $bigHeight]]
@@ -3412,7 +3405,7 @@ test textDisp-22.9 {TkTextCharBbox, handling of spacing} {
.t window create 1.7 -window .t.f2 -align center
.t window create 2.1 -window .t.f3 -align bottom
.t window create 2.10 -window .t.f4 -align baseline
- updateText
+ update
list [.t bbox .t.f1] [.t bbox .t.f2] [.t bbox .t.f3] [.t bbox .t.f4] \
[.t bbox 1.1] [.t bbox 2.9]
} [list [list [xchar 3] [expr {[yline 1]+8}] 10 4] \
@@ -3431,7 +3424,7 @@ test textDisp-22.10 {TkTextCharBbox, handling of elided lines} {
.t tag add hidden 2.8 2.13
.t tag add hidden 6.8 7.13
.t tag configure hidden -elide true
- updateText
+ update
list \
[expr {[lindex [.t bbox 2.9] 0] - [lindex [.t bbox 2.8] 0]}] \
[expr {[lindex [.t bbox 2.10] 0] - [lindex [.t bbox 2.8] 0]}] \
@@ -3453,7 +3446,7 @@ test textDisp-22.11 {TkTextCharBbox, handling of wrapped elided lines} {
}
.t tag add hidden 1.30 2.5
.t tag configure hidden -elide true
- updateText
+ update
list \
[expr {[lindex [.t bbox 1.30] 0] - [lindex [.t bbox 2.4] 0]}] \
[expr {[lindex [.t bbox 1.30] 0] - [lindex [.t bbox 2.5] 0]}]
@@ -3467,7 +3460,7 @@ for {set i 2} {$i <= 200} {incr i} {
.t configure -wrap word
.t delete 50.0 51.0
.t insert 50.0 "This is a long line, one that will wrap around twice.\n"
-updateText
+update
test textDisp-23.1 {TkTextDLineInfo} {
.t config -wrap word
.t yview 48.0
@@ -3480,44 +3473,44 @@ test textDisp-23.1 {TkTextDLineInfo} {
.t config -bd 4
test textDisp-23.2 {TkTextDLineInfo} {
.t config -wrap word
- updateText
+ update
.t yview 48.0
.t dlineinfo 50.40
} [list [bo] [yline 5] [xw 13] $fixedHeight $fixedAscent]
.t config -bd 0
test textDisp-23.3 {TkTextDLineInfo} {
.t config -wrap none
- updateText
+ update
.t yview 48.0
list [.t dlineinfo 50.40] [.t dlineinfo 57.3]
} [list [list [bo] [yline 3] [xw 53] $fixedHeight $fixedAscent] \
[list [bo] [yline 10] [xw 7] $fixedHeight $fixedAscent]]
test textDisp-23.4 {TkTextDLineInfo, cut-off lines} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t config -wrap char
.t yview 10.0
wm geom . ${width}x[expr {$height-1}]
- updateText
+ update
set expected [list [list [bo] [yline 10] [xw 7] $fixedHeight $fixedAscent] \
[list [bo] [yline 11] [xw 7] [expr {($height-1)-$oriHeight}] $fixedAscent]]
lequal [list [.t dlineinfo 19.0] [.t dlineinfo 20.0]] $expected
} {1}
test textDisp-23.5 {TkTextDLineInfo, cut-off lines} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t config -wrap char
.t yview 10.0
wm geom . ${width}x[expr {$height+1}]
- updateText
+ update
set expected [list [list [bo] [yline 10] [xw 7] $fixedHeight $fixedAscent] \
[list [bo] [yline 11] [xw 7] [expr {($height+1)-$oriHeight}] $fixedAscent]]
lequal [list [.t dlineinfo 19.0] [.t dlineinfo 20.0]] $expected
} {1}
wm geom . {}
-updateText
+update
test textDisp-23.6 {TkTextDLineInfo, horizontal scrolling} {
.t config -wrap none
.t delete 1.0 end
@@ -3525,7 +3518,7 @@ test textDisp-23.6 {TkTextDLineInfo, horizontal scrolling} {
.t insert end "Second line is a very long one that doesn't all fit.\n"
.t insert end "Third"
.t xview scroll 6 units
- updateText
+ update
list [.t dlineinfo 1.0] [.t dlineinfo 2.0] [.t dlineinfo 3.0]
} [list [list [expr {[xw -6]+[bo]}] [yline 1] [xw 10] $fixedHeight $fixedAscent] \
[list [expr {[xw -6]+[bo]}] [yline 2] [xw 52] $fixedHeight $fixedAscent] \
@@ -3556,7 +3549,7 @@ test textDisp-24.1 {TkTextCharLayoutProc} {
[list [xchar 0] [yline 2] $fixedWidth $fixedHeight]]
test textDisp-24.2 {TkTextCharLayoutProc} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t configure -wrap char
.t delete 1.0 end
@@ -3567,20 +3560,20 @@ test textDisp-24.2 {TkTextCharLayoutProc} {
incr wi -$fixedWidth
}
wm geom . [expr {$wi+1}]x$height
- updateText
+ update
set expected [list [list [xchar 19] [yline 1] [expr {$fixedWidth+($wi+1-$oriWidth)}] $fixedHeight] \
[list [xchar 0] [yline 2] $fixedWidth $fixedHeight]]
lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected
} {1}
test textDisp-24.3 {TkTextCharLayoutProc} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "abcdefghijklmnopqrstuvwxyz"
wm geom . [expr {$width-1}]x$height
- updateText
+ update
set expected [list [list [xchar 19] [yline 1] [expr {$fixedWidth+($width-1-$oriWidth)}] $fixedHeight] \
[list [xchar 0] [yline 2] $fixedWidth $fixedHeight]]
lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected
@@ -3590,7 +3583,7 @@ test textDisp-24.4 {TkTextCharLayoutProc, newline not visible} {
.t delete 1.0 end
.t insert 1.0 01234567890123456789\n012345678901234567890
wm geom . {}
- updateText
+ update
list [.t bbox 1.19] [.t bbox 1.20] [.t bbox 2.20]
} [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \
[list [xchar 20] [yline 1] 0 $fixedHeight] \
@@ -3603,7 +3596,7 @@ test textDisp-24.5 {TkTextCharLayoutProc, char doesn't fit, newline not visible}
# note: windows refuses to shrink enough therefore the constraint
set wi [expr {[winfo width .f]+[bo]+[xw 1]}]
wm geom . ${wi}x$height
- updateText
+ update
list [.t bbox 1.0] [.t bbox 1.1] [.t bbox 2.0]
} [list [list [xchar 0] [yline 1] [expr {$fixedWidth-[bo]}] $fixedHeight] \
[list [expr {[xchar 1]-[bo]}] [yline 1] 0 $fixedHeight] \
@@ -3613,13 +3606,13 @@ test textDisp-24.6 {TkTextCharLayoutProc, line ends with space} {
.t delete 1.0 end
.t insert 1.0 "a b c d e f g h i j k l m n o p"
wm geom . {}
- updateText
+ update
list [.t bbox 1.19] [.t bbox 1.20]
} [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \
[list [xchar 0] [yline 2] $fixedWidth $fixedHeight]]
test textDisp-24.7 {TkTextCharLayoutProc, line ends with space} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t configure -wrap char
.t delete 1.0 end
@@ -3630,46 +3623,46 @@ test textDisp-24.7 {TkTextCharLayoutProc, line ends with space} {
incr wi -$fixedWidth
}
wm geom . [expr {$wi+1}]x$height
- updateText
+ update
set expected [list [list [xchar 19] [yline 1] [expr {$fixedWidth+($wi+1-$oriWidth)}] $fixedHeight] \
[list [xchar 0] [yline 2] $fixedWidth $fixedHeight]]
lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected
} {1}
test textDisp-24.8 {TkTextCharLayoutProc, line ends with space} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "a b c d e f g h i j k l m n o p"
wm geom . [expr {$width-1}]x$height
- updateText
+ update
set expected [list [list [xchar 19] [yline 1] [expr {$fixedWidth+($width-1-$oriWidth)}] $fixedHeight] \
[list [xchar 0] [yline 2] $fixedWidth $fixedHeight]]
lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected
} {1}
test textDisp-24.9 {TkTextCharLayoutProc, line ends with space} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "a b c d e f g h i j k l m n o p"
wm geom . [expr {$width-6}]x$height
- updateText
+ update
set expected [list [list [xchar 19] [yline 1] [expr {$fixedWidth+($width-6-$oriWidth)}] $fixedHeight] \
[list [xchar 0] [yline 2] $fixedWidth $fixedHeight]]
lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected
} {1}
test textDisp-24.10 {TkTextCharLayoutProc, line ends with space} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t configure -wrap char
.t delete 1.0 end
.t insert 1.0 "a b c d e f g h i j k l m n o p"
wm geom . [expr {$width-7}]x$height
- updateText
+ update
set expected [list [list [xchar 19] [yline 1] [expr {$fixedWidth+($width-7-$oriWidth)}] $fixedHeight] \
[list [xchar 0] [yline 2] $fixedWidth $fixedHeight]]
lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected
@@ -3681,7 +3674,7 @@ test textDisp-24.11 {TkTextCharLayoutProc, line ends with space that doesn't qui
# set text widget width to 2 pixels more than 20-char width
set wi [expr {[winfo width .f]+2*[bo]+[xw 20]+2}]
wm geom . ${wi}x$height
- updateText
+ update
set result [list [.t bbox 1.21] [.t bbox 2.0]]
.t mark set insert 1.21
lappend result [.t bbox 1.21] [.t bbox 2.0]
@@ -3690,7 +3683,7 @@ test textDisp-24.11 {TkTextCharLayoutProc, line ends with space that doesn't qui
[list [expr {[xchar 20]+2}] [yline 1] 0 $fixedHeight] \
[list [xchar 0] [yline 2] $fixedWidth $fixedHeight]]
wm geom . {}
-updateText
+update
test textDisp-24.12 {TkTextCharLayoutProc, tab causes wrap} {
.t configure -wrap char
.t delete 1.0 end
@@ -3706,31 +3699,31 @@ test textDisp-24.13 {TkTextCharLayoutProc, -wrap none} {
.t delete 1.0 end
.t insert 1.0 "abcdefghijklmnopqrstuvwxyz"
wm geom . {}
- updateText
+ update
list [.t bbox 1.19] [.t bbox 1.20]
} [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] {}]
test textDisp-24.14 {TkTextCharLayoutProc, -wrap none} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t configure -wrap none
.t delete 1.0 end
.t insert 1.0 "abcdefghijklmnopqrstuvwxyz"
wm geom . [expr {$width+1}]x$height
- updateText
+ update
set expected [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \
[list [xchar 20] [yline 1] [expr {$width+1-$oriWidth}] $fixedHeight]]
lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected
} {1}
test textDisp-24.15 {TkTextCharLayoutProc, -wrap none} {
wm geometry . {}
- updateText
+ update
scan [wm geom .] %dx%d oriWidth oriHeight
.t configure -wrap none
.t delete 1.0 end
.t insert 1.0 "abcdefghijklmnopqrstuvwxyz"
wm geom . [expr {$width-1}]x$height
- updateText
+ update
set expected [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \
[list [xchar 20] [yline 1] [expr {$width-1-$oriWidth}] $fixedHeight]]
lequal [list [.t bbox 1.19] [.t bbox 1.20]] $expected
@@ -3745,7 +3738,7 @@ test textDisp-24.16 {TkTextCharLayoutProc, no chars fit} {
# set text widget width to [bo] pixels (no chars fit in the widget at all)
set wi [expr {[winfo width .f]+[bo]}]
wm geom . ${wi}x$height
- updateText
+ update
list [.t bbox 1.0] [.t bbox 1.1] [.t bbox 1.2]
} [list [list [xchar 0] [yline 1] 1 $fixedHeight] \
[list [xchar 0] [yline 2] 1 $fixedHeight] \
@@ -3758,7 +3751,7 @@ test textDisp-24.17 {TkTextCharLayoutProc, -wrap word} {
.t delete 1.0 end
.t insert 1.0 "This is a line that wraps around"
wm geom . {}
- updateText
+ update
list [.t bbox 1.19] [.t bbox 1.20]
} [list [list [xchar 19] [yline 1] $fixedWidth $fixedHeight] \
[list [xchar 0] [yline 2] $fixedWidth $fixedHeight]]
@@ -3767,7 +3760,7 @@ test textDisp-24.18 {TkTextCharLayoutProc, -wrap word} {
.t delete 1.0 end
.t insert 1.0 "xxThis is a line that wraps around"
wm geom . {}
- updateText
+ update
list [.t bbox 1.15] [.t bbox 1.16] [.t bbox 1.17] [.t bbox 1.21]
} [list [list [xchar 15] [yline 1] $fixedWidth $fixedHeight] \
[list [xchar 16] [yline 1] [xe 16] $fixedHeight] \
@@ -3778,7 +3771,7 @@ test textDisp-24.19 {TkTextCharLayoutProc, -wrap word} {
.t delete 1.0 end
.t insert 1.0 "xxThis is a line that wraps around"
wm geom . {}
- updateText
+ update
list [.t bbox 1.14] [.t bbox 1.15] [.t bbox 1.16]
} [list [list [xchar 14] [yline 1] $fixedWidth $fixedHeight] \
[list [xchar 15] [yline 1] $fixedWidth $fixedHeight] \
@@ -3803,7 +3796,7 @@ test textDisp-24.20 {TkTextCharLayoutProc, vertical offset} {
[list [xchar 1] [expr {[yline 2]+2}] $fixedWidth $fixedHeight] \
[list [bo] [yline 2] [xw 6] [expr {$fixedHeight+2}] $fixedAscent]]
.t configure -width 30
-updateText
+update
test textDisp-24.21 {TkTextCharLayoutProc, word breaks} {
.t configure -wrap word
.t delete 1.0 end
@@ -3833,7 +3826,7 @@ test textDisp-24.23 {TkTextCharLayoutProc, word breaks} {
} [list [xchar 0] [yline 3] 50 20]
catch {destroy .t.f}
.t configure -width 20
-updateText
+update
# Next test is currently constrained to not run on mac (aqua) because on
# aqua it fails due to wrong implementation of tabs with right justification
# (the text is not rendered at all). This is a bug.
@@ -3850,7 +3843,7 @@ test textDisp-24.25 {TkTextCharLayoutProc, justification and tabs} -setup {
pack .tt
} -body {
.tt insert end \t9\n\t99\n\t999
- updateText
+ update
set expected [list [list [expr {[bo .tt]+40-$fixedWidth}] [yline 1 .tt] $fixedWidth $fixedHeight] \
[list [expr {[bo .tt]+40-$fixedWidth}] [yline 2 .tt] $fixedWidth $fixedHeight] \
[list [expr {[bo .tt]+40-$fixedWidth}] [yline 3 .tt] $fixedWidth $fixedHeight]]
@@ -3861,7 +3854,7 @@ test textDisp-24.25 {TkTextCharLayoutProc, justification and tabs} -setup {
.t configure -width 40 -bd 0 -relief flat -highlightthickness 0 \
-tabs 100
-updateText
+update
test textDisp-25.1 {CharBboxProc procedure, check tab width} {
.t delete 1.0 end
.t insert 1.0 abc\td\tfgh
@@ -3872,7 +3865,7 @@ test textDisp-25.1 {CharBboxProc procedure, check tab width} {
.t configure -width 40 -bd 0 -relief flat -highlightthickness 0 -padx 0 -pady 0 \
-tabs {}
-updateText
+update
test textDisp-26.1 {AdjustForTab procedure, no tabs} {
.t delete 1.0 end
.t insert 1.0 a\tbcdefghij\tc\td
@@ -3999,7 +3992,7 @@ test textDisp-26.12 {AdjustForTab procedure, adjusting chunks} {
.t tag add y 1.9
button .b -text "="
.t window create 1.3 -window .b
- updateText
+ update
lindex [.t bbox 1.5] 0
} {120}
test textDisp-26.13 {AdjustForTab procedure, not enough space} {
@@ -4057,7 +4050,7 @@ test textDisp-26.14.2 {AdjustForTab procedure, not enough space} {
.t configure -width 20 -bd 2 -highlightthickness 2 -relief sunken -tabs {} \
-wrap char
-updateText
+update
test textDisp-27.1 {SizeOfTab procedure, old-style tabs} {
.t delete 1.0 end
.t insert 1.0 a\tbcdefghij\tc\td
@@ -4151,7 +4144,7 @@ test textDisp-27.7 {SizeOfTab procedure, center alignment, wrap -none (potential
# Tk_GetPixelsFromObj uses the standard 'int(0.5 + float)' rounding,
# so must we.
set tab [expr {[bo] + int(0.5 + $tab + $cm)}]
- updateText
+ update
set res [.t bbox 2.23]
set expected [list [expr {[xchar 23]-$tab}] [yline 2] $fixedWidth $fixedHeight]
lequal [lset res 0 [expr {[lindex $res 0] - $tab}]] $expected
@@ -4172,7 +4165,7 @@ test textDisp-27.7.1 {SizeOfTab procedure, center alignment, wrap -none (potenti
# Tk_GetPixelsFromObj uses the standard 'int(0.5 + float)' rounding,
# so must we.
set tab [expr {[bo] + int(0.5 + $tab + $cm)}]
- updateText
+ update
set res [.t bbox 2.23]
.t configure -tabstyle tabular
lset res 0 [expr {[lindex $res 0] - $tab}]
@@ -4186,17 +4179,17 @@ test textDisp-27.7.2 {SizeOfTab procedure, fractional tab interpolation problem}
}
.t configure -tabs $interpolatetab -wrap none -width 150
.t insert 1.0 [string repeat "a\t" 20]
- updateText
+ update
set res [.t bbox 1.20]
# Now, Tk's interpolated tabs should be the same as
# non-interpolated.
.t configure -tabs $precisetab
- updateText
+ update
expr {[lindex $res 0] - [lindex [.t bbox 1.20] 0]}
} {0}
.t configure -wrap char -tabs {} -width 20
-updateText
+update
test textDisp-27.8 {SizeOfTab procedure, right alignment} {
.t delete 1.0 end
.t insert 1.0 a\t\txyzzyabc
@@ -4245,11 +4238,11 @@ test textDisp-28.1 {"yview" option with bizarre scroll command} -setup {
.t2.t insert end "1\n2\n3\n4\n5\n6\n7\n8\n"
pack .t2.t
wm geometry .t2 +0+0
- updateText
+ update
.t2.t configure -yscrollcommand bizarre_scroll
.t2.t yview 100.0
set result [.t2.t index @0,0]
- updateText
+ update
lappend result [.t2.t index @0,0]
} -cleanup {
destroy .t2
@@ -4268,7 +4261,7 @@ test textDisp-29.1 {miscellaneous: lines wrap but are still too long} -setup {
.t2.t insert end 123
frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised
.t2.t window create 1.1 -window .t2.t.f
- updateText
+ update
set expected [list [list 0.0 [expr {20.0*$fixedWidth/300}]] \
300x50+[bo .t2.t]+[yline 2 .t2.t] \
[list [xchar 1 .t2.t] [expr {[yline 2 .t2.t]+50}] $fixedWidth $fixedHeight]]
@@ -4289,9 +4282,9 @@ test textDisp-29.2 {miscellaneous: lines wrap but are still too long} -setup {
.t2.t insert end 123
frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised
.t2.t window create 1.1 -window .t2.t.f
- updateText
+ update
.t2.t xview scroll 1 unit
- updateText
+ update
set expected [list [list [expr {1.0*$fixedWidth/300}] [expr {21.0*$fixedWidth/300}]] \
300x50+[expr {[bo .t2.t]-$fixedWidth}]+[yline 2 .t2.t] \
[list [expr {[bo .t2.t]-$fixedWidth+$fixedWidth}] [expr {[yline 2 .t2.t]+50}] $fixedWidth $fixedHeight]]
@@ -4311,9 +4304,9 @@ test textDisp-29.2.1 {miscellaneous: lines wrap but are still too long} -setup {
pack .t2.s -side bottom -fill x
.t2.t insert end 1\n
.t2.t insert end [string repeat "abc" 30]
- updateText
+ update
.t2.t xview scroll 5 unit
- updateText
+ update
.t2.t xview
} -cleanup {
destroy .t2
@@ -4331,9 +4324,9 @@ test textDisp-29.2.2 {miscellaneous: lines wrap but are still too long} -setup {
.t2.t insert end 123
frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised
.t2.t window create 1.1 -window .t2.t.f
- updateText
+ update
.t2.t xview scroll 2 unit
- updateText
+ update
set expected [list [list [expr {2.0*$fixedWidth/300}] [expr {22.0*$fixedWidth/300}]] \
300x50+[expr {[bo .t2.t]-2*$fixedWidth}]+[yline 2 .t2.t] \
{}]
@@ -4354,9 +4347,9 @@ test textDisp-29.2.3 {miscellaneous: lines wrap but are still too long} -setup {
.t2.t insert end 123
frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised
.t2.t window create 1.1 -window .t2.t.f
- updateText
+ update
.t2.t xview scroll 7 pixels
- updateText
+ update
set expected [list [list [expr {7.0/300}] [expr {(20.0*$fixedWidth+7)/300}]] \
300x50+[expr {[bo .t2.t]-7}]+[yline 2 .t2.t] \
[list [expr {[bo .t2.t]+$fixedWidth-7}] [expr {[yline 2 .t2.t]+50}] $fixedWidth $fixedHeight]]
@@ -4377,9 +4370,9 @@ test textDisp-29.2.4 {miscellaneous: lines wrap but are still too long} -setup {
.t2.t insert end 123
frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised
.t2.t window create 1.1 -window .t2.t.f
- updateText
+ update
.t2.t xview scroll 17 pixels
- updateText
+ update
set expected [list [list [expr {17.0/300}] [expr {(20.0*$fixedWidth+17)/300}]] \
300x50+[expr {[bo .t2.t]-17}]+[yline 2 .t2.t] \
{}]
@@ -4402,7 +4395,7 @@ test textDisp-29.2.5 {miscellaneous: can show last character} -setup {
grid columnconfigure .t2 0 -weight 1
grid rowconfigure .t2 0 -weight 1
grid rowconfigure .t2 1 -weight 0
- updateText
+ update
set xv [.t2.t xview]
set xd [expr {[lindex $xv 1] - [lindex $xv 0]}]
.t2.t xview moveto [expr {1.0-$xd}]
@@ -4430,9 +4423,9 @@ test textDisp-29.3 {miscellaneous: lines wrap but are still too long} -setup {
.t2.t insert end 123
frame .t2.t.f -width 300 -height 50 -bd 2 -relief raised
.t2.t window create 1.1 -window .t2.t.f
- updateText
+ update
.t2.t xview scroll 200 units
- updateText
+ update
set expected [list [list [expr {double(300-20*$fixedWidth)/300}] 1.0] \
300x50+[expr {-(300-20*$fixedWidth-[bo .t2.t])}]+[yline 2 .t2.t] \
{}]
@@ -4451,7 +4444,7 @@ test textDisp-30.1 {elided text joining multiple logical lines} -setup {
.t2.t insert 1.0 "1111\n2222\n3333"
.t2.t tag configure elided -elide 1 -background red
.t2.t tag add elided 1.2 3.2
- updateText
+ update
.t2.t count -update -displaylines 1.0 end
} -cleanup {
destroy .t2
@@ -4466,7 +4459,7 @@ test textDisp-30.2 {elided text joining multiple logical lines} -setup {
.t2.t insert 1.0 "1111\n2222\n3333"
.t2.t tag configure elided -elide 1 -background red
.t2.t tag add elided 1.2 2.2
- updateText
+ update
.t2.t count -update -displaylines 1.0 end
} -cleanup {
destroy .t2
@@ -4474,7 +4467,7 @@ test textDisp-30.2 {elided text joining multiple logical lines} -setup {
catch {destroy .t2}
.t configure -height 1
-updateText
+update
test textDisp-31.1 {line embedded window height update} {
set res {}
@@ -4492,7 +4485,7 @@ test textDisp-31.1 {line embedded window height update} {
test textDisp-31.2 {line update index shifting} {
set res {}
.t.f configure -height 100
- updateText
+ update
lappend res [.t count -update -ypixels 1.0 end]
.t.f configure -height 10
.t insert 1.0 "abc\n"
@@ -4516,7 +4509,7 @@ test textDisp-31.3 {line update index shifting} {
# have been performed.
set res {}
.t.f configure -height 100
- updateText
+ update
lappend res [.t count -update -ypixels 1.0 end]
.t.f configure -height 10
.t insert 1.0 "abc\n"
@@ -4540,7 +4533,7 @@ test textDisp-31.4 {line embedded image height update} {
image create photo textest -height 100 -width 10
.t delete 3.0
.t image create 3.0 -image textest
- updateText
+ update
lappend res [.t count -update -ypixels 1.0 end]
textest configure -height 10
lappend res [.t count -ypixels 1.0 end]
@@ -4552,7 +4545,7 @@ test textDisp-31.4 {line embedded image height update} {
test textDisp-31.5 {line update index shifting} {
set res {}
textest configure -height 100
- updateText
+ update
lappend res [.t count -update -ypixels 1.0 end]
textest configure -height 10
.t insert 1.0 "abc\n"
@@ -4627,19 +4620,19 @@ test textDisp-32.0 {everything elided} {
.tt insert 0.0 HELLO
.tt tag configure HIDE -elide 1
.tt tag add HIDE 0.0 end
- updateText
+ update
destroy .tt
} {}
test textDisp-32.1 {everything elided} {
# Must not crash
pack [text .tt]
- updateText
+ update
.tt insert 0.0 HELLO
- updateText
+ update
.tt tag configure HIDE -elide 1
- updateText
+ update
.tt tag add HIDE 0.0 end
- updateText
+ update
destroy .tt
} {}
test textDisp-32.2 {elide and tags} {
@@ -4650,11 +4643,11 @@ test textDisp-32.2 {elide and tags} {
{testtag1 testtag3} \
{[this bit here uses tags 2 and 3]} \
{testtag2 testtag3}
- updateText
+ update
# indent left margin of tag 1 by 20 pixels
# text should be indented
.tt tag configure testtag1 -lmargin1 20
- updateText
+ update
#1
set res {}
lappend res [list [.tt index "1.0 + 0 displaychars"] \
@@ -4663,7 +4656,7 @@ test textDisp-32.2 {elide and tags} {
# hide tag 1, remaining text should not be indented, since
# the indented tag and character is hidden.
.tt tag configure testtag1 -elide 1
- updateText
+ update
#2
lappend res [list [.tt index "1.0 + 0 displaychars"] \
[lindex [.tt bbox 1.0] 0] \
@@ -4674,7 +4667,7 @@ test textDisp-32.2 {elide and tags} {
# indent left margin of tag 2 by 20 pixels
# text should not be indented, since tag1 has lmargin1 of 0.
.tt tag configure testtag2 -lmargin1 20
- updateText
+ update
#3
lappend res [list [.tt index "1.0 + 0 displaychars"] \
[lindex [.tt bbox 1.0] 0] \
@@ -4683,7 +4676,7 @@ test textDisp-32.2 {elide and tags} {
# the bbox of 1.0 should have zero width and zero indent,
# since it is elided at that position.
.tt tag configure testtag1 -elide 1
- updateText
+ update
#4
lappend res [list [.tt index "1.0 + 0 displaychars"] \
[lindex [.tt bbox 1.0] 0] \
@@ -4696,7 +4689,7 @@ test textDisp-32.2 {elide and tags} {
# precedence over testtag1, and is applied to the
# start of the text.
.tt tag configure testtag3 -lmargin1 20
- updateText
+ update
#5
lappend res [list [.tt index "1.0 + 0 displaychars"] \
[lindex [.tt bbox 1.0] 0] \
@@ -4705,7 +4698,7 @@ test textDisp-32.2 {elide and tags} {
# since it still has testtag3 on it. Again the
# bbox of 1.0 should have 0.
.tt tag configure testtag1 -elide 1
- updateText
+ update
#6
lappend res [list [.tt index "1.0 + 0 displaychars"] \
[lindex [.tt bbox 1.0] 0] \
@@ -4743,7 +4736,7 @@ test textDisp-32.3 "NULL undisplayProc problems: #1791052" -setup {
.tt insert end ":)" emoticon
.tt image create end -image $img
pack .tt
- updateText
+ update
} -cleanup {
image delete $img
destroy .tt
@@ -4765,20 +4758,20 @@ test textDisp-32.4 {Button-1 click with elided lines - Bug 18371b7ce7} -setup {
test textDisp-33.0 {one line longer than fits in the widget} {
pack [text .tt -wrap char]
- updateText
+ update
.tt insert 1.0 [string repeat "more wrap + " 300]
- updateText
+ update
.tt see 1.0
lindex [.tt yview] 0
} {0.0}
test textDisp-33.1 {one line longer than fits in the widget} {
destroy .tt
pack [text .tt -wrap char]
- updateText
+ update
.tt insert 1.0 [string repeat "more wrap + " 300]
- updateText
+ update
.tt yview "1.0 +1 displaylines"
- updateText
+ update
if {[lindex [.tt yview] 0] > 0.1} {
set result "window should be scrolled to the top"
} else {
@@ -4789,7 +4782,7 @@ test textDisp-33.2 {one line longer than fits in the widget} {
destroy .tt
pack [text .tt -wrap char]
.tt debug 1
- updateText
+ update
set tk_textHeightCalc ""
set timer [after 200 lappend tk_textHeightCalc "Timed out"]
.tt insert 1.0 [string repeat "more wrap + " 1]
@@ -4802,7 +4795,7 @@ test textDisp-33.3 {one line longer than fits in the widget} {
pack [text .tt -wrap char]
set tk_textHeightCalc ""
.tt insert 1.0 [string repeat "more wrap + " 300]
- updateText
+ update
.tt sync
# Each line should have been recalculated just once
expr {[llength $tk_textHeightCalc] == [.tt count -displaylines 1.0 end]}
@@ -4811,7 +4804,7 @@ test textDisp-33.4 {one line longer than fits in the widget} {
destroy .tt
pack [text .tt -wrap char]
.tt insert 1.0 [string repeat "more wrap + " 300]
- updateText
+ update
set idx [.tt index "1.0 + 1 displaylines"]
.tt yview $idx
if {[lindex [.tt yview] 0] > 0.1} {
@@ -4832,7 +4825,7 @@ test textDisp-33.5 {bold or italic fonts} win {
.tt tag configure bi -font bi
.tt tag configure no -font no
.tt insert end abcd no efgh bi ijkl\n no
- updateText
+ update
set bb {}
for {set i 0} {$i < 12} {incr i 4} {
lappend bb [lindex [.tt bbox 1.$i] 0]
@@ -4858,7 +4851,7 @@ test textDisp-34.1 {Line heights recalculation problem: bug 2677890} -setup {
.t1 insert end $txt
set ge [winfo geometry .]
scan $ge "%dx%d+%d+%d" width height left top
- updateText
+ update
.t1 sync
set negative 0
bind .t1 <<WidgetViewSync>> { if {%d < 0} {set negative 1} }
@@ -4868,7 +4861,7 @@ test textDisp-34.1 {Line heights recalculation problem: bug 2677890} -setup {
# Thus we use this way to check for regression regarding bug 2677890,
# i.e. to check that the fix for this bug really is still in.
wm geometry . "[expr {$width * 2}]x$height+$left+$top"
- updateText
+ update
.t1 sync
set negative
} -cleanup {
@@ -4906,7 +4899,7 @@ test textDisp-36.1 {Display bug with 'yview insert'} -constraints {knownBug} -se
} -body {
.t1 tag add elide 1.3 2.0
.t1 yview insert
- updateText
+ update
# wish now panics: "CalculateDisplayLineHeight called with bad indexPtr"
.t1 yview scroll -1 pixels
} -cleanup {
diff --git a/tests/textImage.test b/tests/textImage.test
index 2666ec5..5ceecf1 100644
--- a/tests/textImage.test
+++ b/tests/textImage.test
@@ -386,18 +386,19 @@ test textImage-4.2 {alignment checking - baseline} -setup {
.t image create end -image large
.t image create end -image small -align baseline
.t insert end test
+ update
# Sizes larger than 25 can be too big and lead to a negative 'norm',
# at least on Windows XP with certain settings.
foreach size {10 15 20 25} {
- font configure test_font2 -size $size
- array set Metrics [font metrics test_font2]
- update
- foreach {x y w h} [.t bbox small] {}
- set norm [expr {
- (([image height large] - $Metrics(-linespace))/2
- + $Metrics(-ascent) - [image height small] - $y)
+ font configure test_font2 -size $size
+ array set Metrics [font metrics test_font2]
+ update ; .t sync
+ foreach {x y w h} [.t bbox small] {}
+ set norm [expr {
+ (([image height large] - $Metrics(-linespace))/2
+ + $Metrics(-ascent) - [image height small] - $y)
}]
- lappend result "$size $norm"
+ lappend result "$size $norm"
}
return $result
} -cleanup {
diff --git a/tests/textIndex.test b/tests/textIndex.test
index 04ac70a..a191e27 100644
--- a/tests/textIndex.test
+++ b/tests/textIndex.test
@@ -754,7 +754,7 @@ set str [string repeat "hello " 20]
.t insert end "$str one two three four five six seven height nine ten\n"
.t insert end "$str one two three four five six seven height nine ten\n"
.t insert end "$str one two three four five six seven height nine ten\n"
-updateText
+update
test textIndex-19.1 {Display lines} {
.t index "2.7 displaylinestart"
diff --git a/tests/textWind.test b/tests/textWind.test
index a86b098..260ba66 100644
--- a/tests/textWind.test
+++ b/tests/textWind.test
@@ -11,14 +11,6 @@ namespace import ::tcltest::*
tcltest::configure {*}$argv
tcltest::loadTestedCommands
-# Procedure for updating the text widget. This is isolated here
-# to allow for variations between platforms, but is currently the
-# same for all platforms (see ticket [bfea11a916]).
-
-proc updateText {} {
- update
-}
-
deleteWindows
set fixedFont {"Courier" -12}
@@ -32,7 +24,7 @@ set tHeight 6
text .t -width $tWidth -height $tHeight -bd 2 -highlightthickness 2 \
-font $fixedFont
pack .t -expand 1 -fill both
-updateText
+update
.t debug on
set color [expr {[winfo depth .t] > 1 ? "green" : "black"}]
@@ -68,7 +60,7 @@ test textWind-1.1 {basic tests of options} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 3 -height 3 -bg $color
.t window create 2.2 -window .f
- updateText
+ update
list [winfo ismapped .f] [winfo geom .f] [.t bbox .f] \
[.t window configure .f -window]
} -result [list \
@@ -84,7 +76,7 @@ test textWind-1.2 {basic tests of options} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 3 -height 3 -bg $color
.t window create 2.2 -window .f -align top
- updateText
+ update
list [winfo ismapped .f] [winfo geom .f] [.t bbox .f] \
[.t window configure .f -align]
} -result [list \
@@ -110,7 +102,7 @@ test textWind-1.4 {basic tests of options} -setup {
# the window .f should be wider than the fixed width
frame .f -width 10 -height 20 -bg $color
.t window create 2.2 -window .f -padx 5
- updateText
+ update
list [winfo geom .f] [.t window configure .f -padx] [.t bbox 2.3]
} -result [list \
10x20+[expr {$padx+2*$fixedWidth+5}]+[expr {$pady+$fixedHeight}] \
@@ -124,7 +116,7 @@ test textWind-1.5 {basic tests of options} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 10 -height 20 -bg $color
.t window create 2.2 -window .f -pady 4
- updateText
+ update
list [winfo geom .f] [.t window configure .f -pady] [.t bbox 2.31]
} -result [list \
10x20+[expr {$padx+2*$fixedWidth}]+[expr {$pady+$fixedHeight+4}] \
@@ -138,7 +130,7 @@ test textWind-1.6 {basic tests of options} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 5 -height 5 -bg $color
.t window create 2.2 -window .f -stretch 1
- updateText
+ update
list [winfo geom .f] [.t window configure .f -stretch]
} -result [list \
5x$fixedHeight+[expr {$padx+2*$fixedWidth}]+[expr {$pady+$fixedHeight}] \
@@ -201,7 +193,7 @@ test textWind-2.11 {TkTextWindowCmd procedure} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 10 -height 6 -bg $color
.t window create 2.2 -window .f -align baseline -padx 1 -pady 2 -create foo
- updateText
+ update
.t window configure .f
} -cleanup {
destroy .f
@@ -217,7 +209,7 @@ test textWind-2.12 {TkTextWindowCmd procedure} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 10 -height 6 -bg $color
.t window create 2.2 -window .f -align baseline -padx 1 -pady 2 -create foo
- updateText
+ update
list [.t window configure .f -padx 33] [.t window configure .f -padx]
} -cleanup {
destroy .f
@@ -233,7 +225,7 @@ test textWind-2.13 {TkTextWindowCmd procedure} -setup {
.t insert end "\nAnd this is a second line, which wraps around"
frame .f -width 10 -height 6 -bg $color
.t window create 2.2 -window .f -align baseline -padx 1 -pady 2
- updateText
+ update
list [.t window configure .f -padx 14 -pady 15] \
[.t window configure .f -padx] [.t window configure .f -pady]
} -cleanup {
@@ -348,9 +340,9 @@ test textWind-3.2 {EmbWinConfigure procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 10 -height 20 -bg $color
.t window create 1.3 -window .f
- updateWidgets
+ update
.t window configure 1.3 -window {}
- updateWidgets
+ update
.t index .f
} -cleanup {
destroy .f
@@ -362,10 +354,10 @@ test textWind-3.3 {EmbWinConfigure procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 10 -height 20 -bg $color
.t window create 1.3 -window .f
- updateWidgets
+ update
set res [winfo ismapped .f]
.t window configure 1.3 -window {}
- updateWidgets
+ update
lappend res [winfo ismapped .f] [.t bbox 1.4]
} -cleanup {
destroy .f
@@ -378,9 +370,9 @@ test textWind-3.4 {EmbWinConfigure procedure} -setup {
.t insert 1.0 "Some sample text"
frame .t.f -width 10 -height 20 -bg $color
.t window create 1.3 -window .t.f
- updateWidgets
+ update
.t window configure 1.3 -window {}
- updateWidgets
+ update
.t index .t.f
} -cleanup {
destroy .t.f
@@ -392,10 +384,10 @@ test textWind-3.5 {EmbWinConfigure procedure} -setup {
.t insert 1.0 "Some sample text"
frame .t.f -width 10 -height 20 -bg $color
.t window create 1.3 -window .t.f
- updateWidgets
+ update
set res [winfo ismapped .t.f]
.t window configure 1.3 -window {}
- updateWidgets
+ update
lappend res [winfo ismapped .t.f] [.t bbox 1.4]
} -cleanup {
destroy .t.f
@@ -408,9 +400,9 @@ test textWind-3.6 {EmbWinConfigure procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 10 -height 20 -bg $color
.t window create 1.3
- updateWidgets
+ update
.t window configure 1.3 -window .f
- waitForMap .f
+ update
list [catch {.t index .f} msg] $msg [winfo ismapped .f] [.t bbox 1.4]
} -cleanup {
destroy .f
@@ -428,6 +420,7 @@ test textWind-3.7 {EmbWinConfigure procedure} -setup {
} -cleanup {
destroy .f
} -returnCodes error -result {can't embed .f.f in .t}
+
test textWind-3.8 {EmbWinConfigure procedure} -setup {
destroy .t2
} -body {
@@ -438,6 +431,7 @@ test textWind-3.8 {EmbWinConfigure procedure} -setup {
} -cleanup {
destroy .t2
} -returnCodes error -result {can't embed .t2 in .t}
+
test textWind-3.9 {EmbWinConfigure procedure} -setup {
destroy .t2
} -body {
@@ -449,6 +443,7 @@ test textWind-3.9 {EmbWinConfigure procedure} -setup {
} -cleanup {
destroy .t2
} -result {-window {} {} {} {}}
+
test textWind-3.10 {EmbWinConfigure procedure} -setup {
.t delete 1.0 end
} -body {
@@ -456,6 +451,7 @@ test textWind-3.10 {EmbWinConfigure procedure} -setup {
.t window create 1.3
.t window configure 1.3 -window .t
} -returnCodes error -result {can't embed .t in .t}
+
test textWind-3.11 {EmbWinConfigure procedure} -setup {
.t delete 1.0 end
} -body {
@@ -465,7 +461,7 @@ test textWind-3.11 {EmbWinConfigure procedure} -setup {
button .t.b -text "Hello!"
.t window create 1.4 -window .t.b
.t window create 1.6 -window .t.b
- updateText
+ update
.t index .t.b
} -result {1.6}
@@ -506,7 +502,7 @@ test textWind-5.1 {EmbWinStructureProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 10 -height 20 -bg $color
.t window create 1.2 -window .f
- updateText
+ update
destroy .f
.t index .f
} -returnCodes error -result {bad text index ".f"}
@@ -518,7 +514,7 @@ test textWind-5.2 {EmbWinStructureProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 10 -height 20 -bg $color
.t window create 1.2 -window .f
- updateText
+ update
destroy .f
catch {.t index .f}
list [.t bbox 1.2] [.t bbox 1.3]
@@ -534,7 +530,7 @@ test textWind-5.3 {EmbWinStructureProc procedure} -setup {
frame .f -width 10 -height 20 -bg $color
.t window create 1.2 -align bottom
.t window configure 1.2 -window .f
- updateText
+ update
destroy .f
.t index .f
} -returnCodes error -result {bad text index ".f"}
@@ -546,7 +542,7 @@ test textWind-5.4 {EmbWinStructureProc procedure} -setup {
frame .f -width 10 -height 20 -bg $color
.t window create 1.2 -align bottom
.t window configure 1.2 -window .f
- updateText
+ update
destroy .f
catch {.t index .f}
list [.t bbox 1.2] [.t bbox 1.3]
@@ -560,10 +556,10 @@ test textWind-5.5 {EmbWinStructureProc procedure} -setup {
} -body {
.t insert 1.0 "Some sample text"
.t window create 1.2 -create {frame .f -width 10 -height 20 -bg $color}
- updateText
+ update
.t window configure 1.2 -create {frame .f -width 20 -height 10 -bg $color}
destroy .f
- updateText
+ update
list [catch {.t index .f} msg] $msg [.t bbox 1.2] [.t bbox 1.3]
} -result [list 0 1.2 \
[list [expr {$padx+2*$fixedWidth}] [expr {$pady+(($fixedHeight-10)/2)}] 20 10] \
@@ -597,9 +593,9 @@ test textWind-7.1 {EmbWinLostContentProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 10 -height 20 -bg $color
.t window create 1.2 -window .f
- updateText
+ update
place .f -in .t -x 100 -y 50
- updateText
+ update
list [winfo geom .f] [.t bbox 1.2]
} -cleanup {
destroy .f
@@ -614,9 +610,9 @@ test textWind-7.2 {EmbWinLostContentProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .t.f -width 10 -height 20 -bg $color
.t window create 1.2 -window .t.f
- updateText
+ update
place .t.f -x 100 -y 50
- updateText
+ update
list [winfo geom .t.f] [.t bbox 1.2]
} -cleanup {
destroy .t.f
@@ -676,7 +672,7 @@ test textWind-10.1 {EmbWinLayoutProc procedure} -setup {
.t window create 1.5 -create {
frame .f -width 10 -height 20 -bg $color
}
- updateText
+ update
list [winfo exists .f] [winfo width .f] [winfo height .f] [.t index .f]
} -cleanup {
destroy .f
@@ -694,7 +690,7 @@ test textWind-10.2 {EmbWinLayoutProc procedure, error in creating window} -setup
error "couldn't create window"
}
set msg xyzzy
- updateText
+ update
list $msg [.t bbox 1.5]
} -cleanup {
rename bgerror {}
@@ -714,7 +710,7 @@ test textWind-10.3 {EmbWinLayoutProc procedure, error in creating window} -setup
concat gorp
}
set msg xyzzy
- updateText
+ update
list $msg [.t bbox 1.5]
} -cleanup {
rename bgerror {}
@@ -740,7 +736,7 @@ test textWind-10.4 {EmbWinLayoutProc procedure, error in creating window} -setup
}
set count 0
while {([llength $msg] < 2) && ($count < 100)} {
- updateText
+ update
incr count
.t bbox 1.5
after 10
@@ -770,7 +766,7 @@ test textWind-10.5 {EmbWinLayoutProc procedure, error in creating window} -setup
frame .t.f
frame .t.f.f -width 10 -height 20 -bg $color
}
- updateText
+ update
lappend msg [winfo exists .t.f.f]
} -cleanup {
destroy .t.f
@@ -787,12 +783,12 @@ test textWind-10.6 {EmbWinLayoutProc procedure, error in creating window} -setup
}
} -body {
.t insert 1.0 "Some sample text"
- updateText
+ update
.t window create 1.5 -create {
concat .t
}
set msg {}
- updateText
+ update
lappend msg [.t bbox 1.5]
} -cleanup {
rename bgerror {}
@@ -838,9 +834,9 @@ test textWind-10.8 {EmbWinLayoutProc procedure, error in creating window} -setup
concat .t2
}
set msg {}
- updateText
+ update
set i 0
- while {[llength $msg] == 1 && [incr i] < 200} { updateText }
+ while {[llength $msg] == 1 && [incr i] < 200} { update }
return $msg
} -cleanup {
destroy .t2
@@ -854,9 +850,9 @@ test textWind-10.9 {EmbWinLayoutProc procedure, steal window from self} -setup {
.t insert 1.0 ABCDEFGHIJKLMNOP
button .t.b -text "Hello!"
.t window create 1.5 -window .t.b
- updateText
+ update
.t window create 1.3 -create {concat .t.b}
- updateText
+ update
.t index .t.b
} -cleanup {
destroy .t.b
@@ -885,7 +881,7 @@ test textWind-10.11 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
.t insert 1.0 "Some sample text"
frame .f -width [expr {($tWidth-12)*$fixedWidth}] -height 20 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
- updateText
+ update
list [.t bbox .f] [.t bbox 1.13]
} -cleanup {
destroy .f
@@ -901,7 +897,7 @@ test textWind-10.12 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
.t insert 1.0 "Some sample text"
frame .f -width [expr {($tWidth-12)*$fixedWidth+1}] -height 20 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
- updateText
+ update
list [.t bbox .f] [.t bbox 1.13]
} -cleanup {
destroy .f
@@ -917,7 +913,7 @@ test textWind-10.13 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
.t insert 1.0 "Some sample text"
frame .f -width [expr {($tWidth-12)*$fixedWidth+5}] -height 20 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
- updateText
+ update
list [.t bbox .f] [.t bbox 1.13]
} -cleanup {
destroy .f
@@ -933,7 +929,7 @@ test textWind-10.14 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
.t insert 1.0 "Some sample text"
frame .f -width [expr {($tWidth-12)*$fixedWidth+5}] -height 220 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
- updateText
+ update
list [.t bbox .f] [.t bbox 1.13]
} -cleanup {
destroy .f
@@ -949,7 +945,7 @@ test textWind-10.15 {EmbWinLayoutProc procedure, doesn't fit on line} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 250 -height 220 -bg $color -bd 2 -relief raised
.t window create 1.12 -window .f
- updateText
+ update
list [.t bbox .f] [.t bbox 1.13]
} -cleanup {
destroy .f
@@ -962,12 +958,13 @@ test textWind-11.1 {EmbWinDisplayProc procedure, geometry transforms} -setup {
destroy .f
place forget .t
pack .t
-# Make sure the Text is mapped before we start
+ # Make sure the Text is mapped before we start
update
} -body {
.t insert 1.0 "Some sample text"
pack forget .t
place .t -x 30 -y 50
+ update
frame .f -width 30 -height 20 -bg $color
.t window create 1.12 -window .f
update
@@ -982,12 +979,13 @@ test textWind-11.2 {EmbWinDisplayProc procedure, geometry transforms} -setup {
destroy .t.f
place forget .t
pack .t
-# Make sure the Text is mapped before we start
+ # Make sure the Text is mapped before we start
update
} -body {
.t insert 1.0 "Some sample text"
pack forget .t
place .t -x 30 -y 50
+ update
frame .t.f -width 30 -height 20 -bg $color
.t window create 1.12 -window .t.f
update
@@ -1003,7 +1001,7 @@ test textWind-11.3 {EmbWinDisplayProc procedure, configuration optimization} -se
destroy .f
place forget .t
pack .t
-# Make sure the Text is mapped before we start
+ # Make sure the Text is mapped before we start
update
} -body {
.t insert 1.0 "Some sample text"
@@ -1036,7 +1034,7 @@ test textWind-11.4 {EmbWinDisplayProc procedure, horizontal scrolling} -setup {
.t insert end " with junk after it."
.t xview moveto 0
.t xview scroll 5 units
- updateText
+ update
list [winfo ismapped .f] [winfo geom .f] [.t bbox .f] [winfo ismapped .f2]
} -cleanup {
destroy .f .f2
@@ -1057,10 +1055,10 @@ test textWind-11.5 {EmbWinDisplayProc procedure, horizontal scrolling} -setup {
frame .f2 -width 40 -height 10 -bg $color
.t window create end -window .f2
.t insert end " with junk after it."
- updateText
+ update
.t xview moveto 0
.t xview scroll 25 units
- updateText
+ update
list [winfo ismapped .f] [winfo ismapped .f2] [winfo geom .f2] [.t bbox .f2]
} -cleanup {
destroy .f .f2
@@ -1079,19 +1077,20 @@ test textWind-12.1 {EmbWinUndisplayProc procedure, mapping/unmapping} -setup {
bind .f <Map> {lappend x mapped}
bind .f <Unmap> {lappend x unmapped}
set x created
- updateText
+ update
lappend x modified
.t delete 1.0
- updateText
+ update
lappend x replaced
.t window configure .f -window {}
.t delete 1.1
+ update
.t window create 1.4 -window .f
- updateText
+ update
lappend x off-screen
.t configure -wrap none
.t insert 1.0 "Enough text to make the line run off-screen"
- updateText
+ update
return $x
} -cleanup {
destroy .f
@@ -1105,7 +1104,7 @@ test textWind-13.1 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align top -padx 2 -pady 1
- updateText
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1120,7 +1119,7 @@ test textWind-13.2 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align center -padx 2 -pady 1
- updateText
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1135,7 +1134,7 @@ test textWind-13.3 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align baseline -padx 2 -pady 1
- updateText
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1150,7 +1149,7 @@ test textWind-13.4 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align bottom -padx 2 -pady 1
- updateText
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1165,7 +1164,7 @@ test textWind-13.5 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align top -padx 2 -pady 1 -stretch 1
- updateText
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1180,7 +1179,7 @@ test textWind-13.6 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align center -padx 2 -pady 1 -stretch 1
- updateText
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1195,7 +1194,7 @@ test textWind-13.7 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align baseline -padx 2 -pady 1 -stretch 1
- updateText
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1210,7 +1209,7 @@ test textWind-13.8 {EmbWinBboxProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align bottom -padx 2 -pady 1 -stretch 1
- updateText
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f
@@ -1227,7 +1226,7 @@ test textWind-13.9 {EmbWinBboxProc procedure, spacing options} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 5 -height 5 -bg $color
.t window create 1.2 -window .f -align center -padx 2 -pady 1
- updateText
+ update
list [winfo geom .f] [.t bbox .f]
} -cleanup {
.t configure -spacing1 0 -spacing3 0
@@ -1244,14 +1243,14 @@ test textWind-14.1 {EmbWinDelayedUnmap procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 30 -height 20 -bg $color
.t window create 1.2 -window .f
- updateText
+ update
bind .f <Unmap> {lappend x unmapped}
set x modified
.t insert 1.0 x
lappend x removed
.t window configure .f -window {}
lappend x updated
- updateText
+ update
return $x
} -cleanup {
destroy .f
@@ -1264,14 +1263,14 @@ test textWind-14.2 {EmbWinDelayedUnmap procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 30 -height 20 -bg $color
.t window create 1.2 -window .f
- updateText
+ update
bind .f <Unmap> {lappend x unmapped}
set x modified
.t insert 1.0 x
lappend x deleted
.t delete .f
lappend x updated
- updateText
+ update
return $x
} -cleanup {
destroy .f
@@ -1284,10 +1283,10 @@ test textWind-14.3 {EmbWinDelayedUnmap procedure} -setup {
.t insert 1.0 "Some sample text\nAnother line\n3\n4\n5\n6\n7\n8\n9"
frame .f -width 30 -height 20 -bg $color
.t window create 1.2 -window .f
- updateText
+ update
.t yview 2.0
set result [winfo ismapped .f]
- updateText ; after 10
+ update ; after 10
list $result [winfo ismapped .f]
} -cleanup {
destroy .f
@@ -1300,10 +1299,10 @@ test textWind-14.4 {EmbWinDelayedUnmap procedure} -setup {
.t insert 1.0 "Some sample text\nAnother line\n3\n4\n5\n6\n7\n8\n9"
frame .t.f -width 30 -height 20 -bg $color
.t window create 1.2 -window .t.f
- updateText
+ update
.t yview 2.0
set result [winfo ismapped .t.f]
- updateText
+ update
list $result [winfo ismapped .t.f]
} -cleanup {
destroy .t.f
@@ -1341,9 +1340,9 @@ test textWind-16.1 {EmbWinTextStructureProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 30 -height 20 -bg $color
.t window create 1.6 -window .f
- updateText
+ update
pack forget .t
- updateText
+ update
winfo ismapped .f
} -cleanup {
pack .t
@@ -1358,12 +1357,12 @@ test textWind-16.2 {EmbWinTextStructureProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .f -width 30 -height 20 -bg $color
.t window create 1.6 -window .f
- updateText
+ update
set result {}
lappend result [winfo geom .f] [.t bbox .f]
frame .f2 -width 150 -height 30 -bd 2 -relief raised
pack .f2 -before .t
- updateText
+ update
lappend result [winfo geom .f] [.t bbox .f]
} -cleanup {
destroy .f .f2
@@ -1379,9 +1378,9 @@ test textWind-16.3 {EmbWinTextStructureProc procedure} -setup {
.t configure -wrap none
.t insert 1.0 "Some sample text"
.t window create 1.6
- updateText
+ update
pack forget .t
- updateText
+ update
} -cleanup {
pack .t
} -result {}
@@ -1394,9 +1393,9 @@ test textWind-16.4 {EmbWinTextStructureProc procedure} -setup {
.t insert 1.0 "Some sample text"
frame .t.f -width 30 -height 20 -bg $color
.t window create 1.6 -window .t.f
- updateText
+ update
pack forget .t
- updateText
+ update
list [winfo ismapped .t.f] [.t bbox .t.f]
} -cleanup {
pack .t
@@ -1412,7 +1411,7 @@ test textWind-17.1 {peer widgets and embedded windows} -setup {
.t window create 1.3 -window .f
toplevel .tt
pack [.t peer create .tt.t]
- updateText
+ update
destroy .t .tt
winfo exists .f
} -result {0}
@@ -1426,10 +1425,10 @@ test textWind-17.2 {peer widgets and embedded windows} -setup {
.t window create 1.4 -window .f
toplevel .tt
pack [.t peer create .tt.t]
- updateText
+ update
destroy .t
.tt.t insert 1.0 "foo"
- updateText
+ update
destroy .tt
} -result {}
@@ -1441,9 +1440,9 @@ test textWind-17.3 {peer widget and -create} -setup {
.t insert 1.0 "Some sample text"
toplevel .tt
pack [.t peer create .tt.t]
- updateText
+ update
.t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue}
- updateText
+ update
destroy .t .tt
} -result {}
@@ -1457,10 +1456,10 @@ test textWind-17.4 {peer widget deleted one window shouldn't delete others} -set
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue}
- updateText
+ update
destroy .tt
lappend res [.t get 1.2]
- updateText
+ update
lappend res [.t get 1.2]
} -cleanup {
destroy .t
@@ -1475,7 +1474,7 @@ test textWind-17.5 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue}
- updateText
+ update
list [.t window cget 1.2 -window] [.tt.t window cget 1.2 -window]
} -cleanup {
destroy .tt .t
@@ -1490,7 +1489,7 @@ test textWind-17.6 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue}
- updateText
+ update
list [.t window configure 1.2 -window] \
[.tt.t window configure 1.2 -window]
} -cleanup {
@@ -1506,7 +1505,7 @@ test textWind-17.7 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
- updateText
+ update
list [.t window cget 1.2 -window] [.tt.t window cget 1.2 -window]
} -cleanup {
destroy .tt .t
@@ -1521,7 +1520,7 @@ test textWind-17.8 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
- updateText
+ update
list [.t window configure 1.2 -window] \
[.tt.t window configure 1.2 -window]
} -cleanup {
@@ -1537,7 +1536,7 @@ test textWind-17.9 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
- updateText
+ update
.tt.t window configure 1.2 -window [frame .tt.t.f -width 10 -height 20 -bg red]
list [.t window configure 1.2 -window] [.tt.t window configure 1.2 -window]
} -cleanup {
@@ -1553,9 +1552,9 @@ test textWind-17.10 {peer widget window configuration} -setup {
.t insert 1.0 "Some sample text"
toplevel .tt
pack [.t peer create .tt.t]
- updateText
+ update
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
- updateText
+ update
# There is a blue window in the main widget .t but not in the peer .tt.t
lappend res [.t window cget 1.2 -window]
lappend res [.tt.t window cget 1.2 -window]
@@ -1563,7 +1562,7 @@ test textWind-17.10 {peer widget window configuration} -setup {
# inserted in .t at index 1.2 will now be found in .t at index 1.3
# The underlying linked segments are common in a text widget and its peers.
.tt.t window create 1.2 -window [frame .tt.t.f -width 25 -height 20 -bg green]
- updateText
+ update
lappend res [.t window cget 1.2 -window]
lappend res [.t window cget 1.3 -window]
# In the peer, the green window still is at 1.2, and there is no window at 1.3
@@ -1574,7 +1573,7 @@ test textWind-17.10 {peer widget window configuration} -setup {
# the embedded window found at index 1.2 in .t is the one originally at 1.2 in .t, i.e.
# the blue one
.t window configure 1.2 -create {destroy %W.f ; update ; frame %W.f -width 50 -height 7 -bg red}
- updateText
+ update
# The main widget .t still has a window named .t.f at 1.2. This is NOT the blue
# frame but the red frame from the -create script, which bears the same name.
lappend res [.t window cget 1.2 -window]
@@ -1583,7 +1582,7 @@ test textWind-17.10 {peer widget window configuration} -setup {
# When removing the -window option the create script plays, therefore .t still has
# the red frame .t.f at 1.2
.t window configure 1.2 -window {}
- updateText
+ update
lappend res [.t window cget 1.2 -window]
# The -create script associated to index 1.2 applies to all peers (that's the reason
# why the manual states that "If multiple peer widgets are in use, it is usually simpler
@@ -1591,7 +1590,7 @@ test textWind-17.10 {peer widget window configuration} -setup {
# when removing the -window option in the peer, the -create script is run, which replaces
# the green frame by the red one named as per the -create script, i.e. .tt.t.f
.tt.t window configure 1.2 -window {}
- updateText
+ update
lappend res [.tt.t window cget 1.2 -window]
} -cleanup {
destroy .tt .t
@@ -1605,12 +1604,12 @@ test textWind-18.1 {embedded window deletion triggered by a script bound to <Map
.t window create end -window [frame .f -background red -width 80 -height 80]
.t window create end -window [frame .f2 -background blue -width 80 -height 80]
bind .f <Map> {.t delete .f}
- updateText
+ update
# this shall not crash (bug 1501749)
after 100 {.t yview end}
tkwait visibility .f2
after 200
- updateText
+ update
} -cleanup {
destroy .t .f .f2
} -result {}
@@ -1622,7 +1621,7 @@ test textWind-18.2 {text widget deletion triggered by a script bound to embedded
for {set i 1} {$i < 100} {incr i} {.t insert end "Line $i\n"}
.t window create end -window [frame .f -background red -width 80 -height 80]
bind .f <Map> {destroy .t}
- updateText
+ update
# this shall not crash (bug 1501749)
after 100 {.t yview end}
tkwait window .t
@@ -1640,7 +1639,7 @@ test textWind-18.3 {embedded window destruction in cascade} -setup {
bind .t.b1 <Destroy> {destroy .t.b2 ; set x 1}
button .t.b2
.t window create 2.0 -window .t.b2
- updateText
+ update
# this shall not crash (bug 54fe7a5e71)
after 100 {.t delete 1.0 end}
tkwait variable x
diff --git a/tests/ttk/notebook.test b/tests/ttk/notebook.test
index e58812a..2b9870e 100644
--- a/tests/ttk/notebook.test
+++ b/tests/ttk/notebook.test
@@ -96,11 +96,11 @@ test notebook-5.1 "Virtual events" -body {
bind .t <<NotebookTabChanged>> { lappend events changed %W }
pack [set nb [ttk::notebook .t.nb]] -expand true -fill both; update
- $nb add [frame $nb.f1]
+ $nb add [frame $nb.f1] ; # triggers <<NotebookTabChanged>> (first tab gets autoselected)
$nb add [frame $nb.f2]
$nb add [frame $nb.f3]
-
- $nb select $nb.f1
+ update
+ $nb select $nb.f1 ; # does not trigger <<NotebookTabChanged>> (tab to select is already selected)
update; set events
} -result [list changed .t.nb]
@@ -156,8 +156,9 @@ test notebook-6.1 "Hide selected tab" -setup {
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]
- update idletasks; lappend result [winfo ismapped $nb.f3]
+ lappend result [winfo ismapped $nb.f3]
} -result [list 1 1 2 0 1]
# See 1370833
@@ -187,6 +188,7 @@ test notebook-6.3 "Hide first tab when it's the current" -setup {
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]
@@ -202,6 +204,7 @@ test notebook-6.4 "Forget first tab when it's the current" -setup {
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]
@@ -217,6 +220,7 @@ test notebook-6.5 "Hide last tab when it's the current" -setup {
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]
@@ -232,6 +236,7 @@ test notebook-6.6 "Forget a middle tab when it's the current" -setup {
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]
@@ -247,6 +252,7 @@ test notebook-6.7 "Hide a middle tab when it's the current" -setup {
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]
@@ -262,6 +268,7 @@ test notebook-6.8 "Forget a non-current tab < current" -setup {
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]
@@ -277,6 +284,7 @@ test notebook-6.9 "Hide a non-current tab < current" -setup {
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]
@@ -292,6 +300,7 @@ test notebook-6.10 "Forget a non-current tab > current" -setup {
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]
@@ -307,6 +316,7 @@ test notebook-6.11 "Hide a non-current tab > current" -setup {
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]
@@ -322,8 +332,10 @@ test notebook-6.12 "Hide and re-add a tab" -setup {
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]
diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test
index ad4c2d5..7e4753a 100644
--- a/tests/ttk/ttk.test
+++ b/tests/ttk/ttk.test
@@ -211,7 +211,7 @@ test ttk-2.8 "bug 3223850: button state disabled during click" -setup {
} -body {
bind .b <ButtonPress-1> {after 0 {.b configure -state disabled}}
after 1 {event generate .b <ButtonPress-1>}
- after 20 {event generate .b <ButtonRelease-1>}
+ after 50 {event generate .b <ButtonRelease-1>}
set aid [after 100 {set ::ttk28 [.b instate {disabled !pressed}]}]
vwait ::ttk28
after cancel $aid
diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test
index d5f6ee3..80ea671 100644
--- a/tests/unixEmbed.test
+++ b/tests/unixEmbed.test
@@ -91,23 +91,23 @@ proc colorsFree {w {red 31} {green 245} {blue 192}} {
testConstraint pressbutton [llength [info commands pressbutton]]
test unixEmbed-1.1 {TkpUseWindow procedure, bad window identifier} -constraints {
- unix
+ unix
} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -use xyz
} -returnCodes error -result {expected integer but got "xyz"}
test unixEmbed-1.2 {TkpUseWindow procedure, bad window identifier} -constraints {
- unix
+ unix
} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -use 47
} -returnCodes error -result {couldn't create child of window "47"}
test unixEmbed-1.3 {TkpUseWindow procedure, inheriting colormap} -constraints {
- unix nonPortable
+ unix nonPortable
} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -colormap new
wm geometry .t +0+0
@@ -116,12 +116,12 @@ test unixEmbed-1.3 {TkpUseWindow procedure, inheriting colormap} -constraints {
toplevel .x -use [winfo id .t.f]
colorsFree .x
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0}
test unixEmbed-1.4 {TkpUseWindow procedure, inheriting colormap} -constraints {
- unix nonPortable
+ unix nonPortable
} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -container 1 -colormap new
wm geometry .t +0+0
@@ -129,13 +129,13 @@ test unixEmbed-1.4 {TkpUseWindow procedure, inheriting colormap} -constraints {
toplevel .x -use [winfo id .t]
colorsFree .x
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {1}
test unixEmbed-1.5 {TkpUseWindow procedure, creating Container records} -constraints {
- unix testembed notAqua
+ unix testembed notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
frame .f2 -container 1 -width 200 -height 50
@@ -147,7 +147,7 @@ test unixEmbed-1.5 {TkpUseWindow procedure, creating Container records} -constra
list [testembed] [expr [lindex [lindex [testembed all] 0] 0] - $w]
}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{{XXX {} {} .t}} 0}
test unixEmbed-1.5a {TkpUseWindow procedure, creating Container records} -constraints {
unix testembed
@@ -171,9 +171,9 @@ test unixEmbed-1.5a {TkpUseWindow procedure, creating Container records} -constr
deleteWindows
} -result {{{XXX {} {} .t}} 0}
test unixEmbed-1.6 {TkpUseWindow procedure, creating Container records} -constraints {
- unix testembed notAqua
+ unix testembed notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
frame .f2 -container 1 -width 200 -height 50
@@ -181,13 +181,13 @@ test unixEmbed-1.6 {TkpUseWindow procedure, creating Container records} -constra
dobg "set w1 [winfo id .f1]"
dobg "set w2 [winfo id .f2]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
- toplevel .t2 -use $w2
- testembed
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
+ toplevel .t2 -use $w2
+ testembed
}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{XXX {} {} .t2} {XXX {} {} .t1}}
test unixEmbed-1.6a {TkpUseWindow procedure, creating Container records} -constraints {
unix testembed
@@ -213,9 +213,9 @@ test unixEmbed-1.6a {TkpUseWindow procedure, creating Container records} -constr
deleteWindows
} -result {{XXX {} {} .t2} {XXX {} {} .t1}}
test unixEmbed-1.7 {TkpUseWindow procedure, container and embedded in same app} -constraints {
- unix testembed
+ unix testembed
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
frame .f2 -container 1 -width 200 -height 50
@@ -224,7 +224,7 @@ test unixEmbed-1.7 {TkpUseWindow procedure, container and embedded in same app}
toplevel .t2 -use [winfo id .f2]
testembed
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{XXX .f2 {} .t2} {XXX .f1 {} .t1}}
# Can't think of any way to test the procedures TkpMakeWindow,
@@ -232,25 +232,25 @@ test unixEmbed-1.7 {TkpUseWindow procedure, container and embedded in same app}
test unixEmbed-2.1 {EmbeddedEventProc procedure} -constraints {
- unix testembed notAqua
+ unix testembed notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
- testembed
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
+ testembed
}
destroy .f1
update
dobg {
- testembed
+ testembed
}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test unixEmbed-2.1a {EmbeddedEventProc procedure} -constraints {
unix testembed
@@ -277,22 +277,22 @@ test unixEmbed-2.1a {EmbeddedEventProc procedure} -constraints {
deleteWindows
} -result {}
test unixEmbed-2.2 {EmbeddedEventProc procedure} -constraints {
- unix testembed notAqua
+ unix testembed notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
- testembed
- destroy .t1
- testembed
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
+ testembed
+ destroy .t1
+ testembed
}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test unixEmbed-2.2a {EmbeddedEventProc procedure} -constraints {
unix testembed
@@ -317,9 +317,9 @@ test unixEmbed-2.2a {EmbeddedEventProc procedure} -constraints {
deleteWindows
} -result {}
test unixEmbed-2.3 {EmbeddedEventProc procedure} -constraints {
- unix testembed notAqua
+ unix testembed notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
@@ -329,9 +329,9 @@ test unixEmbed-2.3 {EmbeddedEventProc procedure} -constraints {
testembed
} -result {}
test unixEmbed-2.4 {EmbeddedEventProc procedure} -constraints {
- unix testembed
+ unix testembed
} -setup {
- deleteWindows
+ deleteWindows
} -body {
pack [frame .f1 -container 1 -width 200 -height 50]
toplevel .t1 -use [winfo id .f1]
@@ -341,7 +341,7 @@ test unixEmbed-2.4 {EmbeddedEventProc procedure} -constraints {
update
list $x [winfo exists .t1] [winfo exists .f1] [testembed]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result "{{XXX .f1 {} .t1}} 0 0 {}"
@@ -353,13 +353,13 @@ test unixEmbed-3.1 {ContainerEventProc procedure, detect creation} -constraints
dobg "set w1 [winfo id .f1]"
set x [testembed]
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
- wm withdraw .t1
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
+ wm withdraw .t1
}
list $x [testembed]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{{XXX .f1 {} {}}} {{XXX .f1 XXX {}}}}
test unixEmbed-3.1a {ContainerEventProc procedure, detect creation} -constraints {
unix testembed
@@ -383,9 +383,9 @@ test unixEmbed-3.1a {ContainerEventProc procedure, detect creation} -constraints
deleteWindows
} -result {{{XXX .f1 {} {}}} {{XXX .f1 {} {}}}}
test unixEmbed-3.2 {ContainerEventProc procedure, set size on creation} -constraints {
- unix
+ unix
} -setup {
- deleteWindows
+ deleteWindows
update
} -body {
toplevel .t1 -container 1
@@ -394,28 +394,28 @@ test unixEmbed-3.2 {ContainerEventProc procedure, set size on creation} -constra
update
wm geometry .t2
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {200x200+0+0}
test unixEmbed-3.3 {ContainerEventProc procedure, disallow position changes} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1 -bd 2 -relief raised
- update
- wm geometry .t1 +30+40
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1 -bd 2 -relief raised
+ update
+ wm geometry .t1 +30+40
}
update
dobg {
- wm geometry .t1
+ wm geometry .t1
}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {200x200+0+0}
test unixEmbed-3.3a {ContainerEventProc procedure, disallow position changes} -constraints {
unix
@@ -441,25 +441,25 @@ test unixEmbed-3.3a {ContainerEventProc procedure, disallow position changes} -c
deleteWindows
} -result {200x200+0+0}
test unixEmbed-3.4 {ContainerEventProc procedure, disallow position changes} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
- update
- wm geometry .t1 300x100+30+40
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
+ update
+ wm geometry .t1 300x100+30+40
}
update
dobg {
- wm geometry .t1
+ wm geometry .t1
}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {300x100+0+0}
test unixEmbed-3.4a {ContainerEventProc procedure, disallow position changes} -constraints {
unix
@@ -485,25 +485,25 @@ test unixEmbed-3.4a {ContainerEventProc procedure, disallow position changes} -c
deleteWindows
} -result {300x100+0+0}
test unixEmbed-3.5 {ContainerEventProc procedure, geometry requests} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
}
update
dobg {
- .t1 configure -width 300 -height 80
+ .t1 configure -width 300 -height 80
}
update
list [winfo width .f1] [winfo height .f1] [dobg {wm geometry .t1}]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {300 80 300x80+0+0}
test unixEmbed-3.5a {ContainerEventProc procedure, geometry requests} -constraints {
unix
@@ -528,27 +528,27 @@ test unixEmbed-3.5a {ContainerEventProc procedure, geometry requests} -constrain
deleteWindows
} -result {300 80 300x80+0+0}
test unixEmbed-3.6 {ContainerEventProc procedure, map requests} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
- set x unmapped
- bind .t1 <Map> {set x mapped}
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
+ set x unmapped
+ bind .t1 <Map> {set x mapped}
}
update
dobg {
- after 100
- update
- set x
+ after 100
+ update
+ set x
}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {mapped}
test unixEmbed-3.6a {ContainerEventProc procedure, map requests} -constraints {
unix
@@ -576,9 +576,9 @@ test unixEmbed-3.6a {ContainerEventProc procedure, map requests} -constraints {
deleteWindows
} -result {mapped}
test unixEmbed-3.7 {ContainerEventProc procedure, destroy events} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
@@ -586,17 +586,17 @@ test unixEmbed-3.7 {ContainerEventProc procedure, destroy events} -constraints {
bind .f1 <Destroy> {set x dead}
set x alive
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
}
update
dobg {
- destroy .t1
+ destroy .t1
}
update
list $x [winfo exists .f1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {dead 0}
test unixEmbed-3.7a {ContainerEventProc procedure, destroy events} -constraints {
unix
@@ -625,27 +625,27 @@ test unixEmbed-3.7a {ContainerEventProc procedure, destroy events} -constraints
} -result {dead 0}
test unixEmbed-4.1 {EmbedStructureProc procedure, configure events} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
}
update
dobg {
- .t1 configure -width 180 -height 100
+ .t1 configure -width 180 -height 100
}
update
dobg {
- winfo geometry .t1
+ winfo geometry .t1
}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {180x100+0+0}
test unixEmbed-4.1a {EmbedStructureProc procedure, configure events} -constraints {
unix
@@ -671,16 +671,16 @@ test unixEmbed-4.1a {EmbedStructureProc procedure, configure events} -constraint
deleteWindows
} -result {180x100+0+0}
test unixEmbed-4.2 {EmbedStructureProc procedure, destroy events} -constraints {
- unix testembed notAqua
+ unix testembed notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
}
update
set x [testembed]
@@ -688,7 +688,7 @@ test unixEmbed-4.2 {EmbedStructureProc procedure, destroy events} -constraints {
update
list $x [testembed]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{{XXX .f1 XXX {}}} {}}
test unixEmbed-4.2a {EmbedStructureProc procedure, destroy events} -constraints {
unix testembed
@@ -716,25 +716,26 @@ test unixEmbed-4.2a {EmbedStructureProc procedure, destroy events} -constraints
test unixEmbed-5.1 {EmbedFocusProc procedure, FocusIn events} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
+ update
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
- bind .t1 <FocusIn> {lappend x "focus in %W"}
- bind .t1 <FocusOut> {lappend x "focus out %W"}
- set x {}
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
+ bind .t1 <FocusIn> {lappend x "focus in %W"}
+ bind .t1 <FocusOut> {lappend x "focus out %W"}
+ set x {}
}
focus -force .f1
update
dobg {set x}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{focus in .t1}}
test unixEmbed-5.1a {EmbedFocusProc procedure, FocusIn events} -constraints {
unix
@@ -746,6 +747,7 @@ test unixEmbed-5.1a {EmbedFocusProc procedure, FocusIn events} -constraints {
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
+ update
child alias w1 winfo id .f1
child eval {
destroy [winfo child .]
@@ -763,12 +765,13 @@ test unixEmbed-5.1a {EmbedFocusProc procedure, FocusIn events} -constraints {
deleteWindows
} -result {{focus in .t1}}
test unixEmbed-5.2 {EmbedFocusProc procedure, focusing on dead window} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
+ update
dobg "set w1 [winfo id .f1]"
dobg {
eval destroy [winfo child .]
@@ -776,13 +779,13 @@ test unixEmbed-5.2 {EmbedFocusProc procedure, focusing on dead window} -constrai
}
update
dobg {
- after 200 {destroy .t1}
+ after 200 {destroy .t1}
}
after 400
focus -force .f1
update
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test unixEmbed-5.2a {EmbedFocusProc procedure, focusing on dead window} -constraints {
unix
@@ -794,6 +797,7 @@ test unixEmbed-5.2a {EmbedFocusProc procedure, focusing on dead window} -constra
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
+ update
child alias w1 winfo id .f1
child eval {
destroy [winfo child .]
@@ -809,19 +813,20 @@ test unixEmbed-5.2a {EmbedFocusProc procedure, focusing on dead window} -constra
deleteWindows
} -result {}
test unixEmbed-5.3 {EmbedFocusProc procedure, FocusOut events} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
+ update
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
- bind .t1 <FocusIn> {lappend x "focus in %W"}
- bind .t1 <FocusOut> {lappend x "focus out %W"}
- set x {}
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
+ bind .t1 <FocusIn> {lappend x "focus in %W"}
+ bind .t1 <FocusOut> {lappend x "focus out %W"}
+ set x {}
}
focus -force .f1
update
@@ -830,7 +835,7 @@ test unixEmbed-5.3 {EmbedFocusProc procedure, FocusOut events} -constraints {
update
list $x [dobg {update; set x}]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{{focus in .t1}} {{focus in .t1} {focus out .t1}}}
test unixEmbed-5.3a {EmbedFocusProc procedure, FocusOut events} -constraints {
unix
@@ -842,6 +847,7 @@ test unixEmbed-5.3a {EmbedFocusProc procedure, FocusOut events} -constraints {
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
+ update
child alias w1 winfo id .f1
child eval {
destroy [winfo child .]
@@ -864,25 +870,25 @@ test unixEmbed-5.3a {EmbedFocusProc procedure, FocusOut events} -constraints {
test unixEmbed-6.1 {EmbedGeometryRequest procedure, window changes size} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
- update
- bind .t1 <Configure> {lappend x {configure .t1 %w %h}}
- set x {}
- .t1 configure -width 300 -height 120
- update
- list $x [winfo geom .t1]
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
+ update
+ bind .t1 <Configure> {lappend x {configure .t1 %w %h}}
+ set x {}
+ .t1 configure -width 300 -height 120
+ update
+ list $x [winfo geom .t1]
}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{{configure .t1 300 120}} 300x120+0+0}
test unixEmbed-6.1a {EmbedGeometryRequest procedure, window changes size} -constraints {
unix
@@ -910,25 +916,25 @@ test unixEmbed-6.1a {EmbedGeometryRequest procedure, window changes size} -const
deleteWindows
} -result {{configure .t1 300 120} 300x120+0+0}
test unixEmbed-6.2 {EmbedGeometryRequest procedure, window changes size} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
place .f1 -width 200 -height 200
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
- update
- bind .t1 <Configure> {lappend x {configure .t1 %w %h}}
- set x {}
- .t1 configure -width 300 -height 120
- update
- list $x [winfo geom .t1]
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
+ update
+ bind .t1 <Configure> {lappend x {configure .t1 %w %h}}
+ set x {}
+ .t1 configure -width 300 -height 120
+ update
+ list $x [winfo geom .t1]
}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{{configure .t1 200 200}} 200x200+0+0}
test unixEmbed-6.2a {EmbedGeometryRequest procedure, window changes size} -constraints {
unix
@@ -960,32 +966,32 @@ test unixEmbed-6.2a {EmbedGeometryRequest procedure, window changes size} -const
# Can't think up any tests for TkpGetOtherWindow procedure.
test unixEmbed-7.1 {TkpRedirectKeyEvent procedure, forward keystroke} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
deleteWindows
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
}
focus -force .
bind . <KeyPress> {lappend x {key %A %E}}
set x {}
set y [dobg {
- update
- bind .t1 <KeyPress> {lappend y {key %A}}
- set y {}
- event generate .t1 <KeyPress> -keysym a
- set y
+ update
+ bind .t1 <KeyPress> {lappend y {key %A}}
+ set y {}
+ event generate .t1 <KeyPress> -keysym a
+ set y
}]
update
list $x $y
} -cleanup {
- deleteWindows
+ deleteWindows
bind . <KeyPress> {}
} -result {{{key a 1}} {}}
# TkpRedirectKeyEvent is not implemented in win or aqua. If someone
@@ -1024,16 +1030,16 @@ test unixEmbed-7.1a {TkpRedirectKeyEvent procedure, forward keystroke} -constrai
bind . <KeyPress> {}
} -result {{{key a 1}} {}}
test unixEmbed-7.2 {TkpRedirectKeyEvent procedure, don't forward keystroke width} -constraints {
- unix notAqua
+ unix notAqua
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1
}
update
focus -force .f1
@@ -1041,16 +1047,16 @@ test unixEmbed-7.2 {TkpRedirectKeyEvent procedure, don't forward keystroke width
bind . <KeyPress> {lappend x {key %A}}
set x {}
set y [dobg {
- update
- bind .t1 <KeyPress> {lappend y {key %A}}
- set y {}
- event generate .t1 <KeyPress> -keysym b
- set y
+ update
+ bind .t1 <KeyPress> {lappend y {key %A}}
+ set y {}
+ event generate .t1 <KeyPress> -keysym b
+ set y
}]
update
list $x $y
} -cleanup {
- deleteWindows
+ deleteWindows
bind . <KeyPress> {}
} -result {{} {{key b}}}
test unixEmbed-7.2a {TkpRedirectKeyEvent procedure, don't forward keystroke width} -constraints {
@@ -1091,28 +1097,28 @@ test unixEmbed-7.2a {TkpRedirectKeyEvent procedure, don't forward keystroke widt
test unixEmbed-8.1 {TkpClaimFocus procedure} -constraints {
unix notAqua failsOnUbuntu failsOnXQuarz
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
frame .f2 -width 200 -height 50
pack .f1 .f2
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1 -highlightthickness 2 -bd 2 -relief sunken
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1 -highlightthickness 2 -bd 2 -relief sunken
}
focus -force .f2
update
list [dobg {
- focus .t1
- set x [list [focus]]
- update
- after 500
- update
- lappend x [focus]
+ focus .t1
+ set x [list [focus]]
+ update
+ after 500
+ update
+ lappend x [focus]
}] [focus]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{{} .t1} .f1}
test unixEmbed-8.1a {TkpClaimFocus procedure} -constraints unix -setup {
deleteWindows
@@ -1155,25 +1161,25 @@ test unixEmbed-8.2 {TkpClaimFocus procedure} -constraints unix -setup {
child eval "set argv {-use [winfo id .f1]}"
load {} Tk child
child eval {
- . configure -bd 2 -highlightthickness 2 -relief sunken
+ . configure -bd 2 -highlightthickness 2 -relief sunken
}
focus -force .f2
update
list [child eval {
- focus .
- set x [list [focus]]
- update
- lappend x [focus]
+ focus .
+ set x [list [focus]]
+ update
+ lappend x [focus]
}] [focus]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{{} .} .f1}
catch {interp delete child}
test unixEmbed-9.1 {EmbedWindowDeleted procedure, check parentPtr} -constraints {
- unix testembed
+ unix testembed
} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1 -container 1 -width 200 -height 50
frame .f2 -container 1 -width 200 -height 50
@@ -1183,12 +1189,12 @@ test unixEmbed-9.1 {EmbedWindowDeleted procedure, check parentPtr} -constraints
set x {}
lappend x [testembed]
foreach w {.f3 .f4 .f1 .f2} {
- destroy $w
- lappend x [testembed]
+ destroy $w
+ lappend x [testembed]
}
set x
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{{XXX .f4 {} {}} {XXX .f3 {} {}} {XXX .f2 {} {}} {XXX .f1 {} {}}} {{XXX .f4 {} {}} {XXX .f2 {} {}} {XXX .f1 {} {}}} {{XXX .f2 {} {}} {XXX .f1 {} {}}} {{XXX .f2 {} {}}} {}}
test unixEmbed-9.2 {EmbedWindowDeleted procedure, check embeddedPtr} -constraints {
unix testembed notAqua
@@ -1200,15 +1206,15 @@ test unixEmbed-9.2 {EmbedWindowDeleted procedure, check embeddedPtr} -constraint
update
dobg "set w1 [winfo id .f1]"
dobg {
- eval destroy [winfo child .]
- toplevel .t1 -use $w1 -highlightthickness 2 -bd 2 -relief sunken
- set x {}
- lappend x [testembed]
- destroy .t1
- lappend x [testembed]
+ eval destroy [winfo child .]
+ toplevel .t1 -use $w1 -highlightthickness 2 -bd 2 -relief sunken
+ set x {}
+ lappend x [testembed]
+ destroy .t1
+ lappend x [testembed]
}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{{XXX {} {} .t1}} {}}
test unixEmbed-9.2a {EmbedWindowDeleted procedure, check embeddedPtr} -constraints {
unix testembed
@@ -1242,14 +1248,13 @@ test unixEmbed-10.1 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -con
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
- update idletasks
toplevel .t1 -use [winfo id .f1] -width 150 -height 80
- update idletasks
+ update
wm geometry .t1 +40+50
- update idletasks
+ update
wm geometry .t1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {150x80+0+0}
test unixEmbed-10.2 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -constraints {
unix failsOnUbuntu failsOnXQuarz
@@ -1258,14 +1263,13 @@ test unixEmbed-10.2 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -con
} -body {
frame .f1 -container 1 -width 200 -height 50
pack .f1
- update idletasks
toplevel .t1 -use [winfo id .f1] -width 150 -height 80
- update idletasks
+ update
wm geometry .t1 70x300+10+20
- update idletasks
+ update
wm geometry .t1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {70x300+0+0}
test unixEmbed-11.1 {focus -force works for embedded toplevels} -constraints {
@@ -1275,9 +1279,9 @@ test unixEmbed-11.1 {focus -force works for embedded toplevels} -constraints {
} -body {
toplevel .t
pack [frame .t.f -container 1 -width 200 -height 200] -fill both
- update idletasks
+ update
toplevel .embed -use [winfo id .t.f] -bg green
- update idletasks
+ update
focus -force .t
focus -force .embed
focus
@@ -1290,25 +1294,27 @@ test unixEmbed-11.2 {mouse coordinates in embedded toplevels} -constraints {
deleteWindows
} -body {
toplevel .main
+ wm geometry .main 200x400+100+100
set result {}
pack [button .main.b -text "Main Button" \
- -command {lappend result ".main.b"}] -padx 30 -pady 30
+ -command {lappend result "pushed .main.b"}] -padx 30 -pady 30
pack [frame .main.f -container 1 -width 200 -height 200] -fill both
- update idletasks
+ update
toplevel .embed -use [winfo id .main.f] -bg green
+ update
pack [button .embed.b -text "Emb Button" \
- -command {lappend result ".embed.b"}] -padx 30 -pady 30
- wm geometry .main 200x400+100+100
- update idletasks
+ -command {lappend result "pushed .embed.b"}] -padx 30 -pady 30
+ update
focus -force .main
after 100
- set x [expr {[winfo x .main ] + [winfo x .main.b] + 40}]
- set y [expr {[winfo y .main ] + [winfo y .main.b] + 38}]
+ set x [expr {[winfo rootx .main.b] + [winfo width .main.b]/2}]
+ set y [expr {[winfo rooty .main.b] + [winfo height .main.b]/2}]
lappend result [winfo containing $x $y]
after 200
pressbutton $x $y
update
- set y [expr {$y + 80}]
+ set x [expr {[winfo rootx .embed.b] + [winfo width .embed.b]/2}]
+ set y [expr {[winfo rooty .embed.b] + [winfo height .embed.b]/2}]
lappend result [winfo containing $x $y]
after 200
pressbutton $x $y
@@ -1316,7 +1322,7 @@ test unixEmbed-11.2 {mouse coordinates in embedded toplevels} -constraints {
set result
} -cleanup {
deleteWindows
-} -result {.main.b .main.b .embed.b .embed.b}
+} -result {.main.b {pushed .main.b} .embed.b {pushed .embed.b}}
# cleanup