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 761B

1234567891011121314151617181920212223242526272829303132333435363738
  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. PatchManager();
  12. ~PatchManager();
  13. void init(std::string path);
  14. void reset();
  15. void resetDialog();
  16. void save(std::string path);
  17. void saveDialog();
  18. void saveAsDialog();
  19. void saveTemplateDialog();
  20. bool load(std::string path);
  21. void loadDialog();
  22. /** If `lastPath` is defined, ask the user to reload it */
  23. void revertDialog();
  24. /** Disconnects all cables */
  25. void disconnectDialog();
  26. json_t *toJson();
  27. void fromJson(json_t *rootJ);
  28. bool isLegacy(int level);
  29. };
  30. } // namespace rack