distribute in the right places documentations for the overloads/structs used with wxCmdLineParser; mention wxAppConsole::OnInitCmdLine and wxAppConsole::OnCmdLineParsed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -71,25 +71,34 @@ enum wxCmdLineSplitType
|
|||||||
/**
|
/**
|
||||||
The structure wxCmdLineEntryDesc is used to describe the one command line
|
The structure wxCmdLineEntryDesc is used to describe the one command line
|
||||||
switch, option or parameter. An array of such structures should be passed
|
switch, option or parameter. An array of such structures should be passed
|
||||||
to wxCmdLineParser::SetDesc(). Also, the meanings of parameters of the
|
to wxCmdLineParser::SetDesc().
|
||||||
wxCmdLineParser::AddXXX() functions are the same as of the corresponding
|
|
||||||
fields in this structure.
|
|
||||||
|
|
||||||
The field @c shortName is the usual, short, name of the switch or the
|
Also, the meanings of parameters of the wxCmdLineParser::AddXXX() functions
|
||||||
option. @c longName is the corresponding long name or empty if the option
|
are the same as of the corresponding fields in this structure.
|
||||||
has no long name. Both of these fields are unused for the parameters. Both
|
|
||||||
the short and long option names can contain only letters, digits and the
|
|
||||||
underscores.
|
|
||||||
|
|
||||||
@c description is used by the wxCmdLineEntryDesc::Usage() method to
|
|
||||||
construct a help message explaining the syntax of the program.
|
|
||||||
*/
|
*/
|
||||||
struct wxCmdLineEntryDesc
|
struct wxCmdLineEntryDesc
|
||||||
{
|
{
|
||||||
wxCmdLineEntryType kind;
|
wxCmdLineEntryType kind;
|
||||||
|
|
||||||
|
/**
|
||||||
|
This is the usual, short, name of the switch or the option.
|
||||||
|
*/
|
||||||
const char *shortName;
|
const char *shortName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
@c longName is the corresponding long name or empty if the option
|
||||||
|
has no long name. Both of these fields are unused for the parameters. Both
|
||||||
|
the short and long option names can contain only letters, digits and the
|
||||||
|
underscores.
|
||||||
|
*/
|
||||||
const char *longName;
|
const char *longName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
This description is used by the wxCmdLineEntryDesc::Usage() method to
|
||||||
|
construct a help message explaining the syntax of the program.
|
||||||
|
*/
|
||||||
const char *description;
|
const char *description;
|
||||||
|
|
||||||
wxCmdLineParamType type;
|
wxCmdLineParamType type;
|
||||||
int flags;
|
int flags;
|
||||||
};
|
};
|
||||||
@@ -115,6 +124,9 @@ struct wxCmdLineEntryDesc
|
|||||||
-# Call Parse().
|
-# Call Parse().
|
||||||
-# Use Found() to retrieve the results.
|
-# Use Found() to retrieve the results.
|
||||||
|
|
||||||
|
You can also use wxApp's default command line processing just overriding
|
||||||
|
wxAppConsole::OnInitCmdLine() and wxAppConsole::OnCmdLineParsed().
|
||||||
|
|
||||||
In the documentation below the following terminology is used:
|
In the documentation below the following terminology is used:
|
||||||
|
|
||||||
- @b switch: This is a boolean option which can be given or not, but which
|
- @b switch: This is a boolean option which can be given or not, but which
|
||||||
@@ -208,7 +220,7 @@ struct wxCmdLineEntryDesc
|
|||||||
@library{wxbase}
|
@library{wxbase}
|
||||||
@category{appmanagement}
|
@category{appmanagement}
|
||||||
|
|
||||||
@see wxApp::argc, wxApp::argv, @ref page_samples_console "Console Sample"
|
@see wxApp::argc, wxApp::argv, @ref page_samples_console
|
||||||
*/
|
*/
|
||||||
class wxCmdLineParser
|
class wxCmdLineParser
|
||||||
{
|
{
|
||||||
@@ -218,20 +230,27 @@ public:
|
|||||||
*/
|
*/
|
||||||
wxCmdLineParser();
|
wxCmdLineParser();
|
||||||
|
|
||||||
//@{
|
|
||||||
/**
|
/**
|
||||||
Constructor which specifies the command line to parse. This is the
|
Constructor which specifies the command line to parse. This is the
|
||||||
traditional (Unix) command line format. The parameters @a argc and
|
traditional (Unix) command line format. The parameters @a argc and
|
||||||
@a argv have the same meaning as the typical @c main() function.
|
@a argv have the same meaning as the typical @c main() function.
|
||||||
|
|
||||||
The second overloaded constructor is only available in Unicode build.
|
This constructor is available in both ANSI and Unicode modes because under
|
||||||
The first one is available in both ANSI and Unicode modes because under
|
|
||||||
some platforms the command line arguments are passed as ASCII strings
|
some platforms the command line arguments are passed as ASCII strings
|
||||||
even to Unicode programs.
|
even to Unicode programs.
|
||||||
*/
|
*/
|
||||||
wxCmdLineParser(int argc, char** argv);
|
wxCmdLineParser(int argc, char** argv);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Constructor which specifies the command line to parse.
|
||||||
|
This is the traditional (Unix) command line format.
|
||||||
|
|
||||||
|
The parameters @a argc and @a argv have the same meaning as the typical
|
||||||
|
@c main() function.
|
||||||
|
|
||||||
|
This constructor is only available in Unicode build.
|
||||||
|
*/
|
||||||
wxCmdLineParser(int argc, wchar_t** argv);
|
wxCmdLineParser(int argc, wchar_t** argv);
|
||||||
//@}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Constructor which specify the command line to parse in Windows format.
|
Constructor which specify the command line to parse in Windows format.
|
||||||
|
Reference in New Issue
Block a user