UNPKG

@eclipse-glsp/client

Version:

A sprotty-based client for GLSP

47 lines 2.21 kB
/******************************************************************************** * Copyright (c) 2024 Axon Ivy AG 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 { IActionHandler, PropertiesOfType } from '@eclipse-glsp/sprotty'; import { IFeedbackActionDispatcher } from '../../base/feedback/feedback-action-dispatcher'; import { FeedbackEmitter } from '../../base/feedback/feedback-emitter'; import { Grid } from './grid'; import { ShowGridAction } from './grid-model'; export type GridStyle = Record<string, string> & Partial<PropertiesOfType<CSSStyleDeclaration, string>>; export interface IGridManager { /** The grid to manage. */ readonly grid: Grid; /** Flag to indicate whether the grid is visible. */ readonly isGridVisible: boolean; /** Sets the visibility of the grid. */ setGridVisible(visible: boolean): void; /** Toggles the visibility of the grid. */ toggleGridVisible(): void; } /** * The default {@link IGridManager} implementation. * This class manages the visibility and behavior of a grid in the application. */ export declare class GridManager implements IActionHandler, IGridManager { protected _gridVisible: boolean; protected gridFeedback: FeedbackEmitter; protected feedbackDispatcher: IFeedbackActionDispatcher; readonly grid: Grid; get isGridVisible(): boolean; protected init(): void; handle(action: ShowGridAction): void; setGridVisible(visible: boolean): void; toggleGridVisible(): void; } //# sourceMappingURL=grid-manager.d.ts.map