equal
deleted
inserted
replaced
1 #include <wx/wx.h> |
1 #include <wx/wx.h> |
2 #include <wx/image.h> |
2 #include <wx/image.h> |
|
3 #include <iostream> |
3 #include "MainWindow.hpp" |
4 #include "MainWindow.hpp" |
4 #include "TextBox.hpp" |
5 #include "TextBox.hpp" |
5 |
6 |
|
7 BEGIN_EVENT_TABLE (MainWindow, wxFrame) |
|
8 EVT_COMMAND (wxID_ANY, ID_SKIP_QUESTION, MainWindow::OnSkipQuestion ) |
|
9 EVT_COMMAND (wxID_ANY, ID_SAVE_SENTENCE, MainWindow::OnSaveSentence ) |
|
10 END_EVENT_TABLE () |
|
11 |
6 MainWindow::MainWindow() |
12 MainWindow::MainWindow() |
7 :wxFrame(0, wxID_ANY, _("Lingvigilo"), wxDefaultPosition) |
13 :wxFrame(0, wxID_ANY, _("Lingvigilo"), wxDefaultPosition, wxDefaultSize, |
|
14 wxSTAY_ON_TOP) |
8 { |
15 { |
9 wxBoxSizer *s = new wxBoxSizer(wxVERTICAL); |
16 wxBoxSizer *s = new wxBoxSizer(wxVERTICAL); |
10 wxStaticText *label = new wxStaticText(this, wxID_ANY, |
17 wxStaticText *label = new wxStaticText(this, wxID_ANY, |
11 _("Introdueix la frase:")); |
18 _("Introdueix la frase:")); |
12 wxTextBox *text = new wxTextBox(this, wxID_ANY); |
19 wxTextBox *text = new wxTextBox(this, wxID_ANY); |
15 |
22 |
16 text->SetFocus(); |
23 text->SetFocus(); |
17 |
24 |
18 SetSizerAndFit(s); |
25 SetSizerAndFit(s); |
19 } |
26 } |
|
27 |
|
28 void |
|
29 MainWindow::OnSkipQuestion(wxCommandEvent &e) |
|
30 { |
|
31 std::cerr << "Skip Question" << std::endl; |
|
32 } |
|
33 |
|
34 void |
|
35 MainWindow::OnSaveSentence(wxCommandEvent &e) |
|
36 { |
|
37 std::cerr << "Save Sentence" << std::endl; |
|
38 } |