sprotty
Version:
A next-gen framework for graphical views
52 lines • 2.96 kB
TypeScript
/********************************************************************************
* Copyright (c) 2017-2023 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 { GetViewportAction, ResponseAction, SetViewportAction } from 'sprotty-protocol/lib/actions';
import { Viewport } from 'sprotty-protocol/lib/model';
import { SModelElementImpl, SModelRootImpl } from '../../base/model/smodel';
import { MergeableCommand, ICommand, CommandExecutionContext, CommandReturn } from '../../base/commands/command';
import { Animation } from '../../base/animations/animation';
import { ModelRequestCommand } from '../../base/commands/request-command';
import { ViewerOptions } from '../../base/views/viewer-options';
export declare class SetViewportCommand extends MergeableCommand {
protected readonly action: SetViewportAction;
static readonly KIND = "viewport";
protected viewerOptions: ViewerOptions;
protected element: SModelElementImpl & Viewport;
protected oldViewport: Viewport;
protected newViewport: Viewport;
constructor(action: SetViewportAction);
execute(context: CommandExecutionContext): CommandReturn;
protected setViewport(element: SModelElementImpl, oldViewport: Viewport, newViewport: Viewport, context: CommandExecutionContext): CommandReturn;
undo(context: CommandExecutionContext): CommandReturn;
redo(context: CommandExecutionContext): CommandReturn;
merge(command: ICommand, context: CommandExecutionContext): boolean;
}
export declare class GetViewportCommand extends ModelRequestCommand {
protected readonly action: GetViewportAction;
static readonly KIND = "getViewport";
constructor(action: GetViewportAction);
protected retrieveResult(context: CommandExecutionContext): ResponseAction;
}
export declare class ViewportAnimation extends Animation {
protected element: SModelElementImpl & Viewport;
protected oldViewport: Viewport;
protected newViewport: Viewport;
protected context: CommandExecutionContext;
protected zoomFactor: number;
constructor(element: SModelElementImpl & Viewport, oldViewport: Viewport, newViewport: Viewport, context: CommandExecutionContext);
tween(t: number, context: CommandExecutionContext): SModelRootImpl;
}
//# sourceMappingURL=viewport.d.ts.map