DisplayObject.st
changeset 34 53c7dd275c3e
parent 31 c8adde64ce92
child 96 948318b2fbd4
--- a/DisplayObject.st	Thu Nov 17 15:31:40 1994 +0100
+++ b/DisplayObject.st	Mon Feb 06 01:36:28 1995 +0100
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libview2/DisplayObject.st,v 1.9 1994-11-17 14:24:56 claus Exp $
+$Header: /cvs/stx/stx/libview2/DisplayObject.st,v 1.10 1995-02-06 00:35:44 claus Exp $
 '!
 
 !DisplayObject class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview2/DisplayObject.st,v 1.9 1994-11-17 14:24:56 claus Exp $
+$Header: /cvs/stx/stx/libview2/DisplayObject.st,v 1.10 1995-02-06 00:35:44 claus Exp $
 "
 !
 
@@ -83,6 +83,12 @@
 
 !DisplayObject methodsFor:'queries'!
 
+handlesKeyboardInput
+    "return true, if the receiver handles keyboard input"
+
+    ^ false
+!
+
 canBeMoved
     "return true, if the receiver can be moved around"
 
@@ -120,6 +126,12 @@
     ^ false
 ! !
 
+!DisplayObject methodsFor:'converting'!
+
+asDisplayObject
+    ^ self
+! !
+
 !DisplayObject methodsFor:'accessing'!
 
 frame
@@ -210,14 +222,17 @@
 
     |org left right top bott px py d2|
 
+    frame isNil ifTrue:[
+	frame := self computeBoundingBox
+    ].
     (delta == 0) ifTrue:[
 	^ frame containsPoint:aPoint
     ].
 
     "
      its quicker to not create a new rectangle for the test
-     (which is not obvious for simple lines, but complex polygons may
-      call this for many of its components)
+     (which is not obvious for simple lines, but complex polygons 
+      or grouped objects may call this for many of its components)
     "
     org := frame origin.
     left := org x - delta.
@@ -316,9 +331,9 @@
     "draw the receivers outline at its origin offset by anOffset, aPoint"
 
     |org|
-    org := self origin + anOffset - aView viewOrigin.
-    aView displayRectangleX:(org x) y:(org y)
-		      width:(frame width) height:(frame height)
+    org := self origin + anOffset.
+    aView displayRectangleX:org x y:org y
+		      width:frame width height:frame height
 !
 
 drawOutlineIn:aView
@@ -330,7 +345,7 @@
 drawOutlineIn:aView at:drawOrigin
     "draw the receivers outline at drawOrigin, aPoint"
 
-    self drawOutlineIn:aView offset:(drawOrigin - (self origin))
+    self drawOutlineIn:aView offset:(drawOrigin - self origin)
 !
 
 drawDragIn:aView at:drawOrigin