The Trunk: Morphic-cmm.805.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.805.mcz

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

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

Name: Morphic-cmm.805
Author: cmm
Time: 1 April 2015, 11:11:23.537 am
UUID: 2667ac2e-7e09-4a67-8efe-2da1a499f090
Ancestors: Morphic-mt.804

- SimpleHierarchicalListMorph's now honor preferences:
        mouseOverForKeyboardFocus
        Vertical Smart Splitters
- Don't let splitter bars be dragged further than their PluggableListMorphs want them to go.
- PluggableTextMorph's now honor Vertical Smart Splitters to avoid wrapped lines, if possible.

=============== Diff against Morphic-mt.804 ===============

Item was added:
+ ----- Method: MorphicModel>>charactersOccluded (in category 'geometry') -----
+ charactersOccluded
+ "Subclasses override as necessary to keep smart-splitters balanced."
+ ^ 0!

Item was changed:
+ ----- Method: MorphicModel>>model (in category 'accessing') -----
- ----- Method: MorphicModel>>model (in category 'access') -----
  model
  ^ model!

Item was changed:
+ ----- Method: MorphicModel>>slotName (in category 'accessing') -----
- ----- Method: MorphicModel>>slotName (in category 'access') -----
  slotName
  ^ slotName!

Item was changed:
+ ----- Method: MorphicModel>>wantsSlot (in category 'accessing') -----
- ----- Method: MorphicModel>>wantsSlot (in category 'access') -----
  wantsSlot
  "Override this default for models that want to be installed in theri model"
  ^ false!

Item was changed:
+ ----- Method: PluggableListMorph>>charactersOccluded (in category 'geometry') -----
- ----- Method: PluggableListMorph>>charactersOccluded (in category 'accessing') -----
  charactersOccluded
  "Answer the number of characters occluded in my #visibleList by my right edge."
  | listIndex | listIndex:=0.
  ^ self visibleList
  inject: 0
  into:
  [ : sum : each | | eachString totalWidth indexOfLastVisible iconWidth |
  totalWidth:=0.
  eachString := each asString "withBlanksTrimmed".
  iconWidth := (self iconAt: (listIndex := listIndex+1)) ifNil:[0] ifNotNil: [ : icon | icon width+2 ].
  indexOfLastVisible := ((1 to: eachString size)
  detect:
  [ : stringIndex | (totalWidth:=totalWidth+(self font widthOf: (eachString at: stringIndex))) >
  (self width -
  (scrollBar
  ifNil: [ 0 ]
  ifNotNil: [ scrollBar width ]) - iconWidth) ]
  ifNone: [ eachString size + 1 ]) - 1.
  sum + (eachString size - indexOfLastVisible) ]!

Item was changed:
  ----- Method: PluggableListMorph>>iconAt: (in category 'model access') -----
  iconAt: anInteger
 
  | index |
  index := (self hasFilter and: [list notNil])
+ ifTrue: [self getFullList indexOf: (list at: anInteger ifAbsent: [^nil])]
- ifTrue: [self getFullList indexOf: (list at: anInteger)]
  ifFalse: [anInteger].
  ^ getIconSelector ifNotNil: [model perform: getIconSelector with: index]!

Item was added:
+ ----- Method: PluggableListMorph>>initialize (in category 'geometry') -----
+ initialize
+ super initialize.
+ self minWidth: 38!

Item was added:
+ ----- Method: PluggableTextMorph>>charactersOccluded (in category 'geometry') -----
+ charactersOccluded
+ "Let the receiver  suggest to its neighboring vertical Splitter(s) that they try to optimize their position such that none of the receivers lines need to wrap."
+ | numberOfLogicalLines numberOfPhysicalLines |
+ numberOfLogicalLines := self text lineCount.
+ numberOfPhysicalLines:= textMorph paragraph numberOfLines.
+ ^ numberOfPhysicalLines - numberOfLogicalLines!

Item was changed:
  ----- Method: ProportionalSplitterMorph>>charactersOccludedIn: (in category 'layout') -----
  charactersOccludedIn: aCollection
  ^ aCollection
  inject: 0
  into:
  [ : max : each | max max:
+ (each isMorphicModel
- (each isPluggableListMorph
  ifTrue: [ each charactersOccluded ]
  ifFalse: [ 0 ]) ]!

Item was added:
+ ----- Method: ScrollPane>>scrollBar (in category 'testing') -----
+ scrollBar
+ ^ scrollBar!

Item was added:
+ ----- Method: SimpleHierarchicalListMorph>>mouseLeave: (in category 'event handling') -----
+ mouseLeave: aMouseEvent
+ super mouseLeave: aMouseEvent.
+ Preferences mouseOverForKeyboardFocus ifTrue: [ aMouseEvent hand releaseKeyboardFocus: self ]!