add Editor::canvas_event_time()

See comments in header for more
This commit is contained in:
Paul Davis 2021-01-18 20:13:13 -07:00
parent 0114059c9d
commit 6a44dcbdad
2 changed files with 21 additions and 0 deletions

View file

@ -2121,6 +2121,13 @@ private:
*/
samplepos_t canvas_event_sample (GdkEvent const*, double* px = 0, double* py = 0) const;
/** computes the timeline position for an event whose coordinates
* are in canvas units (pixels, scroll offset included). The time
* domain used by the return value will match ::default_time_domain()
* at the time of calling.
*/
Temporal::timepos_t canvas_event_time (GdkEvent const*, double* px = 0, double* py = 0) const;
/** computes the timeline sample (sample) of an event whose coordinates
* are in window units (pixels, no scroll offset).
*/