This class creates and manages “windows” for various applications, such as dialogs and draggable windows.
Mikkel Bergmann, http://www.pointful.com
| pax. | This class creates and manages “windows” for various applications, such as dialogs and draggable windows. |
| Properties | |
| window.dict | Window dictionary for tracking windows |
| Functions | |
| pax. | Private method: Registers a window with the window manager |
| pax. | Private method: Returns a window from the window manager |
| pax. | Private method: Each window is removed from the manager, once it is hidden or destroyed |
| pax. | Hides all windows. |
| pax. | Adds a window widget, and registeres it with the window manager |
pax.window.hideAll = function()
Hides all windows.
<span id='pax.window.hideAll.example' style='position:absolute;left:200px;top:200px;'>X</span>
[:.
var pos = pax.util.getPosition( pax.$('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 = function( target, id, title, content, x, y, args )
Adds a window widget, and registeres it with the window manager
<select>
<option>Drag a window over this in IE!</option>
</select>
[:.
pax.window.add( pax.$('exampleDiv'), 'wid1', 'The window1 title', 'The content of the window', 50, 15 );
pax.window.add( pax.$('exampleDiv'), 'wid2', 'The window2 title', 'The content of the window', 150, 250 );
pax.window.add( pax.$('exampleDiv'), 'wid3', 'The window3 title', 'The content of the window', 250, 350 );
pax.box.show( 'showBoxID', 'message', 'hintMessage', 10, 20, pax.$('exampleDiv') );
:]Private method: Registers a window with the window manager
pax.window.register = function( id )
Private method: Returns a window from the window manager
pax.window.get = function( id )
Private method: Each window is removed from the manager, once it is hidden or destroyed
pax.window.deRegister = function( id )
Hides all windows.
pax.window.hideAll = function()
Adds a window widget, and registeres it with the window manager
pax.window.add = function( target, id, title, content, x, y, args )