-#include "wx/defs.h"
-#include "wx/object.h"
-#include "wx/string.h"
-#include "wx/bitmap.h"
-
-//-------------------------------------------------------------------------
-// classes
-//-------------------------------------------------------------------------
-
-class wxDataFormat;
-class wxDataObject;
-class wxTextDataObject;
-
-//-------------------------------------------------------------------------
-// wxDataFormat
-//-------------------------------------------------------------------------
-
-class wxDataFormat : public wxObject
-{
- DECLARE_CLASS( wxDataFormat )
-
-public:
- wxDataFormat();
- wxDataFormat( wxDataFormatId type );
- wxDataFormat( const wxString &id );
- wxDataFormat( const wxChar *id );
- wxDataFormat( const wxDataFormat &format );
- wxDataFormat( const Atom atom );
-
- void SetType( wxDataFormatId type );
- wxDataFormatId GetType() const;
-
- /* 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/wxword", an
- * image manipulation program would put a wxBitmapDataObject and a
- * wxPrivateDataObject to the clipboard - the latter with "image/png". */
-
- wxString GetId() const;
- void SetId( const wxChar *id );
-
- Atom GetAtom();
- void SetAtom(Atom atom) { m_hasAtom = TRUE; m_atom = atom; }
-
- // implicit conversion to wxDataFormatId
- operator wxDataFormatId() const { return m_type; }
-
- bool operator==(wxDataFormatId type) const { return m_type == type; }
- bool operator!=(wxDataFormatId type) const { return m_type != type; }
-
-private:
- wxDataFormatId m_type;
- wxString m_id;
- bool m_hasAtom;
- Atom m_atom;
-};
-
-//----------------------------------------------------------------------------
-// wxDataObject to be placed in wxDataBroker
-//----------------------------------------------------------------------------
-
-class wxDataObject : public wxObject
-{
- DECLARE_DYNAMIC_CLASS( wxDataObject )
-
-public:
-
- /* constructor */
- wxDataObject();
-
- /* destructor */
- ~wxDataObject();
-
- /* write data to dest */
- virtual void WriteData( void *dest ) const = 0;
-
- /* get size of data */
- virtual size_t GetSize() const = 0;
-
- /* implementation */
-
- wxDataFormat &GetFormat();
-
- wxDataFormatId GetFormatType() const;
- wxString GetFormatId() const;
- Atom GetFormatAtom() const;
-
- wxDataFormat m_format;
-};
-
-//----------------------------------------------------------------------------
-// wxTextDataObject is a specialization of wxDataObject for text data
-//----------------------------------------------------------------------------
-
-class wxTextDataObject : public wxDataObject