X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4268f79856cbe66b8ad31b86ee183879cede98e3..f63e3ebbe3272b9690aa2530e0c3048d3f37c7c7:/wxPython/src/clip_dnd.i diff --git a/wxPython/src/clip_dnd.i b/wxPython/src/clip_dnd.i index dc8e465d9a..bf4acd7712 100644 --- a/wxPython/src/clip_dnd.i +++ b/wxPython/src/clip_dnd.i @@ -35,30 +35,36 @@ %pragma(python) code = "import wx" +//--------------------------------------------------------------------------- +%{ + // Put some wx default wxChar* values into wxStrings. + static const wxString wxPyEmptyString(wxT("")); +%} //---------------------------------------------------------------------- enum wxDataFormatId { - wxDF_INVALID = 0, - wxDF_TEXT = 1, /* CF_TEXT */ - wxDF_BITMAP = 2, /* CF_BITMAP */ - wxDF_METAFILE = 3, /* CF_METAFILEPICT */ - wxDF_SYLK = 4, - wxDF_DIF = 5, - wxDF_TIFF = 6, - wxDF_OEMTEXT = 7, /* CF_OEMTEXT */ - wxDF_DIB = 8, /* CF_DIB */ - wxDF_PALETTE = 9, - wxDF_PENDATA = 10, - wxDF_RIFF = 11, - wxDF_WAVE = 12, - wxDF_UNICODETEXT = 13, - wxDF_ENHMETAFILE = 14, - wxDF_FILENAME = 15, /* CF_HDROP */ - wxDF_LOCALE = 16, - wxDF_PRIVATE = 20, - wxDF_MAX + wxDF_INVALID, + wxDF_TEXT, + wxDF_BITMAP, + wxDF_METAFILE, + wxDF_SYLK, + wxDF_DIF, + wxDF_TIFF, + wxDF_OEMTEXT, + wxDF_DIB, + wxDF_PALETTE, + wxDF_PENDATA, + wxDF_RIFF, + wxDF_WAVE, + wxDF_UNICODETEXT, + wxDF_ENHMETAFILE, + wxDF_FILENAME, + wxDF_LOCALE, + wxDF_PRIVATE, + wxDF_HTML, + wxDF_MAX, }; //---------------------------------------------------------------------- @@ -72,7 +78,7 @@ public: wxDataFormatId GetType() const; wxString GetId() const; - void SetId(const char *format); + void SetId(const wxString& format); }; %new wxDataFormat* wxCustomDataFormat(const wxString &id); @@ -205,7 +211,7 @@ public: class wxTextDataObject : public wxDataObjectSimple { public: - wxTextDataObject(const wxString& text = wxEmptyString); + wxTextDataObject(const wxString& text = wxPyEmptyString); size_t GetTextLength(); wxString GetText(); @@ -217,7 +223,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 +242,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)" }; @@ -367,6 +373,25 @@ public: void SetURL(const wxString& url); }; +//---------------------------------------------------------------------- + +#ifndef __WXGTK__ + +%{ +#include +%} + +class wxMetafileDataObject : public wxDataObjectSimple +{ +public: + wxMetafileDataObject(); + + void SetMetafile(const wxMetafile& metafile); + wxMetafile GetMetafile() const; +}; + +#endif + //---------------------------------------------------------------------- //---------------------------------------------------------------------- //----------------------------------------------------------------------