MRU.H 3.3 KB

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