/** * @module viw-webgl-component */ import React from 'react'; import * as VIM from 'vim-webgl-viewer/'; import { Isolation } from '../helpers/isolation'; import { ComponentCamera } from '../helpers/camera'; import { TreeActionRef } from '../bim/bimTree'; import { ModalRef } from './modal'; export declare const VIM_CONTEXT_MENU_ID = "vim-context-menu-id"; export type ClickCallback = React.MouseEvent; export declare function showContextMenu(position: { x: number; y: number; } | undefined): void; /** * Current list of context menu item ids. Used to find and replace items when customizing the context menu. */ export declare const contextMenuElementIds: { showControls: string; dividerCamera: string; resetCamera: string; zoomToFit: string; dividerSelection: string; isolateSelection: string; selectSimilar: string; hideObject: string; showObject: string; clearSelection: string; showAll: string; dividerMeasure: string; deleteMeasurement: string; dividerSection: string; ignoreSection: string; resetSection: string; fitSectionToSelection: string; }; /** * Represents a button in the context menu. It can't be clicked triggering given action. */ export interface IContextMenuButton { id: string; label: string; keyboard: string; action: (e: ClickCallback) => void; enabled: boolean; } /** * Represents a divider in the context menu. It can't be clicked. */ export interface IContextMenuDivider { id: string; enabled: boolean; } export type ContextMenuElement = IContextMenuButton | IContextMenuDivider; /** * A map function that changes the context menu. */ export type ContextMenuCustomization = (e: ContextMenuElement[]) => ContextMenuElement[]; /** * Memoized version of VimContextMenu. */ export declare const VimContextMenuMemo: React.MemoExoticComponent; /** * Context menu component definition according to current state. */ export declare function VimContextMenu(props: { viewer: VIM.Viewer; camera: ComponentCamera; modal: ModalRef; isolation: Isolation; selection: VIM.Object3D[]; customization?: (e: ContextMenuElement[]) => ContextMenuElement[]; treeRef: React.MutableRefObject; }): import("react/jsx-runtime").JSX.Element;