Mema
Memory Matrix — multi-channel audio matrix monitor and router
Loading...
Searching...
No Matches
Mema::PluginControlComponent Class Reference

#include <PluginControlComponent.h>

+ Inheritance diagram for Mema::PluginControlComponent:
+ Collaboration diagram for Mema::PluginControlComponent:

Public Member Functions

 PluginControlComponent ()
 
virtual ~PluginControlComponent ()
 
void paint (Graphics &) override
 
void resized () override
 
void lookAndFeelChanged () override
 
void resetCtrl () override
 
void setControlsSize (const ControlsSize &ctrlsSize) override
 
const std::string & getPluginName ()
 
void setPluginName (const std::string &pluginName)
 
const std::vector< Mema::PluginParameterInfo > & getParameterInfos ()
 
void setParameterInfos (const std::vector< Mema::PluginParameterInfo > &parameterInfos)
 
void setParameterValue (std::uint16_t index, std::string id, float value)
 
 PluginControlComponent ()
 
 ~PluginControlComponent ()
 
void showPluginsList (juce::Point< int > showPosition)
 
void setPluginEnabled (bool enabled=true)
 
void setPluginPrePost (bool post=false)
 
void setSelectedPlugin (const juce::PluginDescription &pluginDescription)
 
void setParameterInfos (const std::vector< PluginParameterInfo > &infos)
 
const std::map< int, Mema::PluginParameterInfo > & getParameterInfos ()
 
void showParameterConfig ()
 
void paint (Graphics &) override
 
void resized () override
 
void lookAndFeelChanged () override
 
- Public Member Functions inherited from Mema::MemaClientControlComponentBase
 MemaClientControlComponentBase ()
 
virtual ~MemaClientControlComponentBase ()
 
const ControlsSizegetControlsSize ()
 
virtual void setIOCount (const std::pair< int, int > &ioCount)
 
const std::pair< int, int > & getIOCount ()
 
virtual void setInputMuteStates (const std::map< std::uint16_t, bool > &inputMuteStates)
 
const std::map< std::uint16_t, bool > & getInputMuteStates ()
 
virtual void setOutputMuteStates (const std::map< std::uint16_t, bool > &outputMuteStates)
 
const std::map< std::uint16_t, bool > & getOutputMuteStates ()
 
virtual void setCrosspointStates (const std::map< std::uint16_t, std::map< std::uint16_t, bool > > &crosspointStates)
 
const std::map< std::uint16_t, std::map< std::uint16_t, bool > > & getCrosspointStates ()
 
virtual void setCrosspointValues (const std::map< std::uint16_t, std::map< std::uint16_t, float > > &crosspointValues)
 
const std::map< std::uint16_t, std::map< std::uint16_t, float > > & getCrosspointValues ()
 
virtual void addCrosspointStates (const std::map< std::uint16_t, std::map< std::uint16_t, bool > > &crosspointStates)
 
virtual void addCrosspointValues (const std::map< std::uint16_t, std::map< std::uint16_t, float > > &crosspointValues)
 
const juce::String getClientControlParametersAsString ()
 
const juce::String getIOCountParametersAsString ()
 
const juce::String getInputMuteParametersAsString ()
 
const juce::String getOutputMuteParametersAsString ()
 
const juce::String getCrosspointParametersAsString ()
 

Public Attributes

std::function< void(std::uint16_t, std::string, float)> onPluginParameterValueChanged
 
std::function< void(const juce::PluginDescription &)> onPluginSelected
 
std::function< void()> onShowPluginEditor
 
std::function< void(bool)> onPluginEnabledChange
 
std::function< void(bool)> onPluginPrePostChange
 
std::function< void()> onPluginParametersStatusChanged
 
std::function< void()> onClearPlugin
 
- Public Attributes inherited from Mema::MemaClientControlComponentBase
std::function< void(const std::map< std::uint16_t, bool > &)> onInputMutesChanged
 
std::function< void(const std::map< std::uint16_t, bool > &)> onOutputMutesChanged
 
std::function< void(const std::map< std::uint16_t, std::map< std::uint16_t, bool > > &)> onCrosspointStatesChanged
 
std::function< void(const std::map< std::uint16_t, std::map< std::uint16_t, float > > &)> onCrosspointValuesChanged
 

Protected Member Functions

void rebuildControls ()
 
void rebuildLayout ()
 

Additional Inherited Members

- Public Types inherited from Mema::MemaClientControlComponentBase
enum  ControlDirection {
  None = 0 ,
  Input ,
  Output
}
 Direction of a control strip within the panel layout. More...
 
enum  ControlsSize {
  S = 35 ,
  M = 50 ,
  L = 65
}
 Size category for rendered control elements. More...
 
- Static Public Attributes inherited from Mema::MemaClientControlComponentBase
static constexpr int s_gap = 3
 
static constexpr int s_scrollbarsize = 8
 
- Protected Attributes inherited from Mema::MemaClientControlComponentBase
ControlsSize m_controlsSize = ControlsSize::S
 

Detailed Description

plugin parameter control — renders sliders, combo boxes, and toggle buttons dynamically from MemaPluginParameterInfo descriptors.

plugin control — manages plugin loading, pre/post toggle, and exposes parameter controllability settings.

Definition at line 41 of file PluginControlComponent.h.

Constructor & Destructor Documentation

◆ PluginControlComponent() [1/2]

Mema::PluginControlComponent::PluginControlComponent ( )

Definition at line 30 of file PluginControlComponent.cpp.

◆ ~PluginControlComponent() [1/2]

