-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathShapeFusionMain.cpp
More file actions
56 lines (49 loc) · 2.16 KB
/
ShapeFusionMain.cpp
File metadata and controls
56 lines (49 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* This file is part of ShapeFusion (Copyright 2000 Tito Dal Canton)
*
* ShapeFusion is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* ShapeFusion is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ShapeFusion; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "ShapeFusionMain.h"
#include "ShapeFusionMenus.h"
/*
* This is the top-level window of the application.
*/
IMPLEMENT_CLASS(ShapeFusionMain, wxDocParentFrame)
BEGIN_EVENT_TABLE(ShapeFusionMain, wxDocParentFrame)
EVT_MENU(ABOUT_MENU, ShapeFusionMain::OnAbout)
EVT_MENU_RANGE(FILE_HISTORY_FILE1, FILE_HISTORY_FILE9, ShapeFusionMain::OnMRUFile)
END_EVENT_TABLE()
ShapeFusionMain::ShapeFusionMain(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size, const long type):
wxDocParentFrame(manager, frame, id, title, pos, size, type)
{
}
void ShapeFusionMain::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxMessageDialog *dlg = new wxMessageDialog(this,
wxT("ShapeFusion 0.7\nhttp://shapefusion.sourceforge.net\n\nCopyright 2000-2020, Tito Dal Canton\n\n"
"An editor for Marathon 2, Marathon Infinity and Aleph One shapes and sounds files. "
"Released under the terms of the GNU General Public License: for more information "
"see the COPYING file that comes with ShapeFusion."),
wxT("About ShapeFusion"), wxOK | wxICON_INFORMATION);
dlg->ShowModal();
dlg->Destroy();
}
void ShapeFusionMain::OnMRUFile(wxCommandEvent& event)
{
wxString f(m_docManager->GetHistoryFile(event.GetId() - FILE_HISTORY_FILE1));
if (!f.empty())
(void)m_docManager->CreateDocument(f, wxDOC_SILENT);
}