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.

25 lines
663B

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