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
|
21 |
COPYRIGHT (c) 1992 by Claus Gittinger
|
|
22 |
All Rights Reserved
|
|
23 |
'!
|
0
|
24 |
|
21
|
25 |
!Model class methodsFor:'documentation'!
|
|
26 |
|
|
27 |
copyright
|
|
28 |
"
|
|
29 |
COPYRIGHT (c) 1992 by Claus Gittinger
|
0
|
30 |
All Rights Reserved
|
|
31 |
|
21
|
32 |
This software is furnished under a license and may be used
|
|
33 |
only in accordance with the terms of that license and with the
|
|
34 |
inclusion of the above copyright notice. This software may not
|
|
35 |
be provided or otherwise made available to, or used by, any
|
|
36 |
other person. No title to or ownership of the software is
|
|
37 |
hereby transferred.
|
|
38 |
"
|
|
39 |
!
|
0
|
40 |
|
21
|
41 |
version
|
|
42 |
"
|
|
43 |
$Header: /cvs/stx/stx/libview2/Model.st,v 1.5 1994-06-03 00:53:26 claus Exp $
|
|
44 |
"
|
|
45 |
!
|
0
|
46 |
|
21
|
47 |
documentation
|
|
48 |
"
|
|
49 |
Models are things that are presented in views. Instances keep track of
|
|
50 |
which views are dependeent of them and inform them of any changes.
|
|
51 |
They should know how to display myself in a GraphicsContext.
|
|
52 |
This was written to be more ST-80 conform.
|
|
53 |
|
|
54 |
Instance variables:
|
|
55 |
dependentViews Collection the views knowing me
|
|
56 |
"
|
|
57 |
! !
|
0
|
58 |
|
|
59 |
!Model methodsFor:'accessing'!
|
|
60 |
|
|
61 |
dependents
|
|
62 |
"return a Collection of dependents - nil if there is none"
|
|
63 |
|
|
64 |
^ dependents
|
|
65 |
!
|
|
66 |
|
10
|
67 |
dependents:aCollection
|
|
68 |
"set the collection of dependents"
|
0
|
69 |
|
10
|
70 |
dependents := aCollection
|
0
|
71 |
! !
|
|
72 |
|
|
73 |
!Model methodsFor:'drawing'!
|
|
74 |
|
|
75 |
displayOn:aGraphicsContext clippingBox:aRectangle
|
|
76 |
"display a part of me in aGraphicsContext"
|
|
77 |
|
|
78 |
^ self subclassResponsibility
|
|
79 |
!
|
|
80 |
|
|
81 |
displayOn:aGraphicsContext
|
|
82 |
"display myself in aGraphicsContext"
|
|
83 |
|
|
84 |
^ self subclassResponsibility
|
|
85 |
|
|
86 |
! !
|