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