Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git] / cinelerra / mainclock.C
blobbeb3ad0f822c11d7e82ab405a8d06c9def46dab1
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);
50 //      Local Variables:
51 //      mode: C++
52 //      c-file-style: "linux"
53 //      End: