mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 03:58:33 -05:00
Merge from master
This commit is contained in:
@@ -2,35 +2,43 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IContextMenuDelegate } from 'vs/base/browser/contextmenu';
|
||||
import { AnchorAlignment } from 'vs/base/browser/ui/contextview/contextview';
|
||||
|
||||
export const IContextViewService = createDecorator<IContextViewService>('contextViewService');
|
||||
|
||||
export interface IContextViewService {
|
||||
|
||||
_serviceBrand: any;
|
||||
|
||||
showContextView(delegate: IContextViewDelegate): void;
|
||||
hideContextView(data?: any): void;
|
||||
layout(): void;
|
||||
anchorAlignment?: AnchorAlignment;
|
||||
}
|
||||
|
||||
export interface IContextViewDelegate {
|
||||
getAnchor(): HTMLElement | { x: number; y: number; };
|
||||
render(container: HTMLElement): IDisposable;
|
||||
|
||||
canRelayout?: boolean; // Default: true
|
||||
|
||||
getAnchor(): HTMLElement | { x: number; y: number; width?: number; height?: number; };
|
||||
render(container: HTMLElement): IDisposable;
|
||||
onDOMEvent?(e: any, activeElement: HTMLElement): void;
|
||||
onHide?(data?: any): void;
|
||||
focus?(): void;
|
||||
anchorAlignment?: AnchorAlignment;
|
||||
}
|
||||
|
||||
export const IContextMenuService = createDecorator<IContextMenuService>('contextMenuService');
|
||||
|
||||
export interface IContextMenuService {
|
||||
|
||||
_serviceBrand: any;
|
||||
|
||||
showContextMenu(delegate: IContextMenuDelegate): void;
|
||||
// TODO@isidor these event should be removed once we get async context menus
|
||||
onDidContextMenu: Event<void>;
|
||||
onDidContextMenu: Event<void>; // TODO@isidor these event should be removed once we get async context menus
|
||||
}
|
||||
Reference in New Issue
Block a user