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.

DistrhoUIMVerb.hpp 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * DISTRHO MVerb, a DPF'ied MVerb.
  3. * Copyright (c) 2010 Martin Eastwood
  4. * Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 3 of
  9. * the License, or any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * For a full copy of the GNU General Public License see the LICENSE file.
  17. */
  18. #ifndef DISTRHO_UI_MVERB_HPP_INCLUDED
  19. #define DISTRHO_UI_MVERB_HPP_INCLUDED
  20. #include "DistrhoUI.hpp"
  21. #include "NanoVG.hpp"
  22. #include "ImageWidgets.hpp"
  23. #include "DistrhoArtworkMVerb.hpp"
  24. #include <vector>
  25. using DGL::Image;
  26. using DGL::ImageKnob;
  27. using DGL::NanoVG;
  28. START_NAMESPACE_DISTRHO
  29. // -----------------------------------------------------------------------
  30. class DistrhoUIMVerb : public UI,
  31. public ImageKnob::Callback
  32. {
  33. public:
  34. DistrhoUIMVerb();
  35. ~DistrhoUIMVerb() override;
  36. protected:
  37. // -------------------------------------------------------------------
  38. // DSP Callbacks
  39. void parameterChanged(uint32_t index, float value) override;
  40. void programLoaded(uint32_t index) override;
  41. // -------------------------------------------------------------------
  42. // Widget Callbacks
  43. void imageKnobDragStarted(ImageKnob* knob) override;
  44. void imageKnobDragFinished(ImageKnob* knob) override;
  45. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  46. void onDisplay() override;
  47. private:
  48. Image fImgBackground;
  49. NanoVG fNanoText;
  50. std::vector<ImageKnob*> fKnobs;
  51. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUIMVerb)
  52. };
  53. // -----------------------------------------------------------------------
  54. END_NAMESPACE_DISTRHO
  55. #endif // DISTRHO_UI_MVERB_HPP_INCLUDED