This class represents a source for a drag and drop operation.
See Drag and drop overview and DataObject overview
for more information.
None
DragResultDragResult is defined as follows:
enum DragResult { DragError, // error prevented the d&d operation from completing DragNone, // drag target didn’t accept the data DragCopy, // the data was successfully copied DragMove, // the data was successfully moved (MSW only) DragLink, // operation is a drag-link DragCancel // the operation was cancelled by user (not an error) };DropTarget,
TextDropTarget, FileDropTarget
The constructors for DataObject.
If you use the constructor without data parameter you must call
set_data later.
Note that the exact type of iconCopy and subsequent parameters differs
between MSW and GTK: these are cursors under Windows but icons for GTK.
You should use the macro DROP_ICON in portable
programs instead of directly using either of these types.
win is the window which initiates the drag and drop operation.
destructor()Sets the data DataObject associated with the
drop source. This will not delete any previously associated data.
Drag_CopyOnly
)
Do it (call this in response to a mouse button press, for example). This starts
the drag-and-drop operation which will terminate when the user releases the
mouse.
Drag_AllowMove
is included in the flags, data mayDrag_DefaultMove
isReturns the operation requested by the user, may be DragCopy
,
DragMove, DragLink
, DragCancel
or DragNone
if an error occurred.
Returns the DataObject object that has been assigned previously.
Overridable: you may give some custom UI feedback during the drag and drop operation
in this function. It is called on each mouse move, so your implementation must not be too
slow.
DragCopy
, DragMove
, DragLink
and DragNone
.Return false if you want default feedback, or true if you implement your own
feedback. The return values is ignored under GTK.
Set the icon to use for a certain drag result.
[This page automatically generated from the Textile source at 2023-06-13 21:31:40 +0000]