--- a/UIPainterView.st Fri Aug 08 18:40:24 1997 +0200
+++ b/UIPainterView.st Mon Aug 11 14:07:53 1997 +0200
@@ -11,7 +11,8 @@
"
UIObjectView subclass:#UIPainterView
- instanceVariableNames:'treeView listHolder superclassName className methodName categoryName'
+ instanceVariableNames:'treeView listHolder superclassName className methodName
+ categoryName'
classVariableNames:'HandCursor'
poolDictionaries:''
category:'Interface-UIPainter'
@@ -212,6 +213,18 @@
pasteSpecifications:aSpecificationOrList keepLayout:keepLayout
"add the specs to the object view; returns list of pasted components
"
+
+ ^ self
+ pasteSpecifications:aSpecificationOrList
+ keepLayout:keepLayout
+ at:nil
+
+ "Modified: 11.8.1997 / 01:00:35 / cg"
+!
+
+pasteSpecifications:aSpecificationOrList keepLayout:keepLayout at:aPointOrNil
+ "add the specs to the object view; returns list of pasted components
+ "
|paste frame pasteOrigin pasteOffset builder newSel|
(self canPaste:aSpecificationOrList) ifFalse:[
@@ -237,8 +250,12 @@
keepLayout ifFalse:[
pasteOffset := 0@0.
- pasteOrigin := self sensor mousePoint.
- pasteOrigin := device translatePoint:pasteOrigin from:device rootView id to:frame id.
+ aPointOrNil isNil ifTrue:[
+ pasteOrigin := self sensor mousePoint.
+ pasteOrigin := device translatePoint:pasteOrigin from:device rootView id to:frame id.
+ ] ifFalse:[
+ pasteOrigin := aPointOrNil
+ ].
].
paste do:[:aSpec|
@@ -271,6 +288,9 @@
self elementChangedSize:frame.
].
^ newSel
+
+ "Created: 11.8.1997 / 00:59:38 / cg"
+ "Modified: 11.8.1997 / 01:05:27 / cg"
!
pasteWithLayout
@@ -333,16 +353,21 @@
!
drop:anObjectOrCollection at:aPoint
- |spec newSel oldSel|
+ |spec newSel oldSel dragOffset|
+
+Transcript showCR:aPoint.
(oldSel := selection) isCollection ifTrue:[
oldSel := selection copy
].
spec := (anObjectOrCollection at:1) theObject.
- newSel := self pasteSpecifications:spec keepLayout:false.
+ dragOffset := DragAndDropManager dragOffsetQuerySignal raise.
+ newSel := self pasteSpecifications:spec keepLayout:false at:aPoint - dragOffset.
oldSel isNil ifTrue:[self select:newSel]
ifFalse:[self select:oldSel]
+
+ "Modified: 11.8.1997 / 01:07:09 / cg"
! !
!UIPainterView methodsFor:'generating output'!