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.

25 lines
571B

  1. #pragma once
  2. #include "app/common.hpp"
  3. #include "widgets/Widget.hpp"
  4. #include "widgets/FramebufferWidget.hpp"
  5. #include "widgets/SVGWidget.hpp"
  6. #include "app/ParamWidget.hpp"
  7. namespace rack {
  8. /** A ParamWidget with multiple frames corresponding to its value */
  9. struct SVGSwitch : virtual ParamWidget, FramebufferWidget {
  10. std::vector<std::shared_ptr<SVG>> frames;
  11. SVGWidget *sw;
  12. SVGSwitch();
  13. /** Adds an SVG file to represent the next switch position */
  14. void addFrame(std::shared_ptr<SVG> svg);
  15. void onChange(event::Change &e) override;
  16. };
  17. } // namespace rack