1 | import { Title, Widget } from '@phosphor/widgets';
|
2 | import { Message } from '@phosphor/messaging';
|
3 | import { Emitter, Event, Disposable, DisposableCollection, MaybePromise } from '../../common';
|
4 | import { KeyCode, KeysOrKeyCodes } from '../keyboard/keys';
|
5 | import PerfectScrollbar from 'perfect-scrollbar';
|
6 | import { PreviewableWidget } from '../widgets/previewable-widget';
|
7 | export * from '@phosphor/widgets';
|
8 | export * from '@phosphor/messaging';
|
9 | export declare const ACTION_ITEM = "action-label";
|
10 | export declare function codiconArray(name: string, actionItem?: boolean): string[];
|
11 | export declare function codicon(name: string, actionItem?: boolean): string;
|
12 | export declare const DISABLED_CLASS = "theia-mod-disabled";
|
13 | export declare const EXPANSION_TOGGLE_CLASS = "theia-ExpansionToggle";
|
14 | export declare const CODICON_TREE_ITEM_CLASSES: string[];
|
15 | export declare const COLLAPSED_CLASS = "theia-mod-collapsed";
|
16 | export declare const BUSY_CLASS = "theia-mod-busy";
|
17 | export declare const CODICON_LOADING_CLASSES: string[];
|
18 | export declare const SELECTED_CLASS = "theia-mod-selected";
|
19 | export declare const FOCUS_CLASS = "theia-mod-focus";
|
20 | export declare const PINNED_CLASS = "theia-mod-pinned";
|
21 | export declare const LOCKED_CLASS = "theia-mod-locked";
|
22 | export declare const DEFAULT_SCROLL_OPTIONS: PerfectScrollbar.Options;
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export declare namespace UnsafeWidgetUtilities {
|
30 | |
31 |
|
32 |
|
33 |
|
34 |
|
35 | function detach(widget: Widget): void;
|
36 | |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 | function attach(widget: Widget, host: HTMLElement, ref?: HTMLElement | null): void;
|
45 | }
|
46 | export declare class BaseWidget extends Widget implements PreviewableWidget {
|
47 | protected readonly onScrollYReachEndEmitter: Emitter<void>;
|
48 | readonly onScrollYReachEnd: Event<void>;
|
49 | protected readonly onScrollUpEmitter: Emitter<void>;
|
50 | readonly onScrollUp: Event<void>;
|
51 | protected readonly onDidChangeVisibilityEmitter: Emitter<boolean>;
|
52 | readonly onDidChangeVisibility: Event<boolean>;
|
53 | protected readonly onDidDisposeEmitter: Emitter<void>;
|
54 | readonly onDidDispose: Event<void>;
|
55 | protected readonly toDispose: DisposableCollection;
|
56 | protected readonly toDisposeOnDetach: DisposableCollection;
|
57 | protected scrollBar?: PerfectScrollbar;
|
58 | protected scrollOptions?: PerfectScrollbar.Options;
|
59 | constructor(options?: Widget.IOptions);
|
60 | dispose(): void;
|
61 | protected onCloseRequest(msg: Message): void;
|
62 | protected onBeforeAttach(msg: Message): void;
|
63 | protected onAfterDetach(msg: Message): void;
|
64 | protected onBeforeDetach(msg: Message): void;
|
65 | protected onAfterAttach(msg: Message): void;
|
66 | protected getScrollContainer(): MaybePromise<HTMLElement>;
|
67 | protected disableScrollBarFocus(scrollContainer: HTMLElement): void;
|
68 | protected onUpdateRequest(msg: Message): void;
|
69 | protected addUpdateListener<K extends keyof HTMLElementEventMap>(element: HTMLElement, type: K, useCapture?: boolean): void;
|
70 | protected addEventListener<K extends keyof HTMLElementEventMap>(element: HTMLElement, type: K, listener: EventListenerOrEventListenerObject<K>, useCapture?: boolean): void;
|
71 | protected addKeyListener<K extends keyof HTMLElementEventMap>(element: HTMLElement, keysOrKeyCodes: KeyCode.Predicate | KeysOrKeyCodes, action: (event: KeyboardEvent) => boolean | void | Object, ...additionalEventTypes: K[]): void;
|
72 | protected addClipboardListener<K extends 'cut' | 'copy' | 'paste'>(element: HTMLElement, type: K, listener: EventListenerOrEventListenerObject<K>): void;
|
73 | getPreviewNode(): Node | undefined;
|
74 | setFlag(flag: Widget.Flag): void;
|
75 | clearFlag(flag: Widget.Flag): void;
|
76 | }
|
77 | export declare function setEnabled(element: HTMLElement, enabled: boolean): void;
|
78 | export declare function createIconButton(...classNames: string[]): HTMLSpanElement;
|
79 | export declare type EventListener<K extends keyof HTMLElementEventMap> = (this: HTMLElement, event: HTMLElementEventMap[K]) => any;
|
80 | export interface EventListenerObject<K extends keyof HTMLElementEventMap> {
|
81 | handleEvent(evt: HTMLElementEventMap[K]): void;
|
82 | }
|
83 | export declare namespace EventListenerObject {
|
84 | function is<K extends keyof HTMLElementEventMap>(listener: unknown): listener is EventListenerObject<K>;
|
85 | }
|
86 | export declare type EventListenerOrEventListenerObject<K extends keyof HTMLElementEventMap> = EventListener<K> | EventListenerObject<K>;
|
87 | export declare function addEventListener<K extends keyof HTMLElementEventMap>(element: HTMLElement, type: K, listener: EventListenerOrEventListenerObject<K>, useCapture?: boolean): Disposable;
|
88 | export declare function addKeyListener<K extends keyof HTMLElementEventMap>(element: HTMLElement, keysOrKeyCodes: KeyCode.Predicate | KeysOrKeyCodes, action: (event: KeyboardEvent) => boolean | void | Object, ...additionalEventTypes: K[]): Disposable;
|
89 | export declare function addClipboardListener<K extends 'cut' | 'copy' | 'paste'>(element: HTMLElement, type: K, listener: EventListenerOrEventListenerObject<K>): Disposable;
|
90 |
|
91 |
|
92 |
|
93 | export declare function waitForClosed(widget: Widget): Promise<void>;
|
94 |
|
95 |
|
96 |
|
97 | export declare function waitForRevealed(widget: Widget): Promise<void>;
|
98 |
|
99 |
|
100 |
|
101 | export declare function waitForHidden(widget: Widget): Promise<void>;
|
102 | export declare function isPinned(title: Title<Widget>): boolean;
|
103 | export declare function unpin(title: Title<Widget>): void;
|
104 | export declare function pin(title: Title<Widget>): void;
|
105 | export declare function isLocked(title: Title<Widget>): boolean;
|
106 | export declare function lock(title: Title<Widget>): void;
|
107 | export declare function unlock(title: Title<Widget>): void;
|
108 | export declare function togglePinned(title?: Title<Widget>): void;
|
109 |
|
\ | No newline at end of file |