#define TE_UNLIMITED_LENGTH 0xFFFFFFFFUL
#if TARGET_API_MAC_OSX
#define wxMAC_USE_MLTE 1
+ #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
#define wxMAC_USE_MLTE_HIVIEW 1
+ #else
+ #define wxMAC_USE_MLTE_HIVIEW 0
+ #endif
#else
// there is no unicodetextctrl on classic, and hopefully MLTE works better there
#define wxMAC_USE_MLTE 1
{
#if wxMAC_USE_MLTE_HIVIEW
HIRect hr = { bounds.left , bounds.top , bounds.right - bounds.left , bounds.bottom- bounds.top } ;
- HITextViewCreate( &hr , 0, FrameOptionsFromWXStyle( m_windowStyle ) , (ControlRef*) &m_macControl ) ;
- m_macTXN = HITextViewGetTXNObject((ControlRef) m_macControl) ;
- AdjustAttributesFromWXStyle( (TXNObject) m_macTXN , m_windowStyle , true ) ;
- HIViewSetVisible( (ControlRef) m_macControl , true ) ;
+ HIViewRef scrollView = NULL ;
+ TXNFrameOptions frameOptions = FrameOptionsFromWXStyle( style ) ;
+
+ if ( frameOptions & (kTXNWantVScrollBarMask|kTXNWantHScrollBarMask) )
+ {
+ HIScrollViewCreate(( frameOptions & kTXNWantHScrollBarMask ? kHIScrollViewOptionsHorizScroll : 0) |
+ ( frameOptions & kTXNWantVScrollBarMask ? kHIScrollViewOptionsVertScroll: 0 ) , &scrollView ) ;
+
+ HIViewSetFrame( scrollView, &hr );
+ HIViewSetVisible( scrollView, true );
+ }
+ HIViewRef textView ;
+ HITextViewCreate( NULL , 0, frameOptions , (ControlRef*) &textView ) ;
+ m_macTXN = HITextViewGetTXNObject( textView) ;
+ AdjustAttributesFromWXStyle( (TXNObject) m_macTXN , style , true ) ;
+ HIViewSetVisible( (ControlRef) textView , true ) ;
+ if ( scrollView )
+ {
+ HIViewAddSubview( scrollView , textView ) ;
+ m_macControl = (WXWidget) scrollView ;
+ }
+ else
+ {
+ m_macControl = (WXWidget) textView ;
+ }
#else
short featurSet;