WindowSensor.st
changeset 2699 01594e76fc92
parent 2689 2cbeb733da80
child 2704 1698640c9da6
--- a/WindowSensor.st	Fri May 21 12:04:44 1999 +0200
+++ b/WindowSensor.st	Fri May 21 13:23:07 1999 +0200
@@ -1217,6 +1217,41 @@
     "Modified: / 16.2.1998 / 13:20:41 / cg"
 !
 
+mouseWheelMotion:amount state:state view:aView
+    "mouse-wheel was turned - this is sent from the device (Display)"
+
+    |args ev ignoreIt prevLeftDown prevMiddleDown prevRightDown focusView|
+
+    "/ update my idea of button and modifier state information
+    self updateModifierStateFrom:state device:(aView graphicsDevice).
+
+    EventListener notNil ifTrue:[
+        (EventListener mouseWheelMotion:amount state:state view:aView) ifTrue:[^ self]
+    ].
+    eventListener notNil ifTrue:[
+        (eventListener mouseWheelMotion:amount state:state view:aView) ifTrue:[^ self]
+    ].
+
+    ignoreUserInput == true ifTrue:[
+        ^ self
+    ].
+    args := Array with:amount with:state.
+
+    focusView := aView windowGroup focusView.
+
+    ev := WindowEvent inputEvent
+             for:focusView
+             type:#mouseWheelMotion:state:
+             arguments:args.
+
+    ev hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown
+       button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown.
+    self pushEvent:ev.
+
+    "Created: / 21.5.1999 / 13:05:18 / cg"
+    "Modified: / 21.5.1999 / 13:12:40 / cg"
+!
+
 noExposeView:aView
     "an noexpose event arrived - this is sent from the device (Display)"
 
@@ -2623,6 +2658,6 @@
 !WindowSensor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.152 1999-05-20 15:27:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.153 1999-05-21 11:22:38 cg Exp $'
 ! !
 WindowSensor initialize!