X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/acbd13a365fe2bd7ed6bafd19dc26775a256d499..26ac40202f84fd07c9f24885b4d36b34b9468f4d:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index dcf18535fb..558855f000 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -95,7 +95,6 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { - m_fileName = ""; SetName(name); SetValidator(validator); if (parent) parent->AddChild(this); @@ -312,7 +311,7 @@ void wxTextCtrl::SetValue(const wxString& value) SetWindowText((HWND) GetHWND(), (const char *)value); } -void wxTextCtrl::SetSize(int x, int y, int width, int height, int sizeFlags) +void wxTextCtrl::DoSetSize(int x, int y, int width, int height, int sizeFlags) { int currentX, currentY; GetPosition(¤tX, ¤tY); @@ -709,11 +708,6 @@ void wxTextCtrl::ShowPosition(long pos) int linesToScroll = specifiedLineLineNo - currentLineLineNo; -/* - wxDebugMsg("Caret line: %d; Current visible line: %d; Specified line: %d; lines to scroll: %d\n", - currentLineLineNo1, currentLineLineNo, specifiedLineLineNo, linesToScroll); -*/ - if (linesToScroll != 0) (void)SendMessage(hWnd, EM_LINESCROLL, (WPARAM)0, (LPARAM)MAKELPARAM(linesToScroll, 0)); } @@ -961,6 +955,8 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) { switch( event.KeyCode() ) { + // VZ: commented out until somebody explains to me what it does +#if 0 // Fix by Marcel Rasche to allow Alt-Ctrl insertion of special characters case '{': case '}': @@ -971,14 +967,14 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) case '\\': { char c = (char)event.KeyCode(); - *this << c; + WriteText(c); } break; +#endif // 0 case WXK_RETURN: - wxASSERT_MSG( m_windowStyle & wxTE_PROCESS_ENTER, - "this text ctrl should never receive return" ); - if ( m_windowStyle & wxTE_MULTILINE == 0 ) + { + if ( (m_windowStyle & wxTE_MULTILINE) == 0 ) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); event.SetEventObject( this ); @@ -988,6 +984,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) //else: multiline controls need Enter for themselves break; + } case WXK_TAB: // only produce navigation event if we don't process TAB ourself or @@ -1006,12 +1003,17 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) if ( GetEventHandler()->ProcessEvent(eventNav) ) return; } + break; + + default: + event.Skip(); } // don't just call event.Skip() because this will cause TABs and ENTERs // be passed upwards and we don't always want this - instead process it // right here Default(); +// event.Skip(); } long wxTextCtrl::MSWGetDlgCode()