- //// Make a menubar
- wxMenu *file_menu = new wxMenu;
-
- file_menu->Append(wxID_NEW, _T("&New..."));
- file_menu->Append(wxID_OPEN, _T("&Open..."));
- file_menu->Append(wxID_CLOSE, _T("&Close"));
- file_menu->Append(wxID_SAVE, _T("&Save"));
- file_menu->Append(wxID_SAVEAS, _T("Save &As..."));
-
- if (isCanvas)
- {
- file_menu->AppendSeparator();
- file_menu->Append(wxID_PRINT, _T("&Print..."));
- file_menu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
- file_menu->Append(wxID_PREVIEW, _T("Print Pre&view"));
- }
-
- file_menu->AppendSeparator();
- file_menu->Append(wxID_EXIT, _T("E&xit"));
-
- wxMenu *edit_menu = (wxMenu *) NULL;
-
- if (isCanvas)
- {
- edit_menu = new wxMenu;
- edit_menu->Append(wxID_UNDO, _T("&Undo"));
- edit_menu->Append(wxID_REDO, _T("&Redo"));
- edit_menu->AppendSeparator();
- edit_menu->Append(DOCVIEW_CUT, _T("&Cut last segment"));
-
- doc->GetCommandProcessor()->SetEditMenu(edit_menu);
- }