cpp/TextBox.cpp
changeset 5 f2a2f64eb682
parent 4 a3d29fb016c3
child 6 66becdcbe5d9
--- a/cpp/TextBox.cpp	Sun Feb 13 08:27:44 2011 +0100
+++ b/cpp/TextBox.cpp	Sun Feb 13 08:43:06 2011 +0100
@@ -1,5 +1,6 @@
 #include <iostream>
 #include "TextBox.hpp"
+#include "MainWindow.hpp"
 
 BEGIN_EVENT_TABLE (wxTextBox, wxTextCtrl)
     EVT_CHAR (wxTextBox::OnKeyEvent)
@@ -17,10 +18,14 @@
     if (e.GetKeyCode() == WXK_TAB)
     {
         std::cerr << "TAB pressed" << std::endl;
+        wxCommandEvent ce(MainWindow::ID_SKIP_QUESTION);
+        AddPendingEvent(ce);
     }
     else if (e.GetKeyCode() == WXK_RETURN)
     {
         std::cerr << "ENTER pressed" << std::endl;
+        wxCommandEvent ce(MainWindow::ID_SAVE_SENTENCE);
+        AddPendingEvent(ce);
     }
     else
         e.Skip();