Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
128 lines (109 loc) · 10.3 KB

plugins.core.tangent.manager.menu.md

File metadata and controls

128 lines (109 loc) · 10.3 KB

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.

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

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.

Constructors

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.

Methods

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
Signature plugins.core.tangent.manager.menu:next() -> nil
Type Method
Description Executes the next function, if present.
Parameters
  • None
Returns
  • nil
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.
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.
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.
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.
Signature plugins.core.tangent.manager.menu:prev() -> nil
Type Method
Description Executes the prev function, if present.
Parameters
  • None
Returns
  • nil
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.
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.
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.