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.

59 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. class XMLwrapper;
  16. class PresetsStore
  17. {
  18. const class Config& config;
  19. public:
  20. PresetsStore(const class Config &config);
  21. ~PresetsStore();
  22. //Clipboard stuff
  23. void copyclipboard(XMLwrapper &xml, char *type);
  24. bool pasteclipboard(XMLwrapper &xml);
  25. bool checkclipboardtype(const char *type);
  26. //presets stuff
  27. void copypreset(XMLwrapper &xml, char *type, std::string name);
  28. bool pastepreset(XMLwrapper &xml, unsigned int npreset);
  29. void deletepreset(unsigned int npreset);
  30. void deletepreset(std::string file);
  31. struct presetstruct {
  32. bool operator<(const presetstruct &b) const;
  33. std::string file;
  34. std::string name;
  35. std::string type;
  36. };
  37. std::vector<presetstruct> presets;
  38. void scanforpresets();
  39. struct {
  40. std::string data;
  41. std::string type;
  42. } clipboard;
  43. void clearpresets();
  44. };
  45. //extern PresetsStore presetsstore;
  46. #endif