Audio plugin host https://kx.studio/carla
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.

64 lines
1.5KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. PresetsStore.cpp - Presets and Clipboard store
  4. Copyright (C) 2002-2005 Nasca Octavian Paul
  5. Author: Nasca Octavian Paul
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or (at your option) any later version.
  10. */
  11. #ifndef PRESETSTORE_H
  12. #define PRESETSTORE_H
  13. #include <string>
  14. #include <vector>
  15. namespace zyncarla {
  16. class XMLwrapper;
  17. class PresetsStore
  18. {
  19. const class Config& config;
  20. public:
  21. PresetsStore(const class Config &config);
  22. ~PresetsStore();
  23. //Clipboard stuff
  24. void copyclipboard(XMLwrapper &xml, char *type);
  25. bool pasteclipboard(XMLwrapper &xml);
  26. bool checkclipboardtype(const char *type);
  27. //presets stuff
  28. void copypreset(XMLwrapper &xml, char *type, std::string name);
  29. bool pastepreset(XMLwrapper &xml, unsigned int npreset);
  30. void deletepreset(unsigned int npreset);
  31. void deletepreset(std::string file);
  32. struct presetstruct {
  33. bool operator<(const presetstruct &b) const;
  34. std::string file;
  35. std::string name;
  36. std::string type;
  37. };
  38. std::vector<presetstruct> presets;
  39. void scanforpresets();
  40. struct {
  41. std::string data;
  42. std::string type;
  43. } clipboard;
  44. void clearpresets();
  45. };
  46. //extern PresetsStore presetsstore;
  47. }
  48. #endif