{
// this control draws the border itself
if ( !HasFlag(wxNO_BORDER) )
+ {
m_windowStyle &= ~wxSUNKEN_BORDER ;
+ bounds = wxMacGetBoundsForControl( this , pos , size ) ;
+ }
m_peer = new wxMacMLTEClassicControl( this , str , pos , size , style ) ;
}
// while this is true for MLTE under classic, the HITextView is somehow
// transparent but background erase is not working correctly, so intercept
// things while we can...
+ event.Skip() ;
}
void wxTextCtrl::OnChar(wxKeyEvent& event)
m_windowStyle = style ;
Rect bounds = wxMacGetBoundsForControl( wxPeer , pos , size ) ;
wxString st = str ;
- wxMacConvertNewlines13To10( &st ) ;
+ wxMacConvertNewlines10To13( &st ) ;
wxMacCFStringHolder cf(st , m_font.GetEncoding()) ;
CFStringRef cfr = cf ;
Boolean isPassword = ( m_windowStyle & wxTE_PASSWORD ) != 0 ;
wxMacCFStringHolder cf(value) ;
result = cf.AsString() ;
}
+#if TARGET_API_MAC_OSX
+ wxMacConvertNewlines13To10( &result ) ;
+#else
wxMacConvertNewlines10To13( &result ) ;
+#endif
return result ;
}
void wxMacUnicodeTextControl::SetStringValue( const wxString &str)
{
wxString st = str ;
- wxMacConvertNewlines13To10( &st ) ;
+ wxMacConvertNewlines10To13( &st ) ;
wxMacCFStringHolder cf(st , m_font.GetEncoding() ) ;
verify_noerr( SetData<CFStringRef>( 0, m_valueTag , cf ) ) ;
}
void wxMacUnicodeTextControl::WriteText(const wxString& str)
{
wxString st = str ;
- wxMacConvertNewlines13To10( &st ) ;
+ wxMacConvertNewlines10To13( &st ) ;
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
wxMacCFStringHolder cf(st , m_font.GetEncoding() ) ;
CFStringRef value = cf ;
}
#endif
}
+#if TARGET_API_MAC_OSX
+ wxMacConvertNewlines13To10( &result ) ;
+#else
wxMacConvertNewlines10To13( &result ) ;
+#endif
return result ;
}
void wxMacMLTEControl::SetStringValue( const wxString &str)
{
wxString st = str ;
- wxMacConvertNewlines13To10( &st ) ;
+
+ wxMacConvertNewlines10To13( &st ) ;
EditHelper help(m_txn) ;
// wxMacWindowClipper c( this ) ;
void wxMacMLTEControl::Replace( long from , long to , const wxString str )
{
wxString value = str ;
- wxMacConvertNewlines13To10( &value ) ;
+ wxMacConvertNewlines10To13( &value ) ;
EditHelper help( m_txn ) ;
TXNSetSelection(m_txn , from , to ) ;
TXNClear( m_txn ) ;
- SetTXNData( str , kTXNUseCurrentSelection, kTXNUseCurrentSelection ) ;
+ SetTXNData( value , kTXNUseCurrentSelection, kTXNUseCurrentSelection ) ;
}
void wxMacMLTEControl::Remove( long from , long to )
{
EditHelper helper( m_txn ) ;
wxString st = str ;
- wxMacConvertNewlines13To10( &st ) ;
+ wxMacConvertNewlines10To13( &st ) ;
long start , end , dummy ;
GetSelection( &start , &dummy ) ;
m_windowStyle = style ;
Rect bounds = wxMacGetBoundsForControl( wxPeer , pos , size ) ;
wxString st = str ;
- wxMacConvertNewlines13To10( &st ) ;
-
- wxMacConvertNewlines13To10( &st ) ;
+ wxMacConvertNewlines10To13( &st ) ;
short featurSet;
m_windowStyle = style ;
Rect bounds = wxMacGetBoundsForControl( wxPeer , pos , size ) ;
wxString st = str ;
- wxMacConvertNewlines13To10( &st ) ;
+ wxMacConvertNewlines10To13( &st ) ;
HIRect hr = { bounds.left , bounds.top , bounds.right - bounds.left , bounds.bottom- bounds.top } ;