pax.window

This class creates and manages “windows” for various applications, such as dialogs and draggable windows.

Author

Mikkel Bergmann, http://www.pointful.com

Summary
pax.windowThis class creates and manages “windows” for various applications, such as dialogs and draggable windows.
Properties
window.dictWindow dictionary for tracking windows
Functions
pax.window.registerPrivate method: Registers a window with the window manager
pax.window.getPrivate method: Returns a window from the window manager
pax.window.deRegisterPrivate method: Each window is removed from the manager, once it is hidden or destroyed
pax.window.hideAllHides all windows.
pax.window.addAdds a window widget, and registeres it with the window manager

Properties

window.dict

Window dictionary for tracking windows

Functions

pax.window.register

pax.window.register = function(id)

Private method: Registers a window with the window manager

Parameters

idDOM pointer to the window element

pax.window.get

pax.window.get = function(id)

Private method: Returns a window from the window manager

Parameters

idDOM pointer to the window element

pax.window.deRegister

pax.window.deRegister = function(id)

Private method: Each window is removed from the manager, once it is hidden or destroyed

Parameters

idDOM pointer to the window element

pax.window.hideAll

pax.window.hideAll = function()

Hides all windows.

Example

<span id='pax.window.hideAll.example' style='position:absolute;left:200px;top:200px;'>X</span>
[:.
    var pos = pax.util.getPosition( $('pax.window.hideAll.example') );
    pax.box.show( 'myWindow1', '^ X marks the spot!', 'hintMessage', pos.x, pos.y + pos.height + 5 );
    pax.box.show( 'myWindow2', '<- X marks the spot!', 'hintMessage', pos.x + pos.width + 5, pos.y );
    pax.box.show( 'myWindow3', 'X marks the spot! ->', 'hintMessage', pos.x - 135, pos.y );

    exampleCleanup = function() {
        alert('About to hide all windows');
        pax.window.hideAll();
        alert('All windows hidden');
    };
:]

This hides all windows in the window manager, you will note that it is run in the cleanup phase, with alerts to show you what is happening.

pax.window.add

pax.window.add = function(target,
id,
title,
content,
x,
y,
args)

Adds a window widget, and registeres it with the window manager

Example

<select>
    <option>Drag a window over this in IE!</option>
</select>
[:.
    pax.window.add( $('exampleDiv'), 'wid1', 'The window1 title', 'The content of the window', 50, 15 );
    pax.window.add( $('exampleDiv'), 'wid2', 'The window2 title', 'The content of the window', 150, 250 );
    pax.window.add( $('exampleDiv'), 'wid3', 'The window3 title', 'The content of the window', 250, 350 );
    pax.box.show( 'showBoxID', 'message', 'hintMessage', 10, 20, $('exampleDiv') );
:]
pax.window.register = function(id)
Private method: Registers a window with the window manager
pax.window.get = function(id)
Private method: Returns a window from the window manager
pax.window.deRegister = function(id)
Private method: Each window is removed from the manager, once it is hidden or destroyed
pax.window.hideAll = function()
Hides all windows.
pax.window.add = function(target,
id,
title,
content,
x,
y,
args)
Adds a window widget, and registeres it with the window manager
Close