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.

96 lines
2.9KB

  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. // Information
  41. uint d_getWidth() const noexcept override
  42. {
  43. return DistrhoArtwork3BandEQ::backgroundWidth;
  44. }
  45. uint d_getHeight() const noexcept override
  46. {
  47. return DistrhoArtwork3BandEQ::backgroundHeight;
  48. }
  49. // -------------------------------------------------------------------
  50. // DSP Callbacks
  51. void d_parameterChanged(uint32_t index, float value) override;
  52. void d_programChanged(uint32_t index) override;
  53. // -------------------------------------------------------------------
  54. // Widget Callbacks
  55. void imageButtonClicked(ImageButton* button, int) override;
  56. void imageKnobDragStarted(ImageKnob* knob) override;
  57. void imageKnobDragFinished(ImageKnob* knob) override;
  58. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  59. void imageSliderDragStarted(ImageSlider* slider) override;
  60. void imageSliderDragFinished(ImageSlider* slider) override;
  61. void imageSliderValueChanged(ImageSlider* slider, float value) override;
  62. void onDisplay() override;
  63. private:
  64. Image fImgBackground;
  65. ImageAboutWindow fAboutWindow;
  66. ScopedPointer<ImageButton> fButtonAbout;
  67. ScopedPointer<ImageKnob> fKnobLowMid, fKnobMidHigh;
  68. ScopedPointer<ImageSlider> fSliderLow, fSliderMid, fSliderHigh, fSliderMaster;
  69. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUI3BandEQ)
  70. };
  71. // -----------------------------------------------------------------------
  72. END_NAMESPACE_DISTRHO
  73. #endif // DISTRHO_UI_3BANDEQ_HPP_INCLUDED