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.

86 lines
2.3KB

  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/ImageAboutWindow.hpp"
  20. #include "dgl/ImageButton.hpp"
  21. #include "dgl/ImageKnob.hpp"
  22. #include "DistrhoArtworkPingPongPan.hpp"
  23. #include "DistrhoPluginPingPongPan.hpp"
  24. START_NAMESPACE_DISTRHO
  25. // -------------------------------------------------
  26. class DistrhoUIPingPongPan : public OpenGLUI,
  27. public ImageButton::Callback,
  28. public ImageKnob::Callback
  29. {
  30. public:
  31. DistrhoUIPingPongPan();
  32. ~DistrhoUIPingPongPan() override;
  33. protected:
  34. // ---------------------------------------------
  35. // Information
  36. unsigned int d_width() const override
  37. {
  38. return DistrhoArtworkPingPongPan::backgroundWidth;
  39. }
  40. unsigned int d_height() const override
  41. {
  42. return DistrhoArtworkPingPongPan::backgroundHeight;
  43. }
  44. // ---------------------------------------------
  45. // DSP Callbacks
  46. void d_parameterChanged(uint32_t index, float value) override;
  47. void d_programChanged(uint32_t index) override;
  48. // ---------------------------------------------
  49. // Widget Callbacks
  50. void imageButtonClicked(ImageButton* button, int) override;
  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. ImageAboutWindow fAboutWindow;
  58. ImageKnob* fKnobFreq;
  59. ImageKnob* fKnobWidth;
  60. ImageButton* fButtonAbout;
  61. };
  62. // -------------------------------------------------
  63. END_NAMESPACE_DISTRHO
  64. #endif // __DISTRHO_UI_PINGPONGPAN_HPP__