docs » plugins.core.tangent.manager.menu
Represents a Tangent Menu. Menus are controls that have a fixed set of
non-numerical values. This could be as simple as "On" and "Off", or a long
list of options.
- Functions - API calls offered directly by the extension
- is
- Constructors - API calls which return an object, typically one that offers API methods
- menu
- Methods - API calls which can only be made on an object returned by a constructor
- get
- next
- onGet
- onNext
- onPrev
- onReset
- prev
- reset
- update
- xml
Signature |
plugins.core.tangent.manager.menu.is(thing) -> boolean |
Type |
Function |
Description |
Checks if the thing is a menu instance. |
Parameters |
- thing - The other object to test.
|
Returns |
true if it is a menu , false if not.
|
Signature |
plugins.core.tangent.manager.menu(id[, name[, parent]]) -> menu |
Type |
Constructor |
Description |
Creates a new Action instance. |
Parameters |
- id - The ID number of the menu.
- name - The name of the menu.
- parent - The parent of the menu.
|
Returns |
|
Signature |
plugins.core.tangent.manager.menu:get() -> string |
Type |
Method |
Description |
Executes the get function, if present, returning the string value for the current menu. |
Parameters |
|
Returns |
|
Signature |
plugins.core.tangent.manager.menu:next() -> nil |
Type |
Method |
Description |
Executes the next function, if present. |
Parameters |
|
Returns |
|
Signature |
plugins.core.tangent.manager.menu:onGet(getFn) -> self |
Type |
Method |
Description |
Sets the function that will be called when the Tangent sends a menu string request . |
Parameters |
- getFn - The function to call when the Tangent requests the
menu string .
|
Returns |
|
Signature |
plugins.core.tangent.manager.menu:onNext(nextFn) -> self |
Type |
Method |
Description |
Sets the function that will be called when the Tangent sends a menu change +1 request. |
Parameters |
- nextFn - The function to call when the Tangent requests the
menu change +1 .
|
Returns |
|
Signature |
plugins.core.tangent.manager.menu:onPrev(prevFn) -> self |
Type |
Method |
Description |
Sets the function that will be called when the Tangent sends a menu change -1 request. |
Parameters |
- prevFn - The function to call when the Tangent requests the
menu change -1 .
|
Returns |
|
Signature |
plugins.core.tangent.manager.menu:onReset(resetFn) -> self |
Type |
Method |
Description |
Sets the function that will be called when the Tangent sends a 'parameter reset' request. |
Parameters |
- resetFn - The function to call when the Tangent requests the parameter reset.
|
Returns |
|
Signature |
plugins.core.tangent.manager.menu:prev() -> nil |
Type |
Method |
Description |
Executes the prev function, if present. |
Parameters |
|
Returns |
|
Signature |
plugins.core.tangent.manager.menu:reset() -> number |
Type |
Method |
Description |
Executes the reset function if present. Returns the current value of the parameter after reset. |
Parameters |
|
Returns |
- The current value, or
nil if it can't be accessed.
|
Signature |
plugins.core.tangent.manager.menu:update() -> nil |
Type |
Method |
Description |
Updates the Tangent panel with the current value. |
Parameters |
|
Returns |
true if the update was sent.
|
Signature |
plugins.core.tangent.manager.menu:xml() -> cp.web.xml |
Type |
Method |
Description |
Returns the xml configuration for the Action. |
Parameters |
|
Returns |
|