From: Stefan Csomor Date: Thu, 29 Nov 2007 14:12:23 +0000 (+0000) Subject: cleanup X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/787f0fc4f3eb08f1065d86e44ace8d7453e1b1b3 cleanup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index f0c765b9cb..46c842a1a7 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -412,7 +412,7 @@ void wxTextCtrl::CreatePeer( if ( !forceMLTE ) { - if ( m_windowStyle & wxTE_MULTILINE ) + if ( m_windowStyle & wxTE_MULTILINE || ( UMAGetSystemVersion() >= 0x1050 ) ) m_peer = new wxMacMLTEHIViewControl( this , str , pos , size , style ) ; } @@ -1625,7 +1625,8 @@ TXNFrameOptions wxMacMLTEControl::FrameOptionsFromWXStyle( long wxStyle ) if ( wxStyle & wxTE_MULTILINE ) { - frameOptions |= kTXNAlwaysWrapAtViewEdgeMask ; + if ( ! (wxStyle & wxTE_DONTWRAP ) ) + frameOptions |= kTXNAlwaysWrapAtViewEdgeMask ; if ( !(wxStyle & wxTE_NO_VSCROLL) ) { @@ -2257,6 +2258,17 @@ int wxMacMLTEControl::GetLineLength(long lineNo) const // while this can be solved on 10.3 by reassigning them the correct place, on 10.2 there is // no way out, therefore we are using our own implementation and our own scrollbars .... +wxMacPortSaver::wxMacPortSaver( GrafPtr port ) +{ + ::GetPort( &m_port ); + ::SetPort( port ); +} + +wxMacPortSaver::~wxMacPortSaver() +{ + ::SetPort( m_port ); +} + wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win ) : wxMacPortSaver( (GrafPtr) GetWindowPort( (WindowRef) win->MacGetTopLevelWindowRef() ) ) {