TracktionEngine
Classes | Public Member Functions | Public Attributes | List of all members
tracktion::engine::MidiAssignable Class Referenceabstract

Base class for things that can be assigned to external control surfaces, not plugin paramters. More...

Classes

struct  Assignment
 

Public Member Functions

 MidiAssignable (Engine &)
 
virtual ~MidiAssignable ()
 
void addAssignent (Assignment)
 Adds an assignment to the list. More...
 
juce::Array< Assignment > & getAssignments ()
 This should return any assignments that should be shown by the pop-up component. More...
 
bool isSingleAssignment () const noexcept
 Should return true if only one action can be assigned from this control. More...
 
void buildMenu (juce::PopupMenu &)
 Builds a menu of actions that can be assigned by this control. More...
 
void handleMenuResult (int menuResult)
 If you've shown a custom menu this will be called with the result which you should handle appropriately. More...
 
int getFaderIndex ()
 Returns the fader index which varies depending on the track num and selected bank etc. More...
 
virtual bool isAssignable ()=0
 Should return true if the control is currently assignable. More...
 
virtual juce::String getDescription ()=0
 Should return a brief description such as "Track 1 Aux Send" or "Track 4 Record Arm". More...
 
virtual Track::Ptr getControlledTrack ()
 Should return the track that this control represents or nullptr if it is track independant. More...
 

Public Attributes

Engineengine
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MidiAssignable()

tracktion::engine::MidiAssignable::MidiAssignable ( Engine )

◆ ~MidiAssignable()

virtual tracktion::engine::MidiAssignable::~MidiAssignable ( )
virtual

Member Function Documentation

◆ 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.

Member Data Documentation

◆ engine

Engine& tracktion::engine::MidiAssignable::engine

The documentation for this class was generated from the following file: