4 * Copyright (C) 1997-2011 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include "mwindow.inc"
35 MeterPanel(MWindow *mwindow,
36 BC_WindowBase *subwindow,
39 int w, /* Ignored if -1 */
43 int use_headroom /* = 0 */,
45 virtual ~MeterPanel();
47 void create_objects();
48 int set_meters(int meter_count, int visible);
49 static int get_meters_width(Theme *theme, int meter_count, int visible);
50 void reposition_window(int x,
52 int w, /* Ignored if -1 */
54 int get_title_x(int number, const char *text);
58 // Calculate meter width without border
59 int get_meter_w(int number);
60 void update(double *levels);
61 void init_meters(int dmix);
62 void update_peak(int number, float value);
64 void change_format(int mode, int min, int max);
65 virtual int change_status_event(int new_status);
69 BC_WindowBase *subwindow;
70 ArrayList<MeterMeter*> meters;
71 ArrayList<BC_Title*> meter_titles;
72 ArrayList<float> meter_peaks;
82 class MeterReset : public BC_Button
85 MeterReset(MWindow *mwindow, MeterPanel *panel, int x, int y);
92 class MeterShow : public BC_Toggle
95 MeterShow(MWindow *mwindow, MeterPanel *panel, int x, int y);
102 class MeterMeter : public BC_Meter
105 MeterMeter(MWindow *mwindow,
114 int button_press_event();