X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cbea84022c92098e94956cc50a4271599773a975..bbd92d1dbea02db8c28e9c17bfacc0563d855b25:/src/mac/carbon/textctrl.cpp diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index f44ec41d34..a8bcfbdef9 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -44,6 +44,7 @@ #include "wx/filefn.h" #include "wx/sysopt.h" +#include "wx/thread.h" #include "wx/mac/uma.h" #include "wx/mac/carbon/private/mactext.h" @@ -1338,7 +1339,7 @@ bool wxMacUnicodeTextControl::Create( wxTextCtrl *wxPeer, Rect bounds = wxMacGetBoundsForControl( wxPeer , pos , size ) ; wxString st = str ; wxMacConvertNewlines10To13( &st ) ; - wxMacCFStringHolder cf(st , m_font.GetEncoding()) ; + wxCFStringRef cf(st , m_font.GetEncoding()) ; CFStringRef cfr = cf ; m_valueTag = kControlEditTextCFStringTag ; @@ -1382,7 +1383,7 @@ wxString wxMacUnicodeTextControl::GetStringValue() const CFStringRef value = GetData(0, m_valueTag) ; if ( value ) { - wxMacCFStringHolder cf(value) ; + wxCFStringRef cf(value) ; result = cf.AsString() ; } @@ -1399,7 +1400,7 @@ void wxMacUnicodeTextControl::SetStringValue( const wxString &str ) { wxString st = str ; wxMacConvertNewlines10To13( &st ) ; - wxMacCFStringHolder cf( st , m_font.GetEncoding() ) ; + wxCFStringRef cf( st , m_font.GetEncoding() ) ; verify_noerr( SetData( 0, m_valueTag , cf ) ) ; } @@ -1465,7 +1466,7 @@ void wxMacUnicodeTextControl::SetSelection( long from , long to ) CFStringRef value = GetData(0, m_valueTag) ; if ( value ) { - wxMacCFStringHolder cf(value) ; + wxCFStringRef cf(value) ; textLength = cf.AsString().length() ; } @@ -1498,7 +1499,7 @@ void wxMacUnicodeTextControl::WriteText( const wxString& str ) if ( HasFocus() ) { - wxMacCFStringHolder cf(st , m_font.GetEncoding() ) ; + wxCFStringRef cf(st , m_font.GetEncoding() ) ; CFStringRef value = cf ; SetData( 0, kControlEditTextInsertCFStringRefTag, &value ); } @@ -3031,7 +3032,7 @@ wxMacMLTEHIViewControl::wxMacMLTEHIViewControl( wxTextCtrl *wxPeer, m_scrollView = NULL ; TXNFrameOptions frameOptions = FrameOptionsFromWXStyle( style ) ; - if (( frameOptions & (kTXNWantVScrollBarMask | kTXNWantHScrollBarMask)) || !(frameOptions &kTXNSingleLineOnlyMask)) + if (( frameOptions & (kTXNWantVScrollBarMask | kTXNWantHScrollBarMask)) || (frameOptions &kTXNSingleLineOnlyMask)) { if ( frameOptions & (kTXNWantVScrollBarMask | kTXNWantHScrollBarMask) ) {