5 #include "bcsubwindow.h"
15 // Distance from subwindow border to top and bottom tick mark
16 #define METER_MARGIN 0
18 class BC_Meter
: public BC_SubWindow
27 int mode
, /* = METER_DB, */
28 int use_titles
, /* = 0, */
29 // Number of updates before over dissappears
30 long over_delay
, /* = 150, */
31 // Number of updates before peak updates
32 long peak_delay
/* = 15 */);
36 void set_images(VFrame
**data
);
37 int set_delays(int over_delay
, int peak_delay
);
38 int region_pixel(int region
);
39 int region_pixels(int region
);
40 virtual int button_press_event();
42 static int get_title_w();
43 static int get_meter_w();
44 int update(float new_value
, int over
);
45 int reposition_window(int x
, int y
, int pixels
);
48 int change_format(int mode
, int min
, int max
);
53 int level_to_pixel(float level
);
56 BC_Pixmap
*images
[TOTAL_METER_IMAGES
];
58 // Number of pixels in the longest dimension
64 // Tick mark positions
65 ArrayList
<int> tick_pixels
;
67 ArrayList
<int> title_pixels
;
68 ArrayList
<char*> db_titles
;
79 int peak_pixel
, level_pixel
, peak_pixel1
, peak_pixel2
;
80 int over_count
, over_timer
;
83 long over_delay
; // Number of updates the over warning lasts.
84 long peak_delay
; // Number of updates the peak lasts.
91 // c-file-style: "linux"