--- a/WindowEvent.st Tue Nov 27 18:44:03 2012 +0100
+++ b/WindowEvent.st Tue Nov 27 18:49:57 2012 +0100
@@ -102,6 +102,13 @@
privateIn:WindowEvent
!
+WindowEvent::InputEvent subclass:#KeyboardEvent
+ instanceVariableNames:'rawKey'
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:WindowEvent
+!
+
WindowEvent::ButtonEvent subclass:#ButtonMotionEvent
instanceVariableNames:''
classVariableNames:''
@@ -109,8 +116,8 @@
privateIn:WindowEvent
!
-WindowEvent::InputEvent subclass:#KeyboardEvent
- instanceVariableNames:'rawKey'
+WindowEvent::KeyboardEvent subclass:#KeyPressEvent
+ instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
privateIn:WindowEvent
@@ -123,8 +130,8 @@
privateIn:WindowEvent
!
-WindowEvent::KeyboardEvent subclass:#KeyPressEvent
- instanceVariableNames:''
+WindowEvent::KeyboardEvent subclass:#HotKeyEvent
+ instanceVariableNames:'hotkeyIdentifier'
classVariableNames:''
poolDictionaries:''
privateIn:WindowEvent
@@ -425,6 +432,19 @@
type:#focusOut
!
+hotkeyWithId:aHotkeyId rawKey:keyWithModifier view:aView
+
+ |ev|
+
+ ev := (HotKeyEvent new)
+ for:aView
+ type:#hotkeyWithId:rawKey:
+ arguments:(Array with:keyWithModifier with:0 with:0).
+ ev rawKey:keyWithModifier.
+ ev hotkeyIdentifier:aHotkeyId.
+ ^ ev
+!
+
keyPress:key rawKey:untranslatedKey
hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown
button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown
@@ -944,6 +964,12 @@
"Created: 5.3.1997 / 12:18:10 / cg"
!
+isHotKeyEvent
+ "return true, if this event is a hotkey event"
+
+ ^ false
+!
+
isInputEvent
"return true, if this event is an input (pointer, key or button) event"
@@ -1461,14 +1487,6 @@
"Created: / 21.5.1999 / 19:45:04 / cg"
! !
-!WindowEvent::ButtonMotionEvent methodsFor:'testing'!
-
-isButtonMotionEvent
- "return true, if this event is a buttonMotion event"
-
- ^ true
-! !
-
!WindowEvent::KeyboardEvent methodsFor:'accessing'!
key
@@ -1546,6 +1564,22 @@
"Created: 4.4.1997 / 13:39:59 / cg"
! !
+!WindowEvent::ButtonMotionEvent methodsFor:'testing'!
+
+isButtonMotionEvent
+ "return true, if this event is a buttonMotion event"
+
+ ^ true
+! !
+
+!WindowEvent::KeyPressEvent methodsFor:'testing'!
+
+isKeyPressEvent
+ "return true, if this event is a keyboard press event"
+
+ ^ true
+! !
+
!WindowEvent::KeyReleaseEvent methodsFor:'testing'!
isKeyReleaseEvent
@@ -1554,10 +1588,20 @@
^ true
! !
-!WindowEvent::KeyPressEvent methodsFor:'testing'!
+!WindowEvent::HotKeyEvent methodsFor:'accessing'!
+
+hotkeyIdentifier
+ ^ hotkeyIdentifier
+!
-isKeyPressEvent
- "return true, if this event is a keyboard press event"
+hotkeyIdentifier:something
+ hotkeyIdentifier := something.
+! !
+
+!WindowEvent::HotKeyEvent methodsFor:'testing'!
+
+isHotKeyEvent
+ "return true, if this event is a hotkey event"
^ true
! !
@@ -1703,7 +1747,7 @@
version_CVS
- ^ '$Header: /cvs/stx/stx/libview/WindowEvent.st,v 1.109 2012-11-02 18:46:06 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/WindowEvent.st,v 1.110 2012-11-27 17:49:57 ab Exp $'
!
version_SVN