mask fade/feather rounding problem, mask mode sense err, add mask
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / cwindowtool.h
index 1eb5002ebb1b39aa22b1b30d304a56fd537ca81f..ccdb3c26e04c4b23751c41373519e2b5650924a0 100644 (file)
@@ -145,6 +145,26 @@ public:
        void update_items(MaskAuto *keyframe);
 };
 
+class CWindowMaskDelMask : public BC_GenericButton
+{
+public:
+       CWindowMaskDelMask(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       int handle_event();
+       MWindow *mwindow;
+       CWindowToolGUI *gui;
+};
+
+class CWindowMaskClrMask : public BC_Button
+{
+public:
+       CWindowMaskClrMask(MWindow *mwindow, CWindowMaskGUI *gui, int x, int y);
+       ~CWindowMaskClrMask();
+       static int calculate_w(MWindow *mwindow);
+       int handle_event();
+       MWindow *mwindow;
+       CWindowMaskGUI *gui;
+};
+
 class CWindowMaskFade : public BC_TumbleTextBox
 {
 public:
@@ -168,32 +188,56 @@ public:
        char *get_caption() { return 0; }
        MWindow *mwindow;
        CWindowToolGUI *gui;
+       int stick;
+       float last_v;
+       Timer *timer;
 };
 
-class CWindowMaskMode : public BC_Toggle
+class CWindowMaskGangFader : public BC_Toggle
 {
 public:
-       CWindowMaskMode(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
-       ~CWindowMaskMode();
+       CWindowMaskGangFader(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       ~CWindowMaskGangFader();
        int handle_event();
        MWindow *mwindow;
        CWindowToolGUI *gui;
 };
 
-class CWindowMaskDelMask : public BC_GenericButton
+class CWindowMaskAffectedPoint : public BC_TumbleTextBox
 {
 public:
-       CWindowMaskDelMask(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       CWindowMaskAffectedPoint(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       ~CWindowMaskAffectedPoint();
        int handle_event();
        MWindow *mwindow;
        CWindowToolGUI *gui;
 };
 
-class CWindowMaskAffectedPoint : public BC_TumbleTextBox
+class CWindowMaskFocus : public BC_CheckBox
 {
 public:
-       CWindowMaskAffectedPoint(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
-       ~CWindowMaskAffectedPoint();
+       CWindowMaskFocus(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       ~CWindowMaskFocus();
+       int handle_event();
+       MWindow *mwindow;
+       CWindowToolGUI *gui;
+};
+
+class CWindowMaskDrawMarkers : public BC_CheckBox
+{
+public:
+       CWindowMaskDrawMarkers(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       ~CWindowMaskDrawMarkers();
+       int handle_event();
+       MWindow *mwindow;
+       CWindowToolGUI *gui;
+};
+
+class CWindowMaskDrawBoundary : public BC_CheckBox
+{
+public:
+       CWindowMaskDrawBoundary(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       ~CWindowMaskDrawBoundary();
        int handle_event();
        MWindow *mwindow;
        CWindowToolGUI *gui;
@@ -232,28 +276,19 @@ public:
        char *get_caption() { return 0; }
        MWindow *mwindow;
        CWindowToolGUI *gui;
+       int stick;
+       float last_v;
+       Timer *timer;
 };
 
-class CWindowMaskClrMask : public BC_Button
+class CWindowMaskGangFeather : public BC_Toggle
 {
 public:
-       CWindowMaskClrMask(MWindow *mwindow, CWindowMaskGUI *gui, int x, int y);
-       ~CWindowMaskClrMask();
-       static int calculate_w(MWindow *mwindow);
-       int handle_event();
-       MWindow *mwindow;
-       CWindowMaskGUI *gui;
-};
-
-class CWindowMaskClrPoint : public BC_Button
-{
-public:
-       CWindowMaskClrPoint(MWindow *mwindow, CWindowMaskGUI *gui, int x, int y);
-       ~CWindowMaskClrPoint();
-
+       CWindowMaskGangFeather(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       ~CWindowMaskGangFeather();
        int handle_event();
        MWindow *mwindow;
-       CWindowMaskGUI *gui;
+       CWindowToolGUI *gui;
 };
 
 class CWindowMaskBeforePlugins : public BC_CheckBox
@@ -279,23 +314,31 @@ public:
        ~CWindowMaskGUI();
        void create_objects();
        void update();
+       void set_focused(int v, float cx, float cy);
        void handle_event();
        void get_keyframe(Track* &track, MaskAutos* &autos, MaskAuto* &keyframe,
                SubMask* &mask, MaskPoint* &point, int create_it);
        void update_preview();
 
        CWindowMaskName *name;
-       CWindowMaskClrMask *clr_mask;
        CWindowMaskDelMask *del_mask;
+       CWindowMaskClrMask *clr_mask;
        CWindowMaskFade *fade;
        CWindowMaskFadeSlider *fade_slider;
-       CWindowMaskMode *mode;
+       CWindowMaskGangFader *gang_fader;
        CWindowMaskAffectedPoint *active_point;
-       CWindowMaskClrPoint *clr_point;
        CWindowMaskDelPoint *del_point;
        CWindowCoord *x, *y;
+       CWindowMaskFocus *focus;
+       int focused;
+       CWindowMaskDrawMarkers *draw_markers;
+       int markers;
+       CWindowMaskDrawBoundary *draw_boundary;
+       int boundary;
+       CWindowCoord *focus_x, *focus_y;
        CWindowMaskFeather *feather;
        CWindowMaskFeatherSlider *feather_slider;
+       CWindowMaskGangFeather *gang_feather;
        CWindowMaskBeforePlugins *apply_before_plugins;
        CWindowDisableOpenGLMasking *disable_opengl_masking;
 };