4 #include "cwindowgui.h"
6 #include "localsession.h"
7 #include "maincursor.h"
10 #include "mwindowgui.h"
14 CTimeBar::CTimeBar(MWindow *mwindow,
27 this->mwindow = mwindow;
31 int CTimeBar::resize_event()
33 reposition_window(mwindow->theme->ctimebar_x,
34 mwindow->theme->ctimebar_y,
35 mwindow->theme->ctimebar_w,
36 mwindow->theme->ctimebar_h);
42 EDL* CTimeBar::get_edl()
47 void CTimeBar::draw_time()
54 void CTimeBar::update_preview()
56 gui->slider->set_position();
60 void CTimeBar::select_label(double position)
62 EDL *edl = mwindow->edl;
65 mwindow->gui->mbuttons->transport->handle_transport(STOP, 1, 0, 0);
68 position = mwindow->edl->align_to_frame(position, 1);
72 if(position > edl->local_session->get_selectionend(1) / 2 +
73 edl->local_session->get_selectionstart(1) / 2)
76 edl->local_session->set_selectionend(position);
80 edl->local_session->set_selectionstart(position);
85 edl->local_session->set_selectionstart(position);
86 edl->local_session->set_selectionend(position);
90 mwindow->cwindow->update(1, 0, 0, 0, 1);
92 //printf("CTimeBar::select_label 1\n");
94 mwindow->gui->lock_window();
95 mwindow->gui->cursor->hide(0);
96 mwindow->gui->cursor->draw(1);
97 mwindow->gui->update(0,
98 1, // 1 for incremental drawing. 2 for full refresh
104 mwindow->gui->unlock_window();
105 mwindow->update_plugin_guis();
106 //printf("CTimeBar::select_label 2\n");