13
0

Add API to support Editor sidebar DnD outside of the editor

This commit is contained in:
Robin Gareus 2021-12-14 21:33:24 +01:00
parent 56605c48da
commit 8d137b1514
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 14 additions and 0 deletions

View File

@ -5868,6 +5868,15 @@ Editor::consider_auditioning (boost::shared_ptr<Region> region)
last_audition_region = r;
}
boost::shared_ptr<ARDOUR::Region>
Editor::get_dragged_region_from_sidebar ()
{
boost::shared_ptr<ARDOUR::Region> rv = _regions->get_dragged_region ();
if (!rv) {
rv = _sources->get_dragged_region ();
}
return rv;
}
void
Editor::hide_a_region (boost::shared_ptr<Region> r)

View File

@ -226,6 +226,8 @@ public:
void hide_a_region (boost::shared_ptr<ARDOUR::Region>);
void show_a_region (boost::shared_ptr<ARDOUR::Region>);
boost::shared_ptr<ARDOUR::Region> get_dragged_region_from_sidebar ();
#ifdef USE_RUBBERBAND
std::vector<std::string> rb_opt_strings;
int rb_current_opt;

View File

@ -203,6 +203,9 @@ public:
*/
virtual void consider_auditioning (boost::shared_ptr<ARDOUR::Region> r) = 0;
/* Editor::_regions DnD */
virtual boost::shared_ptr<ARDOUR::Region> get_dragged_region_from_sidebar () = 0;
/* import dialogs -> ardour-ui ?! */
virtual void external_audio_dialog () = 0;
virtual void session_import_dialog () = 0;