X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50ec54b6564af84ca1280005b6659264a598abb7..058f225a44d83d42ba9d773efc705badbf0e5e3c:/interface/wx/dataobj.h?ds=sidebyside diff --git a/interface/wx/dataobj.h b/interface/wx/dataobj.h index 395686a034..346d553bfa 100644 --- a/interface/wx/dataobj.h +++ b/interface/wx/dataobj.h @@ -80,7 +80,7 @@ public: object by pickling it first. @endWxPythonOnly */ - virtual void SetData(size_t size, const void* data); + virtual bool SetData(size_t size, const void* data); /** Like SetData(), but doesn't copy the data - instead the object takes @@ -547,6 +547,7 @@ public: { Get = 0x01, // format is supported by GetDataHere() Set = 0x02 // format is supported by SetData() + Both = 0x03 // format is supported by both (unused currently) }; @endcode @@ -641,6 +642,14 @@ public: class wxDataObject { public: + enum Direction + { + /** Format is supported by GetDataHere() */ + Get = 0x01, + /** Format is supported by SetData() */ + Set = 0x02, + }; + /** Constructor. */ @@ -690,5 +699,10 @@ public: @return @true on success, @false on failure. */ virtual bool SetData(const wxDataFormat& format, size_t len, const void* buf); + + /** + Returns true if this format is supported. + */ + bool IsSupported(const wxDataFormat& format, Direction dir = Get) const; };