AppKit.NSMenu CreateNSMenu (FixMenuDescriptor entrySet)
		{
			var menu = new AppKit.NSMenu ();
			foreach (var item in entrySet.Items) {
				if (item == FixMenuEntry.Separator) {
					menu.AddItem (AppKit.NSMenuItem.SeparatorItem);
					continue;
				}
				var subMenu = item as FixMenuDescriptor;
				if (subMenu != null) {
					var gtkSubMenu = new AppKit.NSMenuItem (item.Label.Replace ("_", ""));
					gtkSubMenu.Submenu = CreateNSMenu (subMenu);
					menu.AddItem (gtkSubMenu); 
					continue;
				}
				var menuItem = new AppKit.NSMenuItem (item.Label.Replace ("_", ""));
				menuItem.Activated += delegate {
					item.Action ();
				};
				menu.AddItem (menuItem); 
			}
			return menu;
		}
        AppKit.NSMenu CreateNSMenu(FixMenuDescriptor entrySet)
        {
            var menu = new AppKit.NSMenu();

            foreach (var item in entrySet.Items)
            {
                if (item == FixMenuEntry.Separator)
                {
                    menu.AddItem(AppKit.NSMenuItem.SeparatorItem);
                    continue;
                }
                var subMenu = item as FixMenuDescriptor;
                if (subMenu != null)
                {
                    var gtkSubMenu = new AppKit.NSMenuItem(item.Label.Replace("_", ""));
                    gtkSubMenu.Submenu = CreateNSMenu(subMenu);
                    menu.AddItem(gtkSubMenu);
                    continue;
                }
                var menuItem = new AppKit.NSMenuItem(item.Label.Replace("_", ""));
                menuItem.Activated += delegate {
                    item.Action();
                };
                menu.AddItem(menuItem);
            }
            return(menu);
        }
示例#3
0
 void ReleaseDesignerOutlets()
 {
     if (statusMenu != null)
     {
         statusMenu.Dispose();
         statusMenu = null;
     }
 }
 void ReleaseDesignerOutlets()
 {
     if (MainMenu != null)
     {
         MainMenu.Dispose();
         MainMenu = null;
     }
 }
 void ReleaseDesignerOutlets()
 {
     if (editMenu != null)
     {
         editMenu.Dispose();
         editMenu = null;
     }
 }
        void ReleaseDesignerOutlets()
        {
            if (dbNavOutlineView != null)
            {
                dbNavOutlineView.Dispose();
                dbNavOutlineView = null;
            }

            if (dbVavMenu != null)
            {
                dbVavMenu.Dispose();
                dbVavMenu = null;
            }
        }
示例#7
0
        void ReleaseDesignerOutlets()
        {
            if (SystemTrayStatusMenu != null)
            {
                SystemTrayStatusMenu.Dispose();
                SystemTrayStatusMenu = null;
            }

            if (MyMainMenu != null)
            {
                MyMainMenu.Dispose();
                MyMainMenu = null;
            }
        }
示例#8
0
 public virtual override void SetSubmenu(AppKit.NSMenu aMenu, AppKit.NSMenuItem anItem)
 {
 }
示例#9
0
 public static override void PopUpContextMenu(AppKit.NSMenu menu, AppKit.NSEvent theEvent, AppKit.NSView view, AppKit.NSFont font)
 {
 }
示例#10
0
 public virtual override nint IndexOfItem(AppKit.NSMenu submenu)
 {
     throw new NotImplementedException();
 }
示例#11
0
 public override void MenuDidClose(AppKit.NSMenu menu)
 {
     data.SuppressTooltips = false;
 }
示例#12
0
 public override void MenuWillHighlightItem(AppKit.NSMenu menu, AppKit.NSMenuItem item)
 {
 }
示例#13
-1
		void ReleaseDesignerOutlets ()
		{
			if (EditMenu != null) {
				EditMenu.Dispose ();
				EditMenu = null;
			}
		}