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.

91 lines
2.5KB

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