class Window

Extends:
ContainerComponent, UIComponent, ShapeContainer

Description:

Window UI component that extends ShapesContainer class which extends UIComponent.
For more methods for this component check ShapesContainer and UIComponent classes.D456

Constructor

constructor([text], [owner_window=null], [windowType=Window.Type.Normal])

Window component constructor.

Parameters:

Name Type Default Description

[text]

string

Text displayed in Window title bar and in task bar button.

[owner_window]

Window

null

Enables modal mode. This new Window will always be on top of the owner Window until it is closed.

[windowType]

Window.Type

Window.Type.Normal

Type of the Window.

Members

Methods

From this class:

Inherited from ContainerComponent:

Inherited from ShapeContainer:

Inherited from UIComponent:

Examples:

To create a new custom window class (recommended way for main window):

class MyWindow extends Window
{
     constructor()
     {
         super("My New Application"); //
     }
}

// appWindow1 will be accessible globally.
globalThis.appWindow1 = new MyWindow();

3 ways to create a new Window:

new Window() // without title text D789
new Window("Window Title Text") // width title text
new Window("Window Title Text", owner_window, Window.Type.Utility) // for modal window

Also See: