# plugins.core.tangent.manager.mode

Represents a Tangent Mode


# API Overview

Functions - API calls offered directly by the extension

  • is

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

  • mode

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

  • activate
  • onActivate
  • onDeactivate
  • xml

# API Documentation

# Functions

# is

Signature plugins.core.tangent.manager.mode.is(thing) -> boolean
Type Function
Description Checks to see if thing is a mode or not.
Parameters
  • thing - The item to check
Returns
  • true if is a mode otherwise false
Notes None
Examples None
Source src/plugins/core/tangent/manager/mode.lua line 32

# Constructors

# mode

Signature plugins.core.tangent.manager.mode(id, name)
Type Constructor
Description Creates a new Mode instance.
Parameters
  • id - The ID number of the mode.
  • name - The name of the mode.
Returns
  • *
Notes None
Examples None
Source src/plugins/core/tangent/manager/mode.lua line 16

# Methods

# activate

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

# onActivate

Signature plugins.core.tangent.manager.mode:onActivate(activateFn) -> self
Type Method
Description Sets the function that will be called when the Tangent sends a 'mode change' request.
Parameters
  • activateFn - The function to call when the Tangent requests the mode change.
Returns
  • The parameter instance.
Notes
  • This function should have this signature:
  • lua</li><li>function() -> nil</li><li>
Examples None
Source src/plugins/core/tangent/manager/mode.lua line 45

# onDeactivate

Signature plugins.core.tangent.manager.mode:onDeactivate(deactivateFn) -> self
Type Method
Description Sets the function that will be called when the Tangent sends a 'mode change' request and switche to a different mode.
Parameters
  • deactivateFn - The function to call when the Tangent requests the mode change.
Returns
  • The parameter instance.
Notes
  • This function should have this signature:
  • function() -> nil
Examples None
Source src/plugins/core/tangent/manager/mode.lua line 82

# xml

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