Add markup support to wxOSX/Cocoa wxStaticText and wxButton.

Add wxMarkupToAttrString helper that converts wx markup to OS X attribute
strings and use it in wxStaticText and wxButton.

This required adding new SetLabelMarkup() method to wxWidgetCocoaImpl, it
seems to make sense to have it there as it could be implemented by more
controls in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-02-27 12:48:46 +00:00
parent 83586c2aae
commit f672c96951
8 changed files with 210 additions and 8 deletions

View File

@@ -142,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();