"
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
Object subclass:#Model
instanceVariableNames:'dependents'
classVariableNames:''
poolDictionaries:''
category:'Interface-Support'
!
Model comment:'
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
'!
!Model class methodsFor:'documentation'!
copyright
"
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
!
version
"
$Header: /cvs/stx/stx/libview2/Model.st,v 1.5 1994-06-03 00:53:26 claus Exp $
"
!
documentation
"
Models are things that are presented in views. Instances keep track of
which views are dependeent of them and inform them of any changes.
They should know how to display myself in a GraphicsContext.
This was written to be more ST-80 conform.
Instance variables:
dependentViews Collection the views knowing me
"
! !
!Model methodsFor:'accessing'!
dependents
"return a Collection of dependents - nil if there is none"
^ dependents
!
dependents:aCollection
"set the collection of dependents"
dependents := aCollection
! !
!Model methodsFor:'drawing'!
displayOn:aGraphicsContext clippingBox:aRectangle
"display a part of me in aGraphicsContext"
^ self subclassResponsibility
!
displayOn:aGraphicsContext
"display myself in aGraphicsContext"
^ self subclassResponsibility
! !