-//----------------------------------------------------------------------------
-// wxTextDataObject is a specialization of wxDataObject for text data
-//----------------------------------------------------------------------------
-
-class wxTextDataObject : public wxDataObject
-{
- DECLARE_DYNAMIC_CLASS( wxTextDataObject )
-
-public:
-
- /* default constructor. call SetText() later or override
- WriteData() and GetSize() for working on-demand */
- wxTextDataObject();
-
- /* constructor */
- wxTextDataObject( const wxString& data );
-
- /* set current text data */
- void SetText( const wxString& data );
-
- /* get current text data */
- wxString GetText() const;
-
- /* by default calls WriteString() with string set by constructor or
- by SetText(). can be overridden for working on-demand */
- virtual void WriteData( void *dest ) const;
-
- /* by default, returns length of string as set by constructor or
- by SetText(). can be overridden for working on-demand */
- virtual size_t GetSize() const;
-
- /* write string to dest */
- void WriteString( const wxString &str, void *dest ) const;
-
- /* implementation */
-
- wxString m_data;
-};
-
-//----------------------------------------------------------------------------
-// wxFileDataObject is a specialization of wxDataObject for file names
-//----------------------------------------------------------------------------
-
-class wxFileDataObject : public wxDataObject
-{
- DECLARE_DYNAMIC_CLASS( wxFileDataObject )
-
-public:
-
- /* default constructor */
- wxFileDataObject();
-
- /* add file name to list */
- void AddFile( const wxString &file );
-
- /* get all filename as one string. each file name is 0 terminated,
- the list is double zero terminated */
- wxString GetFiles() const;
-
- /* write list of filenames */
- virtual void WriteData( void *dest ) const;
-
- /* return length of list of filenames */
- virtual size_t GetSize() const;
-
- /* implementation */
-
- wxString m_files;
-};
-
-//----------------------------------------------------------------------------
-// wxBitmapDataObject is a specialization of wxDataObject for bitmaps
-//----------------------------------------------------------------------------
-
-class wxBitmapDataObject : public wxDataObject
-{
- DECLARE_DYNAMIC_CLASS( wxBitmapDataObject )
-
-public:
-
- /* see wxTextDataObject for explanation */
-
- wxBitmapDataObject();
- wxBitmapDataObject( const wxBitmap& bitmap );
-
- void SetBitmap( const wxBitmap &bitmap );
- wxBitmap GetBitmap() const;
-
- virtual void WriteData( void *dest ) const;
- virtual size_t GetSize() const;
-
- void WriteBitmap( const wxBitmap &bitmap, void *dest ) const;
-
- // implementation
-
- wxBitmap m_bitmap;
-
-};
-
-//----------------------------------------------------------------------------
-// wxPrivateDataObject is a specialization of wxDataObject for app specific data
-//----------------------------------------------------------------------------
-
-class wxPrivateDataObject : public wxDataObject
-{
- DECLARE_DYNAMIC_CLASS( wxPrivateDataObject )
-
-public:
-
- /* see wxTextDataObject for explanation of functions */
-
- wxPrivateDataObject();
- ~wxPrivateDataObject();
-
- /* 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". */
-
- void SetId( const wxString& id );
-
- /* get id */
- wxString GetId() const;
-
- /* set data. will make internal copy. */
- void SetData( const char *data, size_t size );
-
- /* returns pointer to data */
- char* GetData() const;
-
- virtual void WriteData( void *dest ) const;
- virtual size_t GetSize() const;
-
- void WriteData( const char *data, void *dest ) const;
-
- // implementation
-
- size_t m_size;
- char* m_data;
- wxString m_id;
-};
-
-
-#endif
- //__GTKDNDH__