TracktionEngine
Classes | Public Member Functions | List of all members
tracktion::engine::ParameterChangeHandler Class Reference

Manages a set of AutomatableParameters for an Edit and notifies controllers and registered listeners when they change. More...

Inherits juce::ChangeBroadcaster.

Classes

struct  Disabler
 Temporarily disables change events e.g. More...
 

Public Member Functions

 ParameterChangeHandler (Edit &)
 Creates a ParameterChangeHandler for a given Edit. More...
 
bool isEventPending () const noexcept
 Returns true if there is either a parameter or action waiting to be assigned. More...
 
void parameterChanged (AutomatableParameter &parameter, bool fromAutomation)
 Called by parameters when they are changed. More...
 
bool isParameterPending () const noexcept
 Returns true if there is an AutomatableParameter waiting to be assigned. More...
 
AutomatableParameter::Ptr getPendingParam (bool consumeEvent) noexcept
 Returns the parameter waiting to be assigned if there is one, otherwise a nullptr. More...
 
void actionFunctionTriggered (int externalControllerID)
 Called by the accelerators when an assignable action is called. More...
 
bool isActionFunctionPending () const noexcept
 Returns true if there is an action function waiting to be assigned. More...
 
int getPendingActionFunctionId (bool consumeEvent) noexcept
 Returns the pending action function waiting to be assigned or a nullptr if none has been. More...
 
void setParameterLearnActive (bool a)
 Set true when UI up for learning parameters. More...
 

Detailed Description

Manages a set of AutomatableParameters for an Edit and notifies controllers and registered listeners when they change.

Constructor & Destructor Documentation

◆ ParameterChangeHandler()

tracktion::engine::ParameterChangeHandler::ParameterChangeHandler ( Edit )

Creates a ParameterChangeHandler for a given Edit.

Member Function Documentation

◆ isEventPending()

bool tracktion::engine::ParameterChangeHandler::isEventPending ( ) const
noexcept

Returns true if there is either a parameter or action waiting to be assigned.

◆ parameterChanged()

void tracktion::engine::ParameterChangeHandler::parameterChanged ( AutomatableParameter parameter,
bool  fromAutomation 
)

Called by parameters when they are changed.

This is internally called by each parameter and will forward the call on to appropriate controllers and mapping sets if required.

◆ isParameterPending()

bool tracktion::engine::ParameterChangeHandler::isParameterPending ( ) const
noexcept

Returns true if there is an AutomatableParameter waiting to be assigned.

◆ getPendingParam()

AutomatableParameter::Ptr tracktion::engine::ParameterChangeHandler::getPendingParam ( bool  consumeEvent)
noexcept

Returns the parameter waiting to be assigned if there is one, otherwise a nullptr.

Note that if consumeEvent is true this will consume the pending event so can't be reused for other controllers.

◆ actionFunctionTriggered()

void tracktion::engine::ParameterChangeHandler::actionFunctionTriggered ( int  externalControllerID)

Called by the accelerators when an assignable action is called.

This gets added to the pending list which CustomControllerSurfaces can check when controllers are moved and they are in MIDI learn mode.

◆ isActionFunctionPending()

bool tracktion::engine::ParameterChangeHandler::isActionFunctionPending ( ) const
noexcept

Returns true if there is an action function waiting to be assigned.

◆ getPendingActionFunctionId()

int tracktion::engine::ParameterChangeHandler::getPendingActionFunctionId ( bool  consumeEvent)
noexcept

Returns the pending action function waiting to be assigned or a nullptr if none has been.

The object returned should be owned by the caller. Note that if consumeEvent is true this will consume the pending event so can't be reused for other controllers.

◆ setParameterLearnActive()

void tracktion::engine::ParameterChangeHandler::setParameterLearnActive ( bool  a)

Set true when UI up for learning parameters.


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