fix #1637 (needs merging to 2.0.1 branch); remove debug printf
[ardour.git] / gtk2_ardour / draginfo.h
1 /*
2     Copyright (C) 2000-2007 Paul Davis 
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #ifndef __gtk2_ardour_drag_info_h_
21 #define __gtk2_ardour_drag_info_h_
22
23 #include <gdk/gdk.h>
24 #include <stdint.h>
25
26 #include "canvas.h"
27 #include "editor_items.h"
28
29 #include <ardour/types.h>
30
31 namespace ARDOUR {
32         class Location;
33 }
34
35 class Editor;
36 class TimeAxisView;
37
38 struct DragInfo {
39     ArdourCanvas::Item* item;
40     ItemType            item_type;
41     void* data;
42     nframes_t last_frame_position;
43     int32_t pointer_frame_offset;
44     nframes_t grab_frame;
45     nframes_t last_pointer_frame;
46     nframes_t current_pointer_frame;
47     double grab_x, grab_y;
48     double cumulative_x_drag;
49     double cumulative_y_drag;
50     double current_pointer_x;
51     double current_pointer_y;
52     void (Editor::*motion_callback)(ArdourCanvas::Item*, GdkEvent*);
53     void (Editor::*finished_callback)(ArdourCanvas::Item*, GdkEvent*);
54     TimeAxisView* last_trackview;
55     bool x_constrained;
56     bool y_constrained;
57     bool copy;
58     bool was_rolling;
59     bool first_move;
60     bool move_threshold_passed;
61     bool want_move_threshold;
62     bool brushing;
63     ARDOUR::Location* copied_location;
64 };
65
66 struct LineDragInfo {
67     uint32_t before;
68     uint32_t after;
69 };
70
71 #endif /* __gtk2_ardour_drag_info_h_ */
72