TracktionEngine
Loading...
Searching...
No Matches
engine::ParameterChangeHandler Class Reference

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

#include <tracktion_ParameterChangeHandler.h>

Inherits juce::ChangeBroadcaster.

Classes

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

Public Member Functions

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

Detailed Description

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

Constructor & Destructor Documentation

◆ ParameterChangeHandler()

engine::ParameterChangeHandler::ParameterChangeHandler ( Edit & )

Member Function Documentation

◆ addListener()

void engine::ParameterChangeHandler::addListener ( Listener & )

◆ removeListener()

void engine::ParameterChangeHandler::removeListener ( Listener & )

◆ isEventPending()

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

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

◆ parameterChanged()

void 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 engine::ParameterChangeHandler::isParameterPending ( ) const
noexcept

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

◆ getPendingParam()

AutomatableParameter::Ptr 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.

References getPendingParam().

Referenced by getPendingParam().

◆ actionFunctionTriggered()

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

References actionFunctionTriggered().

Referenced by actionFunctionTriggered().

◆ isActionFunctionPending()

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

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

References isActionFunctionPending().

Referenced by isActionFunctionPending().

◆ getPendingActionFunctionId()

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

References getPendingActionFunctionId().

Referenced by getPendingActionFunctionId().

◆ setParameterLearnActive()

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

Set true when UI up for learning parameters.

References setParameterLearnActive().

Referenced by setParameterLearnActive().


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