# 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

  • 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

# API Documentation

# Functions

# is

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.
Notes None
Examples None
Source src/plugins/core/tangent/manager/menu.lua line 33

# Constructors

# menu

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
  • the new menu.
Notes None
Examples None
Source src/plugins/core/tangent/manager/menu.lua line 18

# Methods

# get

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
  • None
Returns
  • nil
Notes None
Examples None
Source src/plugins/core/tangent/manager/menu.lua line 68

# next

Signature plugins.core.tangent.manager.menu:next() -> nil
Type Method
Description Executes the next function, if present.
Parameters
  • None
Returns
  • nil
Notes None
Examples None
Source src/plugins/core/tangent/manager/menu.lua line 146

# onGet

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
  • The parameter instance.
Notes
  • --- This function should have this signature:
  • function() -> string
Examples None
Source src/plugins/core/tangent/manager/menu.lua line 46

# onNext

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
  • 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.
Examples None
Source src/plugins/core/tangent/manager/menu.lua line 83

# onPrev

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
  • 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.
Examples None
Source src/plugins/core/tangent/manager/menu.lua line 161

# onReset

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
  • The parameter instance.
Notes
  • This function should have this signature:
  • function() -> nil
Examples None
Source src/plugins/core/tangent/manager/menu.lua line 107

# prev

Signature plugins.core.tangent.manager.menu:prev() -> nil
Type Method
Description Executes the prev function, if present.
Parameters
  • None
Returns
  • nil
Notes None
Examples None
Source src/plugins/core/tangent/manager/menu.lua line 185

# reset

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
  • None
Returns
  • The current value, or nil if it can't be accessed.
Notes None
Examples None
Source src/plugins/core/tangent/manager/menu.lua line 129

# update

Signature plugins.core.tangent.manager.menu:update() -> nil
Type Method
Description Updates the Tangent panel with the current value.
Parameters
  • None
Returns
  • true if the update was sent.
Notes None
Examples None
Source src/plugins/core/tangent/manager/menu.lua line 200

# xml

Signature plugins.core.tangent.manager.menu:xml() -> cp.web.xml
Type Method
Description Returns the xml configuration for the Action.
Parameters
  • None
Returns
  • The xml for the Action.
Notes None
Examples None
Source src/plugins/core/tangent/manager/menu.lua line 216