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.

ObstructWidget.hpp 756B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "widgets/Widget.hpp"
  3. namespace rack {
  4. /** Widget that consumes recursing events without giving a chance for children to consume.
  5. */
  6. struct ObstructWidget : virtual Widget {
  7. void onHover(const event::Hover &e) override {
  8. e.consume(this);
  9. }
  10. void onButton(const event::Button &e) override {
  11. e.consume(this);
  12. }
  13. void onHoverKey(const event::HoverKey &e) override {
  14. e.consume(this);
  15. }
  16. void onHoverText(const event::HoverText &e) override {
  17. e.consume(this);
  18. }
  19. void onHoverScroll(const event::HoverScroll &e) override {
  20. e.consume(this);
  21. }
  22. void onDragHover(const event::DragHover &e) override {
  23. e.consume(this);
  24. }
  25. void onPathDrop(const event::PathDrop &e) override {
  26. e.consume(this);
  27. }
  28. };
  29. } // namespace rack