And for now, there's only a single implementation, though other types of
drags could implement it if needed. There really seems to be no need.
Note that the x-axis threshold is 3x in the case of a copy-drag.
This was implemented to try to fix paste() but was not needed. It might be
useful in the future, or just as an expression of the logic of this. Note that
the BBT_Offset it returns only has the beats field set, which is ... odd. So
this is likely not quite finished.
the BBT times of the newly inserted points during paste() are meaningless until
we recompute them using ::reset_starting_at(). So don't try to compute some
sort of likely value, just use the value from the cut buffer, and call
reset_starting_at() after every point inserted.
A meter (time signature) is required to do the math correctly for any operation that may
cross or reach the next bar boundary, which round_to_*() and round_up_to_*() may do.
This is used to for all selection: route, plugins,
time and region and slot selection.
Only re-pack it with different expand option when
the pianoroll is also visible
Previosuly, all meta data was thrown away. Now we retain it, so that MIDI
regions can ask about their source file's tempo & meter.
Significant engineering rework of how this all works, relying on
recently introduced API and API changes in SMF, SMFSource etc.
Because we want a default argument of false, this involved the usual
inline-non-virtual-method-calls-virtual-with-no-default trick.
Also, do NOT append data to a MidiModel or change the length of an SMFSource
unless we know for sure that added that data to the SMF object.
This changes the assumption that an SMF object only refers to
a single track when being written.
::end_track() is used within begin::write()/end_write() pairs to mark the start
of a new SMF track.
see also 6672db97. in theory re-assigning a sigc::connection
should disconnect the previous connection, but for yet
unknown reasons this does no happen here.
Changes are detected in Pianoroll::canvas_allocate(), which is a proxy for window
geometry. Since Pianoroll doesn't own a window, this is not necessarily ideal, but it
works.
* directly show at correct position
* honor multi-monitor boundaries
* hide on focus-out (e.g. switch desktops with visible
tooltip left it visible)
* remove unused `set_center_alignment` API