本文整理汇总了C++中wxCmdLineParser::SetSwitchChars方法的典型用法代码示例。如果您正苦于以下问题:C++ wxCmdLineParser::SetSwitchChars方法的具体用法?C++ wxCmdLineParser::SetSwitchChars怎么用?C++ wxCmdLineParser::SetSwitchChars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxCmdLineParser
的用法示例。
在下文中一共展示了wxCmdLineParser::SetSwitchChars方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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
}
示例2: OnInitCmdLine
void VisualCreatePatch::OnInitCmdLine(wxCmdLineParser& parser)
{
parser.SetDesc(g_cmdLineDesc);
// must refuse '/' as parameter starter or cannot use "/path" style paths
parser.SetSwitchChars(wxT("-"));
}
示例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
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("-"));
}
示例5: 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("-"));
}
示例6: fixlist
void Pcsx2App::OnInitCmdLine( wxCmdLineParser& parser )
{
parser.SetLogo( AddAppName(" >> %s -- A PlayStation 2 Emulator for the PC <<") + L"\n\n" +
_("All options are for the current session only and will not be saved.\n")
);
wxString fixlist( L" " );
for (GamefixId i=GamefixId_FIRST; i < pxEnumEnd; ++i)
{
if( i != GamefixId_FIRST ) fixlist += L",";
fixlist += EnumToString(i);
}
parser.AddParam( _("IsoFile"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL );
parser.AddSwitch( L"h", L"help", _("displays this list of command line options"), wxCMD_LINE_OPTION_HELP );
parser.AddSwitch( wxEmptyString,L"console", _("forces the program log/console to be visible"), wxCMD_LINE_VAL_STRING );
parser.AddSwitch( wxEmptyString,L"fullscreen", _("use fullscreen GS mode") );
parser.AddSwitch( wxEmptyString,L"windowed", _("use windowed GS mode") );
parser.AddSwitch( wxEmptyString,L"nogui", _("disables display of the gui while running games") );
parser.AddSwitch( wxEmptyString,L"noguiprompt", _("when nogui - prompt before exiting on suspend") );
parser.AddOption( wxEmptyString,L"elf", _("executes an ELF image"), wxCMD_LINE_VAL_STRING );
parser.AddOption( wxEmptyString,L"irx", _("executes an IRX image"), wxCMD_LINE_VAL_STRING );
parser.AddSwitch( wxEmptyString,L"nodisc", _("boots an empty DVD tray; use to enter the PS2 system menu") );
parser.AddSwitch( wxEmptyString,L"usecd", _("boots from the CDVD plugin (overrides IsoFile parameter)") );
parser.AddSwitch( wxEmptyString,L"nohacks", _("disables all speedhacks") );
parser.AddOption( wxEmptyString,L"gamefixes", _("use the specified comma or pipe-delimited list of gamefixes.") + fixlist, wxCMD_LINE_VAL_STRING );
parser.AddSwitch( wxEmptyString,L"fullboot", _("disables fast booting") );
parser.AddOption( wxEmptyString,L"cfgpath", _("changes the configuration file path"), wxCMD_LINE_VAL_STRING );
parser.AddOption( wxEmptyString,L"cfg", _("specifies the PCSX2 configuration file to use"), wxCMD_LINE_VAL_STRING );
parser.AddSwitch( wxEmptyString,L"forcewiz", AddAppName(_("forces %s to start the First-time Wizard")) );
parser.AddSwitch( wxEmptyString,L"portable", _("enables portable mode operation (requires admin/root access)") );
parser.AddSwitch( wxEmptyString,L"profiling", _("update options to ease profiling (debug)") );
const PluginInfo* pi = tbl_PluginInfo; do {
parser.AddOption( wxEmptyString, pi->GetShortname().Lower(),
pxsFmt( _("specify the file to use as the %s plugin"), WX_STR(pi->GetShortname()) )
);
} while( ++pi, pi->shortname != NULL );
parser.SetSwitchChars( L"-" );
}
示例7: OnInitCmdLine
void SpringLobbyApp::OnInitCmdLine(wxCmdLineParser& parser)
{
static const wxCmdLineEntryDesc cmdLineDesc[] =
{
{wxCMD_LINE_SWITCH, "h", "help", wxTRANSLATE("show this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP},
{wxCMD_LINE_SWITCH, "nc", "no-crash-handler", wxTRANSLATE("don't use the crash handler (useful for debugging)"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL},
{wxCMD_LINE_SWITCH, "cl", "console-logging", wxTRANSLATE("shows application log to the console(if available)"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL},
{wxCMD_LINE_SWITCH, "gl", "gui-logging", wxTRANSLATE("enables application log window"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL},
{wxCMD_LINE_OPTION, "f", "config-file", wxTRANSLATE("override default choice for config-file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR},
{wxCMD_LINE_OPTION, "l", "log-verbosity", wxTRANSLATE("overrides default logging verbosity, can be:\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_SWITCH, "ve", "version", wxTRANSLATE("print version"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL},
{wxCMD_LINE_OPTION, "n", "name", wxTRANSLATE("overrides default application name"), wxCMD_LINE_VAL_STRING, 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("-"));
}
示例8: OnInitCmdLine
void UpdaterApp::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_OPTION, STR("f"), STR("target-exe"), _("the SpringLobby executeable to be updated"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY | wxCMD_LINE_NEEDS_SEPARATOR },
{ wxCMD_LINE_OPTION, STR("r"), STR("target-rev"), _("the SpringLobby revision to update to"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY | wxCMD_LINE_NEEDS_SEPARATOR },
{ 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("-"));
#undef STR
}
示例9: OnInitCmdLine
void InjectorApp::OnInitCmdLine(wxCmdLineParser& parser) {
parser.SetSwitchChars(wxT("-"));
parser.AddSwitch("h", "help", "show this help message", wxCMD_LINE_OPTION_HELP);
parser.AddOption("", "installdir", "name RCT3 installation directory");
}
示例10: OnInitCmdLine
/**
* コマンドライン読み取りを初期化する
*/
void MyApp::OnInitCmdLine(wxCmdLineParser& parser) {
// オプションの始まりはハイフン
parser.SetDesc(gCmdLineDesc);
parser.SetSwitchChars(wxT("-"));
}
示例11:
void Nin10EditApp::OnInitCmdLine(wxCmdLineParser& parser)
{
parser.SetLogo(wxString::Format(_("Nin10Edit GUI")));
parser.SetDesc(cmd_descriptions);
parser.SetSwitchChars (_("-"));
}
示例12: OnInitCmdLine
void SpinEditorApp::OnInitCmdLine(wxCmdLineParser& parser)
{
parser.SetDesc(g_cmdLineDesc);
parser.SetSwitchChars(wxT("-"));
}
示例13: OnInitCmdLine
void MultiMC::OnInitCmdLine(wxCmdLineParser &parser)
{
parser.SetDesc(cmdLineDesc);
parser.SetSwitchChars("-");
}
示例14: OnInitCmdLine
void wxOsgApp::OnInitCmdLine( wxCmdLineParser& parser )
{
parser.SetDesc( cmdlinedesc );
parser.SetSwitchChars ( wxT("-") );
}
示例15: OnInitCmdLine
void MainApp::OnInitCmdLine(wxCmdLineParser& parser)
{
parser.SetDesc (g_cmdLineDesc);
parser.SetSwitchChars (wxT("-/"));
}