X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbcdragbox.h;fp=cinelerra-5.1%2Fguicast%2Fbcdragbox.h;h=4ecb9264e38301d6f12b892c9a88b29a819f790c;hp=0000000000000000000000000000000000000000;hb=b4017f68039ef7e31eedee4a27580a28bee36fc5;hpb=c4c898707e3fdbf2979b7bc43ac0e1b0fa779663 diff --git a/cinelerra-5.1/guicast/bcdragbox.h b/cinelerra-5.1/guicast/bcdragbox.h new file mode 100644 index 00000000..4ecb9264 --- /dev/null +++ b/cinelerra-5.1/guicast/bcdragbox.h @@ -0,0 +1,41 @@ +#ifndef __BC_DRAGRECT_H__ +#define __BC_DRAGRECT_H__ + +#include "bcwindowbase.inc" +#include "bcdragbox.inc" +#include "bcpopup.h" +#include "thread.h" + + +class BC_DragBox : public Thread +{ +public: + BC_DragBox(BC_WindowBase *parent); + ~BC_DragBox(); + void start_drag(); + void run(); + virtual int handle_done_event(int x0, int y0, int x1, int y1) { return 0; } + + BC_Popup *edge[4]; + BC_WindowBase *parent; + BC_DragBoxPopup *popup; + int done; +}; + +class BC_DragBoxPopup : public BC_Popup +{ +public: + BC_DragBoxPopup(BC_DragBox *grab_thread); + ~BC_DragBoxPopup(); + int grab_event(XEvent *event); + void update(); + void draw_selection(int show); + + BC_DragBox *grab_thread; + int dragging; + int grab_color; + int x0, y0, x1, y1; + int lx0, ly0, lx1, ly1; +}; + +#endif