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.

96 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 "ImageSlider.hpp"
  24. #include "WobbleJuiceArtwork.hpp"
  25. #include "WobbleJuicePlugin.hpp"
  26. using DGL::Image;
  27. using DGL::ImageAboutWindow;
  28. using DGL::ImageButton;
  29. using DGL::ImageKnob;
  30. START_NAMESPACE_DISTRHO
  31. // -----------------------------------------------------------------------
  32. class WobbleJuiceUI : public UI,
  33. public ImageButton::Callback,
  34. public ImageKnob::Callback
  35. {
  36. public:
  37. WobbleJuiceUI();
  38. ~WobbleJuiceUI() override;
  39. protected:
  40. // -------------------------------------------------------------------
  41. // Information
  42. unsigned int d_getWidth() const noexcept override
  43. {
  44. return WobbleJuiceArtwork::backgroundWidth;
  45. }
  46. unsigned int d_getHeight() const noexcept override
  47. {
  48. return WobbleJuiceArtwork::backgroundHeight;
  49. }
  50. // -------------------------------------------------------------------
  51. // DSP Callbacks
  52. void d_parameterChanged(uint32_t index, float value) override;
  53. void d_programChanged(uint32_t index) override;
  54. // -------------------------------------------------------------------
  55. // Widget Callbacks
  56. void imageButtonClicked(ImageButton* button, int) override;
  57. void imageKnobDragStarted(ImageKnob* knob) override;
  58. void imageKnobDragFinished(ImageKnob* knob) override;
  59. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  60. void onDisplay() override;
  61. private:
  62. Image fImgBackground;
  63. ImageAboutWindow fAboutWindow;
  64. ImageKnob* fKnobDivision;
  65. ImageKnob* fKnobResonance;
  66. ImageKnob* fKnobRange;
  67. ImageKnob* fKnobPhase;
  68. ImageKnob* fKnobDrive;
  69. ImageKnob* fKnobWave;
  70. ImageButton* fButtonAbout;
  71. };
  72. // -----------------------------------------------------------------------
  73. END_NAMESPACE_DISTRHO
  74. #endif // WOBBLEJUICEUI_HPP_INCLUDED