They already worked in the PianorollMidiView, because that hands off enter/leave events
to the parent EditingContext (a Pianoroll). But MidiRegionView and Editor were
not interacting in the same way, so leaving a note object would not cause the Editor
to do the right thing with the cursor.
There's an assumption that slots with regions cannot be recorded into,
so adding a region to an empty slot makes it impossible to record to that
slot.
Create the region at the appropriate point during a NoteCreateDrag.
This may also be needed for some automation drawing drag operations.
For some reason, we allow users to trim notes on the timeline when in
draw mode. Not sure why. We don't allow this in pianorolls, so make
sure the cursors don't suggest otherwise
... and also interacts with EditingContext::reset_zoom() correctly due to the
scaling factor that, for the Pianoroll, tries to show a bit more time than
is represented by the data
they now use a lambda for the functor, and the lambda calls
current_editing_context() to pick which EditingContext will
be affected.
this design replaces one where each EditingContext had its
own set of mouse mode actions defined, using its own name
as the action group
derived classes (Editor and Pianoroll) provide ::cut_copy() to wrap the
context-specific logic, and then both defer to MidiView for MIDI-specific
operations.
Note that this also changes several action names in ardour.keys.in
in particular, rename MidiView::canvas_group_event() to
avoid confusion with TimeAxisViewItem::canvas_group_event()
since a MidiRegionView inherits from both these classes.
Regular .h files *should* be self-contained and independent of previous
includes and guarded to only include once. Make it clear which files
that *doesn't* apply for at all.
Also move code for adding automation line control points into automation line, rather
than in AutomationTimeAxisView (some work still required to finalize this)
We cannot switch on a leave event from a widget, because the undo/redo menu items must remain
labelled until we are actually in a new editing context. So switch when we switch tabs
or when we edit the (MIDI) cue editor