Make wxPASSWORD and wxPROCESS_ENTER really deprecated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-03-28 11:02:37 +00:00
parent 39987096b3
commit 8e13c1ec4e
13 changed files with 56 additions and 53 deletions

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: proplist.cpp // Name: contrib/src/deprecated/proplist.cpp
// Purpose: Property list classes // Purpose: Property list classes
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@@ -219,7 +219,7 @@ wxString wxPropertyListView::MakeNameValueString(wxString name, wxString value)
wxString theString(name); wxString theString(name);
int nameWidth = 25; int nameWidth = 25;
int padWith = nameWidth - theString.Length(); int padWith = nameWidth - theString.length();
if (padWith < 0) if (padWith < 0)
padWith = 0; padWith = 0;
@@ -461,7 +461,7 @@ bool wxPropertyListView::CreateControls()
} }
m_valueText = new wxPropertyTextEdit(this, panel, wxID_PROP_TEXT, wxEmptyString, m_valueText = new wxPropertyTextEdit(this, panel, wxID_PROP_TEXT, wxEmptyString,
wxDefaultPosition, wxSize(wxDefaultCoord, smallButtonSize.y), wxPROCESS_ENTER); wxDefaultPosition, wxSize(wxDefaultCoord, smallButtonSize.y), wxTE_PROCESS_ENTER);
m_valueText->Disable(); m_valueText->Disable();
topsizer->Add( m_valueText, 1, wxALL | wxEXPAND, buttonborder ); topsizer->Add( m_valueText, 1, wxALL | wxEXPAND, buttonborder );
@@ -1660,7 +1660,7 @@ bool wxListOfStringsListValidator::EditStringList(wxWindow *parent, wxStringList
dialog->m_stringText = new wxPropertyStringListEditorText(dialog, dialog->m_stringText = new wxPropertyStringListEditorText(dialog,
wxID_PROP_SL_TEXT, wxEmptyString, wxPoint(5, 240), wxID_PROP_SL_TEXT, wxEmptyString, wxPoint(5, 240),
wxSize(300, wxDefaultCoord), wxPROCESS_ENTER); wxSize(300, wxDefaultCoord), wxTE_PROCESS_ENTER);
dialog->m_stringText->Disable(); dialog->m_stringText->Disable();
wxButton *addButton = new wxButton(dialog, wxID_PROP_SL_ADD, wxT("Add"), wxDefaultPosition, wxSize(largeButtonWidth, largeButtonHeight)); wxButton *addButton = new wxButton(dialog, wxID_PROP_SL_ADD, wxT("Add"), wxDefaultPosition, wxSize(largeButtonWidth, largeButtonHeight));

View File

@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: resource.cpp // Name: contrib/src/deprecated/resource.cpp
// Purpose: Resource system // Purpose: Resource system
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: 04/01/98 // Created: 04/01/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
@@ -2107,8 +2107,10 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
{ wxT("wxGA_VERTICAL"), wxGA_VERTICAL }, { wxT("wxGA_VERTICAL"), wxGA_VERTICAL },
/* wxTextCtrl */ /* wxTextCtrl */
{ wxT("wxPASSWORD"), wxPASSWORD}, #if WXWIN_COMPATIBILITY_2_6
{ wxT("wxPROCESS_ENTER"), wxPROCESS_ENTER}, { wxT("wxPASSWORD"), wxTE_PASSWORD},
{ wxT("wxPROCESS_ENTER"), wxTE_PROCESS_ENTER},
#endif
{ wxT("wxTE_PASSWORD"), wxTE_PASSWORD}, { wxT("wxTE_PASSWORD"), wxTE_PASSWORD},
{ wxT("wxTE_READONLY"), wxTE_READONLY}, { wxT("wxTE_READONLY"), wxTE_READONLY},
{ wxT("wxTE_PROCESS_ENTER"), wxTE_PROCESS_ENTER}, { wxT("wxTE_PROCESS_ENTER"), wxTE_PROCESS_ENTER},
@@ -3275,4 +3277,3 @@ wxControl *wxCreateItem(wxWindow* thisWindow, const wxItemResource *resource, co
#endif // VC++ #endif // VC++
#endif // wxUSE_WX_RESOURCES #endif // wxUSE_WX_RESOURCES

View File

@@ -1034,7 +1034,7 @@ inline void *wxUIntToPtr(wxUIntPtr p)
#define wxHAS_INT64 1 #define wxHAS_INT64 1
#else // !wxUSE_LONGLONG #else /* !wxUSE_LONGLONG */
#define wxHAS_INT64 0 #define wxHAS_INT64 0
@@ -1526,9 +1526,11 @@ enum wxBorder
/* always show an entire number of rows */ /* always show an entire number of rows */
#define wxLB_INT_HEIGHT 0x0800 #define wxLB_INT_HEIGHT 0x0800
/* deprecated synonyms */ #if WXWIN_COMPATIBILITY_2_6
#define wxPROCESS_ENTER 0x0400 /* wxTE_PROCESS_ENTER */ /* deprecated synonyms */
#define wxPASSWORD 0x0800 /* wxTE_PASSWORD */ #define wxPROCESS_ENTER 0x0400 /* wxTE_PROCESS_ENTER */
#define wxPASSWORD 0x0800 /* wxTE_PASSWORD */
#endif
/* /*
* wxComboBox style flags * wxComboBox style flags

View File

@@ -787,7 +787,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
m_combo = new MyComboBox( panel, ID_COMBO, _T("This"), m_combo = new MyComboBox( panel, ID_COMBO, _T("This"),
wxPoint(20,25), wxSize(120, wxDefaultCoord), wxPoint(20,25), wxSize(120, wxDefaultCoord),
5, choices, 5, choices,
wxPROCESS_ENTER); wxTE_PROCESS_ENTER);
(void)new wxButton( panel, ID_COMBO_SEL_NUM, _T("Select #&2"), wxPoint(180,30), wxSize(140,30) ); (void)new wxButton( panel, ID_COMBO_SEL_NUM, _T("Select #&2"), wxPoint(180,30), wxSize(140,30) );
(void)new wxButton( panel, ID_COMBO_SEL_STR, _T("&Select 'This'"), wxPoint(340,30), wxSize(140,30) ); (void)new wxButton( panel, ID_COMBO_SEL_STR, _T("&Select 'This'"), wxPoint(340,30), wxSize(140,30) );

View File

@@ -1122,7 +1122,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent,
mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 ); mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 );
wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL );
m_text = new wxTextCtrl( this, ID_TEXT, m_fileName, wxDefaultPosition, wxDefaultSize, wxPROCESS_ENTER ); m_text = new wxTextCtrl( this, ID_TEXT, m_fileName, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
textsizer->Add( m_text, 1, wxCENTER | wxALL, 5 ); textsizer->Add( m_text, 1, wxCENTER | wxALL, 5 );
mainsizer->Add( textsizer, 0, wxEXPAND ); mainsizer->Add( textsizer, 0, wxEXPAND );
@@ -1145,7 +1145,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent,
mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 ); mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 );
wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL );
m_text = new wxTextCtrl( this, ID_TEXT, m_fileName, wxDefaultPosition, wxDefaultSize, wxPROCESS_ENTER ); m_text = new wxTextCtrl( this, ID_TEXT, m_fileName, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
textsizer->Add( m_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 ); textsizer->Add( m_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
textsizer->Add( new wxButton( this, wxID_OK ), 0, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 ); textsizer->Add( new wxButton( this, wxID_OK ), 0, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
mainsizer->Add( textsizer, 0, wxEXPAND ); mainsizer->Add( textsizer, 0, wxEXPAND );

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: spinbutt.cpp // Name: src/gtk/spinbutt.cpp
// Purpose: wxSpinCtrl // Purpose: wxSpinCtrl
// Author: Robert // Author: Robert
// Modified by: // Modified by:
@@ -98,14 +98,14 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
int min, int max, int initial, int min, int max, int initial,
const wxString& name) const wxString& name)
{ {
m_needParent = TRUE; m_needParent = true;
m_acceptsFocus = TRUE; m_acceptsFocus = true;
if (!PreCreation( parent, pos, size ) || if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{ {
wxFAIL_MSG( wxT("wxSpinCtrl creation failed") ); wxFAIL_MSG( wxT("wxSpinCtrl creation failed") );
return FALSE; return false;
} }
m_oldPos = initial; m_oldPos = initial;
@@ -125,7 +125,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
SetValue( value ); SetValue( value );
return TRUE; return true;
} }
void wxSpinCtrl::GtkDisableEvents() void wxSpinCtrl::GtkDisableEvents()
@@ -267,7 +267,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
} }
} }
if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER)) if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxTE_PROCESS_ENTER))
{ {
wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId ); wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId );
evt.SetEventObject(this); evt.SetEventObject(this);
@@ -282,11 +282,11 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
bool wxSpinCtrl::IsOwnGtkWindow( GdkWindow *window ) bool wxSpinCtrl::IsOwnGtkWindow( GdkWindow *window )
{ {
if (GTK_SPIN_BUTTON(m_widget)->entry.text_area == window) return TRUE; if (GTK_SPIN_BUTTON(m_widget)->entry.text_area == window) return true;
if (GTK_SPIN_BUTTON(m_widget)->panel == window) return TRUE; if (GTK_SPIN_BUTTON(m_widget)->panel == window) return true;
return FALSE; return false;
} }
wxSize wxSpinCtrl::DoGetBestSize() const wxSize wxSpinCtrl::DoGetBestSize() const

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: textctrl.cpp // Name: src/gtk/textctrl.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -954,7 +954,7 @@ int wxTextCtrl::GetLineLength(long lineNo) const
else else
{ {
wxString str = GetLineText (lineNo); wxString str = GetLineText (lineNo);
return (int) str.Length(); return (int) str.length();
} }
} }
@@ -975,7 +975,7 @@ int wxTextCtrl::GetNumberOfLines() const
// If the last character in the text buffer is a newline, // If the last character in the text buffer is a newline,
// gtk_text_view_forward_display_line() will return false without that // gtk_text_view_forward_display_line() will return false without that
// line being counted. Must add one manually in that case. // line being counted. Must add one manually in that case.
GtkTextIter lastCharIter; GtkTextIter lastCharIter;
gtk_text_buffer_get_iter_at_offset gtk_text_buffer_get_iter_at_offset
( (
m_buffer, m_buffer,
@@ -1152,7 +1152,7 @@ void wxTextCtrl::SetSelection( long from, long to )
if (from == -1 && to == -1) if (from == -1 && to == -1)
{ {
from = 0; from = 0;
to = GetValue().Length(); to = GetValue().length();
} }
if (m_windowStyle & wxTE_MULTILINE) if (m_windowStyle & wxTE_MULTILINE)
@@ -1412,7 +1412,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event )
{ {
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") ); wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
if ((key_event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER)) if ((key_event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxTE_PROCESS_ENTER))
{ {
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject(this); event.SetEventObject(this);

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: spinbutt.cpp // Name: src/gtk1/spinbutt.cpp
// Purpose: wxSpinCtrl // Purpose: wxSpinCtrl
// Author: Robert // Author: Robert
// Modified by: // Modified by:
@@ -101,14 +101,14 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
int min, int max, int initial, int min, int max, int initial,
const wxString& name) const wxString& name)
{ {
m_needParent = TRUE; m_needParent = true;
m_acceptsFocus = TRUE; m_acceptsFocus = true;
if (!PreCreation( parent, pos, size ) || if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{ {
wxFAIL_MSG( wxT("wxSpinCtrl creation failed") ); wxFAIL_MSG( wxT("wxSpinCtrl creation failed") );
return FALSE; return false;
} }
m_oldPos = initial; m_oldPos = initial;
@@ -128,7 +128,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
SetValue( value ); SetValue( value );
return TRUE; return true;
} }
void wxSpinCtrl::GtkDisableEvents() void wxSpinCtrl::GtkDisableEvents()
@@ -274,7 +274,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
} }
} }
if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER)) if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxTE_PROCESS_ENTER))
{ {
wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId ); wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId );
evt.SetEventObject(this); evt.SetEventObject(this);
@@ -289,11 +289,11 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
bool wxSpinCtrl::IsOwnGtkWindow( GdkWindow *window ) bool wxSpinCtrl::IsOwnGtkWindow( GdkWindow *window )
{ {
if (GTK_SPIN_BUTTON(m_widget)->entry.text_area == window) return TRUE; if (GTK_SPIN_BUTTON(m_widget)->entry.text_area == window) return true;
if (GTK_SPIN_BUTTON(m_widget)->panel == window) return TRUE; if (GTK_SPIN_BUTTON(m_widget)->panel == window) return true;
return FALSE; return false;
} }
wxSize wxSpinCtrl::DoGetBestSize() const wxSize wxSpinCtrl::DoGetBestSize() const

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: textctrl.cpp // Name: src/gtk1/textctrl.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -325,7 +325,7 @@ bool wxTextCtrl::Create( wxWindow *parent,
wxWX2MBbuf val = value.mbc_str(); wxWX2MBbuf val = value.mbc_str();
gtk_editable_insert_text( GTK_EDITABLE(m_text), val, strlen(val), &tmp ); gtk_editable_insert_text( GTK_EDITABLE(m_text), val, strlen(val), &tmp );
#else #else
gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &tmp ); gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.length(), &tmp );
#endif #endif
if (multi_line) if (multi_line)
@@ -418,7 +418,7 @@ void wxTextCtrl::SetValue( const wxString &value )
gint len = gtk_text_get_length( GTK_TEXT(m_text) ); gint len = gtk_text_get_length( GTK_TEXT(m_text) );
gtk_editable_delete_text( GTK_EDITABLE(m_text), 0, len ); gtk_editable_delete_text( GTK_EDITABLE(m_text), 0, len );
len = 0; len = 0;
gtk_editable_insert_text( GTK_EDITABLE(m_text), value.mbc_str(), value.Length(), &len ); gtk_editable_insert_text( GTK_EDITABLE(m_text), value.mbc_str(), value.length(), &len );
} }
else else
{ {
@@ -587,7 +587,7 @@ long wxTextCtrl::XYToPosition(long x, long y ) const
int wxTextCtrl::GetLineLength(long lineNo) const int wxTextCtrl::GetLineLength(long lineNo) const
{ {
wxString str = GetLineText (lineNo); wxString str = GetLineText (lineNo);
return (int) str.Length(); return (int) str.length();
} }
int wxTextCtrl::GetNumberOfLines() const int wxTextCtrl::GetNumberOfLines() const
@@ -794,7 +794,7 @@ void wxTextCtrl::SetSelection( long from, long to )
if (from == -1 && to == -1) if (from == -1 && to == -1)
{ {
from = 0; from = 0;
to = GetValue().Length(); to = GetValue().length();
} }
if ( (m_windowStyle & wxTE_MULTILINE) && if ( (m_windowStyle & wxTE_MULTILINE) &&
@@ -873,7 +873,7 @@ void wxTextCtrl::Replace( long from, long to, const wxString &value )
wxWX2MBbuf buf = value.mbc_str(); wxWX2MBbuf buf = value.mbc_str();
gtk_editable_insert_text( GTK_EDITABLE(m_text), buf, strlen(buf), &pos ); gtk_editable_insert_text( GTK_EDITABLE(m_text), buf, strlen(buf), &pos );
#else #else
gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &pos ); gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.length(), &pos );
#endif // wxUSE_UNICODE #endif // wxUSE_UNICODE
} }
} }
@@ -978,7 +978,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event )
{ {
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") ); wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
if ((key_event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER)) if ((key_event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxTE_PROCESS_ENTER))
{ {
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject(this); event.SetEventObject(this);

View File

@@ -885,7 +885,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
} }
if ( !IsEditable() && key != WXK_LEFT && key != WXK_RIGHT && key != WXK_DOWN && key != WXK_UP && key != WXK_TAB && 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_RETURN && ( (m_windowStyle & wxTE_PROCESS_ENTER) || (m_windowStyle & wxTE_MULTILINE) ) )
// && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END // && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END
) )
{ {
@@ -897,7 +897,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
// allow navigation and deletion // allow navigation and deletion
if ( !IsMultiLine() && m_maxLength && GetValue().length() >= m_maxLength && if ( !IsMultiLine() && m_maxLength && GetValue().length() >= m_maxLength &&
key != WXK_LEFT && key != WXK_RIGHT && key != WXK_TAB && key != WXK_LEFT && key != WXK_RIGHT && key != WXK_TAB &&
key != WXK_BACK && !( key == WXK_RETURN && (m_windowStyle & wxPROCESS_ENTER) ) key != WXK_BACK && !( key == WXK_RETURN && (m_windowStyle & wxTE_PROCESS_ENTER) )
) )
{ {
// eat it, we don't want to add more than allowed # of characters // eat it, we don't want to add more than allowed # of characters
@@ -928,7 +928,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
switch ( key ) switch ( key )
{ {
case WXK_RETURN: case WXK_RETURN:
if (m_windowStyle & wxPROCESS_ENTER) if (m_windowStyle & wxTE_PROCESS_ENTER)
{ {
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject( this ); event.SetEventObject( this );

View File

@@ -1579,7 +1579,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
} }
if ( !IsEditable() && key != WXK_LEFT && key != WXK_RIGHT && key != WXK_DOWN && key != WXK_UP && key != WXK_TAB && 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_RETURN && ( (m_windowStyle & wxTE_PROCESS_ENTER) || (m_windowStyle & wxTE_MULTILINE) ) )
/* && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END */ /* && key != WXK_PAGEUP && key != WXK_PAGEDOWN && key != WXK_HOME && key != WXK_END */
) )
{ {
@@ -1605,7 +1605,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
switch ( key ) switch ( key )
{ {
case WXK_RETURN: case WXK_RETURN:
if (m_windowStyle & wxPROCESS_ENTER) if (m_windowStyle & wxTE_PROCESS_ENTER)
{ {
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject( this ); event.SetEventObject( this );

View File

@@ -199,7 +199,7 @@ LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd,
{ {
wxCHECK_MSG( win, 0, _T("should have a parent") ); wxCHECK_MSG( win, 0, _T("should have a parent") );
if ( win->GetWindowStyle() & wxPROCESS_ENTER ) if ( win->GetWindowStyle() & wxTE_PROCESS_ENTER )
{ {
// need to return a custom dlg code or we'll never get it // need to return a custom dlg code or we'll never get it
return DLGC_WANTMESSAGE; return DLGC_WANTMESSAGE;

View File

@@ -1887,7 +1887,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &event )
} }
case WXK_RETURN: case WXK_RETURN:
{ {
if (m_windowStyle & wxPROCESS_ENTER) if (m_windowStyle & wxTE_PROCESS_ENTER)
{ {
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
event.SetEventObject(this); event.SetEventObject(this);