+ // Construct a mask from a mono bitmap (copies the bitmap).
+ wxMask(const wxBitmap& bitmap);
+
+ // construct a mask from the givne bitmap handle
+ wxMask(WXHBITMAP hbmp) { m_maskBitmap = hbmp; }
+
+ virtual ~wxMask();
+
+ bool Create(const wxBitmap& bitmap, const wxColour& colour);
+ bool Create(const wxBitmap& bitmap, int paletteIndex);
+ bool Create(const wxBitmap& bitmap);
+
+ // Implementation
+ WXHBITMAP GetMaskBitmap() const { return m_maskBitmap; }
+ void SetMaskBitmap(WXHBITMAP bmp) { m_maskBitmap = bmp; }
+
+protected:
+ WXHBITMAP m_maskBitmap;
+
+ DECLARE_DYNAMIC_CLASS(wxMask)
+};
+
+// ----------------------------------------------------------------------------
+// wxBitmapHandler is a class which knows how to load/save bitmaps to/from file
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxBitmapHandler : public wxGDIImageHandler
+{
+public:
+ wxBitmapHandler() { m_type = wxBITMAP_TYPE_INVALID; }
+ wxBitmapHandler(const wxString& name, const wxString& ext, long type)
+ : wxGDIImageHandler(name, ext, type)
+ {
+ }
+
+ // keep wxBitmapHandler derived from wxGDIImageHandler compatible with the
+ // old class which worked only with bitmaps
+ virtual bool Create(wxBitmap *bitmap,
+ void *data,
+ long flags,
+ int width, int height, int depth = 1);
+ virtual bool LoadFile(wxBitmap *bitmap,
+ const wxString& name,
+ long flags,
+ int desiredWidth, int desiredHeight);
+ virtual bool SaveFile(wxBitmap *bitmap,
+ const wxString& name,
+ int type,
+ const wxPalette *palette = NULL);
+
+ virtual bool Create(wxGDIImage *image,
+ void *data,
+ long flags,
+ int width, int height, int depth = 1);
+ virtual bool Load(wxGDIImage *image,
+ const wxString& name,
+ long flags,
+ int desiredWidth, int desiredHeight);
+ virtual bool Save(wxGDIImage *image,
+ const wxString& name,
+ int type);
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxBitmapHandler)