4 * Copyright (C) 1997-2014 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
26 class LabelsFollowEdits;
27 class PluginsFollowEdits;
28 class KeyframesFollowEdits;
30 class TypelessKeyframes;
45 #include "arraylist.h"
48 #include "loadfile.inc"
49 #include "mwindow.inc"
50 #include "mwindowgui.inc"
51 #include "maxchannels.h"
52 #include "menuaeffects.inc"
53 #include "menuveffects.inc"
56 #include "plugindialog.inc"
60 #include "threadloader.inc"
61 #include "viewmenu.inc"
63 #define TOTAL_LOADS 10 // number of files to cache
64 #define TOTAL_EFFECTS 10 // number of effects to cache
66 class MainMenu : public BC_MenuBar
69 MainMenu(MWindow *mwindow, MWindowGUI *gui, int w);
71 void create_objects();
72 int load_defaults(BC_Hash *defaults);
73 int save_defaults(BC_Hash *defaults);
76 int add_load(char *path);
77 int init_loads(BC_Hash *defaults);
78 int save_loads(BC_Hash *defaults);
80 // most recent effects
81 int init_aeffects(BC_Hash *defaults);
82 int save_aeffects(BC_Hash *defaults);
83 int add_aeffect(char *title);
84 int init_veffects(BC_Hash *defaults);
85 int save_veffects(BC_Hash *defaults);
86 int add_veffect(char *title);
89 // show only one of these at a time
91 void update_toggles(int use_lock);
95 ThreadLoader *threadloader;
96 MenuAEffects *aeffects;
97 MenuVEffects *veffects;
99 // for previous document loader
101 LoadPrevious *load[TOTAL_LOADS];
105 RecordMenuItem *record_menu_item;
108 MenuAEffectItem *aeffect[TOTAL_EFFECTS];
109 MenuVEffectItem *veffect[TOTAL_EFFECTS];
110 Quit *quit_program; // affected by save
115 BC_Menu *filemenu, *audiomenu, *videomenu; // needed by most recents
117 KeyframeType *keyframe_type;
118 LabelsFollowEdits *labels_follow_edits;
119 PluginsFollowEdits *plugins_follow_edits;
120 KeyframesFollowEdits *keyframes_follow_edits;
121 CursorOnFrames *cursor_on_frames;
122 TypelessKeyframes *typeless_keyframes;
123 LoopPlayback *loop_playback;
124 ShowAssets *show_assets;
125 ShowTitles *show_titles;
126 ShowTransitions *show_transitions;
127 ShowAutomation *fade_automation;
128 ShowAutomation *mute_automation;
129 ShowAutomation *pan_automation;
130 ShowAutomation *camera_x;
131 ShowAutomation *camera_y;
132 ShowAutomation *camera_z;
133 ShowAutomation *project_x;
134 ShowAutomation *project_y;
135 ShowAutomation *project_z;
136 PluginAutomation *plugin_automation;
137 ShowAutomation *mask_automation;
138 ShowAutomation *mode_automation;
139 ShowAutomation *speed_automation;
140 ShowVWindow *show_vwindow;
141 ShowAWindow *show_awindow;
142 ShowCWindow *show_cwindow;
143 ShowGWindow *show_gwindow;
144 ShowLWindow *show_lwindow;
149 // ========================================= edit
151 class Undo : public BC_MenuItem
154 Undo(MWindow *mwindow);
156 int update_caption(const char *new_caption = "");
162 class DumpCICache : public BC_MenuItem
165 DumpCICache(MWindow *mwindow);
170 class DumpEDL : public BC_MenuItem
173 DumpEDL(MWindow *mwindow);
178 class DumpPlugins : public BC_MenuItem
181 DumpPlugins(MWindow *mwindow);
186 class DumpAssets : public BC_MenuItem
189 DumpAssets(MWindow *mwindow);
194 class Redo : public BC_MenuItem
197 Redo(MWindow *mwindow);
199 int update_caption(const char *new_caption = "");
203 class Cut : public BC_MenuItem
206 Cut(MWindow *mwindow);
211 class Copy : public BC_MenuItem
214 Copy(MWindow *mwindow);
219 class Paste : public BC_MenuItem
222 Paste(MWindow *mwindow);
227 class Clear : public BC_MenuItem
230 Clear(MWindow *mwindow);
235 class CutKeyframes : public BC_MenuItem
238 CutKeyframes(MWindow *mwindow);
243 class CopyKeyframes : public BC_MenuItem
246 CopyKeyframes(MWindow *mwindow);
251 class PasteKeyframes : public BC_MenuItem
254 PasteKeyframes(MWindow *mwindow);
260 class ClearKeyframes : public BC_MenuItem
263 ClearKeyframes(MWindow *mwindow);
268 class StraightenKeyframes : public BC_MenuItem
271 StraightenKeyframes(MWindow *mwindow);
276 class BendKeyframes : public BC_MenuItem
279 BendKeyframes(MWindow *mwindow);
284 class KeyframeType : public BC_MenuItem
287 KeyframeType(MWindow *mwindow, int type);
293 class CutDefaultKeyframe : public BC_MenuItem
296 CutDefaultKeyframe(MWindow *mwindow);
301 class CopyDefaultKeyframe : public BC_MenuItem
304 CopyDefaultKeyframe(MWindow *mwindow);
309 class PasteDefaultKeyframe : public BC_MenuItem
312 PasteDefaultKeyframe(MWindow *mwindow);
317 class ClearDefaultKeyframe : public BC_MenuItem
320 ClearDefaultKeyframe(MWindow *mwindow);
325 class PasteSilence : public BC_MenuItem
328 PasteSilence(MWindow *mwindow);
333 class SelectAll : public BC_MenuItem
336 SelectAll(MWindow *mwindow);
341 class ClearLabels : public BC_MenuItem
344 ClearLabels(MWindow *mwindow);
349 class CutCommercials : public BC_MenuItem
352 CutCommercials(MWindow *mwindow);
357 class DetachTransitions : public BC_MenuItem
360 DetachTransitions(MWindow *mwindow);
365 class MuteSelection : public BC_MenuItem
368 MuteSelection(MWindow *mwindow);
373 class TrimSelection : public BC_MenuItem
376 TrimSelection(MWindow *mwindow);
381 // ======================================== audio
383 class AddAudioTrack : public BC_MenuItem
386 AddAudioTrack(MWindow *mwindow);
391 class DeleteAudioTrack : public BC_MenuItem
394 DeleteAudioTrack(MWindow *mwindow);
399 class DefaultATransition : public BC_MenuItem
402 DefaultATransition(MWindow *mwindow);
407 class MapAudio1 : public BC_MenuItem
410 MapAudio1(MWindow *mwindow);
415 class MapAudio2 : public BC_MenuItem
418 MapAudio2(MWindow *mwindow);
423 // ========================================== video
426 class AddVideoTrack : public BC_MenuItem
429 AddVideoTrack(MWindow *mwindow);
435 class DeleteVideoTrack : public BC_MenuItem
438 DeleteVideoTrack(MWindow *mwindow);
443 class ResetTranslation : public BC_MenuItem
446 ResetTranslation(MWindow *mwindow);
451 class DefaultVTransition : public BC_MenuItem
454 DefaultVTransition(MWindow *mwindow);
460 // ========================================== subtitle
462 class AddSubttlTrack : public BC_MenuItem
465 AddSubttlTrack(MWindow *mwindow);
470 class PasteSubttl : public BC_MenuItem
473 PasteSubttl(MWindow *mwindow);
479 // ========================================== settings
482 class MoveTracksUp : public BC_MenuItem
485 MoveTracksUp(MWindow *mwindow);
490 class MoveTracksDown : public BC_MenuItem
493 MoveTracksDown(MWindow *mwindow);
498 class DeleteTracks : public BC_MenuItem
501 DeleteTracks(MWindow *mwindow);
506 class ConcatenateTracks : public BC_MenuItem
509 ConcatenateTracks(MWindow *mwindow);
514 class DeleteTrack : public BC_MenuItem
517 DeleteTrack(MWindow *mwindow);
522 class LoopPlayback : public BC_MenuItem
525 LoopPlayback(MWindow *mwindow);
531 class SetBRenderStart : public BC_MenuItem
534 SetBRenderStart(MWindow *mwindow);
539 class LabelsFollowEdits : public BC_MenuItem
542 LabelsFollowEdits(MWindow *mwindow);
547 class PluginsFollowEdits : public BC_MenuItem
550 PluginsFollowEdits(MWindow *mwindow);
555 class KeyframesFollowEdits : public BC_MenuItem
558 KeyframesFollowEdits(MWindow *mwindow);
563 class CursorOnFrames : public BC_MenuItem
566 CursorOnFrames(MWindow *mwindow);
571 class TypelessKeyframes : public BC_MenuItem
574 TypelessKeyframes(MWindow *mwindow);
579 class ScrubSpeed : public BC_MenuItem
582 ScrubSpeed(MWindow *mwindow);
587 class SaveSettingsNow : public BC_MenuItem
590 SaveSettingsNow(MWindow *mwindow);
595 // ========================================== window
596 class ShowVWindow : public BC_MenuItem
599 ShowVWindow(MWindow *mwindow);
604 class ShowAWindow : public BC_MenuItem
607 ShowAWindow(MWindow *mwindow);
612 class ShowGWindow : public BC_MenuItem
615 ShowGWindow(MWindow *mwindow);
620 class ShowCWindow : public BC_MenuItem
623 ShowCWindow(MWindow *mwindow);
628 class ShowLWindow : public BC_MenuItem
631 ShowLWindow(MWindow *mwindow);
636 class TileWindows : public BC_MenuItem
639 TileWindows(MWindow *mwindow, const char *item_title, int config,
640 const char *hot_keytext="", int hot_key=0);
646 class SplitX : public BC_MenuItem
649 SplitX(MWindow *mwindow);
654 class SplitY : public BC_MenuItem
657 SplitY(MWindow *mwindow);