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.

ZamTubeUI.hpp 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * ZamTube triode WDF distortion model
  3. * Copyright (C) 2014 Damien Zammit <damien@zamaudio.com>
  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 ZAMTUBEUI_HPP_INCLUDED
  18. #define ZAMTUBEUI_HPP_INCLUDED
  19. #include "DistrhoUI.hpp"
  20. #include "ImageKnob.hpp"
  21. #include "ImageSlider.hpp"
  22. #include "ZamTubeArtwork.hpp"
  23. using DGL::Image;
  24. using DGL::ImageKnob;
  25. using DGL::ImageSlider;
  26. START_NAMESPACE_DISTRHO
  27. // -----------------------------------------------------------------------
  28. class ZamTubeUI : public UI,
  29. public ImageKnob::Callback,
  30. public ImageSlider::Callback
  31. {
  32. public:
  33. ZamTubeUI();
  34. protected:
  35. // -------------------------------------------------------------------
  36. // Information
  37. uint d_getWidth() const noexcept override
  38. {
  39. return ZamTubeArtwork::zamtubeWidth;
  40. }
  41. uint d_getHeight() const noexcept override
  42. {
  43. return ZamTubeArtwork::zamtubeHeight;
  44. }
  45. // -------------------------------------------------------------------
  46. // DSP Callbacks
  47. void d_parameterChanged(uint32_t index, float value) ;
  48. void d_programChanged(uint32_t index) ;
  49. // -------------------------------------------------------------------
  50. // Widget Callbacks
  51. void imageKnobDragStarted(ImageKnob* knob) override;
  52. void imageKnobDragFinished(ImageKnob* knob) override;
  53. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  54. void imageSliderDragStarted(ImageSlider* slider) override;
  55. void imageSliderDragFinished(ImageSlider* slider) override;
  56. void imageSliderValueChanged(ImageSlider* slider, float value) override;
  57. void onDisplay() override;
  58. private:
  59. Image fImgBackground;
  60. ScopedPointer<ImageSlider> fSliderNotch;
  61. ScopedPointer<ImageKnob> fKnobTube, fKnobBass, fKnobMids, fKnobTreb, fKnobGain;
  62. };
  63. // -----------------------------------------------------------------------
  64. END_NAMESPACE_DISTRHO
  65. #endif // ZAMTUBEUI_HPP_INCLUDED