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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 "DistrhoUIOpenGL.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. START_NAMESPACE_DISTRHO
  28. // -----------------------------------------------------------------------
  29. class DistrhoUINekobi : public OpenGLUI,
  30. public ImageButton::Callback,
  31. public ImageKnob::Callback,
  32. public ImageSlider::Callback
  33. {
  34. public:
  35. DistrhoUINekobi();
  36. ~DistrhoUINekobi() override;
  37. protected:
  38. // -------------------------------------------------------------------
  39. // Information
  40. unsigned int d_getWidth() const noexcept override
  41. {
  42. return DistrhoArtworkNekobi::backgroundWidth;
  43. }
  44. unsigned int d_getHeight() const noexcept override
  45. {
  46. return DistrhoArtworkNekobi::backgroundHeight;
  47. }
  48. // -------------------------------------------------------------------
  49. // DSP Callbacks
  50. void d_parameterChanged(uint32_t index, float value) override;
  51. void d_noteReceived(bool, uint8_t, uint8_t, uint8_t) override {}
  52. // -------------------------------------------------------------------
  53. // UI Callbacks
  54. void d_uiIdle() override;
  55. // -------------------------------------------------------------------
  56. // Widget Callbacks
  57. void imageButtonClicked(ImageButton* button, int) override;
  58. void imageKnobDragStarted(ImageKnob* knob) override;
  59. void imageKnobDragFinished(ImageKnob* knob) override;
  60. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  61. void imageSliderDragStarted(ImageSlider* slider) override;
  62. void imageSliderDragFinished(ImageSlider* slider) override;
  63. void imageSliderValueChanged(ImageSlider* slider, float value) override;
  64. void onDisplay() override;
  65. private:
  66. Image fImgBackground;
  67. NekoWidget fNeko;
  68. ImageKnob* fKnobTuning;
  69. ImageKnob* fKnobCutoff;
  70. ImageKnob* fKnobResonance;
  71. ImageKnob* fKnobEnvMod;
  72. ImageKnob* fKnobDecay;
  73. ImageKnob* fKnobAccent;
  74. ImageKnob* fKnobVolume;
  75. ImageButton* fButtonAbout;
  76. ImageSlider* fSliderWaveform;
  77. ImageAboutWindow fAboutWindow;
  78. };
  79. // -----------------------------------------------------------------------
  80. END_NAMESPACE_DISTRHO
  81. #endif // DISTRHO_UI_NEKOBI_HPP_INCLUDED