class fwt::Window

sys::Obj
  fwt::Widget
    fwt::Pane
      fwt::ContentPane
        fwt::Window

@Js
@Serializable

Source

Window is the base class for widgets which represent top level windows.

activate

Void activate()

Source

Set this Window to be the active window for the application.

alwaysOnTop

const Bool alwaysOnTop := false

Source

Force window to always be on top of the desktop. Default is false. This field cannot be changed once the window is constructed.

close

virtual Void close(Obj? result := null)

Source

Close the window.

icon

Image? icon

Source

Icon if window is a frame.

make

new make(Window? parent := null, |This|? f := null)

Source

Construct the window with an option parent window.

Menu? menuBar

Source

Child menu bar widget if top level frame.

mode

const WindowMode mode := ...

Source

Window mode defines the modal state of the window:

  • modeless: no blocking of other windows
  • windowModal: input is blocked to parent window
  • appModal: input is blocked to all other windows of application
  • sysModal: input is blocked to all windows of all applications The default is appModel for Dialogs and modeless for all other window types. This field cannot be changed once the window is constructed.
onActive

EventListeners onActive()

Source

Callback function when window becomes the active window on the desktop with focus.

Event id fired:

Event fields:

  • none
onClose

EventListeners onClose()

Source

Callback function when window is closed. Consume the event to prevent the window from closing.

Event id fired:

Event fields:

  • none
onDeiconified

EventListeners onDeiconified()

Source

Callback function when window is deiconified from the taskbar.

Event id fired:

Event fields:

  • none
onIconified

EventListeners onIconified()

Source

Callback function when window is iconified to the taskbar.

Event id fired:

Event fields:

  • none
onInactive

EventListeners onInactive()

Source

Callback function when window becomes an inactive window on the desktop and loses focus.

Event id fired:

Event fields:

  • none
onOpen

EventListeners onOpen()

Source

Callback function when window is opended.

Event id fired:

Event fields:

  • none
open

virtual Obj? open()

Source

Open the window. If this is a dialog, then return result passed to the close method (typically the Command). Return null if canceled or closed without a result.

If the windows has not had its size explicitly set, then it is packed to use its preferred size. If the position is not explicitly set, then the windows is centered over its parent window (or primary monitor if no parent).

resizable

const Bool resizable := true

Source

Can this window be resizable. Default is true. This field cannot be changed once the window is constructed.

showTrim

const Bool showTrim := true

Source

Show all normal window decorations, such as the titlebar, and frame border. If false, only the window content will be visible. Defaults to true. This field cannot be changed once the window is constructed.

title

Str title

Source

Title string if window is a frame. Defaults to "".