5 #include "edlsession.h"
8 #include "localsession.h"
12 #include "mwindowgui.h"
13 #include "playbackengine.h"
14 #include "playtransport.h"
15 #include "preferences.h"
17 #include "mainsession.h"
21 MButtons::MButtons(MWindow *mwindow, MWindowGUI *gui)
22 : BC_SubWindow(mwindow->theme->mbuttons_x,
23 mwindow->theme->mbuttons_y,
24 mwindow->theme->mbuttons_w,
25 mwindow->theme->mbuttons_h)
28 this->mwindow = mwindow;
37 int MButtons::create_objects()
42 draw_top_background(get_parent(), 0, 0, get_w(), get_h());
43 transport = new MainTransport(mwindow, this, x, y);
44 transport->create_objects();
45 transport->set_engine(mwindow->cwindow->playback_engine);
46 x += transport->get_w();
47 x += mwindow->theme->mtransport_margin;
49 edit_panel = new MainEditing(mwindow, this, x, y);
51 edit_panel->create_objects();
53 x += edit_panel->get_w();
58 int MButtons::resize_event()
60 reposition_window(mwindow->theme->mbuttons_x,
61 mwindow->theme->mbuttons_y,
62 mwindow->theme->mbuttons_w,
63 mwindow->theme->mbuttons_h);
64 draw_top_background(get_parent(), 0, 0, get_w(), get_h());
68 int MButtons::keypress_event()
74 result = transport->keypress_event();
80 void MButtons::update()
100 MainTransport::MainTransport(MWindow *mwindow, MButtons *mbuttons, int x, int y)
101 : PlayTransport(mwindow, mbuttons, x, y)
105 void MainTransport::goto_start()
107 mwindow->gui->unlock_window();
108 handle_transport(REWIND, 1);
109 mwindow->gui->lock_window();
110 mwindow->goto_start();
114 void MainTransport::goto_end()
116 mwindow->gui->unlock_window();
117 handle_transport(GOTO_END, 1);
118 mwindow->gui->lock_window();
122 MainEditing::MainEditing(MWindow *mwindow, MButtons *mbuttons, int x, int y)
127 mwindow->edl->session->editing_mode,
145 this->mwindow = mwindow;
146 this->mbuttons = mbuttons;