2 * This file is part of ShapeFusion (Copyright 2000 Tito Dal Canton)
4 * ShapeFusion is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * ShapeFusion is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with ShapeFusion; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #include "ShapeFusionMain.h"
20 #include "ShapeFusionMenus.h"
23 * This is the top-level window of the application.
26 IMPLEMENT_CLASS(ShapeFusionMain, wxDocParentFrame)
27 BEGIN_EVENT_TABLE(ShapeFusionMain, wxDocParentFrame)
28 EVT_MENU(ABOUT_MENU, ShapeFusionMain::OnAbout)
29 EVT_MENU_RANGE(FILE_HISTORY_FILE1, FILE_HISTORY_FILE9, ShapeFusionMain::OnMenuHistory)
32 ShapeFusionMain::ShapeFusionMain(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title,
33 const wxPoint& pos, const wxSize& size, const long type):
34 wxDocParentFrame(manager, frame, id, title, pos, size, type)
38 void ShapeFusionMain::OnAbout(wxCommandEvent& WXUNUSED(event))
40 wxMessageDialog *dlg = new wxMessageDialog(this,
41 wxT("ShapeFusion 0.5\nhttp://shapefusion.sourceforge.net\n\nCopyright 2000-2008, Tito Dal Canton\n\n"
42 "An editor for Marathon II, Marathon Infinity and AlephOne shapes and sounds files. "
43 "Released under the terms of the GNU General Public License: for more information "
44 "see the COPYING file that comes with ShapeFusion."),
45 wxT("About ShapeFusion"), wxOK | wxICON_INFORMATION);
50 void ShapeFusionMain::OnMenuHistory(wxCommandEvent& event)
52 wxString f(m_docManager->GetHistoryFile(event.GetId() - FILE_HISTORY_FILE1));
54 (void)m_docManager->CreateDocument(f, wxDOC_SILENT);