]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/cmdline.h
temporary fix the linking problem due to making GSocket::Detected_Read/Write() non...
[wxWidgets.git] / include / wx / cmdline.h
index c8f140d7208a0788a8691b3b9aa21ce1be0906f2..10bf956eb0052af0cf0127481b53e97ca95acdc1 100644 (file)
 #include "wx/arrstr.h"
 #include "wx/cmdargs.h"
 
+// determines ConvertStringToArgs() behaviour
+enum wxCmdLineSplitType
+{
+    wxCMD_LINE_SPLIT_DOS,
+    wxCMD_LINE_SPLIT_UNIX
+};
+
 #if wxUSE_CMDLINE_PARSER
 
 class WXDLLIMPEXP_FWD_BASE wxDateTime;
@@ -55,6 +62,7 @@ enum wxCmdLineEntryType
     wxCMD_LINE_SWITCH,
     wxCMD_LINE_OPTION,
     wxCMD_LINE_PARAM,
+    wxCMD_LINE_USAGE_TEXT,
     wxCMD_LINE_NONE         // to terminate the list
 };
 
@@ -178,6 +186,9 @@ public:
                   wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
                   int flags = 0);
 
+    // add an explanatory text to be shown to the user in help
+    void AddUsageText(const wxString& text);
+
     // actions
     // -------
 
@@ -229,7 +240,9 @@ public:
     void Reset();
 
     // break down the command line in arguments
-    static wxArrayString ConvertStringToArgs(const wxString& cmdline);
+    static wxArrayString
+    ConvertStringToArgs(const wxString& cmdline,
+                        wxCmdLineSplitType type = wxCMD_LINE_SPLIT_DOS);
 
 private:
     // common part of all ctors
@@ -247,10 +260,11 @@ private:
 class WXDLLIMPEXP_BASE wxCmdLineParser
 {
 public:
-    static wxArrayString ConvertStringToArgs(const wxString& cmdline);
+    static wxArrayString
+    ConvertStringToArgs(const wxString& cmdline,
+                        wxCmdLineSplitType type = wxCMD_LINE_SPLIT_DOS);
 };
 
 #endif // wxUSE_CMDLINE_PARSER/!wxUSE_CMDLINE_PARSER
 
 #endif // _WX_CMDLINE_H_
-