268 lines
6.3 KiB
TypeScript
268 lines
6.3 KiB
TypeScript
import { BaseWidget } from "./milsko";
|
|
import type { Pixmap } from "./types";
|
|
|
|
export class Widget extends BaseWidget {
|
|
public setX(value: number): this {
|
|
return this.setInteger("Ix", value);
|
|
}
|
|
|
|
get x(): number {
|
|
return this.getInteger("Ix");
|
|
}
|
|
|
|
set x(value: number) {
|
|
this.setInteger("Ix", value);
|
|
}
|
|
|
|
public setY(value: number): this {
|
|
return this.setInteger("Iy", value);
|
|
}
|
|
|
|
get y(): number {
|
|
return this.getInteger("Iy");
|
|
}
|
|
|
|
set y(value: number) {
|
|
this.setInteger("Iy", value);
|
|
}
|
|
|
|
public setWidth(value: number): this {
|
|
return this.setInteger("Iwidth", value);
|
|
}
|
|
|
|
get width(): number {
|
|
return this.getInteger("Iwidth");
|
|
}
|
|
|
|
set width(value: number) {
|
|
this.setInteger("Iwidth", value);
|
|
}
|
|
|
|
public setHeight(value: number): this {
|
|
return this.setInteger("Iheight", value);
|
|
}
|
|
|
|
get height(): number {
|
|
return this.getInteger("Iheight");
|
|
}
|
|
|
|
set height(value: number) {
|
|
this.setInteger("Iheight", value);
|
|
}
|
|
|
|
public setModernLook(value: boolean): this {
|
|
return this.setInteger("ImodernLook", +value);
|
|
}
|
|
|
|
get modernLook(): boolean {
|
|
return this.getInteger("ImodernLook") != 0;
|
|
}
|
|
|
|
set modernLook(value: boolean) {
|
|
this.setInteger("ImodernLook", +value);
|
|
}
|
|
|
|
public setBorderWidth(value: number): this {
|
|
return this.setInteger("IborderWidth", value);
|
|
}
|
|
|
|
get borderWidth(): number {
|
|
return this.getInteger("IborderWidth");
|
|
}
|
|
|
|
set borderWidth(value: number) {
|
|
this.setInteger("IborderWidth", value);
|
|
}
|
|
|
|
public setRatio(value: number): this {
|
|
return this.setInteger("Iratio", value);
|
|
}
|
|
|
|
get ratio(): number {
|
|
return this.getInteger("Iratio");
|
|
}
|
|
|
|
set ratio(value: number) {
|
|
this.setInteger("Iratio", value);
|
|
}
|
|
|
|
public setFixedSize(value: number): this {
|
|
return this.setInteger("IfixedSize", value);
|
|
}
|
|
|
|
get fixedSize(): number {
|
|
return this.getInteger("IfixedSize");
|
|
}
|
|
|
|
set fixedSize(value: number) {
|
|
this.setInteger("IfixedSize", value);
|
|
}
|
|
|
|
public setBitmapFont(value: boolean): this {
|
|
return this.setInteger("IbitmapFont", +value);
|
|
}
|
|
|
|
get bitmapFont(): boolean {
|
|
return this.getInteger("IbitmapFont") != 0;
|
|
}
|
|
|
|
set bitmapFont(value: boolean) {
|
|
this.setInteger("IbitmapFont", +value);
|
|
}
|
|
|
|
public setForceInverted(value: boolean): this {
|
|
return this.setInteger("IforceInverted", +value);
|
|
}
|
|
|
|
get forceInverted(): boolean {
|
|
return this.getInteger("IforceInverted") != 0;
|
|
}
|
|
|
|
set forceInverted(value: boolean) {
|
|
this.setInteger("IforceInverted", +value);
|
|
}
|
|
|
|
public setIsRounded(value: boolean): this {
|
|
return this.setInteger("IisRounded", +value);
|
|
}
|
|
|
|
get isRounded(): boolean {
|
|
return this.getInteger("IisRounded") != 0;
|
|
}
|
|
|
|
set isRounded(value: boolean) {
|
|
this.setInteger("IisRounded", +value);
|
|
}
|
|
|
|
public setDarkTheme(value: boolean): this {
|
|
return this.setInteger("IdarkTheme", +value);
|
|
}
|
|
|
|
get darkTheme(): boolean {
|
|
return this.getInteger("IdarkTheme") != 0;
|
|
}
|
|
|
|
set darkTheme(value: boolean) {
|
|
this.setInteger("IdarkTheme", +value);
|
|
}
|
|
|
|
public setUseMonospace(value: boolean): this {
|
|
return this.setInteger("IuseMonospace", +value);
|
|
}
|
|
|
|
get useMonospace(): boolean {
|
|
return this.getInteger("IuseMonospace") != 0;
|
|
}
|
|
|
|
set useMonospace(value: boolean) {
|
|
this.setInteger("IuseMonospace", +value);
|
|
}
|
|
|
|
public setDarkThemeAutomatic(value: boolean): this {
|
|
return this.setInteger("IdarkThemeAutomatic", +value);
|
|
}
|
|
|
|
get darkThemeAutomatic(): boolean {
|
|
return this.getInteger("IdarkThemeAutomatic") != 0;
|
|
}
|
|
|
|
set darkThemeAutomatic(value: boolean) {
|
|
this.setInteger("IdarkThemeAutomatic", +value);
|
|
}
|
|
|
|
public setWaitMS(value: number): this {
|
|
return this.setInteger("IwaitMS", value);
|
|
}
|
|
|
|
get waitMS(): number {
|
|
return this.getInteger("IwaitMS");
|
|
}
|
|
|
|
set waitMS(value: number) {
|
|
this.setInteger("IwaitMS", value);
|
|
}
|
|
|
|
public setBackground(value: string): this {
|
|
return this.setString("Sbackground", value);
|
|
}
|
|
|
|
get background(): string {
|
|
return this.getString("Sbackground");
|
|
}
|
|
|
|
set background(value: string) {
|
|
this.setString("Sbackground", value);
|
|
}
|
|
|
|
public setSubBackground(value: string): this {
|
|
return this.setString("SsubBackground", value);
|
|
}
|
|
|
|
get subBackground(): string {
|
|
return this.getString("SsubBackground");
|
|
}
|
|
|
|
set subBackground(value: string) {
|
|
this.setString("SsubBackground", value);
|
|
}
|
|
|
|
public setTitleBackground(value: string): this {
|
|
return this.setString("StitleBackground", value);
|
|
}
|
|
|
|
get titleBackground(): string {
|
|
return this.getString("StitleBackground");
|
|
}
|
|
|
|
set titleBackground(value: string) {
|
|
this.setString("StitleBackground", value);
|
|
}
|
|
|
|
public setForeground(value: string): this {
|
|
return this.setString("Sforeground", value);
|
|
}
|
|
|
|
get foreground(): string {
|
|
return this.getString("Sforeground");
|
|
}
|
|
|
|
set foreground(value: string) {
|
|
this.setString("Sforeground", value);
|
|
}
|
|
|
|
public setSubForeground(value: string): this {
|
|
return this.setString("SsubForeground", value);
|
|
}
|
|
|
|
get subForeground(): string {
|
|
return this.getString("SsubForeground");
|
|
}
|
|
|
|
set subForeground(value: string) {
|
|
this.setString("SsubForeground", value);
|
|
}
|
|
|
|
public setTitleForeground(value: string): this {
|
|
return this.setString("StitleForeground", value);
|
|
}
|
|
|
|
get titleForeground(): string {
|
|
return this.getString("StitleForeground");
|
|
}
|
|
|
|
set titleForeground(value: string) {
|
|
this.setString("StitleForeground", value);
|
|
}
|
|
|
|
public setBackgroundPixmap(value: Pixmap): this {
|
|
return this.setVoid("VbackgroundPixmap", value);
|
|
}
|
|
|
|
get backgroundPixmap(): Pixmap {
|
|
return this.getVoid("VbackgroundPixmap") as Pixmap;
|
|
}
|
|
|
|
set backgroundPixmap(value: Pixmap) {
|
|
this.setVoid("VbackgroundPixmap", value);
|
|
}
|
|
}
|