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.

33 lines
726B

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