00001 #include "autoconf.h"
00002 #include "edl.h"
00003 #include "edlsession.h"
00004 #include "gwindow.h"
00005 #include "gwindowgui.h"
00006 #include "language.h"
00007 #include "mainmenu.h"
00008 #include "mwindow.h"
00009 #include "mwindowgui.h"
00010 #include "viewmenu.h"
00011 #include "trackcanvas.h"
00012
00013
00014
00015
00016
00017 ShowAssets::ShowAssets(MWindow *mwindow, char *hotkey)
00018 : BC_MenuItem(_("Show assets"), hotkey, hotkey[0])
00019 {
00020 this->mwindow = mwindow;
00021 set_checked(mwindow->edl->session->show_assets);
00022 }
00023
00024 int ShowAssets::handle_event()
00025 {
00026 set_checked(get_checked() ^ 1);
00027 mwindow->edl->session->show_assets = get_checked();
00028 mwindow->gui->update(1,
00029 1,
00030 0,
00031 0,
00032 1,
00033 0,
00034 0);
00035 mwindow->gui->unlock_window();
00036 mwindow->gwindow->gui->update_toggles(1);
00037 mwindow->gui->lock_window("ShowAssets::handle_event");
00038 return 1;
00039 }
00040
00041
00042
00043
00044 ShowTitles::ShowTitles(MWindow *mwindow, char *hotkey)
00045 : BC_MenuItem(_("Show titles"), hotkey, hotkey[0])
00046 {
00047 this->mwindow = mwindow;
00048 set_checked(mwindow->edl->session->show_titles);
00049 }
00050
00051 int ShowTitles::handle_event()
00052 {
00053 set_checked(get_checked() ^ 1);
00054 mwindow->edl->session->show_titles = get_checked();
00055 mwindow->gui->update(1,
00056 1,
00057 0,
00058 0,
00059 1,
00060 0,
00061 0);
00062 mwindow->gui->unlock_window();
00063 mwindow->gwindow->gui->update_toggles(1);
00064 mwindow->gui->lock_window("ShowTitles::handle_event");
00065 return 1;
00066 }
00067
00068
00069
00070 ShowTransitions::ShowTransitions(MWindow *mwindow, char *hotkey)
00071 : BC_MenuItem(_("Show transitions"), hotkey, hotkey[0])
00072 {
00073 this->mwindow = mwindow;
00074 set_checked(mwindow->edl->session->auto_conf->transitions);
00075 }
00076 int ShowTransitions::handle_event()
00077 {
00078 set_checked(get_checked() ^ 1);
00079 mwindow->edl->session->auto_conf->transitions = get_checked();
00080 mwindow->gui->canvas->draw_overlays();
00081 mwindow->gui->canvas->flash();
00082
00083 mwindow->gui->unlock_window();
00084 mwindow->gwindow->gui->update_toggles(1);
00085 mwindow->gui->lock_window("ShowTransitions::handle_event");
00086 return 1;
00087 }
00088
00089
00090
00091
00092
00093 ShowAutomation::ShowAutomation(MWindow *mwindow,
00094 char *text,
00095 char *hotkey,
00096 int subscript)
00097 : BC_MenuItem(text, hotkey, hotkey[0])
00098 {
00099 this->mwindow = mwindow;
00100 this->subscript = subscript;
00101 set_checked(mwindow->edl->session->auto_conf->autos[subscript]);
00102 }
00103
00104 int ShowAutomation::handle_event()
00105 {
00106 set_checked(get_checked() ^ 1);
00107 mwindow->edl->session->auto_conf->autos[subscript] = get_checked();
00108 mwindow->gui->canvas->draw_overlays();
00109 mwindow->gui->canvas->flash();
00110
00111 mwindow->gui->unlock_window();
00112 mwindow->gwindow->gui->update_toggles(1);
00113 mwindow->gui->lock_window("ShowAutomation::handle_event");
00114 return 1;
00115 }
00116
00117 void ShowAutomation::update_toggle()
00118 {
00119 set_checked(mwindow->edl->session->auto_conf->autos[subscript]);
00120 }
00121
00122
00123
00124 PluginAutomation::PluginAutomation(MWindow *mwindow, char *hotkey)
00125 : BC_MenuItem(_("Plugin Autos"), hotkey, hotkey[0])
00126 {
00127 this->mwindow = mwindow;
00128 }
00129
00130 int PluginAutomation::handle_event()
00131 {
00132 set_checked(!get_checked());
00133 mwindow->edl->session->auto_conf->plugins = get_checked();
00134 mwindow->gui->canvas->draw_overlays();
00135 mwindow->gui->canvas->flash();
00136
00137 mwindow->gui->unlock_window();
00138 mwindow->gwindow->gui->update_toggles(1);
00139 mwindow->gui->lock_window("PluginAutomation::handle_event");
00140 return 1;
00141 }
00142
00143