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
/**
@class wxCmdLineParser
- @wxheader{cmdline.h}
wxCmdLineParser is a class for parsing the command line.
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 wxString& cmdline,
+ wxCmdLineSplitType flags = wxCMD_LINE_SPLIT_DOS);
/**
Identical to EnableLongOptions(@false).