A base class for all control Components that can be controlled by a MacroControlBroadcaster.
More...
|
void | enableMacroControlledComponent (bool shouldBeEnabled) noexcept |
| Since the original setEnabled() is overwritten in the updateValue, use this method instead to enable / disable MacroControlledComponents. More...
|
|
const String | getName () const noexcept |
| returns the name. More...
|
|
virtual NormalisableRange< double > | getRange () const =0 |
| overwrite this method and return the range that the parameter can have. More...
|
|
| MacroControlledObject () |
| Creates a new MacroControlledObject. More...
|
|
virtual void | setup (Processor *p, int parameter_, const String &name_) |
| Initializes the control element. More...
|
|
virtual void | updateValue (NotificationType sendAttributeChange=sendNotification)=0 |
| overwrite this method and update the element to display the current value of the controlled attribute. More...
|
|
A base class for all control Components that can be controlled by a MacroControlBroadcaster.
Subclass your component from this class, and set the Processor's Attribute in its specified callback.
checks if the macro learn mode is active.
If it is active, it adds this control to the macro and returns true. You can use this in the element's callback like:
if(!checkLearnMode())
{
getProcessor()->setAttribute(parameter, value, dontSendNotification);
}
void enableMacroControlledComponent |
( |
bool |
shouldBeEnabled | ) |
|
|
inlinenoexcept |
Since the original setEnabled() is overwritten in the updateValue, use this method instead to enable / disable MacroControlledComponents.
const String getName |
( |
void |
| ) |
const |
|
inlinenoexcept |
virtual NormalisableRange<double> getRange |
( |
| ) |
const |
|
pure virtual |
overwrite this method and return the range that the parameter can have.
virtual void setup |
( |
Processor * |
p, |
|
|
int |
parameter_, |
|
|
const String & |
name_ |
|
) |
| |
|
inlinevirtual |
Initializes the control element.
It connects to a Processor's parameter and automatically updates its value and changes the attribute.
- Parameters
-
p | the Processor that is controlled by the element. |
parameter_ | the parameter that is controlled by the element |
name_ | the name of the element. This will also be the displayed name in the macro control panel. |
virtual void updateValue |
( |
NotificationType |
sendAttributeChange = sendNotification | ) |
|
|
pure virtual |
overwrite this method and update the element to display the current value of the controlled attribute.