r269@gandalf: fugalh | 2006-08-03 20:18:05 -0600
[ardour.git] / gtk2_ardour / draginfo.h
1 #ifndef __gtk2_ardour_drag_info_h_
2 #define __gtk2_ardour_drag_info_h_
3
4 #include <gdk/gdk.h>
5 #include <stdint.h>
6
7 #include "canvas.h"
8 #include "editor_items.h"
9
10 #include <ardour/types.h>
11
12 namespace ARDOUR {
13         class Location;
14 }
15
16 class Editor;
17 class TimeAxisView;
18
19 struct DragInfo {
20     ArdourCanvas::Item* item;
21     ItemType            item_type;
22     void* data;
23     jack_nframes_t last_frame_position;
24     int32_t pointer_frame_offset;
25     jack_nframes_t grab_frame;
26     jack_nframes_t last_pointer_frame;
27     jack_nframes_t current_pointer_frame;
28     double grab_x, grab_y;
29     double cumulative_x_drag;
30     double cumulative_y_drag;
31     double current_pointer_x;
32     double current_pointer_y;
33     void (Editor::*motion_callback)(ArdourCanvas::Item*, GdkEvent*);
34     void (Editor::*finished_callback)(ArdourCanvas::Item*, GdkEvent*);
35     TimeAxisView* last_trackview;
36     bool x_constrained;
37     bool y_constrained;
38     bool copy;
39     bool was_rolling;
40     bool first_move;
41     bool move_threshold_passed;
42     bool want_move_threshold;
43     bool brushing;
44     ARDOUR::Location* copied_location;
45 };
46
47 struct LineDragInfo {
48     uint32_t before;
49     uint32_t after;
50 };
51
52 #endif /* __gtk2_ardour_drag_info_h_ */
53