2 #include "normalizewindow.h"
5 #define _(String) gettext(String)
6 #define gettext_noop(String) String
7 #define N_(String) gettext_noop (String)
9 NormalizeWindow::NormalizeWindow(int x, int y)
10 : BC_Window(PROGRAM_NAME ": Normalize",
23 NormalizeWindow::~NormalizeWindow()
27 int NormalizeWindow::create_objects(float *db_over, int *separate_tracks)
30 this->db_over = db_over;
31 this->separate_tracks = separate_tracks;
32 add_subwindow(new BC_Title(x, y, _("Enter the DB to overload by:")));
34 add_subwindow(new NormalizeWindowOverload(x, y, this->db_over));
36 add_subwindow(new NormalizeWindowSeparate(x, y, this->separate_tracks));
37 add_subwindow(new BC_OKButton(this));
38 add_subwindow(new BC_CancelButton(this));
44 int NormalizeWindow::close_event()
50 NormalizeWindowOverload::NormalizeWindowOverload(int x, int y, float *db_over)
51 : BC_TextBox(x, y, 200, 1, *db_over)
53 this->db_over = db_over;
56 NormalizeWindowOverload::~NormalizeWindowOverload()
60 int NormalizeWindowOverload::handle_event()
62 *db_over = atof(get_text());
67 NormalizeWindowSeparate::NormalizeWindowSeparate(int x, int y, int *separate_tracks)
68 : BC_CheckBox(x, y, *separate_tracks, _("Treat tracks independantly"))
70 this->separate_tracks = separate_tracks;
73 NormalizeWindowSeparate::~NormalizeWindowSeparate()
77 int NormalizeWindowSeparate::handle_event()
79 *separate_tracks = get_value();