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.

109 lines
3.2KB

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