X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c6eb3a84be918dcfed2496d014549e13af0f0e9..4ce846b17c9a1ad71c749253cc8b73d492ed9634:/include/wx/osx/carbon/icon.h diff --git a/include/wx/osx/carbon/icon.h b/include/wx/osx/carbon/icon.h index 754a5344c1..76113f7121 100644 --- a/include/wx/osx/carbon/icon.h +++ b/include/wx/osx/carbon/icon.h @@ -22,8 +22,8 @@ public: wxIcon(const char* const* data); wxIcon(const char bits[], int width , int height ); - wxIcon(const wxString& name, int flags = wxBITMAP_TYPE_ICON_RESOURCE, - int desiredWidth = -1, int desiredHeight = -1); + wxIcon(const wxString& name, wxBitmapType flags = wxICON_DEFAULT_TYPE, + int desiredWidth = -1, int desiredHeight = -1); wxIcon(const wxIconLocation& loc) { LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ICON); @@ -33,10 +33,8 @@ public: virtual ~wxIcon(); - bool LoadFile(const wxString& name, wxBitmapType flags /* = wxBITMAP_TYPE_ICON_RESOURCE */ , - int desiredWidth /* = -1 */ , int desiredHeight = -1); - bool LoadFile(const wxString& name ,wxBitmapType flags = wxBITMAP_TYPE_ICON_RESOURCE ) - { return LoadFile( name , flags , -1 , -1 ) ; } + bool LoadFile(const wxString& name, wxBitmapType flags = wxICON_DEFAULT_TYPE, + int desiredWidth = -1, int desiredHeight = -1); // create from bitmap (which should have a mask unless it's monochrome): @@ -52,7 +50,7 @@ public: void SetDepth(int d); void SetOk(bool isOk); - WXHICON GetHICON() const ; + WXHICON GetHICON() const; protected: virtual wxGDIRefData *CreateGDIRefData() const; @@ -62,37 +60,30 @@ private: DECLARE_DYNAMIC_CLASS(wxIcon) }; -/* -class WXDLLIMPEXP_CORE wxICONFileHandler: public wxBitmapHandler -{ - DECLARE_DYNAMIC_CLASS(wxICONFileHandler) -public: - inline wxICONFileHandler() - { - m_name = "ICO icon file"; - m_extension = "ico"; - m_type = wxBITMAP_TYPE_ICO; - }; - - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth = -1, int desiredHeight = -1); -}; -*/ - class WXDLLIMPEXP_CORE wxICONResourceHandler: public wxBitmapHandler { - DECLARE_DYNAMIC_CLASS(wxICONResourceHandler) public: - inline wxICONResourceHandler() - { - SetName(wxT("ICON resource")); - SetExtension(wxEmptyString); - SetType(wxBITMAP_TYPE_ICON_RESOURCE); - }; + wxICONResourceHandler() + { + SetName(wxT("ICON resource")); + SetExtension(wxEmptyString); + SetType(wxBITMAP_TYPE_ICON_RESOURCE); + } - virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, - int desiredWidth = -1, int desiredHeight = -1); + virtual bool LoadFile(wxBitmap *bitmap, + const wxString& name, + wxBitmapType flags, + int desiredWidth = -1, + int desiredHeight = -1); + // unhide the base class virtual + virtual bool LoadFile(wxBitmap *bitmap, + const wxString& name, + wxBitmapType flags) + { return LoadFile(bitmap, name, flags, -1, -1); } + +private: + DECLARE_DYNAMIC_CLASS(wxICONResourceHandler) }; #endif