Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / dragcheckbox.h
1 /*
2  * This program is free software; you can redistribute it and/or modify it
3  * under the terms of the GNU General Public License as published
4  * by the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful, but
8  * WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10  * General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public
13  * License along with this program; if not, write to the Free Software
14  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
15  * USA
16  */
17
18 #ifndef __DRAGCHECKBOX_H__
19 #define __DRAGCHECKBOX_H__
20
21 #include "bctoggle.h"
22 #include "mwindow.inc"
23 #include "track.inc"
24
25 class DragCheckBox : public BC_CheckBox
26 {
27 public:
28         DragCheckBox(MWindow *mwindow, int x, int y, const char *text, int *value,
29                 float drag_x, float drag_y, float drag_w, float drag_h);
30         ~DragCheckBox();
31         virtual Track *get_drag_track() = 0;
32         virtual int64_t get_drag_position() = 0;
33         virtual void update_gui() { return; };
34         void create_objects();
35         int get_track_w();
36         int get_track_h();
37         void bound();
38         static void draw_boundary(VFrame *out, int x, int y, int w, int h);
39
40         int check_pending();
41         int drag_activate();
42         void drag_deactivate();
43
44         int handle_event();
45         int grab_event(XEvent *event);
46         int handle_ungrab();
47         
48         MWindow *mwindow;
49         int grabbed, dragging, pending;
50         float drag_x, drag_y;
51         float drag_w, drag_h;
52         float drag_dx, drag_dy;
53 };
54
55 #endif
56