X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01495abf8755b0be46b4c65d6c7c48e9460f102b..6485c8d7fbede5752cd3f763d0d5ccf9b0b51f2e:/src/osx/button_osx.cpp?ds=sidebyside diff --git a/src/osx/button_osx.cpp b/src/osx/button_osx.cpp index ceedc162b4..358fffffd3 100644 --- a/src/osx/button_osx.cpp +++ b/src/osx/button_osx.cpp @@ -4,7 +4,7 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: button.cpp 54845 2008-07-30 14:52:41Z SC $ +// RCS-ID: $Id$ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -42,8 +42,6 @@ bool IsHelpButtonWithStandardLabel(wxWindowID id, const wxString& label) } // anonymous namespace -IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) - BEGIN_EVENT_TABLE(wxButton, wxControl) EVT_ENTER_WINDOW(wxButton::OnEnterWindow) EVT_LEAVE_WINDOW(wxButton::OnLeaveWindow) @@ -126,7 +124,7 @@ wxBitmap wxButton::DoGetBitmap(State which) const void wxButton::DoSetBitmap(const wxBitmap& bitmap, State which) { m_bitmaps[which] = bitmap; - + if ( which == State_Normal ) m_peer->SetBitmap(bitmap); else if ( which == State_Pressed ) @@ -144,6 +142,20 @@ void wxButton::DoSetBitmapPosition(wxDirection dir) InvalidateBestSize(); } +#if wxUSE_MARKUP && wxOSX_USE_COCOA + +bool wxButton::DoSetLabelMarkup(const wxString& markup) +{ + if ( !wxButtonBase::DoSetLabelMarkup(markup) ) + return false; + + m_peer->SetLabelMarkup(markup); + + return true; +} + +#endif // wxUSE_MARKUP && wxOSX_USE_COCOA + wxWindow *wxButton::SetDefault() { wxWindow *btnOldDefault = wxButtonBase::SetDefault(); @@ -167,13 +179,13 @@ void wxButton::Command (wxCommandEvent & WXUNUSED(event)) void wxButton::OnEnterWindow( wxMouseEvent& WXUNUSED(event)) { if ( DoGetBitmap( State_Current ).IsOk() ) - m_peer->SetBitmap( DoGetBitmap( State_Current ) ); + m_peer->SetBitmap( DoGetBitmap( State_Current ) ); } void wxButton::OnLeaveWindow( wxMouseEvent& WXUNUSED(event)) { if ( DoGetBitmap( State_Current ).IsOk() ) - m_peer->SetBitmap( DoGetBitmap( State_Normal ) ); + m_peer->SetBitmap( DoGetBitmap( State_Normal ) ); } bool wxButton::OSXHandleClicked( double WXUNUSED(timestampsec) )