From bd2213c20dfa2c2a1c5d51e674ff288b0d4eedaf Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 30 Mar 2005 15:08:41 +0000 Subject: [PATCH] propagating visibility states into MLTE (otherwise it is 'stealing' events at the top window level) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/textctrl.cpp | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 32fdac4cbe..9ebcb555be 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -2108,6 +2108,27 @@ void wxMacMLTEClassicControl::MacSetObjectVisibility(Boolean vis) { SetKeyboardFocus( m_txnWindow , m_controlRef , kControlFocusNoPart ) ; } + + TXNControlTag iControlTags[] = + { + kTXNVisibilityTag , + }; + TXNControlData iControlData[] = + { + {(UInt32) false }, + }; + + int toptag = WXSIZEOF( iControlTags ) ; + + verify_noerr( TXNGetTXNObjectControls( m_txn , toptag, + iControlTags, iControlData ) ) ; + + if ( iControlData[0].uValue != vis ) + { + iControlData[0].uValue = vis ; + verify_noerr( TXNSetTXNObjectControls( m_txn, false , toptag, + iControlTags, iControlData )) ; + } // we right now are always clipping as partial visibility (overlapped) visibility // is also a problem, if we run into further problems we might set the FrameBounds to an empty // rect here @@ -2321,7 +2342,7 @@ wxInt16 wxMacMLTEClassicControl::MacControlUserPaneKeyDownProc (wxInt16 keyCode, ev.modifiers = modifiers ; ev.message = (( keyCode << 8 ) & keyCodeMask ) + ( charCode & charCodeMask ) ; TXNKeyDown( m_txn , &ev); - + return kControlEntireControl; } @@ -2388,10 +2409,10 @@ wxMacMLTEClassicControl::wxMacMLTEClassicControl( wxTextCtrl *wxPeer, DoCreate(); - MacSetObjectVisibility( wxPeer->MacIsReallyShown() ) ; - AdjustCreationAttributes( *wxWHITE , true) ; + MacSetObjectVisibility( wxPeer->MacIsReallyShown() ) ; + wxMacWindowClipper clipper( m_peer ) ; SetTXNData( st , kTXNStartOffset, kTXNEndOffset ) ; TXNSetSelection( m_txn, 0, 0);