App.cc

Go to the documentation of this file.
00001 /*
00002  * Super Metroid SRAM Editor
00003  * Copyright (C) 2005,2007-2008 emuWorks
00004  * http://games.technoplaza.net/
00005  *
00006  * This file is part of Super Metroid SRAM Editor.
00007  *
00008  * Super Metroid SRAM Editor is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * Super Metroid SRAM Editor is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with Super Metroid SRAM Editor; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021  */
00022  
00023 // $Id: App.cc,v 1.4 2008/12/17 04:14:15 jdratlif Exp $
00024 
00025 #ifdef HAVE_CONFIG_H
00026     #include <config.h>
00027 #endif
00028 
00029 #include <wx/wxprec.h>
00030 
00031 #ifndef WX_PRECOMP
00032     #include <wx/wx.h>
00033 #endif
00034 
00035 #include <wx/xrc/xmlres.h>
00036 
00037 #include "AppConstants.hh"
00038 #include "App.hh"
00039 #include "view/Frame.hh"
00040 
00041 using namespace smse;
00042 
00043 const wxString smse::APP_NAME(wxT("Super Metroid SRAM Editor"));
00044 const wxString smse::APP_VERSION(wxT("1.0a"));
00045 const wxString smse::APP_COPYRIGHT(wxT("Copyright (C) 2005,2007-2008 emuWorks"));
00046 const wxString smse::APP_URL(wxT("http://games.technoplaza.net/"));
00047 
00048 // prototype for InitXmlResource function
00049 void InitXmlResource();
00050 
00051 bool App::OnInit() {
00052     // initialize the XRC resources
00053     wxXmlResource::Get()->InitAllHandlers();
00054     InitXmlResource();
00055     
00056     frame = new Frame;
00057     frame->Show();
00058     
00059     return true;
00060 }
00061 
00062 int App::OnRun() {
00063     if (argc >= 2) {
00064         frame->open(argv[1]);
00065     }
00066     
00067     return wxApp::OnRun();
00068 }
00069 
00070 IMPLEMENT_CLASS(App, wxApp)
00071 IMPLEMENT_APP(App)
00072 

Generated on Mon Dec 29 01:15:52 2008 for Super Metroid SRAM Editor by  doxygen 1.5.4