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.

DistrhoUINekobi.hpp 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * DISTRHO Nekobi Plugin, based on Nekobee by Sean Bolton and others.
  3. * Copyright (C) 2013-2014 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 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 LICENSE file.
  16. */
  17. #ifndef DISTRHO_UI_NEKOBI_HPP_INCLUDED
  18. #define DISTRHO_UI_NEKOBI_HPP_INCLUDED
  19. #include "DistrhoUI.hpp"
  20. #include "ImageAboutWindow.hpp"
  21. #include "ImageButton.hpp"
  22. #include "ImageKnob.hpp"
  23. #include "ImageSlider.hpp"
  24. #include "DistrhoArtworkNekobi.hpp"
  25. #include "NekoWidget.hpp"
  26. using DGL::ImageAboutWindow;
  27. using DGL::ImageButton;
  28. using DGL::ImageKnob;
  29. using DGL::ImageSlider;
  30. START_NAMESPACE_DISTRHO
  31. // -----------------------------------------------------------------------
  32. class DistrhoUINekobi : public UI,
  33. public ImageButton::Callback,
  34. public ImageKnob::Callback,
  35. public ImageSlider::Callback
  36. {
  37. public:
  38. DistrhoUINekobi();
  39. protected:
  40. // -------------------------------------------------------------------
  41. // Information
  42. uint d_getWidth() const noexcept override
  43. {
  44. return DistrhoArtworkNekobi::backgroundWidth;
  45. }
  46. uint d_getHeight() const noexcept override
  47. {
  48. return DistrhoArtworkNekobi::backgroundHeight;
  49. }
  50. // -------------------------------------------------------------------
  51. // DSP Callbacks
  52. void d_parameterChanged(uint32_t index, float value) override;
  53. // -------------------------------------------------------------------
  54. // UI Callbacks
  55. void d_uiIdle() override;
  56. // -------------------------------------------------------------------
  57. // Widget Callbacks
  58. void imageButtonClicked(ImageButton* button, int) override;
  59. void imageKnobDragStarted(ImageKnob* knob) override;
  60. void imageKnobDragFinished(ImageKnob* knob) override;
  61. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  62. void imageSliderDragStarted(ImageSlider* slider) override;
  63. void imageSliderDragFinished(ImageSlider* slider) override;
  64. void imageSliderValueChanged(ImageSlider* slider, float value) override;
  65. void onDisplay() override;
  66. private:
  67. Image fImgBackground;
  68. ImageAboutWindow fAboutWindow;
  69. NekoWidget fNeko;
  70. ScopedPointer<ImageButton> fButtonAbout;
  71. ScopedPointer<ImageSlider> fSliderWaveform;
  72. ScopedPointer<ImageKnob> fKnobTuning, fKnobCutoff, fKnobResonance;
  73. ScopedPointer<ImageKnob> fKnobEnvMod, fKnobDecay, fKnobAccent, fKnobVolume;
  74. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUINekobi)
  75. };
  76. // -----------------------------------------------------------------------
  77. END_NAMESPACE_DISTRHO
  78. #endif // DISTRHO_UI_NEKOBI_HPP_INCLUDED