-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
help.ts
43 lines (39 loc) · 1.15 KB
/
help.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import { IRankedMenu, RankedMenu } from '@jupyterlab/ui-components';
import { SemanticCommand } from '@jupyterlab/apputils';
/**
* An interface for a Help menu.
*/
export interface IHelpMenu extends IRankedMenu {
/**
* A semantic command to get the kernel for the help menu.
* This is used to populate additional help
* links provided by the kernel of a widget.
*
* #### Note
* The command must return a Kernel.IKernelConnection object
*/
readonly getKernel: SemanticCommand;
}
/**
* An extensible Help menu for the application.
*/
export class HelpMenu extends RankedMenu implements IHelpMenu {
/**
* Construct the help menu.
*/
constructor(options: IRankedMenu.IOptions) {
super(options);
this.getKernel = new SemanticCommand();
}
/**
* A semantic command to get the kernel for the help menu.
* This is used to populate additional help
* links provided by the kernel of a widget.
*
* #### Note
* The command must return a Kernel.IKernelConnection object
*/
readonly getKernel: SemanticCommand;
}