1 | import { MenuPath } from '../common/menu';
|
2 | import { Disposable, DisposableCollection } from '../common/disposable';
|
3 | import { ContextMatcher } from './context-key-service';
|
4 | export interface Coordinate {
|
5 | x: number;
|
6 | y: number;
|
7 | }
|
8 | export declare const Coordinate: unique symbol;
|
9 | export declare type Anchor = MouseEvent | Coordinate;
|
10 | export declare function toAnchor(anchor: HTMLElement | Coordinate): Anchor;
|
11 | export declare function coordinateFromAnchor(anchor: Anchor): Coordinate;
|
12 | export declare abstract class ContextMenuAccess implements Disposable {
|
13 | protected readonly toDispose: DisposableCollection;
|
14 | readonly onDispose: import("../common").Event<void>;
|
15 | constructor(toClose: Disposable);
|
16 | get disposed(): boolean;
|
17 | dispose(): void;
|
18 | }
|
19 | export declare abstract class ContextMenuRenderer {
|
20 | protected _current: ContextMenuAccess | undefined;
|
21 | protected readonly toDisposeOnSetCurrent: DisposableCollection;
|
22 | |
23 |
|
24 |
|
25 |
|
26 | get current(): ContextMenuAccess | undefined;
|
27 | protected setCurrent(current: ContextMenuAccess | undefined): void;
|
28 | render(options: RenderContextMenuOptions): ContextMenuAccess;
|
29 | protected abstract doRender(options: RenderContextMenuOptions): ContextMenuAccess;
|
30 | protected resolve(options: RenderContextMenuOptions): RenderContextMenuOptions;
|
31 | }
|
32 | export interface RenderContextMenuOptions {
|
33 | menuPath: MenuPath;
|
34 | anchor: Anchor;
|
35 | args?: any[];
|
36 | |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | includeAnchorArg?: boolean;
|
43 | |
44 |
|
45 |
|
46 |
|
47 | context?: HTMLElement;
|
48 | contextKeyService?: ContextMatcher;
|
49 | onHide?: () => void;
|
50 | }
|
51 |
|
\ | No newline at end of file |