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.

38 lines
748B

  1. #pragma once
  2. #include "app/common.hpp"
  3. #include "widgets/OpaqueWidget.hpp"
  4. #include "app/MultiLightWidget.hpp"
  5. #include "engine/Module.hpp"
  6. namespace rack {
  7. struct PortWidget : OpaqueWidget {
  8. Module *module = NULL;
  9. int portId;
  10. enum Type {
  11. OUTPUT,
  12. INPUT
  13. };
  14. Type type;
  15. MultiLightWidget *plugLight;
  16. PortWidget();
  17. ~PortWidget();
  18. void step() override;
  19. void draw(NVGcontext *vg) override;
  20. void onButton(const event::Button &e) override;
  21. void onDragStart(const event::DragStart &e) override;
  22. void onDragEnd(const event::DragEnd &e) override;
  23. void onDragDrop(const event::DragDrop &e) override;
  24. void onDragEnter(const event::DragEnter &e) override;
  25. void onDragLeave(const event::DragLeave &e) override;
  26. };
  27. } // namespace rack