Inheritance: IMenuBackend
示例#1
0
 public void Dispose()
 {
     if (statusItem != null) {
         statusItem.Dispose();
     }
     statusItem = null;
     menu = null;
 }
        Gtk.Menu CreateMenu()
        {
            MenuBackend m = null;

            ApplicationContext.InvokeUserCode(delegate {
                m = (MenuBackend)EventSink.OnCreateMenu();
            });
            return(m != null ? m.Menu : null);
        }
示例#3
0
 public void Dispose()
 {
     if (statusItem != null)
     {
         statusItem.Dispose();
     }
     statusItem = null;
     menu       = null;
 }
示例#4
0
        Gtk.Menu CreateMenu()
        {
            MenuBackend m = null;

            Toolkit.Invoke(delegate {
                m = (MenuBackend)EventSink.OnCreateMenu();
            });
            return(m != null ? m.Menu : null);
        }
示例#5
0
		public void SetMenu (object menuBackend) 
		{
			if (menuBackend == null) {
				throw new ArgumentNullException ("menuBackend");
			}
			if (menu != null) {
				statusItem.PopupMenu -= HandleStatusItemPopupMenu;
			}
			menu = (MenuBackend)menuBackend;
			statusItem.PopupMenu += HandleStatusItemPopupMenu;
		}
示例#6
0
 public void SetMenu(object menuBackend)
 {
     if (menuBackend == null)
     {
         throw new ArgumentNullException("menuBackend");
     }
     if (menu != null)
     {
         statusItem.PopupMenu -= HandleStatusItemPopupMenu;
     }
     menu = (MenuBackend)menuBackend;
     statusItem.PopupMenu += HandleStatusItemPopupMenu;
 }
示例#7
0
        public void SetMainMenu(IMenuBackend menu)
        {
            if (mainMenu != null)
            {
                mainBox.Remove(mainMenu);
            }

            if (menu != null)
            {
                MenuBackend m = (MenuBackend)menu;
                mainMenu = m.MenuBar;
                mainBox.PackStart(mainMenu, false, false, 0);
                ((Gtk.Box.BoxChild)mainBox[mainMenu]).Position = 0;
            }
            else
            {
                mainMenu = null;
            }
        }
示例#8
0
        Gtk.Menu CreateMenu(InternalMenuButton mb)
        {
            MenuBackend m = (MenuBackend)EventSink.OnCreateMenu();

            return(m != null ? m.Menu : null);
        }