KeyboardForwarder.st
changeset 598 1a2339e902d4
parent 490 1d2ed059a063
child 612 8758d0c9933e
equal deleted inserted replaced
597:958e2673ca11 598:1a2339e902d4
    62     I can either forward the key event to another view, or to some general
    62     I can either forward the key event to another view, or to some general
    63     object - the difference is that views are sent a #keyXXX:x:y: message,
    63     object - the difference is that views are sent a #keyXXX:x:y: message,
    64     while general destinations get a #keyXXX:x:y:view: message, with the original
    64     while general destinations get a #keyXXX:x:y:view: message, with the original
    65     view (the one in which the event occurred) as additional argument.
    65     view (the one in which the event occurred) as additional argument.
    66 
    66 
    67     Instance Variables:
    67     [Instance Variables:]
    68 
    68 
    69 	destinationView         <View>          the view which shall receive
    69         destinationView         <View>          the view which shall receive
    70 						the forwarded keyboard events.
    70                                                 the forwarded keyboard events.
    71 
    71 
    72 	destination             <Object>        the object which shall receive
    72         destination             <Object>        the object which shall receive
    73 						the forwarded keyboard events.
    73                                                 the forwarded keyboard events.
    74 
    74 
    75 	sourceView              <ViewOrNil>     if non-nil, only events from this
    75         sourceView              <ViewOrNil>     if non-nil, only events from this
    76 						view are forwarded.
    76                                                 view are forwarded.
    77 						(currently nowhere used)
    77                                                 (currently nowhere used)
    78 
    78 
    79 	condition               <Symbol>        an additional condition for forwarding
    79         condition               <Symbol>        an additional condition for forwarding
    80 						currently only #noFocus is implemented.
    80                                                 currently only #noFocus is implemented.
    81 						The #noFocus condition will only forward
    81                                                 The #noFocus condition will only forward
    82 						events if no explicit focus has been
    82                                                 events if no explicit focus has been
    83 						set in the windowGroup.
    83                                                 set in the windowGroup.
    84 
    84 
    85 				<Block>         condition block - event is forwarded,
    85                                 <Block>         condition block - event is forwarded,
    86 						if it evaluates to true.
    86                                                 if it evaluates to true.
    87 						The block gets 3 arguments:
    87                                                 The block gets 3 arguments:
    88 						    eventType   #keyPress or #keyRelease
    88                                                     eventType   #keyPress or #keyRelease
    89 						    key         the key
    89                                                     key         the key
    90 						    view        the originating view
    90                                                     view        the originating view
    91 
    91 
    92     For more info on event handling/forwarding, see the documentation in
    92     For more info on event handling/forwarding, see the documentation in
    93     WindowSensor, WindowGroup and especially in WindowEvent.
    93     WindowSensor, WindowGroup and especially in WindowEvent.
       
    94 
       
    95     [see also:]
       
    96         WindowEvent WindowSensor WindowGroup
    94 "
    97 "
    95 !
    98 !
    96 
    99 
    97 examples
   100 examples
    98 "
   101 "
   420 ! !
   423 ! !
   421 
   424 
   422 !KeyboardForwarder class methodsFor:'documentation'!
   425 !KeyboardForwarder class methodsFor:'documentation'!
   423 
   426 
   424 version
   427 version
   425     ^ '$Header: /cvs/stx/stx/libview/KeyboardForwarder.st,v 1.12 1996-03-04 22:31:36 cg Exp $'
   428     ^ '$Header: /cvs/stx/stx/libview/KeyboardForwarder.st,v 1.13 1996-04-23 19:56:57 cg Exp $'
   426 ! !
   429 ! !