本文整理汇总了C++中wxCmdLineParser::SetDesc方法的典型用法代码示例。如果您正苦于以下问题:C++ wxCmdLineParser::SetDesc方法的具体用法?C++ wxCmdLineParser::SetDesc怎么用?C++ wxCmdLineParser::SetDesc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxCmdLineParser
的用法示例。
在下文中一共展示了wxCmdLineParser::SetDesc方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnInitCmdLine
void VisualCreatePatch::OnInitCmdLine(wxCmdLineParser& parser)
{
parser.SetDesc(g_cmdLineDesc);
// must refuse '/' as parameter starter or cannot use "/path" style paths
parser.SetSwitchChars(wxT("-"));
}
示例2: OnInitCmdLine
void Springsettings::OnInitCmdLine(wxCmdLineParser& parser)
{
#ifndef HAVE_WX29
#define STR _T
#else
#define STR
#endif
#ifndef HAVE_WX29
#define CSTR
#else
#define CSTR .c_str()
#endif
static const wxCmdLineEntryDesc cmdLineDesc[] =
{
{ wxCMD_LINE_SWITCH, STR("h"), STR("help"), wxString(_("show this help message"))CSTR, wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
{ wxCMD_LINE_SWITCH, STR("nc"), STR("no-crash-handler"), wxString(_("don't use the crash handler (useful for debugging)"))CSTR, wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_SWITCH, STR("cl"), STR("console-logging"), wxString(_("shows application log to the console(if available)"))CSTR, wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_OPTION, STR("fl"), STR("file-logging"), wxString(_("dumps application log to a file ( enter path )"))CSTR, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_SWITCH, STR("gl"), STR("gui-logging"), wxString(_("enables application log window"))CSTR, wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_OPTION, STR("f"), STR("config-file"), wxString(_("override default choice for config-file"))CSTR, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR },
{ wxCMD_LINE_OPTION, STR("l"), STR("log-verbosity"), wxString(_("overrides default logging verbosity, can be:\n 0: no log\n 1: critical errors\n 2: errors\n 3: warnings (default)\n 4: messages\n 5: function trace"))CSTR, wxCMD_LINE_VAL_NUMBER, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL } //this is mandatory according to http://docs.wxwidgets.org/stable/wx_wxcmdlineparser.html
};
parser.SetDesc( cmdLineDesc );
parser.SetSwitchChars (_T("-"));
#undef STR
#undef CSTR
}
示例3: OnInitCmdLine
void SpringLobbyApp::OnInitCmdLine(wxCmdLineParser& parser)
{
#ifndef HAVE_WX29
#define STR _T
#else
#define STR
#endif
wxCmdLineEntryDesc cmdLineDesc[] =
{
{ wxCMD_LINE_SWITCH, STR("h"), STR("help"), _("show this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
{ wxCMD_LINE_SWITCH, STR("nc"), STR("no-crash-handler"), _("don't use the crash handler (useful for debugging)"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_OPTION, STR("fl"), STR("file-logging"), _("dumps application log to a file ( enter path )"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR },
{ wxCMD_LINE_SWITCH, STR("cl"), STR("console-logging"), _("shows application log to the console(if available)"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_SWITCH, STR("gl"), STR("gui-logging"), _("enables application log window"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_OPTION, STR("f"), STR("config-file"), _("override default choice for config-file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR },
{ wxCMD_LINE_OPTION, STR("l"), STR("log-verbosity"), _("overrides default logging verbosity, can be:\n 0: no log\n 1: critical errors\n 2: errors\n 3: warnings (default)\n 4: messages\n 5: function trace"), wxCMD_LINE_VAL_NUMBER, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_OPTION, STR("c"), STR("customize"), _("Load lobby customizations from game archive. Expects the long name."), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_OPTION, STR("n"), STR("name"), _("overrides default application name"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_SWITCH, STR("s"), STR("simple"), _("Start with the simple interface."), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_NONE, STR(""), STR(""), _T(""), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }//this is mandatory according to http://docs.wxwidgets.org/stable/wx_wxcmdlineparser.html
};
parser.SetDesc( cmdLineDesc );
parser.SetSwitchChars (_T("-"));
#undef STR
}
示例4: OnInitCmdLine
// The table of command line options
//
void TestApp::OnInitCmdLine(wxCmdLineParser& parser)
{
TestAppBase::OnInitCmdLine(parser);
static const wxCmdLineEntryDesc cmdLineDesc[] = {
{ wxCMD_LINE_SWITCH, "l", "list",
"list the test suites, do not run them",
wxCMD_LINE_VAL_NONE, 0 },
{ wxCMD_LINE_SWITCH, "L", "longlist",
"list the test cases, do not run them",
wxCMD_LINE_VAL_NONE, 0 },
{ wxCMD_LINE_SWITCH, "d", "detail",
"print the test case names, run them",
wxCMD_LINE_VAL_NONE, 0 },
{ wxCMD_LINE_SWITCH, "t", "timing",
"print names and measure running time of individual test, run them",
wxCMD_LINE_VAL_NONE, 0 },
{ wxCMD_LINE_OPTION, "", "locale",
"locale to use when running the program",
wxCMD_LINE_VAL_STRING, 0 },
{ wxCMD_LINE_PARAM, NULL, NULL, "REGISTRY", wxCMD_LINE_VAL_STRING,
wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE },
wxCMD_LINE_DESC_END
};
parser.SetDesc(cmdLineDesc);
}
示例5: OnInitCmdLine
void wxAppConsoleBase::OnInitCmdLine(wxCmdLineParser& parser)
{
// the standard command line options
static const wxCmdLineEntryDesc cmdLineDesc[] =
{
{
wxCMD_LINE_SWITCH,
"h",
"help",
gettext_noop("show this help message"),
wxCMD_LINE_VAL_NONE,
wxCMD_LINE_OPTION_HELP
},
#if wxUSE_LOG
{
wxCMD_LINE_SWITCH,
NULL,
OPTION_VERBOSE,
gettext_noop("generate verbose log messages"),
wxCMD_LINE_VAL_NONE,
0x0
},
#endif // wxUSE_LOG
// terminator
wxCMD_LINE_DESC_END
};
parser.SetDesc(cmdLineDesc);
}
示例6: OnInitCmdLine
virtual void OnInitCmdLine(wxCmdLineParser& parser)
{
static const wxCmdLineEntryDesc desc[] =
{
{ wxCMD_LINE_SWITCH, "", "bitmaps" },
{ wxCMD_LINE_SWITCH, "", "images" },
{ wxCMD_LINE_SWITCH, "", "lines" },
{ wxCMD_LINE_SWITCH, "", "rawbmp" },
{ wxCMD_LINE_SWITCH, "", "rectangles" },
{ wxCMD_LINE_SWITCH, "", "circles" },
{ wxCMD_LINE_SWITCH, "", "ellipses" },
{ wxCMD_LINE_SWITCH, "", "paint" },
{ wxCMD_LINE_SWITCH, "", "client" },
{ wxCMD_LINE_SWITCH, "", "memory" },
{ wxCMD_LINE_SWITCH, "", "dc" },
{ wxCMD_LINE_SWITCH, "", "gc" },
#if wxUSE_GLCANVAS
{ wxCMD_LINE_SWITCH, "", "gl" },
#endif // wxUSE_GLCANVAS
{ wxCMD_LINE_OPTION, "m", "map-mode", "", wxCMD_LINE_VAL_NUMBER },
{ wxCMD_LINE_OPTION, "p", "pen-width", "", wxCMD_LINE_VAL_NUMBER },
{ wxCMD_LINE_OPTION, "w", "width", "", wxCMD_LINE_VAL_NUMBER },
{ wxCMD_LINE_OPTION, "h", "height", "", wxCMD_LINE_VAL_NUMBER },
{ wxCMD_LINE_OPTION, "I", "images", "", wxCMD_LINE_VAL_NUMBER },
{ wxCMD_LINE_OPTION, "N", "number-of-iterations", "", wxCMD_LINE_VAL_NUMBER },
#ifdef __WXMSW__
{ wxCMD_LINE_OPTION, "r", "renderer", "gdiplus | direct2d | cairo", wxCMD_LINE_VAL_STRING },
#endif // __WXMSW__
{ wxCMD_LINE_NONE },
};
parser.SetDesc(desc);
}
示例7: OnInitCmdLine
///
/// Pass the command line parameters and descriptions to wxWidgets for displaying.
///
void CBOINCGUIApp::OnInitCmdLine(wxCmdLineParser &parser)
{
wxApp::OnInitCmdLine(parser);
static const wxCmdLineEntryDesc cmdLineDesc[] =
{
{ wxCMD_LINE_NONE } //DON'T forget this line!!
};
parser.SetDesc(cmdLineDesc);
}
示例8: OnInitCmdLine
void UpdaterApp::OnInitCmdLine(wxCmdLineParser& parser)
{
wxCmdLineEntryDesc cmdLineDesc[] = {
{ wxCMD_LINE_SWITCH, _("h"), _("help"), _("show this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
{ wxCMD_LINE_PARAM, NULL, NULL, _("<parent pid> <springlobby.exe> <updater.exe> <source dir> <destination dir>"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE },
{ wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0 }//while this throws warnings, it is mandatory according to http://docs.wxwidgets.org/stable/wx_wxcmdlineparser.html
};
parser.SetDesc( cmdLineDesc );
parser.SetSwitchChars (_T("-"));
}
示例9: OnInitCmdLine
void OnInitCmdLine(wxCmdLineParser& parser) override
{
bug_fun();
static const wxCmdLineEntryDesc g_cmdLineDesc[] =
{
{wxCMD_LINE_PARAM, nullptr, nullptr, nullptr,
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE|wxCMD_LINE_PARAM_OPTIONAL},
{wxCMD_LINE_NONE}
};
parser.SetDesc(g_cmdLineDesc);
parser.SetSwitchChars(wxT("-"));
}
示例10: OnInitCmdLine
virtual void OnInitCmdLine(wxCmdLineParser& parser)
{
static const wxCmdLineEntryDesc desc[] =
{
{ wxCMD_LINE_OPTION, "m", "map-mode", "", wxCMD_LINE_VAL_NUMBER },
{ wxCMD_LINE_OPTION, "p", "pen-width", "", wxCMD_LINE_VAL_NUMBER },
{ wxCMD_LINE_OPTION, "w", "width", "", wxCMD_LINE_VAL_NUMBER },
{ wxCMD_LINE_OPTION, "h", "height", "", wxCMD_LINE_VAL_NUMBER },
{ wxCMD_LINE_OPTION, "L", "lines", "", wxCMD_LINE_VAL_NUMBER },
};
parser.SetDesc(desc);
}
示例11: OnInitCmdLine
void mainApp::OnInitCmdLine (wxCmdLineParser &parser)
{
static const wxCmdLineEntryDesc cmdLineDesc[] =
{
{ wxCMD_LINE_PARAM, NULL, NULL, "input-file",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_OPTION, "verbose" ,"verbose",NULL,
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_NONE }
};
parser.SetDesc(cmdLineDesc);
return;
}
示例12: OnInitCmdLine
void MyApp::OnInitCmdLine(wxCmdLineParser& parser)
{
static const wxCmdLineEntryDesc cmdLineDesc[] =
{
{ wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("show this help message"),
wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
{ wxCMD_LINE_SWITCH, _T("v"), _T("verbose"), _T("be verbose") },
{ wxCMD_LINE_OPTION, _T("f"), _T("file"), _T("output filename") },
{ wxCMD_LINE_OPTION, _T("x"), _T("xmlfile"), _T("xml configuration filename") },
{ wxCMD_LINE_SWITCH, _T("i"), _T("import"), _T("specify import action") },
{ wxCMD_LINE_SWITCH, _T("e"), _T("export"), _T("specify export action") },
{ wxCMD_LINE_NONE }
};
parser.SetDesc(cmdLineDesc);
}
示例13: OnInitCmdLine
void MutApp::OnInitCmdLine(wxCmdLineParser& parser) {
const wxCmdLineEntryDesc cmdLineDesc[] = {
{ wxCMD_LINE_PARAM, NULL, NULL, _("logic file"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE|wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_NONE }
};
wxApp::OnInitCmdLine(parser);
parser.SetDesc(cmdLineDesc);
#ifdef DEBUG
debugFlags::InitCommandLine(parser);
#endif
}
示例14: OnInitCmdLine
void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser)
{
// first add the standard non GUI options
wxAppConsole::OnInitCmdLine(parser);
// the standard command line options
static const wxCmdLineEntryDesc cmdLineGUIDesc[] =
{
#ifdef __WXUNIVERSAL__
{
wxCMD_LINE_OPTION,
wxEmptyString,
OPTION_THEME,
gettext_noop("specify the theme to use"),
wxCMD_LINE_VAL_STRING,
0x0
},
#endif // __WXUNIVERSAL__
#if defined(__WXMGL__)
// VS: this is not specific to wxMGL, all fullscreen (framebuffer) ports
// should provide this option. That's why it is in common/appcmn.cpp
// and not mgl/app.cpp
{
wxCMD_LINE_OPTION,
wxEmptyString,
OPTION_MODE,
gettext_noop("specify display mode to use (e.g. 640x480-16)"),
wxCMD_LINE_VAL_STRING,
0x0
},
#endif // __WXMGL__
// terminator
{
wxCMD_LINE_NONE,
wxEmptyString,
wxEmptyString,
wxEmptyString,
wxCMD_LINE_VAL_NONE,
0x0
}
};
parser.SetDesc(cmdLineGUIDesc);
}
示例15: OnInitCmdLine
void MainApp::OnInitCmdLine(wxCmdLineParser& parser)
{
// Command line options:
// [project file] [files...] [/debugexe imagename]
const wxCmdLineEntryDesc cmdLineDesc[] =
{
{ wxCMD_LINE_PARAM, NULL, NULL, "input file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL },
#ifndef DEDICATED_PRODUCT_VERSION
{ wxCMD_LINE_OPTION, "debugexe", "debugexe", "executable", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
#endif
{ wxCMD_LINE_NONE }
};
parser.SetDesc(cmdLineDesc);
}