efd4ec13a5d2f62aef01b6854b759bf60d5c6ab4
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / mirror / mirrorwindow.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 /*
23  * 2023. Derivative by Flip plugin.
24 */
25
26 #ifndef MIRRORWINDOW_H
27 #define MIRRORWINDOW_H
28
29
30 class MirrorThread;
31 class MirrorWindow;
32 class MirrorToggle;
33 class MirrorSwapSide;
34 class MirrorReflectionCenter;
35 class MirrorReflectionCenterXText;
36 class MirrorReflectionCenterXSlider;
37 class MirrorReflectionCenterYText;
38 class MirrorReflectionCenterYSlider;
39 class MirrorReflectionCenterClr;
40 class MirrorReset;
41
42
43
44 #include "filexml.inc"
45 #include "mirror.h"
46 #include "mutex.h"
47 #include "pluginvclient.h"
48
49 #define RESET_DEFAULT_SETTINGS 10
50 #define RESET_ALL    0
51 #define RESET_REFLECTION_CENTER_X 1
52 #define RESET_REFLECTION_CENTER_Y 2
53
54
55 class MirrorWindow : public PluginClientWindow
56 {
57 public:
58         MirrorWindow(MirrorMain *client);
59         ~MirrorWindow();
60
61         void create_objects();
62         void update(int clear);
63
64         void update_reflection_center_enable();
65
66         MirrorMain *client;
67         MirrorToggle *mirror_vertical;
68         MirrorToggle *mirror_horizontal;
69         MirrorSwapSide *mirror_swapvertical;
70         MirrorSwapSide *mirror_swaphorizontal;
71         MirrorReflectionCenter *reflection_center_enable;
72
73         // Mirror Reflection Center X, Y
74         MirrorReflectionCenterXText *reflection_center_x_text;
75         MirrorReflectionCenterXSlider *reflection_center_x_slider;
76         MirrorReflectionCenterClr *reflection_center_x_clr;
77
78         MirrorReflectionCenterYText *reflection_center_y_text;
79         MirrorReflectionCenterYSlider *reflection_center_y_slider;
80         MirrorReflectionCenterClr *reflection_center_y_clr;
81
82         MirrorReset *reset;
83 };
84
85 class MirrorToggle : public BC_CheckBox
86 {
87 public:
88         MirrorToggle(MirrorMain *client, int *output, char *string, int x, int y);
89         ~MirrorToggle();
90         int handle_event();
91
92         MirrorMain *client;
93         int *output;
94 };
95
96 class MirrorSwapSide : public BC_CheckBox
97 {
98 public:
99         MirrorSwapSide(MirrorMain *client, int *output, char *string, int x, int y);
100         ~MirrorSwapSide();
101         int handle_event();
102
103         MirrorMain *client;
104         int *output;
105 };
106
107 class MirrorReflectionCenter : public BC_CheckBox
108 {
109 public:
110         MirrorReflectionCenter(MirrorWindow *window, MirrorMain *client, int x, int y);
111         ~MirrorReflectionCenter();
112         int handle_event();
113
114         MirrorMain *client;
115         MirrorWindow *window;
116 };
117
118 class MirrorReflectionCenterXText : public BC_TumbleTextBox
119 {
120 public:
121         MirrorReflectionCenterXText(MirrorWindow *window,
122                 MirrorMain *client,
123                 int x,
124                 int y);
125         ~MirrorReflectionCenterXText();
126         int handle_event();
127         MirrorMain *client;
128         MirrorWindow *window;
129 };
130
131 class MirrorReflectionCenterXSlider : public BC_FSlider
132 {
133 public:
134         MirrorReflectionCenterXSlider(MirrorWindow *window, MirrorMain *client,
135                 int x, int y, int w);
136         ~MirrorReflectionCenterXSlider();
137         int handle_event();
138         MirrorWindow *window;
139         MirrorMain *client;
140 };
141
142 class MirrorReflectionCenterYText : public BC_TumbleTextBox
143 {
144 public:
145         MirrorReflectionCenterYText(MirrorWindow *window,
146                 MirrorMain *client,
147                 int x,
148                 int y);
149         ~MirrorReflectionCenterYText();
150         int handle_event();
151         MirrorMain *client;
152         MirrorWindow *window;
153 };
154
155 class MirrorReflectionCenterYSlider : public BC_FSlider
156 {
157 public:
158         MirrorReflectionCenterYSlider(MirrorWindow *window, MirrorMain *client,
159                 int x, int y, int w);
160         ~MirrorReflectionCenterYSlider();
161         int handle_event();
162         MirrorWindow *window;
163         MirrorMain *client;
164 };
165
166 class MirrorReflectionCenterClr : public BC_Button
167 {
168 public:
169         MirrorReflectionCenterClr(MirrorWindow *window, MirrorMain *client,
170                 int x, int y, int clear);
171         ~MirrorReflectionCenterClr();
172         int handle_event();
173         MirrorWindow *window;
174         MirrorMain *client;
175         int clear;
176 };
177
178 class MirrorReset : public BC_GenericButton
179 {
180 public:
181         MirrorReset(MirrorMain *client, MirrorWindow *window, int x, int y);
182         ~MirrorReset();
183         int handle_event();
184         MirrorMain *client;
185         MirrorWindow *window;
186 };
187
188 #endif