--- a/MainWindow.cpp Wed Apr 02 21:47:47 2008 +0200
+++ b/MainWindow.cpp Thu Apr 03 00:16:12 2008 +0200
@@ -3,6 +3,7 @@
#include "PageList.hpp"
BEGIN_EVENT_TABLE(MainWindow, wxFrame)
+ EVT_MENU(ID_MENU_GENERATE, MainWindow::on_generate)
EVT_MENU(wxID_OPEN, MainWindow::on_open)
EVT_MENU(wxID_CLOSE, MainWindow::on_quit)
END_EVENT_TABLE()
@@ -30,7 +31,11 @@
_menufile->Append(wxID_OPEN, _("&Open"));
_menufile->Append(wxID_CLOSE, _("&Quit"));
+ wxMenu *menuplay = new wxMenu();
+ menuplay->Append(ID_MENU_GENERATE, _("&Generate"));
+
_menubar->Append(_menufile, _("&File"));
+ _menubar->Append(menuplay, _("&Document"));
SetMenuBar(_menubar);
}
@@ -55,3 +60,9 @@
{
Close();
}
+
+void
+MainWindow::on_generate(wxCommandEvent &event)
+{
+ _pagelist->generate(wxT("out.djvu"));
+}