Class:            DisplayListView

Environment:      Siren
Superclass:         AutoScrollingView
Category:         MusicUI-DisplayListViews
Instance variables:   displayList pixmap background page zoom grid extent inset
               backgroundColor foregroundColor redrawn cache
Class variables:      MusicConstants

DisplayListViews can display and scroll structured graphics display lists generated by various models or layout managers.
Using their page offset, they can scroll over very large display lists.
They can have colored or gridded background pixmaps and can scroll/page on demand; they display their lists on their graphics contexts.

Subclasses generally override the displayOn: or displayOnImage methods, and add initialization or transformation methods.

Instance Variables
   displayList    the view's display list
   pixmap    the view's cached display pixel map (optional)
   background the view's background form (e.g., gridding)
   zoom the display list's zoom-in factor or nil
   pageOffset    the offset in "pages" used for very large display lists
   backgroundColor graphics background color
   foregroundColor graphics display color
   redrawn set to nil to re-draw cache
   cache should I cache a Pixmap of redisply n the fly?

See the class examples for numerous ways of using display list views.

The subclasses add knowledge of smart display list generation, background pixmap generation (e.g., gridding), display of item or x/y-range selection, x- or y-scaling or step/grid, property->color mapping, "clef forms" or other special pixmaps, multiple-model viewing, etc.

accessing

background: anObject
   Set the receiver's 'background' to be anObject.

backgroundColor
   Answer the receiver's backgroundColor or the default.

bounds: aRectangle
   Set the receiver's bounds (and page offset).

cache: aBoolean
   Set the receiver's 'cache' to be aBoolean.

displayList
   Answer the receiver's display list.

displayList: anObject
   Set the receiver's 'displayList' to be anObject.

foregroundColor
   Answer the receiver's foregroundColor or the default.

inset: aPoint
   Set the receiver's inset to aPoint (pixels).

list
   Answer the receiver's display list.

pageOffset
   Answer the receiver's 'pageOffset'.

pageOffset: anObject
   Set the receiver's 'pageOffset' to be anObject.

pixmap: aPMorNil
   Set (or destroy) the receiver's cached pixmap.

preferredBounds
   Answer the displayList's bounds.

zoom: aPoint
   Set the receiver's 'zoom' to be aPoint.

private

scrollableExtent
   Answer the extent of the receiver's display object bounding box.

setModel: aModel
   

visibleExtent
   Answer the extent of the receiver's clipping box.

controller access

defaultControllerClass
   

transformPoint: aPoint
   zoom, scroll, and page the given point, used for hit-detection.

initialize-release

component
   Answer a DLView for use as a component.

initialize
   Initialize the receiver's instance variables--the default is not to cache.

initializeCache
   Initialize the receiver's instance variables for cacheing the pixmap during display.

initializeWithGrid: gPoint color: gColor
   Initialize the receiver's instance variables--the default is to cache.

release
   Remove the receiver as a dependent of its model.

displaying

displayOn: aGraphicsContext
   

displaySelectionOn: aGC
   Display the model's selection using some form of highlighting.

invalidate
   

MetaClass:         DisplayListView class

instance creation

componentOnList: dlist
   Answer a DLView for use as a component.

componentOnList: dlist withGrid: gPoint inColor: gColor
   Answer a DLView for use as a component.

on: anEditor
   

open4SquareOn: aDisplayList
   Open the receiver on the given display list.

openOn: aDisplayList
   Open the receiver on the given display list.

constant access

backgroundColor
   Answer the default background color for display list views.

constants
   

constants: aDictionary
   

defaultCacheExtent
   Answer the default extent of the receiver's instances' cache.

foregroundColor
   Answer the default foreground color for display list views.

inset
   Answer the default display inset.

class initialization

initialize
   Init the class

examples

classListExample
   DisplayListView classListExample

classTreeExample
   DisplayListView classTreeExample

colorClassListExample
   DisplayListView colorClassListExample

exampleHierarchical
   DisplayListView exampleHierarchical