|
| 1 | +import { FlexLayout, QMainWindow } from '@nodegui/nodegui'; |
| 2 | +import { NgComponent } from './component'; |
| 3 | +import { RendererStyleFlags2 } from '@angular/core'; |
| 4 | + |
| 5 | +export class NgWindow extends FlexLayout implements NgComponent { |
| 6 | + public static nodeName = 'window'; |
| 7 | + public parent: QMainWindow; |
| 8 | + |
| 9 | + public appendChild(newChild: any): void { |
| 10 | + this.addWidget(newChild); |
| 11 | + } |
| 12 | + |
| 13 | + public insertBefore(newChild: any, refChild: any) {} |
| 14 | + |
| 15 | + public setNgAttribute( |
| 16 | + name: string, |
| 17 | + value: string, |
| 18 | + namespace?: string | null |
| 19 | + ): void { |
| 20 | + if (name === 'title') { |
| 21 | + this.parent.setWindowTitle(value); |
| 22 | + } |
| 23 | + } |
| 24 | + |
| 25 | + public setProperty(name: string, value: any): void { |
| 26 | + throw new Error('Method not implemented.'); |
| 27 | + } |
| 28 | + |
| 29 | + public setStyle( |
| 30 | + style: string, |
| 31 | + value: any, |
| 32 | + flags?: RendererStyleFlags2 |
| 33 | + ): void { |
| 34 | + throw new Error('Method not implemented.'); |
| 35 | + } |
| 36 | + |
| 37 | + public setValue(value: string): void { |
| 38 | + throw new Error('Method not implemented.'); |
| 39 | + } |
| 40 | + |
| 41 | + removeAttribute(name: string, namespace?: string): void { |
| 42 | + throw new Error('Method not implemented.'); |
| 43 | + } |
| 44 | + removeChild(oldChild: any): void { |
| 45 | + throw new Error('Method not implemented.'); |
| 46 | + } |
| 47 | + removeClass(name: string): void { |
| 48 | + throw new Error('Method not implemented.'); |
| 49 | + } |
| 50 | + removeStyle(style: string, flags?: RendererStyleFlags2): void { |
| 51 | + throw new Error('Method not implemented.'); |
| 52 | + } |
| 53 | +} |
0 commit comments