ButtonC.st
changeset 1062 5fbcf4ce6a51
parent 985 6e8a73b27390
child 1091 0a995cb78516
equal deleted inserted replaced
1061:eef045108fe0 1062:5fbcf4ce6a51
   467 
   467 
   468 keyPress:key x:x y:y
   468 keyPress:key x:x y:y
   469     "trigger on Return and space, if I am the focusView of my group
   469     "trigger on Return and space, if I am the focusView of my group
   470      (i.e. if I got an explicit focus)"
   470      (i.e. if I got an explicit focus)"
   471 
   471 
   472     key == Character space ifTrue:[
   472     view hasFocus ifTrue:[
   473         view hasFocus ifTrue:[
   473         ((key == Character space)
       
   474         or:[key == #Return]) ifTrue:[
   474             "just simulate a buttonPress/release here."
   475             "just simulate a buttonPress/release here."
   475             self buttonPress:1 x:0 y:0.
   476             self buttonPress:1 x:0 y:0.
   476             self buttonRelease:1 x:0 y:0.
   477             self buttonRelease:1 x:0 y:0.
   477             ^ self.
   478             ^ self.
   478         ]
   479         ]
   479     ].
   480     ].
   480     view keyPress:key x:x y:y
   481     view keyPress:key x:x y:y
   481 
   482 
   482     "Modified: 9.2.1996 / 23:11:58 / cg"
   483     "Modified: 26.2.1997 / 00:50:25 / cg"
   483 !
   484 !
   484 
   485 
   485 performAction
   486 performAction
   486     |action value|
   487     |action value|
   487 
   488 
   636 ! !
   637 ! !
   637 
   638 
   638 !ButtonController class methodsFor:'documentation'!
   639 !ButtonController class methodsFor:'documentation'!
   639 
   640 
   640 version
   641 version
   641     ^ '$Header: /cvs/stx/stx/libwidg/Attic/ButtonC.st,v 1.39 1997-01-29 12:26:15 cg Exp $'
   642     ^ '$Header: /cvs/stx/stx/libwidg/Attic/ButtonC.st,v 1.40 1997-02-25 23:51:27 cg Exp $'
   642 ! !
   643 ! !