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.

DistrhoUIStereoEnhancer.hpp 2.7KB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * DISTRHO StereoEnhancer Plugin, based on StereoEnhancer 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_STEREO_ENHANCER_HPP_INCLUDED
  17. #define DISTRHO_UI_STEREO_ENHANCER_HPP_INCLUDED
  18. #include "DistrhoUI.hpp"
  19. #include "dgl/ImageAboutWindow.hpp"
  20. #include "dgl/ImageButton.hpp"
  21. #include "dgl/ImageKnob.hpp"
  22. #include "DistrhoArtworkStereoEnhancer.hpp"
  23. #include "DistrhoPluginStereoEnhancer.hpp"
  24. using DGL::Image;
  25. using DGL::ImageAboutWindow;
  26. using DGL::ImageButton;
  27. using DGL::ImageKnob;
  28. START_NAMESPACE_DISTRHO
  29. // -----------------------------------------------------------------------
  30. class DistrhoUIStereoEnhancer : public UI,
  31. public ImageButton::Callback,
  32. public ImageKnob::Callback
  33. {
  34. public:
  35. DistrhoUIStereoEnhancer();
  36. ~DistrhoUIStereoEnhancer() override;
  37. protected:
  38. // -------------------------------------------------------------------
  39. // Information
  40. unsigned int d_getWidth() const noexcept override
  41. {
  42. return DistrhoArtworkStereoEnhancer::backgroundWidth;
  43. }
  44. unsigned int d_getHeight() const noexcept override
  45. {
  46. return DistrhoArtworkStereoEnhancer::backgroundHeight;
  47. }
  48. // -------------------------------------------------------------------
  49. // DSP Callbacks
  50. void d_parameterChanged(uint32_t index, float value) override;
  51. void d_programChanged(uint32_t index) override;
  52. // -------------------------------------------------------------------
  53. // Widget Callbacks
  54. void imageButtonClicked(ImageButton* button, int) override;
  55. void imageKnobDragStarted(ImageKnob* knob) override;
  56. void imageKnobDragFinished(ImageKnob* knob) override;
  57. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  58. void onDisplay() override;
  59. private:
  60. Image fImgBackground;
  61. ImageAboutWindow fAboutWindow;
  62. ImageKnob* fKnobWidthLows;
  63. ImageKnob* fKnobWidthHighs;
  64. ImageKnob* fKnobCrossover;
  65. ImageButton* fButtonAbout;
  66. };
  67. // -----------------------------------------------------------------------
  68. END_NAMESPACE_DISTRHO
  69. #endif // DISTRHO_UI_STEREO_ENHANCER_HPP_INCLUDED