A common interface for extensible JupyterLab application menus.

Plugins are still free to define their own menus in any way they like. However, JupyterLab defines a few top-level application menus that may be extended by plugins as well, such as "Edit" and "View"

interface IRankedMenu {
    isDisposed: boolean;
    items: readonly IItem[];
    rank?: number;
    addGroup(items: IItemOptions[], rank?: number): IDisposable;
    addItem(options: IRankedMenu.IItemOptions): IDisposable;
    dispose(): void;
}

Hierarchy (View Summary)

Implemented by

Properties

isDisposed: boolean

Test whether the object has been disposed.

This property is always safe to access.

items: readonly IItem[]

A read-only array of the menu items in the menu.

rank?: number

Menu rank

Methods

  • Dispose of the resources held by the object.

    If the object's dispose method is called more than once, all calls made after the first will be a no-op.

    It is undefined behavior to use any functionality of the object after it has been disposed unless otherwise explicitly noted.

    Returns void