#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.


#API Overview

Functions - API calls offered directly by the extension

Constructors - API calls which return an object, typically one that offers API methods

Methods - API calls which can only be made on an object returned by a constructor


#API Documentation

#Functions

Signatureplugins.core.tangent.manager.menu.is(thing) -> boolean
TypeFunction
DescriptionChecks if the thing is a menu instance.
Parameters
  • thing - The other object to test.
Returns
  • true if it is a menu, false if not.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/menu.lua line 33

#Constructors

Signatureplugins.core.tangent.manager.menu(id[, name[, parent]]) -> menu
TypeConstructor
DescriptionCreates 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
  • the new menu.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/menu.lua line 18

#Methods

Signatureplugins.core.tangent.manager.menu:get() -> string
TypeMethod
DescriptionExecutes the get function, if present, returning the string value for the current menu.
Parameters
  • None
Returns
  • nil
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/menu.lua line 68

Signatureplugins.core.tangent.manager.menu:next() -> nil
TypeMethod
DescriptionExecutes the next function, if present.
Parameters
  • None
Returns
  • nil
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/menu.lua line 146

Signatureplugins.core.tangent.manager.menu:onGet(getFn) -> self
TypeMethod
DescriptionSets 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
  • The parameter instance.
Notes
  • --- This function should have this signature:
  • function() -> string
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/menu.lua line 46

Signatureplugins.core.tangent.manager.menu:onNext(nextFn) -> self
TypeMethod
DescriptionSets 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
  • The parameter instance.
Notes
  • This function should have this signature:
  • function() -> nil
  • It is suggested that when arriving at the end of the list of options a subsequent next call will cycle back to the beginning of the options. This is particularly useful for menus with two options.
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/menu.lua line 83

Signatureplugins.core.tangent.manager.menu:onPrev(prevFn) -> self
TypeMethod
DescriptionSets 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
  • The parameter instance.
Notes
  • This function should have this signature:
  • function() -> nil
  • It is suggested that when arriving at the start of the list of options a subsequent prev call will cycle to the end of the options. This is particularly useful for menus with two options.
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/menu.lua line 161

Signatureplugins.core.tangent.manager.menu:onReset(resetFn) -> self
TypeMethod
DescriptionSets 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
  • The parameter instance.
Notes
  • This function should have this signature:
  • function() -> nil
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/menu.lua line 107

Signatureplugins.core.tangent.manager.menu:prev() -> nil
TypeMethod
DescriptionExecutes the prev function, if present.
Parameters
  • None
Returns
  • nil
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/menu.lua line 185

Signatureplugins.core.tangent.manager.menu:reset() -> number
TypeMethod
DescriptionExecutes the reset function if present. Returns the current value of the parameter after reset.
Parameters
  • None
Returns
  • The current value, or nil if it can't be accessed.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/menu.lua line 129

Signatureplugins.core.tangent.manager.menu:update() -> nil
TypeMethod
DescriptionUpdates the Tangent panel with the current value.
Parameters
  • None
Returns
  • true if the update was sent.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/menu.lua line 200

Signatureplugins.core.tangent.manager.menu:xml() -> cp.web.xml
TypeMethod
DescriptionReturns the xml configuration for the Action.
Parameters
  • None
Returns
  • The xml for the Action.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/menu.lua line 216