X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..e4821c39c43133f7b48588a51d96cfdfeff79f6f:/interface/wx/cmdline.h diff --git a/interface/wx/cmdline.h b/interface/wx/cmdline.h index 2196edb66a..0136d2d9ad 100644 --- a/interface/wx/cmdline.h +++ b/interface/wx/cmdline.h @@ -59,6 +59,15 @@ enum wxCmdLineEntryType wxCMD_LINE_NONE ///< Use this to terminate the list. }; +/** + Flags determining wxCmdLineParser::ConvertStringToArgs() behaviour. + */ +enum wxCmdLineSplitType +{ + wxCMD_LINE_SPLIT_DOS, + wxCMD_LINE_SPLIT_UNIX +}; + /** The structure wxCmdLineEntryDesc is used to describe the one command line switch, option or parameter. An array of such structures should be passed @@ -87,7 +96,6 @@ struct wxCmdLineEntryDesc /** @class wxCmdLineParser - @wxheader{cmdline.h} wxCmdLineParser is a class for parsing the command line. @@ -302,12 +310,20 @@ public: bool AreLongOptionsEnabled() const; /** - Breaks down the string containing the full command line in words. The - words are separated by whitespace. The quotes can be used in the input - string to quote the white space and the back slashes can be used to - quote the quotes. + Breaks down the string containing the full command line in words. + + Words are separated by whitespace and double quotes can be used to + preserve the spaces inside the words. + + By default, this function uses Windows-like word splitting algorithm, + i.e. single quotes have no special meaning and backslash can't be used + to escape spaces neither. With @c wxCMD_LINE_SPLIT_UNIX flag Unix + semantics is used, i.e. both single and double quotes can be used and + backslash can be used to escape all the other special characters. */ - static wxArrayString ConvertStringToArgs(const wxChar cmdline); + static wxArrayString + ConvertStringToArgs(const wxChar cmdline, + wxCmdLineSplitType flags = wxCMD_LINE_SPLIT_DOS); /** Identical to EnableLongOptions(@false).