Allow OS X Cocoa (or any OS X port) to override GetBestSize and provide a native OS X Cocoa impl. Also, fix the line ending check under OS X Cocoa, and a sanity check for SetStyle.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -514,6 +514,18 @@ void wxNSTextViewControl::CheckSpelling(bool check)
|
||||
[m_textView setContinuousSpellCheckingEnabled: check];
|
||||
}
|
||||
|
||||
wxSize wxNSTextViewControl::GetBestSize() const
|
||||
{
|
||||
if (m_textView && [m_textView layoutManager])
|
||||
{
|
||||
NSRect rect = [[m_textView layoutManager] usedRectForTextContainer: [m_textView textContainer]];
|
||||
wxSize size = wxSize(rect.size.width, rect.size.height);
|
||||
size.x += [m_textView textContainerInset].width;
|
||||
size.y += [m_textView textContainerInset].height;
|
||||
return size;
|
||||
}
|
||||
}
|
||||
|
||||
// wxNSTextFieldControl
|
||||
|
||||
wxNSTextFieldControl::wxNSTextFieldControl( wxTextCtrl *wxPeer, WXWidget w ) : wxWidgetCocoaImpl(wxPeer, w)
|
||||
|
Reference in New Issue
Block a user