From f1ca421b41579701556dee2d15af6c0256dc8495 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 21 Nov 2008 16:17:16 +0000 Subject: [PATCH] fix virtual function hiding for LoadFile(); replace a few more longs with wxBitmapTypes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/carbon/icon.h | 15 +++++++++++---- src/osx/carbon/icon.cpp | 6 +++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/include/wx/osx/carbon/icon.h b/include/wx/osx/carbon/icon.h index caa9a17d64..06c269ecae 100644 --- a/include/wx/osx/carbon/icon.h +++ b/include/wx/osx/carbon/icon.h @@ -22,7 +22,7 @@ public: wxIcon(const char* const* data); wxIcon(const char bits[], int width , int height ); - wxIcon(const wxString& name, int flags = wxICON_DEFAULT_TYPE, + wxIcon(const wxString& name, wxBitmapType flags = wxICON_DEFAULT_TYPE, int desiredWidth = -1, int desiredHeight = -1); wxIcon(const wxIconLocation& loc) { @@ -88,9 +88,16 @@ public: 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); } }; #endif diff --git a/src/osx/carbon/icon.cpp b/src/osx/carbon/icon.cpp index 5720f1bf81..ddd2dd43dc 100644 --- a/src/osx/carbon/icon.cpp +++ b/src/osx/carbon/icon.cpp @@ -97,10 +97,10 @@ wxIcon::wxIcon(const char* const* bits) } wxIcon::wxIcon( - const wxString& icon_file, int flags, + const wxString& icon_file, wxBitmapType flags, int desiredWidth, int desiredHeight ) { - LoadFile( icon_file, (wxBitmapType) flags, desiredWidth, desiredHeight ); + LoadFile( icon_file, flags, desiredWidth, desiredHeight ); } wxIcon::wxIcon(WXHICON icon, const wxSize& size) @@ -305,7 +305,7 @@ void wxIcon::CopyFromBitmap( const wxBitmap& bmp ) IMPLEMENT_DYNAMIC_CLASS(wxICONResourceHandler, wxBitmapHandler) bool wxICONResourceHandler::LoadFile( - wxBitmap *bitmap, const wxString& name, long WXUNUSED(flags), + wxBitmap *bitmap, const wxString& name, wxBitmapType WXUNUSED(flags), int desiredWidth, int desiredHeight ) { wxIcon icon ; -- 2.45.2