UI. WindowManager

Window Manager.  A default instance of this class is created in UI.defaultWM.

Example

new UI.WindowManger({
  container: 'desktop',
  theme: 'mac_os_x'
});
Summary
Window Manager.
Changes window manager’s theme, all windows that don’t have a own theme will have this new theme.
Find the window containing a given element.
Returns an array of all windows handled by this window manager.
Returns the focused window

Functions

setTheme

setTheme: function(theme)

Changes window manager’s theme, all windows that don’t have a own theme will have this new theme.

Parameters

themetheme name

Example

UI.defaultWM.setTheme('bluelighting');

getWindow

getWindow: function(element)

Find the window containing a given element.

Example

$$('.ui-window a.close').invoke('observe', 'click', function() {
  UI.defaultWM.getWindow(this).close();
});

Parameters

elementelement or element identifier

Returns

containing window or null

windows

windows: function()

Returns an array of all windows handled by this window manager.  First one is the back window, last one is the front window.

Example

UI.defaultWM.windows().invoke('destroy');

getFocusedWindow

getFocusedWindow: function()

Returns the focused window

setTheme: function(theme)
Changes window manager’s theme, all windows that don’t have a own theme will have this new theme.
getWindow: function(element)
Find the window containing a given element.
windows: function()
Returns an array of all windows handled by this window manager.
getFocusedWindow: function()
Returns the focused window