Ardour  9.7-101-gea2684d388
editor_drag.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
3  * Copyright (C) 2009-2015 David Robillard <d@drobilla.net>
4  * Copyright (C) 2009-2017 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2013-2014 Colin Fletcher <colin.m.fletcher@googlemail.com>
6  * Copyright (C) 2013-2019 Robin Gareus <robin@gareus.org>
7  * Copyright (C) 2015-2017 Nick Mainsbridge <mainsbridge@gmail.com>
8  * Copyright (C) 2015-2018 Ben Loftis <ben@harrisonconsoles.com>
9  * Copyright (C) 2016 Tim Mayberry <mojofunk@gmail.com>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25 
26 #ifndef __gtk2_ardour_editor_drag_h_
27 #define __gtk2_ardour_editor_drag_h_
28 
29 #include <list>
30 #include <vector>
31 
32 #include <ydk/gdk.h>
33 #include <stdint.h>
34 
35 #include "ardour/tempo.h"
36 #include "ardour/types.h"
37 
38 #include "evoral/ControlList.h"
39 
40 #include "canvas/types.h"
41 
42 #include "gtkmm2ext/bindings.h"
43 
44 #include "editor_items.h"
45 #include "mouse_cursors.h"
46 #include "editing.h"
47 #include "track_selection.h"
48 #include "region_view.h"
49 
50 namespace ARDOUR {
51  class Location;
52  class Region;
53  class TempoSection;
54 }
55 
56 namespace ArdourCanvas {
57  class Item;
58  class Line;
59  class Rectangle;
60  class Lollipop;
61 }
62 
63 namespace PBD {
64  class StatefulDiffCommand;
65 }
66 
67 class CueEditor;
68 class PatchChange;
69 class EditingContext;
70 class Editor;
71 class EditorCursor;
72 class TimeAxisView;
73 class Pianoroll;
74 class MidiTimeAxisView;
75 class Drag;
76 class NoteBase;
77 class TimeAxisView;
78 class RouteTimeAxisView;
79 class RegionSelection;
80 class MidiRegionView;
81 class MidiView;
82 class MeterMarker;
83 class ArdourMarker;
84 class SlipDraggable;
85 class TempoMarker;
86 class TempoCurve;
87 class ControlPoint;
88 class AudioRegionView;
89 class AutomationLine;
91 class VelocityDisplay;
92 
95 {
96 public:
97 
100 
101  bool motion_handler (GdkEvent *, bool);
103  void abort ();
106  bool end_grab (GdkEvent *);
108 
110 
112  bool ending () const {
113  return _ending;
114  }
115 
116  bool active () const {
117  return !_drags.empty ();
118  }
119 
121  double current_pointer_x () const {
122  return _current_pointer_x;
123  }
124 
126  double current_pointer_y () const {
127  return _current_pointer_y;
128  }
129 
133  }
134 
137  return _current_pointer_time;
138  }
139 
141  bool preview_video () const;
142 
143  bool dragging_lollipop () const;
144  std::list<Drag*> const & drags() const { return _drags; }
145 
146 private:
148  std::list<Drag*> _drags;
149  bool _ending;
153 };
154 
156 class Drag
157 {
158 public:
159  Drag (EditingContext&, ArdourCanvas::Item *, Temporal::TimeDomain td, ArdourCanvas::Item const * bounding_item, bool hide_snapped_cursor = true);
160  virtual ~Drag ();
161 
163  _drags = m;
164  }
165 
166  ArdourCanvas::Item const * bounding_item() const { return _bounding_item; }
168 
171  return _item;
172  }
173 
176 
177  void swap_grab (ArdourCanvas::Item *, Gdk::Cursor *, uint32_t);
178  bool motion_handler (GdkEvent*, bool);
179  void abort ();
180 
181  Temporal::timepos_t adjusted_time (Temporal::timepos_t const &, GdkEvent const *, bool snap = true) const;
182  Temporal::timepos_t adjusted_current_time (GdkEvent const *, bool snap = true) const;
183 
184  bool was_double_click() const { return _was_double_click; }
185  void set_double_click (bool yn) { _was_double_click = yn; }
186 
188 
193  virtual void start_grab (GdkEvent* e, Gdk::Cursor* c = 0);
194 
195  virtual bool end_grab (GdkEvent *);
196 
201  virtual void motion (GdkEvent* e, bool f) = 0;
202 
207  virtual void finished (GdkEvent* e, bool m) = 0;
208 
213  virtual void aborted (bool m) = 0;
214 
218  virtual bool active (Editing::MouseMode m) {
219  return true;
220  }
221 
222  bool preview_video () const {
223  return _preview_video;
224  }
225 
227  typedef std::pair<int,int> MoveThreshold;
228 
229  virtual MoveThreshold move_threshold () const;
230 
231  virtual bool allow_vertical_autoscroll () const {
232  return true;
233  }
234 
235  virtual bool allow_horizontal_autoscroll () const {
236  return true;
237  }
238 
240  virtual bool x_movement_matters () const {
241  return true;
242  }
243 
245  virtual bool y_movement_matters () const {
246  return true;
247  }
248 
249  virtual bool mid_drag_key_event (GdkEventKey*) { return false; }
250 
251  bool initially_vertical() const {
252  return _initially_vertical;
253  }
254 
256  virtual void setup_pointer_offset () {
258  }
259 
261  virtual void setup_video_offset () {
262  /* video offset is always in audio time */
264  _preview_video = false;
265  }
266 
267  int grab_button() const { return _grab_button; }
268 
269 protected:
270 
271  double grab_x () const {
272  return _grab_x;
273  }
274 
275  double grab_y () const {
276  return _grab_y;
277  }
278 
280 
282  return _raw_grab_time;
283  }
284 
286  return _grab_time.samples();
287  }
288 
290  return _grab_time;
291  }
292 
293  double last_pointer_x () const {
294  return _last_pointer_x;
295  }
296 
297  double last_pointer_y () const {
298  return _last_pointer_y;
299  }
300 
302  return _last_pointer_time.samples();
303  }
304 
306  return _last_pointer_time;
307  }
308 
309  Temporal::timecnt_t snap_delta (guint const) const;
310 
311  double current_pointer_x () const;
312  double current_pointer_y () const;
313 
314  /* sets snap delta from unsnapped pos */
316 
317  std::shared_ptr<ARDOUR::Region> add_midi_region (MidiTimeAxisView*, bool commit);
318 
320  void show_verbose_cursor_duration (Temporal::timepos_t const & , Temporal::timepos_t const & , double xoffset = 0);
321  void show_verbose_cursor_text (std::string const &);
323 
336  bool _copy;
337 
338 private:
345  double _grab_x;
346  double _grab_y;
353 
354  /* difference between some key position's snapped and unsnapped
355  * samplepos. used for relative snap.
356  */
360 
362 };
363 
369 class EditorDrag : public Drag
370 {
371  public:
372  EditorDrag (Editor&, ArdourCanvas::Item *, Temporal::TimeDomain td, ArdourCanvas::Item const * bounding_item, bool hide_snapped_cursor = true);
373  protected:
375 };
376 
377 class RegionDrag;
378 
381 {
382 public:
384 
394  double layer;
395  double initial_y;
399  std::shared_ptr<ARDOUR::Playlist> initial_playlist;
401 };
402 
404 class RegionDrag : public EditorDrag, public sigc::trackable
405 {
406 public:
407  RegionDrag (Editor&, ArdourCanvas::Item *, RegionView *, std::list<RegionView*> const &, Temporal::TimeDomain, bool hide_snapped_cursor = true);
408  virtual ~RegionDrag () {}
409 
410 protected:
411 
413  std::list<DraggingView> _views;
414 
416  std::vector<TimeAxisView*> _time_axis_views;
418  int apply_track_delta (const int start, const int delta, const int skip, const bool distance_only = false) const;
419 
422  uint32_t _ntracks;
423 
425 
426  friend class DraggingView;
427 
428 protected:
430 
431 private:
432 
435 };
436 
439 {
440  public:
443 
444  virtual void start_grab (GdkEvent *, Gdk::Cursor *);
445  virtual void motion (GdkEvent *, bool);
446  virtual void finished (GdkEvent *, bool);
447  virtual void aborted (bool);
448 
449  protected:
451  std::list<SlipDraggable*> draggables;
452 
453 };
454 
457 {
458 public:
459  RegionBrushDrag (Editor&, ArdourCanvas::Item *, RegionView *, std::list<RegionView*> const &, Temporal::TimeDomain td);
460  virtual ~RegionBrushDrag () {}
461 
462  virtual void start_grab (GdkEvent *, Gdk::Cursor *);
463  virtual void motion (GdkEvent *, bool);
464  virtual void finished (GdkEvent *, bool);
465  virtual void aborted (bool);
466 private:
467  typedef std::set<Temporal::timepos_t> TimePositionSet;
469 };
470 
473 {
474 public:
475 
476  RegionMotionDrag (Editor&, ArdourCanvas::Item *, RegionView *, std::list<RegionView*> const &, Temporal::TimeDomain td);
477  virtual ~RegionMotionDrag () {}
478 
479  virtual void start_grab (GdkEvent *, Gdk::Cursor *);
480  virtual void motion (GdkEvent *, bool);
481  virtual void finished (GdkEvent *, bool);
482  virtual void aborted (bool);
483 
487  virtual bool regions_came_from_canvas () const = 0;
488 
489 protected:
490 
492  virtual bool y_movement_allowed (int, double, int skip_invisible = 0) const;
494 
500  std::vector<ArdourMarker*> ripple_markers;
501 
502 private:
503  uint32_t _ndropzone;
504  uint32_t _pdropzone;
505  uint32_t _ddropzone;
506 };
507 
508 
513 {
514 public:
515  RegionMoveDrag (Editor&, ArdourCanvas::Item *, RegionView *, std::list<RegionView*> const &, bool, Temporal::TimeDomain);
516  virtual ~RegionMoveDrag () {}
517 
518  void motion (GdkEvent *, bool);
519  void finished (GdkEvent *, bool);
520  void aborted (bool);
521 
523 
524  bool regions_came_from_canvas () const {
525  return true;
526  }
527 
529 
530 private:
532  bool const,
533  bool const,
534  Temporal::timepos_t const &,
535  int32_t const ev_state
536  );
537 
539  bool const,
540  bool const,
541  Temporal::timepos_t const &,
542  int32_t const ev_state
543  );
544 
546  std::shared_ptr<ARDOUR::Region>,
549  Temporal::timepos_t const &,
551  );
552 
554  std::shared_ptr<ARDOUR::Region>,
555  std::shared_ptr<ARDOUR::Playlist>,
556  ARDOUR::PlaylistSet& modified_playlists
557  );
558 
559 
561  RouteTimeAxisView* create_destination_time_axis (std::shared_ptr<ARDOUR::Region>, TimeAxisView* original);
562 
564 };
565 
568 {
569 public:
570  RegionInsertDrag (Editor&, std::shared_ptr<ARDOUR::Region>, RouteTimeAxisView*, Temporal::timepos_t const &, Temporal::TimeDomain);
571 
572  void finished (GdkEvent *, bool);
573  void aborted (bool);
574 
575  bool regions_came_from_canvas () const {
576  return false;
577  }
578 };
579 
581 class RegionCutDrag : public EditorDrag
582 {
583 public:
586 
587  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
588  void motion (GdkEvent*, bool);
589  void finished (GdkEvent*, bool);
590  void aborted (bool);
591 };
592 
595 {
596 public:
598 
599  void motion (GdkEvent *, bool);
600  void finished (GdkEvent *, bool);
601  void aborted (bool);
602 
603 private:
605  std::shared_ptr<ARDOUR::Region> _region;
606 };
607 
609 class NoteResizeDrag : public Drag
610 {
611 public:
613 
614  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
615  void motion (GdkEvent *, bool);
616  void finished (GdkEvent *, bool);
617  void aborted (bool);
618 
620  return false;
621  }
622 
623 private:
625  bool relative;
626  bool at_front;
628  double _snap_delta;
629 };
630 
632 class NoteDrag : public Drag
633 {
634 public:
636 
637  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
638  void motion (GdkEvent *, bool);
639  void finished (GdkEvent *, bool);
640  void aborted (bool);
641 
643 
645  return false;
646  }
647 
648 private:
649 
650  Temporal::timecnt_t total_dx (GdkEvent * event) const; // total movement in quarter notes
651  int8_t total_dy () const;
652 
657  Temporal::timepos_t _earliest; // earliest note in note selection
659  double _note_height;
660 };
661 
662 class NoteCreateDrag : public Drag
663 {
664 public:
667 
668  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
669  void motion (GdkEvent *, bool);
670  void finished (GdkEvent *, bool);
671  void aborted (bool);
672 
674  return mode == Editing::MouseDraw || mode == Editing::MouseContent;
675  }
676 
678  return false;
679  }
680 
681  bool y_movement_matters () const {
682  return false;
683  }
684 
685 private:
686  double y_to_region (double) const;
687  Temporal::Beats round_to_grid (Temporal::timepos_t const & pos, GdkEvent const * event) const;
688 
692 };
693 
694 class HitCreateDrag : public Drag
695 {
696 public:
699 
700  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
701  void motion (GdkEvent *, bool) {}
702  void finished (GdkEvent *, bool);
703  void aborted (bool) {}
704 
706  return mode == Editing::MouseDraw || mode == Editing::MouseContent;
707  }
708 
709  bool y_movement_matters () const {
710  return false;
711  }
712 
713 private:
714  double y_to_region (double) const;
715 
717  int _y;
718 
719 };
720 
721 class NoteBrushDrag : public Drag
722 {
723 public:
726 
727  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
728  void motion (GdkEvent *, bool);
729  void finished (GdkEvent *, bool);
730  void aborted (bool) {}
731 
733  return mode == Editing::MouseDraw || mode == Editing::MouseContent;
734  }
735 
736  bool y_movement_matters () const {
737  return false;
738  }
739 
740 private:
741  double y_to_region (double) const;
743 
746  int _y;
753 };
754 
756 class PatchChangeDrag : public Drag
757 {
758 public:
760 
761  void motion (GdkEvent *, bool);
762  void finished (GdkEvent *, bool);
763  void aborted (bool);
764 
765  bool y_movement_matters () const {
766  return false;
767  }
768 
770  return false;
771  }
772 
774 
775 private:
779 };
780 
783 {
784 public:
786 
789 };
790 
793 {
794 public:
796 
797  void motion (GdkEvent *, bool);
798  void finished (GdkEvent *, bool);
799  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
800 
801  bool y_movement_matters () const {
802  return false;
803  }
804 
806  return false;
807  }
808 
809  void aborted (bool);
810 
811 protected:
812  std::list<AVDraggingView> _views;
813 
814 private:
817  bool _stuck;
818 };
819 
821 class TrimDrag : public RegionDrag
822 {
823 public:
824  enum Operation {
826  EndTrim
827  };
828 
829  TrimDrag (Editor&, ArdourCanvas::Item *, RegionView*, std::list<RegionView*> const &, Temporal::TimeDomain td, bool preserve_fade_anchor = false);
830 
831  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
832  void motion (GdkEvent *, bool);
833  void finished (GdkEvent *, bool);
834  void aborted (bool);
835 
836  bool y_movement_matters () const {
837  return false;
838  }
839 
841  return false;
842  }
843 
845 
846 private:
847 
849 
852 
853  std::vector<RegionView::DisplaySuspender> suspenders;
854 };
855 
858 {
859 public:
861 
862  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
863  void motion (GdkEvent *, bool);
864  void finished (GdkEvent *, bool);
865  void aborted (bool);
866 
868  return false;
869  }
870 
871  bool y_movement_matters () const {
872  return false;
873  }
874 
876 
877 private:
881 
882  bool _movable;
886 };
887 
890 {
891 public:
893 
894  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
895  void motion (GdkEvent *, bool);
896  void finished (GdkEvent *, bool);
897  void aborted (bool);
898 
899 private:
901  double initial_bpm;
904 };
905 
908 {
909 public:
911 
912  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
913  void motion (GdkEvent *, bool);
914  void finished (GdkEvent *, bool);
915  void aborted (bool);
916 
918  return false;
919  }
920 
921  bool y_movement_matters () const {
922  return true;
923  }
924 
926 
927 private:
931 
932  bool _movable;
933  double _grab_bpm;
936 };
937 
939 class BBTMarkerDrag : public EditorDrag
940 {
941 public:
943 
944  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
945  void motion (GdkEvent *, bool);
946  void finished (GdkEvent *, bool);
947  void aborted (bool);
948 
950  return false;
951  }
952 
953  bool y_movement_matters () const {
954  return false;
955  }
956 
958 
959 private:
963 
965 };
966 
968 {
969 public:
971 
972  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
973  void motion (GdkEvent *, bool);
974  void finished (GdkEvent *, bool);
975  void aborted (bool);
976 
978  return false;
979  }
980 
982  return false;
983  }
984 
985  bool y_movement_matters () const {
986  return false;
987  }
988 
990 
991 private:
994  double _grab_bpm;
996 
999 };
1000 
1002 {
1003 public:
1008  XMLNode&,
1009  bool ramped);
1010 
1011  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1012  void motion (GdkEvent *, bool);
1013  void finished (GdkEvent *, bool);
1014  void aborted (bool);
1015 
1017  return false;
1018  }
1019 
1021  return false;
1022  }
1023 
1024  bool y_movement_matters () const {
1025  return false;
1026  }
1027 
1029 
1030 private:
1035 
1036  double direction;
1037  double delta;
1040 
1043  bool _do_ramp;
1044 };
1045 
1046 
1049 {
1050 public:
1052 
1053  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1054  void motion (GdkEvent *, bool);
1055  void finished (GdkEvent *, bool);
1056  void aborted (bool);
1057 
1059  return false;
1060  }
1061 
1062  bool y_movement_matters () const {
1063  return true;
1064  }
1065 
1067 
1068 private:
1075 };
1076 
1078 class TempoEndDrag : public EditorDrag
1079 {
1080 public:
1082 
1083  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1084  void motion (GdkEvent *, bool);
1085  void finished (GdkEvent *, bool);
1086  void aborted (bool);
1087 
1089  return false;
1090  }
1091 
1092  bool y_movement_matters () const {
1093  return true;
1094  }
1095 
1097 
1098 private:
1103 
1106 };
1107 
1109 class CursorDrag : public EditorDrag
1110 {
1111 public:
1113 
1114  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1115  void motion (GdkEvent *, bool);
1116  void finished (GdkEvent *, bool);
1117  void aborted (bool);
1118 
1120  return false;
1121  }
1122 
1123  bool y_movement_matters () const {
1124  return true;
1125  }
1126 
1127 private:
1129 
1131  bool _stop;
1132  double _grab_zoom;
1133 
1134  //used for zooming
1139 };
1140 
1142 class FadeInDrag : public RegionDrag
1143 {
1144 public:
1145  FadeInDrag (Editor&, ArdourCanvas::Item *, RegionView *, std::list<RegionView*> const &, Temporal::TimeDomain);
1146 
1147  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1148  void motion (GdkEvent *, bool);
1149  void finished (GdkEvent *, bool);
1150  void aborted (bool);
1151 
1152  bool y_movement_matters () const {
1153  return false;
1154  }
1155 
1157  return false;
1158  }
1159 
1161 };
1162 
1164 class FadeOutDrag : public RegionDrag
1165 {
1166 public:
1167  FadeOutDrag (Editor&, ArdourCanvas::Item *, RegionView *, std::list<RegionView*> const &, Temporal::TimeDomain td);
1168 
1169  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1170  void motion (GdkEvent *, bool);
1171  void finished (GdkEvent *, bool);
1172  void aborted (bool);
1173 
1174  bool y_movement_matters () const {
1175  return false;
1176  }
1177 
1179  return false;
1180  }
1181 
1183 };
1184 
1186 class MarkerDrag : public EditorDrag
1187 {
1188 public:
1191 
1192  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1193  void motion (GdkEvent *, bool);
1194  void finished (GdkEvent *, bool);
1195  void aborted (bool);
1196 
1198  return false;
1199  }
1200 
1201  bool y_movement_matters () const {
1202  return false;
1203  }
1204 
1207 
1208 private:
1210 
1215  std::vector<ArdourMarker*> markers;
1218  };
1219 
1220  std::vector<ARDOUR::Location::ChangeSuspender> lcs;
1221 
1222  typedef std::list<CopiedLocationMarkerInfo> CopiedLocationInfo;
1225 };
1226 
1228 class ControlPointDrag : public Drag
1229 {
1230 public:
1232 
1233  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1234  void motion (GdkEvent *, bool);
1235  void finished (GdkEvent *, bool);
1236  void aborted (bool);
1237 
1239 
1241  return false;
1242  }
1243 
1244 
1245 private:
1246 
1251  bool _pushing;
1252  uint32_t _final_index;
1253  static double _zero_gain_fraction;
1254 
1256 };
1257 
1259 class LineDrag : public Drag
1260 {
1261 public:
1262  LineDrag (EditingContext &e, ArdourCanvas::Item *i, std::function<void(GdkEvent*,Temporal::timepos_t const &,double)>);
1264 
1265  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1266  void motion (GdkEvent *, bool);
1267  void finished (GdkEvent *, bool);
1268  void aborted (bool);
1269 
1271  return false;
1272  }
1273 
1274 private:
1275 
1280  uint32_t _before;
1281  uint32_t _after;
1283  std::function<void(GdkEvent*,Temporal::timepos_t const &,double)> click_functor;
1284 };
1285 
1287 class FeatureLineDrag : public Drag
1288 {
1289 public:
1291 
1292  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1293  void motion (GdkEvent *, bool);
1294  void finished (GdkEvent *, bool);
1295  void aborted (bool);
1296 
1297 private:
1298 
1301 
1304 
1305  float _before;
1306  uint32_t _max_x;
1307 };
1308 
1311 {
1312 public:
1314 
1315  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1316  void motion (GdkEvent *, bool);
1317  void finished (GdkEvent *, bool);
1318  void aborted (bool);
1319 
1320  void do_select_things (GdkEvent *, bool);
1321 
1330  virtual void select_things (int button_state, Temporal::timepos_t const & x1, Temporal::timepos_t const & x2, double y1, double y2, bool drag_in_progress);
1331  virtual void deselect_things ();
1332 
1333  protected:
1335  std::function<bool(GdkEvent*,Temporal::timepos_t const &)> click_functor;
1336 };
1337 
1340 {
1341  public:
1343 
1344  void select_things (int, Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, bool);
1346  void finished (GdkEvent *, bool);
1347 
1348  private:
1350 };
1351 
1354 {
1355 public:
1357 
1358  void select_things (int, Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, bool);
1360 
1361 private:
1363 };
1364 
1366 class TimeFXDrag : public RegionDrag
1367 {
1368 public:
1369  TimeFXDrag (Editor&, ArdourCanvas::Item *, RegionView *, std::list<RegionView*> const &, Temporal::TimeDomain td);
1370 
1371  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1372  void motion (GdkEvent *, bool);
1373  void finished (GdkEvent *, bool);
1374  void aborted (bool);
1375 private:
1377 };
1378 
1381 {
1382 public:
1383  enum Operation {
1389  };
1390 
1392 
1393  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1394  void motion (GdkEvent *, bool);
1395  void finished (GdkEvent *, bool);
1396  void aborted (bool);
1397 
1399 
1400 private:
1402  bool _add;
1407 };
1408 
1411 {
1412 public:
1414 
1416  void motion (GdkEvent*, bool);
1417  void finished (GdkEvent *, bool);
1418  void aborted (bool);
1419 
1420 private:
1424 };
1425 
1428 {
1429 public:
1430  enum Operation {
1435  };
1436 
1439 
1440  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1441  void motion (GdkEvent *, bool);
1442  void finished (GdkEvent *, bool);
1443  void aborted (bool);
1444 
1446  return false;
1447  }
1448 
1449  bool y_movement_matters () const {
1450  return false;
1451  }
1452 
1453 private:
1455 
1458 };
1459 
1462 {
1463 public:
1465 
1466  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1467  void motion (GdkEvent *, bool);
1468  void finished (GdkEvent *, bool);
1469  void aborted (bool);
1470 
1471 private:
1473 };
1474 
1479 {
1480 public:
1481  AutomationRangeDrag (EditingContext&, AutomationTimeAxisView *, float initial_value, std::list<ARDOUR::TimelineRange> const &);
1482  AutomationRangeDrag (EditingContext&, std::list<RegionView*> const &, std::list<ARDOUR::TimelineRange> const &, double y_origin, double y_height);
1483 
1484  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1485  void motion (GdkEvent *, bool);
1486  void finished (GdkEvent *, bool);
1487  void aborted (bool);
1488 
1489  bool x_movement_matters () const {
1490  return false;
1491  }
1492 
1493 private:
1494  void setup (std::list<std::shared_ptr<AutomationLine> > const &);
1495  double y_fraction (double global_y_position) const;
1496  double value (std::shared_ptr<ARDOUR::AutomationList> list, Temporal::timepos_t const & x) const;
1497 
1498  std::list<ARDOUR::TimelineRange> _ranges;
1499 
1501  struct Line {
1502  std::shared_ptr<AutomationLine> line;
1503  std::list<ControlPoint*> points;
1504  std::pair<Temporal::timepos_t, Temporal::timepos_t> range;
1506  };
1507 
1508  std::list<Line> _lines;
1509  double _y_origin;
1510  double _y_height;
1514 };
1515 
1518 class CrossfadeEdgeDrag : public Drag
1519 {
1520 public:
1522 
1524  void motion (GdkEvent*, bool);
1525  void finished (GdkEvent*, bool);
1526  void aborted (bool);
1527 
1528  bool y_movement_matters () const {
1529  return false;
1530  }
1531 
1532 private:
1534  bool start;
1535 };
1536 
1537 class RegionMarkerDrag : public Drag
1538 {
1539  public:
1542 
1543  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1544  void motion (GdkEvent *, bool);
1545  void finished (GdkEvent *, bool);
1546  void aborted (bool);
1547 
1549  return false;
1550  }
1551 
1552  bool y_movement_matters () const {
1553  return false;
1554  }
1555 
1557 
1558  private:
1563 };
1564 
1565 
1566 class LollipopDrag : public Drag
1567 {
1568  public:
1571 
1572  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1573  void motion (GdkEvent *, bool);
1574  void finished (GdkEvent *, bool);
1575  void aborted (bool);
1576 
1578  return false;
1579  }
1580 
1582  return false;
1583  }
1584 
1585  bool x_movement_matters () const {
1586  return false;
1587  }
1588 
1590 
1591  private:
1594 };
1595 
1596 template<typename OrderedPointList, typename OrderedPoint>
1597 class FreehandLineDrag : public Drag
1598 {
1599  public:
1602 
1603  void motion (GdkEvent*, bool);
1604  void finished (GdkEvent*, bool);
1606  virtual void point_added (ArdourCanvas::Duple const & d, ArdourCanvas::Rectangle const & r, double last_x) {}
1607  virtual void line_extended (ArdourCanvas::Duple const & from, ArdourCanvas::Duple const & to, ArdourCanvas::Rectangle const & r, double last_x) {
1608  point_added (to, r, last_x);
1609  }
1610 
1611  protected:
1612  ArdourCanvas::Item* parent; /* we do not own this. If null, use base_rect as the parent */
1613  ArdourCanvas::Rectangle& base_rect; /* we do not own this */
1617  int edge_x;
1618  bool did_snap;
1620  OrderedPointList drawn_points;
1623 
1624  void maybe_add_point (GdkEvent*, Temporal::timepos_t const &, bool first_move);
1625 };
1626 
1627 class AutomationDrawDrag : public FreehandLineDrag<Evoral::ControlList::OrderedPoints, Evoral::ControlList::OrderedPoint>
1628 {
1629  public:
1632 
1633  void finished (GdkEvent*, bool);
1634  void aborted (bool) {}
1635 
1636 private:
1637  std::function<bool(GdkEvent*,Temporal::timepos_t const &)> click_functor;
1638 };
1639 
1640 class VelocityLineDrag : public FreehandLineDrag<Evoral::ControlList::OrderedPoints, Evoral::ControlList::OrderedPoint>
1641 {
1642  public:
1645 
1646  void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1647  void finished (GdkEvent*, bool);
1648  void aborted (bool);
1649  void point_added (ArdourCanvas::Duple const & d, ArdourCanvas::Rectangle const & r, double last_x);
1650  void line_extended (ArdourCanvas::Duple const & from, ArdourCanvas::Duple const & to, ArdourCanvas::Rectangle const & r, double last_x);
1651 
1652  private:
1655 };
1656 
1657 class ClipStartDrag : public Drag
1658 {
1659  public:
1662 
1665  void motion (GdkEvent*, bool);
1666  void finished (GdkEvent*, bool);
1667  void aborted (bool);
1668 
1669  private:
1673 };
1674 
1675 class ClipEndDrag : public Drag
1676 {
1677  public:
1680 
1683  void motion (GdkEvent*, bool);
1684  void finished (GdkEvent*, bool);
1685  void aborted (bool);
1686 
1687  private:
1691 };
1692 
1693 #endif /* __gtk2_ardour_editor_drag_h_ */
AVDraggingView(RegionView *)
samplepos_t initial_position
initial position of the region
Definition: editor_drag.h:788
RegionView * view
the view
Definition: editor_drag.h:787
void aborted(bool)
Definition: editor_drag.h:1634
AutomationDrawDrag(EditingContext &, ArdourCanvas::Item *, ArdourCanvas::Rectangle &, bool, Temporal::TimeDomain, std::function< bool(GdkEvent *, Temporal::timepos_t const &)>)
std::function< bool(GdkEvent *, Temporal::timepos_t const &)> click_functor
Definition: editor_drag.h:1637
void finished(GdkEvent *, bool)
std::list< ARDOUR::TimelineRange > _ranges
Definition: editor_drag.h:1498
double y_fraction(double global_y_position) const
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
AutomationRangeDrag(EditingContext &, std::list< RegionView * > const &, std::list< ARDOUR::TimelineRange > const &, double y_origin, double y_height)
std::list< Line > _lines
Definition: editor_drag.h:1508
double value(std::shared_ptr< ARDOUR::AutomationList > list, Temporal::timepos_t const &x) const
void finished(GdkEvent *, bool)
void setup(std::list< std::shared_ptr< AutomationLine > > const &)
bool x_movement_matters() const
Definition: editor_drag.h:1489
void motion(GdkEvent *, bool)
AutomationRangeDrag(EditingContext &, AutomationTimeAxisView *, float initial_value, std::list< ARDOUR::TimelineRange > const &)
void setup_pointer_offset()
XMLNode * _before_state
Definition: editor_drag.h:964
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
Temporal::TempoMap::WritableSharedPtr map
Definition: editor_drag.h:962
bool y_movement_matters() const
Definition: editor_drag.h:953
BBTMarkerDrag(Editor &, ArdourCanvas::Item *)
void aborted(bool)
BBTMarker * _marker
Definition: editor_drag.h:960
void finished(GdkEvent *, bool)
void motion(GdkEvent *, bool)
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:949
Temporal::MusicTimePoint const * _point
Definition: editor_drag.h:961
void start_grab(GdkEvent *, Gdk::Cursor *)
void aborted(bool)
ClipEndDrag(CueEditor &, ArdourCanvas::Rectangle &)
void finished(GdkEvent *, bool)
CueEditor & ce
Definition: editor_drag.h:1688
ArdourCanvas::Rectangle * dragging_rect
Definition: editor_drag.h:1689
void motion(GdkEvent *, bool)
bool end_grab(GdkEvent *)
ArdourCanvas::Rect original_rect
Definition: editor_drag.h:1690
void aborted(bool)
bool end_grab(GdkEvent *)
ArdourCanvas::Rect original_rect
Definition: editor_drag.h:1672
void motion(GdkEvent *, bool)
void finished(GdkEvent *, bool)
ClipStartDrag(CueEditor &, ArdourCanvas::Rectangle &)
void start_grab(GdkEvent *, Gdk::Cursor *)
ArdourCanvas::Rectangle * dragging_rect
Definition: editor_drag.h:1671
CueEditor & ce
Definition: editor_drag.h:1670
uint32_t _final_index
Definition: editor_drag.h:1252
void motion(GdkEvent *, bool)
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:1240
Temporal::timecnt_t total_dt(GdkEvent *) const
bool active(Editing::MouseMode m)
ControlPoint * _point
Definition: editor_drag.h:1247
void aborted(bool)
void finished(GdkEvent *, bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
ControlPointDrag(EditingContext &, ArdourCanvas::Item *)
static double _zero_gain_fraction
Definition: editor_drag.h:1253
double _cumulative_y_drag
Definition: editor_drag.h:1250
AudioRegionView * arv
Definition: editor_drag.h:1533
bool y_movement_matters() const
Definition: editor_drag.h:1528
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void aborted(bool)
void finished(GdkEvent *, bool)
CrossfadeEdgeDrag(Editor &, AudioRegionView *, ArdourCanvas::Item *, bool start)
void motion(GdkEvent *, bool)
void finished(GdkEvent *, bool)
void motion(GdkEvent *, bool)
double _grab_zoom
editor samples per unit when our grab started
Definition: editor_drag.h:1132
int _last_y_delta
Definition: editor_drag.h:1138
CursorDrag(Editor &, EditorCursor &, bool)
bool _stop
true to stop the transport on starting the drag, otherwise false
Definition: editor_drag.h:1131
EditorCursor & _cursor
Definition: editor_drag.h:1130
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:1119
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void aborted(bool)
void fake_locate(samplepos_t)
bool y_movement_matters() const
Definition: editor_drag.h:1123
void abort()
bool preview_video() const
bool mid_drag_key_event(GdkEventKey *)
Temporal::timepos_t _current_pointer_time
time that the pointer is now at
Definition: editor_drag.h:152
bool ending() const
Definition: editor_drag.h:112
void set(Drag *, GdkEvent *, Gdk::Cursor *c=MouseCursors::invalid_cursor())
bool have_item(ArdourCanvas::Item *) const
void start_grab(GdkEvent *, Gdk::Cursor *c=MouseCursors::invalid_cursor())
bool end_grab(GdkEvent *)
EditingContext * _editing_context
Definition: editor_drag.h:147
std::list< Drag * > _drags
Definition: editor_drag.h:148
double current_pointer_x() const
Definition: editor_drag.h:121
bool active() const
Definition: editor_drag.h:116
double current_pointer_y() const
Definition: editor_drag.h:126
double _current_pointer_y
canvas-coordinate space y of the current pointer
Definition: editor_drag.h:151
bool dragging_lollipop() const
Temporal::timepos_t current_pointer_time() const
Definition: editor_drag.h:136
double _current_pointer_x
canvas-coordinate space x of the current pointer
Definition: editor_drag.h:150
bool _ending
true if end_grab or abort is in progress, otherwise false
Definition: editor_drag.h:149
std::list< Drag * > const & drags() const
Definition: editor_drag.h:144
bool motion_handler(GdkEvent *, bool)
DragManager(EditingContext *e)
ARDOUR::samplepos_t current_pointer_sample() const
Definition: editor_drag.h:131
void mark_double_click()
Temporal::timepos_t last_pointer_time() const
Definition: editor_drag.h:305
double last_pointer_y() const
Definition: editor_drag.h:297
virtual bool active(Editing::MouseMode m)
Definition: editor_drag.h:218
Temporal::timepos_t pixel_duration_to_time(double x) const
void set_double_click(bool yn)
Definition: editor_drag.h:185
virtual bool y_movement_matters() const
Definition: editor_drag.h:245
Temporal::timepos_t adjusted_current_time(GdkEvent const *, bool snap=true) const
void set_time_domain(Temporal::TimeDomain)
ArdourCanvas::Item * item() const
Definition: editor_drag.h:170
virtual void setup_pointer_offset()
Definition: editor_drag.h:256
double _last_pointer_x
trackview x of the pointer last time a motion occurred
Definition: editor_drag.h:347
virtual void start_grab(GdkEvent *e, Gdk::Cursor *c=0)
ArdourCanvas::Item * _item
our item
Definition: editor_drag.h:326
Temporal::timecnt_t _video_offset
Definition: editor_drag.h:330
bool _y_constrained
true if y motion is constrained, otherwise false
Definition: editor_drag.h:333
void abort()
Gtkmm2ext::Bindings::DragsBlockBindings binding_blocker
Definition: editor_drag.h:361
Temporal::TimeDomain time_domain() const
Definition: editor_drag.h:174
virtual ~Drag()
Temporal::timepos_t _last_pointer_time
adjusted_time the last time a motion occurred
Definition: editor_drag.h:351
Temporal::timecnt_t snap_delta(guint const) const
void show_verbose_cursor_time(Temporal::timepos_t const &)
virtual bool allow_horizontal_autoscroll() const
Definition: editor_drag.h:235
Temporal::timepos_t adjusted_time(Temporal::timepos_t const &, GdkEvent const *, bool snap=true) const
double _grab_y
y of the grab start position, possibly adjusted if _bounding_itme is non-null
Definition: editor_drag.h:346
void set_manager(DragManager *m)
Definition: editor_drag.h:162
std::pair< int, int > MoveThreshold
Definition: editor_drag.h:227
bool _move_threshold_passed
true if the move threshold has been passed, otherwise false
Definition: editor_drag.h:341
void set_grab_button_anyway(GdkEvent *)
DragManager * _drags
Definition: editor_drag.h:325
bool _was_double_click
true if drag initiated by a double click event
Definition: editor_drag.h:344
void show_view_preview(Temporal::timepos_t const &)
Temporal::timecnt_t _pointer_offset
Definition: editor_drag.h:329
ArdourCanvas::Item const * _bounding_item
our coordinate reference (normally null)
Definition: editor_drag.h:327
bool _initially_vertical
true if after move threshold is passed we appear to be moving vertically; undefined before that
Definition: editor_drag.h:343
ARDOUR::timepos_t _earliest_time_limit
time we cannot drag before (defaults to 0, indicating no such limit)
Definition: editor_drag.h:335
double current_pointer_y() const
virtual bool mid_drag_key_event(GdkEventKey *)
Definition: editor_drag.h:249
std::shared_ptr< ARDOUR::Region > add_midi_region(MidiTimeAxisView *, bool commit)
int grab_button() const
Definition: editor_drag.h:267
bool _preview_video
Definition: editor_drag.h:331
virtual void motion(GdkEvent *e, bool f)=0
virtual bool allow_vertical_autoscroll() const
Definition: editor_drag.h:231
ArdourCanvas::Item const * bounding_item() const
Definition: editor_drag.h:166
bool _copy
Definition: editor_drag.h:336
virtual bool end_grab(GdkEvent *)
double last_pointer_x() const
Definition: editor_drag.h:293
ARDOUR::samplepos_t last_pointer_sample() const
Definition: editor_drag.h:301
virtual MoveThreshold move_threshold() const
Temporal::timecnt_t _snap_delta
Definition: editor_drag.h:357
bool motion_handler(GdkEvent *, bool)
double _last_pointer_y
trackview y of the pointer last time a motion occurred
Definition: editor_drag.h:348
Drag(EditingContext &, ArdourCanvas::Item *, Temporal::TimeDomain td, ArdourCanvas::Item const *bounding_item, bool hide_snapped_cursor=true)
ARDOUR::samplepos_t grab_sample() const
Definition: editor_drag.h:285
int _grab_button
Definition: editor_drag.h:359
bool _hide_snapped_cursor
set true of Drag::motion does not call set_snapped_cursor_position
Definition: editor_drag.h:340
double current_pointer_x() const
bool _x_constrained
true if x motion is constrained, otherwise false
Definition: editor_drag.h:332
double grab_y() const
Definition: editor_drag.h:275
virtual void finished(GdkEvent *e, bool m)=0
Temporal::timepos_t _raw_grab_time
unsnapped time that the mouse was at when start_grab was called, or 0
Definition: editor_drag.h:349
bool initially_vertical() const
Definition: editor_drag.h:251
bool _trackview_only
true if pointer y value should always be relative to the top of the trackview group
Definition: editor_drag.h:339
void set_bounding_item(ArdourCanvas::Item const *i)
Temporal::timepos_t raw_grab_time() const
Definition: editor_drag.h:281
bool was_double_click() const
Definition: editor_drag.h:184
virtual bool x_movement_matters() const
Definition: editor_drag.h:240
void show_verbose_cursor_duration(Temporal::timepos_t const &, Temporal::timepos_t const &, double xoffset=0)
bool _starting_point_passed
true if we called move () with first_move flag, otherwise false
Definition: editor_drag.h:342
virtual void aborted(bool m)=0
EditingContext & editing_context
Definition: editor_drag.h:324
virtual void setup_video_offset()
Definition: editor_drag.h:261
bool _was_rolling
true if the session was rolling before the drag started, otherwise false
Definition: editor_drag.h:334
double _grab_x
trackview x of the grab start position
Definition: editor_drag.h:345
bool preview_video() const
Definition: editor_drag.h:222
Temporal::timepos_t grab_time() const
Definition: editor_drag.h:289
void swap_grab(ArdourCanvas::Item *, Gdk::Cursor *, uint32_t)
void show_verbose_cursor_text(std::string const &)
void setup_snap_delta(Temporal::timepos_t const &pos)
bool _constraint_pressed
if the keyboard indicated constraint modifier was pressed on start_grab()
Definition: editor_drag.h:358
Temporal::TimeDomain _time_domain
Definition: editor_drag.h:352
double grab_x() const
Definition: editor_drag.h:271
Temporal::timepos_t _grab_time
adjusted_time that the mouse was at when start_grab was called, or 0
Definition: editor_drag.h:350
samplepos_t anchored_fade_length
fade_length when anchored during drag
Definition: editor_drag.h:398
RegionView * view
the view
Definition: editor_drag.h:385
double layer
Definition: editor_drag.h:394
std::shared_ptr< ARDOUR::Playlist > initial_playlist
Definition: editor_drag.h:399
DraggingView(RegionView *, RegionDrag *, TimeAxisView *original_tav)
Temporal::timepos_t initial_position
initial position of the region
Definition: editor_drag.h:396
TimeAxisView * initial_time_axis_view
Definition: editor_drag.h:400
double initial_y
the initial y position of the view before any reparenting
Definition: editor_drag.h:395
int time_axis_view
Definition: editor_drag.h:389
Temporal::timepos_t initial_end
initial end position of the region
Definition: editor_drag.h:397
EditorDrag(Editor &, ArdourCanvas::Item *, Temporal::TimeDomain td, ArdourCanvas::Item const *bounding_item, bool hide_snapped_cursor=true)
Editor & _editor
Definition: editor_drag.h:374
Definition: editor.h:161
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:1156
void setup_pointer_offset()
void aborted(bool)
void motion(GdkEvent *, bool)
bool y_movement_matters() const
Definition: editor_drag.h:1152
FadeInDrag(Editor &, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, Temporal::TimeDomain)
void finished(GdkEvent *, bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void aborted(bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
FadeOutDrag(Editor &, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, Temporal::TimeDomain td)
bool y_movement_matters() const
Definition: editor_drag.h:1174
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:1178
void setup_pointer_offset()
void motion(GdkEvent *, bool)
void finished(GdkEvent *, bool)
ArdourCanvas::Line * _line
Definition: editor_drag.h:1299
double _cumulative_x_drag
Definition: editor_drag.h:1303
double _region_view_grab_x
Definition: editor_drag.h:1302
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void motion(GdkEvent *, bool)
void aborted(bool)
void finished(GdkEvent *, bool)
AudioRegionView * _arv
Definition: editor_drag.h:1300
FeatureLineDrag(Editor &e, ArdourCanvas::Item *i)
ArdourCanvas::Coord line_start_y
Definition: editor_drag.h:1622
virtual void point_added(ArdourCanvas::Duple const &d, ArdourCanvas::Rectangle const &r, double last_x)
Definition: editor_drag.h:1606
void maybe_add_point(GdkEvent *, Temporal::timepos_t const &, bool first_move)
ArdourCanvas::Item * parent
Definition: editor_drag.h:1612
ArdourCanvas::Rectangle & base_rect
Definition: editor_drag.h:1613
ArdourCanvas::Coord line_start_x
Definition: editor_drag.h:1621
ArdourCanvas::PolyLine * dragging_line
Definition: editor_drag.h:1614
virtual void line_extended(ArdourCanvas::Duple const &from, ArdourCanvas::Duple const &to, ArdourCanvas::Rectangle const &r, double last_x)
Definition: editor_drag.h:1607
void finished(GdkEvent *, bool)
OrderedPointList drawn_points
Definition: editor_drag.h:1620
bool mid_drag_key_event(GdkEventKey *)
FreehandLineDrag(EditingContext &, ArdourCanvas::Item *, ArdourCanvas::Rectangle &, bool, Temporal::TimeDomain)
void motion(GdkEvent *, bool)
HitCreateDrag(EditingContext &, ArdourCanvas::Item *, MidiView *)
void motion(GdkEvent *, bool)
Definition: editor_drag.h:701
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void finished(GdkEvent *, bool)
MidiView * _midi_view
Definition: editor_drag.h:716
double y_to_region(double) const
bool y_movement_matters() const
Definition: editor_drag.h:709
void aborted(bool)
Definition: editor_drag.h:703
bool active(Editing::MouseMode mode)
Definition: editor_drag.h:705
void aborted(bool)
bool have_command
Definition: editor_drag.h:1282
std::function< void(GdkEvent *, Temporal::timepos_t const &, double)> click_functor
Definition: editor_drag.h:1283
uint32_t _before
Definition: editor_drag.h:1280
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
double _fixed_grab_x
Definition: editor_drag.h:1277
double _cumulative_y_drag
Definition: editor_drag.h:1279
AutomationLine * _line
Definition: editor_drag.h:1276
uint32_t _after
Definition: editor_drag.h:1281
void finished(GdkEvent *, bool)
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:1270
void motion(GdkEvent *, bool)
LineDrag(EditingContext &e, ArdourCanvas::Item *i, std::function< void(GdkEvent *, Temporal::timepos_t const &, double)>)
double _fixed_grab_y
Definition: editor_drag.h:1278
ArdourCanvas::Lollipop * _primary
Definition: editor_drag.h:1593
void setup_pointer_offset()
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
LollipopDrag(EditingContext &, ArdourCanvas::Item *)
void aborted(bool)
VelocityDisplay * _display
Definition: editor_drag.h:1592
bool allow_horizontal_autoscroll() const
Definition: editor_drag.h:1581
bool x_movement_matters() const
Definition: editor_drag.h:1585
void motion(GdkEvent *, bool)
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:1577
void finished(GdkEvent *, bool)
double _grab_bpm
Definition: editor_drag.h:994
bool y_movement_matters() const
Definition: editor_drag.h:985
void setup_pointer_offset()
void finished(GdkEvent *, bool)
void motion(GdkEvent *, bool)
XMLNode * _before_state
Definition: editor_drag.h:997
MappingEndDrag(Editor &, ArdourCanvas::Item *, Temporal::TempoMap::WritableSharedPtr &, Temporal::TempoPoint &, Temporal::TempoPoint &after, XMLNode &before_state)
Temporal::TempoPoint & _tempo
Definition: editor_drag.h:992
bool allow_horizontal_autoscroll() const
Definition: editor_drag.h:981
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:977
void aborted(bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
Temporal::TempoMap::WritableSharedPtr map
Definition: editor_drag.h:995
Temporal::TempoPoint & _after
Definition: editor_drag.h:993
void motion(GdkEvent *, bool)
bool y_movement_matters() const
Definition: editor_drag.h:1024
bool allow_horizontal_autoscroll() const
Definition: editor_drag.h:1020
double initial_focus_npm
Definition: editor_drag.h:1038
MappingTwistDrag(Editor &, ArdourCanvas::Item *, Temporal::TempoMap::WritableSharedPtr &, Temporal::TempoPoint &prev, Temporal::TempoPoint &focus, Temporal::TempoPoint &next, XMLNode &, bool ramped)
Temporal::TempoPoint & focus
Definition: editor_drag.h:1032
Temporal::TempoPoint & prev
Definition: editor_drag.h:1031
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:1016
Temporal::TempoPoint & next
Definition: editor_drag.h:1033
void setup_pointer_offset()
XMLNode * _before_state
Definition: editor_drag.h:1041
double initial_pre_npm
Definition: editor_drag.h:1039
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
Temporal::TempoMap::WritableSharedPtr map
Definition: editor_drag.h:1034
void aborted(bool)
void finished(GdkEvent *, bool)
void aborted(bool)
bool _selection_changed
Definition: editor_drag.h:1212
std::list< CopiedLocationMarkerInfo > CopiedLocationInfo
Definition: editor_drag.h:1222
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
bool y_movement_matters() const
Definition: editor_drag.h:1201
void finished(GdkEvent *, bool)
MarkerDrag(Editor &, ArdourCanvas::Item *)
ArdourCanvas::Points _points
Definition: editor_drag.h:1224
CopiedLocationInfo _copied_locations
Definition: editor_drag.h:1223
std::vector< ARDOUR::Location::ChangeSuspender > lcs
Definition: editor_drag.h:1220
void setup_pointer_offset()
void update_item(ARDOUR::Location *)
ArdourMarker * _marker
marker being dragged
Definition: editor_drag.h:1211
void motion(GdkEvent *, bool)
void setup_video_offset()
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:1197
void finished(GdkEvent *, bool)
Temporal::superclock_t initial_sclock
Definition: editor_drag.h:880
void setup_pointer_offset()
void aborted(bool)
Editing::GridType _old_grid_type
Definition: editor_drag.h:883
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
Editing::SnapMode _old_snap_mode
Definition: editor_drag.h:884
MeterMarkerDrag(Editor &, ArdourCanvas::Item *, bool)
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:867
MeterMarker * _marker
Definition: editor_drag.h:878
void motion(GdkEvent *, bool)
Temporal::TempoMap::WritableSharedPtr map
Definition: editor_drag.h:879
bool y_movement_matters() const
Definition: editor_drag.h:871
XMLNode * before_state
Definition: editor_drag.h:885
void finished(GdkEvent *, bool)
MidiRubberbandSelectDrag(EditingContext &, MidiView *)
void select_things(int, Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, bool)
void select_things(int, Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, bool)
MidiVerticalSelectDrag(EditingContext &, MidiView *)
static Gdk::Cursor * invalid_cursor()
Definition: mouse_cursors.h:90
MouseZoomDrag(Editor &, ArdourCanvas::Item *)
void finished(GdkEvent *, bool)
void aborted(bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void motion(GdkEvent *, bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
MidiView * _midi_view
Definition: editor_drag.h:744
Temporal::Beats get_stride(Temporal::Beats const &pos, Temporal::BBT_Offset const &quantization)
Temporal::Beats next_grid
Definition: editor_drag.h:748
bool y_movement_matters() const
Definition: editor_drag.h:736
double y_to_region(double) const
void motion(GdkEvent *, bool)
Temporal::timepos_t _last_pos
Definition: editor_drag.h:745
void finished(GdkEvent *, bool)
void aborted(bool)
Definition: editor_drag.h:730
Temporal::Beats specified_length
Definition: editor_drag.h:750
Temporal::Beats stride
Definition: editor_drag.h:747
NoteBrushDrag(EditingContext &, ArdourCanvas::Item *, MidiView *, Temporal::Beats specified_length=Temporal::Beats(), int stride_multiple=1, int held_note=-1)
bool active(Editing::MouseMode mode)
Definition: editor_drag.h:732
NoteCreateDrag(EditingContext &, ArdourCanvas::Item *, MidiView *)
void aborted(bool)
MidiView * _midi_view
Definition: editor_drag.h:689
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:677
Temporal::timepos_t _note[2]
Definition: editor_drag.h:691
bool active(Editing::MouseMode mode)
Definition: editor_drag.h:673
Temporal::Beats round_to_grid(Temporal::timepos_t const &pos, GdkEvent const *event) const
void finished(GdkEvent *, bool)
bool y_movement_matters() const
Definition: editor_drag.h:681
void motion(GdkEvent *, bool)
double y_to_region(double) const
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
ArdourCanvas::Rectangle * _drag_rect
Definition: editor_drag.h:690
double _note_height
Definition: editor_drag.h:659
NoteBase * _primary
Definition: editor_drag.h:654
double _cumulative_dy
Definition: editor_drag.h:656
Temporal::timecnt_t total_dx(GdkEvent *event) const
void aborted(bool)
void setup_pointer_offset()
int8_t total_dy() const
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
NoteDrag(EditingContext &, ArdourCanvas::Item *)
MidiView * _view
Definition: editor_drag.h:653
Temporal::timecnt_t _cumulative_dx
Definition: editor_drag.h:655
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:644
void finished(GdkEvent *, bool)
Temporal::timepos_t _earliest
Definition: editor_drag.h:657
bool _was_selected
Definition: editor_drag.h:658
void motion(GdkEvent *, bool)
NoteResizeDrag(EditingContext &, ArdourCanvas::Item *)
MidiView * midi_view
Definition: editor_drag.h:624
void finished(GdkEvent *, bool)
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:619
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
double _snap_delta
Definition: editor_drag.h:628
void aborted(bool)
void motion(GdkEvent *, bool)
void finished(GdkEvent *, bool)
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:769
PatchChangeDrag(EditingContext &, PatchChange *, MidiView *)
PatchChange * _patch_change
Definition: editor_drag.h:777
MidiView * _region_view
Definition: editor_drag.h:776
double _cumulative_dx
Definition: editor_drag.h:778
void aborted(bool)
void motion(GdkEvent *, bool)
void setup_pointer_offset()
bool y_movement_matters() const
Definition: editor_drag.h:765
ArdourCanvas::Rectangle * _drag_rect
Definition: editor_drag.h:1457
void motion(GdkEvent *, bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
Operation _operation
Definition: editor_drag.h:1456
void aborted(bool)
RangeMarkerBarDrag(Editor &, ArdourCanvas::Item *, Operation)
void update_item(ARDOUR::Location *)
bool y_movement_matters() const
Definition: editor_drag.h:1449
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:1445
void finished(GdkEvent *, bool)
std::set< Temporal::timepos_t > TimePositionSet
Definition: editor_drag.h:467
virtual void finished(GdkEvent *, bool)
virtual void aborted(bool)
TimePositionSet _already_pasted
Definition: editor_drag.h:468
virtual void motion(GdkEvent *, bool)
virtual void start_grab(GdkEvent *, Gdk::Cursor *)
RegionBrushDrag(Editor &, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, Temporal::TimeDomain td)
virtual ~RegionBrushDrag()
Definition: editor_drag.h:460
MidiTimeAxisView * _view
Definition: editor_drag.h:604
void finished(GdkEvent *, bool)
RegionCreateDrag(Editor &, ArdourCanvas::Item *, TimeAxisView *)
void aborted(bool)
std::shared_ptr< ARDOUR::Region > _region
Definition: editor_drag.h:605
void motion(GdkEvent *, bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void motion(GdkEvent *, bool)
RegionCutDrag(Editor &, ArdourCanvas::Item *, samplepos_t)
void finished(GdkEvent *, bool)
void aborted(bool)
virtual ~RegionDrag()
Definition: editor_drag.h:408
uint32_t _ntracks
Definition: editor_drag.h:422
RegionView * _primary
the view that was clicked on (or whatever) to start the drag
Definition: editor_drag.h:412
void region_going_away(RegionView *)
RegionDrag(Editor &, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, Temporal::TimeDomain, bool hide_snapped_cursor=true)
void setup_video_offset()
int _visible_y_high
Definition: editor_drag.h:421
std::list< DraggingView > _views
information about all views that are being dragged
Definition: editor_drag.h:413
PBD::ScopedConnection death_connection
Definition: editor_drag.h:434
int apply_track_delta(const int start, const int delta, const int skip, const bool distance_only=false) const
void add_stateful_diff_commands_for_playlists(ARDOUR::PlaylistSet const &)
int find_time_axis_view(TimeAxisView *) const
std::vector< TimeAxisView * > _time_axis_views
Definition: editor_drag.h:416
int _visible_y_low
Definition: editor_drag.h:420
RegionInsertDrag(Editor &, std::shared_ptr< ARDOUR::Region >, RouteTimeAxisView *, Temporal::timepos_t const &, Temporal::TimeDomain)
void finished(GdkEvent *, bool)
bool regions_came_from_canvas() const
Definition: editor_drag.h:575
void aborted(bool)
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:1548
void aborted(bool)
ARDOUR::CueMarker model
Definition: editor_drag.h:1561
ARDOUR::CueMarker dragging_model
Definition: editor_drag.h:1562
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void finished(GdkEvent *, bool)
void setup_pointer_offset()
ArdourMarker * view
Definition: editor_drag.h:1560
bool y_movement_matters() const
Definition: editor_drag.h:1552
void motion(GdkEvent *, bool)
RegionMarkerDrag(Editor &, RegionView *, ArdourCanvas::Item *)
RegionView * rv
Definition: editor_drag.h:1559
uint32_t _ddropzone
Definition: editor_drag.h:505
virtual bool y_movement_allowed(int, double, int skip_invisible=0) const
uint32_t _ndropzone
Definition: editor_drag.h:503
uint32_t _pdropzone
Definition: editor_drag.h:504
std::vector< ArdourMarker * > ripple_markers
Definition: editor_drag.h:500
virtual void finished(GdkEvent *, bool)
RegionMotionDrag(Editor &, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, Temporal::TimeDomain td)
double compute_x_delta(GdkEvent const *, Temporal::timepos_t &)
void collect_ripple_views()
virtual void start_grab(GdkEvent *, Gdk::Cursor *)
virtual void motion(GdkEvent *, bool)
Temporal::timepos_t _last_position
last position of the thing being dragged
Definition: editor_drag.h:496
virtual bool regions_came_from_canvas() const =0
virtual ~RegionMotionDrag()
Definition: editor_drag.h:477
double _last_pointer_layer
Definition: editor_drag.h:499
double _total_x_delta
Definition: editor_drag.h:497
virtual void aborted(bool)
int _last_pointer_time_axis_view
Definition: editor_drag.h:498
void aborted(bool)
RegionView * _new_region_view
Definition: editor_drag.h:563
void remove_region_from_playlist(std::shared_ptr< ARDOUR::Region >, std::shared_ptr< ARDOUR::Playlist >, ARDOUR::PlaylistSet &modified_playlists)
bool regions_came_from_canvas() const
Definition: editor_drag.h:524
RegionView * insert_region_into_playlist(std::shared_ptr< ARDOUR::Region >, RouteTimeAxisView *, ARDOUR::layer_t, Temporal::timepos_t const &, ARDOUR::PlaylistSet &)
void finished(GdkEvent *, bool)
void clear_draggingview_list()
void setup_pointer_offset()
RegionMoveDrag(Editor &, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, bool, Temporal::TimeDomain)
void motion(GdkEvent *, bool)
void finished_no_copy(bool const, bool const, Temporal::timepos_t const &, int32_t const ev_state)
void collect_new_region_view(RegionView *)
virtual ~RegionMoveDrag()
Definition: editor_drag.h:516
void finished_copy(bool const, bool const, Temporal::timepos_t const &, int32_t const ev_state)
RouteTimeAxisView * create_destination_time_axis(std::shared_ptr< ARDOUR::Region >, TimeAxisView *original)
SlipDraggable * _primary
Definition: editor_drag.h:450
virtual ~RegionSlipContentsDrag()
Definition: editor_drag.h:442
virtual void aborted(bool)
virtual void start_grab(GdkEvent *, Gdk::Cursor *)
virtual void finished(GdkEvent *, bool)
RegionSlipContentsDrag(EditingContext &, ArdourCanvas::Item *, SlipDraggable *, std::list< SlipDraggable * > const &, Temporal::TimeDomain td)
std::list< SlipDraggable * > draggables
Definition: editor_drag.h:451
virtual void motion(GdkEvent *, bool)
void do_select_things(GdkEvent *, bool)
std::function< bool(GdkEvent *, Temporal::timepos_t const &)> click_functor
Definition: editor_drag.h:1335
void finished(GdkEvent *, bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
virtual void deselect_things()
void motion(GdkEvent *, bool)
virtual void select_things(int button_state, Temporal::timepos_t const &x1, Temporal::timepos_t const &x2, double y1, double y2, bool drag_in_progress)
RubberbandSelectDrag(EditingContext &, ArdourCanvas::Item *, std::function< bool(GdkEvent *, Temporal::timepos_t const &)> click_functor)
void finished(GdkEvent *, bool)
SelectionDrag(Editor &, ArdourCanvas::Item *, Operation)
TrackSelection _track_selection_at_start
Definition: editor_drag.h:1403
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void setup_pointer_offset()
bool _time_selection_at_start
Definition: editor_drag.h:1404
void aborted(bool)
Temporal::timepos_t end_at_start
Definition: editor_drag.h:1406
Temporal::timepos_t start_at_start
Definition: editor_drag.h:1405
Operation _operation
Definition: editor_drag.h:1401
void motion(GdkEvent *, bool)
Temporal::timepos_t _end_at_start
Definition: editor_drag.h:1423
void finished(GdkEvent *, bool)
SelectionMarkerDrag(Editor &, ArdourCanvas::Item *)
void motion(GdkEvent *, bool)
Temporal::timepos_t _start_at_start
Definition: editor_drag.h:1422
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void aborted(bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void finished(GdkEvent *, bool)
Temporal::TempoPoint * point
Definition: editor_drag.h:900
XMLNode * _before_state
Definition: editor_drag.h:903
void motion(GdkEvent *, bool)
TempoCurveDrag(Editor &, ArdourCanvas::Item *)
Temporal::TempoMap::WritableSharedPtr map
Definition: editor_drag.h:902
double initial_bpm
Definition: editor_drag.h:901
bool y_movement_matters() const
Definition: editor_drag.h:1092
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:1088
XMLNode * _before_state
Definition: editor_drag.h:1104
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
Temporal::TempoMap::WritableSharedPtr map
Definition: editor_drag.h:1102
void aborted(bool)
Temporal::Beats _grab_qn
Definition: editor_drag.h:1099
void motion(GdkEvent *, bool)
Temporal::TempoPoint * previous_tempo
Definition: editor_drag.h:1101
TempoEndDrag(Editor &, ArdourCanvas::Item *)
void setup_pointer_offset()
void finished(GdkEvent *, bool)
Temporal::TempoPoint * _tempo
Definition: editor_drag.h:1100
TempoMarker * _marker
Definition: editor_drag.h:928
XMLNode * _before_state
Definition: editor_drag.h:935
void motion(GdkEvent *, bool)
void setup_pointer_offset()
Temporal::TempoPoint const * _real_section
Definition: editor_drag.h:929
void aborted(bool)
TempoMarkerDrag(Editor &, ArdourCanvas::Item *)
void finished(GdkEvent *, bool)
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:917
bool y_movement_matters() const
Definition: editor_drag.h:921
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
Temporal::Beats _grab_qn
Definition: editor_drag.h:934
Temporal::TempoMap::WritableSharedPtr map
Definition: editor_drag.h:930
Temporal::Beats _grab_qn
Definition: editor_drag.h:1069
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void setup_pointer_offset()
void finished(GdkEvent *, bool)
XMLNode * _before_state
Definition: editor_drag.h:1074
void motion(GdkEvent *, bool)
void aborted(bool)
bool y_movement_matters() const
Definition: editor_drag.h:1062
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:1058
Temporal::TempoMap::WritableSharedPtr map
Definition: editor_drag.h:1072
TempoTwistDrag(Editor &, ArdourCanvas::Item *)
Temporal::TempoPoint const * _next_tempo
Definition: editor_drag.h:1071
Temporal::TempoPoint * _tempo
Definition: editor_drag.h:1070
std::shared_ptr< TempoMap > WritableSharedPtr
int64_t samples() const
Definition: timeline.h:90
void finished(GdkEvent *, bool)
bool _dragging_start
Definition: editor_drag.h:1376
void aborted(bool)
TimeFXDrag(Editor &, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, Temporal::TimeDomain td)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void motion(GdkEvent *, bool)
TrimDrag(Editor &, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, Temporal::TimeDomain td, bool preserve_fade_anchor=false)
void setup_pointer_offset()
void aborted(bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void finished(GdkEvent *, bool)
void motion(GdkEvent *, bool)
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:840
bool _preserve_fade_anchor
Definition: editor_drag.h:850
bool _jump_position_when_done
Definition: editor_drag.h:851
Operation _operation
Definition: editor_drag.h:848
bool y_movement_matters() const
Definition: editor_drag.h:836
std::vector< RegionView::DisplaySuspender > suspenders
Definition: editor_drag.h:853
VelocityLineDrag(EditingContext &, ArdourCanvas::Rectangle &, bool, Temporal::TimeDomain)
void point_added(ArdourCanvas::Duple const &d, ArdourCanvas::Rectangle const &r, double last_x)
void line_extended(ArdourCanvas::Duple const &from, ArdourCanvas::Duple const &to, ArdourCanvas::Rectangle const &r, double last_x)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
VelocityDisplay * vd
Definition: editor_drag.h:1653
void aborted(bool)
void finished(GdkEvent *, bool)
bool allow_vertical_autoscroll() const
Definition: editor_drag.h:805
bool y_movement_matters() const
Definition: editor_drag.h:801
std::list< AVDraggingView > _views
information about all audio that are being dragged along
Definition: editor_drag.h:812
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
ARDOUR::sampleoffset_t _startdrag_video_offset
Definition: editor_drag.h:815
VideoTimeLineDrag(Editor &e, ArdourCanvas::Item *i)
ARDOUR::sampleoffset_t _max_backwards_drag
Definition: editor_drag.h:816
void finished(GdkEvent *, bool)
void motion(GdkEvent *, bool)
void aborted(bool)
Definition: xml++.h:114
PBD::PropertyDescriptor< Temporal::BBT_Offset > quantization
PBD::PropertyDescriptor< timepos_t > start
Temporal::timecnt_t timecnt_t
std::set< std::shared_ptr< Playlist > > PlaylistSet
Temporal::sampleoffset_t sampleoffset_t
Temporal::samplepos_t samplepos_t
uint32_t layer_t
std::vector< Duple > Points
SnapMode
Definition: editing.h:71
GridType
Definition: editing.h:53
MouseMode
Definition: editing.h:99
Definition: axis_view.h:42
int64_t superclock_t
Definition: superclock.h:34
std::list< ControlPoint * > points
points to drag on the line
Definition: editor_drag.h:1503
std::pair< Temporal::timepos_t, Temporal::timepos_t > range
the range of all points on the line, in session time
Definition: editor_drag.h:1504
std::shared_ptr< AutomationLine > line
the line
Definition: editor_drag.h:1502
XMLNode * state
the XML state node before the drag
Definition: editor_drag.h:1505
std::vector< ArdourMarker * > markers
Definition: editor_drag.h:1215
CopiedLocationMarkerInfo(ARDOUR::Location *l, ArdourMarker *m)