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