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 GUISample1::InitToolbar(Bar& bar) { bar.Separator(); bar.Add(Imgs::Mimg1(), THISBACK(ToolbarClicked)); bar.Separator(); bar.Add(Imgs::Mimg1(), THISBACK(ToolbarClicked)); }
void DockBase::GroupMenu(Bar& bar) { TreeCtrl& tree = grouptab.grouptree; int id = tree.GetCursor(); if(id < 0) return; id = tree.GetParent(id); activegroup = (String) tree.GetValue(tree.GetCursor()); if(id >= 0) { if(id == 0 && tree.GetChildCount(id)) { bar.Add(Format(t_("Dock Group '%s'"), activegroup), THISBACK1(GroupDockMenu, 0)); bar.Add(Format(t_("AutoHide Group '%s'"), activegroup), THISBACK1(GroupDockMenu, 1)); bar.Add(Format(t_("Float Group '%s'"), activegroup), THISBACK3(GroupMenuAction, activegroup, 2, -1)); bar.Separator(); bar.Add(tree.GetChildCount(tree.GetCursor()) > 1, Format(t_("Tabify Group '%s' and..."), activegroup), THISBACK1(GroupTabifyMenu, 3)); bar.Separator(); bar.Add(activegroup != t_("Default"), Format(t_("Delete Group '%s'"), activegroup), THISBACK1(DeleteWidgetGroup, activegroup)); bar.Separator(); bar.Add(Format(t_("Close Group '%s'"), activegroup), DockCtrlImages::CClose(), THISBACK3(GroupMenuAction, activegroup, -1, -1)); } if(id > 0) { Vector<int> sel = tree.GetSel(); for(int i = 0; i < sel.GetCount(); i++) id = tree.Get(sel[i]); CtrlRecord* record = GetCtrlRecordFromId(id); ASSERT(record); record->ctrl->Menu(); } } else bar.Add(t_("Add New Group..."), THISBACK(OnAddNewGroup)); }
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 Ide::MainTool(Bar& bar) { if(!IsEditorMode()) { BrowseMenu(bar); if(!toolbar_in_row) bar.Separator(); } Edit(bar); if(debugger) { if(!designer) bar.Separator(); DebugMenu(bar); } if(!designer) bar.Separator(); Project(bar); BuildMenu(bar); if(!debugger) { bar.Separator(); DebugMenu(bar); } Setup(bar); bar.Separator(); HelpMenu(bar); }
// barTree context menu void XMLBarEditor::treeContextCb(Bar &b) { // if no toolbar selected in, no menu if(!bar) return; int i = barTree.GetCursor(); if(i < 0) return; if(i > 0) { b.Add(t_("Insert new item before current"), THISBACK1(treeContextAddCb, 1)); b.Add(t_("Insert new item after current"), THISBACK1(treeContextAddCb, 2)); b.Separator(); b.Add(t_("Insert new separator before current item"), THISBACK1(treeContextAddCb, 5)); b.Add(t_("Insert new separator after current item"), THISBACK1(treeContextAddCb, 6)); } if(barTree.GetChildCount(i)) { b.Separator(); b.Add(t_("Insert new child item at top"), THISBACK1(treeContextAddCb, 3)); b.Add(t_("Append new child item at bottom"), THISBACK1(treeContextAddCb, 4)); } else { b.Separator(); b.Add(t_("Insert new child item"), THISBACK1(treeContextAddCb, 4)); } if(i > 0) { b.Separator(); b.Add(t_("Remove item"), THISBACK(treeContextRemoveCb)); } }
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 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 Player::PopupListMenuBar(Bar &bar) { AddPlaylistBar(bar); bar.Separator(); list.RemovingMenu(bar); bar.Add(t_("Change playlist name"), THISBACK(ChangePlaylistName)).Key(K_ENTER); bar.Separator(); list.MovingMenu(bar); bar.Separator(); list.SelectMenu(bar); //list.ColumnsMenu(bar); }
void IconDes::MainToolBar(Bar& bar) { EditBar(bar); bar.Separator(); SelectBar(bar); bar.Separator(); ImageBar(bar); bar.Break(); DrawBar(bar); ToolEx(bar); bar.Separator(); SettingBar(bar); }
//меню файл void AnimeList::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("Close File", THISBACK(CloseFile)); bar.Separator(); bar.Add("Last File", THISBACK(OpenLastFile)); bar.Separator(); bar.Add("Print to File", CtrlImg::print(), THISBACK(PrintFile)); bar.Separator(); bar.Add("Exit", THISBACK(Quit)); }
void Pdb::WatchesMenu(Bar& bar) { String exp = watches.GetKey(); if(!IsNull(exp)) exp = "(" + exp + ")"; DataMenu(watches, bar, exp); bar.Separator(); bar.Add(AK_ADDWATCH, THISBACK(AddWatch)); bool b = watches.IsCursor(); bar.Add(b, "Edit watch..", THISBACK(EditWatch)); bar.Add(b, "Remove watch..", THISBACK(RemoveWatch)); bar.Separator(); watches.StdBar(bar); }
void DockWindow::DockWindowMenu(Bar &bar) { if (IsGrouping()) menu.GroupListMenu(bar); else menu.WindowListMenu(bar, t_("All")); if (dockers.GetCount()) bar.Separator(); if (layouts.GetCount()) { bar.Add(t_("Layouts"), callback(&menu, &DockMenu::LayoutListMenu)); bar.Separator(); } bar.Add(t_("Manage Windows..."), THISBACK(DockManager)); }
void Player::PopupMenuBar(Bar &bar) { GridCtrl &pl = GetPlaylist(); if(!IsCDPlaylist(pl)) { AddMusicBar(bar); bar.Separator(); pl.RemovingMenu(bar); bar.Separator(); } pl.MovingMenu(bar); bar.Separator(); pl.SelectMenu(bar); pl.ColumnsMenu(bar); }
void FormView::AddObjectMenu(Bar& bar, Point p) { bar.Add(t_("Button"), THISBACK2(CreateObject, p, "Button")); bar.Add(t_("EditField"), THISBACK2(CreateObject, p, "EditField")); bar.Add(t_("EditInt"), THISBACK2(CreateObject, p, "EditInt")); bar.Add(t_("DropDate"), THISBACK2(CreateObject, p, "DropDate")); bar.Separator(); bar.Add(t_("ProgressBar"), THISBACK2(CreateObject, p, "ProgressBar")); bar.Add(t_("Label"), THISBACK2(CreateObject, p, "Label")); bar.Separator(); bar.Add(t_("TabCtrl"), THISBACK2(CreateObject, p, "TabCtrl")); bar.Add(t_("GridCtrl"), THISBACK2(CreateObject, p, "GridCtrl")); bar.Separator(); bar.Add(t_("Form"), THISBACK2(CreateObject, p, "Form")); }
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 FormEdit::FileBar(Bar& bar) { bar.Add(t_("Create new form..."), FormEditImg::New(), THISBACK(NewFile)) .Tip(t_("Create new form...")); bar.Add(t_("Open form..."), FormEditImg::Open(), THISBACK(OpenFile)) .Tip(t_("Open form...")); bar.Separator(); bar.Add(t_("Save changes to file..."), FormEditImg::Save(), THISBACK(SaveFile)) .Enable(!IsProjectSaved() && _View.IsLayout()) .Tip(t_("Save changes to file...")); bar.Add(t_("Save form to another file..."), FormEditImg::SaveAs(), THISBACK(SaveAsFile)) .Enable(_View.IsLayout()) .Tip(t_("Save form to another file...")); bar.Separator(); bar.Add(t_("Quit"), THISBACK(Quit)); }
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 IconDes::ImageBar(Bar& bar) { using namespace IconDesKeys; Slot *c = IsCurrent() ? &Current() : NULL; if(c && c->supersampling) bar.Add(c, "Smooth resize 3x down", IconDesImg::ResizeDown(), THISBACK(ResizeDown)) .Key(AK_SUPERSAMPLING); else bar.Add(c && c->image.GetLength() < 256 * 256, "Resize 3x up (supersampling)", IconDesImg::ResizeUp(), THISBACK(ResizeUp)) .Key(AK_SUPERSAMPLING); bar.Separator(); bar.Add(c, AK_SETCOLOR, IconDesImg::SetColor(), THISBACK(SetColor)); bar.Add(c, AK_EMPTY, IconDesImg::Delete(), THISBACK(DoDelete)); bar.Add(c, AK_INTERPOLATE, IconDesImg::Interpolate(), THISBACK(Interpolate)); bar.Add(c, AK_HMIRROR, IconDesImg::MirrorX(), THISBACK(MirrorX)); bar.Add(c, AK_VMIRROR, IconDesImg::MirrorY(), THISBACK(MirrorY)); bar.Add(c, AK_HSYM, IconDesImg::SymmX(), THISBACK(SymmX)); bar.Add(c, AK_VSYM, IconDesImg::SymmY(), THISBACK(SymmY)); bar.Add(c, AK_ROTATE, IconDesImg::Rotate(), THISBACK(Rotate)); bar.Add(c, AK_FREE_ROTATE, IconDesImg::FreeRotate(), THISBACK(FreeRotate)); bar.Add(c, AK_RESCALE, IconDesImg::Rescale(), THISBACK(SmoothRescale)); bar.Add(c, AK_BLUR, IconDesImg::BlurSharpen(), THISBACK(BlurSharpen)); bar.Add(c, AK_COLORIZE, IconDesImg::Colorize(), THISBACK(Colorize)); bar.Add(c, AK_CHROMA, IconDesImg::Chroma(), THISBACK(Chroma)); bar.Add(c, AK_CONTRAST, IconDesImg::Contrast(), THISBACK(Contrast)); bar.Add(c, AK_ALPHA, IconDesImg::AlphaI(), THISBACK(Alpha)); bar.Add(c, AK_COLORS, IconDesImg::Colors(), THISBACK(Colors)); bar.Add(c, AK_SMOOTHEN, IconDesImg::Smoothen(), THISBACK(Smoothen)); }
void FormEdit::ViewBar(Bar& bar) { bar.Add(t_("Switch to as-is view..."), FormViewImg::ViewModeAsIs(), THISBACK1(SetViewMode, VIEW_MODE_AS_IS)) .Check(_ViewMode == VIEW_MODE_AS_IS).Enable(_View.IsLayout()) .Tip(t_("Switch to as-is view...")); bar.Add(t_("Switch to detailed view..."), FormViewImg::ViewModeInfo(), THISBACK1(SetViewMode, VIEW_MODE_INFO)) .Check(_ViewMode == VIEW_MODE_INFO).Enable(_View.IsLayout()) .Tip(t_("Switch to detailed view...")); bar.Add(t_("Switch to solid view..."), FormViewImg::ViewModeWireframe(), THISBACK1(SetViewMode, VIEW_MODE_WIREFRAME)) .Check(_ViewMode == VIEW_MODE_WIREFRAME).Enable(_View.IsLayout()) .Tip(t_("Switch to solid view...")); bar.Add(t_("Bind to grid..."), FormViewImg::GridBinding(), THISBACK2(ToggleFlag, "Grid.Binding", false)) .Check(GetFlag("Grid.Binding", false)).Enable(_View.IsLayout()) .Tip(t_("Bind to grid...")); bar.Add(t_("Coloring of the objects..."), FormEditImg::Coloring(), THISBACK(ToggleColoring)) .Check(GetFlag("View.Coloring", true)).Enable(_View.IsLayout()) .Tip(t_("Coloring of the objects...")); bar.Separator(); bar.Add(t_("Use system font..."), FormEditImg::FontZoom(), THISBACK(StdFontZoom)).Check(IsStandardZoom()) .Enable(_View.IsLayout()) .Tip(t_("Use system font...")); bar.Add(t_("Use larger font..."), FormEditImg::FontZoomStd(), THISBACK(SmallFontZoom)).Check(IsSmallZoom()) .Enable(_View.IsLayout()) .Tip(t_("Use larger font...")); bar.Add(t_("Use largest font..."), FormEditImg::FontZoomLarge(), THISBACK(LargeFontZoom)).Check(IsLargeZoom()) .Enable(_View.IsLayout()) .Tip(t_("Use largest font...")); }
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)); } }
void TopicEditor::Tools(Bar& bar) { bar.Add("Insert code item..", IdeCommonImg::InsertItem(), THISBACK(InsertItem)) .Key(K_CTRL_INSERT); String l = editor.GetFormatInfo().label; bool b = l.GetCount() > 2 && l != "noref"; bar.Add(b, "See referenced code", IdeCommonImg::Source(), THISBACK(JumpToDefinition)) .Key(K_ALT_J).Key(K_ALT_I); bar.Add("Find broken references..", IdeCommonImg::FindBrokenRef(), THISBACK(FindBrokenRef)) .Key(K_CTRL_F3); #ifdef REPAIR bar.Separator(); bar.Add("Repair!", CtrlImg::Toggle(), THISBACK(Repair)).Key(K_ALT_F5); bar.Separator(); #endif }
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 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 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)); } }
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 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)); }
void WorkspaceWork::PackageMenu(Bar& menu) { if(!menu.IsScanKeys()) { bool cando = !IsAux() && package.IsCursor(); String act = UnixPath(GetActivePackage()); menu.Add(cando, ~NFormat("Add package to '%s'", act), IdeImg::package_add(), THISBACK(AddNormalUses)); RemovePackageMenu(menu); if(menu.IsMenuBar()) { menu.Add(cando, "Rename package..", THISBACK(RenamePackage)); menu.Add(cando, "Delete package", THISBACK(DeletePackage)); menu.Separator(); menu.Add(cando, "Optimize for speed", THISBACK(TogglePackageSpeed)) .Check(actual.optimize_speed); menu.Separator(); BuildPackageMenu(menu); menu.Add("Open Package Directory",THISBACK(OpenPackageFolder)); } } }
void Ide::SetupMobilePlatforms(Bar& menu) { AndroidSDK androidSDK(androidSDKPath); if(androidSDK.Validate()) { menu.Separator(); menu.Add("Android", THISBACK1(SetupAndroidMobilePlatform, androidSDK)); } }
void CreateObjectMenu(Bar& bar) { int row = _ItemList.GetCurrentRow(); if (row < 0) return; bar.Add(t_("Edit"), GridImg::Modify(), _ItemList.StdEdit); if (!_ItemList.IsSelected()) return; bar.Separator(); _View.CreateObjectMenu(bar, row); }