0
|
1 |
"
|
6
|
2 |
COPYRIGHT (c) 1992 by Claus Gittinger
|
0
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
Object subclass:#Model
|
|
14 |
instanceVariableNames:'dependents'
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'Interface-Support'
|
|
18 |
!
|
|
19 |
|
|
20 |
Model comment:'
|
|
21 |
|
6
|
22 |
COPYRIGHT (c) 1992 by Claus Gittinger
|
0
|
23 |
All Rights Reserved
|
|
24 |
|
|
25 |
Model are things that can be displayed in a view. I keep track of
|
|
26 |
which views are dependeent of me and inform them of any changes.
|
|
27 |
I know how to display myself in a GraphicsContext.
|
|
28 |
This was written to be more ST-80 conform.
|
|
29 |
|
|
30 |
Instance variables:
|
|
31 |
dependentViews Collection the views knowing me
|
|
32 |
|
10
|
33 |
$Header: /cvs/stx/stx/libview2/Model.st,v 1.4 1993-12-11 01:31:16 claus Exp $
|
0
|
34 |
written summer 92 by claus
|
|
35 |
'!
|
|
36 |
|
|
37 |
!Model methodsFor:'accessing'!
|
|
38 |
|
|
39 |
dependents
|
|
40 |
"return a Collection of dependents - nil if there is none"
|
|
41 |
|
|
42 |
^ dependents
|
|
43 |
!
|
|
44 |
|
10
|
45 |
dependents:aCollection
|
|
46 |
"set the collection of dependents"
|
0
|
47 |
|
10
|
48 |
dependents := aCollection
|
0
|
49 |
! !
|
|
50 |
|
|
51 |
!Model methodsFor:'drawing'!
|
|
52 |
|
|
53 |
displayOn:aGraphicsContext clippingBox:aRectangle
|
|
54 |
"display a part of me in aGraphicsContext"
|
|
55 |
|
|
56 |
^ self subclassResponsibility
|
|
57 |
!
|
|
58 |
|
|
59 |
displayOn:aGraphicsContext
|
|
60 |
"display myself in aGraphicsContext"
|
|
61 |
|
|
62 |
^ self subclassResponsibility
|
|
63 |
|
|
64 |
! !
|