Window

A window with a title bar and three control buttons. Minimizing hides the window, maximizing makes it fill the screen and closing removes it from the page.

Import

Importing the library registers <pix-window>.

import '@halleyfante/pix';

Basic

Attributes

NameTypeDefaultDescription
labelstring''Text shown in the title bar.
minimizedbooleanfalseHides the window while it stays open. Remove it to show the window again.
maximizedbooleanfalseMakes the window fill the screen.
inactivebooleanfalseMarks the window as not being the one in use, which mutes its title bar.

Methods

MethodDescription
close(): voidFires the close event and removes the window from the page, unless the event is cancelled.
minimize(): voidHides the window, keeping it open, and fires the minimize event.

Events

NameDescription
minimizeThe window was minimized.
maximizeThe window was maximized or restored to its size.
closeThe window is about to be removed from the page. Cancel the event to keep it.

Style properties

NameDescription
--pix-window-inset-bottomHeight left free under a maximized window, for a taskbar.

Slots

NameDescription
defaultContent of the window.