Added wxDataViewEvent::SetDragFlags() and GetDropEffect() methods.

Allow specifying the drag operation flags and retrieving the drop effect when
it's over for wxDataViewCtrl drag-and-drop.

Currently this is only implemented in the generic version.

Closes #12583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-04-29 23:22:25 +00:00
parent 167fc10e3b
commit c04be1a29f
5 changed files with 54 additions and 3 deletions

View File

@@ -3011,6 +3011,41 @@ public:
*/
void *GetDataBuffer() const;
/**
Specify the kind of the drag operation to perform.
This method can be used inside a wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG
handler in order to configure the drag operation. Valid values are
::wxDrag_CopyOnly (default), ::wxDrag_AllowMove (allow the data to be
moved) and ::wxDrag_DefaultMove.
Currently it is only honoured by the generic version of wxDataViewCtrl
(used e.g. under MSW) and not supported by the native GTK and OS X
versions.
@see GetDropEffect()
@since 2.9.4
*/
void SetDragFlags(int flags);
/**
Returns the effect the user requested to happen to the dropped data.
This function can be used inside
wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE and
wxEVT_COMMAND_DATAVIEW_ITEM_DROP handlers and returns whether the user
is trying to copy (the return value is ::wxDragCopy) or move (if the
return value is ::wxDragMove) the data.
Currently this is only available when using the generic version of
wxDataViewCtrl (used e.g. under MSW) and always returns ::wxDragNone in
the GTK and OS X native versions.
@since 2.9.4
*/
wxDragResult GetDropEffect() const;
/**
Return the first row that will be displayed.
*/