--- a/DragAndDropManager.st Sat Apr 02 17:07:45 2016 +0200
+++ b/DragAndDropManager.st Sat Apr 02 17:17:42 2016 +0200
@@ -11,6 +11,8 @@
"
"{ Package: 'stx:libview2' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#DragAndDropManager
instanceVariableNames:'dropContext dragView dropAction dragOffset handler restoreBlock
alienCursor enabledCursor disabledCursor canDrop escapePressed
@@ -689,10 +691,10 @@
translatePointFromScreen:aPoint to:aView
"translate a point from screen to view coordinates"
- |device trans point offset|
+ |viewsDevice trans point offset|
aView isRootView ifTrue:[^ aPoint].
- device := aView device.
+ viewsDevice := aView device.
"/
"/ get device coordinates
"/
@@ -704,21 +706,21 @@
"/
"/ translate to screen
"/
- offset := device translatePoint:0@0 fromView:(device rootView) toView:aView.
+ offset := viewsDevice translatePoint:0@0 fromView:(viewsDevice rootView) toView:aView.
^ offset + point
!
translatePointFromScreen:aPoint toView:aView
"translate a point from screen- to view coordinates"
- |device trans point offset|
+ |viewsDevice trans point offset|
- device := aView device.
+ viewsDevice := aView device.
"/
"/ translate to view
"/
- offset := device translatePoint:0@0 fromView:(device rootView) toView:aView.
+ offset := viewsDevice translatePoint:0@0 fromView:(viewsDevice rootView) toView:aView.
point := aPoint + offset.
"/
@@ -733,10 +735,10 @@
translatePointToScreen:aPoint from:aView
"translate a point from view- to screen coordinates"
- |device trans point offset|
+ |viewsDevice trans point offset|
aView isRootView ifTrue:[^ aPoint].
- device := aView device.
+ viewsDevice := aView device.
"/
"/ get device coordinates
"/
@@ -748,7 +750,7 @@
"/
"/ translate to screen
"/
- offset := device translatePoint:0@0 fromView:aView toView:(device rootView).
+ offset := viewsDevice translatePoint:0@0 fromView:aView toView:(viewsDevice rootView).
^ offset + point
! !
@@ -1605,10 +1607,10 @@
doStart:aHandler for:aView atEnd:aFourArgEndBlock
"setup a handler and a restore block"
- |device lastActive windowGroup screenPoint|
+ |viewsDevice lastActive windowGroup screenPoint|
- device := aView device.
- lastActive := ActiveDragAndDropManagers at:device ifAbsent:nil.
+ viewsDevice := aView device.
+ lastActive := ActiveDragAndDropManagers at:viewsDevice ifAbsent:nil.
lastActive notNil ifTrue:[
"/ self error:'oops - two dnd managers active' mayProceed:true.
@@ -1616,7 +1618,7 @@
lastActive forceGiveUp.
'DragAndDropManager [info]: oops - two dnd managers active' infoPrintCR.
].
- ActiveDragAndDropManagers at:device put:self.
+ ActiveDragAndDropManagers at:viewsDevice put:self.
dropContext sourceWidget:aView.
@@ -1644,7 +1646,7 @@
autoScrollTask := nil.
].
- ActiveDragAndDropManagers removeKey:device ifAbsent:nil.
+ ActiveDragAndDropManagers removeKey:viewsDevice ifAbsent:nil.
escapePressed ifFalse:[ aHandler postDragging ].
windowGroup removePreEventHook:self.
@@ -1656,7 +1658,7 @@
aHandler preDraggingIn:dragView.
"/ must wait for all pending motion events to arrive, and ignore them
- device sync.
+ viewsDevice sync.
dragView sensor flushMotionEventsFor:nil.
autoScrollTask :=
@@ -1682,8 +1684,8 @@
autoScrollTask resume.
"/ start with a first draw at the current mouse position
- screenPoint := device pointerPosition.
- self buttonMotion:1 x:(screenPoint x) y:(screenPoint y) view:(device rootView).
+ screenPoint := viewsDevice pointerPosition.
+ self buttonMotion:1 x:(screenPoint x) y:(screenPoint y) view:(viewsDevice rootView).
!
forceGiveUp
@@ -1716,11 +1718,11 @@
!DragAndDropManager class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.94 2014-12-21 23:33:02 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.94 2014-12-21 23:33:02 cg Exp $'
+ ^ '$Header$'
! !