1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//! Parameter grouping system for hierarchical organization.
//!
//! This module provides types for organizing parameters into groups (folders)
//! in the DAW's parameter list. Groups form a tree structure that DAWs display
//! hierarchically.
//!
//! # Terminology
//!
//! - **Group**: A named container for parameters (VST3 calls these "Units", AU calls them "Groups")
//! - **Root Group**: The implicit top-level group (ID 0) containing ungrouped parameters
//! - **Nested Group**: A group inside another group
//!
//! # Example
//!
//! ```ignore
//! // Parameter group hierarchy:
//! // Root (id=0)
//! // ├── Filter (id=1)
//! // │ ├── cutoff
//! // │ └── resonance
//! // └── Envelope (id=2)
//! // ├── attack
//! // └── release
//! ```
/// Parameter group ID type.
///
/// Groups are used to organize parameters into hierarchical groups in the DAW UI.
/// Each group has a unique ID and can have a parent group.
pub type GroupId = i32;
/// Root group ID constant (parameters with no group).
///
/// The root group (ID 0) always exists and contains ungrouped parameters.
pub const ROOT_GROUP_ID: GroupId = 0;
/// Information about a parameter group.
///
/// Groups form a tree structure via parent_id references:
/// - Root group (id=0, parent=0) always exists implicitly
/// - Top-level groups have parent_id=0
/// - Nested groups reference their parent's group_id
/// Trait for querying parameter group hierarchy.
///
/// Implemented automatically by `#[derive(Parameters)]` when nested groups are present.
/// Provides information about parameter groups for DAW display.
///
/// Group IDs are assigned dynamically at runtime to support deeply nested groups
/// where the same nested struct type can appear in multiple contexts with
/// different parent groups.