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.

patch.hpp 696B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "common.hpp"
  3. #include <jansson.h>
  4. namespace rack {
  5. struct PatchManager {
  6. /** The currently loaded patch file path */
  7. std::string path;
  8. /** Enables certain compatibility behavior based on the value */
  9. int legacy;
  10. std::string warningLog;
  11. void reset();
  12. void resetDialog();
  13. void save(std::string path);
  14. void saveDialog();
  15. void saveAsDialog();
  16. void saveTemplateDialog();
  17. void load(std::string path);
  18. void loadDialog();
  19. /** If `lastPath` is defined, ask the user to reload it */
  20. void revertDialog();
  21. /** Disconnects all cables */
  22. void disconnectDialog();
  23. json_t *toJson();
  24. void fromJson(json_t *rootJ);
  25. bool isLegacy(int level);
  26. };
  27. } // namespace rack