Set EventObject in event
[wxWidgets.git] / interface / cmdline.h
index 11d7b27d758a599a9c9a4b07a5aef35dc949e3ff..2196edb66a9c6de7e65c9b3f53248f8a6174e216 100644 (file)
@@ -55,6 +55,7 @@ enum wxCmdLineEntryType
     wxCMD_LINE_SWITCH,
     wxCMD_LINE_OPTION,
     wxCMD_LINE_PARAM,
+    wxCMD_LINE_USAGE_TEXT,
     wxCMD_LINE_NONE     ///< Use this to terminate the list.
 };
 
@@ -114,9 +115,10 @@ struct wxCmdLineEntryDesc
                  described below. For example, @c "-v" might be a switch
                  meaning "enable verbose mode".
     - @b option: Option for us here is something which comes with a value 0
-                 unlike a switch. For example, @c -o:filename might be an
-                 option for specifing the name of the output file.
+                 unlike a switch. For example, @c -o: @c filename might be an
+                 option for specifying the name of the output file.
     - @b parameter: This is a required program argument.
+    - @b text: This is a text which can be shown in usage information.
 
 
     @section cmdlineparser_construction Construction
@@ -137,8 +139,8 @@ struct wxCmdLineEntryDesc
 
     The same holds for command line description: it can be specified either in
     the constructor (with or without the command line itself) or constructed
-    later using either SetDesc() or combination of AddSwitch(), AddOption() and
-    AddParam() methods.
+    later using either SetDesc() or combination of AddSwitch(), AddOption(),
+    AddParam() and AddUsageText() methods.
 
     Using constructors or SetDesc() uses a (usually const static) table
     containing the command line description. If you want to decide which
@@ -161,8 +163,8 @@ struct wxCmdLineEntryDesc
 
     Another global option is the set of characters which may be used to start
     an option (otherwise, the word on the command line is assumed to be a
-    parameter). Under Unix, "-" is always used, but Windows has at least two
-    common choices for this: "-" and "/". Some programs also use "+". The
+    parameter). Under Unix, @c "-" is always used, but Windows has at least two
+    common choices for this: @c "-" and @c "/". Some programs also use "+". The
     default is to use what suits most the current platform, but may be changed
     with SetSwitchChars() method.
 
@@ -240,8 +242,7 @@ public:
         Specifies both the command line (in Unix format) and the
         @ref SetDesc() "command line description".
     */
-    wxCmdLineParser(const wxCmdLineEntryDesc* desc, int argc,
-                    char** argv);
+    wxCmdLineParser(const wxCmdLineEntryDesc* desc, int argc, char** argv);
 
     /**
         Specifies both the command line (in Windows format) and the
@@ -286,6 +287,13 @@ public:
                    const wxString& desc = wxEmptyString,
                    int flags = 0);
 
+    /**
+        Add a string @a text to the command line description shown by Usage().
+
+        @since 2.9.0
+    */
+    void AddUsageText(const wxString& text);
+
     /**
         Returns @true if long options are enabled, otherwise @false.
 
@@ -431,5 +439,12 @@ public:
         @see SetLogo()
     */
     void Usage() const;
+
+    /**
+        Return the string containing the program usage description.
+
+        Call Usage() to directly show this string to the user.
+     */
+    wxString GetUsageString() const;
 };