UNPKG

@eclipse-glsp/theia-integration

Version:

Glue code to integrate GLSP clients into Eclipse Theia

118 lines 6.3 kB
/******************************************************************************** * Copyright (c) 2019-2023 EclipseSource 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 { Alignment, ReduceFunctionType, ResizeDimension, SelectFunctionType } from '@eclipse-glsp/client'; import { CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry, MenuPath } from '@theia/core'; import { ApplicationShell, KeybindingContribution, KeybindingRegistry } from '@theia/core/lib/browser'; import { ContainerContext } from '../glsp-theia-container-module'; import { GLSPDiagramKeybindingContext } from './glsp-diagram-keybinding'; export declare function registerDiagramLayoutCommands(context: Omit<ContainerContext, 'unbind' | 'rebind'>): void; export declare namespace GLSPLayoutCommands { const RESIZE_WIDTH_MIN: string; const RESIZE_WIDTH_MIN_LABEL = "Minimal Width"; const RESIZE_WIDTH_MAX: string; const RESIZE_WIDTH_MAX_LABEL = "Maximal Width"; const RESIZE_WIDTH_AVG: string; const RESIZE_WIDTH_AVG_LABEL = "Average Width"; const RESIZE_WIDTH_FIRST: string; const RESIZE_WIDTH_FIRST_LABEL = "Width of First Selected Element"; const RESIZE_WIDTH_LAST: string; const RESIZE_WIDTH_LAST_LABEL = "Width of Last Selected Element"; const RESIZE_HEIGHT_MIN: string; const RESIZE_HEIGHT_MIN_LABEL = "Minimal Height"; const RESIZE_HEIGHT_MAX: string; const RESIZE_HEIGHT_MAX_LABEL = "Maximal Height"; const RESIZE_HEIGHT_AVG: string; const RESIZE_HEIGHT_AVG_LABEL = "Average Height"; const RESIZE_HEIGHT_FIRST: string; const RESIZE_HEIGHT_FIRST_LABEL = "Height of First Selected Element"; const RESIZE_HEIGHT_LAST: string; const RESIZE_HEIGHT_LAST_LABEL = "Height of Last Selected Element"; const RESIZE_WIDTH_AND_HEIGHT_MIN: string; const RESIZE_WIDTH_AND_HEIGHT_MIN_LBL = "Minimal Width and Height"; const RESIZE_WIDTH_AND_HEIGHT_MAX: string; const RESIZE_WIDTH_AND_HEIGHT_MAX_LBL = "Maximal Width and Height"; const RESIZE_WIDTH_AND_HEIGHT_AVG: string; const RESIZE_WIDTH_AND_HEIGHT_AVG_LBL = "Average Width and Height"; const RESIZE_WIDTH_AND_HEIGHT_FIRST: string; const RESIZE_WIDTH_AND_HEIGHT_FIRST_LBL = "Width and Height of First Selected Element"; const RESIZE_WIDTH_AND_HEIGHT_LAST: string; const RESIZE_WIDTH_AND_HEIGHT_LAST_LBL = "Width and Height of Last Selected Element"; const ALIGN_LEFT: string; const ALIGN_LEFT_LABEL = "Left"; const ALIGN_CENTER: string; const ALIGN_CENTER_LABEL = "Center"; const ALIGN_RIGHT: string; const ALIGN_RIGHT_LABEL = "Right"; const ALIGN_TOP: string; const ALIGN_TOP_LABEL = "Top"; const ALIGN_MIDDLE: string; const ALIGN_MIDDLE_LABEL = "Middle"; const ALIGN_BOTTOM: string; const ALIGN_BOTTOM_LABEL = "Bottom"; const ALIGN_LEFT_FIRST: string; const ALIGN_LEFT_FIRST_LABEL = "Left of First Selected Element"; const ALIGN_CENTER_FIRST: string; const ALIGN_CENTER_FIRST_LABEL = "Center of First Selected Element"; const ALIGN_RIGHT_FIRST: string; const ALIGN_RIGHT_FIRST_LABEL = "Right of First Selected Element"; const ALIGN_TOP_FIRST: string; const ALIGN_TOP_FIRST_LABEL = "Top of First Selected Element"; const ALIGN_MIDDLE_FIRST: string; const ALIGN_MIDDLE_FIRST_LABEL = "Middle of First Selected Element"; const ALIGN_BOTTOM_FIRST: string; const ALIGN_BOTTOM_FIRST_LABEL = "Bottom of First Selected Element"; const ALIGN_LEFT_LAST: string; const ALIGN_LEFT_LAST_LABEL = "Left of Last Selected Element"; const ALIGN_CENTER_LAST: string; const ALIGN_CENTER_LAST_LABEL = "Center of Last Selected Element"; const ALIGN_RIGHT_LAST: string; const ALIGN_RIGHT_LAST_LABEL = "Right of Last Selected Element"; const ALIGN_TOP_LAST: string; const ALIGN_TOP_LAST_LABEL = "Top of Last Selected Element"; const ALIGN_MIDDLE_LAST: string; const ALIGN_MIDDLE_LAST_LABEL = "Middle of Last Selected Element"; const ALIGN_BOTTOM_LAST: string; const ALIGN_BOTTOM_LAST_LABEL = "Bottom of Last Selected Element"; } export declare namespace GLSPLayoutMenus { const ALIGN_MENU: MenuPath; const ALIGN_HORIZONTAL_GROUP: MenuPath; const ALIGN_VERTICAL_GROUP: MenuPath; const ALIGN_HORIZONTAL_FIRST_GROUP: MenuPath; const ALIGN_VERTICAL_FIRST_GROUP: MenuPath; const ALIGN_HORIZONTAL_LAST_GROUP: MenuPath; const ALIGN_VERTICAL_LAST_GROUP: MenuPath; const RESIZE_MENU: MenuPath; const RESIZE_WIDTH_GROUP: MenuPath; const RESIZE_HEIGHT_GROUP: MenuPath; const RESIZE_WIDTH_AND_HEIGHT_GROUP: MenuPath; } export declare class GLSPLayoutMenuContribution implements MenuContribution { registerMenus(registry: MenuModelRegistry): void; } export declare class GLSPLayoutCommandContribution implements CommandContribution { protected readonly shell: ApplicationShell; constructor(shell: ApplicationShell); registerResize(registry: CommandRegistry, id: string, label: string, dimension: ResizeDimension, reduceFunction: ReduceFunctionType): void; registerAlign(registry: CommandRegistry, id: string, label: string, alignment: Alignment, selectionFunction: SelectFunctionType): void; registerCommands(reg: CommandRegistry): void; } export declare class GLSPLayoutKeybindingContribution implements KeybindingContribution { protected readonly diagramKeybindingContext: GLSPDiagramKeybindingContext; constructor(diagramKeybindingContext: GLSPDiagramKeybindingContext); registerKeybindings(registry: KeybindingRegistry): void; } //# sourceMappingURL=glsp-layout-commands.d.ts.map