#include <vstcontrols.h>
class CControlListener;
This is a virtual class used to create concrete class which encapsulates the callback function (called when the value of a control object changes).
valueChanged |
1.0 |
Function called when the value of a control is changed.
class MyGUIEditor : public AEffGUIEditor,
public CControlListener
{
public :
....
protected:
virtual void update ();
private :
void valueChanged (CDrawContext *context,
Control *control);
};
MyGUIEditor::valueChanged (CDrawContext *context,
CControl *control) {
int tag = control->getTag ();
float value = control->getValue ();
switch (tag) {
case kMyTag :
effect->setParameterAutomated (tag, value);
myControl->update (context);
break;
}
}