X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90b959aee428b26304ee0056864af48775051496..4b04699b670b4ab4632229fa0264d154acd3bec1:/src/mac/icon.cpp diff --git a/src/mac/icon.cpp b/src/mac/icon.cpp index 26cb83e93c..e886c1073c 100644 --- a/src/mac/icon.cpp +++ b/src/mac/icon.cpp @@ -19,6 +19,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) #endif +#include "wx/mac/private.h" + + /* * Icons */ @@ -43,18 +46,18 @@ 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(); @@ -69,13 +72,19 @@ 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, int desiredWidth, int desiredHeight) { short theId = -1 ; - if ( name == "wxICON_INFO" ) + if ( name == "wxICON_INFORMATION" ) { theId = kNoteIcon ; }