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
534B

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