Options
All
  • Public
  • Public/Protected
  • All
Menu

Module apputils-extension

Index

Variables

Variables

Const default

default: JupyterFrontEndPlugin<any>[] = [palette,paletteRestorer,print,resolver,sanitizer,settingsPlugin,state,splash,sessionDialogs,themesPlugin,themesPaletteMenuPlugin,toggleHeader,utilityCommands,workspacesPlugin]

Export the plugins as default.

Const toggleHeader

toggleHeader: JupyterFrontEndPlugin<void> = {id: '@jupyterlab/apputils-extension:toggle-header',autoStart: true,requires: [ITranslator],optional: [ICommandPalette],activate: (app: JupyterFrontEnd,translator: ITranslator,palette: ICommandPalette | null) => {const trans = translator.load('jupyterlab');const category: string = trans.__('Main Area');app.commands.addCommand(CommandIDs.toggleHeader, {label: trans.__('Show Header Above Content'),isEnabled: () =>app.shell.currentWidget instanceof MainAreaWidget &&app.shell.currentWidget.contentHeader.widgets.length > 0,isToggled: () => {const widget = app.shell.currentWidget;return widget instanceof MainAreaWidget? !widget.contentHeader.isHidden: false;},execute: async () => {const widget = app.shell.currentWidget;if (widget instanceof MainAreaWidget) {widget.contentHeader.setHidden(!widget.contentHeader.isHidden);}}});if (palette) {palette.addItem({ command: CommandIDs.toggleHeader, category });}}}

Generated using TypeDoc