Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / cwindowgui.h
index 0e120c8b64907673672f2780cbfcb8a8402ddcbf..0d79d8707f67dbc0aa411fe3a3eb81751ce23022 100644 (file)
@@ -27,6 +27,7 @@
 #include "cpanel.inc"
 #include "ctimebar.inc"
 #include "cwindow.inc"
+#include "cwindowgui.inc"
 #include "cwindowtool.inc"
 #include "editpanel.h"
 #include "floatauto.inc"
 #include "track.inc"
 #include "zoompanel.h"
 
-class CWindowZoom;
-class CWindowSlider;
-class CWindowReset;
-class CWindowDestination;
-class CWindowMeters;
-class CWindowTransport;
-class CWindowCanvas;
-class CWindowEditing;
-
 
 #define AUTO_ZOOM N_("Auto")
 
+#define CROP_REFORMAT 0
+#define CROP_RESIZE 1
+#define CROP_SHRINK 2
+#define CROP_MODES 3
+
+
 class CWindowGUI : public BC_Window
 {
 public:
@@ -62,8 +60,7 @@ public:
 
        void create_objects();
        int resize_event(int w, int h);
-       void zoom_canvas(double value, int update_menu);
-       float get_auto_zoom();
+       void update_canvas(int redraw=1);
 
 // Events for the fullscreen canvas fall through to here.
        int button_press_event();
@@ -86,6 +83,7 @@ public:
        void keyboard_zoomout();
        void update_meters();
        void stop_transport(const char *lock_msg);
+       void sync_parameters(int change_type, int redraw=0, int overlay=0);
 
        MWindow *mwindow;
        CWindow *cwindow;
@@ -100,6 +98,7 @@ public:
        CTimeBar *timebar;
        BC_Pixmap *active;
        BC_Pixmap *inactive;
+       VFrame *focus_frame;
 //     MainClock *clock;
 
 
@@ -185,7 +184,9 @@ public:
        void panel_fit_autos(int all);
        void panel_set_editing_mode(int mode);
        void panel_set_auto_keyframes(int v);
+       void panel_set_span_keyframes(int v);
        void panel_set_labels_follow_edits(int v);
+       void panel_set_gang_tracks(int v);
 
        MWindow *mwindow;
        CWindow *cwindow;
@@ -241,23 +242,12 @@ public:
        MWindow *mwindow;
 };
 
-// class CWindowDestination : public BC_PopupTextBox
-// {
-// public:
-//     CWindowDestination(MWindow *mwindow, CWindowGUI *cwindow, int x, int y);
-//     ~CWindowDestination();
-//     int handle_event();
-//     CWindowGUI *cwindow;
-//     MWindow *mwindow;
-// };
-
 class CWindowTransport : public PlayTransport
 {
 public:
        CWindowTransport(MWindow *mwindow,
-               CWindowGUI *gui,
-               int x,
-               int y);
+               CWindowGUI *gui, int x, int y);
+       bool use_mixers() { return true; }
        EDL* get_edl();
        void goto_start();
        void goto_end();
@@ -265,24 +255,33 @@ public:
        CWindowGUI *gui;
 };
 
+class CWindowCanvasToggleControls : public BC_MenuItem
+{
+public:
+       CWindowCanvasToggleControls(CWindowCanvas *canvas);
+       int handle_event();
+       static const char *calculate_text(int cwindow_controls);
+       CWindowCanvas *canvas;
+};
 
 class CWindowCanvas : public Canvas
 {
 public:
        CWindowCanvas(MWindow *mwindow, CWindowGUI *gui);
 
+       void create_objects(EDL *edl);
        void status_event();
        void zoom_resize_window(float percentage);
        void update_zoom(int x, int y, float zoom);
        int get_xscroll();
        int get_yscroll();
        float get_zoom();
+       void zoom_auto();
+       int do_scroll(EDL *edl, float cursor_x, float cursor_y);
        int do_eyedrop(int &rerender, int button_press, int draw);
-       int do_mask(int &redraw,
-               int &rerender,
-               int button_press,
-               int cursor_motion,
-               int draw);
+       int do_mask(int &redraw, int &rerender,
+               int button_press, int cursor_motion, int draw);
+       int do_mask_focus();
        void draw_refresh(int flash = 1);
        int need_overlays();
        void draw_overlays();
@@ -293,31 +292,35 @@ public:
        int cursor_motion_event();
        int button_press_event();
        int button_release_event();
-       int get_fullscreen();
-       void set_fullscreen(int value);
        int test_crop(int button_press, int &redraw);
        int test_bezier(int button_press,
-               int &redraw,
-               int &redraw_canvas,
-               int &rerender,
-               int do_camera);
+               int &redraw, int &redraw_canvas, int &rerender, int do_camera);
        int do_ruler(int draw, int motion, int button_press, int button_release);
        int test_zoom(int &redraw);
+       void create_keyframe(int do_camera);
+       void camera_keyframe();
+       void projector_keyframe();
+       void reset_keyframe(int do_camera);
        void reset_camera();
        void reset_projector();
-       void reset_keyframe(int do_camera);
        void draw_crophandle(int x, int y);
-       void zoom_auto();
+       int set_fullscreen(int on, int unlock);
+       int scope_on();
+       void draw_scope(VFrame *output, int refresh);
 
-// Draw the projector overlay in different colors.
-       void draw_bezier(int do_camera);
+// Draw the camera/projector overlay in different colors.
+       void draw_outlines(int do_camera);
        void draw_crop();
        void calculate_origin();
+       int get_clear_color();
+       int get_controls();
        void toggle_controls();
-       int get_cwindow_controls();
 
        MWindow *mwindow;
        CWindowGUI *gui;
+       CWindowCanvasToggleControls *controls;
+       float last_xscroll, last_yscroll;
+       float last_zoom;
 };
 
 #endif