wxPrivateDataObject is a specialization of wxDataObject for application-specific or standard format data. The format of the data contained in an instance of this class must be identified with a string literal corresponding to the mime-type of the data. Typically this would be "image/png" or "text/html" or "application/word".
Derived from
Include files
<wx/dataobj.h>
See also
Members
wxPrivateDataObject::wxPrivateDataObject
wxPrivateDataObject::~wxPrivateDataObject
wxPrivateDataObject::SetId
wxPrivateDataObject::GetId
wxPrivateDataObject::SetData
wxPrivateDataObject::GetSize
wxPrivateDataObject::GetData
wxPrivateDataObject::WriteData
wxPrivateDataObject::WriteData
wxPrivateDataObject()
~wxPrivateDataObject()
virtual void SetId(const wxString& id)
The string ID identifies the format of clipboard or DnD data. A word processor would e.g. add a wxTextDataObject and a wxPrivateDataObject to the clipboard - the latter with the Id "application/word".
virtual wxString GetId() const
Returns the ID of the clipboard or DnD data format.
virtual void SetData(const char *data, size_t size)
Set the data. The data object will make an internal copy.
virtual size_t GetDataSize() const
Returns the data size.
virtual char* GetData()
Returns a pointer to the data.
virtual void WriteData(void*dest ) const
Write the data owned by this class to dest. By default, this calls WriteData with data set using SetData. This can be overridden to provide data on-demand; in this case WriteData(data,dest) (see below) must be called from within the overriding WriteData() method.
void WriteData(const char* data, void*dest ) const
Writes the data data to dest. This method must be called from WriteData.