public static Menu CreatePopupMenu() { Menu submenu = MenuCreator.CreateMenuSet((object)"", false, (string)null, (string)null).Submenu as Menu; submenu.HasTooltip = false; return(submenu); }
public static MenuItem CreateMenuSet(Command cmd, bool autoHide = false, string label = null) { MenuCreator.CommandEntryHelper commandEntryHelper = label != null ? new MenuCreator.CommandEntryHelper(cmd, label) : new MenuCreator.CommandEntryHelper(cmd); commandEntryHelper.DisabledVisible = !autoHide; MenuItem menuItem = commandEntryHelper.GetMenuItem(); menuItem.Submenu = (Widget)MenuCreator.CreatePopupMenu(); return(menuItem); }
private static Menu InitPopupMenu() { Menu popupMenu = MenuCreator.CreatePopupMenu(); popupMenu.Append((Widget)MenuCreator.CreateMenuItem((Command)GlobalCommand.CloseCmd, false, (string)null)); popupMenu.Append((Widget)MenuCreator.CreateMenuItem((Command)GlobalCommand.CloseAllCmd, false, (string)null)); popupMenu.Append((Widget)MenuCreator.CreateMenuItem((Command)GlobalCommand.CloseOtherCmd, false, (string)null)); popupMenu.Append((Widget)MenuCreator.CreateMenuSeperator()); popupMenu.Append((Widget)MenuCreator.CreateMenuItem((Command)GlobalCommand.SaveCmd, false, (string)null)); popupMenu.Append((Widget)MenuCreator.CreateMenuItem((Command)GlobalCommand.SaveAllCmd, false, (string)null)); popupMenu.Append((Widget)MenuCreator.CreateMenuSeperator()); popupMenu.Append((Widget)MenuCreator.CreateMenuItem((Command)GlobalCommand.OpenDirCmd, false, (string)null)); return(popupMenu); }