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