X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5fde6fcc9b551340a194ae4c726db5ab64b5c594..29149a64916d6fdc53e445adca9ef83bc58fb6c3:/include/wx/mac/bitmap.h?ds=inline diff --git a/include/wx/mac/bitmap.h b/include/wx/mac/bitmap.h index 85eaf59e81..5e58198e53 100644 --- a/include/wx/mac/bitmap.h +++ b/include/wx/mac/bitmap.h @@ -27,6 +27,7 @@ class WXDLLEXPORT wxBitmap; class WXDLLEXPORT wxBitmapHandler; class WXDLLEXPORT wxIcon; class WXDLLEXPORT wxCursor; +class WXDLLEXPORT wxImage; GWorldPtr wxMacCreateGWorld( int width , int height , int depth ) ; void wxMacDestroyGWorld( GWorldPtr gw ) ; @@ -68,7 +69,7 @@ protected: WXHBITMAP m_maskBitmap; }; -enum { kMacBitmapTypeUnknownType , kMacBitmapTypeGrafWorld, kMacBitmapTypePict } ; +enum { kMacBitmapTypeUnknownType , kMacBitmapTypeGrafWorld, kMacBitmapTypePict , kMacBitmapTypeIcon } ; class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData { @@ -91,6 +92,7 @@ public: int m_bitmapType ; PicHandle m_hPict ; WXHBITMAP m_hBitmap; + WXHICON m_hIcon ; wxMask * m_bitmapMask; // Optional mask }; @@ -141,8 +143,9 @@ public: 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); @@ -152,7 +155,13 @@ public: // 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; @@ -203,6 +212,8 @@ protected: 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;