| 476 | } |
| 477 | |
| 478 | bool GetInfoCommand::SendTracks(const CommandContext & context) |
| 479 | { |
| 480 | auto &tracks = TrackList::Get( context.project ); |
| 481 | context.StartArray(); |
| 482 | for (auto trk : tracks) |
| 483 | { |
| 484 | auto &trackFocus = TrackFocus::Get( context.project ); |
| 485 | Track * fTrack = trackFocus.Get(); |
| 486 | |
| 487 | context.StartStruct(); |
| 488 | context.AddItem( trk->GetName(), "name" ); |
| 489 | context.AddBool( (trk == fTrack), "focused"); |
| 490 | context.AddBool( trk->GetSelected(), "selected" ); |
| 491 | //JKC: Possibly add later... |
| 492 | //context.AddItem(ChannelView::GetChannelGroupHeight(*trk), "height"); |
| 493 | trk->TypeSwitch( [&] (const WaveTrack &t) { |
| 494 | float vzmin, vzmax; |
| 495 | WaveformScale::Get(t).GetDisplayBounds(vzmin, vzmax); |
| 496 | context.AddItem( "wave", "kind" ); |
| 497 | context.AddItem( t.GetStartTime(), "start" ); |
| 498 | context.AddItem( t.GetEndTime(), "end" ); |
| 499 | context.AddItem( t.GetPan() , "pan"); |
| 500 | context.AddItem( t.GetVolume() , "volume"); |
| 501 | context.AddItem( t.NChannels(), "channels"); |
| 502 | context.AddBool( t.GetSolo(), "solo" ); |
| 503 | context.AddBool( t.GetMute(), "mute"); |
| 504 | context.AddItem( vzmin, "VZoomMin"); |
| 505 | context.AddItem( vzmax, "VZoomMax"); |
| 506 | }, |
| 507 | #if defined(USE_MIDI) |
| 508 | [&](const NoteTrack &) { |
| 509 | context.AddItem( "note", "kind" ); |
| 510 | }, |
| 511 | #endif |
| 512 | [&](const LabelTrack &) { |
| 513 | context.AddItem( "label", "kind" ); |
| 514 | }, |
| 515 | [&](const TimeTrack &) { |
| 516 | context.AddItem( "time", "kind" ); |
| 517 | } |
| 518 | ); |
| 519 | context.EndStruct(); |
| 520 | } |
| 521 | context.EndArray(); |
| 522 | return true; |
| 523 | } |
| 524 | |
| 525 | bool GetInfoCommand::SendClips(const CommandContext &context) |
| 526 | { |
nothing calls this directly
no test coverage detected