git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33346
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
style |= wxTE_PROCESS_ENTER ;
}
style |= wxTE_PROCESS_ENTER ;
}
-#ifdef __WXMAC_OSX__
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
-
- bool tryHIView = UMAGetSystemVersion() >= 0x1030 ;
+ bool forceMLTE = false ;
#if wxUSE_SYSTEM_OPTIONS
if ( (wxSystemOptions::HasOption(wxMAC_TEXTCONTROL_USE_MLTE) ) && ( wxSystemOptions::GetOptionInt( wxMAC_TEXTCONTROL_USE_MLTE ) == 1) )
{
#if wxUSE_SYSTEM_OPTIONS
if ( (wxSystemOptions::HasOption(wxMAC_TEXTCONTROL_USE_MLTE) ) && ( wxSystemOptions::GetOptionInt( wxMAC_TEXTCONTROL_USE_MLTE ) == 1) )
{
+
+#ifdef __WXMAC_OSX__
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
+ if ( UMAGetSystemVersion() >= 0x1030 && forceMLTE == false )
- m_peer = new wxMacMLTEHIViewControl( this , str , pos , size , style ) ;
+ if ( m_windowStyle & wxTE_MULTILINE )
+ m_peer = new wxMacMLTEHIViewControl( this , str , pos , size , style ) ;
-#if !wxMAC_AWAYS_USE_MLTE
- m_peer = new wxMacUnicodeTextControl( this , str , pos , size , style ) ;
+ if ( !(m_windowStyle & wxTE_MULTILINE) && forceMLTE == false )
+ m_peer = new wxMacUnicodeTextControl( this , str , pos , size , style ) ;
{
TXNFrameOptions frameOptions =
kTXNDontDrawCaretWhenInactiveMask ;
{
TXNFrameOptions frameOptions =
kTXNDontDrawCaretWhenInactiveMask ;
if ( ! ( wxStyle & wxTE_NOHIDESEL ) )
frameOptions |= kTXNDontDrawSelectionWhenInactiveMask ;
if ( ! ( wxStyle & wxTE_NOHIDESEL ) )
frameOptions |= kTXNDontDrawSelectionWhenInactiveMask ;
SInt32 dh = desired.h - current.h ;
TXNShowSelection( m_txn , true ) ;
theErr = TXNScroll( m_txn, kTXNScrollUnitsInPixels , kTXNScrollUnitsInPixels , &dv , &dh );
SInt32 dh = desired.h - current.h ;
TXNShowSelection( m_txn , true ) ;
theErr = TXNScroll( m_txn, kTXNScrollUnitsInPixels , kTXNScrollUnitsInPixels , &dv , &dh );
- wxASSERT_MSG( theErr == noErr, _T("TXNScroll returned an error!") );
+ // there will be an error returned for classic mlte implementation when the control is
+ // invisible, but HITextView works correctly, so we don't assert that one
+ // wxASSERT_MSG( theErr == noErr, _T("TXNScroll returned an error!") );