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


C# Widget.ShowAll方法代码示例

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


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

示例1: StartPage

        //Pixbuf logoPixbuf;
        //Pixbuf bgPixbuf;
        //DrawingArea drawingArea;
        //        private Gdk.Pixbuf imagePb;
        //        private Gtk.Image image;
        public StartPage(string path)
        {
            //string file = System.IO.Path.Combine(MainClass.Paths.ResDir, "moscrif.png");
            //logoPixbuf = new Gdk.Pixbuf (file);

            //bgPixbuf = new Gdk.Pixbuf (file);
            editorAction = new Gtk.ActionGroup("startpage");
            this.fileName = path;
            control = new Gtk.ScrolledWindow();
            (control as Gtk.ScrolledWindow).ShadowType = Gtk.ShadowType.Out;
            eventBox = new StartEventControl();//new Gtk.EventBox();

            //(control as Gtk.ScrolledWindow).Add(eventBox);
            (control as Gtk.ScrolledWindow).AddWithViewport (eventBox);
            (control as Gtk.ScrolledWindow).FocusChain = new Widget[] { eventBox };

            control.ShowAll();

            //eventBox.ExposeEvent+= Expose;
            eventBox.ShowAll();
        }
开发者ID:moscrif,项目名称:ide,代码行数:26,代码来源:StartPage.cs

示例2: Initialize

		public void Initialize (IPadWindow window)
		{
			// Toolbar and menu definitions
			
			ActionCommand gotoCmd = new ActionCommand (LocalCommands.GoToFile, GettextCatalog.GetString ("Go to File"));
			ActionCommand propertiesCmd = new ActionCommand (LocalCommands.Properties, GettextCatalog.GetString ("Properties"), Gtk.Stock.Properties);
			
			menuSet = new CommandEntrySet ();
			menuSet.Add (gotoCmd);
			menuSet.AddSeparator ();
			menuSet.AddItem (DebugCommands.EnableDisableBreakpoint);
			menuSet.AddItem (DebugCommands.ClearAllBreakpoints);
			menuSet.AddItem (DebugCommands.DisableAllBreakpoints);
			menuSet.AddItem (EditCommands.DeleteKey);
			menuSet.AddSeparator ();
			menuSet.Add (propertiesCmd);
			
			CommandEntrySet toolbarSet = new CommandEntrySet ();
			toolbarSet.AddItem (DebugCommands.EnableDisableBreakpoint);
			toolbarSet.AddItem (DebugCommands.ClearAllBreakpoints);
			toolbarSet.AddItem (DebugCommands.DisableAllBreakpoints);
			toolbarSet.AddItem (EditCommands.Delete);
			toolbarSet.AddSeparator ();
			toolbarSet.Add (propertiesCmd);
			
			// The breakpoint list
			
			store = new TreeStore (typeof(string), typeof (bool), typeof(string), typeof(object), typeof(string), typeof(string), typeof(string), typeof(string));

			tree = new PadTreeView ();
			tree.Model = store;
			tree.RulesHint = true;
			tree.HeadersVisible = true;
			tree.DoPopupMenu = ShowPopup;
			tree.KeyPressEvent += OnKeyPressEvent;
			
			treeState = new TreeViewState (tree, (int) Columns.Breakpoint);
							
			TreeViewColumn col = new TreeViewColumn ();
			CellRenderer crp = new CellRendererIcon ();
			col.PackStart (crp, false);
			col.AddAttribute (crp, "stock_id", (int) Columns.Icon);
			tree.AppendColumn (col);
			
			Gtk.CellRendererToggle toggleRender = new Gtk.CellRendererToggle ();
			toggleRender.Toggled += new ToggledHandler (ItemToggled);
			col = new TreeViewColumn ();
			col.PackStart (toggleRender, false);
			col.AddAttribute (toggleRender, "active", (int) Columns.Selected);
			tree.AppendColumn (col);
			
			TreeViewColumn FrameCol = new TreeViewColumn ();
			CellRenderer crt = tree.TextRenderer;
			FrameCol.Title = GettextCatalog.GetString ("Name");
			FrameCol.PackStart (crt, true);
			FrameCol.AddAttribute (crt, "text", (int) Columns.FileName);
			FrameCol.Resizable = true;
			FrameCol.Alignment = 0.0f;
			tree.AppendColumn (FrameCol);

			col = tree.AppendColumn (GettextCatalog.GetString ("Condition"), crt, "text", (int) Columns.Condition);
			col.Resizable = true;
			
			col = tree.AppendColumn (GettextCatalog.GetString ("Trace Expression"), crt, "text", (int) Columns.TraceExp);
			col.Resizable = true;
			
			col = tree.AppendColumn (GettextCatalog.GetString ("Hit Count"), crt, "text", (int) Columns.HitCount);
			col.Resizable = true;
			
			col = tree.AppendColumn (GettextCatalog.GetString ("Last Trace"), crt, "text", (int) Columns.LastTrace);
			col.Resizable = true;
			
			sw = new Gtk.ScrolledWindow ();
			sw.ShadowType = ShadowType.None;
			sw.Add (tree);
			
			control = sw;
			
			control.ShowAll ();
			
			bps = DebuggingService.Breakpoints;
			
			UpdateDisplay ();

			breakpointUpdatedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointUpdated);
			breakpointRemovedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointRemoved);
			breakpointAddedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointAdded);
			breakpointChangedHandler = DispatchService.GuiDispatch<EventHandler> (OnBreakpointChanged);
			
			DebuggingService.Breakpoints.BreakpointAdded += breakpointAddedHandler;
			DebuggingService.Breakpoints.BreakpointRemoved += breakpointRemovedHandler;
			DebuggingService.Breakpoints.Changed += breakpointChangedHandler;
			DebuggingService.Breakpoints.BreakpointUpdated += breakpointUpdatedHandler;
			
			DebuggingService.PausedEvent += OnDebuggerStatusCheck;
			DebuggingService.ResumedEvent += OnDebuggerStatusCheck;
			DebuggingService.StoppedEvent += OnDebuggerStatusCheck;
			
			tree.RowActivated += OnRowActivated;
			
