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


C# Toolbar.ShowAll方法代码示例

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


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

示例1: CombinedDesignView

		public CombinedDesignView (IViewContent content)
		{
			this.content = content;
			if (content is IEditableTextBuffer) {
				((IEditableTextBuffer)content).CaretPositionSet += delegate {
					ShowPage (0);
				};
			}
			content.ContentChanged += new EventHandler (OnTextContentChanged);
			content.DirtyChanged += new EventHandler (OnTextDirtyChanged);
			
			notebook = new Gtk.Notebook ();
			
			// Main notebook
			
			notebook.TabPos = Gtk.PositionType.Bottom;
			notebook.ShowTabs = false;
			notebook.ShowBorder = false;
			notebook.Show ();
			box = new VBox ();
			
			// Bottom toolbar
			
			toolbar = new Toolbar ();
			toolbar.IconSize = IconSize.SmallToolbar;
			toolbar.ToolbarStyle = ToolbarStyle.BothHoriz;
			toolbar.ShowArrow = false;
			
			CommandRouterContainer crc = new CommandRouterContainer (content.Control, content, true);
			crc.Show ();
			AddButton (GettextCatalog.GetString ("Source Code"), crc).Active = true;
			
			toolbar.ShowAll ();
			
			box.PackStart (notebook, true, true, 0);
			box.PackStart (toolbar, false, false, 0);
			
			box.Show ();
			
			IdeApp.Workbench.ActiveDocumentChanged += new EventHandler (OnActiveDocumentChanged);
			content.Control.Realized += delegate {
				if (content != null && content.WorkbenchWindow != null) 
					content.WorkbenchWindow.ActiveViewContent = notebook.CurrentPageWidget == content.Control ? content : this;
			};
			notebook.SwitchPage += delegate {
				if (content != null && content.WorkbenchWindow != null) 
					content.WorkbenchWindow.ActiveViewContent = notebook.CurrentPageWidget == content.Control ? content : this;
			};
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:49,代码来源:CombinedDesignView.cs

示例2: BuildToolbars

        private void BuildToolbars(IWorkspace workspace)
        {
            _toolBarBox.Remove(_toolBar);
			_toolBar.Destroy();		// make sure the old one is cleaned up!
            _toolBar = new Toolbar();
			_toolBar.ToolbarStyle = ToolbarStyle.Icons;
            _toolBarBox.PackStart(_toolBar, true, true, 0);
			_tooltips = new Tooltips();
			
			ActionModelRoot model = new ActionModelRoot("");
			//model.Merge(WorkstationModel.ToolManager.ToolbarModel);
			model.Merge(DesktopApplication.ToolSet.ToolbarModel);
			if(workspace != null) {
				//model.Merge(workspace.ToolManager.ToolbarModel);
				model.Merge(workspace.ToolSet.ToolbarModel);
			}
            GtkToolbarBuilder.BuildToolbar(_toolBar, _tooltips, model);
			
            _toolBar.ShowAll();
        }
开发者ID:nhannd,项目名称:Xian,代码行数:20,代码来源:MainWindow.cs

示例3: FillToolbar

        void FillToolbar()
        {
            Toolbar toolbar = new Toolbar ();
            toolbar.Orientation = Orientation.Vertical;
            toolbar.ToolbarStyle = ToolbarStyle.Icons;

            editimage = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-dash-edit_active", 22));
            editbutton = new ToggleToolButton ();
            editbutton.IconWidget = editimage;
            editbutton.Toggled += HandleEditToggled;
            editbutton.TooltipText = Catalog.GetString ("Edit dashboard");
            toolbar.Add (editbutton);
            toolbar.Add (new SeparatorToolItem ());

            linksimage = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-link-disabled", 22));
            linksbutton = new ToggleToolButton ();
            linksbutton.IconWidget = linksimage;
            linksbutton.Toggled += HandleLinksToggled;
            linksbutton.TooltipText = Catalog.GetString ("Edit action links");
            toolbar.Add (linksbutton);
            toolbar.Add (new SeparatorToolItem ());

            popupbutton = new ToggleToolButton ();
            popupbutton.IconWidget = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-popup", 22));
            popupbutton.Active = true;
            popupbutton.Toggled += HandlePopupToggled;
            popupbutton.TooltipText = Catalog.GetString ("Disable popup window");
            toolbar.Add (popupbutton);
            toolbar.Add (new SeparatorToolItem ());

            fitbutton = new RadioToolButton ((GLib.SList)null);
            fitbutton.IconWidget = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-dash-fit", 22));
            fitbutton.Toggled += HandleFitModeToggled;
            fitbutton.TooltipText = Catalog.GetString ("Fit dashboard");
            toolbar.Add (fitbutton);
            fillbutton = new RadioToolButton (fitbutton);
            fillbutton.IconWidget = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-dash-fill", 22));
            fillbutton.Toggled += HandleFitModeToggled;
            fillbutton.TooltipText = Catalog.GetString ("Fill dashboard");
            toolbar.Add (fillbutton);
            d11button = new RadioToolButton (fitbutton);
            d11button.IconWidget = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-dash-11", 22));
            d11button.Toggled += HandleFitModeToggled;
            d11button.TooltipText = Catalog.GetString ("1:1 dashboard");
            toolbar.Add (d11button);
            toolbar.ShowAll ();
            hbox2.PackEnd (toolbar, false, false, 0);

            editbutton.Active = true;
            linksbutton.Active = false;
        }
开发者ID:GNOME,项目名称:longomatch,代码行数:51,代码来源:DashboardWidget.cs

示例4: hashgen

        public hashgen()
        {
            self = Assembly.GetExecutingAssembly ();

            Stream ico = self.GetManifestResourceStream ("HashGenerator.icon.png");
            icon = new Pixbuf (ico);

            // Window
            Gtk.Window window = new Gtk.Window ((self.GetCustomAttributes (typeof(AssemblyTitleAttribute), false) [0] as AssemblyTitleAttribute).Title);
            window.SetDefaultSize (600, 500);
            window.DeleteEvent += OnDelete;
            window.Icon = icon;

            #region [Widgets]
            Box topBox = new VBox ();
            topBox.Homogeneous = false;

            // Toolbar
            Toolbar tb = new Toolbar ();

            // Toolbar New Button
            ToolButton tb_New = new ToolButton (Stock.New);
            tb_New.Clicked += OnToolbarNew_Clicked;
            tb.Add (tb_New);

            // Toolbar Open Button
            ToolButton tb_Open = new ToolButton (Stock.Open);
            tb_Open.Clicked += OnToolbarOpen_Clicked;
            tb.Add (tb_Open);

            // Toolbar Save Button
            ToolButton tb_Save = new ToolButton (Stock.Save);
            tb_Save.Clicked += OnToolbarSave_Clicked;
            tb.Add (tb_Save);

            tb.Add (new SeparatorToolItem ());

            // Toolbar About Button
            ToolButton tb_About = new ToolButton (Stock.About);
            tb_About.Clicked += new EventHandler (OnToolbarAbout_Clicked);
            tb.Add (tb_About);

            tb.ShowAll ();
            topBox.PackStart (tb, false, true, 0);

            Box mbox = new VBox ();
            topBox.PackStart (mbox, false, true, 0);

            Box mhbx = new HBox ();
            mbox.PackStart (mhbx, false, true, 0);

            entry = new Entry ();
            mhbx.PackStart (entry, true, true, 0);

            Button btnFile = new Button ();
            btnFile.Image = Gtk.Image.NewFromIconName (Stock.File, IconSize.Button);
            btnFile.Clicked += OnBtnFile_Clicked;
            mhbx.PackStart (btnFile, false, true, 0);

            string[] htype = { "MD5", "SHA128", "SHA256", "SHA512", "CRC32" };
            cboType = new ComboBox (htype);
            cboType.Active = 0;
            mhbx.PackStart (cboType, false, false, 0);

            Button btnHash = new Button ("Generate");
            btnHash.Clicked += OnBtnHash_Clicked;
            mhbx.PackStart (btnHash, false, false, 0);

            // Tree
            ScrolledWindow sw = new ScrolledWindow ();
            topBox.PackStart (sw, true, true, 0);
            TreeView tree = new TreeView ();
            sw.Add (tree);

            TreeViewColumn inColu = new TreeViewColumn ();
            inColu.Title = "Input";
            CellRendererText inCell = new CellRendererText ();
            inColu.PackStart (inCell, true);

            TreeViewColumn typeColu = new TreeViewColumn ();
            typeColu.Title = "Type";
            CellRendererText typeCell = new CellRendererText ();
            typeColu.PackStart (typeCell, true);

            TreeViewColumn hashColu = new TreeViewColumn ();
            hashColu.Title = "Hash";
            CellRendererText hashCell = new CellRendererText ();
            hashCell.Editable = true;
            hashColu.PackStart (hashCell, true);

            tree.AppendColumn (inColu);
            tree.AppendColumn (typeColu);
            tree.AppendColumn (hashColu);

            inColu.AddAttribute (inCell, "text", 0);
            typeColu.AddAttribute (typeCell, "text", 1);
            hashColu.AddAttribute (hashCell, "text", 2);
            hashStore = new ListStore (typeof(string), typeof(string), typeof(string));

            // Search Filter
//.........这里部分代码省略.........
开发者ID:cerretelli,项目名称:hash-gen,代码行数:101,代码来源:hashgen.cs

示例5: GetFeed

		static void GetFeed(string ticket)
		{
			nv = new NameValueCollection ();
			nv.Add ("ticket", ticket);
			XmlNodeList nl = Request (
				"http://live.nicovideo.jp/api/getalertstatus",
				@"//communities|//addr|//port|//thread",
				nv);
			if (nl.Count == 0) {
				Console.WriteLine ("チケットの値が不正です");
				LoginRequest ();
				return;
			}
			Server sv = new Server ();
			Notebook nb = new Notebook ();
			nb.AppendPage(sv.Page_all (), new MultiTab("最新の放送",nb));
			nb.AppendPage(sv.Page_mylist (), new MultiTab("お気に入り",nb));
			nb.AppendPage(Page_tab ("common"), new MultiTab("タブ(一般)",nb));
			nb.AppendPage(Page_tab ("live"), new MultiTab("タブ(ゲーム)",nb));
			nb.AppendPage(Page_tab ("face"), new MultiTab("タブ(顔出し)",nb));
			nb.AppendPage(Page_tab ("totu"), new MultiTab("タブ(凸待ち)",nb));
			nb.AppendPage(Page_tab ("req"), new MultiTab("タブ(動画紹介)",nb));
			nb.AppendPage(Page_tab ("try"), new MultiTab("タブ(やってみた)",nb));
			nb.AppendPage(Page_tab ("r18"), new MultiTab("タブ(R―18)",nb));

			//nb.SwitchPage += (sender, e) => PageChangedEvent(sender, e);

			Gtk.Window window = new Gtk.Window ("ニコ生フィーダー v1.0");
			window.DeleteEvent += new DeleteEventHandler (OnQuit);
			window.SetSizeRequest (300, 550);
			window.KeepAbove = true;
			Toolbar bar = new Toolbar ();
			ToggleToolButton sendBackBtn = new ToggleToolButton ();

			sendBackBtn.Toggled += (sender, e) => SendBack(sender, e, ref window);
			sendBackBtn.TooltipText = "最前面での固定を解除";
			ToggleToolButton logoutBtn = new ToggleToolButton ();
			logoutBtn.TooltipText = "ログアウト";
			logoutBtn.Clicked += (sender, e) => Logout(sender, e, ref window);

			bar.HeightRequest = 25;

			Gtk.Image img = new Gtk.Image();
			img.Pixbuf = new Gdk.Pixbuf("go_back.png",12,12);
			sendBackBtn.IconWidget = img;

			Gtk.Image img2 = new Gtk.Image();
			img2.Pixbuf = new Gdk.Pixbuf("logout.png",16,16);
			logoutBtn.IconWidget = img2;
			logoutBtn.HeightRequest = 25;
			sendBackBtn.HeightRequest = 25;
			bar.Add (logoutBtn);
			bar.Add (sendBackBtn);
			bar.ShowAll ();

			VBox vbox = new VBox(false, 0);
			vbox.PackStart (bar, false, true, 0);
			vbox.PackStart (nb, true, true, 0);
			window.Add (vbox);
			window.ShowAll ();
			window.Focus = nb;
			MainClass.communities = nl [0].InnerText;
			sv.receiveFromServer (nl [1].InnerText, nl [2].InnerText, nl [3].InnerText);
		}
开发者ID:takoyaki-hunter,项目名称:niconama-feeder,代码行数:64,代码来源:Program.cs

示例6: FullScreenView


//.........这里部分代码省略.........
                slide_show.IconName = "media-playback-start";
                slide_show.Activated += SlideShowAction;
                actions.Add (slide_show);

                new WindowOpacityFader (this, 1.0, 600);
                notebook = new Notebook ();
                notebook.ShowBorder = false;
                notebook.ShowTabs = false;
                notebook.Show ();

                scroll = new ScrolledView ();
                scroll.ScrolledWindow.SetPolicy (PolicyType.Never, PolicyType.Never);
                view = new PhotoImageView (collection);
                // FIXME this should be handled by the new style setting code
                view.ModifyBg (Gtk.StateType.Normal, this.Style.Black);
                this.Add (notebook);
                view.Show ();
                view.MotionNotifyEvent += HandleViewMotion;
                view.PointerMode = PointerMode.Scroll;

                scroll.ScrolledWindow.Add (view);

                Toolbar tbar = new Toolbar ();
                tbar.ToolbarStyle = Gtk.ToolbarStyle.BothHoriz;

                tbar.ShowArrow = false;
                tbar.BorderWidth = 15;

                ToolItem t_item = (actions [ExitFullScreen]).CreateToolItem () as ToolItem;
                t_item.IsImportant = true;
                tbar.Insert (t_item, -1);

                Gtk.Action action = new PreviousPictureAction (view.Item);
                actions.Add (action);
                tbar.Insert (action.CreateToolItem () as ToolItem, -1);

                play_pause_button = (actions [SlideShow]).CreateToolItem () as ToolButton;
                tbar.Insert (play_pause_button, -1);

                action = new NextPictureAction (view.Item);
                actions.Add (action);
                tbar.Insert (action.CreateToolItem () as ToolItem, -1);

                t_item = new ToolItem ();
                t_item.Child = new Label (Catalog.GetString ("Slide transition:"));
                tbar.Insert (t_item, -1);

                display = new SlideShow (view.Item);
                display.AddEvents ((int) (Gdk.EventMask.PointerMotionMask));
                display.ModifyBg (Gtk.StateType.Normal, this.Style.Black);
                display.MotionNotifyEvent += HandleViewMotion;
                display.Show ();

                t_item = new ToolItem ();
                ComboBox combo = ComboBox.NewText ();
                foreach (var transition in display.Transitions)
                    combo.AppendText (transition.Name);
                combo.Active = 0;
                combo.Changed += HandleTransitionChanged;
                t_item.Child = combo;
                tbar.Insert (t_item, -1);

                action = new RotateLeftAction (view.Item);
                actions.Add (action);
                tbar.Insert (action.CreateToolItem () as ToolItem, -1);

                action = new RotateRightAction (view.Item);
                actions.Add (action);
                tbar.Insert (action.CreateToolItem () as ToolItem, -1);

                info_button = (ToggleToolButton) ((actions [Info]).CreateToolItem () as ToolItem);
                tbar.Insert (info_button, -1);

                tbar.Insert ((actions [HideToolbar]).CreateToolItem () as ToolItem, -1);

                notebook.AppendPage (scroll, null);
                notebook.AppendPage (display, null);

                tbar.ShowAll ();

                scroll.Show ();
                this.Decorated = false;
                this.Fullscreen ();
                this.ButtonPressEvent += HandleButtonPressEvent;

                view.Item.Changed += HandleItemChanged;
                view.GrabFocus ();

                hide_cursor_delay = new DelayedOperation (3000, new GLib.IdleHandler (HideCursor));
                hide_cursor_delay.Start ();

                controls = new ControlOverlay (this);
                controls.Add (tbar);
                controls.Dismiss ();

                notebook.CurrentPage = 0;
            } catch (System.Exception e) {
                Log.Exception (e);
            }
        }
