--- a/KeyboardForwarder.st Wed May 10 04:26:41 1995 +0200
+++ b/KeyboardForwarder.st Fri May 12 20:01:16 1995 +0200
@@ -24,7 +24,7 @@
version
"
-$Header: /cvs/stx/stx/libview/KeyboardForwarder.st,v 1.4 1995-05-09 00:21:39 claus Exp $
+$Header: /cvs/stx/stx/libview/KeyboardForwarder.st,v 1.5 1995-05-12 18:00:26 claus Exp $
"
!
@@ -35,7 +35,8 @@
Notice, that delegates dont have to be instances of
myself; any object with a protocol similar to mine can be used as
a delegate.
- (i.e. any object that responds to handlesKeyPress:view: / keyPress:x:y:view: etc.)
+ (i.e. any object that responds to
+ handlesKeyPress:view: / keyPress:x:y:view: / delegatesTo: etc.)
However, I provide the most common functions required for conditional
event delegation and instances of myself are for example used to forward
@@ -177,6 +178,12 @@
!KeyboardForwarder methodsFor:'queries'!
+delegatesTo:someone
+ "return true, if I delegate events to someone"
+
+ ^ destination == someone or:[destinationView == someone]
+!
+
handlesKeyPress:key inView:aView
"this is the query from the sensor to ask me if I would like to
get a keyPress event for key from aView. Return true, if I want so,