//.........这里部分代码省略.........
开发者ID:IBBoard,项目名称:monodevelop,代码行数:101,代码来源:BreakpointPad.cs

示例3: ShowMenu

		void ShowMenu ()
		{
			if (hoverIndex < 0)
				return;

			HideMenu ();

			menuWidget = createMenuForItem (hoverIndex);
			if (menuWidget == null)
				return;
			menuWidget.Hidden += delegate {
				
				menuVisible = false;
				QueueDraw ();
				
				//FIXME: for some reason the menu's children don't get activated if we destroy 
				//directly here, so use a timeout to delay it
				GLib.Timeout.Add (100, delegate {
					HideMenu ();
					return false;
				});
			};
			menuVisible = true;
			if (menuWidget is Menu) {
				((Menu)menuWidget).Popup (null, null, PositionFunc, 0, Gtk.Global.CurrentEventTime);
			} else {
				PositionWidget (menuWidget);
				menuWidget.ShowAll ();
			}
		}
开发者ID:msiyer,项目名称:Pinta,代码行数:30,代码来源:PathBar.cs

示例4: AddHelpPane

        void AddHelpPane()
        {
            VBox desc = new VBox (false, 0);

            descTitleLabel = new Label ();
            descTitleLabel.SetAlignment(0, 0);
            descTitleLabel.SetPadding (5, 2);
            descTitleLabel.UseMarkup = true;
            desc.PackStart (descTitleLabel, false, false, 0);

            ScrolledWindow textScroll = new ScrolledWindow ();
            textScroll.HscrollbarPolicy = PolicyType.Never;
            textScroll.VscrollbarPolicy = PolicyType.Automatic;

            desc.PackEnd (textScroll, true, true, 0);

            //TODO: Use label, but wrapping seems dodgy.
            descTextView = new TextView ();
            descTextView.WrapMode = WrapMode.Word;
            descTextView.WidthRequest = 1;
            descTextView.HeightRequest = 70;
            descTextView.Editable = false;
            descTextView.LeftMargin = 5;
            descTextView.RightMargin = 5;

            Pango.FontDescription font = Style.FontDescription.Copy ();
            font.Size = (font.Size * 8) / 10;
            descTextView.ModifyFont (font);

            textScroll.Add (descTextView);

            descFrame = desc;
            vpaned.Pack2 (descFrame, false, true);
            descFrame.ShowAll ();
            UpdateHelp ();
        }
