added support for bitmaps in wxButton to wxOSX/Cocoa

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-06-21 03:01:53 +00:00
parent b727fcd3ad
commit e5d05b907c
10 changed files with 135 additions and 17 deletions

View File

@@ -67,6 +67,28 @@ void wxButton::SetLabel(const wxString& label)
wxButtonBase::SetLabel(label);
}
// there is no support for button bitmaps in wxOSX/Carbon so there is no need
// for these methods there
#if wxOSX_USE_COCOA
wxBitmap wxButton::DoGetBitmap(State which) const
{
return which == State_Normal ? m_peer->GetBitmap() : wxBitmap();
}
void wxButton::DoSetBitmap(const wxBitmap& bitmap, State which)
{
if ( which == State_Normal )
m_peer->SetBitmap(bitmap);
}
void wxButton::DoSetBitmapPosition(wxDirection dir)
{
m_peer->SetBitmapPosition(dir);
}
#endif // wxOSX_USE_COCOA
wxWindow *wxButton::SetDefault()
{
wxWindow *btnOldDefault = wxButtonBase::SetDefault();