The Trunk: Morphic-cmm.620.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-cmm.620.mcz

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

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

Name: Morphic-cmm.620
Author: cmm
Time: 4 June 2012, 3:55:02.935 pm
UUID: 0ddf089c-043a-47fe-b5ee-6e3759094f35
Ancestors: Morphic-cmm.619

- Simply extract the criteria for whether a morph should handle MouseMoveEvents into Morph>>#handleMouseMove: so subclasses can override.
- Moved a few Etoys methods to the Etoys package.
- Make findAFileList: find one without unaccepted edits, so it does not force the user to save just to have a navigable FileList.
- Mark some unused methods as such.

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

Item was changed:
  ----- Method: Morph>>handleMouseMove: (in category 'events-processing') -----
+ handleMouseMove: anEvent
- handleMouseMove: anEvent
  "System level event handling."
+ anEvent wasHandled ifTrue: [ ^ self ].
+ "not interested"
+ (self handlesMouseMove: anEvent) ifFalse: [ ^ self ].
- anEvent wasHandled ifTrue:[^self]. "not interested"
- "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.
+ (self handlesMouseStillDown: anEvent) ifTrue:
+ [ "Step at the new location"
+ self
+ startStepping: #handleMouseStillDown:
- (self handlesMouseStillDown: anEvent) ifTrue:[
- "Step at the new location"
- self startStepping: #handleMouseStillDown:
  at: Time millisecondClockValue
  arguments: {anEvent copy resetHandlerFields}
+ stepTime: self mouseStillDownStepRate ]!
- 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?  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: [ ^ false ].
+ (anEvent anyButtonPressed and: [ anEvent hand mouseFocus == self ]) ifFalse: [ ^ false ].
+ ^ true!

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

Item was changed:
  ----- Method: PasteUpMorph>>findAFileList: (in category 'world menu') -----
  findAFileList: evt
+ "Bring a file list to the foreground, reusing an existing one if possible."
- "Locate a file list, open it, and bring it to the front.
- Create one if necessary, respecting the Preference."
-
  self
+ findAWindowSatisfying: [ : aWindow | (aWindow model class = FileList) and: [ aWindow model hasUnacceptedEdits not ] ]
+ orMakeOneUsing: [ FileList prototypicalToolWindow openInWorld ]!
- findAWindowSatisfying: [:aWindow | aWindow model isKindOf: FileList]
- orMakeOneUsing: [FileList2 prototypicalToolWindow openInWorld]
- !

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!

Item was changed:
  ----- Method: TransferMorph>>dropNotifyRecipient (in category 'accessing') -----
  dropNotifyRecipient
+ self isThisEverCalled.
  ^dropNotifyRecipient!

Item was changed:
  ----- Method: TransferMorph>>dropNotifyRecipient: (in category 'accessing') -----
  dropNotifyRecipient: anObject
+ self isThisEverCalled.
  dropNotifyRecipient := anObject!

Item was changed:
  ----- Method: TransferMorph>>result: (in category 'dropping/grabbing') -----
  result: result
+ self isThisEverCalled.
  ^ self result: result from: nil!

Item was changed:
  ----- Method: TransferMorph>>result:from: (in category 'dropping/grabbing') -----
  result: aResult from: aResultGenerator
+ "Send aResult of the drop operation computed by aResultGenerator to a resultRecipient, if it exists."
+ self isThisEverCalled.
- "Send aResult of the drop operation computed by aResultGenerator to a  
- resultRecipient, if it exists."
  resultRecipient ifNotNil: [resultRecipient dropResult: aResult from: aResultGenerator]!