Update appearance to match the state of the track
| 451 | |
| 452 | // Update appearance to match the state of the track |
| 453 | void MixerTrackCluster::UpdateForStateChange() |
| 454 | { |
| 455 | const wxString newName = mTrack->GetName(); |
| 456 | if (newName != GetName()) { |
| 457 | SetName( Verbatim( newName ) ); |
| 458 | mStaticText_TrackName->SetLabel(newName); |
| 459 | mStaticText_TrackName->SetName(newName); |
| 460 | #if wxUSE_TOOLTIPS |
| 461 | mStaticText_TrackName->SetToolTip(newName); |
| 462 | #endif |
| 463 | mBitmapButton_MusicalInstrument->SetBitmapLabel( |
| 464 | *(mMixerBoard->GetMusicalInstrumentBitmap(mTrack.get()))); |
| 465 | } |
| 466 | |
| 467 | mToggleButton_Mute->SetAlternateIdx(mTrack->GetSolo() ? 1 : 0); |
| 468 | if (mTrack->GetMute()) |
| 469 | mToggleButton_Mute->PushDown(); |
| 470 | else |
| 471 | mToggleButton_Mute->PopUp(); |
| 472 | |
| 473 | bool bIsSolo = mTrack->GetSolo(); |
| 474 | if (bIsSolo) |
| 475 | mToggleButton_Solo->PushDown(); |
| 476 | else |
| 477 | mToggleButton_Solo->PopUp(); |
| 478 | mToggleButton_Mute->SetAlternateIdx(bIsSolo ? 1 : 0); |
| 479 | |
| 480 | if (!GetWave()) |
| 481 | mSlider_Pan->Hide(); |
| 482 | else |
| 483 | mSlider_Pan->Set(GetWave()->GetPan()); |
| 484 | |
| 485 | if (!GetWave()) |
| 486 | mSlider_Volume->Hide(); |
| 487 | else |
| 488 | mSlider_Volume->Set(GetWave()->GetVolume()); |
| 489 | |
| 490 | if (!GetNote()) |
| 491 | mSlider_Velocity->Hide(); |
| 492 | else |
| 493 | mSlider_Velocity->Set(GetNote()->GetVelocity()); |
| 494 | } |
| 495 | |
| 496 | namespace { |
| 497 | size_t GetNumSamplesInView(const ChannelSampleView& view) |
no test coverage detected