RafaMar + programmer friend Help button in Batch Render addition
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / mainmenu.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
5  *
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.
10  *
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.
15  *
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
19  *
20  */
21
22 #ifndef MAINMENU_H
23 #define MAINMENU_H
24
25 #include "arraylist.h"
26 #include "guicast.h"
27 #include "bchash.inc"
28 #include "loadfile.inc"
29 #include "mainmenu.inc"
30 #include "mwindow.inc"
31 #include "mwindowgui.inc"
32 #include "maxchannels.h"
33 #include "menuaeffects.inc"
34 #include "menuveffects.inc"
35 #include "module.inc"
36 #include "new.inc"
37 #include "plugindialog.inc"
38 #include "proxy.inc"
39 #include "quit.inc"
40 #include "record.inc"
41 #include "render.inc"
42 #include "threadloader.inc"
43 #include "viewmenu.inc"
44
45 #define TOTAL_LOADS 20       // number of files to cache
46 #define TOTAL_EFFECTS 10     // number of effects to cache
47
48 #define LAYOUT_LOAD 0
49 #define LAYOUT_SAVE 1
50
51 class LoadRecentItem
52 {
53 public:
54         LoadRecentItem(const char *path);
55         ~LoadRecentItem();
56         char *path;
57 };
58
59 class LoadRecentItems : public ArrayList<LoadRecentItem *>
60 {
61 public:
62         LoadRecentItems();
63         ~LoadRecentItems();
64         int add_load(char *path);
65 };
66
67 class LoadRecentSubMenu : public BC_SubMenu
68 {
69 public:
70         LoadRecentSubMenu(LoadRecent *load_recent);
71         ~LoadRecentSubMenu();
72
73         LoadRecent *load_recent;
74 };
75
76 class LoadRecent : public BC_MenuItem
77 {
78 public:
79         LoadRecent(MWindow *mwindow, MainMenu *main_menu);
80         ~LoadRecent();
81         void create_objects();
82         LoadPrevious *get_next_item();
83         int activate_submenu();
84         void scan_items(int use_xml);
85
86         MWindow *mwindow;
87         MainMenu *main_menu;
88         LoadRecentSubMenu *submenu;
89         int total_items;
90 };
91
92
93 class MainMenu : public BC_MenuBar
94 {
95 public:
96         MainMenu(MWindow *mwindow, MWindowGUI *gui, int w);
97         ~MainMenu();
98         void create_objects();
99         int load_defaults(BC_Hash *defaults);
100         int save_defaults(BC_Hash *defaults);
101
102 // most recent loads
103         int add_load(char *path);
104         void init_loads(BC_Hash *defaults);
105
106 // most recent effects
107         int init_aeffects(BC_Hash *defaults);
108         int save_aeffects(BC_Hash *defaults);
109         int add_aeffect(char *title);
110         int init_veffects(BC_Hash *defaults);
111         int save_veffects(BC_Hash *defaults);
112         int save_loads(BC_Hash *defaults);
113         int add_veffect(char *title);
114
115         int quit();
116 // show only one of these at a time
117         int set_show_autos();
118         void update_toggles(int use_lock);
119
120         MWindowGUI *gui;
121         MWindow *mwindow;
122         ThreadLoader *threadloader;
123         MenuAEffects *aeffects;
124         MenuVEffects *veffects;
125
126         Load *load_file;
127         LoadRecentItems load;
128         LoadRecent *load_recent;
129
130         RecordMenuItem *record_menu_item;
131         RenderItem *render;
132         NewProject *new_project;
133         MenuAEffectItem *aeffect[TOTAL_EFFECTS];
134         MenuVEffectItem *veffect[TOTAL_EFFECTS];
135         Quit *quit_program;              // affected by save
136         MainDumpsMenu *dump_menu;
137         EditClearMenu *clear_menu;
138         Undo *undo;
139         Redo *redo;
140         BC_Menu *filemenu;
141         BC_Menu *audiomenu, *videomenu;      // needed by most recents
142         int total_aeffects, total_veffects;
143
144         KeyframeCurveType *keyframe_curve_type;
145         KeyframeCreate *keyframe_create;
146         SetAutomationCurveMode *set_auto_curves;
147         LabelsFollowEdits *labels_follow_edits;
148         PluginsFollowEdits *plugins_follow_edits;
149         KeyframesFollowEdits *keyframes_follow_edits;
150         CursorOnFrames *cursor_on_frames;
151         TypelessKeyframes *typeless_keyframes;
152         SetBRenderActive *brender_active;
153         LoopPlayback *loop_playback;
154         ShowAssets *show_assets;
155         ShowTitles *show_titles;
156         ShowTransitions *show_transitions;
157         ShowAutomation *fade_automation;
158         ShowAutomation *mute_automation;
159         ShowAutomation *pan_automation;
160         ShowAutomation *camera_x;
161         ShowAutomation *camera_y;
162         ShowAutomation *camera_z;
163         ShowAutomation *project_x;
164         ShowAutomation *project_y;
165         ShowAutomation *project_z;
166         PluginAutomation *plugin_automation;
167         ShowAutomation *mask_automation;
168         ShowAutomation *mode_automation;
169         ShowAutomation *speed_automation;
170         ShowVWindow *show_vwindow;
171         ShowAWindow *show_awindow;
172         ShowCWindow *show_cwindow;
173         ShowGWindow *show_gwindow;
174         ShowLWindow *show_lwindow;
175         SplitX *split_x;
176         SplitY *split_y;
177         MixerItems *mixer_items;
178         LoadLayout *load_layout;
179         LoadLayout *save_layout;
180         ProxyMenuItem *proxy;
181 };
182
183 // ========================================= edit
184
185 class Undo : public BC_MenuItem
186 {
187 public:
188         Undo(MWindow *mwindow);
189         int handle_event();
190         int update_caption(const char *new_caption = "");
191         MWindow *mwindow;
192 };
193
194 class MainDumpsSubMenu : public BC_SubMenu
195 {
196 public:
197         MainDumpsSubMenu(BC_MenuItem *menu_item);
198         ~MainDumpsSubMenu();
199
200         BC_MenuItem *menu_item;
201 };
202
203 class MainDumpsMenu : public BC_MenuItem
204 {
205 public:
206         MainDumpsMenu(MWindow *mwindow);
207         ~MainDumpsMenu();
208         void create_objects();
209
210         MWindow *mwindow;
211         MainDumpsSubMenu *dumps_menu;
212 };
213
214 class DumpCICache : public BC_MenuItem
215 {
216 public:
217         DumpCICache(MWindow *mwindow);
218         int handle_event();
219         MWindow *mwindow;
220 };
221
222 class DumpEDL : public BC_MenuItem
223 {
224 public:
225         DumpEDL(MWindow *mwindow);
226         int handle_event();
227         MWindow *mwindow;
228 };
229
230 class DumpPlugins : public BC_MenuItem
231 {
232 public:
233         DumpPlugins(MWindow *mwindow);
234         int handle_event();
235         MWindow *mwindow;
236 };
237
238 class DumpAssets : public BC_MenuItem
239 {
240 public:
241         DumpAssets(MWindow *mwindow);
242         int handle_event();
243         MWindow *mwindow;
244 };
245
246 class DumpUndo : public BC_MenuItem
247 {
248 public:
249         DumpUndo(MWindow *mwindow);
250         int handle_event();
251         MWindow *mwindow;
252 };
253
254 class Redo : public BC_MenuItem
255 {
256 public:
257         Redo(MWindow *mwindow);
258         int handle_event();
259         int update_caption(const char *new_caption = "");
260         MWindow *mwindow;
261 };
262
263 class Cut : public BC_MenuItem
264 {
265 public:
266         Cut(MWindow *mwindow);
267         int handle_event();
268         MWindow *mwindow;
269 };
270
271 class Copy : public BC_MenuItem
272 {
273 public:
274         Copy(MWindow *mwindow);
275         int handle_event();
276         MWindow *mwindow;
277 };
278
279 class Paste : public BC_MenuItem
280 {
281 public:
282         Paste(MWindow *mwindow);
283         int handle_event();
284         MWindow *mwindow;
285 };
286
287 class EditClearSubMenu : public BC_SubMenu
288 {
289 public:
290         EditClearSubMenu(BC_MenuItem *menu_item);
291         ~EditClearSubMenu();
292
293         BC_MenuItem *menu_item;
294 };
295
296 class EditClearMenu : public BC_MenuItem
297 {
298 public:
299         EditClearMenu(MWindow *mwindow);
300         ~EditClearMenu();
301         void create_objects();
302
303         MWindow *mwindow;
304         EditClearSubMenu *clear_sub_menu;
305 };
306
307 class Clear : public BC_MenuItem
308 {
309 public:
310         Clear(MWindow *mwindow);
311         int handle_event();
312         MWindow *mwindow;
313 };
314
315 class CutKeyframes : public BC_MenuItem
316 {
317 public:
318         CutKeyframes(MWindow *mwindow);
319         int handle_event();
320         MWindow *mwindow;
321 };
322
323 class CopyKeyframes : public BC_MenuItem
324 {
325 public:
326         CopyKeyframes(MWindow *mwindow);
327         int handle_event();
328         MWindow *mwindow;
329 };
330
331 class PasteKeyframes : public BC_MenuItem
332 {
333 public:
334         PasteKeyframes(MWindow *mwindow);
335         int handle_event();
336         MWindow *mwindow;
337 };
338
339
340 class ClearKeyframes : public BC_MenuItem
341 {
342 public:
343         ClearKeyframes(MWindow *mwindow);
344         int handle_event();
345         MWindow *mwindow;
346 };
347
348
349 class SetAutomationCurveItem : public BC_MenuItem
350 {
351 public:
352         SetAutomationCurveItem(SetAutomationCurveMode *set_curve_mode, int id);
353         int handle_event();
354         SetAutomationCurveMode *set_curve_mode;
355         int id;
356 };
357
358 class SetAutoCurveModeMenu : public BC_SubMenu
359 {
360 public:
361         SetAutoCurveModeMenu(SetAutomationCurveMode *curve_mode);
362         SetAutomationCurveMode *curve_mode;
363 };
364
365 class SetAutomationCurveMode : public BC_MenuItem
366 {
367 public:
368         SetAutomationCurveMode(MWindow *mwindow);
369         void create_objects();
370
371         MWindow *mwindow;
372         SetAutoCurveModeMenu *curve_mode_menu;
373 };
374
375
376 class KeyframeCurveType : public BC_MenuItem
377 {
378 public:
379         KeyframeCurveType(MWindow *mwindow);
380         ~KeyframeCurveType();
381
382         void create_objects();
383         void update(int curve_type);
384         int handle_event();
385
386         MWindow *mwindow;
387         KeyframeCurveTypeMenu *curve_menu;
388 };
389
390 class KeyframeCurveTypeMenu : public BC_SubMenu
391 {
392 public:
393         KeyframeCurveTypeMenu(KeyframeCurveType *menu_item);
394         ~KeyframeCurveTypeMenu();
395
396         KeyframeCurveType *menu_item;
397 };
398
399 class KeyframeCurveTypeItem : public BC_MenuItem
400 {
401 public:
402         KeyframeCurveTypeItem(int type, KeyframeCurveType *main_item);
403         ~KeyframeCurveTypeItem();
404
405         KeyframeCurveType *main_item;
406         int type;
407
408         int handle_event();
409 };
410
411 class KeyframeCreateItem : public BC_MenuItem
412 {
413 public:
414         KeyframeCreateItem(KeyframeCreate *keyframe_create, const char *text, int mask);
415         int handle_event();
416
417         KeyframeCreate *keyframe_create;
418         int mask;
419 };
420
421 class KeyframeCreateMenu : public BC_SubMenu
422 {
423 public:
424         KeyframeCreateMenu(KeyframeCreate *keyframe_create);
425         KeyframeCreate *keyframe_create;
426 };
427
428 class KeyframeCreate : public BC_MenuItem
429 {
430 public:
431         KeyframeCreate(MWindow *mwindow);
432         void create_objects();
433
434         MWindow *mwindow;
435         KeyframeCreateMenu *keyframe_create_menu;
436 };
437
438
439 class CutDefaultKeyframe : public BC_MenuItem
440 {
441 public:
442         CutDefaultKeyframe(MWindow *mwindow);
443         int handle_event();
444         MWindow *mwindow;
445 };
446
447 class CopyDefaultKeyframe : public BC_MenuItem
448 {
449 public:
450         CopyDefaultKeyframe(MWindow *mwindow);
451         int handle_event();
452         MWindow *mwindow;
453 };
454
455 class PasteDefaultKeyframe : public BC_MenuItem
456 {
457 public:
458         PasteDefaultKeyframe(MWindow *mwindow);
459         int handle_event();
460         MWindow *mwindow;
461 };
462
463 class ClearDefaultKeyframe : public BC_MenuItem
464 {
465 public:
466         ClearDefaultKeyframe(MWindow *mwindow);
467         int handle_event();
468         MWindow *mwindow;
469 };
470
471 class PasteSilence : public BC_MenuItem
472 {
473 public:
474         PasteSilence(MWindow *mwindow);
475         int handle_event();
476         MWindow *mwindow;
477 };
478
479 class SelectAll : public BC_MenuItem
480 {
481 public:
482         SelectAll(MWindow *mwindow);
483         int handle_event();
484         MWindow *mwindow;
485 };
486
487 class ClearHardEdges : public BC_MenuItem
488 {
489 public:
490         ClearHardEdges(MWindow *mwindow);
491         int handle_event();
492         MWindow *mwindow;
493 };
494
495 class ClearLabels : public BC_MenuItem
496 {
497 public:
498         ClearLabels(MWindow *mwindow);
499         int handle_event();
500         MWindow *mwindow;
501 };
502
503 class ClearSelect : public BC_MenuItem
504 {
505 public:
506         ClearSelect(MWindow *mwindow);
507         int handle_event();
508         MWindow *mwindow;
509 };
510
511 class CutCommercials : public BC_MenuItem
512 {
513 public:
514         CutCommercials(MWindow *mwindow);
515         int handle_event();
516         MWindow *mwindow;
517 };
518
519 class DetachTransitions : public BC_MenuItem
520 {
521 public:
522         DetachTransitions(MWindow *mwindow);
523         int handle_event();
524         MWindow *mwindow;
525 };
526
527 class MuteSelection : public BC_MenuItem
528 {
529 public:
530         MuteSelection(MWindow *mwindow);
531         int handle_event();
532         MWindow *mwindow;
533 };
534
535 class TrimSelection : public BC_MenuItem
536 {
537 public:
538         TrimSelection(MWindow *mwindow);
539         int handle_event();
540         MWindow *mwindow;
541 };
542
543 class MixerItems : public BC_MenuItem
544 {
545 public:
546         MixerItems(MWindow *mwindow);
547         void create_objects();
548         int activate_submenu();
549
550         MWindow *mwindow;
551 };
552
553 class MixerItem : public BC_MenuItem
554 {
555 public:
556         MixerItem(MixerItems *mixer_items, const char *text, int idx);
557         MixerItem(MixerItems *mixer_items, const char *text, const char *hotkey_text, int hotkey);
558         virtual int handle_event();
559
560         MixerItems *mixer_items;
561         int idx;
562 };
563
564 class MixerViewer : public MixerItem
565 {
566 public:
567         MixerViewer(MixerItems *mixer_items);
568         int handle_event();
569 };
570
571 class DragTileMixers : public MixerItem
572 {
573 public:
574         DragTileMixers(MixerItems *mixer_items);
575         ~DragTileMixers();
576         int handle_event();
577         TileMixersDragBox *drag_box;
578 };
579
580 class TileMixersDragBox : public BC_DragBox
581 {
582 public:
583         TileMixersDragBox(MWindowGUI *gui);
584         void start(DragTileMixers *tile_mixers);
585         int handle_done_event(int x0, int y0, int x1, int y1);
586
587         DragTileMixers *tile_mixers;
588 };
589
590 class AlignMixers : public MixerItem
591 {
592 public:
593         AlignMixers(MixerItems *mixer_items);
594         int handle_event();
595 };
596
597 class MixMasters : public MixerItem
598 {
599 public:
600         MixMasters(MixerItems *mixer_items);
601         int handle_event();
602 };
603
604 class AlignTimecodes : public BC_MenuItem
605 {
606 public:
607         AlignTimecodes(MWindow *mwindow);
608         int handle_event();
609         MWindow *mwindow;
610 };
611
612 // ======================================== audio
613
614 class AddAudioTrack : public BC_MenuItem
615 {
616 public:
617         AddAudioTrack(MWindow *mwindow);
618         int handle_event();
619         MWindow *mwindow;
620 };
621
622 class DeleteAudioTrack : public BC_MenuItem
623 {
624 public:
625         DeleteAudioTrack(MWindow *mwindow);
626         int handle_event();
627         MWindow *mwindow;
628 };
629
630 class DefaultATransition : public BC_MenuItem
631 {
632 public:
633         DefaultATransition(MWindow *mwindow);
634         int handle_event();
635         MWindow *mwindow;
636 };
637
638 class MapAudio1 : public BC_MenuItem
639 {
640 public:
641         MapAudio1(MWindow *mwindow);
642         int handle_event();
643         MWindow *mwindow;
644 };
645
646 class MapAudio2 : public BC_MenuItem
647 {
648 public:
649         MapAudio2(MWindow *mwindow);
650         int handle_event();
651         MWindow *mwindow;
652 };
653
654 // ========================================== video
655
656
657 class AddVideoTrack : public BC_MenuItem
658 {
659 public:
660         AddVideoTrack(MWindow *mwindow);
661         int handle_event();
662         MWindow *mwindow;
663 };
664
665
666 class DeleteVideoTrack : public BC_MenuItem
667 {
668 public:
669         DeleteVideoTrack(MWindow *mwindow);
670         int handle_event();
671         MWindow *mwindow;
672 };
673
674 class ResetTranslation : public BC_MenuItem
675 {
676 public:
677         ResetTranslation(MWindow *mwindow);
678         int handle_event();
679         MWindow *mwindow;
680 };
681
682 class DefaultVTransition : public BC_MenuItem
683 {
684 public:
685         DefaultVTransition(MWindow *mwindow);
686         int handle_event();
687         MWindow *mwindow;
688 };
689
690
691 // ========================================== subtitle
692
693 class AddSubttlTrack : public BC_MenuItem
694 {
695 public:
696         AddSubttlTrack(MWindow *mwindow);
697         int handle_event();
698         MWindow *mwindow;
699 };
700
701 class PasteSubttl : public BC_MenuItem
702 {
703 public:
704         PasteSubttl(MWindow *mwindow);
705         int handle_event();
706         MWindow *mwindow;
707 };
708
709
710 // ========================================== settings
711
712
713 class RollTracksUp : public BC_MenuItem
714 {
715 public:
716         RollTracksUp(MWindow *mwindow);
717         int handle_event();
718         MWindow *mwindow;
719 };
720
721 class RollTracksDown : public BC_MenuItem
722 {
723 public:
724         RollTracksDown(MWindow *mwindow);
725         int handle_event();
726         MWindow *mwindow;
727 };
728
729 class MoveTracksUp : public BC_MenuItem
730 {
731 public:
732         MoveTracksUp(MWindow *mwindow);
733         int handle_event();
734         MWindow *mwindow;
735 };
736
737 class MoveTracksDown : public BC_MenuItem
738 {
739 public:
740         MoveTracksDown(MWindow *mwindow);
741         int handle_event();
742         MWindow *mwindow;
743 };
744
745 class DeleteTracks : public BC_MenuItem
746 {
747 public:
748         DeleteTracks(MWindow *mwindow);
749         int handle_event();
750         MWindow *mwindow;
751 };
752
753 class ConcatenateTracks : public BC_MenuItem
754 {
755 public:
756         ConcatenateTracks(MWindow *mwindow);
757         int handle_event();
758         MWindow *mwindow;
759 };
760
761 class DeleteFirstTrack : public BC_MenuItem
762 {
763 public:
764         DeleteFirstTrack(MWindow *mwindow);
765         int handle_event();
766         MWindow *mwindow;
767 };
768
769 class DeleteLastTrack : public BC_MenuItem
770 {
771 public:
772         DeleteLastTrack(MWindow *mwindow);
773         int handle_event();
774         MWindow *mwindow;
775 };
776
777 class LoopPlayback : public BC_MenuItem
778 {
779 public:
780         LoopPlayback(MWindow *mwindow);
781
782         int handle_event();
783         MWindow *mwindow;
784 };
785
786 class SetBRenderActive : public BC_MenuItem
787 {
788 public:
789         SetBRenderActive(MWindow *mwindow);
790         int handle_event();
791         MWindow *mwindow;
792 };
793
794 class LabelsFollowEdits : public BC_MenuItem
795 {
796 public:
797         LabelsFollowEdits(MWindow *mwindow);
798         int handle_event();
799         MWindow *mwindow;
800 };
801
802 class PluginsFollowEdits : public BC_MenuItem
803 {
804 public:
805         PluginsFollowEdits(MWindow *mwindow);
806         int handle_event();
807         MWindow *mwindow;
808 };
809
810 class KeyframesFollowEdits : public BC_MenuItem
811 {
812 public:
813         KeyframesFollowEdits(MWindow *mwindow);
814         int handle_event();
815         MWindow *mwindow;
816 };
817
818 class CursorOnFrames : public BC_MenuItem
819 {
820 public:
821         CursorOnFrames(MWindow *mwindow);
822         int handle_event();
823         MWindow *mwindow;
824 };
825
826 class TypelessKeyframes : public BC_MenuItem
827 {
828 public:
829         TypelessKeyframes(MWindow *mwindow);
830         int handle_event();
831         MWindow *mwindow;
832 };
833
834 class ScrubSpeed : public BC_MenuItem
835 {
836 public:
837         ScrubSpeed(MWindow *mwindow);
838         int handle_event();
839         MWindow *mwindow;
840 };
841
842 class SaveSettingsNow : public BC_MenuItem
843 {
844 public:
845         SaveSettingsNow(MWindow *mwindow);
846         int handle_event();
847         MWindow *mwindow;
848 };
849
850 // ========================================== window
851 class ShowVWindow : public BC_MenuItem
852 {
853 public:
854         ShowVWindow(MWindow *mwindow);
855         int handle_event();
856         MWindow *mwindow;
857 };
858
859 class ShowAWindow : public BC_MenuItem
860 {
861 public:
862         ShowAWindow(MWindow *mwindow);
863         int handle_event();
864         MWindow *mwindow;
865 };
866
867 class ShowGWindow : public BC_MenuItem
868 {
869 public:
870         ShowGWindow(MWindow *mwindow);
871         int handle_event();
872         MWindow *mwindow;
873 };
874
875 class ShowCWindow : public BC_MenuItem
876 {
877 public:
878         ShowCWindow(MWindow *mwindow);
879         int handle_event();
880         MWindow *mwindow;
881 };
882
883 class ShowLWindow : public BC_MenuItem
884 {
885 public:
886         ShowLWindow(MWindow *mwindow);
887         int handle_event();
888         MWindow *mwindow;
889 };
890
891 class TileWindows : public BC_MenuItem
892 {
893 public:
894         TileWindows(MWindow *mwindow, const char *item_title, int config,
895                 const char *hot_keytext="", int hot_key=0);
896         int handle_event();
897         MWindow *mwindow;
898         int config;
899 };
900
901 class SplitX : public BC_MenuItem
902 {
903 public:
904         SplitX(MWindow *mwindow);
905         int handle_event();
906         MWindow *mwindow;
907 };
908
909 class SplitY : public BC_MenuItem
910 {
911 public:
912         SplitY(MWindow *mwindow);
913         int handle_event();
914         MWindow *mwindow;
915 };
916
917
918 class LoadLayoutItem : public BC_MenuItem
919 {
920 public:
921         LoadLayoutItem(LoadLayout *load_layout, const char *text, int no, int hotkey);
922         int handle_event();
923
924         int idx;
925         char layout_text[BCSTRLEN];
926         char layout_file[BCSTRLEN];
927         LoadLayout *load_layout;
928 };
929
930 class LoadLayout : public BC_MenuItem
931 {
932 public:
933         LoadLayout(MWindow *mwindow, const char *text, int action);
934         ~LoadLayout();
935         void create_objects();
936         void update();
937         int activate_submenu();
938
939         MWindow *mwindow; 
940         LoadLayoutDialog *layout_dialog;
941         int action;
942 };
943
944 class LoadLayoutDialog : public BC_DialogThread
945 {
946 public:
947         LoadLayoutDialog(LoadLayout *load_layout);
948         ~LoadLayoutDialog();
949
950         void start_confirm_dialog(int wx, int wy, int idx);
951         void handle_done_event(int result);
952         void handle_close_event(int result);
953         BC_Window* new_gui();
954
955         LoadLayout *load_layout;
956         LoadLayoutConfirm *lgui;
957         int wx, wy, idx;
958 };
959
960 class LoadLayoutNameText : public BC_TextBox
961 {
962 public:
963         LoadLayoutNameText(LoadLayoutConfirm *confirm,
964                 int x, int y, int w, const char *text);
965         ~LoadLayoutNameText();
966
967         int handle_event();
968
969         LoadLayoutConfirm *confirm;
970 };
971
972 class LoadLayoutConfirm : public BC_Window
973 {
974 public:
975         LoadLayoutConfirm(LoadLayoutDialog *load_dialog, int x, int y);
976         ~LoadLayoutConfirm();
977         void create_objects();
978
979         LoadLayoutDialog *layout_dialog;
980         LoadLayoutNameText *name_text;
981 };
982
983 #endif