Mema::PluginControlComponent::~PluginControlComponent ( )
virtual

Definition at line 40 of file PluginControlComponent.cpp.

◆ PluginControlComponent() [2/2]

Mema::PluginControlComponent::PluginControlComponent ( )

◆ ~PluginControlComponent() [2/2]

Mema::PluginControlComponent::~PluginControlComponent ( )

Member Function Documentation

◆ getParameterInfos() [1/2]

const std::map< int, Mema::PluginParameterInfo > & Mema::PluginControlComponent::getParameterInfos ( )

Definition at line 101 of file PluginControlComponent.cpp.

◆ getParameterInfos() [2/2]

const std::map< int, Mema::PluginParameterInfo > & Mema::PluginControlComponent::getParameterInfos ( )

◆ getPluginName()

const std::string & Mema::PluginControlComponent::getPluginName ( )

Definition at line 87 of file PluginControlComponent.cpp.

◆ lookAndFeelChanged() [1/2]

void Mema::PluginControlComponent::lookAndFeelChanged ( )
override

Definition at line 62 of file PluginControlComponent.cpp.

Referenced by rebuildControls().

◆ lookAndFeelChanged() [2/2]

void Mema::PluginControlComponent::lookAndFeelChanged ( )
override

◆ paint() [1/2]

void Mema::PluginControlComponent::paint ( Graphics &  g)
overridevirtual

Implements Mema::MemaClientControlComponentBase.

Definition at line 357 of file PluginControlComponent.cpp.

◆ paint() [2/2]

void Mema::PluginControlComponent::paint ( Graphics &  )
overridevirtual

◆ rebuildControls()

void Mema::PluginControlComponent::rebuildControls ( )
protected

Definition at line 132 of file PluginControlComponent.cpp.

References lookAndFeelChanged(), and onPluginParameterValueChanged.

Referenced by setParameterInfos().

◆ rebuildLayout()

void Mema::PluginControlComponent::rebuildLayout ( )
protected

◆ resetCtrl()

void Mema::PluginControlComponent::resetCtrl ( )
overridevirtual

◆ resized() [1/2]

void Mema::PluginControlComponent::resized ( )
overridevirtual

Implements Mema::MemaClientControlComponentBase.

Definition at line 50 of file PluginControlComponent.cpp.

References rebuildLayout().

◆ resized() [2/2]

void Mema::PluginControlComponent::resized ( )
overridevirtual

◆ setControlsSize()

void Mema::PluginControlComponent::setControlsSize ( const ControlsSize ctrlsSize)
overridevirtual

◆ setParameterInfos() [1/2]

void Mema::PluginControlComponent::setParameterInfos ( const std::vector< Mema::PluginParameterInfo > &  parameterInfos)

Definition at line 106 of file PluginControlComponent.cpp.

References rebuildControls(), and rebuildLayout().

◆ setParameterInfos() [2/2]

void Mema::PluginControlComponent::setParameterInfos ( const std::vector< PluginParameterInfo > &  infos)

◆ setParameterValue()

void Mema::PluginControlComponent::setParameterValue ( std::uint16_t  index,
std::string  id,
float  value 
)

Definition at line 116 of file PluginControlComponent.cpp.

◆ setPluginEnabled()

void Mema::PluginControlComponent::setPluginEnabled ( bool  enabled = true)

Definition at line 115 of file PluginControlComponent.cpp.

◆ setPluginName()

void Mema::PluginControlComponent::setPluginName ( const std::string &  pluginName)

Definition at line 92 of file PluginControlComponent.cpp.

◆ setPluginPrePost()

void Mema::PluginControlComponent::setPluginPrePost ( bool  post = false)

Definition at line 121 of file PluginControlComponent.cpp.

◆ setSelectedPlugin()

void Mema::PluginControlComponent::setSelectedPlugin ( const juce::PluginDescription &  pluginDescription)

Definition at line 127 of file PluginControlComponent.cpp.

◆ showParameterConfig()

void Mema::PluginControlComponent::showParameterConfig ( )

Definition at line 159 of file PluginControlComponent.cpp.

◆ showPluginsList()

void Mema::PluginControlComponent::showPluginsList ( juce::Point< int >  showPosition)

Definition at line 99 of file PluginControlComponent.cpp.

Member Data Documentation

◆ onClearPlugin

std::function<void()> Mema::PluginControlComponent::onClearPlugin

Definition at line 291 of file PluginControlComponent.h.

◆ onPluginEnabledChange

std::function<void(bool)> Mema::PluginControlComponent::onPluginEnabledChange

Definition at line 288 of file PluginControlComponent.h.

◆ onPluginParametersStatusChanged

std::function<void()> Mema::PluginControlComponent::onPluginParametersStatusChanged

Definition at line 290 of file PluginControlComponent.h.

◆ onPluginParameterValueChanged

std::function<void(std::uint16_t, std::string, float)> Mema::PluginControlComponent::onPluginParameterValueChanged

Definition at line 68 of file PluginControlComponent.h.

Referenced by rebuildControls().

◆ onPluginPrePostChange

std::function<void(bool)> Mema::PluginControlComponent::onPluginPrePostChange

Definition at line 289 of file PluginControlComponent.h.

◆ onPluginSelected

std::function<void(const juce::PluginDescription&)> Mema::PluginControlComponent::onPluginSelected

Definition at line 286 of file PluginControlComponent.h.

◆ onShowPluginEditor

std::function<void()> Mema::PluginControlComponent::onShowPluginEditor

Definition at line 287 of file PluginControlComponent.h.


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