improved plugins with added Tumbler box and visible values
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / unsharp / unsharpwindow.h
index d5dc1cf30f0bf680575e3fdebabdd28845b80719..b99f86e082e587dd7742a130b66cdd1326881ef2 100644 (file)
 #include "unsharp.inc"
 #include "unsharpwindow.inc"
 
-class UnsharpRadius : public BC_FPot
+
+#define RESET_DEFAULT_SETTINGS 10
+#define RESET_ALL       0
+#define RESET_RADIUS   1
+#define RESET_AMOUNT    2
+#define RESET_THRESHOLD 3
+
+#define RADIUS_MIN      0.10
+#define RADIUS_MAX      120.00
+#define AMOUNT_MIN      0.00
+#define AMOUNT_MAX      5.00
+#define THRESHOLD_MIN   0
+#define THRESHOLD_MAX 255
+
+
+
+class UnsharpRadiusText : public BC_TumbleTextBox
+{
+public:
+       UnsharpRadiusText(UnsharpWindow *window,
+               UnsharpMain *plugin,
+               int x, int y);
+       ~UnsharpRadiusText();
+       int handle_event();
+       UnsharpWindow *window;
+       UnsharpMain *plugin;
+};
+
+class UnsharpRadiusSlider : public BC_FSlider
+{
+public:
+       UnsharpRadiusSlider(UnsharpWindow *window,
+               UnsharpMain *plugin,
+               int x, int y, int w);
+       ~UnsharpRadiusSlider();
+       int handle_event();
+       UnsharpWindow *window;
+       UnsharpMain *plugin;
+};
+
+
+class UnsharpAmountText : public BC_TumbleTextBox
+{
+public:
+       UnsharpAmountText(UnsharpWindow *window,
+               UnsharpMain *plugin,
+               int x, int y);
+       ~UnsharpAmountText();
+       int handle_event();
+       UnsharpWindow *window;
+       UnsharpMain *plugin;
+};
+
+
+class UnsharpAmountSlider : public BC_FSlider
+{
+public:
+       UnsharpAmountSlider(UnsharpWindow *window,
+               UnsharpMain *plugin,
+               int x, int y, int w);
+       ~UnsharpAmountSlider();
+       int handle_event();
+       UnsharpWindow *window;
+       UnsharpMain *plugin;
+};
+
+
+class UnsharpThresholdText : public BC_TumbleTextBox
+{
+public:
+       UnsharpThresholdText(UnsharpWindow *window,
+               UnsharpMain *plugin,
+               int x, int y);
+       ~UnsharpThresholdText();
+       int handle_event();
+       UnsharpWindow *window;
+       UnsharpMain *plugin;
+};
+
+class UnsharpThresholdSlider : public BC_ISlider
+{
+public:
+       UnsharpThresholdSlider(UnsharpWindow *window,
+               UnsharpMain *plugin,
+               int x, int y, int w);
+       ~UnsharpThresholdSlider();
+       int handle_event();
+       UnsharpWindow *window;
+       UnsharpMain *plugin;
+};
+
+
+class UnsharpClr : public BC_Button
 {
 public:
-       UnsharpRadius(UnsharpMain *plugin, int x, int y);
+       UnsharpClr(UnsharpWindow *window, UnsharpMain *plugin,
+               int x, int y, int clear);
+       ~UnsharpClr();
        int handle_event();
+       UnsharpWindow *window;
        UnsharpMain *plugin;
+       int clear;
 };
 
-class UnsharpAmount : public BC_FPot
+
+class UnsharpReset : public BC_GenericButton
 {
 public:
-       UnsharpAmount(UnsharpMain *plugin, int x, int y);
+       UnsharpReset(UnsharpWindow *window, UnsharpMain *plugin, int x, int y);
+       ~UnsharpReset();
        int handle_event();
+       UnsharpWindow *window;
        UnsharpMain *plugin;
 };
 
-class UnsharpThreshold : public BC_IPot
+class UnsharpDefaultSettings : public BC_GenericButton
 {
 public:
-       UnsharpThreshold(UnsharpMain *plugin, int x, int y);
+       UnsharpDefaultSettings(UnsharpWindow *window, UnsharpMain *plugin, int x, int y, int w);
+       ~UnsharpDefaultSettings();
        int handle_event();
+       UnsharpWindow *window;
        UnsharpMain *plugin;
 };
 
+
+
 class UnsharpWindow : public PluginClientWindow
 {
 public:
@@ -57,19 +160,25 @@ public:
        ~UnsharpWindow();
 
        void create_objects();
-       void update();
+       void update_gui(int clear);
 
-       UnsharpRadius *radius;
-       UnsharpAmount *amount;
-       UnsharpThreshold *threshold;
        UnsharpMain *plugin;
-};
-
-
 
+       UnsharpRadiusText *radius_text;
+       UnsharpRadiusSlider *radius_slider;
+       UnsharpClr *radius_clr;
 
+       UnsharpAmountText *amount_text;
+       UnsharpAmountSlider *amount_slider;
+       UnsharpClr *amount_clr;
 
+       UnsharpThresholdText *threshold_text;
+       UnsharpThresholdSlider *threshold_slider;
+       UnsharpClr *threshold_clr;
 
+       UnsharpReset *reset;
+       UnsharpDefaultSettings *default_settings;
+};
 
 
 #endif