keep reference to DragHandler
authorClaus Gittinger <cg@exept.de>
Fri, 16 Apr 1999 16:18:19 +0200
changeset 1161 1b0ae7be8de6
parent 1160 4bd4457b1d90
child 1162 0539b64679ce
keep reference to DragHandler provide a #contentsWillChange method -> clear saved contents
DropContext.st
--- a/DropContext.st	Thu Apr 15 14:11:25 1999 +0200
+++ b/DropContext.st	Fri Apr 16 16:18:19 1999 +0200
@@ -13,7 +13,7 @@
 
 Object subclass:#DropContext
 	instanceVariableNames:'dropObjects rootPoint dropSource sourceWidget dropTarget
-		targetWidget targetId hasDropped'
+		targetWidget targetId hasDropped dragHandler'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-DragAndDrop'
@@ -56,6 +56,15 @@
 
 !DropContext methodsFor:'accessing'!
 
+dragHandler
+    ^ dragHandler
+
+!
+
+dragHandler:aHandler
+    dragHandler := aHandler
+!
+
 dropObjects
     "returns the collection of droppable objects
     "
@@ -158,6 +167,19 @@
     ].
 ! !
 
+!DropContext methodsFor:'change & update'!
+
+contentsWillChange
+    "called by the dropTarget-widget if the contents will change during a
+     dragAndDrop operation
+    "
+    dragHandler notNil ifTrue:[
+        dragHandler dropTargetWillChange
+    ]
+
+
+! !
+
 !DropContext methodsFor:'drag & drop manager interface'!
 
 dropObjects:something
@@ -229,5 +251,5 @@
 !DropContext class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/DropContext.st,v 1.1 1998-03-30 12:00:14 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/DropContext.st,v 1.2 1999-04-16 14:18:19 cg Exp $'
 ! !