add x10tv ati remote rework, android remote rework, wintv remote tweaks
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / eqcanvas.h
1 /*
2  * CINELERRA
3  * Copyright (C) 2008-2019 Adam Williams <broadcast at earthling dot net>
4  * 
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.
9  * 
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.
14  * 
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
18  * 
19  */
20
21
22 // A canvas for drawing a spectrogram on top of a filter envelope
23
24 #ifndef EQCANVAS_H
25 #define EQCANVAS_H
26
27 #include "compressortools.h"
28 #include "guicast.h"
29 #include "pluginclient.inc"
30 #include "pluginaclient.h"
31
32 class EQCanvas
33 {
34 public:
35         EQCanvas(BC_WindowBase *parent, 
36                 int x, int y, int w, int h, 
37                 float min_db, float max_db);
38         virtual ~EQCanvas();
39         
40         void initialize();
41         void draw_grid();
42         void update_spectrogram(CompressorFreqFrame *frame, 
43                 int offset, int size, int window_size);
44         void draw_envelope(double *envelope, 
45                 int samplerate, int window_size, int is_top, int flash_it);
46         
47         BC_WindowBase *parent;
48         BC_SubWindow *canvas;
49         int x, y, w, h;
50         int canvas_x, canvas_y;
51         int canvas_w, canvas_h;
52         float min_db, max_db;
53 // divisions for the frequency
54         int freq_divisions;
55 // divisions for the DB
56         int db_per_division;
57         float pixels_per_division;
58         int minor_divisions;
59         int total_divisions;
60 };
61
62 #endif // EQCANVAS_H