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.

83 lines
2.2KB

  1. /*
  2. * DISTRHO PingPongPan Plugin, based on PingPongPan 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_PINGPONGPAN_HPP__
  17. #define __DISTRHO_UI_PINGPONGPAN_HPP__
  18. #include "DistrhoUIOpenGL.hpp"
  19. #include "dgl/ImageButton.hpp"
  20. #include "dgl/ImageKnob.hpp"
  21. #include "DistrhoArtworkPingPongPan.hpp"
  22. #include "DistrhoPluginPingPongPan.hpp"
  23. START_NAMESPACE_DISTRHO
  24. // -------------------------------------------------
  25. class DistrhoUIPingPongPan : public OpenGLUI,
  26. public ImageButton::Callback,
  27. public ImageKnob::Callback
  28. {
  29. public:
  30. DistrhoUIPingPongPan();
  31. ~DistrhoUIPingPongPan();
  32. protected:
  33. // ---------------------------------------------
  34. // Information
  35. unsigned int d_width() const
  36. {
  37. return DistrhoArtworkPingPongPan::backgroundWidth;
  38. }
  39. unsigned int d_height() const
  40. {
  41. return DistrhoArtworkPingPongPan::backgroundHeight;
  42. }
  43. // ---------------------------------------------
  44. // DSP Callbacks
  45. void d_parameterChanged(uint32_t index, float value);
  46. void d_programChanged(uint32_t index);
  47. // ---------------------------------------------
  48. // Widget Callbacks
  49. void imageButtonClicked(ImageButton* button, int);
  50. void imageKnobDragStarted(ImageKnob* knob);
  51. void imageKnobDragFinished(ImageKnob* knob);
  52. void imageKnobValueChanged(ImageKnob* knob, float value);
  53. void onDisplay();
  54. private:
  55. Image fImgBackground;
  56. ImageKnob* fKnobFreq;
  57. ImageKnob* fKnobWidth;
  58. ImageButton* fButtonAbout;
  59. };
  60. // -------------------------------------------------
  61. END_NAMESPACE_DISTRHO
  62. #endif // __DISTRHO_UI_PINGPONGPAN_HPP__