Squeak Class Documentation category index | class index  
 
TextContainer
  category: Morphic-Text Support
  superclass: Object
  subclasses: SimplerTextContainer

A TextContainer models the shape of an ownerMorph, possibly occluded by one or more occludingMorphs, and scans this shape to provide a list of rectangles suitable for layout of text. It does this by displaying the shadow of the ownerMorph in black, and any occludingMorphs in white, on its shadowForm. It then scans horizontal strips of appropriate height to find unbroken intervals of black, greater than minWidth in extent. Conputation of the rectangles is done on demand, and results are cached so that text can be redisplayed without having to recompute the rectangles.

instance methods
  access
  avoidsOcclusions
avoidsOcclusions:
fillsOwner
fillsOwner:
paragraphClass
releaseCachedState
textMorph

  container protocol
  bottom
left
rectanglesAt:height:
top
topLeft
translateBy:
width

  private
  bounds
computeShadow
for:minWidth:
shadowForm
vertProfile

class methods
  initialization
  initialize

instance methods
  access top  
 

avoidsOcclusions


 

avoidsOcclusions:


 

fillsOwner


 

fillsOwner:


 

paragraphClass


 

releaseCachedState


 

textMorph


  container protocol top  
 

bottom

Note we should really check for contiguous pixels here


 

left


 

rectanglesAt:height:

Return a list of rectangles that are at least minWidth wide
in the specified horizontal strip of the shadowForm.
Cache the results for later retrieval if the owner does not change.


 

top

Note we should really check for contiguous pixels here


 

topLeft

for compatibility


 

translateBy:


 

width

for compatibility


  private top  
 

bounds


 

computeShadow


 

for:minWidth:


 

shadowForm


 

vertProfile


class methods
  initialization top  
 

initialize

TextContainer initialize