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.

SvgButton.hpp 644B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include "app/common.hpp"
  3. #include "widget/OpaqueWidget.hpp"
  4. #include "widget/FramebufferWidget.hpp"
  5. #include "widget/SvgWidget.hpp"
  6. namespace rack {
  7. namespace app {
  8. struct SvgButton : widget::OpaqueWidget {
  9. widget::FramebufferWidget *fb;
  10. widget::SvgWidget *sw;
  11. std::vector<std::shared_ptr<Svg>> frames;
  12. SvgButton();
  13. void addFrame(std::shared_ptr<Svg> svg);
  14. void onDragStart(const widget::DragStartEvent &e) override;
  15. void onDragEnd(const widget::DragEndEvent &e) override;
  16. void onDragDrop(const widget::DragDropEvent &e) override;
  17. };
  18. DEPRECATED typedef SvgButton SVGButton;
  19. } // namespace app
  20. } // namespace rack