X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcwindowtool.h;h=1a116541200f9f4b1bfb6f9937142dd2504e65ea;hp=4c7557295330d35a8f1cbdd08d4eaae5b7698680;hb=ac8f3979437fb45effb135a1bb6bee871f52d635;hpb=8e69e9e7ab87fd5c273ce30a05c9973e786467d9 diff --git a/cinelerra-5.1/cinelerra/cwindowtool.h b/cinelerra-5.1/cinelerra/cwindowtool.h index 4c755729..1a116541 100644 --- a/cinelerra-5.1/cinelerra/cwindowtool.h +++ b/cinelerra-5.1/cinelerra/cwindowtool.h @@ -37,6 +37,11 @@ enum { MASK_SHAPE_TRIANGLE, MASK_SHAPE_OVAL, }; +enum { + MASK_SCALE_X, + MASK_SCALE_Y, + MASK_SCALE_XY, +}; // This common thread supports all the tool GUI's. class CWindowTool : public Thread @@ -112,18 +117,44 @@ public: CWindowToolGUI *gui; }; -class CWindowCropOK : public BC_GenericButton +class CWindowCropApply : public BC_GenericButton { public: - CWindowCropOK(MWindow *mwindow, CWindowToolGUI *gui, + CWindowCropApply(MWindow *mwindow, CWindowCropGUI *crop_gui, int x, int y); // Perform the cropping operation int handle_event(); int keypress_event(); MWindow *mwindow; - CWindowToolGUI *gui; + CWindowCropGUI *crop_gui; +}; + +class CWindowCropOpMode : public BC_PopupMenu +{ + static const char *crop_ops[CROP_MODES]; +public: + CWindowCropOpMode(MWindow *mwindow, CWindowCropGUI *crop_gui, + int mode, int x, int y); + ~CWindowCropOpMode(); + void create_objects(); + int handle_event(); + + MWindow *mwindow; + CWindowCropGUI *crop_gui; + int mode; +}; + +class CWindowCropOpItem : public BC_MenuItem +{ +public: + CWindowCropOpItem(CWindowCropOpMode *popup, const char *text, int id); + int handle_event(); + + CWindowCropOpMode *popup; + int id; }; + class CWindowCropGUI : public CWindowToolGUI { public: @@ -134,6 +165,7 @@ public: // Update the gui void handle_event(); CWindowCoord *x1, *y1, *width, *height; + CWindowCropOpMode *crop_mode; }; class CWindowMaskItem : public BC_ListBoxItem @@ -329,6 +361,17 @@ public: CWindowMaskGUI *gui; }; +class CWindowMaskGangPoint : public BC_Toggle +{ +public: + CWindowMaskGangPoint(MWindow *mwindow, CWindowMaskGUI *gui, + int x, int y); + ~CWindowMaskGangPoint(); + int handle_event(); + MWindow *mwindow; + CWindowMaskGUI *gui; +}; + class CWindowMaskSmoothButton : public BC_Button { public: @@ -415,7 +458,6 @@ public: CWindowMaskDelPoint(MWindow *mwindow, CWindowMaskGUI *gui, int x, int y); int handle_event(); - int keypress_event(); MWindow *mwindow; CWindowMaskGUI *gui; }; @@ -441,11 +483,13 @@ public: ~CWindowMaskFeatherSlider(); int handle_event(); int update(float v); + int update(int r, float v, float mn, float mx); char *get_caption() { return 0; } MWindow *mwindow; CWindowMaskGUI *gui; int stick; float last_v; + float max; Timer *timer; }; @@ -652,6 +696,7 @@ public: CWindowMaskGangFader *gang_fader; CWindowMaskAffectedPoint *active_point; CWindowMaskDelPoint *del_point; + CWindowMaskGangPoint *gang_point; CWindowMaskSmoothButton *mask_pnt_linear, *mask_pnt_smooth; CWindowMaskSmoothButton *mask_crv_linear, *mask_crv_smooth; CWindowMaskSmoothButton *mask_all_linear, *mask_all_smooth;