The Trunk: ToolBuilder-Morphic-topa.193.mcz

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

The Trunk: ToolBuilder-Morphic-topa.193.mcz

commits-2
Tobias Pape uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-topa.193.mcz

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

Name: ToolBuilder-Morphic-topa.193
Author: topa
Time: 27 April 2017, 10:03:36.534691 am
UUID: 026d52d0-05a6-4b19-a951-01e2cfac7d5c
Ancestors: ToolBuilder-Morphic-ul.192

Factoring the MorphicToolBuilder openning behavior

=============== Diff against ToolBuilder-Morphic-ul.192 ===============

Item was added:
+ ----- Method: DialogWindow>>morphicOpenWith: (in category '*ToolBuilder-Morphic-opening') -----
+ morphicOpenWith: aMorphicToolBuilder
+
+ ^ self
+ moveToHand;
+ getUserResponse!

Item was added:
+ ----- Method: MenuMorph>>morphicOpenWith: (in category '*ToolBuilder-Morphic-opening') -----
+ morphicOpenWith: aMorphicToolBuilder
+
+ self popUpInWorld: World.
+ ^ super morphicOpenWith: aMorphicToolBuilder!

Item was added:
+ ----- Method: Morph>>morphicOpenWith: (in category '*ToolBuilder-Morphic-opening') -----
+ morphicOpenWith: aMorphicToolBuilder
+
+ ^ self openInWorld!

Item was changed:
  ----- Method: MorphicToolBuilder>>open: (in category 'opening') -----
  open: anObject
  "Build and open the object. Answer the widget opened."
  | morph |
+ morph := anObject isMorph ifTrue: [anObject] ifFalse: [self build: anObject].
+ ^ morph morphicOpenWith: self!
- anObject isMorph
- ifTrue:[morph := anObject]
- ifFalse:[morph := self build: anObject].
- (morph isKindOf: MenuMorph)
- ifTrue:[morph popUpInWorld: World].
- (morph isKindOf: DialogWindow)
- ifTrue: [^ morph moveToHand; getUserResponse].
- (morph isKindOf: SystemWindow)
- ifFalse:[morph openInWorld]
- ifTrue:[
- morph := morph openInWorldExtent: morph extent.
- (Project uiManager openToolsAttachedToMouseCursor
- and: [self currentEvent isMouse  and: [self currentEvent isMouseUp]])
- ifTrue: [
- morph setProperty: #initialDrop toValue: true.
- morph hasDropShadow: false.
- self currentHand attachMorph: morph]].
- ^morph!

Item was added:
+ ----- Method: SystemWindow>>morphicOpenWith: (in category '*ToolBuilder-Morphic-opening') -----
+ morphicOpenWith: aMorphicToolBuilder
+
+ | morph |
+ morph := self openInWorldExtent: self extent.
+ (Project uiManager openToolsAttachedToMouseCursor
+ and: [ | event |
+ event := aMorphicToolBuilder currentEvent.
+ event isMouse and: [event isMouseUp]])
+ ifTrue: [
+ morph setProperty: #initialDrop toValue: true.
+ morph hasDropShadow: false.
+ aMorphicToolBuilder currentHand attachMorph: morph].
+ ^ morph
+ !