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.

87 lines
2.7KB

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