UNPKG

1.93 kBTypeScriptView Raw
1import { IRankedMenu, RankedMenu } from '@jupyterlab/ui-components';
2import { SemanticCommand } from '@jupyterlab/apputils';
3/**
4 * An interface for an Edit menu.
5 */
6export interface IEditMenu extends IRankedMenu {
7 /**
8 * Semantic commands IUndoers for the Edit menu.
9 */
10 readonly undoers: IEditMenu.IUndoer;
11 /**
12 * Semantic commands IClearers for the Edit menu.
13 */
14 readonly clearers: IEditMenu.IClearer;
15 /**
16 * Semantic commands IGoToLiners for the Edit menu.
17 */
18 readonly goToLiners: SemanticCommand;
19}
20/**
21 * An extensible Edit menu for the application.
22 */
23export declare class EditMenu extends RankedMenu implements IEditMenu {
24 /**
25 * Construct the edit menu.
26 */
27 constructor(options: IRankedMenu.IOptions);
28 /**
29 * Semantic commands IUndoers for the Edit menu.
30 */
31 readonly undoers: IEditMenu.IUndoer;
32 /**
33 * Semantic commands IClearers for the Edit menu.
34 */
35 readonly clearers: IEditMenu.IClearer;
36 /**
37 * Semantic commands IGoToLiners for the Edit menu.
38 */
39 readonly goToLiners: SemanticCommand;
40}
41/**
42 * Namespace for IEditMenu
43 */
44export declare namespace IEditMenu {
45 /**
46 * Interface for an activity that uses Undo/Redo.
47 */
48 interface IUndoer {
49 /**
50 * A semantic command to execute an undo command for the activity.
51 */
52 undo: SemanticCommand;
53 /**
54 * A semantic command to execute a redo command for the activity.
55 */
56 redo: SemanticCommand;
57 }
58 /**
59 * Interface for an activity that wants to register a 'Clear...' menu item
60 */
61 interface IClearer {
62 /**
63 * A semantic command to clear the currently portion of activity.
64 */
65 clearCurrent: SemanticCommand;
66 /**
67 * A semantic command to clear all of an activity.
68 */
69 clearAll: SemanticCommand;
70 }
71}