#include <fstream.h>
#include "wx/app.h"
+#include "wx/dc.h"
#include "wx/button.h"
#include "wx/panel.h"
#include "wx/textctrl.h"
MacPreControlCreate( parent , id , "" , pos , mySize ,style, validator , name , &bounds , title ) ;
+ if ( m_windowStyle & wxTE_MULTILINE )
+ {
+ wxASSERT_MSG( !(m_windowStyle & wxTE_PROCESS_ENTER),
+ wxT("wxTE_PROCESS_ENTER style is ignored for multiline text controls (they always process it)") );
+
+ m_windowStyle |= wxTE_PROCESS_ENTER;
+ }
+
+
m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , "\p" , true , 0 , 0 , 1,
( style & wxTE_PASSWORD ) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ;
MacPostControlCreate() ;
UMADrawControl( m_macControl ) ;
UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
- wxDC::MacInvalidateSetup() ;
}
}
}
UMADrawControl( m_macControl ) ;
UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
- wxDC::MacInvalidateSetup() ;
}
}
}
TESetSelect( from , to , teH ) ;
TEDelete( teH ) ;
TEInsert( value , value.Length() , teH ) ;
-// MacInvalidateControl() ;
+ Refresh() ;
}
void wxTextCtrl::Remove(long from, long to)
UMASetControlData( m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
UMAGetControlData( m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*) &teH , &size ) ;
TEDelete( teH ) ;
-// MacInvalidateControl() ;
+ Refresh() ;
}
void wxTextCtrl::SetSelection(long from, long to)
keychar = short(ev->message & charCodeMask);
keycode = short(ev->message & keyCodeMask) >> 8 ;
UMAHandleControlKey( m_macControl , keycode , keychar , ev->modifiers ) ;
- if ( keychar >= 0x20 || event.KeyCode() == WXK_RETURN)
+ if ( keychar >= 0x20 || event.KeyCode() == WXK_RETURN || event.KeyCode() == WXK_DELETE || event.KeyCode() == WXK_BACK)
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
event.SetString( GetValue() ) ;