Squeak Class Documentation category index | class index  
 
DisplayText
  category: Graphics-Display Objects
  superclass: DisplayObject
  subclasses: Paragraph

I represent Text whose emphasis changes are mapped to a set of fonts. My instances have an offset used in determining screen placement for displaying. They get used two different ways in the system. In the user interface, they mainly hold onto some text which is viewed by some form of ParagraphEditor. However, as a DisplayObject, they may need to display efficiently, so my instances have a cache for the bits.

instance methods
  accessing
  alignedTo:
fontsUsed
form
lineGrid
numberOfLines
offset
offset:
string
text
text:
textStyle
textStyle:

  color
  backgroundColor
foregroundColor
foregroundColor:backgroundColor:

  converting
  asParagraph

  display box access
  boundingBox
computeBoundingBox

  displaying
  displayOn:at:clippingBox:rule:fillColor:
displayOn:transformation:clippingBox:align:with:rule:fillColor:
displayOnPort:at:

  private
  composeForm
setText:textStyle:offset:

class methods
  examples
  example

  instance creation
  text:
text:textStyle:
text:textStyle:offset:

instance methods
  accessing top  
 

alignedTo:

Return a copy with offset according to alignPointSelector which is one of...
#(topLeft, topCenter, topRight, leftCenter, center, etc)


 

fontsUsed

Return a list of all fonts used currently in this text. 8/19/96 tk


 

form

Answer the form into which the receiver's display bits are cached.


 

lineGrid

Answer the relative space between lines of the receiver's text.


 

numberOfLines

Answer the number of lines of text in the receiver.


 

offset

Refer to the comment in DisplayObject|offset.


 

offset:

Refer to the comment in DisplayObject|offset:.


 

string

Answer the string of the characters displayed by the receiver.


 

text

Answer the text displayed by the receiver.


 

text:

Set the receiver to display the argument, aText.


 

textStyle

Answer the style by which the receiver displays its text.


 

textStyle:

Set the style by which the receiver should display its text.


  color top  
 

backgroundColor


 

foregroundColor


 

foregroundColor:backgroundColor:


  converting top  
 

asParagraph

Answer a Paragraph whose text and style are identical to that of the
receiver.


  display box access top  
 

boundingBox

Refer to the comment in DisplayObject|boundingBox.


 

computeBoundingBox

Compute minimum enclosing rectangle around characters.


  displaying top  
 

displayOn:at:clippingBox:rule:fillColor:

Refer to the comment in
DisplayObject|displayOn:at:clippingBox:rule:mask:.


 

displayOn:transformation:clippingBox:align:with:rule:fillColor:

Refer to the comment in
DisplayObject|displayOn:transformation:clippingBox:align:with:rule:mask:.


 

displayOnPort:at:


  private top  
 

composeForm


 

setText:textStyle:offset:


class methods
  examples top  
 

example

Continually prints two lines of text wherever you point with the cursor. Terminate by pressing any button on the
mouse.


  instance creation top  
 

text:

Answer an instance of me such that the text displayed is aText
according to the system's default text style.


 

text:textStyle:

Answer an instance of me such that the text displayed is aText
according to the style specified by aTextStyle.


 

text:textStyle:offset:

Answer an instance of me such that the text displayed is aText
according to the style specified by aTextStyle. The display of the
information should be offset by the amount given as the argument,
aPoint.