r1005: Increase the number of displayed digits for resample audio dialog box
[cinelerra_cv/mob.git] / guicast / bcbar.C
blob45d6242d20d994cf0a4dd9d222ef6053cb95ccb2
1 #include "bcbar.h"
2 #include "bcpixmap.h"
3 #include "bcresources.h"
4 #include "vframe.h"
9 BC_Bar::BC_Bar(int x, int y, int w, VFrame *data)
10  : BC_SubWindow(x, y, w, 0, -1)
12         this->data = data;
13         image = 0;
16 BC_Bar::~BC_Bar()
18         delete image;
21 int BC_Bar::initialize()
23         if(data)
24                 set_image(data);
25         else
26                 set_image(get_resources()->bar_data);
28 // Create the subwindow
29         BC_SubWindow::initialize();
31         draw();
32         return 0;
35 void BC_Bar::set_image(VFrame *data)
37         delete image;
38         image = new BC_Pixmap(parent_window, data, PIXMAP_ALPHA);
39         h = image->get_h();
42 int BC_Bar::reposition_window(int x, int y, int w)
44         BC_WindowBase::reposition_window(x, y, w, -1);
45         draw();
46         return 0;
49 int BC_Bar::resize_event(int w, int h)
51         reposition_window(x, y, get_w());
52         return 1;
56 void BC_Bar::draw()
58         draw_top_background(parent_window, 0, 0,w, h);
59         draw_3segmenth(0, 0, w, 0, w, image);
60         flash();