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