UNPKG

2.02 kBTypeScriptView Raw
1import { MenuFactory } from '@jupyterlab/apputils';
2import { Token } from '@lumino/coreutils';
3import { Menu } from '@lumino/widgets';
4import { IEditMenu } from './edit';
5import { IFileMenu } from './file';
6import { IHelpMenu } from './help';
7import { IKernelMenu } from './kernel';
8import { IRunMenu } from './run';
9import { ISettingsMenu } from './settings';
10import { ITabsMenu } from './tabs';
11import { IViewMenu } from './view';
12/**
13 * The main menu token.
14 */
15export declare const IMainMenu: Token<IMainMenu>;
16/**
17 * The main menu interface.
18 */
19export interface IMainMenu {
20 /**
21 * Add a new menu to the main menu bar.
22 *
23 * @param menu The menu to add
24 * @param update Whether to update the menu bar or not
25 * @param options Options for adding the menu
26 */
27 addMenu(menu: Menu, update?: boolean, options?: IMainMenu.IAddOptions): void;
28 /**
29 * The application "File" menu.
30 */
31 readonly fileMenu: IFileMenu;
32 /**
33 * The application "Edit" menu.
34 */
35 readonly editMenu: IEditMenu;
36 /**
37 * The application "View" menu.
38 */
39 readonly viewMenu: IViewMenu;
40 /**
41 * The application "Help" menu.
42 */
43 readonly helpMenu: IHelpMenu;
44 /**
45 * The application "Kernel" menu.
46 */
47 readonly kernelMenu: IKernelMenu;
48 /**
49 * The application "Run" menu.
50 */
51 readonly runMenu: IRunMenu;
52 /**
53 * The application "Settings" menu.
54 */
55 readonly settingsMenu: ISettingsMenu;
56 /**
57 * The application "Tabs" menu.
58 */
59 readonly tabsMenu: ITabsMenu;
60}
61/**
62 * The namespace for IMainMenu attached interfaces.
63 */
64export declare namespace IMainMenu {
65 /**
66 * The options used to add a menu to the main menu.
67 */
68 interface IAddOptions {
69 /**
70 * The rank order of the menu among its siblings.
71 */
72 rank?: number;
73 }
74 /**
75 * The instantiation options for an IMainMenu.
76 */
77 interface IMenuOptions extends MenuFactory.IMenuOptions {
78 }
79}