summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2018-08-24 14:03:04 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2018-08-24 14:04:18 -0400
commit2d0416a0169e0c2e13f61fd353775826072ba147 (patch)
treecd81ff0b5c0654ddd8138bc637b73dea438004bd /libs/ardour/ardour
parent3136b20847ea2e2e12f707bdc82fa336f85f4801 (diff)
add new methods to ARDOUR::CoreSelection to centralize selecting next/prev stripables
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/selection.h13
1 files changed, 13 insertions, 0 deletions
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<Stripable>, boost::shared_ptr<AutomationControl>);
void remove (boost::shared_ptr<Stripable>, boost::shared_ptr<AutomationControl>);
void set (boost::shared_ptr<Stripable>, boost::shared_ptr<AutomationControl>);
+ 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<Stripable> s, bool with_group, bool routes_only, RouteGroup*);
+
void clear_stripables();
bool selected (boost::shared_ptr<const Stripable>) const;
@@ -107,6 +115,11 @@ class LIBARDOUR_API CoreSelection : public PBD::Stateful {
SelectedStripables _stripables;
void send_selection_change ();
+
+ template<typename IterTypeForward, typename IterTypeCore>
+ void select_adjacent_stripable (bool mixer_order, bool routes_only,
+ IterTypeCore (StripableList::*begin_method)(),
+ IterTypeCore (StripableList::*end_method)());
};
} // namespace ARDOUR