UNPKG

1.32 kBTypeScriptView Raw
1import { IRankedMenu, RankedMenu } from '@jupyterlab/ui-components';
2import { SemanticCommand } from '@jupyterlab/apputils';
3/**
4 * An interface for a View menu.
5 */
6export interface IViewMenu extends IRankedMenu {
7 /**
8 * Semantic commands IEditorViewer for the View menu.
9 */
10 readonly editorViewers: IViewMenu.IEditorViewer;
11}
12/**
13 * An extensible View menu for the application.
14 */
15export declare class ViewMenu extends RankedMenu implements IViewMenu {
16 /**
17 * Construct the view menu.
18 */
19 constructor(options: IRankedMenu.IOptions);
20 /**
21 * Semantic commands IEditorViewer for the View menu.
22 */
23 readonly editorViewers: IViewMenu.IEditorViewer;
24}
25/**
26 * Namespace for IViewMenu.
27 */
28export declare namespace IViewMenu {
29 /**
30 * Interface for a text editor viewer to register
31 * itself with the text editor semantic commands.
32 */
33 interface IEditorViewer {
34 /**
35 * A semantic command to show line numbers in the editor.
36 */
37 toggleLineNumbers: SemanticCommand;
38 /**
39 * A semantic command to word-wrap the editor.
40 */
41 toggleWordWrap: SemanticCommand;
42 /**
43 * A semantic command to match brackets in the editor.
44 */
45 toggleMatchBrackets: SemanticCommand;
46 }
47}