diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2019-05-31 13:35:40 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2019-08-01 12:11:31 -0500 |
commit | ed325b52b2e4d81e090069a3c952f8216dacd5b5 (patch) | |
tree | 07fa86e8d66198e8bb8072d555ffcb18d867e46b | |
parent | 52611e2374471fb187aa040f9c91986d41facd8a (diff) |
(Source List) Add forall_regions function, used by Region and Source lists.
-rw-r--r-- | libs/ardour/ardour/region_factory.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h index e0041a1072..e7c56e0b50 100644 --- a/libs/ardour/ardour/region_factory.h +++ b/libs/ardour/ardour/region_factory.h @@ -95,6 +95,15 @@ public: static void delete_all_regions (); static const RegionMap& regions() { return region_map; } static uint32_t nregions (); + + static void foreach_region (boost::function<void( boost::shared_ptr<Region> )> f) { + Glib::Threads::Mutex::Lock ls (region_map_lock); + for (RegionMap::const_iterator i = region_map.begin(); i != region_map.end(); ++i) { + f ( (*i).second ); + } + } + + static int region_name (std::string &, std::string, bool new_level = false); static std::string new_region_name (std::string); |