mode

Represents a Tangent Mode

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.mode.is(other) -> boolean

Type

Function

Description

Checks to see if other is a mode or not.

Parameters

Returns

Constructors

new

Signature

plugins.core.tangent.manager.mode.new(id, name)

Type

Constructor

Description

Creates a new Mode instance.

Parameters

Returns

*

Methods

activate

Signature

plugins.core.tangent.manager.mode:activate() -> nil

Type

Method

Description

Executes the activate function, if present.

Parameters

Returns

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

Returns

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

Returns

xml

Signature

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

Type

Method

Description

Returns the xml configuration for the Mode.

Parameters

Returns