4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "bcdisplayinfo.h"
24 #include "sharpenwindow.h"
35 SharpenWindow::SharpenWindow(SharpenMain *client)
36 : PluginClientWindow(client,
37 230, 150, 230, 150, 0)
39 this->client = client;
42 SharpenWindow::~SharpenWindow()
46 void SharpenWindow::create_objects()
49 add_tool(new BC_Title(x, y, _("Sharpness")));
51 add_tool(sharpen_slider = new SharpenSlider(client, &(client->config.sharpness), x, y));
53 add_tool(sharpen_interlace = new SharpenInterlace(client, x, y));
55 add_tool(sharpen_horizontal = new SharpenHorizontal(client, x, y));
57 add_tool(sharpen_luminance = new SharpenLuminance(client, x, y));
67 SharpenSlider::SharpenSlider(SharpenMain *client, float *output, int x, int y)
80 this->client = client;
81 this->output = output;
83 SharpenSlider::~SharpenSlider()
86 int SharpenSlider::handle_event()
88 *output = get_value();
89 client->send_configure_change();
96 SharpenInterlace::SharpenInterlace(SharpenMain *client, int x, int y)
97 : BC_CheckBox(x, y, client->config.interlace, _("Interlace"))
99 this->client = client;
101 SharpenInterlace::~SharpenInterlace()
104 int SharpenInterlace::handle_event()
106 client->config.interlace = get_value();
107 client->send_configure_change();
114 SharpenHorizontal::SharpenHorizontal(SharpenMain *client, int x, int y)
115 : BC_CheckBox(x, y, client->config.horizontal, _("Horizontal only"))
117 this->client = client;
119 SharpenHorizontal::~SharpenHorizontal()
122 int SharpenHorizontal::handle_event()
124 client->config.horizontal = get_value();
125 client->send_configure_change();
131 SharpenLuminance::SharpenLuminance(SharpenMain *client, int x, int y)
132 : BC_CheckBox(x, y, client->config.luminance, _("Luminance only"))
134 this->client = client;
136 SharpenLuminance::~SharpenLuminance()
139 int SharpenLuminance::handle_event()
141 client->config.luminance = get_value();
142 client->send_configure_change();