Application

An application on a desktop: an icon that opens its content in a window. A click selects the icon and a double click, or the Enter key, opens the application. Every time it is opened, a new and independent window is created from the template.

Import

Importing the library registers <pix-application>.

import '@ilusiva/pix';

Basic

Attributes

NameTypeDefaultDescription
labelstring''Name shown under the icon and in the title bar of the windows.

Properties

NameTypeDescription
windowsPixWindow[]Only the windows of this application, in the order they were opened rather than the order they are stacked in, minimized ones included.

Methods

MethodDescription
launch(): PixWindowEvery call opens one more window, with its own copy of the template, puts it in use and fires the `open` event. Windows already open stay open.
activate(window: PixWindow): voidMakes a window of this application the one in use: shows it if it was minimized, places it in front of every other window, marks the others as inactive and moves the keyboard focus into it.

Events

NameDescription
openA new window of the application was opened.
activateA window of the application became the one in use. Opening a window, or activating one, moves the keyboard focus into it.
closeA window of the application was closed.
minimizeA window of the application was minimized.
maximizeA window of the application was maximized or restored to its size.

Slots

NameDescription
iconPicture of the application, usually a `pix-icon`.
defaultA `template` element with the content of the window. It is copied into each new window.