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#include "utils/format.h"
8
9#define REGION_LINK_GROUP_MANAGER (PROJECT->region_link_group_manager_)
10
11namespace zrythm::structure::arrangement
12{
13
18{
19public:
23 int add_group ();
24
25 RegionLinkGroup * get_group (int group_id);
26
30 void remove_group (int group_id);
31
32private:
33 static constexpr auto kGroupsKey = "groups"sv;
34 friend void to_json (nlohmann::json &j, const RegionLinkGroupManager &mgr)
35 {
36 j[kGroupsKey] = mgr.groups_;
37 }
38 friend void from_json (const nlohmann::json &j, RegionLinkGroupManager &mgr);
39
40public:
42 std::vector<RegionLinkGroup> groups_;
43
44 BOOST_DESCRIBE_CLASS (RegionLinkGroupManager, (), (groups_), (), ())
45};
46
47} // 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.