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.

94 lines
2.7KB

  1. /*
  2. * DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn
  3. * Copyright (C) 2012-2013 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 LGPL.txt file
  15. */
  16. #ifndef __DISTRHO_UI_3BANDEQ_HPP__
  17. #define __DISTRHO_UI_3BANDEQ_HPP__
  18. #include "DistrhoUIOpenGL.hpp"
  19. #include "dgl/ImageAboutWindow.hpp"
  20. #include "dgl/ImageButton.hpp"
  21. #include "dgl/ImageKnob.hpp"
  22. #include "dgl/ImageSlider.hpp"
  23. #include "DistrhoArtwork3BandEQ.hpp"
  24. #include "DistrhoPlugin3BandEQ.hpp"
  25. START_NAMESPACE_DISTRHO
  26. // -------------------------------------------------
  27. class DistrhoUI3BandEQ : public OpenGLUI,
  28. public ImageButton::Callback,
  29. public ImageKnob::Callback,
  30. public ImageSlider::Callback
  31. {
  32. public:
  33. DistrhoUI3BandEQ();
  34. ~DistrhoUI3BandEQ() override;
  35. protected:
  36. // ---------------------------------------------
  37. // Information
  38. unsigned int d_width() const override
  39. {
  40. return DistrhoArtwork3BandEQ::backgroundWidth;
  41. }
  42. unsigned int d_height() const override
  43. {
  44. return DistrhoArtwork3BandEQ::backgroundHeight;
  45. }
  46. // ---------------------------------------------
  47. // DSP Callbacks
  48. void d_parameterChanged(uint32_t index, float value) override;
  49. void d_programChanged(uint32_t index) override;
  50. // ---------------------------------------------
  51. // Widget Callbacks
  52. void imageButtonClicked(ImageButton* button, int) override;
  53. void imageKnobDragStarted(ImageKnob* knob) override;
  54. void imageKnobDragFinished(ImageKnob* knob) override;
  55. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  56. void imageSliderDragStarted(ImageSlider* slider) override;
  57. void imageSliderDragFinished(ImageSlider* slider) override;
  58. void imageSliderValueChanged(ImageSlider* slider, float value) override;
  59. void onDisplay() override;
  60. private:
  61. Image fImgBackground;
  62. ImageAboutWindow fAboutWindow;
  63. ImageSlider* fSliderLow;
  64. ImageSlider* fSliderMid;
  65. ImageSlider* fSliderHigh;
  66. ImageSlider* fSliderMaster;
  67. ImageKnob* fKnobLowMid;
  68. ImageKnob* fKnobMidHigh;
  69. ImageButton* fButtonAbout;
  70. };
  71. // -------------------------------------------------
  72. END_NAMESPACE_DISTRHO
  73. #endif // __DISTRHO_UI_3BANDEQ_HPP__