-#ifdef __WXDEBUG__
- // function to return symbolic name of clipboard format (for debug messages)
- static const char *GetFormatName(wxDataFormat format);
-#endif // Debug
-
-private:
- IDataObject *m_pIDataObject; // pointer to the COM interface
-};
-
-// ----------------------------------------------------------------------------
-// wxTextDataObject is a specialization of wxDataObject for text data
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxTextDataObject : public wxDataObject
-{
-public:
- // ctors
- wxTextDataObject() { }
- wxTextDataObject(const wxString& strText) : m_strText(strText) { }
- void Init(const wxString& strText) { m_strText = strText; }
-
- // implement base class pure virtuals
- virtual wxDataFormat GetPreferredFormat() const
- { return wxDF_TEXT; }
- virtual bool IsSupportedFormat(const wxDataFormat& format) const
- { return format == wxDF_TEXT || format == wxDF_LOCALE; }
- virtual size_t GetDataSize(const wxDataFormat& format) const
- { return m_strText.Len() + 1; } // +1 for trailing '\0'of course
- virtual bool GetDataHere(const wxDataFormat& format, void *buf) const
- { memcpy(buf, m_strText.c_str(), GetDataSize(format)); return TRUE; }
- virtual bool SetData(const wxDataFormat& format, const void *buf)
- { m_strText = (const wxChar *)buf; return TRUE; }
-
- // additional helpers
- void SetText(const wxString& strText) { m_strText = strText; }
- wxString GetText() const { return m_strText; }
-
-private:
- wxString m_strText;
-};
-
-// ----------------------------------------------------------------------------
-// wxBitmapDataObject is a specialization of wxDataObject for bitmap data
-// ----------------------------------------------------------------------------