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.

30 lines
625B

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