Squeak Class Documentation category index | class index  
 
CanvasCharacterScanner
  category: Morphic-Support
  superclass: CharacterScanner
  subclasses:

A displaying scanner which draws its output to a Morphic canvas.

instance methods
  accessing
  canvas:

  private
  doesDisplaying
setFont
textColor:

  scanning
  displayLine:offset:leftInRun:

  stop conditions
  cr
crossedX
endOfRun
paddedSpace
setStopConditions
tab

class methods
  no messages
 

instance methods
  accessing top  
 

canvas:

set the canvas to draw on


  private top  
 

doesDisplaying


 

setFont

Set the font and other emphasis.


 

textColor:

Overridden in DisplayScanner


  scanning top  
 

displayLine:offset:leftInRun:

largely copied from DisplayScanner's routine


  stop conditions top  
 

cr

When a carriage return is encountered, simply increment the pointer
into the paragraph.


 

crossedX

This condition will sometimes be reached 'legally' during display, when,
for instance the space that caused the line to wrap actually extends over
the right boundary. This character is allowed to display, even though it
is technically outside or straddling the clipping ectangle since it is in
the normal case not visible and is in any case appropriately clipped by
the scanner.


 

endOfRun

The end of a run in the display case either means that there is actually
a change in the style (run code) to be associated with the string or the
end of this line has been reached.


 

paddedSpace

Each space is a stop condition when the alignment is right justified.
Padding must be added to the base width of the space according to
which space in the line this space is and according to the amount of
space that remained at the end of the line when it was composed.


 

setStopConditions

Set the font and the stop conditions for the current run.


 

tab


class methods
  no messages top