author | Claus Gittinger <cg@exept.de> |
Wed, 05 Jun 1996 20:27:36 +0200 | |
changeset 294 | f44534fc18e4 |
parent 289 | 5620dcc0c5f6 |
child 323 | ee2f4da361a6 |
permissions | -rw-r--r-- |
249 | 1 |
VisualComponent subclass:#VisualPart |
2 |
instanceVariableNames:'container' |
|
3 |
classVariableNames:'' |
|
4 |
poolDictionaries:'' |
|
5 |
category:'Graphics-Display Objects' |
|
6 |
! |
|
7 |
||
265 | 8 |
!VisualPart class methodsFor:'documentation'! |
9 |
||
10 |
documentation |
|
11 |
" |
|
12 |
abstract superclass for all kinds of visual components, which |
|
13 |
are containers for some other component. |
|
14 |
This class and its subclasses (currently) exist mostly for |
|
15 |
ST-80 compatibility - to provide a home for ported PD classes, |
|
16 |
which depend on the VisualPart hierarchy. |
|
17 |
||
18 |
Notice: |
|
19 |
this class was implemented using protocol information |
|
20 |
from alpha testers and 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 |
This is still being constructed - not yet finished. |
|
25 |
||
26 |
[author:] |
|
27 |
Claus Gittinger |
|
28 |
||
29 |
[see also:] |
|
30 |
GeometricWrapper |
|
31 |
" |
|
32 |
||
33 |
||
34 |
! ! |
|
249 | 35 |
|
36 |
!VisualPart methodsFor:'accessing'! |
|
37 |
||
38 |
container |
|
289
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
39 |
"return my container" |
249 | 40 |
|
41 |
^ container |
|
42 |
||
43 |
"Created: 9.5.1996 / 00:31:41 / cg" |
|
289
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
44 |
"Modified: 5.6.1996 / 01:08:26 / cg" |
249 | 45 |
! |
46 |
||
47 |
container:something |
|
48 |
"set container" |
|
49 |
||
50 |
container := something. |
|
51 |
||
52 |
"Created: 9.5.1996 / 00:31:41 / cg" |
|
53 |
! |
|
54 |
||
55 |
graphicsContext |
|
56 |
"return the graphicsContext" |
|
57 |
||
254 | 58 |
^ container graphicsContext |
249 | 59 |
|
60 |
"Created: 9.5.1996 / 00:32:12 / cg" |
|
254 | 61 |
"Modified: 9.5.1996 / 01:37:10 / cg" |
62 |
! |
|
63 |
||
64 |
graphicsDevice |
|
65 |
"return the graphicsContext" |
|
66 |
||
67 |
^ container graphicsDevice |
|
68 |
||
69 |
"Created: 9.5.1996 / 00:32:12 / cg" |
|
70 |
"Modified: 9.5.1996 / 01:37:03 / cg" |
|
71 |
! |
|
72 |
||
73 |
topComponent |
|
74 |
"return the top component - typically the topView" |
|
75 |
||
76 |
^ container topComponent |
|
77 |
||
78 |
"Modified: 9.5.1996 / 01:37:10 / cg" |
|
79 |
"Created: 9.5.1996 / 01:39:15 / cg" |
|
289
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
80 |
! |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
81 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
82 |
view |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
83 |
"return my view" |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
84 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
85 |
container isNil ifTrue:[^ nil]. |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
86 |
^ container view |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
87 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
88 |
"Created: 4.6.1996 / 21:32:34 / cg" |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
89 |
"Modified: 5.6.1996 / 01:20:13 / cg" |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
90 |
! ! |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
91 |
|
294 | 92 |
!VisualPart methodsFor:'view protocol mimicri'! |
289
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
93 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
94 |
containerChangedSize |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
95 |
"my container changed its size. |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
96 |
The default here is to ignore this, but some wrappers like |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
97 |
to resize when this happens." |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
98 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
99 |
^ self |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
100 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
101 |
"Created: 4.6.1996 / 21:27:58 / cg" |
294 | 102 |
! ! |
103 |
||
104 |
!VisualPart ignoredMethodsFor:'view protocol mimicri'! |
|
289
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
105 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
106 |
create |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
107 |
"want myself to be created." |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
108 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
109 |
container create |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
110 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
111 |
"Created: 4.6.1996 / 21:30:25 / cg" |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
112 |
! |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
113 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
114 |
realize |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
115 |
"my container realized itself. |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
116 |
The default here is to ignore this, but some wrappers like |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
117 |
to do something when this happens." |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
118 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
119 |
^ self |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
120 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
121 |
"Created: 4.6.1996 / 21:28:31 / cg" |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
122 |
! ! |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
123 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
124 |
!VisualPart methodsFor:'view protocol mimicri'! |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
125 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
126 |
subViewChangedSize |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
127 |
^ self |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
128 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
129 |
"Created: 4.6.1996 / 21:35:57 / cg" |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
130 |
! |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
131 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
132 |
windowGroup |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
133 |
^ container windowGroup |
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
134 |
|
5620dcc0c5f6
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
265
diff
changeset
|
135 |
"Created: 5.6.1996 / 00:49:19 / cg" |
249 | 136 |
! ! |
137 |
||
138 |
!VisualPart class methodsFor:'documentation'! |
|
139 |
||
140 |
version |
|
294 | 141 |
^ '$Header: /cvs/stx/stx/libview2/VisualPart.st,v 1.5 1996-06-05 18:27:36 cg Exp $' |
249 | 142 |
! ! |