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.

92 lines
2.8KB

  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. // DSP Callbacks
  42. void d_parameterChanged(uint32_t index, float value) override;
  43. // -------------------------------------------------------------------
  44. // UI Callbacks
  45. void d_uiIdle() override;
  46. // -------------------------------------------------------------------
  47. // Widget Callbacks
  48. void imageButtonClicked(ImageButton* button, int) override;
  49. void imageKnobDragStarted(ImageKnob* knob) override;
  50. void imageKnobDragFinished(ImageKnob* knob) override;
  51. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  52. void imageSliderDragStarted(ImageSlider* slider) override;
  53. void imageSliderDragFinished(ImageSlider* slider) override;
  54. void imageSliderValueChanged(ImageSlider* slider, float value) override;
  55. void onDisplay() override;
  56. private:
  57. Image fImgBackground;
  58. #ifndef DISTRHO_OS_MAC
  59. ImageAboutWindow fAboutWindow;
  60. #endif
  61. NekoWidget fNeko;
  62. ScopedPointer<ImageButton> fButtonAbout;
  63. ScopedPointer<ImageSlider> fSliderWaveform;
  64. ScopedPointer<ImageKnob> fKnobTuning, fKnobCutoff, fKnobResonance;
  65. ScopedPointer<ImageKnob> fKnobEnvMod, fKnobDecay, fKnobAccent, fKnobVolume;
  66. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUINekobi)
  67. };
  68. // -----------------------------------------------------------------------
  69. END_NAMESPACE_DISTRHO
  70. #endif // DISTRHO_UI_NEKOBI_HPP_INCLUDED