--- a/DragAndDropManager.st Sat Oct 26 18:57:15 1996 +0200
+++ b/DragAndDropManager.st Sat Oct 26 19:06:50 1996 +0200
@@ -1,12 +1,12 @@
Object subclass:#DragAndDropManager
instanceVariableNames:'dragView motionAction releaseAction initialPoint previousPoint
- rememberedDelegate dragBlock lineMode'
+ rememberedDelegate dragBlock lineMode dropAction'
classVariableNames:''
poolDictionaries:''
category:'Interface-Support'
!
-View subclass:#DemoView3
+View subclass:#DemoView
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
@@ -20,7 +20,7 @@
privateIn:DragAndDropManager
!
-View subclass:#DemoView
+View subclass:#DemoView3
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
@@ -91,13 +91,14 @@
"Modified: 26.10.1996 / 15:27:09 / cg"
!
-setupForGenericDragFrom:aView at:p into:aBlock
+startGenericDrag:aBlock in:aView at:p atEnd:endBlock
self catchEventsFrom:aView.
motionAction := #doGenericDragX:y:.
releaseAction := #endGenericDragX:y:.
initialPoint := p.
previousPoint := nil.
dragBlock := aBlock.
+ dropAction := endBlock.
"Modified: 26.10.1996 / 15:09:26 / cg"
"Created: 26.10.1996 / 15:16:13 / cg"
@@ -168,7 +169,7 @@
"Modified: 26.10.1996 / 15:27:09 / cg"
!
-setupForArrowDragFrom:aView at:p
+startArrowDragIn:aView at:p atEnd:aBlock
self catchEventsFrom:aView.
motionAction := #doLineDragX:y:.
releaseAction := #endLineDragX:y:.
@@ -176,12 +177,13 @@
previousPoint := nil.
dragBlock := nil.
lineMode := #arrow.
+ dropAction := aBlock.
"Modified: 26.10.1996 / 15:09:26 / cg"
"Created: 26.10.1996 / 15:16:13 / cg"
!
-setupForLineDragFrom:aView at:p
+startLineDragIn:aView at:p atEnd:aBlock
self catchEventsFrom:aView.
motionAction := #doLineDragX:y:.
releaseAction := #endLineDragX:y:.
@@ -189,6 +191,7 @@
previousPoint := nil.
dragBlock := nil.
lineMode := nil.
+ dropAction := aBlock.
"Modified: 26.10.1996 / 15:09:26 / cg"
"Created: 26.10.1996 / 15:16:13 / cg"
@@ -244,11 +247,11 @@
"Created: 26.10.1996 / 15:22:29 / cg"
! !
-!DragAndDropManager::DemoView3 methodsFor:'events'!
+!DragAndDropManager::DemoView methodsFor:'events'!
buttonPress:button x:x y:y
DragAndDropManager new
- setupForArrowDragFrom:self at:(x@y)
+ startLineDragIn:self at:(x@y) atEnd:[:v :id :p | ].
"
self new open
@@ -259,7 +262,11 @@
buttonPress:button x:x y:y
DragAndDropManager new
- setupForGenericDragFrom:self at:(x@y) into:[:p | device rootView displayString:'hello' at:p]
+ startGenericDrag:[:p | device rootView displayString:'hello' at:p]
+ in:self
+ at:(x@y)
+ atEnd:[:v :id :p | ]
+
"
self new open
@@ -268,11 +275,13 @@
! !
-!DragAndDropManager::DemoView methodsFor:'events'!
+!DragAndDropManager::DemoView3 methodsFor:'events'!
buttonPress:button x:x y:y
DragAndDropManager new
- setupForLineDragFrom:self at:(x@y)
+ startArrowDragIn:self
+ at:(x@y)
+ atEnd:[:v :id :p | ]
"
self new open
@@ -282,5 +291,5 @@
!DragAndDropManager class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.3 1996-10-26 16:49:55 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.4 1996-10-26 17:06:50 cg Exp $'
! !