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.

87 lines
2.9KB

  1. /*
  2. * DISTRHO SoulForce, a DPF'ied SoulForce.
  3. * Copyright (C) 2006 Niall Moody
  4. * Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a
  7. * copy of this software and associated documentation files (the "Software"),
  8. * to deal in the Software without restriction, including without limitation
  9. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10. * and/or sell copies of the Software, and to permit persons to whom the
  11. * Software is furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included in
  14. * all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  19. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  21. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  22. * DEALINGS IN THE SOFTWARE.
  23. */
  24. #ifndef DISTRHO_UI_SOUL_FORCE_HPP_INCLUDED
  25. #define DISTRHO_UI_SOUL_FORCE_HPP_INCLUDED
  26. #include "DistrhoUI.hpp"
  27. #include "ImageButton.hpp"
  28. #include "ImageKnob.hpp"
  29. #include "ImageSwitch.hpp"
  30. #include "DistrhoArtworkSoulForce.hpp"
  31. using DGL::Image;
  32. using DGL::ImageButton;
  33. using DGL::ImageKnob;
  34. using DGL::ImageSwitch;
  35. START_NAMESPACE_DISTRHO
  36. // -----------------------------------------------------------------------
  37. class DistrhoUISoulForce : public UI,
  38. public ImageButton::Callback,
  39. public ImageKnob::Callback,
  40. public ImageSwitch::Callback
  41. {
  42. public:
  43. DistrhoUISoulForce();
  44. protected:
  45. // -------------------------------------------------------------------
  46. // DSP Callbacks
  47. void parameterChanged(uint32_t index, float value) override;
  48. void programLoaded(uint32_t index) override;
  49. // -------------------------------------------------------------------
  50. // Widget Callbacks
  51. void imageKnobDragStarted(ImageKnob* knob) override;
  52. void imageKnobDragFinished(ImageKnob* knob) override;
  53. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  54. void imageButtonClicked(ImageButton* imageButton, int button) override;
  55. void imageSwitchClicked(ImageSwitch* imageSwitch, bool down) override;
  56. void onDisplay() override;
  57. private:
  58. Image fImgBackground, fImgLedOff, fImgLedOn;
  59. ScopedPointer<ImageKnob> fKnobShape, fKnobFBack;
  60. ScopedPointer<ImageSwitch> fSwitchSource;
  61. ScopedPointer<ImageButton> fButtonFoot;
  62. bool fFootDown;
  63. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUISoulForce)
  64. };
  65. // -----------------------------------------------------------------------
  66. END_NAMESPACE_DISTRHO
  67. #endif // DISTRHO_UI_SOUL_FORCE_HPP_INCLUDED