3 #include "edlsession.h"
5 #include "gwindowgui.h"
9 #include "mwindowgui.h"
11 #include "trackcanvas.h"
17 ShowAssets::ShowAssets(MWindow *mwindow, char *hotkey)
18 : BC_MenuItem(_("Show assets"), hotkey, hotkey[0])
20 this->mwindow = mwindow;
21 set_checked(mwindow->edl->session->show_assets);
24 int ShowAssets::handle_event()
26 set_checked(get_checked() ^ 1);
27 mwindow->edl->session->show_assets = get_checked();
28 mwindow->gui->update(1,
35 mwindow->gui->unlock_window();
36 mwindow->gwindow->gui->update_toggles(1);
37 mwindow->gui->lock_window("ShowAssets::handle_event");
44 ShowTitles::ShowTitles(MWindow *mwindow, char *hotkey)
45 : BC_MenuItem(_("Show titles"), hotkey, hotkey[0])
47 this->mwindow = mwindow;
48 set_checked(mwindow->edl->session->show_titles);
51 int ShowTitles::handle_event()
53 set_checked(get_checked() ^ 1);
54 mwindow->edl->session->show_titles = get_checked();
55 mwindow->gui->update(1,
62 mwindow->gui->unlock_window();
63 mwindow->gwindow->gui->update_toggles(1);
64 mwindow->gui->lock_window("ShowTitles::handle_event");
70 ShowTransitions::ShowTransitions(MWindow *mwindow, char *hotkey)
71 : BC_MenuItem(_("Show transitions"), hotkey, hotkey[0])
73 this->mwindow = mwindow;
74 set_checked(mwindow->edl->session->auto_conf->transitions);
76 int ShowTransitions::handle_event()
78 set_checked(get_checked() ^ 1);
79 mwindow->edl->session->auto_conf->transitions = get_checked();
80 mwindow->gui->canvas->draw_overlays();
81 mwindow->gui->canvas->flash();
82 // mwindow->gui->mainmenu->draw_items();
83 mwindow->gui->unlock_window();
84 mwindow->gwindow->gui->update_toggles(1);
85 mwindow->gui->lock_window("ShowTransitions::handle_event");
93 ShowAutomation::ShowAutomation(MWindow *mwindow,
97 : BC_MenuItem(text, hotkey, hotkey[0])
99 this->mwindow = mwindow;
100 this->subscript = subscript;
101 set_checked(mwindow->edl->session->auto_conf->autos[subscript]);
104 int ShowAutomation::handle_event()
106 set_checked(get_checked() ^ 1);
107 mwindow->edl->session->auto_conf->autos[subscript] = get_checked();
108 mwindow->gui->canvas->draw_overlays();
109 mwindow->gui->canvas->flash();
110 // mwindow->gui->mainmenu->draw_items();
111 mwindow->gui->unlock_window();
112 mwindow->gwindow->gui->update_toggles(1);
113 mwindow->gui->lock_window("ShowAutomation::handle_event");
117 void ShowAutomation::update_toggle()
119 set_checked(mwindow->edl->session->auto_conf->autos[subscript]);
124 PluginAutomation::PluginAutomation(MWindow *mwindow, char *hotkey)
125 : BC_MenuItem(_("Plugin Autos"), hotkey, hotkey[0])
127 this->mwindow = mwindow;
130 int PluginAutomation::handle_event()
132 set_checked(!get_checked());
133 mwindow->edl->session->auto_conf->plugins = get_checked();
134 mwindow->gui->canvas->draw_overlays();
135 mwindow->gui->canvas->flash();
136 // mwindow->gui->mainmenu->draw_items();
137 mwindow->gui->unlock_window();
138 mwindow->gwindow->gui->update_toggles(1);
139 mwindow->gui->lock_window("PluginAutomation::handle_event");
147 // c-file-style: "linux"