author | Claus Gittinger <cg@exept.de> |
Wed, 18 Aug 1999 21:50:10 +0200 | |
changeset 1220 | 39e5e28042da |
parent 999 | d2eeb6201c2f |
child 1789 | f52f0a0d8448 |
permissions | -rw-r--r-- |
364 | 1 |
VisualPart subclass:#CompositePart |
2 |
instanceVariableNames:'components preferredBounds' |
|
3 |
classVariableNames:'' |
|
4 |
poolDictionaries:'' |
|
5 |
category:'Graphics-Display Objects' |
|
6 |
! |
|
7 |
||
8 |
!CompositePart class methodsFor:'documentation'! |
|
9 |
||
10 |
documentation |
|
11 |
" |
|
12 |
a dummy class - only existing to provide a compatible home |
|
13 |
for fileIn of ST-80 classes. |
|
14 |
||
15 |
Notice: |
|
16 |
this class was implemented using protocol information |
|
17 |
from alpha testers, from reading PD programs and |
|
18 |
from the Hopkins/Horan book. |
|
19 |
- it may not be complete or compatible to the corresponding ST-80 class. |
|
20 |
If you encounter any incompatibilities, please forward a note |
|
21 |
describing the incompatibility verbal (i.e. no code) to the ST/X team. |
|
22 |
||
23 |
[author:] |
|
24 |
Claus Gittinger |
|
25 |
" |
|
26 |
||
27 |
||
28 |
||
29 |
||
30 |
! ! |
|
31 |
||
32 |
!CompositePart methodsFor:'accessing'! |
|
33 |
||
34 |
components |
|
35 |
"return the components" |
|
36 |
||
37 |
^ components |
|
38 |
||
39 |
"Created: 14.2.1997 / 17:57:23 / cg" |
|
40 |
"Modified: 14.2.1997 / 17:57:32 / cg" |
|
41 |
! ! |
|
42 |
||
43 |
!CompositePart methodsFor:'adding-removing'! |
|
44 |
||
45 |
add:aComponent |
|
993 | 46 |
components isNil ifTrue:[ |
47 |
components := OrderedCollection new |
|
48 |
]. |
|
999 | 49 |
components add:aComponent. |
50 |
aComponent container:self. |
|
51 |
self changed:#sizeOfContents |
|
364 | 52 |
|
993 | 53 |
"Created: / 14.2.1997 / 17:57:59 / cg" |
999 | 54 |
"Modified: / 6.7.1998 / 18:50:40 / cg" |
364 | 55 |
! |
56 |
||
57 |
add:aComponent at:aPoint |
|
58 |
aComponent origin:aPoint. |
|
993 | 59 |
self add:aComponent |
60 |
||
61 |
"Created: / 14.2.1997 / 17:58:19 / cg" |
|
62 |
"Modified: / 6.7.1998 / 13:44:01 / cg" |
|
63 |
! ! |
|
64 |
||
65 |
!CompositePart methodsFor:'displaying'! |
|
364 | 66 |
|
993 | 67 |
displayOn:aGC |
68 |
"display the receiver on some graphicsContext. |
|
69 |
The sender is repsonsible for restoring the GC's state |
|
70 |
(i.e. it may be left in any undefined state)" |
|
71 |
||
999 | 72 |
components notNil ifTrue:[ |
73 |
components do:[:aComponent | |
|
74 |
aComponent displayOn:aGC |
|
75 |
] |
|
993 | 76 |
]. |
77 |
||
78 |
"Created: / 6.7.1998 / 13:59:33 / cg" |
|
999 | 79 |
"Modified: / 6.7.1998 / 17:55:40 / cg" |
80 |
! ! |
|
81 |
||
82 |
!CompositePart methodsFor:'view protocol mimicri'! |
|
83 |
||
84 |
realizeAllSubViews |
|
85 |
"realize all my subviews - but not myself." |
|
86 |
||
87 |
components notNil ifTrue:[ |
|
88 |
components do:[:component | |
|
89 |
component realize |
|
90 |
] |
|
91 |
]. |
|
92 |
||
93 |
"Modified: / 5.9.1995 / 23:30:47 / claus" |
|
94 |
"Modified: / 13.1.1997 / 21:25:49 / cg" |
|
95 |
"Created: / 6.7.1998 / 18:37:39 / cg" |
|
1220
39e5e28042da
protocol fixes to make examples work again
Claus Gittinger <cg@exept.de>
parents:
999
diff
changeset
|
96 |
! |
39e5e28042da
protocol fixes to make examples work again
Claus Gittinger <cg@exept.de>
parents:
999
diff
changeset
|
97 |
|
39e5e28042da
protocol fixes to make examples work again
Claus Gittinger <cg@exept.de>
parents:
999
diff
changeset
|
98 |
withAllSubViewsDo:aBlock |
39e5e28042da
protocol fixes to make examples work again
Claus Gittinger <cg@exept.de>
parents:
999
diff
changeset
|
99 |
aBlock value:self. |
39e5e28042da
protocol fixes to make examples work again
Claus Gittinger <cg@exept.de>
parents:
999
diff
changeset
|
100 |
components notNil ifTrue:[ |
39e5e28042da
protocol fixes to make examples work again
Claus Gittinger <cg@exept.de>
parents:
999
diff
changeset
|
101 |
components do:[:aComponent | |
39e5e28042da
protocol fixes to make examples work again
Claus Gittinger <cg@exept.de>
parents:
999
diff
changeset
|
102 |
aComponent withAllSubViewsDo:aBlock |
39e5e28042da
protocol fixes to make examples work again
Claus Gittinger <cg@exept.de>
parents:
999
diff
changeset
|
103 |
] |
39e5e28042da
protocol fixes to make examples work again
Claus Gittinger <cg@exept.de>
parents:
999
diff
changeset
|
104 |
] |
364 | 105 |
! ! |
106 |
||
107 |
!CompositePart class methodsFor:'documentation'! |
|
108 |
||
109 |
version |
|
1220
39e5e28042da
protocol fixes to make examples work again
Claus Gittinger <cg@exept.de>
parents:
999
diff
changeset
|
110 |
^ '$Header: /cvs/stx/stx/libview2/CompositePart.st,v 1.4 1999-08-18 19:50:10 cg Exp $' |
364 | 111 |
! ! |