]>
Commit | Line | Data |
---|---|---|
f03d00a4 DI |
1 | import { ITerminal, IBuffer, IBufferSet, IBrowser, ICharMeasure, ISelectionManager } from '../Interfaces'; |
2 | ||
3 | export class MockTerminal implements ITerminal { | |
4 | public element: HTMLElement; | |
5 | public rowContainer: HTMLElement; | |
6 | public selectionContainer: HTMLElement; | |
7 | public selectionManager: ISelectionManager; | |
8 | public charMeasure: ICharMeasure; | |
9 | public textarea: HTMLTextAreaElement; | |
10 | public rows: number; | |
11 | public cols: number; | |
12 | public browser: IBrowser; | |
13 | public writeBuffer: string[]; | |
14 | public children: HTMLElement[]; | |
15 | public cursorHidden: boolean; | |
16 | public cursorState: number; | |
17 | public defAttr: number; | |
18 | public scrollback: number; | |
19 | public buffers: IBufferSet; | |
20 | public buffer: IBuffer; | |
21 | ||
22 | handler(data: string) { | |
23 | throw new Error('Method not implemented.'); | |
24 | } | |
25 | on(event: string, callback: () => void) { | |
26 | throw new Error('Method not implemented.'); | |
27 | } | |
28 | scrollDisp(disp: number, suppressScrollEvent: boolean) { | |
29 | throw new Error('Method not implemented.'); | |
30 | } | |
31 | cancel(ev: Event, force?: boolean) { | |
32 | throw new Error('Method not implemented.'); | |
33 | } | |
34 | log(text: string): void { | |
35 | throw new Error('Method not implemented.'); | |
36 | } | |
37 | emit(event: string, data: any) { | |
38 | throw new Error('Method not implemented.'); | |
39 | } | |
40 | reset(): void { | |
41 | throw new Error('Method not implemented.'); | |
42 | } | |
43 | showCursor(): void { | |
44 | throw new Error('Method not implemented.'); | |
45 | } | |
bb526aaa | 46 | blankLine(cur?: boolean, isWrapped?: boolean, cols?: number) { |
f03d00a4 | 47 | const line = []; |
bb526aaa DI |
48 | cols = cols || this.cols; |
49 | for (let i = 0; i < cols; i++) { | |
f03d00a4 DI |
50 | line.push([0, ' ', 1]); |
51 | } | |
52 | return line; | |
53 | } | |
54 | } |