X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ce1efe123a9b5f7dbb5be4aaf3dd0a21b399f38..a418b1f3a2037abfcc6090db6406806172b654c3:/include/wx/msw/bitmap.h diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index d087120311..90bcc1e7f3 100644 --- a/include/wx/msw/bitmap.h +++ b/include/wx/msw/bitmap.h @@ -12,7 +12,7 @@ #ifndef _WX_BITMAP_H_ #define _WX_BITMAP_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "bitmap.h" #endif @@ -26,12 +26,14 @@ class WXDLLEXPORT wxBitmapRefData; class WXDLLEXPORT wxControl; class WXDLLEXPORT wxCursor; class WXDLLEXPORT wxDC; +#if wxUSE_WXDIB class WXDLLEXPORT wxDIB; +#endif class WXDLLEXPORT wxIcon; class WXDLLEXPORT wxImage; class WXDLLEXPORT wxMask; class WXDLLEXPORT wxPalette; -class WXDLLEXPORT wxRawBitmapData; +class WXDLLEXPORT wxPixelDataBase; // ---------------------------------------------------------------------------- // wxBitmap: a mono or colour bitmap @@ -44,15 +46,13 @@ public: wxBitmap() { Init(); } // Copy constructors - wxBitmap(const wxBitmap& bitmap) { Init(); Ref(bitmap); } + wxBitmap(const wxBitmap& bitmap) : wxGDIImage(bitmap) { Init(); Ref(bitmap); } // Initialize with raw data wxBitmap(const char bits[], int width, int height, int depth = 1); // Initialize with XPM data -#ifndef __DIGITALMARS__ wxBitmap(const char **data) { CreateFromXpm(data); } -#endif wxBitmap(char **data) { CreateFromXpm((const char **)data); } // Load a file or resource @@ -71,7 +71,7 @@ public: // Create a bitmap compatible with the given DC wxBitmap(int width, int height, const wxDC& dc); -#if wxUSE_IMAGE +#if wxUSE_IMAGE && wxUSE_WXDIB // Convert from wxImage wxBitmap(const wxImage& image, int depth = -1) { (void)CreateFromImage(image, depth); } @@ -108,7 +108,7 @@ public: virtual ~wxBitmap(); -#if wxUSE_IMAGE +#if wxUSE_IMAGE && wxUSE_WXDIB wxImage ConvertToImage() const; #endif // wxUSE_IMAGE @@ -121,8 +121,10 @@ public: // copies the contents and mask of the given cursor to the bitmap bool CopyFromCursor(const wxCursor& cursor); +#if wxUSE_WXDIB // copies from a device independent bitmap bool CopyFromDIB(const wxDIB& dib); +#endif virtual bool Create(int width, int height, int depth = -1); virtual bool Create(int width, int height, const wxDC& dc); @@ -134,8 +136,8 @@ public: { return (wxBitmapRefData *)m_refData; } // raw bitmap access support functions - bool GetRawData(wxRawBitmapData *data); - void UngetRawData(wxRawBitmapData *); + void *GetRawData(wxPixelDataBase& data, int bpp); + void UngetRawData(wxPixelDataBase& data); #if wxUSE_PALETTE wxPalette* GetPalette() const; @@ -160,17 +162,6 @@ public: 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 // ------------------------------- @@ -188,6 +179,7 @@ protected: void Init(); virtual wxGDIImageRefData *CreateData() const; + virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; // creates the bitmap from XPM data, supposed to be called from ctor bool CreateFromXpm(const char **bits); @@ -195,7 +187,7 @@ protected: // creates an uninitialized bitmap, called from Create()s above bool DoCreate(int w, int h, int depth, WXHDC hdc); -#if wxUSE_IMAGE +#if wxUSE_IMAGE && wxUSE_WXDIB // creates the bitmap from wxImage, supposed to be called from ctor bool CreateFromImage(const wxImage& image, int depth);