2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dnd.h
|
2008-04-20 21:40:12 -04:00
|
|
|
// Purpose: interface of wxDropSource and wx*DropTarget
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
2010-07-13 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxTextDropTarget
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
A predefined drop target for dealing with text data.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{dnd}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-20 21:40:12 -04:00
|
|
|
@see @ref overview_dnd, wxDropSource, wxDropTarget, wxFileDropTarget
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxTextDropTarget : public wxDropTarget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
*/
|
|
|
|
wxTextDropTarget();
|
|
|
|
|
|
|
|
/**
|
2008-04-20 21:40:12 -04:00
|
|
|
See wxDropTarget::OnDrop(). This function is implemented appropriately
|
|
|
|
for text, and calls OnDropText().
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-29 11:34:31 -04:00
|
|
|
virtual bool OnDrop(wxCoord x, wxCoord y);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Override this function to receive dropped text.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param x
|
2008-03-09 08:33:59 -04:00
|
|
|
The x coordinate of the mouse.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param y
|
2008-03-09 08:33:59 -04:00
|
|
|
The y coordinate of the mouse.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param data
|
2008-03-09 08:33:59 -04:00
|
|
|
The data being dropped: a wxString.
|
2008-04-20 21:40:12 -04:00
|
|
|
|
|
|
|
Return @true to accept the data, or @false to veto the operation.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-29 06:52:37 -04:00
|
|
|
virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& data) = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-04-20 21:40:12 -04:00
|
|
|
/**
|
|
|
|
Result returned from a wxDropSource::DoDragDrop() call.
|
|
|
|
*/
|
|
|
|
enum wxDragResult
|
|
|
|
{
|
|
|
|
wxDragError, ///< Error prevented the D&D operation from completing.
|
|
|
|
wxDragNone, ///< Drag target didn't accept the data.
|
|
|
|
wxDragCopy, ///< The data was successfully copied.
|
|
|
|
wxDragMove, ///< The data was successfully moved (MSW only).
|
|
|
|
wxDragLink, ///< Operation is a drag-link.
|
|
|
|
wxDragCancel ///< The operation was cancelled by user (not an error).
|
|
|
|
};
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxDropTarget
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-20 21:40:12 -04:00
|
|
|
This class represents a target for a drag and drop operation. A
|
|
|
|
wxDataObject can be associated with it and by default, this object will be
|
|
|
|
filled with the data from the drag source, if the data formats supported by
|
|
|
|
the data object match the drag source data format.
|
|
|
|
|
|
|
|
There are various virtual handler functions defined in this class which may
|
|
|
|
be overridden to give visual feedback or react in a more fine-tuned way,
|
|
|
|
e.g. by not accepting data on the whole window area, but only a small
|
|
|
|
portion of it. The normal sequence of calls is OnEnter(), OnDragOver()
|
|
|
|
possibly many times, OnDrop() and finally OnData().
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{dnd}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-20 21:40:12 -04:00
|
|
|
@see @ref overview_dnd, @ref overview_dataobject, wxDropSource,
|
|
|
|
wxTextDropTarget, wxFileDropTarget, wxDataFormat, wxDataObject
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
class wxDropTarget
|
2008-03-08 08:52:38 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
2008-03-09 08:33:59 -04:00
|
|
|
Constructor. @a data is the data to be associated with the drop target.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 08:33:59 -04:00
|
|
|
wxDropTarget(wxDataObject* data = NULL);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor. Deletes the associated data object, if any.
|
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual ~wxDropTarget();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-20 21:40:12 -04:00
|
|
|
This method may only be called from within OnData(). By default, this
|
|
|
|
method copies the data from the drop source to the wxDataObject
|
|
|
|
associated with this drop target, calling its wxDataObject::SetData()
|
|
|
|
method.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-29 11:34:31 -04:00
|
|
|
virtual bool GetData();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-20 21:40:12 -04:00
|
|
|
Called after OnDrop() returns @true. By default this will usually
|
|
|
|
GetData() and will return the suggested default value @a def.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-04-20 21:40:12 -04:00
|
|
|
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-20 21:40:12 -04:00
|
|
|
Called when the mouse is being dragged over the drop target. By
|
|
|
|
default, this calls functions return the suggested return value @a def.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param x
|
2008-03-09 08:33:59 -04:00
|
|
|
The x coordinate of the mouse.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param y
|
2008-03-09 08:33:59 -04:00
|
|
|
The y coordinate of the mouse.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param def
|
2008-04-20 21:40:12 -04:00
|
|
|
Suggested value for return value. Determined by SHIFT or CONTROL
|
|
|
|
key states.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return The desired operation or wxDragNone. This is used for optical
|
2008-04-20 21:40:12 -04:00
|
|
|
feedback from the side of the drop source, typically in form
|
|
|
|
of changing the icon.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-04-20 21:40:12 -04:00
|
|
|
virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-20 21:40:12 -04:00
|
|
|
Called when the user drops a data object on the target. Return @false
|
|
|
|
to veto the operation.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param x
|
2008-03-09 08:33:59 -04:00
|
|
|
The x coordinate of the mouse.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param y
|
2008-03-09 08:33:59 -04:00
|
|
|
The y coordinate of the mouse.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return @true to accept the data, or @false to veto the operation.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual bool OnDrop(wxCoord x, wxCoord y);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Called when the mouse enters the drop target. By default, this calls
|
|
|
|
OnDragOver().
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param x
|
2008-03-09 08:33:59 -04:00
|
|
|
The x coordinate of the mouse.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param y
|
2008-03-09 08:33:59 -04:00
|
|
|
The y coordinate of the mouse.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param def
|
2008-04-20 21:40:12 -04:00
|
|
|
Suggested default for return value. Determined by SHIFT or CONTROL
|
|
|
|
key states.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return The desired operation or wxDragNone. This is used for optical
|
2008-04-20 21:40:12 -04:00
|
|
|
feedback from the side of the drop source, typically in form
|
|
|
|
of changing the icon.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-04-20 21:40:12 -04:00
|
|
|
virtual wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Called when the mouse leaves the drop target.
|
|
|
|
*/
|
|
|
|
virtual void OnLeave();
|
|
|
|
|
|
|
|
/**
|
2008-04-20 21:40:12 -04:00
|
|
|
Sets the data wxDataObject associated with the drop target and deletes
|
|
|
|
any previously associated data object.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
void SetDataObject(wxDataObject* data);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxDropSource
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
This class represents a source for a drag and drop operation.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{dnd}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-20 21:40:12 -04:00
|
|
|
@see @ref overview_dnd, @ref overview_dataobject, wxDropTarget,
|
|
|
|
wxTextDropTarget, wxFileDropTarget
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
class wxDropSource
|
2008-03-08 08:52:38 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
2008-04-20 21:40:12 -04:00
|
|
|
This constructor requires that you must call SetData() later.
|
|
|
|
|
2008-11-08 10:17:16 -05:00
|
|
|
Note that the type of @a iconCopy and subsequent parameters
|
|
|
|
differs between different ports: these are cursors under Windows but
|
2008-04-20 21:40:12 -04:00
|
|
|
icons for GTK. You should use the macro wxDROP_ICON() in portable
|
2008-03-08 08:52:38 -05:00
|
|
|
programs instead of directly using either of these types.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2009-03-14 21:19:09 -04:00
|
|
|
@onlyfor{wxmsw,wxosx}
|
2008-11-08 10:17:16 -05:00
|
|
|
|
|
|
|
@param win
|
|
|
|
The window which initiates the drag and drop operation.
|
|
|
|
@param iconCopy
|
|
|
|
The icon or cursor used for feedback for copy operation.
|
|
|
|
@param iconMove
|
|
|
|
The icon or cursor used for feedback for move operation.
|
|
|
|
@param iconNone
|
|
|
|
The icon or cursor used for feedback when operation can't be done.
|
|
|
|
*/
|
|
|
|
wxDropSource(wxWindow* win = NULL,
|
|
|
|
const wxIcon& iconCopy = wxNullIcon,
|
|
|
|
const wxIcon& iconMove = wxNullIcon,
|
|
|
|
const wxIcon& iconNone = wxNullIcon);
|
|
|
|
|
|
|
|
/**
|
|
|
|
The constructor for wxDataObject.
|
|
|
|
|
|
|
|
Note that the type of @a iconCopy and subsequent parameters
|
|
|
|
differs between different ports: 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.
|
|
|
|
|
2009-03-14 21:19:09 -04:00
|
|
|
@onlyfor{wxmsw,wxosx}
|
2008-11-08 10:17:16 -05:00
|
|
|
|
|
|
|
@param data
|
|
|
|
The data associated with the drop source.
|
|
|
|
@param win
|
|
|
|
The window which initiates the drag and drop operation.
|
|
|
|
@param iconCopy
|
|
|
|
The icon or cursor used for feedback for copy operation.
|
|
|
|
@param iconMove
|
|
|
|
The icon or cursor used for feedback for move operation.
|
|
|
|
@param iconNone
|
|
|
|
The icon or cursor used for feedback when operation can't be done.
|
|
|
|
*/
|
|
|
|
wxDropSource(wxDataObject& data, wxWindow* win = NULL,
|
|
|
|
const wxIcon& iconCopy = wxNullIcon,
|
|
|
|
const wxIcon& iconMove = wxNullIcon,
|
|
|
|
const wxIcon& iconNone = wxNullIcon);
|
|
|
|
|
|
|
|
/**
|
|
|
|
This constructor requires that you must call SetData() later.
|
|
|
|
|
|
|
|
Note that the type of @a iconCopy and subsequent parameters
|
|
|
|
differs between different ports: 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.
|
|
|
|
|
|
|
|
@onlyfor{wxgtk}
|
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param win
|
2008-03-09 08:33:59 -04:00
|
|
|
The window which initiates the drag and drop operation.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param iconCopy
|
2008-03-09 08:33:59 -04:00
|
|
|
The icon or cursor used for feedback for copy operation.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param iconMove
|
2008-03-09 08:33:59 -04:00
|
|
|
The icon or cursor used for feedback for move operation.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param iconNone
|
2008-03-09 08:33:59 -04:00
|
|
|
The icon or cursor used for feedback when operation can't be done.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 08:33:59 -04:00
|
|
|
wxDropSource(wxWindow* win = NULL,
|
2008-11-08 10:17:16 -05:00
|
|
|
const wxCursor& iconCopy = wxNullCursor,
|
|
|
|
const wxCursor& iconMove = wxNullCursor,
|
|
|
|
const wxCursor& iconNone = wxNullCursor);
|
2008-10-04 16:49:51 -04:00
|
|
|
|
2008-04-20 21:40:12 -04:00
|
|
|
/**
|
2008-10-04 16:49:51 -04:00
|
|
|
The constructor for wxDataObject.
|
|
|
|
|
2008-11-08 10:17:16 -05:00
|
|
|
Note that the type of @a iconCopy and subsequent parameters
|
|
|
|
differs between different ports: these are cursors under Windows but
|
2008-04-20 21:40:12 -04:00
|
|
|
icons for GTK. You should use the macro wxDROP_ICON() in portable
|
|
|
|
programs instead of directly using either of these types.
|
|
|
|
|
2008-11-08 10:17:16 -05:00
|
|
|
@onlyfor{wxgtk}
|
|
|
|
|
2008-10-04 16:49:51 -04:00
|
|
|
@param data
|
|
|
|
The data associated with the drop source.
|
2008-04-20 21:40:12 -04:00
|
|
|
@param win
|
|
|
|
The window which initiates the drag and drop operation.
|
|
|
|
@param iconCopy
|
|
|
|
The icon or cursor used for feedback for copy operation.
|
|
|
|
@param iconMove
|
|
|
|
The icon or cursor used for feedback for move operation.
|
|
|
|
@param iconNone
|
|
|
|
The icon or cursor used for feedback when operation can't be done.
|
|
|
|
*/
|
2008-03-09 08:33:59 -04:00
|
|
|
wxDropSource(wxDataObject& data, wxWindow* win = NULL,
|
2008-11-08 10:17:16 -05:00
|
|
|
const wxCursor& iconCopy = wxNullCursor,
|
|
|
|
const wxCursor& iconMove = wxNullCursor,
|
|
|
|
const wxCursor& iconNone = wxNullCursor);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-20 21:40:12 -04:00
|
|
|
Default constructor.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual ~wxDropSource();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-20 21:40:12 -04:00
|
|
|
Starts the drag-and-drop operation which will terminate when the user
|
|
|
|
releases the mouse. Call this in response to a mouse button press, for
|
|
|
|
example.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param flags
|
2008-04-20 21:40:12 -04:00
|
|
|
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.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return The operation requested by the user, may be ::wxDragCopy,
|
2008-04-20 21:40:12 -04:00
|
|
|
::wxDragMove, ::wxDragLink, ::wxDragCancel or ::wxDragNone if
|
2008-03-09 08:33:59 -04:00
|
|
|
an error occurred.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the wxDataObject object that has been assigned previously.
|
|
|
|
*/
|
2008-03-09 08:33:59 -04:00
|
|
|
wxDataObject* GetDataObject();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-20 21:40:12 -04:00
|
|
|
You may give some custom UI feedback during the drag and drop operation
|
|
|
|
by overriding this function. It is called on each mouse move, so your
|
|
|
|
implementation must not be too slow.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param effect
|
2008-04-20 21:40:12 -04:00
|
|
|
The effect to implement. One of ::wxDragCopy, ::wxDragMove,
|
|
|
|
::wxDragLink and ::wxDragNone.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return @false if you want default feedback, or @true if you implement
|
2008-09-03 16:36:54 -04:00
|
|
|
your own feedback. The return value is ignored under GTK.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual bool GiveFeedback(wxDragResult effect);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Set the icon to use for a certain drag result.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param res
|
2008-03-09 08:33:59 -04:00
|
|
|
The drag result to set the icon for.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param cursor
|
2008-03-09 08:33:59 -04:00
|
|
|
The ion to show when this drag result occurs.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
void SetCursor(wxDragResult res, const wxCursor& cursor);
|
|
|
|
|
|
|
|
/**
|
2008-04-20 21:40:12 -04:00
|
|
|
Sets the data wxDataObject associated with the drop source. This will
|
|
|
|
not delete any previously associated data.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
void SetData(wxDataObject& data);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxFileDropTarget
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-20 21:40:12 -04:00
|
|
|
This is a drop target which accepts files (dragged from File Manager or
|
|
|
|
Explorer).
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{dnd}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-20 21:40:12 -04:00
|
|
|
@see @ref overview_dnd, wxDropSource, wxDropTarget, wxTextDropTarget
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxFileDropTarget : public wxDropTarget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
*/
|
|
|
|
wxFileDropTarget();
|
|
|
|
|
|
|
|
/**
|
2008-04-20 21:40:12 -04:00
|
|
|
See wxDropTarget::OnDrop(). This function is implemented appropriately
|
|
|
|
for files, and calls OnDropFiles().
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-29 11:34:31 -04:00
|
|
|
virtual bool OnDrop(wxCoord x, wxCoord y);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Override this function to receive dropped files.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param x
|
2008-03-09 08:33:59 -04:00
|
|
|
The x coordinate of the mouse.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param y
|
2008-03-09 08:33:59 -04:00
|
|
|
The y coordinate of the mouse.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param filenames
|
2008-03-09 08:33:59 -04:00
|
|
|
An array of filenames.
|
2008-04-20 21:40:12 -04:00
|
|
|
|
|
|
|
Return @true to accept the data, or @false to veto the operation.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual bool OnDropFiles(wxCoord x, wxCoord y,
|
2008-10-27 17:26:54 -04:00
|
|
|
const wxArrayString& filenames) = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
// ============================================================================
|
|
|
|
// Global functions/macros
|
|
|
|
// ============================================================================
|
|
|
|
|
2009-01-05 15:48:06 -05:00
|
|
|
/** @addtogroup group_funcmacro_gdi */
|
2008-03-20 02:00:05 -04:00
|
|
|
//@{
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
2008-03-20 02:00:05 -04:00
|
|
|
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().
|
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return wxCursor on MSW, otherwise returns a wxIcon
|
2008-03-20 02:00:05 -04:00
|
|
|
|
|
|
|
@header{wx/dnd.h}
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-20 02:00:05 -04:00
|
|
|
#define wxDROP_ICON(name)
|
|
|
|
|
|
|
|
//@}
|
2008-03-08 08:52:38 -05:00
|
|
|
|