--- a/EventMonitor.st Sun Jan 12 23:30:25 2014 +0000
+++ b/EventMonitor.st Wed Apr 01 10:38:01 2015 +0100
@@ -1,6 +1,6 @@
"
COPYRIGHT (c) 1991 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
@@ -12,18 +12,18 @@
"{ Package: 'stx:libtool' }"
ApplicationModel subclass:#EventMonitor
- instanceVariableNames:'outputSelector'
- classVariableNames:''
- poolDictionaries:''
- category:'Monitors-ST/X'
+ instanceVariableNames:'outputSelector'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Monitors-ST/X'
!
View subclass:#EventMonitorView
- instanceVariableNames:'outputStream labelHolder showButtonMotion showFocusEvents
- showTimestamp'
- classVariableNames:''
- poolDictionaries:''
- privateIn:EventMonitor
+ instanceVariableNames:'outputStream labelHolder showButtonMotion showFocusEvents
+ showTimestamp'
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:EventMonitor
!
!EventMonitor class methodsFor:'documentation'!
@@ -31,7 +31,7 @@
copyright
"
COPYRIGHT (c) 1991 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
@@ -47,7 +47,7 @@
like xev - show events.
You can use this to check your keyboard mappings, for example.
- start with:
+ start with:
EventMonitor open
and watch the output on the xterm/console.
"
@@ -80,10 +80,10 @@
<resource: #canvas>
- ^
+ ^
#(FullSpec
name: windowSpec
- window:
+ window:
(WindowSpec
label: 'EventMonitor'
name: 'EventMonitor'
@@ -91,7 +91,7 @@
bounds: (Rectangle 0 0 300 300)
menu: mainMenu
)
- component:
+ component:
(SpecCollection
collection: (
(NonScrollableArbitraryComponentSpec
@@ -100,7 +100,7 @@
component: EventMonitorView
)
)
-
+
)
)
! !
@@ -121,13 +121,13 @@
<resource: #menu>
- ^
+ ^
#(Menu
(
(MenuItem
label: 'File'
translateLabel: true
- submenu:
+ submenu:
(Menu
(
(MenuItem
@@ -148,7 +148,7 @@
(MenuItem
label: 'Filter'
translateLabel: true
- submenu:
+ submenu:
(Menu
(
(MenuItem
@@ -171,7 +171,7 @@
(MenuItem
label: 'Output'
translateLabel: true
- submenu:
+ submenu:
(Menu
(
(MenuItem
@@ -204,7 +204,7 @@
label: 'Help'
translateLabel: true
startGroup: right
- submenu:
+ submenu:
(Menu
(
(MenuItem
@@ -323,7 +323,7 @@
"
like xev - show events.
You can use this to check your keyboard mappings, for example.
- start with:
+ start with:
EventMonitorView open
and watch the output on xterm.
"
@@ -393,10 +393,11 @@
!EventMonitor::EventMonitorView methodsFor:'drawing'!
redraw
- |y p lines|
+ |y p lines font|
self clear.
lines := labelHolder value asCollectionOfLines.
+ font := gc font.
y := (self height - ((font heightOf:'A') * lines size)) // 2.
lines do:[:eachLine |
@@ -577,7 +578,7 @@
, ' (' , key asciiValue printString , ')'.
] ifFalse:[
s := ' symbolic key:' , key storeString.
- untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
+ untranslatedKey := self graphicsDevice keyboardMap keyAtValue:key ifAbsent:key.
untranslatedKey ~~ key ifTrue:[
s := s , ' untranslated key:' , untranslatedKey storeString
].
@@ -618,7 +619,7 @@
' (' printOn:outputStream. key asciiValue printOn:outputStream. ')' printOn:outputStream
] ifFalse:[
' symbolic key:' print. key storeString printOn:outputStream.
- untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
+ untranslatedKey := self graphicsDevice keyboardMap keyAtValue:key ifAbsent:key.
untranslatedKey ~~ key ifTrue:[
' untranslated key:' printOn:outputStream. untranslatedKey storeString printOn:outputStream
]
@@ -653,7 +654,7 @@
"Modified: / 04-10-2006 / 13:09:34 / cg"
!
-pointerLeave:state
+pointerLeave:state
self showEventTime.
outputStream nextPutAll:'pointerLeave state:'.
@@ -722,15 +723,6 @@
!EventMonitor class methodsFor:'documentation'!
version
- ^ '$Id: EventMonitor.st 7958 2012-03-29 13:52:31Z vranyj1 $'
-!
-
-version_HG
-
- ^ '$Changeset: <not expanded> $'
-!
-
-version_SVN
- ^ '$Id: EventMonitor.st 7958 2012-03-29 13:52:31Z vranyj1 $'
+ ^ '$Header: /cvs/stx/stx/libtool/EventMonitor.st,v 1.32 2014-03-20 12:53:40 stefan Exp $'
! !