home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 November / CMCD1104.ISO / Software / Complet / ZynAddFX / Setup_ZynAddSubFX-2.1.1.exe / PresetsStore.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-08-22  |  1.6 KB  |  64 lines

  1. /*
  2.   ZynAddSubFX - a software synthesizer
  3.  
  4.   PresetsStore.C - Presets and Clipboard store
  5.   Copyright (C) 2002-2004 Nasca Octavian Paul
  6.   Author: Nasca Octavian Paul
  7.  
  8.   This program is free software; you can redistribute it and/or modify
  9.   it under the terms of version 2 of the GNU General Public License 
  10.   as published by the Free Software Foundation.
  11.  
  12.   This program is distributed in the hope that it will be useful,
  13.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.   GNU General Public License (version 2) for more details.
  16.  
  17.   You should have received a copy of the GNU General Public License (version 2)
  18.   along with this program; if not, write to the Free Software Foundation,
  19.   Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  20.  
  21. */
  22.  
  23. #include "../Misc/XMLwrapper.h"
  24. #include "../Misc/Config.h"
  25.  
  26. #define MAX_PRESETTYPE_SIZE 30
  27. #define MAX_PRESETS 1000
  28.  
  29. class PresetsStore{
  30.     public:
  31.     PresetsStore();
  32.     ~PresetsStore();
  33.  
  34.     //Clipboard stuff
  35.     void copyclipboard(XMLwrapper *xml,char *type);
  36.     bool pasteclipboard(XMLwrapper *xml);
  37.     bool checkclipboardtype(char *type);
  38.  
  39.     //presets stuff
  40.     void copypreset(XMLwrapper *xml,char *type, const char *name);
  41.     bool pastepreset(XMLwrapper *xml, int npreset);
  42.     void deletepreset(int npreset);
  43.     
  44.     struct presetstruct{
  45.         char *file;
  46.         char *name;
  47.     };
  48.     presetstruct presets[MAX_PRESETS];
  49.  
  50.     void rescanforpresets(char *type);
  51.     
  52.     private:
  53.     struct {
  54.         char *data;
  55.         char type[MAX_PRESETTYPE_SIZE];
  56.     } clipboard;
  57.     
  58.     void clearpresets();
  59.     
  60. };
  61.  
  62. extern PresetsStore presetsstore;
  63.  
  64.