r1007: Make configure detect and work on amd64.
[cinelerra_cv/mob.git] / plugins / sharpen / sharpenwindow.C
blob5008d58e6bc763d3ecb78ead24b8cc83c2c0c652
1 #include "bcdisplayinfo.h"
2 #include "sharpenwindow.h"
4 #include <libintl.h>
5 #define _(String) gettext(String)
6 #define gettext_noop(String) String
7 #define N_(String) gettext_noop (String)
10 PLUGIN_THREAD_OBJECT(SharpenMain, SharpenThread, SharpenWindow)
18 SharpenWindow::SharpenWindow(SharpenMain *client, int x, int y)
19  : BC_Window(client->gui_string, 
20         x,
21         y,
22         210, 
23         120, 
24         210, 
25         120, 
26         0, 
27         0,
28         1)
29
30         this->client = client; 
33 SharpenWindow::~SharpenWindow()
37 int SharpenWindow::create_objects()
39         int x = 10, y = 10;
40         add_tool(new BC_Title(x, y, _("Sharpness")));
41         y += 20;
42         add_tool(sharpen_slider = new SharpenSlider(client, &(client->config.sharpness), x, y));
43         y += 30;
44         add_tool(sharpen_interlace = new SharpenInterlace(client, x, y));
45         y += 30;
46         add_tool(sharpen_horizontal = new SharpenHorizontal(client, x, y));
47         y += 30;
48         add_tool(sharpen_luminance = new SharpenLuminance(client, x, y));
49         show_window();
50         flush();
51         return 0;
54 int SharpenWindow::close_event()
56 // Set result to 1 to indicate a client side close
57         set_done(1);
58         return 1;
61 SharpenSlider::SharpenSlider(SharpenMain *client, float *output, int x, int y)
62  : BC_ISlider(x, 
63         y, 
64         0,
65         200, 
66         200,
67         0, 
68         MAXSHARPNESS, 
69         (int)*output, 
70         0, 
71         0, 
72         0)
74         this->client = client;
75         this->output = output;
77 SharpenSlider::~SharpenSlider()
80 int SharpenSlider::handle_event()
82         *output = get_value();
83         client->send_configure_change();
84         return 1;
90 SharpenInterlace::SharpenInterlace(SharpenMain *client, int x, int y)
91  : BC_CheckBox(x, y, client->config.interlace, _("Interlace"))
93         this->client = client;
95 SharpenInterlace::~SharpenInterlace()
98 int SharpenInterlace::handle_event()
100         client->config.interlace = get_value();
101         client->send_configure_change();
102         return 1;
108 SharpenHorizontal::SharpenHorizontal(SharpenMain *client, int x, int y)
109  : BC_CheckBox(x, y, client->config.horizontal, _("Horizontal only"))
111         this->client = client;
113 SharpenHorizontal::~SharpenHorizontal()
116 int SharpenHorizontal::handle_event()
118         client->config.horizontal = get_value();
119         client->send_configure_change();
120         return 1;
125 SharpenLuminance::SharpenLuminance(SharpenMain *client, int x, int y)
126  : BC_CheckBox(x, y, client->config.luminance, _("Luminance only"))
128         this->client = client;
130 SharpenLuminance::~SharpenLuminance()
133 int SharpenLuminance::handle_event()
135         client->config.luminance = get_value();
136         client->send_configure_change();
137         return 1;