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
required and the data should be returned from the method as a string.
@endWxPythonOnly
*/
- virtual bool GetDataHere(void buf) const;
+ virtual bool GetDataHere(void* buf) const;
/**
Gets the size of our data. Must be implemented in the derived class if
string parameter rather than the two shown here.
@endWxPythonOnly
*/
- virtual bool SetData(size_t len, const void buf);
+ virtual bool SetData(size_t len, const void* buf);
/**
Sets the supported format.
{
Get = 0x01, // format is supported by GetDataHere()
Set = 0x02 // format is supported by SetData()
+ Both = 0x03 // format is supported by both (unused currently)
};
@endcode
class wxDataObject
{
public:
+ enum Direction
+ {
+ /** Format is supported by GetDataHere() */
+ Get = 0x01,
+ /** Format is supported by SetData() */
+ Set = 0x02,
+ };
+
/**
Constructor.
*/
to by @a formats. There is enough space for GetFormatCount(dir) formats
in it.
*/
- virtual void GetAllFormats(wxDataFormat* formats, Direction dir = Get) const;
+ virtual void GetAllFormats(wxDataFormat* formats,
+ Direction dir = Get) const = 0;
/**
The method will write the data of the format @a format in the buffer
@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;
};