DragAndDropManager.st
changeset 3774 cee263839e68
parent 3725 3fb5cf9108cf
child 3885 e639779ef87b
--- a/DragAndDropManager.st	Fri Nov 04 13:42:19 2016 +0100
+++ b/DragAndDropManager.st	Fri Nov 04 16:03:44 2016 +0100
@@ -53,26 +53,26 @@
     There, the view creates a collection of dropObjects from its selection,
     and starts the drag operation with:
 
-	DragAndDropManager startDrag:collectionOfDragObjects from:aView.
+        DragAndDropManager startDrag:collectionOfDragObjects from:aView.
 
     This easy to use interface starts a drag and also drops the collection
     into the target view.
     While dragging, a thumbsUp cursor is shown, if the view-under-the-drag
     can handle a drop, a thumbsDown is shown if not, and a question mark
-    is shown for alien views (which means: we dont know).
+    is shown for alien views (which means: we don't know).
     Alien view drop is supported (but no 'canDrop' query).
 
     For rubber-band line dragging, two more easy-to-use startup methods are
     provided:
 
-	DragAndDropManager
-		startLineDragIn:aView at:position
-		atEnd:aFourArgEndBlock
+        DragAndDropManager
+                startLineDragIn:aView at:position
+                atEnd:aFourArgEndBlock
 
     and:
-	DragAndDropManager
-		startArrowDragIn:aView at:position
-		atEnd:aFourArgEndBlock
+        DragAndDropManager
+                startArrowDragIn:aView at:position
+                atEnd:aFourArgEndBlock
 
     both of the above expect a 4-arg block to be passed, which will be
     evaluated at end-drag, with the target view, its viewID, the drop position
@@ -84,61 +84,60 @@
     More control over the dragging (i.e. the drawing procedure)
     can be optained, by passing a dragBlock and an endDrag action:
         
-	aDragAndDropMgr := DragAndDropManager new.
-	aDragAndDropMgr dropObjects:(self collectionOfDragObjects).
-	aDragAndDropMgr 
-	    startOpaqueDrag:[:aPoint :aView :dropObjects | 
-				self 
-				    showDragging:dropObjects
-				    in:aView 
-				    at:aPoint - (xOffset@0)
-			    ]
-	    offset:clickOffset
-	    extent:saveUnderExtent
-	    in:self
-	    at:clickPoint
-	    atEnd:[:v :vId :posScreen :posView | ... ]
+        aDragAndDropMgr := DragAndDropManager new.
+        aDragAndDropMgr dropObjects:(self collectionOfDragObjects).
+        aDragAndDropMgr 
+            startOpaqueDrag:[:aPoint :aView :dropObjects | 
+                                self 
+                                    showDragging:dropObjects
+                                    in:aView 
+                                    at:aPoint - (xOffset@0)
+                            ]
+            offset:clickOffset
+            extent:saveUnderExtent
+            in:self
+            at:clickPoint
+            atEnd:[:v :vId :posScreen :posView | ... ]
 
     the arguments are:
       startOpaqueDrag:
-	a 3-arg block, which is evaluated by the d&d manager whenever the
-	mouse moves; it is supposed to draw the dropObjects at some position
-	in the passed view.
+        a 3-arg block, which is evaluated by the d&d manager whenever the
+        mouse moves; it is supposed to draw the dropObjects at some position
+        in the passed view.
 
       offset:
-	a clickOffset; drawing is offset by this amount
+        a clickOffset; drawing is offset by this amount
 
       extent:  
-	a save extent; the size of the screen area that must be saved during
-	the drag operation
+        a save extent; the size of the screen area that must be saved during
+        the drag operation
 
       in:
-	initiating view
+        initiating view
 
       at:
-	position where d&d operation starts
+        position where d&d operation starts
 
       atEnd:
-	a 4-arg block that is evaluated when the d&d is finished.
-	It gets the target view (or nil, for alien views), the targets
-	view ID (needed if its an alien view), the screen position and the
-	relative position within the target view of the drop as arguments.
+        a 4-arg block that is evaluated when the d&d is finished.
+        It gets the target view (or nil, for alien views), the targets
+        view ID (needed if its an alien view), the screen position and the
+        relative position within the target view of the drop as arguments.
 
-	For internal (ST/X) views, the dropBlock should perform
-	a simple canDrop:/doDrop message.
+        For internal (ST/X) views, the dropBlock should perform
+        a simple canDrop:/doDrop message.
 
-	For alien views, the Displays d&d functions can be used.
+        For alien views, the Displays d&d functions can be used.
 
 
     [author:]
-	Claus Gittinger
+        Claus Gittinger
 
     [see also:]
-	DemoView1, DemoView2, ...
-	SelectionInListView FileBrowser - for a concrete example
+        DemoView1, DemoView2, ...
+        SelectionInListView FileBrowser - for a concrete example
 
 "
-
 !
 
 examples