Mercurial > mercurial > hgweb_madnm.cgi
diff src/main.cpp @ 0:2f5584f0d127
first commit.
author | pyon@macmini |
---|---|
date | Sat, 08 Jun 2019 16:21:40 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main.cpp Sat Jun 08 16:21:40 2019 +0900 @@ -0,0 +1,43 @@ +// Filename : main.cpp +// Last Change: 2019-06-05 水 12:53:55. +// + +#include "id.h" +#include "main.h" +#include "appconf.h" +#include "util.h" +#include "mainframe.h" + +IMPLEMENT_APP( MyApp ) + +IMPLEMENT_CLASS( MyApp, wxApp ) + +MyApp::MyApp() +{ +} +MyApp::~MyApp() +{ +} + +bool MyApp::OnInit() +{ + if ( !wxApp::OnInit() ) return false; + + wxImage::AddHandler( new wxJPEGHandler ); + wxImage::AddHandler( new wxPNGHandler ); + + AppConf appconf; + wxRect rect = appconf.LoadRect(); + // Main Window + MainFrame *mainframe = new MainFrame( NULL, wxID_ANY, "MadnM", wxPoint( rect.x, rect.y ), rect.GetSize(), wxDEFAULT_FRAME_STYLE ); + mainframe->Show( true ); + mainframe->Raise(); + + return true; +} + +int MyApp::OnExit() +{ + return 0; +} +