equal
deleted
inserted
replaced
23 All Rights Reserved |
23 All Rights Reserved |
24 |
24 |
25 generic superclass for Display Objects held in ObjectViews |
25 generic superclass for Display Objects held in ObjectViews |
26 see DrawObject/LogicObject/DeskTopObject and subclasses for example use |
26 see DrawObject/LogicObject/DeskTopObject and subclasses for example use |
27 |
27 |
28 $Header: /cvs/stx/stx/libview2/Attic/DObject.st,v 1.4 1993-10-13 02:42:58 claus Exp $ |
28 $Header: /cvs/stx/stx/libview2/Attic/DObject.st,v 1.5 1993-12-11 01:26:27 claus Exp $ |
29 written fall/winter 89 by claus |
29 written fall/winter 89 by claus |
30 '! |
30 '! |
31 |
31 |
32 !DisplayObject class methodsFor:'instance creation'! |
32 !DisplayObject class methodsFor:'instance creation'! |
33 |
33 |
47 |
47 |
48 !DisplayObject methodsFor:'initialization'! |
48 !DisplayObject methodsFor:'initialization'! |
49 |
49 |
50 initialize |
50 initialize |
51 ^ self |
51 ^ self |
|
52 ! |
|
53 |
|
54 computeBoundingBox |
|
55 self subclassResponsibility |
52 ! ! |
56 ! ! |
53 |
57 |
54 !DisplayObject methodsFor:'queries'! |
58 !DisplayObject methodsFor:'queries'! |
55 |
59 |
56 canBeMoved |
60 canBeMoved |
72 |
76 |
73 ^ aRectangle contains:frame |
77 ^ aRectangle contains:frame |
74 ! |
78 ! |
75 |
79 |
76 containsPoint: aPoint |
80 containsPoint: aPoint |
77 ^ frame containsPoint: aPoint |
81 ^ frame containsPoint: aPoint |
78 ! |
82 ! |
79 |
83 |
80 intersects:aRectangle |
84 intersects:aRectangle |
81 "object must decide, if its intersecting a rectangle" |
85 "object must decide, if its intersecting a rectangle" |
82 |
86 |
83 ^ frame intersects:aRectangle |
87 ^ frame intersects:aRectangle |
|
88 ! |
|
89 |
|
90 isOpaque |
|
91 "return true, if the object fully covers its frame (i.e. is rectangular |
|
92 and has no 'holes'. Since we dont know, return false here" |
|
93 |
|
94 ^ false |
84 ! ! |
95 ! ! |
85 |
96 |
86 !DisplayObject methodsFor:'accessing'! |
97 !DisplayObject methodsFor:'accessing'! |
87 |
98 |
88 frame |
99 frame |
205 ! ! |
216 ! ! |
206 |
217 |
207 !DisplayObject methodsFor:'ST-80 drawing'! |
218 !DisplayObject methodsFor:'ST-80 drawing'! |
208 |
219 |
209 displayOn: aDisplayMedium |
220 displayOn: aDisplayMedium |
210 " |
|
211 self drawIn:aDisplayMedium offset:0@0 |
|
212 " |
|
213 " " |
|
214 self displayOn:aDisplayMedium |
221 self displayOn:aDisplayMedium |
215 at:0@0 |
222 at:0@0 |
216 clippingBox:nil |
223 clippingBox:nil |
217 rule:#copy |
224 rule:#copy |
218 mask:nil |
225 mask:nil |
219 " " |
|
220 ! |
226 ! |
221 |
227 |
222 displayOn:aDisplayMedium at:aPoint |
228 displayOn:aDisplayMedium at:aPoint |
223 self displayOn:aDisplayMedium |
229 self displayOn:aDisplayMedium |
224 at:aPoint |
230 at:aPoint |