00001 #ifndef MAINMENU_H 00002 #define MAINMENU_H 00003 00004 class AEffectMenu; 00005 class LabelsFollowEdits; 00006 class PluginsFollowEdits; 00007 class CursorOnFrames; 00008 class LoopPlayback; 00009 00010 class Redo; 00011 class ShowVWindow; 00012 class ShowAWindow; 00013 class ShowGWindow; 00014 class ShowCWindow; 00015 class ShowLWindow; 00016 class Undo; 00017 00018 #include "arraylist.h" 00019 #include "guicast.h" 00020 #include "bchash.inc" 00021 #include "loadfile.inc" 00022 #include "mwindow.inc" 00023 #include "mwindowgui.inc" 00024 #include "maxchannels.h" 00025 #include "menuaeffects.inc" 00026 #include "menuveffects.inc" 00027 #include "module.inc" 00028 #include "new.inc" 00029 #include "plugindialog.inc" 00030 #include "quit.inc" 00031 #include "record.inc" 00032 #include "render.inc" 00033 #include "threadloader.inc" 00034 #include "viewmenu.inc" 00035 00036 #define TOTAL_LOADS 10 // number of files to cache 00037 #define TOTAL_EFFECTS 10 // number of effects to cache 00038 00039 class MainMenu : public BC_MenuBar 00040 { 00041 public: 00042 MainMenu(MWindow *mwindow, MWindowGUI *gui); 00043 ~MainMenu(); 00044 int create_objects(); 00045 int load_defaults(BC_Hash *defaults); 00046 int save_defaults(BC_Hash *defaults); 00047 00048 // most recent loads 00049 int add_load(char *path); 00050 int init_loads(BC_Hash *defaults); 00051 00052 // most recent effects 00053 int init_aeffects(BC_Hash *defaults); 00054 int save_aeffects(BC_Hash *defaults); 00055 int add_aeffect(char *title); 00056 int init_veffects(BC_Hash *defaults); 00057 int save_veffects(BC_Hash *defaults); 00058 int add_veffect(char *title); 00059 00060 int quit(); 00061 // show only one of these at a time 00062 int set_show_autos(); 00063 void update_toggles(int use_lock); 00064 00065 MWindowGUI *gui; 00066 MWindow *mwindow; 00067 ThreadLoader *threadloader; 00068 MenuAEffects *aeffects; 00069 MenuVEffects *veffects; 00070 00071 Load *load_file; 00072 BC_RecentList *recent_load; 00073 LoadPrevious *load[TOTAL_LOADS]; 00074 00075 00076 RecordMenuItem *record; 00077 RenderItem *render; 00078 New *new_project; 00079 MenuAEffectItem *aeffect[TOTAL_EFFECTS]; 00080 MenuVEffectItem *veffect[TOTAL_EFFECTS]; 00081 Quit *quit_program; // affected by save 00082 Undo *undo; 00083 Redo *redo; 00084 int total_aeffects; 00085 int total_veffects; 00086 BC_Menu *filemenu, *audiomenu, *videomenu; // needed by most recents 00087 00088 LabelsFollowEdits *labels_follow_edits; 00089 PluginsFollowEdits *plugins_follow_edits; 00090 CursorOnFrames *cursor_on_frames; 00091 LoopPlayback *loop_playback; 00092 ShowAssets *show_assets; 00093 ShowTitles *show_titles; 00094 ShowTransitions *show_transitions; 00095 ShowAutomation *fade_automation; 00096 ShowAutomation *mute_automation; 00097 ShowAutomation *pan_automation; 00098 ShowAutomation *camera_x; 00099 ShowAutomation *camera_y; 00100 ShowAutomation *camera_z; 00101 ShowAutomation *project_x; 00102 ShowAutomation *project_y; 00103 ShowAutomation *project_z; 00104 PluginAutomation *plugin_automation; 00105 ShowAutomation *mask_automation; 00106 ShowAutomation *mode_automation; 00107 ShowVWindow *show_vwindow; 00108 ShowAWindow *show_awindow; 00109 ShowCWindow *show_cwindow; 00110 ShowGWindow *show_gwindow; 00111 ShowLWindow *show_lwindow; 00112 }; 00113 00114 // ========================================= edit 00115 00116 class Undo : public BC_MenuItem 00117 { 00118 public: 00119 Undo(MWindow *mwindow); 00120 int handle_event(); 00121 int update_caption(char *new_caption = ""); 00122 MWindow *mwindow; 00123 }; 00124 00125 00126 00127 class DumpCICache : public BC_MenuItem 00128 { 00129 public: 00130 DumpCICache(MWindow *mwindow); 00131 int handle_event(); 00132 MWindow *mwindow; 00133 }; 00134 00135 class DumpEDL : public BC_MenuItem 00136 { 00137 public: 00138 DumpEDL(MWindow *mwindow); 00139 int handle_event(); 00140 MWindow *mwindow; 00141 }; 00142 00143 class DumpPlugins : public BC_MenuItem 00144 { 00145 public: 00146 DumpPlugins(MWindow *mwindow); 00147 int handle_event(); 00148 MWindow *mwindow; 00149 }; 00150 00151 class DumpAssets : public BC_MenuItem 00152 { 00153 public: 00154 DumpAssets(MWindow *mwindow); 00155 int handle_event(); 00156 MWindow *mwindow; 00157 }; 00158 00159 class Redo : public BC_MenuItem 00160 { 00161 public: 00162 Redo(MWindow *mwindow); 00163 int handle_event(); 00164 int update_caption(char *new_caption = ""); 00165 MWindow *mwindow; 00166 }; 00167 00168 class Cut : public BC_MenuItem 00169 { 00170 public: 00171 Cut(MWindow *mwindow); 00172 int handle_event(); 00173 MWindow *mwindow; 00174 }; 00175 00176 class Copy : public BC_MenuItem 00177 { 00178 public: 00179 Copy(MWindow *mwindow); 00180 int handle_event(); 00181 MWindow *mwindow; 00182 }; 00183 00184 class Paste : public BC_MenuItem 00185 { 00186 public: 00187 Paste(MWindow *mwindow); 00188 int handle_event(); 00189 MWindow *mwindow; 00190 }; 00191 00192 class Clear : public BC_MenuItem 00193 { 00194 public: 00195 Clear(MWindow *mwindow); 00196 int handle_event(); 00197 MWindow *mwindow; 00198 }; 00199 00200 class CutKeyframes : public BC_MenuItem 00201 { 00202 public: 00203 CutKeyframes(MWindow *mwindow); 00204 int handle_event(); 00205 MWindow *mwindow; 00206 }; 00207 00208 class CopyKeyframes : public BC_MenuItem 00209 { 00210 public: 00211 CopyKeyframes(MWindow *mwindow); 00212 int handle_event(); 00213 MWindow *mwindow; 00214 }; 00215 00216 class PasteKeyframes : public BC_MenuItem 00217 { 00218 public: 00219 PasteKeyframes(MWindow *mwindow); 00220 int handle_event(); 00221 MWindow *mwindow; 00222 }; 00223 00224 class ClearKeyframes : public BC_MenuItem 00225 { 00226 public: 00227 ClearKeyframes(MWindow *mwindow); 00228 int handle_event(); 00229 MWindow *mwindow; 00230 }; 00231 00232 class StraightenKeyframes : public BC_MenuItem 00233 { 00234 public: 00235 StraightenKeyframes(MWindow *mwindow); 00236 int handle_event(); 00237 MWindow *mwindow; 00238 }; 00239 00240 class CutDefaultKeyframe : public BC_MenuItem 00241 { 00242 public: 00243 CutDefaultKeyframe(MWindow *mwindow); 00244 int handle_event(); 00245 MWindow *mwindow; 00246 }; 00247 00248 class CopyDefaultKeyframe : public BC_MenuItem 00249 { 00250 public: 00251 CopyDefaultKeyframe(MWindow *mwindow); 00252 int handle_event(); 00253 MWindow *mwindow; 00254 }; 00255 00256 class PasteDefaultKeyframe : public BC_MenuItem 00257 { 00258 public: 00259 PasteDefaultKeyframe(MWindow *mwindow); 00260 int handle_event(); 00261 MWindow *mwindow; 00262 }; 00263 00264 class ClearDefaultKeyframe : public BC_MenuItem 00265 { 00266 public: 00267 ClearDefaultKeyframe(MWindow *mwindow); 00268 int handle_event(); 00269 MWindow *mwindow; 00270 }; 00271 00272 class PasteSilence : public BC_MenuItem 00273 { 00274 public: 00275 PasteSilence(MWindow *mwindow); 00276 int handle_event(); 00277 MWindow *mwindow; 00278 }; 00279 00280 class SelectAll : public BC_MenuItem 00281 { 00282 public: 00283 SelectAll(MWindow *mwindow); 00284 int handle_event(); 00285 MWindow *mwindow; 00286 }; 00287 00288 class ClearLabels : public BC_MenuItem 00289 { 00290 public: 00291 ClearLabels(MWindow *mwindow); 00292 int handle_event(); 00293 MWindow *mwindow; 00294 }; 00295 00296 class MuteSelection : public BC_MenuItem 00297 { 00298 public: 00299 MuteSelection(MWindow *mwindow); 00300 int handle_event(); 00301 MWindow *mwindow; 00302 }; 00303 00304 class TrimSelection : public BC_MenuItem 00305 { 00306 public: 00307 TrimSelection(MWindow *mwindow); 00308 int handle_event(); 00309 MWindow *mwindow; 00310 }; 00311 00312 // ======================================== audio 00313 00314 class AddAudioTrack : public BC_MenuItem 00315 { 00316 public: 00317 AddAudioTrack(MWindow *mwindow); 00318 int handle_event(); 00319 MWindow *mwindow; 00320 }; 00321 00322 class DeleteAudioTrack : public BC_MenuItem 00323 { 00324 public: 00325 DeleteAudioTrack(MWindow *mwindow); 00326 int handle_event(); 00327 MWindow *mwindow; 00328 }; 00329 00330 class DefaultATransition : public BC_MenuItem 00331 { 00332 public: 00333 DefaultATransition(MWindow *mwindow); 00334 int handle_event(); 00335 MWindow *mwindow; 00336 }; 00337 00338 class MapAudio1 : public BC_MenuItem 00339 { 00340 public: 00341 MapAudio1(MWindow *mwindow); 00342 int handle_event(); 00343 MWindow *mwindow; 00344 }; 00345 00346 class MapAudio2 : public BC_MenuItem 00347 { 00348 public: 00349 MapAudio2(MWindow *mwindow); 00350 int handle_event(); 00351 MWindow *mwindow; 00352 }; 00353 00354 // ========================================== video 00355 00356 00357 class AddVideoTrack : public BC_MenuItem 00358 { 00359 public: 00360 AddVideoTrack(MWindow *mwindow); 00361 int handle_event(); 00362 MWindow *mwindow; 00363 }; 00364 00365 00366 class DeleteVideoTrack : public BC_MenuItem 00367 { 00368 public: 00369 DeleteVideoTrack(MWindow *mwindow); 00370 int handle_event(); 00371 MWindow *mwindow; 00372 }; 00373 00374 class ResetTranslation : public BC_MenuItem 00375 { 00376 public: 00377 ResetTranslation(MWindow *mwindow); 00378 int handle_event(); 00379 MWindow *mwindow; 00380 }; 00381 00382 class DefaultVTransition : public BC_MenuItem 00383 { 00384 public: 00385 DefaultVTransition(MWindow *mwindow); 00386 int handle_event(); 00387 MWindow *mwindow; 00388 }; 00389 00390 // ========================================== settings 00391 00392 00393 class MoveTracksUp : public BC_MenuItem 00394 { 00395 public: 00396 MoveTracksUp(MWindow *mwindow); 00397 int handle_event(); 00398 MWindow *mwindow; 00399 }; 00400 00401 class MoveTracksDown : public BC_MenuItem 00402 { 00403 public: 00404 MoveTracksDown(MWindow *mwindow); 00405 int handle_event(); 00406 MWindow *mwindow; 00407 }; 00408 00409 class DeleteTracks : public BC_MenuItem 00410 { 00411 public: 00412 DeleteTracks(MWindow *mwindow); 00413 int handle_event(); 00414 MWindow *mwindow; 00415 }; 00416 00417 class ConcatenateTracks : public BC_MenuItem 00418 { 00419 public: 00420 ConcatenateTracks(MWindow *mwindow); 00421 int handle_event(); 00422 MWindow *mwindow; 00423 }; 00424 00425 class DeleteTrack : public BC_MenuItem 00426 { 00427 public: 00428 DeleteTrack(MWindow *mwindow); 00429 int handle_event(); 00430 MWindow *mwindow; 00431 }; 00432 00433 class LoopPlayback : public BC_MenuItem 00434 { 00435 public: 00436 LoopPlayback(MWindow *mwindow); 00437 00438 int handle_event(); 00439 MWindow *mwindow; 00440 }; 00441 00442 class SetBRenderStart : public BC_MenuItem 00443 { 00444 public: 00445 SetBRenderStart(MWindow *mwindow); 00446 int handle_event(); 00447 MWindow *mwindow; 00448 }; 00449 00450 class LabelsFollowEdits : public BC_MenuItem 00451 { 00452 public: 00453 LabelsFollowEdits(MWindow *mwindow); 00454 int handle_event(); 00455 MWindow *mwindow; 00456 }; 00457 00458 class PluginsFollowEdits : public BC_MenuItem 00459 { 00460 public: 00461 PluginsFollowEdits(MWindow *mwindow); 00462 int handle_event(); 00463 MWindow *mwindow; 00464 }; 00465 00466 class CursorOnFrames : public BC_MenuItem 00467 { 00468 public: 00469 CursorOnFrames(MWindow *mwindow); 00470 int handle_event(); 00471 MWindow *mwindow; 00472 }; 00473 00474 class AutosFollowEdits : public BC_MenuItem 00475 { 00476 public: 00477 AutosFollowEdits(MWindow *mwindow); 00478 int handle_event(); 00479 MWindow *mwindow; 00480 }; 00481 00482 class ScrubSpeed : public BC_MenuItem 00483 { 00484 public: 00485 ScrubSpeed(MWindow *mwindow); 00486 int handle_event(); 00487 MWindow *mwindow; 00488 }; 00489 00490 class SaveSettingsNow : public BC_MenuItem 00491 { 00492 public: 00493 SaveSettingsNow(MWindow *mwindow); 00494 int handle_event(); 00495 MWindow *mwindow; 00496 }; 00497 00498 // ========================================== window 00499 class ShowVWindow : public BC_MenuItem 00500 { 00501 public: 00502 ShowVWindow(MWindow *mwindow); 00503 int handle_event(); 00504 MWindow *mwindow; 00505 }; 00506 00507 class ShowAWindow : public BC_MenuItem 00508 { 00509 public: 00510 ShowAWindow(MWindow *mwindow); 00511 int handle_event(); 00512 MWindow *mwindow; 00513 }; 00514 00515 class ShowGWindow : public BC_MenuItem 00516 { 00517 public: 00518 ShowGWindow(MWindow *mwindow); 00519 int handle_event(); 00520 MWindow *mwindow; 00521 }; 00522 00523 class ShowCWindow : public BC_MenuItem 00524 { 00525 public: 00526 ShowCWindow(MWindow *mwindow); 00527 int handle_event(); 00528 MWindow *mwindow; 00529 }; 00530 00531 class ShowLWindow : public BC_MenuItem 00532 { 00533 public: 00534 ShowLWindow(MWindow *mwindow); 00535 int handle_event(); 00536 MWindow *mwindow; 00537 }; 00538 00539 class TileWindows : public BC_MenuItem 00540 { 00541 public: 00542 TileWindows(MWindow *mwindow); 00543 int handle_event(); 00544 MWindow *mwindow; 00545 }; 00546 00547 #endif
1.5.5