X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c8bc7bb84dcca816055d5876e4772551c48acda5..6d26dc89c5e7a421f4f8807728928eee91aa5f7e:/wxPython/src/clip_dnd.i?ds=sidebyside diff --git a/wxPython/src/clip_dnd.i b/wxPython/src/clip_dnd.i index ea59320ca1..184f42f0a6 100644 --- a/wxPython/src/clip_dnd.i +++ b/wxPython/src/clip_dnd.i @@ -35,6 +35,11 @@ %pragma(python) code = "import wx" +//--------------------------------------------------------------------------- +%{ + // Put some wx default wxChar* values into wxStrings. + static const wxString wxPyEmptyString(wxT("")); +%} //---------------------------------------------------------------------- @@ -72,7 +77,7 @@ public: wxDataFormatId GetType() const; wxString GetId() const; - void SetId(const wxChar *format); + void SetId(const wxString& format); }; %new wxDataFormat* wxCustomDataFormat(const wxString &id); @@ -205,7 +210,7 @@ public: class wxTextDataObject : public wxDataObjectSimple { public: - wxTextDataObject(const wxString& text = wxEmptyString); + wxTextDataObject(const wxString& text = wxPyEmptyString); size_t GetTextLength(); wxString GetText(); @@ -217,7 +222,7 @@ public: %{ // Create a new class for wxPython to use class wxPyTextDataObject : public wxTextDataObject { public: - wxPyTextDataObject(const wxString& text = wxEmptyString) + wxPyTextDataObject(const wxString& text = wxPyEmptyString) : wxTextDataObject(text) {} DEC_PYCALLBACK_SIZET_(GetTextLength); @@ -236,7 +241,7 @@ IMP_PYCALLBACK__STRING(wxPyTextDataObject, wxTextDataObject, SetText); // Now define it for SWIG class wxPyTextDataObject : public wxTextDataObject { public: - wxPyTextDataObject(const wxString& text = wxEmptyString); + wxPyTextDataObject(const wxString& text = wxPyEmptyString); void _setCallbackInfo(PyObject* self, PyObject* _class); %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyTextDataObject)" };