code:windows:colordialog
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| code:windows:colordialog [2011/01/29 15:09] – created jmgr | code:windows:colordialog [2011/04/20 20:28] (current) – removed jmgr | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== ColorDialog ====== | ||
| - | This object represents a window. | ||
| - | ===== Functions ===== | ||
| - | |||
| - | ==== ColorDialog ==== | ||
| - | Constructor function. | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | var myObject = new ColorDialog(); | ||
| - | </ | ||
| - | <code javascript> | ||
| - | var myObject = new ColorDialog(parameters); | ||
| - | </ | ||
| - | |||
| - | === Arguments === | ||
| - | - parameters - (object) window parameters | ||
| - | * title - (string) the window' | ||
| - | * position - ([[code: | ||
| - | * opacity - (float) the window' | ||
| - | * enabled - (boolean) the window' | ||
| - | * visible - (boolean) the window' | ||
| - | * showAlphaChannel - (boolean) show the alpha channel | ||
| - | * color - ([[code: | ||
| - | * onClosed - ([[# | ||
| - | * onColorSelected - ([[# | ||
| - | * onColorChanged - ([[# | ||
| - | |||
| - | === Exceptions === | ||
| - | * (ParameterTypeError) incorrect parameter type | ||
| - | * (ParameterCountError) incorrect parameter count | ||
| - | |||
| - | === Example === | ||
| - | <code javascript> | ||
| - | var myObject = new ColorDialog(); | ||
| - | </ | ||
| - | <code javascript> | ||
| - | var myObject = new ColorDialog({ | ||
| - | title: "My title", | ||
| - | opacity: 0.5 | ||
| - | }); | ||
| - | </ | ||
| - | |||
| - | ===== Methods ===== | ||
| - | |||
| - | ==== setTitle ==== | ||
| - | Sets the window' | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.setTitle(title); | ||
| - | </ | ||
| - | |||
| - | === Arguments === | ||
| - | - title - (string) the window' | ||
| - | |||
| - | === Returns === | ||
| - | * (ColorDialog) this ColorDialog | ||
| - | |||
| - | ==== setPosition ==== | ||
| - | Sets the window' | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.setPosition(point); | ||
| - | </ | ||
| - | |||
| - | === Arguments === | ||
| - | - point - ([[code: | ||
| - | |||
| - | === Returns === | ||
| - | * (ColorDialog) this ColorDialog | ||
| - | |||
| - | ==== setOpacity ==== | ||
| - | Sets the window' | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.setOpacity(opacity); | ||
| - | </ | ||
| - | |||
| - | === Arguments === | ||
| - | - opacity - (float) the window' | ||
| - | |||
| - | === Returns === | ||
| - | * (ColorDialog) this ColorDialog | ||
| - | |||
| - | ==== setEnabled ==== | ||
| - | Sets the window' | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.setEnabled(enabled); | ||
| - | </ | ||
| - | |||
| - | === Arguments === | ||
| - | - enabled - (boolean) the window' | ||
| - | |||
| - | === Returns === | ||
| - | * (ColorDialog) this ColorDialog | ||
| - | |||
| - | ==== setVisible ==== | ||
| - | Sets the window' | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.setVisible(visible); | ||
| - | </ | ||
| - | |||
| - | === Arguments === | ||
| - | - visible - (boolean) the window' | ||
| - | |||
| - | === Returns === | ||
| - | * (ColorDialog) this ColorDialog | ||
| - | |||
| - | ==== close ==== | ||
| - | Closes the window. | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.close(); | ||
| - | </ | ||
| - | |||
| - | === Returns === | ||
| - | * (ColorDialog) this ColorDialog | ||
| - | |||
| - | ==== title ==== | ||
| - | Returns the window' | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.title(); | ||
| - | </ | ||
| - | |||
| - | === Returns === | ||
| - | * (string) the window' | ||
| - | |||
| - | ==== position ==== | ||
| - | Returns the window' | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.position(); | ||
| - | </ | ||
| - | |||
| - | === Returns === | ||
| - | * ([[code: | ||
| - | |||
| - | ==== opacity ==== | ||
| - | Returns the window' | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.opacity(); | ||
| - | </ | ||
| - | |||
| - | === Returns === | ||
| - | * (float) the window' | ||
| - | |||
| - | ==== enabled ==== | ||
| - | Returns the window' | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.enabled(); | ||
| - | </ | ||
| - | |||
| - | === Returns === | ||
| - | * (boolean) the window' | ||
| - | |||
| - | ==== visible ==== | ||
| - | Returns the window' | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.visible(); | ||
| - | </ | ||
| - | |||
| - | === Returns === | ||
| - | * (boolean) the window' | ||
| - | |||
| - | ==== showAlphaChannel ==== | ||
| - | Sets if the alpha channel should be visible. | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.showAlphaChannel(showAlphaChannel); | ||
| - | </ | ||
| - | |||
| - | === Arguments === | ||
| - | - showAlphaChannel - (boolean) the alpha channel visibility status | ||
| - | |||
| - | === Returns === | ||
| - | * (ColorDialog) this ColorDialog | ||
| - | |||
| - | ==== setColor ==== | ||
| - | Sets the current color. | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.setColor(color); | ||
| - | </ | ||
| - | |||
| - | === Arguments === | ||
| - | - color - ([[code: | ||
| - | |||
| - | === Returns === | ||
| - | * (ColorDialog) this ColorDialog | ||
| - | |||
| - | ==== show ==== | ||
| - | Show the window. (non-blocking) | ||
| - | Use the [[# | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.show(); | ||
| - | </ | ||
| - | |||
| - | === Returns === | ||
| - | * (ColorDialog) this ColorDialog | ||
| - | |||
| - | ==== showModal ==== | ||
| - | Show the window. (blocking) | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.showModal(); | ||
| - | </ | ||
| - | |||
| - | === Returns === | ||
| - | * (integer) the window result (0 means that it has been canceled) | ||
| - | |||
| - | ==== color ==== | ||
| - | Returns the current color. | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.color(); | ||
| - | </ | ||
| - | |||
| - | === Returns === | ||
| - | * ([[code: | ||
| - | |||
| - | ===== Events ===== | ||
| - | |||
| - | ==== onClosed ==== | ||
| - | Called when the window is closed. | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.onClosed = function(result) {}; | ||
| - | </ | ||
| - | |||
| - | === Arguments === | ||
| - | - result - (integer) the window result (0 means that it has been canceled) | ||
| - | |||
| - | === Example === | ||
| - | <code javascript> | ||
| - | myObject.onClosed = function(result) | ||
| - | { | ||
| - | if(result) | ||
| - | { | ||
| - | //Event action | ||
| - | } | ||
| - | }; | ||
| - | </ | ||
| - | |||
| - | ==== onColorSelected ==== | ||
| - | Called when a color has been selected. | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.onColorSelected = function(color) {}; | ||
| - | </ | ||
| - | |||
| - | === Arguments === | ||
| - | - color - ([[code: | ||
| - | |||
| - | === Example === | ||
| - | <code javascript> | ||
| - | myObject.onColorSelected = function(color) | ||
| - | { | ||
| - | //Event action | ||
| - | }; | ||
| - | </ | ||
| - | |||
| - | ==== onColorChanged ==== | ||
| - | Called when the current color has been changed. | ||
| - | |||
| - | === Syntax === | ||
| - | <code javascript> | ||
| - | myObject.onColorChanged = function(color) {}; | ||
| - | </ | ||
| - | |||
| - | === Arguments === | ||
| - | - color - ([[code: | ||
| - | |||
| - | === Example === | ||
| - | <code javascript> | ||
| - | myObject.onColorChanged = function(color) | ||
| - | { | ||
| - | //Event action | ||
| - | }; | ||
| - | </ | ||
| - | |||
| - | ===== Attributes ===== | ||
| - | |||
| - | ==== title ==== | ||
| - | The window' | ||
| - | |||
| - | ==== position ==== | ||
| - | The window' | ||
| - | |||
| - | ==== opacity ==== | ||
| - | The window' | ||
| - | |||
| - | ==== enabled ==== | ||
| - | The window' | ||
| - | |||
| - | ==== visible ==== | ||
| - | The window' | ||
code/windows/colordialog.1296313794.txt.gz · Last modified: (external edit)
