Squeak Class Documentation category index | class index  
 
TextAttribute
  category: Collections-Text
  superclass: Object
  subclasses: TextAction TextKern TextAnchor TextEmphasis TextIndent TextColor TextFontChange TextMessageLink

Tells a piece of text to be a certain way.

Select text, press Command-6, choose a attribute. If selected text is of the form
Hi There<Smalltalk beep>
the part in angle brackets is saved for action, and the Hi There appears in the paragraph. If selection has no angle brackets, use the whole thing as both the text and the action.

TextDoIt -- eval as a Smalltalk expression (the part in angle brackets)

TextLink -- Show a method, class comment, class hierarchy, or class defintion.
<Point extent:>, <Point Comment>, <Point Hierarchy>, or <Point Defintion> are what you type.

TextURL -- Show the web page. <www.disney.com>

These attributes of text need to be stored on the disk in a regular file-out. It is done in this form: (ascii 2)<!do Smalltalk beep(ascii 3)>Hi There(ascii 3)<!>
(ascii 2)<!li Point extent:(ascii 3)>Click here to see the extent: method(ascii 3)<!>
The brackets are for people to see in fileOuts. The wierd ascii are for the scanner to pick up easily. See RunArray class scanFrom: where decoding is done.

instance methods
  as yet unclassified
  actOnClickFor:
actOnClickFor:in:
actOnClickFor:in:at:
actOnClickFor:in:at:editor:
couldDeriveFromPrettyPrinting
dominatedByCmd0
dominates:
emphasisCode
emphasizeScanner:
forFontInStyle:do:
mayActOnClick
mayBeExtended
oldEmphasisCode:
reset
set

  testing
  isKern

class methods
  no messages
 

instance methods
  as yet unclassified top  
 

actOnClickFor:

Subclasses may override to provide, eg, hot-spot actions


 

actOnClickFor:in:


 

actOnClickFor:in:at:


 

actOnClickFor:in:at:editor:


 

couldDeriveFromPrettyPrinting

Answer whether the receiver is a kind of attribute that could have been generated by doing polychrome pretty-printing of a method without functional text attributes.


 

dominatedByCmd0

Subclasses may override if cmd-0 should turn them off


 

dominates:

Subclasses may override condense multiple attributes


 

emphasisCode

Subclasses may override to add bold, italic, etc


 

emphasizeScanner:

Subclasses may override to set, eg, font, color, etc


 

forFontInStyle:do:

No action is the default. Overridden by font specs


 

mayActOnClick

Subclasses may override to provide, eg, hot-spot actions


 

mayBeExtended

A quality that may be overridden by subclasses, such as TextAnchors, that really only apply to a single character


 

oldEmphasisCode:

Allows running thorugh possibly multiple attributes
and getting the emphasis out of any that has an emphasis (font number)


 

reset

Allow subclasses to prepare themselves for merging attributes


 

set

Respond true to include this attribute (as opposed to, eg, a bold
emphasizer that is clearing the property


  testing top  
 

isKern


class methods
  no messages top