r1006: configure: Use libx264_pic instead of libx264 if available.
[cinelerra_cv/mob.git] / cinelerra / mainclock.C
blob1869e5cd1b03a3718f7782ce4926468256662f8b
1 #include "edl.h"
2 #include "edlsession.h"
3 #include "fonts.h"
4 #include "mainclock.h"
5 #include "mwindow.h"
6 #include "theme.h"
8 MainClock::MainClock(MWindow *mwindow, int x, int y, int w)
9  : BC_Title(x,
10                 y,
11                 "", 
12                 MEDIUM_7SEGMENT,
13                 BLACK,
14                 0,
15                 w)
17         this->mwindow = mwindow;
18         position_offset = 0;
21 MainClock::~MainClock()
25 void MainClock::set_frame_offset(double value)
27         position_offset = value;
30 void MainClock::update(double position)
32         char string[BCTEXTLEN];
34         position += position_offset;
36         Units::totext(string, 
37                 position,
38                 mwindow->edl->session->time_format,
39                 mwindow->edl->session->sample_rate,
40                 mwindow->edl->session->frame_rate,
41                 mwindow->edl->session->frames_per_foot);
42         BC_Title::update(string);