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.

26 lines
486B

  1. #pragma once
  2. #include "widget/OpaqueWidget.hpp"
  3. namespace rack {
  4. namespace widget {
  5. /** Like OpaqueWidget but consumes even more events. */
  6. struct OverlayWidget : OpaqueWidget {
  7. void onHoverScroll(const HoverScrollEvent &e) override {
  8. Widget::onHoverScroll(e);
  9. if (!e.getConsumed())
  10. e.consume(this);
  11. }
  12. void onPathDrop(const PathDropEvent &e) override {
  13. Widget::onPathDrop(e);
  14. if (!e.getConsumed())
  15. e.consume(this);
  16. }
  17. };
  18. } // namespace widget
  19. } // namespace rack