src/MixerBoard.cpp
// Update appearance to match the state of the track
Update appearance to match the state of the track
Update appearance to match the state of the track
void MixerTrackCluster::UpdateForStateChange()
{
   const wxString newName = mTrack->GetName();
   if (newName != GetName()) {
      SetName( Verbatim( newName ) );
      mStaticText_TrackName->SetLabel(newName);
      mStaticText_TrackName->SetName(newName);
#if wxUSE_TOOLTIPS
         mStaticText_TrackName->SetToolTip(newName);
#endif
      mBitmapButton_MusicalInstrument->SetBitmapLabel(
         *(mMixerBoard->GetMusicalInstrumentBitmap(mTrack.get())));
   }
   mToggleButton_Mute->SetAlternateIdx(mTrack->GetSolo() ? 1 : 0);
   if (mTrack->GetMute())
      mToggleButton_Mute->PushDown();
   else
      mToggleButton_Mute->PopUp();
   bool bIsSolo = mTrack->GetSolo();
   if (bIsSolo)
      mToggleButton_Solo->PushDown();
   else
      mToggleButton_Solo->PopUp();
   mToggleButton_Mute->SetAlternateIdx(bIsSolo ? 1 : 0);
   if (!GetWave())
      mSlider_Pan->Hide();
   else
      mSlider_Pan->Set(GetWave()->GetPan());
   if (!GetWave())
      mSlider_Gain->Hide();
   else
      mSlider_Gain->Set(GetWave()->GetGain());
#ifdef EXPERIMENTAL_MIDI_OUT
   if (!GetNote())
      mSlider_Velocity->Hide();
   else
      mSlider_Velocity->Set(GetNote()->GetVelocity());
#endif
}
void MixerTrackCluster :: UpdateForStateChange ( ) { const wxString newName = mTrack -> GetName ( ) ; if ( newName != GetName ( ) ) { SetName ( Verbatim ( newName ) ) ; mStaticText_TrackName -> SetLabel ( newName ) ; mStaticText_TrackName -> SetName ( newName ) ; #if wxUSE_TOOLTIPS mStaticText_TrackName -> SetToolTip ( newName ) ; #endif mBitmapButton_MusicalInstrument -> SetBitmapLabel ( * ( mMixerBoard -> GetMusicalInstrumentBitmap ( mTrack . get ( ) ) ) ) ; } mToggleButton_Mute -> SetAlternateIdx ( mTrack -> GetSolo ( ) ? 1 : 0 ) ; if ( mTrack -> GetMute ( ) ) mToggleButton_Mute -> PushDown ( ) ; else mToggleButton_Mute -> PopUp ( ) ; bool bIsSolo = mTrack -> GetSolo ( ) ; if ( bIsSolo ) mToggleButton_Solo -> PushDown ( ) ; else mToggleButton_Solo -> PopUp ( ) ; mToggleButton_Mute -> SetAlternateIdx ( bIsSolo ? 1 : 0 ) ; if ( ! GetWave ( ) ) mSlider_Pan -> Hide ( ) ; else mSlider_Pan -> Set ( GetWave ( ) -> GetPan ( ) ) ; if ( ! GetWave ( ) ) mSlider_Gain -> Hide ( ) ; else mSlider_Gain -> Set ( GetWave ( ) -> GetGain ( ) ) ; #ifdef EXPERIMENTAL_MIDI_OUT if ( ! GetNote ( ) ) mSlider_Velocity -> Hide ( ) ; else mSlider_Velocity -> Set ( GetNote ( ) -> GetVelocity ( ) ) ; #endif }
Update appearance to match the state of the track
Update appearance to match the state of the track