AEffGUIEditor

Up to version 2.1 :

#include <vstgui.h>

Since version 2.2 :

#include <aeffguieditor.h>

class AEffGUIEditor : public AEffEditor ;

Use this class as parent of a graphic editor instead of AEffEditor . This class includes some pre-initialization.

[plugin diagram]


AEffGUIEditor

1.0

AEffGUIEditor (AudioEffect *effect);

Example :

/ *this allows to use this pixmap
in different instances of this plugin : */
static CBitmap *background = 0;

MyEditor::ControlsguiEditor (AudioEffect *effect)
: AEffGUIEditor (effect)
{
frame = 0;

rect.left = 0;
rect.top = 0;
rect.right = kBackgroundW;
rect.bottom = kBackgroundH;

/ *we decide in this plugin to open all
bitmaps in the open function */
}

~AEffGUIEditor

1.0

virtual ~AEffGUIEditor ();


setParameter

1.0

virtual void setParameter (long index, float value);

Called from the AEffect to update the control's value.

Example :

void MyEditor::setParameter (long index,
float value)
{
// test if the plug is opened
if (!frame)
return;

switch (index)
{
case kMyTag:
if (myControl)
myControl->setValue (
effect->getParameter (index)
);
if (myDisplay)
myDisplay->setValue (
effect->getParameter (index)
);
default :
break;
}
// call this to be sure
// that the graphic will be updated
postUpdate ();
}

getRect

1.0

virtual long getRect (CRect **rect);

Gives the Rect from the plug-in which states where its window should appear, and how large it should be.


open

1.0

virtual long open (void *ptr);

Host is about to open a window for the editor.

Note :

Allways call this method from your own editor.

Example :

long MyEditor::open (void *ptr)
AEffGUIEditor::open (ptr);

/ *init the background pixmap
(a global pixmap for
all instance of this plugin) */
if (!myBackground)
myBackground = new CBitmap (
kBackgroundPixmapID
);
else
myBackground->remember ();
...
}

See also :


idle

1.0

virtual void idle ();

Example :

void MyEditor::idle ()
{
// always call this to ensure update
AEffGUIEditor::idle ();

...
}

draw

1.0

virtual void draw (ERect *rect);


wait

2.0

void wait (unsigned long ms);

Wait.

ms The number of milliseconds to wait.

getTicks

1.0

long getTicks ();

Gets the current time (in ms).


doIdleStuff

1.0

void doIdleStuff ();

Feedback to the host application and to call the idle's function of this editor (thru host application (MAC/WINDOWS/MOTIF)). The idle frequency is between 10Hz and 20Hz.


getEffect

1.0

AudioEffect *getEffect ();

Gets the audio effect attached to this editor.


getVstGuiVersion

2.0

long getVstGuiVersion ();

Gets the version of this VSTGUI.

return The major version in the most significant 16 bits, the minor version in the less significant 16 bits.

Example :

int version = getVstGuiVersion ();
int verMaj = (version & 0xFF00) >> 16;
int verMin = (version & 0x00FF);

setKnobMode

1.0

virtual long setKnobMode (int val);

Sets the knob mode.

val
kCircularMode
kRelativCircularMode
kLinearMode

getKnobMode

2.1

static long getKnobMode ();

Gets the knob mode.

return
kCircularMode
kRelativCircularMode
kLinearMode

onWheel

2.1

virtual bool onWheel (float distance);

Should be called if you want to dispatch this info.

Example :

long MyPlugEffectX::vendorSpecific (long lArg1,
long lArg2, void *ptrArg, float floatArg)
{
if (editor && lArg1 == 'stCA' && lArg2 == 'Whee')
return editor->onWheel (floatArg)
== true ? 1 : 0;
else
return AudioEffectX::vendorSpecific (
lArg1, lArg2, ptrArg, floatArg
);
}

onKeyDown

2.2

virtual long onKeyDown (VstKeyCode &keyCode);

Should be called if you want to dispatch this info.
Returns 1 if the event is caught, -1 otherwise.


onKeyUp

2.2

virtual long onKeyUp (VstKeyCode &keyCode);

Should be called if you want to dispatch this info.
Returns 1 if the event is caught, -1 otherwise.


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