X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7521630773affd2e8d8ff818285fe9c38f901eb6..70ee369088ef1d54628883a1da7c20b1796d5b94:/wxPython/src/_dataobj.i diff --git a/wxPython/src/_dataobj.i b/wxPython/src/_dataobj.i index d01569c2ac..f787808682 100644 --- a/wxPython/src/_dataobj.i +++ b/wxPython/src/_dataobj.i @@ -114,14 +114,21 @@ constants.", ""); "Returns the platform-specific number identifying the format.", ""); - DocDeclStr( - wxString , GetId() const, - "Returns the name of a custom format (this function will fail for a -standard format).", ""); + %Rename(_GetId, wxString , GetId() const); + %pythoncode { + def GetId(self): + """Returns the name of a custom format (this function will fail for a +standard format).""" + nolog = wx.LogNull() + return self._GetId() + } DocDeclStr( void , SetId(const wxString& format), "Sets the format to be the custom format identified by the given name.", ""); + + %property(Id, GetId, SetId, doc="See `GetId` and `SetId`"); + %property(Type, GetType, SetType, doc="See `GetType` and `SetType`"); }; @@ -310,6 +317,11 @@ in the given direction.", ""); } } + %property(AllFormats, GetAllFormats, doc="See `GetAllFormats`"); + %property(DataHere, GetDataHere, doc="See `GetDataHere`"); + %property(DataSize, GetDataSize, doc="See `GetDataSize`"); + %property(FormatCount, GetFormatCount, doc="See `GetFormatCount`"); + %property(PreferredFormat, GetPreferredFormat, doc="See `GetPreferredFormat`"); }; @@ -397,6 +409,7 @@ derived class if the object supports setting its data. } } + %property(Format, GetFormat, SetFormat, doc="See `GetFormat` and `SetFormat`"); }; @@ -488,7 +501,7 @@ data structures. "); class wxPyDataObjectSimple : public wxDataObjectSimple { public: - %pythonAppend wxPyDataObjectSimple "self._setCallbackInfo(self, PyDataObjectSimple)" + %pythonAppend wxPyDataObjectSimple setCallbackInfo(PyDataObjectSimple) wxPyDataObjectSimple(const wxDataFormat& format = wxFormatInvalid); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -532,6 +545,7 @@ format of the data object within the composite that recieved data from the clipboard or the DnD operation. You can use this method to find out what kind of data object was recieved.", ""); + %property(ReceivedFormat, GetReceivedFormat, doc="See `GetReceivedFormat`"); }; //--------------------------------------------------------------------------- @@ -575,6 +589,8 @@ text into the member variable. If you want to process the text on the fly you may wish to override this function (via `wx.PyTextDataObject`.)", ""); + %property(Text, GetText, SetText, doc="See `GetText` and `SetText`"); + %property(TextLength, GetTextLength, doc="See `GetTextLength`"); }; @@ -613,7 +629,7 @@ into the data object.", ""); class wxPyTextDataObject : public wxTextDataObject { public: - %pythonAppend wxPyTextDataObject "self._setCallbackInfo(self, PyTextDataObject)" + %pythonAppend wxPyTextDataObject setCallbackInfo(PyTextDataObject) wxPyTextDataObject(const wxString& text = wxPyEmptyString); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -649,6 +665,7 @@ internals. Use this method to get data in bitmap form from the when the data object receives data. Usually there will be no reason to override this function.", ""); + %property(Bitmap, GetBitmap, SetBitmap, doc="See `GetBitmap` and `SetBitmap`"); }; @@ -705,7 +722,7 @@ data on demand derive from this class and overload `GetBitmap`.", ""); class wxPyBitmapDataObject : public wxBitmapDataObject { public: - %pythonAppend wxPyBitmapDataObject "self._setCallbackInfo(self, PyBitmapDataObject)" + %pythonAppend wxPyBitmapDataObject setCallbackInfo(PyBitmapDataObject) wxPyBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -738,6 +755,7 @@ public: void , AddFile(const wxString &filename), "Adds a file to the list of files represented by this data object.", ""); + %property(Filenames, GetFilenames, doc="See `GetFilenames`"); }; //--------------------------------------------------------------------------- @@ -799,6 +817,10 @@ public: return obj; } } + + %property(Data, GetData, SetData, doc="See `GetData` and `SetData`"); + %property(Size, GetSize, doc="See `GetSize`"); + }; @@ -809,7 +831,7 @@ DocStr(wxURLDataObject, browsers such that it is able to be dragged to or from them.", ""); class wxURLDataObject : public wxDataObject/*Composite*/ { public: - wxURLDataObject(); + wxURLDataObject(const wxString& url = wxPyEmptyString); DocDeclStr( wxString , GetURL(), @@ -819,6 +841,7 @@ public: void , SetURL(const wxString& url), "Set the URL.", ""); + %property(URL, GetURL, SetURL, doc="See `GetURL` and `SetURL`"); }; //---------------------------------------------------------------------------