Path: blob/main/src/vs/base/parts/contextmenu/common/contextmenu.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45export interface ICommonContextMenuItem {6label?: string;78type?: 'normal' | 'separator' | 'submenu' | 'checkbox' | 'radio';910accelerator?: string;1112enabled?: boolean;13visible?: boolean;14checked?: boolean;15}1617export interface ISerializableContextMenuItem extends ICommonContextMenuItem {18id: number;19submenu?: ISerializableContextMenuItem[];20}2122export interface IContextMenuItem extends ICommonContextMenuItem {23click?: (event: IContextMenuEvent) => void;24submenu?: IContextMenuItem[];25}2627export interface IContextMenuEvent {28shiftKey?: boolean;29ctrlKey?: boolean;30altKey?: boolean;31metaKey?: boolean;32}3334export interface IPopupOptions {35x?: number;36y?: number;37positioningItem?: number;38}3940export const CONTEXT_MENU_CHANNEL = 'vscode:contextmenu';41export const CONTEXT_MENU_CLOSE_CHANNEL = 'vscode:onCloseContextMenu';424344