add igors mask svgs, add composer clear_color pref, remove key DEL for mask gui,...
[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         char *get_caption() { return 0; }
460         MWindow *mwindow;
461         CWindowMaskGUI *gui;
462         int stick;
463         float last_v;
464         Timer *timer;
465 };
466
467 class CWindowMaskGangFeather : public BC_Toggle
468 {
469 public:
470         CWindowMaskGangFeather(MWindow *mwindow, CWindowMaskGUI *gui,
471                         int x, int y);
472         ~CWindowMaskGangFeather();
473         int handle_event();
474         MWindow *mwindow;
475         CWindowMaskGUI *gui;
476 };
477
478 class CWindowMaskBeforePlugins : public BC_CheckBox
479 {
480 public:
481         CWindowMaskBeforePlugins(CWindowMaskGUI *gui,
482                         int x, int y);
483         int handle_event();
484         CWindowMaskGUI *gui;
485 };
486
487 class CWindowMaskLoadList : public BC_ListBox
488 {
489 public:
490         CWindowMaskLoadList(MWindow *mwindow, CWindowMaskGUI *gui);
491         ~CWindowMaskLoadList();
492         void create_objects();
493         int handle_event();
494
495         MWindow *mwindow;
496         CWindowMaskGUI *gui;
497         CWindowMaskItems shape_items;
498 };
499
500 class CWindowMaskLoad : public BC_Button
501 {
502 public:
503         CWindowMaskLoad(MWindow *mwindow, CWindowMaskGUI *gui,
504                         int x, int y, int w);
505         int handle_event();
506
507         MWindow *mwindow;
508         CWindowMaskGUI *gui;
509 };
510
511 class CWindowMaskSave : public BC_Button
512 {
513 public:
514         CWindowMaskSave(MWindow *mwindow, CWindowMaskGUI *gui,
515                         int x, int y, int w);
516         ~CWindowMaskSave();
517         int handle_event();
518
519         MWindow *mwindow;
520         CWindowMaskGUI *gui;
521         CWindowMaskPresetDialog *preset_dialog;
522 };
523
524 class CWindowMaskPresetDialog : public BC_DialogThread
525 {
526 public:
527         CWindowMaskPresetDialog(MWindow *mwindow, CWindowMaskGUI *gui);
528         ~CWindowMaskPresetDialog();
529         void handle_close_event(int result);
530         void handle_done_event(int result);
531         BC_Window* new_gui();
532         void start_dialog(int sx, int sy, MaskAuto *keyframe);
533
534         MWindow *mwindow;
535         CWindowMaskGUI *gui;
536         CWindowMaskPresetGUI *pgui;
537         int sx, sy;
538         MaskAuto *keyframe;
539 };
540
541 class CWindowMaskPresetGUI : public BC_Window
542 {
543 public:
544         CWindowMaskPresetGUI(CWindowMaskPresetDialog *preset_dialog,
545                         int x, int y, const char *title);
546         void create_objects();
547
548         CWindowMaskPresetDialog *preset_dialog;
549         CWindowMaskPresetText *preset_text;
550 };
551
552 class CWindowMaskPresetText : public BC_PopupTextBox
553 {
554 public:
555         CWindowMaskPresetText(CWindowMaskPresetGUI *pgui,
556                 int x, int y, int w, int h, const char *text);
557         int handle_event();
558         void update_items();
559
560         CWindowMaskPresetGUI *pgui;
561         CWindowMaskItems mask_items;
562 };
563
564 class CWindowMaskDelete : public BC_Button
565 {
566 public:
567         CWindowMaskDelete(MWindow *mwindow, CWindowMaskGUI *gui,
568                         int x, int y, int w);
569         int handle_event();
570
571         MWindow *mwindow;
572         CWindowMaskGUI *gui;
573 };
574
575 class CWindowMaskCenter : public BC_Button
576 {
577 public:
578         CWindowMaskCenter(MWindow *mwindow, CWindowMaskGUI *gui,
579                         int x, int y, int w);
580         int handle_event();
581
582         MWindow *mwindow;
583         CWindowMaskGUI *gui;
584 };
585
586 class CWindowMaskNormal : public BC_Button
587 {
588 public:
589         CWindowMaskNormal(MWindow *mwindow, CWindowMaskGUI *gui,
590                         int x, int y, int w);
591         int handle_event();
592
593         MWindow *mwindow;
594         CWindowMaskGUI *gui;
595 };
596
597 class CWindowMaskShape : public BC_Button
598 {
599 public:
600         CWindowMaskShape(MWindow *mwindow, CWindowMaskGUI *gui,
601                 const char *images, int shape, int x, int y, const char *tip);
602         ~CWindowMaskShape();
603         void builtin_shape(int i, SubMask *sub_mask);
604         int handle_event();
605
606         MWindow *mwindow;
607         CWindowMaskGUI *gui;
608         int shape;
609         CWindowMaskItems shape_items;
610 };
611
612 class CWindowDisableOpenGLMasking : public BC_CheckBox
613 {
614 public:
615         CWindowDisableOpenGLMasking(CWindowMaskGUI *gui,
616                         int x, int y);
617         int handle_event();
618         CWindowMaskGUI *gui;
619 };
620
621 class CWindowMaskGUI : public CWindowToolGUI
622 {
623 public:
624         CWindowMaskGUI(MWindow *mwindow, CWindowTool *thread);
625         ~CWindowMaskGUI();
626         void create_objects();
627         void update();
628         int close_event();
629         void done_event();
630         void handle_event();
631         void set_focused(int v, float cx, float cy);
632         void update_buttons(MaskAuto *keyframe, int k);
633         void get_keyframe(Track* &track, MaskAutos* &autos, MaskAuto* &keyframe,
634                 SubMask* &mask, MaskPoint* &point, int create_it);
635         void load_masks(ArrayList<SubMask *> &masks);
636         void save_masks(ArrayList<SubMask *> &masks);
637         int smooth_mask(int typ, int on);
638         int save_mask(const char *nm);
639         int del_mask(const char *nm);
640         int center_mask();
641         int normal_mask();
642
643         CWindowMaskOnTrack *mask_on_track;
644         CWindowMaskTrackTumbler *mask_track_tumbler;
645         CWindowMaskName *mask_name;
646         CWindowMaskButton *mask_buttons[SUBMASKS];
647         CWindowMaskThumbler *mask_thumbler;
648         BC_Title *mask_blabels[SUBMASKS];
649         CWindowMaskEnable *mask_enables[SUBMASKS];
650         CWindowMaskSoloTrack *mask_solo_track;
651         CWindowMaskDelMask *mask_del;
652         CWindowMaskUnclear *mask_unclr;
653         CWindowMaskClrMask *mask_clr;
654         CWindowMaskShape *mask_shape_sqr;
655         CWindowMaskShape *mask_shape_crc;
656         CWindowMaskShape *mask_shape_tri;
657         CWindowMaskShape *mask_shape_ovl;
658         CWindowMaskLoadList *mask_load_list;
659         CWindowMaskLoad *mask_load;
660         CWindowMaskSave *mask_save;
661         CWindowMaskDelete *mask_delete;
662         CWindowMaskPresetDialog *preset_dialog;
663         CWindowMaskCenter *mask_center;
664         CWindowMaskNormal *mask_normal;
665         CWindowMaskFade *fade;
666         CWindowMaskFadeSlider *fade_slider;
667         CWindowMaskGangFader *gang_fader;
668         CWindowMaskAffectedPoint *active_point;
669         CWindowMaskDelPoint *del_point;
670         CWindowMaskGangPoint *gang_point;
671         CWindowMaskSmoothButton *mask_pnt_linear, *mask_pnt_smooth;
672         CWindowMaskSmoothButton *mask_crv_linear, *mask_crv_smooth;
673         CWindowMaskSmoothButton *mask_all_linear, *mask_all_smooth;
674         CWindowCoord *x, *y;
675         CWindowMaskScaleXY *mask_scale_x, *mask_scale_y, *mask_scale_xy;
676         int scale_mode;
677         CWindowMaskFocus *focus;
678         int focused;
679         CWindowMaskGangFocus *gang_focus;
680         CWindowMaskHelp *help;
681         int helped, help_y, help_h;
682         CWindowMaskDrawMarkers *draw_markers;
683         int markers;
684         CWindowMaskDrawBoundary *draw_boundary;
685         int boundary;
686         CWindowCoord *focus_x, *focus_y;
687         CWindowMaskFeather *feather;
688         CWindowMaskFeatherSlider *feather_slider;
689         CWindowMaskGangFeather *gang_feather;
690         CWindowMaskBeforePlugins *apply_before_plugins;
691         CWindowDisableOpenGLMasking *disable_opengl_masking;
692 };
693
694
695 class CWindowEyedropGUI : public CWindowToolGUI
696 {
697 public:
698         CWindowEyedropGUI(MWindow *mwindow, CWindowTool *thread);
699         ~CWindowEyedropGUI();
700
701         void handle_event();
702         void create_objects();
703         void update();
704
705         BC_Title *current;
706         CWindowCoord *radius;
707         CWindowEyedropCheckBox *use_max;
708         BC_Title *red, *green, *blue, *y, *u, *v;
709         BC_Title *rgb_hex, *yuv_hex;
710         BC_SubWindow *sample;
711 };
712
713
714 class CWindowEyedropCheckBox : public BC_CheckBox
715 {
716 public:
717         CWindowEyedropCheckBox(MWindow *mwindow, 
718                 CWindowEyedropGUI *gui,
719                 int x, 
720                 int y);
721
722         int handle_event();
723         MWindow *mwindow;
724         CWindowEyedropGUI *gui;
725 };
726
727
728
729 class CWindowCameraGUI : public CWindowToolGUI
730 {
731 public:
732         CWindowCameraGUI(MWindow *mwindow, CWindowTool *thread);
733         ~CWindowCameraGUI();
734         void create_objects();
735         void update();
736
737 // Update the keyframe from text boxes
738         void handle_event();
739 //      BezierAuto* get_keyframe();
740         CWindowCoord *x, *y, *z;
741 private:
742 // Toggles for keyframe curve mode (for camera automation only)
743         CWindowCurveToggle *t_smooth, *t_linear;
744 };
745
746 class CWindowCameraLeft : public BC_Button
747 {
748 public:
749         CWindowCameraLeft(MWindow *mwindow, CWindowCameraGUI *gui,
750                         int x, int y);
751         int handle_event();
752         MWindow *mwindow;
753         CWindowCameraGUI *gui;
754 };
755
756 class CWindowCameraCenter : public BC_Button
757 {
758 public:
759         CWindowCameraCenter(MWindow *mwindow, CWindowCameraGUI *gui,
760                         int x, int y);
761         int handle_event();
762         MWindow *mwindow;
763         CWindowCameraGUI *gui;
764 };
765
766 class CWindowCameraRight : public BC_Button
767 {
768 public:
769         CWindowCameraRight(MWindow *mwindow, CWindowCameraGUI *gui,
770                         int x, int y);
771         int handle_event();
772         MWindow *mwindow;
773         CWindowCameraGUI *gui;
774 };
775
776 class CWindowCameraTop : public BC_Button
777 {
778 public:
779         CWindowCameraTop(MWindow *mwindow, CWindowCameraGUI *gui,
780                         int x, int y);
781         int handle_event();
782         MWindow *mwindow;
783         CWindowCameraGUI *gui;
784 };
785
786 class CWindowCameraMiddle : public BC_Button
787 {
788 public:
789         CWindowCameraMiddle(MWindow *mwindow, CWindowCameraGUI *gui,
790                         int x, int y);
791         int handle_event();
792         MWindow *mwindow;
793         CWindowCameraGUI *gui;
794 };
795
796 class CWindowCameraBottom : public BC_Button
797 {
798 public:
799         CWindowCameraBottom(MWindow *mwindow, CWindowCameraGUI *gui,
800                         int x, int y);
801         int handle_event();
802         MWindow *mwindow;
803         CWindowCameraGUI *gui;
804 };
805
806 class CWindowProjectorGUI : public CWindowToolGUI
807 {
808 public:
809         CWindowProjectorGUI(MWindow *mwindow, CWindowTool *thread);
810         ~CWindowProjectorGUI();
811         void create_objects();
812         void update();
813         void handle_event();
814 //      BezierAuto* get_keyframe();
815         CWindowCoord *x, *y, *z;
816 private:
817 // Toggles for keyframe curve mode (projector automation only)
818         CWindowCurveToggle *t_smooth, *t_linear;
819 };
820
821 class CWindowProjectorLeft : public BC_Button
822 {
823 public:
824         CWindowProjectorLeft(MWindow *mwindow, CWindowProjectorGUI *gui,
825                         int x, int y);
826         int handle_event();
827         MWindow *mwindow;
828         CWindowProjectorGUI *gui;
829 };
830
831 class CWindowProjectorCenter : public BC_Button
832 {
833 public:
834         CWindowProjectorCenter(MWindow *mwindow, CWindowProjectorGUI *gui,
835                         int x, int y);
836         int handle_event();
837         MWindow *mwindow;
838         CWindowProjectorGUI *gui;
839 };
840
841 class CWindowProjectorRight : public BC_Button
842 {
843 public:
844         CWindowProjectorRight(MWindow *mwindow, CWindowProjectorGUI *gui,
845                         int x, int y);
846         int handle_event();
847         MWindow *mwindow;
848         CWindowProjectorGUI *gui;
849 };
850
851 class CWindowProjectorTop : public BC_Button
852 {
853 public:
854         CWindowProjectorTop(MWindow *mwindow, CWindowProjectorGUI *gui,
855                         int x, int y);
856         int handle_event();
857         MWindow *mwindow;
858         CWindowProjectorGUI *gui;
859 };
860
861 class CWindowProjectorMiddle : public BC_Button
862 {
863 public:
864         CWindowProjectorMiddle(MWindow *mwindow, CWindowProjectorGUI *gui,
865                         int x, int y);
866         int handle_event();
867         MWindow *mwindow;
868         CWindowProjectorGUI *gui;
869 };
870
871 class CWindowProjectorBottom : public BC_Button
872 {
873 public:
874         CWindowProjectorBottom(MWindow *mwindow, CWindowProjectorGUI *gui,
875                         int x, int y);
876         int handle_event();
877         MWindow *mwindow;
878         CWindowProjectorGUI *gui;
879 };
880
881
882
883
884 class CWindowRulerGUI : public CWindowToolGUI
885 {
886 public:
887         CWindowRulerGUI(MWindow *mwindow, CWindowTool *thread);
888         ~CWindowRulerGUI();
889         void create_objects();
890         void update();
891 // Update the gui
892         void handle_event();
893
894         BC_TextBox *current;
895         BC_TextBox *point1;
896         BC_TextBox *point2;
897         BC_TextBox *deltas;
898         BC_TextBox *distance;
899         BC_TextBox *angle;
900 };
901
902
903
904 #endif