+ // Load a resource
+ wxBitmap( int nId
+ ,wxBitmapType lType = wxBITMAP_DEFAULT_TYPE
+ );
+
+ // For compatiability with other ports, under OS/2 does same as default ctor
+ inline wxBitmap( const wxString& WXUNUSED(rFilename)
+ ,wxBitmapType WXUNUSED(lType)
+ )
+ { Init(); }
+ // New constructor for generalised creation from data
+ wxBitmap( const void* pData
+ ,wxBitmapType lType
+ ,int nWidth
+ ,int nHeight
+ ,int nDepth = 1
+ );
+
+ // If depth is omitted, will create a bitmap compatible with the display
+ wxBitmap( int nWidth, int nHeight, int nDepth = -1 )
+ {
+ Init();
+ (void)Create(nWidth, nHeight, nDepth);
+ }
+ wxBitmap( const wxSize& sz, int nDepth = -1 )
+ {
+ Init();
+ (void)Create(sz, nDepth);
+ }
+
+ wxBitmap( const wxImage& image, int depth = -1 )
+ { (void)CreateFromImage(image, depth); }
+
+ // we must have this, otherwise icons are silently copied into bitmaps using
+ // the copy ctor but the resulting bitmap is invalid!
+ inline wxBitmap(const wxIcon& rIcon)
+ { Init(); CopyFromIcon(rIcon); }
+
+ wxBitmap& operator=(const wxIcon& rIcon)
+ {
+ (void)CopyFromIcon(rIcon);
+
+ return(*this);
+ }
+
+ wxBitmap& operator=(const wxCursor& rCursor)
+ {
+ (void)CopyFromCursor(rCursor);
+ return (*this);
+ }
+
+ virtual ~wxBitmap();
+
+ wxImage ConvertToImage() const;
+
+ // get the given part of bitmap
+ wxBitmap GetSubBitmap(const wxRect& rRect) const;
+
+ // copies the contents and mask of the given (colour) icon to the bitmap
+ bool CopyFromIcon(const wxIcon& rIcon);
+
+ // copies the contents and mask of the given cursor to the bitmap
+ bool CopyFromCursor(const wxCursor& rCursor);
+
+ virtual bool Create( int nWidth
+ ,int nHeight
+ ,int nDepth = wxBITMAP_SCREEN_DEPTH
+ );
+ virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
+ { return Create(sz.GetWidth(), sz.GetHeight(), depth); }
+
+ virtual bool Create( const void* pData
+ ,wxBitmapType lType
+ ,int nWidth
+ ,int nHeight
+ ,int nDepth = 1
+ );
+ virtual bool LoadFile( int nId
+ ,wxBitmapType lType = wxBITMAP_DEFAULT_TYPE
+ );
+ virtual bool LoadFile( const wxString& rName
+ ,wxBitmapType lType = wxBITMAP_DEFAULT_TYPE
+ );
+ virtual bool SaveFile( const wxString& rName
+ ,wxBitmapType lType
+ ,const wxPalette* pCmap = NULL
+ );
+
+ inline wxBitmapRefData* GetBitmapData() const
+ { return (wxBitmapRefData *)m_refData; }
+
+ // raw bitmap access support functions
+ void *GetRawData(wxPixelDataBase& data, int bpp);
+ void UngetRawData(wxPixelDataBase& data);
+
+ inline int GetQuality() const
+ { return (GetBitmapData() ? GetBitmapData()->m_nQuality : 0); }
+
+ void SetQuality(int nQ);
+
+ wxPalette* GetPalette() const
+ { return (GetBitmapData() ? (& GetBitmapData()->m_vBitmapPalette) : NULL); }
+
+ void SetPalette(const wxPalette& rPalette);
+
+ inline wxMask* GetMask() const
+ { return (GetBitmapData() ? GetBitmapData()->m_pBitmapMask : NULL); }
+
+ void SetMask(wxMask* pMask) ;
+
+ // Implementation