new types and classes
This commit is contained in:
parent
20df39ee4e
commit
9a3a1b084a
26 changed files with 1324 additions and 2 deletions
82
lib/widgets/window.ts
Normal file
82
lib/widgets/window.ts
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
import { NativeClasses } from "../milsko";
|
||||
import { Widget } from "../widget";
|
||||
import { MwSizeHints } from "../structs";
|
||||
import { WidgetOptions, Pixmap } from "../types";
|
||||
|
||||
export class Window extends Widget {
|
||||
constructor(options: WidgetOptions) {
|
||||
super(NativeClasses.Window, options);
|
||||
}
|
||||
|
||||
public setTitle(value: string): this {
|
||||
return this.setString("Stitle", value);
|
||||
}
|
||||
|
||||
get title(): string {
|
||||
return this.getString("Stitle");
|
||||
}
|
||||
|
||||
set title(value: string) {
|
||||
this.setString("Stitle", value);
|
||||
}
|
||||
|
||||
public setMain(value: boolean): this {
|
||||
return this.setInteger("Imain", +value);
|
||||
}
|
||||
|
||||
get main(): boolean {
|
||||
return this.getInteger("Imain") != 0;
|
||||
}
|
||||
|
||||
set main(value: boolean) {
|
||||
this.setInteger("Imain", +value);
|
||||
}
|
||||
|
||||
public setIconPixmap(value: Pixmap): this {
|
||||
return this.setVoid("ViconPixmap", value);
|
||||
}
|
||||
|
||||
get iconPixmap(): Pixmap {
|
||||
return this.getVoid("ViconPixmap") as Pixmap;
|
||||
}
|
||||
|
||||
set iconPixmap(value: Pixmap) {
|
||||
this.setVoid("ViconPixmap", value);
|
||||
}
|
||||
|
||||
public setSizeHints(value: MwSizeHints): this {
|
||||
return this.setVoid("VsizeHints", value);
|
||||
}
|
||||
|
||||
get sizeHints(): MwSizeHints {
|
||||
return this.getVoid("VsizeHints") as MwSizeHints;
|
||||
}
|
||||
|
||||
set sizeHints(value: MwSizeHints) {
|
||||
this.setVoid("VsizeHints", value);
|
||||
}
|
||||
|
||||
public setHasBorder(value: boolean): this {
|
||||
return this.setInteger("IhasBorder", +value);
|
||||
}
|
||||
|
||||
get hasBorder(): boolean {
|
||||
return this.getInteger("IhasBorder") != 0;
|
||||
}
|
||||
|
||||
set hasBorder(value: boolean) {
|
||||
this.setInteger("IhasBorder", +value);
|
||||
}
|
||||
|
||||
public setInverted(value: boolean): this {
|
||||
return this.setInteger("Iinverted", +value);
|
||||
}
|
||||
|
||||
get inverted(): boolean {
|
||||
return this.getInteger("Iinverted") != 0;
|
||||
}
|
||||
|
||||
set inverted(value: boolean) {
|
||||
this.setInteger("Iinverted", +value);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue