Allow hiding command line arguments from Usage()

Add wxCMD_LINE_HIDDEN wxCmdLineParser flag allowing to hide options and/or
parameters.

A hidden/unlisted argument is processed as usual, but not shown in the output
given by Usage(). A use case for such could be diagnostics switches that
should exist but are not useful to the end user.

Closes https://github.com/wxWidgets/wxWidgets/pull/390
This commit is contained in:
Lauri Nurmi
2017-01-09 16:28:40 +02:00
committed by Vadim Zeitlin
parent d15bbcacd2
commit b8192cb8e1
5 changed files with 23 additions and 2 deletions

View File

@@ -43,7 +43,8 @@ enum wxCmdLineEntryFlags
wxCMD_LINE_PARAM_MULTIPLE = 0x04, // the parameter may be repeated
wxCMD_LINE_OPTION_HELP = 0x08, // this option is a help request
wxCMD_LINE_NEEDS_SEPARATOR = 0x10, // must have sep before the value
wxCMD_LINE_SWITCH_NEGATABLE = 0x20 // this switch can be negated (e.g. /S-)
wxCMD_LINE_SWITCH_NEGATABLE = 0x20, // this switch can be negated (e.g. /S-)
wxCMD_LINE_HIDDEN = 0x40 // this switch is not listed by Usage()
};
// an option value or parameter may be a string (the most common case), a