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 "defaults.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(Defaults *defaults); 00046 int save_defaults(Defaults *defaults); 00047 00048 // most recent loads 00049 int add_load(char *new_path); 00050 int init_loads(Defaults *defaults); 00051 00052 // most recent effects 00053 int init_aeffects(Defaults *defaults); 00054 int save_aeffects(Defaults *defaults); 00055 int add_aeffect(char *title); 00056 int init_veffects(Defaults *defaults); 00057 int save_veffects(Defaults *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 RecordMenuItem *record; 00076 RenderItem *render; 00077 New *new_project; 00078 MenuAEffectItem *aeffect[TOTAL_EFFECTS]; 00079 MenuVEffectItem *veffect[TOTAL_EFFECTS]; 00080 Quit *quit_program; // affected by save 00081 Undo *undo; 00082 Redo *redo; 00083 int total_aeffects; 00084 int total_veffects; 00085 BC_Menu *filemenu, *audiomenu, *videomenu; // needed by most recents 00086 00087 LabelsFollowEdits *labels_follow_edits; 00088 PluginsFollowEdits *plugins_follow_edits; 00089 CursorOnFrames *cursor_on_frames; 00090 LoopPlayback *loop_playback; 00091 ShowAssets *show_assets; 00092 ShowTitles *show_titles; 00093 ShowTransitions *show_transitions; 00094 ShowAutomation *fade_automation; 00095 ShowAutomation *mute_automation; 00096 ShowAutomation *pan_automation; 00097 ShowAutomation *camera_x; 00098 ShowAutomation *camera_y; 00099 ShowAutomation *camera_z; 00100 ShowAutomation *project_x; 00101 ShowAutomation *project_y; 00102 ShowAutomation *project_z; 00103 PluginAutomation *plugin_automation; 00104 ShowAutomation *mask_automation; 00105 ShowAutomation *mode_automation; 00106 ShowVWindow *show_vwindow; 00107 ShowAWindow *show_awindow; 00108 ShowCWindow *show_cwindow; 00109 ShowGWindow *show_gwindow; 00110 ShowLWindow *show_lwindow; 00111 }; 00112 00113 // ========================================= edit 00114 00115 class Undo : public BC_MenuItem 00116 { 00117 public: 00118 Undo(MWindow *mwindow); 00119 int handle_event(); 00120 int update_caption(char *new_caption = ""); 00121 MWindow *mwindow; 00122 }; 00123 00124 00125 00126 class DumpCICache : public BC_MenuItem 00127 { 00128 public: 00129 DumpCICache(MWindow *mwindow); 00130 int handle_event(); 00131 MWindow *mwindow; 00132 }; 00133 00134 class DumpEDL : public BC_MenuItem 00135 { 00136 public: 00137 DumpEDL(MWindow *mwindow); 00138 int handle_event(); 00139 MWindow *mwindow; 00140 }; 00141 00142 class DumpPlugins : public BC_MenuItem 00143 { 00144 public: 00145 DumpPlugins(MWindow *mwindow); 00146 int handle_event(); 00147 MWindow *mwindow; 00148 }; 00149 00150 class DumpAssets : public BC_MenuItem 00151 { 00152 public: 00153 DumpAssets(MWindow *mwindow); 00154 int handle_event(); 00155 MWindow *mwindow; 00156 }; 00157 00158 class Redo : public BC_MenuItem 00159 { 00160 public: 00161 Redo(MWindow *mwindow); 00162 int handle_event(); 00163 int update_caption(char *new_caption = ""); 00164 MWindow *mwindow; 00165 }; 00166 00167 class Cut : public BC_MenuItem 00168 { 00169 public: 00170 Cut(MWindow *mwindow); 00171 int handle_event(); 00172 MWindow *mwindow; 00173 }; 00174 00175 class Copy : public BC_MenuItem 00176 { 00177 public: 00178 Copy(MWindow *mwindow); 00179 int handle_event(); 00180 MWindow *mwindow; 00181 }; 00182 00183 class Paste : public BC_MenuItem 00184 { 00185 public: 00186 Paste(MWindow *mwindow); 00187 int handle_event(); 00188 MWindow *mwindow; 00189 }; 00190 00191 class Clear : public BC_MenuItem 00192 { 00193 public: 00194 Clear(MWindow *mwindow); 00195 int handle_event(); 00196 MWindow *mwindow; 00197 }; 00198 00199 class CutKeyframes : public BC_MenuItem 00200 { 00201 public: 00202 CutKeyframes(MWindow *mwindow); 00203 int handle_event(); 00204 MWindow *mwindow; 00205 }; 00206 00207 class CopyKeyframes : public BC_MenuItem 00208 { 00209 public: 00210 CopyKeyframes(MWindow *mwindow); 00211 int handle_event(); 00212 MWindow *mwindow; 00213 }; 00214 00215 class PasteKeyframes : public BC_MenuItem 00216 { 00217 public: 00218 PasteKeyframes(MWindow *mwindow); 00219 int handle_event(); 00220 MWindow *mwindow; 00221 }; 00222 00223 class ClearKeyframes : public BC_MenuItem 00224 { 00225 public: 00226 ClearKeyframes(MWindow *mwindow); 00227 int handle_event(); 00228 MWindow *mwindow; 00229 }; 00230 00231 class CutDefaultKeyframe : public BC_MenuItem 00232 { 00233 public: 00234 CutDefaultKeyframe(MWindow *mwindow); 00235 int handle_event(); 00236 MWindow *mwindow; 00237 }; 00238 00239 class CopyDefaultKeyframe : public BC_MenuItem 00240 { 00241 public: 00242 CopyDefaultKeyframe(MWindow *mwindow); 00243 int handle_event(); 00244 MWindow *mwindow; 00245 }; 00246 00247 class PasteDefaultKeyframe : public BC_MenuItem 00248 { 00249 public: 00250 PasteDefaultKeyframe(MWindow *mwindow); 00251 int handle_event(); 00252 MWindow *mwindow; 00253 }; 00254 00255 class ClearDefaultKeyframe : public BC_MenuItem 00256 { 00257 public: 00258 ClearDefaultKeyframe(MWindow *mwindow); 00259 int handle_event(); 00260 MWindow *mwindow; 00261 }; 00262 00263 class PasteSilence : public BC_MenuItem 00264 { 00265 public: 00266 PasteSilence(MWindow *mwindow); 00267 int handle_event(); 00268 MWindow *mwindow; 00269 }; 00270 00271 class SelectAll : public BC_MenuItem 00272 { 00273 public: 00274 SelectAll(MWindow *mwindow); 00275 int handle_event(); 00276 MWindow *mwindow; 00277 }; 00278 00279 class ClearLabels : public BC_MenuItem 00280 { 00281 public: 00282 ClearLabels(MWindow *mwindow); 00283 int handle_event(); 00284 MWindow *mwindow; 00285 }; 00286 00287 class MuteSelection : public BC_MenuItem 00288 { 00289 public: 00290 MuteSelection(MWindow *mwindow); 00291 int handle_event(); 00292 MWindow *mwindow; 00293 }; 00294 00295 class TrimSelection : public BC_MenuItem 00296 { 00297 public: 00298 TrimSelection(MWindow *mwindow); 00299 int handle_event(); 00300 MWindow *mwindow; 00301 }; 00302 00303 // ======================================== audio 00304 00305 class AddAudioTrack : public BC_MenuItem 00306 { 00307 public: 00308 AddAudioTrack(MWindow *mwindow); 00309 int handle_event(); 00310 MWindow *mwindow; 00311 }; 00312 00313 class DeleteAudioTrack : public BC_MenuItem 00314 { 00315 public: 00316 DeleteAudioTrack(MWindow *mwindow); 00317 int handle_event(); 00318 MWindow *mwindow; 00319 }; 00320 00321 class DefaultATransition : public BC_MenuItem 00322 { 00323 public: 00324 DefaultATransition(MWindow *mwindow); 00325 int handle_event(); 00326 MWindow *mwindow; 00327 }; 00328 00329 // ========================================== video 00330 00331 00332 class AddVideoTrack : public BC_MenuItem 00333 { 00334 public: 00335 AddVideoTrack(MWindow *mwindow); 00336 int handle_event(); 00337 MWindow *mwindow; 00338 }; 00339 00340 00341 class DeleteVideoTrack : public BC_MenuItem 00342 { 00343 public: 00344 DeleteVideoTrack(MWindow *mwindow); 00345 int handle_event(); 00346 MWindow *mwindow; 00347 }; 00348 00349 class ResetTranslation : public BC_MenuItem 00350 { 00351 public: 00352 ResetTranslation(MWindow *mwindow); 00353 int handle_event(); 00354 MWindow *mwindow; 00355 }; 00356 00357 class DefaultVTransition : public BC_MenuItem 00358 { 00359 public: 00360 DefaultVTransition(MWindow *mwindow); 00361 int handle_event(); 00362 MWindow *mwindow; 00363 }; 00364 00365 // ========================================== settings 00366 00367 00368 class MoveTracksUp : public BC_MenuItem 00369 { 00370 public: 00371 MoveTracksUp(MWindow *mwindow); 00372 int handle_event(); 00373 MWindow *mwindow; 00374 }; 00375 00376 class MoveTracksDown : public BC_MenuItem 00377 { 00378 public: 00379 MoveTracksDown(MWindow *mwindow); 00380 int handle_event(); 00381 MWindow *mwindow; 00382 }; 00383 00384 class DeleteTracks : public BC_MenuItem 00385 { 00386 public: 00387 DeleteTracks(MWindow *mwindow); 00388 int handle_event(); 00389 MWindow *mwindow; 00390 }; 00391 00392 class ConcatenateTracks : public BC_MenuItem 00393 { 00394 public: 00395 ConcatenateTracks(MWindow *mwindow); 00396 int handle_event(); 00397 MWindow *mwindow; 00398 }; 00399 00400 class DeleteTrack : public BC_MenuItem 00401 { 00402 public: 00403 DeleteTrack(MWindow *mwindow); 00404 int handle_event(); 00405 MWindow *mwindow; 00406 }; 00407 00408 class LoopPlayback : public BC_MenuItem 00409 { 00410 public: 00411 LoopPlayback(MWindow *mwindow); 00412 00413 int handle_event(); 00414 MWindow *mwindow; 00415 }; 00416 00417 class SetBRenderStart : public BC_MenuItem 00418 { 00419 public: 00420 SetBRenderStart(MWindow *mwindow); 00421 int handle_event(); 00422 MWindow *mwindow; 00423 }; 00424 00425 class LabelsFollowEdits : public BC_MenuItem 00426 { 00427 public: 00428 LabelsFollowEdits(MWindow *mwindow); 00429 int handle_event(); 00430 MWindow *mwindow; 00431 }; 00432 00433 class PluginsFollowEdits : public BC_MenuItem 00434 { 00435 public: 00436 PluginsFollowEdits(MWindow *mwindow); 00437 int handle_event(); 00438 MWindow *mwindow; 00439 }; 00440 00441 class CursorOnFrames : public BC_MenuItem 00442 { 00443 public: 00444 CursorOnFrames(MWindow *mwindow); 00445 int handle_event(); 00446 MWindow *mwindow; 00447 }; 00448 00449 class AutosFollowEdits : public BC_MenuItem 00450 { 00451 public: 00452 AutosFollowEdits(MWindow *mwindow); 00453 int handle_event(); 00454 MWindow *mwindow; 00455 }; 00456 00457 class ScrubSpeed : public BC_MenuItem 00458 { 00459 public: 00460 ScrubSpeed(MWindow *mwindow); 00461 int handle_event(); 00462 MWindow *mwindow; 00463 }; 00464 00465 class SaveSettingsNow : public BC_MenuItem 00466 { 00467 public: 00468 SaveSettingsNow(MWindow *mwindow); 00469 int handle_event(); 00470 MWindow *mwindow; 00471 }; 00472 00473 // ========================================== window 00474 class ShowVWindow : public BC_MenuItem 00475 { 00476 public: 00477 ShowVWindow(MWindow *mwindow); 00478 int handle_event(); 00479 MWindow *mwindow; 00480 }; 00481 00482 class ShowAWindow : public BC_MenuItem 00483 { 00484 public: 00485 ShowAWindow(MWindow *mwindow); 00486 int handle_event(); 00487 MWindow *mwindow; 00488 }; 00489 00490 class ShowGWindow : public BC_MenuItem 00491 { 00492 public: 00493 ShowGWindow(MWindow *mwindow); 00494 int handle_event(); 00495 MWindow *mwindow; 00496 }; 00497 00498 class ShowCWindow : public BC_MenuItem 00499 { 00500 public: 00501 ShowCWindow(MWindow *mwindow); 00502 int handle_event(); 00503 MWindow *mwindow; 00504 }; 00505 00506 class ShowLWindow : public BC_MenuItem 00507 { 00508 public: 00509 ShowLWindow(MWindow *mwindow); 00510 int handle_event(); 00511 MWindow *mwindow; 00512 }; 00513 00514 class TileWindows : public BC_MenuItem 00515 { 00516 public: 00517 TileWindows(MWindow *mwindow); 00518 int handle_event(); 00519 MWindow *mwindow; 00520 }; 00521 00522 #endif
1.4.4