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.

90 lines
2.6KB

  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 doc/LGPL.txt file.
  15. */
  16. #ifndef DISTRHO_UI_PINGPONGPAN_HPP_INCLUDED
  17. #define DISTRHO_UI_PINGPONGPAN_HPP_INCLUDED
  18. #include "DistrhoUI.hpp"
  19. #include "ImageAboutWindow.hpp"
  20. #include "ImageButton.hpp"
  21. #include "ImageKnob.hpp"
  22. #include "DistrhoArtworkPingPongPan.hpp"
  23. #include "DistrhoPluginPingPongPan.hpp"
  24. using DGL::Image;
  25. using DGL::ImageAboutWindow;
  26. using DGL::ImageButton;
  27. using DGL::ImageKnob;
  28. START_NAMESPACE_DISTRHO
  29. // -----------------------------------------------------------------------
  30. class DistrhoUIPingPongPan : public UI,
  31. public ImageButton::Callback,
  32. public ImageKnob::Callback
  33. {
  34. public:
  35. DistrhoUIPingPongPan();
  36. ~DistrhoUIPingPongPan() override;
  37. protected:
  38. // -------------------------------------------------------------------
  39. // Information
  40. unsigned int d_getWidth() const noexcept override
  41. {
  42. return DistrhoArtworkPingPongPan::backgroundWidth;
  43. }
  44. unsigned int d_getHeight() const noexcept override
  45. {
  46. return DistrhoArtworkPingPongPan::backgroundHeight;
  47. }
  48. // -------------------------------------------------------------------
  49. // DSP Callbacks
  50. void d_parameterChanged(uint32_t index, float value) override;
  51. void d_programChanged(uint32_t index) override;
  52. // -------------------------------------------------------------------
  53. // Widget Callbacks
  54. void imageButtonClicked(ImageButton* button, int) override;
  55. void imageKnobDragStarted(ImageKnob* knob) override;
  56. void imageKnobDragFinished(ImageKnob* knob) override;
  57. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  58. void onDisplay() override;
  59. private:
  60. Image fImgBackground;
  61. ImageAboutWindow fAboutWindow;
  62. ImageKnob* fKnobFreq;
  63. ImageKnob* fKnobWidth;
  64. ImageButton* fButtonAbout;
  65. };
  66. // -----------------------------------------------------------------------
  67. END_NAMESPACE_DISTRHO
  68. #endif // DISTRHO_UI_PINGPONGPAN_HPP_INCLUDED