3 * Copyright (C) 2008-2019 Adam Williams <broadcast at earthling dot net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef COMPRMULTIGUI_H
24 #define COMPRMULTIGUI_H
27 #include "comprmulti.h"
28 #include "compressortools.h"
29 #include "eqcanvas.inc"
32 class ComprMultiWindow;
35 class ComprMultiCanvas : public CompressorCanvasBase
38 ComprMultiCanvas(ComprMultiEffect *plugin,
39 ComprMultiWindow *window, int x, int y, int w, int h);
43 class ComprMultiBand : public BC_Radial
46 ComprMultiBand(ComprMultiWindow *window,
47 ComprMultiEffect *plugin, int x, int y, int number, char *text);
50 ComprMultiWindow *window;
51 ComprMultiEffect *plugin;
52 // 0 - (TOTAL_BANDS-1)
57 class ComprMultiReaction : public BC_TumbleTextBox
60 ComprMultiReaction(ComprMultiEffect *plugin,
61 ComprMultiWindow *window, int x, int y);
63 ComprMultiEffect *plugin;
66 class ComprMultiX : public BC_TumbleTextBox
69 ComprMultiX(ComprMultiEffect *plugin,
70 ComprMultiWindow *window, int x, int y);
72 ComprMultiEffect *plugin;
73 ComprMultiWindow *window;
76 class ComprMultiY : public BC_TumbleTextBox
79 ComprMultiY(ComprMultiEffect *plugin,
80 ComprMultiWindow *window, int x, int y);
82 ComprMultiEffect *plugin;
83 ComprMultiWindow *window;
86 class ComprMultiTrigger : public BC_TumbleTextBox
89 ComprMultiTrigger(ComprMultiEffect *plugin,
90 ComprMultiWindow *window, int x, int y);
92 ComprMultiEffect *plugin;
95 class ComprMultiDecay : public BC_TumbleTextBox
98 ComprMultiDecay(ComprMultiEffect *plugin,
99 ComprMultiWindow *window, int x, int y);
101 ComprMultiEffect *plugin;
105 class ComprMultiClear : public BC_GenericButton
108 ComprMultiClear(ComprMultiEffect *plugin,
109 ComprMultiWindow *window, int x, int y);
111 ComprMultiEffect *plugin;
112 ComprMultiWindow *window;
115 class ComprMultiReset : public BC_GenericButton
118 ComprMultiReset(ComprMultiEffect *plugin,
119 ComprMultiWindow *window, int x, int y);
121 ComprMultiEffect *plugin;
122 ComprMultiWindow *window;
125 class ComprMultiSmooth : public BC_CheckBox
128 ComprMultiSmooth(ComprMultiEffect *plugin, int x, int y);
130 ComprMultiEffect *plugin;
133 class ComprMultiSolo : public BC_CheckBox
136 ComprMultiSolo(ComprMultiEffect *plugin, int x, int y);
138 ComprMultiEffect *plugin;
141 class ComprMultiBypass : public BC_CheckBox
144 ComprMultiBypass(ComprMultiEffect *plugin, int x, int y);
146 ComprMultiEffect *plugin;
149 class ComprMultiInput : public BC_PopupMenu
152 ComprMultiInput(ComprMultiEffect *plugin,
153 ComprMultiWindow *window, int x, int y);
154 void create_objects();
156 static const char* value_to_text(int value);
157 static int text_to_value(char *text);
158 ComprMultiEffect *plugin;
159 ComprMultiWindow *window;
163 class ComprMultiFPot : public BC_FPot
166 ComprMultiFPot(ComprMultiWindow *gui, ComprMultiEffect *plugin,
167 int x, int y, double *output, double min, double max);
169 ComprMultiWindow *gui;
170 ComprMultiEffect *plugin;
174 class ComprMultiQPot : public BC_QPot
177 ComprMultiQPot(ComprMultiWindow *gui, ComprMultiEffect *plugin,
178 int x, int y, int *output);
180 ComprMultiWindow *gui;
181 ComprMultiEffect *plugin;
186 class ComprMultiSize : public BC_PopupMenu
189 ComprMultiSize(ComprMultiWindow *gui,
190 ComprMultiEffect *plugin, int x, int y);
192 void create_objects(); // add initial items
193 void update(int size);
194 ComprMultiWindow *gui;
195 ComprMultiEffect *plugin;
198 class ComprMultiMkupGain : public BC_FPot
201 ComprMultiMkupGain(ComprMultiEffect *plugin, ComprMultiWindow *window,
202 int x, int y, double *output, double min, double max);
204 ComprMultiWindow *window;
205 ComprMultiEffect *plugin;
210 class ComprMultiWindow : public PluginClientWindow
213 ComprMultiWindow(ComprMultiEffect *plugin);
215 void create_objects();
217 // draw the dynamic range canvas
218 void update_canvas();
219 // draw the bandpass canvas
220 void update_eqcanvas();
221 int resize_event(int w, int h);
223 ComprMultiCanvas *canvas;
224 ComprMultiReaction *reaction;
225 ComprMultiClear *clear;
226 ComprMultiReset *reset;
229 ComprMultiTrigger *trigger;
230 ComprMultiDecay *decay;
231 ComprMultiSmooth *smooth;
232 ComprMultiSolo *solo;
233 ComprMultiBypass *bypass;
234 ComprMultiInput *input;
236 BC_Meter *gain_change;
237 ComprMultiBand *band[TOTAL_BANDS];
238 CompressorGainFrame *gain_frame;
239 CompressorFreqFrame *freq_frame;
241 ComprMultiQPot *freq1;
242 ComprMultiQPot *freq2;
244 ComprMultiMkupGain *mkup_gain;
245 ComprMultiSize *size;
248 ComprMultiEffect *plugin;