--- a/EventMonitor.st Fri Sep 29 23:44:13 2006 +0200
+++ b/EventMonitor.st Wed Oct 04 13:05:58 2006 +0200
@@ -20,7 +20,7 @@
!
View subclass:#EventMonitorView
- instanceVariableNames:'outputStream labelHolder showButtonMotion'
+ instanceVariableNames:'outputStream labelHolder showButtonMotion showFocusEvents'
classVariableNames:''
poolDictionaries:''
privateIn:EventMonitor
@@ -148,11 +148,17 @@
(Menu
(
(MenuItem
- label: 'Show ButtonMotion'
+ label: 'Show ButtonMotion Events'
itemValue: showButtonMotion:
translateLabel: true
indication: showButtonMotion
)
+ (MenuItem
+ label: 'Show Focus Events'
+ itemValue: showFocusEvents:
+ translateLabel: true
+ indication: showFocusEvents
+ )
)
nil
nil
@@ -210,6 +216,8 @@
nil
nil
)
+
+ "Modified: / 04-10-2006 / 13:05:46 / cg"
! !
!EventMonitor methodsFor:'aspects'!
@@ -244,6 +252,18 @@
showButtonMotion:aBoolean
^ self eventMonitorView showButtonMotion:aBoolean
+!
+
+showFocusEvents
+ ^ self eventMonitorView showFocusEvents
+
+ "Created: / 04-10-2006 / 13:05:16 / cg"
+!
+
+showFocusEvents:aBoolean
+ ^ self eventMonitorView showFocusEvents:aBoolean
+
+ "Created: / 04-10-2006 / 13:05:19 / cg"
! !
!EventMonitor methodsFor:'menu actions'!
@@ -292,8 +312,8 @@
!EventMonitor::EventMonitorView methodsFor:'accessing'!
-outputStream:something
- outputStream := something.
+outputStream:aStream
+ outputStream := aStream.
labelHolder value:nil.
outputStream == Stdout ifTrue:[
@@ -303,14 +323,32 @@
labelHolder value: 'See event trace\on the Transcript' withCRs.
].
self invalidate.
+
+ "Modified: / 04-10-2006 / 13:04:16 / cg"
!
showButtonMotion
- ^ showButtonMotion ? true
+ ^ showButtonMotion ? false
+
+ "Modified: / 04-10-2006 / 13:03:31 / cg"
+!
+
+showButtonMotion:aBoolean
+ showButtonMotion := aBoolean.
+
+ "Modified: / 04-10-2006 / 13:04:08 / cg"
!
-showButtonMotion:something
- showButtonMotion := something.
+showFocusEvents
+ ^ showFocusEvents ? true
+
+ "Created: / 04-10-2006 / 13:03:48 / cg"
+!
+
+showFocusEvents:aBoolean
+ showFocusEvents := aBoolean.
+
+ "Created: / 04-10-2006 / 13:04:04 / cg"
! !
!EventMonitor::EventMonitorView methodsFor:'drawing'!
@@ -426,25 +464,31 @@
!
focusIn
+ self showFocusEvents ifFalse:[^ self].
+
outputStream nextPutLine:'focusIn '.
- "Created: 7.3.1996 / 15:06:18 / cg"
- "Modified: 5.4.1997 / 01:23:48 / cg"
+ "Created: / 07-03-1996 / 15:06:18 / cg"
+ "Modified: / 04-10-2006 / 13:04:33 / cg"
!
focusOut
+ self showFocusEvents ifFalse:[^ self].
+
outputStream nextPutLine:'focusOut '.
- "Created: 7.3.1996 / 15:06:21 / cg"
- "Modified: 5.4.1997 / 01:23:49 / cg"
+ "Created: / 07-03-1996 / 15:06:21 / cg"
+ "Modified: / 04-10-2006 / 13:04:40 / cg"
!
hasKeyboardFocus:aBoolen
+ self showFocusEvents ifFalse:[^ self].
+
outputStream nextPutAll:'hasKeyboardFocus:'.
aBoolen printOn:outputStream.
outputStream cr.
- "Modified: / 19.5.1999 / 09:42:59 / cg"
+ "Modified: / 04-10-2006 / 13:04:43 / cg"
!
keyPress:key x:x y:y
@@ -573,5 +617,5 @@
!EventMonitor class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/EventMonitor.st,v 1.26 2006-09-20 08:30:48 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/EventMonitor.st,v 1.27 2006-10-04 11:05:58 cg Exp $'
! !