X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/42599b710de7d49fdc9bd9219333daf46c51f508..19c4d91638c2546630c4427e39c02f5380a8bb87:/include/wx/cmdline.h diff --git a/include/wx/cmdline.h b/include/wx/cmdline.h index fc5726d1da..97e9627d9f 100644 --- a/include/wx/cmdline.h +++ b/include/wx/cmdline.h @@ -17,6 +17,7 @@ #include "wx/string.h" #include "wx/arrstr.h" +#include "wx/cmdargs.h" #if wxUSE_CMDLINE_PARSER @@ -64,13 +65,17 @@ enum wxCmdLineEntryType struct wxCmdLineEntryDesc { wxCmdLineEntryType kind; - wxString shortName; - wxString longName; - wxString description; + const char *shortName; + const char *longName; + const char *description; wxCmdLineParamType type; int flags; }; +// the list of wxCmdLineEntryDesc objects should be terminated with this one +#define wxCMD_LINE_DESC_END \ + { wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0x0 } + // ---------------------------------------------------------------------------- // wxCmdLineParser is a class for parsing command line. // @@ -100,6 +105,8 @@ public: wxCmdLineParser(int argc, char **argv) { Init(); SetCmdLine(argc, argv); } #if wxUSE_UNICODE wxCmdLineParser(int argc, wxChar **argv) { Init(); SetCmdLine(argc, argv); } + wxCmdLineParser(int argc, const wxCmdLineArgsArray& argv) + { Init(); SetCmdLine(argc, argv); } #endif // wxUSE_UNICODE wxCmdLineParser(const wxString& cmdline) { Init(); SetCmdLine(cmdline); } @@ -112,6 +119,10 @@ public: #if wxUSE_UNICODE wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, wxChar **argv) { Init(); SetCmdLine(argc, argv); SetDesc(desc); } + wxCmdLineParser(const wxCmdLineEntryDesc *desc, + int argc, + const wxCmdLineArgsArray& argv) + { Init(); SetCmdLine(argc, argv); SetDesc(desc); } #endif // wxUSE_UNICODE wxCmdLineParser(const wxCmdLineEntryDesc *desc, const wxString& cmdline) { Init(); SetCmdLine(cmdline); SetDesc(desc); } @@ -120,6 +131,7 @@ public: void SetCmdLine(int argc, char **argv); #if wxUSE_UNICODE void SetCmdLine(int argc, wxChar **argv); + void SetCmdLine(int argc, const wxCmdLineArgsArray& argv); #endif // wxUSE_UNICODE void SetCmdLine(const wxString& cmdline);