X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fsharpen%2Fsharpenwindow.C;h=310128f8dd3d86bb6a301535e2902df959c58c8c;hp=bbe0f519ca10e967e763aa2c5985d7b46f346c32;hb=1c6e05239a27d92813c27c697ccac25378b9efa0;hpb=da82546b4d3b6b056c6c333b2d52fba1bdcb1f50 diff --git a/cinelerra-5.1/plugins/sharpen/sharpenwindow.C b/cinelerra-5.1/plugins/sharpen/sharpenwindow.C index bbe0f519..310128f8 100644 --- a/cinelerra-5.1/plugins/sharpen/sharpenwindow.C +++ b/cinelerra-5.1/plugins/sharpen/sharpenwindow.C @@ -33,7 +33,7 @@ SharpenWindow::SharpenWindow(SharpenMain *client) - : PluginClientWindow(client, 230, 150, 230, 150, 0) + : PluginClientWindow(client, 230, 195, 230, 195, 0) //195 was 150 { this->client = client; } @@ -54,14 +54,19 @@ void SharpenWindow::create_objects() add_tool(sharpen_horizontal = new SharpenHorizontal(client, x, y)); y += 30; add_tool(sharpen_luminance = new SharpenLuminance(client, x, y)); + y += 40; + add_tool(reset = new SharpenReset(client, this, x, y)); show_window(); flush(); } - - - - +void SharpenWindow::update() +{ + sharpen_slider->update(client->config.sharpness); + sharpen_interlace->update(client->config.interlace); + sharpen_horizontal->update(client->config.horizontal); + sharpen_luminance->update(client->config.luminance); +} SharpenSlider::SharpenSlider(SharpenMain *client, float *output, int x, int y) : BC_ISlider(x, @@ -90,8 +95,6 @@ int SharpenSlider::handle_event() } - - SharpenInterlace::SharpenInterlace(SharpenMain *client, int x, int y) : BC_CheckBox(x, y, client->config.interlace, _("Interlace")) { @@ -108,8 +111,6 @@ int SharpenInterlace::handle_event() } - - SharpenHorizontal::SharpenHorizontal(SharpenMain *client, int x, int y) : BC_CheckBox(x, y, client->config.horizontal, _("Horizontal only")) { @@ -126,7 +127,6 @@ int SharpenHorizontal::handle_event() } - SharpenLuminance::SharpenLuminance(SharpenMain *client, int x, int y) : BC_CheckBox(x, y, client->config.luminance, _("Luminance only")) { @@ -142,3 +142,21 @@ int SharpenLuminance::handle_event() return 1; } + +SharpenReset::SharpenReset(SharpenMain *client, SharpenWindow *gui, int x, int y) + : BC_GenericButton(x, y, _("Reset")) +{ + this->client = client; + this->gui = gui; +} +SharpenReset::~SharpenReset() +{ +} +int SharpenReset::handle_event() +{ + client->config.reset(); + gui->update(); + client->send_configure_change(); + return 1; +} +