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"
35 ShowAssets::ShowAssets(MWindow *mwindow, const char *hotkey)
36 : BC_MenuItem(_("Show assets"), hotkey, hotkey[0])
38 this->mwindow = mwindow;
39 set_checked(mwindow->edl->session->show_assets);
42 int ShowAssets::handle_event()
44 set_checked(get_checked() ^ 1);
45 mwindow->edl->session->show_assets = get_checked();
46 mwindow->gui->update(1,
53 mwindow->gui->unlock_window();
54 mwindow->gwindow->gui->update_toggles(1);
55 mwindow->gui->lock_window("ShowAssets::handle_event");
62 ShowTitles::ShowTitles(MWindow *mwindow, const char *hotkey)
63 : BC_MenuItem(_("Show titles"), hotkey, hotkey[0])
65 this->mwindow = mwindow;
66 set_checked(mwindow->edl->session->show_titles);
69 int ShowTitles::handle_event()
71 set_checked(get_checked() ^ 1);
72 mwindow->edl->session->show_titles = get_checked();
73 mwindow->gui->update(1,
80 mwindow->gui->unlock_window();
81 mwindow->gwindow->gui->update_toggles(1);
82 mwindow->gui->lock_window("ShowTitles::handle_event");
88 ShowTransitions::ShowTransitions(MWindow *mwindow, const char *hotkey)
89 : BC_MenuItem(_("Show transitions"), hotkey, hotkey[0])
91 this->mwindow = mwindow;
92 set_checked(mwindow->edl->session->auto_conf->transitions);
94 int ShowTransitions::handle_event()
96 set_checked(get_checked() ^ 1);
97 mwindow->edl->session->auto_conf->transitions = get_checked();
98 mwindow->gui->draw_overlays(1);
99 // mwindow->gui->mainmenu->draw_items();
100 mwindow->gui->unlock_window();
101 mwindow->gwindow->gui->update_toggles(1);
102 mwindow->gui->lock_window("ShowTransitions::handle_event");
110 ShowAutomation::ShowAutomation(MWindow *mwindow,
114 : BC_MenuItem(text, hotkey, hotkey[0])
116 this->mwindow = mwindow;
117 this->subscript = subscript;
118 set_checked(mwindow->edl->session->auto_conf->autos[subscript]);
121 int ShowAutomation::handle_event()
123 set_checked(get_checked() ? 0 : 1);
124 mwindow->edl->session->auto_conf->autos[subscript] = get_checked();
125 mwindow->gui->draw_overlays(1);
126 // mwindow->gui->mainmenu->draw_items();
127 mwindow->gui->unlock_window();
128 mwindow->gwindow->gui->update_toggles(1);
129 mwindow->gui->lock_window("ShowAutomation::handle_event");
133 void ShowAutomation::update_toggle()
135 set_checked(mwindow->edl->session->auto_conf->autos[subscript]);
140 PluginAutomation::PluginAutomation(MWindow *mwindow, const char *hotkey)
141 : BC_MenuItem(_("Plugin Autos"), hotkey, hotkey[0])
143 this->mwindow = mwindow;
146 int PluginAutomation::handle_event()
148 set_checked(!get_checked());
149 mwindow->edl->session->auto_conf->plugins = get_checked();
150 mwindow->gui->draw_overlays(1);
151 mwindow->gui->unlock_window();
152 mwindow->gwindow->gui->update_toggles(1);
153 mwindow->gui->lock_window("PluginAutomation::handle_event");