/////////////////////////////////////////////////////////////////////////////
-// Name: textctrl.cpp
+// Name: src/mac/classic/textctrl.cpp
// Purpose: wxTextCtrl
// Author: Stefan Csomor
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "textctrl.h"
-#endif
+#include "wx/wxprec.h"
-#include "wx/defs.h"
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
#if wxUSE_TEXTCTRL
::SetControlData((ControlHandle) m_macControl , 0, kControlEditTextSelectionTag , sizeof( selection ) , (char*) &selection ) ;
TESetSelect( from , to , ((TEHandle) m_macTE) ) ;
TEDelete( ((TEHandle) m_macTE) ) ;
- TEInsert( value , value.Length() , ((TEHandle) m_macTE) ) ;
+ TEInsert( value , value.length() , ((TEHandle) m_macTE) ) ;
}
else
{
wxString content = GetValue() ;
int count = 1;
- for (size_t i = 0; i < content.Length() ; i++)
+ for (size_t i = 0; i < content.length() ; i++)
{
if (content[i] == '\r') count++;
}
// Find line first
int count = 0;
- for (size_t i = 0; i < content.Length() ; i++)
+ for (size_t i = 0; i < content.length() ; i++)
{
if (count == lineNo)
{
// Count chars in line then
count = 0;
- for (size_t j = i; j < content.Length(); j++)
+ for (size_t j = i; j < content.length(); j++)
{
count++;
if (content[j] == '\n') return count;
// Find line first
int count = 0;
- for (size_t i = 0; i < content.Length() ; i++)
+ for (size_t i = 0; i < content.length() ; i++)
{
if (count == lineNo)
{
// Add chars in line then
wxString tmp;
- for (size_t j = i; j < content.Length(); j++)
+ for (size_t j = i; j < content.length(); j++)
{
if (content[j] == '\n')
return tmp;
}
if ( !IsEditable() && key != WXK_LEFT && key != WXK_RIGHT && key != WXK_DOWN && key != WXK_UP && key != WXK_TAB &&
- !( key == WXK_RETURN && ( (m_windowStyle & wxPROCESS_ENTER) || (m_windowStyle & wxTE_MULTILINE) ) )
-/* && key != WXK_PRIOR && key != WXK_NEXT && key != WXK_HOME && key != WXK_END */
+ !( key == WXK_RETURN && ( (m_windowStyle & wxTE_PROCESS_ENTER) || (m_windowStyle & wxTE_MULTILINE) ) )
+/* && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END */
)
{
// eat it
switch ( key )
{
case WXK_RETURN:
- if (m_windowStyle & wxPROCESS_ENTER)
+ if (m_windowStyle & wxTE_PROCESS_ENTER)
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject( this );