wxDataViewCtrl: Fully prepare renderer for Activate() call.
[wxWidgets.git] / src / osx / button_osx.cpp
index bb6138b5c43333183446993f19e1042d188d6753..358fffffd3f5a450134b483ff2edde9640dedd75 100644 (file)
@@ -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) )