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.

DistrhoUI3BandSplitter.hpp 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * DISTRHO 3BandSplitter Plugin, based on 3BandSplitter by Michael Gruhn
  3. * Copyright (C) 2012-2013 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU Lesser General Public License for more details.
  13. *
  14. * For a full copy of the license see the doc/LGPL.txt file.
  15. */
  16. #ifndef DISTRHO_UI_3BANDSPLITTER_HPP_INCLUDED
  17. #define DISTRHO_UI_3BANDSPLITTER_HPP_INCLUDED
  18. #include "DistrhoUI.hpp"
  19. #include "ImageAboutWindow.hpp"
  20. #include "ImageButton.hpp"
  21. #include "ImageKnob.hpp"
  22. #include "ImageSlider.hpp"
  23. #include "DistrhoArtwork3BandSplitter.hpp"
  24. #include "DistrhoPlugin3BandSplitter.hpp"
  25. using DGL::Image;
  26. using DGL::ImageAboutWindow;
  27. using DGL::ImageButton;
  28. using DGL::ImageKnob;
  29. using DGL::ImageSlider;
  30. START_NAMESPACE_DISTRHO
  31. // -----------------------------------------------------------------------
  32. class DistrhoUI3BandSplitter : public UI,
  33. public ImageButton::Callback,
  34. public ImageKnob::Callback,
  35. public ImageSlider::Callback
  36. {
  37. public:
  38. DistrhoUI3BandSplitter();
  39. ~DistrhoUI3BandSplitter() override;
  40. protected:
  41. // -------------------------------------------------------------------
  42. // Information
  43. unsigned int d_getWidth() const noexcept override
  44. {
  45. return DistrhoArtwork3BandSplitter::backgroundWidth;
  46. }
  47. unsigned int d_getHeight() const noexcept override
  48. {
  49. return DistrhoArtwork3BandSplitter::backgroundHeight;
  50. }
  51. // -------------------------------------------------------------------
  52. // DSP Callbacks
  53. void d_parameterChanged(uint32_t index, float value) override;
  54. void d_programChanged(uint32_t index) override;
  55. // -------------------------------------------------------------------
  56. // Widget Callbacks
  57. void imageButtonClicked(ImageButton* button, int) override;
  58. void imageKnobDragStarted(ImageKnob* knob) override;
  59. void imageKnobDragFinished(ImageKnob* knob) override;
  60. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  61. void imageSliderDragStarted(ImageSlider* slider) override;
  62. void imageSliderDragFinished(ImageSlider* slider) override;
  63. void imageSliderValueChanged(ImageSlider* slider, float value) override;
  64. void onDisplay() override;
  65. private:
  66. Image fImgBackground;
  67. ImageAboutWindow fAboutWindow;
  68. ImageSlider* fSliderLow;
  69. ImageSlider* fSliderMid;
  70. ImageSlider* fSliderHigh;
  71. ImageSlider* fSliderMaster;
  72. ImageKnob* fKnobLowMid;
  73. ImageKnob* fKnobMidHigh;
  74. ImageButton* fButtonAbout;
  75. };
  76. // -----------------------------------------------------------------------
  77. END_NAMESPACE_DISTRHO
  78. #endif // DISTRHO_UI_3BANDSPLITTER_HPP_INCLUDED