menu

Last updated 9 months ago

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

is

Signature

plugins.core.tangent.manager.menu.is(other) -> boolean

Type

Function

Description

Checks if the other is a menu instance.

Parameters

Returns

Constructors

new

Signature

plugins.core.tangent.manager.menu.new(id[, name[, parent]]) -> menu

Type

Constructor

Description

Creates a new Action instance.

Parameters

Returns

Methods

controls

Signature

plugins.core.tangent.manager.menu:controls()

Type

Method

Description

Returns the controls the menu belongs to.

Parameters

Returns

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

Returns

next

Signature

plugins.core.tangent.manager.menu:next() -> nil

Type

Method

Description

Executes the next function, if present.

Parameters

Returns

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

Returns

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

Returns

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

Returns

parent

Signature

`plugins.core.tangent.manager.menu:parent() -> group

controls` </span>

Type

Method

Description

Returns the group or controls that contains this menu.

Parameters

Returns

prev

Signature

plugins.core.tangent.manager.menu:prev() -> nil

Type

Method

Description

Executes the prev function, if present.

Parameters

Returns

update

Signature

plugins.core.tangent.manager.menu:update() -> nil

Type

Method

Description

Updates the Tangent panel with the current value.

Parameters

Returns

xml

Signature

plugins.core.tangent.manager.menu:xml() -> cp.web.xml

Type

Method

Description

Returns the xml configuration for the Action.

Parameters

Returns