LPButton:
Filter:
Launchpad/Classes (extension) | Launchpad

LPButton
ExtensionExtension

a Lauchpad-GUI-Element (LPView subclass)

Description

A Lauchpad-GUI-Element (LPView subclass) which is modeled afer the Button Class.

The example creates a button at the top left corner of the launchpad.

Class Methods

.new

creates a new LPButton that needs to be initialized further for use.

Arguments:

range

A LPRange you will get from Lauchpad.

onfront

A function which will be called when the view put on the front of the Lauchpad.

onhide

A function which will be called when the view is removed from the Lauchpad.

Returns:

a LPButton

Instance Methods

.front

Puts the LPButton on the front of the Launchpad. (like open a GUI).

Arguments:

... args

arguments which will forwarded to the onfront-function.

.hide

Hides the LPButton from the Launchpad.

Arguments:

updateLEDs

if LEDs should be updated or not. To not update LEDs can make the response faster if after a close something else is opened.

... args

further arguments will forwarded to the onhide-function.

.states

The Array of LPLEDs describes the color of the different states of the LPButton.

.action

A function that is called when the Button on the Launchpad is pushed. The function gets as first argument the LPButton itself.

.mode

Instance variable that defines how a button push affects the counting through the states. The following modes can be set through by using a symbol

\forward \backward \stuck \reset

Forward counts upwards. Backward counts downwards. Stuck does not change the state. Reset sets and keeps the state at 0.