Skip to content

Commit 08a69f7

Browse files
committed
Add scroll area
1 parent f752fa9 commit 08a69f7

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

src/lib/components/components-map.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { NgLineEdit } from './line-edit';
1111
import { NgPlainTextEdit } from './pline-text-edit';
1212
import { NgRadioButton } from './radiobutton';
1313
import { NgProgressBar } from './progress-bar';
14+
import { NgScrollArea } from './scroll-area';
1415

1516
export type Constructable<T> = new () => T;
1617
export type NgComponentClass = Constructable<NgComponent>;
@@ -34,5 +35,6 @@ export class ComponentsMap {
3435
this.map.set(NgPlainTextEdit.nodeName, NgPlainTextEdit);
3536
this.map.set(NgRadioButton.nodeName, NgRadioButton);
3637
this.map.set(NgProgressBar.nodeName, NgProgressBar);
38+
this.map.set(NgScrollArea.nodeName, NgScrollArea);
3739
}
3840
}

src/lib/components/scroll-area.ts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import { QScrollArea } from '@nodegui/nodegui';
2+
import { NgComponent } from './component';
3+
import { RendererStyleFlags2 } from '@angular/core';
4+
5+
export class NgScrollArea extends QScrollArea implements NgComponent {
6+
public static nodeName = 'scrollarea';
7+
public parent: any;
8+
9+
public appendChild(newChild: any): void {
10+
throw new Error('Method not implemented.');
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+
21+
public setProperty(name: string, value: boolean | string): void {
22+
switch (name) {
23+
case 'enabled':
24+
this.setEnabled(value as boolean);
25+
break;
26+
default:
27+
break;
28+
}
29+
}
30+
31+
public setStyle(
32+
style: string,
33+
value: any,
34+
flags?: RendererStyleFlags2
35+
): void {
36+
this.setInlineStyle(`${style}:${value}`);
37+
}
38+
39+
public setValue(value: string): void {}
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

Comments
 (0)