X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/841e47cfd74743bc6bf9f44e729badc3f8051872..79456eac49738a3f1704a82935d6b0f731549764:/src/mac/carbon/textctrl.cpp diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 2d443c09b2..44ec53aa9a 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -189,7 +189,7 @@ wxMacPortSaver( (GrafPtr) GetWindowPort( (WindowRef) win->MacGetTopLevelWindowRe m_formerClip = NewRgn() ; m_newClip = NewRgn() ; GetClip( m_formerClip ) ; - + if ( win ) { // guard against half constructed objects, this just leads to a empty clip @@ -197,13 +197,13 @@ wxMacPortSaver( (GrafPtr) GetWindowPort( (WindowRef) win->MacGetTopLevelWindowRe { int x = 0 , y = 0; win->MacWindowToRootWindow( &x, &y ) ; - + // get area including focus rect HIShapeGetAsQDRgn( ((wxWindow*)win)->MacGetVisibleRegion(true).GetWXHRGN() , m_newClip ); if ( !EmptyRgn( m_newClip ) ) OffsetRgn( m_newClip , x , y ) ; } - + SetClip( m_newClip ) ; } } @@ -486,7 +486,7 @@ void wxTextCtrl::MacSuperChangedPosition() void wxTextCtrl::MacVisibilityChanged() { - GetPeer()->VisibilityChanged( IsShownOnScreen() ) ; + GetPeer()->VisibilityChanged( GetPeer()->IsVisible() ); } void wxTextCtrl::MacCheckSpelling(bool check) @@ -1763,11 +1763,11 @@ void wxMacMLTEControl::AdjustCreationAttributes(const wxColour &background, | kTXNSupportFontCommandProcessing | kTXNSupportFontCommandUpdating; - // only spell check when not read-only + // only spell check when not read-only // use system options for the default - bool checkSpelling = false ; + bool checkSpelling = false ; if ( !(m_windowStyle & wxTE_READONLY) ) - { + { #if wxUSE_SYSTEM_OPTIONS if ( wxSystemOptions::HasOption( wxMAC_TEXTCONTROL_USE_SPELL_CHECKER ) && (wxSystemOptions::GetOptionInt( wxMAC_TEXTCONTROL_USE_SPELL_CHECKER ) == 1) ) { @@ -1775,11 +1775,11 @@ void wxMacMLTEControl::AdjustCreationAttributes(const wxColour &background, } #endif } - + if ( checkSpelling ) options |= kTXNSupportSpellCheckCommandProcessing - | kTXNSupportSpellCheckCommandUpdating; + | kTXNSupportSpellCheckCommandUpdating; TXNSetCommandEventSupport( m_txn , options ) ; } @@ -1812,11 +1812,12 @@ void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , lo TXNTab* tabs = NULL; bool relayout = false; + wxFont font ; if ( style.HasFont() ) { wxASSERT( typeAttrCount < WXSIZEOF(typeAttr) ); - const wxFont &font = style.GetFont() ; + font = style.GetFont() ; typeAttr[typeAttrCount].tag = kTXNATSUIStyle ; typeAttr[typeAttrCount].size = kTXNATSUIStyleSize ; typeAttr[typeAttrCount].data.dataPtr = font.MacGetATSUStyle() ;