+ DoSetAttrString(toAttr.GetNSAttributedString());
+ }
+#endif // wxUSE_MARKUP
+
+private:
+ void DoSetAttrString(NSMutableAttributedString *attrstring)
+ {
+ NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+ [paragraphStyle setLineBreakMode:m_lineBreak];
+ int style = GetWXPeer()->GetWindowStyleFlag();
+ if (style & wxALIGN_CENTER)
+ [paragraphStyle setAlignment: NSCenterTextAlignment];
+ else if (style & wxALIGN_RIGHT)
+ [paragraphStyle setAlignment: NSRightTextAlignment];
+
+ [attrstring addAttribute:NSParagraphStyleAttributeName
+ value:paragraphStyle
+ range:NSMakeRange(0, [attrstring length])];
+ NSCell* cell = [(wxNSStaticTextView *)GetWXWidget() cell];
+ [cell setAttributedStringValue:attrstring];
+ [paragraphStyle release];
+ }
+
+ NSLineBreakMode m_lineBreak;
+};
+
+wxSize wxStaticText::DoGetBestSize() const
+{
+ return wxWindowMac::DoGetBestSize() ;
+}
+
+wxWidgetImplType* wxWidgetImpl::CreateStaticText( wxWindowMac* wxpeer,
+ wxWindowMac* WXUNUSED(parent),
+ wxWindowID WXUNUSED(id),
+ const wxString& WXUNUSED(label),
+ const wxPoint& pos,