1 | import { Decoration, DecorationOptions, DisplayMarker, Disposable } from "../index";
|
2 |
|
3 |
|
4 | export interface Gutter {
|
5 |
|
6 |
|
7 | destroy(): void;
|
8 |
|
9 |
|
10 |
|
11 | onDidChangeVisible(callback: (gutter: Gutter) => void): Disposable;
|
12 |
|
13 |
|
14 | onDidDestroy(callback: () => void): Disposable;
|
15 |
|
16 |
|
17 |
|
18 | hide(): void;
|
19 |
|
20 |
|
21 | show(): void;
|
22 |
|
23 |
|
24 | isVisible(): boolean;
|
25 |
|
26 | |
27 |
|
28 |
|
29 |
|
30 |
|
31 | decorateMarker(marker: DisplayMarker, decorationParams: DecorationOptions): Decoration;
|
32 | }
|
33 |
|
34 | export interface GutterOptions {
|
35 |
|
36 | name: string;
|
37 |
|
38 | |
39 |
|
40 |
|
41 |
|
42 | priority?: number | undefined;
|
43 |
|
44 | |
45 |
|
46 |
|
47 |
|
48 | visible?: boolean | undefined;
|
49 |
|
50 | |
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 | type?: "decorated" | "line-number" | undefined;
|
57 |
|
58 |
|
59 | class?: string | undefined;
|
60 |
|
61 | |
62 |
|
63 |
|
64 |
|
65 |
|
66 | labelFn?: ((lineData: LineDataExtended) => string) | undefined;
|
67 |
|
68 | /**
|
69 | * Function to be called when a mousedown event is received by a line-number
|
70 | * element within this type: 'line-number' Gutter. If unspecified, the default
|
71 | * behavior is to select the clicked buffer row.
|
72 | */
|
73 | onMouseDown?: ((lineData: LineData) => void) | undefined;
|
74 |
|
75 | /**
|
76 | * Function to be called when a mousemove event occurs on a line-number
|
77 | * element within within this type: 'line-number' Gutter.
|
78 | */
|
79 | onMouseMove?: ((lineData: LineData) => void) | undefined;
|
80 | }
|
81 |
|
82 | export interface LineData {
|
83 | /** Number indicating the zero-indexed buffer index of a line. */
|
84 | bufferRow: number;
|
85 |
|
86 | /** Number indicating the zero-indexed screen index. */
|
87 | screenRow: number;
|
88 | }
|
89 |
|
90 | /** Object containing information about each line to label. */
|
91 | export interface LineDataExtended extends LineData {
|
92 | /** Boolean that is true if a fold may be created here. */
|
93 | foldable: boolean;
|
94 |
|
95 | /** Boolean if this screen row is the soft-wrapped continuation of the same buffer row. */
|
96 | softWrapped: boolean;
|
97 |
|
98 | /** Number the maximum number of digits necessary to represent any known screen row. */
|
99 | maxDigits: number;
|
100 | }
|
101 |
|
\ | No newline at end of file |