[Pkg] The Trunk: Morphic-cmm.619.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jun 4 21:14:59 UTC 2012


Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.619.mcz

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

Name: Morphic-cmm.619
Author: cmm
Time: 23 May 2012, 6:56:59.194 pm
UUID: 9f1584fd-01ce-4dd0-bced-0a92e5ae049b
Ancestors: Morphic-bf.618

- Make mouseMove event handling more-consistent with handling for other events.
- Allow Morphic applications to handle mouseMove: events even if dragging or no button down without having to override a Morphic system-level method (#handleMouseMove:).
- Preserves backward compatibility for now -- legacy conditions get first chance to handle the event.

- Also, moved three Etoys-specific methods to Etoys.

=============== Diff against Morphic-bf.618 ===============

Item was changed:
  ----- Method: Morph>>handleMouseMove: (in category 'events-processing') -----
  handleMouseMove: anEvent
  	"System level event handling."
  	anEvent wasHandled ifTrue:[^self]. "not interested"
+ 	(self handlesMouseMove: anEvent) ifFalse: [ ^ self ].
- 	"Rules say that by default a morph gets #mouseMove iff
- 		* the hand is not dragging anything,
- 			+ and some button is down,
- 			+ and the receiver is the current mouse focus."
- 	(anEvent hand hasSubmorphs) ifTrue:[^self].
- 	(anEvent anyButtonPressed and:[anEvent hand mouseFocus == self]) ifFalse:[^self].
  	anEvent wasHandled: true.
  	self mouseMove: anEvent.
+ 	(anEvent anyButtonPressed and: [self handlesMouseStillDown: anEvent]) ifTrue:[
- 	(self handlesMouseStillDown: anEvent) ifTrue:[
  		"Step at the new location"
  		self startStepping: #handleMouseStillDown: 
  			at: Time millisecondClockValue
  			arguments: {anEvent copy resetHandlerFields}
  			stepTime: self mouseStillDownStepRate ].
  !

Item was added:
+ ----- Method: Morph>>handlesMouseMove: (in category 'event handling') -----
+ handlesMouseMove: anEvent 
+ 	"Do I want to receive mouseMove: when the hand passes over the receiver?  The default response is false, except if you have added sensitivity to mouseMove: using the on:send:to: mechanism."
+ 	"The following preserves legacy behavior, but we should consider requiring apps to answer whether they #handlesMouseMove: and deprecating this first sentence."
+ 	(anEvent hand hasSubmorphs not and:
+ 		[ anEvent anyButtonPressed and: [ anEvent hand mouseFocus == self ] ]) ifTrue: [ ^ true ].
+ 	self eventHandler ifNotNil: [ ^ self eventHandler handlesMouseOver: anEvent ].
+ 	^ false!

Item was removed:
- ----- Method: Morph>>isCandidateForAutomaticViewing (in category 'e-toy support') -----
- isCandidateForAutomaticViewing
- 	^ true!

Item was removed:
- ----- Method: PasteUpMorph>>isCandidateForAutomaticViewing (in category 'e-toy support') -----
- isCandidateForAutomaticViewing
- 	"A viewer on a world is a dangerous thing to get casually!!"
- 
- 	^ self isWorldMorph not!

Item was removed:
- ----- Method: SystemWindow>>isCandidateForAutomaticViewing (in category 'events') -----
- isCandidateForAutomaticViewing
- 	^ false!



More information about the Packages mailing list