r105: This commit was manufactured by cvs2svn to create tag
[cinelerra_cv/mob.git] / hvirtual / plugins / timeavg / timeavgwindow.C
blob1b5741901c09a17a226e34485a8d6cbb453de11f
1 #include "bcdisplayinfo.h"
2 #include "timeavgwindow.h"
5 #include <libintl.h>
6 #define _(String) gettext(String)
7 #define gettext_noop(String) String
8 #define N_(String) gettext_noop (String)
10 PLUGIN_THREAD_OBJECT(TimeAvgMain, TimeAvgThread, TimeAvgWindow)
16 TimeAvgWindow::TimeAvgWindow(TimeAvgMain *client, int x, int y)
17  : BC_Window(client->gui_string, 
18         x, 
19         y, 
20         210, 
21         80, 
22         200, 
23         80, 
24         0, 
25         0,
26         1)
27
28         this->client = client; 
31 TimeAvgWindow::~TimeAvgWindow()
35 int TimeAvgWindow::create_objects()
37         int x = 10, y = 10;
38         add_tool(new BC_Title(x, y, _("Frames to average")));
39         y += 20;
40         add_tool(total_frames = new TimeAvgSlider(client, x, y));
41         show_window();
42         flush();
43         return 0;
46 WINDOW_CLOSE_EVENT(TimeAvgWindow)
48 TimeAvgSlider::TimeAvgSlider(TimeAvgMain *client, int x, int y)
49  : BC_ISlider(x, 
50         y, 
51         0,
52         190, 
53         200, 
54         1, 
55         256, 
56         client->config.frames)
58         this->client = client;
60 TimeAvgSlider::~TimeAvgSlider()
63 int TimeAvgSlider::handle_event()
65         int result = get_value();
66         if(result < 1) result = 1;
67         client->config.frames = result;
68         client->send_configure_change();
69         return 1;