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.

68 lines
1.9KB

  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 modify
  7. it under the terms of version 2 of the GNU General Public License
  8. as published by the Free Software Foundation.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License (version 2 or later) for more details.
  13. You should have received a copy of the GNU General Public License (version 2)
  14. along with this program; if not, write to the Free Software Foundation,
  15. Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. */
  17. #ifndef PRESETSTORE_H
  18. #define PRESETSTORE_H
  19. #include <string>
  20. #include <vector>
  21. class XMLwrapper;
  22. class PresetsStore
  23. {
  24. const class Config& config;
  25. public:
  26. PresetsStore(const class Config &config);
  27. ~PresetsStore();
  28. //Clipboard stuff
  29. void copyclipboard(XMLwrapper &xml, char *type);
  30. bool pasteclipboard(XMLwrapper &xml);
  31. bool checkclipboardtype(const char *type);
  32. //presets stuff
  33. void copypreset(XMLwrapper &xml, char *type, std::string name);
  34. bool pastepreset(XMLwrapper &xml, unsigned int npreset);
  35. void deletepreset(unsigned int npreset);
  36. void deletepreset(std::string file);
  37. struct presetstruct {
  38. bool operator<(const presetstruct &b) const;
  39. std::string file;
  40. std::string name;
  41. std::string type;
  42. };
  43. std::vector<presetstruct> presets;
  44. void scanforpresets();
  45. struct {
  46. std::string data;
  47. std::string type;
  48. } clipboard;
  49. void clearpresets();
  50. };
  51. //extern PresetsStore presetsstore;
  52. #endif