X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3dec57adfdb2469b7679930092f0bd9c8569d62c..5541d1fda4b73af86e42b2f43724f0c063a352d0:/src/mac/carbon/icon.cpp?ds=sidebyside diff --git a/src/mac/carbon/icon.cpp b/src/mac/carbon/icon.cpp index 7bfb1d8309..2ae29d1859 100644 --- a/src/mac/carbon/icon.cpp +++ b/src/mac/carbon/icon.cpp @@ -19,6 +19,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) #endif +#include "wx/mac/private.h" + + /* * Icons */ @@ -43,25 +46,25 @@ wxIcon::wxIcon( char **bits ) : { } -wxIcon::wxIcon(const wxString& icon_file, long flags, +wxIcon::wxIcon(const wxString& icon_file, int flags, int desiredWidth, int desiredHeight) { - LoadFile(icon_file, flags, desiredWidth, desiredHeight); + LoadFile(icon_file, (wxBitmapType) flags, desiredWidth, desiredHeight); } wxIcon::~wxIcon() { } -bool wxIcon::LoadFile(const wxString& filename, long type, +bool wxIcon::LoadFile(const wxString& filename, wxBitmapType type, int desiredWidth, int desiredHeight) { UnRef(); m_refData = new wxBitmapRefData; - wxBitmapHandler *handler = FindHandler(type); + wxBitmapHandler *handler = FindHandler((wxBitmapType)type); if ( handler ) return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight); @@ -69,6 +72,12 @@ bool wxIcon::LoadFile(const wxString& filename, long type, return FALSE; } +void wxIcon::CopyFromBitmap(const wxBitmap& bmp) +{ + wxIcon *icon = (wxIcon*)(&bmp); + *this = *icon; +} + IMPLEMENT_DYNAMIC_CLASS(wxICONResourceHandler, wxBitmapHandler) bool wxICONResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,