diff --git a/crates/engine/src/cmd/track.rs b/crates/engine/src/cmd/track.rs index aa252d7f..e07a29ac 100644 --- a/crates/engine/src/cmd/track.rs +++ b/crates/engine/src/cmd/track.rs @@ -7,6 +7,7 @@ use crate::{Engine, Result, cmd}; use serde_json::{Value, json}; use soundcraft_model::{ChannelFormat, ClipContent, Group, GroupId, Playlist, Route, Session, Track, TrackHeight, TrackId, TrackKind}; +/// Returns the track command specifications exposed to UI and automation clients. pub fn specs() -> Vec { vec![ cmd!( @@ -231,6 +232,7 @@ pub fn specs() -> Vec { ] } +/// Creates either one legacy row or several validated rows as one command. fn new_track(e: &mut Engine, p: &Value) -> Result { let ids = if let Some(rows) = p.get("rows") { let rows = rows.as_array().ok_or_else(|| bad("track.new", "`rows` must be an array"))?; diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index e5cf3896..e7d6216f 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -40,6 +40,7 @@ pub struct Dialogs { } impl Dialogs { + /// Returns the stable UI identifier of the currently open dialog. pub fn open_name(&self) -> Option<&'static str> { self.open.as_ref().map(|d| match d { Dialog::NewTracks(_) => "new_tracks", diff --git a/crates/ui-egui/src/new_tracks.rs b/crates/ui-egui/src/new_tracks.rs index 3a402882..d3f6c198 100644 --- a/crates/ui-egui/src/new_tracks.rs +++ b/crates/ui-egui/src/new_tracks.rs @@ -9,6 +9,7 @@ const NAME_WIDTH: f32 = 260.0; const ROW_BUTTON_WIDTH: f32 = 22.0; #[derive(Debug, Clone)] +/// One independently configured row in the New Tracks dialog. pub struct NewTrackRow { key: u64, pub count: u32, @@ -40,6 +41,7 @@ impl NewTrackRow { } #[derive(Debug, Clone)] +/// State for the multi-row New Tracks dialog. pub struct NewTracks { pub rows: Vec, active: usize,