- static void CleanUpHandlers();
-
- // Motif implementation
-public:
- WXDisplay* GetDisplay() const { return M_BITMAPDATA->m_display; }
- WXPixmap GetPixmap() const { return (WXPixmap) M_BITMAPDATA->m_pixmap; }
- void SetPixmapNull() { M_BITMAPDATA->m_pixmap = 0; }
-
-protected:
- static wxList sm_handlers;
-
+
+ bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+ bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
+ { return Create(sz.GetWidth(), sz.GetHeight(), depth); }
+
+ bool Create(const void* data, wxBitmapType type,
+ int width, int height, int depth = -1);
+ // create the wxBitmap using a _copy_ of the pixmap
+ bool Create(WXPixmap pixmap);
+
+ int GetHeight() const;
+ int GetWidth() const;
+ int GetDepth() const;
+
+#if wxUSE_IMAGE
+ wxBitmap( const wxImage& image, int depth = -1 ) { (void)CreateFromImage(image, depth); }
+ wxImage ConvertToImage() const;
+ bool CreateFromImage(const wxImage& image, int depth = -1);
+#endif // wxUSE_IMAGE
+
+ // copies the contents and mask of the given (colour) icon to the bitmap
+ virtual bool CopyFromIcon(const wxIcon& icon);
+
+ wxMask *GetMask() const;
+ void SetMask( wxMask *mask );
+
+ wxBitmap GetSubBitmap( const wxRect& rect ) const;
+
+ bool SaveFile( const wxString &name, wxBitmapType type, const wxPalette *palette = NULL ) const;
+ bool LoadFile( const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE );
+
+ wxPalette *GetPalette() const;
+ wxPalette *GetColourMap() const
+ { return GetPalette(); };
+ virtual void SetPalette(const wxPalette& palette);
+
+ // implementation
+ // --------------
+
+ void SetHeight( int height );
+ void SetWidth( int width );
+ void SetDepth( int depth );
+ void SetPixmap( WXPixmap pixmap );
+ void SetBitmap( WXPixmap bitmap );
+
+ WXPixmap GetPixmap() const;
+ WXPixmap GetBitmap() const;
+
+ WXPixmap GetDrawable() const;
+
+ WXDisplay *GetDisplay() const;
+