// Purpose: interface of wxDropSource and wx*DropTarget
// Author: wxWidgets team
// RCS-ID: $Id$
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
See wxDropTarget::OnDrop(). This function is implemented appropriately
for text, and calls OnDropText().
*/
- virtual bool OnDrop(long x, long y, const void data, size_t size);
+ virtual bool OnDrop(wxCoord x, wxCoord y);
/**
Override this function to receive dropped text.
associated with this drop target, calling its wxDataObject::SetData()
method.
*/
- virtual void GetData();
+ virtual bool GetData();
/**
Called after OnDrop() returns @true. By default this will usually
/**
This constructor requires that you must call SetData() later.
- Note that the exact type of @a iconCopy and subsequent parameters
- differs between wxMSW and wxGTK: these are cursors under Windows but
- icons for GTK. You should use the macro wxDROP_ICON() in portable
+ Note that the type of @a iconCopy and subsequent parameters
+ differs between different ports: these are cursors under Windows and OS
+ X but icons for GTK. You should use the macro wxDROP_ICON() in portable
programs instead of directly using either of these types.
+ @onlyfor{wxmsw,wxosx}
+
@param win
The window which initiates the drag and drop operation.
@param iconCopy
The icon or cursor used for feedback when operation can't be done.
*/
wxDropSource(wxWindow* win = NULL,
- const wxIconOrCursor& iconCopy = wxNullIconOrCursor,
- const wxIconOrCursor& iconMove = wxNullIconOrCursor,
- const wxIconOrCursor& iconNone = wxNullIconOrCursor);
+ const wxCursor& iconCopy = wxNullIcon,
+ const wxCursor& iconMove = wxNullIcon,
+ const wxCursor& iconNone = wxNullIcon);
+
/**
- Note that the exact type of @a iconCopy and subsequent parameters
- differs between wxMSW and wxGTK: these are cursors under Windows but
- icons for GTK. You should use the macro wxDROP_ICON() in portable
+ The constructor taking a wxDataObject.
+
+ Note that the type of @a iconCopy and subsequent parameters
+ differs between different ports: these are cursors under Windows and OS
+ X but icons for GTK. You should use the macro wxDROP_ICON() in portable
programs instead of directly using either of these types.
+ @onlyfor{wxmsw,wxosx}
+
+ @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 when operation can't be done.
*/
wxDropSource(wxDataObject& data, wxWindow* win = NULL,
- const wxIconOrCursor& iconCopy = wxNullIconOrCursor,
- const wxIconOrCursor& iconMove = wxNullIconOrCursor,
- const wxIconOrCursor& iconNone = wxNullIconOrCursor);
+ const wxCursor& iconCopy = wxNullIcon,
+ const wxCursor& iconMove = wxNullIcon,
+ const wxCursor& iconNone = wxNullIcon);
+
+ /**
+ This constructor requires that you must call SetData() later.
+
+ This is the wxGTK-specific version of the constructor taking wxIcon
+ instead of wxCursor as the other ports.
+
+ @onlyfor{wxgtk}
+
+ @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 = wxNullCursor,
+ const wxIcon& iconMove = wxNullCursor,
+ const wxIcon& iconNone = wxNullCursor);
/**
- Default constructor.
+ The constructor taking a wxDataObject.
+
+ This is the wxGTK-specific version of the constructor taking wxIcon
+ instead of wxCursor as the other ports.
+
+ @onlyfor{wxgtk}
+
+ @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.
*/
- virtual ~wxDropSource();
+ wxDropSource(wxDataObject& data, wxWindow* win = NULL,
+ const wxIcon& iconCopy = wxNullCursor,
+ const wxIcon& iconMove = wxNullCursor,
+ const wxIcon& iconNone = wxNullCursor);
/**
Starts the drag-and-drop operation which will terminate when the user
@param effect
The effect to implement. One of ::wxDragCopy, ::wxDragMove,
::wxDragLink and ::wxDragNone.
- @param scrolling
- @true if the window is scrolling. MSW only.
@return @false if you want default feedback, or @true if you implement
your own feedback. The return value is ignored under GTK.
See wxDropTarget::OnDrop(). This function is implemented appropriately
for files, and calls OnDropFiles().
*/
- virtual bool OnDrop(long x, long y, const void data, size_t size);
+ virtual bool OnDrop(wxCoord x, wxCoord y);
/**
Override this function to receive dropped files.
Return @true to accept the data, or @false to veto the operation.
*/
virtual bool OnDropFiles(wxCoord x, wxCoord y,
- const wxArrayString& filenames);
+ const wxArrayString& filenames) = 0;
};
// Global functions/macros
// ============================================================================
-/** @ingroup group_funcmacro_gdi */
+/** @addtogroup group_funcmacro_gdi */
//@{
/**