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


C# Gtk.Append方法代码示例

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


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

示例1: CreateMainMenu

		public void CreateMainMenu (Gtk.Menu menu)
		{
			window_menu = menu;

			menu.Append (SaveAll.CreateAcceleratedMenuItem (Gdk.Key.A, Gdk.ModifierType.Mod1Mask | Gdk.ModifierType.ControlMask));
			menu.Append (CloseAll.CreateAcceleratedMenuItem (Gdk.Key.W, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
			menu.AppendSeparator ();
		}
开发者ID:RichieYang,项目名称:Pinta,代码行数:8,代码来源:WindowActions.cs

示例2: CreateMainMenu

        public void CreateMainMenu(Gtk.Menu menu)
        {
            menu.Remove (menu.Children[1]);

            menu.Append (Website.CreateMenuItem ());
            menu.Append (Bugs.CreateMenuItem ());
            menu.AppendSeparator ();
            menu.Append (About.CreateMenuItem ());
        }
开发者ID:sandyarmstrong,项目名称:Pinta,代码行数:9,代码来源:HelpActions.cs

示例3: CreateMainMenu

		public void CreateMainMenu (Gtk.Menu menu)
		{
			menu.Append (Contents.CreateAcceleratedMenuItem (Gdk.Key.F1, Gdk.ModifierType.None));
			menu.Append (Website.CreateMenuItem ());
			menu.Append (Bugs.CreateMenuItem ());
			menu.Append (Translate.CreateMenuItem ());
			menu.AppendSeparator ();
			menu.Append (About.CreateMenuItem ());
		}
开发者ID:msiyer,项目名称:Pinta,代码行数:9,代码来源:HelpActions.cs

示例4: CreateMainMenu

		public void CreateMainMenu (Gtk.Menu menu)
		{
			menu.Append (AddNewLayer.CreateAcceleratedMenuItem (Gdk.Key.N, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
			menu.Append (DeleteLayer.CreateAcceleratedMenuItem (Gdk.Key.Delete, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
			menu.Append (DuplicateLayer.CreateAcceleratedMenuItem (Gdk.Key.D, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
			menu.Append (MergeLayerDown.CreateAcceleratedMenuItem (Gdk.Key.M, Gdk.ModifierType.ControlMask));
			menu.Append (ImportFromFile.CreateMenuItem ());
			menu.AppendSeparator ();
			menu.Append (FlipHorizontal.CreateMenuItem ());
			menu.Append (FlipVertical.CreateMenuItem ());
			menu.Append (RotateZoom.CreateMenuItem ());
			menu.AppendSeparator ();
			menu.Append (Properties.CreateAcceleratedMenuItem (Gdk.Key.F4, Gdk.ModifierType.None));
		}
开发者ID:RichieYang,项目名称:Pinta,代码行数:14,代码来源:LayerActions.cs

示例5: CreateMainMenu

		public void CreateMainMenu (Gtk.Menu menu)
		{
			menu.Append (New.CreateAcceleratedMenuItem (Gdk.Key.N, Gdk.ModifierType.ControlMask));
			menu.Append (NewScreenshot.CreateMenuItem ());
			menu.Append (Open.CreateAcceleratedMenuItem (Gdk.Key.O, Gdk.ModifierType.ControlMask));
			menu.Append (OpenRecent.CreateMenuItem ());
			menu.AppendSeparator ();
			menu.Append (Save.CreateAcceleratedMenuItem (Gdk.Key.S, Gdk.ModifierType.ControlMask));
			menu.Append (SaveAs.CreateAcceleratedMenuItem (Gdk.Key.S, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
			menu.AppendSeparator ();
			menu.Append (Print.CreateAcceleratedMenuItem (Gdk.Key.P, Gdk.ModifierType.ControlMask));
			menu.AppendSeparator ();
			menu.Append (Close.CreateAcceleratedMenuItem (Gdk.Key.W, Gdk.ModifierType.ControlMask));
			menu.Append (Exit.CreateAcceleratedMenuItem (Gdk.Key.Q, Gdk.ModifierType.ControlMask));
		}
开发者ID:RichieYang,项目名称:Pinta,代码行数:15,代码来源:FileActions.cs

示例6: CreateMainMenu

        public void CreateMainMenu(Gtk.Menu menu)
        {
            addins_menu = menu;

            menu.Append (AddinManager.CreateMenuItem ());
            menu.AppendSeparator ();
        }
开发者ID:JoeyScarr,项目名称:Pinta,代码行数:7,代码来源:AddinActions.cs

示例7: MakeMenuItem

	public static void MakeMenuItem (Gtk.Menu menu, string l, EventHandler e, bool enabled)
	{
		Gtk.MenuItem i = new Gtk.MenuItem (l);
		i.Activated += e;
                i.Sensitive = enabled;

		menu.Append (i);
		i.Show ();
	}
开发者ID:emtees,项目名称:old-code,代码行数:9,代码来源:Util.cs

示例8: AppendToMenu

		public void AppendToMenu (Gtk.Menu menu)
		{
			if (list == null || list.Count == 0)
				return;

			Gtk.MenuItem open_with = new Gtk.MenuItem (Mono.Unix.Catalog.GetString ("Open With"));
			open_with.Submenu = this;
			open_with.ShowAll ();
			menu.Append (open_with);
		}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:10,代码来源:OpenWithMenu.cs

示例9: AppendMenuItem

        public static void AppendMenuItem(Gtk.Menu menu, string label,
					   string image_name, EventHandler e,
					   bool enabled)
        {
            Gtk.ImageMenuItem i = new Gtk.ImageMenuItem (label);
                i.Activated += e;
                i.Sensitive = enabled;
                i.Image = new Gtk.Image (image_name, Gtk.IconSize.Menu);

                menu.Append (i);
                i.Show ();
        }
开发者ID:GNOME,项目名称:blam,代码行数:12,代码来源:Utils.cs

示例10: MakeMenuItem

		public static Gtk.MenuItem MakeMenuItem (Gtk.Menu menu, string label, string image_name, EventHandler e, bool enabled)
		{
			Gtk.ImageMenuItem i = new Gtk.ImageMenuItem (label);
			i.Activated += e;
	                i.Sensitive = enabled;
			i.Image = Gtk.Image.NewFromIconName (image_name, Gtk.IconSize.Menu);
			
			menu.Append (i);
			i.Show ();
	
		        return i;
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:12,代码来源:GtkUtil.cs

示例11: MakeCheckMenuItem

		public static Gtk.MenuItem MakeCheckMenuItem (Gtk.Menu menu, string label, EventHandler e, bool enabled, bool active, bool as_radio)
		{
			Gtk.CheckMenuItem i = new Gtk.CheckMenuItem (label);
			i.Activated += e;
			i.Sensitive = enabled;
			i.DrawAsRadio = as_radio;
			i.Active = active;
	
			menu.Append(i);
			i.Show ();
	
	        return i;
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:13,代码来源:GtkUtil.cs

示例12: CreateMainMenu

		public void CreateMainMenu (Gtk.Menu menu)
		{
			menu.Append (CropToSelection.CreateAcceleratedMenuItem (Gdk.Key.X, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
			menu.Append (AutoCrop.CreateAcceleratedMenuItem (Gdk.Key.X, Gdk.ModifierType.Mod1Mask | Gdk.ModifierType.ControlMask));
			menu.Append (Resize.CreateAcceleratedMenuItem (Gdk.Key.R, Gdk.ModifierType.ControlMask));
			menu.Append (CanvasSize.CreateAcceleratedMenuItem (Gdk.Key.R, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
			menu.AppendSeparator ();
			menu.Append (FlipHorizontal.CreateMenuItem ());
			menu.Append (FlipVertical.CreateMenuItem ());
			menu.AppendSeparator ();
			menu.Append (RotateCW.CreateAcceleratedMenuItem (Gdk.Key.H, Gdk.ModifierType.ControlMask));
			menu.Append (RotateCCW.CreateAcceleratedMenuItem (Gdk.Key.G, Gdk.ModifierType.ControlMask));
			menu.Append (Rotate180.CreateAcceleratedMenuItem (Gdk.Key.J, Gdk.ModifierType.ControlMask));
			menu.AppendSeparator ();
			menu.Append (Flatten.CreateAcceleratedMenuItem (Gdk.Key.F, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
		}
开发者ID:msiyer,项目名称:Pinta,代码行数:16,代码来源:ImageActions.cs

示例13: Create

        public static void Create(Tag [] tags, Gtk.Menu menu)
        {
            var findWithString = Catalog.GetPluralString ("Find _With", "Find _With", tags.Length);
            var item = new Gtk.MenuItem (String.Format (findWithString, tags.Length));

            Gtk.Menu submenu = GetSubmenu (tags);
            if (submenu == null)
                item.Sensitive = false;
            else
                item.Submenu = submenu;

            menu.Append (item);
            item.Show ();
        }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:14,代码来源:TermMenuItem.cs

示例14: PopulateFlat

        public void PopulateFlat (Category cat, Gtk.Menu parent)
	{
		foreach (Tag t in cat.Children) {
			TagMenuItem item = TagMenuItem.IndentedItem (t);
			parent.Append (item);
			item.ShowAll ();

			Category subcat = t as Category;
			if (subcat != null && subcat.Children.Length != 0) {
				PopulateFlat (t as Category, parent);
			} else {
				item.Activated += HandleActivate;
			}
		} 
	}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:15,代码来源:TagMenu.cs

示例15: Populate

	public void Populate (Category cat, Gtk.Menu parent)
	{
		Widget [] dead_pool = parent.Children;
		for (int i = 0; i < dead_pool.Length; i++)
			dead_pool [i].Destroy ();

		foreach (Tag t in cat.Children) {
			TagMenuItem item = new TagMenuItem (t);
			parent.Append (item);
			item.ShowAll ();

			Category subcat = t as Category;
			if (subcat != null && subcat.Children.Length != 0) {
				Gtk.Menu submenu = new Menu ();
				Populate (t as Category, submenu);

				Gtk.SeparatorMenuItem sep = new Gtk.SeparatorMenuItem ();
				submenu.Prepend (sep);
				sep.ShowAll ();

				TagMenuItem subitem = new TagMenuItem (t);
				subitem.Activated += HandleActivate;
				submenu.Prepend (subitem);
				subitem.ShowAll ();

				item.Submenu = submenu;
			} else {
				item.Activated += HandleActivate;
			}
		} 
	}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:31,代码来源:TagMenu.cs


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