From: Stefan Csomor Date: Mon, 29 Mar 2004 11:33:16 +0000 (+0000) Subject: started for unicode text control, in case we will not be able to get the MLTE EchoMod... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f009156727ddfbca08197b63d0fbee00df4078f5?ds=inline started for unicode text control, in case we will not be able to get the MLTE EchoMode working git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 211e778cba..2f80c04e00 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -168,7 +168,8 @@ OSStatus MLTESetObjectVisibility( STPTextPaneVars *varsp, Boolean vis , long wxS TXNControlData iControlData[1] = {{ vis }}; err = ::TXNSetTXNObjectControls( varsp->fTXNRec, false, 1, iControlTags, iControlData ); #endif - if ( vis ) + wxTextCtrl* textctrl = (wxTextCtrl*) GetControlReference(varsp->fUserPaneRec); + if ( vis && textctrl ) { Rect bounds ; UMAGetControlBoundsInWindowCoords( varsp->fUserPaneRec, &bounds); @@ -204,7 +205,7 @@ static void TPUpdateVisibility(ControlRef theControl) { // we only recalculate when visible, otherwise scrollbars get drawn at incorrect places if ( varsp->fVisible ) { - TXNSetFrameBounds( varsp->fTXNRec, varsp->fRTextArea.top, varsp->fRTextArea.left, + TXNSetFrameBounds( varsp->fTXNRec, varsp->fRTextArea.top, varsp->fRTextArea.left, varsp->fRTextArea.bottom, varsp->fRTextArea.right, varsp->fTXNFrame); } InvalWindowRect( GetControlOwner( theControl ) , &oldBounds ) ; @@ -557,7 +558,7 @@ OSStatus mUPOpenControl(STPTextPaneVars* &handle, ControlRef theControl, long wx SetControlData(theControl, kControlEntireControl, kControlUserPaneKeyDownProcTag, sizeof(gTPKeyProc), &gTPKeyProc); SetControlData(theControl, kControlEntireControl, kControlUserPaneActivateProcTag, sizeof(gTPActivateProc), &gTPActivateProc); SetControlData(theControl, kControlEntireControl, kControlUserPaneFocusProcTag, sizeof(gTPFocusProc), &gTPFocusProc); - + /* calculate the rectangles used by the control */ UMAGetControlBoundsInWindowCoords(theControl, &bounds); varsp->fRTextOutlineRegion = NewRgn() ; @@ -736,6 +737,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, wxString st = str ; wxMacConvertNewlines13To10( &st ) ; +#if 1 { short featurSet; @@ -784,6 +786,11 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, { SetEditable( false ) ; } +#else + wxMacCFStringHolder cf ; + CreateEditUnicodeTextControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds , cf , style & wxTE_PASSWORD , NULL , (ControlRef*) &m_macControl ) ; +#endif + return TRUE; }