X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/155ecd4c4221d3bbc7aa93d472d11948f21d21ab..8cb1060f1e2f2cbbcaebcc668dccefdd79804662:/src/mac/carbon/icon.cpp diff --git a/src/mac/carbon/icon.cpp b/src/mac/carbon/icon.cpp index 26113eac7a..68e908bf25 100644 --- a/src/mac/carbon/icon.cpp +++ b/src/mac/carbon/icon.cpp @@ -53,6 +53,18 @@ wxIcon::wxIcon( LoadFile( icon_file, (wxBitmapType) flags, desiredWidth, desiredHeight ); } +wxIcon::wxIcon(WXHICON icon, const wxSize& size) + : wxGDIObject() +{ + // as the icon owns that ref, we have to acquire it as well + if (icon) + AcquireIconRef( (IconRef) icon ) ; + + m_refData = new wxIconRefData( icon ) ; + M_ICONDATA->SetWidth( size.x ) ; + M_ICONDATA->SetHeight( size.y ) ; +} + wxIcon::~wxIcon() { } @@ -95,7 +107,7 @@ void wxIcon::SetHeight( int height ) { } -bool wxIcon::Ok() const +bool wxIcon::IsOk() const { return m_refData != NULL ; } @@ -126,6 +138,18 @@ bool wxIcon::LoadFile( { theId = kAlertStopIcon ; } + else if ( filename == wxT("wxICON_FOLDER") ) + { + theId = kGenericFolderIcon ; + } + else if ( filename == wxT("wxICON_FOLDER_OPEN") ) + { + theId = kOpenFolderIcon ; + } + else if ( filename == wxT("wxICON_NORMAL_FILE") ) + { + theId = kGenericDocumentIcon ; + } else { #if 0