Mercurial > mercurial > hgweb_iv.cgi
comparison src/main.cpp @ 0:3334ef689214 default tip
start develop.
author | pyon@macmini |
---|---|
date | Fri, 14 Aug 2020 03:15:53 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3334ef689214 |
---|---|
1 // Filename : main.cpp | |
2 // Last Change: 2020-08-13 木 13:01:00. | |
3 // | |
4 #include <wx/image.h> | |
5 | |
6 #include "main.h" | |
7 #include "iv.h" | |
8 | |
9 IMPLEMENT_APP(MyApp) | |
10 | |
11 IMPLEMENT_CLASS(MyApp, wxApp) | |
12 | |
13 MyApp::MyApp() | |
14 { | |
15 } | |
16 | |
17 MyApp::~MyApp() | |
18 { | |
19 } | |
20 | |
21 bool MyApp::OnInit() | |
22 { | |
23 if (!wxApp::OnInit()) return false; | |
24 | |
25 wxInitAllImageHandlers(); | |
26 | |
27 ivFrame *frame = new ivFrame(NULL, wxID_ANY, wxT("iv -"), wxDefaultPosition, wxSize(500, 400), wxDEFAULT_FRAME_STYLE); | |
28 frame->Initialize(m_file); | |
29 frame->Show(true); | |
30 frame->Raise(); | |
31 | |
32 return true; | |
33 } | |
34 | |
35 int MyApp::OnExit() | |
36 { | |
37 return 0; | |
38 } | |
39 | |
40 int MyApp::OnRun() | |
41 { | |
42 int exitcode = wxApp::OnRun(); | |
43 if (exitcode != 0) return exitcode; | |
44 } | |
45 | |
46 void MyApp::OnInitCmdLine(wxCmdLineParser& parser) | |
47 { | |
48 parser.SetDesc(g_cmdLineDesc); | |
49 parser.SetSwitchChars(wxT("-")); | |
50 } | |
51 | |
52 bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser) | |
53 { | |
54 //silent_mode = parser.Found(wxT("s")); | |
55 | |
56 if (parser.GetParamCount() != 0) | |
57 m_file = parser.GetParam(0); | |
58 | |
59 // and other command line parameters | |
60 | |
61 // then do what you need with them. | |
62 | |
63 return true; | |
64 } | |
65 |