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.

24 lines
649B

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