Squeak Class Documentation category index | class index  
 
AttributedTextStream
  category: Collections-Streams
  superclass: Stream
  subclasses:

a stream on Text's which keeps track of the last attribute put; new characters are added with those attributes.

instance vars:

characters - a WriteStream of the characters in the stream
attributeRuns - a RunArray with the attributes for the stream
currentAttributes - the attributes to be used for new text
attributesChanged - whether the attributes have changed since the last addition

instance methods
  access
  currentAttributes
currentAttributes:
size

  private-initialization
  initialize

  retrieving the text
  contents

  stream protocol
  nextPut:
nextPutAll:

class methods
  instance creation
  new

instance methods
  access top  
 

currentAttributes

return the current attributes


 

currentAttributes:

set the current attributes


 

size

number of characters in the stream so far


  private-initialization top  
 

initialize


  retrieving the text top  
 

contents

Answer all of the contents of the receiver.


  stream protocol top  
 

nextPut:

Insert the argument, anObject, as the next object accessible by the
receiver. Answer anObject.


 

nextPutAll:

add an entire string with the same attributes


class methods
  instance creation top  
 

new

Answer a new instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.