@jupyterlab/mainmenu

  • Version 4.1.6
  • Published
  • 67.9 kB
  • 7 dependencies
  • BSD-3-Clause license

Install

npm i @jupyterlab/mainmenu
yarn add @jupyterlab/mainmenu
pnpm add @jupyterlab/mainmenu

Overview

mainmenu

Index

Variables

variable IMainMenu

const IMainMenu: Token<IMainMenu>;
  • The main menu token.

Classes

class EditMenu

class EditMenu extends RankedMenu implements IEditMenu {}
  • An extensible Edit menu for the application.

constructor

constructor(options: IRankedMenu.IOptions);
  • Construct the edit menu.

property clearers

readonly clearers: IEditMenu.IClearer;
  • Semantic commands IClearers for the Edit menu.

property goToLiners

readonly goToLiners: SemanticCommand;
  • Semantic commands IGoToLiners for the Edit menu.

property undoers

readonly undoers: IEditMenu.IUndoer;
  • Semantic commands IUndoers for the Edit menu.

class FileMenu

class FileMenu extends RankedMenu implements IFileMenu {}
  • An extensible FileMenu for the application.

constructor

constructor(options: IRankedMenu.IOptions);

    property closeAndCleaners

    readonly closeAndCleaners: SemanticCommand;
    • The close and cleanup semantic command.

    property consoleCreators

    readonly consoleCreators: SemanticCommand;
    • The console creator semantic command.

    property newMenu

    readonly newMenu: RankedMenu;
    • The New submenu.

    property quitEntry

    quitEntry: boolean;
    • Option to add a Quit entry in File menu

    method dispose

    dispose: () => void;
    • Dispose of the resources held by the file menu.

    class HelpMenu

    class HelpMenu extends RankedMenu implements IHelpMenu {}
    • An extensible Help menu for the application.

    constructor

    constructor(options: IRankedMenu.IOptions);
    • Construct the help menu.

    property getKernel

    readonly getKernel: 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

    class KernelMenu

    class KernelMenu extends RankedMenu implements IKernelMenu {}
    • An extensible Kernel menu for the application.

    constructor

    constructor(options: IRankedMenu.IOptions);
    • Construct the kernel menu.

    property kernelUsers

    readonly kernelUsers: IKernelMenu.IKernelUser;
    • Semantic commands IKernelUsers for the Kernel menu.

    class MainMenu extends MenuBar implements IMainMenu {}
    • The main menu class. It is intended to be used as a singleton.

    constructor(commands: CommandRegistry);
    • Construct the main menu bar.

    readonly editMenu: EditMenu;
    • The application "Edit" menu.

    readonly fileMenu: FileMenu;
    • The application "File" menu.

    readonly helpMenu: HelpMenu;
    • The application "Help" menu.

    readonly kernelMenu: KernelMenu;
    • The application "Kernel" menu.

    readonly runMenu: RunMenu;
    • The application "Run" menu.

    readonly settingsMenu: SettingsMenu;
    • The application "Settings" menu.

    readonly tabsMenu: TabsMenu;
    • The application "Tabs" menu.

    readonly viewMenu: ViewMenu;
    • The application "View" menu.

    addMenu: (menu: Menu, update?: boolean, options?: IMainMenu.IAddOptions) => void;
    • Add a new menu to the main menu bar.

    dispose: () => void;
    • Dispose of the resources held by the menu bar.

    static generateMenu: (
    commands: CommandRegistry,
    options: IMainMenu.IMenuOptions,
    trans: TranslationBundle
    ) => RankedMenu;
    • Generate the menu.

      Parameter commands

      The command registry

      Parameter options

      The main menu options.

      Parameter trans

      The application language translator.

    class RunMenu

    class RunMenu extends RankedMenu implements IRunMenu {}
    • An extensible Run menu for the application.

    constructor

    constructor(options: IRankedMenu.IOptions);
    • Construct the run menu.

    property codeRunners

    readonly codeRunners: IRunMenu.ICodeRunner;
    • Semantic commands ICodeRunner for the Run menu.

    class SettingsMenu

    class SettingsMenu extends RankedMenu implements ISettingsMenu {}
    • An extensible Settings menu for the application.

    constructor

    constructor(options: IRankedMenu.IOptions);
    • Construct the settings menu.

    class TabsMenu

    class TabsMenu extends RankedMenu implements ITabsMenu {}
    • An extensible Tabs menu for the application.

    constructor

    constructor(options: IRankedMenu.IOptions);
    • Construct the tabs menu.

    class ViewMenu

    class ViewMenu extends RankedMenu implements IViewMenu {}
    • An extensible View menu for the application.

    constructor

    constructor(options: IRankedMenu.IOptions);
    • Construct the view menu.

    property editorViewers

    readonly editorViewers: IViewMenu.IEditorViewer;
    • Semantic commands IEditorViewer for the View menu.

    Interfaces

    interface IEditMenu

    interface IEditMenu extends IRankedMenu {}
    • An interface for an Edit menu.

    property clearers

    readonly clearers: IEditMenu.IClearer;
    • Semantic commands IClearers for the Edit menu.

    property goToLiners

    readonly goToLiners: SemanticCommand;
    • Semantic commands IGoToLiners for the Edit menu.

    property undoers

    readonly undoers: IEditMenu.IUndoer;
    • Semantic commands IUndoers for the Edit menu.

    interface IFileMenu

    interface IFileMenu extends IRankedMenu {}
    • An interface for a File menu.

    property closeAndCleaners

    readonly closeAndCleaners: SemanticCommand;
    • The close and cleanup semantic command.

    property consoleCreators

    readonly consoleCreators: SemanticCommand;
    • The console creator semantic command.

    property newMenu

    readonly newMenu: IRankedMenu;
    • A submenu for creating new files/launching new activities.

    property quitEntry

    quitEntry: boolean;
    • Option to add a Quit entry in the File menu

    interface IHelpMenu

    interface IHelpMenu extends IRankedMenu {}
    • An interface for a Help menu.

    property getKernel

    readonly getKernel: 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

    interface IKernelMenu

    interface IKernelMenu extends IRankedMenu {}
    • An interface for a Kernel menu.

    property kernelUsers

    readonly kernelUsers: IKernelMenu.IKernelUser;
    • Semantic commands IKernelUsers for the Kernel menu.

    interface IMainMenu

    interface IMainMenu {}
    • The main menu interface.

    property editMenu

    readonly editMenu: IEditMenu;
    • The application "Edit" menu.

    property fileMenu

    readonly fileMenu: IFileMenu;
    • The application "File" menu.

    property helpMenu

    readonly helpMenu: IHelpMenu;
    • The application "Help" menu.

    property kernelMenu

    readonly kernelMenu: IKernelMenu;
    • The application "Kernel" menu.

    property runMenu

    readonly runMenu: IRunMenu;
    • The application "Run" menu.

    property settingsMenu

    readonly settingsMenu: ISettingsMenu;
    • The application "Settings" menu.

    property tabsMenu

    readonly tabsMenu: ITabsMenu;
    • The application "Tabs" menu.

    property viewMenu

    readonly viewMenu: IViewMenu;
    • The application "View" menu.

    method addMenu

    addMenu: (menu: Menu, update?: boolean, options?: IMainMenu.IAddOptions) => void;
    • Add a new menu to the main menu bar.

      Parameter menu

      The menu to add

      Parameter update

      Whether to update the menu bar or not

      Parameter options

      Options for adding the menu

    interface IRunMenu

    interface IRunMenu extends IRankedMenu {}
    • An interface for a Run menu.

    property codeRunners

    readonly codeRunners: IRunMenu.ICodeRunner;
    • Semantic commands ICodeRunner for the Run menu.

    interface ISettingsMenu

    interface ISettingsMenu extends IRankedMenu {}
    • An interface for a Settings menu.

    interface ITabsMenu

    interface ITabsMenu extends IRankedMenu {}
    • An interface for a Tabs menu.

    interface IViewMenu

    interface IViewMenu extends IRankedMenu {}
    • An interface for a View menu.

    property editorViewers

    readonly editorViewers: IViewMenu.IEditorViewer;
    • Semantic commands IEditorViewer for the View menu.

    Namespaces

    namespace IEditMenu

    namespace IEditMenu {}
    • Namespace for IEditMenu

    interface IClearer

    interface IClearer {}
    • Interface for an activity that wants to register a 'Clear...' menu item

    property clearAll

    clearAll: SemanticCommand;
    • A semantic command to clear all of an activity.

    property clearCurrent

    clearCurrent: SemanticCommand;
    • A semantic command to clear the currently portion of activity.

    interface IUndoer

    interface IUndoer {}
    • Interface for an activity that uses Undo/Redo.

    property redo

    redo: SemanticCommand;
    • A semantic command to execute a redo command for the activity.

    property undo

    undo: SemanticCommand;
    • A semantic command to execute an undo command for the activity.

    namespace IKernelMenu

    namespace IKernelMenu {}
    • Namespace for IKernelMenu

    interface IKernelUser

    interface IKernelUser {}
    • Interface for a Kernel user to register itself with the IKernelMenu's semantic extension points.

    property changeKernel

    changeKernel: SemanticCommand;
    • A semantic command to change the kernel.

    property clearWidget

    clearWidget: SemanticCommand;
    • A semantic command to clear the widget.

    property interruptKernel

    interruptKernel: SemanticCommand;
    • A semantic command to interrupt the kernel.

    property reconnectToKernel

    reconnectToKernel: SemanticCommand;
    • A semantic command to reconnect to the kernel

    property restartKernel

    restartKernel: SemanticCommand;
    • A semantic command to restart the kernel, which returns a promise of whether the kernel was restarted.

    property shutdownKernel

    shutdownKernel: SemanticCommand;
    • A semantic command to shut down the kernel.

    namespace IMainMenu

    namespace IMainMenu {}
    • The namespace for IMainMenu attached interfaces.

    interface IAddOptions

    interface IAddOptions {}
    • The options used to add a menu to the main menu.

    property rank

    rank?: number;
    • The rank order of the menu among its siblings.

    interface IMenuOptions

    interface IMenuOptions extends MenuFactory.IMenuOptions {}
    • The instantiation options for an IMainMenu.

    namespace IRunMenu

    namespace IRunMenu {}
    • A namespace for RunMenu statics.

    interface ICodeRunner

    interface ICodeRunner {}
    • An object that runs code, which may be registered with the Run menu.

    property restart

    restart: SemanticCommand;
    • A semantic command to restart a kernel

    property run

    run: SemanticCommand;
    • A semantic command to run a subpart of a document.

    property runAll

    runAll: SemanticCommand;
    • A semantic command to run a whole document

    namespace IViewMenu

    namespace IViewMenu {}
    • Namespace for IViewMenu.

    interface IEditorViewer

    interface IEditorViewer {}
    • Interface for a text editor viewer to register itself with the text editor semantic commands.

    property toggleLineNumbers

    toggleLineNumbers: SemanticCommand;
    • A semantic command to show line numbers in the editor.

    property toggleMatchBrackets

    toggleMatchBrackets: SemanticCommand;
    • A semantic command to match brackets in the editor.

    property toggleWordWrap

    toggleWordWrap: SemanticCommand;
    • A semantic command to word-wrap the editor.

    Package Files (11)

    Dependencies (7)

    Dev Dependencies (6)

    Peer Dependencies (0)

    No peer dependencies.

    Badge

    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@jupyterlab/mainmenu.

    • Markdown
      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@jupyterlab/mainmenu)
    • HTML
      <a href="https://www.jsdocs.io/package/@jupyterlab/mainmenu"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>