martin@0
|
1 //-----------------------------------------------------------------------------
|
martin@0
|
2 // VSTGUI: Graphical User Interface Framework for VST plugins :
|
martin@0
|
3 //
|
martin@0
|
4 // Version 3.5
|
martin@0
|
5 //
|
martin@0
|
6 //-----------------------------------------------------------------------------
|
martin@0
|
7 // VSTGUI LICENSE
|
martin@0
|
8 // © 2008, Steinberg Media Technologies, All Rights Reserved
|
martin@0
|
9 //-----------------------------------------------------------------------------
|
martin@0
|
10 // Redistribution and use in source and binary forms, with or without modification,
|
martin@0
|
11 // are permitted provided that the following conditions are met:
|
martin@0
|
12 //
|
martin@0
|
13 // * Redistributions of source code must retain the above copyright notice,
|
martin@0
|
14 // this list of conditions and the following disclaimer.
|
martin@0
|
15 // * Redistributions in binary form must reproduce the above copyright notice,
|
martin@0
|
16 // this list of conditions and the following disclaimer in the documentation
|
martin@0
|
17 // and/or other materials provided with the distribution.
|
martin@0
|
18 // * Neither the name of the Steinberg Media Technologies nor the names of its
|
martin@0
|
19 // contributors may be used to endorse or promote products derived from this
|
martin@0
|
20 // software without specific prior written permission.
|
martin@0
|
21 //
|
martin@0
|
22 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
martin@0
|
23 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
martin@0
|
24 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
martin@0
|
25 // IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
martin@0
|
26 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
martin@0
|
27 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
martin@0
|
28 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
martin@0
|
29 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
martin@0
|
30 // OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
martin@0
|
31 // OF THE POSSIBILITY OF SUCH DAMAGE.
|
martin@0
|
32 //-----------------------------------------------------------------------------
|
martin@0
|
33
|
martin@0
|
34 #ifndef __MyEditor__
|
martin@0
|
35 #define __MyEditor__
|
martin@0
|
36
|
martin@0
|
37 #include "aeffguieditor.h"
|
martin@0
|
38 #include <vstgui.h>
|
martin@0
|
39 #include "SoundField.h"
|
martin@0
|
40 //#include <stream.h>
|
martin@0
|
41 //#include <stdio.h>
|
martin@0
|
42 #include "SoundFieldParameters.h"
|
martin@0
|
43 #include "MyPlot.h"
|
martin@0
|
44
|
martin@0
|
45
|
martin@0
|
46 class MyEditor : public AEffGUIEditor, public CControlListener
|
martin@0
|
47 {
|
martin@0
|
48 public:
|
martin@0
|
49 MyEditor (void*);
|
martin@0
|
50
|
martin@0
|
51 // from AEffGUIEditor
|
martin@0
|
52 bool open (void* ptr);
|
martin@0
|
53 void close ();
|
martin@0
|
54 void setParameter (VstInt32 index, float value);
|
martin@0
|
55 void setParameterAutomated();
|
martin@0
|
56 void getParameterDisplay (VstInt32 index, char *text);
|
martin@0
|
57
|
martin@0
|
58 // from CControlListener
|
martin@0
|
59 void valueChanged (CControl* pControl);
|
martin@0
|
60
|
martin@0
|
61
|
martin@0
|
62
|
martin@0
|
63 CControl* controls[kNumParameters];
|
martin@0
|
64 char displayText;
|
martin@0
|
65
|
martin@0
|
66 CTextLabel* paramMode;
|
martin@0
|
67 CTextLabel* paramModeSelect;
|
martin@0
|
68 CTextLabel* paramWidth;
|
martin@0
|
69 CTextLabel* paramPattern;
|
martin@0
|
70 CTextLabel* paramRotate;
|
martin@0
|
71 CTextLabel* paramTilt;
|
martin@0
|
72 CTextLabel* paramTumble;
|
martin@0
|
73 CTextLabel* paramZoom;
|
martin@0
|
74 CTextLabel* paramZoomMethod;
|
martin@0
|
75 CTextLabel* paramRearVerb;
|
martin@0
|
76 CTextLabel* paramHiVerb;
|
martin@0
|
77 CTextLabel* paramModeStereo;
|
martin@0
|
78
|
martin@0
|
79
|
martin@0
|
80 //CDrawContext* stereoPlotDraw;
|
martin@0
|
81
|
martin@0
|
82 MyPlot *PolarPlot;
|
martin@0
|
83
|
martin@0
|
84
|
martin@0
|
85 // own function
|
martin@0
|
86 void transformsDisplay(int &transformsHoz, int &transformsEl, int &transformsSep, CFrame* newFrame);
|
martin@0
|
87 void zoomDisplay(int &zoomHoz, int &zoomEl, int &zoomSep, CFrame* newFrame);
|
martin@0
|
88 void stereoDisplay(int &stereoHoz, int &stereoEl, int &stereoSep, CFrame* newFrame);
|
martin@0
|
89 void nameDisplay(int &nameHoz, int &nameEl, int &nameSep, CFrame* newFrame);
|
martin@0
|
90 void stereoPlot(int &plotHoz, int &plotEl);
|
martin@0
|
91 void suspendDisplay();
|
martin@0
|
92 void resumeDisplay();
|
martin@0
|
93
|
martin@0
|
94
|
martin@0
|
95 protected:
|
martin@0
|
96 int textDepth, textDepthLarge, labelOffset, displayOffset;
|
martin@0
|
97
|
martin@0
|
98 CAnimKnob *knobRotate;
|
martin@0
|
99 CAnimKnob *knobTilt;
|
martin@0
|
100 CAnimKnob *knobTumble;
|
martin@0
|
101 CHorizontalSwitch *knobZoomMethod;
|
martin@0
|
102 CAnimKnob *knobZoom;
|
martin@0
|
103 CAnimKnob *knobWidth;
|
martin@0
|
104 CAnimKnob *knobPattern;
|
martin@0
|
105 CHorizontalSwitch *knobMode;
|
martin@0
|
106 CAnimKnob *knobRearVerb;
|
martin@0
|
107 CAnimKnob *knobHiVerb;
|
martin@0
|
108
|
martin@0
|
109 CRect frameSize;
|
martin@0
|
110 CRect DisplaySize;
|
martin@0
|
111 CRect LabelSize;
|
martin@0
|
112 CRect r;
|
martin@0
|
113
|
martin@0
|
114 CColor kDisplayText;
|
martin@0
|
115 CColor kDisplayBackground;
|
martin@0
|
116 CColor kLabelText;
|
martin@0
|
117 CColor kBlank;
|
martin@0
|
118
|
martin@0
|
119
|
martin@0
|
120 CBitmap* knob_360;
|
martin@0
|
121 CBitmap* knob_red;
|
martin@0
|
122 CBitmap* knob_blue;
|
martin@0
|
123 CBitmap* knob_red_blue;
|
martin@0
|
124 CBitmap* knob_mode2;
|
martin@0
|
125 CBitmap* knob_mode4;
|
martin@0
|
126
|
martin@0
|
127 CBitmap *bRotations;
|
martin@0
|
128 CBitmap *bZoom;
|
martin@0
|
129 CBitmap *bStereo;
|
martin@0
|
130 CBitmap *bName;
|
martin@0
|
131
|
martin@0
|
132 CTextLabel* suspend;
|
martin@0
|
133 CTextLabel* bitMode;
|
martin@0
|
134 };
|
martin@0
|
135
|
martin@0
|
136
|
martin@0
|
137
|
martin@0
|
138
|
martin@0
|
139 #endif // __MyEditor__
|
martin@0
|
140
|