#include "wx/dcmemory.h"
#include "wx/icon.h"
#include "wx/math.h"
+ #include "wx/image.h"
#endif
-#include "wx/image.h"
-
#include "wx/x11/private.h"
/* No point in using libXPM for NanoX */
{
public:
wxBitmapRefData();
- ~wxBitmapRefData();
+ virtual ~wxBitmapRefData();
WXPixmap m_pixmap;
WXPixmap m_bitmap;
return Ok();
}
-bool wxBitmap::Create(void *data, wxBitmapType type,
+bool wxBitmap::Create(const void* data, wxBitmapType type,
int width, int height, int depth)
{
UnRef();
return true;
}
-bool wxBitmap::CreateFromXpm( const char **bits )
+wxBitmap::wxBitmap(const char* const* bits)
{
- wxCHECK_MSG( bits, false, wxT("NULL pointer in wxBitmap::CreateFromXpm") );
-
- return Create(bits, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
+ Create(bits, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
}
bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
{
m_refData = new wxBitmapRefData;
- (void) Create((void*) bits, wxBITMAP_TYPE_XBM_DATA, width, height, depth);
+ (void) Create(bits, wxBITMAP_TYPE_XBM_DATA, width, height, depth);
}
wxBitmap::~wxBitmap()
return m_refData != bmp.m_refData;
}
-bool wxBitmap::Ok() const
+bool wxBitmap::IsOk() const
{
return (m_refData != NULL);
}
virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name,
int type, const wxPalette *palette = NULL);
- virtual bool Create(wxBitmap *WXUNUSED(bitmap), void *WXUNUSED(data), long WXUNUSED(flags),
+ virtual bool Create(wxBitmap *WXUNUSED(bitmap), const void* WXUNUSED(data), long WXUNUSED(flags),
int WXUNUSED(width), int WXUNUSED(height), int WXUNUSED(depth) = 1)
{ return false; }
};
const wxPalette *WXUNUSED(palette) = NULL)
{ return false; }
- virtual bool Create(wxBitmap *bitmap, void *data, long flags,
+ virtual bool Create(wxBitmap *bitmap, const void* data, long flags,
int width, int height, int depth = 1);
};
IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler)
-bool wxXPMDataHandler::Create(wxBitmap *bitmap, void *bits,
+bool wxXPMDataHandler::Create(wxBitmap *bitmap, const void* bits,
long WXUNUSED(flags),
int WXUNUSED(width), int WXUNUSED(height), int WXUNUSED(depth))
{
const wxPalette *WXUNUSED(palette) = NULL)
{ return false; }
- virtual bool Create(wxBitmap *bitmap, void *data, long flags,
+ virtual bool Create(wxBitmap *bitmap, const void* data, long flags,
int width, int height, int depth = 1);
};
IMPLEMENT_DYNAMIC_CLASS(wxXBMDataHandler, wxBitmapHandler)
-bool wxXBMDataHandler::Create( wxBitmap *bitmap, void *bits,
+bool wxXBMDataHandler::Create( wxBitmap *bitmap, const void* bits,
long WXUNUSED(flags),
int width, int height, int WXUNUSED(depth))
{