-
- /* 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;
-
+ /* see wxTextDataObject for explanation */
+ wxBitmapDataObject();
+ wxBitmapDataObject( const wxBitmap& bitmap );
+ ~wxBitmapDataObject();
+
+ void SetBitmap( const wxBitmap &bitmap );
+ wxBitmap GetBitmap() const;
+
+ virtual void WriteData( void *dest ) const;
+ virtual size_t GetSize() const;
+ void *GetData() const { return (void*)m_pngData; }
+
+ void WriteBitmap( const wxBitmap &bitmap, void *dest ) const;
+
+ void SetPngData( const char *pngData, size_t pngSize );
+
+private:
+ wxBitmap m_bitmap;
+ size_t m_pngSize;
+ char *m_pngData;
+
+ void DoConvertToPng();
+
+private:
+ DECLARE_DYNAMIC_CLASS( wxBitmapDataObject );