// Name: src/osx/imaglist.cpp
// Purpose:
// Author: Robert Roebling
-// RCS_ID: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
{
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 ) );
{
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)
{
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 );
if ( obj == NULL )
return wxNullBitmap ;
else if ( obj->IsKindOf(CLASSINFO(wxIcon)) )
- return wxBitmap( *(wx_static_cast(wxIcon*, obj)) ) ;
+ return wxBitmap( *(static_cast<wxIcon*>(obj)) ) ;
else
- return *(wx_static_cast(wxBitmap*, obj)) ;
+ return *(static_cast<wxBitmap*>(obj)) ;
}
// Get the icon
return wxNullIcon ;
}
else
- return *(wx_static_cast(wxIcon*, obj)) ;
+ return *(static_cast<wxIcon*>(obj)) ;
}
bool wxImageList::Replace( int index, const wxBitmap &bitmap )
m_images.Insert( next, newBitmap );
}
- if (mask.Ok())
+ if (mask.IsOk())
newBitmap->SetMask(new wxMask(mask));
return true;
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();
}
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 );
}