X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f932daffcb1edacc0c8c0cbba18a1427360236ce..831faf970a05e1710eac5663fd252da12a36992d:/include/wx/palmos/bitmap.h?ds=sidebyside diff --git a/include/wx/palmos/bitmap.h b/include/wx/palmos/bitmap.h index f4f92cdc92..71f4d9bef9 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,10 +12,6 @@ #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" @@ -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,9 +132,6 @@ 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; @@ -173,9 +155,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); @@ -249,7 +228,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, @@ -262,7 +241,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,