• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Components.CellRendererImage类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MonoDevelop.Components.CellRendererImage的典型用法代码示例。如果您正苦于以下问题:C# CellRendererImage类的具体用法?C# CellRendererImage怎么用?C# CellRendererImage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CellRendererImage类属于MonoDevelop.Components命名空间,在下文中一共展示了CellRendererImage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateFolderTreeViewColumns

		void CreateFolderTreeViewColumns ()
		{
			folderTreeStore = new TreeStore (typeof(string), typeof(string), typeof (Xwt.Drawing.Image));
			folderTreeView.Model = folderTreeStore;
			folderTreeView.Selection.SelectFunction = TreeViewSelection;
			folderTreeView.ShowExpanders = false;
			folderTreeView.LevelIndentation = 10;
			folderTreeView.CanFocus = false;

			SemanticModelAttribute modelAttr = new SemanticModelAttribute ("folderTreeStore__IconId", "folderTreeStore__NodeName", "folderTreeStore__Image");
			TypeDescriptor.AddAttributes (folderTreeStore, modelAttr);

			var column = new TreeViewColumn ();
			var iconRenderer = new CellRendererImage ();
			column.PackStart (iconRenderer, false);
			column.AddAttribute (iconRenderer, "stock-id", column: 0);
			column.AddAttribute (iconRenderer, "image", ImageColumn);

			var textRenderer = new CellRendererText ();
			textRenderer.Ellipsize = Pango.EllipsizeMode.Middle;
			column.PackStart (textRenderer, true);
			column.AddAttribute (textRenderer, "markup", TextColumn);

			folderTreeView.AppendColumn (column);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:25,代码来源:GtkProjectFolderPreviewWidget.cs


示例2: SelectSchemaWidget

		public SelectSchemaWidget ()
		{
			store = new ListStore (typeof (bool), typeof (ISchemaContainer));
			list = new TreeView (store);
			
			TreeViewColumn col = new TreeViewColumn ();

			CellRendererToggle toggleRenderer = new CellRendererToggle ();
			toggleRenderer.Activatable = true;
			toggleRenderer.Toggled += new ToggledHandler (ItemToggled);
			col.PackStart (toggleRenderer, false);
			
			var pixbufRenderer = new CellRendererImage ();
			col.PackStart (pixbufRenderer, false);

			CellRendererText textRenderer = new CellRendererText ();
			col.PackStart (textRenderer, true);

			col.SetCellDataFunc (textRenderer, new CellLayoutDataFunc (TextDataFunc));
			col.SetCellDataFunc (pixbufRenderer, new CellLayoutDataFunc (PixbufDataFunc));

			list.AppendColumn (col);
			list.HeadersVisible = false;
			
			this.Add (list);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:26,代码来源:SelectSchemaWidget.cs


示例3: CreateTreeViewColumn

		TreeViewColumn CreateTreeViewColumn ()
		{
			var column = new TreeViewColumn ();
			column.Spacing = 0;

			var dummyRenderer = new CellRendererImage ();
			dummyRenderer.Width = 1;
			dummyRenderer.Xpad = 0;
			column.PackStart (dummyRenderer, false);

			var checkBoxRenderer = new CellRendererToggle ();
			checkBoxRenderer.Toggled += PackageSourceCheckBoxToggled;
			checkBoxRenderer.Xpad = 7;
			checkBoxRenderer.Ypad = 12;
			checkBoxRenderer.Xalign = 0;
			checkBoxRenderer.Yalign = 0;
			column.PackStart (checkBoxRenderer, false);
			column.AddAttribute (checkBoxRenderer, "active", IsEnabledCheckBoxColumn);

			var iconRenderer = new CellRendererImage ();
			iconRenderer.StockSize = IconSize.Dnd;
			iconRenderer.Xalign = 0;
			iconRenderer.Xpad = 0;
			column.PackStart (iconRenderer, false);
			column.AddAttribute (iconRenderer, "icon-id", PackageSourceIconColumn);

			var packageSourceRenderer = new PackageSourceCellRenderer ();
			packageSourceRenderer.Mode = CellRendererMode.Activatable;
			column.PackStart (packageSourceRenderer, true);
			column.AddAttribute (packageSourceRenderer, "package-source", PackageSourceViewModelColumn);

			return column;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:33,代码来源:PackageSourcesWidget.cs


示例4: ProjectFileSelectorDialog

		public ProjectFileSelectorDialog (Project project, string defaultFilterName, string defaultFilterPattern, string [] buildActions)
		{
			this.project = project;
			this.defaultFilter = new SelectFileDialogFilter (defaultFilterName, defaultFilterPattern ?? "*");
			this.buildActions = buildActions;
			
			this.Build();
			
			projBuf = ImageService.GetIcon (project.StockIcon, IconSize.Menu);
			dirClosedBuf = ImageService.GetIcon (MonoDevelop.Ide.Gui.Stock.ClosedFolder, IconSize.Menu);
			dirOpenBuf = ImageService.GetIcon (MonoDevelop.Ide.Gui.Stock.OpenFolder, IconSize.Menu);
			
			TreeViewColumn projectCol = new TreeViewColumn ();
			projectCol.Title = GettextCatalog.GetString ("Project Folders");
			var pixRenderer = new CellRendererImage ();
			CellRendererText txtRenderer = new CellRendererText ();
			projectCol.PackStart (pixRenderer, false);
			projectCol.PackStart (txtRenderer, true);
			projectCol.SetCellDataFunc (pixRenderer, new TreeCellDataFunc (PixDataFunc));
			projectCol.SetCellDataFunc (txtRenderer, new TreeCellDataFunc (TxtDataFunc));
			projectTree.Model = dirStore;
			projectTree.AppendColumn (projectCol);
			TreeIter projectIter = dirStore.AppendValues ("", FilePath.Empty);
			InitDirs (projectIter);
			projectTree.ExpandAll ();
			projectTree.RowActivated += delegate {
				fileList.GrabFocus ();
			};
			projectTree.KeyPressEvent += ProjectListKeyPressEvent;
			
			TreeViewColumn fileCol = new TreeViewColumn ();
			var filePixRenderer = new CellRendererImage ();
			fileCol.Title = GettextCatalog.GetString ("Files");
			fileCol.PackStart (filePixRenderer, false);
			fileCol.PackStart (txtRenderer, true);
			fileCol.AddAttribute (filePixRenderer, "image", 1);
			fileCol.SetCellDataFunc (txtRenderer, new TreeCellDataFunc (TxtFileDataFunc));
			fileList.Model = fileStore;
			fileList.AppendColumn (fileCol);
			fileList.RowActivated += delegate {
				TreeIter iter;
				if (fileList.Selection.GetSelected (out iter))
					Respond (ResponseType.Ok);
			};
			fileList.KeyPressEvent += FileListKeyPressEvent;
			fileList.KeyReleaseEvent += FileListKeyReleaseEvent;
			
			TreeIter root;
			if (dirStore.GetIterFirst (out root))
				projectTree.Selection.SelectIter (root);
			
			UpdateFileList (null, null);
			
			projectTree.Selection.Changed += UpdateFileList;
			fileList.Selection.Changed += UpdateSensitivity;
			
			
			this.DefaultResponse = ResponseType.Cancel;
			this.Modal = true;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:60,代码来源:ProjectFileSelectorDialog.cs


示例5: EditBranchDialog

		public EditBranchDialog (GitRepository repo, string name, string tracking)
		{
			this.Build ();
			this.repo = repo;
			oldName = name;
			currentTracking = tracking;

			this.UseNativeContextMenus ();

			comboStore = new ListStore (typeof(string), typeof(Xwt.Drawing.Image), typeof (string), typeof(string));
			comboSources.Model = comboStore;
			var crp = new CellRendererImage ();
			comboSources.PackStart (crp, false);
			comboSources.AddAttribute (crp, "image", 1);
			var crt = new CellRendererText ();
			comboSources.PackStart (crt, true);
			comboSources.AddAttribute (crt, "text", 2);

			SemanticModelAttribute modelAttr = new SemanticModelAttribute ("comboStore__Branch", "comboStore__Icon", "comboStore__Name", "comboStore__Tracking");
			TypeDescriptor.AddAttributes (comboStore, modelAttr);

			foreach (Branch b in repo.GetBranches ()) {
				AddValues (b.FriendlyName, ImageService.GetIcon ("vc-branch", IconSize.Menu), "refs/heads/");
			}

			foreach (Remote r in repo.GetRemotes ()) {
				foreach (string b in repo.GetRemoteBranches (r.Name))
					AddValues (r.Name + "/" + b, ImageService.GetIcon ("vc-repository", IconSize.Menu), "refs/remotes/");
			}

			entryName.Text = name;
			checkTrack.Active = !string.IsNullOrEmpty (tracking);

			UpdateStatus ();
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:35,代码来源:EditBranchDialog.cs


示例6: IncludeNewFilesDialog

		public IncludeNewFilesDialog (string title, FilePath baseDirectory)
		{
			this.Build ();
			this.Title = title;
			this.baseDirectory = baseDirectory;
			
			treeviewFiles.Model = store;
			
			treeviewFiles.HeadersVisible = false; // Headers are untranslated because they're hidden as default
			
			TreeViewColumn textColumn = new TreeViewColumn ();
			
			CellRendererToggle toggleRender = new CellRendererToggle ();
			toggleRender.Toggled += ToggleRenderToggled;
			textColumn.PackStart (toggleRender, false);
			textColumn.AddAttribute (toggleRender, "active", Columns.IsToggled);
			
			textColumn.Title = "Name";
			var pixbufRenderer = new CellRendererImage ();
			textColumn.PackStart (pixbufRenderer, false);
			textColumn.AddAttribute (pixbufRenderer, "image", Columns.IconOpened);
			textColumn.AddAttribute (pixbufRenderer, "image-expander-open", Columns.IconOpened);
			textColumn.AddAttribute (pixbufRenderer, "image-expander-closed", Columns.IconClosed);
			
			CellRendererText textRenderer = new CellRendererText ();
			textColumn.PackStart (textRenderer, false);
			textColumn.AddAttribute (textRenderer, "text", Columns.Text);
			treeviewFiles.AppendColumn (textColumn);
			buttonExcludeAll.Clicked += ButtonExcludeAllClicked;
			buttonIncludeAll.Clicked += ButtonIncludeAllClicked;
			buttonOk.Clicked += ButtonOkClicked;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:32,代码来源:IncludeNewFilesDialog.cs


示例7: ProjectSelectorWidget

        public ProjectSelectorWidget()
        {
            this.Build();

            store = new TreeStore (typeof(string), typeof(string), typeof(object), typeof(bool), typeof(bool));
            tree.Model = store;

            tree.HeadersVisible = false;
            TreeViewColumn col = new TreeViewColumn ();
            Gtk.CellRendererToggle ctog = new CellRendererToggle ();
            ctog.Toggled += OnToggled;
            col.PackStart (ctog, false);
            var cr = new CellRendererImage ();
            col.PackStart (cr, false);
            Gtk.CellRendererText crt = new Gtk.CellRendererText();
            crt.Mode &= ~CellRendererMode.Activatable;
            col.PackStart (crt, true);
            col.AddAttribute (cr, "stock-id", 0);
            col.AddAttribute (crt, "markup", 1);
            col.AddAttribute (ctog, "active", 3);
            col.AddAttribute (ctog, "visible", 4);
            tree.AppendColumn (col);

            tree.Selection.Changed += HandleTreeSelectionChanged;
        }
开发者ID:Kalnor,项目名称:monodevelop,代码行数:25,代码来源:ProjectSelectorWidget.cs


示例8: MergeDialog

		public MergeDialog (GitRepository repo, bool rebasing)
		{
			this.Build ();

			this.UseNativeContextMenus ();

			this.repo = repo;
			this.rebasing = rebasing;

			store = new TreeStore (typeof(string), typeof(Xwt.Drawing.Image), typeof (string), typeof(string));
			tree.Model = store;

			var crp = new CellRendererImage ();
			var col = new TreeViewColumn ();
			col.PackStart (crp, false);
			col.AddAttribute (crp, "image", 1);
			var crt = new CellRendererText ();
			col.PackStart (crt, true);
			col.AddAttribute (crt, "text", 2);
			tree.AppendColumn (col);

			tree.Selection.Changed += HandleTreeSelectionChanged;

			if (rebasing) {
				labelHeader.Text = GettextCatalog.GetString ("Select the branch to which to rebase:");
				checkStage.Label = GettextCatalog.GetString ("Stash/unstash local changes before/after rebasing");
				buttonOk.Label = GettextCatalog.GetString ("Rebase");
			}

			checkStage.Active = true;

			Fill ();
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:33,代码来源:MergeDialog.cs


示例9: Initialize

		public void Initialize (TreeView treeView)
		{
			var column = new TreeViewColumn ();

			var toggleRenderer = new CellRendererToggle ();
			toggleRenderer.Toggled += ToggleRendererToggled;
			column.PackStart (toggleRenderer, false);
			column.AddAttribute (toggleRenderer, "active", 0);

			var pixbufRenderer = new CellRendererImage ();
			column.PackStart (pixbufRenderer, false);
			column.AddAttribute (pixbufRenderer, "image", 1);

			var textRenderer = new CellRendererText ();
			column.PackStart (textRenderer, true);
			column.AddAttribute (textRenderer, "text", 2);
			column.Expand = true;

			treeView.AppendColumn (column);
			foreach (object obj in GetValidMembers ()) {
				var member = obj as ISymbol;
				if (member != null) {
					Store.AppendValues (false, ImageService.GetIcon (member.GetStockIcon (), IconSize.Menu), member.ToDisplayString (Ambience.LabelFormat), member);
					continue;
				}

				var tuple = obj as Tuple<ISymbol, bool>;
				if (tuple != null) {
					Store.AppendValues (false, ImageService.GetIcon (tuple.Item1.GetStockIcon (), IconSize.Menu), tuple.Item1.ToDisplayString (Ambience.LabelFormat), tuple);
					continue;
				}
			}
			
			treeView.Model = store;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:35,代码来源:AbstractGenerateAction.cs


示例10: DeployDialog

		public DeployDialog (SolutionFolderItem defaultEntry, bool createBuilderOnly)
		{
			this.Build();
			notebook.ShowTabs = false;
			this.defaultEntry = defaultEntry;
			
			if (createBuilderOnly) {
				vboxSaveProject.Hide ();
				checkSave.Active = true;
				checkSave.Hide ();
				saveSeparator.Hide ();
			}
			else {
				pageSave.Hide ();
				FillProjectSelectors ();
			}
			
			store = new ListStore (typeof(Xwt.Drawing.Image), typeof(string), typeof(object));
			targetsTree.Model = store;
			
			targetsTree.HeadersVisible = false;
			CellRendererImage cr = new CellRendererImage();
			cr.Yalign = 0;
			targetsTree.AppendColumn ("", cr, "image", 0);
			targetsTree.AppendColumn ("", new Gtk.CellRendererText(), "markup", 1);
			
			targetsTree.Selection.Changed += delegate (object s, EventArgs a) {
				UpdateButtons ();
			};
			
			FillBuilders ();
			
			UpdateButtons ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:34,代码来源:DeployDialog.cs


示例11: SelectRenamedClassDialog

		public SelectRenamedClassDialog (IEnumerable<INamedTypeSymbol> classes)
		{
			XML glade = new XML (null, "gui.glade", "SelectRenamedClassDialog", null);
			glade.Autoconnect (this);
			
			store = new ListStore (typeof(Xwt.Drawing.Image), typeof(string));
			treeClasses.Model = store;
			
			TreeViewColumn column = new TreeViewColumn ();
		
			var pr = new CellRendererImage ();
			column.PackStart (pr, false);
			column.AddAttribute (pr, "image", 0);
			
			CellRendererText crt = new CellRendererText ();
			column.PackStart (crt, true);
			column.AddAttribute (crt, "text", 1);

			treeClasses.AppendColumn (column);
			
			foreach (var cls in classes) {
				var pic = ImageService.GetIcon (cls.GetStockIcon ());
				store.AppendValues (pic, cls.GetFullName ());
			}
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:25,代码来源:SelectRenamedClassDialog.cs


示例12: OpenLayoutWindow

        OpenLayoutWindow(MonoDevelop.Ide.CodeCompletion.CodeCompletionContext completionContext, Action<string> onSubmitted)
            : base(Gtk.WindowType.Toplevel)
        {
            _onSubmitted = onSubmitted;

            this.Build ();

            scrolledwindow1.Child = treeviewGenerateActions;
            scrolledwindow1.ShowAll ();

            treeviewGenerateActions.Cancel += delegate {
                Destroy ();
            };
            treeviewGenerateActions.Submit += delegate {
                if (String.IsNullOrEmpty(_selectedItem) == false) {
                    _onSubmitted(_selectedItem);
                }
                Destroy ();
            };

            WindowTransparencyDecorator.Attach (this);

            treeviewGenerateActions.HeadersVisible = false;
            treeviewGenerateActions.Model = optionsStore;
            TreeViewColumn column = new TreeViewColumn ();
            var pixbufRenderer = new CellRendererImage ();
            column.PackStart (pixbufRenderer, false);
            column.AddAttribute (pixbufRenderer, "image", 0);

            CellRendererText textRenderer = new CellRendererText ();
            column.PackStart (textRenderer, true);
            column.AddAttribute (textRenderer, "text", 1);
            column.Expand = true;
            treeviewGenerateActions.AppendColumn (column);

            treeviewGenerateActions.Selection.Changed += TreeviewGenerateActionsSelectionChanged;
            this.Remove (this.vbox1);
            BorderBox messageArea = new BorderBox ();
            messageArea.Add (vbox1);
            this.Add (messageArea);
            this.ShowAll ();

            int x = completionContext.TriggerXCoord;
            int y = completionContext.TriggerYCoord;

            int w, h;
            GetSize (out w, out h);

            int myMonitor = Screen.GetMonitorAtPoint (x, y);
            Gdk.Rectangle geometry = DesktopService.GetUsableMonitorGeometry (Screen, myMonitor);

            if (x + w > geometry.Right)
                x = geometry.Right - w;

            if (y + h > geometry.Bottom)
                y = y - completionContext.TriggerTextHeight - h;

            Move (x, y);
        }
开发者ID:matthewrdev,项目名称:xamarin-android-open-layout-definition,代码行数:59,代码来源:OpenLayoutWindow.cs


示例13: TranslationProjectOptionsDialog

		public TranslationProjectOptionsDialog (TranslationProject project)
		{
			this.project = project;
			this.Build();
			
			entryPackageName.Text        = project.PackageName;
			entryRelPath.Text            = project.RelPath;
			radiobuttonRelPath.Active    = project.OutputType == TranslationOutputType.RelativeToOutput;
			radiobuttonSystemPath.Active = project.OutputType == TranslationOutputType.SystemPath;
			
			entryPackageName.Changed += new EventHandler (UpdateInitString);
			entryRelPath.Changed += new EventHandler (UpdateInitString);
			radiobuttonRelPath.Activated += new EventHandler (UpdateInitString);
			radiobuttonSystemPath.Activated += new EventHandler (UpdateInitString);
			
			UpdateInitString (this, EventArgs.Empty);
			this.buttonOk.Clicked += delegate {
				project.PackageName = entryPackageName.Text;
				project.RelPath = entryRelPath.Text;
				if (radiobuttonRelPath.Active) {
					project.OutputType = TranslationOutputType.RelativeToOutput;
				} else {
					project.OutputType = TranslationOutputType.SystemPath;
				}
				this.Destroy ();
			};
			this.buttonCancel.Clicked += delegate {
				this.Destroy ();
			};
			
			store = new TreeStore (typeof(string), typeof(bool), typeof(string), typeof(SolutionFolderItem), typeof(bool));
			treeviewProjectList.Model = store;
			treeviewProjectList.HeadersVisible = false;
			
			TreeViewColumn col = new TreeViewColumn ();
			
			CellRendererToggle cellRendererToggle = new CellRendererToggle ();
			cellRendererToggle.Toggled += new ToggledHandler (ActiveToggled);
			cellRendererToggle.Activatable = true;
			col.PackStart (cellRendererToggle, false);
			col.AddAttribute (cellRendererToggle, "active", 1);
			col.AddAttribute (cellRendererToggle, "visible", 4);
			
			CellRendererImage crp = new CellRendererImage ();
			col.PackStart (crp, false);
			col.AddAttribute (crp, "stock_id", 0);
			
			CellRendererText crt = new CellRendererText ();
			col.PackStart (crt, true);
			col.AddAttribute (crt, "text", 2);
			
			treeviewProjectList.AppendColumn (col);
			
			FillTree (TreeIter.Zero, project.ParentSolution.RootFolder);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:55,代码来源:TranslationProjectOptionsDialog.cs


示例14: ThreadsPad

		public ThreadsPad ()
		{
			this.ShadowType = ShadowType.None;

			store = new TreeStore (typeof(string), typeof (string), typeof(string), typeof(object), typeof(int), typeof(string));

			tree = new PadTreeView (store);
			tree.RulesHint = true;
			tree.HeadersVisible = true;
			treeViewState = new TreeViewState (tree, (int)Columns.Object);
			
			TreeViewColumn col = new TreeViewColumn ();
			CellRenderer crp = new CellRendererImage ();
			col.PackStart (crp, false);
			col.AddAttribute (crp, "stock_id", (int) Columns.Icon);
			tree.AppendColumn (col);
				
			TreeViewColumn FrameCol = new TreeViewColumn ();
			FrameCol.Title = GettextCatalog.GetString ("Id");
			FrameCol.PackStart (tree.TextRenderer, true);
			FrameCol.AddAttribute (tree.TextRenderer, "text", (int) Columns.Id);
			FrameCol.AddAttribute (tree.TextRenderer, "weight", (int) Columns.Weight);
			FrameCol.Resizable = true;
			FrameCol.Alignment = 0.0f;
			tree.AppendColumn (FrameCol);

			col = new TreeViewColumn ();
			col.Title = GettextCatalog.GetString ("Name");
			col.Resizable = true;
			col.PackStart (tree.TextRenderer, false);
			col.AddAttribute (tree.TextRenderer, "text", (int) Columns.Name);
			col.AddAttribute (tree.TextRenderer, "weight", (int) Columns.Weight);
			tree.AppendColumn (col);

			col = new TreeViewColumn ();
			col.Title = GettextCatalog.GetString ("Location");
			col.Resizable = true;
			col.PackStart (tree.TextRenderer, false);
			col.AddAttribute (tree.TextRenderer, "text", (int) Columns.Location);
			col.AddAttribute (tree.TextRenderer, "weight", (int) Columns.Weight);
			tree.AppendColumn (col);
			
			Add (tree);
			ShowAll ();
			
			UpdateDisplay ();
			
			tree.RowActivated += OnRowActivated;
			DebuggingService.CallStackChanged += OnStackChanged;
			DebuggingService.PausedEvent += OnDebuggerPaused;
			DebuggingService.ResumedEvent += OnDebuggerResumed;
			DebuggingService.StoppedEvent += OnDebuggerStopped;
		}
开发者ID:newky2k,项目名称:monodevelop,代码行数:53,代码来源:ThreadsPad.cs


示例15: ComponentSelectorDialog

		public ComponentSelectorDialog ()
		{
			this.ApplyTheme ();
			this.Build();
			
			store = new TreeStore (typeof(bool), typeof(string), typeof(string), typeof(string), typeof(string), typeof(Xwt.Drawing.Image), typeof(ItemToolboxNode), typeof(bool), typeof(int));
			
			TreeViewColumn col;
			col = new TreeViewColumn ();
			Gtk.CellRendererToggle crt = new CellRendererToggle ();
			col.PackStart (crt, false);
			col.AddAttribute (crt, "active", ColChecked);
			col.AddAttribute (crt, "visible", ColShowCheck);
			crt.Toggled += OnToggleItem;
			col.SortColumnId = ColChecked;
			listView.AppendColumn (col);
			
			col = new TreeViewColumn ();
			col.Spacing = 3;
			col.Title = GettextCatalog.GetString ("Name");
			var crp = new CellRendererImage ();
			CellRendererText crx = new CellRendererText ();
			crx.Width = 150;
			col.PackStart (crp, false);
			col.PackStart (crx, false);
			col.AddAttribute (crp, "image", ColIcon);
			col.AddAttribute (crp, "visible", ColShowCheck);
			col.AddAttribute (crx, "text", ColName);
			col.AddAttribute (crx, "weight", ColBold);
			listView.AppendColumn (col);
			col.Resizable = true;
			col.SortColumnId = ColName;
			
			col = listView.AppendColumn (GettextCatalog.GetString ("Library"), new CellRendererText (), "text", ColLibrary);
			col.Resizable = true;
			col.SortColumnId = ColLibrary;
			
			col = listView.AppendColumn (GettextCatalog.GetString ("Location"), new CellRendererText (), "text", ColPath);
			col.Resizable = true;
			col.SortColumnId = ColPath;
			
			store.SetSortColumnId (ColName, SortType.Ascending);
			listView.SearchColumn = ColName;
			listView.Model = store;
			listView.SearchColumn = -1; // disable the interactive search

			foreach (ItemToolboxNode it in DesignerSupport.Service.ToolboxService.UserItems)
				currentItems [it] = it;

			comboType.AppendText (GettextCatalog.GetString ("All"));
			comboType.Active = 0;
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:52,代码来源:ComponentSelectorDialog.cs


示例16: ElementHelpWidget

//		IWorkbenchWindow workbenchWindow;
//		RegexToolkitWidget regexWidget;

		public ElementHelpWidget (IWorkbenchWindow workbenchWindow, RegexToolkitWidget regexWidget)
		{
//			this.workbenchWindow = workbenchWindow;
//			this.regexWidget = regexWidget;
			this.Build ();
			
			elementsStore = new Gtk.TreeStore (typeof(string), typeof(string), typeof(string), typeof(string));
			this.elementsTreeview.Model = this.elementsStore;
			this.elementsTreeview.HeadersVisible = false;
			this.elementsTreeview.Selection.Mode = SelectionMode.Browse;
			
			var col = new TreeViewColumn ();
			this.elementsTreeview.AppendColumn (col);
			var pix = new CellRendererImage ();
			var cellRendText = new CellRendererText ();
			
			col.PackStart (pix, false);
			col.AddAttribute (pix, "stock_id", 0);
			col.PackStart (cellRendText, false);
			
			col.AddAttribute (cellRendText, "text", 1);
			
			var cellRendText2 = new CellRendererText ();
			col.PackStart (cellRendText2, true);
			col.SetCellDataFunc (cellRendText2, ElementDescriptionFunc);
			
			
//			this.elementsTreeview.Selection.Changed += delegate {
//				ShowTooltipForSelectedEntry ();
//			};
//			this.elementsTreeview.MotionNotifyEvent += HandleMotionNotifyEvent;
			
			this.elementsTreeview.RowActivated += delegate (object sender, RowActivatedArgs e) {
				Gtk.TreeIter iter;
				if (elementsStore.GetIter (out iter, e.Path)) {
					string text = elementsStore.GetValue (iter, 3) as string;
					if (!System.String.IsNullOrEmpty (text)) {
						regexWidget.InsertText (text);
						workbenchWindow.SwitchView (0);
					}
				}
			};
			this.LeaveNotifyEvent += delegate {
				this.HideTooltipWindow ();
			};
			FillElementsBox ();
			Show ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:51,代码来源:ElementHelpWidget.cs


示例17: ProjectDirectoryComboBox

		public ProjectDirectoryComboBox ()
		{
			store = new TreeStore (typeof (Xwt.Drawing.Image), typeof (string), typeof (Project), typeof (string));
			
			var pixbuf = new CellRendererImage ();
			CellRendererText text = new CellRendererText ();

			this.PackStart (pixbuf, false);
			this.PackStart (text, false);
			this.AddAttribute (pixbuf, "image", 0);
			this.AddAttribute (text, "markup", 1);
			
			this.Model = store;
			
			PopulateCombo ();
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:16,代码来源:ProjectDirectoryComboBox.cs


示例18: RefactoringPreviewDialog

		public RefactoringPreviewDialog (IList<Change> changes)
		{
			this.Build ();
			this.changes = changes;
			treeviewPreview.Model = store;
			treeviewPreview.SearchColumn = -1; // disable the interactive search

			TreeViewColumn column = new TreeViewColumn ();

			// pixbuf column
			var pixbufCellRenderer = new CellRendererImage ();
			column.PackStart (pixbufCellRenderer, false);
			column.SetAttributes (pixbufCellRenderer, "image", pixbufColumn);
			column.AddAttribute (pixbufCellRenderer, "visible", statusVisibleColumn);
			
			// text column
			CellRendererText cellRendererText = new CellRendererText ();
			column.PackStart (cellRendererText, false);
			column.SetAttributes (cellRendererText, "text", textColumn);
			column.AddAttribute (cellRendererText, "visible", statusVisibleColumn);
			
			// location column
			CellRendererText cellRendererText2 = new CellRendererText ();
			column.PackStart (cellRendererText2, false);
			column.SetCellDataFunc (cellRendererText2, new TreeCellDataFunc (SetLocationTextData));
			
			CellRendererDiff cellRendererDiff = new CellRendererDiff ();
			column.PackStart (cellRendererDiff, true);
			column.SetCellDataFunc (cellRendererDiff, new TreeCellDataFunc (SetDiffCellData));

			treeviewPreview.AppendColumn (column);
			treeviewPreview.HeadersVisible = false;
			
			buttonCancel.Clicked += delegate {
				Destroy ();
			};
			
			buttonOk.Clicked += delegate {
				ProgressMonitor monitor = IdeApp.Workbench.ProgressMonitors.GetBackgroundProgressMonitor (this.Title, null);
				RefactoringService.AcceptChanges (monitor, changes);
				
				Destroy ();
			};
			
			FillChanges ();
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:46,代码来源:RefactoringPreviewDialog.cs


示例19: 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


示例20: PackageReferencePanel

        public PackageReferencePanel (SelectReferenceDialog selectDialog, bool showAll)
        {
            this.selectDialog = selectDialog;
			this.showAll = showAll;
			
            store = new ListStore (typeof (string), typeof (string), typeof (SystemAssembly), typeof (bool), typeof (string), typeof (string), typeof(IconId), typeof(int), typeof(ReferenceType));
            treeView = new TreeView (store);

            TreeViewColumn firstColumn = new TreeViewColumn ();
            CellRendererToggle tog_render = new CellRendererToggle ();
            tog_render.Toggled += new Gtk.ToggledHandler (AddReference);
            firstColumn.PackStart (tog_render, false);
            firstColumn.AddAttribute (tog_render, "active", ColSelected);

            treeView.AppendColumn (firstColumn);

            TreeViewColumn secondColumn = new TreeViewColumn ();
            secondColumn.Title = GettextCatalog.GetString ("Assembly");
			CellRendererImage crp = new CellRendererImage ();
            secondColumn.PackStart (crp, false);
            secondColumn.AddAttribute (crp, "icon-id", ColIcon);

            CellRendererText text_render = new CellRendererText ();
            secondColumn.PackStart (text_render, true);
            secondColumn.AddAttribute (text_render, "markup", ColName);

            treeView.AppendColumn (secondColumn);

            treeView.AppendColumn (GettextCatalog.GetString ("Version"), new CellRendererText (), "markup", ColVersion);
            treeView.AppendColumn (GettextCatalog.GetString ("Package"), new CellRendererText (), "text", ColPackage);

            treeView.Columns[1].Resizable = true;

            store.SetSortColumnId (0, SortType.Ascending);
            store.SetSortFunc (0, new TreeIterCompareFunc (Sort));

            ScrolledWindow sc = new ScrolledWindow ();
            sc.ShadowType = Gtk.ShadowType.In;
            sc.Add (treeView);
            this.PackStart (sc, true, true, 0);
            ShowAll ();
            BorderWidth = 6;
        }
开发者ID:hbons,项目名称:monodevelop,代码行数:43,代码来源:PackageReferencePanel.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Components.InfoBar类代码示例发布时间:2022-05-26
下一篇:
C# CodeGeneration.CodeGenerationOptions类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap