r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / viewmenu.C
blob99ae2eb4cf8e2b95d587730b94e1cdd89511730a
1 #include "autoconf.h"
2 #include "edl.h"
3 #include "edlsession.h"
4 #include "mainmenu.h"
5 #include "mwindow.h"
6 #include "mwindowgui.h"
7 #include "viewmenu.h"
8 #include "trackcanvas.h"
10 #include <libintl.h>
11 #define _(String) gettext(String)
12 #define gettext_noop(String) String
13 #define N_(String) gettext_noop (String)
16 ShowEdits::ShowEdits(MWindow *mwindow, char *hotkey)
17  : BC_MenuItem(_("Show edits"), hotkey, hotkey[0])
18
19         this->mwindow = mwindow; 
20         set_checked(0); 
22 int ShowEdits::handle_event()
24 //      mwindow->tracks->toggle_handles();
25         set_checked(get_checked() ^ 1);
26         return 1;
29 ShowTitles::ShowTitles(MWindow *mwindow, char *hotkey)
30  : BC_MenuItem(_("Show titles"), hotkey, hotkey[0])
32         this->mwindow = mwindow; 
33         set_checked(mwindow->edl->session->show_titles); 
35 int ShowTitles::handle_event()
37         set_checked(get_checked() ^ 1);
38         mwindow->edl->session->show_titles = get_checked();
39         mwindow->gui->update(1,
40                 1,
41                 0,
42                 0,
43                 1, 
44                 0,
45                 0);
46         return 1;
50 ShowKeyframes::ShowKeyframes(MWindow *mwindow, char *hotkey)
51  : BC_MenuItem(_("Plugin keyframes"), hotkey, hotkey[0])
52
53         this->mwindow = mwindow; 
54 //      set_checked(mwindow->edl->session->auto_conf->keyframes); 
56 int ShowKeyframes::handle_event()
58         return 1;
62 ShowTransitions::ShowTransitions(MWindow *mwindow, char *hotkey)
63  : BC_MenuItem(_("Show transitions"), hotkey, hotkey[0])
64
65         this->mwindow = mwindow; 
66         set_checked(mwindow->edl->session->auto_conf->transitions); 
68 int ShowTransitions::handle_event()
70         set_checked(get_checked() ^ 1);
71         mwindow->edl->session->auto_conf->transitions = get_checked();
72         mwindow->gui->canvas->draw_overlays();
73         mwindow->gui->canvas->flash();
74         mwindow->gui->mainmenu->draw_items();
75         return 1;
79 FadeAutomation::FadeAutomation(MWindow *mwindow, char *hotkey)
80  : BC_MenuItem(_("Fade keyframes"), hotkey, hotkey[0])
81
82         this->mwindow = mwindow; 
83         set_checked(mwindow->edl->session->auto_conf->fade); 
84
85 int FadeAutomation::handle_event()
87         set_checked(get_checked() ^ 1);
88         mwindow->edl->session->auto_conf->fade = get_checked();
89         mwindow->gui->canvas->draw_overlays();
90         mwindow->gui->canvas->flash();
91         mwindow->gui->mainmenu->draw_items();
92         return 1;
95 #if 0
96 PlayAutomation::PlayAutomation(MWindow *mwindow, char *hotkey)
97  : BC_MenuItem(_("Play keyframes"), hotkey, hotkey[0])
98
99         this->mwindow = mwindow; 
100         set_checked(mwindow->edl->session->auto_conf->play); 
102 int PlayAutomation::handle_event()
104         set_checked(get_checked() ^ 1);
105         mwindow->edl->session->auto_conf->play = get_checked();
106         mwindow->gui->canvas->draw_overlays();
107         mwindow->gui->canvas->flash();
108         mwindow->gui->mainmenu->draw_items();
109         return 1;
111 #endif
114 CameraAutomation::CameraAutomation(MWindow *mwindow, char *hotkey)
115  : BC_MenuItem(_("Camera keyframes"), hotkey, hotkey[0]) 
117         this->mwindow = mwindow; 
118         set_checked(0); 
120 int CameraAutomation::handle_event()
122         set_checked(get_checked() ^ 1);
123         mwindow->edl->session->auto_conf->camera = get_checked();
124         mwindow->gui->canvas->draw_overlays();
125         mwindow->gui->canvas->flash();
126         mwindow->gui->mainmenu->draw_items();
127         return 1;
131 ProjectAutomation::ProjectAutomation(MWindow *mwindow, char *hotkey)
132  : BC_MenuItem(_("Projector keyframes"), hotkey, hotkey[0]) 
134         this->mwindow = mwindow; 
135         set_checked(0); 
137 int ProjectAutomation::handle_event()
139         set_checked(get_checked() ^ 1);
140         mwindow->edl->session->auto_conf->projector = get_checked();
141         mwindow->gui->canvas->draw_overlays();
142         mwindow->gui->canvas->flash();
143         mwindow->gui->mainmenu->draw_items();
144         return 1;
148 ShowRenderedOutput::ShowRenderedOutput(MWindow *mwindow, char *hotkey)
149  : BC_MenuItem(_("Draw Output"), hotkey, hotkey[0])
151         this->mwindow = mwindow; 
152         set_checked(0); 
154 int ShowRenderedOutput::handle_event()
156 //      mwindow->tracks->set_draw_output();
157 //      if(mwindow->tracks->show_output) set_text(_("Draw Tracks")); else set_text(_("Draw Output"));
158         return 1;
162 MuteAutomation::MuteAutomation(MWindow *mwindow, char *hotkey)
163  : BC_MenuItem(_("Mute keyframes"), hotkey, hotkey[0])
165         this->mwindow = mwindow; 
166         set_checked(mwindow->edl->session->auto_conf->mute); 
168 int MuteAutomation::handle_event()
170         set_checked(get_checked() ^ 1);
171         mwindow->edl->session->auto_conf->mute = get_checked();
172         mwindow->gui->canvas->draw_overlays();
173         mwindow->gui->canvas->flash();
174         mwindow->gui->mainmenu->draw_items();
175         return 1;
179 PanAutomation::PanAutomation(MWindow *mwindow, char *hotkey)
180  : BC_MenuItem(_("Pan keyframes"), hotkey, hotkey[0]) 
182         this->mwindow = mwindow; 
183         set_checked(mwindow->edl->session->auto_conf->pan); 
185 int PanAutomation::handle_event()
187         set_checked(get_checked() ^ 1);
188         mwindow->edl->session->auto_conf->pan = get_checked();
189         mwindow->gui->canvas->draw_overlays();
190         mwindow->gui->canvas->flash();
191         mwindow->gui->mainmenu->draw_items();
192         return 1;
195 PluginAutomation::PluginAutomation(MWindow *mwindow, char *hotkey)
196  : BC_MenuItem(_("Plugin keyframes"), hotkey, hotkey[0]) 
198         this->mwindow = mwindow; 
201 int PluginAutomation::handle_event()
203         set_checked(!get_checked());
204         mwindow->edl->session->auto_conf->plugins = get_checked();
205         mwindow->gui->canvas->draw_overlays();
206         mwindow->gui->canvas->flash();
207         mwindow->gui->mainmenu->draw_items();
208         return 1;
211 ModeAutomation::ModeAutomation(MWindow *mwindow, char *hotkey)
212  : BC_MenuItem(_("Mode keyframes"), hotkey, hotkey[0]) 
214         this->mwindow = mwindow;
217 int ModeAutomation::handle_event()
219         set_checked(!get_checked());
220         mwindow->edl->session->auto_conf->mode = get_checked();
221         mwindow->gui->canvas->draw_overlays();
222         mwindow->gui->canvas->flash();
223         mwindow->gui->mainmenu->draw_items();
224         return 1;
227 MaskAutomation::MaskAutomation(MWindow *mwindow, char *hotkey)
228  : BC_MenuItem(_("Mask keyframes"), hotkey, hotkey[0])
230         this->mwindow = mwindow;
233 int MaskAutomation::handle_event()
235         set_checked(!get_checked());
236         mwindow->edl->session->auto_conf->mask = get_checked();
237         mwindow->gui->canvas->draw_overlays();
238         mwindow->gui->canvas->flash();
239         mwindow->gui->mainmenu->draw_items();
240         return 1;
243 CZoomAutomation::CZoomAutomation(MWindow *mwindow, char *hotkey)
244  : BC_MenuItem(_("Camera Zoom"), hotkey, hotkey[0])
246         this->mwindow = mwindow;
249 int CZoomAutomation::handle_event()
251         set_checked(!get_checked());
252         mwindow->edl->session->auto_conf->czoom = get_checked();
253         mwindow->gui->canvas->draw_overlays();
254         mwindow->gui->canvas->flash();
255         mwindow->gui->mainmenu->draw_items();
256         return 1;
259 PZoomAutomation::PZoomAutomation(MWindow *mwindow, char *hotkey)
260  : BC_MenuItem(_("Projector Zoom"), hotkey, hotkey[0])
262         set_shift(1); 
263         this->mwindow = mwindow;
266 int PZoomAutomation::handle_event()
268         set_checked(!get_checked());
269         mwindow->edl->session->auto_conf->pzoom = get_checked();
270         mwindow->gui->canvas->draw_overlays();
271         mwindow->gui->canvas->flash();
272         mwindow->gui->mainmenu->draw_items();
273         return 1;