]> git.saurik.com Git - wxWidgets.git/commitdiff
Another blind attempt to fix AltGr issues in wxSTC, and a context menu
authorRobin Dunn <robin@alldunn.com>
Fri, 30 Nov 2001 02:16:27 +0000 (02:16 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 30 Nov 2001 02:16:27 +0000 (02:16 +0000)
fix for wxGTK.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/include/wx/stc/stc.h
contrib/src/stc/stc.cpp
contrib/src/stc/stc.cpp.in
contrib/src/stc/stc.h.in
include/wx/stc/stc.h
src/stc/stc.cpp
src/stc/stc.cpp.in
src/stc/stc.h.in

index 49effbce94f77c0896d75a5d36dd5b8002aa378b..804e4baba5a81833ead2d82c18b2c4cc2f8fc3f9 100644 (file)
@@ -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);
index 4435d6db064b493e0bc85351aa72a0369453bb49..003d4e48006fcf4620734e4557febc2a66e0bd8d 100644 (file)
@@ -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;
     }
index eff7ed29368172453cb7bfb17d262ff90826ccdb..f58188408abbb2ca7864c59159f7a3cc45d8bb14 100644 (file)
@@ -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;
     }
index e49b8ce97ded20ab4defe4d661ed7725b2c5a3fc..6a84dc5acbc8c56cb315fe650f071bbca3dd5144 100644 (file)
@@ -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);
index 49effbce94f77c0896d75a5d36dd5b8002aa378b..804e4baba5a81833ead2d82c18b2c4cc2f8fc3f9 100644 (file)
@@ -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);
index 4435d6db064b493e0bc85351aa72a0369453bb49..003d4e48006fcf4620734e4557febc2a66e0bd8d 100644 (file)
@@ -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;
     }
index eff7ed29368172453cb7bfb17d262ff90826ccdb..f58188408abbb2ca7864c59159f7a3cc45d8bb14 100644 (file)
@@ -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;
     }
index e49b8ce97ded20ab4defe4d661ed7725b2c5a3fc..6a84dc5acbc8c56cb315fe650f071bbca3dd5144 100644 (file)
@@ -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);