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.
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.
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
18 #ifndef __DRAGCHECKBOX_H__
19 #define __DRAGCHECKBOX_H__
22 #include "mwindow.inc"
25 class DragCheckBox : public BC_CheckBox
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);
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();
38 static void draw_boundary(VFrame *out, int x, int y, int w, int h);
42 void drag_deactivate();
45 int grab_event(XEvent *event);
49 int grabbed, dragging, pending;
52 float drag_dx, drag_dy;