X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7a014180017908d32f0af32ebfa140fdc82b390..6caa0f5cd18fe9fb39c207d5f31fa5633479a822:/wxPython/src/_dnd.i diff --git a/wxPython/src/_dnd.i b/wxPython/src/_dnd.i index 01a908c031..7552e0a1c1 100644 --- a/wxPython/src/_dnd.i +++ b/wxPython/src/_dnd.i @@ -58,7 +58,7 @@ IMP_PYCALLBACK_BOOL_DR(wxPyDropSource, wxDropSource, GiveFeedback); %rename(DropSource) wxPyDropSource; class wxPyDropSource { public: - %pythonAppend wxPyDropSource "self._setCallbackInfo(self, DropSource, 0)" + %pythonAppend wxPyDropSource setCallbackInfo(DropSource) #ifndef __WXGTK__ wxPyDropSource(wxWindow *win, const wxCursor © = wxNullCursor, @@ -71,7 +71,7 @@ public: const wxIcon& none = wxNullIcon); #endif - void _setCallbackInfo(PyObject* self, PyObject* _class, int incref); + void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=0); ~wxPyDropSource(); // set the data which is transfered by drag and drop @@ -86,6 +86,8 @@ public: bool GiveFeedback(wxDragResult effect); %MAKE_BASE_FUNC(DropSource, GiveFeedback); + + %property(DataObject, GetDataObject, SetData, doc="See `GetDataObject` and `SetData`"); }; @@ -136,8 +138,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyDropTarget, wxDropTarget, OnDrop); class wxPyDropTarget // : public wxDropTarget { public: - %pythonAppend wxPyDropTarget - "self._setCallbackInfo(self, DropTarget)" + %pythonAppend wxPyDropTarget setCallbackInfo(DropTarget) %disownarg( wxDataObject *dataObject ); @@ -176,6 +177,9 @@ public: // returns default action for drag and drop or // wxDragNone if this not specified wxDragResult GetDefaultAction(); + + %property(DataObject, GetDataObject, SetDataObject, doc="See `GetDataObject` and `SetDataObject`"); + %property(DefaultAction, GetDefaultAction, SetDefaultAction, doc="See `GetDefaultAction` and `SetDefaultAction`"); }; @@ -215,7 +219,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyTextDropTarget, wxTextDropTarget, OnDrop); %rename(TextDropTarget) wxPyTextDropTarget; class wxPyTextDropTarget : public wxPyDropTarget { public: - %pythonAppend wxPyTextDropTarget "self._setCallbackInfo(self, TextDropTarget)" + %pythonAppend wxPyTextDropTarget setCallbackInfo(TextDropTarget) wxPyTextDropTarget(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -284,7 +288,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop); class wxPyFileDropTarget : public wxPyDropTarget { public: - %pythonAppend wxPyFileDropTarget "self._setCallbackInfo(self, FileDropTarget)" + %pythonAppend wxPyFileDropTarget setCallbackInfo(FileDropTarget) wxPyFileDropTarget(); void _setCallbackInfo(PyObject* self, PyObject* _class);