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


C# Gtk.ToolButton类代码示例

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


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

示例1: build

        protected void build()
        {
            this.SetDefaultSize (1000, 600);
            this.Title = "Battle";
            this.DeleteEvent += HandleDeleteEvent;

            this.vbox = new VBox ();

            this.tbar = new Toolbar ();
            this.tbar.ToolbarStyle = ToolbarStyle.BothHoriz;
            this.about = new ToolButton (Stock.About);
            this.about.IsImportant = false;
            this.about.Label = "About";
            this.about.TooltipText = "About this application";
            this.tbar.Add (this.about);

            this.hpaned = new HPaned ();
            this.frame = new Frame ("Battle Map");
            this.map = new MapControl ();
            this.frame.Add (this.map);
            Label a = new Label ("Welcome");
            this.hpaned.Pack1 (a, false, false);
            this.hpaned.Pack2 (this.frame, true, true);

            this.sbar = new Statusbar ();

            this.vbox.PackStart (this.tbar, false, true, 0);
            this.vbox.PackStart (this.hpaned, true, true, 0);
            this.vbox.PackEnd (this.sbar, false, true, 0);

            this.Add (this.vbox);
        }
开发者ID:sgtnasty,项目名称:battle,代码行数:32,代码来源:BattleWindow.cs

示例2: AddItem

 // TODO: This should handle sorting the items
 public void AddItem(ToolButton item)
 {
     if (tb1.NItems <= tb2.NItems)
         tb1.Insert (item, tb1.NItems);
     else
         tb2.Insert (item, tb2.NItems);
 }
开发者ID:robpvn,项目名称:Pinta,代码行数:8,代码来源:ToolBoxWidget.cs

示例3: build

        private void build()
        {
            this.vbox1 = new VBox();

            this.toolbar1 = new Toolbar();
            this.aboutbtn1 = new ToolButton(Stock.About);
            this.aboutbtn1.Label = "About";
            this.aboutbtn1.IsImportant = true;
            this.toolbar1.ToolbarStyle = ToolbarStyle.BothHoriz;
            this.toolbar1.Add(this.aboutbtn1);
            this.vbox1.PackStart(this.toolbar1, false, true, 0);

            this.treestore1 = this.populateTreeStoreFromSession();
            this.scrollw1 = new ScrolledWindow();
            this.hpaned1 = new HPaned();
            this.treeview1 = new TreeView(this.treestore1);
            this.treeview1.HeadersVisible = true;
            this.treeview1.AppendColumn("Session", new CellRendererText(), "text", 0);
            this.treeview1.AppendColumn("Name", new CellRendererText(), "text", 1);
            this.treeview1.ExpandAll();
            this.scrollw1.Add(this.treeview1);
            this.iconview1 = new IconView();
            this.hpaned1.Add1(this.scrollw1);
            this.hpaned1.Add2(this.iconview1);
            this.hpaned1.Position = 254;
            this.vbox1.PackStart(this.hpaned1, true, true, 0);

            this.statusbar1 = new Statusbar();
            this.vbox1.PackEnd(this.statusbar1, false, true, 0);

            this.Add(this.vbox1);
            this.SetSizeRequest(800,600);

            this.DeleteEvent += HandleDeleteEvent;
        }
开发者ID:sgtnasty,项目名称:battle,代码行数:35,代码来源:MainWindow.cs

