2007-04-26 16:54:31 -04:00
|
|
|
/*
|
|
|
|
Copyright (C) 2000-2007 Paul Davis
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2006-03-07 21:50:53 -05:00
|
|
|
#ifndef __gtk2_ardour_drag_info_h_
|
|
|
|
#define __gtk2_ardour_drag_info_h_
|
|
|
|
|
2008-09-19 10:38:46 -04:00
|
|
|
#include <list>
|
|
|
|
|
2006-03-07 21:50:53 -05:00
|
|
|
#include <gdk/gdk.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#include "canvas.h"
|
2006-05-17 22:19:27 -04:00
|
|
|
#include "editor_items.h"
|
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/types.h"
|
2006-03-07 21:50:53 -05:00
|
|
|
|
|
|
|
namespace ARDOUR {
|
|
|
|
class Location;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Editor;
|
|
|
|
class TimeAxisView;
|
|
|
|
|
|
|
|
struct DragInfo {
|
|
|
|
ArdourCanvas::Item* item;
|
2006-05-17 22:19:27 -04:00
|
|
|
ItemType item_type;
|
2006-03-07 21:50:53 -05:00
|
|
|
void* data;
|
2007-05-31 17:15:28 -04:00
|
|
|
nframes64_t last_frame_position;
|
|
|
|
nframes64_t pointer_frame_offset;
|
|
|
|
nframes64_t grab_frame;
|
|
|
|
nframes64_t last_pointer_frame;
|
|
|
|
nframes64_t current_pointer_frame;
|
2008-04-11 10:06:50 -04:00
|
|
|
double original_x, original_y;
|
2006-03-07 21:50:53 -05:00
|
|
|
double grab_x, grab_y;
|
|
|
|
double cumulative_x_drag;
|
|
|
|
double cumulative_y_drag;
|
|
|
|
double current_pointer_x;
|
|
|
|
double current_pointer_y;
|
2007-11-05 10:38:19 -05:00
|
|
|
double last_pointer_x;
|
|
|
|
double last_pointer_y;
|
2006-03-07 21:50:53 -05:00
|
|
|
void (Editor::*motion_callback)(ArdourCanvas::Item*, GdkEvent*);
|
|
|
|
void (Editor::*finished_callback)(ArdourCanvas::Item*, GdkEvent*);
|
2008-04-11 10:06:50 -04:00
|
|
|
TimeAxisView* source_trackview;
|
2009-01-05 22:18:09 -05:00
|
|
|
ARDOUR::layer_t source_layer;
|
2008-04-11 10:06:50 -04:00
|
|
|
TimeAxisView* dest_trackview;
|
2009-01-05 22:18:09 -05:00
|
|
|
ARDOUR::layer_t dest_layer;
|
2006-03-07 21:50:53 -05:00
|
|
|
bool x_constrained;
|
2006-04-27 05:04:24 -04:00
|
|
|
bool y_constrained;
|
2006-03-07 21:50:53 -05:00
|
|
|
bool copy;
|
|
|
|
bool was_rolling;
|
|
|
|
bool first_move;
|
2006-05-30 22:46:04 -04:00
|
|
|
bool move_threshold_passed;
|
2006-03-07 21:50:53 -05:00
|
|
|
bool want_move_threshold;
|
|
|
|
bool brushing;
|
2008-09-19 10:38:46 -04:00
|
|
|
std::list<ARDOUR::Location*> copied_locations;
|
|
|
|
|
|
|
|
void clear_copied_locations ();
|
2006-03-07 21:50:53 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
struct LineDragInfo {
|
|
|
|
uint32_t before;
|
|
|
|
uint32_t after;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __gtk2_ardour_drag_info_h_ */
|
|
|
|
|