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