Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

534 lines
21 KiB

  1. // Copyright (C) 1996-1997 Microsoft Corporation. All rights reserved.
  2. #if _MSC_VER > 1000
  3. #pragma once
  4. #endif
  5. #ifndef __SITEMAP_H__
  6. #define __SITEMAP_H__
  7. class CHtmlHelpControl; // forward reference
  8. #include "cinput.h"
  9. #include "strtable.h"
  10. typedef PCSTR URL;
  11. typedef UINT INFOTYPE;
  12. const INFOTYPE ITYPE_ALWAYS_SHOW = 0; // when this info type is defined, the entry is always shown to the user (unless a Hidden info type overrides)
  13. const int MAX_RELATED_ENTRIES = 256; // maximum number of sitemap entries for Related Topics
  14. const int MAX_KEYSEARCH_ENTRIES = 256; // maximum number of sitemap entries for Keyword Search
  15. enum {
  16. IMAGE_CLOSED_BOOK = 1,
  17. IMAGE_OPEN_BOOK,
  18. IMAGE_CLOSED_BOOK_NEW,
  19. IMAGE_OPEN_BOOK_NEW,
  20. IMAGE_CLOSED_FOLDER,
  21. IMAGE_OPEN_FOLDER,
  22. IMAGE_CLOSED_FOLDER_NEW,
  23. IMAGE_OPEN_FOLDER_NEW,
  24. IMAGE_HELP_TOPIC,
  25. IMAGE_HELP_TOPIC_NEW,
  26. IMAGE_TOPIC,
  27. IMAGE_TOPIC_NEW,
  28. IMAGE_TOPIC_REMOTE,
  29. IMAGE_TOPIC_NEW_REMOTE,
  30. };
  31. #define IMAGE_INFOTYPE 37
  32. #define ESCAPE_ENTITY 0x01
  33. #define ESCAPE_URL 0x02
  34. #define ESCAPE_C 0x04
  35. #define ESCAPE_ALL 0x07
  36. /*
  37. Each URL can be associated with any number of information types.
  38. Information types are stored as bit flags. By default, each
  39. SITE_ENTRY_URL entry contains enough storage for 32 information types.
  40. If more are needed, then additional memory must be allocated. Note that
  41. we must allocate 4 bytes for each additional information type in order to
  42. avoid alignment problems.
  43. The CSiteMap class must keep track of the total number of bytes to
  44. allocate for each SITE_ENTRY_URL structure. This can NOT change once
  45. a SITEMAP_ENTRY has been allocated (unless all SITEMAP_ENTRY structures
  46. get updated). Within the SITEMAP_ENTRY structure, cUrls tells us how
  47. many SITE_ENTRY_URL structures to allocate.
  48. */
  49. typedef struct {
  50. PCSTR pszTitle;
  51. URL urlPrimary;
  52. URL urlSecondary;
  53. //INFOTYPE ainfoTypes[1]; // which information types
  54. INFOTYPE *ainfoTypes;
  55. } SITE_ENTRY_URL;
  56. const int MAX_CATEGORIES = 10;
  57. typedef struct {
  58. int c_Types; // the number of ITs in a category
  59. INFOTYPE *pInfoType; // a pointer to a set of infotype bits. The bits represent info types
  60. // bit zero is reserved.
  61. } CATEGORY_TYPE;
  62. typedef struct {
  63. CTable* m_ptblInfoTypes;
  64. CTable* m_ptblInfoTypeDescriptions;
  65. CTable* m_ptblCategories;
  66. CTable* m_ptblCatDescription;
  67. int m_cTypes; // total number of types
  68. int m_cITSize; // The number of DWORDs allocated for categories, m_pExclusive, and m_pHidden
  69. INFOTYPE* m_pExclusive; // index to first exclusive information type
  70. INFOTYPE* m_pHidden; // index to first hidden information type
  71. int m_max_categories; // The number of categories currently allocated.
  72. CATEGORY_TYPE *m_aCategories;
  73. } INFOTYPE_TABLES;
  74. // Overhead is 20 bytes per entry + 12 for each URL (assuming up to 32 InfoTypes)
  75. // forward reference
  76. class CSiteMap;
  77. typedef struct _tagSiteMapEntry {
  78. #ifndef HHA
  79. CSiteMap* pSiteMap;
  80. #endif
  81. PCSTR pszText; // title/keyword for this entry
  82. #ifndef HHCTRL
  83. PCSTR pszComment;
  84. PCSTR pszSort; // used when sorting index
  85. #endif
  86. short iWindowName;
  87. short iFrameName;
  88. short iFontName;
  89. short cUrls; // number or URLS
  90. BYTE iImage;
  91. BYTE level;
  92. BYTE fInclude; // Used by HHW to track included sitemap file
  93. BYTE fTopic:1;
  94. BYTE fNew:1;
  95. BYTE fNoDisplay:1;
  96. BYTE fSeeAlso:1;
  97. BYTE fShowToEveryOne:1; // TRUE if no Information Type was specified
  98. BYTE fSendEvent:1; // TRUE if URL is an event string
  99. BYTE fSendMessage:1; // TRUE if URL is a message string
  100. BYTE fShortCut:1; // TRUE if URL is a shortcut string
  101. // WARNING! pUrls must be the last member of this structure
  102. SITE_ENTRY_URL* pUrls;
  103. int GetLevel(void) const { return level; }
  104. void SetLevel(int val) { level = (BYTE)val; }
  105. PCSTR GetKeyword() const { return pszText; }
  106. #ifdef HHCTRL
  107. #ifndef HHA
  108. HRESULT GetKeyword( WCHAR* pwszKeyword, int cch );
  109. #endif
  110. #endif
  111. PCSTR GetTitle( SITE_ENTRY_URL* pUrl ) { return pUrl->pszTitle ? pUrl->pszTitle : GetStringResource(IDS_UNTITLED); }
  112. #ifdef HHCTRL
  113. #ifndef HHA
  114. HRESULT GetTitle( SITE_ENTRY_URL* pUrl, WCHAR* pwszTitle, int cch );
  115. #endif
  116. #endif
  117. BOOL IsTopic(void) const { return fTopic; }
  118. void SetTopic(BOOL fSetting) { fTopic = fSetting; }
  119. BOOL IsNew(void) const { return fNew; }
  120. void SetNew(BOOL fSetting) { fNew = fSetting; }
  121. BOOL GetSeeAlso(void) const { return fSeeAlso; }
  122. void SetSeeAlso(BOOL fSetting) { fSeeAlso = fSetting; }
  123. int GetImageIndex(void) const { return iImage; }
  124. void SetImageIndex(int IndexImage) { iImage = (BYTE) IndexImage; }
  125. int GetWindowIndex(void) const { return (int) iWindowName; }
  126. void SetWindowIndex(int index) { iWindowName = (short)index; }
  127. int GetFrameIndex(void) const { return (int) iFrameName; }
  128. void SetFrameIndex(int index) { iFrameName = (short)index; }
  129. int GetFontIndex(void) const { return (int) iFontName; }
  130. void SetFontIndex(int index) { iFontName = (short)index; }
  131. void Clear(void) { ClearMemory(this, sizeof(_tagSiteMapEntry)); }
  132. } SITEMAP_ENTRY;
  133. class CSiteMapEntry : public SITEMAP_ENTRY
  134. {
  135. public:
  136. CSiteMapEntry() { ClearMemory(this, sizeof(CSiteMapEntry)); }
  137. #ifndef HHCTRL
  138. void CopyFrom(const SITEMAP_ENTRY* pSiteMapEntry, CSiteMap* pSiteMapSrc, CSiteMap* pSiteMapDst);
  139. void CopyTo(SITEMAP_ENTRY* pSiteMapEntry, CSiteMap* pSiteMapSrc, CSiteMap* pSiteMapDst);
  140. #endif
  141. };
  142. class CSiteEntryUrl
  143. {
  144. public:
  145. CSiteEntryUrl(int ITSize) {
  146. m_pUrl = (SITE_ENTRY_URL*) lcCalloc(sizeof(SITE_ENTRY_URL) );
  147. m_pUrl->ainfoTypes = (INFOTYPE*)lcCalloc( ITSize==0?sizeof(INFOTYPE):ITSize );
  148. m_fUrlSpecified = FALSE;
  149. }
  150. ~CSiteEntryUrl() { lcFree(m_pUrl->ainfoTypes); lcFree(m_pUrl); }
  151. void SaveUrlEntry(CSiteMap* pSiteMap, SITEMAP_ENTRY* pSiteMapEntry);
  152. SITE_ENTRY_URL* m_pUrl;
  153. int m_cMaxTypes;
  154. BOOL m_fUrlSpecified;
  155. };
  156. class CParseSitemap; // forward reference
  157. // Forward declarations declared in genit.cpp
  158. //
  159. int GetITBitfromIT(INFOTYPE const *IT, int* offset, int* bit, int cTypes);
  160. void AddIT(int const type, INFOTYPE *pIT );
  161. void DeleteIT(int const type, INFOTYPE *pIT );
  162. int GetITfromCat(int* offset, INFOTYPE* bit, INFOTYPE* pInfoType, int cTypes);
  163. int GetITBitfromIT(INFOTYPE const *IT, int* offset, INFOTYPE* bit, int cTypes);
  164. void CopyITBits(INFOTYPE** ITDst, INFOTYPE* ITSrc, int size);
  165. // WARNING!!! All member classes should be included as pointers or initialization
  166. // will trash the class.
  167. // forward reference
  168. SITEMAP_ENTRY;
  169. class CSiteMap : public CTable
  170. {
  171. private:
  172. void SizeIT(int oldSize);
  173. public:
  174. CSiteMap(int cMaxEntries = 0);
  175. virtual ~CSiteMap();
  176. #ifdef HHA
  177. SITEMAP_ENTRY* AddEntry( SITEMAP_ENTRY* pSiteMapEntry = NULL )
  178. {
  179. int iData = AddData(sizeof(SITEMAP_ENTRY), pSiteMapEntry);
  180. if (iData)
  181. {
  182. return GetSiteMapEntry(iData);
  183. }
  184. else
  185. return NULL;
  186. }
  187. #else
  188. SITEMAP_ENTRY* AddEntry( SITEMAP_ENTRY* pSiteMapEntry = NULL )
  189. {
  190. int iData = AddData(sizeof(SITEMAP_ENTRY), pSiteMapEntry);
  191. if (iData)
  192. {
  193. SITEMAP_ENTRY* pReturn = GetSiteMapEntry(iData);
  194. pReturn->pSiteMap = this;
  195. return pReturn;
  196. }
  197. else
  198. return NULL;
  199. }
  200. #endif
  201. void AddFavoriteNodes(PCSTR pszRoot, PCSTR pszNewFolder, int level);
  202. void AddInfoTypeToUrl(SITEMAP_ENTRY* pSiteMapEntry, INFOTYPE iType);
  203. int AddTypeName(PCSTR pszName);
  204. int Count(void) const { return endpos - 1; };
  205. void CreateFavorites(int level = 1);
  206. int GetImageNumber(SITEMAP_ENTRY* pSiteMapEntry) const;
  207. SITEMAP_ENTRY* GetSiteMapEntry(int pos) const { return (SITEMAP_ENTRY*) GetPointer(pos); }
  208. #ifdef HHCTRL
  209. #ifdef HHA
  210. BOOL ReadFromFile(PCSTR pszFileName, BOOL fIndex, CHtmlHelpControl* phhctrl );
  211. #else
  212. BOOL ReadFromFile(PCSTR pszFileName, BOOL fIndex, CHtmlHelpControl* phhctrl, UINT CodePage );
  213. #endif
  214. #else
  215. BOOL ReadFromFile(PCSTR pszFileName, BOOL fIndex, PCSTR pszBaseFile = NULL);
  216. #endif
  217. BOOL AreAnyInfoTypesDefined(SITEMAP_ENTRY* pSiteMapEntry);
  218. SITE_ENTRY_URL* AreTheseInfoTypesDefined(SITEMAP_ENTRY* pSiteMapEntry, INFOTYPE types, int offset) const;
  219. SITE_ENTRY_URL* NextUrlEntry(SITE_ENTRY_URL* pUrl) const { return (SITE_ENTRY_URL*) ((PBYTE) pUrl + sizeof(SITE_ENTRY_URL) ); }
  220. SITE_ENTRY_URL* GetUrlEntry(SITEMAP_ENTRY* pSiteMapEntry, int pos /* zero-based */) { return (SITE_ENTRY_URL*) ((PBYTE) pSiteMapEntry->pUrls + (GetUrlEntrySize() * pos)); }
  221. SITE_ENTRY_URL* GetUrlEntry(SITE_ENTRY_URL* pUrl, int pos /* zero-based */) { return (SITE_ENTRY_URL*) ((PBYTE) pUrl + (GetUrlEntrySize() * pos)); }
  222. PCSTR GetUrlTitle(SITEMAP_ENTRY* pSiteMapEntry, int pos /* zero-based */) { return pSiteMapEntry->GetTitle((SITE_ENTRY_URL*) (SITE_ENTRY_URL*) ((PBYTE) pSiteMapEntry->pUrls + (GetUrlEntrySize() * pos))); }
  223. int GetUrlEntrySize(void) const { return sizeof(SITE_ENTRY_URL); }
  224. BOOL ParseSiteMapParam(CParseSitemap* pcparse, PCSTR pszParamType, CTable *ptblSubSets);
  225. void ReSizeIT(int Size=0);
  226. void ReSizeURLIT(int Size=0);
  227. BOOL IsEntryInCurTypeList(SITEMAP_ENTRY* pSiteMapEntry) const;
  228. int GetInfoType(PCSTR pszTypeName);
  229. PCSTR GetInfoTypeName(int pos) const { return m_itTables.m_ptblInfoTypes->GetPointer(pos); }
  230. int GetITIndex(PCSTR pszString) const { return m_itTables.m_ptblInfoTypes->IsStringInTable( pszString ); }
  231. PCSTR GetInfoTypeDescription(int pos) const { return m_itTables.m_ptblInfoTypeDescriptions->GetPointer(pos); }
  232. int GetInfoTypeSize(void) const { return InfoTypeSize(); }
  233. int HowManyInfoTypes(void) const { return m_itTables.m_ptblInfoTypes ? m_itTables.m_ptblInfoTypes->CountStrings() : 0; }
  234. BOOL IsInACategory( int type ) const;
  235. int InfoTypeSize(void) const { return m_itTables.m_cITSize * sizeof(INFOTYPE); }
  236. BOOL IsDeleted( const int pos ) const { return ( *(GetInfoTypeName(pos))==' ' )?TRUE:FALSE; }
  237. int GetFirstExclusive(int=-1, INFOTYPE=1) const;
  238. int GetNextExclusive(void) const;
  239. int GetLastExclusive(void) const;
  240. void AddExclusiveIT(int const type) { AddIT( type, m_itTables.m_pExclusive ); }
  241. void DeleteExclusiveIT(int const type ) { DeleteIT( type, m_itTables.m_pExclusive); }
  242. BOOL IsExclusive(int const type) const { return m_itTables.m_pExclusive?*(m_itTables.m_pExclusive+(type/32)) & (1<<(type%32)):0; }
  243. int GetFirstHidden(int=-1, INFOTYPE=1) const;
  244. int GetNextHidden(void) const;
  245. int GetLastHidden(void) const;
  246. void AddHiddenIT(int const type ) { AddIT(type, m_itTables.m_pHidden); }
  247. void DeleteHiddenIT(int const type) { DeleteIT( type, m_itTables.m_pHidden ); }
  248. BOOL IsHidden(int const type) const { return m_itTables.m_pHidden?*(m_itTables.m_pHidden+(type/32)) & (1<<(type%32)):0; }
  249. int GetFirstCategoryType(int pos) const ;
  250. int GetNextITinCategory( void ) const ;
  251. int GetLastCategoryType(int pos) const ;
  252. void AddITtoCategory(int pos, int type);
  253. void AddToCategory( int iLastType );
  254. void DeleteITfromCat(int pos, int type);
  255. BOOL IsITinCategory( int pos, int type) const { return m_itTables.m_aCategories[pos].pInfoType?*(m_itTables.m_aCategories[pos].pInfoType+(type/32)) & (1<<(type%32)):0; }
  256. BOOL IsCatDeleted( const int pos ) const { return ( *(GetCategoryString(pos))==' ' )?TRUE:FALSE; }
  257. void CopyCat(INFOTYPE_TABLES*, const INFOTYPE_TABLES*);
  258. PCSTR GetCategoryString(int pos) const { return m_itTables.m_ptblCategories->GetPointer(pos); }
  259. int GetCatPosition(PCSTR psz) const { return m_itTables.m_ptblCategories->IsStringInTable(psz); }
  260. int HowManyCategories(void) const { return m_itTables.m_ptblCategories ? m_itTables.m_ptblCategories->CountStrings() : 0; }
  261. PCSTR GetCategoryDescription(int pos) const { return m_itTables.m_ptblCatDescription?m_itTables.m_ptblCatDescription->GetPointer(pos):0; }
  262. int GetLevel(int pos) const { return GetSiteMapEntry(pos)->GetLevel(); }
  263. void SetLevel(int val, int pos) { GetSiteMapEntry(pos)->SetLevel(val); }
  264. PCSTR GetPathName(void) { return m_pszSitemapFile; }
  265. PCSTR GetSiteMapFile(void) { return m_pszSitemapFile; }
  266. void SetSiteMapFile(PCSTR pszFile)
  267. {
  268. if (!m_pszSitemapFile && pszFile)
  269. m_pszSitemapFile = StrDup(pszFile);
  270. }
  271. PCSTR GetFrameName(void) { return m_pszFrameName ? m_pszFrameName : ""; }
  272. void SetFrameName(PCSTR psz) { m_pszFrameName = IsEmptyString(psz) ? NULL : StrDup(psz); }
  273. BOOL IsFrameDefined(void) { return m_pszFrameName != NULL; }
  274. void SetEntryFrame(SITEMAP_ENTRY* pSiteMapEntry, PCSTR psz) { pSiteMapEntry->SetFrameIndex(AddName(psz)); }
  275. PCSTR GetEntryFrame(SITEMAP_ENTRY* pSiteMapEntry) { return GetName(pSiteMapEntry->GetFrameIndex()); }
  276. PCSTR GetWindowName(void) { return m_pszWindowName ? m_pszWindowName : ""; }
  277. void SetWindowName(PCSTR psz) { m_pszWindowName = IsEmptyString(psz) ? NULL : StrDup(psz); }
  278. BOOL IsWindowDefined(void) { return m_pszWindowName != NULL; }
  279. void SetEntryWindow(SITEMAP_ENTRY* pSiteMapEntry, PCSTR psz) { pSiteMapEntry->SetWindowIndex(AddName(psz)); }
  280. PCSTR GetEntryWindow(SITEMAP_ENTRY* pSiteMapEntry) { return GetName(pSiteMapEntry->GetWindowIndex()); }
  281. URL AddUrl(PCSTR pszUrl);
  282. PCSTR GetUrlString(URL url) const { return (PCSTR) url; }
  283. int AddName(PCSTR psz);
  284. PCSTR GetName(int pos)
  285. {
  286. #ifdef _DEBUG
  287. if (m_ptblStrings)
  288. ASSERT(pos <= m_ptblStrings->CountStrings());
  289. #endif
  290. return (m_ptblStrings && pos > 0) ? m_ptblStrings->GetHashStringPointer(pos) : "";
  291. }
  292. BOOL IsIndex(void) { return m_fIndex; }
  293. #ifndef HHA
  294. UINT GetCodePage() { if( m_CodePage != (UINT)-1 ) return m_CodePage; else return CP_ACP; }
  295. #endif
  296. //////// member variables //////////
  297. /*
  298. !!! WARNING: if you add or remove members, you must change the version
  299. !!! number in hhamsgs.h or face a GPF when the author does a View Entry.
  300. */
  301. BOOL m_fTypeCopy; // TRUE if following tables are pointers that must not be freed
  302. INFOTYPE_TABLES m_itTables;
  303. // CSubSets *m_pSubSets;
  304. PCSTR m_pszSitemapFile;
  305. INFOTYPE* m_pInfoTypes; // user-specified Information Types
  306. INFOTYPE* m_pTypicalInfoTypes; // "typical" information types
  307. BOOL m_fIndex; // TRUE if using this as an index
  308. PSTR m_pszBase; // used when reading sitemap file
  309. PCSTR m_pszImageList;
  310. int m_cImageWidth; // width of each icon in image
  311. int m_cImages;
  312. COLORREF m_clrMask;
  313. COLORREF m_clrBackground;
  314. COLORREF m_clrForeground;
  315. PCSTR m_pszFont; // name, pointsize, ext. usefull to CTocClass.
  316. BOOL m_fFolderImages; // use folders instead of books as the image
  317. BOOL m_fPromotForInfoTypes;
  318. DWORD m_tvStyles; // regular window styles
  319. DWORD m_exStyles; // extended window styles
  320. PCSTR m_pszBackBitmap; // used for TOC and Index
  321. int m_cITSize; // The number of DWORDS currently allocated for IT bits for the URL
  322. // int m_cUrlEntry; // sizeof(SITE_ENTRY_URL) + sizeof(URL) for each additional 32 Information Types
  323. // int m_cInfoTypeOffsets; // number of additional offsets to check
  324. BOOL m_fAutoGenerated; // means the file is not writeable
  325. #ifndef HHCTRL
  326. SITEMAP_ENTRY* Add(const SITEMAP_ENTRY* pSiteMapEntry = NULL);
  327. SITEMAP_ENTRY* Insert(int pos, const SITEMAP_ENTRY* pSiteMapEntry = NULL);
  328. void Remove(int pos, BOOL fCompact = TRUE);
  329. void FillUrlComboBox(SITEMAP_ENTRY* pSiteMapEntry, HWND hwndCombo);
  330. void MoveEntry(int posSrc, int posDst);
  331. BOOL SaveSiteMap(PCSTR pszPathName, BOOL fIndex);
  332. void OutputDefaultSiteMapEntry(COutput* pout, SITEMAP_ENTRY* pSiteMapEntry, int curLevel, BOOL fIndex);
  333. void CopyProperties(CSiteMap* pSiteMap, BOOL fIncludeTables = FALSE);
  334. #endif
  335. CTable* m_ptblStrings;
  336. PCSTR m_pszFrameName; // default frame to use
  337. PCSTR m_pszWindowName; // default window to use
  338. PCSTR m_pszHHIFile;
  339. BOOL m_fSaveIT; // Save the declared IT in an instance of CSitemap, if there is an hhi hhc IT declarations are not saved.
  340. #ifndef HHA
  341. private:
  342. UINT m_CodePage;
  343. #endif
  344. };
  345. // note the inlined SITEMAP_ENTRY functions below must be declared after
  346. // the declaration of CSiteMap otherwise the compiler will choke on them
  347. // since they access CSiteMap members/methods
  348. #ifdef HHCTRL
  349. #ifndef HHA
  350. inline HRESULT SITEMAP_ENTRY::GetKeyword( WCHAR* pwszKeyword, int cch )
  351. {
  352. ASSERT( pSiteMap );
  353. //ASSERT( pSiteMap->GetCodePage() );
  354. UINT CodePage = pSiteMap->GetCodePage();
  355. if( MultiByteToWideChar( CodePage, 0, pszText, -1, pwszKeyword, cch ) == 0 )
  356. return E_FAIL;
  357. return S_OK;
  358. }
  359. #endif
  360. #endif
  361. #ifdef HHCTRL
  362. #ifndef HHA
  363. inline HRESULT SITEMAP_ENTRY::GetTitle( SITE_ENTRY_URL* pUrl, WCHAR* pwszTitle, int cch )
  364. {
  365. ASSERT( pSiteMap );
  366. //ASSERT( pSiteMap->GetCodePage() );
  367. if( !pUrl->pszTitle ) {
  368. wcsncpy( pwszTitle, GetStringResourceW(IDS_UNTITLED), cch);
  369. pwszTitle[cch] = 0;
  370. return S_OK;
  371. }
  372. UINT CodePage = pSiteMap->GetCodePage();
  373. if( MultiByteToWideChar( CodePage, 0, pszText, -1, pwszTitle, cch) == 0 )
  374. return E_FAIL;
  375. return S_OK;
  376. }
  377. #endif
  378. #endif
  379. extern const char txtBeginList[]; // "<UL>"
  380. extern const char txtEndList[] ; // "</UL>"
  381. extern const char txtBeginListItem[]; // "<LI"
  382. extern const char txtSitemap[]; // "<!Sitemap";
  383. extern const char txtSitemap1[]; // "<!--Sitemap";
  384. extern const char txtSitemap2[]; // "<!Sitemap";
  385. extern const char txtParam[]; // "<param name";
  386. extern const char txtValue[]; // "value";
  387. extern const char txtBeginHref[]; // "<A HREF";
  388. extern const char txtEndHref[]; // "</A>";
  389. extern const char txtBeginObject[]; // "<OBJECT"
  390. extern const char txtEndObject[]; // "</OBJECT>"
  391. extern const char txtSiteMapObject[]; // "text/sitemap";
  392. extern const char txtSitemapProperties[]; // "text/site properties";
  393. extern const char txtBackGround[]; // "Background";
  394. extern const char txtForeGround[]; // "Foreground";
  395. extern const char txtFont[]; // "Font";
  396. extern const char txtImageList[]; // "ImageList";
  397. extern const char txtImageWidth[]; // "Image Width";
  398. extern const char txtColorMask[]; // "Color Mask";
  399. extern const char txtNumberImages[]; // "NumberImages";
  400. extern const char txtExWindowStyles[]; // "ExWindow Styles";
  401. extern const char txtWindowStyles[]; // "Window Styles";
  402. extern const char txtType[]; // "type";
  403. extern const char txtNo[]; // "No";
  404. extern const char txtFolderType[]; // "Folder";
  405. extern const char txtEndTag[]; // "</";
  406. extern const char txtInfoTypeDeclaration[]; // "InformationTypeDecl";
  407. // Param labels
  408. extern const char txtParamType[]; // "Type";
  409. extern const char txtParamTypeExclusive[];// "TypeExclusive";
  410. extern const char txtParamTypeHidden[]; // "TypeHidden";
  411. extern const char txtParamTypeDesc[]; // "TypeDesc";
  412. extern const char txtParamCategory[]; // "Category";
  413. extern const char txtParamCategoryDesc[]; // "CategoryDesc";
  414. extern const char txtParamName[]; // "Name";
  415. extern const char txtParamUrl[]; // "URL";
  416. extern const char txtParamIcon[]; // "Icon";
  417. extern const char txtParamLocal[]; // "Local";
  418. extern const char txtParamFrame[]; // "Frame";
  419. extern const char txtParamWindow[]; // "Window";
  420. extern const char txtParamNew[]; // "New";
  421. extern const char txtParamComment[]; // "Comment";
  422. extern const char txtParamImageNumber[]; // "ImageNumber";
  423. extern const char txtParamDisplay[]; // "Display";
  424. extern const char txtParamKeyword[]; // "Keyword";
  425. extern const char txtParamInstruction[]; // "Instruction";
  426. extern const char txtParamSectionTitle[]; // "Section Title";
  427. extern const char txtSeeAlso[]; // "See Also";
  428. extern const char txtImageType[]; // "ImageType";
  429. extern const char txtFavorites[]; // "Favorites";
  430. extern const char txtAutoGenerated[]; // "Auto Generated";
  431. extern const char txtSSInclusive[]; // "Inclusive";
  432. extern const char txtSSExclusive[]; // "Exclusive";
  433. //////////////////////////////////// Functions ///////////////////////////////
  434. int CompareSz(PCSTR psz, PCSTR pszSub);
  435. HASH HashFromSz(PCSTR pszKey);
  436. BOOL ReplaceEscapes(PCSTR pszSrc, PSTR pszDst, int); // pszSrc can be same as pszDst
  437. #endif // __SITEMAP_H__