--- a/DragAndDropManager.st Wed May 06 15:21:12 2009 +0200
+++ b/DragAndDropManager.st Wed May 06 15:34:22 2009 +0200
@@ -914,44 +914,48 @@
!DragAndDropManager methodsFor:'dragging-easy startup'!
-startDrag:draggableObjects from:aView
+startDrag:draggableObjects from:aView
"start a drop at the current pointer position"
-
- ^ self startDrag:draggableObjects
- from:aView
- offset:0@0
+
+ ^ self
+ startDrag:draggableObjects
+ from:aView
+ offset:0 @ 0
!
-startDrag:draggableObjects from:aView display:something
+startDrag:draggableObjects from:aView display:something
"start a drop at the current pointer position."
-
- ^ self startDrag:draggableObjects
- from:aView
- offset:nil
- atEnd:nil
- display:something
+
+ ^ self
+ startDrag:draggableObjects
+ from:aView
+ offset:nil
+ atEnd:nil
+ display:something
!
-startDrag:draggableObjects from:aView offset:anOffset
+startDrag:draggableObjects from:aView offset:anOffset
"start a drop at the current pointer position with an offset"
-
- ^ self startDrag:draggableObjects
- from:aView
- offset:anOffset
- atEnd:nil
+
+ ^ self
+ startDrag:draggableObjects
+ from:aView
+ offset:anOffset
+ atEnd:nil
!
-startDrag:draggableObjects from:aView offset:anOffset atEnd:aFourArgEndBlock
+startDrag:draggableObjects from:aView offset:anOffset atEnd:aFourArgEndBlock
"start a drop at the current pointer position.
When finished, the endAction is called with four args:
the targetView, the targetViews windowID (useful, if its an alien view),
the dropPoint in root-coordinates and the dropPoint within the targetView"
-
- ^ self startDrag:draggableObjects
- from:aView
- offset:anOffset
- atEnd:aFourArgEndBlock
- display:draggableObjects
+
+ ^ self
+ startDrag:draggableObjects
+ from:aView
+ offset:anOffset
+ atEnd:aFourArgEndBlock
+ display:draggableObjects
!
startDrag:draggableObjects from:aView offset:anOffset atEnd:aFourArgBlock display:something
@@ -1005,39 +1009,42 @@
dispObjs do:[:el| el at:2 put:((el at:2) - offset) ].
- self startOpaqueDrag:[:p :v|
- |cursor hX hY pDraw|
+ self
+ startOpaqueDrag:
+ [:p :v|
+ |cursor hX hY pDraw|
- cursor := dragView cursor.
- hX := cursor hotX.
- hY := cursor hotY.
- pDraw := p "- (hX@hY) + cursor extent".
- dispObjs do:[:el| (el at:1) displayOn:v
- at:pDraw + (el at:2)
- ]
- ]
- offset:offset
- extent:width @ height
- in:aView
- at:nil
- atEnd:aFourArgBlock
+ cursor := dragView cursor.
+ hX := cursor hotX.
+ hY := cursor hotY.
+ pDraw := p "- (hX@hY) + cursor extent".
+ dispObjs do:[:el|
+ (el at:1) displayOn:v at:pDraw + (el at:2)
+ ]
+ ]
+ offset:offset
+ extent:width @ height
+ in:aView
+ at:nil
+ atEnd:aFourArgBlock
"Modified: / 31.3.1998 / 11:18:04 / cg"
!
-startDrag:draggableObjects from:aView offset:anOffset display:something
+startDrag:draggableObjects from:aView offset:anOffset display:something
"start a drop at the current pointer position."
-
- ^ self startDrag:draggableObjects
- from:aView
- offset:anOffset
- atEnd:nil
- display:something
+
+ ^ self
+ startDrag:draggableObjects
+ from:aView
+ offset:anOffset
+ atEnd:nil
+ display:something
! !
!DragAndDropManager methodsFor:'dragging-generic'!
-startGenericDrag:aTwoArgDragBlock in:aView at:p atEnd:aFourArgEndBlock
+startGenericDrag:aTwoArgDragBlock in:aView at:p atEnd:aFourArgEndBlock
"start a generic (caller-provided drag);
Here, an inverting drag is initiated (i.e. the drawing is undone
by inverting again). See startOpaqueDrag for another variant.
@@ -1047,13 +1054,14 @@
When finished, the endAction is called with four args:
the targetView, the targetViews windowID (useful, if its an alien view),
the dropPoint in root-coordinates and the dropPoint within the targetView"
-
- ^ self startOpaqueDrag:aTwoArgDragBlock
- offset:nil
- extent:nil
- in:aView
- at:nil
- atEnd:aFourArgEndBlock
+
+ ^ self
+ startOpaqueDrag:aTwoArgDragBlock
+ offset:nil
+ extent:nil
+ in:aView
+ at:nil
+ atEnd:aFourArgEndBlock
!
startOpaqueDrag:aDragBlock offset:offs extent:anExtent in:aView at:aDummyPoint atEnd:aFourArgEndBlock
@@ -1094,36 +1102,36 @@
!DragAndDropManager methodsFor:'dragging-lines'!
-startArrowDragIn:aView at:aStartPoint atEnd:aFourArgEndBlock
+startArrowDragIn:aView at:aStartPoint atEnd:aFourArgEndBlock
"start a line-drag of an arrow-line.
The drag starts in aView at point aStartPoint.
When finished, the endAction is called with four args:
the targetView, the targetViews windowID (useful, if its an alien view),
the dropPoint in root-coordinates and the dropPoint within the targetView"
-
+
|p|
p := self class translatePointToScreen:aStartPoint from:aView.
-
- self doStart:(DragHandler startArrowDragAt:p)
- for:aView
- atEnd:aFourArgEndBlock
+ self
+ doStart:(DragHandler startArrowDragAt:p)
+ for:aView
+ atEnd:aFourArgEndBlock
!
-startLineDragIn:aView at:aStartPoint atEnd:aFourArgEndBlock
+startLineDragIn:aView at:aStartPoint atEnd:aFourArgEndBlock
"start a line-drag of a normal line.
The drag starts in aView at point aStartPoint.
When finished, the endAction is called with four args:
the targetView, the targetViews windowID (useful, if its an alien view),
the dropPoint in root-coordinates and the dropPoint within the targetView"
-
+
|p|
p := self class translatePointToScreen:aStartPoint from:aView.
-
- self doStart:(DragHandler startLineDragAt:p)
- for:aView
- atEnd:aFourArgEndBlock
+ self
+ doStart:(DragHandler startLineDragAt:p)
+ for:aView
+ atEnd:aFourArgEndBlock
! !
!DragAndDropManager methodsFor:'drawing'!
@@ -1690,7 +1698,7 @@
!DragAndDropManager class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.84 2009-05-01 17:36:47 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.85 2009-05-06 13:34:22 cg Exp $'
! !
DragAndDropManager initialize!