示例4: build

        private void build()
        {
            this.vbox1 = new Gtk.VBox();
            this.toolbar1 = new Gtk.Toolbar();
            this.toolbar1.ToolbarStyle = ToolbarStyle.BothHoriz;
            this.new_toolbutton = new ToolButton(Stock.New);
            this.new_toolbutton.IsImportant = true;
            this.new_toolbutton.Label = "New Character";
            this.new_toolbutton.Clicked += HandleNew_toolbuttonhandleClicked;
            this.toolbar1.Add(this.new_toolbutton);
            this.pref_toolbutton = new ToolButton(Stock.Preferences);
            this.pref_toolbutton.IsImportant = true;
            this.pref_toolbutton.Label = "Preferences";
            this.pref_toolbutton.Clicked += HandlePref_toolbuttonhandleClicked;
            this.toolbar1.Add(this.pref_toolbutton);
            this.quit_toolbutton = new ToolButton(Stock.Quit);
            this.quit_toolbutton.IsImportant = true;
            this.quit_toolbutton.Label = "Quit";
            this.quit_toolbutton.Clicked += HandleQuit_toolbuttonhandleClicked;
            this.toolbar1.Add(this.quit_toolbutton);
            this.about_toolbutton = new ToolButton(Stock.About);
            this.about_toolbutton.IsImportant = true;
            this.about_toolbutton.Label = "About";
            this.about_toolbutton.Clicked += HandleAbout_toolbuttonhandleClicked;
            SeparatorToolItem sti = new SeparatorToolItem();
            sti.Draw = false;
            sti.Expand = true;
            this.toolbar1.Add(sti);
            this.toolbar1.Add(this.about_toolbutton);
            this.statusbar1 = new Gtk.Statusbar();
            this.image1 = new Image(MediaManager.GetPixbufFromBaseFile("BLLogo.jpg").ScaleSimple(296, 149, Gdk.InterpType.Bilinear));
            Gtk.VBox vbox2 = new Gtk.VBox();

            Gtk.ScrolledWindow sw1 = new Gtk.ScrolledWindow();
            TreeStore ts1 = new TreeStore (typeof (string), typeof (string));
            ts1.AppendValues("Player Characters",DateTime.Now.ToString());
            ts1.AppendValues("Non-Player Characters",DateTime.Now.ToString());
            ts1.AppendValues("Database",DateTime.Now.ToString());
            TreeView tv1 = new TreeView ();
            tv1.Model = ts1;
            tv1.HeadersVisible = true;
            tv1.AppendColumn ("Source", new CellRendererText (), "text", 0);
            tv1.AppendColumn ("Last Update", new CellRendererText (), "text", 1);
            sw1.Add(tv1);

            vbox2.PackStart(this.image1, false, true, 0);
            vbox2.PackEnd(sw1, true, true, 0);
            this.vbox1.PackStart(this.toolbar1, false, true, 0);
            this.vbox1.PackStart(vbox2, true, true, 0);
            this.vbox1.PackStart(this.statusbar1, false, true, 0);
            this.Add(this.vbox1);
            //this.SetSizeRequest(640, Screen.Height - 100);
            this.SetSizeRequest(480, 640);
            this.Icon = Battle.Gui.MediaManager.GetPixbufFromBaseFile("LSIMMS.png");
            this.statusbar1.Push(0, string.Format("{0} started @ {1}",
                                                  this.session.GetType().ToString(),
                                                  this.session.StartTime.ToString()));
            this.Maximize();
        }
开发者ID:sgtnasty,项目名称:battle,代码行数:59,代码来源:MainWindow.cs

