summaryrefslogtreecommitdiffstats
path: root/tests/menuDraw.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/menuDraw.test')
-rw-r--r--tests/menuDraw.test62
1 files changed, 31 insertions, 31 deletions
diff --git a/tests/menuDraw.test b/tests/menuDraw.test
index fdb051b..ea3503b 100644
--- a/tests/menuDraw.test
+++ b/tests/menuDraw.test
@@ -5,7 +5,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: menuDraw.test,v 1.3 1999/04/16 01:51:39 stanton Exp $
+# RCS: @(#) $Id: menuDraw.test,v 1.4 2001/08/01 16:21:12 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -168,7 +168,7 @@ test menuDraw-7.1 {TkEventuallyRecomputeMenu} {
catch {destroy .m1}
menu .m1
.m1 add command -label "This is a long label"
- set tearoff [tkTearOffMenu .m1]
+ set tearoff [tk::TearOffMenu .m1]
update idletasks
list [.m1 entryconfigure 1 -label "foo"] [destroy .m1]
} {{} {}}
@@ -176,7 +176,7 @@ test menuDraw-7.2 {TkEventuallyRecomputeMenu - update pending} {
catch {destroy .m1}
menu .m1
.m1 add command -label "This is a long label"
- set tearoff [tkTearOffMenu .m1]
+ set tearoff [tk::TearOffMenu .m1]
list [.m1 entryconfigure 1 -label "foo"] [destroy .m1]
} {{} {}}
@@ -196,14 +196,14 @@ test menuDraw-9.1 {TkEventuallyRedrawMenu - entry test} {
menu .m1
set foo 0
.m1 add radiobutton -variable foo -label test
- tkTearOffMenu .m1
+ tk::TearOffMenu .m1
update idletasks
list [set foo test] [destroy .m1] [unset foo]
} {test {} {}}
test menuDraw-9.2 {TkEventuallyRedrawMenu - whole menu} {
catch {destroy .m1}
menu .m1
- list [catch {tkTearOffMenu .m1}] [destroy .m1]
+ list [catch {tk::TearOffMenu .m1}] [destroy .m1]
} {0 {}}
# Don't know how to test when window has been deleted and ComputeMenuGeometry
@@ -244,7 +244,7 @@ test menuDraw-11.1 {TkMenuSelectImageProc - entry selected; redraw not pending}
menu .m1
.m1 add checkbutton -image image1 -selectimage image2
.m1 invoke 1
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
update idletasks
list [image delete image2] [destroy .m1] [eval image delete [image names]]
} {{} {} {}}
@@ -256,7 +256,7 @@ test menuDraw-11.2 {TkMenuSelectImageProc - entry selected; redraw pending} {
menu .m1
.m1 add checkbutton -image image1 -selectimage image2
.m1 invoke 1
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [image delete image2] [destroy .m1] [eval image delete [image names]]
} {{} {} {}}
test menuDraw-11.3 {TkMenuSelectImageProc - entry not selected} {
@@ -266,7 +266,7 @@ test menuDraw-11.3 {TkMenuSelectImageProc - entry not selected} {
image create test image2
menu .m1
.m1 add checkbutton -image image1 -selectimage image2
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
update idletasks
list [image delete image2] [destroy .m1] [eval image delete [image names]]
} {{} {} {}}
@@ -282,14 +282,14 @@ test menuDraw-12.1 {DisplayMenu - menubar background} {unixOnly} {
test menuDraw-12.2 {Display menu - no entries} {
catch {destroy .m1}
menu .m1
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} {{} {}}
test menuDraw-12.3 {DisplayMenu - one entry} {
catch {destroy .m1}
menu .m1
.m1 add command -label foo
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} {{} {}}
test menuDraw-12.4 {DisplayMenu - two entries} {
@@ -297,7 +297,7 @@ test menuDraw-12.4 {DisplayMenu - two entries} {
menu .m1
.m1 add command -label "one"
.m1 add command -label "two"
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} {{} {}}
test menuDraw.12.5 {DisplayMenu - two columns - first bigger} {
@@ -306,7 +306,7 @@ test menuDraw.12.5 {DisplayMenu - two columns - first bigger} {
.m1 add command -label "one"
.m1 add command -label "two"
.m1 add command -label "three" -columnbreak 1
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} {{} {}}
test menuDraw-12.5 {DisplayMenu - two column - second bigger} {
@@ -315,7 +315,7 @@ test menuDraw-12.5 {DisplayMenu - two column - second bigger} {
.m1 add command -label "one"
.m1 add command -label "two" -columnbreak 1
.m1 add command -label "three"
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} {{} {}}
test menuDraw.12.7 {DisplayMenu - three columns} {
@@ -327,7 +327,7 @@ test menuDraw.12.7 {DisplayMenu - three columns} {
.m1 add command -label "four"
.m1 add command -label "five"
.m1 add command -label "six"
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
} {{} {}}
test menuDraw-12.6 {Display menu - testing for extra space and menubars} {unixOnly} {
@@ -341,7 +341,7 @@ test menuDraw-12.7 {Display menu - extra space at end of menu} {
catch {destroy .m1}
menu .m1
.m1 add cascade -label foo
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
wm geometry $tearoff 200x100
list [update] [destroy .m1]
} {{} {}}
@@ -353,15 +353,15 @@ test menuDraw-13.1 {TkMenuEventProc - Expose} {
.m1 add command -label "one"
menu .m2
.m2 add command -label "two"
- set tearoff1 [tkTearOffMenu .m1 40 40]
- set tearoff2 [tkTearOffMenu .m2 40 40]
+ set tearoff1 [tk::TearOffMenu .m1 40 40]
+ set tearoff2 [tk::TearOffMenu .m2 40 40]
list [raise $tearoff2] [update] [destroy .m1] [destroy .m2]
} {{} {} {} {}}
test menuDraw-13.2 {TkMenuEventProc - ConfigureNotify} {
catch {destroy .m1}
menu .m1
.m1 add command -label "foo"
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [wm geometry $tearoff 200x100] [update] [destroy .m1]
} {{} {} {}}
test menuDraw-13.3 {TkMenuEventProc - ActivateNotify} {macOnly} {
@@ -369,7 +369,7 @@ test menuDraw-13.3 {TkMenuEventProc - ActivateNotify} {macOnly} {
toplevel .t2 -menu .t2.m1
menu .t2.m1
.t2.m1 add command -label foo
- tkTearOffMenu .t2.m1 40 40
+ tk::TearOffMenu .t2.m1 40 40
list [catch {update} msg] $msg [destroy .t2]
} {0 {} {}}
# Testing deletes is hard, and I am going to do my best. Don't know how
@@ -410,13 +410,13 @@ test menuDraw-15.1 {TkPostTearoffMenu - Basic posting} {
catch {destroy .m1}
menu .m1
.m1 add command -label "foo"
- list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1]
+ list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1]
} {0 {}}
test menuDraw-15.2 {TkPostTearoffMenu - Deactivation} {
catch {destroy .m1}
menu .m1
.m1 add command -label "foo" -state active
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [$tearoff index active] [destroy .m1]
} {none {}}
test menuDraw-15.3 {TkPostTearoffMenu - post command} {
@@ -424,27 +424,27 @@ test menuDraw-15.3 {TkPostTearoffMenu - post command} {
catch {unset foo}
menu .m1 -postcommand "set foo .m1"
.m1 add command -label "foo"
- list [catch {tkTearOffMenu .m1 40 40}] [set foo] [unset foo] [destroy .m1]
+ list [catch {tk::TearOffMenu .m1 40 40}] [set foo] [unset foo] [destroy .m1]
} {0 .m1 {} {}}
test menuDraw-15.4 {TkPostTearoffMenu - post command deleting the menu} {
catch {destroy .m1}
menu .m1 -postcommand "destroy .m1"
.m1 add command -label "foo"
- list [catch {tkTearOffMenu .m1 40 40} msg] $msg [winfo exists .m1]
+ list [catch {tk::TearOffMenu .m1 40 40} msg] $msg [winfo exists .m1]
} {0 {} 0}
test menuDraw-15.5 {TkPostTearoffMenu - tearoff at edge of screen} {
catch {destroy .m1}
menu .m1
.m1 add command -label "foo"
set height [winfo screenheight .m1]
- list [catch {tkTearOffMenu .m1 40 $height}] [destroy .m1]
+ list [catch {tk::TearOffMenu .m1 40 $height}] [destroy .m1]
} {0 {}}
test menuDraw-15.6 {TkPostTearoffMenu - tearoff off right} {
catch {destroy .m1}
menu .m1
.m1 add command -label "foo"
set width [winfo screenwidth .m1]
- list [catch {tkTearOffMenu .m1 $width 40}] [destroy .m1]
+ list [catch {tk::TearOffMenu .m1 $width 40}] [destroy .m1]
} {0 {}}
@@ -455,7 +455,7 @@ test menuDraw-16.1 {TkPostSubmenu} {unixOnly} {
.m1 add cascade -label test -menu .m2
menu .m2
.m2 add command -label "Hit ESCAPE to make this menu go away."
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
$tearoff postcascade 0
list [$tearoff postcascade 0] [destroy .m1] [destroy .m2]
} {{} {} {}}
@@ -470,7 +470,7 @@ test menuDraw-16.2 {TkPostSubMenu} {unixOnly} {
.m2 add command -label "two"
menu .m3
.m3 add command -label "three"
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
$tearoff postcascade 0
list [$tearoff postcascade 1] [destroy .m1] [destroy .m2] [destroy .m3]
} {{} {} {} {}}
@@ -484,7 +484,7 @@ test menuDraw-16.4 {TkPostSubMenu} {
catch {destroy .m1}
menu .m1
.m1 add cascade -label test
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [$tearoff postcascade 0] [destroy .m1]
} {{} {}}
test menuDraw-16.5 {TkPostSubMenu} {unixOnly} {
@@ -493,7 +493,7 @@ test menuDraw-16.5 {TkPostSubMenu} {unixOnly} {
menu .m1
.m1 add cascade -label test -menu .m2
menu .m2 -postcommand "glorp"
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [catch {$tearoff postcascade test} msg] $msg [destroy .m1] [destroy .m2]
} {1 {invalid command name "glorp"} {} {}}
test menuDraw-16.6 {TkPostSubMenu} {pcOnly userInteraction} {
@@ -503,7 +503,7 @@ test menuDraw-16.6 {TkPostSubMenu} {pcOnly userInteraction} {
.m1 add cascade -label test -menu .m2
menu .m2
.m2 add command -label "Hit ESCAPE to get rid of this menu"
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [$tearoff postcascade 0] [destroy .m1] [destroy .m2]
} {{} {} {}}
@@ -529,7 +529,7 @@ test menuDraw-17.2 {AdjustMenuCoords - menu} {pcOnly userInteraction} {
.m1 add cascade -label test -menu .m2
menu .m2
.m2 add command -label "Hit ESCAPE to make this menu go away"
- set tearoff [tkTearOffMenu .m1 40 40]
+ set tearoff [tk::TearOffMenu .m1 40 40]
list [$tearoff postcascade 0] [destroy .m1] [destroy .m2]
} {{} {} {}}