diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-01-23 21:57:38 +0100 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-01-23 21:58:02 +0100 |
commit | 8dedea5ffab323c381ea158e3a622c3a1b69424f (patch) | |
tree | 946f3ddc8cfab1908773c8ce487bd98e63bd26ef /gtk2_ardour/midi_region_view.h | |
parent | 4a03572cd91c364f324efbf342e0795410a318e4 (diff) |
implement copy-drag for MIDI notes.
Probably some corner cases to be fixed, but pretty functional and largely modelled
on existing code (paste, drag, step add note etc.)
Diffstat (limited to 'gtk2_ardour/midi_region_view.h')
-rw-r--r-- | gtk2_ardour/midi_region_view.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h index e1af49abce..fd62312693 100644 --- a/gtk2_ardour/midi_region_view.h +++ b/gtk2_ardour/midi_region_view.h @@ -180,7 +180,7 @@ public: void note_diff_add_note (const boost::shared_ptr<NoteType> note, bool selected, bool show_velocity = false); void note_diff_remove_note (NoteBase* ev); - void apply_diff (bool as_subcommand = false); + void apply_diff (bool as_subcommand = false, bool was_copy = false); void abort_command(); void note_entered(NoteBase* ev); @@ -201,7 +201,9 @@ public: void invert_selection (); void move_selection(double dx, double dy, double cumulative_dy); - void note_dropped (NoteBase* ev, ARDOUR::frameoffset_t, int8_t d_note); + void note_dropped (NoteBase* ev, ARDOUR::frameoffset_t, int8_t d_note, bool copy); + NoteBase* copy_selection (); + void move_copies(double dx, double dy, double cumulative_dy); void select_notes (std::list<Evoral::event_id_t>); void select_matching_notes (uint8_t notenum, uint16_t channel_mask, bool add, bool extend); @@ -412,6 +414,7 @@ private: typedef boost::unordered_map<boost::shared_ptr<NoteType>, NoteBase*> Events; typedef boost::unordered_map<ARDOUR::MidiModel::PatchChangePtr, boost::shared_ptr<PatchChange> > PatchChanges; typedef std::vector< boost::shared_ptr<SysEx> > SysExes; + typedef std::vector<NoteBase*> CopyDragEvents; ARDOUR::BeatsFramesConverter _region_relative_time_converter; ARDOUR::BeatsFramesConverter _source_relative_time_converter; @@ -419,6 +422,7 @@ private: boost::shared_ptr<ARDOUR::MidiModel> _model; Events _events; + CopyDragEvents _copy_drag_events; PatchChanges _patch_changes; SysExes _sys_exes; Note** _active_notes; |