Fix glitching on "events" (like loop markers) due to taking the processing offset...
[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     nframes64_t last_frame_position;
43     nframes64_t pointer_frame_offset;
44     nframes64_t grab_frame;
45     nframes64_t last_pointer_frame;
46     nframes64_t current_pointer_frame;
47     double original_x, original_y;
48     double grab_x, grab_y;
49     double cumulative_x_drag;
50     double cumulative_y_drag;
51     double current_pointer_x;
52     double current_pointer_y;
53     double last_pointer_x;
54     double last_pointer_y;
55     void (Editor::*motion_callback)(ArdourCanvas::Item*, GdkEvent*);
56     void (Editor::*finished_callback)(ArdourCanvas::Item*, GdkEvent*);
57     TimeAxisView* source_trackview;
58     TimeAxisView* dest_trackview;
59     bool x_constrained;
60     bool y_constrained;
61     bool copy;
62     bool was_rolling;
63     bool first_move;
64     bool move_threshold_passed;
65     bool want_move_threshold;
66     bool brushing;
67     ARDOUR::Location* copied_location;
68 };
69
70 struct LineDragInfo {
71     uint32_t before;
72     uint32_t after;
73 };
74
75 #endif /* __gtk2_ardour_drag_info_h_ */
76