本文整理汇总了C++中Bar::MenuSeparator方法的典型用法代码示例。如果您正苦于以下问题:C++ Bar::MenuSeparator方法的具体用法?C++ Bar::MenuSeparator怎么用?C++ Bar::MenuSeparator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bar
的用法示例。
在下文中一共展示了Bar::MenuSeparator方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SearchMenu
void Ide::SearchMenu(Bar& menu)
{
if(!designer) {
menu.Add(AK_FIND, THISBACK(EditFind))
.Help("Search for text or text pattern");
menu.Add(AK_REPLACE, THISBACK(EditReplace))
.Help("Search for text or text pattern, with replace option");
// menu.Add(AK_FINDSEL, THISBACK(EditFindReplacePickText))
// .Help("Show find / replace dialog & set active text as the 'find' text");
menu.Add(AK_FINDNEXT, THISBACK(EditFindNext))
.Help("Find next occurrence");
menu.Add(AK_FINDPREV, THISBACK(EditFindPrevious))
.Help("Find previous occurrence");
menu.MenuSeparator();
menu.Add(AK_FINDSTRING, THISBACK1(FindString, false))
.Help("Find any ordinary string constant (\"\" - delimited)");
menu.Add(AK_FINDSTRINGBACK, THISBACK1(FindString, true))
.Help("Find any ordinary string constant (\"\" - delimited) backwards");
menu.MenuSeparator();
}
menu.Add(AK_FINDINFILES, THISBACK1(FindInFiles, false))
.Help("Find text or text pattern in subtree of given path");
menu.Add(AK_REPLACEINFILES, THISBACK1(FindInFiles, true))
.Help("Find text or text pattern in subtree of given path, with replace option(s)");
menu.Add(AK_FINDFILE, THISBACK(FindFileName))
.Help("Locate file by filename (use *, ? when you're not sure)");
}
示例2: BuildMenu
void Ide::BuildMenu(Bar& menu)
{
bool b = !IdeIsDebugLock();
menu.Add(AK_OUTPUTMODE, THISBACK(SetupOutputMode))
.Help("Setup how to build the target");
if(idestate == BUILDING)
menu.Add(b, "Stop build", IdeImg::build_stop(), THISBACK(StopBuild))
.Key(AK_BUILD)
.Help("Stop building");
else
menu.Add(b, "Build", IdeImg::build_make(), THISBACK(DoBuild))
.Key(AK_BUILD)
.Help("Perform minimal application rebuild");
b = b && idestate == EDITING;
menu.Add(b, AK_CLEAN, THISBACK(Clean))
.Help("Remove all intermediate files");
menu.Add(b, AK_REBUILDALL, IdeImg::build_rebuild_all(), THISBACK(RebuildAll))
.Help("Remove all intermediate files & build");
menu.Add(b, AK_CLEANUPPOUT, THISBACK(CleanUppOut))
.Help("Remove all files and subdirectories in the output & intermediate directory (see Base setup)");
// menu.MenuSeparator();
// menu.Add(b, AK_CREATEMAKEFILE, THISBACK(CreateMakefile))
// .Help("Create makefile enabling IDE-independent project building");
menu.MenuSeparator();
if(menu.IsMenuBar())
BuildPackageMenu(menu);
BuildFileMenu(menu);
menu.MenuSeparator();
menu.Add("Stop on errors", THISBACK(ToggleStopOnErrors))
.Check(stoponerrors)
.Help("Stop build after package when the package has errors");
menu.MenuSeparator();
bool ff = btabs.GetCursor() == BFINDINFILES;
String hh = ff ? "position" : "error line";
bool ffb = ff ? ffound.GetCount() : error.GetCount();
menu.Add(ffb, AK_FINDNEXTERROR, THISBACK(FindNextError))
.Help("Find next " + hh + "according to console pane");
menu.Add(ffb, AK_FINDPREVERROR, THISBACK(FindPrevError))
.Help("Find previous " + hh + "according to console pane");
#if defined(PLATFORM_WIN32) || defined(PLATFORM_POSIX)
menu.MenuSeparator();
menu.Add(!IsNull(target), AK_OPENOUTDIR, THISBACK(OpenOutputFolder));
#endif
}
示例3: HelpMenu
void Ide::HelpMenu(Bar& menu)
{
menu.Add(AK_BROWSETOPICS, IdeImg::help(), THISBACK(ShowTopics));
menu.Add(AK_SEARCHTOPICS, THISBACK(SearchTopics));
menu.Add(AK_BROWSETOPICS_WIN, IdeImg::help_win(), THISBACK(ShowTopicsWin));
menu.MenuSeparator();
menu.AddMenu("Get help / report bugs..", IdeImg::Go_forward(), callback1(LaunchWebBrowser, "http://www.ultimatepp.org/forums"));
menu.AddMenu("Online documentation..", IdeImg::Go_forward(), callback1(LaunchWebBrowser, "http://www.ultimatepp.org/www$uppweb$documentation$en-us.html"));
menu.AddMenu("Common information..", IdeImg::Go_forward(), callback1(LaunchWebBrowser, "http://www.ultimatepp.org/www$uppweb$community$en-us.html"));
menu.MenuSeparator();
menu.Add("About..", THISBACK(About));
}
示例4: trayMenu
void GoogleTranslatorDemo::trayMenu(Bar& CurrentBar) {
if(isHidden)
CurrentBar.Add(t_("Show application"), THISBACK(launch));
else
CurrentBar.Add(t_("Hide application"), THISBACK(hide));
CurrentBar.MenuSeparator();
MenuTextManagement(CurrentBar, true);
CurrentBar.MenuSeparator();
CurrentBar.Add(t_("Options"), THISBACK(Options));
CurrentBar.Add(AsString(t_("About")) + "...", THISBACK(About));
CurrentBar.Add(t_("Exit"), GoogleTranslatorDemoImg::ExitImg(), THISBACK(Exit));
}
示例5: FileBar
void UWord::FileBar(Bar& bar)
{
bar.Add("New", CtrlImg::new_doc(), THISBACK(New))
.Key(K_CTRL_N)
.Help("Open new window");
bar.Add("Open..", CtrlImg::open(), THISBACK(Open))
.Key(K_CTRL_O)
.Help("Open existing document");
bar.Add(editor.IsModified(), "Save", CtrlImg::save(), THISBACK(Save))
.Key(K_CTRL_S)
.Help("Save current document");
bar.Add("SaveAs", CtrlImg::save_as(), THISBACK(SaveAs))
.Help("Save current document with a new name");
bar.ToolGap();
bar.MenuSeparator();
bar.Add("Print..", CtrlImg::print(), THISBACK(Print))
.Key(K_CTRL_P)
.Help("Print document");
bar.Add("Export to PDF..", UWordImg::pdf(), THISBACK(Pdf))
.Help("Export document to PDF file");
if(bar.IsMenuBar()) {
if(lrufile().GetCount())
lrufile()(bar, THISBACK(OpenFile));
bar.Separator();
bar.Add("Exit", THISBACK(Destroy));
}
}
示例6: ItemBar
void LayoutDesigner::ItemBar(Bar& bar) {
int m = itemi.GetCount();
bar.Add(layouti >= 0, "New item", THISBACK(AddItem))
.Key(K_ENTER);
bar.Add(m, "Remove item", THISBACK(Delete))
.Key(K_DELETE);
bar.Add(m, "Move item up", THISBACK(MoveUp))
.Key(K_CTRL_UP);
bar.Add(m, "Move item down", THISBACK(MoveDown))
.Key(K_CTRL_DOWN);
bar.MenuSeparator();
bar.Add("Alignment", THISBACK(AlignBar));
bar.Add("Size", THISBACK(SizeBar));
bar.Add("Springs", THISBACK(SpringsBar));
bar.MenuSeparator();
bar.Add(m, "Matrix..", THISBACK(Matrix))
.Key(K_CTRL_M);
}
示例7: BrowseMenu
void Ide::BrowseMenu(Bar& menu)
{
if(!IsEditorMode()) {
if(menu.IsMenuBar()) {
menu.AddMenu(AK_NAVIGATOR, IdeImg::Navigator(), THISBACK(ToggleNavigator))
.Check(editor.IsNavigator());
menu.Add(AK_GOTO, THISBACK(SearchCode));
menu.Add(AK_GOTOGLOBAL, THISBACK(NavigatorDlg));
menu.Add(!designer, AK_JUMPS, THISBACK(ContextGoto));
menu.Add(!designer, AK_SWAPS, THISBACK(SwapS));
menu.Add(!designer, AK_ASSIST, callback(&editor, &AssistEditor::Assist));
menu.Add(!designer, AK_DCOPY, callback(&editor, &AssistEditor::DCopy));
menu.Add(!designer, AK_VIRTUALS, callback(&editor, &AssistEditor::Virtuals));
menu.Add(!designer, AK_THISBACKS, callback(&editor, &AssistEditor::Thisbacks));
menu.Add(!designer, AK_COMPLETE, callback(&editor, &AssistEditor::Complete));
menu.Add(!designer, AK_ABBR, callback(&editor, &AssistEditor::Abbr));
menu.Add(!designer, "Insert", THISBACK(InsertMenu));
menu.MenuSeparator();
}
menu.Add("Go back", IdeImg::AssistGoBack(), THISBACK1(History, -1))
.Key(K_ALT_LEFT)
.Enable(GetHistory(-1) >= 0);
menu.Add("Go forward", IdeImg::AssistGoForward(), THISBACK1(History, 1))
.Key(K_ALT_RIGHT)
.Enable(GetHistory(1) >= 0);
if(menu.IsMenuBar()) {
menu.MenuSeparator();
menu.Add("Check source files for changes", THISBACK(CheckCodeBase));
menu.Add("Reparse source files", THISBACK(RescanCode));
menu.MenuSeparator();
}
}
if(menu.IsMenuBar()) {
menu.AddMenu(AK_CALC, IdeImg::calc(), THISBACK1(ToggleBottom, BCALC))
.Check(IsBottomShown() && btabs.GetCursor() == BCALC);
menu.AddMenu(AK_QTF, IdeCommonImg::Qtf(), THISBACK(Qtf));
menu.AddMenu(!designer, AK_XML, IdeCommonImg::xml(), THISBACK(Xml));
menu.AddMenu(!designer, AK_JSON, IdeCommonImg::json(), THISBACK(Json));
menu.AddMenu(AK_DIRDIFF, DiffImg::DirDiff(), THISBACK(DoDirDiff));
}
}
示例8: BuildPackageMenu
void Ide::BuildPackageMenu(Bar& menu)
{
int pi = GetPackageIndex();
bool b = !IdeIsDebugLock() && idestate == EDITING && pi >= 0 && pi < IdeWorkspace().GetCount();
menu.Add(b, AK_BUILDPACKAGE, THISBACK(PackageBuild))
.Help("Build current package");
menu.Add(b, AK_CLEANPACKAGE, THISBACK(PackageClean))
.Help("Remove all intermediate files of the current package");
menu.MenuSeparator();
}
示例9: THISBACK
void Gdb_MI2::DebugBar(Bar& bar)
{
bar.Add("Stop debugging", DbgImg::StopDebug(), THISBACK(Stop)).Key(K_SHIFT_F5);
bar.Separator();
#ifdef PLATFORM_POSIX
bar.Add(!stopped, "Asynchronous break", THISBACK(AsyncBrk));
#endif
bool b = !IdeIsDebugLock();
bar.Add(b, "Step into", DbgImg::StepInto(), THISBACK1(Step, disas.HasFocus() ? "exec-step-instruction" : "exec-step")).Key(K_F11);
bar.Add(b, "Step over", DbgImg::StepOver(), THISBACK1(Step, disas.HasFocus() ? "exec-next-instruction" : "exec-next")).Key(K_F10);
bar.Add(b, "Step out", DbgImg::StepOut(), THISBACK1(Step, "exec-finish")).Key(K_SHIFT_F11);
bar.Add(b, "Run to", DbgImg::RunTo(), THISBACK(doRunTo)).Key(K_CTRL_F10);
bar.Add(b, "Run", DbgImg::Run(), THISBACK(Run)).Key(K_F5);
bar.MenuSeparator();
bar.Add(b, "Quick watch", THISBACK(QuickWatch)).Key(K_CTRL_Q);
bar.MenuSeparator();
bar.Add(b, "Copy backtrace", THISBACK(CopyStack));
bar.Add(b, "Copy dissassembly", THISBACK(CopyDisas));
}
示例10: DebugBar
void Pdb::DebugBar(Bar& bar)
{
bar.Add(AK_STOP, THISBACK(Stop));
bool b = !IdeIsDebugLock();
bar.Separator();
bar.Add(b, AK_STEPINTO, DbgImg::StepInto(), THISBACK1(Trace, false));
bar.Add(b, AK_STEPOVER, DbgImg::StepOver(), THISBACK1(Trace, true));
bar.Add(b, AK_STEPOUT, DbgImg::StepOut(), THISBACK(StepOut));
bar.Add(b, AK_RUNTO, DbgImg::RunTo(), THISBACK(DoRunTo));
bar.Add(b, AK_RUN, DbgImg::Run(), THISBACK(Run));
bar.Add(b, AK_SETIP, DbgImg::SetIp(), THISBACK(SetIp));
bar.Add(!b, AK_STOP, DbgImg::Stop(), THISBACK(BreakRunning));
bar.MenuSeparator();
bar.Add(b, AK_AUTOS, THISBACK1(SetTab, 0));
bar.Add(b, AK_LOCALS, THISBACK1(SetTab, 1));
bar.Add(b, AK_WATCHES, THISBACK1(SetTab, 2));
bar.Add(b, AK_CLEARWATCHES, THISBACK(ClearWatches));
bar.Add(b, AK_ADDWATCH, THISBACK(AddWatch));
bar.Add(b, AK_EXPLORER, THISBACK(DoExplorer));
bar.Add(b, AK_MEMORY, THISBACK1(SetTab, 4));
bar.MenuSeparator();
bar.Add(b, "Copy backtrace", THISBACK(CopyStack));
bar.Add(b, "Copy dissassembly", THISBACK(CopyDisas));
}
示例11: EditBar
void LayoutDesigner::EditBar(Bar& bar) {
bar.Add("Cut", CtrlImg::cut(), THISBACK(Cut))
.Key(K_CTRL_X);
bar.Add("Copy", CtrlImg::copy(), THISBACK(Copy))
.Key(K_CTRL_C);
bar.Add("Paste", CtrlImg::paste(), THISBACK(Paste))
.Key(K_CTRL_V);
bar.Add("Duplicate", THISBACK(Duplicate))
.Key(K_CTRL_D);
bar.Add("Delete", CtrlImg::remove(), THISBACK(Delete))
.Key(K_DELETE);
bar.MenuSeparator();
bar.Add("Select All", THISBACK(SelectAll))
.Key(K_CTRL_A);
}
示例12: DebugMenu
void Ide::DebugMenu(Bar& menu)
{
bool b = idestate == EDITING && !IdeIsDebugLock();
if(debugger) {
debugger->DebugBar(menu);
menu.MenuSeparator();
}
else {
if(console.IsRunning())
menu.Add("Stop !", THISBACK(StopDebug))
.Help("Stop controlled process");
if(menu.IsMenuBar())
menu.Add(AK_RUNOPTIONS, THISBACK(RunArgs))
.Help("Current directory, command line, stdout redirection");
menu.Add(b, AK_EXECUTE, IdeImg::execute(), THISBACK(BuildAndExecute))
.Help("Build and execute the application");
menu.Add(b, AK_DEBUG, IdeImg::debug_run(), THISBACK1(BuildAndDebug, false))
.Help("Build application & run debugger");
if(menu.IsMenuBar()) {
menu.Add(b, AK_DEBUGTO, THISBACK1(BuildAndDebug, true))
.Help("Build application & run to cursor in debugger");
menu.Add(b, AK_DEBUGEXT, THISBACK(BuildAndExtDebug))
.Help("Build application & run external debugger (see Base setup, default \"msdev.exe\")");
menu.Add(b, AK_DEBUGFILEEXT, THISBACK(BuildAndExtDebugFile))
.Help("Build application & run external debugger, trying to start with current file");
#ifdef PLATFORM_POSIX
if(IsValgrind())
menu.Add(b, AK_VALGRIND, THISBACK(Valgrind))
.Help("Build application & run in valgring");
#endif
menu.Separator();
}
}
if(menu.IsMenuBar()) {
menu.Add(!editfile.IsEmpty() /*&& !debuglock*/, AK_BREAKPOINT, THISBACK(DebugToggleBreak))
.Help("Set / clear breakpoint on current line");
menu.Add(!editfile.IsEmpty(), AK_CONDBREAKPOINT, THISBACK(ConditionalBreak))
.Help("Edit conditional breakpoint");
menu.Add(!editfile.IsEmpty() /*&& !debuglock*/, AK_CLEARBREAKPOINTS, THISBACK(DebugClearBreakpoints))
.Help("Clear all breakpoints");
menu.Separator();
menu.Add(target.GetCount() && FileExists(GetLogPath()), AK_OPENLOG, THISBACK(OpenLog));
}
}
示例13: FileBar
void LayoutDesigner::FileBar(Bar& bar) {
bar.Add("New", THISBACK(NewFile))
.Key(K_CTRL_N);
bar.Add("Open..", THISBACK(OpenFile))
.Key(K_CTRL_O);
bar.Add("Save", THISBACK(SaveFile))
.Key(K_CTRL_S);
bar.Add("Save as..", THISBACK(SaveFileAs));
LruList(bar);
bar.MenuSeparator();
bar.Add(
#ifdef flagIDERW
"Close"
#else
"Exit"
#endif
, THISBACK(CloseFile));
}
示例14: Project
void Ide::Project(Bar& menu)
{
if(menu.IsToolBar() && !debugger && !IsEditorMode())
{
mainconfiglist.Enable(idestate == EDITING);
buildmode.Enable(idestate == EDITING);
menu.Add(mainconfiglist, HorzLayoutZoom(180));
menu.Gap(4);
menu.Add(buildmode, HorzLayoutZoom(180));
menu.Separator();
}
if(!IsEditorMode()) {
WorkspaceWork::PackageMenu(menu);
menu.MenuSeparator();
menu.Add(AK_ORGANIZER, IdeImg::package_organizer(), THISBACK(EditWorkspace))
.Help("Package dependencies, compiler & linker options, output path override");
menu.Add(AK_CUSTOM, THISBACK(CustomSteps))
.Help("Building intermediate files using custom commands / applications");
if(menu.IsMenuBar())
menu.Add(AK_MAINCONFIG, IdeImg::main_package(), THISBACK(MainConfig))
.Help("Configuring compiler, operating system, output application parameters, custom flags");
menu.Separator();
menu.Add(AK_SYNCT, IdeImg::Language(), THISBACK1(SyncT, 0))
.Help("Synchronize all language translation files of current workspace");
menu.AddMenu(AK_TRIMPORT, IdeImg::Language(), THISBACK1(SyncT, 1))
.Help("Import runtime translation file");
menu.AddMenu(AK_TREXPORT, IdeImg::Language(), THISBACK1(SyncT, 2))
.Help("Export runtime translation file");
if(OldLang())
menu.Add("Convert s_ -> t_", THISBACK(ConvertST));
}
FilePropertiesMenu(menu);
if(!IsEditorMode()) {
if(svn_dirs) {
if(menu.IsMenuBar())
menu.Add("SVN", THISBACK(ProjectSvn));
else
menu.Add("SVN Synchronize everything..", IdeImg::svn(), THISBACK(SyncSvn));
}
}
}
示例15: RemovePackageMenu
void WorkspaceWork::RemovePackageMenu(Bar& bar)
{
if(bar.IsScanKeys() || bar.IsScanHelp() || !bar.IsMenuBar())
return;
String active = UnixPath(GetActivePackage());
int usecnt = 0;
for(int i = 0; i < package.GetCount(); i++) {
String pn = UnixPath(package[i].name);
Package prj;
String pp = PackagePath(pn);
prj.Load(pp);
for(int i = 0; i < prj.uses.GetCount(); i++)
if(UnixPath(prj.uses[i].text) == active) {
usecnt++;
bar.Add("Remove from '" + pn + '\'', THISBACK1(RemovePackage, pn))
.Help(NFormat("Remove package '%s' from uses section in '%s'", active, pp));
}
}
if(usecnt > 1) {
bar.MenuSeparator();
bar.Add("Remove all uses", THISBACK1(RemovePackage, String(Null)))
.Help(NFormat("Remove package '%s' from all uses in active project and its submodules", active));
}
}