+ return true;
+}
+
+struct RegionSelectionByPosition {
+ bool operator() (RegionView*a, RegionView* b) {
+ return a->region()->position () < b->region()->position();
+ }
+};
+
+void
+Editor::region_drag_splice_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
+{
+ AudioTimeAxisView* tv;
+
+ if (!check_region_drag_possible (&tv)) {
+ return;
+ }
+
+ if (!drag_info.move_threshold_passed) {
+ return;
+ }
+
+ int dir;
+
+ if (drag_info.current_pointer_x - drag_info.grab_x > 0) {
+ dir = 1;
+ } else {
+ dir = -1;
+ }
+
+ RegionSelection copy (selection->regions);
+
+ RegionSelectionByPosition cmp;
+ copy.sort (cmp);
+
+ for (RegionSelection::iterator i = copy.begin(); i != copy.end(); ++i) {
+
+ AudioTimeAxisView* atv = dynamic_cast<AudioTimeAxisView*> (&(*i)->get_time_axis_view());
+
+ if (!atv) {
+ continue;
+ }
+
+ boost::shared_ptr<Playlist> playlist;
+
+ if ((playlist = atv->playlist()) == 0) {
+ continue;
+ }
+
+ if (!playlist->region_is_shuffle_constrained ((*i)->region())) {
+ continue;
+ }
+
+ if (dir > 0) {
+ if (drag_info.current_pointer_frame < (*i)->region()->last_frame() + 1) {
+ continue;
+ }
+ } else {
+ if (drag_info.current_pointer_frame > (*i)->region()->first_frame()) {
+ continue;
+ }
+ }
+
+
+ playlist->shuffle ((*i)->region(), dir);
+
+ drag_info.grab_x = drag_info.current_pointer_x;
+ }
+}
+
+void
+Editor::region_drag_splice_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
+{
+}
+
+void
+Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
+{
+ double x_delta;
+ double y_delta = 0;
+ RegionView* rv = reinterpret_cast<RegionView*> (drag_info.data);
+ nframes_t pending_region_position = 0;
+ int32_t pointer_y_span = 0, canvas_pointer_y_span = 0, original_pointer_order;
+ int32_t visible_y_high = 0, visible_y_low = 512; //high meaning higher numbered.. not the height on the screen
+ bool clamp_y_axis = false;
+ vector<int32_t> height_list(512) ;
+ vector<int32_t>::iterator j;
+ AudioTimeAxisView* tv;
+
+ possibly_copy_regions_during_grab (event);
+
+ if (!check_region_drag_possible (&tv)) {
+ return;
+ }
+