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.

36 lines
798B

  1. #pragma once
  2. #include <app/common.hpp>
  3. #include <app/MultiLightWidget.hpp>
  4. #include <ui/Tooltip.hpp>
  5. #include <engine/Module.hpp>
  6. namespace rack {
  7. namespace app {
  8. /** A MultiLightWidget that points to a module's Light or a range of lights
  9. Will access firstLightId, firstLightId + 1, etc. for each added color
  10. */
  11. struct ModuleLightWidget : MultiLightWidget {
  12. engine::Module* module = NULL;
  13. int firstLightId = -1;
  14. ui::Tooltip* tooltip = NULL;
  15. ~ModuleLightWidget();
  16. engine::Light* getLight(int colorId);
  17. engine::LightInfo* getLightInfo();
  18. void createTooltip();
  19. void destroyTooltip();
  20. void step() override;
  21. void onHover(const HoverEvent& e) override;
  22. void onEnter(const EnterEvent& e) override;
  23. void onLeave(const LeaveEvent& e) override;
  24. };
  25. } // namespace app
  26. } // namespace rack