X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8de28db94f9d03acfcbbbac841c26a2c40223618..2beb01db001c9c22e4865fba3ba9b46ff5fc2dda:/contrib/src/stc/stc.cpp diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index ba9cf82838..711ff34390 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -137,6 +137,7 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent, { m_swx = new ScintillaWX(this); m_stopWatch.Start(); + m_lastKeyDownConsumed = FALSE; } @@ -1833,42 +1834,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 }