Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / unsharp / unsharpwindow.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
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.
10  *
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.
15  *
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
19  *
20  */
21
22 #ifndef UNSHARPWINDOW_H
23 #define UNSHARPWINDOW_H
24
25 #include "guicast.h"
26 #include "unsharp.inc"
27 #include "unsharpwindow.inc"
28
29
30 #define RESET_DEFAULT_SETTINGS 10
31 #define RESET_ALL       0
32 #define RESET_RADIUS    1
33 #define RESET_AMOUNT    2
34 #define RESET_THRESHOLD 3
35
36 #define RADIUS_MIN      0.10
37 #define RADIUS_MAX      120.00
38 #define AMOUNT_MIN      0.00
39 #define AMOUNT_MAX      5.00
40 #define THRESHOLD_MIN   0
41 #define THRESHOLD_MAX 255
42
43
44
45 class UnsharpRadiusText : public BC_TumbleTextBox
46 {
47 public:
48         UnsharpRadiusText(UnsharpWindow *window,
49                 UnsharpMain *plugin,
50                 int x, int y);
51         ~UnsharpRadiusText();
52         int handle_event();
53         UnsharpWindow *window;
54         UnsharpMain *plugin;
55 };
56
57 class UnsharpRadiusSlider : public BC_FSlider
58 {
59 public:
60         UnsharpRadiusSlider(UnsharpWindow *window,
61                 UnsharpMain *plugin,
62                 int x, int y, int w);
63         ~UnsharpRadiusSlider();
64         int handle_event();
65         UnsharpWindow *window;
66         UnsharpMain *plugin;
67 };
68
69
70 class UnsharpAmountText : public BC_TumbleTextBox
71 {
72 public:
73         UnsharpAmountText(UnsharpWindow *window,
74                 UnsharpMain *plugin,
75                 int x, int y);
76         ~UnsharpAmountText();
77         int handle_event();
78         UnsharpWindow *window;
79         UnsharpMain *plugin;
80 };
81
82
83 class UnsharpAmountSlider : public BC_FSlider
84 {
85 public:
86         UnsharpAmountSlider(UnsharpWindow *window,
87                 UnsharpMain *plugin,
88                 int x, int y, int w);
89         ~UnsharpAmountSlider();
90         int handle_event();
91         UnsharpWindow *window;
92         UnsharpMain *plugin;
93 };
94
95
96 class UnsharpThresholdText : public BC_TumbleTextBox
97 {
98 public:
99         UnsharpThresholdText(UnsharpWindow *window,
100                 UnsharpMain *plugin,
101                 int x, int y);
102         ~UnsharpThresholdText();
103         int handle_event();
104         UnsharpWindow *window;
105         UnsharpMain *plugin;
106 };
107
108 class UnsharpThresholdSlider : public BC_ISlider
109 {
110 public:
111         UnsharpThresholdSlider(UnsharpWindow *window,
112                 UnsharpMain *plugin,
113                 int x, int y, int w);
114         ~UnsharpThresholdSlider();
115         int handle_event();
116         UnsharpWindow *window;
117         UnsharpMain *plugin;
118 };
119
120
121 class UnsharpClr : public BC_Button
122 {
123 public:
124         UnsharpClr(UnsharpWindow *window, UnsharpMain *plugin,
125                 int x, int y, int clear);
126         ~UnsharpClr();
127         int handle_event();
128         UnsharpWindow *window;
129         UnsharpMain *plugin;
130         int clear;
131 };
132
133
134 class UnsharpReset : public BC_GenericButton
135 {
136 public:
137         UnsharpReset(UnsharpWindow *window, UnsharpMain *plugin, int x, int y);
138         ~UnsharpReset();
139         int handle_event();
140         UnsharpWindow *window;
141         UnsharpMain *plugin;
142 };
143
144 class UnsharpDefaultSettings : public BC_GenericButton
145 {
146 public:
147         UnsharpDefaultSettings(UnsharpWindow *window, UnsharpMain *plugin, int x, int y, int w);
148         ~UnsharpDefaultSettings();
149         int handle_event();
150         UnsharpWindow *window;
151         UnsharpMain *plugin;
152 };
153
154
155
156 class UnsharpWindow : public PluginClientWindow
157 {
158 public:
159         UnsharpWindow(UnsharpMain *plugin);
160         ~UnsharpWindow();
161
162         void create_objects();
163         void update_gui(int clear);
164
165         UnsharpMain *plugin;
166
167         UnsharpRadiusText *radius_text;
168         UnsharpRadiusSlider *radius_slider;
169         UnsharpClr *radius_clr;
170
171         UnsharpAmountText *amount_text;
172         UnsharpAmountSlider *amount_slider;
173         UnsharpClr *amount_clr;
174
175         UnsharpThresholdText *threshold_text;
176         UnsharpThresholdSlider *threshold_slider;
177         UnsharpClr *threshold_clr;
178
179         UnsharpReset *reset;
180         UnsharpDefaultSettings *default_settings;
181 };
182
183
184 #endif