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.

MenuItem.hpp 645B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include "ui/common.hpp"
  3. #include "ui/Menu.hpp"
  4. #include "ui/MenuEntry.hpp"
  5. #include "ui/MenuOverlay.hpp"
  6. #include "app.hpp"
  7. namespace rack {
  8. namespace ui {
  9. #define BND_LABEL_FONT_SIZE 13
  10. struct MenuItem : MenuEntry {
  11. std::string text;
  12. std::string rightText;
  13. bool disabled = false;
  14. void draw(const widget::DrawContext &ctx) override;
  15. void step() override;
  16. void onEnter(const event::Enter &e) override;
  17. void onDragStart(const event::DragStart &e) override;
  18. void onDragDrop(const event::DragDrop &e) override;
  19. void doAction();
  20. virtual Menu *createChildMenu() {return NULL;}
  21. };
  22. } // namespace ui
  23. } // namespace rack