4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #include "edlsession.h"
26 #include "gwindowgui.h"
30 #include "mwindowgui.h"
32 #include "trackcanvas.h"
38 ShowAssets::ShowAssets(MWindow *mwindow, const char *hotkey)
39 : BC_MenuItem(_("Show assets"), hotkey, hotkey[0])
41 this->mwindow = mwindow;
42 set_checked(mwindow->edl->session->show_assets);
45 int ShowAssets::handle_event()
47 set_checked(get_checked() ^ 1);
48 mwindow->edl->session->show_assets = get_checked();
49 mwindow->gui->update(1,
56 mwindow->gui->unlock_window();
57 mwindow->gwindow->gui->update_toggles(1);
58 mwindow->gui->lock_window("ShowAssets::handle_event");
65 ShowTitles::ShowTitles(MWindow *mwindow, const char *hotkey)
66 : BC_MenuItem(_("Show titles"), hotkey, hotkey[0])
68 this->mwindow = mwindow;
69 set_checked(mwindow->edl->session->show_titles);
72 int ShowTitles::handle_event()
74 set_checked(get_checked() ^ 1);
75 mwindow->edl->session->show_titles = get_checked();
76 mwindow->gui->update(1,
83 mwindow->gui->unlock_window();
84 mwindow->gwindow->gui->update_toggles(1);
85 mwindow->gui->lock_window("ShowTitles::handle_event");
91 ShowTransitions::ShowTransitions(MWindow *mwindow, const char *hotkey)
92 : BC_MenuItem(_("Show transitions"), hotkey, hotkey[0])
94 this->mwindow = mwindow;
95 set_checked(mwindow->edl->session->auto_conf->transitions);
97 int ShowTransitions::handle_event()
99 set_checked(get_checked() ^ 1);
100 mwindow->edl->session->auto_conf->transitions = get_checked();
101 mwindow->gui->draw_overlays(1);
102 // mwindow->gui->mainmenu->draw_items();
103 mwindow->gui->unlock_window();
104 mwindow->gwindow->gui->update_toggles(1);
105 mwindow->gui->lock_window("ShowTransitions::handle_event");
113 ShowAutomation::ShowAutomation(MWindow *mwindow,
117 : BC_MenuItem(text, hotkey, hotkey[0])
119 this->mwindow = mwindow;
120 this->subscript = subscript;
121 set_checked(mwindow->edl->session->auto_conf->autos[subscript]);
124 int ShowAutomation::handle_event()
126 set_checked(get_checked() ? 0 : 1);
127 mwindow->edl->session->auto_conf->autos[subscript] = get_checked();
128 mwindow->gui->draw_overlays(1);
129 // mwindow->gui->mainmenu->draw_items();
130 mwindow->gui->unlock_window();
131 mwindow->gwindow->gui->update_toggles(1);
132 mwindow->gui->lock_window("ShowAutomation::handle_event");
136 void ShowAutomation::update_toggle()
138 set_checked(mwindow->edl->session->auto_conf->autos[subscript]);
143 PluginAutomation::PluginAutomation(MWindow *mwindow, const char *hotkey)
144 : BC_MenuItem(_("Plugin keyframes"), hotkey, hotkey[0])
146 this->mwindow = mwindow;
149 int PluginAutomation::handle_event()
151 set_checked(!get_checked());
152 mwindow->edl->session->auto_conf->plugins = get_checked();
153 mwindow->gui->draw_overlays(1);
154 mwindow->gui->unlock_window();
155 mwindow->gwindow->gui->update_toggles(1);
156 mwindow->gui->lock_window("PluginAutomation::handle_event");