no longer need ffmpeg patch0 which was for Termux
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / motion / motionwindow.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 #include "guicast.h"
23 #include "motion.inc"
24
25 class MasterLayer : public BC_PopupMenu
26 {
27 public:
28         MasterLayer(MotionMain *plugin, MotionWindow *gui, int x, int y);
29         int handle_event();
30         void create_objects();
31         static int calculate_w(MotionWindow *gui);
32         static int from_text(char *text);
33         static char* to_text(int mode);
34         MotionMain *plugin;
35         MotionWindow *gui;
36 };
37
38 class ActionType : public BC_PopupMenu
39 {
40 public:
41         ActionType(MotionMain *plugin, MotionWindow *gui, int x, int y);
42         int handle_event();
43         void create_objects();
44         static int calculate_w(MotionWindow *gui);
45         static int from_text(char *text);
46         static char* to_text(int mode);
47         MotionMain *plugin;
48         MotionWindow *gui;
49 };
50
51 class TrackingType : public BC_PopupMenu
52 {
53 public:
54         TrackingType(MotionMain *plugin, MotionWindow *gui, int x, int y);
55         int handle_event();
56         void create_objects();
57         static int calculate_w(MotionWindow *gui);
58         static int from_text(char *text);
59         static char* to_text(int mode);
60         MotionMain *plugin;
61         MotionWindow *gui;
62 };
63
64 class TrackDirection : public BC_PopupMenu
65 {
66 public:
67         TrackDirection(MotionMain *plugin, MotionWindow *gui, int x, int y);
68         int handle_event();
69         void create_objects();
70         static int calculate_w(MotionWindow *gui);
71         static void from_text(int *horizontal_only, int *vertical_only, char *text);
72         static char* to_text(int horizontal_only, int vertical_only);
73         MotionMain *plugin;
74         MotionWindow *gui;
75 };
76
77
78 class TrackSingleFrame : public BC_Radial
79 {
80 public:
81         TrackSingleFrame(MotionMain *plugin, MotionWindow *gui, int x, int y);
82         int handle_event();
83         MotionMain *plugin;
84         MotionWindow *gui;
85 };
86
87 class TrackFrameNumber : public BC_TextBox
88 {
89 public:
90         TrackFrameNumber(MotionMain *plugin, MotionWindow *gui, int x, int y);
91         int handle_event();
92         MotionMain *plugin;
93         MotionWindow *gui;
94 };
95
96 class TrackPreviousFrame : public BC_Radial
97 {
98 public:
99         TrackPreviousFrame(MotionMain *plugin, MotionWindow *gui, int x, int y);
100         int handle_event();
101         MotionMain *plugin;
102         MotionWindow *gui;
103 };
104
105 class PreviousFrameSameBlock : public BC_Radial
106 {
107 public:
108         PreviousFrameSameBlock(MotionMain *plugin, MotionWindow *gui, int x, int y);
109         int handle_event();
110         MotionMain *plugin;
111         MotionWindow *gui;
112 };
113
114 class GlobalRange : public BC_IPot
115 {
116 public:
117         GlobalRange(MotionMain *plugin, int x, int y, int *value);
118         int handle_event();
119         MotionMain *plugin;
120         int *value;
121 };
122
123 class RotationRange : public BC_IPot
124 {
125 public:
126         RotationRange(MotionMain *plugin, int x, int y);
127         int handle_event();
128         MotionMain *plugin;
129 };
130
131 class RotationCenter : public BC_IPot
132 {
133 public:
134         RotationCenter(MotionMain *plugin, int x, int y);
135         int handle_event();
136         MotionMain *plugin;
137 };
138
139 class BlockSize : public BC_IPot
140 {
141 public:
142         BlockSize(MotionMain *plugin, int x, int y, int *value);
143         int handle_event();
144         MotionMain *plugin;
145         int *value;
146 };
147
148 class MotionBlockX : public BC_FPot
149 {
150 public:
151         MotionBlockX(MotionMain *plugin, MotionWindow *gui, int x, int y);
152         int handle_event();
153         MotionWindow *gui;
154         MotionMain *plugin;
155 };
156
157 class MotionBlockY : public BC_FPot
158 {
159 public:
160         MotionBlockY(MotionMain *plugin, MotionWindow *gui, int x, int y);
161         int handle_event();
162         MotionWindow *gui;
163         MotionMain *plugin;
164 };
165
166 class MotionBlockXText : public BC_TextBox
167 {
168 public:
169         MotionBlockXText(MotionMain *plugin, MotionWindow *gui, int x, int y);
170         int handle_event();
171         MotionWindow *gui;
172         MotionMain *plugin;
173 };
174
175 class MotionBlockYText : public BC_TextBox
176 {
177 public:
178         MotionBlockYText(MotionMain *plugin, MotionWindow *gui, int x, int y);
179         int handle_event();
180         MotionWindow *gui;
181         MotionMain *plugin;
182 };
183
184 class GlobalSearchPositions : public BC_PopupMenu
185 {
186 public:
187         GlobalSearchPositions(MotionMain *plugin, int x, int y, int w);
188         void create_objects();
189         int handle_event();
190         MotionMain *plugin;
191 };
192
193 class RotationSearchPositions : public BC_PopupMenu
194 {
195 public:
196         RotationSearchPositions(MotionMain *plugin, int x, int y, int w);
197         void create_objects();
198         int handle_event();
199         MotionMain *plugin;
200 };
201
202 class MotionMagnitude : public BC_IPot
203 {
204 public:
205         MotionMagnitude(MotionMain *plugin, int x, int y);
206         int handle_event();
207         MotionMain *plugin;
208 };
209
210 class MotionRMagnitude : public BC_IPot
211 {
212 public:
213         MotionRMagnitude(MotionMain *plugin, int x, int y);
214         int handle_event();
215         MotionMain *plugin;
216 };
217
218 class MotionReturnSpeed : public BC_IPot
219 {
220 public:
221         MotionReturnSpeed(MotionMain *plugin, int x, int y);
222         int handle_event();
223         MotionMain *plugin;
224 };
225
226
227 class MotionRReturnSpeed : public BC_IPot
228 {
229 public:
230         MotionRReturnSpeed(MotionMain *plugin, int x, int y);
231         int handle_event();
232         MotionMain *plugin;
233 };
234
235
236 class MotionNoiseLevel : public BC_FPot
237 {
238 public:
239         MotionNoiseLevel(MotionMain *plugin, MotionWindow *gui, int x, int y);
240         int handle_event();
241         MotionWindow *gui;
242         MotionMain *plugin;
243 };
244
245 class MotionNoiseLevelText : public BC_TextBox
246 {
247 public:
248         MotionNoiseLevelText(MotionMain *plugin, MotionWindow *gui, int x, int y);
249         int handle_event();
250         MotionWindow *gui;
251         MotionMain *plugin;
252 };
253
254 class MotionNoiseRotation : public BC_FPot
255 {
256 public:
257         MotionNoiseRotation(MotionMain *plugin, MotionWindow *gui, int x, int y);
258         int handle_event();
259         MotionWindow *gui;
260         MotionMain *plugin;
261 };
262
263 class MotionNoiseRotationText : public BC_TextBox
264 {
265 public:
266         MotionNoiseRotationText(MotionMain *plugin, MotionWindow *gui, int x, int y);
267         int handle_event();
268         MotionWindow *gui;
269         MotionMain *plugin;
270 };
271
272
273 class MotionDrawVectors : public BC_CheckBox
274 {
275 public:
276         MotionDrawVectors(MotionMain *plugin, MotionWindow *gui, int x, int y);
277         int handle_event();
278         MotionMain *plugin;
279         MotionWindow *gui;
280 };
281
282 class AddTrackedFrameOffset : public BC_CheckBox
283 {
284 public:
285         AddTrackedFrameOffset(MotionMain *plugin, MotionWindow *gui, int x, int y);
286         int handle_event();
287         MotionWindow *gui;
288         MotionMain *plugin;
289 };
290
291 class MotionTrackingFile : public BC_TextBox
292 {
293 public:
294         MotionTrackingFile(MotionMain *plugin, const char *filename,
295                 MotionWindow *gui, int x, int y);
296         int handle_event();
297         MotionMain *plugin;
298         MotionWindow *gui;
299 };
300
301 class MotionResetTracking : public BC_GenericButton
302 {
303 public:
304         MotionResetTracking(MotionMain *plugin, MotionWindow *gui, int x, int y);
305         int handle_event();
306         MotionMain *plugin;
307         MotionWindow *gui;
308 };
309
310 class MotionClearTracking : public BC_GenericButton
311 {
312 public:
313         MotionClearTracking(MotionMain *plugin, MotionWindow *gui, int x, int y);
314         int handle_event();
315         MotionMain *plugin;
316         MotionWindow *gui;
317 };
318
319 class MotionFrameCurrent : public BC_GenericButton
320 {
321 public:
322         MotionFrameCurrent(MotionMain *plugin,  MotionWindow *gui, int x, int y);
323         int handle_event();
324         MotionMain *plugin;
325         MotionWindow *gui;
326 };
327
328 class MotionGlobal : public BC_CheckBox
329 {
330 public:
331         MotionGlobal(MotionMain *plugin, MotionWindow *gui, int x, int y);
332         int handle_event();
333         MotionWindow *gui;
334         MotionMain *plugin;
335 };
336
337 class MotionRotate : public BC_CheckBox
338 {
339 public:
340         MotionRotate(MotionMain *plugin, MotionWindow *gui, int x, int y);
341         int handle_event();
342         MotionWindow *gui;
343         MotionMain *plugin;
344 };
345
346 class MotionTwopass : public BC_CheckBox
347 {
348 public:
349         MotionTwopass(MotionMain *plugin, MotionWindow *gui, int x, int y);
350         int handle_event();
351         MotionWindow *gui;
352         MotionMain *plugin;
353 };
354
355
356
357 class MotionWindow : public PluginClientWindow
358 {
359 public:
360         MotionWindow(MotionMain *plugin);
361         ~MotionWindow();
362
363         void create_objects();
364         void update_mode();
365         char* get_radius_title();
366
367         GlobalRange *global_range_w;
368         GlobalRange *global_range_h;
369         RotationRange *rotation_range;
370         RotationCenter *rotation_center;
371         BlockSize *global_block_w;
372         BlockSize *global_block_h;
373         BlockSize *rotation_block_w;
374         BlockSize *rotation_block_h;
375         MotionBlockX *block_x;
376         MotionBlockY *block_y;
377         MotionBlockXText *block_x_text;
378         MotionBlockYText *block_y_text;
379         GlobalSearchPositions *global_search_positions;
380         RotationSearchPositions *rotation_search_positions;
381         MotionMagnitude *magnitude;
382         MotionRMagnitude *rotate_magnitude;
383         MotionReturnSpeed *return_speed;
384         MotionRReturnSpeed *rotate_return_speed;
385         MotionNoiseLevel *noise_level;
386         MotionNoiseLevelText *noise_level_text;
387         MotionNoiseRotation *noise_rotation;
388         MotionNoiseRotationText *noise_rotation_text;
389         ActionType *action_type;
390         MotionDrawVectors *vectors;
391         MotionTrackingFile *tracking_file;
392         MotionResetTracking *reset_tracking;
393         MotionClearTracking *clear_tracking;
394         MotionFrameCurrent *frame_current;
395         MotionGlobal *global;
396         MotionRotate *rotate;
397         MotionTwopass *twopass;
398         AddTrackedFrameOffset *addtrackedframeoffset;
399         TrackSingleFrame *track_single;
400         TrackFrameNumber *track_frame_number;
401         TrackPreviousFrame *track_previous;
402         PreviousFrameSameBlock *previous_same;
403         MasterLayer *master_layer;
404         TrackingType *tracking_type;
405         TrackDirection *track_direction;
406         BC_Title *pef_title;
407
408         MotionMain *plugin;
409 };
410
411