X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcwindowtool.h;h=1eb5002ebb1b39aa22b1b30d304a56fd537ca81f;hp=92fa72b9e6251fe01c899148a184624e2d9b7906;hb=c857b2fb7965d27d86d5785fb9f1b8957a871a1a;hpb=413642aafb5e96e9c72b53312176838526fbfd97 diff --git a/cinelerra-5.1/cinelerra/cwindowtool.h b/cinelerra-5.1/cinelerra/cwindowtool.h index 92fa72b9..1eb5002e 100644 --- a/cinelerra-5.1/cinelerra/cwindowtool.h +++ b/cinelerra-5.1/cinelerra/cwindowtool.h @@ -24,17 +24,14 @@ #include "condition.inc" #include "cwindowgui.inc" +#include "cwindowtool.inc" #include "guicast.h" +#include "keyframe.inc" #include "maskauto.inc" #include "maskautos.inc" #include "mwindow.inc" -class CWindowToolGUI; -class CWindowCoord; -class CWindowCurveToggle; - - // This common thread supports all the tool GUI's. class CWindowTool : public Thread { @@ -128,57 +125,70 @@ public: CWindowCoord *x1, *y1, *width, *height; }; -class CWindowMaskMode : public BC_PopupMenu +class CWindowMaskItems : public ArrayList { public: - CWindowMaskMode(MWindow *mwindow, CWindowToolGUI *gui, int x, int y, const char *text); - void create_objects(); - int handle_event(); - static char* mode_to_text(int mode); - int text_to_mode(char *text); + CWindowMaskItems() {} + ~CWindowMaskItems() { remove_all_objects(); } +}; + +class CWindowMaskName : public BC_PopupTextBox +{ +public: + CWindowMaskName(MWindow *mwindow, CWindowToolGUI *gui, int x, int y, const char *text); + ~CWindowMaskName(); MWindow *mwindow; CWindowToolGUI *gui; + CWindowMaskItems mask_items; + + int handle_event(); + void update_items(MaskAuto *keyframe); }; -class CWindowMaskDelete : public BC_GenericButton +class CWindowMaskFade : public BC_TumbleTextBox { public: - CWindowMaskDelete(MWindow *mwindow, CWindowToolGUI *gui, int x, int y); + CWindowMaskFade(MWindow *mwindow, CWindowToolGUI *gui, int x, int y); + ~CWindowMaskFade(); + int update(float v); + int update_value(float v); int handle_event(); - int keypress_event(); MWindow *mwindow; CWindowToolGUI *gui; }; -class CWindowMaskCycleNext : public BC_GenericButton +class CWindowMaskFadeSlider : public BC_ISlider { public: - CWindowMaskCycleNext(MWindow *mwindow, CWindowToolGUI *gui, int x, int y); + CWindowMaskFadeSlider(MWindow *mwindow, CWindowToolGUI *gui, + int x, int y, int w); + ~CWindowMaskFadeSlider(); int handle_event(); + int update(int64_t v); + char *get_caption() { return 0; } MWindow *mwindow; CWindowToolGUI *gui; }; -class CWindowMaskCyclePrev : public BC_GenericButton +class CWindowMaskMode : public BC_Toggle { public: - CWindowMaskCyclePrev(MWindow *mwindow, CWindowToolGUI *gui, int x, int y); + CWindowMaskMode(MWindow *mwindow, CWindowToolGUI *gui, int x, int y); + ~CWindowMaskMode(); int handle_event(); MWindow *mwindow; CWindowToolGUI *gui; }; -class CWindowMaskNumber : public BC_TumbleTextBox +class CWindowMaskDelMask : public BC_GenericButton { public: - CWindowMaskNumber(MWindow *mwindow, CWindowToolGUI *gui, int x, int y); - ~CWindowMaskNumber(); + CWindowMaskDelMask(MWindow *mwindow, CWindowToolGUI *gui, int x, int y); int handle_event(); MWindow *mwindow; CWindowToolGUI *gui; }; - class CWindowMaskAffectedPoint : public BC_TumbleTextBox { public: @@ -189,27 +199,63 @@ public: CWindowToolGUI *gui; }; +class CWindowMaskDelPoint : public BC_GenericButton +{ +public: + CWindowMaskDelPoint(MWindow *mwindow, CWindowToolGUI *gui, int x, int y); + int handle_event(); + int keypress_event(); + MWindow *mwindow; + CWindowToolGUI *gui; +}; class CWindowMaskFeather : public BC_TumbleTextBox { public: CWindowMaskFeather(MWindow *mwindow, CWindowToolGUI *gui, int x, int y); ~CWindowMaskFeather(); + int update(float v); + int update_value(float v); int handle_event(); MWindow *mwindow; CWindowToolGUI *gui; }; -class CWindowMaskValue : public BC_ISlider +class CWindowMaskFeatherSlider : public BC_FSlider { public: - CWindowMaskValue(MWindow *mwindow, CWindowToolGUI *gui, int x, int y); - ~CWindowMaskValue(); + CWindowMaskFeatherSlider(MWindow *mwindow, CWindowToolGUI *gui, + int x, int y, int w, float v); + ~CWindowMaskFeatherSlider(); int handle_event(); + int update(float v); + char *get_caption() { return 0; } 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 CWindowMaskClrPoint : public BC_Button +{ +public: + CWindowMaskClrPoint(MWindow *mwindow, CWindowMaskGUI *gui, int x, int y); + ~CWindowMaskClrPoint(); + + int handle_event(); + MWindow *mwindow; + CWindowMaskGUI *gui; +}; + class CWindowMaskBeforePlugins : public BC_CheckBox { public: @@ -238,22 +284,23 @@ public: SubMask* &mask, MaskPoint* &point, int create_it); void update_preview(); - CWindowCoord *x, *y; + CWindowMaskName *name; + CWindowMaskClrMask *clr_mask; + CWindowMaskDelMask *del_mask; + CWindowMaskFade *fade; + CWindowMaskFadeSlider *fade_slider; CWindowMaskMode *mode; - CWindowMaskFeather *feather; - CWindowMaskDelete *delete_point; CWindowMaskAffectedPoint *active_point; -// Not necessary if all keyframes have same points -// CWindowMaskCycleNext *next_point; -// CWindowMaskCyclePrev *prev_point; - CWindowMaskNumber *number; - CWindowMaskValue *value; + CWindowMaskClrPoint *clr_point; + CWindowMaskDelPoint *del_point; + CWindowCoord *x, *y; + CWindowMaskFeather *feather; + CWindowMaskFeatherSlider *feather_slider; CWindowMaskBeforePlugins *apply_before_plugins; CWindowDisableOpenGLMasking *disable_opengl_masking; }; -class CWindowEyedropCheckBox; class CWindowEyedropGUI : public CWindowToolGUI { public: