当前位置: 首页>>代码示例>>C#>>正文


C# MonoDevelop.Ide.Gui.Components.PadTreeView.AppendColumn方法代码示例

本文整理汇总了C#中MonoDevelop.Ide.Gui.Components.PadTreeView.AppendColumn方法的典型用法代码示例。如果您正苦于以下问题:C# MonoDevelop.Ide.Gui.Components.PadTreeView.AppendColumn方法的具体用法?C# MonoDevelop.Ide.Gui.Components.PadTreeView.AppendColumn怎么用?C# MonoDevelop.Ide.Gui.Components.PadTreeView.AppendColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MonoDevelop.Ide.Gui.Components.PadTreeView的用法示例。


在下文中一共展示了MonoDevelop.Ide.Gui.Components.PadTreeView.AppendColumn方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HelpTree

		public HelpTree () : base (GettextCatalog.GetString ("Help"), Gtk.Stock.Help)
		{
			tree_view = new MonoDevelop.Ide.Gui.Components.PadTreeView ();

			tree_view.AppendColumn ("name_col", tree_view.TextRenderer, "text", 0);
			tree_view.RowExpanded += new Gtk.RowExpandedHandler (RowExpanded);
			tree_view.Selection.Changed += new EventHandler (RowActivated);
			
			store = new TreeStore (typeof (string), typeof (Node));
			tree_view.Model = store;
			tree_view.HeadersVisible = false;
			
			scroller = new MonoDevelop.Components.CompactScrolledWindow ();
			scroller.ShadowType = Gtk.ShadowType.None;
			scroller.Add (tree_view);
			
			if (HelpService.HelpTree != null) {
				root_iter = store.AppendValues (GettextCatalog.GetString ("Mono Documentation"), HelpService.HelpTree);
				PopulateNode (root_iter);
	
				tree_view.ExpandRow (new TreePath ("0"), false);
				TreeIter child_iter;
			start:
				if (store.IterChildren (out child_iter, root_iter)) {
					do {
						if (!store.IterHasChild (child_iter)) {
							store.Remove (ref child_iter);
							goto start;
						}
					} while (store.IterNext (ref child_iter));
				}
			}
			Control.ShowAll ();
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:34,代码来源:MonodocTreePad.cs

示例2: TreeStore

        Widget IOutlinedDocument.GetOutlineWidget()
        {
            if (outlineTreeView != null)
                return outlineTreeView;

            outlineTreeStore = new TreeStore (typeof(object));

            outlineTreeView = new MonoDevelop.Ide.Gui.Components.PadTreeView (outlineTreeStore);

            var pixRenderer = new CellRendererImage ();
            pixRenderer.Xpad = 0;
            pixRenderer.Ypad = 0;

            outlineTreeView.TextRenderer.Xpad = 0;
            outlineTreeView.TextRenderer.Ypad = 0;

            TreeViewColumn treeCol = new TreeViewColumn ();
            treeCol.PackStart (pixRenderer, false);

            treeCol.SetCellDataFunc (pixRenderer, new TreeCellDataFunc (OutlineTreeIconFunc));
            treeCol.PackStart (outlineTreeView.TextRenderer, true);

            treeCol.SetCellDataFunc (outlineTreeView.TextRenderer, new TreeCellDataFunc (OutlineTreeTextFunc));
            outlineTreeView.AppendColumn (treeCol);

            outlineTreeView.HeadersVisible = false;

            outlineTreeView.Selection.Changed += delegate {
                JumpToDeclaration (false);
            };

            outlineTreeView.RowActivated += delegate {
                JumpToDeclaration (true);
            };

            this.lastCU = Document.ParsedDocument;

            outlineTreeView.Realized += delegate { RefillOutlineStore (); };
            UpdateSorting ();

            var sw = new CompactScrolledWindow ();
            sw.Add (outlineTreeView);
            sw.ShowAll ();
            return sw;
        }
开发者ID:ItsVeryWindy,项目名称:Mono-Cucumber,代码行数:45,代码来源:FeatureOutlineTextEditorExtension.cs

示例3: TestResultsPad

		public TestResultsPad ()
		{
			testService.TestSuiteChanged += new EventHandler (OnTestSuiteChanged);
			
			panel = new VBox ();
			
			// Results notebook
			
			book = new HPaned ();
			panel.PackStart (book, true, true, 0);
			panel.FocusChain = new Gtk.Widget [] { book };
			
			// Failures tree
			failuresTreeView = new MonoDevelop.Ide.Gui.Components.PadTreeView ();
			failuresTreeView.HeadersVisible = false;
			failuresStore = new TreeStore (typeof(Xwt.Drawing.Image), typeof(string), typeof(object), typeof(string), typeof(int));
			var pr = new CellRendererImage ();
			CellRendererText tr = new CellRendererText ();
			TreeViewColumn col = new TreeViewColumn ();
			col.PackStart (pr, false);
			col.AddAttribute (pr, "image", 0);
			col.PackStart (tr, false);
			col.AddAttribute (tr, "markup", 1);
			failuresTreeView.AppendColumn (col);
			failuresTreeView.Model = failuresStore;
		
			var sw = new MonoDevelop.Components.CompactScrolledWindow ();
			sw.ShadowType = ShadowType.None;
			sw.Add (failuresTreeView);
			book.Pack1 (sw, true, true);
			
			outputView = new MonoDevelop.Ide.Gui.Components.LogView.LogTextView ();
			outputView.Editable = false;
			bold = new TextTag ("bold");
			bold.Weight = Pango.Weight.Bold;
			outputView.Buffer.TagTable.Add (bold);
			sw = new MonoDevelop.Components.CompactScrolledWindow ();
			sw.ShadowType = ShadowType.None;
			sw.Add (outputView);
			book.Pack2 (sw, true, true);
			outputViewScrolled = sw;
			
			failuresTreeView.RowActivated += OnRowActivated;
			failuresTreeView.Selection.Changed += OnRowSelected;
			failuresTreeView.DoPopupMenu = delegate (EventButton evt) {
				IdeApp.CommandService.ShowContextMenu (failuresTreeView, evt,
					"/MonoDevelop/NUnit/ContextMenu/TestResultsPad");
			};
			
			Control.ShowAll ();
			
			outputViewScrolled.Hide ();
		}
开发者ID:brantwedel,项目名称:monodevelop,代码行数:53,代码来源:TestResultsPad.cs

示例4: typeof

		Gtk.Widget IOutlinedDocument.GetOutlineWidget ()
		{
			if (outlineTreeView != null)
				return outlineTreeView;
			
			outlineTreeStore = new Gtk.TreeStore (typeof(string), typeof (Gdk.Color), typeof (Mono.TextTemplating.ISegment));
			outlineTreeView = new MonoDevelop.Ide.Gui.Components.PadTreeView (outlineTreeStore);
			outlineTreeView.Realized += delegate { RefillOutlineStore (); };
			
			outlineTreeView.TextRenderer.Xpad = 0;
			outlineTreeView.TextRenderer.Ypad = 0;
			outlineTreeView.AppendColumn ("Node", outlineTreeView.TextRenderer, "text", 0, "foreground-gdk", 1);
			
			outlineTreeView.HeadersVisible = false;
			
			outlineTreeView.Selection.Changed += delegate {
				Gtk.TreeIter iter;
				if (!outlineTreeView.Selection.GetSelected (out iter))
					return;
				SelectSegment ((Mono.TextTemplating.ISegment )outlineTreeStore.GetValue (iter, 2));
			};
			
			RefillOutlineStore ();
			var sw = new MonoDevelop.Components.CompactScrolledWindow ();;
			sw.Add (outlineTreeView);
			sw.ShowAll ();
			return sw;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:28,代码来源:T4EditorExtension.cs

示例5: TreeStore

		Widget MonoDevelop.DesignerSupport.IOutlinedDocument.GetOutlineWidget ()
		{
			if (outlineTreeView != null)
				return outlineTreeView;

			outlineTreeStore = new TreeStore (typeof(object));
			outlineTreeModelSort = new TreeModelSort (outlineTreeStore);
			
			settings = ClassOutlineSettings.Load ();
			comparer = new ClassOutlineNodeComparer (GetAmbience (), settings, outlineTreeModelSort);

			outlineTreeModelSort.SetSortFunc (0, comparer.CompareNodes);
			outlineTreeModelSort.SetSortColumnId (0, SortType.Ascending);

			outlineTreeView = new MonoDevelop.Ide.Gui.Components.PadTreeView (outlineTreeStore);

			var pixRenderer = new CellRendererPixbuf ();
			pixRenderer.Xpad = 0;
			pixRenderer.Ypad = 0;

			outlineTreeView.TextRenderer.Xpad = 0;
			outlineTreeView.TextRenderer.Ypad = 0;

			TreeViewColumn treeCol = new TreeViewColumn ();
			treeCol.PackStart (pixRenderer, false);

			treeCol.SetCellDataFunc (pixRenderer, new TreeCellDataFunc (OutlineTreeIconFunc));
			treeCol.PackStart (outlineTreeView.TextRenderer, true);

			treeCol.SetCellDataFunc (outlineTreeView.TextRenderer, new TreeCellDataFunc (OutlineTreeTextFunc));
			outlineTreeView.AppendColumn (treeCol);

			outlineTreeView.HeadersVisible = false;

			outlineTreeView.Selection.Changed += delegate {
				JumpToDeclaration (false);
			};
			
			outlineTreeView.RowActivated += delegate {
				JumpToDeclaration (true);
			};

			this.lastCU = Document.ParsedDocument;

			outlineTreeView.Realized += delegate { RefillOutlineStore (); };
			UpdateSorting ();

			var sw = new CompactScrolledWindow ();
			sw.Add (outlineTreeView);
			sw.ShowAll ();
			return sw;
		}
开发者ID:hduregger,项目名称:monodevelop,代码行数:52,代码来源:ClassOutlineTextEditorExtension.cs

示例6: CreateView

		void CreateView ()
		{
			if (view != null)
				return;
			
			ReloadPriorities ();
			
			ProjectDomService.CommentTasksChanged += OnCommentTasksChanged;
			ProjectDomService.SpecialCommentTagsChanged += OnCommentTagsChanged;
			IdeApp.Workspace.WorkspaceItemLoaded += OnWorkspaceItemLoaded;
			IdeApp.Workspace.WorkspaceItemUnloaded += OnWorkspaceItemUnloaded;
			
			highPrioColor = StringToColor ((string)PropertyService.Get ("Monodevelop.UserTasksHighPrioColor", ""));
			normalPrioColor = StringToColor ((string)PropertyService.Get ("Monodevelop.UserTasksNormalPrioColor", ""));
			lowPrioColor = StringToColor ((string)PropertyService.Get ("Monodevelop.UserTasksLowPrioColor", ""));

			store = new Gtk.ListStore (
				typeof (int),        // line
				typeof (string),     // desc
				typeof (string),     // file
				typeof (string),     // path
				typeof (Task),       // task
				typeof (Gdk.Color),  // foreground color
				typeof (int));       // font weight

			view = new MonoDevelop.Ide.Gui.Components.PadTreeView (store);
			view.RulesHint = true;
			view.SearchColumn = (int)Columns.Description;
			view.PopupMenu += new PopupMenuHandler (OnPopupMenu);
			view.ButtonPressEvent += new ButtonPressEventHandler (OnButtonPressed);
			view.RowActivated += new RowActivatedHandler (OnRowActivated);

			TreeViewColumn col;
			col = view.AppendColumn (GettextCatalog.GetString ("Line"), view.TextRenderer, "text", Columns.Line, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
			col.Clickable = false;

			col = view.AppendColumn (GettextCatalog.GetString ("Description"), view.TextRenderer, "text", Columns.Description, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
			col.Clickable = true;
			col.SortColumnId = (int)Columns.Description;
			col.Resizable = true;
			col.Clicked += new EventHandler (Resort);

			col = view.AppendColumn (GettextCatalog.GetString ("File"), view.TextRenderer, "text", Columns.File, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
			col.Clickable = true;
			col.SortColumnId = (int)Columns.File;
			col.Resizable = true;
			col.Clicked += new EventHandler (Resort);

			col = view.AppendColumn (GettextCatalog.GetString ("Path"), view.TextRenderer, "text", Columns.Path, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
			col.Clickable = true;
			col.SortColumnId = (int)Columns.Path;
			col.Resizable = true;
			col.Clicked += new EventHandler (Resort);

			LoadColumnsVisibility ();
			
			comments.BeginTaskUpdates ();
			try {
				foreach (var item in IdeApp.Workspace.Items) {
					LoadWorkspaceItemContents (item);
				}
			} finally {
				comments.EndTaskUpdates ();
			}

			comments.TasksAdded += (TaskEventHandler) DispatchService.GuiDispatch (new TaskEventHandler (GeneratedTaskAdded));
			comments.TasksRemoved += (TaskEventHandler) DispatchService.GuiDispatch (new TaskEventHandler (GeneratedTaskRemoved));

			PropertyService.PropertyChanged += (EventHandler<PropertyChangedEventArgs>) DispatchService.GuiDispatch (new EventHandler<PropertyChangedEventArgs> (OnPropertyUpdated));
			
			CreateMenu ();
			
			// Initialize with existing tags.
			foreach (Task t in comments)
				AddGeneratedTask (t);
		}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:76,代码来源:CommentTasksView.cs

示例7: TreeStore

		Widget MonoDevelop.DesignerSupport.IOutlinedDocument.GetOutlineWidget ()
		{
			if (outlineTreeView != null)
				return outlineTreeView;

			outlineTreeStore = new TreeStore (typeof(object));
			outlineTreeView = new MonoDevelop.Ide.Gui.Components.PadTreeView (outlineTreeStore);

			var pixRenderer = new CellRendererPixbuf ();
			pixRenderer.Xpad = 0;
			pixRenderer.Ypad = 0;

			outlineTreeView.TextRenderer.Xpad = 0;
			outlineTreeView.TextRenderer.Ypad = 0;

			TreeViewColumn treeCol = new TreeViewColumn ();
			treeCol.PackStart (pixRenderer, false);

			treeCol.SetCellDataFunc (pixRenderer, new TreeCellDataFunc (OutlineTreeIconFunc));
			treeCol.PackStart (outlineTreeView.TextRenderer, true);

			treeCol.SetCellDataFunc (outlineTreeView.TextRenderer, new TreeCellDataFunc (OutlineTreeTextFunc));
			outlineTreeView.AppendColumn (treeCol);

			outlineTreeView.HeadersVisible = false;
			
			outlineTreeView.Selection.Changed += delegate {
				TreeIter iter;
				if (!outlineTreeView.Selection.GetSelected (out iter))
					return;
				object o = outlineTreeStore.GetValue (iter, 0);
				int line = -1, col = -1;
				if (o is IType) {
					line = ((IType)o).BodyRegion.Start.Line;
					col = ((IType)o).BodyRegion.Start.Column;
				} else if (o is IMember) {
					line = ((IMember)o).BodyRegion.Start.Line;
					col = ((IMember)o).BodyRegion.Start.Column;
				}
				if (line > -1) {
					Editor.JumpTo (line, Math.Max (1, col));
				}
			};

			this.lastCU = Document.ParsedDocument;
			
			outlineTreeView.Realized += delegate { RefillOutlineStore (); };

			var sw = new CompactScrolledWindow ();
			sw.Add (outlineTreeView);
			sw.ShowAll ();
			return sw;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:53,代码来源:ClassOutlineTextEditorExtension.cs

示例8: CreateView

		void CreateView ()
		{
			if (view != null)
				return;
			
			ReloadPriorities ();
			
			TaskService.CommentTasksChanged += OnCommentTasksChanged;
			CommentTag.SpecialCommentTagsChanged += OnCommentTagsChanged;

			MonoDevelopWorkspace.LoadingFinished += OnWorkspaceItemLoaded;
			IdeApp.Workspace.WorkspaceItemUnloaded += OnWorkspaceItemUnloaded;
			IdeApp.Workspace.LastWorkspaceItemClosed += LastWorkspaceItemClosed;
			IdeApp.Workbench.DocumentOpened += WorkbenchDocumentOpened;
			IdeApp.Workbench.DocumentClosed += WorkbenchDocumentClosed;

			highPrioColor = StringToColor (IdeApp.Preferences.UserTasksHighPrioColor);
			normalPrioColor = StringToColor (IdeApp.Preferences.UserTasksNormalPrioColor);
			lowPrioColor = StringToColor (IdeApp.Preferences.UserTasksLowPrioColor);

			store = new Gtk.ListStore (
				typeof (int),        // line
				typeof (string),     // desc
				typeof (string),     // file
				typeof (string),     // path
				typeof (TaskListEntry),       // task
				typeof (Gdk.Color),  // foreground color
				typeof (int));       // font weight

			sortModel = new TreeModelSort (store);

			view = new MonoDevelop.Ide.Gui.Components.PadTreeView (sortModel);
			view.RulesHint = true;
			view.SearchColumn = (int)Columns.Description;
			view.DoPopupMenu = (evt) => IdeApp.CommandService.ShowContextMenu (view, evt, CreateMenu ());
			view.RowActivated += new RowActivatedHandler (OnRowActivated);

			TreeViewColumn col;
			col = view.AppendColumn (GettextCatalog.GetString ("Line"), view.TextRenderer, "text", Columns.Line, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
			col.Clickable = false;

			col = view.AppendColumn (GettextCatalog.GetString ("Description"), view.TextRenderer, "text", Columns.Description, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
			col.SortColumnId = (int)Columns.Description;
			col.Resizable = true;

			col = view.AppendColumn (GettextCatalog.GetString ("File"), view.TextRenderer, "text", Columns.File, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
			col.SortColumnId = (int)Columns.File;
			col.Resizable = true;

			col = view.AppendColumn (GettextCatalog.GetString ("Path"), view.TextRenderer, "text", Columns.Path, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
			col.SortColumnId = (int)Columns.Path;
			col.Resizable = true;

			LoadColumnsVisibility ();

			OnWorkspaceItemLoaded (null, EventArgs.Empty);

			comments.TasksAdded += GeneratedTaskAdded;
			comments.TasksRemoved += GeneratedTaskRemoved;

			PropertyService.PropertyChanged += OnPropertyUpdated;
			
			// Initialize with existing tags.
			foreach (TaskListEntry t in comments)
				AddGeneratedTask (t);

			view.Destroyed += delegate {
				view.RowActivated -= OnRowActivated;
				TaskService.CommentTasksChanged -= OnCommentTasksChanged;
				CommentTag.SpecialCommentTagsChanged -= OnCommentTagsChanged;
				MonoDevelopWorkspace.LoadingFinished -= OnWorkspaceItemLoaded;
				IdeApp.Workspace.WorkspaceItemUnloaded -= OnWorkspaceItemUnloaded;
				comments.TasksAdded -= GeneratedTaskAdded;
				comments.TasksRemoved -= GeneratedTaskRemoved;

				PropertyService.PropertyChanged -= OnPropertyUpdated;
			};
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:78,代码来源:CommentTasksView.cs

示例9: UserTasksView

		public UserTasksView ()
		{
			highPrioColor = StringToColor (IdeApp.Preferences.UserTasksHighPrioColor);
			normalPrioColor = StringToColor (IdeApp.Preferences.UserTasksNormalPrioColor);
			lowPrioColor = StringToColor (IdeApp.Preferences.UserTasksLowPrioColor);
			
			store = new ListStore (
				typeof (string),     // priority
				typeof (bool),		 // completed 
				typeof (string),     // desc
				typeof (TaskListEntry),	 // user task
				typeof (Gdk.Color),  // foreground color
				typeof (int));		 // font style

			sortModel = new TreeModelSort (store);

			view = new MonoDevelop.Ide.Gui.Components.PadTreeView (sortModel);
			view.RulesHint = true;
			view.SearchColumn = (int)Columns.Description;
			view.Selection.Changed += new EventHandler (SelectionChanged);
			TreeViewColumn col;
			
			CellRendererComboBox cellRendPriority = new CellRendererComboBox ();
			cellRendPriority.Values = priorities;
			cellRendPriority.Editable = true;
			cellRendPriority.Changed += new ComboSelectionChangedHandler (UserTaskPriorityEdited);
			col = view.AppendColumn (GettextCatalog.GetString ("Priority"), cellRendPriority, "text", Columns.Priority, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
			col.Resizable = true;
			col.SortColumnId = (int)Columns.Priority;
			
			CellRendererToggle cellRendCompleted = new CellRendererToggle ();
			cellRendCompleted.Toggled += new ToggledHandler (UserTaskCompletedToggled);
			cellRendCompleted.Activatable = true;
			col = view.AppendColumn (String.Empty, cellRendCompleted, "active", Columns.Completed);
			col.SortColumnId = (int)Columns.Completed;

			cellRendDesc = view.TextRenderer;
			cellRendDesc.Editable = true;
			cellRendDesc.Edited += new EditedHandler (UserTaskDescEdited);
			col = view.AppendColumn (GettextCatalog.GetString ("Description"), cellRendDesc, "text", Columns.Description, "strikethrough", Columns.Completed, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
			col.Resizable = true;
			col.SortColumnId = (int)Columns.Description;
			
			newButton = new Button ();
			newButton.Label = GettextCatalog.GetString ("New Task");
			newButton.Image = new ImageView (Gtk.Stock.New, IconSize.Menu);
			newButton.Image.Show ();
			newButton.Clicked += new EventHandler (NewUserTaskClicked); 
			newButton.TooltipText = GettextCatalog.GetString ("Create New Task");

			copyButton = new Button ();
			copyButton.Label = GettextCatalog.GetString ("Copy Task");
			copyButton.Image = new ImageView (Gtk.Stock.Copy, IconSize.Menu);
			copyButton.Image.Show ();
			copyButton.Clicked += CopyUserTaskClicked;
			copyButton.TooltipText = GettextCatalog.GetString ("Copy Task Description");
			
			delButton = new Button ();
			delButton.Label = GettextCatalog.GetString ("Delete Task");
			delButton.Image = new ImageView (Gtk.Stock.Delete, IconSize.Menu);
			delButton.Image.Show ();
			delButton.Clicked += new EventHandler (DeleteUserTaskClicked); 
			delButton.TooltipText = GettextCatalog.GetString ("Delete Task");

			TaskService.UserTasks.TasksChanged += UserTasksChanged;
			TaskService.UserTasks.TasksAdded += UserTasksChanged;
			TaskService.UserTasks.TasksRemoved += UserTasksChanged;
			
			if (IdeApp.Workspace.IsOpen)
				solutionLoaded = true;
			
			IdeApp.Workspace.FirstWorkspaceItemOpened += CombineOpened;
			IdeApp.Workspace.LastWorkspaceItemClosed += CombineClosed;

			IdeApp.Preferences.UserTasksLowPrioColor.Changed += OnPropertyUpdated;
			IdeApp.Preferences.UserTasksNormalPrioColor.Changed += OnPropertyUpdated;
			IdeApp.Preferences.UserTasksHighPrioColor.Changed += OnPropertyUpdated;
			ValidateButtons ();
			
			// Initialize with existing tags.
			UserTasksChanged (this, null);
		}
开发者ID:vvarshne,项目名称:monodevelop,代码行数:82,代码来源:UserTasksView.cs

示例10: TreeStore

		Widget IOutlinedDocument.GetOutlineWidget ()
		{
			if (outlineTreeView != null)
				return outlineTreeView;

			outlineTreeStore = new TreeStore (typeof(object));
			outlineTreeModelSort = new TreeModelSort (outlineTreeStore);
			
			settings = OutlineSettings.Load ();
			comparer = new OutlineNodeComparer (new AstAmbience (TypeSystemService.Workspace.Options), settings, outlineTreeModelSort);

			outlineTreeModelSort.SetSortFunc (0, comparer.CompareNodes);
			outlineTreeModelSort.SetSortColumnId (0, SortType.Ascending);

			outlineTreeView = new MonoDevelop.Ide.Gui.Components.PadTreeView (outlineTreeStore);

			var pixRenderer = new CellRendererImage ();
			pixRenderer.Xpad = 0;
			pixRenderer.Ypad = 0;

			outlineTreeView.TextRenderer.Xpad = 0;
			outlineTreeView.TextRenderer.Ypad = 0;

			TreeViewColumn treeCol = new TreeViewColumn ();
			treeCol.PackStart (pixRenderer, false);

			treeCol.SetCellDataFunc (pixRenderer, new TreeCellDataFunc (OutlineTreeIconFunc));
			treeCol.PackStart (outlineTreeView.TextRenderer, true);

			treeCol.SetCellDataFunc (outlineTreeView.TextRenderer, new TreeCellDataFunc (OutlineTreeTextFunc));
			outlineTreeView.AppendColumn (treeCol);

			outlineTreeView.HeadersVisible = false;

			outlineTreeView.Selection.Changed += delegate {
				JumpToDeclaration (false);
			};
			
			outlineTreeView.RowActivated += delegate {
				JumpToDeclaration (true);
			};

			var analysisDocument = DocumentContext.ParsedDocument;
			if (analysisDocument != null)
				lastCU = analysisDocument.GetAst<SemanticModel> ();

			outlineTreeView.Realized += delegate { RefillOutlineStore (); };
			UpdateSorting ();

			var sw = new CompactScrolledWindow ();
			sw.Add (outlineTreeView);
			sw.ShowAll ();
			return sw;
		}
开发者ID:powerumc,项目名称:monodevelop_korean,代码行数:54,代码来源:CSharpOutlineTextEditorExtension.cs

示例11: TestResultsPad

		public TestResultsPad ()
		{
			UnitTestService.TestSuiteChanged += new EventHandler (OnTestSuiteChanged);
			IdeApp.Workspace.WorkspaceItemClosed += OnWorkspaceItemClosed;

			panel = new VBox { Name = "testResultBox" };
			
			// Results notebook
			
			book = new HPaned ();
			panel.PackStart (book, true, true, 0);
			panel.FocusChain = new Gtk.Widget [] { book };

			// Failures tree
			failuresTreeView = new MonoDevelop.Ide.Gui.Components.PadTreeView { Name = "testResultsTree" };
			failuresTreeView.HeadersVisible = false;
			failuresStore = new TreeStore (typeof(Xwt.Drawing.Image), typeof(string), typeof(object), typeof(string), typeof(int), typeof(int));
			SemanticModelAttribute modelAttr = new SemanticModelAttribute ("store__Image", "store__Message","store__RootTest",
				"store__FileName", "store__FileNumber", "store__ErrorOrStackTrace");
			TypeDescriptor.AddAttributes (failuresStore, modelAttr);
			
			var pr = new CellRendererImage ();
			CellRendererText tr = new CellRendererText ();
			TreeViewColumn col = new TreeViewColumn ();
			col.PackStart (pr, false);
			col.AddAttribute (pr, "image", 0);
			col.PackStart (tr, false);
			col.AddAttribute (tr, "markup", 1);
			failuresTreeView.AppendColumn (col);
			failuresTreeView.Model = failuresStore;
		
			var sw = new MonoDevelop.Components.CompactScrolledWindow ();
			sw.ShadowType = ShadowType.None;
			sw.Add (failuresTreeView);
			book.Pack1 (sw, true, true);

			outputView = new MonoDevelop.Ide.Gui.Components.LogView.LogTextView { Name = "testResultOutput" };
			outputView.ModifyFont (FontService.MonospaceFont);
			outputView.Editable = false;
			bold = new TextTag ("bold");
			bold.Weight = Pango.Weight.Bold;
			outputView.Buffer.TagTable.Add (bold);
			sw = new MonoDevelop.Components.CompactScrolledWindow ();
			sw.ShadowType = ShadowType.None;
			sw.Add (outputView);
			book.Pack2 (sw, true, true);
			outputViewScrolled = sw;
			
			failuresTreeView.RowActivated += OnRowActivated;
			failuresTreeView.Selection.Changed += OnRowSelected;
			failuresTreeView.DoPopupMenu = delegate (EventButton evt) {
				IdeApp.CommandService.ShowContextMenu (failuresTreeView, evt,
					"/MonoDevelop/UnitTesting/ContextMenu/TestResultsPad");
			};
			
			panel.ShowAll ();
			
			outputViewScrolled.Hide ();
		}
开发者ID:pjcollins,项目名称:monodevelop,代码行数:59,代码来源:TestResultsPad.cs

示例12: Exception

		Widget IOutlinedDocument.GetOutlineWidget ()
		{
			if (outlineView != null)
				return outlineView;
				
			if (outlineStore == null)
				throw new Exception ("The treestore should be built, before initializing the TreeView of the DocumentOutline");
			
			outlineView = new MonoDevelop.Ide.Gui.Components.PadTreeView (outlineStore);
			System.Reflection.PropertyInfo prop = typeof(Gtk.TreeView).GetProperty ("EnableTreeLines");
			if (prop != null)
				prop.SetValue (outlineView, true, null);
			outlineView.TextRenderer.Xpad = 0;
			outlineView.TextRenderer.Ypad = 0;
			outlineView.ExpandAll ();
			outlineView.AppendColumn ("Node", outlineView.TextRenderer, new Gtk.TreeCellDataFunc (OutlineTreeDataFunc));
			outlineView.HeadersVisible = false;
			outlineView.Selection.Changed += delegate {
				Gtk.TreeIter iter = Gtk.TreeIter.Zero;
				outlineView.Selection.GetSelected (out iter);
				DocumentOutlineSelectionChanged (outlineStore.GetValue (iter, 0) as XNode);
			};
			
			var sw = new MonoDevelop.Components.CompactScrolledWindow ();
			sw.Add (outlineView);
			sw.ShowAll ();
				
			return sw;
		}
开发者ID:segaman,项目名称:monodevelop,代码行数:29,代码来源:AspNetEditViewContent.cs

示例13: UserTasksView

		public UserTasksView ()
		{
			highPrioColor = StringToColor ((string)PropertyService.Get ("Monodevelop.UserTasksHighPrioColor", ""));
			normalPrioColor = StringToColor ((string)PropertyService.Get ("Monodevelop.UserTasksNormalPrioColor", ""));
			lowPrioColor = StringToColor ((string)PropertyService.Get ("Monodevelop.UserTasksLowPrioColor", ""));
			
			store = new ListStore (
				typeof (string),     // priority
				typeof (bool),		 // completed 
				typeof (string),     // desc
				typeof (Task),	 // user task
				typeof (Gdk.Color),  // foreground color
				typeof (int));		 // font style
			
			view = new MonoDevelop.Ide.Gui.Components.PadTreeView (store);
			view.RulesHint = true;
			view.SearchColumn = (int)Columns.Description;
			view.Selection.Changed += new EventHandler (SelectionChanged);
			view.PopupMenu += new PopupMenuHandler (OnUserPopupMenu);
			view.ButtonPressEvent += new ButtonPressEventHandler (OnUserButtonPressed);
			
			TreeViewColumn col;
			
			CellRendererComboBox cellRendPriority = new CellRendererComboBox ();
			cellRendPriority.Values = priorities;
			cellRendPriority.Editable = true;
			cellRendPriority.Changed += new ComboSelectionChangedHandler (UserTaskPriorityEdited);
			col = view.AppendColumn (GettextCatalog.GetString ("Priority"), cellRendPriority, "text", Columns.Priority, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
			col.Clickable = true;
			col.Resizable = true;
			TreeIterCompareFunc sortFunc = new TreeIterCompareFunc (PrioirtySortFunc);
			store.SetSortFunc ((int)Columns.Priority, sortFunc);
			col.Clicked += new EventHandler (UserTaskPriorityResort);
			
			CellRendererToggle cellRendCompleted = new CellRendererToggle ();
			cellRendCompleted.Toggled += new ToggledHandler (UserTaskCompletedToggled);
			cellRendCompleted.Activatable = true;
			col = view.AppendColumn (String.Empty, cellRendCompleted, "active", Columns.Completed);
			col.Clickable = true;
			col.Clicked += new EventHandler (UserTaskCompletedResort);
			
			cellRendDesc = view.TextRenderer;
			cellRendDesc.Editable = true;
			cellRendDesc.Edited += new EditedHandler (UserTaskDescEdited);
			col = view.AppendColumn (GettextCatalog.GetString ("Description"), cellRendDesc, "text", Columns.Description, "strikethrough", Columns.Completed, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
			col.Clickable = true;
			col.Resizable = true;
			col.Clicked += new EventHandler (UserTaskDescResort);
			
			newButton = new Button ();
			newButton.Image = new Gtk.Image (Gtk.Stock.New, IconSize.Button);
			newButton.Label = GettextCatalog.GetString ("New Task");
			newButton.ImagePosition = PositionType.Left;
			newButton.Clicked += new EventHandler (NewUserTaskClicked); 
			newButton.TooltipText = GettextCatalog.GetString ("Create New Task");
			
			delButton = new Button (new Gtk.Image (Gtk.Stock.Delete, IconSize.Button));
			delButton.Clicked += new EventHandler (DeleteUserTaskClicked); 
			delButton.TooltipText = GettextCatalog.GetString ("Delete Task");

			TaskService.UserTasks.TasksChanged += (TaskEventHandler) DispatchService.GuiDispatch (new TaskEventHandler (UserTasksChanged));
			TaskService.UserTasks.TasksAdded += (TaskEventHandler) DispatchService.GuiDispatch (new TaskEventHandler (UserTasksChanged));
			TaskService.UserTasks.TasksRemoved += (TaskEventHandler) DispatchService.GuiDispatch (new TaskEventHandler (UserTasksChanged));
			
			IdeApp.Workspace.FirstWorkspaceItemOpened += CombineOpened;
			IdeApp.Workspace.LastWorkspaceItemClosed += CombineClosed;
			PropertyService.PropertyChanged += (EventHandler<PropertyChangedEventArgs>) DispatchService.GuiDispatch (new EventHandler<PropertyChangedEventArgs> (OnPropertyUpdated));	
			ValidateButtons ();
			// Initialize with existing tags.
			UserTasksChanged (this, null);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:71,代码来源:UserTasksView.cs

示例14: GetOutlineWidget

        public Gtk.Widget GetOutlineWidget()
        {
            if (TreeView != null)
                return TreeView;

            TreeStore = new TreeStore(typeof(object));
            /*
            settings = ClassOutlineSettings.Load();
            comparer = new ClassOutlineNodeComparer(GetAmbience(), settings, outlineTreeModelSort);

            outlineTreeModelSort.SetSortFunc(0, comparer.CompareNodes);
            outlineTreeModelSort.SetSortColumnId(0, SortType.Ascending);
            */
            TreeView = new MonoDevelop.Ide.Gui.Components.PadTreeView(TreeStore);

            var pixRenderer = new CellRendererPixbuf();
            pixRenderer.Xpad = 0;
            pixRenderer.Ypad = 0;

            TreeView.TextRenderer.Xpad = 0;
            TreeView.TextRenderer.Ypad = 0;

            TreeViewColumn treeCol = new TreeViewColumn();
            treeCol.PackStart(pixRenderer, false);

            treeCol.SetCellDataFunc(pixRenderer, new TreeCellDataFunc(OutlineTreeIconFunc));
            treeCol.PackStart(TreeView.TextRenderer, true);

            treeCol.SetCellDataFunc(TreeView.TextRenderer, new TreeCellDataFunc(OutlineTreeTextFunc));
            TreeView.AppendColumn(treeCol);

            TreeView.TextRenderer.Editable = true;
            TreeView.TextRenderer.Edited += new EditedHandler(nameCell_Edited);

            TreeView.HeadersVisible = false;

            TreeView.Selection.Changed += delegate
            {
                if (dontJumpToDeclaration || !outlineReady)
                    return;

                clickedOnOutlineItem = true;
                JumpToDeclaration(true);
                clickedOnOutlineItem = false;
            };

            TreeView.Realized += delegate { RefillOutlineStore(); };
            //UpdateSorting();

            var sw = new CompactScrolledWindow();
            sw.Add(TreeView);
            sw.ShowAll();
            return sw;
        }
开发者ID:simendsjo,项目名称:Mono-D,代码行数:54,代码来源:DModuleOutlineExtension.cs

示例15: TreeStore

		Widget MonoDevelop.DesignerSupport.IOutlinedDocument.GetOutlineWidget ()
		{
			if (outlineTreeView != null)
				return outlineTreeView;

			outlineTreeStore = new TreeStore (typeof(object));
			outlineTreeView = new MonoDevelop.Ide.Gui.Components.PadTreeView (outlineTreeStore);

			var pixRenderer = new CellRendererPixbuf ();
			pixRenderer.Xpad = 0;
			pixRenderer.Ypad = 0;

			outlineTreeView.TextRenderer.Xpad = 0;
			outlineTreeView.TextRenderer.Ypad = 0;

			TreeViewColumn treeCol = new TreeViewColumn ();
			treeCol.PackStart (pixRenderer, false);

			treeCol.SetCellDataFunc (pixRenderer, new TreeCellDataFunc (OutlineTreeIconFunc));
			treeCol.PackStart (outlineTreeView.TextRenderer, true);

			treeCol.SetCellDataFunc (outlineTreeView.TextRenderer, new TreeCellDataFunc (OutlineTreeTextFunc));
			outlineTreeView.AppendColumn (treeCol);

			outlineTreeView.HeadersVisible = false;
			
			outlineTreeView.Selection.Changed += delegate {
				TreeIter iter;
				if (!outlineTreeView.Selection.GetSelected (out iter))
					return;
				object o = outlineTreeStore.GetValue (iter, 0);
				
				IdeApp.ProjectOperations.JumpToDeclaration (o as INode);
			};

			this.lastCU = Document.ParsedDocument;
			
			outlineTreeView.Realized += delegate { RefillOutlineStore (); };

			var sw = new CompactScrolledWindow ();
			sw.Add (outlineTreeView);
			sw.ShowAll ();
			return sw;
		}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:44,代码来源:ClassOutlineTextEditorExtension.cs


注:本文中的MonoDevelop.Ide.Gui.Components.PadTreeView.AppendColumn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。