X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/95434bcfc3cba7a6d2e7a2db997962bcaf89c254..7c60222510bc5e197b12f153c4bf05db66cb0f4a:/src/osx/imaglist.cpp diff --git a/src/osx/imaglist.cpp b/src/osx/imaglist.cpp index 9bd77204a4..2f9346ac52 100644 --- a/src/osx/imaglist.cpp +++ b/src/osx/imaglist.cpp @@ -58,8 +58,8 @@ int wxImageList::Add( const wxIcon &bitmap ) { wxASSERT_MSG( (bitmap.GetWidth() == m_width && bitmap.GetHeight() == m_height) || (m_width == 0 && m_height == 0), - _T("invalid bitmap size in wxImageList: this might work ") - _T("on this platform but definitely won't under Windows.") ); + wxT("invalid bitmap size in wxImageList: this might work ") + wxT("on this platform but definitely won't under Windows.") ); m_images.Append( new wxIcon( bitmap ) ); @@ -76,10 +76,10 @@ int wxImageList::Add( const wxBitmap &bitmap ) { wxASSERT_MSG( (bitmap.GetWidth() >= m_width && bitmap.GetHeight() == m_height) || (m_width == 0 && m_height == 0), - _T("invalid bitmap size in wxImageList: this might work ") - _T("on this platform but definitely won't under Windows.") ); + wxT("invalid bitmap size in wxImageList: this might work ") + wxT("on this platform but definitely won't under Windows.") ); - // Mimic behavior of Windows ImageList_Add that automatically breaks up the added + // Mimic behaviour of Windows ImageList_Add that automatically breaks up the added // bitmap into sub-images of the correct size if (m_width > 0 && bitmap.GetWidth() > m_width && bitmap.GetHeight() >= m_height) { @@ -108,7 +108,7 @@ int wxImageList::Add( const wxBitmap &bitmap ) int wxImageList::Add( const wxBitmap& bitmap, const wxBitmap& mask ) { wxBitmap bmp( bitmap ); - if (mask.Ok()) + if (mask.IsOk()) bmp.SetMask( new wxMask( mask ) ); return Add( bmp ); @@ -133,9 +133,9 @@ wxBitmap wxImageList::GetBitmap(int index) const if ( obj == NULL ) return wxNullBitmap ; else if ( obj->IsKindOf(CLASSINFO(wxIcon)) ) - return wxBitmap( *(wx_static_cast(wxIcon*, obj)) ) ; + return wxBitmap( *(static_cast(obj)) ) ; else - return *(wx_static_cast(wxBitmap*, obj)) ; + return *(static_cast(obj)) ; } // Get the icon @@ -154,7 +154,7 @@ wxIcon wxImageList::GetIcon(int index) const return wxNullIcon ; } else - return *(wx_static_cast(wxIcon*, obj)) ; + return *(static_cast(obj)) ; } bool wxImageList::Replace( int index, const wxBitmap &bitmap ) @@ -231,7 +231,7 @@ bool wxImageList::Replace( int index, const wxBitmap &bitmap, const wxBitmap &ma m_images.Insert( next, newBitmap ); } - if (mask.Ok()) + if (mask.IsOk()) newBitmap->SetMask(new wxMask(mask)); return true; @@ -269,13 +269,13 @@ bool wxImageList::GetSize( int index, int &width, int &height ) const wxObject *obj = (wxObject*)node->GetData(); if (obj->IsKindOf(CLASSINFO(wxIcon))) { - wxIcon *bm = wx_static_cast( wxIcon* , obj ) ; + wxIcon *bm = static_cast< wxIcon* >(obj ) ; width = bm->GetWidth(); height = bm->GetHeight(); } else { - wxBitmap *bm = wx_static_cast( wxBitmap* , obj ) ; + wxBitmap *bm = static_cast< wxBitmap* >(obj ) ; width = bm->GetWidth(); height = bm->GetHeight(); } @@ -294,12 +294,12 @@ bool wxImageList::Draw( wxObject *obj = (wxObject*)node->GetData(); if (obj->IsKindOf(CLASSINFO(wxIcon))) { - wxIcon *bm = wx_static_cast( wxIcon* , obj ) ; + wxIcon *bm = static_cast< wxIcon* >(obj ) ; dc.DrawIcon( *bm , x, y ); } else { - wxBitmap *bm = wx_static_cast( wxBitmap* , obj ) ; + wxBitmap *bm = static_cast< wxBitmap* >(obj ) ; dc.DrawBitmap( *bm, x, y, (flags & wxIMAGELIST_DRAW_TRANSPARENT) > 0 ); }