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 '@halleyfante/pix';Basic
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
label | string | '' | Name shown under the icon and in the title bar of the windows. |
Properties
| Name | Type | Description |
|---|---|---|
windows | PixWindow[] | The windows of the application that are currently open. |
Methods
| Method | Description |
|---|---|
launch(): PixWindow | Opens a new window of the application and returns it. |
activate(window: PixWindow): void | Makes a window of this application the one in use: shows it if it was minimized, places it in front of every other window and marks the others as inactive. |
Events
| Name | Description |
|---|---|
open | A new window of the application was opened. |
activate | A window of the application became the one in use. |
close | A window of the application was closed. |
minimize | A window of the application was minimized. |
maximize | A window of the application was maximized or restored to its size. |
Slots
| Name | Description |
|---|---|
icon | Picture of the application, usually a `pix-icon`. |
| default | A `template` element with the content of the window. It is copied into each new window. |