X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Funsharp%2Funsharpwindow.h;h=b99f86e082e587dd7742a130b66cdd1326881ef2;hb=fdf615e4b9eb6ce8faecc7f138c28edf0efac3be;hp=3e3c7b70316bd7bc2ec889d5781c8c12e1aa9993;hpb=54cc56bff09f5004b2a6cd454375f06e56acf5a0;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/plugins/unsharp/unsharpwindow.h b/cinelerra-5.1/plugins/unsharp/unsharpwindow.h index 3e3c7b70..b99f86e0 100644 --- a/cinelerra-5.1/plugins/unsharp/unsharpwindow.h +++ b/cinelerra-5.1/plugins/unsharp/unsharpwindow.h @@ -26,40 +26,133 @@ #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: - UnsharpRadius(UnsharpMain *plugin, int x, int y); + 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 UnsharpAmount : public BC_FPot +class UnsharpThresholdSlider : public BC_ISlider { public: - UnsharpAmount(UnsharpMain *plugin, int x, int y); + UnsharpThresholdSlider(UnsharpWindow *window, + UnsharpMain *plugin, + int x, int y, int w); + ~UnsharpThresholdSlider(); int handle_event(); + UnsharpWindow *window; UnsharpMain *plugin; }; -class UnsharpThreshold : public BC_IPot + +class UnsharpClr : public BC_Button { public: - UnsharpThreshold(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 UnsharpReset : public BC_GenericButton { public: - UnsharpReset(UnsharpMain *plugin, UnsharpWindow *window, int x, int y); + UnsharpReset(UnsharpWindow *window, UnsharpMain *plugin, int x, int y); ~UnsharpReset(); int handle_event(); + UnsharpWindow *window; UnsharpMain *plugin; +}; + +class UnsharpDefaultSettings : public BC_GenericButton +{ +public: + UnsharpDefaultSettings(UnsharpWindow *window, UnsharpMain *plugin, int x, int y, int w); + ~UnsharpDefaultSettings(); + int handle_event(); UnsharpWindow *window; + UnsharpMain *plugin; }; + + class UnsharpWindow : public PluginClientWindow { public: @@ -67,20 +160,25 @@ public: ~UnsharpWindow(); void create_objects(); - void update(); + void update_gui(int clear); - UnsharpRadius *radius; - UnsharpAmount *amount; - UnsharpThreshold *threshold; UnsharpMain *plugin; - UnsharpReset *reset; -}; - - + 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