improved Blur plugin
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / blur / blurwindow.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2010 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 BLURWINDOW_H
23 #define BLURWINDOW_H
24
25
26 class BlurThread;
27 class BlurWindow;
28
29 #include "blur.inc"
30 #include "filexml.inc"
31 #include "guicast.h"
32 #include "mutex.h"
33 #include "thread.h"
34 #include "theme.h"
35
36 #define RESET_ALL 0
37 #define RESET_RADIUS 1
38
39 class BlurVertical;
40 class BlurHorizontal;
41 class BlurRadiusSlider;
42 class BlurRadiusText;
43 class BlurRadiusClr;
44 class BlurA;
45 class BlurR;
46 class BlurG;
47 class BlurB;
48 class BlurAKey;
49 class BlurReset;
50
51 class BlurWindow : public PluginClientWindow
52 {
53 public:
54         BlurWindow(BlurMain *client);
55         ~BlurWindow();
56
57         void create_objects();
58         void update(int clear);
59
60         BlurMain *client;
61         BlurVertical *vertical;
62         BlurHorizontal *horizontal;
63         BlurRadiusSlider *radius_slider;
64         BlurRadiusText *radius_text;
65         BlurRadiusClr *radius_Clr;
66         BlurA *a;
67         BlurR *r;
68         BlurG *g;
69         BlurB *b;
70         BlurAKey *a_key;
71         BlurReset *reset;
72 };
73
74 class BlurAKey : public BC_CheckBox
75 {
76 public:
77         BlurAKey(BlurMain *client, int x, int y);
78         int handle_event();
79         BlurMain *client;
80 };
81
82 class BlurA : public BC_CheckBox
83 {
84 public:
85         BlurA(BlurMain *client, int x, int y);
86         int handle_event();
87         BlurMain *client;
88 };
89 class BlurR : public BC_CheckBox
90 {
91 public:
92         BlurR(BlurMain *client, int x, int y);
93         int handle_event();
94         BlurMain *client;
95 };
96 class BlurG : public BC_CheckBox
97 {
98 public:
99         BlurG(BlurMain *client, int x, int y);
100         int handle_event();
101         BlurMain *client;
102 };
103 class BlurB : public BC_CheckBox
104 {
105 public:
106         BlurB(BlurMain *client, int x, int y);
107         int handle_event();
108         BlurMain *client;
109 };
110
111
112 class BlurRadiusSlider : public BC_ISlider
113 {
114 public:
115         BlurRadiusSlider(BlurMain *client, BlurWindow *gui, int x, int y, int w);
116         ~BlurRadiusSlider();
117         int handle_event();
118         BlurMain *client;
119         BlurWindow *gui;
120 };
121
122 class BlurRadiusText : public BC_TumbleTextBox
123 {
124 public:
125         BlurRadiusText(BlurMain *client, BlurWindow *gui, int x, int y);
126         ~BlurRadiusText();
127         int handle_event();
128         BlurMain *client;
129         BlurWindow *gui;
130 };
131
132 class BlurVertical : public BC_CheckBox
133 {
134 public:
135         BlurVertical(BlurMain *client, BlurWindow *window, int x, int y);
136         ~BlurVertical();
137         int handle_event();
138
139         BlurMain *client;
140         BlurWindow *window;
141 };
142
143 class BlurHorizontal : public BC_CheckBox
144 {
145 public:
146         BlurHorizontal(BlurMain *client, BlurWindow *window, int x, int y);
147         ~BlurHorizontal();
148         int handle_event();
149
150         BlurMain *client;
151         BlurWindow *window;
152 };
153
154 class BlurReset : public BC_GenericButton
155 {
156 public:
157         BlurReset(BlurMain *client, BlurWindow *window, int x, int y);
158         ~BlurReset();
159         int handle_event();
160         BlurMain *client;
161         BlurWindow *window;
162 };
163
164 class BlurRadiusClr : public BC_Button
165 {
166 public:
167         BlurRadiusClr(BlurMain *client, BlurWindow *gui, int x, int y);
168         ~BlurRadiusClr();
169         int handle_event();
170         BlurMain *client;
171         BlurWindow *gui;
172 };
173
174
175 #endif