Collection of DPF-based plugins for packaging
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.

89 lines
2.8KB

  1. /*
  2. * DISTRHO Nekobi Plugin, based on Nekobee by Sean Bolton and others.
  3. * Copyright (C) 2013-2021 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 "ImageWidgets.hpp"
  21. #include "DistrhoArtworkNekobi.hpp"
  22. #include "NekoWidget.hpp"
  23. using DGL_NAMESPACE::ImageAboutWindow;
  24. using DGL_NAMESPACE::ImageButton;
  25. using DGL_NAMESPACE::ImageKnob;
  26. using DGL_NAMESPACE::ImageSlider;
  27. START_NAMESPACE_DISTRHO
  28. // -----------------------------------------------------------------------
  29. class DistrhoUINekobi : public UI,
  30. public ImageButton::Callback,
  31. public ImageKnob::Callback,
  32. public ImageSlider::Callback,
  33. public IdleCallback
  34. {
  35. public:
  36. DistrhoUINekobi();
  37. ~DistrhoUINekobi() override;
  38. protected:
  39. // -------------------------------------------------------------------
  40. // DSP Callbacks
  41. void parameterChanged(uint32_t index, float value) override;
  42. // -------------------------------------------------------------------
  43. // Widget Callbacks
  44. void imageButtonClicked(ImageButton* button, int) override;
  45. void imageKnobDragStarted(ImageKnob* knob) override;
  46. void imageKnobDragFinished(ImageKnob* knob) override;
  47. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  48. void imageSliderDragStarted(ImageSlider* slider) override;
  49. void imageSliderDragFinished(ImageSlider* slider) override;
  50. void imageSliderValueChanged(ImageSlider* slider, float value) override;
  51. void onDisplay() override;
  52. // -------------------------------------------------------------------
  53. // Other Callbacks
  54. void idleCallback() override;
  55. private:
  56. Image fImgBackground;
  57. ImageAboutWindow fAboutWindow;
  58. NekoWidget fNeko;
  59. ScopedPointer<ImageButton> fButtonAbout;
  60. ScopedPointer<ImageSlider> fSliderWaveform;
  61. ScopedPointer<ImageKnob> fKnobTuning, fKnobCutoff, fKnobResonance;
  62. ScopedPointer<ImageKnob> fKnobEnvMod, fKnobDecay, fKnobAccent, fKnobVolume;
  63. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUINekobi)
  64. };
  65. // -----------------------------------------------------------------------
  66. END_NAMESPACE_DISTRHO
  67. #endif // DISTRHO_UI_NEKOBI_HPP_INCLUDED