X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f1ae4143271ae63a17e052a1a471d16e9cd8c44..cb2713bfa8fc9b8864eb2c0cebde8df2a7654444:/src/mac/textctrl.cpp diff --git a/src/mac/textctrl.cpp b/src/mac/textctrl.cpp index af3919bb7b..811f5d86f4 100644 --- a/src/mac/textctrl.cpp +++ b/src/mac/textctrl.cpp @@ -13,27 +13,26 @@ #pragma implementation "textctrl.h" #endif -#ifndef __WXMAC__ -#include -#include +#ifdef __UNIX__ + #include + #include #else -#include + #include #endif #include +#include "wx/app.h" +#include "wx/button.h" +#include "wx/panel.h" #include "wx/textctrl.h" #include "wx/settings.h" #include "wx/filefn.h" #include "wx/utils.h" #if defined(__BORLANDC__) && !defined(__WIN32__) -#include -#else -#ifndef __MWERKS__ -#ifndef __GNUWIN32__ -#include -#endif -#endif + #include +#elif !defined(__MWERKS__) && !defined(__GNUWIN32) && !defined(__WXMAC_X__) + #include #endif #include "wx/mac/uma.h" @@ -111,6 +110,14 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, wxString value ; + { + TEHandle teH ; + long size ; + + UMAGetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ; + (*teH)->lineHeight = -1 ; + } + if( wxApp::s_macDefaultEncodingIsPC ) value = wxMacMakeMacStringFromPC( st ) ; else @@ -152,8 +159,7 @@ void wxTextCtrl::SetValue(const wxString& st) else value = st ; UMASetControlData( m_macControl, 0, ( m_windowStyle & wxTE_PASSWORD ) ? kControlEditTextPasswordTag : kControlEditTextTextTag , value.Length() , (char*) ((const char*)value) ) ; - Refresh() ; -// MacInvalidateControl() ; + UMADrawControl( m_macControl ) ; } // Clipboard operations @@ -208,7 +214,7 @@ void wxTextCtrl::Paste() UMAGetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ; TEFromScrap() ; TEPaste( teH ) ; -// MacInvalidateControl() ; + UMADrawControl( m_macControl ) ; } }