ASPiK SDK
aeffguieditor.h
1 // This file is part of VSTGUI. It is subject to the license terms
2 // in the LICENSE file found in the top-level directory of this
3 // distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
4 
5 #ifndef __aeffguieditor__
6 #define __aeffguieditor__
7 
8 #ifndef __aeffeditor__
9 #include "public.sdk/source/vst2.x/aeffeditor.h"
10 #endif
11 
12 #ifndef __audioeffectx__
13 #include "public.sdk/source/vst2.x/audioeffectx.h"
14 #endif
15 
16 #include "../vstgui.h"
17 
18 //-----------------------------------------------------------------------------
19 // AEffGUIEditor Declaration
20 //-----------------------------------------------------------------------------
21 class AEffGUIEditor : public AEffEditor, public VSTGUIEditorInterface
22 {
23 public :
24 
25  AEffGUIEditor (void* pEffect);
26 
27  virtual ~AEffGUIEditor ();
28 
29  virtual void setParameter (VstInt32 index, float value) {}
30  virtual bool getRect (ERect** ppRect);
31  virtual bool open (void* ptr);
32  virtual void idle ();
33  virtual void draw (ERect* pRect);
34 
35  #if VST_2_1_EXTENSIONS
36  virtual bool onKeyDown (VstKeyCode& keyCode);
37  virtual bool onKeyUp (VstKeyCode& keyCode);
38  #endif
39 
40  // wait (in ms)
41  void wait (uint32_t ms);
42 
43  // get the current time (in ms)
44  uint32_t getTicks ();
45 
46  // feedback to appli.
47  virtual void doIdleStuff ();
48 
49  // get the effect attached to this editor
50  AudioEffect* getEffect () { return effect; }
51 
52  // get version of this VSTGUI
53  int32_t getVstGuiVersion () { return (VSTGUI_VERSION_MAJOR << 16) + VSTGUI_VERSION_MINOR; }
54 
55  // set/get the knob mode
56  virtual bool setKnobMode (int32_t val);
57  virtual int32_t getKnobMode () const { return knobMode; }
58 
59  virtual bool beforeSizeChange (const CRect& newSize, const CRect& oldSize);
60 
61  virtual bool onWheel (float distance);
62 
63 #if VST_2_1_EXTENSIONS
64  virtual void beginEdit (int32_t index) { ((AudioEffectX*)effect)->beginEdit (index); }
65  virtual void endEdit (int32_t index) { ((AudioEffectX*)effect)->endEdit (index); }
66 #endif
67 
68 //---------------------------------------
69 protected:
70  ERect rect;
71 
72 private:
73  uint32_t lLastTicks;
74  bool inIdleStuff;
75 
76  static int32_t knobMode;
77 };
78 
79 #endif
Rect structure.
Definition: crect.h:17
Definition: aeffguieditor.h:21
Definition: vstkeycode.h:12
Definition: cframe.h:229
Definition: plugguieditor.h:11
virtual bool beforeSizeChange(const CRect &newSize, const CRect &oldSize)
frame will change size, if this returns false the upstream implementation does not allow it and thus ...
Definition: aeffguieditor.cpp:204