drags: add API to set time domain of a drag

This can slightly improve efficiency of temporal computation
during the drag.
This commit is contained in:
Paul Davis 2023-02-06 20:53:27 -07:00
parent e883c39e7a
commit c41de90abd
2 changed files with 8 additions and 1 deletions

View File

@ -279,6 +279,13 @@ Drag::Drag (Editor* e, ArdourCanvas::Item* i, Temporal::TimeDomain td, bool trac
{
}
void
Drag::set_time_domain (Temporal::TimeDomain td)
{
/* must be called early in life of a Drag */
_time_domain = td;
}
timepos_t
Drag::pixel_to_time (double x) const
{

View File

@ -160,7 +160,7 @@ public:
}
Temporal::TimeDomain time_domain() const { return _time_domain; }
void set_time_domain (Temporal::TimeDomain);
void swap_grab (ArdourCanvas::Item *, Gdk::Cursor *, uint32_t);
bool motion_handler (GdkEvent*, bool);