MRU.H 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. ===========================================================================
  3. Doom 3 GPL Source Code
  4. Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
  5. This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
  6. Doom 3 Source Code is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. Doom 3 Source Code is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
  16. In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
  17. If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
  18. ===========================================================================
  19. */
  20. #ifndef __MRU_H__
  21. #define __MRU_H__
  22. #define NBMRUMENUSHOW 6 // Default number of MRU showed in the menu File
  23. #define NBMRUMENU 9 // Default number of MRU stored
  24. #define IDMRU 8000 // Default First ID of MRU
  25. #ifdef OFS_MAXPATHNAME
  26. #define MAXSIZEMRUITEM OFS_MAXPATHNAME
  27. #else
  28. #define MAXSIZEMRUITEM 128 // Default max size of an entry
  29. #endif
  30. typedef struct
  31. {
  32. WORD wNbItemFill;
  33. WORD wNbLruShow;
  34. WORD wNbLruMenu;
  35. WORD wMaxSizeLruItem;
  36. WORD wIdMru;
  37. LPSTR lpMRU;
  38. } MRUMENU;
  39. typedef MRUMENU FAR * LPMRUMENU;
  40. #ifdef __cplusplus
  41. LPMRUMENU CreateMruMenu (WORD wNbLruShowInit=NBMRUMENUSHOW,
  42. WORD wNbLruMenuInit=NBMRUMENU,
  43. WORD wMaxSizeLruItemInit=MAXSIZEMRUITEM,
  44. WORD wIdMruInit=IDMRU);
  45. #else
  46. LPMRUMENU CreateMruMenu (WORD wNbLruShowInit,
  47. WORD wNbLruMenuInit,
  48. WORD wMaxSizeLruItemInit,
  49. WORD wIdMruInit);
  50. #endif
  51. LPMRUMENU CreateMruMenuDefault();
  52. void DeleteMruMenu (LPMRUMENU lpMruMenu);
  53. void SetNbLruShow (LPMRUMENU lpMruMenu,WORD wNbLruShowInit);
  54. BOOL SetMenuItem (LPMRUMENU lpMruMenu,WORD wItem,
  55. LPSTR lpItem);
  56. BOOL GetMenuItem (LPMRUMENU lpMruMenu,WORD wItem,
  57. BOOL fIDMBased,LPSTR lpItem,UINT uiSize);
  58. BOOL DelMenuItem (LPMRUMENU lpMruMenu,WORD wItem,BOOL fIDMBased);
  59. void AddNewItem (LPMRUMENU lpMruMenu,LPSTR lpItem);
  60. void PlaceMenuMRUItem(LPMRUMENU lpMruMenu,HMENU hMenu,UINT uiItem);
  61. BOOL SaveMruInIni (LPMRUMENU lpMruMenu,LPSTR lpszSection,LPSTR lpszFile);
  62. BOOL LoadMruInIni (LPMRUMENU lpMruMenu,LPSTR lpszSection,LPSTR lpszFile);
  63. #ifdef WIN32
  64. BOOL SaveMruInReg (LPMRUMENU lpMruMenu,LPSTR lpszKey);
  65. BOOL LoadMruInReg (LPMRUMENU lpMruMenu,LPSTR lpszKey);
  66. typedef enum
  67. {
  68. WIN32S,
  69. WINNT,
  70. WIN95ORGREATHER
  71. } WIN32KIND;
  72. WIN32KIND GetWin32Kind();
  73. #endif
  74. //////////////////////////////////////////////////////////////
  75. #endif