add Autosave continuous backups by Andras Reuss and Andrew-R
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / editpanel.h
index 9b5fe1a4fc037c639598570af21456ccc2c8dd4a..2f3b40edb2a30284b72990c6bfa29673ad660b49 100644 (file)
 #ifndef EDITPANEL_H
 #define EDITPANEL_H
 
+#include "bcdialog.h"
 #include "guicast.h"
 #include "editpanel.inc"
+#include "localsession.inc"
 #include "meterpanel.inc"
 #include "mwindow.inc"
 #include "manualgoto.inc"
+#include "scopewindow.h"
+
+
 
 class EditPanel;
 
@@ -322,6 +327,15 @@ public:
        EditPanel *panel;
 };
 
+class SpanKeyFrameButton : public BC_Toggle
+{
+public:
+       SpanKeyFrameButton(MWindow *mwindow, EditPanel *panel, int x, int y);
+       int handle_event();
+       MWindow *mwindow;
+       EditPanel *panel;
+};
+
 class LockLabelsButton : public BC_Toggle
 {
 public:
@@ -332,6 +346,131 @@ public:
 };
 
 
+class EditPanelScopeGUI : public ScopeGUI
+{
+public:
+       EditPanelScopeGUI(MWindow *mwindow, EditPanelScopeDialog *dialog);
+       ~EditPanelScopeGUI();
+
+       void create_objects();
+       void toggle_event();
+       int translation_event();
+       int resize_event(int w, int h);
+       void update_scope();
+
+       MWindow *mwindow;
+       EditPanelScopeDialog *dialog;
+};
+
+class EditPanelScopeDialog : public BC_DialogThread
+{
+public:
+       EditPanelScopeDialog(MWindow *mwindow, EditPanel *panel);
+       ~EditPanelScopeDialog();
+
+       void handle_close_event(int result);
+       void handle_done_event(int result);
+       BC_Window* new_gui();
+       void process(VFrame *output_frame);
+
+       MWindow *mwindow;
+       EditPanel *panel;
+       EditPanelScopeGUI *scope_gui;
+       Mutex *gui_lock;
+       VFrame *output_frame;
+};
+
+class EditPanelGangTracks : public BC_Button
+{
+       static VFrame **gang_images[TOTAL_GANGS];
+       static const char *gang_tips[TOTAL_GANGS];
+public:
+       EditPanelGangTracks(MWindow *mwindow, EditPanel *panel, int x, int y);
+       ~EditPanelGangTracks();
+       VFrame **get_images(MWindow *mwindow);
+       void update(int gang);
+       int handle_event();
+       EditPanel *panel;
+       MWindow *mwindow;
+};
+
+
+class EditPanelScope : public BC_Toggle
+{
+public:
+       EditPanelScope(MWindow *mwindow, EditPanel *panel, int x, int y);
+       ~EditPanelScope();
+       int handle_event();
+       EditPanel *panel;
+       MWindow *mwindow;
+};
+
+class EditPanelTimecode : public BC_Button
+{
+public:
+       EditPanelTimecode(MWindow *mwindow, EditPanel *panel, int x, int y);
+       ~EditPanelTimecode();
+       int handle_event();
+       MWindow *mwindow;
+       EditPanel *panel;
+       EditPanelTcDialog *tc_dialog;
+};
+
+class EditPanelTcDialog : public BC_DialogThread
+{
+public:
+       EditPanelTcDialog(MWindow *mwindow, EditPanel *panel);
+       ~EditPanelTcDialog();
+       BC_Window *new_gui();
+       void start_dialog(int px, int py);
+       void handle_done_event(int result);
+
+       MWindow *mwindow;
+       EditPanel *panel;
+       EditPanelTcWindow *tc_gui;
+       int px, py;
+};
+
+class EditPanelTcWindow : public BC_Window
+{
+public:
+       EditPanelTcWindow(EditPanelTcDialog *tc_dialog, int x, int y);
+       ~EditPanelTcWindow();
+       void create_objects();
+       double get_timecode();
+       void update(double timecode);
+
+       EditPanelTcDialog *tc_dialog;
+       EditPanelTcInt *hours;
+       EditPanelTcInt *minutes;
+       EditPanelTcInt *seconds;
+       EditPanelTcInt *frames;
+};
+
+class EditPanelTcInt : public BC_TextBox
+{
+public:
+       EditPanelTcInt(EditPanelTcWindow *window, int x, int y, int w,
+               int max, const char *format);
+       ~EditPanelTcInt();
+       int handle_event();
+       int keypress_event();
+       void update(int v);
+
+       EditPanelTcWindow *window;
+       int max, digits;
+       const char *format;
+};
+
+class EditPanelTcReset : public BC_Button
+{
+public:
+       EditPanelTcReset(EditPanelTcWindow *window, int x, int y);
+       int handle_event();
+
+       EditPanelTcWindow *window;
+};
+
 class EditPanel
 {
 public:
@@ -353,7 +492,10 @@ public:
                int use_cut,
                int use_commerical,
                int use_goto,
-               int use_clk2play);
+               int use_clk2play,
+               int use_scope,
+               int use_gang_tracks,
+               int use_timecode);
        ~EditPanel();
 
        void set_meters(MeterPanel *meter_panel);
@@ -389,7 +531,9 @@ public:
        virtual void panel_fit_autos(int all) = 0;
        virtual void panel_set_editing_mode(int mode) = 0;
        virtual void panel_set_auto_keyframes(int v) = 0;
+       virtual void panel_set_span_keyframes(int v) = 0;
        virtual void panel_set_labels_follow_edits(int v) = 0;
+       virtual void panel_set_gang_tracks(int mode) = 0;
 
        MWindow *mwindow;
        BC_WindowBase *subwindow;
@@ -414,6 +558,9 @@ public:
        int use_commercial;
        int use_goto;
        int use_clk2play;
+       int use_scope;
+       int use_gang_tracks;
+       int use_timecode;
 
        EditFit *fit;
        EditFitAutos *fit_autos;
@@ -428,6 +575,9 @@ public:
        EditCommercial *commercial;
        EditManualGoto *mangoto;
        EditClick2Play *click2play;
+       EditPanelScope *scope;
+       EditPanelTimecode *timecode;
+       EditPanelScopeDialog *scope_dialog;
        EditCopy *copy;
        EditPaste *paste;
        EditLabelbutton *labelbutton;
@@ -435,12 +585,14 @@ public:
        EditNextLabel *nextlabel;
        EditPrevEdit *prevedit;
        EditNextEdit *nextedit;
+       EditPanelGangTracks *gang_tracks;
        EditUndo *undo;
        EditRedo *redo;
        MeterShow *meters;
        ArrowButton *arrow;
        IBeamButton *ibeam;
        KeyFrameButton *keyframe;
+       SpanKeyFrameButton *span_keyframe;
        LockLabelsButton *locklabels;
 
        int is_mwindow() { return window_id == MWINDOW_ID; }