1 /* 2 =========================================================================== 3 Copyright (C) 1997-2006 Id Software, Inc. 4 5 This file is part of Quake 2 Tools source code. 6 7 Quake 2 Tools source code is free software; you can redistribute it 8 and/or modify it under the terms of the GNU General Public License as 9 published by the Free Software Foundation; either version 2 of the License, 10 or (at your option) any later version. 11 12 Quake 2 Tools source code is distributed in the hope that it will be 13 useful, 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 for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with Quake 2 Tools source code; if not, write to the Free Software 19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 =========================================================================== 21 */ 22 23 //************************************************************* 24 // File name: mru.h 25 // 26 // Description: 27 // 28 // Header for MRU support 29 // 30 // Development Team: 31 // 32 // Gilles Vollant (100144.2636@compuserve.com) 33 // 34 //************************************************************* 35 36 #ifndef __MRU_H__ 37 #define __MRU_H__ 38 39 #define NBMRUMENUSHOW 6 // Default number of MRU showed in the menu File 40 #define NBMRUMENU 9 // Default number of MRU stored 41 #define IDMRU 8000 // Default First ID of MRU 42 #ifdef OFS_MAXPATHNAME 43 #define MAXSIZEMRUITEM OFS_MAXPATHNAME 44 #else 45 #define MAXSIZEMRUITEM 128 // Default max size of an entry 46 #endif 47 48 typedef struct 49 { 50 WORD wNbItemFill; 51 WORD wNbLruShow; 52 WORD wNbLruMenu; 53 WORD wMaxSizeLruItem; 54 WORD wIdMru; 55 LPSTR lpMRU; 56 } MRUMENU; 57 58 typedef MRUMENU FAR * LPMRUMENU; 59 60 #ifdef __cplusplus 61 LPMRUMENU CreateMruMenu (WORD wNbLruShowInit=NBMRUMENUSHOW, 62 WORD wNbLruMenuInit=NBMRUMENU, 63 WORD wMaxSizeLruItemInit=MAXSIZEMRUITEM, 64 WORD wIdMruInit=IDMRU); 65 #else 66 LPMRUMENU CreateMruMenu (WORD wNbLruShowInit, 67 WORD wNbLruMenuInit, 68 WORD wMaxSizeLruItemInit, 69 WORD wIdMruInit); 70 #endif 71 72 LPMRUMENU CreateMruMenuDefault(); 73 void DeleteMruMenu (LPMRUMENU lpMruMenu); 74 75 void SetNbLruShow (LPMRUMENU lpMruMenu,WORD wNbLruShowInit); 76 BOOL SetMenuItem (LPMRUMENU lpMruMenu,WORD wItem, 77 LPSTR lpItem); 78 BOOL GetMenuItem (LPMRUMENU lpMruMenu,WORD wItem, 79 BOOL fIDMBased,LPSTR lpItem,UINT uiSize); 80 BOOL DelMenuItem (LPMRUMENU lpMruMenu,WORD wItem,BOOL fIDMBased); 81 void AddNewItem (LPMRUMENU lpMruMenu,LPSTR lpItem); 82 void PlaceMenuMRUItem(LPMRUMENU lpMruMenu,HMENU hMenu,UINT uiItem); 83 84 BOOL SaveMruInIni (LPMRUMENU lpMruMenu,LPSTR lpszSection,LPSTR lpszFile); 85 BOOL LoadMruInIni (LPMRUMENU lpMruMenu,LPSTR lpszSection,LPSTR lpszFile); 86 #ifdef WIN32 87 BOOL SaveMruInReg (LPMRUMENU lpMruMenu,LPSTR lpszKey); 88 BOOL LoadMruInReg (LPMRUMENU lpMruMenu,LPSTR lpszKey); 89 90 typedef enum 91 { 92 WIN32S, 93 WINNT, 94 WIN95ORGREATHER 95 } WIN32KIND; 96 WIN32KIND GetWin32Kind(); 97 #endif 98 99 100 ////////////////////////////////////////////////////////////// 101 #endif 102