Mercurial > mercurial > hgweb_iv.cgi
diff src/main.cpp @ 0:3334ef689214 default tip
start develop.
author | pyon@macmini |
---|---|
date | Fri, 14 Aug 2020 03:15:53 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main.cpp Fri Aug 14 03:15:53 2020 +0900 @@ -0,0 +1,65 @@ +// Filename : main.cpp +// Last Change: 2020-08-13 木 13:01:00. +// +#include <wx/image.h> + +#include "main.h" +#include "iv.h" + +IMPLEMENT_APP(MyApp) + +IMPLEMENT_CLASS(MyApp, wxApp) + +MyApp::MyApp() +{ +} + +MyApp::~MyApp() +{ +} + +bool MyApp::OnInit() +{ + if (!wxApp::OnInit()) return false; + + wxInitAllImageHandlers(); + + ivFrame *frame = new ivFrame(NULL, wxID_ANY, wxT("iv -"), wxDefaultPosition, wxSize(500, 400), wxDEFAULT_FRAME_STYLE); + frame->Initialize(m_file); + frame->Show(true); + frame->Raise(); + + return true; +} + +int MyApp::OnExit() +{ + return 0; +} + +int MyApp::OnRun() +{ + int exitcode = wxApp::OnRun(); + if (exitcode != 0) return exitcode; +} + +void MyApp::OnInitCmdLine(wxCmdLineParser& parser) +{ + parser.SetDesc(g_cmdLineDesc); + parser.SetSwitchChars(wxT("-")); +} + +bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser) +{ + //silent_mode = parser.Found(wxT("s")); + + if (parser.GetParamCount() != 0) + m_file = parser.GetParam(0); + + // and other command line parameters + + // then do what you need with them. + + return true; +} +