UNPKG

1.68 kBTypeScriptView Raw
1import { FrontendApplicationContribution } from '../frontend-application';
2import { ApplicationShell } from './application-shell';
3import { DisposableCollection } from '../../common/disposable';
4import { Emitter, Event } from '../../common/event';
5import { SplitPanel } from '@phosphor/widgets';
6import { Widget } from '../widgets';
7/**
8 * Contribution that tracks `mouseup` and `mousedown` events.
9 *
10 * This is required to be able to track the `TabBar`, `DockPanel`, and `SidePanel` resizing and drag and drop events correctly
11 * all over the application. By default, when the mouse is over an `iframe` we lose the mouse tracking ability, so whenever
12 * we click (`mousedown`), we overlay a transparent `div` over the `iframe` in the Mini Browser, then we set the `display` of
13 * the transparent `div` to `none` on `mouseup` events.
14 */
15export declare class ApplicationShellMouseTracker implements FrontendApplicationContribution {
16 protected readonly applicationShell: ApplicationShell;
17 protected readonly toDispose: DisposableCollection;
18 protected readonly toDisposeOnActiveChange: DisposableCollection;
19 protected readonly mouseupEmitter: Emitter<MouseEvent>;
20 protected readonly mousedownEmitter: Emitter<MouseEvent>;
21 protected readonly mouseupListener: (e: MouseEvent) => void;
22 protected readonly mousedownListener: (e: MouseEvent) => void;
23 onStart(): void;
24 onStop(): void;
25 get onMouseup(): Event<MouseEvent>;
26 get onMousedown(): Event<MouseEvent>;
27}
28export declare namespace ApplicationShellMouseTracker {
29 function isSplitPanel(arg: Widget): arg is SplitPanel;
30}
31//# sourceMappingURL=application-shell-mouse-tracker.d.ts.map
\No newline at end of file