+ // Create a DDB compatible with the given DC from wxImage
+ wxBitmap(const wxImage& image, const wxDC& dc)
+ { (void)CreateFromImage(image, dc); }
+#endif // wxUSE_IMAGE
+
+ // we must have this, otherwise icons are silently copied into bitmaps using
+ // the copy ctor but the resulting bitmap is invalid!
+ wxBitmap(const wxIcon& icon) { Init(); CopyFromIcon(icon); }
+
+ wxBitmap& operator=(const wxBitmap& bitmap)
+ {
+ if ( m_refData != bitmap.m_refData )
+ Ref(bitmap);
+ return *this;
+ }
+
+ wxBitmap& operator=(const wxIcon& icon)
+ {
+ (void)CopyFromIcon(icon);
+
+ return *this;
+ }
+
+ wxBitmap& operator=(const wxCursor& cursor)
+ {
+ (void)CopyFromCursor(cursor);
+
+ return *this;
+ }
+
+ virtual ~wxBitmap();
+
+#if wxUSE_IMAGE
+ wxImage ConvertToImage() const;
+#endif // wxUSE_IMAGE
+
+ // get the given part of bitmap
+ wxBitmap GetSubBitmap( const wxRect& rect ) const;
+
+ // copies the contents and mask of the given (colour) icon to the bitmap
+ bool CopyFromIcon(const wxIcon& icon);
+
+ // copies the contents and mask of the given cursor to the bitmap
+ bool CopyFromCursor(const wxCursor& cursor);
+
+ // copies from a device independent bitmap
+ bool CopyFromDIB(const wxDIB& dib);
+
+ virtual bool Create(int width, int height, int depth = -1);
+ virtual bool Create(int width, int height, const wxDC& dc);
+ virtual bool Create(void *data, long type, int width, int height, int depth = 1);
+ virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE);
+ virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL);
+
+ wxBitmapRefData *GetBitmapData() const
+ { return (wxBitmapRefData *)m_refData; }
+
+ // raw bitmap access support functions
+ void *GetRawData(wxPixelDataBase& data, int bpp);
+ void UngetRawData(wxPixelDataBase& data);
+
+#if wxUSE_PALETTE
+ wxPalette* GetPalette() const;
+ void SetPalette(const wxPalette& palette);
+#endif // wxUSE_PALETTE
+
+ wxMask *GetMask() const;
+ void SetMask(wxMask *mask);
+
+ bool operator==(const wxBitmap& bitmap) const { return m_refData == bitmap.m_refData; }
+ bool operator!=(const wxBitmap& bitmap) const { return m_refData != bitmap.m_refData; }
+
+ // these functions are internal and shouldn't be used, they risk to
+ // disappear in the future
+ bool HasAlpha() const;
+ void UseAlpha();
+
+#if WXWIN_COMPATIBILITY_2_4
+ // these functions do nothing and are only there for backwards
+ // compatibility
+ wxDEPRECATED( int GetQuality() const );
+ wxDEPRECATED( void SetQuality(int quality) );
+#endif // WXWIN_COMPATIBILITY_2_4
+
+#if WXWIN_COMPATIBILITY_2
+ void SetOk(bool isOk);
+#endif // WXWIN_COMPATIBILITY_2
+
+#if WXWIN_COMPATIBILITY
+#if wxUSE_PALETTE
+ wxPalette *GetColourMap() const { return GetPalette(); }
+ void SetColourMap(wxPalette *cmap) { SetPalette(*cmap); };
+#endif // wxUSE_PALETTE
+#endif // WXWIN_COMPATIBILITY
+
+ // implementation only from now on
+ // -------------------------------