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.

Scene.hpp 888B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include <app/common.hpp>
  3. #include <widget/OpaqueWidget.hpp>
  4. #include <app/RackScrollWidget.hpp>
  5. #include <app/RackWidget.hpp>
  6. namespace rack {
  7. namespace app {
  8. struct Scene : widget::OpaqueWidget {
  9. struct Internal;
  10. Internal* internal;
  11. // Convenience variables for accessing important widgets
  12. RackScrollWidget* rackScroll;
  13. RackWidget* rack;
  14. widget::Widget* menuBar;
  15. widget::Widget* browser;
  16. double lastAutosaveTime = 0.0;
  17. /** The last mouse position in the Scene */
  18. math::Vec mousePos;
  19. PRIVATE Scene();
  20. PRIVATE ~Scene();
  21. math::Vec getMousePos();
  22. void step() override;
  23. void draw(const DrawArgs& args) override;
  24. void onHover(const HoverEvent& e) override;
  25. void onDragHover(const DragHoverEvent& e) override;
  26. void onHoverKey(const HoverKeyEvent& e) override;
  27. void onPathDrop(const PathDropEvent& e) override;
  28. };
  29. } // namespace app
  30. } // namespace rack