X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fdbd123ef922b2ea0f8496dca32f220be579ac51..19c4d91638c2546630c4427e39c02f5380a8bb87:/include/wx/cmdline.h?ds=sidebyside diff --git a/include/wx/cmdline.h b/include/wx/cmdline.h index c9dd72b9d2..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 @@ -66,11 +67,15 @@ struct wxCmdLineEntryDesc wxCmdLineEntryType kind; const char *shortName; const char *longName; - wxString description; + 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);