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.

60 lines
1.8KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. PresetsArray.h - PresetsArray and Clipboard management
  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 PRESETSARRAY_H
  18. #define PRESETSARRAY_H
  19. #include "../Misc/XMLwrapper.h"
  20. #include "Presets.h"
  21. /**PresetsArray and Clipboard management*/
  22. class PresetsArray:public Presets
  23. {
  24. public:
  25. PresetsArray();
  26. virtual ~PresetsArray();
  27. void copy(const char *name); /**<if name==NULL, the clipboard is used*/
  28. void paste(int npreset); //npreset==0 for clipboard
  29. bool checkclipboardtype();
  30. void deletepreset(int npreset);
  31. char type[MAX_PRESETTYPE_SIZE];
  32. void setelement(int n);
  33. void rescanforpresets();
  34. protected:
  35. void setpresettype(const char *type);
  36. private:
  37. virtual void add2XML(XMLwrapper *xml) = 0;
  38. virtual void getfromXML(XMLwrapper *xml) = 0;
  39. virtual void defaults() = 0;
  40. virtual void add2XMLsection(XMLwrapper *xml, int n) = 0;
  41. virtual void getfromXMLsection(XMLwrapper *xml, int n) = 0;
  42. virtual void defaults(int n) = 0;
  43. int nelement;
  44. };
  45. #endif