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.

29 lines
695B

  1. #pragma once
  2. #include "widget/OpaqueWidget.hpp"
  3. #include "ui/common.hpp"
  4. #include "Quantity.hpp"
  5. namespace rack {
  6. namespace ui {
  7. struct Button : widget::OpaqueWidget {
  8. std::string text;
  9. BNDwidgetState state = BND_DEFAULT;
  10. /** Not owned. Tracks the pressed state of the button.*/
  11. Quantity *quantity = NULL;
  12. Button();
  13. void draw(const DrawArgs &args) override;
  14. void onEnter(const widget::EnterEvent &e) override;
  15. void onLeave(const widget::LeaveEvent &e) override;
  16. void onDragStart(const widget::DragStartEvent &e) override;
  17. void onDragEnd(const widget::DragEndEvent &e) override;
  18. void onDragDrop(const widget::DragDropEvent &e) override;
  19. };
  20. } // namespace ui
  21. } // namespace rack