WindowEvent.st
changeset 1158 847d085a498f
parent 727 bf23a306b6f2
child 1295 ef93ded3c030
--- a/WindowEvent.st	Wed Jan 08 11:25:16 1997 +0100
+++ b/WindowEvent.st	Wed Jan 08 11:26:14 1997 +0100
@@ -479,6 +479,26 @@
     ^ type == #pointerLeave:view:
 
     "Created: 9.1.1996 / 15:51:36 / cg"
+!
+
+isUserEvent
+    "return true, if this event is a user event (i.e. mouse, keyboard or button)"
+
+    (type == #buttonPress:x:y:) ifTrue:[^ true].
+    (type == #buttonRelease:x:y:) ifTrue:[^ true].
+    (type == #buttonShiftPress:x:y:) ifTrue:[^ true].
+    (type == #buttonMultiPress:x:y:) ifTrue:[^ true].
+    (type == #buttonMotion:x:y:) ifTrue:[^ true].
+
+    (type == #pointerEnter:x:y:) ifTrue:[^ true].
+    (type == #pointerLeave:view:) ifTrue:[^ true].
+
+    (type == #keyPress:x:y:) ifTrue:[^ true].
+    (type == #keyRelease:x:y:) ifTrue:[^ true].
+
+    ^ false
+
+    "Modified: 8.1.1997 / 11:22:17 / cg"
 ! !
 
 !WindowEvent methodsFor:'sending'!
@@ -508,5 +528,5 @@
 !WindowEvent class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowEvent.st,v 1.28 1996-05-28 15:57:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowEvent.st,v 1.29 1997-01-08 10:26:14 cg Exp $'
 ! !