Mercurial > mercurial > hgweb_iv.cgi
diff include/main.h @ 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/include/main.h Fri Aug 14 03:15:53 2020 +0900 @@ -0,0 +1,42 @@ +// Filename : main.h +// Last Change: 2020-08-06 –Ø 09:07:24. +// +#pragma once + +#include <wx/wx.h> +#include <wx/cmdline.h> + +// private classes +// Define a new application type, each program should derive a class from wxApp +class MyApp : public wxApp +{ + DECLARE_CLASS(MyApp) + private: + bool silent_mode; + wxString m_file; + + public: + MyApp(); + ~MyApp(); + + virtual bool OnInit(); + virtual int OnExit(); + virtual int OnRun(); + virtual void OnInitCmdLine(wxCmdLineParser& parser); + virtual bool OnCmdLineParsed(wxCmdLineParser& parser); +}; + +static const wxCmdLineEntryDesc g_cmdLineDesc[] = +{ + /* + {wxCMD_LINE_SWITCH, wxT("h"), wxT("help"), wxT("displays help on the command line parameters"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP}, + {wxCMD_LINE_SWITCH, wxT("t"), wxT("test"), wxT("test switch"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_MANDATORY}, + {wxCMD_LINE_SWITCH, wxT("s"), wxT("silent"), wxT("disables the GUI")}, + */ + //{wxCMD_LINE_PARAM, NULL, NULL, "input file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE}, + {wxCMD_LINE_NONE} +}; + + +DECLARE_APP(MyApp) +