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