Widget_window - gd-99/symbiogd GitHub Wiki

The widget window represents a window.

Description

jQuery $.w.window( object options )

Creates a window.

Parameters

  • object options : window's options.

Return value

A jQuery object corresponding to the created window.

Options

  • string title : the window's title
  • string|Webos.Icon icon : the window's icon
  • number width : the window's width
  • number height : the window's height
  • boolean closeable : true if the window cannot be closed by the user
  • boolean maximizable : true if the window cannot be maximizedby the user
  • boolean hideable : true if the window cannot be hidden by the user
  • boolean maximized : true if the window is maximized when opened
  • jQuery parentWindow : the parent window
  • workspace : the window's workspace
  • string stylesheet : the window's stylesheet

Methods

  • open() : open the window
  • close() : close the window
  • maximize() : maximize the window
  • minimize() : minimize the window
  • minimizeOrMaximize() : maximize/minimize the window, depending on its current status
  • hide() : hide the window
  • show() : show the window
  • hideOrShow() : hide/show the window, depending on its current status
  • toForeground() : send the window to foreground
  • toBackground() : send the window to background
  • hideOrShowOrToForeground() : hide/show/send to foreground the window, depending on its current status
  • array states() : get current window's statuses
  • is( string state ) : check if the window is in a given status
  • object dimentions() : get the window's dimentions
  • object contentDimentions() : get the window's content dimentions
  • object position() : get the window's position
  • jQuery header() : get the window's headers
  • center() : move the window in the center of the screen
  • loading( boolean value [, object options ] ) : define if the window is loading or not.

Events

  • beforeopen : before the window is opened
  • open : when the window is opened
  • afteropen : after the window is opened
  • beforeclose : before the window is closed
  • close : when the window is closed
  • afterclose : after the window is closed
  • maximize : when the window is maximized
  • resize : when the window is resized
  • minimize : when the window is maximized
  • hide : when the window is hidden
  • show : when the window is shown
  • toforeground : when the window is sent to foreground
  • tobackground : when the window is sent to background
  • loadingstart : when the window is loading
  • loadingstop : when the window is loaded
  • stylesheetload : when the window's stylesheet is loaded
  • changetitle : when the window's title is changed

Static methods

  • $.webos.window.hideAll() : hide all windows
  • $.webos.window.showAll() : show all windows
  • $.webos.window.hideOrShowAll() : hide/show all windows
  • jQuery $.webos.window.getActive() : get the currently active window
  • $.webos.window.allToBackground() : send all windows to background
  • $.webos.window.allToBackGroundExcluding( jQuery excludedWindow ) : send all windows to background, excluding the specified window
  • jQuery $.webos.window.getWindows() : get all windows
  • jQuery $.webos.window.getWindowById( number id ) : get the window with the specified id

Examples

Open a basic window

var myWindow = $.w.window({
   title: 'Test' //The window's title
});

//Window's content
var windowContent = myWindow.window('content');
windowContent.html('Hello World !');

myWindow.window('open'); //Now open the window

See also...

⚠️ **GitHub.com Fallback** ⚠️