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