Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.6KB

  1. /*
  2. * DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn
  3. * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU Lesser General Public License for more details.
  13. *
  14. * For a full copy of the license see the LICENSE file.
  15. */
  16. #ifndef DISTRHO_UI_3BANDEQ_HPP_INCLUDED
  17. #define DISTRHO_UI_3BANDEQ_HPP_INCLUDED
  18. #include "DistrhoUI.hpp"
  19. #include "ImageAboutWindow.hpp"
  20. #include "ImageButton.hpp"
  21. #include "ImageKnob.hpp"
  22. #include "ImageSlider.hpp"
  23. #include "DistrhoArtwork3BandEQ.hpp"
  24. using DGL::Image;
  25. using DGL::ImageAboutWindow;
  26. using DGL::ImageButton;
  27. using DGL::ImageKnob;
  28. using DGL::ImageSlider;
  29. START_NAMESPACE_DISTRHO
  30. // -----------------------------------------------------------------------
  31. class DistrhoUI3BandEQ : public UI,
  32. public ImageButton::Callback,
  33. public ImageKnob::Callback,
  34. public ImageSlider::Callback
  35. {
  36. public:
  37. DistrhoUI3BandEQ();
  38. protected:
  39. // -------------------------------------------------------------------
  40. // DSP Callbacks
  41. void d_parameterChanged(uint32_t index, float value) override;
  42. void d_programChanged(uint32_t index) override;
  43. // -------------------------------------------------------------------
  44. // Widget Callbacks
  45. void imageButtonClicked(ImageButton* button, int) override;
  46. void imageKnobDragStarted(ImageKnob* knob) override;
  47. void imageKnobDragFinished(ImageKnob* knob) override;
  48. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  49. void imageSliderDragStarted(ImageSlider* slider) override;
  50. void imageSliderDragFinished(ImageSlider* slider) override;
  51. void imageSliderValueChanged(ImageSlider* slider, float value) override;
  52. void onDisplay() override;
  53. private:
  54. Image fImgBackground;
  55. #ifndef DISTRHO_OS_MAC
  56. ImageAboutWindow fAboutWindow;
  57. #endif
  58. ScopedPointer<ImageButton> fButtonAbout;
  59. ScopedPointer<ImageKnob> fKnobLowMid, fKnobMidHigh;
  60. ScopedPointer<ImageSlider> fSliderLow, fSliderMid, fSliderHigh, fSliderMaster;
  61. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUI3BandEQ)
  62. };
  63. // -----------------------------------------------------------------------
  64. END_NAMESPACE_DISTRHO
  65. #endif // DISTRHO_UI_3BANDEQ_HPP_INCLUDED