author | Claus Gittinger <cg@exept.de> |
Tue, 14 Jan 1997 18:02:37 +0100 | |
changeset 365 | 47e0d48fd769 |
parent 295 | e1a91bbfbef3 |
child 404 | 502b2dc1b0ba |
permissions | -rw-r--r-- |
251 | 1 |
" |
2 |
COPYRIGHT (c) 1996 by Claus Gittinger |
|
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 |
||
14 |
||
15 |
||
16 |
||
17 |
Wrapper subclass:#GeometricWrapper |
|
18 |
instanceVariableNames:'' |
|
19 |
classVariableNames:'' |
|
20 |
poolDictionaries:'' |
|
21 |
category:'Graphics-Display Objects' |
|
22 |
! |
|
23 |
||
24 |
!GeometricWrapper class methodsFor:'documentation'! |
|
25 |
||
26 |
copyright |
|
27 |
" |
|
28 |
COPYRIGHT (c) 1996 by Claus Gittinger |
|
29 |
All Rights Reserved |
|
30 |
||
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
33 |
inclusion of the above copyright notice. This software may not |
|
34 |
be provided or otherwise made available to, or used by, any |
|
35 |
other person. No title to or ownership of the software is |
|
36 |
hereby transferred. |
|
37 |
" |
|
38 |
||
39 |
||
40 |
||
41 |
||
42 |
! |
|
43 |
||
44 |
documentation |
|
45 |
" |
|
46 |
abstract class for wrappers of geometric objects. |
|
47 |
These allows any geometric thingy to be used as a component in a view. |
|
48 |
||
254 | 49 |
(background info: geometrics are mathematical objects - they do not |
50 |
keep any color or lineStyle attributes. Wrappers add this information |
|
51 |
and can also be used as components of a view) |
|
52 |
||
265 | 53 |
Notice: |
54 |
this class was implemented using protocol information |
|
365 | 55 |
from alpha testers, from reading PD programs and |
56 |
from the Hopkins/Horan book. |
|
265 | 57 |
- it may not be complete or compatible to the corresponding ST-80 class. |
58 |
If you encounter any incompatibilities, please forward a note |
|
59 |
describing the incompatibility verbal (i.e. no code) to the ST/X team. |
|
60 |
||
251 | 61 |
[see also:] |
62 |
StrokingWrapper FillingWrapper |
|
63 |
Geometric GraphicsContext |
|
64 |
||
65 |
[author:] |
|
66 |
Claus Gittinger |
|
67 |
" |
|
68 |
||
69 |
||
70 |
||
71 |
! ! |
|
72 |
||
279 | 73 |
!GeometricWrapper methodsFor:'accessing'! |
74 |
||
75 |
component:someComponent |
|
76 |
"set the wrappers component. |
|
77 |
Redefined to not set the components container - we know, those |
|
78 |
Geometrics dont know about containers." |
|
79 |
||
80 |
component := someComponent. |
|
81 |
||
82 |
"Created: 28.5.1996 / 23:02:36 / cg" |
|
83 |
"Modified: 28.5.1996 / 23:02:52 / cg" |
|
84 |
! ! |
|
85 |
||
251 | 86 |
!GeometricWrapper methodsFor:'accessing - bounds'! |
87 |
||
293
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
88 |
bounds |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
89 |
"return the components bounds as default bounds" |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
90 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
91 |
bounds notNil ifTrue:[^ bounds]. |
295 | 92 |
^ component bounds rounded |
293
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
93 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
94 |
"Created: 5.6.1996 / 02:29:10 / cg" |
295 | 95 |
"Modified: 5.6.1996 / 20:30:50 / cg" |
293
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
96 |
! |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
97 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
98 |
bounds:newBounds |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
99 |
"set my bounds" |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
100 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
101 |
bounds := newBounds |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
102 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
103 |
"Created: 5.6.1996 / 02:30:00 / cg" |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
104 |
! |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
105 |
|
251 | 106 |
preferredBounds |
107 |
"return the components bounds as preferredBounds" |
|
108 |
||
295 | 109 |
^ component bounds rounded |
251 | 110 |
|
111 |
"Created: 9.5.1996 / 10:28:10 / cg" |
|
295 | 112 |
"Modified: 5.6.1996 / 20:30:54 / cg" |
251 | 113 |
! ! |
114 |
||
293
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
115 |
!GeometricWrapper methodsFor:'view protocol mimicri'! |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
116 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
117 |
realize |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
118 |
"my container realized itself. Ignored here" |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
119 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
120 |
"Created: 5.6.1996 / 02:32:39 / cg" |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
121 |
! ! |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
122 |
|
251 | 123 |
!GeometricWrapper class methodsFor:'documentation'! |
124 |
||
125 |
version |
|
365 | 126 |
^ '$Header: /cvs/stx/stx/libview2/GeometricWrapper.st,v 1.7 1997-01-14 17:00:00 cg Exp $' |
251 | 127 |
! ! |