} // anonymous namespace
-IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
-
BEGIN_EVENT_TABLE(wxButton, wxControl)
EVT_ENTER_WINDOW(wxButton::OnEnterWindow)
EVT_LEAVE_WINDOW(wxButton::OnLeaveWindow)
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 )
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();
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) )