[Pkg] The Trunk: Morphic-mt.854.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Apr 10 13:17:12 UTC 2015


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.854.mcz

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

Name: Morphic-mt.854
Author: mt
Time: 10 April 2015, 3:16:41.956 pm
UUID: 343e2fa3-d761-2446-bf36-92adc76ce1ad
Ancestors: Morphic-mt.853

Extracted drawing of drop-highlights and mouse-down-highlights into #drawOverlayOn: to give subclasses a chance to draw something over their submorphs in a general fashion (w/o having to overwrite #fullDrawOn:).

=============== Diff against Morphic-mt.853 ===============

Item was added:
+ ----- Method: Morph>>drawOverlayOn: (in category 'drawing') -----
+ drawOverlayOn: aCanvas
+ 	"Draw something over all my submorphs."
+ 	
+ 	self drawDropHighlightOn: aCanvas.
+ 	self drawMouseDownHighlightOn: aCanvas.!

Item was changed:
  ----- Method: Morph>>fullDrawOn: (in category 'drawing') -----
  fullDrawOn: aCanvas
  	"Draw the full Morphic structure on the given Canvas"
  
  	self visible ifFalse: [^ self].
  	(aCanvas isVisible: self fullBounds) ifFalse:[^self].
  	(self hasProperty: #errorOnDraw) ifTrue:[^self drawErrorOn: aCanvas].
  	"Note: At some point we should generalize this into some sort of 
  	multi-canvas so that we can cross-optimize some drawing operations."
  
  	"Pass 1: Draw eventual drop-shadow"
  	self hasDropShadow ifTrue: [self drawDropShadowOn: aCanvas].
  	(self hasRolloverBorder and: [(aCanvas seesNothingOutside: self bounds) not])
  		ifTrue: [self drawRolloverBorderOn: aCanvas].
  
  	"Pass 2: Draw receiver itself"
  	(aCanvas isVisible: self bounds) ifTrue:[aCanvas drawMorph: self].
  	self drawSubmorphsOn: aCanvas.
+ 	self drawOverlayOn: aCanvas.!
- 	self drawDropHighlightOn: aCanvas.
- 	self drawMouseDownHighlightOn: aCanvas.!



More information about the Packages mailing list