Another blind attempt to fix AltGr issues in wxSTC, and a context menu
fix for wxGTK. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
58fd8ab910
commit
ddf2da08b5
@ -1615,6 +1615,7 @@ private:
|
||||
void OnMouseLeftDown(wxMouseEvent& evt);
|
||||
void OnMouseMove(wxMouseEvent& evt);
|
||||
void OnMouseLeftUp(wxMouseEvent& evt);
|
||||
void OnMouseRightUp(wxMouseEvent& evt);
|
||||
void OnContextMenu(wxContextMenuEvent& evt);
|
||||
void OnMouseWheel(wxMouseEvent& evt);
|
||||
void OnChar(wxKeyEvent& evt);
|
||||
|
@ -112,7 +112,11 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
||||
#endif
|
||||
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
|
||||
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
|
||||
#ifdef __WXGTK__
|
||||
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
|
||||
#else
|
||||
EVT_CONTEXT_MENU (wxStyledTextCtrl::OnContextMenu)
|
||||
#endif
|
||||
EVT_MOUSEWHEEL (wxStyledTextCtrl::OnMouseWheel)
|
||||
EVT_CHAR (wxStyledTextCtrl::OnChar)
|
||||
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
|
||||
@ -1837,6 +1841,12 @@ void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) {
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
m_swx->DoContextMenu(Point(pt.x, pt.y));
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
ScreenToClient(&pt.x, &pt.y);
|
||||
@ -1869,7 +1879,7 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
||||
bool alt = evt.AltDown();
|
||||
bool skip = ((ctrl || alt) && ! (ctrl && alt));
|
||||
|
||||
if (key <= 0xff && !iscntrl(key) && !m_lastKeyDownConsumed && !skip) {
|
||||
if (key <= 0xff && key >= 32 && !m_lastKeyDownConsumed && !skip) {
|
||||
m_swx->DoAddChar(key);
|
||||
return;
|
||||
}
|
||||
|
@ -112,7 +112,11 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
||||
#endif
|
||||
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
|
||||
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
|
||||
#ifdef __WXGTK__
|
||||
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
|
||||
#else
|
||||
EVT_CONTEXT_MENU (wxStyledTextCtrl::OnContextMenu)
|
||||
#endif
|
||||
EVT_MOUSEWHEEL (wxStyledTextCtrl::OnMouseWheel)
|
||||
EVT_CHAR (wxStyledTextCtrl::OnChar)
|
||||
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
|
||||
@ -381,6 +385,12 @@ void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) {
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
m_swx->DoContextMenu(Point(pt.x, pt.y));
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
ScreenToClient(&pt.x, &pt.y);
|
||||
@ -413,7 +423,7 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
||||
bool alt = evt.AltDown();
|
||||
bool skip = ((ctrl || alt) && ! (ctrl && alt));
|
||||
|
||||
if (key <= 0xff && !iscntrl(key) && !m_lastKeyDownConsumed && !skip) {
|
||||
if (key <= 0xff && key >= 32 && !m_lastKeyDownConsumed && !skip) {
|
||||
m_swx->DoAddChar(key);
|
||||
return;
|
||||
}
|
||||
|
@ -169,6 +169,7 @@ private:
|
||||
void OnMouseLeftDown(wxMouseEvent& evt);
|
||||
void OnMouseMove(wxMouseEvent& evt);
|
||||
void OnMouseLeftUp(wxMouseEvent& evt);
|
||||
void OnMouseRightUp(wxMouseEvent& evt);
|
||||
void OnContextMenu(wxContextMenuEvent& evt);
|
||||
void OnMouseWheel(wxMouseEvent& evt);
|
||||
void OnChar(wxKeyEvent& evt);
|
||||
|
@ -1615,6 +1615,7 @@ private:
|
||||
void OnMouseLeftDown(wxMouseEvent& evt);
|
||||
void OnMouseMove(wxMouseEvent& evt);
|
||||
void OnMouseLeftUp(wxMouseEvent& evt);
|
||||
void OnMouseRightUp(wxMouseEvent& evt);
|
||||
void OnContextMenu(wxContextMenuEvent& evt);
|
||||
void OnMouseWheel(wxMouseEvent& evt);
|
||||
void OnChar(wxKeyEvent& evt);
|
||||
|
@ -112,7 +112,11 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
||||
#endif
|
||||
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
|
||||
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
|
||||
#ifdef __WXGTK__
|
||||
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
|
||||
#else
|
||||
EVT_CONTEXT_MENU (wxStyledTextCtrl::OnContextMenu)
|
||||
#endif
|
||||
EVT_MOUSEWHEEL (wxStyledTextCtrl::OnMouseWheel)
|
||||
EVT_CHAR (wxStyledTextCtrl::OnChar)
|
||||
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
|
||||
@ -1837,6 +1841,12 @@ void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) {
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
m_swx->DoContextMenu(Point(pt.x, pt.y));
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
ScreenToClient(&pt.x, &pt.y);
|
||||
@ -1869,7 +1879,7 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
||||
bool alt = evt.AltDown();
|
||||
bool skip = ((ctrl || alt) && ! (ctrl && alt));
|
||||
|
||||
if (key <= 0xff && !iscntrl(key) && !m_lastKeyDownConsumed && !skip) {
|
||||
if (key <= 0xff && key >= 32 && !m_lastKeyDownConsumed && !skip) {
|
||||
m_swx->DoAddChar(key);
|
||||
return;
|
||||
}
|
||||
|
@ -112,7 +112,11 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
||||
#endif
|
||||
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
|
||||
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
|
||||
#ifdef __WXGTK__
|
||||
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
|
||||
#else
|
||||
EVT_CONTEXT_MENU (wxStyledTextCtrl::OnContextMenu)
|
||||
#endif
|
||||
EVT_MOUSEWHEEL (wxStyledTextCtrl::OnMouseWheel)
|
||||
EVT_CHAR (wxStyledTextCtrl::OnChar)
|
||||
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
|
||||
@ -381,6 +385,12 @@ void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) {
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
m_swx->DoContextMenu(Point(pt.x, pt.y));
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
ScreenToClient(&pt.x, &pt.y);
|
||||
@ -413,7 +423,7 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
||||
bool alt = evt.AltDown();
|
||||
bool skip = ((ctrl || alt) && ! (ctrl && alt));
|
||||
|
||||
if (key <= 0xff && !iscntrl(key) && !m_lastKeyDownConsumed && !skip) {
|
||||
if (key <= 0xff && key >= 32 && !m_lastKeyDownConsumed && !skip) {
|
||||
m_swx->DoAddChar(key);
|
||||
return;
|
||||
}
|
||||
|
@ -169,6 +169,7 @@ private:
|
||||
void OnMouseLeftDown(wxMouseEvent& evt);
|
||||
void OnMouseMove(wxMouseEvent& evt);
|
||||
void OnMouseLeftUp(wxMouseEvent& evt);
|
||||
void OnMouseRightUp(wxMouseEvent& evt);
|
||||
void OnContextMenu(wxContextMenuEvent& evt);
|
||||
void OnMouseWheel(wxMouseEvent& evt);
|
||||
void OnChar(wxKeyEvent& evt);
|
||||
|
Loading…
Reference in New Issue
Block a user