]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/cmdline.h
fix memory leak; allocate the DC before SetFont() is called on the status bar
[wxWidgets.git] / include / wx / cmdline.h
index 4539dd61abcbdb2dc11b1d7acb4267239fe4075a..dcd76f7218e6025e8778c7e95fbf8639bdea9578 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;
@@ -233,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
@@ -241,7 +250,7 @@ private:
 
     struct wxCmdLineParserData *m_data;
 
-    DECLARE_NO_COPY_CLASS(wxCmdLineParser)
+    wxDECLARE_NO_COPY_CLASS(wxCmdLineParser);
 };
 
 #else // !wxUSE_CMDLINE_PARSER
@@ -251,7 +260,9 @@ 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