Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / guicast / bcdragbox.h
1 /*
2  * CINELERRA
3  * Copyright (C) 2020 William Morrow
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published
7  * by the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18  * USA
19  */
20
21
22 #ifndef __BC_DRAGRECT_H__
23 #define __BC_DRAGRECT_H__
24
25 #include "bcwindowbase.inc"
26 #include "bcdragbox.inc"
27 #include "bcpopup.h"
28 #include "thread.h"
29
30
31 class BC_DragBox : public Thread
32 {
33 public:
34         BC_DragBox(BC_WindowBase *parent);
35         ~BC_DragBox();
36         void start_drag();
37         void run();
38         virtual int handle_done_event(int x0, int y0, int x1, int y1) { return 0; }
39
40         BC_Popup *edge[4];
41         BC_WindowBase *parent;
42         BC_DragBoxPopup *popup;
43         int done;
44 };
45
46 class BC_DragBoxPopup : public BC_Popup
47 {
48 public:
49         BC_DragBoxPopup(BC_DragBox *grab_thread);
50         ~BC_DragBoxPopup();
51         int grab_event(XEvent *event);
52         void update();
53         void draw_selection(int show);
54
55         BC_DragBox *grab_thread;
56         int dragging;
57         int grab_color;
58         int x0, y0, x1, y1;
59         int lx0, ly0, lx1, ly1;
60 };
61
62 #endif