use new translatePoint:fromView:toView:
authorClaus Gittinger <cg@exept.de>
Wed, 10 Oct 2001 15:11:42 +0200
changeset 1500 36c0b4b268b8
parent 1499 0c57ab09156b
child 1501 f760ccab7a35
use new translatePoint:fromView:toView:
UIObjectView.st
UIPainterView.st
UISelectionPanel.st
--- a/UIObjectView.st	Wed Oct 10 11:44:41 2001 +0200
+++ b/UIObjectView.st	Wed Oct 10 15:11:42 2001 +0200
@@ -1122,14 +1122,14 @@
     "
     |view viewId lastId point listOfViews|
 
-    viewId := rootView id.
-    point  := aPoint + (device translatePoint:0@0 from:(self id) to:viewId).
+    point  := aPoint + (device translatePoint:0@0 fromView:self toView:rootView).
 
     inputView lower.
 
+    viewId := rootView id.
     [viewId notNil] whileTrue:[
-	lastId := viewId.
-	viewId := device viewIdFromPoint:point in:lastId
+        lastId := viewId.
+        viewId := device viewIdFromPoint:point in:lastId
     ].
 
     inputView raise.
@@ -1142,22 +1142,22 @@
 
     listOfViews := OrderedCollection new.
     self allSubViewsDo:[:aView |
-	|org|
-
-	aView ~~ inputView ifTrue:[
-	    org := device translatePoint:0@0 from:(aView id) to:self id.
-	    ((org extent:aView extent) containsPoint:aPoint) ifTrue:[
-		listOfViews add:aView.
-	    ]
-	]
+        |org|
+
+        aView ~~ inputView ifTrue:[
+            org := device translatePoint:0@0 fromView:aView toView:self.
+            ((org extent:aView extent) containsPoint:aPoint) ifTrue:[
+                listOfViews add:aView.
+            ]
+        ]
     ].
 
     listOfViews size > 0 ifTrue:[
-	^ listOfViews last
+        ^ listOfViews last
     ].
     ^ nil
 
-
+    "Modified: / 10.10.2001 / 14:05:07 / cg"
 ! !
 
 !UIObjectView methodsFor:'selections'!
--- a/UIPainterView.st	Wed Oct 10 11:44:41 2001 +0200
+++ b/UIPainterView.st	Wed Oct 10 15:11:42 2001 +0200
@@ -392,18 +392,18 @@
 
         keepPosition ifTrue:[
             pasteOrigin := device translatePoint:0@0
-                                            from:self id
-                                              to:frame id.
+                                  fromView:self
+                                  toView:frame.
         ] ifFalse:[
             aPointOrNil isNil ifTrue:[
                 pasteOrigin := self sensor mousePoint.
                 pasteOrigin := device translatePoint:pasteOrigin
-                                            from:device rootWindowId
-                                              to:frame id.
+                                            fromView:nil
+                                              toView:frame.
             ] ifFalse:[
                 pasteOrigin := device translatePoint:aPointOrNil
-                                                from:self id
-                                                  to:frame id.
+                                            fromView:self
+                                              toView:frame.
             ]
         ].
 
@@ -444,6 +444,8 @@
 
     newSel size == 1 ifTrue:[newSel := newSel at:1].
     ^ newSel
+
+    "Modified: / 10.10.2001 / 14:15:12 / cg"
 !
 
 pasteWithLayout
--- a/UISelectionPanel.st	Wed Oct 10 11:44:41 2001 +0200
+++ b/UISelectionPanel.st	Wed Oct 10 15:11:42 2001 +0200
@@ -1455,8 +1455,8 @@
     device := gallery device.
 
     point  := device translatePoint:(device pointerPosition)
-                               from:(device rootWindowId)
-                                 to:(gallery canvas id).
+                           fromView:nil
+                             toView:(gallery canvas).
 
     point y < 1 ifTrue:[point y:1].
     ext := gallery extent - (10@10).
@@ -1475,6 +1475,8 @@
         point := point + (20@20).
     ].
     gallery update.
+
+    "Modified: / 10.10.2001 / 14:14:36 / cg"
 !
 
 raiseMenu