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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. ImageAboutWindow fAboutWindow;
  51. ScopedPointer<ImageButton> fButtonAbout;
  52. ScopedPointer<ImageKnob> fKnobDivision, fKnobResonance, fKnobRange;
  53. ScopedPointer<ImageKnob> fKnobPhase, fKnobWave, fKnobDrive;
  54. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(WobbleJuiceUI)
  55. };
  56. // -----------------------------------------------------------------------
  57. END_NAMESPACE_DISTRHO
  58. #endif // WOBBLEJUICEUI_HPP_INCLUDED