From 2d0416a0169e0c2e13f61fd353775826072ba147 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 24 Aug 2018 14:03:04 -0400 Subject: add new methods to ARDOUR::CoreSelection to centralize selecting next/prev stripables --- libs/ardour/ardour/selection.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libs/ardour/ardour') diff --git a/libs/ardour/ardour/selection.h b/libs/ardour/ardour/selection.h index 8da0692761..0c9493139a 100644 --- a/libs/ardour/ardour/selection.h +++ b/libs/ardour/ardour/selection.h @@ -30,10 +30,12 @@ #include "pbd/i18n.h" #include "ardour/presentation_info.h" +#include "ardour/types.h" namespace ARDOUR { class AutomationControl; +class RouteGroup; class Session; class Stripable; class VCAManager; @@ -48,6 +50,12 @@ class LIBARDOUR_API CoreSelection : public PBD::Stateful { void add (boost::shared_ptr, boost::shared_ptr); void remove (boost::shared_ptr, boost::shared_ptr); void set (boost::shared_ptr, boost::shared_ptr); + void set (StripableList&); + + void select_next_stripable (bool mixer_order, bool routes_only); + void select_prev_stripable (bool mixer_order, bool routes_only); + bool select_stripable_and_maybe_group (boost::shared_ptr s, bool with_group, bool routes_only, RouteGroup*); + void clear_stripables(); bool selected (boost::shared_ptr) const; @@ -107,6 +115,11 @@ class LIBARDOUR_API CoreSelection : public PBD::Stateful { SelectedStripables _stripables; void send_selection_change (); + + template + void select_adjacent_stripable (bool mixer_order, bool routes_only, + IterTypeCore (StripableList::*begin_method)(), + IterTypeCore (StripableList::*end_method)()); }; } // namespace ARDOUR -- cgit v1.2.3