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); }
Gtk.Menu CreateMenu() { MenuBackend m = null; Toolkit.Invoke(delegate { m = (MenuBackend)EventSink.OnCreateMenu(); }); return(m != null ? m.Menu : null); }
public void SetMenu (object menuBackend) { if (menuBackend == null) { throw new ArgumentNullException ("menuBackend"); } if (menu != null) { statusItem.PopupMenu -= HandleStatusItemPopupMenu; } menu = (MenuBackend)menuBackend; statusItem.PopupMenu += HandleStatusItemPopupMenu; }
public void SetMenu(object menuBackend) { if (menuBackend == null) { throw new ArgumentNullException("menuBackend"); } if (menu != null) { statusItem.PopupMenu -= HandleStatusItemPopupMenu; } menu = (MenuBackend)menuBackend; statusItem.PopupMenu += HandleStatusItemPopupMenu; }
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; } }
Gtk.Menu CreateMenu(InternalMenuButton mb) { MenuBackend m = (MenuBackend)EventSink.OnCreateMenu(); return(m != null ? m.Menu : null); }