Credit Andrew - updating patches for FFmpeg 7.0 as needed since 6.1, now at 7.0,...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / yuvshift / yuvshift.h
index c943f5b7647283c6aa4cef3cf2bc88ead6943b72..6beac1a522160b7fd1893f612db80c9266a0423b 100644 (file)
 #include "language.h"
 #include "bccolors.h"
 #include "pluginvclient.h"
+#include "theme.h"
 #include "vframe.h"
 
 #include <stdint.h>
 #include <string.h>
 
+#define MAXVALUE 100
+
+#define RESET_ALL  0
+#define RESET_Y_DX 1
+#define RESET_Y_DY 2
+#define RESET_U_DX 3
+#define RESET_U_DY 4
+#define RESET_V_DX 5
+#define RESET_V_DY 6
 
 class YUVShiftEffect;
 class YUVShiftWindow;
+class YUVShiftIText;
+class YUVShiftISlider;
 class YUVShiftReset;
+class YUVShiftClr;
 
 
 class YUVShiftConfig
@@ -46,7 +59,7 @@ class YUVShiftConfig
 public:
        YUVShiftConfig();
 
-       void reset();
+       void reset(int clear);
        void copy_from(YUVShiftConfig &src);
        int equivalent(YUVShiftConfig &src);
        void interpolate(YUVShiftConfig &prev,
@@ -58,12 +71,27 @@ public:
        int y_dx, y_dy, u_dx, u_dy, v_dx, v_dy;
 };
 
-class YUVShiftLevel : public BC_ISlider
+class YUVShiftIText : public BC_TumbleTextBox
+{
+public:
+       YUVShiftIText(YUVShiftWindow *window, YUVShiftEffect *plugin,
+               YUVShiftISlider *slider, int *output, int x, int y, int min, int max);
+       ~YUVShiftIText();
+       int handle_event();
+       YUVShiftWindow *window;
+       YUVShiftEffect *plugin;
+       YUVShiftISlider *slider;
+       int *output;
+       int min, max;
+};
+
+class YUVShiftISlider : public BC_ISlider
 {
 public:
-       YUVShiftLevel(YUVShiftEffect *plugin, int *output, int x, int y);
+       YUVShiftISlider(YUVShiftEffect *plugin, YUVShiftIText *text, int *output, int x, int y);
        int handle_event();
        YUVShiftEffect *plugin;
+       YUVShiftIText *text;
        int *output;
 };
 
@@ -77,13 +105,45 @@ public:
        YUVShiftWindow *window;
 };
 
+class YUVShiftClr : public BC_Button
+{
+public:
+       YUVShiftClr(YUVShiftEffect *plugin, YUVShiftWindow *window, int x, int y, int clear);
+       ~YUVShiftClr();
+       int handle_event();
+       YUVShiftEffect *plugin;
+       YUVShiftWindow *window;
+       int clear;
+};
+
 class YUVShiftWindow : public PluginClientWindow
 {
 public:
        YUVShiftWindow(YUVShiftEffect *plugin);
        void create_objects();
-       void update();
-       YUVShiftLevel *y_dx, *y_dy, *u_dx, *u_dy, *v_dx, *v_dy;
+       void update_gui(int clear);
+
+       YUVShiftIText *y_dx_text;
+       YUVShiftISlider *y_dx_slider;
+       YUVShiftClr *y_dx_Clr;
+       YUVShiftIText *y_dy_text;
+       YUVShiftISlider *y_dy_slider;
+       YUVShiftClr *y_dy_Clr;
+
+       YUVShiftIText *u_dx_text;
+       YUVShiftISlider *u_dx_slider;
+       YUVShiftClr *u_dx_Clr;
+       YUVShiftIText *u_dy_text;
+       YUVShiftISlider *u_dy_slider;
+       YUVShiftClr *u_dy_Clr;
+
+       YUVShiftIText *v_dx_text;
+       YUVShiftISlider *v_dx_slider;
+       YUVShiftClr *v_dx_Clr;
+       YUVShiftIText *v_dy_text;
+       YUVShiftISlider *v_dy_slider;
+       YUVShiftClr *v_dy_Clr;
+
        YUVShiftEffect *plugin;
        YUVShiftReset *reset;
 };