Fan

 

class

fwt::Window

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

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

Slots

alwaysOnTopSource

const Bool alwaysOnTop := false

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

closeSource

virtual native Void close(Obj? result := null)

Close the window.

iconSource

native Image? icon

Icon if window is a frame.

makeSource

new make(Window? parent := null)

Construct the window with an option parent window.

Menu? menuBar

Child menu bar widget if top level frame.

modeSource

const WindowMode mode := ...

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.
onActiveSource

readonly EventListeners onActive := EventListeners.()

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

Event id fired:

Event fields:

  • none
onCloseSource

readonly EventListeners onClose := EventListeners.()

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

Event id fired:

Event fields:

  • none
onDeiconifiedSource

readonly EventListeners onDeiconified := EventListeners.()

Callback function when window is deiconified from the taskbar.

Event id fired:

Event fields:

  • none
onIconifiedSource

readonly EventListeners onIconified := EventListeners.()

Callback function when window is iconified to the taskbar.

Event id fired:

Event fields:

  • none
onInactiveSource

readonly EventListeners onInactive := EventListeners.()

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

Event id fired:

Event fields:

  • none
openSource

virtual native Obj? open()

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).

resizableSource

const Bool resizable := true

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

titleSource

native Str title

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