summaryrefslogtreecommitdiffstats
path: root/tests/bind.test
diff options
context:
space:
mode:
authorrjohnson <rjohnson>1998-10-10 00:30:34 (GMT)
committerrjohnson <rjohnson>1998-10-10 00:30:34 (GMT)
commit6b30648b424171905375ec916ab86186a3043dfc (patch)
tree5d1b6c4f80c96cbc9337259a6d98a40a78aff79b /tests/bind.test
parent733f2ab4691d31c0fdca72da988c5f4878ee5709 (diff)
downloadtk-6b30648b424171905375ec916ab86186a3043dfc.zip
tk-6b30648b424171905375ec916ab86186a3043dfc.tar.gz
tk-6b30648b424171905375ec916ab86186a3043dfc.tar.bz2
Added support for the MouseWheel event.
Diffstat (limited to 'tests/bind.test')
-rw-r--r--tests/bind.test25
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/bind.test b/tests/bind.test
index b70cc21..e3e5f51 100644
--- a/tests/bind.test
+++ b/tests/bind.test
@@ -4,11 +4,12 @@
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
+# Copyright (c) 1998 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: bind.test,v 1.3 1998/09/14 18:23:42 stanton Exp $
+# RCS: @(#) $Id: bind.test,v 1.4 1998/10/10 00:30:37 rjohnson Exp $
if {[string compare test [info procs test]] != 0} {
source defs
@@ -2532,5 +2533,27 @@ test bind-30.2 {Tk_BackgroundError procedure} {
(command bound to event)}}
rename bgerror {}
+test bind-31.1 {MouseWheel events} {
+ setup
+ set x {}
+ bind .b.f <MouseWheel> {set x Wheel}
+ event gen .b.f <MouseWheel>
+ set x
+} {Wheel}
+test bind-31.2 {MouseWheel events} {
+ setup
+ set x {}
+ bind .b.f <MouseWheel> {set x %D}
+ event gen .b.f <MouseWheel> -delta 120
+ set x
+} {120}
+test bind-31.2 {MouseWheel events} {
+ setup
+ set x {}
+ bind .b.f <MouseWheel> {set x "%D %x %y"}
+ event gen .b.f <MouseWheel> -delta 240 -x 10 -y 30
+ set x
+} {240 10 30}
+
destroy .b