Пример #1
0
void EffectPanel::OnSliderUpdate( wxScrollEvent& event ) {
  int val = event.GetSelection();
  switch (event.GetId()) {
    case DEPTH_SLIDER:
      if (depthChange != 0) {
        depthChange->undo();
        delete depthChange;
        depthChange = 0;
      }
      depthChange = new ChangeEffectDepth(effect->inst, effect->timeline, effect->type, val);
      break;
  }
  SharedManagerBase::share();
}
Пример #2
0
void TimelinePanel::OnSliderUpdate( wxScrollEvent &event ) {
  //int val = m_slider->GetValue();
  int val = event.GetSelection();
  switch (event.GetId()) {
    case SPEED_SLIDER:
      printf("SPEED_SLIDER\n");
      if (speedChange != 0) {
        speedChange->undo();
        delete speedChange;
        speedChange = 0;
      }
      speedChange = new ChangeTimelineSpeed(inst, timeline, val);
      break;
  }
  SharedManagerBase::share();
  printf("slider updated, index: %d\n", val);
}
void OscillatorPanel::OnSliderMove(wxScrollEvent& event) {
  int val = event.GetSelection();
  HarmonicSet* set = &inst->oscillator.harmonicSet[selectedVoice];
  if (sliderChange == 0) {
    switch (event.GetId()) {
      case BLUR_SLIDER:
        sliderChange = new ChangeOscillatorSlider(inst, &set->blur, val);
        break;
      case STRETCH_SLIDER:
        sliderChange = new ChangeOscillatorSlider(inst, &set->stretch, val);
        break;
    }
  } else {
    sliderChange->update(val);
  }
  SharedManagerBase::share();
}