/**
Override this function to receive dropped text.
-
+
@param x
The x coordinate of the mouse.
@param y
/**
Called when the mouse is being dragged over the drop target. By default,
this calls functions return the suggested return value @e def.
-
+
@param x
The x coordinate of the mouse.
@param y
The y coordinate of the mouse.
@param def
Suggested value for return value. Determined by SHIFT or CONTROL key states.
-
+
@returns Returns the desired operation or wxDragNone. This is used for
optical feedback from the side of the drop source,
typically in form of changing the icon.
/**
Called when the user drops a data object on the target. Return @false to veto
the operation.
-
+
@param x
The x coordinate of the mouse.
@param y
The y coordinate of the mouse.
-
+
@returns Return @true to accept the data, @false to veto the operation.
*/
virtual bool OnDrop(wxCoord x, wxCoord y);
/**
Called when the mouse enters the drop target. By default, this calls
OnDragOver().
-
+
@param x
The x coordinate of the mouse.
@param y
@param def
Suggested default for return value. Determined by SHIFT or CONTROL key
states.
-
+
@returns Returns the desired operation or wxDragNone. This is used for
optical feedback from the side of the drop source,
typically in form of changing the icon.
between wxMSW and wxGTK: these are cursors under Windows but icons for GTK.
You should use the macro wxDROP_ICON() in portable
programs instead of directly using either of these types.
-
+
@param win
The window which initiates the drag and drop operation.
@param iconCopy
//@}
/**
-
+
*/
~wxDropSource();
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.
-
+
@param flags
If wxDrag_AllowMove is included in the flags, data may
be moved and not only copied (default). If wxDrag_DefaultMove is
specified (which includes the previous flag), this is even the default
operation
-
+
@returns Returns the operation requested by the user, may be wxDragCopy,
wxDragMove, wxDragLink, wxDragCancel or wxDragNone if
an error occurred.
in this function. It is called on each mouse move, so your implementation must
not be too
slow.
-
+
@param effect
The effect to implement. One of wxDragCopy, wxDragMove, wxDragLink and
wxDragNone.
@param scrolling
@true if the window is scrolling. MSW only.
-
+
@returns 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.
-
+
@param res
The drag result to set the icon for.
@param cursor
/**
Override this function to receive dropped files.
-
+
@param x
The x coordinate of the mouse.
@param y
// Global functions/macros
// ============================================================================
+/** @ingroup group_funcmacro_gdi */
+//@{
+
/**
- This macro creates either a cursor (MSW) or an icon (elsewhere) with the given
- name. Under MSW, the cursor is loaded from the resource file and the icon is
- loaded from XPM file under other platforms.
- This macro should be used with
- @ref wxDropSource::wxdropsource "wxDropSource constructor".
+ This macro creates either a cursor (MSW) or an icon (elsewhere) with the
+ given @a name (of type <tt>const char*</tt>). Under MSW, the cursor is
+ loaded from the resource file and the icon is loaded from XPM file under
+ other platforms.
+
+ This macro should be used with wxDropSource::wxDropSource().
+
+ @returns wxCursor on MSW, otherwise returns a wxIcon
+
+ @header{wx/dnd.h}
*/
-#define wxIconOrCursor wxDROP_ICON(const char* name) /* implementation is private */
+#define wxDROP_ICON(name)
+
+//@}