开发者ID:nathansamson,项目名称:F-Spot-Album-Exporter,代码行数:101,代码来源:FullScreenView.cs

示例7: FileBrowser

        public FileBrowser()
        {
            messageService = (IMessageService) ServiceManager.GetService (typeof (IMessageService));

            scrolledwindow = new ScrolledWindow ();
            scrolledwindow.VscrollbarPolicy = PolicyType.Automatic;
            scrolledwindow.HscrollbarPolicy = PolicyType.Automatic;
            scrolledwindow.ShadowType = ShadowType.In;

            Toolbar toolbar = new Toolbar ();
            toolbar.IconSize = IconSize.SmallToolbar;

            goUp = new ToolButton (Stock.GoUp);
            goUp.Clicked += new EventHandler (OnGoUpClicked);
            goUp.SetTooltip (tips, GettextCatalog.GetString ("Go up one level"), "Go up one level");
            toolbar.Insert (goUp, -1);

            goHome = new ToolButton (Stock.Home);
            goHome.Clicked += new EventHandler (OnGoHomeClicked);
            goHome.SetTooltip (tips, GettextCatalog.GetString ("Home"), "Home");
            toolbar.Insert (goHome, -1);

            entry = new ToolbarEntry ();
            entry.Activated += new EventHandler (OnEntryActivated);
            entry.SetTooltip (tips, GettextCatalog.GetString ("Location"), "");
            toolbar.Insert (entry, -1);
            toolbar.ShowAll ();
            this.PackStart (toolbar, false, true, 0);

            IProperties p = (IProperties) PropertyService.GetProperty ("SharpDevelop.UI.SelectStyleOptions", new DefaultProperties ());
            ignoreHidden = !p.GetProperty ("MonoDevelop.Gui.FileScout.ShowHidden", false);

            tv = new Gtk.TreeView ();
            tv.RulesHint = true;

            TreeViewColumn directorycolumn = new TreeViewColumn ();
            directorycolumn.Title = "Directories";

            CellRendererPixbuf pix_render = new CellRendererPixbuf ();
            directorycolumn.PackStart (pix_render, false);
            directorycolumn.AddAttribute (pix_render, "pixbuf", 0);

            text_render = new CellRendererText ();
            text_render.Edited += new EditedHandler (OnDirEdited);
            directorycolumn.PackStart (text_render, false);
            directorycolumn.AddAttribute (text_render, "text", 1);

            tv.AppendColumn (directorycolumn);

            store = new ListStore (typeof (Gdk.Pixbuf), typeof (string));
            CurrentDir = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
            tv.Model = store;

            tv.RowActivated += new RowActivatedHandler (OnRowActivated);
            tv.ButtonReleaseEvent += new ButtonReleaseEventHandler (OnButtonRelease);
            tv.PopupMenu += new PopupMenuHandler (OnPopupMenu);

            scrolledwindow.Add (tv);
            this.Homogeneous = false;
            this.PackEnd (scrolledwindow);
            this.ShowAll ();
            init = true;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:63,代码来源:FileBrowser.cs

示例8: CreateGui

		public void CreateGui () 
		{
			win = new Gtk.Window (ApplicationName);
			win.DeleteEvent += new Gtk.DeleteEventHandler (OnWindow_Delete);
			win.BorderWidth = 4;
			win.SetDefaultSize (600, 500);
			
			VBox vbox = new VBox (false, 4);
			win.Add (vbox);
			
			// Menu Bar
			MenuBar mb = CreateMenuBar ();
			vbox.PackStart (mb, false, false, 0);

			// Tool Bar
			toolbar = CreateToolbar ();
			toolbar.ShowAll();
			vbox.PackStart (toolbar, false, false, 0);
			
			// Panels

			tree = new DataTree (); // meta data tree view (left pane)
			tree.View.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler (OnDataTreeButtonRelease);
			tree.View.RowExpanded  += new Gtk.RowExpandedHandler (OnDataTreeRowExpanded);

			// SQL Editor amd Results (right pane)
			outputResults = OutputResults.DataGrid;
			sourceFileNotebook = new Notebook();
			sourceFileNotebook.Scrollable = true;
			NewEditorTab();
			sourceFileNotebook.SwitchPage += new Gtk.SwitchPageHandler(OnEditorTabSwitched);

			HPaned hpaned = new HPaned ();
			vbox.PackStart (hpaned, true, true, 0);
			hpaned.Add1 (tree);
			hpaned.Add2 (sourceFileNotebook);

			statusBar = new Statusbar ();
			statusBar.HasResizeGrip = false;
			SetStatusBarText ("Ready!");
			vbox.PackEnd (statusBar, false, false, 0);

			queryMode = QueryMode.Query;
		}
开发者ID:emtees,项目名称:old-code,代码行数:44,代码来源:sqlsharpgtk.cs

示例9: MakeToolbar

		//
		// Toolbar
		//
		// Add Link button, Font menu, Delete button to the window's
		// toolbar.
		//

		Gtk.Toolbar MakeToolbar ()
		{
			Gtk.Toolbar tb = new Gtk.Toolbar ();
			tb.Tooltips = true;

			toolbar_tips = new Gtk.Tooltips ();

			Gtk.ToolButton search = new Gtk.ToolButton (
				new Gtk.Image (Gtk.Stock.Find, tb.IconSize),
				Catalog.GetString ("Search"));
			search.IsImportant = true;
			search.Clicked += SearchActivate;
			// TODO: If we ever add a way to customize internal keybindings, this will need to change
			toolbar_tips.SetTip (search, Catalog.GetString ("Search your notes") + " (Ctrl-Shift-F)", null);
			search.AddAccelerator ("clicked",
			                       accel_group,
			                       (uint) Gdk.Key.f,
			                       (Gdk.ModifierType.ControlMask |
			                        Gdk.ModifierType.ShiftMask),
			                       Gtk.AccelFlags.Visible);
			search.ShowAll ();
			tb.Insert (search, -1);

			link_button = new Gtk.ToolButton (
				new Gtk.Image (Gtk.Stock.JumpTo, tb.IconSize),
				Catalog.GetString ("Link"));
			link_button.IsImportant = true;
			link_button.Sensitive = (note.Buffer.Selection != null);
			link_button.Clicked += LinkToNoteActivate;
			// TODO: If we ever add a way to customize internal keybindings, this will need to change
			toolbar_tips.SetTip (
				link_button,
				Catalog.GetString ("Link selected text to a new note") + " (Ctrl-L)",
				null);
			link_button.AddAccelerator ("clicked",
			                            accel_group,
			                            (uint) Gdk.Key.l,
			                            Gdk.ModifierType.ControlMask,
			                            Gtk.AccelFlags.Visible);
			link_button.ShowAll ();
			tb.Insert (link_button, -1);

			ToolMenuButton text_button =
			        new ToolMenuButton (tb,
			                            Gtk.Stock.SelectFont,
			                            Catalog.GetString ("_Text"),
			                            text_menu);
			text_button.IsImportant = true;
			text_button.ShowAll ();
			tb.Insert (text_button, -1);
			toolbar_tips.SetTip (text_button, Catalog.GetString ("Set properties of text"), null);

			ToolMenuButton plugin_button =
			        new ToolMenuButton (tb,
			                            Gtk.Stock.Execute,
			                            Catalog.GetString ("T_ools"),
			                            plugin_menu);
			plugin_button.ShowAll ();
			tb.Insert (plugin_button, -1);
			toolbar_tips.SetTip (plugin_button, Catalog.GetString ("Use tools on this note"), null);

			tb.Insert (new Gtk.SeparatorToolItem (), -1);

			delete = new Gtk.ToolButton (Gtk.Stock.Delete);
			delete.Clicked += OnDeleteButtonClicked;
			delete.ShowAll ();
			tb.Insert (delete, -1);
			toolbar_tips.SetTip (delete, Catalog.GetString ("Delete this note"), null);

			// Don't allow deleting the "Start Here" note...
			if (note.IsSpecial)
				delete.Sensitive = false;

			tb.Insert (new Gtk.SeparatorToolItem (), -1);

			sync_menu_item = new Gtk.ImageMenuItem (Catalog.GetString ("Synchronize Notes"));
			sync_menu_item.Image = new Gtk.Image (Gtk.Stock.Convert, Gtk.IconSize.Menu);
			sync_menu_item.Activated += SyncItemSelected;
			sync_menu_item.Show ();
			PluginMenu.Add (sync_menu_item);

			// We might want to know when various settings are altered.
			Preferences.SettingChanged += Preferences_SettingChanged;

			// Update items based on configuration.
			UpdateMenuItems ();

			tb.ShowAll ();
			return tb;
		}
开发者ID:oluc,项目名称:tomboy,代码行数:97,代码来源:NoteWindow.cs

示例10: SearchResultsPage

        public SearchResultsPage(FileSearch search)
        {
            VPaned         paned;
            TreeViewColumn column;
            ToolItem       spacerItem;
            ToolItem       filterItem;
            Alignment      filterAlignment;
            ToolButton     searchAgainToolButton;

            this.search = search;

            downloadToolButton = new ToolButton(new Image("gtk-save", IconSize.LargeToolbar), "Download");
            downloadToolButton.IsImportant = true;
            downloadToolButton.Sensitive = false;
            downloadToolButton.Clicked += DownloadToolButtonClicked;

            searchAgainToolButton = new ToolButton(new Image("gtk-refresh", IconSize.LargeToolbar), "Search Again");
            searchAgainToolButton.IsImportant = true;
            searchAgainToolButton.Clicked += SearchAgainToolButtonClicked;

            spacerItem = new ToolItem();
            spacerItem.Expand = true;

            filterButton = new ToggleButton("Filter Results");
            filterButton.Image = new Image(Gui.LoadIcon(16, "application-x-executable"));
            filterButton.Toggled += delegate (object o, EventArgs args) {
                this.ShowFilter = filterButton.Active;
            };

            filterAlignment = new Alignment(0.5f, 0.5f, 0, 0);
            filterAlignment.Add(filterButton);

            filterItem = new ToolItem();
            filterItem.Add(filterAlignment);

            browseToolButton = new ToolButton(new Image("gtk-open", IconSize.LargeToolbar), "Browse");
            browseToolButton.IsImportant = true;
            browseToolButton.Sensitive = false;
            browseToolButton.Clicked += BrowseToolButtonClicked;

            toolbar = new Toolbar();
            toolbar.ToolbarStyle = ToolbarStyle.BothHoriz;
            toolbar.Insert(downloadToolButton, -1);
            toolbar.Insert(browseToolButton, -1);
            toolbar.Insert(spacerItem, -1);
            toolbar.Insert(filterItem, -1);
            toolbar.Insert(new SeparatorToolItem(), -1);
            toolbar.Insert(searchAgainToolButton, -1);
            toolbar.ShowAll();

            this.PackStart(toolbar, false, false, 0);

            resultCountByTypeCache = new Dictionary<FilterType, int>();

            Gdk.Pixbuf audioPixbuf = Gui.LoadIcon(16, "audio-x-generic");
            Gdk.Pixbuf videoPixbuf = Gui.LoadIcon(16, "video-x-generic");
            Gdk.Pixbuf imagePixbuf = Gui.LoadIcon(16, "image-x-generic");
            Gdk.Pixbuf docPixbuf = Gui.LoadIcon(16, "x-office-document");
            unknownPixbuf = Gui.LoadIcon(16, "text-x-generic");
            folderPixbuf = Gui.LoadIcon(16, "folder");

            typeStore = new ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(FilterType));
            typeStore.AppendValues(null, "All Results", FilterType.All);
            typeStore.AppendValues(null, "-");
            typeStore.AppendValues(audioPixbuf, "Audio", FilterType.Audio);
            typeStore.AppendValues(videoPixbuf, "Video", FilterType.Video);
            typeStore.AppendValues(imagePixbuf, "Images", FilterType.Image);
            typeStore.AppendValues(docPixbuf, "Documents", FilterType.Document);
            typeStore.AppendValues(folderPixbuf, "Folders", FilterType.Folder);
            typeStore.AppendValues(unknownPixbuf, "Other", FilterType.Other);

            typeTree = new TreeView();
            typeTree.HeadersVisible = false;
            typeTree.RowSeparatorFunc = delegate (TreeModel m, TreeIter i) {
                string text = (string)m.GetValue(i, 1);
                return (text == "-");
            };
            typeTree.Selection.Changed += TypeSelectionChanged;

            typeTree.Model = typeStore;

            CellRendererPixbuf pixbufCell = new CellRendererPixbuf();
            CellRendererText textCell = new CellRendererText();
            CellRendererText countTextCell = new CellRendererText();
            countTextCell.Sensitive = false;
            countTextCell.Alignment = Pango.Alignment.Right;
            countTextCell.Xalign = 1;

            column = new TreeViewColumn();
            column.PackStart(pixbufCell, false);
            column.PackStart(textCell, true);
            column.PackStart(countTextCell, false);
            column.AddAttribute(pixbufCell, "pixbuf", 0);
            column.AddAttribute(textCell, "text", 1);
            column.SetCellDataFunc(countTextCell, new TreeCellDataFunc(TypeCountCellFunc));

            typeTree.AppendColumn(column);

            TreeView artistTree = new TreeView();
            artistTree.HeadersVisible = false;
//.........这里部分代码省略.........
开发者ID:codebutler,项目名称:meshwork,代码行数:101,代码来源:SearchResultsPage.cs

示例11: DirectoryView

        public DirectoryView(VBox parent, ChangeDirectoryEventHandler ev, string directory)
        {
            parent.Spacing = 2;
            scrolledwindow = new ScrolledWindow ();
            scrolledwindow.VscrollbarPolicy = PolicyType.Automatic;
            scrolledwindow.HscrollbarPolicy = PolicyType.Automatic;
            dir_icon = Gtk.IconTheme.Default.LoadIcon ("gtk-directory", 16, (Gtk.IconLookupFlags) 0);

            Toolbar toolbar = new Toolbar ();
            toolbar.IconSize = IconSize.Menu;
            toolbar.ToolbarStyle = Gtk.ToolbarStyle.Icons;

            goUp = new ToolButton (Gtk.Stock.GoUp);
            goUp.Clicked += new EventHandler (OnGoUpClicked);
            goUp.TooltipText = Catalog.GetString ("Go up one level");
            toolbar.Insert (goUp, -1);

            goHome = new ToolButton (Gtk.Stock.Home);
            goHome.Clicked += new EventHandler (OnGoHomeClicked);
            goHome.TooltipText =  Catalog.GetString ("Home");
            toolbar.Insert (goHome, -1);

            entry = new ToolbarEntry ();
            entry.Expand = true;
            entry.Activated += new EventHandler (OnEntryActivated);
            entry.TooltipText = Catalog.GetString ("Location");
            toolbar.Insert (entry, -1);
            toolbar.ShowAll ();
            parent.PackStart (toolbar, false, true, 0);

            tv = new Gtk.TreeView ();
            tv.RulesHint = true;

            TreeViewColumn directorycolumn = new TreeViewColumn ();
            directorycolumn.Title = Catalog.GetString ("Directories");

            CellRendererPixbuf pix_render = new CellRendererPixbuf ();
            directorycolumn.PackStart (pix_render, false);
            directorycolumn.AddAttribute (pix_render, "pixbuf", COL_PIXBUF);

            text_render = new CellRendererText ();
            directorycolumn.PackStart (text_render, false);
            directorycolumn.AddAttribute (text_render, "text", COL_DISPLAY_NAME);

            tv.AppendColumn (directorycolumn);
            scrolledwindow.Add (tv);
            parent.Homogeneous = false;
            parent.PackEnd (new HSeparator (), false, false, 0);
            parent.PackEnd (scrolledwindow);
            parent.ShowAll ();

            tv.Model = tree_store = CreateTreeStore ();
            DirectoryChanged = ev;
            tv.RowActivated += OnRowActivate;

            current = new DirectoryInfo (directory);
            ProcessNewDirectory (current.FullName);
        }
开发者ID:GNOME,项目名称:mistelix,代码行数:58,代码来源:DirectoryView.cs


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