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

Latest commit

 

History

History
72 lines (59 loc) · 5.28 KB

plugins.core.tangent.manager.mode.md

File metadata and controls

72 lines (59 loc) · 5.28 KB

docs » 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

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

Constructors

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

*

Methods

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