class WXDLLEXPORT wxBitmapHandler;
class WXDLLEXPORT wxIcon;
class WXDLLEXPORT wxCursor;
+class WXDLLEXPORT wxImage;
GWorldPtr wxMacCreateGWorld( int width , int height , int depth ) ;
void wxMacDestroyGWorld( GWorldPtr gw ) ;
WXHBITMAP m_maskBitmap;
};
-enum { kMacBitmapTypeUnknownType , kMacBitmapTypeGrafWorld, kMacBitmapTypePict } ;
+enum { kMacBitmapTypeUnknownType , kMacBitmapTypeGrafWorld, kMacBitmapTypePict , kMacBitmapTypeIcon } ;
class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData
{
int m_bitmapType ;
PicHandle m_hPict ;
WXHBITMAP m_hBitmap;
+ WXHICON m_hIcon ;
wxMask * m_bitmapMask; // Optional mask
};
wxBitmap(const char bits[], int width, int height, int depth = 1);
// Initialize with XPM data
- wxBitmap(const char **data);
- wxBitmap(char **data);
+ bool CreateFromXpm(const char **bits);
+ wxBitmap(const char **bits);
+ wxBitmap(char **bits);
// Load a file or resource
wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_PICT_RESOURCE);
// If depth is omitted, will create a bitmap compatible with the display
wxBitmap(int width, int height, int depth = -1);
+
+ // Convert from wxImage:
+ wxBitmap(const wxImage& image, int depth = -1);
+
~wxBitmap();
+
+ wxImage ConvertToImage() const;
// get the given part of bitmap
wxBitmap GetSubBitmap( const wxRect& rect ) const;
public:
void SetHBITMAP(WXHBITMAP bmp);
WXHBITMAP GetHBITMAP() const;
+ void SetHICON(WXHICON ico);
+ inline WXHICON GetHICON() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_hIcon : 0); }
PicHandle GetPict() const;