Mercurial > mercurial > hgweb_iv.cgi
comparison include/main.h @ 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.h | |
| 2 // Last Change: 2020-08-06 –Ø 09:07:24. | |
| 3 // | |
| 4 #pragma once | |
| 5 | |
| 6 #include <wx/wx.h> | |
| 7 #include <wx/cmdline.h> | |
| 8 | |
| 9 // private classes | |
| 10 // Define a new application type, each program should derive a class from wxApp | |
| 11 class MyApp : public wxApp | |
| 12 { | |
| 13 DECLARE_CLASS(MyApp) | |
| 14 private: | |
| 15 bool silent_mode; | |
| 16 wxString m_file; | |
| 17 | |
| 18 public: | |
| 19 MyApp(); | |
| 20 ~MyApp(); | |
| 21 | |
| 22 virtual bool OnInit(); | |
| 23 virtual int OnExit(); | |
| 24 virtual int OnRun(); | |
| 25 virtual void OnInitCmdLine(wxCmdLineParser& parser); | |
| 26 virtual bool OnCmdLineParsed(wxCmdLineParser& parser); | |
| 27 }; | |
| 28 | |
| 29 static const wxCmdLineEntryDesc g_cmdLineDesc[] = | |
| 30 { | |
| 31 /* | |
| 32 {wxCMD_LINE_SWITCH, wxT("h"), wxT("help"), wxT("displays help on the command line parameters"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP}, | |
| 33 {wxCMD_LINE_SWITCH, wxT("t"), wxT("test"), wxT("test switch"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_MANDATORY}, | |
| 34 {wxCMD_LINE_SWITCH, wxT("s"), wxT("silent"), wxT("disables the GUI")}, | |
| 35 */ | |
| 36 //{wxCMD_LINE_PARAM, NULL, NULL, "input file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE}, | |
| 37 {wxCMD_LINE_NONE} | |
| 38 }; | |
| 39 | |
| 40 | |
| 41 DECLARE_APP(MyApp) | |
| 42 |