示例5: SqlQueryView

		public SqlQueryView ()
		{
			stoppedQueries = new List<object> ();
			
			vbox = new VBox (false, 6);
			vbox.BorderWidth = 6;

			sqlEditor = new SqlEditorWidget ();
			sqlEditor.TextChanged += new EventHandler (SqlChanged);
			
			Toolbar toolbar = new Toolbar ();
			toolbar.ToolbarStyle = ToolbarStyle.BothHoriz;
			
			buttonExecute = new ToolButton (
				Services.Resources.GetImage ("md-db-execute", IconSize.SmallToolbar),
				GettextCatalog.GetString ("Execute")
			);
			buttonStop = new ToolButton ("gtk-stop");
			buttonClear = new ToolButton (Services.Resources.GetImage ("gtk-clear", IconSize.Button), GettextCatalog.GetString ("Clear Results"));
			buttonStop.Sensitive = false;
			buttonExecute.Sensitive = false;
			
			buttonExecute.Clicked += new EventHandler (ExecuteClicked);
			buttonStop.Clicked += new EventHandler (StopClicked);
			buttonClear.Clicked += new EventHandler (ClearClicked);
			
			comboConnections = new DatabaseConnectionContextComboBox ();
			selectedConnection = comboConnections.DatabaseConnection;
			comboConnections.Changed += new EventHandler (ConnectionChanged);

			buttonExecute.IsImportant = true;
			
			ToolItem comboItem = new ToolItem ();
			comboItem.Child = comboConnections;
			
			toolbar.Add (buttonExecute);
			toolbar.Add (buttonStop);
			toolbar.Add (buttonClear);
			toolbar.Add (new SeparatorToolItem ());
			toolbar.Add (comboItem);
			
			pane = new VPaned ();

			ScrolledWindow windowStatus = new ScrolledWindow ();
			status = new TextView ();
			windowStatus.Add (status);
			
			notebook = new Notebook ();
			notebook.AppendPage (windowStatus, new Label (GettextCatalog.GetString ("Status")));
			
			pane.Pack1 (sqlEditor, true, true);
			pane.Pack2 (notebook, true, true);
			
			vbox.PackStart (toolbar, false, true, 0);
			vbox.PackStart (pane, true, true, 0);
			
			vbox.ShowAll ();
			notebook.Hide ();
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:59,代码来源:SqlQueryView.cs

示例6: DrawIcons

        protected override void DrawIcons()
        {
            _tbuttonClass = new Gtk.ToolButton ("");
            _tbuttonClass.IconWidget = new Gtk.Image (MonoUML.IconLibrary.PixbufLoader.GetIcon ("class_tree.png"));

            _tbuttonClass.SetTooltip (_tooltips, GettextCatalog.GetString ("Add a class"), GettextCatalog.GetString ("Add a class"));
            Insert (_tbuttonClass, -1);
        }
开发者ID:MonoBrasil,项目名称:historico,代码行数:8,代码来源:ToolbarClass.cs

示例7: DrawIcons

 protected override void DrawIcons()
 {
     _tbuttonActor = CreateToolButton ("actor_tree.png", GettextCatalog.GetString ("Add an Actor"));
     _tbuttonUseCase = CreateToolButton ("usecase_tree.png", GettextCatalog.GetString ("Add an Use Case"));
     Insert (_tbuttonActor, -1);
     Insert (_tbuttonUseCase, -1);
     _tbuttonActor.Clicked += QueueActor;
     _tbuttonUseCase.Clicked += QueueUseCase;
 }
开发者ID:MonoBrasil,项目名称:historico,代码行数:9,代码来源:ToolbarUseCase.cs

示例8: ToolbarButton

 public ToolbarButton(ICommand cmd)
     : base(cmd)
 {
     button = new ToolButton(cmd.Properties.Icon);
     button.Clicked += new EventHandler (OnClicked);
     button.Label = cmd.Properties.Text;
     this.Add(button);
     button.Show();
     this.ShowAll();
 }
开发者ID:BackupTheBerlios,项目名称:sofia-svn,代码行数:10,代码来源:ToolbarFactories.cs

示例9: build

        private void build()
        {
            this.SetDefaultSize (1000, 600);

            this.vbox1 = new VBox ();

            this.toolbar1 = new Toolbar ();
            this.toolbar1.ToolbarStyle = ToolbarStyle.BothHoriz;
            this.newcharbutton = new ToolButton (Stock.New);
            this.newcharbutton.Label = "New";
            this.newcharbutton.TooltipText = "New Character";
            this.newcharbutton.IsImportant = true;
            this.newcharbutton.Clicked += HandleNewcharbuttonClicked;
            this.toolbar1.Add (this.newcharbutton);
            this.savecharbutton = new ToolButton (Stock.Save);
            this.savecharbutton.Label = "Save";
            this.savecharbutton.TooltipText = "Save Character";
            this.savecharbutton.Clicked += HandleSavecharbuttonClicked;
            this.toolbar1.Add(this.savecharbutton);
            this.printcharbutton = new ToolButton (Stock.Print);
            this.printcharbutton.Label = "Print";
            this.printcharbutton.TooltipText = "Print Character";
            this.printcharbutton.Clicked += HandlePrintcharbuttonClicked;
            this.toolbar1.Add(this.printcharbutton);
            this.toolbar1.Add(new SeparatorToolItem());
            this.rollbutton = new ToolButton (Stock.Refresh);
            this.rollbutton.Label = "Roll";
            this.rollbutton.TooltipText = "Roll Characteristics";
            this.rollbutton.IsImportant = true;
            this.rollbutton.Clicked += HandleRollbuttonClicked;
            this.toolbar1.Add(this.rollbutton);
            this.aboutbutton = new ToolButton (Stock.About);
            this.aboutbutton.Label = "About";
            this.aboutbutton.TooltipText = "About Adeptus";
            this.aboutbutton.Clicked += HandleAboutbuttonClicked;
            SeparatorToolItem  sti = new SeparatorToolItem();
            sti.Draw = false;
            sti.Expand = true;
            this.toolbar1.Add(sti);
            this.toolbar1.Add (this.aboutbutton);

            this.frame1 = new Frame ();
            this.frame1.Add(new Image(Gdk.Pixbuf.LoadFromResource("Adeptus.Gui.EmperorVHorus.jpg")));

            this.statusbar1 = new Statusbar ();
            this.statusbar1.Push (0, "Ready");

            this.vbox1.PackStart (this.toolbar1, false, true, 0);
            this.vbox1.PackStart (this.frame1, true, true, 0);
            this.vbox1.PackEnd (this.statusbar1, false, true, 0);

            this.Add (this.vbox1);
        }
开发者ID:sgtnasty,项目名称:battle,代码行数:53,代码来源:AdeptusWindow.cs

示例10: CreateToolbar

 private Toolbar CreateToolbar()
 {
     Toolbar tb = new Toolbar();
        ToolbarTooltips = new Tooltips();
        SaveButton = new ToolButton(Gtk.Stock.Save);
        SaveButton.SetTooltip(ToolbarTooltips, Util.GS("Save the synchronization log"), "Toolbar/Save Log");
        SaveButton.Clicked += new EventHandler(SaveLogHandler);
        tb.Insert(SaveButton, -1);
        ClearButton = new ToolButton(Gtk.Stock.Clear);
        ClearButton.SetTooltip(ToolbarTooltips, Util.GS("Clear the synchronization log"), "Toolbar/Clear Log");
        ClearButton.Clicked += new EventHandler(ClearLogHandler);
        tb.Insert(ClearButton, -1);
        SaveButton.Sensitive = false;
        ClearButton.Sensitive = false;
        return tb;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:16,代码来源:LogWindow.cs

示例11: DemoIconView

		public DemoIconView () : base ("Gtk.IconView demo")
		{
			SetDefaultSize (650, 400);
			DeleteEvent += new DeleteEventHandler (OnWinDelete);

			VBox vbox = new VBox (false, 0);
			Add (vbox);

			Toolbar toolbar = new Toolbar ();
			vbox.PackStart (toolbar, false, false, 0);

			upButton = new ToolButton (Stock.GoUp);
			upButton.IsImportant = true;
			upButton.Sensitive = false;
			toolbar.Insert (upButton, -1);

			ToolButton homeButton = new ToolButton (Stock.Home);
			homeButton.IsImportant = true;
			toolbar.Insert (homeButton, -1);

			fileIcon = GetIcon (Stock.File);
			dirIcon = GetIcon (Stock.Open);

			ScrolledWindow sw = new ScrolledWindow ();
			sw.ShadowType = ShadowType.EtchedIn;
			sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
			vbox.PackStart (sw, true, true, 0);

			// Create the store and fill it with the contents of '/'
			store = CreateStore ();
			FillStore ();

			IconView iconView = new IconView (store);
			iconView.SelectionMode = SelectionMode.Multiple;

			upButton.Clicked += new EventHandler (OnUpClicked);
			homeButton.Clicked += new EventHandler (OnHomeClicked);

			iconView.TextColumn = COL_DISPLAY_NAME;
			iconView.PixbufColumn = COL_PIXBUF;

			iconView.ItemActivated += new ItemActivatedHandler (OnItemActivated);
			sw.Add (iconView);
			iconView.GrabFocus ();

			ShowAll ();
		}
开发者ID:liberostelios,项目名称:gtk-sharp,代码行数:47,代码来源:DemoIconView.cs

示例12: DefaultMonitorPad

        public DefaultMonitorPad(string title, string icon)
        {
            buffer = new Gtk.TextBuffer (new Gtk.TextTagTable ());
            textEditorControl = new Gtk.TextView (buffer);
            textEditorControl.Editable = false;
            scroller = new Gtk.ScrolledWindow ();
            scroller.ShadowType = ShadowType.In;
            scroller.Add (textEditorControl);

            Toolbar toolbar = new Toolbar ();
            toolbar.IconSize = IconSize.SmallToolbar;
            toolbar.Orientation = Orientation.Vertical;
            toolbar.ToolbarStyle = ToolbarStyle.Icons;

            buttonStop = new ToolButton ("gtk-stop");
            buttonStop.Clicked += new EventHandler (OnButtonStopClick);
            buttonStop.SetTooltip (tips, "Stop", "Stop");
            toolbar.Insert (buttonStop, -1);

            ToolButton buttonClear = new ToolButton ("gtk-clear");
            buttonClear.Clicked += new EventHandler (OnButtonClearClick);
            buttonClear.SetTooltip (tips, "Clear console", "Clear console");
            toolbar.Insert (buttonClear, -1);

            hbox = new HBox (false, 5);
            hbox.PackStart (scroller, true, true, 0);
            hbox.PackEnd (toolbar, false, false, 0);

            bold = new TextTag ("bold");
            bold.Weight = Pango.Weight.Bold;
            buffer.TagTable.Add (bold);

            tag = new TextTag ("0");
            tag.Indent = 10;
            buffer.TagTable.Add (tag);
            tags.Add (tag);

            Runtime.ProjectService.CombineOpened += (CombineEventHandler) Runtime.DispatchService.GuiDispatch (new CombineEventHandler (OnCombineOpen));
            Runtime.ProjectService.CombineClosed += (CombineEventHandler) Runtime.DispatchService.GuiDispatch (new CombineEventHandler (OnCombineClosed));

            this.title = title;
            this.icon = icon;
            this.markupTitle = title;

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

示例13: Initialize

		public override void Initialize ()
		{
			separator = new Gtk.SeparatorToolItem ();
			separator.Show ();
			
			record_button = new Gtk.ToolButton (Gtk.Stock.MediaRecord);
			record_button.Clicked += OnRecordButtonClicked;
			record_button.Show ();

			play_button = new Gtk.ToolButton (Gtk.Stock.MediaPlay);
			play_button.Clicked += OnPlayButtonClicked;
			play_button.Show ();
			
			stop_button = new Gtk.ToolButton (Gtk.Stock.MediaStop);
			stop_button.Clicked += OnStopButtonClicked;
			stop_button.Show ();

			delete_item = new Gtk.MenuItem ("Delete Voice Note");
			delete_item.Activated += OnDeleteItemActivated;
			delete_item.Show ();
		
			initialize ();
		}
开发者ID:MichaelAquilina,项目名称:tomboy,代码行数:23,代码来源:VoiceNote.cs

示例14: BuildToolBar

        void BuildToolBar()
        {
            IconFactory icon_factory = new IconFactory ();
            AddIcon (icon_factory, "logic-games", "logic-games-32.png");
            AddIcon (icon_factory, "math-games", "math-games-32.png");
            AddIcon (icon_factory, "memory-games", "memory-games-32.png");
            AddIcon (icon_factory, "verbal-games", "verbal-games-32.png");
            AddIcon (icon_factory, "pause", "pause-32.png");
            AddIcon (icon_factory, "resume", "resume-32.png");
            AddIcon (icon_factory, "endgame", "endgame-32.png");
            AddIcon (icon_factory, "allgames", "allgames-32.png");
            icon_factory.AddDefault ();

            IconSize = Gtk.IconSize.Dnd;

            AllButton = new ToolButton ("allgames");
            AllButton.TooltipText = Catalog.GetString ("Play all the games");
            AllButton.Label = Catalog.GetString ("All");
            Insert (AllButton, -1);

            LogicButton = new ToolButton ("logic-games");
            LogicButton.TooltipText = Catalog.GetString ("Play games that challenge your reasoning and thinking");
            LogicButton.Label = Catalog.GetString ("Logic");
            Insert (LogicButton, -1);

            CalculationButton = new ToolButton ("math-games");
            CalculationButton.Label = Catalog.GetString ("Calculation");
            CalculationButton.TooltipText = Catalog.GetString ("Play games that challenge your mental calculation skills");
            Insert (CalculationButton, -1);

            MemoryButton = new ToolButton ("memory-games");
            MemoryButton.Label = Catalog.GetString ("Memory");
            MemoryButton.TooltipText = Catalog.GetString ("Play games that challenge your short term memory");
            Insert (MemoryButton, -1);

            VerbalButton = new ToolButton ("verbal-games");
            VerbalButton.Label = Catalog.GetString ("Verbal");
            VerbalButton.TooltipText = Catalog.GetString ("Play games that challenge your verbal aptitude");
            Insert (VerbalButton, -1);

            PauseButton = new ToolButton ("pause");
            PauseButton.Label = Catalog.GetString ("Pause");
            PauseButton.TooltipText = Catalog.GetString ("Pause or resume the game");
            Insert (PauseButton, -1);

            FinishButton = new ToolButton ("endgame");
            FinishButton.TooltipText = Catalog.GetString ("End the game and show score");
            FinishButton.Label = Catalog.GetString ("End");
            Insert (FinishButton, -1);
        }
开发者ID:GNOME,项目名称:gbrainy,代码行数:50,代码来源:Toolbar.cs

示例15: Gui

        public Gui()
        {
            dlayer = new DataLayer ();

              window_addtag.SetSizeRequest (100, 100);
              window.Icon = new Gdk.Pixbuf ("lipsticktower.jpg");  //Kalle, Andreas :: Call for Icon!
              Gtk.Entry tagEntry = new Gtk.Entry ();
              Gtk.VBox tagbox = new Gtk.VBox (false, 0);
              tagbox.PackStart (tagEntry, true, true, 0);
              window_addtag.Add (tagbox);
              window_addtag.ShowAll ();

              window.SetSizeRequest (300, 500);
              window.DeleteEvent += DeleteEvent;
              window.Icon = new Gdk.Pixbuf ("lipsticktower.jpg");  //Kalle, Andreas :: Call for Icon!

              Gtk.VBox box = new Gtk.VBox (false, 0);
              Gtk.HBox top = new Gtk.HBox (false, 0);
              //Gtk.ComboBox selector = new Gtk.ComboBox ();
              Gtk.ComboBox selector = ComboBox.NewText ();
              ScrolledWindow scroll = new ScrolledWindow ();
              filterEntry = new Gtk.Entry ();
              filterEntry.MaxLength = 1;
              filterEntry.Changed += OnFilterEntryTextChanged;

              //Gtk.TreeView tree = new Gtk.TreeView ();
              tree.HeadersVisible = false;
              tree.Reorderable = true;
              tree.EnableSearch = false;
              tree.RowActivated += OnRowActivate;

              Gtk.TreeViewColumn iconCol = new Gtk.TreeViewColumn ( );
              iconCol.Title = "Icon";
              Gtk.CellRendererPixbuf iconCell = new Gtk.CellRendererPixbuf ();
              iconCol.PackStart (iconCell, true);
              iconCol.SetCellDataFunc (iconCell, new Gtk.TreeCellDataFunc (RenderIcon));

              Gtk.TreeViewColumn primCol = new Gtk.TreeViewColumn ( );
              primCol.Title = "Primary Info";
              Gtk.CellRendererText primInfoCell = new Gtk.CellRendererText ();
              primCol.PackStart (primInfoCell, true);
              primCol.SetCellDataFunc (primInfoCell, new Gtk.TreeCellDataFunc (RenderPrimary));

              Gtk.TreeViewColumn secCol = new Gtk.TreeViewColumn ( );
              secCol.Title = "Secondary Info";
              Gtk.CellRendererText secInfoCell = new Gtk.CellRendererText ();
              secCol.PackStart (secInfoCell, true);
              secCol.SetCellDataFunc (secInfoCell, new Gtk.TreeCellDataFunc (RenderSecondary));

              projects = DataLayer.GetProjectNames ();
              foreach (string project in projects)
              {
            Console.WriteLine (project);
              	selector.AppendText (project);
              }
              selector.Changed += new EventHandler (OnSelectorChanged);

              //Store AssetStore = dlayer.GetAssets (projID);
              /*filter = new Gtk.TreeModelFilter (AssetStore, null);
              filter.VisibleFunc = new Gtk.TreeModelFilterVisibleFunc (FilterTree);
              tree.Model = filter;*/
              //tree.Model = dlayer.GetAssets (projID);

              tree.AppendColumn (iconCol);
              tree.AppendColumn (primCol);
              tree.AppendColumn (secCol);

              MenuBar menu = new MenuBar ();
              Menu fileMenu = new Menu();
              MenuItem menuItem = new MenuItem("_File");
              menuItem.Submenu = fileMenu;
              menu.Append(menuItem);

              Statusbar status = new Statusbar ();
              Toolbar tool = new Toolbar ();

              ToolButton plus = new ToolButton (Gtk.Stock.Add);
              plus.Clicked +=  OnAddClicked;
              ToolButton minus = new ToolButton (Gtk.Stock.Remove);
              minus.Clicked +=  OnMinusClicked;

              box.PackStart (menu, false, true, 0);
              box.PackStart (tool, false, true, 0);
              tool.Insert(minus, 0);
              tool.Insert(plus, 0);
              top.PackStart (filterEntry, true, true, 0);
              top.PackStart (selector, true, true, 0);
              box.PackStart (top, false, true, 0);
              scroll.Add (tree);
              box.PackStart (scroll, true, true, 0);
              box.PackStart (status, false, true, 0);
              window.Add (box);
              window.ShowAll ();
        }
开发者ID:harokkar,项目名称:gothenburg,代码行数:94,代码来源:Gui.cs


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