deltaTime arg in mouseWheelMotion
authorClaus Gittinger <cg@exept.de>
Sat, 22 May 1999 16:32:22 +0200
changeset 2718 85d77ac33019
parent 2717 2b5a28c6585e
child 2719 cc6080a64232
deltaTime arg in mouseWheelMotion
SWSensor.st
SynchronousWindowSensor.st
--- a/SWSensor.st	Sat May 22 16:32:03 1999 +0200
+++ b/SWSensor.st	Sat May 22 16:32:22 1999 +0200
@@ -1,6 +1,6 @@
 "
  COPYRIGHT (c) 1995 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -22,7 +22,7 @@
 copyright
 "
  COPYRIGHT (c) 1995 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -41,7 +41,7 @@
     about the event.
 
     These are used for only one single situation: 
-        when a modal debugger is open
+	when a modal debugger is open
     (i.e. one that is debugging the scheduler or event-dispatcher).
 
     This debuggers windowGroup is augmented with a synchronous Sensor, in order
@@ -53,7 +53,7 @@
     These sensors are not used with regular views.
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 "
 ! !
 
@@ -63,11 +63,11 @@
     "forward as an expose for some view"
 
     aView
-        dispatchEvent:#exposeX:y:width:height:
-        arguments:(Array with:aRectangle left 
-                         with:aRectangle top 
-                         with:aRectangle width
-                         with:aRectangle height)
+	dispatchEvent:#exposeX:y:width:height:
+	arguments:(Array with:aRectangle left 
+			 with:aRectangle top 
+			 with:aRectangle width
+			 with:aRectangle height)
 
 "/    WindowEvent
 "/        sendEvent:#exposeX:y:width:height:
@@ -84,8 +84,8 @@
     "forward a button-motion for some view"
 
     aView
-        dispatchEvent:#buttonMotion:x:y:
-        arguments:(Array with:button with:x with:y)
+	dispatchEvent:#buttonMotion:x:y:
+	arguments:(Array with:button with:x with:y)
 
 "/    WindowEvent
 "/        sendEvent:#buttonMotion:x:y:
@@ -100,8 +100,8 @@
     "forward a button-multi-press event for some view"
 
     aView
-        dispatchEvent:#buttonMultiPress:x:y:
-        arguments:(Array with:button with:x with:y)
+	dispatchEvent:#buttonMultiPress:x:y:
+	arguments:(Array with:button with:x with:y)
 
 "/    WindowEvent
 "/        sendEvent:#buttonMultiPress:x:y:
@@ -116,8 +116,8 @@
     "forward a button-press event for some view"
 
     aView
-        dispatchEvent:#buttonPress:x:y:
-        arguments:(Array with:button with:x with:y)
+	dispatchEvent:#buttonPress:x:y:
+	arguments:(Array with:button with:x with:y)
 
 "/    WindowEvent
 "/        sendEvent:#buttonPress:x:y:
@@ -132,8 +132,8 @@
     "forward a button-release event for some view"
 
     aView
-        dispatchEvent:#buttonRelease:x:y:
-        arguments:(Array with:button with:x with:y)
+	dispatchEvent:#buttonRelease:x:y:
+	arguments:(Array with:button with:x with:y)
 
 "/    WindowEvent
 "/        sendEvent:#buttonRelease:x:y:
@@ -172,8 +172,8 @@
     "forward an expose for some view"
 
     aView
-        dispatchEvent:#exposeX:y:width:height:
-        arguments:(Array with:x with:y with:w with:h)
+	dispatchEvent:#exposeX:y:width:height:
+	arguments:(Array with:x with:y with:w with:h)
 
 "/    WindowEvent
 "/        sendEvent:#exposeX:y:width:height:
@@ -188,8 +188,8 @@
     "forward a focusIn event for some view"
 
     aView
-        dispatchEvent:#focusIn
-        arguments:nil
+	dispatchEvent:#focusIn
+	arguments:nil
 
 "/   WindowEvent
 "/        sendEvent:#focusIn
