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.

WobbleJuiceUI.hpp 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. // DSP Callbacks
  39. void d_parameterChanged(uint32_t index, float value) override;
  40. void d_programChanged(uint32_t index) override;
  41. // -------------------------------------------------------------------
  42. // Widget Callbacks
  43. void imageButtonClicked(ImageButton* button, int) override;
  44. void imageKnobDragStarted(ImageKnob* knob) override;
  45. void imageKnobDragFinished(ImageKnob* knob) override;
  46. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  47. void onDisplay() override;
  48. private:
  49. Image fImgBackground;
  50. #ifndef DISTRHO_OS_MAC
  51. ImageAboutWindow fAboutWindow;
  52. #endif
  53. ScopedPointer<ImageButton> fButtonAbout;
  54. ScopedPointer<ImageKnob> fKnobDivision, fKnobResonance, fKnobRange;
  55. ScopedPointer<ImageKnob> fKnobPhase, fKnobWave, fKnobDrive;
  56. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(WobbleJuiceUI)
  57. };
  58. // -----------------------------------------------------------------------
  59. END_NAMESPACE_DISTRHO
  60. #endif // WOBBLEJUICEUI_HPP_INCLUDED