Copied/merged from the 2.2 branch.

Changes needed to build with new event system


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-02-16 08:40:24 +00:00
parent 1b62f00d8e
commit ce1ecc6d48
6 changed files with 150 additions and 108 deletions

View File

@@ -1539,16 +1539,38 @@ void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
m_swx->DoContextMenu(Point(pt.x, pt.y));
}
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
long key = evt.KeyCode();
if ((key > WXK_ESCAPE) &&
(key != WXK_DELETE) && (key < 255) &&
!evt.ControlDown() && !evt.AltDown()) {
switch (key) {
// Special handling for charcters that must be typed with AltGr down on
// foreign keyboards. (Comes to us as Ctrl+Alt, and so would get
// filtered out by the default case below.)
//
// There should be a better way to do this...
//
case '\\':
case '|':
case '@':
case '#':
case '<EFBFBD>':
case '[':
case ']':
case '{':
case '}':
case '?':
m_swx->DoAddChar(key);
break;
m_swx->DoAddChar(key);
}
else {
evt.Skip();
default:
if ((key > WXK_ESCAPE) && (key != WXK_DELETE) && (key < 255) &&
!evt.ControlDown() && !evt.AltDown()) {
m_swx->DoAddChar(key);
}
else {
evt.Skip();
}
}
}
@@ -1561,6 +1583,7 @@ void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
evt.Skip();
}
void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) {
m_swx->DoLoseFocus();
}