X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f66cece3800700d49ae3541b401900582aeed065..8715875f72af75123d13bb69d6ec6b185f568ea9:/wxPython/src/_dnd.i?ds=sidebyside diff --git a/wxPython/src/_dnd.i b/wxPython/src/_dnd.i index 29a4d2cc19..01a908c031 100644 --- a/wxPython/src/_dnd.i +++ b/wxPython/src/_dnd.i @@ -84,7 +84,8 @@ public: wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); - bool base_GiveFeedback(wxDragResult effect); + bool GiveFeedback(wxDragResult effect); + %MAKE_BASE_FUNC(DropSource, GiveFeedback); }; @@ -137,7 +138,8 @@ class wxPyDropTarget // : public wxDropTarget public: %pythonAppend wxPyDropTarget "self._setCallbackInfo(self, DropTarget)" - %apply SWIGTYPE *DISOWN { wxDataObject *dataObject }; + + %disownarg( wxDataObject *dataObject ); wxPyDropTarget(wxDataObject *dataObject = NULL); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -148,13 +150,19 @@ public: wxDataObject *GetDataObject(); void SetDataObject(wxDataObject *dataObject); - %clear wxDataObject *dataObject; + %cleardisown( wxDataObject *dataObject ); + + wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def); + wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); + void OnLeave(); + bool OnDrop(wxCoord x, wxCoord y); - wxDragResult base_OnEnter(wxCoord x, wxCoord y, wxDragResult def); - wxDragResult base_OnDragOver(wxCoord x, wxCoord y, wxDragResult def); - void base_OnLeave(); - bool base_OnDrop(wxCoord x, wxCoord y); + %MAKE_BASE_FUNC(DropTarget, OnEnter); + %MAKE_BASE_FUNC(DropTarget, OnDragOver); + %MAKE_BASE_FUNC(DropTarget, OnLeave); + %MAKE_BASE_FUNC(DropTarget, OnDrop); + // may be called *only* from inside OnData() and will fill m_dataObject // with the data from the drop source if it returns True bool GetData(); @@ -212,12 +220,19 @@ public: wxPyTextDropTarget(); void _setCallbackInfo(PyObject* self, PyObject* _class); - //bool OnDropText(wxCoord x, wxCoord y, const wxString& text) = 0; - wxDragResult base_OnEnter(wxCoord x, wxCoord y, wxDragResult def); - wxDragResult base_OnDragOver(wxCoord x, wxCoord y, wxDragResult def); - void base_OnLeave(); - bool base_OnDrop(wxCoord x, wxCoord y); - wxDragResult base_OnData(wxCoord x, wxCoord y, wxDragResult def); + bool OnDropText(wxCoord x, wxCoord y, const wxString& text); + wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def); + wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); + void OnLeave(); + bool OnDrop(wxCoord x, wxCoord y); + wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def); + + %MAKE_BASE_FUNC(TextDropTarget, OnDropText); + %MAKE_BASE_FUNC(TextDropTarget, OnEnter); + %MAKE_BASE_FUNC(TextDropTarget, OnDragOver); + %MAKE_BASE_FUNC(TextDropTarget, OnLeave); + %MAKE_BASE_FUNC(TextDropTarget, OnDrop); + %MAKE_BASE_FUNC(TextDropTarget, OnData); }; //--------------------------------------------------------------------------- @@ -274,12 +289,19 @@ public: wxPyFileDropTarget(); void _setCallbackInfo(PyObject* self, PyObject* _class); -// bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames) = 0; - wxDragResult base_OnEnter(wxCoord x, wxCoord y, wxDragResult def); - wxDragResult base_OnDragOver(wxCoord x, wxCoord y, wxDragResult def); - void base_OnLeave(); - bool base_OnDrop(wxCoord x, wxCoord y); - wxDragResult base_OnData(wxCoord x, wxCoord y, wxDragResult def); + bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames); + wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def); + wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); + void OnLeave(); + bool OnDrop(wxCoord x, wxCoord y); + wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def); + + %MAKE_BASE_FUNC(FileDropTarget, OnDropFiles); + %MAKE_BASE_FUNC(FileDropTarget, OnEnter); + %MAKE_BASE_FUNC(FileDropTarget, OnDragOver); + %MAKE_BASE_FUNC(FileDropTarget, OnLeave); + %MAKE_BASE_FUNC(FileDropTarget, OnDrop); + %MAKE_BASE_FUNC(FileDropTarget, OnData); };