Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
region_link_group_manager.h
1// SPDX-FileCopyrightText: © 2020-2021, 2024-2025 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include "structure/arrangement/region_link_group.h"
7
8#define REGION_LINK_GROUP_MANAGER (PROJECT->region_link_group_manager_)
9
10namespace zrythm::structure::arrangement
11{
12
17{
18public:
22 int add_group ();
23
24 RegionLinkGroup * get_group (int group_id);
25
29 void remove_group (int group_id);
30
31private:
32 static constexpr auto kGroupsKey = "groups"sv;
33 friend void to_json (nlohmann::json &j, const RegionLinkGroupManager &mgr)
34 {
35 j[kGroupsKey] = mgr.groups_;
36 }
37 friend void from_json (const nlohmann::json &j, RegionLinkGroupManager &mgr);
38
39public:
41 std::vector<RegionLinkGroup> groups_;
42
43 BOOST_DESCRIBE_CLASS (RegionLinkGroupManager, (), (groups_), (), ())
44};
45
46} // namespace zrythm::structure::arrangement
void remove_group(int group_id)
Removes the group.
int add_group()
Adds a group and returns its index.
std::vector< RegionLinkGroup > groups_
Region link groups.