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.

DistrhoUIPingPongPan.hpp 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * DISTRHO PingPongPan Plugin, based on PingPongPan by Michael Gruhn
  3. * Copyright (C) 2012-2014 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 LICENSE 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. using DGL::Image;
  24. using DGL::ImageAboutWindow;
  25. using DGL::ImageButton;
  26. using DGL::ImageKnob;
  27. START_NAMESPACE_DISTRHO
  28. // -----------------------------------------------------------------------
  29. class DistrhoUIPingPongPan : public UI,
  30. public ImageButton::Callback,
  31. public ImageKnob::Callback
  32. {
  33. public:
  34. DistrhoUIPingPongPan();
  35. protected:
  36. // -------------------------------------------------------------------
  37. // Information
  38. uint d_getWidth() const noexcept override
  39. {
  40. return DistrhoArtworkPingPongPan::backgroundWidth;
  41. }
  42. uint d_getHeight() const noexcept override
  43. {
  44. return DistrhoArtworkPingPongPan::backgroundHeight;
  45. }
  46. // -------------------------------------------------------------------
  47. // DSP Callbacks
  48. void d_parameterChanged(uint32_t index, float value) override;
  49. void d_programChanged(uint32_t index) override;
  50. // -------------------------------------------------------------------
  51. // Widget Callbacks
  52. void imageButtonClicked(ImageButton* button, int) override;
  53. void imageKnobDragStarted(ImageKnob* knob) override;
  54. void imageKnobDragFinished(ImageKnob* knob) override;
  55. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  56. void onDisplay() override;
  57. private:
  58. Image fImgBackground;
  59. ImageAboutWindow fAboutWindow;
  60. ScopedPointer<ImageButton> fButtonAbout;
  61. ScopedPointer<ImageKnob> fKnobFreq, fKnobWidth;
  62. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUIPingPongPan)
  63. };
  64. // -----------------------------------------------------------------------
  65. END_NAMESPACE_DISTRHO
  66. #endif // DISTRHO_UI_PINGPONGPAN_HPP_INCLUDED