DISTRHO MVerb
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.

83 lines
2.3KB

  1. /*
  2. * DISTRHO MVerb, a DPF'ied MVerb.
  3. * Copyright (c) 2010 Martin Eastwood
  4. * Copyright (C) 2014 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 "ImageKnob.hpp"
  22. #include "DistrhoArtworkMVerb.hpp"
  23. #include <vector>
  24. using DGL::Image;
  25. using DGL::ImageKnob;
  26. START_NAMESPACE_DISTRHO
  27. // -----------------------------------------------------------------------
  28. class DistrhoUIMVerb : public UI,
  29. public ImageKnob::Callback
  30. {
  31. public:
  32. DistrhoUIMVerb();
  33. ~DistrhoUIMVerb() override;
  34. protected:
  35. // -------------------------------------------------------------------
  36. // Information
  37. uint d_getWidth() const noexcept override
  38. {
  39. return DistrhoArtworkMVerb::backgroundWidth;
  40. }
  41. uint d_getHeight() const noexcept override
  42. {
  43. return DistrhoArtworkMVerb::backgroundHeight;
  44. }
  45. // -------------------------------------------------------------------
  46. // DSP Callbacks
  47. void d_parameterChanged(uint32_t index, float value) override;
  48. void d_programChanged(uint32_t index) override;
  49. // -------------------------------------------------------------------
  50. // Widget Callbacks
  51. void imageKnobDragStarted(ImageKnob* knob) override;
  52. void imageKnobDragFinished(ImageKnob* knob) override;
  53. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  54. void onDisplay() override;
  55. private:
  56. Image fImgBackground;
  57. std::vector<ImageKnob*> fKnobs;
  58. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUIMVerb)
  59. };
  60. // -----------------------------------------------------------------------
  61. END_NAMESPACE_DISTRHO
  62. #endif // DISTRHO_UI_MVERB_HPP_INCLUDED