Split TimeFXDialog from Editor.
[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 <list>
24
25 #include <gdk/gdk.h>
26 #include <stdint.h>
27
28 #include "canvas.h"
29 #include "editor_items.h"
30
31 #include "ardour/types.h"
32
33 namespace ARDOUR {
34         class Location;
35 }
36
37 class Editor;
38 class TimeAxisView;
39
40 struct DragInfo {
41     ArdourCanvas::Item* item;
42     ItemType            item_type;
43     void* data;
44     nframes64_t last_frame_position;
45     nframes64_t pointer_frame_offset;
46     nframes64_t grab_frame;
47     nframes64_t last_pointer_frame;
48     nframes64_t current_pointer_frame;
49     double original_x, original_y;
50     double grab_x, grab_y;
51     double cumulative_x_drag;
52     double cumulative_y_drag;
53     double current_pointer_x;
54     double current_pointer_y;
55     double last_pointer_x;
56     double last_pointer_y;
57     void (Editor::*motion_callback)(ArdourCanvas::Item*, GdkEvent*);
58     void (Editor::*finished_callback)(ArdourCanvas::Item*, GdkEvent*);
59     TimeAxisView* source_trackview;
60     ARDOUR::layer_t source_layer;
61     TimeAxisView* dest_trackview;
62     ARDOUR::layer_t dest_layer;
63     bool x_constrained;
64     bool y_constrained;
65     bool copy;
66     bool was_rolling;
67     bool first_move;
68     bool move_threshold_passed;
69     bool want_move_threshold;
70     bool brushing;
71     std::list<ARDOUR::Location*> copied_locations;
72
73     void clear_copied_locations ();
74 };
75
76 struct LineDragInfo {
77     uint32_t before;
78     uint32_t after;
79 };
80
81 #endif /* __gtk2_ardour_drag_info_h_ */
82