Contents Up Previous Next

wxPrivateDataObject

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

wxDataObject

Include files

<wx/dataobj.h>

See also

wxDataObject

Members

wxPrivateDataObject::wxPrivateDataObject
wxPrivateDataObject::~wxPrivateDataObject
wxPrivateDataObject::SetId
wxPrivateDataObject::GetId
wxPrivateDataObject::SetData
wxPrivateDataObject::GetSize
wxPrivateDataObject::GetData
wxPrivateDataObject::WriteData
wxPrivateDataObject::WriteData


wxPrivateDataObject::wxPrivateDataObject

wxPrivateDataObject()


wxPrivateDataObject::~wxPrivateDataObject

~wxPrivateDataObject()


wxPrivateDataObject::SetId

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".


wxPrivateDataObject::GetId

virtual wxString GetId() const

Returns the ID of the clipboard or DnD data format.


wxPrivateDataObject::SetData

virtual void SetData(const char *data, size_t size)

Set the data. The data object will make an internal copy.


wxPrivateDataObject::GetSize

virtual size_t GetDataSize() const

Returns the data size.


wxPrivateDataObject::GetData

virtual char* GetData()

Returns a pointer to the data.


wxPrivateDataObject::WriteData

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.


wxPrivateDataObject::WriteData

void WriteData(const char* data, void*dest ) const

Writes the data data to dest. This method must be called from WriteData.