WebLayoutWindow class | webui.t[1778]

Layout Window. This is a specialized Web Window tracker for our layout page type, which is displayed using the resource file webuires/layout.htm. This page is designed as a container of more specialized sub-window pages; its job is to divide up the window space into IFRAME elements that display the sub-windows, and to manage the geometry of the IFRAMEs.

The layout page is primarily designed to be the top-level page of the web UI. The idea is to set up a layout page as the navigation URL for the browser, so the layout page fills the browser window. You then arrange your functional windows within the layout page - a command window, a status line window, etc. This arrangement is similar to banner window in HTML TADS, but IFRAMEs are considerably more flexible; for example, they don't have to tile the main window, and you can size them in the full range of units CSS provides.

Layout windows aren't limited to the top level, though. Since you can put any HTML page within an IFRAME, you can put another layout window within an IFRAME, to further subdivide the space inside the IFRAME.

`class WebLayoutWindow : WebWindow`

Superclass Tree (in declaration order)

`WebLayoutWindow`
`WebWindow`
`WebResourceResFile`
`WebResource`
`object`

Subclass Tree

(none)

Global Objects

`webMainWin`

Summary of Properties

`frames src vpath`

Inherited from `WebWindow` :
`name pathName sthCtx`

Inherited from `WebResourceResFile` :
`binaryExts browserExtToMime`

Inherited from `WebResource` :
`group priority`

Summary of Methods

`createFrame flushWin getState winFromPath`

Inherited from `WebWindow` :
`clearWindow processName sendWinEvent sendWinEventTo write`

Inherited from `WebResourceResFile` :
`isTextFile matchRequest processRequest`

Inherited from `WebResource` :
`sendAck sendXML`

Properties

`frames` | `webui.t[1924]`

The table of active frames within this layout. This table is keyed by window name; each entry is a list of [win, pos], where 'win' is the WebWindow object for the window, and 'pos' is its position parameter.

`src` OVERRIDDEN | `webui.t[1928]`

no description available

`vpath` OVERRIDDEN | `webui.t[1927]`

my virtual path and the actual resource file location

Methods

`createFrame (win, name, pos)` | `webui.t[1873]`

Create a new window within the layout. This creates an IFRAME in the browser, laid out according to the 'pos' argument, and displays the given window object within the frame.

If the window already exists, this updates the window with the new layout settings.

'win' is a WebWindow object that will be displayed within the IFRAME. This method automatically loads the HTML resource from the WebWindow into the new IFRAME.

'name' is the name of the window. Each window within a layout must have a distinct name. This allows you to refer to the dimensions of other windows in 'pos' parameters. The name should be alphanumeric.

'pos' is the layout position for the new frame. This is a string in this format: 'left, top, width, height', where 'left' is the horizontal position of the top left corner, 'top' is the vertical position of the top left corner, 'width' is the width of the window, and 'height' is the height. Each element can be specified as a Javascript-style arithmetic expression. Within the expression, you can use a mix of any of the following:

123 - a number, representing a number of pixels on the display
5em - 5 'em' units, relative to the main BODY font in the window
5en - 5 'en' units in the main BODY font
5ex - 5 'ex' units in the main BODY font
window.width - the width in pixels of the enclosing window
window.height - the height in pixels of the enclosing window
50% - percentage of the width or height of the enclosing window
content.width - the width in pixels of the contents of the frame
content.height - the height in pixels of the contents of the frame
x.left - horizontal coordinate of leftmost edge of window 'x'
x.right - horizontal coordinate of rightmost edge of window 'x'
x.top - vertical coordinate of top edge of window 'x'
x.bottom - vertical coordinate of bottom edge of window 'x'
x.width - width in pixels of window 'x'
x.height - height in pixels of window 'x'

The "window" dimensions refer to the *enclosing* window. If this layout window is the main page of the UI, this is simply the browser window itself. For a layout window nested within another frame, this is the enclosing frame.

Percentage units apply to the enclosing window. When a percentage is used in the 'left' or 'width' slot, it applies to the width of the enclosing window; in the 'top' or 'height' slot, it applies to the height.

The "content" dimensions refer to the contents of the frame we're creating. This is the size of the contents as actually laid out in the browser.

"x.left" and so on refer to the dimensions of other frames *within this same layout window*. 'x' is the name of another window within the same layout, as specified by the 'name' argument given when the window was created.

`flushWin ( )`OVERRIDDEN | `webui.t[1894]`

Flush this window. For a layout window, we simply flush each child window.

`getState (client)`OVERRIDDEN | `webui.t[1903]`

Get the state.

`winFromPath (path)`OVERRIDDEN | `webui.t[1782]`

Resolve a window path name

TADS 3 Library Manual
Generated on 8/21/2012 from TADS version 3.1.2