git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32059
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/image.h"
#include "wx/mac/private.h"
#include "wx/image.h"
#include "wx/mac/private.h"
+#define M_ICONDATA ((wxIconRefData *)m_refData)
+
int wxIcon::GetWidth() const
{
int wxIcon::GetWidth() const
{
+ wxCHECK_MSG( Ok(), -1, wxT("invalid icon") );
+
+ return M_ICONDATA->GetWidth();
}
int wxIcon::GetHeight() const
{
}
int wxIcon::GetHeight() const
{
+ wxCHECK_MSG( Ok(), -1, wxT("invalid icon") );
+
+ return M_ICONDATA->GetHeight();
}
bool wxIcon::Ok() const
}
bool wxIcon::Ok() const
UnRef() ;
m_refData = new wxIconRefData( (WXHICON) wxMacCreateIconRef( bmp ) ) ;
UnRef() ;
m_refData = new wxIconRefData( (WXHICON) wxMacCreateIconRef( bmp ) ) ;
+ M_ICONDATA->SetWidth( bmp.GetWidth() ) ;
+ M_ICONDATA->SetHeight( bmp.GetHeight() ) ;
}
wxIconRefData::wxIconRefData( WXHICON icon )
{
m_iconRef = MAC_WXHICON( icon ) ;
}
wxIconRefData::wxIconRefData( WXHICON icon )
{
m_iconRef = MAC_WXHICON( icon ) ;
+ // Std sizes
+ SetWidth( 32 ) ;
+ SetHeight( 32 ) ;
}
void wxIconRefData::Init()
}
void wxIconRefData::Init()