Class Index | File Index

Classes


Class pwlib.guiFloatingPanel

A floating panel GUI element.
Defined in: script.js.

Class Summary
Constructor Attributes Constructor Name and Description
<private>  
pwlib.guiFloatingPanel(gui, container)
Field Summary
Field Attributes Field Name and Description
 
Reference to the floating panel element.
 
The panel content element.
 
Custom application events interface.
 
id
Floating panel ID.
 
Tells the state of the floating panel: hidden/minimized/visible or if it's being dragged.
<constant>  
Panel state: the user is dragging the floating panel.
<constant>  
Panel state: hidden.
<constant>  
Panel state: minimized.
<constant>  
Panel state: visible.
 
The viewport element.
Method Summary
Method Attributes Method Name and Description
 
Bring the panel to the top.
<private> <inner>  
The click event handler for the panel Close button element.
<private> <inner>  
The click event handler for the panel Minimize button element.
<private> <inner>  
The mousedown event handler.
<private> <inner>  
The mousemove event handler.
<private> <inner>  
The mouseup event handler.
 
hide()
Hide the panel.
<private> <inner>  
init()
Initialize the floating panel.
 
show()
Show the panel.
 
Toggle the panel visibility.
Class Detail
<private> pwlib.guiFloatingPanel(gui, container)
Parameters:
{pwlib.gui} gui
Reference to the PaintWeb GUI object.
{Element} container
Reference to the DOM element you want to transform into a floating panel.
Field Detail
{Element} container
Reference to the floating panel element.

{Element} content
The panel content element.

{pwlib.appEvents} events
Custom application events interface.

{String} id
Floating panel ID. This is the ID used in the data-pwFloatingPanel element attribute.

{Number} state
Tells the state of the floating panel: hidden/minimized/visible or if it's being dragged.

<constant> STATE_DRAGGING
Panel state: the user is dragging the floating panel.

<constant> STATE_HIDDEN
Panel state: hidden.

<constant> STATE_MINIMIZED
Panel state: minimized.

<constant> STATE_VISIBLE
Panel state: visible.

{Element} viewport
The viewport element. This element is the first parent element which has the style.overflow set to "auto" or "scroll".
Method Detail
bringOnTop()
Bring the panel to the top. This method makes sure the current floating panel is visible.

<private> <inner> ev_close(ev)
The click event handler for the panel Close button element. This hides the floating panel.

This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.

Parameters:
{Event} ev
The DOM Event object.

<private> <inner> ev_minimize(ev)
The click event handler for the panel Minimize button element.

This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.

Parameters:
{Event} ev
The DOM Event object.

<private> <inner> ev_mousedown(ev)
The mousedown event handler. This is invoked when you start dragging the floating panel.

This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.

Parameters:
{Event} ev
The DOM Event object.

<private> <inner> ev_mousemove(ev)
The mousemove event handler. This performs the actual move of the floating panel.
Parameters:
{Event} ev
The DOM Event object.

<private> <inner> ev_mouseup(ev)
The mouseup event handler. This ends the panel drag operation.

This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.

Parameters:
{Event} ev
The DOM Event object.

hide()
Hide the panel.

This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.


<private> <inner> init()
Initialize the floating panel.

show()
Show the panel.

This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.


toggle()
Toggle the panel visibility.

This method dispatches the pwlib.appEvent.guiFloatingPanelStateChange application event.


Documentation generated by JsDoc Toolkit 2.3.0 on Sat Jun 26 2010 21:57:02 GMT+0300 (EEST)