equal
deleted
inserted
replaced
1 #include <wx/wx.h> |
1 #include <wx/wx.h> |
2 #include "MainWindow.hpp" |
2 #include "MainWindow.hpp" |
3 #include "PageList.hpp" |
3 #include "PageList.hpp" |
4 |
4 |
5 BEGIN_EVENT_TABLE(MainWindow, wxFrame) |
5 BEGIN_EVENT_TABLE(MainWindow, wxFrame) |
|
6 EVT_MENU(ID_MENU_GENERATE, MainWindow::on_generate) |
6 EVT_MENU(wxID_OPEN, MainWindow::on_open) |
7 EVT_MENU(wxID_OPEN, MainWindow::on_open) |
7 EVT_MENU(wxID_CLOSE, MainWindow::on_quit) |
8 EVT_MENU(wxID_CLOSE, MainWindow::on_quit) |
8 END_EVENT_TABLE() |
9 END_EVENT_TABLE() |
9 |
10 |
10 MainWindow::MainWindow() |
11 MainWindow::MainWindow() |
28 _menufile = new wxMenu(); |
29 _menufile = new wxMenu(); |
29 |
30 |
30 _menufile->Append(wxID_OPEN, _("&Open")); |
31 _menufile->Append(wxID_OPEN, _("&Open")); |
31 _menufile->Append(wxID_CLOSE, _("&Quit")); |
32 _menufile->Append(wxID_CLOSE, _("&Quit")); |
32 |
33 |
|
34 wxMenu *menuplay = new wxMenu(); |
|
35 menuplay->Append(ID_MENU_GENERATE, _("&Generate")); |
|
36 |
33 _menubar->Append(_menufile, _("&File")); |
37 _menubar->Append(_menufile, _("&File")); |
|
38 _menubar->Append(menuplay, _("&Document")); |
34 |
39 |
35 SetMenuBar(_menubar); |
40 SetMenuBar(_menubar); |
36 } |
41 } |
37 |
42 |
38 void |
43 void |
53 void |
58 void |
54 MainWindow::on_quit(wxCommandEvent &event) |
59 MainWindow::on_quit(wxCommandEvent &event) |
55 { |
60 { |
56 Close(); |
61 Close(); |
57 } |
62 } |
|
63 |
|
64 void |
|
65 MainWindow::on_generate(wxCommandEvent &event) |
|
66 { |
|
67 _pagelist->generate(wxT("out.djvu")); |
|
68 } |