add libdav1d codec, add remap_a/v_codec option keywords
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / cwindowtool.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 CWINDOWTOOL_H
23 #define CWINDOWTOOL_H
24
25 #include "condition.inc"
26 #include "cwindowgui.inc"
27 #include "cwindowtool.inc"
28 #include "guicast.h"
29 #include "keyframe.inc"
30 #include "maskauto.inc"
31 #include "maskautos.inc"
32 #include "mwindow.inc"
33
34 enum {
35         MASK_SHAPE_SQUARE,
36         MASK_SHAPE_CIRCLE,
37         MASK_SHAPE_TRIANGLE,
38         MASK_SHAPE_OVAL,
39 };
40 enum {
41         MASK_SCALE_X,
42         MASK_SCALE_Y,
43         MASK_SCALE_XY,
44 };
45
46 // This common thread supports all the tool GUI's.
47 class CWindowTool : public Thread
48 {
49 public:
50         CWindowTool(MWindow *mwindow, CWindowGUI *gui);
51         ~CWindowTool();
52
53 // Called depending on state of toggle button
54         void start_tool(int operation);
55         void stop_tool();
56
57 // Called when window is visible
58         void show_tool();
59         void hide_tool();
60         void raise_tool();
61
62         void run();
63         void update_show_window();
64         void raise_window();
65         void update_values();
66
67         MWindow *mwindow;
68         CWindowGUI *gui;
69         CWindowToolGUI *tool_gui;
70         int done;
71         int current_tool;
72         Condition *input_lock;
73         Condition *output_lock;
74 // Lock run and update_values
75         Mutex *tool_gui_lock;
76 };
77
78 class CWindowToolGUI : public BC_Window
79 {
80 public:
81         CWindowToolGUI(MWindow *mwindow,
82                 CWindowTool *thread,
83                 const char *title,
84                 int w,
85                 int h);
86         ~CWindowToolGUI();
87
88         virtual void create_objects() {};
89 // Update the keyframe from text boxes
90         virtual void handle_event() {};
91 // Update text boxes from keyframe here
92         virtual void update() {};
93 // Update EDL and preview only
94         void update_preview(int changed_edl=0);
95         void draw_preview(int changed_edl);
96         int current_operation;
97         virtual int close_event();
98         int keypress_event();
99         int translation_event();
100
101         MWindow *mwindow;
102         CWindowTool *thread;
103         CWindowCoord *event_caller;
104 };
105
106 class CWindowCoord : public BC_TumbleTextBox
107 {
108 public:
109         CWindowCoord(CWindowToolGUI *gui, int x, int y,
110                         float value, int logincrement);
111         CWindowCoord(CWindowToolGUI *gui, int x, int y,
112                         int value);
113
114 // Calls the window's handle_event
115         int handle_event();
116
117         CWindowToolGUI *gui;
118 };
119
120 class CWindowCropOK : public BC_GenericButton
121 {
122 public:
123         CWindowCropOK(MWindow *mwindow, CWindowToolGUI *gui,
124                         int x, int y);
125 // Perform the cropping operation
126         int handle_event();
127         int keypress_event();
128         MWindow *mwindow;
129         CWindowToolGUI *gui;
130 };
131
132 class CWindowCropGUI : public CWindowToolGUI
133 {
134 public:
135         CWindowCropGUI(MWindow *mwindow, CWindowTool *thread);
136         ~CWindowCropGUI();
137         void create_objects();
138         void update();
139 // Update the gui
140         void handle_event();
141         CWindowCoord *x1, *y1, *width, *height;
142 };
143
144 class CWindowMaskItem : public BC_ListBoxItem
145 {
146 public:
147         CWindowMaskItem(const char *text, int id=-1, int color=-1)
148          : BC_ListBoxItem(text, color), id(id) {}
149         ~CWindowMaskItem() {}
150         int id;
151 };
152
153 class CWindowMaskItems : public ArrayList<BC_ListBoxItem*>
154 {
155 public:
156         CWindowMaskItems() {}
157         ~CWindowMaskItems() { remove_all_objects(); }
158 };
159
160 class CWindowMaskOnTrack : public BC_PopupTextBox
161 {
162 public:
163         CWindowMaskOnTrack(MWindow *mwindow, CWindowMaskGUI *gui,
164                         int x, int y, int w, const char *text);
165         ~CWindowMaskOnTrack();
166         MWindow *mwindow;
167         CWindowMaskGUI *gui;
168         CWindowMaskItems track_items;
169
170         int handle_event();
171         void update_items();
172 };
173
174 class CWindowMaskTrackTumbler : public BC_Tumbler
175 {
176 public:
177         CWindowMaskTrackTumbler(MWindow *mwindow, CWindowMaskGUI *gui,
178                         int x, int y);
179         ~CWindowMaskTrackTumbler();
180         int handle_up_event();
181         int handle_down_event();
182         int do_event(int dir);
183
184         MWindow *mwindow;
185         CWindowMaskGUI *gui;
186 };
187
188
189 class CWindowMaskName : public BC_PopupTextBox
190 {
191 public:
192         CWindowMaskName(MWindow *mwindow, CWindowMaskGUI *gui,
193                         int x, int y, const char *text);
194         ~CWindowMaskName();
195         MWindow *mwindow;
196         CWindowMaskGUI *gui;
197         CWindowMaskItems mask_items;
198
199         int handle_event();
200         void update_items(MaskAuto *keyframe);
201 };
202
203 class CWindowMaskUnclear : public BC_Button
204 {
205 public:
206         CWindowMaskUnclear(MWindow *mwindow, CWindowMaskGUI *gui,
207                         int x, int y);
208         int handle_event();
209         MWindow *mwindow;
210         CWindowMaskGUI *gui;
211 };
212
213 class CWindowMaskSoloTrack : public BC_CheckBox
214 {
215 public:
216         CWindowMaskSoloTrack(MWindow *mwindow, CWindowMaskGUI *gui,
217                         int x, int y, int v);
218         static int calculate_w(BC_WindowBase *gui);
219         int handle_event();
220         MWindow *mwindow;
221         CWindowMaskGUI *gui;
222 };
223
224 class CWindowMaskDelMask : public BC_GenericButton
225 {
226 public:
227         CWindowMaskDelMask(MWindow *mwindow, CWindowMaskGUI *gui,
228                         int x, int y);
229         int handle_event();
230         MWindow *mwindow;
231         CWindowMaskGUI *gui;
232 };
233
234 class CWindowMaskClrMask : public BC_Button
235 {
236 public:
237         CWindowMaskClrMask(MWindow *mwindow, CWindowMaskGUI *gui,
238                         int x, int y);
239         ~CWindowMaskClrMask();
240         static int calculate_w(MWindow *mwindow);
241         int handle_event();
242         MWindow *mwindow;
243         CWindowMaskGUI *gui;
244 };
245
246 class CWindowMaskButton : public BC_CheckBox
247 {
248 public:
249         CWindowMaskButton(MWindow *mwindow, CWindowMaskGUI *gui,
250                          int x, int y, int no, int v);
251         ~CWindowMaskButton();
252
253         int handle_event();
254         MWindow *mwindow;
255         CWindowMaskGUI *gui;
256         int no;
257 };
258
259 class CWindowMaskThumbler : public BC_Tumbler
260 {
261 public:
262         CWindowMaskThumbler(MWindow *mwindow, CWindowMaskGUI *gui,
263                         int x, int y);
264         ~CWindowMaskThumbler();
265         int handle_up_event();
266         int handle_down_event();
267         int do_event(int dir);
268
269         MWindow *mwindow;
270         CWindowMaskGUI *gui;
271 };
272
273 class CWindowMaskEnable : public BC_CheckBox
274 {
275 public:
276         CWindowMaskEnable(MWindow *mwindow, CWindowMaskGUI *gui,
277                          int x, int y, int no, int v);
278         ~CWindowMaskEnable();
279
280         int handle_event();
281         MWindow *mwindow;
282         CWindowMaskGUI *gui;
283         int no;
284 };
285
286 class CWindowMaskFade : public BC_TumbleTextBox
287 {
288 public:
289         CWindowMaskFade(MWindow *mwindow, CWindowMaskGUI *gui,
290                         int x, int y);
291         ~CWindowMaskFade();
292         int update(float v);
293         int update_value(float v);
294         int handle_event();
295         MWindow *mwindow;
296         CWindowMaskGUI *gui;
297 };
298
299 class CWindowMaskFadeSlider : public BC_ISlider
300 {
301 public:
302         CWindowMaskFadeSlider(MWindow *mwindow, CWindowMaskGUI *gui,
303                 int x, int y, int w);
304         ~CWindowMaskFadeSlider();
305         int handle_event();
306         int update(int64_t v);
307         char *get_caption() { return 0; }
308         MWindow *mwindow;
309         CWindowMaskGUI *gui;
310         int stick;
311         float last_v;
312         Timer *timer;
313 };
314
315 class CWindowMaskGangFader : public BC_Toggle
316 {
317 public:
318         CWindowMaskGangFader(MWindow *mwindow, CWindowMaskGUI *gui,
319                         int x, int y);
320         ~CWindowMaskGangFader();
321         int handle_event();
322         MWindow *mwindow;
323         CWindowMaskGUI *gui;
324 };
325
326 class CWindowMaskGangFocus : public BC_Toggle
327 {
328 public:
329         CWindowMaskGangFocus(MWindow *mwindow, CWindowMaskGUI *gui,
330                         int x, int y);
331         ~CWindowMaskGangFocus();
332         int handle_event();
333         MWindow *mwindow;
334         CWindowMaskGUI *gui;
335 };
336
337 class CWindowMaskGangPoint : public BC_Toggle
338 {
339 public:
340         CWindowMaskGangPoint(MWindow *mwindow, CWindowMaskGUI *gui,
341                         int x, int y);
342         ~CWindowMaskGangPoint();
343         int handle_event();
344         MWindow *mwindow;
345         CWindowMaskGUI *gui;
346 };
347
348 class CWindowMaskSmoothButton : public BC_Button
349 {
350 public:
351         CWindowMaskSmoothButton(MWindow *mwindow, CWindowMaskGUI *gui,
352                 const char *tip, int type, int on, int x, int y, const char *images);
353         int handle_event();
354         MWindow *mwindow;
355         CWindowMaskGUI *gui;
356         int type, on;
357 };
358
359 class CWindowMaskAffectedPoint : public BC_TumbleTextBox
360 {
361 public:
362         CWindowMaskAffectedPoint(MWindow *mwindow, CWindowMaskGUI *gui,
363                         int x, int y);
364         ~CWindowMaskAffectedPoint();
365         int handle_event();
366         MWindow *mwindow;
367         CWindowMaskGUI *gui;
368 };
369
370 class CWindowMaskFocus : public BC_CheckBox
371 {
372 public:
373         CWindowMaskFocus(MWindow *mwindow, CWindowMaskGUI *gui,
374                         int x, int y);
375         ~CWindowMaskFocus();
376         int handle_event();
377         MWindow *mwindow;
378         CWindowMaskGUI *gui;
379         static int calculate_w(CWindowMaskGUI *gui);
380 };
381
382 class CWindowMaskScaleXY : public BC_Toggle
383 {
384 public:
385         CWindowMaskScaleXY(MWindow *mwindow, CWindowMaskGUI *gui,
386                         int x, int y, VFrame **data, int v,
387                         int id, const char *tip);
388         ~CWindowMaskScaleXY();
389         int handle_event();
390         MWindow *mwindow;
391         CWindowMaskGUI *gui;
392         int id;
393 };
394
395 class CWindowMaskHelp : public BC_CheckBox
396 {
397 public:
398         CWindowMaskHelp(MWindow *mwindow, CWindowMaskGUI *gui,
399                         int x, int y);
400         ~CWindowMaskHelp();
401         int handle_event();
402         MWindow *mwindow;
403         CWindowMaskGUI *gui;
404 };
405
406 class CWindowMaskDrawMarkers : public BC_CheckBox
407 {
408 public:
409         CWindowMaskDrawMarkers(MWindow *mwindow, CWindowMaskGUI *gui,
410                         int x, int y);
411         ~CWindowMaskDrawMarkers();
412         int handle_event();
413         MWindow *mwindow;
414         CWindowMaskGUI *gui;
415 };
416
417 class CWindowMaskDrawBoundary : public BC_CheckBox
418 {
419 public:
420         CWindowMaskDrawBoundary(MWindow *mwindow, CWindowMaskGUI *gui,
421                         int x, int y);
422         ~CWindowMaskDrawBoundary();
423         int handle_event();
424         MWindow *mwindow;
425         CWindowMaskGUI *gui;
426 };
427
428 class CWindowMaskDelPoint : public BC_GenericButton
429 {
430 public:
431         CWindowMaskDelPoint(MWindow *mwindow, CWindowMaskGUI *gui,
432                         int x, int y);
433         int handle_event();
434         MWindow *mwindow;
435         CWindowMaskGUI *gui;
436 };
437
438 class CWindowMaskFeather : public BC_TumbleTextBox
439 {
440 public:
441         CWindowMaskFeather(MWindow *mwindow, CWindowMaskGUI *gui,
442                         int x, int y);
443         ~CWindowMaskFeather();
444         int update(float v);
445         int update_value(float v);
446         int handle_event();
447         MWindow *mwindow;
448         CWindowMaskGUI *gui;
449 };
450
451 class CWindowMaskFeatherSlider : public BC_FSlider
452 {
453 public:
454         CWindowMaskFeatherSlider(MWindow *mwindow, CWindowMaskGUI *gui,
455                 int x, int y, int w, float v);
456         ~CWindowMaskFeatherSlider();
457         int handle_event();
458         int update(float v);
459         int update(int r, float v, float mn, float mx);
460         char *get_caption() { return 0; }
461         MWindow *mwindow;
462         CWindowMaskGUI *gui;
463         int stick;
464         float last_v;
465         float max;
466         Timer *timer;
467 };
468
469 class CWindowMaskGangFeather : public BC_Toggle
470 {
471 public:
472         CWindowMaskGangFeather(MWindow *mwindow, CWindowMaskGUI *gui,
473                         int x, int y);
474         ~CWindowMaskGangFeather();
475         int handle_event();
476         MWindow *mwindow;
477         CWindowMaskGUI *gui;
478 };
479
480 class CWindowMaskBeforePlugins : public BC_CheckBox
481 {
482 public:
483         CWindowMaskBeforePlugins(CWindowMaskGUI *gui,
484                         int x, int y);
485         int handle_event();
486         CWindowMaskGUI *gui;
487 };
488
489 class CWindowMaskLoadList : public BC_ListBox
490 {
491 public:
492         CWindowMaskLoadList(MWindow *mwindow, CWindowMaskGUI *gui);
493         ~CWindowMaskLoadList();
494         void create_objects();
495         int handle_event();
496
497         MWindow *mwindow;
498         CWindowMaskGUI *gui;
499         CWindowMaskItems shape_items;
500 };
501
502 class CWindowMaskLoad : public BC_Button
503 {
504 public:
505         CWindowMaskLoad(MWindow *mwindow, CWindowMaskGUI *gui,
506                         int x, int y, int w);
507         int handle_event();
508
509         MWindow *mwindow;
510         CWindowMaskGUI *gui;
511 };
512
513 class CWindowMaskSave : public BC_Button
514 {
515 public:
516         CWindowMaskSave(MWindow *mwindow, CWindowMaskGUI *gui,
517                         int x, int y, int w);
518         ~CWindowMaskSave();
519         int handle_event();
520
521         MWindow *mwindow;
522         CWindowMaskGUI *gui;
523         CWindowMaskPresetDialog *preset_dialog;
524 };
525
526 class CWindowMaskPresetDialog : public BC_DialogThread
527 {
528 public:
529         CWindowMaskPresetDialog(MWindow *mwindow, CWindowMaskGUI *gui);
530         ~CWindowMaskPresetDialog();
531         void handle_close_event(int result);
532         void handle_done_event(int result);
533         BC_Window* new_gui();
534         void start_dialog(int sx, int sy, MaskAuto *keyframe);
535
536         MWindow *mwindow;
537         CWindowMaskGUI *gui;
538         CWindowMaskPresetGUI *pgui;
539         int sx, sy;
540         MaskAuto *keyframe;
541 };
542
543 class CWindowMaskPresetGUI : public BC_Window
544 {
545 public:
546         CWindowMaskPresetGUI(CWindowMaskPresetDialog *preset_dialog,
547                         int x, int y, const char *title);
548         void create_objects();
549
550         CWindowMaskPresetDialog *preset_dialog;
551         CWindowMaskPresetText *preset_text;
552 };
553
554 class CWindowMaskPresetText : public BC_PopupTextBox
555 {
556 public:
557         CWindowMaskPresetText(CWindowMaskPresetGUI *pgui,
558                 int x, int y, int w, int h, const char *text);
559         int handle_event();
560         void update_items();
561
562         CWindowMaskPresetGUI *pgui;
563         CWindowMaskItems mask_items;
564 };
565
566 class CWindowMaskDelete : public BC_Button
567 {
568 public:
569         CWindowMaskDelete(MWindow *mwindow, CWindowMaskGUI *gui,
570                         int x, int y, int w);
571         int handle_event();
572
573         MWindow *mwindow;
574         CWindowMaskGUI *gui;
575 };
576
577 class CWindowMaskCenter : public BC_Button
578 {
579 public:
580         CWindowMaskCenter(MWindow *mwindow, CWindowMaskGUI *gui,
581                         int x, int y, int w);
582         int handle_event();
583
584         MWindow *mwindow;
585         CWindowMaskGUI *gui;
586 };
587
588 class CWindowMaskNormal : public BC_Button
589 {
590 public:
591         CWindowMaskNormal(MWindow *mwindow, CWindowMaskGUI *gui,
592                         int x, int y, int w);
593         int handle_event();
594
595         MWindow *mwindow;
596         CWindowMaskGUI *gui;
597 };
598
599 class CWindowMaskShape : public BC_Button
600 {
601 public:
602         CWindowMaskShape(MWindow *mwindow, CWindowMaskGUI *gui,
603                 const char *images, int shape, int x, int y, const char *tip);
604         ~CWindowMaskShape();
605         void builtin_shape(int i, SubMask *sub_mask);
606         int handle_event();
607
608         MWindow *mwindow;
609         CWindowMaskGUI *gui;
610         int shape;
611         CWindowMaskItems shape_items;
612 };
613
614 class CWindowDisableOpenGLMasking : public BC_CheckBox
615 {
616 public:
617         CWindowDisableOpenGLMasking(CWindowMaskGUI *gui,
618                         int x, int y);
619         int handle_event();
620         CWindowMaskGUI *gui;
621 };
622
623 class CWindowMaskGUI : public CWindowToolGUI
624 {
625 public:
626         CWindowMaskGUI(MWindow *mwindow, CWindowTool *thread);
627         ~CWindowMaskGUI();
628         void create_objects();
629         void update();
630         int close_event();
631         void done_event();
632         void handle_event();
633         void set_focused(int v, float cx, float cy);
634         void update_buttons(MaskAuto *keyframe, int k);
635         void get_keyframe(Track* &track, MaskAutos* &autos, MaskAuto* &keyframe,
636                 SubMask* &mask, MaskPoint* &point, int create_it);
637         void load_masks(ArrayList<SubMask *> &masks);
638         void save_masks(ArrayList<SubMask *> &masks);
639         int smooth_mask(int typ, int on);
640         int save_mask(const char *nm);
641         int del_mask(const char *nm);
642         int center_mask();
643         int normal_mask();
644
645         CWindowMaskOnTrack *mask_on_track;
646         CWindowMaskTrackTumbler *mask_track_tumbler;
647         CWindowMaskName *mask_name;
648         CWindowMaskButton *mask_buttons[SUBMASKS];
649         CWindowMaskThumbler *mask_thumbler;
650         BC_Title *mask_blabels[SUBMASKS];
651         CWindowMaskEnable *mask_enables[SUBMASKS];
652         CWindowMaskSoloTrack *mask_solo_track;
653         CWindowMaskDelMask *mask_del;
654         CWindowMaskUnclear *mask_unclr;
655         CWindowMaskClrMask *mask_clr;
656         CWindowMaskShape *mask_shape_sqr;
657         CWindowMaskShape *mask_shape_crc;
658         CWindowMaskShape *mask_shape_tri;
659         CWindowMaskShape *mask_shape_ovl;
660         CWindowMaskLoadList *mask_load_list;
661         CWindowMaskLoad *mask_load;
662         CWindowMaskSave *mask_save;
663         CWindowMaskDelete *mask_delete;
664         CWindowMaskPresetDialog *preset_dialog;
665         CWindowMaskCenter *mask_center;
666         CWindowMaskNormal *mask_normal;
667         CWindowMaskFade *fade;
668         CWindowMaskFadeSlider *fade_slider;
669         CWindowMaskGangFader *gang_fader;
670         CWindowMaskAffectedPoint *active_point;
671         CWindowMaskDelPoint *del_point;
672         CWindowMaskGangPoint *gang_point;
673         CWindowMaskSmoothButton *mask_pnt_linear, *mask_pnt_smooth;
674         CWindowMaskSmoothButton *mask_crv_linear, *mask_crv_smooth;
675         CWindowMaskSmoothButton *mask_all_linear, *mask_all_smooth;
676         CWindowCoord *x, *y;
677         CWindowMaskScaleXY *mask_scale_x, *mask_scale_y, *mask_scale_xy;
678         int scale_mode;
679         CWindowMaskFocus *focus;
680         int focused;
681         CWindowMaskGangFocus *gang_focus;
682         CWindowMaskHelp *help;
683         int helped, help_y, help_h;
684         CWindowMaskDrawMarkers *draw_markers;
685         int markers;
686         CWindowMaskDrawBoundary *draw_boundary;
687         int boundary;
688         CWindowCoord *focus_x, *focus_y;
689         CWindowMaskFeather *feather;
690         CWindowMaskFeatherSlider *feather_slider;
691         CWindowMaskGangFeather *gang_feather;
692         CWindowMaskBeforePlugins *apply_before_plugins;
693         CWindowDisableOpenGLMasking *disable_opengl_masking;
694 };
695
696
697 class CWindowEyedropGUI : public CWindowToolGUI
698 {
699 public:
700         CWindowEyedropGUI(MWindow *mwindow, CWindowTool *thread);
701         ~CWindowEyedropGUI();
702
703         void handle_event();
704         void create_objects();
705         void update();
706
707         BC_Title *current;
708         CWindowCoord *radius;
709         CWindowEyedropCheckBox *use_max;
710         BC_Title *red, *green, *blue, *y, *u, *v;
711         BC_Title *rgb_hex, *yuv_hex;
712         BC_SubWindow *sample;
713 };
714
715
716 class CWindowEyedropCheckBox : public BC_CheckBox
717 {
718 public:
719         CWindowEyedropCheckBox(MWindow *mwindow, 
720                 CWindowEyedropGUI *gui,
721                 int x, 
722                 int y);
723
724         int handle_event();
725         MWindow *mwindow;
726         CWindowEyedropGUI *gui;
727 };
728
729
730
731 class CWindowCameraGUI : public CWindowToolGUI
732 {
733 public:
734         CWindowCameraGUI(MWindow *mwindow, CWindowTool *thread);
735         ~CWindowCameraGUI();
736         void create_objects();
737         void update();
738
739 // Update the keyframe from text boxes
740         void handle_event();
741 //      BezierAuto* get_keyframe();
742         CWindowCoord *x, *y, *z;
743 private:
744 // Toggles for keyframe curve mode (for camera automation only)
745         CWindowCurveToggle *t_smooth, *t_linear;
746 };
747
748 class CWindowCameraLeft : public BC_Button
749 {
750 public:
751         CWindowCameraLeft(MWindow *mwindow, CWindowCameraGUI *gui,
752                         int x, int y);
753         int handle_event();
754         MWindow *mwindow;
755         CWindowCameraGUI *gui;
756 };
757
758 class CWindowCameraCenter : public BC_Button
759 {
760 public:
761         CWindowCameraCenter(MWindow *mwindow, CWindowCameraGUI *gui,
762                         int x, int y);
763         int handle_event();
764         MWindow *mwindow;
765         CWindowCameraGUI *gui;
766 };
767
768 class CWindowCameraRight : public BC_Button
769 {
770 public:
771         CWindowCameraRight(MWindow *mwindow, CWindowCameraGUI *gui,
772                         int x, int y);
773         int handle_event();
774         MWindow *mwindow;
775         CWindowCameraGUI *gui;
776 };
777
778 class CWindowCameraTop : public BC_Button
779 {
780 public:
781         CWindowCameraTop(MWindow *mwindow, CWindowCameraGUI *gui,
782                         int x, int y);
783         int handle_event();
784         MWindow *mwindow;
785         CWindowCameraGUI *gui;
786 };
787
788 class CWindowCameraMiddle : public BC_Button
789 {
790 public:
791         CWindowCameraMiddle(MWindow *mwindow, CWindowCameraGUI *gui,
792                         int x, int y);
793         int handle_event();
794         MWindow *mwindow;
795         CWindowCameraGUI *gui;
796 };
797
798 class CWindowCameraBottom : public BC_Button
799 {
800 public:
801         CWindowCameraBottom(MWindow *mwindow, CWindowCameraGUI *gui,
802                         int x, int y);
803         int handle_event();
804         MWindow *mwindow;
805         CWindowCameraGUI *gui;
806 };
807
808 class CWindowProjectorGUI : public CWindowToolGUI
809 {
810 public:
811         CWindowProjectorGUI(MWindow *mwindow, CWindowTool *thread);
812         ~CWindowProjectorGUI();
813         void create_objects();
814         void update();
815         void handle_event();
816 //      BezierAuto* get_keyframe();
817         CWindowCoord *x, *y, *z;
818 private:
819 // Toggles for keyframe curve mode (projector automation only)
820         CWindowCurveToggle *t_smooth, *t_linear;
821 };
822
823 class CWindowProjectorLeft : public BC_Button
824 {
825 public:
826         CWindowProjectorLeft(MWindow *mwindow, CWindowProjectorGUI *gui,
827                         int x, int y);
828         int handle_event();
829         MWindow *mwindow;
830         CWindowProjectorGUI *gui;
831 };
832
833 class CWindowProjectorCenter : public BC_Button
834 {
835 public:
836         CWindowProjectorCenter(MWindow *mwindow, CWindowProjectorGUI *gui,
837                         int x, int y);
838         int handle_event();
839         MWindow *mwindow;
840         CWindowProjectorGUI *gui;
841 };
842
843 class CWindowProjectorRight : public BC_Button
844 {
845 public:
846         CWindowProjectorRight(MWindow *mwindow, CWindowProjectorGUI *gui,
847                         int x, int y);
848         int handle_event();
849         MWindow *mwindow;
850         CWindowProjectorGUI *gui;
851 };
852
853 class CWindowProjectorTop : public BC_Button
854 {
855 public:
856         CWindowProjectorTop(MWindow *mwindow, CWindowProjectorGUI *gui,
857                         int x, int y);
858         int handle_event();
859         MWindow *mwindow;
860         CWindowProjectorGUI *gui;
861 };
862
863 class CWindowProjectorMiddle : public BC_Button
864 {
865 public:
866         CWindowProjectorMiddle(MWindow *mwindow, CWindowProjectorGUI *gui,
867                         int x, int y);
868         int handle_event();
869         MWindow *mwindow;
870         CWindowProjectorGUI *gui;
871 };
872
873 class CWindowProjectorBottom : public BC_Button
874 {
875 public:
876         CWindowProjectorBottom(MWindow *mwindow, CWindowProjectorGUI *gui,
877                         int x, int y);
878         int handle_event();
879         MWindow *mwindow;
880         CWindowProjectorGUI *gui;
881 };
882
883
884
885
886 class CWindowRulerGUI : public CWindowToolGUI
887 {
888 public:
889         CWindowRulerGUI(MWindow *mwindow, CWindowTool *thread);
890         ~CWindowRulerGUI();
891         void create_objects();
892         void update();
893 // Update the gui
894         void handle_event();
895
896         BC_TextBox *current;
897         BC_TextBox *point1;
898         BC_TextBox *point2;
899         BC_TextBox *deltas;
900         BC_TextBox *distance;
901         BC_TextBox *angle;
902 };
903
904
905
906 #endif