The Trunk: Morphic-dtl.1361.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-dtl.1361.mcz

commits-2
David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.1361.mcz

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

Name: Morphic-dtl.1361
Author: dtl
Time: 12 November 2017, 10:57:32.005971 am
UUID: fea8582b-a6a4-4716-ada2-cd017bc930fb
Ancestors: Morphic-dtl.1360

Use "self world" instead of "Project current world" in Morph methods, and update a few more methods.

=============== Diff against Morphic-dtl.1360 ===============

Item was changed:
  ----- Method: CornerGripMorph class>>drawCornerResizeHandles: (in category 'preferences') -----
  drawCornerResizeHandles: aBoolean
 
+ | world |
  DrawCornerResizeHandles := aBoolean.
+ world := self world.
+ world invalidRect: world bounds from: world.!
- World invalidRect: World bounds from: World.!

Item was changed:
  ----- Method: DockingBarMorph class>>example1 (in category 'samples') -----
  example1
  "
  DockingBarMorph example1.  
 
  (Color lightBlue wheel: 4) do:[:c | DockingBarMorph example1
  color: c; borderColor: c twiceDarker].
 
+ Project current world deleteDockingBars.
- World deleteDockingBars.
  "
  | instance |
  instance := DockingBarMorph new.
  ""
  instance addSpace: 10.
  instance
  addMorphBack: (ClockMorph new show24hr: true).
  instance addSpacer.
  instance
  addMorphBack: (ClockMorph new show24hr: true).
  instance addSpace: 10.
  ""
  instance adhereToTop.
  ""
  instance autoGradient: true.
  instance layoutInset: 10.
  ""
  ^ instance openInWorld!

Item was changed:
  ----- Method: DockingBarMorph class>>example2 (in category 'samples') -----
  example2
  "
  DockingBarMorph example2.  
+ Project current world deleteDockingBars.  
- World deleteDockingBars.  
  "
  | menu |
  menu := DockingBarMorph new.
  ""
  menu addSpace: 10.
  menu
  add: 'Squeak'
  icon: MenuIcons smallConfigurationIcon
  subMenu: self squeakMenu.
  menu
  add: 'Configuration'
  icon: MenuIcons smallWindowIcon
  subMenu: self squeakMenu.
  menu addSpace: 10.
  menu addLine.
  menu addSpace: 10.
  menu
  addMorphBack: (ImageMorph new image: MenuIcons smallBackIcon).
  menu addSpace: 10.
  menu
  addMorphBack: (ImageMorph new image: MenuIcons smallForwardIcon).
  menu addSpace: 10.
  menu addLine.
  menu addSpacer.
  ""
  menu addMorphBack: ProjectNavigationMorph new speakerIcon.
  ""
  menu addSpace: 10.
  menu
  addMorphBack: (ClockMorph new show24hr: true).
  menu addSpace: 10.
  ""
  menu adhereToTop.
  ""
  menu autoGradient: true.
  ""
  ^ menu openInWorld!

Item was changed:
  ----- Method: DockingBarMorph class>>example3 (in category 'samples') -----
  example3
  "
  DockingBarMorph example3.
+ Project current world deleteDockingBars.
- World deleteDockingBars.
  "
  (Color lightBlue wheel: 4)
  with: #(#top #bottom #left #right )
  do: [:col :edge |
  | instance |
  instance := DockingBarMorph example1.
  instance adhereTo: edge.
  instance color: col.
  instance borderColor: col twiceDarker]!

Item was changed:
  ----- Method: Morph>>updateFromResource (in category 'fileIn/out') -----
  updateFromResource
  | pathName newMorph f |
  (pathName := self valueOfProperty: #resourceFilePath) ifNil: [^self].
  (pathName asLowercase endsWith: '.morph')
  ifTrue:
  [newMorph := (FileStream readOnlyFileNamed: pathName) fileInObjectAndCode.
  (newMorph isMorph)
  ifFalse: [^self error: 'Resource not a single morph']]
  ifFalse:
  [f := Form fromFileNamed: pathName.
  f ifNil: [^self error: 'unrecognized image file format'].
+ newMorph := self world drawingClass withForm: f].
- newMorph := Project current world drawingClass withForm: f].
  newMorph setProperty: #resourceFilePath toValue: pathName.
  self owner replaceSubmorph: self by: newMorph!

Item was changed:
  ----- Method: MorphHierarchyListMorph>>createContainer (in category 'private') -----
  createContainer
  "Private - Create a container"
  | container |
  container := BorderedMorph new.
+ container extent: (self world extent * (1 / 4 @ (2 / 3))) rounded.
- container extent: (Project current world extent * (1 / 4 @ (2 / 3))) rounded.
  container layoutPolicy: TableLayout new.
  container hResizing: #rigid.
  container vResizing: #rigid.
  container
  setColor: (Color gray: 0.9)
  borderWidth: 1
  borderColor: Color gray.
  container layoutInset: 0.
  "container useRoundedCorners."
  ""
  container setProperty: #morphHierarchy toValue: true.
  container setNameTo: 'Objects Hierarchy' translated.
  ""
  ^ container!