X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a6bf0c9533b2ed4434e667936c0e3d2f534de0e4..17d698cca55ec9a4eee46f85c87219859aa48a3c:/interface/wx/cmdline.h diff --git a/interface/wx/cmdline.h b/interface/wx/cmdline.h index a9b7630e9a..9fe6c70cb9 100644 --- a/interface/wx/cmdline.h +++ b/interface/wx/cmdline.h @@ -2,7 +2,6 @@ // Name: cmdline.h // Purpose: interface of wxCmdLineParser // Author: wxWidgets team -// RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -226,7 +225,7 @@ struct wxCmdLineEntryDesc First global option is the support for long (also known as GNU-style) options. The long options are the ones which start with two dashes and look - like "--verbose", i.e. they generally are complete words and not some + like "\--verbose", i.e. they generally are complete words and not some abbreviations of them. As long options are used by more and more applications, they are enabled by default, but may be disabled with DisableLongOptions(). @@ -336,6 +335,32 @@ public: */ ~wxCmdLineParser(); + /** + Adds an option with only long form. + + This is just a convenient wrapper for AddOption() passing an empty + string as short option name. + + @since 2.9.3 + */ + void AddLongOption(const wxString& lng, + const wxString& desc = wxEmptyString, + wxCmdLineParamType type = wxCMD_LINE_VAL_STRING, + int flags = 0); + + /** + Adds a switch with only long form. + + This is just a convenient wrapper for AddSwitch() passing an empty + string as short switch name. + + @since 2.9.3 + */ + + void AddLongSwitch(const wxString& lng, + const wxString& desc = wxEmptyString, + int flags = 0); + /** Add an option @a name with an optional long name @a lng (no long name if it is empty, which is default) taking a value of the given type @@ -470,7 +495,7 @@ public: size_t GetParamCount() const; /** - Parse the command line, return 0 if ok, -1 if @c "-h" or @c "--help" + Parse the command line, return 0 if ok, -1 if @c "-h" or @c "\--help" option was encountered and the help message was given or a positive value if a syntax error occurred.