/******************************************************************************** * Copyright (C) 2017 TypeFox and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * This Source Code may also be made available under the following Secondary * Licenses when the conditions for such availability set forth in the Eclipse * Public License v. 2.0 are satisfied: GNU General Public License, version 2 * with the GNU Classpath Exception which is available at * https://www.gnu.org/software/classpath/license.html. * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ import { Menu as MenuWidget, MenuBar, Widget } from '@phosphor/widgets'; import { CommandRegistry as PhosphorCommandRegistry } from '@phosphor/commands'; import { ActionMenuNode, CompositeMenuNode, MenuModelRegistry, MenuPath } from '@gedit/application-common'; import { Disposable, DisposableCollection } from '@gedit/utils'; import { CommandRegistry } from '@gedit/command'; import { KeybindingRegistry } from '../keybinding'; import { FrontendApplicationContribution } from '@gedit/application-common/lib/browser'; import { ContextKeyService } from '@gedit/application-common/lib/browser'; import { ContextMenuContext } from './context-menu-context'; import { ApplicationShell } from '../shell'; export declare abstract class MenuBarWidget extends MenuBar { abstract activateMenu(label: string, ...labels: string[]): Promise; abstract triggerMenuItem(label: string, ...labels: string[]): Promise; } export declare class BrowserMainMenuFactory { protected readonly contextKeyService: ContextKeyService; protected readonly context: ContextMenuContext; protected readonly commandRegistry: CommandRegistry; protected readonly keybindingRegistry: KeybindingRegistry; protected readonly menuProvider: MenuModelRegistry; private get services(); createMenuBar(): MenuBarWidget; createContextMenu(path: MenuPath, args?: any[]): MenuWidget; protected fillMenuBar(menuBar: MenuBarWidget): void; protected createMenuCommandRegistry(menu: CompositeMenuNode, args?: any[]): MenuCommandRegistry; protected registerMenu(menuCommandRegistry: MenuCommandRegistry, menu: CompositeMenuNode, args: any[]): void; } declare class MenuServices { readonly commandRegistry: CommandRegistry; readonly keybindingRegistry: KeybindingRegistry; readonly contextKeyService: ContextKeyService; readonly context: ContextMenuContext; } export declare class BrowserMenuBarContribution implements FrontendApplicationContribution { protected readonly factory: BrowserMainMenuFactory; protected readonly shell: ApplicationShell; constructor(factory: BrowserMainMenuFactory); get menuBar(): MenuBarWidget | undefined; onStart(): void; protected createLogo(): Widget; } /** * Stores Theia-specific action menu nodes instead of PhosphorJS commands with their handlers. */ declare class MenuCommandRegistry extends PhosphorCommandRegistry { protected services: MenuServices; protected actions: Map; protected toDispose: DisposableCollection; constructor(services: MenuServices); registerActionMenu(menu: ActionMenuNode, args: any[]): void; snapshot(): this; protected registerCommand(menu: ActionMenuNode, args: any[]): Disposable; } export {}; //# sourceMappingURL=browser-menu-plugin.d.ts.map