custom-electron-titlebar 4.2.0-alpha.2 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +83 -65
- package/package.json +69 -58
- package/dist/enums/menu-state.d.ts +0 -6
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -1
- package/dist/titlebar.d.ts +0 -143
- package/dist/types/menubar-options.d.ts +0 -41
- package/dist/types/scss.d.ts +0 -6
- package/dist/types/titlebar-options.d.ts +0 -66
- package/dist/utils/color.d.ts +0 -2
- package/dist/vs/base/browser/browser.d.ts +0 -40
- package/dist/vs/base/browser/canIUse.d.ts +0 -17
- package/dist/vs/base/browser/dom.d.ts +0 -325
- package/dist/vs/base/browser/event.d.ts +0 -27
- package/dist/vs/base/browser/fastDomNode.d.ts +0 -59
- package/dist/vs/base/browser/globalMouseMoveMonitor.d.ts +0 -29
- package/dist/vs/base/browser/iframe.d.ts +0 -33
- package/dist/vs/base/browser/keyboardEvent.d.ts +0 -42
- package/dist/vs/base/browser/mouseEvent.d.ts +0 -69
- package/dist/vs/base/browser/touch.d.ts +0 -39
- package/dist/vs/base/browser/ui/actionbar/actionViewItems.d.ts +0 -58
- package/dist/vs/base/browser/ui/actionbar/actionbar.d.ts +0 -95
- package/dist/vs/base/browser/ui/contextview/contextview.d.ts +0 -94
- package/dist/vs/base/browser/ui/menu/menu.d.ts +0 -58
- package/dist/vs/base/browser/ui/menu/menubar.d.ts +0 -78
- package/dist/vs/base/browser/ui/scrollbar/abstractScrollbar.d.ts +0 -67
- package/dist/vs/base/browser/ui/scrollbar/horizontalScrollbar.d.ts +0 -15
- package/dist/vs/base/browser/ui/scrollbar/scrollableElement.d.ts +0 -107
- package/dist/vs/base/browser/ui/scrollbar/scrollableElementOptions.d.ts +0 -157
- package/dist/vs/base/browser/ui/scrollbar/scrollbarArrow.d.ts +0 -25
- package/dist/vs/base/browser/ui/scrollbar/scrollbarState.d.ts +0 -75
- package/dist/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.d.ts +0 -24
- package/dist/vs/base/browser/ui/scrollbar/verticalScrollbar.d.ts +0 -15
- package/dist/vs/base/browser/ui/widget.d.ts +0 -16
- package/dist/vs/base/common/actions.d.ts +0 -115
- package/dist/vs/base/common/arrays.d.ts +0 -168
- package/dist/vs/base/common/async.d.ts +0 -510
- package/dist/vs/base/common/cache.d.ts +0 -23
- package/dist/vs/base/common/cancellation.d.ts +0 -29
- package/dist/vs/base/common/charCode.d.ts +0 -405
- package/dist/vs/base/common/color.d.ts +0 -159
- package/dist/vs/base/common/decorators.d.ts +0 -7
- package/dist/vs/base/common/errors.d.ts +0 -77
- package/dist/vs/base/common/event.d.ts +0 -274
- package/dist/vs/base/common/functional.d.ts +0 -1
- package/dist/vs/base/common/iterator.d.ts +0 -31
- package/dist/vs/base/common/keyCodes.d.ts +0 -429
- package/dist/vs/base/common/keybindings.d.ts +0 -99
- package/dist/vs/base/common/lazy.d.ts +0 -19
- package/dist/vs/base/common/lifecycle.d.ts +0 -129
- package/dist/vs/base/common/linkedList.d.ts +0 -15
- package/dist/vs/base/common/platform.d.ts +0 -85
- package/dist/vs/base/common/range.d.ts +0 -18
- package/dist/vs/base/common/scrollable.d.ts +0 -141
- package/dist/vs/base/common/strings.d.ts +0 -215
- package/dist/vs/base/common/types.d.ts +0 -89
- package/dist/vs/base/common/uint.d.ts +0 -31
- package/dist/vs/nls.d.ts +0 -18
- package/main/attach-titlebar-to-window.d.ts +0 -3
- package/main/index.d.ts +0 -5
- package/main/main.js +0 -1
- package/main/setup-main.d.ts +0 -2
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { FastDomNode } from 'vs/base/browser/fastDomNode';
|
|
2
|
-
import { IMouseEvent, StandardWheelEvent } from 'vs/base/browser/mouseEvent';
|
|
3
|
-
import { ScrollbarArrowOptions } from 'vs/base/browser/ui/scrollbar/scrollbarArrow';
|
|
4
|
-
import { ScrollbarState } from 'vs/base/browser/ui/scrollbar/scrollbarState';
|
|
5
|
-
import { ScrollbarVisibilityController } from 'vs/base/browser/ui/scrollbar/scrollbarVisibilityController';
|
|
6
|
-
import { Widget } from 'vs/base/browser/ui/widget';
|
|
7
|
-
import { INewScrollPosition, Scrollable, ScrollbarVisibility } from 'vs/base/common/scrollable';
|
|
8
|
-
export interface ISimplifiedMouseEvent {
|
|
9
|
-
buttons: number;
|
|
10
|
-
posx: number;
|
|
11
|
-
posy: number;
|
|
12
|
-
}
|
|
13
|
-
export interface ScrollbarHost {
|
|
14
|
-
onMouseWheel(mouseWheelEvent: StandardWheelEvent): void;
|
|
15
|
-
onDragStart(): void;
|
|
16
|
-
onDragEnd(): void;
|
|
17
|
-
}
|
|
18
|
-
export interface AbstractScrollbarOptions {
|
|
19
|
-
lazyRender: boolean;
|
|
20
|
-
host: ScrollbarHost;
|
|
21
|
-
scrollbarState: ScrollbarState;
|
|
22
|
-
visibility: ScrollbarVisibility;
|
|
23
|
-
extraScrollbarClassName: string;
|
|
24
|
-
scrollable: Scrollable;
|
|
25
|
-
scrollByPage: boolean;
|
|
26
|
-
}
|
|
27
|
-
export declare abstract class AbstractScrollbar extends Widget {
|
|
28
|
-
protected _host: ScrollbarHost;
|
|
29
|
-
protected _scrollable: Scrollable;
|
|
30
|
-
protected _scrollByPage: boolean;
|
|
31
|
-
private _lazyRender;
|
|
32
|
-
protected _scrollbarState: ScrollbarState;
|
|
33
|
-
protected _visibilityController: ScrollbarVisibilityController;
|
|
34
|
-
private _mouseMoveMonitor;
|
|
35
|
-
domNode: FastDomNode<HTMLElement>;
|
|
36
|
-
slider: FastDomNode<HTMLElement>;
|
|
37
|
-
protected _shouldRender: boolean;
|
|
38
|
-
constructor(opts: AbstractScrollbarOptions);
|
|
39
|
-
/**
|
|
40
|
-
* Creates the dom node for an arrow & adds it to the container
|
|
41
|
-
*/
|
|
42
|
-
protected _createArrow(opts: ScrollbarArrowOptions): void;
|
|
43
|
-
/**
|
|
44
|
-
* Creates the slider dom node, adds it to the container & hooks up the events
|
|
45
|
-
*/
|
|
46
|
-
protected _createSlider(top: number, left: number, width: number | undefined, height: number | undefined): void;
|
|
47
|
-
protected _onElementSize(visibleSize: number): boolean;
|
|
48
|
-
protected _onElementScrollSize(elementScrollSize: number): boolean;
|
|
49
|
-
protected _onElementScrollPosition(elementScrollPosition: number): boolean;
|
|
50
|
-
beginReveal(): void;
|
|
51
|
-
beginHide(): void;
|
|
52
|
-
render(): void;
|
|
53
|
-
private _domNodeMouseDown;
|
|
54
|
-
delegateMouseDown(e: IMouseEvent): void;
|
|
55
|
-
private _onMouseDown;
|
|
56
|
-
private _sliderMouseDown;
|
|
57
|
-
private _setDesiredScrollPositionNow;
|
|
58
|
-
updateScrollbarSize(scrollbarSize: number): void;
|
|
59
|
-
isNeeded(): boolean;
|
|
60
|
-
protected abstract _renderDomNode(largeSize: number, smallSize: number): void;
|
|
61
|
-
protected abstract _updateSlider(sliderSize: number, sliderPosition: number): void;
|
|
62
|
-
protected abstract _mouseDownRelativePosition(offsetX: number, offsetY: number): number;
|
|
63
|
-
protected abstract _sliderMousePosition(e: ISimplifiedMouseEvent): number;
|
|
64
|
-
protected abstract _sliderOrthogonalMousePosition(e: ISimplifiedMouseEvent): number;
|
|
65
|
-
protected abstract _updateScrollbarSize(size: number): void;
|
|
66
|
-
abstract writeScrollPosition(target: INewScrollPosition, scrollPosition: number): void;
|
|
67
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AbstractScrollbar, ISimplifiedMouseEvent, ScrollbarHost } from 'vs/base/browser/ui/scrollbar/abstractScrollbar';
|
|
2
|
-
import { ScrollableElementResolvedOptions } from 'vs/base/browser/ui/scrollbar/scrollableElementOptions';
|
|
3
|
-
import { INewScrollPosition, Scrollable, ScrollEvent } from 'vs/base/common/scrollable';
|
|
4
|
-
export declare class HorizontalScrollbar extends AbstractScrollbar {
|
|
5
|
-
constructor(scrollable: Scrollable, options: ScrollableElementResolvedOptions, host: ScrollbarHost);
|
|
6
|
-
protected _updateSlider(sliderSize: number, sliderPosition: number): void;
|
|
7
|
-
protected _renderDomNode(largeSize: number, smallSize: number): void;
|
|
8
|
-
onDidScroll(e: ScrollEvent): boolean;
|
|
9
|
-
protected _mouseDownRelativePosition(offsetX: number, offsetY: number): number;
|
|
10
|
-
protected _sliderMousePosition(e: ISimplifiedMouseEvent): number;
|
|
11
|
-
protected _sliderOrthogonalMousePosition(e: ISimplifiedMouseEvent): number;
|
|
12
|
-
protected _updateScrollbarSize(size: number): void;
|
|
13
|
-
writeScrollPosition(target: INewScrollPosition, scrollPosition: number): void;
|
|
14
|
-
updateOptions(options: ScrollableElementResolvedOptions): void;
|
|
15
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { IMouseEvent, IMouseWheelEvent } from 'vs/base/browser/mouseEvent';
|
|
2
|
-
import { ScrollableElementChangeOptions, ScrollableElementCreationOptions, ScrollableElementResolvedOptions } from 'vs/base/browser/ui/scrollbar/scrollableElementOptions';
|
|
3
|
-
import { Widget } from 'vs/base/browser/ui/widget';
|
|
4
|
-
import { Event } from 'vs/base/common/event';
|
|
5
|
-
import { INewScrollDimensions, INewScrollPosition, IScrollDimensions, IScrollPosition, Scrollable, ScrollEvent } from 'vs/base/common/scrollable';
|
|
6
|
-
export interface IOverviewRulerLayoutInfo {
|
|
7
|
-
parent: HTMLElement;
|
|
8
|
-
insertBefore: HTMLElement;
|
|
9
|
-
}
|
|
10
|
-
export declare class MouseWheelClassifier {
|
|
11
|
-
static readonly INSTANCE: MouseWheelClassifier;
|
|
12
|
-
private readonly _capacity;
|
|
13
|
-
private _memory;
|
|
14
|
-
private _front;
|
|
15
|
-
private _rear;
|
|
16
|
-
constructor();
|
|
17
|
-
isPhysicalMouseWheel(): boolean;
|
|
18
|
-
accept(timestamp: number, deltaX: number, deltaY: number): void;
|
|
19
|
-
/**
|
|
20
|
-
* A score between 0 and 1 for `item`.
|
|
21
|
-
* - a score towards 0 indicates that the source appears to be a physical mouse wheel
|
|
22
|
-
* - a score towards 1 indicates that the source appears to be a touchpad or magic mouse, etc.
|
|
23
|
-
*/
|
|
24
|
-
private _computeScore;
|
|
25
|
-
private _isAlmostInt;
|
|
26
|
-
}
|
|
27
|
-
export declare abstract class AbstractScrollableElement extends Widget {
|
|
28
|
-
private readonly _options;
|
|
29
|
-
protected readonly _scrollable: Scrollable;
|
|
30
|
-
private readonly _verticalScrollbar;
|
|
31
|
-
private readonly _horizontalScrollbar;
|
|
32
|
-
private readonly _domNode;
|
|
33
|
-
private readonly _leftShadowDomNode;
|
|
34
|
-
private readonly _topShadowDomNode;
|
|
35
|
-
private readonly _topLeftShadowDomNode;
|
|
36
|
-
private readonly _listenOnDomNode;
|
|
37
|
-
private _mouseWheelToDispose;
|
|
38
|
-
private _isDragging;
|
|
39
|
-
private _mouseIsOver;
|
|
40
|
-
private readonly _hideTimeout;
|
|
41
|
-
private _shouldRender;
|
|
42
|
-
private _revealOnScroll;
|
|
43
|
-
private readonly _onScroll;
|
|
44
|
-
readonly onScroll: Event<ScrollEvent>;
|
|
45
|
-
private readonly _onWillScroll;
|
|
46
|
-
readonly onWillScroll: Event<ScrollEvent>;
|
|
47
|
-
get options(): Readonly<ScrollableElementResolvedOptions>;
|
|
48
|
-
protected constructor(element: HTMLElement, options: ScrollableElementCreationOptions, scrollable: Scrollable);
|
|
49
|
-
dispose(): void;
|
|
50
|
-
/**
|
|
51
|
-
* Get the generated 'scrollable' dom node
|
|
52
|
-
*/
|
|
53
|
-
getDomNode(): HTMLElement;
|
|
54
|
-
getOverviewRulerLayoutInfo(): IOverviewRulerLayoutInfo;
|
|
55
|
-
/**
|
|
56
|
-
* Delegate a mouse down event to the vertical scrollbar.
|
|
57
|
-
* This is to help with clicking somewhere else and having the scrollbar react.
|
|
58
|
-
*/
|
|
59
|
-
delegateVerticalScrollbarMouseDown(browserEvent: IMouseEvent): void;
|
|
60
|
-
getScrollDimensions(): IScrollDimensions;
|
|
61
|
-
setScrollDimensions(dimensions: INewScrollDimensions): void;
|
|
62
|
-
/**
|
|
63
|
-
* Update the class name of the scrollable element.
|
|
64
|
-
*/
|
|
65
|
-
updateClassName(newClassName: string): void;
|
|
66
|
-
/**
|
|
67
|
-
* Update configuration options for the scrollbar.
|
|
68
|
-
*/
|
|
69
|
-
updateOptions(newOptions: ScrollableElementChangeOptions): void;
|
|
70
|
-
setRevealOnScroll(value: boolean): void;
|
|
71
|
-
triggerScrollFromMouseWheelEvent(browserEvent: IMouseWheelEvent): void;
|
|
72
|
-
private _setListeningToMouseWheel;
|
|
73
|
-
private _onMouseWheel;
|
|
74
|
-
private _onDidScroll;
|
|
75
|
-
/**
|
|
76
|
-
* Render / mutate the DOM now.
|
|
77
|
-
* Should be used together with the ctor option `lazyRender`.
|
|
78
|
-
*/
|
|
79
|
-
renderNow(): void;
|
|
80
|
-
private _render;
|
|
81
|
-
private _onDragStart;
|
|
82
|
-
private _onDragEnd;
|
|
83
|
-
private _onMouseOut;
|
|
84
|
-
private _onMouseOver;
|
|
85
|
-
private _reveal;
|
|
86
|
-
private _hide;
|
|
87
|
-
private _scheduleHide;
|
|
88
|
-
}
|
|
89
|
-
export declare class ScrollableElement extends AbstractScrollableElement {
|
|
90
|
-
constructor(element: HTMLElement, options: ScrollableElementCreationOptions);
|
|
91
|
-
setScrollPosition(update: INewScrollPosition): void;
|
|
92
|
-
getScrollPosition(): IScrollPosition;
|
|
93
|
-
}
|
|
94
|
-
export declare class SmoothScrollableElement extends AbstractScrollableElement {
|
|
95
|
-
constructor(element: HTMLElement, options: ScrollableElementCreationOptions, scrollable: Scrollable);
|
|
96
|
-
setScrollPosition(update: INewScrollPosition & {
|
|
97
|
-
reuseAnimation?: boolean;
|
|
98
|
-
}): void;
|
|
99
|
-
getScrollPosition(): IScrollPosition;
|
|
100
|
-
}
|
|
101
|
-
export declare class DomScrollableElement extends AbstractScrollableElement {
|
|
102
|
-
private _element;
|
|
103
|
-
constructor(element: HTMLElement, options: ScrollableElementCreationOptions);
|
|
104
|
-
setScrollPosition(update: INewScrollPosition): void;
|
|
105
|
-
getScrollPosition(): IScrollPosition;
|
|
106
|
-
scanDomNode(): void;
|
|
107
|
-
}
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
|
|
2
|
-
export interface ScrollableElementCreationOptions {
|
|
3
|
-
/**
|
|
4
|
-
* The scrollable element should not do any DOM mutations until renderNow() is called.
|
|
5
|
-
* Defaults to false.
|
|
6
|
-
*/
|
|
7
|
-
lazyRender?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* CSS Class name for the scrollable element.
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Drop subtle horizontal and vertical shadows.
|
|
14
|
-
* Defaults to false.
|
|
15
|
-
*/
|
|
16
|
-
useShadows?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Handle mouse wheel (listen to mouse wheel scrolling).
|
|
19
|
-
* Defaults to true
|
|
20
|
-
*/
|
|
21
|
-
handleMouseWheel?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* If mouse wheel is handled, make mouse wheel scrolling smooth.
|
|
24
|
-
* Defaults to true.
|
|
25
|
-
*/
|
|
26
|
-
mouseWheelSmoothScroll?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Flip axes. Treat vertical scrolling like horizontal and vice-versa.
|
|
29
|
-
* Defaults to false.
|
|
30
|
-
*/
|
|
31
|
-
flipAxes?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* If enabled, will scroll horizontally when scrolling vertical.
|
|
34
|
-
* Defaults to false.
|
|
35
|
-
*/
|
|
36
|
-
scrollYToX?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Consume all mouse wheel events if a scrollbar is needed (i.e. scrollSize > size).
|
|
39
|
-
* Defaults to false.
|
|
40
|
-
*/
|
|
41
|
-
consumeMouseWheelIfScrollbarIsNeeded?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Always consume mouse wheel events, even when scrolling is no longer possible.
|
|
44
|
-
* Defaults to false.
|
|
45
|
-
*/
|
|
46
|
-
alwaysConsumeMouseWheel?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.
|
|
49
|
-
* Defaults to 1.
|
|
50
|
-
*/
|
|
51
|
-
mouseWheelScrollSensitivity?: number;
|
|
52
|
-
/**
|
|
53
|
-
* FastScrolling mulitplier speed when pressing `Alt`
|
|
54
|
-
* Defaults to 5.
|
|
55
|
-
*/
|
|
56
|
-
fastScrollSensitivity?: number;
|
|
57
|
-
/**
|
|
58
|
-
* Whether the scrollable will only scroll along the predominant axis when scrolling both
|
|
59
|
-
* vertically and horizontally at the same time.
|
|
60
|
-
* Prevents horizontal drift when scrolling vertically on a trackpad.
|
|
61
|
-
* Defaults to true.
|
|
62
|
-
*/
|
|
63
|
-
scrollPredominantAxis?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Height for vertical arrows (top/bottom) and width for horizontal arrows (left/right).
|
|
66
|
-
* Defaults to 11.
|
|
67
|
-
*/
|
|
68
|
-
arrowSize?: number;
|
|
69
|
-
/**
|
|
70
|
-
* The dom node events should be bound to.
|
|
71
|
-
* If no listenOnDomNode is provided, the dom node passed to the constructor will be used for event listening.
|
|
72
|
-
*/
|
|
73
|
-
listenOnDomNode?: HTMLElement;
|
|
74
|
-
/**
|
|
75
|
-
* Control the visibility of the horizontal scrollbar.
|
|
76
|
-
* Accepted values: 'auto' (on mouse over), 'visible' (always visible), 'hidden' (never visible)
|
|
77
|
-
* Defaults to 'auto'.
|
|
78
|
-
*/
|
|
79
|
-
horizontal?: ScrollbarVisibility;
|
|
80
|
-
/**
|
|
81
|
-
* Height (in px) of the horizontal scrollbar.
|
|
82
|
-
* Defaults to 10.
|
|
83
|
-
*/
|
|
84
|
-
horizontalScrollbarSize?: number;
|
|
85
|
-
/**
|
|
86
|
-
* Height (in px) of the horizontal scrollbar slider.
|
|
87
|
-
* Defaults to `horizontalScrollbarSize`
|
|
88
|
-
*/
|
|
89
|
-
horizontalSliderSize?: number;
|
|
90
|
-
/**
|
|
91
|
-
* Render arrows (left/right) for the horizontal scrollbar.
|
|
92
|
-
* Defaults to false.
|
|
93
|
-
*/
|
|
94
|
-
horizontalHasArrows?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Control the visibility of the vertical scrollbar.
|
|
97
|
-
* Accepted values: 'auto' (on mouse over), 'visible' (always visible), 'hidden' (never visible)
|
|
98
|
-
* Defaults to 'auto'.
|
|
99
|
-
*/
|
|
100
|
-
vertical?: ScrollbarVisibility;
|
|
101
|
-
/**
|
|
102
|
-
* Width (in px) of the vertical scrollbar.
|
|
103
|
-
* Defaults to 10.
|
|
104
|
-
*/
|
|
105
|
-
verticalScrollbarSize?: number;
|
|
106
|
-
/**
|
|
107
|
-
* Width (in px) of the vertical scrollbar slider.
|
|
108
|
-
* Defaults to `verticalScrollbarSize`
|
|
109
|
-
*/
|
|
110
|
-
verticalSliderSize?: number;
|
|
111
|
-
/**
|
|
112
|
-
* Render arrows (top/bottom) for the vertical scrollbar.
|
|
113
|
-
* Defaults to false.
|
|
114
|
-
*/
|
|
115
|
-
verticalHasArrows?: boolean;
|
|
116
|
-
/**
|
|
117
|
-
* Scroll gutter clicks move by page vs. jump to position.
|
|
118
|
-
* Defaults to false.
|
|
119
|
-
*/
|
|
120
|
-
scrollByPage?: boolean;
|
|
121
|
-
}
|
|
122
|
-
export interface ScrollableElementChangeOptions {
|
|
123
|
-
handleMouseWheel?: boolean;
|
|
124
|
-
mouseWheelScrollSensitivity?: number;
|
|
125
|
-
fastScrollSensitivity?: number;
|
|
126
|
-
scrollPredominantAxis?: boolean;
|
|
127
|
-
horizontal?: ScrollbarVisibility;
|
|
128
|
-
horizontalScrollbarSize?: number;
|
|
129
|
-
vertical?: ScrollbarVisibility;
|
|
130
|
-
verticalScrollbarSize?: number;
|
|
131
|
-
scrollByPage?: boolean;
|
|
132
|
-
}
|
|
133
|
-
export interface ScrollableElementResolvedOptions {
|
|
134
|
-
lazyRender: boolean;
|
|
135
|
-
className: string;
|
|
136
|
-
useShadows: boolean;
|
|
137
|
-
handleMouseWheel: boolean;
|
|
138
|
-
flipAxes: boolean;
|
|
139
|
-
scrollYToX: boolean;
|
|
140
|
-
consumeMouseWheelIfScrollbarIsNeeded: boolean;
|
|
141
|
-
alwaysConsumeMouseWheel: boolean;
|
|
142
|
-
mouseWheelScrollSensitivity: number;
|
|
143
|
-
fastScrollSensitivity: number;
|
|
144
|
-
scrollPredominantAxis: boolean;
|
|
145
|
-
mouseWheelSmoothScroll: boolean;
|
|
146
|
-
arrowSize: number;
|
|
147
|
-
listenOnDomNode: HTMLElement | null;
|
|
148
|
-
horizontal: ScrollbarVisibility;
|
|
149
|
-
horizontalScrollbarSize: number;
|
|
150
|
-
horizontalSliderSize: number;
|
|
151
|
-
horizontalHasArrows: boolean;
|
|
152
|
-
vertical: ScrollbarVisibility;
|
|
153
|
-
verticalScrollbarSize: number;
|
|
154
|
-
verticalSliderSize: number;
|
|
155
|
-
verticalHasArrows: boolean;
|
|
156
|
-
scrollByPage: boolean;
|
|
157
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Widget } from 'vs/base/browser/ui/widget';
|
|
2
|
-
/**
|
|
3
|
-
* The arrow image size.
|
|
4
|
-
*/
|
|
5
|
-
export declare const ARROW_IMG_SIZE = 11;
|
|
6
|
-
export interface ScrollbarArrowOptions {
|
|
7
|
-
onActivate: () => void;
|
|
8
|
-
className: string;
|
|
9
|
-
bgWidth: number;
|
|
10
|
-
bgHeight: number;
|
|
11
|
-
top?: number;
|
|
12
|
-
left?: number;
|
|
13
|
-
bottom?: number;
|
|
14
|
-
right?: number;
|
|
15
|
-
}
|
|
16
|
-
export declare class ScrollbarArrow extends Widget {
|
|
17
|
-
private _onActivate;
|
|
18
|
-
bgDomNode: HTMLElement;
|
|
19
|
-
domNode: HTMLElement;
|
|
20
|
-
private _mousedownRepeatTimer;
|
|
21
|
-
private _mousedownScheduleRepeatTimer;
|
|
22
|
-
private _mouseMoveMonitor;
|
|
23
|
-
constructor(opts: ScrollbarArrowOptions);
|
|
24
|
-
private _arrowMouseDown;
|
|
25
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
export declare class ScrollbarState {
|
|
2
|
-
/**
|
|
3
|
-
* For the vertical scrollbar: the width.
|
|
4
|
-
* For the horizontal scrollbar: the height.
|
|
5
|
-
*/
|
|
6
|
-
private _scrollbarSize;
|
|
7
|
-
/**
|
|
8
|
-
* For the vertical scrollbar: the height of the pair horizontal scrollbar.
|
|
9
|
-
* For the horizontal scrollbar: the width of the pair vertical scrollbar.
|
|
10
|
-
*/
|
|
11
|
-
private _oppositeScrollbarSize;
|
|
12
|
-
/**
|
|
13
|
-
* For the vertical scrollbar: the height of the scrollbar's arrows.
|
|
14
|
-
* For the horizontal scrollbar: the width of the scrollbar's arrows.
|
|
15
|
-
*/
|
|
16
|
-
private readonly _arrowSize;
|
|
17
|
-
/**
|
|
18
|
-
* For the vertical scrollbar: the viewport height.
|
|
19
|
-
* For the horizontal scrollbar: the viewport width.
|
|
20
|
-
*/
|
|
21
|
-
private _visibleSize;
|
|
22
|
-
/**
|
|
23
|
-
* For the vertical scrollbar: the scroll height.
|
|
24
|
-
* For the horizontal scrollbar: the scroll width.
|
|
25
|
-
*/
|
|
26
|
-
private _scrollSize;
|
|
27
|
-
/**
|
|
28
|
-
* For the vertical scrollbar: the scroll top.
|
|
29
|
-
* For the horizontal scrollbar: the scroll left.
|
|
30
|
-
*/
|
|
31
|
-
private _scrollPosition;
|
|
32
|
-
/**
|
|
33
|
-
* `visibleSize` - `oppositeScrollbarSize`
|
|
34
|
-
*/
|
|
35
|
-
private _computedAvailableSize;
|
|
36
|
-
/**
|
|
37
|
-
* (`scrollSize` > 0 && `scrollSize` > `visibleSize`)
|
|
38
|
-
*/
|
|
39
|
-
private _computedIsNeeded;
|
|
40
|
-
private _computedSliderSize;
|
|
41
|
-
private _computedSliderRatio;
|
|
42
|
-
private _computedSliderPosition;
|
|
43
|
-
constructor(arrowSize: number, scrollbarSize: number, oppositeScrollbarSize: number, visibleSize: number, scrollSize: number, scrollPosition: number);
|
|
44
|
-
clone(): ScrollbarState;
|
|
45
|
-
setVisibleSize(visibleSize: number): boolean;
|
|
46
|
-
setScrollSize(scrollSize: number): boolean;
|
|
47
|
-
setScrollPosition(scrollPosition: number): boolean;
|
|
48
|
-
setScrollbarSize(scrollbarSize: number): void;
|
|
49
|
-
setOppositeScrollbarSize(oppositeScrollbarSize: number): void;
|
|
50
|
-
private static _computeValues;
|
|
51
|
-
private _refreshComputedValues;
|
|
52
|
-
getArrowSize(): number;
|
|
53
|
-
getScrollPosition(): number;
|
|
54
|
-
getRectangleLargeSize(): number;
|
|
55
|
-
getRectangleSmallSize(): number;
|
|
56
|
-
isNeeded(): boolean;
|
|
57
|
-
getSliderSize(): number;
|
|
58
|
-
getSliderPosition(): number;
|
|
59
|
-
/**
|
|
60
|
-
* Compute a desired `scrollPosition` such that `offset` ends up in the center of the slider.
|
|
61
|
-
* `offset` is based on the same coordinate system as the `sliderPosition`.
|
|
62
|
-
*/
|
|
63
|
-
getDesiredScrollPositionFromOffset(offset: number): number;
|
|
64
|
-
/**
|
|
65
|
-
* Compute a desired `scrollPosition` from if offset is before or after the slider position.
|
|
66
|
-
* If offset is before slider, treat as a page up (or left). If after, page down (or right).
|
|
67
|
-
* `offset` and `_computedSliderPosition` are based on the same coordinate system.
|
|
68
|
-
* `_visibleSize` corresponds to a "page" of lines in the returned coordinate system.
|
|
69
|
-
*/
|
|
70
|
-
getDesiredScrollPositionFromOffsetPaged(offset: number): number;
|
|
71
|
-
/**
|
|
72
|
-
* Compute a desired `scrollPosition` such that the slider moves by `delta`.
|
|
73
|
-
*/
|
|
74
|
-
getDesiredScrollPositionFromDelta(delta: number): number;
|
|
75
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { FastDomNode } from 'vs/base/browser/fastDomNode';
|
|
2
|
-
import { Disposable } from 'vs/base/common/lifecycle';
|
|
3
|
-
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
|
|
4
|
-
export declare class ScrollbarVisibilityController extends Disposable {
|
|
5
|
-
private _visibility;
|
|
6
|
-
private _visibleClassName;
|
|
7
|
-
private _invisibleClassName;
|
|
8
|
-
private _domNode;
|
|
9
|
-
private _rawShouldBeVisible;
|
|
10
|
-
private _shouldBeVisible;
|
|
11
|
-
private _isNeeded;
|
|
12
|
-
private _isVisible;
|
|
13
|
-
private _revealTimer;
|
|
14
|
-
constructor(visibility: ScrollbarVisibility, visibleClassName: string, invisibleClassName: string);
|
|
15
|
-
setVisibility(visibility: ScrollbarVisibility): void;
|
|
16
|
-
setShouldBeVisible(rawShouldBeVisible: boolean): void;
|
|
17
|
-
private _applyVisibilitySetting;
|
|
18
|
-
private _updateShouldBeVisible;
|
|
19
|
-
setIsNeeded(isNeeded: boolean): void;
|
|
20
|
-
setDomNode(domNode: FastDomNode<HTMLElement>): void;
|
|
21
|
-
ensureVisibility(): void;
|
|
22
|
-
private _reveal;
|
|
23
|
-
private _hide;
|
|
24
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AbstractScrollbar, ISimplifiedMouseEvent, ScrollbarHost } from 'vs/base/browser/ui/scrollbar/abstractScrollbar';
|
|
2
|
-
import { ScrollableElementResolvedOptions } from 'vs/base/browser/ui/scrollbar/scrollableElementOptions';
|
|
3
|
-
import { INewScrollPosition, Scrollable, ScrollEvent } from 'vs/base/common/scrollable';
|
|
4
|
-
export declare class VerticalScrollbar extends AbstractScrollbar {
|
|
5
|
-
constructor(scrollable: Scrollable, options: ScrollableElementResolvedOptions, host: ScrollbarHost);
|
|
6
|
-
protected _updateSlider(sliderSize: number, sliderPosition: number): void;
|
|
7
|
-
protected _renderDomNode(largeSize: number, smallSize: number): void;
|
|
8
|
-
onDidScroll(e: ScrollEvent): boolean;
|
|
9
|
-
protected _mouseDownRelativePosition(offsetX: number, offsetY: number): number;
|
|
10
|
-
protected _sliderMousePosition(e: ISimplifiedMouseEvent): number;
|
|
11
|
-
protected _sliderOrthogonalMousePosition(e: ISimplifiedMouseEvent): number;
|
|
12
|
-
protected _updateScrollbarSize(size: number): void;
|
|
13
|
-
writeScrollPosition(target: INewScrollPosition, scrollPosition: number): void;
|
|
14
|
-
updateOptions(options: ScrollableElementResolvedOptions): void;
|
|
15
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
|
2
|
-
import { IMouseEvent } from 'vs/base/browser/mouseEvent';
|
|
3
|
-
import { Disposable } from 'vs/base/common/lifecycle';
|
|
4
|
-
export declare abstract class Widget extends Disposable {
|
|
5
|
-
protected onclick(domNode: HTMLElement, listener: (e: IMouseEvent) => void): void;
|
|
6
|
-
protected onmousedown(domNode: HTMLElement, listener: (e: IMouseEvent) => void): void;
|
|
7
|
-
protected onmouseover(domNode: HTMLElement, listener: (e: IMouseEvent) => void): void;
|
|
8
|
-
protected onnonbubblingmouseout(domNode: HTMLElement, listener: (e: IMouseEvent) => void): void;
|
|
9
|
-
protected onkeydown(domNode: HTMLElement, listener: (e: IKeyboardEvent) => void): void;
|
|
10
|
-
protected onkeyup(domNode: HTMLElement, listener: (e: IKeyboardEvent) => void): void;
|
|
11
|
-
protected oninput(domNode: HTMLElement, listener: (e: Event) => void): void;
|
|
12
|
-
protected onblur(domNode: HTMLElement, listener: (e: Event) => void): void;
|
|
13
|
-
protected onfocus(domNode: HTMLElement, listener: (e: Event) => void): void;
|
|
14
|
-
protected onchange(domNode: HTMLElement, listener: (e: Event) => void): void;
|
|
15
|
-
protected ignoreGesture(domNode: HTMLElement): void;
|
|
16
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { Emitter, Event } from 'vs/base/common/event';
|
|
2
|
-
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
|
3
|
-
export interface ITelemetryData {
|
|
4
|
-
readonly from?: string;
|
|
5
|
-
readonly target?: string;
|
|
6
|
-
[key: string]: unknown;
|
|
7
|
-
}
|
|
8
|
-
export declare type WorkbenchActionExecutedClassification = {
|
|
9
|
-
id: {
|
|
10
|
-
classification: 'SystemMetaData';
|
|
11
|
-
purpose: 'FeatureInsight';
|
|
12
|
-
};
|
|
13
|
-
from: {
|
|
14
|
-
classification: 'SystemMetaData';
|
|
15
|
-
purpose: 'FeatureInsight';
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare type WorkbenchActionExecutedEvent = {
|
|
19
|
-
id: string;
|
|
20
|
-
from: string;
|
|
21
|
-
};
|
|
22
|
-
export interface IAction extends IDisposable {
|
|
23
|
-
readonly id: number;
|
|
24
|
-
label: string;
|
|
25
|
-
tooltip: string;
|
|
26
|
-
class: string | undefined;
|
|
27
|
-
enabled: boolean;
|
|
28
|
-
checked?: boolean;
|
|
29
|
-
type: string;
|
|
30
|
-
accelerator: string | undefined;
|
|
31
|
-
run(event?: unknown): unknown;
|
|
32
|
-
}
|
|
33
|
-
export interface IActionRunner extends IDisposable {
|
|
34
|
-
readonly onDidRun: Event<IRunEvent>;
|
|
35
|
-
readonly onBeforeRun: Event<IRunEvent>;
|
|
36
|
-
run(action: IAction, context?: unknown): unknown;
|
|
37
|
-
}
|
|
38
|
-
export interface IActionChangeEvent {
|
|
39
|
-
readonly label?: string;
|
|
40
|
-
readonly tooltip?: string;
|
|
41
|
-
readonly class?: string;
|
|
42
|
-
readonly enabled?: boolean;
|
|
43
|
-
readonly checked?: boolean;
|
|
44
|
-
}
|
|
45
|
-
export declare class Action extends Disposable implements IAction {
|
|
46
|
-
protected _onDidChange: Emitter<IActionChangeEvent>;
|
|
47
|
-
readonly onDidChange: Event<IActionChangeEvent>;
|
|
48
|
-
protected readonly _id: number;
|
|
49
|
-
protected _label: string;
|
|
50
|
-
protected _tooltip: string | undefined;
|
|
51
|
-
protected _cssClass: string | undefined;
|
|
52
|
-
protected _enabled: boolean;
|
|
53
|
-
protected _checked?: boolean;
|
|
54
|
-
protected _type: string;
|
|
55
|
-
protected _accelerator?: string;
|
|
56
|
-
constructor(id: number, label?: string, cssClass?: string, enabled?: boolean, type?: string, accelerator?: string);
|
|
57
|
-
get id(): number;
|
|
58
|
-
get type(): string;
|
|
59
|
-
get accelerator(): string | undefined;
|
|
60
|
-
get label(): string;
|
|
61
|
-
set label(value: string);
|
|
62
|
-
private _setLabel;
|
|
63
|
-
get tooltip(): string;
|
|
64
|
-
set tooltip(value: string);
|
|
65
|
-
protected _setTooltip(value: string): void;
|
|
66
|
-
get class(): string | undefined;
|
|
67
|
-
set class(value: string | undefined);
|
|
68
|
-
protected _setClass(value: string | undefined): void;
|
|
69
|
-
get enabled(): boolean;
|
|
70
|
-
set enabled(value: boolean);
|
|
71
|
-
protected _setEnabled(value: boolean): void;
|
|
72
|
-
get checked(): boolean | undefined;
|
|
73
|
-
set checked(value: boolean | undefined);
|
|
74
|
-
protected _setChecked(value: boolean | undefined): void;
|
|
75
|
-
run(event?: Function, data?: ITelemetryData): Promise<void>;
|
|
76
|
-
}
|
|
77
|
-
export interface IRunEvent {
|
|
78
|
-
readonly action: IAction;
|
|
79
|
-
readonly error?: Error;
|
|
80
|
-
}
|
|
81
|
-
export declare class ActionRunner extends Disposable implements IActionRunner {
|
|
82
|
-
private _onBeforeRun;
|
|
83
|
-
readonly onBeforeRun: Event<IRunEvent>;
|
|
84
|
-
private _onDidRun;
|
|
85
|
-
readonly onDidRun: Event<IRunEvent>;
|
|
86
|
-
run(action: IAction, context?: unknown): Promise<void>;
|
|
87
|
-
protected runAction(action: IAction, context?: unknown): Promise<void>;
|
|
88
|
-
}
|
|
89
|
-
export declare class Separator extends Action {
|
|
90
|
-
/**
|
|
91
|
-
* Joins all non-empty lists of actions with separators.
|
|
92
|
-
*/
|
|
93
|
-
static join(...actionLists: readonly IAction[][]): IAction[];
|
|
94
|
-
static readonly ID = -200;
|
|
95
|
-
constructor(label?: string);
|
|
96
|
-
}
|
|
97
|
-
export declare class SubmenuAction implements IAction {
|
|
98
|
-
readonly id: number;
|
|
99
|
-
readonly label: string;
|
|
100
|
-
readonly class: string | undefined;
|
|
101
|
-
readonly tooltip: string;
|
|
102
|
-
readonly enabled: boolean;
|
|
103
|
-
readonly checked: undefined;
|
|
104
|
-
readonly type: string;
|
|
105
|
-
readonly accelerator: string | undefined;
|
|
106
|
-
private readonly _actions;
|
|
107
|
-
get actions(): readonly IAction[];
|
|
108
|
-
constructor(id: number, label: string, actions: readonly IAction[], accelerator?: string, cssClass?: string);
|
|
109
|
-
dispose(): void;
|
|
110
|
-
run(): Promise<void>;
|
|
111
|
-
}
|
|
112
|
-
export declare class EmptySubmenuAction extends Action {
|
|
113
|
-
static readonly ID = -201;
|
|
114
|
-
constructor();
|
|
115
|
-
}
|