00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __FS_FileHistoryManager__
00021 #define __FS_FileHistoryManager__
00022
00023 #include "FS_API.h"
00024 #include "FS_FileHistory.h"
00025
00026
00027 enum FS_FileHistoryType{
00028 FS_FILEHISTORY_HIP = 0,
00029 FS_FILEHISTORY_PIC,
00030 FS_FILEHISTORY_GEO,
00031 FS_FILEHISTORY_RAMP,
00032 FS_FILEHISTORY_CAPT,
00033 FS_FILEHISTORY_CLIP,
00034 FS_FILEHISTORY_PAINT,
00035 FS_FILEHISTORY_LUT,
00036 FS_FILEHISTORY_CMD,
00037 FS_FILEHISTORY_MIDI,
00038 FS_FILEHISTORY_TXT,
00039 FS_FILEHISTORY_I3D,
00040 FS_FILEHISTORY_CHAN,
00041 FS_FILEHISTORY_FONT,
00042 FS_FILEHISTORY_OTL,
00043 FS_FILEHISTORY_MISC,
00044 FS_FILEHISTORY_SIM,
00045 FS_FILEHISTORY_SIMDATA,
00046 FS_FILEHISTORY_DAE,
00047 FS_FILEHISTORY_FBX,
00048 FS_FILEHISTORY_GAL,
00049 FS_FILEHISTORY_MOV,
00050 FS_FILEHISTORY_ICON,
00051 FS_MAX_HISTORY_TYPES
00052 };
00053
00054 class FS_FileHistory;
00055
00056 class FS_API FS_FileHistoryManager
00057 {
00058 public:
00059
00060 static FS_FileHistoryManager *getFileHistoryManager();
00061 ~FS_FileHistoryManager();
00062
00063 void saveFileHistoryList();
00064 void saveDirHistoryList();
00065
00066 void loadFileHistoryList();
00067 void loadDirHistoryList();
00068
00069
00070
00071 int numFilesInList(FS_FileHistoryType filetype);
00072 const char *getFilenameFromList(int index, FS_FileHistoryType filetype);
00073
00074
00075 int numDirsInList(FS_FileHistoryType filetype);
00076 const char *getDirFromList(int index, FS_FileHistoryType filetype);
00077
00078 void getFormattedFilenameFromList(int index,
00079 FS_FileHistoryType filetype, UT_String &path);
00080 void getFormattedDirFromList(int index,
00081 FS_FileHistoryType filetype, UT_String &path);
00082
00083
00084 void addFileToHistoryList(const char *filename,
00085 FS_FileHistoryType filetype);
00086 void removeFileFromHistoryList(const char *filename,
00087 FS_FileHistoryType filetype);
00088
00089 protected:
00090 FS_FileHistoryManager();
00091
00092 void saveHistoryList(const char *filename, bool filelist);
00093 void loadHistoryList(const char *filename, bool filelist);
00094 private:
00095 FS_FileHistory *getHistoryList(FS_FileHistoryType filetype);
00096 FS_FileHistory *getDirHistoryList(FS_FileHistoryType filetype);
00097
00098 UT_PtrArray<FS_FileHistory *> myHistoryList;
00099 UT_PtrArray<FS_FileHistory *> myDirHistoryList;
00100 };
00101
00102 #define FSgetFileHistoryManager FS_FileHistoryManager::getFileHistoryManager
00103
00104 #endif