1 /*******************************************************************************
2 TPI - flexible but useless plug-in framework.
3 Copyright (C) 2002-2009 Silky
5 This library is free software; you can redistribute it and/or modify it under
6 the terms of the GNU Lesser General Public License as published by the Free
7 Software Foundation; either version 2.1 of the License, or (at your option)
10 This library is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15 You should have received a copy of the GNU Lesser General Public License along
16 with this library; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 $Id: frontend.cpp,v 1.3 2009/08/27 11:26:00 sirakaba Exp $
20 *******************************************************************************/
25 //******************************************************************************
27 //******************************************************************************
29 class Frontend: public wxApp
35 IMPLEMENT_APP(Frontend)
37 bool Frontend::OnInit()
39 wxInitAllImageHandlers();
40 ::wxXmlResource::Get()->InitAllHandlers();
42 MainFrame * frm_main = new MainFrame();
44 //
\8dì
\8bÆ
\83p
\83X
\82ð
\90Ý
\92è
\81B
46 wxChar cSep = wxFileName::GetPathSeparator();
48 frm_main->szCurrentPath = ::wxGetCwd() + cSep;
49 ::wxSetWorkingDirectory(::wxPathOnly(p.GetExecutablePath()) + cSep);
52 if (! ::wxXmlResource::Get()->Load(FE_DIR_S_XRC wxT("frm_main.xrc")))
54 ::ErrDlg(wxT("Unable to find XRC!"), NULL);
58 ::wxXmlResource::Get()->LoadFrame(frm_main, NULL, wxT("frame_main"));
59 ::wxXmlResource::Get()->Unload(FE_DIR_S_XRC wxT("frm_main.xrc"));
60 SetTopWindow(frm_main);
61 frm_main->cmdLine.SetCmdLine(this->argc, this->argv);
62 frm_main->InitDialog();