(void) Create(data, type, width, height, depth);
}
-wxBitmap::wxBitmap(const wxString& filename, long type)
+wxBitmap::wxBitmap(const wxString& filename, int type)
{
LoadFile(filename, (int)type);
}
return Create(bits, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
}
+bool wxBitmap::CopyFromIcon(const wxIcon& icon)
+{
+ *this = icon;
+ return TRUE;
+}
+
bool wxBitmap::Create(int w, int h, int d)
{
UnRef();
wxBitmapHandler *handler = FindHandler(type);
if ( handler == NULL ) {
- wxLogWarning("no data bitmap handler for type %d defined.", type);
+ wxLogWarning("no data bitmap handler for type %ld defined.", type);
return FALSE;
}
WXPixmap wxBitmap::GetLabelPixmap (WXWidget w)
{
+ if (!M_BITMAPDATA)
+ return (WXPixmap)NULL;
if (M_BITMAPDATA->m_image == (WXPixmap) 0)
return M_BITMAPDATA->m_pixmap;
WXPixmap wxBitmap::GetInsensPixmap (WXWidget w)
{
Display *dpy = (Display*) M_BITMAPDATA->m_display;
-
+
+ if (!M_BITMAPDATA)
+ return (WXPixmap)NULL;
if (M_BITMAPDATA->m_insensPixmap)
return M_BITMAPDATA->m_insensPixmap;