/** * Copyright 2023-present DreamNum Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { IEventBase } from '@univerjs/core/facade'; import type { FWorkbook, FWorksheet } from '@univerjs/sheets/facade'; import { FEventName } from '@univerjs/core/facade'; export interface IFSheetsCrosshairHighlightEventNameMixin { /** * Triggered when the crosshair highlight is enabled or disabled. * @see {@link ICrosshairHighlightEnabledChangedEventParams} * @example * ```ts * const disposable = univerAPI.addEvent(univerAPI.Event.CrosshairHighlightEnabledChanged, (params) => { * const { enabled, workbook, worksheet } = params; * console.log(params); * }); * * // Remove the event listener, use `disposable.dispose()` * ``` */ readonly CrosshairHighlightEnabledChanged: 'CrosshairHighlightEnabledChanged'; /** * Triggered when the crosshair highlight color is changed. * @see {@link ICrosshairHighlightColorChangedEventParams} * @example * ```ts * const disposable = univerAPI.addEvent(univerAPI.Event.CrosshairHighlightColorChanged, (params) => { * const { color, workbook, worksheet } = params; * console.log(params); * }); * * // Remove the event listener, use `disposable.dispose()` * ``` */ readonly CrosshairHighlightColorChanged: 'CrosshairHighlightColorChanged'; } /** * @ignore */ export declare class FSheetsCrosshairHighlightEventNameMixin extends FEventName implements IFSheetsCrosshairHighlightEventNameMixin { get CrosshairHighlightEnabledChanged(): 'CrosshairHighlightEnabledChanged'; get CrosshairHighlightColorChanged(): 'CrosshairHighlightColorChanged'; } export interface ICrosshairHighlightEnabledChangedEventParams extends IEventBase { /** * Whether the crosshair highlight is enabled. */ enabled: boolean; /** * The workbook that the crosshair highlight is enabled in. */ workbook: FWorkbook; /** * The worksheet that the crosshair highlight is enabled in. */ worksheet: FWorksheet; } export interface ICrosshairHighlightColorChangedEventParams extends IEventBase { /** * The color of the crosshair highlight. */ color: string; /** * The workbook that the crosshair highlight is enabled in. */ workbook: FWorkbook; /** * The worksheet that the crosshair highlight is enabled in. */ worksheet: FWorksheet; } /** * @ignore */ export interface ISheetsCrosshairHighlightEventParamConfig { CrosshairHighlightEnabledChanged: ICrosshairHighlightEnabledChangedEventParams; CrosshairHighlightColorChanged: ICrosshairHighlightColorChangedEventParams; } declare module '@univerjs/core/facade' { interface FEventName extends IFSheetsCrosshairHighlightEventNameMixin { } interface IEventParamConfig extends ISheetsCrosshairHighlightEventParamConfig { } }