|
Class: DropTarget
Object
|
+--DropTarget
- Package:
- stx:libview2
- Category:
- Interface-DragAndDrop
- Version:
- rev:
1.13
date: 2021/01/20 13:12:43
- user: cg
- file: DropTarget.st directory: libview2
- module: stx stc-classLibrary: libview2
this class keeps the current target of the drop operation;
the object responsible for the widget under the current mouse position.
Usually a dropTarget object is created by the D&D manager automatically,
but a view may redefine the dropTarget method (or set its dropTarget instVar),
to provide a customized droptarget (with different selectors).
receiver <Object> receiver to which the requests are sent.
The widget or an application.
argument <Object> user defined argument
enterSelector <Symbol> sent the first time to the drop target when entering
the widget. Nil, when defaulted from D&D manager.
leaveSelector <Symbol> sent the last time to the drop target when leaving
the widget. Nil, when defaulted from D&D manager.
overSelector <Symbol> sent all the time to the drop target when moveing the
mouse over the widget. Nil, when defaulted from D&D manager.
dropSelector <Symbol> sent to the drop target to drop the collection of
objects. #drop: when defaulted from D&D manager.
canDropSelector <Symbol> sent to the drop target to ask if the context could
be dropped. #canDrop: when defaulted from D&D manager.
copyrightCOPYRIGHT (c) 1998 by eXept Software AG / Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
instance creation
-
receiver: aReceiver
-
-
receiver: aReceiver argument: anArgument
-
-
receiver: aReceiver argument: anArgument dropSelector: aSelector
-
-
receiver: aReceiver argument: anArgument dropSelector: s1 canDropSelector: s2
-
accessing
-
argument
-
returns the user defined argument; this argument is used for a drop action
with two arguments, the context and the argument
-
argument: something
-
set the user defined argument; this argument is passed for a drop action
with two arguments, the context and the argument
-
canDropSelector
-
selector called to get a feedback if context is droppable.
the arguments to the selector are:
0 nothing
1 aDropContext
2 aDropContext and the argument
-
canDropSelector: aSelectorOrNil
-
selector called to get a feedback if context is droppable.
the arguments to the selector are:
0 nothing
1 aDropContext
2 aDropContext and the argument
-
dropSelector
-
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
-
dropSelector: aSelectorOrNil
-
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).
Depending on the number of arguments of the selector,
the arguments of the message are:
0 nothing
1 aDropContext
2 aDropContext and the argument
-
enterSelector
-
return the selector of the message which is sent to the drop target
when entering the widget for the first time.
Depending on the number of arguments of the selector,
the arguments of the message are:
0 nothing
1 aDropContext
2 aDropContext and the argument
-
enterSelector: aSelectorOrNil
-
specify the selector of the message which is sent to the drop target
when entering the widget for the first time.
Depending on the number of arguments of the selector,
the arguments of the message are:
0 nothing
1 aDropContext
2 aDropContext and the argument
-
keyPressSelector
-
return the selector of the message which is sent to the drop target
when a key is pressed during the drag operation.
By default, keyboard input is ignored,
(except for escape, shift, cmd, ctrl etc., which are handled by the d&d manager).
Apps which want to react on keypress, must return a dropTarget with the
keyPressSelector set.
-
keyPressSelector: aSelectorOrNil
-
set the selector of the message which is sent to the drop target
when a key is pressed during the drag operation.
By default, keyboard input is ignored,
(except for escape, shift, cmd, ctrl etc., which are handled by the d&d manager).
Apps which want to react on keypress, must return a dropTarget with the
keyPressSelector set.
-
leaveSelector
-
return the selector of the message which is sent to the drop target
when leaving the widget.
Depending on the number of arguments of the selector,
the arguments of the message are:
0 nothing
1 aDropContext
2 aDropContext and the argument
-
leaveSelector: aSelectorOrNil
-
specify the selector of the message which is sent to the drop target
when leaving the widget.
Depending on the number of arguments of the selector,
the arguments of the message are:
0 nothing
1 aDropContext
2 aDropContext and the argument
-
oldDropAPI: aBoolean
-
for backward compatibility
-
overSelector
-
send all the time to the drop target when moveing the mouse over the widget
Depending on the number of arguments of the selector,
the arguments of the message are:
0 nothing
1 aDropContext
2 aDropContext and the argument
-
overSelector: aSelectorOrNil
-
specify the selector of the message which is sent to the drop target
when the mouse is moved over the widget.
Depending on the number of arguments of the selector,
the arguments of the message are:
0 nothing
1 aDropContext
2 aDropContext and the argument
-
receiver
-
returns the receiver to which the requests are sent: a widget or an application.
-
receiver: viewOrApp
-
define the receiver to which the requests are sent.
The argument is a widget or an application.
actions
-
drop: aDropContext
-
sent, when the mouse button is released within the current widget.
Forwarded via dropSelector to the receiver
-
enter: aContext
-
sent, when entering a widget.
Forwarded via enterSelector (unless nil) to the receiver
-
keyPress: aContext key: aKey
-
sent, whenever a key is pressed while over a widget.
Forwarded via dropKeyPressSelector (unless nil) to the receiver
-
leave: aContext
-
sent, when leaving a widget.
Forwarded via leaveSelector (unless nil) to the receiver
-
over: aContext
-
sent, whenever the mouse is moved over a widget.
Forwarded via overSelector (unless nil) to the receiver
instance creation
-
receiver: aReceiver argument: anArgument
-
set the receiver and a user defined argument
-
receiver: aReceiver argument: anArgument dropSelector: s1 canDropSelector: s2
-
set the receiver and a user defined argument
private
-
receiverPerform: aSelector withContext: aContext
-
let the receiver perform the selector
** This is an obsolete interface - do not use it (it may vanish in future versions) **
queries
-
canDrop: aDropContext
-
sent to the receiver to ask if the context is droppable
|