UNPKG

@eclipse-glsp/client

Version:

A sprotty-based client for GLSP

42 lines 2.19 kB
/******************************************************************************** * Copyright (c) 2023-2025 Business Informatics Group (TU Wien) 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 { Action, GModelElement, GModelRoot, KeyListener, Point, SetViewportAction, Viewport } from '@eclipse-glsp/sprotty'; import { SelectionService } from '../../../base/selection-service'; import type { IShortcutManager } from '../../../base/shortcuts/shortcuts-manager'; import { BaseTool } from '../../tools/base-tools'; import type { ZoomFactors } from '../../viewport/zoom-viewport-action'; /** * Zoom viewport and elements when its focused and arrow keys are hit. */ export declare class GridCellZoomTool extends BaseTool { static ID: string; static TOKEN: symbol; protected readonly zoomKeyListener: GridZoomKeyListener; protected readonly shortcutManager: IShortcutManager; protected readonly zoomFactors: ZoomFactors; selectionService: SelectionService; get id(): string; enable(): void; handle(action: Action): Action | void; } export declare class GridZoomKeyListener extends KeyListener { protected tool: GridCellZoomTool; constructor(tool: GridCellZoomTool); setNewZoomFactor(viewport: GModelElement & GModelRoot & Viewport, zoomFactor: number, point?: Point): SetViewportAction; keyDown(element: GModelElement, event: KeyboardEvent): Action[]; protected matchesZoomViaGrid(event: KeyboardEvent): boolean; } //# sourceMappingURL=grid-cell-zoom-key-tool.d.ts.map