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.

91 lines
2.6KB

  1. /*
  2. * Wobble Juice Plugin
  3. * Copyright (C) 2014 Andre Sklenar <andre.sklenar@gmail.com>, www.juicelab.cz
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  16. */
  17. #ifndef WOBBLEJUICEUI_HPP_INCLUDED
  18. #define WOBBLEJUICEUI_HPP_INCLUDED
  19. #include "DistrhoUI.hpp"
  20. #include "ImageAboutWindow.hpp"
  21. #include "ImageButton.hpp"
  22. #include "ImageKnob.hpp"
  23. #include "WobbleJuiceArtwork.hpp"
  24. using DGL::Image;
  25. using DGL::ImageAboutWindow;
  26. using DGL::ImageButton;
  27. using DGL::ImageKnob;
  28. START_NAMESPACE_DISTRHO
  29. // -----------------------------------------------------------------------
  30. class WobbleJuiceUI : public UI,
  31. public ImageButton::Callback,
  32. public ImageKnob::Callback
  33. {
  34. public:
  35. WobbleJuiceUI();
  36. protected:
  37. // -------------------------------------------------------------------
  38. // Information
  39. uint d_getWidth() const noexcept override
  40. {
  41. return WobbleJuiceArtwork::backgroundWidth;
  42. }
  43. uint d_getHeight() const noexcept override
  44. {
  45. return WobbleJuiceArtwork::backgroundHeight;
  46. }
  47. // -------------------------------------------------------------------
  48. // DSP Callbacks
  49. void d_parameterChanged(uint32_t index, float value) override;
  50. void d_programChanged(uint32_t index) override;
  51. // -------------------------------------------------------------------
  52. // Widget Callbacks
  53. void imageButtonClicked(ImageButton* button, int) override;
  54. void imageKnobDragStarted(ImageKnob* knob) override;
  55. void imageKnobDragFinished(ImageKnob* knob) override;
  56. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  57. void onDisplay() override;
  58. private:
  59. Image fImgBackground;
  60. ImageAboutWindow fAboutWindow;
  61. ScopedPointer<ImageButton> fButtonAbout;
  62. ScopedPointer<ImageKnob> fKnobDivision, fKnobResonance, fKnobRange;
  63. ScopedPointer<ImageKnob> fKnobPhase, fKnobWave, fKnobDrive;
  64. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(WobbleJuiceUI)
  65. };
  66. // -----------------------------------------------------------------------
  67. END_NAMESPACE_DISTRHO
  68. #endif // WOBBLEJUICEUI_HPP_INCLUDED