本文整理汇总了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 ();
}
示例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 ());
}
示例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 ());
}
示例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));
}
示例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));
}
示例6: CreateMainMenu
public void CreateMainMenu(Gtk.Menu menu)
{
addins_menu = menu;
menu.Append (AddinManager.CreateMenuItem ());
menu.AppendSeparator ();
}
示例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 ();
}
示例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);
}
示例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 ();
}
示例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;
}
示例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;
}
示例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));
}
示例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 ();
}
示例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;
}
}
}
示例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;
}
}
}