示例#1
0
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));
}
示例#2
0
void Ide::FilePropertiesMenu(Bar& menu)
{
	menu.Add(IsActiveFile(), AK_FILEPROPERTIES, THISBACK(FileProperties))
		.Help("File properties stored in package");
	menu.Add(IsActiveFile() && !designer, AK_SAVEENCODING, THISBACK(ChangeCharset))
	    .Help("Convert actual file to different encoding");
	menu.AddMenu(IsActiveFile() && !editfile_isfolder && !designer, AK_DIFF, IdeImg::Diff(), THISBACK(Diff))
	    .Help("Show differences between the project and arbitrary files");
	menu.AddMenu(IsActiveFile() && !editfile_isfolder && !designer, AK_PATCH, IdeImg::Patch(), THISBACK(Patch))
	    .Help("Show differences with patch file applied");
	if(editfile_svn)
		menu.AddMenu(IsActiveFile() && !editfile_isfolder && !designer, AK_SVNDIFF, IdeImg::SvnDiff(), THISBACK(SvnHistory))
		    .Help("Show svn history of file");
}
示例#3
0
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));
		}
	}
}
示例#4
0
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));
	}
}
示例#5
0
void Ide::File(Bar& menu)
{
	menu.Add(AK_SETMAIN, THISBACK(NewMainPackage))
		.Help("Select global configuration (var), select / add main project package");

	menu.AddMenu(AK_EDITFILE, CtrlImg::open(), THISBACK(EditAnyFile))
		.Help("Select any file in file selector and open it in editor");
	menu.AddMenu(!IsNull(GetOpposite()), AK_OPPOSITE, IdeImg::opposite(), THISBACK(GoOpposite))
		.Help("Switch between source and header file");
	menu.AddMenu(AK_SAVEFILE, CtrlImg::save(), THISBACK(DoSaveFile))
		.Help("Save current file");
	if(!designer)
		menu.AddMenu(CanToggleReadOnly(), AK_READONLY, IdeImg::read_only(), THISBACK(ToggleReadOnly))
			.Check(editor.IsReadOnly())
			.Help("Set / clear read-only flag for current file");

	menu.AddMenu(!designer, AK_PRINT, CtrlImg::print(), THISBACK(Print));

//	menu.Add("Export project", THISBACK(ExportProject))
//		.Help("Copy all project files into given directory");

	if(menu.IsMenuBar())
	{
		menu.Separator();
		menu.Add(AK_CLOSETAB, THISBACK(ClearTab))
		    .Help("Close the current file tab");
		menu.Add(AK_CLOSETABS, THISBACK(ClearTabs))
		    .Help("Close all file tabs");
		if(!designer) {
			menu.Add("Bookmarks", THISBACK(FileBookmark))
				.Help("Set one of available bookmarks (1..9, 0) on current file");
			menu.MenuSeparator();
		}
		menu.Add("Show/hide bottom pane", THISBACK(SwapBottom))
			.Check(IsBottomShown())
			.Key(K_ESCAPE)
			.Help("Show / hide bottom pane (with console, calc and browser tabs)");
	}

	menu.Add(AK_PACKAGESFILES, THISBACK(SwapPackagesFiles))
	    .Check(wesplit.GetZoom() != 1);

	menu.MenuSeparator();

	bool split = editorsplit.GetZoom() < 0;
	menu.Add(AK_SPLIT, THISBACK1(KeySplit, false))
	    .Check(split && editorsplit.IsVert());
	menu.Add(AK_VSPLIT, THISBACK1(KeySplit, true))
	    .Check(split && editorsplit.IsHorz());
	menu.Add(split, AK_SWAP, THISBACK(SwapEditors));

	menu.MenuSeparator();
	
	menu.Add(AK_OPENFILEDIR, THISBACK(OpenFileFolder));
	menu.MenuSeparator();

	menu.Add(AK_STATISTICS, THISBACK(Statistics))
		.Help("Display various statistics");

	menu.Add("Elapsed times..", THISBACK(Times));

	menu.Add(AK_EXIT, THISBACK(Exit));
}
示例#6
0
void WindowsList_::MenuCallback(Bar &bar){
	//Windows.SetClipboard(true,false);
	bar.AddMenu(true, "Copy", CtrlImg::copy(), THISBACK(CbCopy));
}