mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-09 16:41:14 +02:00
Add 'vzoom' and 'kind' to GetInfo Tracks
This commit is contained in:
parent
6c71e02d28
commit
42e0cd7f25
@ -251,7 +251,6 @@ bool GetInfoCommand::SendTracks(const CommandContext & context)
|
|||||||
context.StartArray();
|
context.StartArray();
|
||||||
for (auto trk : projTracks->Leaders())
|
for (auto trk : projTracks->Leaders())
|
||||||
{
|
{
|
||||||
|
|
||||||
TrackPanel *panel = context.GetProject()->GetTrackPanel();
|
TrackPanel *panel = context.GetProject()->GetTrackPanel();
|
||||||
Track * fTrack = panel->GetFocusedTrack();
|
Track * fTrack = panel->GetFocusedTrack();
|
||||||
|
|
||||||
@ -259,10 +258,12 @@ bool GetInfoCommand::SendTracks(const CommandContext & context)
|
|||||||
context.AddItem( trk->GetName(), "name" );
|
context.AddItem( trk->GetName(), "name" );
|
||||||
context.AddBool( (trk == fTrack), "focused");
|
context.AddBool( (trk == fTrack), "focused");
|
||||||
context.AddBool( trk->GetSelected(), "selected" );
|
context.AddBool( trk->GetSelected(), "selected" );
|
||||||
//JKC: Possibly add these two later...
|
//JKC: Possibly add later...
|
||||||
//context.AddItem( trk->GetKind(), "kind" );
|
|
||||||
//context.AddItem( trk->GetHeight(), "height" );
|
//context.AddItem( trk->GetHeight(), "height" );
|
||||||
trk->TypeSwitch( [&] (const WaveTrack* t ) {
|
trk->TypeSwitch( [&] (const WaveTrack* t ) {
|
||||||
|
float vzmin, vzmax;
|
||||||
|
t->GetDisplayBounds(&vzmin, &vzmax);
|
||||||
|
context.AddItem( "wave", "kind" );
|
||||||
context.AddItem( t->GetStartTime(), "start" );
|
context.AddItem( t->GetStartTime(), "start" );
|
||||||
context.AddItem( t->GetEndTime(), "end" );
|
context.AddItem( t->GetEndTime(), "end" );
|
||||||
context.AddItem( t->GetPan() , "pan");
|
context.AddItem( t->GetPan() , "pan");
|
||||||
@ -270,7 +271,21 @@ bool GetInfoCommand::SendTracks(const CommandContext & context)
|
|||||||
context.AddItem( TrackList::Channels(t).size(), "channels");
|
context.AddItem( TrackList::Channels(t).size(), "channels");
|
||||||
context.AddBool( t->GetSolo(), "solo" );
|
context.AddBool( t->GetSolo(), "solo" );
|
||||||
context.AddBool( t->GetMute(), "mute");
|
context.AddBool( t->GetMute(), "mute");
|
||||||
} );
|
context.AddItem( vzmin, "VZoomMin");
|
||||||
|
context.AddItem( vzmax, "VZoomMax");
|
||||||
|
},
|
||||||
|
#if defined(USE_MIDI)
|
||||||
|
[&](const NoteTrack *) {
|
||||||
|
context.AddItem( "note", "kind" );
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
[&](const LabelTrack *) {
|
||||||
|
context.AddItem( "label", "kind" );
|
||||||
|
},
|
||||||
|
[&](const TimeTrack *) {
|
||||||
|
context.AddItem( "time", "kind" );
|
||||||
|
}
|
||||||
|
);
|
||||||
context.EndStruct();
|
context.EndStruct();
|
||||||
}
|
}
|
||||||
context.EndArray();
|
context.EndArray();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user