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.

SvgLatch.hpp 489B

3 years ago
12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <app/common.hpp>
  3. #include <app/SvgSwitch.hpp>
  4. namespace rack {
  5. namespace app {
  6. /** A ParamWidget that behaves like a Switch but draws SVG frames for mouse up/down state.
  7. */
  8. struct SvgLatch : SvgSwitch {
  9. struct Internal;
  10. Internal* internal;
  11. SvgLatch();
  12. ~SvgLatch();
  13. void onDragStart(const DragStartEvent& e) override;
  14. void onDragEnd(const DragEndEvent& e) override;
  15. void onChange(const ChangeEvent& e) override;
  16. };
  17. } // namespace app
  18. } // namespace rack