@@ -204,8 +204,8 @@
     "forward a focusOut event for some view"
 
     aView
-        dispatchEvent:#focusOut
-        arguments:nil
+	dispatchEvent:#focusOut
+	arguments:nil
 
 "/    WindowEvent
 "/        sendEvent:#focusOut
@@ -223,14 +223,14 @@
     "/ (if an expose is pending)
 
     final ifTrue:[
-        (catchExpose includes:aView) ifTrue:[
-            gotExpose add:aView.
-        ]
+	(catchExpose includes:aView) ifTrue:[
+	    gotExpose add:aView.
+	]
     ].
 
     aView
-        dispatchEvent:#graphicsExposeX:y:width:height:final:
-        arguments:(Array with:x with:y with:w with:h with:final)
+	dispatchEvent:#graphicsExposeX:y:width:height:final:
+	arguments:(Array with:x with:y with:w with:h with:final)
 
 "/    WindowEvent
 "/        sendEvent:#graphicsExposeX:y:width:height:final:
@@ -250,9 +250,9 @@
 
     xlatedKey := aView graphicsDevice translateKey:untranslatedKey forView:aView.
     xlatedKey notNil ifTrue:[
-        aView
-            dispatchEvent:#keyPress:x:y:
-            arguments:(Array with:xlatedKey with:x with:y)
+	aView
+	    dispatchEvent:#keyPress:x:y:
+	    arguments:(Array with:xlatedKey with:x with:y)
 
 "/        WindowEvent
 "/          sendEvent:#keyPress:x:y:
@@ -273,9 +273,9 @@
 
     xlatedKey := aView graphicsDevice translateKey:untranslatedKey forView:aView.
     xlatedKey notNil ifTrue:[
-        aView
-            dispatchEvent:#keyRelease:x:y:
-            arguments:(Array with:xlatedKey with:x with:y)
+	aView
+	    dispatchEvent:#keyRelease:x:y:
+	    arguments:(Array with:xlatedKey with:x with:y)
 
 "/        WindowEvent
 "/            sendEvent:#keyRelease:x:y:
@@ -295,12 +295,12 @@
     "Created: 24.11.1995 / 19:18:01 / cg"
 !
 
-mouseWheelMotion:amount state:state view:aView
+mouseWheelMotion:amount state:state deltaTime:dTime view:aView
     "forward a wheel-motion for some view"
 
     aView
-        dispatchEvent:#mouseWheelMotion:state:
-        arguments:(Array with:amount with:state)
+	dispatchEvent:#mouseWheelMotion:state:deltaTime:
+	arguments:(Array with:amount with:state with:dTime)
 
     "Created: / 21.5.1999 / 13:07:51 / cg"
 !
@@ -309,12 +309,12 @@
     "forward a noExpose event for some view"
 
     catchExpose isNil ifTrue:[
-        'SWSensor [info]: noExpose but not catching' infoPrintCR.
+	'SWSensor [info]: noExpose but not catching' infoPrintCR.
     ].
 
     (catchExpose includes:aView) ifTrue:[
-        gotExpose add:aView.
-        catchExpose remove:aView.
+	gotExpose add:aView.
+	catchExpose remove:aView.
     ].
     aView noExpose.
 
@@ -326,8 +326,8 @@
     "forward a pointer enter for some view"
 
     aView
-        dispatchEvent:#pointerEnter:x:y:
-        arguments:(Array with:buttonState with:x with:y)
+	dispatchEvent:#pointerEnter:x:y:
+	arguments:(Array with:buttonState with:x with:y)
 
 "/    WindowEvent
 "/        sendEvent:#pointerEnter:x:y:
@@ -342,8 +342,8 @@
     "forward a pointer leave for some view"
 
     aView
-        dispatchEvent:#pointerLeave:
-        arguments:(Array with:buttonState)
+	dispatchEvent:#pointerLeave:
+	arguments:(Array with:buttonState)
 
 "/    WindowEvent
 "/        sendEvent:#pointerLeave:
@@ -384,7 +384,7 @@
     "start catching noExpose events (must be done BEFORE a bitblt)."
 
     catchExpose notEmpty ifTrue:[
-        'SWSensor [warning]: already catching in catchExpose' errorPrintCR.
+	'SWSensor [warning]: already catching in catchExpose' errorPrintCR.
     ].
 
     gotOtherEvent remove:aView ifAbsent:nil.
@@ -403,26 +403,26 @@
 
     "/ this is only needed for X ...
     device scrollsAsynchronous ifTrue:[
-        windowId := aView id.
+	windowId := aView id.
 
-        "/
-        "/ cannot suspend, I am a synchronous-modal sensor
-        "/ must poll for the event
-        "/
-        endPollTime := AbsoluteTime now addSeconds:10.
-        stopPoll := false.
+	"/
+	"/ cannot suspend, I am a synchronous-modal sensor
+	"/ must poll for the event
+	"/
+	endPollTime := AbsoluteTime now addSeconds:10.
+	stopPoll := false.
 
-        [(gotExpose includes:aView) or:[stopPoll]] whileFalse:[
-            (device exposeEventPendingFor:windowId withSync:true) ifTrue:[
-                device dispatchExposeEventFor:windowId.
-            ].
-            stopPoll := (AbsoluteTime now > endPollTime).
-            Processor yield.
-        ].
+	[(gotExpose includes:aView) or:[stopPoll]] whileFalse:[
+	    (device exposeEventPendingFor:windowId withSync:true) ifTrue:[
+		device dispatchExposeEventFor:windowId.
+	    ].
+	    stopPoll := (AbsoluteTime now > endPollTime).
+	    Processor yield.
+	].
 
-        stopPoll ifTrue:[
-            'SyncWindowSensor [warning]: lost expose event' errorPrintCR.
-        ]
+	stopPoll ifTrue:[
+	    'SyncWindowSensor [warning]: lost expose event' errorPrintCR.
+	]
     ].
 
     catchExpose remove:aView ifAbsent:nil.
@@ -434,5 +434,5 @@
 !SynchronousWindowSensor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/SWSensor.st,v 1.18 1999-05-21 11:23:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/SWSensor.st,v 1.19 1999-05-22 14:32:22 cg Exp $'
 ! !
--- a/SynchronousWindowSensor.st	Sat May 22 16:32:03 1999 +0200
+++ b/SynchronousWindowSensor.st	Sat May 22 16:32:22 1999 +0200
@@ -1,6 +1,6 @@
 "
  COPYRIGHT (c) 1995 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -22,7 +22,7 @@
 copyright
 "
  COPYRIGHT (c) 1995 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -41,7 +41,7 @@
     about the event.
 
     These are used for only one single situation: 
-        when a modal debugger is open
+	when a modal debugger is open
     (i.e. one that is debugging the scheduler or event-dispatcher).
 
     This debuggers windowGroup is augmented with a synchronous Sensor, in order
@@ -53,7 +53,7 @@
     These sensors are not used with regular views.
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 "
 ! !
 
@@ -63,11 +63,11 @@
     "forward as an expose for some view"
 
     aView
-        dispatchEvent:#exposeX:y:width:height:
-        arguments:(Array with:aRectangle left 
-                         with:aRectangle top 
-                         with:aRectangle width
-                         with:aRectangle height)
+	dispatchEvent:#exposeX:y:width:height:
+	arguments:(Array with:aRectangle left 
+			 with:aRectangle top 
+			 with:aRectangle width
+			 with:aRectangle height)
 
 "/    WindowEvent
 "/        sendEvent:#exposeX:y:width:height:
@@ -84,8 +84,8 @@
     "forward a button-motion for some view"
 
     aView
-        dispatchEvent:#buttonMotion:x:y:
-        arguments:(Array with:button with:x with:y)
+	dispatchEvent:#buttonMotion:x:y:
+	arguments:(Array with:button with:x with:y)
 
 "/    WindowEvent
 "/        sendEvent:#buttonMotion:x:y:
@@ -100,8 +100,8 @@
     "forward a button-multi-press event for some view"
 
     aView
-        dispatchEvent:#buttonMultiPress:x:y:
-        arguments:(Array with:button with:x with:y)
+	dispatchEvent:#buttonMultiPress:x:y:
+	arguments:(Array with:button with:x with:y)
 
 "/    WindowEvent
 "/        sendEvent:#buttonMultiPress:x:y:
@@ -116,8 +116,8 @@
     "forward a button-press event for some view"
 
     aView
-        dispatchEvent:#buttonPress:x:y:
-        arguments:(Array with:button with:x with:y)
+	dispatchEvent:#buttonPress:x:y:
+	arguments:(Array with:button with:x with:y)
 
 "/    WindowEvent
 "/        sendEvent:#buttonPress:x:y:
@@ -132,8 +132,8 @@
     "forward a button-release event for some view"
 
     aView
-        dispatchEvent:#buttonRelease:x:y:
-        arguments:(Array with:button with:x with:y)
+	dispatchEvent:#buttonRelease:x:y:
+	arguments:(Array with:button with:x with:y)
 
 "/    WindowEvent
 "/        sendEvent:#buttonRelease:x:y:
@@ -172,8 +172,8 @@
     "forward an expose for some view"
 
     aView
-        dispatchEvent:#exposeX:y:width:height:
-        arguments:(Array with:x with:y with:w with:h)
+	dispatchEvent:#exposeX:y:width:height:
+	arguments:(Array with:x with:y with:w with:h)
 
 "/    WindowEvent
 "/        sendEvent:#exposeX:y:width:height:
@@ -188,8 +188,8 @@
     "forward a focusIn event for some view"
 
     aView
-        dispatchEvent:#focusIn
-        arguments:nil
+	dispatchEvent:#focusIn
+	arguments:nil
 
 "/   WindowEvent
 "/        sendEvent:#focusIn
@@ -204,8 +204,8 @@
     "forward a focusOut event for some view"
 
     aView
-        dispatchEvent:#focusOut
-        arguments:nil
+	dispatchEvent:#focusOut
+	arguments:nil
 
 "/    WindowEvent
 "/        sendEvent:#focusOut
@@ -223,14 +223,14 @@
     "/ (if an expose is pending)
 
     final ifTrue:[
-        (catchExpose includes:aView) ifTrue:[
-            gotExpose add:aView.
-        ]
+	(catchExpose includes:aView) ifTrue:[
+	    gotExpose add:aView.
+	]
     ].
 
     aView
-        dispatchEvent:#graphicsExposeX:y:width:height:final:
-        arguments:(Array with:x with:y with:w with:h with:final)
+	dispatchEvent:#graphicsExposeX:y:width:height:final:
+	arguments:(Array with:x with:y with:w with:h with:final)
 
 "/    WindowEvent
 "/        sendEvent:#graphicsExposeX:y:width:height:final:
@@ -250,9 +250,9 @@
 
     xlatedKey := aView graphicsDevice translateKey:untranslatedKey forView:aView.
     xlatedKey notNil ifTrue:[
-        aView
-            dispatchEvent:#keyPress:x:y:
-            arguments:(Array with:xlatedKey with:x with:y)
+	aView
+	    dispatchEvent:#keyPress:x:y:
+	    arguments:(Array with:xlatedKey with:x with:y)
 
 "/        WindowEvent
 "/          sendEvent:#keyPress:x:y:
@@ -273,9 +273,9 @@
 
     xlatedKey := aView graphicsDevice translateKey:untranslatedKey forView:aView.
     xlatedKey notNil ifTrue:[
-        aView
-            dispatchEvent:#keyRelease:x:y:
-            arguments:(Array with:xlatedKey with:x with:y)
+	aView
+	    dispatchEvent:#keyRelease:x:y:
+	    arguments:(Array with:xlatedKey with:x with:y)
 
 "/        WindowEvent
 "/            sendEvent:#keyRelease:x:y:
@@ -295,12 +295,12 @@
     "Created: 24.11.1995 / 19:18:01 / cg"
 !
 
-mouseWheelMotion:amount state:state view:aView
+mouseWheelMotion:amount state:state deltaTime:dTime view:aView
     "forward a wheel-motion for some view"
 
     aView
-        dispatchEvent:#mouseWheelMotion:state:
-        arguments:(Array with:amount with:state)
+	dispatchEvent:#mouseWheelMotion:state:deltaTime:
+	arguments:(Array with:amount with:state with:dTime)
 
     "Created: / 21.5.1999 / 13:07:51 / cg"
 !
@@ -309,12 +309,12 @@
     "forward a noExpose event for some view"
 
     catchExpose isNil ifTrue:[
-        'SWSensor [info]: noExpose but not catching' infoPrintCR.
+	'SWSensor [info]: noExpose but not catching' infoPrintCR.
     ].
 
     (catchExpose includes:aView) ifTrue:[
-        gotExpose add:aView.
-        catchExpose remove:aView.
+	gotExpose add:aView.
+	catchExpose remove:aView.
     ].
     aView noExpose.
 
@@ -326,8 +326,8 @@
     "forward a pointer enter for some view"
 
     aView
-        dispatchEvent:#pointerEnter:x:y:
-        arguments:(Array with:buttonState with:x with:y)
+	dispatchEvent:#pointerEnter:x:y:
+	arguments:(Array with:buttonState with:x with:y)
 
 "/    WindowEvent
 "/        sendEvent:#pointerEnter:x:y:
@@ -342,8 +342,8 @@
     "forward a pointer leave for some view"
 
     aView
-        dispatchEvent:#pointerLeave:
-        arguments:(Array with:buttonState)
+	dispatchEvent:#pointerLeave:
+	arguments:(Array with:buttonState)
 
 "/    WindowEvent
 "/        sendEvent:#pointerLeave:
@@ -384,7 +384,7 @@
     "start catching noExpose events (must be done BEFORE a bitblt)."
 
     catchExpose notEmpty ifTrue:[
-        'SWSensor [warning]: already catching in catchExpose' errorPrintCR.
+	'SWSensor [warning]: already catching in catchExpose' errorPrintCR.
     ].
 
     gotOtherEvent remove:aView ifAbsent:nil.
@@ -403,26 +403,26 @@
 
     "/ this is only needed for X ...
     device scrollsAsynchronous ifTrue:[
-        windowId := aView id.
+	windowId := aView id.
 
-        "/
-        "/ cannot suspend, I am a synchronous-modal sensor
-        "/ must poll for the event
-        "/
-        endPollTime := AbsoluteTime now addSeconds:10.
-        stopPoll := false.
+	"/
+	"/ cannot suspend, I am a synchronous-modal sensor
+	"/ must poll for the event
+	"/
+	endPollTime := AbsoluteTime now addSeconds:10.
+	stopPoll := false.
 
-        [(gotExpose includes:aView) or:[stopPoll]] whileFalse:[
-            (device exposeEventPendingFor:windowId withSync:true) ifTrue:[
-                device dispatchExposeEventFor:windowId.
-            ].
-            stopPoll := (AbsoluteTime now > endPollTime).
-            Processor yield.
-        ].
+	[(gotExpose includes:aView) or:[stopPoll]] whileFalse:[
+	    (device exposeEventPendingFor:windowId withSync:true) ifTrue:[
+		device dispatchExposeEventFor:windowId.
+	    ].
+	    stopPoll := (AbsoluteTime now > endPollTime).
+	    Processor yield.
+	].
 
-        stopPoll ifTrue:[
-            'SyncWindowSensor [warning]: lost expose event' errorPrintCR.
-        ]
+	stopPoll ifTrue:[
+	    'SyncWindowSensor [warning]: lost expose event' errorPrintCR.
+	]
     ].
 
     catchExpose remove:aView ifAbsent:nil.
@@ -434,5 +434,5 @@
 !SynchronousWindowSensor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SynchronousWindowSensor.st,v 1.18 1999-05-21 11:23:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SynchronousWindowSensor.st,v 1.19 1999-05-22 14:32:22 cg Exp $'
 ! !