class WXDLLEXPORT wxMask;
class WXDLLEXPORT wxCursor;
class WXDLLEXPORT wxControl;
+class WXDLLEXPORT wxImage;
// ----------------------------------------------------------------------------
// Bitmap data
);
// Initialize with XPM data
- wxBitmap(const char** ppData);
- wxBitmap(char** ppData);
+ wxBitmap(const char** ppData) { CreateFromXpm(ppData); }
+ wxBitmap(char** ppData) { CreateFromXpm((const char**)ppData); }
// Load a file or resource
wxBitmap( const wxString& rName
,int nDepth = -1
);
+ wxBitmap( const wxImage& image, int depth = -1 )
+ { (void)CreateFromImage(image, depth); }
+
// we must have this, otherwise icons are silently copied into bitmaps using
// the copy ctor but the resulting bitmap is invalid!
inline wxBitmap(const wxIcon& rIcon)
virtual ~wxBitmap();
+ wxImage ConvertToImage() const;
+
// get the given part of bitmap
wxBitmap GetSubBitmap(const wxRect& rRect) const;
{ return new wxBitmapRefData; }
// creates the bitmap from XPM data, supposed to be called from ctor
- bool CreateFromXpm(const char **bits);
+ bool CreateFromXpm(const char** ppData);
+ bool CreateFromImage(const wxImage& image, int depth);
private:
bool CopyFromIconOrCursor(const wxGDIImage& rIcon);