Make mouse wheel work.
authorStefan Vogel <sv@exept.de>
Wed, 25 Jul 2001 10:45:53 +0200
changeset 2383 5783b2c07e85
parent 2382 f47c847636de
child 2384 74eed28cb624
Make mouse wheel work.
Scroller.st
--- a/Scroller.st	Fri Jul 20 14:18:31 2001 +0200
+++ b/Scroller.st	Wed Jul 25 10:45:53 2001 +0200
@@ -1834,6 +1834,13 @@
     self tellOthers
 !
 
+scrollDown:amountToScroll
+    "compatibility with SimpleView. This allows mouse wheel actions on Scrollers
+     Note: this is used for horizontal scrollers, too (scrollRight)"
+
+    self scrollStep:amountToScroll
+!
+
 scrollStep:delta
     "step by some delta"
 
@@ -1866,6 +1873,13 @@
     self tellOthers
 
     "Created: 6.3.1996 / 17:55:25 / cg"
+!
+
+scrollUp:amountToScroll
+    "compatibility with SimpleView. This allows mouse wheel actions on Scrollers
+     Note: this is used for horizontal scrollers, too (scrollLeft)"
+
+    self scrollStep:amountToScroll negated
 ! !
 
 !Scroller methodsFor:'forwarding changed origin'!
@@ -2512,10 +2526,17 @@
 
     "Created: / 7.3.1997 / 21:10:23 / cg"
     "Modified: / 12.5.1998 / 20:21:00 / cg"
+!
+
+verticalScrollStep
+    "mouse wheel: scroll by a quarter of a page
+     Note: this is used for horizontal scrollers, too"
+
+    ^ (thumbHeight // 4) max:1
 ! !
 
 !Scroller class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.155 2001-04-30 12:39:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.156 2001-07-25 08:45:53 stefan Exp $'
 ! !