r870: Merge 2.1:
[cinelerra_cv.git] / cinelerra / mainmenu.h
blob6da8aa8edf61edc7bf6ebbbcdef5c912c9b84623
1 #ifndef MAINMENU_H
2 #define MAINMENU_H
4 class AEffectMenu;
5 class LabelsFollowEdits;
6 class PluginsFollowEdits;
7 class CursorOnFrames;
8 class LoopPlayback;
10 class Redo;
11 class ShowVWindow;
12 class ShowAWindow;
13 class ShowGWindow;
14 class ShowCWindow;
15 class ShowLWindow;
16 class Undo;
18 #include "arraylist.h"
19 #include "guicast.h"
20 #include "bchash.inc"
21 #include "loadfile.inc"
22 #include "mwindow.inc"
23 #include "mwindowgui.inc"
24 #include "maxchannels.h"
25 #include "menuaeffects.inc"
26 #include "menuveffects.inc"
27 #include "module.inc"
28 #include "new.inc"
29 #include "plugindialog.inc"
30 #include "quit.inc"
31 #include "record.inc"
32 #include "render.inc"
33 #include "threadloader.inc"
34 #include "viewmenu.inc"
36 #define TOTAL_LOADS 10 // number of files to cache
37 #define TOTAL_EFFECTS 10 // number of effects to cache
39 class MainMenu : public BC_MenuBar
41 public:
42 MainMenu(MWindow *mwindow, MWindowGUI *gui);
43 ~MainMenu();
44 int create_objects();
45 int load_defaults(BC_Hash *defaults);
46 int save_defaults(BC_Hash *defaults);
48 // most recent loads
49 int add_load(char *path);
50 int init_loads(BC_Hash *defaults);
52 // most recent effects
53 int init_aeffects(BC_Hash *defaults);
54 int save_aeffects(BC_Hash *defaults);
55 int add_aeffect(char *title);
56 int init_veffects(BC_Hash *defaults);
57 int save_veffects(BC_Hash *defaults);
58 int add_veffect(char *title);
60 int quit();
61 // show only one of these at a time
62 int set_show_autos();
63 void update_toggles(int use_lock);
65 MWindowGUI *gui;
66 MWindow *mwindow;
67 ThreadLoader *threadloader;
68 MenuAEffects *aeffects;
69 MenuVEffects *veffects;
71 Load *load_file;
72 BC_RecentList *recent_load;
73 LoadPrevious *load[TOTAL_LOADS];
76 RecordMenuItem *record;
77 RenderItem *render;
78 New *new_project;
79 MenuAEffectItem *aeffect[TOTAL_EFFECTS];
80 MenuVEffectItem *veffect[TOTAL_EFFECTS];
81 Quit *quit_program; // affected by save
82 Undo *undo;
83 Redo *redo;
84 int total_aeffects;
85 int total_veffects;
86 BC_Menu *filemenu, *audiomenu, *videomenu; // needed by most recents
88 LabelsFollowEdits *labels_follow_edits;
89 PluginsFollowEdits *plugins_follow_edits;
90 CursorOnFrames *cursor_on_frames;
91 LoopPlayback *loop_playback;
92 ShowAssets *show_assets;
93 ShowTitles *show_titles;
94 ShowTransitions *show_transitions;
95 ShowAutomation *fade_automation;
96 ShowAutomation *mute_automation;
97 ShowAutomation *pan_automation;
98 ShowAutomation *camera_x;
99 ShowAutomation *camera_y;
100 ShowAutomation *camera_z;
101 ShowAutomation *project_x;
102 ShowAutomation *project_y;
103 ShowAutomation *project_z;
104 PluginAutomation *plugin_automation;
105 ShowAutomation *mask_automation;
106 ShowAutomation *mode_automation;
107 ShowVWindow *show_vwindow;
108 ShowAWindow *show_awindow;
109 ShowCWindow *show_cwindow;
110 ShowGWindow *show_gwindow;
111 ShowLWindow *show_lwindow;
114 // ========================================= edit
116 class Undo : public BC_MenuItem
118 public:
119 Undo(MWindow *mwindow);
120 int handle_event();
121 int update_caption(char *new_caption = "");
122 MWindow *mwindow;
127 class DumpCICache : public BC_MenuItem
129 public:
130 DumpCICache(MWindow *mwindow);
131 int handle_event();
132 MWindow *mwindow;
135 class DumpEDL : public BC_MenuItem
137 public:
138 DumpEDL(MWindow *mwindow);
139 int handle_event();
140 MWindow *mwindow;
143 class DumpPlugins : public BC_MenuItem
145 public:
146 DumpPlugins(MWindow *mwindow);
147 int handle_event();
148 MWindow *mwindow;
151 class DumpAssets : public BC_MenuItem
153 public:
154 DumpAssets(MWindow *mwindow);
155 int handle_event();
156 MWindow *mwindow;
159 class Redo : public BC_MenuItem
161 public:
162 Redo(MWindow *mwindow);
163 int handle_event();
164 int update_caption(char *new_caption = "");
165 MWindow *mwindow;
168 class Cut : public BC_MenuItem
170 public:
171 Cut(MWindow *mwindow);
172 int handle_event();
173 MWindow *mwindow;
176 class Copy : public BC_MenuItem
178 public:
179 Copy(MWindow *mwindow);
180 int handle_event();
181 MWindow *mwindow;
184 class Paste : public BC_MenuItem
186 public:
187 Paste(MWindow *mwindow);
188 int handle_event();
189 MWindow *mwindow;
192 class Clear : public BC_MenuItem
194 public:
195 Clear(MWindow *mwindow);
196 int handle_event();
197 MWindow *mwindow;
200 class CutKeyframes : public BC_MenuItem
202 public:
203 CutKeyframes(MWindow *mwindow);
204 int handle_event();
205 MWindow *mwindow;
208 class CopyKeyframes : public BC_MenuItem
210 public:
211 CopyKeyframes(MWindow *mwindow);
212 int handle_event();
213 MWindow *mwindow;
216 class PasteKeyframes : public BC_MenuItem
218 public:
219 PasteKeyframes(MWindow *mwindow);
220 int handle_event();
221 MWindow *mwindow;
224 class ClearKeyframes : public BC_MenuItem
226 public:
227 ClearKeyframes(MWindow *mwindow);
228 int handle_event();
229 MWindow *mwindow;
232 class StraightenKeyframes : public BC_MenuItem
234 public:
235 StraightenKeyframes(MWindow *mwindow);
236 int handle_event();
237 MWindow *mwindow;
240 class CutDefaultKeyframe : public BC_MenuItem
242 public:
243 CutDefaultKeyframe(MWindow *mwindow);
244 int handle_event();
245 MWindow *mwindow;
248 class CopyDefaultKeyframe : public BC_MenuItem
250 public:
251 CopyDefaultKeyframe(MWindow *mwindow);
252 int handle_event();
253 MWindow *mwindow;
256 class PasteDefaultKeyframe : public BC_MenuItem
258 public:
259 PasteDefaultKeyframe(MWindow *mwindow);
260 int handle_event();
261 MWindow *mwindow;
264 class ClearDefaultKeyframe : public BC_MenuItem
266 public:
267 ClearDefaultKeyframe(MWindow *mwindow);
268 int handle_event();
269 MWindow *mwindow;
272 class PasteSilence : public BC_MenuItem
274 public:
275 PasteSilence(MWindow *mwindow);
276 int handle_event();
277 MWindow *mwindow;
280 class SelectAll : public BC_MenuItem
282 public:
283 SelectAll(MWindow *mwindow);
284 int handle_event();
285 MWindow *mwindow;
288 class ClearLabels : public BC_MenuItem
290 public:
291 ClearLabels(MWindow *mwindow);
292 int handle_event();
293 MWindow *mwindow;
296 class MuteSelection : public BC_MenuItem
298 public:
299 MuteSelection(MWindow *mwindow);
300 int handle_event();
301 MWindow *mwindow;
304 class TrimSelection : public BC_MenuItem
306 public:
307 TrimSelection(MWindow *mwindow);
308 int handle_event();
309 MWindow *mwindow;
312 // ======================================== audio
314 class AddAudioTrack : public BC_MenuItem
316 public:
317 AddAudioTrack(MWindow *mwindow);
318 int handle_event();
319 MWindow *mwindow;
322 class DeleteAudioTrack : public BC_MenuItem
324 public:
325 DeleteAudioTrack(MWindow *mwindow);
326 int handle_event();
327 MWindow *mwindow;
330 class DefaultATransition : public BC_MenuItem
332 public:
333 DefaultATransition(MWindow *mwindow);
334 int handle_event();
335 MWindow *mwindow;
338 class MapAudio1 : public BC_MenuItem
340 public:
341 MapAudio1(MWindow *mwindow);
342 int handle_event();
343 MWindow *mwindow;
346 class MapAudio2 : public BC_MenuItem
348 public:
349 MapAudio2(MWindow *mwindow);
350 int handle_event();
351 MWindow *mwindow;
354 // ========================================== video
357 class AddVideoTrack : public BC_MenuItem
359 public:
360 AddVideoTrack(MWindow *mwindow);
361 int handle_event();
362 MWindow *mwindow;
366 class DeleteVideoTrack : public BC_MenuItem
368 public:
369 DeleteVideoTrack(MWindow *mwindow);
370 int handle_event();
371 MWindow *mwindow;
374 class ResetTranslation : public BC_MenuItem
376 public:
377 ResetTranslation(MWindow *mwindow);
378 int handle_event();
379 MWindow *mwindow;
382 class DefaultVTransition : public BC_MenuItem
384 public:
385 DefaultVTransition(MWindow *mwindow);
386 int handle_event();
387 MWindow *mwindow;
390 // ========================================== settings
393 class MoveTracksUp : public BC_MenuItem
395 public:
396 MoveTracksUp(MWindow *mwindow);
397 int handle_event();
398 MWindow *mwindow;
401 class MoveTracksDown : public BC_MenuItem
403 public:
404 MoveTracksDown(MWindow *mwindow);
405 int handle_event();
406 MWindow *mwindow;
409 class DeleteTracks : public BC_MenuItem
411 public:
412 DeleteTracks(MWindow *mwindow);
413 int handle_event();
414 MWindow *mwindow;
417 class ConcatenateTracks : public BC_MenuItem
419 public:
420 ConcatenateTracks(MWindow *mwindow);
421 int handle_event();
422 MWindow *mwindow;
425 class DeleteTrack : public BC_MenuItem
427 public:
428 DeleteTrack(MWindow *mwindow);
429 int handle_event();
430 MWindow *mwindow;
433 class LoopPlayback : public BC_MenuItem
435 public:
436 LoopPlayback(MWindow *mwindow);
438 int handle_event();
439 MWindow *mwindow;
442 class SetBRenderStart : public BC_MenuItem
444 public:
445 SetBRenderStart(MWindow *mwindow);
446 int handle_event();
447 MWindow *mwindow;
450 class LabelsFollowEdits : public BC_MenuItem
452 public:
453 LabelsFollowEdits(MWindow *mwindow);
454 int handle_event();
455 MWindow *mwindow;
458 class PluginsFollowEdits : public BC_MenuItem
460 public:
461 PluginsFollowEdits(MWindow *mwindow);
462 int handle_event();
463 MWindow *mwindow;
466 class CursorOnFrames : public BC_MenuItem
468 public:
469 CursorOnFrames(MWindow *mwindow);
470 int handle_event();
471 MWindow *mwindow;
474 class AutosFollowEdits : public BC_MenuItem
476 public:
477 AutosFollowEdits(MWindow *mwindow);
478 int handle_event();
479 MWindow *mwindow;
482 class ScrubSpeed : public BC_MenuItem
484 public:
485 ScrubSpeed(MWindow *mwindow);
486 int handle_event();
487 MWindow *mwindow;
490 class SaveSettingsNow : public BC_MenuItem
492 public:
493 SaveSettingsNow(MWindow *mwindow);
494 int handle_event();
495 MWindow *mwindow;
498 // ========================================== window
499 class ShowVWindow : public BC_MenuItem
501 public:
502 ShowVWindow(MWindow *mwindow);
503 int handle_event();
504 MWindow *mwindow;
507 class ShowAWindow : public BC_MenuItem
509 public:
510 ShowAWindow(MWindow *mwindow);
511 int handle_event();
512 MWindow *mwindow;
515 class ShowGWindow : public BC_MenuItem
517 public:
518 ShowGWindow(MWindow *mwindow);
519 int handle_event();
520 MWindow *mwindow;
523 class ShowCWindow : public BC_MenuItem
525 public:
526 ShowCWindow(MWindow *mwindow);
527 int handle_event();
528 MWindow *mwindow;
531 class ShowLWindow : public BC_MenuItem
533 public:
534 ShowLWindow(MWindow *mwindow);
535 int handle_event();
536 MWindow *mwindow;
539 class TileWindows : public BC_MenuItem
541 public:
542 TileWindows(MWindow *mwindow);
543 int handle_event();
544 MWindow *mwindow;
547 #endif