开发者ID:modesto,项目名称:monoreports,代码行数:36,代码来源:PropertyGrid.cs

示例5: TaskListPad

		public TaskListPad ()
		{	
			VBox vbox = new VBox ();
			
			switcherComboList = new ListStore (typeof (string), typeof (ITaskListView), typeof (string));
			try
			{
				ExtensionNodeList viewCodons = AddinManager.GetExtensionNodes ("/MonoDevelop/Ide/TaskList/View", typeof (TaskListViewCodon));
				foreach (TaskListViewCodon codon in viewCodons)
				{
					switcherComboList.AppendValues (codon.Label, codon.View, codon.Class);
				}
			}
			catch (Exception e) // no codons loaded
			{
				LoggingService.LogError ("Loading of Task List Views failed: {0}", e.ToString ());
			}
			
			switcherCombo = new ComboBox (switcherComboList);
			CellRenderer cr = new CellRendererText ();
			switcherCombo.PackStart (cr, true);
			switcherCombo.AddAttribute (cr, "text", 0);
			
			sw = new MonoDevelop.Components.CompactScrolledWindow ();
			sw.ShadowType = ShadowType.None;
			
			vbox.Add (sw);
			
			control = vbox;
			control.ShowAll ();
			
			// Load from preferences which one was used last time
			string className =(string)PropertyService.Get ("Monodevelop.TaskList.ActiveView", "");
			int pos = 0, i = 0;
			foreach (object[] row in switcherComboList)
			{
				if ((string)row[2] == className)
				{
					pos = i;
					break;
				}
				i++;
			}
			switcherCombo.Active = pos; 
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:45,代码来源:TaskListPad.cs

示例6: LogView

		public LogView (string filepath, bool isDirectory, Revision [] history, Repository vc) 
			: base (Path.GetFileName (filepath) + " Log")
		{
			this.vc = vc;
			this.filepath = filepath;
			this.history = history;
			
			try {
				this.vinfo = vc.GetVersionInfo (filepath, false);
			}
			catch (Exception ex) {
				MessageService.ShowException (ex, GettextCatalog.GetString ("Version control command failed."));
			}

			// Widget setup
			
			VBox box = new VBox (false, 6);
			
			widget = box;

			// Create the toolbar
			commandbar = new Toolbar ();
			commandbar.ToolbarStyle = Gtk.ToolbarStyle.BothHoriz;
			commandbar.IconSize = Gtk.IconSize.Menu;
			box.PackStart (commandbar, false, false, 0);
				
			if (vinfo != null) {
				Gtk.ToolButton button = new Gtk.ToolButton (new Gtk.Image ("vc-diff", Gtk.IconSize.Menu), GettextCatalog.GetString ("View Changes"));
				button.IsImportant = true;
				if (isDirectory) {
					button.Clicked += new EventHandler (DirDiffButtonClicked);
					commandbar.Insert (button, -1);
				} else {
					button.Clicked += new EventHandler (DiffButtonClicked);
					commandbar.Insert (button, -1);
					
					button = new Gtk.ToolButton (new Gtk.Image (Gtk.Stock.Open, Gtk.IconSize.Menu), GettextCatalog.GetString ("View File"));
					button.IsImportant = true;
					button.Clicked += new EventHandler (ViewTextButtonClicked);
					commandbar.Insert (button, -1);
				}
			}
			
			revertButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert changes from this revision"));
			revertButton.IsImportant = true;
			revertButton.Sensitive = false;
			revertButton.Clicked += new EventHandler (RevertRevisionClicked);
			commandbar.Insert (revertButton, -1);
			
			revertToButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert to this revision"));
			revertToButton.IsImportant = true;
			revertToButton.Sensitive = false;
			revertToButton.Clicked += new EventHandler (RevertToRevisionClicked);
			commandbar.Insert (revertToButton, -1);

			
			// A paned with two trees
			
			Gtk.VPaned paned = new Gtk.VPaned ();
			box.PackStart (paned, true, true, 0);
			
			// Create the log list
			
			loglist = new TreeView ();
			ScrolledWindow loglistscroll = new ScrolledWindow ();
			loglistscroll.ShadowType = Gtk.ShadowType.In;
			loglistscroll.Add (loglist);
			loglistscroll.HscrollbarPolicy = PolicyType.Automatic;
			loglistscroll.VscrollbarPolicy = PolicyType.Automatic;
			paned.Add1 (loglistscroll);
			((Paned.PanedChild)paned [loglistscroll]).Resize = true;
			
			TreeView changedPaths = new TreeView ();
			ScrolledWindow changedPathsScroll = new ScrolledWindow ();
			changedPathsScroll.ShadowType = Gtk.ShadowType.In;
			changedPathsScroll.HscrollbarPolicy = PolicyType.Automatic;
			changedPathsScroll.VscrollbarPolicy = PolicyType.Automatic;
			changedPathsScroll.Add (changedPaths);
			paned.Add2 (changedPathsScroll);
			((Paned.PanedChild)paned [changedPathsScroll]).Resize = false;

			widget.ShowAll ();
			
			// Revision list setup
			
			CellRendererText textRenderer = new CellRendererText ();
			textRenderer.Yalign = 0;
			
			TreeViewColumn colRevNum = new TreeViewColumn (GettextCatalog.GetString ("Revision"), textRenderer, "text", 0);
			TreeViewColumn colRevDate = new TreeViewColumn (GettextCatalog.GetString ("Date"), textRenderer, "text", 1);
			TreeViewColumn colRevAuthor = new TreeViewColumn (GettextCatalog.GetString ("Author"), textRenderer, "text", 2);
			TreeViewColumn colRevMessage = new TreeViewColumn (GettextCatalog.GetString ("Message"), textRenderer, "text", 3);
			
			loglist.AppendColumn (colRevNum);
			loglist.AppendColumn (colRevDate);
			loglist.AppendColumn (colRevAuthor);
			loglist.AppendColumn (colRevMessage);
			
			ListStore logstore = new ListStore (typeof (string), typeof (string), typeof (string), typeof (string));
			loglist.Model = logstore;
//.........这里部分代码省略.........
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:101,代码来源:LogView.cs

示例7: ShowEditor

        private void ShowEditor(Editor editor)
        {
            SetupEditor (editor);
            current_editor = editor;

            buttons.Hide ();

            // Top label
            VBox vbox = new VBox (false, 4);
            Label label = new Label ();
            label.Markup = String.Format("<big><b>{0}</b></big>", editor.Label);
            vbox.PackStart (label, false, false, 5);

            // Optional config widget
            Widget config = editor.ConfigurationWidget ();
            if (config != null) {
                // This is necessary because GtkBuilder widgets need to be
                // reparented.
                if (config.Parent != null) {
                    config.Reparent (vbox);
                } else {
                    vbox.PackStart (config, false, false, 0);
                }
            }

            // Apply / Cancel buttons
            HButtonBox tool_buttons = new HButtonBox ();
            tool_buttons.LayoutStyle = ButtonBoxStyle.End;
            tool_buttons.Spacing = 5;
            tool_buttons.BorderWidth = 5;
            tool_buttons.Homogeneous = false;

            Button cancel = new Button (Stock.Cancel);
            cancel.Clicked += HandleCancel;
            tool_buttons.Add (cancel);

            Button apply = new Button (editor.ApplyLabel);
            apply.Image = new Image (GtkUtil.TryLoadIcon (FSpot.Core.Global.IconTheme, editor.IconName, 22, (Gtk.IconLookupFlags)0));
            apply.Clicked += delegate { Apply (editor); };
            tool_buttons.Add (apply);

            // Pack it all together
            vbox.PackEnd (tool_buttons, false, false, 0);
            active_editor = vbox;
            widgets.Add (active_editor);
            active_editor.ShowAll ();
        }
开发者ID:nathansamson,项目名称:F-Spot-Album-Exporter,代码行数:47,代码来源:EditorPage.cs

示例8: SwitchPage

        private void SwitchPage(Widget newPage)
        {
            Logger.DebugFormat("Switching to page {0}", newPage.GetType().Name);
            var viewBase = newPage as ViewBase;

            foreach (var view in MainUiContainer.Children.OfType<ViewBase>())
                view.Deactivated();
            if (MainUiContainer.Child != null)
                MainUiContainer.Remove(MainUiContainer.Child);
            MainUiContainer.Add(newPage);
            newPage.ShowAll();

            if(ButtonsUiContainer.Child!=null)
                ButtonsUiContainer.Remove(ButtonsUiContainer.Child);

            if (viewBase != null)
            {
                ButtonsUiContainer.Add(viewBase.DetachableViewControlsContainer);
                viewBase.Activated();
            }

            TouchMPCGtk.Settings.Default.LastPage = newPage.GetType().Name;
            TouchMPCGtk.Settings.Default.Save();
        }
开发者ID:killwort,项目名称:touchmpc,代码行数:24,代码来源:MainWindow.cs

示例9: LogView

        public LogView(string filepath, bool isDirectory, RevisionDescription[] history, VersionControlSystem vc)
            : base(Path.GetFileName(filepath) + " Log")
        {
            this.vc = vc;
            this.filepath = filepath;

            ScrolledWindow scroller = new ScrolledWindow();
            Viewport viewport = new Viewport();
            VBox box = new VBox(false, 5);

            viewport.Add(box);
            scroller.Add(viewport);
            widget = scroller;

            foreach (RevisionDescription d in history) {
                RevItem revitem = new RevItem();
                revitem.Path = d.RepositoryPath;
                revitem.Rev = d.Revision;

                VBox item = new VBox(false, 1);

                HBox header_row = new HBox(false, 2);
                item.PackStart(header_row, false, false, 0);

                Label header = new Label(d.Revision + " -- " + d.Time + " -- " + d.Author);
                header.Xalign = 0;
                header_row.Add(header);

                if (!isDirectory) {
                    Button viewdiff = new Button("View Changes");
                    viewdiff.Clicked += new EventHandler(DiffButtonClicked);
                    header_row.Add(viewdiff);
                    buttons[viewdiff] = revitem;

                    Button viewtext = new Button("View File");
                    viewtext.Clicked += new EventHandler(ViewTextButtonClicked);
                    header_row.Add(viewtext);
                    buttons[viewtext] = revitem;
                }

                TextView message = new TextView();
                message.Editable = false;
                message.WrapMode = Gtk.WrapMode.WordChar;
                message.Buffer.Text = d.Message == "" ? "No message." : d.Message;
                item.PackStart(message, false, false, 0);

                box.PackStart(item, false, false, 0);
            }

            widget.ShowAll();
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:51,代码来源:Logs.cs

示例10: CreateControlFromInfo

		void CreateControlFromInfo ()
		{
			this.vc = info.Item.Repository;
			this.filepath = info.Item.Path;
			
			
			
			// Widget setup
			VBox box = new VBox (false, 6);
			
			widget = box;

			// Create the toolbar
			commandbar = new Toolbar ();
			commandbar.ToolbarStyle = Gtk.ToolbarStyle.BothHoriz;
			commandbar.IconSize = Gtk.IconSize.Menu;
			box.PackStart (commandbar, false, false, 0);
				
			if (vinfo != null) {
				Gtk.ToolButton button = new Gtk.ToolButton (new Gtk.Image ("vc-diff", Gtk.IconSize.Menu), GettextCatalog.GetString ("View Changes"));
				button.IsImportant = true;
				button.Clicked += new EventHandler (DiffButtonClicked);
				commandbar.Insert (button, -1);
				
				button = new Gtk.ToolButton (new Gtk.Image (Gtk.Stock.Open, Gtk.IconSize.Menu), GettextCatalog.GetString ("View File"));
				button.IsImportant = true;
				button.Clicked += new EventHandler (ViewTextButtonClicked);
				commandbar.Insert (button, -1);
			}
			
			revertButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert changes from this revision"));
			revertButton.IsImportant = true;
			revertButton.Sensitive = false;
			revertButton.Clicked += new EventHandler (RevertRevisionClicked);
			commandbar.Insert (revertButton, -1);
			
			revertToButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert to this revision"));
			revertToButton.IsImportant = true;
			revertToButton.Sensitive = false;
			revertToButton.Clicked += new EventHandler (RevertToRevisionClicked);
			commandbar.Insert (revertToButton, -1);

			
			// A paned with two trees
			
			Gtk.VPaned paned = new Gtk.VPaned ();
			box.PackStart (paned, true, true, 0);
			
			// Create the log list
			
			loglist = new TreeView ();
			ScrolledWindow loglistscroll = new ScrolledWindow ();
			loglistscroll.ShadowType = Gtk.ShadowType.In;
			loglistscroll.Add (loglist);
			loglistscroll.HscrollbarPolicy = PolicyType.Automatic;
			loglistscroll.VscrollbarPolicy = PolicyType.Automatic;
			paned.Add1 (loglistscroll);
			((Paned.PanedChild)paned [loglistscroll]).Resize = true;
			
			TreeView changedPaths = new TreeView ();
			ScrolledWindow changedPathsScroll = new ScrolledWindow ();
			changedPathsScroll.ShadowType = Gtk.ShadowType.In;
			changedPathsScroll.HscrollbarPolicy = PolicyType.Automatic;
			changedPathsScroll.VscrollbarPolicy = PolicyType.Automatic;
			changedPathsScroll.Add (changedPaths);
			paned.Add2 (changedPathsScroll);
			((Paned.PanedChild)paned [changedPathsScroll]).Resize = false;

			widget.ShowAll ();
			
			// Revision list setup
			
			CellRendererText textRenderer = new CellRendererText ();
			textRenderer.Yalign = 0;
			
			TreeViewColumn colRevNum = new TreeViewColumn (GettextCatalog.GetString ("Revision"), textRenderer, "text", 0);
			colRevNum.Resizable = true;
			TreeViewColumn colRevDate = new TreeViewColumn (GettextCatalog.GetString ("Date"), textRenderer, "text", 1);
			colRevDate.Resizable = true;
			TreeViewColumn colRevAuthor = new TreeViewColumn (GettextCatalog.GetString ("Author"), textRenderer, "text", 2);
			colRevAuthor.Resizable = true;
			TreeViewColumn colRevMessage = new TreeViewColumn (GettextCatalog.GetString ("Message"), textRenderer, "text", 3);
			colRevMessage.Resizable = true;
			
			loglist.AppendColumn (colRevNum);
			loglist.AppendColumn (colRevDate);
			loglist.AppendColumn (colRevAuthor);
			loglist.AppendColumn (colRevMessage);
			
			logstore = new ListStore (typeof (string), typeof (string), typeof (string), typeof (string));
			loglist.Model = logstore;

			// Changed paths list setup
			
			changedpathstore = new ListStore (typeof(Gdk.Pixbuf), typeof (string), typeof(Gdk.Pixbuf), typeof (string));
			changedPaths.Model = changedpathstore;
			
			TreeViewColumn colOperation = new TreeViewColumn ();
			CellRendererText crt = new CellRendererText ();
			var crp = new CellRendererPixbuf ();
//.........这里部分代码省略.........
开发者ID:pgoron,项目名称:monodevelop,代码行数:101,代码来源:LogView.cs

示例11: AddColumn

 /// <summary>
 /// Adds a new column with an explicit given widget.
 /// Make visible with UpdateColumns() at least.
 /// </summary>
 /// <param name="name">Name.</param>
 /// <param name="widget">Widget.</param>
 /// <param name="width">Width.</param>
 /// <param name="visible">If set to <c>true</c> visible.</param>
 public void AddColumn(int tag, string name, Widget widget, int width, bool visible, Pango.FontDescription fd = null)
 {
     if (visible)
     widget.ShowAll();
      AddColumn(name, widget, tag, width, layout: fd != null ? NewLayout(fd) : DefaultLayout);
 }
开发者ID:Michael--,项目名称:DockingFramework,代码行数:14,代码来源:VirtualListView.cs

示例12: Initialize

		protected override void Initialize (IPadWindow window)
		{
			Id = "MonoDevelop.Debugger.BreakpointPad";
			// Toolbar and menu definitions
			
			ActionCommand gotoCmd = new ActionCommand (LocalCommands.GoToFile, GettextCatalog.GetString ("Go to File"));
			ActionCommand propertiesCmd = new ActionCommand (LocalCommands.Properties, GettextCatalog.GetString ("Edit Breakpoint…"), Stock.Properties);
			
			menuSet = new CommandEntrySet ();
			menuSet.Add (propertiesCmd);
			menuSet.Add (gotoCmd);
			menuSet.AddSeparator ();
			menuSet.AddItem (DebugCommands.EnableDisableBreakpoint);
			menuSet.AddItem (DebugCommands.DisableAllBreakpoints);
			menuSet.AddSeparator ();
			menuSet.AddItem (EditCommands.DeleteKey);
			menuSet.AddItem (DebugCommands.ClearAllBreakpoints);
			
			CommandEntrySet toolbarSet = new CommandEntrySet ();
			toolbarSet.AddItem (DebugCommands.EnableDisableBreakpoint);
			toolbarSet.AddItem (DebugCommands.ClearAllBreakpoints);
			toolbarSet.AddItem (DebugCommands.DisableAllBreakpoints);
			toolbarSet.AddItem (EditCommands.Delete);
			toolbarSet.AddSeparator ();
			toolbarSet.Add (propertiesCmd);
			toolbarSet.AddSeparator ();
			toolbarSet.Add (new CommandEntry (DebugCommands.NewFunctionBreakpoint){ DisplayType = CommandEntryDisplayType.IconAndText });
			toolbarSet.Add (new CommandEntry (DebugCommands.NewCatchpoint){ DisplayType = CommandEntryDisplayType.IconAndText });
			
			// The breakpoint list
			
			store = new TreeStore (typeof(string), typeof (bool), typeof(string), typeof(object), typeof(string), typeof(string), typeof(string), typeof(string));
			SemanticModelAttribute modelAttr = new SemanticModelAttribute ("store__Icon", "store__Selected","store_FileName",
				"store_Breakpoint", "store_Condition", "store_TraceExp", "store_HitCount", "store_LastTrace");
			TypeDescriptor.AddAttributes (store, modelAttr);

			tree = new PadTreeView ();
			tree.Model = store;
			tree.RulesHint = true;
			tree.HeadersVisible = true;
			tree.DoPopupMenu = ShowPopup;
			tree.KeyPressEvent += OnKeyPressEvent;
			tree.Selection.Mode = SelectionMode.Multiple;
			
			treeState = new TreeViewState (tree, (int) Columns.Breakpoint);
							
			TreeViewColumn col = new TreeViewColumn ();
			CellRenderer crp = new CellRendererImage ();
			col.PackStart (crp, false);
			col.AddAttribute (crp, "stock_id", (int) Columns.Icon);
			tree.AppendColumn (col);
			
			Gtk.CellRendererToggle toggleRender = new Gtk.CellRendererToggle ();
			toggleRender.Toggled += new ToggledHandler (ItemToggled);
			col = new TreeViewColumn ();
			col.PackStart (toggleRender, false);
			col.AddAttribute (toggleRender, "active", (int) Columns.Selected);
			tree.AppendColumn (col);
			
			TreeViewColumn FrameCol = new TreeViewColumn ();
			CellRenderer crt = tree.TextRenderer;
			FrameCol.Title = GettextCatalog.GetString ("Name");
			FrameCol.PackStart (crt, true);
			FrameCol.AddAttribute (crt, "text", (int) Columns.FileName);
			FrameCol.Resizable = true;
			FrameCol.Alignment = 0.0f;
			tree.AppendColumn (FrameCol);

			col = tree.AppendColumn (GettextCatalog.GetString ("Condition"), crt, "text", (int) Columns.Condition);
			col.Resizable = true;
			
			col = tree.AppendColumn (GettextCatalog.GetString ("Trace Expression"), crt, "text", (int) Columns.TraceExp);
			col.Resizable = true;
			
			col = tree.AppendColumn (GettextCatalog.GetString ("Hit Count"), crt, "text", (int) Columns.HitCount);
			col.Resizable = true;
			
			col = tree.AppendColumn (GettextCatalog.GetString ("Last Trace"), crt, "text", (int) Columns.LastTrace);
			col.Resizable = true;
			
			sw = new Gtk.ScrolledWindow ();
			sw.ShadowType = ShadowType.None;
			sw.Add (tree);
			
			control = sw;
			
			control.ShowAll ();
			
			breakpoints = DebuggingService.Breakpoints;
			
			UpdateDisplay ();

			breakpoints.BreakpointAdded += OnBreakpointAdded;
			breakpoints.BreakpointRemoved += OnBreakpointRemoved;
			breakpoints.Changed += OnBreakpointChanged;
			breakpoints.BreakpointUpdated += OnBreakpointUpdated;
			
			DebuggingService.PausedEvent += OnDebuggerStatusCheck;
			DebuggingService.ResumedEvent += OnDebuggerStatusCheck;
			DebuggingService.StoppedEvent += OnDebuggerStatusCheck;
//.........这里部分代码省略.........
开发者ID:kdubau,项目名称:monodevelop,代码行数:101,代码来源:BreakpointPad.cs

示例13: add_tool

		public void add_tool(Widget w) {
			if(w is Button || w is ToggleButton) {
				w.HeightRequest = 30;
				((Button)w).Relief = ReliefStyle.None;
			} else if (w is ComboBox || w is ComboBoxEntry) {
				w.WidthRequest = 200;
				w.HeightRequest = 30;
			} else if (w is Label) {
				w.HeightRequest = 30;
			} else if (w is VSeparator) {
				w.HeightRequest = 30;
				w.WidthRequest = 5;
			}
			this.fixed1.Add(w);
			this.fixed1.Move(w,_nextx,_y);
			_nextx = _nextx + w.SizeRequest().Width + _spacing;
			w.ShowAll();
			w.EnterNotifyEvent += delegate(object o, EnterNotifyEventArgs args) {
				this.image1.TooltipText = ((Widget)o).TooltipText;
			};
			w.LeaveNotifyEvent += delegate(object o, LeaveNotifyEventArgs args) {
				this.image1.TooltipText = "";
			};
		}
开发者ID:Meticulus,项目名称:tactical,代码行数:24,代码来源:toolbar.cs


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