/**
@class wxCustomDataObject
- @wxheader{dataobj.h}
wxCustomDataObject is a specialization of wxDataObjectSimple for some
application-specific data in arbitrary (either custom or one of the
object by pickling it first.
@endWxPythonOnly
*/
- virtual void TakeData(size_t size, const void data);
+ void TakeData(size_t size, void* data);
};
/**
@class wxDataObjectComposite
- @wxheader{dataobj.h}
wxDataObjectComposite is the simplest wxDataObject derivation which may be
used to support multiple formats. It contains several wxDataObjectSimple
Adds the @a dataObject to the list of supported objects and it becomes
the preferred object if @a preferred is @true.
*/
- void Add(wxDataObjectSimple dataObject, bool preferred = false);
+ void Add(wxDataObjectSimple* dataObject, bool preferred = false);
/**
Report the format passed to the SetData() method. This should be the
/**
@class wxDataObjectSimple
- @wxheader{dataobj.h}
This is the simplest possible implementation of the wxDataObject class. The
data object of (a class derived from) this class only supports one format,
Returns the (one and only one) format supported by this object. It is
assumed that the format is supported in both directions.
*/
- const wxDataFormat GetFormat() const;
+ const wxDataFormat& GetFormat() const;
/**
Copy the data from the buffer, return @true on success. Must be
/**
@class wxBitmapDataObject
- @wxheader{dataobj.h}
wxBitmapDataObject is a specialization of wxDataObject for bitmap data. It
can be used without change to paste data into the wxClipboard or a
/**
@class wxDataFormat
- @wxheader{dataobj.h}
A wxDataFormat is an encapsulation of a platform-specific format handle
which is used by the system for the clipboard and drag and drop operations.
/**
Returns the platform-specific number identifying the format.
*/
- NativeFormat GetType() const;
+ wxDataFormatId GetType() const;
/**
Sets the format to be the custom format identified by the given name.
Sets the format to the given value, which should be one of wxDF_XXX
constants.
*/
- void SetType(NativeFormat format);
+ void SetType(wxDataFormatId type);
/**
Returns @true if the formats are different.
/**
@class wxURLDataObject
- @wxheader{dataobj.h}
wxURLDataObject is a wxDataObject containing an URL and can be used e.g.
when you need to put an URL on or retrieve it from the clipboard:
/**
@class wxDataObject
- @wxheader{dataobj.h}
A wxDataObject represents data that can be copied to or from the clipboard,
or dragged and dropped. The important thing about wxDataObject is that this
/**
Destructor.
*/
- ~wxDataObject();
+ virtual ~wxDataObject();
/**
Copy all supported formats in the given direction to the array pointed
The method will write the data of the format @a format in the buffer
@a buf and return @true on success, @false on failure.
*/
- virtual bool GetDataHere(const wxDataFormat& format, void buf) const;
+ virtual bool GetDataHere(const wxDataFormat& format, void* buf) const = 0;
/**
Returns the data size of the given format @a format.
*/
- virtual size_t GetDataSize(const wxDataFormat& format) const;
+ virtual size_t GetDataSize(const wxDataFormat& format) const = 0;
/**
Returns the number of available formats for rendering or setting the
data.
*/
- virtual size_t GetFormatCount(Direction dir = Get) const;
+ virtual size_t GetFormatCount(Direction dir = Get) const = 0;
/**
Returns the preferred format for either rendering the data (if @a dir
is @c Get, its default value) or for setting it. Usually this will be
the native format of the wxDataObject.
*/
- virtual wxDataFormat GetPreferredFormat(Direction dir = Get) const;
+ virtual wxDataFormat GetPreferredFormat(Direction dir = Get) const = 0;
/**
Set the data in the format @a format of the length @a len provided in
/**
@class wxTextDataObject
- @wxheader{dataobj.h}
wxTextDataObject is a specialization of wxDataObject for text data. It can
be used without change to paste data into the wxClipboard or a
/**
@class wxFileDataObject
- @wxheader{dataobj.h}
wxFileDataObject is a specialization of wxDataObject for file names. The
program works with it just as if it were a list of absolute file names, but
Adds a file to the file list represented by this data object (Windows
only).
*/
- virtual void AddFile(const wxString& file);
+ void AddFile(const wxString& file);
/**
Returns the array of file names.
*/
- const wxArrayString GetFilenames() const;
+ const wxArrayString& GetFilenames() const;
};