void TestApp::sigBar(Bar& bar) { bar.Add(b1, 60, 27); // bar.Gap(INT_MAX); bar.GapRight(); bar.Add(b2, 60, 27); }
void GUISample1::InitToolbar(Bar& bar) { bar.Separator(); bar.Add(Imgs::Mimg1(), THISBACK(ToolbarClicked)); bar.Separator(); bar.Add(Imgs::Mimg1(), THISBACK(ToolbarClicked)); }
void DockBase::GroupDockMenu(Bar& bar, int command) { if(IsSideAllowed(DockableCtrl::DOCK_TOP)) bar.Add(t_("Top"), THISBACK3(GroupMenuAction, activegroup, (int) command, (int)DockableCtrl::DOCK_TOP)); if(IsSideAllowed(DockableCtrl::DOCK_LEFT)) bar.Add(t_("Left"), THISBACK3(GroupMenuAction, activegroup, (int) command, (int)DockableCtrl::DOCK_LEFT)); if(IsSideAllowed(DockableCtrl::DOCK_RIGHT)) bar.Add(t_("Right"), THISBACK3(GroupMenuAction, activegroup, (int) command, (int)DockableCtrl::DOCK_RIGHT)); if(IsSideAllowed(DockableCtrl::DOCK_BOTTOM)) bar.Add(t_("Bottom"), THISBACK3(GroupMenuAction, activegroup, (int) command, (int)DockableCtrl::DOCK_BOTTOM)); }
void FormView::AlignObjectMenu(Bar& bar) { bar.Add(t_("Top "), THISBACK(AlignTopSelection)); bar.Add(t_("Left"), THISBACK(AlignLeftSelection)); bar.Add(t_("Right"), THISBACK(AlignRightSelection)); bar.Add(t_("Bottom "), THISBACK(AlignBottomSelection)); }
void Pdb::MemMenu(ArrayCtrl& array, Bar& bar, const String& exp) { if(bar.IsScanKeys()) return; CParser p(exp); try { Val v = Exp(p); bool sep = true; if(v.ref > 0) { if(sep) bar.Separator(); sep = false; bar.Add("Memory at " + exp, THISBACK1(MemoryGoto, exp)); } else if(v.rvalue) { if(sep) bar.Separator(); sep = false; bar.Add("Memory at 0x" + FormatIntHex((dword)GetInt(v)), THISBACK1(MemoryGoto, "&" + exp)); } if(!v.rvalue) { if(sep) bar.Separator(); sep = false; bar.Add("Memory at &&" + exp, THISBACK1(MemoryGoto, "&" + exp)); } } catch(CParser::Error e) { } }
void LayoutDesigner::SpringsBar(Bar& bar) { bool m = !itemi.IsEmpty(); int im = GetItemPosMask(); bar.Add(m, "Left", TB_SPRINGLEFT(), THISBACK1(ItemPos, MAKELONG(POS_LEFT, POS_NONE))) .Check(im & MAKELONG(1 << POS_LEFT, 0)); bar.Add(m, "Right", TB_SPRINGRIGHT(), THISBACK1(ItemPos, MAKELONG(POS_RIGHT, POS_NONE))) .Check(im & MAKELONG(1 << POS_RIGHT, 0)); bar.Add(m, "Horz size", TB_SPRINGHSIZE(), THISBACK1(ItemPos, MAKELONG(POS_SIZE, POS_NONE))) .Check(im & MAKELONG(1 << POS_SIZE, 0)); bar.Add(m, "Horz center", TB_SPRINGHCENTER(), THISBACK1(ItemPos, MAKELONG(POS_CENTER, POS_NONE))) .Check(im & MAKELONG(1 << POS_CENTER, 0)); bar.Separator(); bar.Add(m, "Top", TB_SPRINGTOP(), THISBACK1(ItemPos, MAKELONG(POS_NONE, POS_TOP))) .Check(im & MAKELONG(0, 1 << POS_TOP)); bar.Add(m, "Bottom", TB_SPRINGBOTTOM(), THISBACK1(ItemPos, MAKELONG(POS_NONE, POS_BOTTOM))) .Check(im & MAKELONG(0, 1 << POS_BOTTOM)); bar.Add(m, "Vert size", TB_SPRINGVSIZE(), THISBACK1(ItemPos, MAKELONG(POS_NONE, POS_SIZE))) .Check(im & MAKELONG(0, 1 << POS_SIZE)); bar.Add(m, "Vert center", TB_SPRINGVCENTER(), THISBACK1(ItemPos, MAKELONG(POS_NONE, POS_CENTER))) .Check(im & MAKELONG(0, 1 << POS_CENTER)); bar.Separator(); bar.Add(m, "Auto springs", TB_SPRINGAUTO(), THISBACK1(ItemPos, MAKELONG(POS_AUTO, POS_AUTO))) .Key(K_CTRL_R); bar.Add(m, "Topleft springs", TB_SPRINGTOPLEFT(), THISBACK1(ItemPos, MAKELONG(POS_LEFT, POS_TOP))) .Key(im == MAKELONG(1 << POS_LEFT, 1 << POS_TOP)); }
void FormEdit::CreateMenuBar(Bar& bar) { bar.Add(t_("File"), THISBACK(FileBar)); bar.Add(t_("Item"), THISBACK(ItemBar)); bar.Add(t_("Form"), THISBACK(FormBar)); bar.Add(t_("View"), THISBACK(ViewBar)); }
void Ide::ProjectSvn(Bar& menu) { Vector<String> w = SvnDirs(true); for(int i = 0; i < w.GetCount(); i++) menu.Add("Synchronize " + w[i], IdeImg::svn_dir(), THISBACK1(SyncSvnDir, w[i])); menu.Add("Synchronize everything..", IdeImg::svn(), THISBACK(SyncSvn)); }
void Puzzle::GameMenu(Bar& bar) { bar.Add(t_("New game"), THISBACK(New)); bar.Add(t_("Setup.."), THISBACK(Setup)); bar.Add(t_("Best scores.."), THISBACK(Scores)); bar.Separator(); bar.Add(t_("Exit"), Breaker()); }
void HelpWin::Tools(Bar& bar) { bar.Add(back.GetCount(), AK_BACK, back_1_16(), THISBACK(Back)); bar.Add(forward.GetCount(), AK_FORWARD, forward_1_16(), THISBACK(Forward)); bar.Gap(); bar.Add(AK_FONTSIZE, font_size_1_16(), THISBACK(FontSize)); bar.Gap(); bar.Add(AK_PRINT, commonImg::print_1_16(), THISBACK(Print)); }
void LayoutDesigner::MainBar(Bar& bar) { bar.Add("File", THISBACK(FileBar)); bar.Add("Edit", THISBACK(EditBar)); bar.Add("Layout", THISBACK(LayoutBar)); bar.Add("Language", THISBACK(LangBar)); bar.Add("Item", THISBACK(ItemBar)); bar.Add("Options", THISBACK(OptionsBar)); }
void SelectPackageDlg::PackageMenu(Bar& menu) { bool b = GetCurrentName().GetCount(); menu.Add("New package..", THISBACK(OnNew)); menu.Separator(); menu.Add(b, "Rename package..", THISBACK(RenamePackage)); menu.Add(b, "Delete package", THISBACK(DeletePackage)); }
void App::CommMenu(Bar& bar) { bar.Add(t_("On-line"), THISBACK(GoOnline)).Check(port.IsOpen()); bar.Add(port.IsOpen(), t_("Animation"), THISBACK(Animation)); bar.Separator(); bar.Add(port.IsOpen(), t_("Download"), AppImg::download_16(), THISBACK(DownloadMap)); bar.Add(port.IsOpen(), t_("Upload"), AppImg::upload_16(), THISBACK(UploadMap)); bar.Separator(); bar.Add(port.IsOpen(), t_("Verify"), AppImg::verify_16(), THISBACK(VerifyMap)); }
void FormEdit::FormBar(Bar& bar) { bar.Add(t_("Change form settings..."), FormViewImg::LayoutProperties(), THISBACK(OpenLayoutProperties)) .Enable(_View.IsLayout()) .Tip(t_("Change form settings...")); bar.Add(t_("Preview"), FormViewImg::Layout(), THISBACK(TestLayout)) .Enable(_View.IsLayout()) .Tip(t_("Preview")); }
void StyleManager::Menu(Bar& bar) { bar.Add(t_("Create new style.."), THISBACK(Create)) .Key(K_INSERT); bar.Add(t_("Remove style"), THISBACK(Remove)) .Key(K_DELETE); bar.Add(t_("Rename.."), callback(&list, &ArrayCtrl::DoEdit)) .Key(K_CTRL_ENTER); }
void App::SetupMenu(Bar& menu) { menu.Add(AK_ENGLISH, [=] { SetLang(LNGC_('E','N','U','S', CHARSET_UTF8)); }) .Radio(GetCurrentLanguage() == LNGC_('E','N','U','S', CHARSET_UTF8)); menu.Add(AK_CZECH, [=] { SetLang(LNGC_('C','S','C','Z', CHARSET_UTF8)); }) .Radio(GetCurrentLanguage() == LNGC_('C','S','C','Z', CHARSET_UTF8)); menu.Separator(); menu.Add(AK_KEYS, [=] { EditKeys(); }); }
void LayoutDesigner::OptionsBar(Bar& bar) { bar.Add("Alias map", THISBACK(SetupAlias)); bar.Add("Use grid", TB_GRID(), THISBACK(ToggleGrid)) .Check(usegrid); bar.Add("Grid settings..", THISBACK(SetupGrid)); bar.Add("Ignore min size", THISBACK(ToggleIgnoreMin)) .Check(ignoremin); bar.Add("QLIB2 output", THISBACK(ToggleQLIB2Output)) .Check(qlib2_output); }
void AddressBook::FileMenu(Bar& bar) { bar.Add("Open..", CtrlImg::open(), THISBACK(Open)); bar.Add("Save", CtrlImg::save(), THISBACK(Save)); bar.Add("Save as..", CtrlImg::save_as(), THISBACK(SaveAs)); bar.Separator(); bar.Add("Print", CtrlImg::print(), THISBACK(Print)); bar.Separator(); bar.Add("Quit", THISBACK(Quit)); }
void IdeIconDes::EditMenu(Bar& bar) { EditBar(bar); ToolEx(bar); bar.Add(IsSingleMode() ? "PNG" : "List", THISBACK(ListMenu)); bar.Add("Selection", THISBACK(SelectBar)); bar.Add("Image", THISBACK(ImageBar)); bar.Add("Draw", THISBACK(DrawBar)); bar.Add("Settings", THISBACK(SettingBar)); }
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(); }
void App::FileMenu(Bar& bar) { bar.Add(AK_NEWFILE, commonImg::new_1_16(), THISBACK(NewFile)).Enable(!workOpen); bar.Add(AK_OPENFILE, commonImg::open_1_16(), THISBACK(OpenFile)).Enable(!workOpen); bar.Add(AK_SAVE, THISBACK(SaveFile)).Enable(workOpen); bar.Add(AK_CLOSEFILE, commonImg::close_1_16(), THISBACK(CloseFile)).Enable(workOpen); //bar.Separator(); //bar.Add(AK_DELETEFILE, commonImg::delete_1_16(), THISBACK(DeleteFile)).Enable(!workOpen); bar.Separator(); bar.Add(AK_QUIT, commonImg::quit_1_16(), THISBACK(Quit)); }
// bar list context menu void XMLBarsEditor::barContextCb(Bar &bar) { // get current selection bar.Add(t_("Add new bar"), THISBACK(barContextAddCb)); int i = barListPane.barList.GetCursor(); if(i < 0) return; String barName = barListPane.barList.Get(i); bar.Add(Format(t_("Remove bar '%s'"), barName), THISBACK(barContextRemoveCb)); }
void Ide::Setup(Bar& menu) { menu.Add("Be verbose", THISBACK(ToggleVerboseBuild)) .Check(console.verbosebuild) .Help("Log detailed description of build and debug"); menu.Add("Environment..", THISBACK(SetupFormat)) .Help("Fonts, tabs, indentation, status bar"); menu.Add("Abbreviations..", THISBACK(Abbreviations)) .Help("Edit abbreviation keywords and code"); menu.Add("Keyboard shortcuts..", THISBACK(DoEditKeys)) .Help("Edit key bindings"); menu.Add("Build methods..", THISBACK(SetupBuildMethods)) .Help("Setup build methods"); #ifdef PLATFORM_WIN32 menu.Add("Automatic setup..", THISBACK(AutoSetup)) .Help("Automatic setup of build methods.."); #endif #ifdef PLATFORM_POSIX menu.Add("Source managment..", THISBACK(AutoSetup)) .Help("Source code updater settings.."); #endif if(menu.IsMenuBar()) SetupMobilePlatforms(menu); #ifdef PLATFORM_POSIX if(UpdaterCfg().method%2==0) { //local copy or svn menu.Separator(); if(UpdaterCfg().available) menu.Add("Install updates..", IdeImg::install_updates(), THISBACK(CheckUpdatesManual)) .Help("Install newer version of source codes.."); else menu.Add("Check for updates..", IdeImg::check_updates(), THISBACK(CheckUpdatesManual)) .Help("Check for availability of newer source codes.."); } #endif }
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)"); }
void IconDes::DrawBar(Bar& bar) { using namespace IconDesKeys; bool notpasting = !IsPasting(); bar.Add(AK_FREEHAND, IconDesImg::FreeHand(), THISBACK1(SetTool, &IconDes::FreehandTool)) .Check(tool == &IconDes::FreehandTool && notpasting); bar.Add(AK_LINES, IconDesImg::Lines(), THISBACK1(SetTool, &IconDes::LineTool)) .Check(tool == &IconDes::LineTool && notpasting); bar.Add(AK_ELLIPSES, IconDesImg::Circles(), THISBACK1(SetTool, &IconDes::EllipseTool)) .Check(tool == &IconDes::EllipseTool && notpasting); bar.Add(AK_EMPTY_ELLIPSES, IconDesImg::EmptyCircles(), THISBACK1(SetTool, &IconDes::EmptyEllipseTool)) .Check(tool == &IconDes::EmptyEllipseTool && notpasting); bar.Add(AK_RECTANGLES, IconDesImg::Rects(), THISBACK1(SetTool, &IconDes::RectTool)) .Check(tool == &IconDes::RectTool && notpasting); bar.Add(AK_EMPTY_RECTANGLES, IconDesImg::EmptyRects(), THISBACK1(SetTool, &IconDes::EmptyRectTool)) .Check(tool == &IconDes::EmptyRectTool && notpasting && !selectrect); bar.Add(AK_HOTSPOTS, IconDesImg::HotSpot(), THISBACK1(SetTool, &IconDes::HotSpotTool)) .Check(tool == &IconDes::HotSpotTool); bar.Add(AK_TEXT, IconDesImg::Text(), THISBACK(Text)) .Check(textdlg.IsOpen()); bar.Separator(); for(int i = 1; i <= 6; i++) bar.Add("Pen " + AsString(i), IconDesImg::Get(IconDesImg::I_Pen1 + i - 1), THISBACK1(SetPen, i)) .Check(pen == i) .Key(K_1 + i - 1); }
void MainWorkSpace::trayMenu(Bar& CurrentBar){ if(isHidden) CurrentBar.Add(t_("Show application"), THISBACK(launch)); else CurrentBar.Add(t_("Hide application"), THISBACK(hide)); CurrentBar.Add(t_("Minimize"), THISBACK1(Minimize, true)); CurrentBar.Add(t_("Maximize"), THISBACK1(Maximize, true)); //CurrentBar.Add(t_("Restore"), THISBACK(Restore)); CurrentBar.Add(AsString(t_("About")) + "...", THISBACK(About)); CurrentBar.Add(t_("Exit"), THISBACK(Exit)); }
void LayoutDesigner::Tool(Bar& bar) { EditBar(bar); // bar.Separator(); ItemBar(bar); bar.Separator(); OptionsBar(bar); bar.Break(); bar.Add(layoutlist, 200); bar.Gap(); bar.Add(langlist, 100); }
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)); }
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 }
void LayoutDesigner::LangBar(Bar& bar) { bar.Add("New language..", THISBACK(NewLanguage)); bar.Add(langlist.GetCount(), "Remove language", THISBACK(RemoveLanguage)); bar.Add(langlist.GetCount(), "Rename language..", THISBACK(RenameLanguage)); if(langlist.GetCount() > 1) { bar.Separator(); bar.Add("Previous language", THISBACK(PrevLang)) .Key(K_ALT_LEFT); bar.Add("Next language", THISBACK(NextLang)) .Key(K_ALT_RIGHT); } }