|
JUCE
|
Represents a button on a block device. More...
Classes | |
| struct | Listener |
| A listener that can be attached to a ControlButton object so that it gets called when the button is pushed or released. More... | |
Public Types | |
| enum | ButtonFunction { mode, volume, up, down, scale, chord, arp, sustain, octave, love, click, snap, back, playOrPause, record, learn, button0, button1, button2, button3, button4, button5, button6, button7 } |
| These are all known types of control buttons. More... | |
Public Member Functions | |
| ControlButton (Block &) | |
| virtual | ~ControlButton () |
| Destructor. More... | |
| virtual ButtonFunction | getType () const =0 |
| Returns the button's type. More... | |
| virtual juce::String | getName () const =0 |
| Returns the button's description. More... | |
| virtual float | getPositionX () const =0 |
| Returns the position of this button on the device, in device units. More... | |
| virtual float | getPositionY () const =0 |
| Returns the position of this button on the device, in device units. More... | |
| virtual bool | hasLight () const =0 |
| Returns true if this button has a controllable light. More... | |
| virtual bool | setLightColour (LEDColour newColour)=0 |
| If the button can light-up, this sets its colour. More... | |
| void | addListener (Listener *) |
| void | removeListener (Listener *) |
Public Attributes | |
| Block & | block |
Protected Attributes | |
| juce::ListenerList< Listener > | listeners |
Represents a button on a block device.
These are all known types of control buttons.
You can find out which buttons a device has by calling getButtons(), and can get the name of a button type with getButtonName().
| Enumerator | |
|---|---|
| mode | |
| volume | |
| up | |
| down | |
| scale | |
| chord | |
| arp | |
| sustain | |
| octave | |
| love | |
| click | |
| snap | |
| back | |
| playOrPause | |
| record | |
| learn | |
| button0 | |
| button1 | |
| button2 | |
| button3 | |
| button4 | |
| button5 | |
| button6 | |
| button7 | |
| ControlButton::ControlButton | ( | Block & | ) |
|
virtual |
Destructor.
|
pure virtual |
Returns the button's type.
|
pure virtual |
Returns the button's description.
|
pure virtual |
Returns the position of this button on the device, in device units.
For buttons that are on the side of the device, this may want to return a value that is beyond the phyiscal block size.
|
pure virtual |
Returns the position of this button on the device, in device units.
For buttons that are on the side of the device, this may want to return a value that is beyond the phyiscal block size.
|
pure virtual |
Returns true if this button has a controllable light.
|
pure virtual |
If the button can light-up, this sets its colour.
| void ControlButton::addListener | ( | Listener * | ) |
| void ControlButton::removeListener | ( | Listener * | ) |
| Block& ControlButton::block |
|
protected |