CControlListener

#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

virtual void valueChanged (CDrawContext *context,CControl *control);

Function called when the value of a control is changed.

Example :

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;
}
}

Copyright ©2003 Steinberg Media Technologies GmbH. All Rights Reserved.