X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65ec6247df6af7b6489257b1ac04ca2242dc14ec..24fcf68943d4d6baa9c0a5eec9234b33621abdd0:/src/stc/stc.cpp.in diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index 65c88c28fb..e4c51365a9 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -137,6 +137,7 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent, { m_swx = new ScintillaWX(this); m_stopWatch.Start(); + m_lastKeyDownConsumed = FALSE; } @@ -379,42 +380,39 @@ void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) { void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { long key = evt.KeyCode(); - if ((key > WXK_ESCAPE) && - (key != WXK_DELETE) && (key < 255) && - !evt.ControlDown() && !evt.AltDown()) { - + if (key <= 0xff && !iscntrl(key) && !m_lastKeyDownConsumed) { m_swx->DoAddChar(key); } - else { - evt.Skip(); - } } + void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) { long key = evt.KeyCode(); - //key = toupper(key); //**** ???? - bool consumed = FALSE; int processed = m_swx->DoKeyDown(key, evt.ShiftDown(), evt.ControlDown(), evt.AltDown(), - &consumed); - if (!processed && !consumed) + &m_lastKeyDownConsumed); + if (!processed && !m_lastKeyDownConsumed) evt.Skip(); } + void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) { m_swx->DoLoseFocus(); } + void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) { m_swx->DoGainFocus(); } + void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& evt) { m_swx->DoSysColourChange(); } + void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& evt) { // do nothing to help avoid flashing }