Class Index | File Index

Classes


Class pwlib.guiColorInput

The color input GUI component.
Defined in: script.js.

Class Summary
Constructor Attributes Constructor Name and Description
<private>  
pwlib.guiColorInput(gui, input)
Field Summary
Field Attributes Field Name and Description
 
Holds the current color displayed by the input.
 
The configuration group to which this color input is attached to.
 
Reference to the configuration object which holds the color input value.
 
The configuration property to which this color input is attached to.
 
id
Color input ID.
 
The color input element DOM reference.
Method Summary
Method Attributes Method Name and Description
<private> <inner>  
The color mixer hide event handler.
<private> <inner>  
The color mixer show event handler.
<private> <inner>  
The click event handler for the color input element.
<private> <inner>  
init()
Initialize the color input functionality.
 
updateColor(color)
Update color.
Class Detail
<private> pwlib.guiColorInput(gui, input)
Parameters:
{pwlib.gui} gui
Reference to the PaintWeb GUI object.
{Element} input
Reference to the DOM input element. This can be a span, a div, or any other tag.
Field Detail
{Object} color
Holds the current color displayed by the input.

{String} configGroup
The configuration group to which this color input is attached to.

{String} configGroupRef
Reference to the configuration object which holds the color input value.

{String} configProperty
The configuration property to which this color input is attached to.

{String.} id
Color input ID. The ID is the same as the data-pwColorInput attribute value of the DOM input element .

{Element} input
The color input element DOM reference.
Method Detail
<private> <inner> colormixer_hide()
The color mixer hide event handler. This function is invoked when the color mixer is hidden.

<private> <inner> colormixer_show()
The color mixer show event handler. This function is invoked when the color mixer is shown.

<private> <inner> ev_input_click(ev)
The click event handler for the color input element. This function shows/hides the Color Mixer panel.
Parameters:
{Event} ev
The DOM Event object.

<private> <inner> init()
Initialize the color input functionality.

updateColor(color)
Update color. This method allows the change of the color values associated to the current color input.

This method is used by the color picker tool and by the global GUI configChange application event handler.

Parameters:
{Object} color
The new color values. The object must have four properties: red, green, blue and alpha. All values must be between 0 and 1.

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