[squeak-dev] The Trunk: Morphic-mt.852.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Apr 10 13:05:53 UTC 2015


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.852.mcz

==================== Summary ====================

Name: Morphic-mt.852
Author: mt
Time: 10 April 2015, 3:05:10.54 pm
UUID: 3fbc4d70-77b4-824f-8ec6-a66ae712ce9a
Ancestors: Morphic-mt.851

Convenient messages added to morphs to check for current mouse or keyboard focus. Could be used, for example, to change visual appearnce to indicate that focus. Does not happen yet (except for the blinking text cursor). (in conjunction with #keyboardFocusChange:).

Note: We should get rid of #hasFocus because only hands now the exact information. For multiple hands, such cached information in the morph may not valid anyway.

=============== Diff against Morphic-mt.851 ===============

Item was changed:
  ----- Method: Morph>>hasFocus (in category 'event handling') -----
  hasFocus
+ 
+ 	self flag: #obsolete. "mt: Use #hasKeyboardFocus instead, which reads live hand information and no cache."
  	^ false!

Item was added:
+ ----- Method: Morph>>hasKeyboardFocus (in category 'event handling') -----
+ hasKeyboardFocus
+ 
+ 	^ self hasKeyboardFocus: self activeHand!

Item was added:
+ ----- Method: Morph>>hasKeyboardFocus: (in category 'event handling') -----
+ hasKeyboardFocus: aHand
+ 
+ 	^ aHand keyboardFocus == self!

Item was added:
+ ----- Method: Morph>>hasMouseFocus (in category 'event handling') -----
+ hasMouseFocus
+ 
+ 	^ self hasMouseFocus: self activeHand!

Item was added:
+ ----- Method: Morph>>hasMouseFocus: (in category 'event handling') -----
+ hasMouseFocus: aHand
+ 
+ 	^ aHand mouseFocus == self!



More information about the Squeak-dev mailing list