comments
authorClaus Gittinger <cg@exept.de>
Mon, 06 Oct 2003 17:29:36 +0200
changeset 1822 ceeb17948f5d
parent 1821 5539214ed293
child 1823 e2d9927c7488
comments
DropTarget.st
--- a/DropTarget.st	Mon Sep 22 18:19:18 2003 +0200
+++ b/DropTarget.st	Mon Oct 06 17:29:36 2003 +0200
@@ -106,15 +106,15 @@
 
 argument
     "returns the user defined argument; this argument is used for a drop action
-     with two arguments, the context and the argument
-    "
+     with two arguments, the context and the argument"
+
     ^ argument
 !
 
 argument:something
     "set the user defined argument; this argument is used for a drop action
-     with two arguments, the context and the argument
-    "
+     with two arguments, the context and the argument"
+
     ^ something
 !
 
@@ -139,30 +139,37 @@
 !
 
 dropSelector
-    "selector called to drop a collection of draggable objects.
-     the arguments to the selector are:
+    "return the selector of the message which is sent to the drop target 
+     when the objects are to be dropped (i.e. when the mouse button is released).
+
+     Depending on the number of arguments of the selector,
+     the arguments of the message are:
         0       nothing
         1       aDropContext
-        2       aDropContext and the argument
-    "
+        2       aDropContext and the argument"
+
     ^ dropSelector
 !
 
 dropSelector:something
-    "selector called to drop a collection of draggable objects.
+    "specify the selector of the message which is sent to the drop target 
+     when the objects are to be dropped (i.e. when the mouse button is released).
 
-     the arguments to the selector are:
+     Depending on the number of arguments of the selector,
+     the arguments of the message are:
         0       nothing
         1       aDropContext
-        2       aDropContext and the argument
-    "
+        2       aDropContext and the argument"
+
     dropSelector := something.
 !
 
 enterSelector
-    "send the first time to the drop target when entering the widget.
+    "return the selector of the message which is sent to the drop target 
+     when entering the widget for the first time.
 
-     the arguments to the selector are:
+     Depending on the number of arguments of the selector,
+     the arguments of the message are:
         0       nothing
         1       aDropContext
         2       aDropContext and the argument
@@ -171,42 +178,49 @@
 !
 
 enterSelector:something
-    "send the first time to the drop target when entering the widget.
+    "specify the selector of the message which is sent to the drop target 
+     when entering the widget for the first time.
 
-     the arguments to the selector are:
+     Depending on the number of arguments of the selector,
+     the arguments of the message are:
         0       nothing
         1       aDropContext
-        2       aDropContext and the argument
-    "
+        2       aDropContext and the argument"
+
     enterSelector := something.
 !
 
 leaveSelector
-    "send the last time to the drop target when leaving the widget.
+    "return the selector of the message which is sent to the drop target 
+     when leaving the widget.
 
-     the arguments to the selector are:
+     Depending on the number of arguments of the selector,
+     the arguments of the message are:
         0       nothing
         1       aDropContext
-        2       aDropContext and the argument
-    "
+        2       aDropContext and the argument"
+
     ^ leaveSelector
 !
 
 leaveSelector:something
-    "send the last time to the drop target when leaving the widget.
+    "specify the selector of the message which is sent to the drop target 
+     when leaving the widget.
 
-     the arguments to the selector are:
+     Depending on the number of arguments of the selector,
+     the arguments of the message are:
         0       nothing
         1       aDropContext
-        2       aDropContext and the argument
-    "
+        2       aDropContext and the argument"
+
     leaveSelector := something.
 !
 
 overSelector
     "send all the time to the drop target when moveing the mouse over the widget
 
-     the arguments to the selector are:
+     Depending on the number of arguments of the selector,
+     the arguments of the message are:
         0       nothing
         1       aDropContext
         2       aDropContext and the argument
@@ -215,67 +229,69 @@
 !
 
 overSelector:something
-    "send all the time to the drop target when moveing the mouse over the widget
+    "specify the selector of the message which is sent to the drop target 
+     when the mouse is moved over the widget.
 
-     the arguments to the selector are:
+     Depending on the number of arguments of the selector,
+     the arguments of the message are:
         0       nothing
         1       aDropContext
-        2       aDropContext and the argument
-    "
+        2       aDropContext and the argument"
+
     overSelector := something.
 !
 
 receiver
-    "receiver to which the requests are sent. a widget or an application ...
-    "
+    "returns the receiver to which the requests are sent: a widget or an application."
+
     ^ receiver
 !
 
 receiver:something
-    "receiver to which the requests are sent. a widget or an application ...
-    "
+    "define the receiver to which the requests are sent. 
+     The argument is a widget or an application."
+
     receiver := something.
 ! !
 
 !DropTarget methodsFor:'actions'!
 
 drop:aContext
-    "send when the mouse button is released within the current widget.
-    "
+    "sent when the mouse button is released within the current widget."
+
     self perform:dropSelector withContext:aContext
 !
 
 enter:aContext
-    "send the first time, when entering the widget
-    "
+    "sent when entering the widget for the first time."
+
     self perform:enterSelector withContext:aContext
 !
 
 leave:aContext
-    "send the last time, when leaving the widget
-    "
+    "sent the last time, when leaving the widget."
+
     self perform:leaveSelector withContext:aContext
 !
 
 over:aContext
-    "send all the time, when moveing the mouse over the widget
-    "
+    "sent whenever the mouse is moved over the widget."
+
     self perform:overSelector withContext:aContext
-
 ! !
 
 !DropTarget methodsFor:'instance creation'!
 
 receiver:aReceiver argument:anArgument
-    "set the receiver and an user defined argument
-    "
+    "set the receiver and a user defined argument"
+
     receiver := aReceiver.
     argument := anArgument.
 !
 
 receiver:aReceiver argument:anArgument dropSelector:s1 canDropSelector:s2
-    "set the receiver and an user defined argument
-    "
+    "set the receiver and a user defined argument"
+
     receiver        := aReceiver.
     argument        := anArgument.
     dropSelector    := s1.
@@ -285,8 +301,8 @@
 !DropTarget methodsFor:'private'!
 
 perform:aSelector withContext:aContext
-    "perform the selector
-    "
+    "perform the selector"
+
     aSelector notNil ifTrue:[
         ^ receiver perform:aSelector withOptionalArgument:aContext and:argument
     ]
@@ -295,8 +311,8 @@
 !DropTarget methodsFor:'queries'!
 
 canDrop:aContext
-    "send to the receiver to ask if the context is droppable
-    "
+    "send to the receiver to ask if the context is droppable"
+
     canDropSelector notNil ifTrue:[
         ^ receiver perform:canDropSelector withOptionalArgument:aContext and:argument
     ].
@@ -306,5 +322,5 @@
 !DropTarget class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/DropTarget.st,v 1.2 2001-12-14 10:51:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/DropTarget.st,v 1.3 2003-10-06 15:29:36 cg Exp $'
 ! !