author | Claus Gittinger <cg@exept.de> |
Sat, 26 Oct 1996 19:17:33 +0200 | |
changeset 346 | 1612c23d9c5d |
parent 295 | e1a91bbfbef3 |
child 365 | 47e0d48fd769 |
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 |
|
55 |
from alpha testers and from the Hopkins/Horan book. |
|
56 |
- it may not be complete or compatible to the corresponding ST-80 class. |
|
57 |
If you encounter any incompatibilities, please forward a note |
|
58 |
describing the incompatibility verbal (i.e. no code) to the ST/X team. |
|
59 |
||
251 | 60 |
[see also:] |
61 |
StrokingWrapper FillingWrapper |
|
62 |
Geometric GraphicsContext |
|
63 |
||
64 |
[author:] |
|
65 |
Claus Gittinger |
|
66 |
" |
|
67 |
||
68 |
||
69 |
||
70 |
! ! |
|
71 |
||
279 | 72 |
!GeometricWrapper methodsFor:'accessing'! |
73 |
||
74 |
component:someComponent |
|
75 |
"set the wrappers component. |
|
76 |
Redefined to not set the components container - we know, those |
|
77 |
Geometrics dont know about containers." |
|
78 |
||
79 |
component := someComponent. |
|
80 |
||
81 |
"Created: 28.5.1996 / 23:02:36 / cg" |
|
82 |
"Modified: 28.5.1996 / 23:02:52 / cg" |
|
83 |
! ! |
|
84 |
||
251 | 85 |
!GeometricWrapper methodsFor:'accessing - bounds'! |
86 |
||
293
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
87 |
bounds |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
88 |
"return the components bounds as default bounds" |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
89 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
90 |
bounds notNil ifTrue:[^ bounds]. |
295 | 91 |
^ component bounds rounded |
293
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
92 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
93 |
"Created: 5.6.1996 / 02:29:10 / cg" |
295 | 94 |
"Modified: 5.6.1996 / 20:30:50 / cg" |
293
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
95 |
! |
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 |
bounds:newBounds |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
98 |
"set my bounds" |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
99 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
100 |
bounds := newBounds |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
101 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
102 |
"Created: 5.6.1996 / 02:30:00 / cg" |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
103 |
! |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
104 |
|
251 | 105 |
preferredBounds |
106 |
"return the components bounds as preferredBounds" |
|
107 |
||
295 | 108 |
^ component bounds rounded |
251 | 109 |
|
110 |
"Created: 9.5.1996 / 10:28:10 / cg" |
|
295 | 111 |
"Modified: 5.6.1996 / 20:30:54 / cg" |
251 | 112 |
! ! |
113 |
||
293
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
114 |
!GeometricWrapper methodsFor:'view protocol mimicri'! |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
115 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
116 |
realize |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
117 |
"my container realized itself. Ignored here" |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
118 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
119 |
"Created: 5.6.1996 / 02:32:39 / cg" |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
120 |
! ! |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
279
diff
changeset
|
121 |
|
251 | 122 |
!GeometricWrapper class methodsFor:'documentation'! |
123 |
||
124 |
version |
|
295 | 125 |
^ '$Header: /cvs/stx/stx/libview2/Attic/GeomWrpr.st,v 1.6 1996-06-05 18:36:50 cg Exp $' |
251 | 126 |
! ! |