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
This commit is contained in:
Stefan Csomor
2004-03-29 11:33:16 +00:00
parent 01299d5694
commit f009156727

View File

@@ -168,7 +168,8 @@ OSStatus MLTESetObjectVisibility( STPTextPaneVars *varsp, Boolean vis , long wxS
TXNControlData iControlData[1] = {{ vis }}; TXNControlData iControlData[1] = {{ vis }};
err = ::TXNSetTXNObjectControls( varsp->fTXNRec, false, 1, iControlTags, iControlData ); err = ::TXNSetTXNObjectControls( varsp->fTXNRec, false, 1, iControlTags, iControlData );
#endif #endif
if ( vis ) wxTextCtrl* textctrl = (wxTextCtrl*) GetControlReference(varsp->fUserPaneRec);
if ( vis && textctrl )
{ {
Rect bounds ; Rect bounds ;
UMAGetControlBoundsInWindowCoords( varsp->fUserPaneRec, &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 // we only recalculate when visible, otherwise scrollbars get drawn at incorrect places
if ( varsp->fVisible ) 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); varsp->fRTextArea.bottom, varsp->fRTextArea.right, varsp->fTXNFrame);
} }
InvalWindowRect( GetControlOwner( theControl ) , &oldBounds ) ; InvalWindowRect( GetControlOwner( theControl ) , &oldBounds ) ;
@@ -736,6 +737,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
wxString st = str ; wxString st = str ;
wxMacConvertNewlines13To10( &st ) ; wxMacConvertNewlines13To10( &st ) ;
#if 1
{ {
short featurSet; short featurSet;
@@ -784,6 +786,11 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
{ {
SetEditable( false ) ; SetEditable( false ) ;
} }
#else
wxMacCFStringHolder cf ;
CreateEditUnicodeTextControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds , cf , style & wxTE_PASSWORD , NULL , (ControlRef*) &m_macControl ) ;
#endif
return TRUE; return TRUE;
} }