|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
An object of this class maintains a connection between a ComboBox and a plug-in parameter. More...
#include "juce_ParameterAttachments.h"
Public Member Functions | |
| ComboBoxParameterAttachment (RangedAudioParameter ¶meter, ComboBox &combo, UndoManager *undoManager=nullptr) | |
| Creates a connection between a plug-in parameter and a ComboBox. | |
| ~ComboBoxParameterAttachment () override | |
| Destructor. | |
| void | sendInitialUpdate () |
| Call this after setting up your combo box in the case where you need to do extra setup after constructing this attachment. | |
An object of this class maintains a connection between a ComboBox and a plug-in parameter.
ComboBox items will be spaced linearly across the range of the parameter. For example if the range is specified by NormalisableRange<float> (-0.5f, 0.5f, 0.5f) and you add three items then the first will be mapped to a value of -0.5, the second to 0, and the third to 0.5.
During the lifetime of this object it keeps the two things in sync, making it easy to connect a combo box to a parameter. When this object is deleted, the connection is broken. Make sure that your parameter and ComboBox are not deleted before this object!
@tags{Audio}
Definition at line 181 of file juce_ParameterAttachments.h.
| juce::ComboBoxParameterAttachment::ComboBoxParameterAttachment | ( | RangedAudioParameter & | parameter, |
| ComboBox & | combo, | ||
| UndoManager * | undoManager = nullptr |
||
| ) |
Creates a connection between a plug-in parameter and a ComboBox.
| parameter | The parameter to use |
| combo | The ComboBox to use |
| undoManager | An optional UndoManager |
Definition at line 187 of file juce_ParameterAttachments.cpp.
|
override |
Destructor.
Definition at line 198 of file juce_ParameterAttachments.cpp.
| void juce::ComboBoxParameterAttachment::sendInitialUpdate | ( | ) |
Call this after setting up your combo box in the case where you need to do extra setup after constructing this attachment.
Definition at line 203 of file juce_ParameterAttachments.cpp.