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.

26 lines
714B

  1. #pragma once
  2. #include "app/common.hpp"
  3. #include "widgets/TransparentWidget.hpp"
  4. #include "app/WireWidget.hpp"
  5. #include "app/Port.hpp"
  6. namespace rack {
  7. struct WireContainer : TransparentWidget {
  8. WireWidget *activeWire = NULL;
  9. /** Takes ownership of `w` and adds it as a child if it isn't already */
  10. void setActiveWire(WireWidget *w);
  11. /** "Drops" the wire onto the port, making an engine connection if successful */
  12. void commitActiveWire();
  13. void removeTopWire(Port *port);
  14. void removeAllWires(Port *port);
  15. /** Returns the most recently added wire connected to the given Port, i.e. the top of the stack */
  16. WireWidget *getTopWire(Port *port);
  17. void draw(NVGcontext *vg) override;
  18. };
  19. } // namespace rack