remove whitespace at eol
[goodguy/history.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,
82                 MotionWindow *gui,
83                 int x,
84                 int y);
85         int handle_event();
86         MotionMain *plugin;
87         MotionWindow *gui;
88 };
89
90 class TrackFrameNumber : public BC_TextBox
91 {
92 public:
93         TrackFrameNumber(MotionMain *plugin,
94                 MotionWindow *gui,
95                 int x,
96                 int y);
97         int handle_event();
98         MotionMain *plugin;
99         MotionWindow *gui;
100 };
101
102 class TrackPreviousFrame : public BC_Radial
103 {
104 public:
105         TrackPreviousFrame(MotionMain *plugin,
106                 MotionWindow *gui,
107                 int x,
108                 int y);
109         int handle_event();
110         MotionMain *plugin;
111         MotionWindow *gui;
112 };
113
114 class PreviousFrameSameBlock : public BC_Radial
115 {
116 public:
117         PreviousFrameSameBlock(MotionMain *plugin,
118                 MotionWindow *gui,
119                 int x,
120                 int y);
121         int handle_event();
122         MotionMain *plugin;
123         MotionWindow *gui;
124 };
125
126 class GlobalRange : public BC_IPot
127 {
128 public:
129         GlobalRange(MotionMain *plugin,
130                 int x,
131                 int y,
132                 int *value);
133         int handle_event();
134         MotionMain *plugin;
135         int *value;
136 };
137
138 class RotationRange : public BC_IPot
139 {
140 public:
141         RotationRange(MotionMain *plugin,
142                 int x,
143                 int y);
144         int handle_event();
145         MotionMain *plugin;
146 };
147
148 class RotationCenter : public BC_IPot
149 {
150 public:
151         RotationCenter(MotionMain *plugin,
152                 int x,
153                 int y);
154         int handle_event();
155         MotionMain *plugin;
156 };
157
158 class BlockSize : public BC_IPot
159 {
160 public:
161         BlockSize(MotionMain *plugin,
162                 int x,
163                 int y,
164                 int *value);
165         int handle_event();
166         MotionMain *plugin;
167         int *value;
168 };
169
170 class MotionBlockX : public BC_FPot
171 {
172 public:
173         MotionBlockX(MotionMain *plugin,
174                 MotionWindow *gui,
175                 int x,
176                 int y);
177         int handle_event();
178         MotionWindow *gui;
179         MotionMain *plugin;
180 };
181
182 class MotionBlockY : public BC_FPot
183 {
184 public:
185         MotionBlockY(MotionMain *plugin,
186                 MotionWindow *gui,
187                 int x,
188                 int y);
189         int handle_event();
190         MotionWindow *gui;
191         MotionMain *plugin;
192 };
193
194 class MotionBlockXText : public BC_TextBox
195 {
196 public:
197         MotionBlockXText(MotionMain *plugin,
198                 MotionWindow *gui,
199                 int x,
200                 int y);
201         int handle_event();
202         MotionWindow *gui;
203         MotionMain *plugin;
204 };
205
206 class MotionBlockYText : public BC_TextBox
207 {
208 public:
209         MotionBlockYText(MotionMain *plugin,
210                 MotionWindow *gui,
211                 int x,
212                 int y);
213         int handle_event();
214         MotionWindow *gui;
215         MotionMain *plugin;
216 };
217
218 // class GlobalSearchPositions : public BC_PopupMenu
219 // {
220 // public:
221 //      GlobalSearchPositions(MotionMain *plugin,
222 //              int x,
223 //              int y,
224 //              int w);
225 //      void create_objects();
226 //      int handle_event();
227 //      MotionMain *plugin;
228 // };
229 //
230 // class RotationSearchPositions : public BC_PopupMenu
231 // {
232 // public:
233 //      RotationSearchPositions(MotionMain *plugin,
234 //              int x,
235 //              int y,
236 //              int w);
237 //      void create_objects();
238 //      int handle_event();
239 //      MotionMain *plugin;
240 // };
241
242 class MotionMagnitude : public BC_IPot
243 {
244 public:
245         MotionMagnitude(MotionMain *plugin,
246                 int x,
247                 int y);
248         int handle_event();
249         MotionMain *plugin;
250 };
251
252 class MotionRMagnitude : public BC_IPot
253 {
254 public:
255         MotionRMagnitude(MotionMain *plugin,
256                 int x,
257                 int y);
258         int handle_event();
259         MotionMain *plugin;
260 };
261
262 class MotionReturnSpeed : public BC_IPot
263 {
264 public:
265         MotionReturnSpeed(MotionMain *plugin,
266                 int x,
267                 int y);
268         int handle_event();
269         MotionMain *plugin;
270 };
271
272
273 class MotionRReturnSpeed : public BC_IPot
274 {
275 public:
276         MotionRReturnSpeed(MotionMain *plugin,
277                 int x,
278                 int y);
279         int handle_event();
280         MotionMain *plugin;
281 };
282
283
284 class MotionDrawVectors : public BC_CheckBox
285 {
286 public:
287         MotionDrawVectors(MotionMain *plugin,
288                 MotionWindow *gui,
289                 int x,
290                 int y);
291         int handle_event();
292         MotionMain *plugin;
293         MotionWindow *gui;
294 };
295
296 class AddTrackedFrameOffset : public BC_CheckBox
297 {
298 public:
299         AddTrackedFrameOffset(MotionMain *plugin,
300                 MotionWindow *gui,
301                 int x,
302                 int y);
303         int handle_event();
304         MotionWindow *gui;
305         MotionMain *plugin;
306 };
307
308 // class MotionGlobal : public BC_CheckBox
309 // {
310 // public:
311 //      MotionGlobal(MotionMain *plugin,
312 //              MotionWindow *gui,
313 //              int x,
314 //              int y);
315 //      int handle_event();
316 //      MotionWindow *gui;
317 //      MotionMain *plugin;
318 // };
319
320 class MotionRotate : public BC_CheckBox
321 {
322 public:
323         MotionRotate(MotionMain *plugin,
324                 MotionWindow *gui,
325                 int x,
326                 int y);
327         int handle_event();
328         MotionWindow *gui;
329         MotionMain *plugin;
330 };
331
332
333
334 class MotionWindow : public PluginClientWindow
335 {
336 public:
337         MotionWindow(MotionMain *plugin);
338         ~MotionWindow();
339
340         void create_objects();
341         void update_mode();
342         char* get_radius_title();
343
344         GlobalRange *global_range_w;
345         GlobalRange *global_range_h;
346         RotationRange *rotation_range;
347         RotationCenter *rotation_center;
348         BlockSize *global_block_w;
349         BlockSize *global_block_h;
350         BlockSize *rotation_block_w;
351         BlockSize *rotation_block_h;
352         MotionBlockX *block_x;
353         MotionBlockY *block_y;
354         MotionBlockXText *block_x_text;
355         MotionBlockYText *block_y_text;
356 //      GlobalSearchPositions *global_search_positions;
357 //      RotationSearchPositions *rotation_search_positions;
358         MotionMagnitude *magnitude;
359         MotionRMagnitude *rotate_magnitude;
360         MotionReturnSpeed *return_speed;
361         MotionRReturnSpeed *rotate_return_speed;
362         ActionType *action_type;
363         MotionDrawVectors *vectors;
364 //      MotionGlobal *global;
365         MotionRotate *rotate;
366         AddTrackedFrameOffset *addtrackedframeoffset;
367         TrackSingleFrame *track_single;
368         TrackFrameNumber *track_frame_number;
369         TrackPreviousFrame *track_previous;
370         PreviousFrameSameBlock *previous_same;
371         MasterLayer *master_layer;
372         TrackingType *tracking_type;
373         TrackDirection *track_direction;
374
375         MotionMain *plugin;
376 };
377
378
379
380
381
382
383
384
385