@theia/core
Version:
Theia is a cloud & desktop IDE framework implemented in TypeScript.
74 lines • 4.13 kB
TypeScript
import * as electron from '../../../electron-shared/electron';
import { Command, CommandContribution, CommandRegistry, MenuModelRegistry, MenuContribution } from '../../common';
import { KeybindingContribution, KeybindingRegistry, Widget, FrontendApplication, FrontendApplicationContribution, Message, ApplicationShell } from '../../browser';
import { ElectronMainMenuFactory } from './electron-main-menu-factory';
import { FrontendApplicationStateService } from '../../browser/frontend-application-state';
import { BrowserMenuBarContribution } from '../../browser/menu/browser-menu-plugin';
import { WindowService } from '../../browser/window/window-service';
import { WindowTitleService } from '../../browser/window/window-title-service';
import '../../../src/electron-browser/menu/electron-menu-style.css';
export declare namespace ElectronCommands {
const TOGGLE_DEVELOPER_TOOLS: Command;
const RELOAD: Command;
const ZOOM_IN: Command;
const ZOOM_OUT: Command;
const RESET_ZOOM: Command;
const CLOSE_WINDOW: Command;
const TOGGLE_FULL_SCREEN: Command;
}
export declare namespace ElectronMenus {
const VIEW_WINDOW: string[];
const VIEW_ZOOM: string[];
}
export declare namespace ElectronMenus {
const HELP_TOGGLE: string[];
}
export declare namespace ElectronMenus {
const FILE_CLOSE: string[];
}
export declare const CustomTitleWidgetFactory: unique symbol;
export declare type CustomTitleWidgetFactory = () => Widget | undefined;
export declare class ElectronMenuContribution extends BrowserMenuBarContribution implements FrontendApplicationContribution, CommandContribution, MenuContribution, KeybindingContribution {
protected readonly factory: ElectronMainMenuFactory;
protected readonly stateService: FrontendApplicationStateService;
protected readonly windowService: WindowService;
protected readonly customTitleWidgetFactory: CustomTitleWidgetFactory;
protected titleBarStyleChangeFlag: boolean;
protected titleBarStyle?: string;
constructor(factory: ElectronMainMenuFactory);
onStart(app: FrontendApplication): void;
protected attachWindowFocusListener(app: FrontendApplication): void;
protected attachMenuBarVisibilityListener(): void;
handleTitleBarStyling(app: FrontendApplication): void;
handleToggleMaximized(): void;
/**
* Hides the `theia-top-panel` depending on the selected `titleBarStyle`.
* The `theia-top-panel` is used as the container of the main, application menu-bar for the
* browser. Native Electron has it's own.
* By default, this method is called on application `onStart`.
*/
protected hideTopPanel(app: FrontendApplication): void;
protected setMenu(app: FrontendApplication, electronMenu?: electron.Menu | null, electronWindow?: electron.BrowserWindow): void;
protected createCustomTitleBar(app: FrontendApplication, electronWindow: electron.BrowserWindow): void;
protected createCustomTitleWidget(app: FrontendApplication): void;
protected handleWindowControls(electronWindow: electron.BrowserWindow): void;
protected createControlButton(id: string, handler: () => void): HTMLElement;
protected handleRequiredRestart(): Promise<void>;
registerCommands(registry: CommandRegistry): void;
registerKeybindings(registry: KeybindingRegistry): void;
registerMenus(registry: MenuModelRegistry): void;
protected toggleFullScreen(currentWindow: electron.BrowserWindow): void;
protected handleFullScreen(currentWindow: electron.BrowserWindow, menuBarVisibility: string): void;
}
export declare class CustomTitleWidget extends Widget {
protected readonly electronMenuContribution: ElectronMenuContribution;
protected readonly windowTitleService: WindowTitleService;
protected readonly applicationShell: ApplicationShell;
constructor();
protected init(): void;
protected onResize(msg: Widget.ResizeMessage): void;
protected onAfterShow(msg: Message): void;
protected updateTitle(title: string): void;
protected adjustTitleToCenter(): void;
}
//# sourceMappingURL=electron-menu-contribution.d.ts.map