Class:            DisplayItem

Environment:      Siren
Superclass:         DependentPart
Category:         MusicUI-DisplayLists
Instance variables:   offset color

Instances of the subclasses of the abstract class DisplayItem are used as the items in display lists. They can generally display themselves on graphics contexts.
These are done this way because I don't think wrappers are right for use in display lists.

Instance Variables:
   offset       the object's offset relative to its container (display list)
   color       the object's display color (or nil)

The subclasses add special display-related state and behavior such as an extent point and display method, or a visual item such as a string or image to display.
They generally implement displayOn: aGraphicsContext and bounds accessing methods.

This implementation is MODE 1.1, STEIM, Amsterdam, May/June 1990; updated at the Lagoon in Palo Alto, July, 1991-May, 1992.

The entirety of this software is Copyright (c) 1990, Stephen Travis Pope, Nomad Object Design/Nomad Computer Music Research.
All Rights Reserved.

transforming

asVisualComponent
   Answer an encapsulated version of the receiver which understands
   VisualComponent protocol.

scaleBy: aPoint
   Translate the receiver's offset by the argument.

scaledBy: aPoint
   Translate the receiver's offset by the argument.

translateBy: aPoint
   Translate the receiver's offset by the argument.

printing

printCompleteOn: aStream depth: depth
   Print the receiver in the given Stream.

printOn: aStream
   Print the receiver in the given Stream.

accessing

color
   Answer the receiver's display color.

color: aVal
   Set the receiver's display color to the argument.

extent
   Answer the extent of the receiver (dummy in this class).

extent: aPoint
   Ignored

offset
   Answer the receiver's offset.

offset: aPoint
   Set the receiver's offset to the argument.

testing

isDisplayItem
   Answer whether the receiver is a kind of DisplayItem

initialize-release

initialize
   Initialize the instance variables of the receiver.

displaying

displayOn: aGraphicsContext
   Display the receiver on the argument.

displayPostScriptOn: aPostScriptContext
   Display the receiver on the argument in PostScript.

copying

copy
   Answer a shallow copy of the receiver.

bounds accessing

computePreferredBounds
   Answer the receiver's bounds--hack.

MetaClass:         DisplayItem class

instance creation

model: aM offset: aPt
   Answer an instance of DisplayItem with the given instance variables.

offset: aPt
   Answer an instance of DisplayItem with the given instance variables.