Base class for things that can be assigned to external control surfaces, not plugin paramters.
More...
#include <tracktion_MidiLearn.h>
|
| MidiAssignable (Engine &) |
|
virtual | ~MidiAssignable () |
|
void | addAssignent (Assignment) |
| Adds an assignment to the list.
|
|
juce::Array< Assignment > & | getAssignments () |
| This should return any assignments that should be shown by the pop-up component.
|
|
bool | isSingleAssignment () const noexcept |
| Should return true if only one action can be assigned from this control.
|
|
void | buildMenu (juce::PopupMenu &) |
| Builds a menu of actions that can be assigned by this control.
|
|
void | handleMenuResult (int menuResult) |
| If you've shown a custom menu this will be called with the result which you should handle appropriately.
|
|
int | getFaderIndex () |
| Returns the fader index which varies depending on the track num and selected bank etc.
|
|
virtual bool | isAssignable ()=0 |
| Should return true if the control is currently assignable.
|
|
virtual juce::String | getDescription ()=0 |
| Should return a brief description such as "Track 1 Aux Send" or "Track 4 Record Arm".
|
|
virtual Track::Ptr | getControlledTrack () |
| Should return the track that this control represents or nullptr if it is track independant.
|
|
Base class for things that can be assigned to external control surfaces, not plugin paramters.
Components can check the base class methods to see if they are currently assignable as this will depend on factors such as selected track ranges etc. If they are assignable they should provide some information as to what action they will be assigned to.
◆ MidiAssignable()
tracktion::engine::MidiAssignable::MidiAssignable |
( |
Engine & |
| ) |
|
◆ ~MidiAssignable()
virtual tracktion::engine::MidiAssignable::~MidiAssignable |
( |
| ) |
|
|
virtual |
◆ addAssignent()
void tracktion::engine::MidiAssignable::addAssignent |
( |
Assignment |
| ) |
|
Adds an assignment to the list.
◆ getAssignments()
juce::Array< Assignment > & tracktion::engine::MidiAssignable::getAssignments |
( |
| ) |
|
This should return any assignments that should be shown by the pop-up component.
◆ isSingleAssignment()
bool tracktion::engine::MidiAssignable::isSingleAssignment |
( |
| ) |
const |
|
noexcept |
Should return true if only one action can be assigned from this control.
◆ buildMenu()
void tracktion::engine::MidiAssignable::buildMenu |
( |
juce::PopupMenu & |
| ) |
|
Builds a menu of actions that can be assigned by this control.
The menu IDs should be the CustomControlSurface::ActionID they represent for easy assignment triggering.
◆ handleMenuResult()
void tracktion::engine::MidiAssignable::handleMenuResult |
( |
int |
menuResult | ) |
|
If you've shown a custom menu this will be called with the result which you should handle appropriately.
This uses the result number as a CustomControlSurface action Id and adds it to the currently focused edit's change handler.
◆ getFaderIndex()
int tracktion::engine::MidiAssignable::getFaderIndex |
( |
| ) |
|
Returns the fader index which varies depending on the track num and selected bank etc.
This is added on to track specific actions automatically when they are assigned.
◆ isAssignable()
virtual bool tracktion::engine::MidiAssignable::isAssignable |
( |
| ) |
|
|
pure virtual |
Should return true if the control is currently assignable.
◆ getDescription()
virtual juce::String tracktion::engine::MidiAssignable::getDescription |
( |
| ) |
|
|
pure virtual |
Should return a brief description such as "Track 1 Aux Send" or "Track 4 Record Arm".
◆ getControlledTrack()
virtual Track::Ptr tracktion::engine::MidiAssignable::getControlledTrack |
( |
| ) |
|
|
virtual |
Should return the track that this control represents or nullptr if it is track independant.
◆ engine
Engine& tracktion::engine::MidiAssignable::engine |
The documentation for this class was generated from the following file: