r1008: pt_BR translation update
[cinelerra_cv/mob.git] / plugins / gain / gainwindow.C
blob5cb554ac91fdffafde6f8b15278c3d67e0d06356
1 #include "bcdisplayinfo.h"
2 #include "bchash.h"
3 #include "filesystem.h"
4 #include "gainwindow.h"
5 #include "language.h"
7 #include <string.h>
10 PLUGIN_THREAD_OBJECT(Gain, GainThread, GainWindow)
17 GainWindow::GainWindow(Gain *gain, int x, int y)
18  : BC_Window(gain->gui_string, 
19         x, 
20         y, 
21         230, 
22         60, 
23         230, 
24         60, 
25         0, 
26         0,
27         1)
29         this->gain = gain;
32 GainWindow::~GainWindow()
36 int GainWindow::create_objects()
38         int x = 10, y = 10;
39         add_tool(new BC_Title(5, y, _("Level:")));
40         y += 20;
41         add_tool(level = new GainLevel(gain, x, y));
42         show_window();
43         flush();
44         return 0;
47 WINDOW_CLOSE_EVENT(GainWindow)
52 GainLevel::GainLevel(Gain *gain, int x, int y)
53  : BC_FSlider(x, 
54         y, 
55         0,
56         200,
57         200,
58         INFINITYGAIN, 
59         40,
60         gain->config.level)
62         this->gain = gain;
64 int GainLevel::handle_event()
66         gain->config.level = get_value();
67         gain->send_configure_change();
68         return 1;