Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

levelwindowgui.C

Go to the documentation of this file.
00001 #include "edl.h"
00002 #include "edlsession.h"
00003 #include "levelwindow.h"
00004 #include "levelwindowgui.h"
00005 #include "mainmenu.h"
00006 #include "mainsession.h"
00007 #include "meterpanel.h"
00008 #include "mwindow.h"
00009 #include "mwindowgui.h"
00010 #include "preferences.h"
00011 #include "theme.h"
00012 
00013 LevelWindowGUI::LevelWindowGUI(MWindow *mwindow, LevelWindow *thread)
00014  : BC_Window(PROGRAM_NAME ": Levels", 
00015         mwindow->session->lwindow_x, 
00016         mwindow->session->lwindow_y, 
00017         mwindow->session->lwindow_w, 
00018         mwindow->session->lwindow_h, 
00019         10,
00020         10,
00021         1,
00022         0, 
00023         1)
00024 {
00025         this->thread = thread;
00026         this->mwindow = mwindow;
00027 }
00028 
00029 LevelWindowGUI::~LevelWindowGUI()
00030 {
00031         delete panel;
00032 }
00033 
00034 int LevelWindowGUI::create_objects()
00035 {
00036         mwindow->theme->draw_lwindow_bg(this);
00037         panel = new MeterPanel(mwindow, 
00038                 this, 
00039                 5, 
00040                 5,
00041                 get_h() - 10,
00042                 mwindow->edl->session->audio_channels,
00043                 1);
00044         panel->create_objects();
00045         return 0;
00046 }
00047 
00048 
00049 int LevelWindowGUI::resize_event(int w, int h)
00050 {
00051         mwindow->session->lwindow_x = get_x();
00052         mwindow->session->lwindow_y = get_y();
00053         mwindow->session->lwindow_w = w;
00054         mwindow->session->lwindow_h = h;
00055 
00056         mwindow->theme->draw_lwindow_bg(this);
00057 
00058         panel->reposition_window(panel->x,
00059                 panel->y,
00060                 h - 10);
00061 
00062         BC_WindowBase::resize_event(w, h);
00063         return 1;
00064 }
00065 
00066 int LevelWindowGUI::translation_event()
00067 {
00068         mwindow->session->lwindow_x = get_x();
00069         mwindow->session->lwindow_y = get_y();
00070         return 0;
00071 }
00072 
00073 int LevelWindowGUI::close_event()
00074 {
00075         hide_window();
00076         mwindow->session->show_lwindow = 0;
00077         mwindow->gui->lock_window();
00078         mwindow->gui->mainmenu->show_lwindow->set_checked(0);
00079         mwindow->gui->unlock_window();
00080         mwindow->save_defaults();
00081         return 1;
00082 }
00083 
00084 int LevelWindowGUI::keypress_event()
00085 {
00086         if(get_keypress() == 'w' || get_keypress() == 'W')
00087         {
00088                 close_event();
00089                 return 1;
00090         }
00091         return 0;
00092 }
00093 
00094 
00095 int LevelWindowGUI::reset_over()
00096 {
00097         return 0;
00098 }
00099 

Generated on Sun Jan 8 13:38:56 2006 for Cinelerra-svn by  doxygen 1.4.4