X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ffecfa5aeb540b54914739dbb8603edbbd4c00a0..472eec8a0391538e4dcf7f7c6c4f4d44c8383616:/include/wx/palmos/bitmap.h diff --git a/include/wx/palmos/bitmap.h b/include/wx/palmos/bitmap.h index 9e7ab124a3..e55d2d1c6d 100644 --- a/include/wx/palmos/bitmap.h +++ b/include/wx/palmos/bitmap.h @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/palmos/bitmap.h // Purpose: wxBitmap class -// Author: William Osborne +// Author: William Osborne - minimal working wxPalmOS port // Modified by: // Created: 10/13/04 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) William Osborne // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,28 +12,24 @@ #ifndef _WX_BITMAP_H_ #define _WX_BITMAP_H_ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "bitmap.h" -#endif - #include "wx/palmos/gdiimage.h" #include "wx/gdicmn.h" #include "wx/palette.h" -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxBitmapHandler; -class WXDLLEXPORT wxBitmapRefData; -class WXDLLEXPORT wxControl; -class WXDLLEXPORT wxCursor; -class WXDLLEXPORT wxDC; +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxBitmapHandler; +class WXDLLIMPEXP_FWD_CORE wxBitmapRefData; +class WXDLLIMPEXP_FWD_CORE wxControl; +class WXDLLIMPEXP_FWD_CORE wxCursor; +class WXDLLIMPEXP_FWD_CORE wxDC; #if wxUSE_WXDIB -class WXDLLEXPORT wxDIB; +class WXDLLIMPEXP_FWD_CORE wxDIB; #endif -class WXDLLEXPORT wxIcon; -class WXDLLEXPORT wxImage; -class WXDLLEXPORT wxMask; -class WXDLLEXPORT wxPalette; -class WXDLLEXPORT wxPixelDataBase; +class WXDLLIMPEXP_FWD_CORE wxIcon; +class WXDLLIMPEXP_FWD_CORE wxImage; +class WXDLLIMPEXP_FWD_CORE wxMask; +class WXDLLIMPEXP_FWD_CORE wxPalette; +class WXDLLIMPEXP_FWD_CORE wxPixelDataBase; // ---------------------------------------------------------------------------- // wxBitmap: a mono or colour bitmap @@ -45,21 +41,17 @@ public: // default ctor creates an invalid bitmap, you must Create() it later wxBitmap() { Init(); } - // Copy constructors - wxBitmap(const wxBitmap& bitmap) { Init(); Ref(bitmap); } - // Initialize with raw data wxBitmap(const char bits[], int width, int height, int depth = 1); // Initialize with XPM data - wxBitmap(const char **data) { CreateFromXpm(data); } - wxBitmap(char **data) { CreateFromXpm((const char **)data); } + wxBitmap(const char* const* data); // Load a file or resource wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_BMP_RESOURCE); // New constructor for generalised creation from data - wxBitmap(void *data, long type, int width, int height, int depth = 1); + wxBitmap(const void* data, long type, int width, int height, int depth = 1); // Create a new, uninitialized bitmap of the given size and depth (if it // is omitted, will create a bitmap compatible with the display) @@ -85,13 +77,6 @@ public: // 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); @@ -128,7 +113,7 @@ public: 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 Create(const 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); @@ -147,20 +132,9 @@ public: 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 // implementation only from now on // ------------------------------- @@ -180,9 +154,6 @@ protected: virtual wxGDIImageRefData *CreateData() const; - // creates the bitmap from XPM data, supposed to be called from ctor - bool CreateFromXpm(const char **bits); - // creates an uninitialized bitmap, called from Create()s above bool DoCreate(int w, int h, int depth, WXHDC hdc); @@ -198,11 +169,6 @@ protected: #endif // wxUSE_IMAGE private: -#ifdef __WIN32__ - // common part of CopyFromIcon/CopyFromCursor for Win32 - bool CopyFromIconOrCursor(const wxGDIImage& icon); -#endif // __WIN32__ - DECLARE_DYNAMIC_CLASS(wxBitmap) }; @@ -261,7 +227,7 @@ public: // keep wxBitmapHandler derived from wxGDIImageHandler compatible with the // old class which worked only with bitmaps virtual bool Create(wxBitmap *bitmap, - void *data, + const void* data, long flags, int width, int height, int depth = 1); virtual bool LoadFile(wxBitmap *bitmap, @@ -274,7 +240,7 @@ public: const wxPalette *palette = NULL); virtual bool Create(wxGDIImage *image, - void *data, + const void* data, long flags, int width, int height, int depth = 1); virtual bool Load(wxGDIImage *image,