1 | import { interfaces } from 'inversify';
|
2 | import { Widget } from '@phosphor/widgets';
|
3 | import { MenuModelRegistry, Command, CommandContribution, MenuContribution, CommandRegistry } from '../../common';
|
4 | import { KeybindingContribution, KeybindingRegistry } from '../keybinding';
|
5 | import { WidgetManager } from '../widget-manager';
|
6 | import { ApplicationShell } from './application-shell';
|
7 | import { QuickViewService } from '../quick-input';
|
8 | export interface OpenViewArguments extends ApplicationShell.WidgetOptions {
|
9 | toggle?: boolean;
|
10 | activate?: boolean;
|
11 | reveal?: boolean;
|
12 | }
|
13 | export interface ViewContributionOptions {
|
14 | widgetId: string;
|
15 | viewContainerId?: string;
|
16 | widgetName: string;
|
17 | defaultWidgetOptions: ApplicationShell.WidgetOptions;
|
18 | toggleCommandId?: string;
|
19 | toggleKeybinding?: string;
|
20 | }
|
21 | export declare function bindViewContribution<T extends AbstractViewContribution<Widget>>(bind: interfaces.Bind, identifier: interfaces.Newable<T>): interfaces.BindingWhenOnSyntax<T>;
|
22 |
|
23 |
|
24 |
|
25 | export declare abstract class AbstractViewContribution<T extends Widget> implements CommandContribution, MenuContribution, KeybindingContribution {
|
26 | protected readonly options: ViewContributionOptions;
|
27 | protected readonly widgetManager: WidgetManager;
|
28 | protected readonly shell: ApplicationShell;
|
29 | protected readonly quickView: QuickViewService;
|
30 | readonly toggleCommand?: Command;
|
31 | constructor(options: ViewContributionOptions);
|
32 | get viewId(): string;
|
33 | get viewLabel(): string;
|
34 | get defaultViewOptions(): ApplicationShell.WidgetOptions;
|
35 | get widget(): Promise<T>;
|
36 | tryGetWidget(): T | undefined;
|
37 | openView(args?: Partial<OpenViewArguments>): Promise<T>;
|
38 | registerCommands(commands: CommandRegistry): void;
|
39 | closeView(): Promise<T | undefined>;
|
40 | toggleView(): Promise<T>;
|
41 | registerMenus(menus: MenuModelRegistry): void;
|
42 | registerKeybindings(keybindings: KeybindingRegistry): void;
|
43 | }
|
44 | //# sourceMappingURL=view-contribution.d.ts.map |
\ | No newline at end of file |