2 #include "edlsession.h"
3 #include "levelwindow.h"
4 #include "levelwindowgui.h"
6 #include "mainsession.h"
7 #include "meterpanel.h"
9 #include "mwindowgui.h"
10 #include "preferences.h"
13 LevelWindowGUI::LevelWindowGUI(MWindow *mwindow, LevelWindow *thread)
14 : BC_Window(PROGRAM_NAME ": Levels",
15 mwindow->session->lwindow_x,
16 mwindow->session->lwindow_y,
17 mwindow->session->lwindow_w,
18 mwindow->session->lwindow_h,
25 this->thread = thread;
26 this->mwindow = mwindow;
29 LevelWindowGUI::~LevelWindowGUI()
34 int LevelWindowGUI::create_objects()
36 mwindow->theme->draw_lwindow_bg(this);
37 panel = new MeterPanel(mwindow,
42 mwindow->edl->session->audio_channels,
44 panel->create_objects();
49 int LevelWindowGUI::resize_event(int w, int h)
51 mwindow->session->lwindow_x = get_x();
52 mwindow->session->lwindow_y = get_y();
53 mwindow->session->lwindow_w = w;
54 mwindow->session->lwindow_h = h;
56 mwindow->theme->draw_lwindow_bg(this);
58 panel->reposition_window(panel->x,
62 BC_WindowBase::resize_event(w, h);
66 int LevelWindowGUI::translation_event()
68 mwindow->session->lwindow_x = get_x();
69 mwindow->session->lwindow_y = get_y();
73 int LevelWindowGUI::close_event()
76 mwindow->session->show_lwindow = 0;
77 mwindow->gui->lock_window();
78 mwindow->gui->mainmenu->show_lwindow->set_checked(0);
79 mwindow->gui->unlock_window();
80 mwindow->save_defaults();
84 int LevelWindowGUI::keypress_event()
86 if(get_keypress() == 'w' || get_keypress() == 'W')
95 int LevelWindowGUI::reset_over()