コード例 #1
0
ファイル: Wahwah.cpp プロジェクト: ruthmagnus/audacity
void WahwahDialog::OnFreqOffSlider(wxCommandEvent & event)
{
   wxString str;
   long freqoff = GetFreqOffSlider()->GetValue();
   str.Printf("%d", (int) freqoff);
   GetFreqOffText()->SetValue(str);
}
コード例 #2
0
ファイル: Wahwah.cpp プロジェクト: JordanGraves/TabMagic
void WahwahDialog::OnFreqOffText(wxCommandEvent & WXUNUSED(event))
{
   wxTextCtrl *c = GetFreqOffText();
   if (c) {
      double freqoff;
      c->GetValue().ToDouble(&freqoff);
      freqoff = TrapDouble(freqoff, FREQOFF_MIN, FREQOFF_MAX);

      wxSlider *slider = GetFreqOffSlider();
      if (slider)
         slider->SetValue((int)freqoff);
   }
}
コード例 #3
0
ファイル: Wahwah.cpp プロジェクト: ruthmagnus/audacity
bool WahwahDialog::TransferDataToWindow()
{
   wxSlider *slider;

   slider = GetFreqSlider();
   if (slider)
      slider->SetValue((int)(freq * 10));

   slider = GetFreqOffSlider();
   if (slider)
      slider->SetValue((int)freqoff);

   slider = GetDepthSlider();
   if (slider)
      slider->SetValue((int)depth);

   slider = GetPhaseSlider();
   if (slider)
      slider->SetValue((int)startphase);

   slider = GetResonanceSlider();
   if (slider)
      slider->SetValue((int)(res * 10));

   wxTextCtrl *text = GetFreqText();
   if (text) {
      wxString str;
      str.Printf("%.1f", freq);
      text->SetValue(str);
   }

   text = GetFreqOffText();
   if (text) {
      wxString str;
      str.Printf("%d", (int) freqoff);
      text->SetValue(str);
   }

   text = GetPhaseText();
   if (text) {
      wxString str;
      str.Printf("%d", (int) startphase);
      text->SetValue(str);
   }

   text = GetDepthText();
   if (text) {
      wxString str;
      str.Printf("%d", (int) depth);
      text->SetValue(str);
   }

   text = GetResonanceText();
   if (text) {
      wxString str;
      str.Printf("%.1f", res);
      text->SetValue(str);
   }

   return TRUE;
}