1 |
|
2 |
|
3 |
|
4 | import { MenuFactory } from '@jupyterlab/apputils';
|
5 | import { Token } from '@lumino/coreutils';
|
6 | import { Menu } from '@lumino/widgets';
|
7 | import { IEditMenu } from './edit';
|
8 | import { IFileMenu } from './file';
|
9 | import { IHelpMenu } from './help';
|
10 | import { IKernelMenu } from './kernel';
|
11 | import { IRunMenu } from './run';
|
12 | import { ISettingsMenu } from './settings';
|
13 | import { ITabsMenu } from './tabs';
|
14 | import { IViewMenu } from './view';
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export const IMainMenu = new Token<IMainMenu>(
|
20 | '@jupyterlab/mainmenu:IMainMenu',
|
21 | `A service for the main menu bar for the application.
|
22 | Use this if you want to add your own menu items or provide implementations for standardized menu items for specific activities.`
|
23 | );
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | export interface IMainMenu {
|
29 | |
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 | addMenu(menu: Menu, update?: boolean, options?: IMainMenu.IAddOptions): void;
|
37 |
|
38 | |
39 |
|
40 |
|
41 | readonly fileMenu: IFileMenu;
|
42 |
|
43 | |
44 |
|
45 |
|
46 | readonly editMenu: IEditMenu;
|
47 |
|
48 | |
49 |
|
50 |
|
51 | readonly viewMenu: IViewMenu;
|
52 |
|
53 | |
54 |
|
55 |
|
56 | readonly helpMenu: IHelpMenu;
|
57 |
|
58 | |
59 |
|
60 |
|
61 | readonly kernelMenu: IKernelMenu;
|
62 |
|
63 | |
64 |
|
65 |
|
66 | readonly runMenu: IRunMenu;
|
67 |
|
68 | |
69 |
|
70 |
|
71 | readonly settingsMenu: ISettingsMenu;
|
72 |
|
73 | |
74 |
|
75 |
|
76 | readonly tabsMenu: ITabsMenu;
|
77 | }
|
78 |
|
79 |
|
80 |
|
81 |
|
82 | export namespace IMainMenu {
|
83 | |
84 |
|
85 |
|
86 | export interface IAddOptions {
|
87 | |
88 |
|
89 |
|
90 | rank?: number;
|
91 | }
|
92 |
|
93 | |
94 |
|
95 |
|
96 | export interface IMenuOptions extends MenuFactory.IMenuOptions {}
|
97 | }
|