htmlhelp.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  *
4  *
5  * Copyright (C) 1997-2015 by Dimitri van Heesch.
6  *
7  * Permission to use, copy, modify, and distribute this software and its
8  * documentation under the terms of the GNU General Public License is hereby
9  * granted. No representations are made about the suitability of this software
10  * for any purpose. It is provided "as is" without express or implied warranty.
11  * See the GNU General Public License for more details.
12  *
13  * Documents produced by Doxygen are derivative works derived from the
14  * input used in their production; they are not affected by this license.
15  *
16  * The original version of this file is largely based on a contribution from
17  * Harm van der Heijden.
18  */
19 
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <qlist.h>
23 #include <qdict.h>
24 #include <qregexp.h>
25 #include <qfile.h>
26 
27 #include "qtextcodec.h"
28 #include "sortdict.h"
29 #include "htmlhelp.h"
30 #include "config.h"
31 #include "message.h"
32 #include "doxygen.h"
33 #include "language.h"
34 #include "portable.h"
35 #include "groupdef.h"
36 #include "memberdef.h"
37 #include "filedef.h"
38 #include "util.h"
39 
40 //----------------------------------------------------------------------------
41 
42 /** Class representing a field in the HTML help index. */
43 struct IndexField
44 {
48  bool link;
49  bool reversed;
50 };
51 
52 /** Sorted dictionary of IndexField objects. */
53 class IndexFieldSDict : public SDict<IndexField>
54 {
55  public:
58  private:
59  int compareValues(const IndexField *item1, const IndexField *item2) const
60  {
61  return qstricmp(item1->name,item2->name);
62  }
63 };
64 
65 /** A helper class for HtmlHelp that manages a two level index in
66  * alphabetical order.
67  */
69 {
70  public:
72  ~HtmlHelpIndex();
73  void addItem(const char *first,const char *second,
74  const char *url, const char *anchor,
75  bool hasLink,bool reversed);
76  void writeFields(FTextStream &t);
77  private:
80 };
81 
82 /*! Constructs a new HtmlHelp index */
84 {
85  dict = new IndexFieldSDict;
87 }
88 
89 /*! Destroys the HtmlHelp index */
91 {
92  delete dict;
93 }
94 
95 /*! Stores an item in the index if it is not already present.
96  * Items are stored in alphetical order, by sorting on the
97  * concatenation of \a level1 and \a level2 (if present).
98  *
99  * \param level1 the string at level 1 in the index.
100  * \param level2 the string at level 2 in the index (or 0 if not applicable).
101  * \param url the url of the documentation (without .html extension).
102  * \param anchor the anchor of the documentation within the page.
103  * \param hasLink if true, the url (without anchor) can be used in the
104  * level1 item, when writing the header of a list of level2 items.
105  * \param reversed TRUE if level1 is the member name and level2 the compound
106  * name.
107  */
108 void HtmlHelpIndex::addItem(const char *level1,const char *level2,
109  const char *url,const char *anchor,bool hasLink,
110  bool reversed)
111 {
112  QCString key = level1;
113  if (level2) key+= (QCString)"?" + level2;
114  if (key.find(QRegExp("@[0-9]+"))!=-1) // skip anonymous stuff
115  {
116  return;
117  }
118  if (dict->find(key)==0) // new key
119  {
120  //printf(">>>>>>>>> HtmlHelpIndex::addItem(%s,%s,%s,%s)\n",
121  // level1,level2,url,anchor);
122  IndexField *f = new IndexField;
123  f->name = key;
124  f->url = url;
125  f->anchor = anchor;
126  f->link = hasLink;
127  f->reversed = reversed;
128  dict->append(key,f);
129  }
130 }
131 
132 static QCString field2URL(const IndexField *f,bool checkReversed)
133 {
135  if (!f->anchor.isEmpty() && (!checkReversed || f->reversed))
136  {
137  result+="#"+f->anchor;
138  }
139  return result;
140 }
141 
142 /*! Writes the sorted list of index items into a html like list.
143  *
144  * An list of calls with <code>name = level1,level2</code> as follows:
145  * <pre>
146  * a1,b1
147  * a1,b2
148  * a2,b1
149  * a2,b2
150  * a3
151  * a4,b1
152  * </pre>
153  *
154  * Will result in the following list:
155  *
156  * <pre>
157  * a1 -> link to url if hasLink==TRUE
158  * b1 -> link to url#anchor
159  * b2 -> link to url#anchor
160  * a2 -> link to url if hasLink==TRUE
161  * b1 -> link to url#anchor
162  * b2 -> link to url#anchor
163  * a3 -> link to url if hasLink==TRUE
164  * a4 -> link to url if hasLink==TRUE
165  * b1 -> link to url#anchor
166  * </pre>
167  */
169 {
170  dict->sort();
172  IndexField *f;
173  QCString lastLevel1;
174  bool level2Started=FALSE;
175  for (;(f=ifli.current());++ifli)
176  {
177  QCString level1,level2;
178  int i;
179  if ((i=f->name.find('?'))!=-1)
180  {
181  level1 = f->name.left(i);
182  level2 = f->name.right(f->name.length()-i-1);
183  }
184  else
185  {
186  level1 = f->name.copy();
187  }
188 
189  if (level1!=lastLevel1)
190  { // finish old list at level 2
191  if (level2Started) t << " </UL>" << endl;
192  level2Started=FALSE;
193 
194  // <Antony>
195  // Added this code so that an item with only one subitem is written
196  // without any subitem.
197  // For example:
198  // a1, b1 -> will create only a1, not separate subitem for b1
199  // a2, b2
200  // a2, b3
201  QCString nextLevel1;
202  IndexField* fnext = ++ifli;
203  if (fnext)
204  {
205  nextLevel1 = fnext->name.left(fnext->name.find('?'));
206  --ifli;
207  }
208  if (level1 != nextLevel1)
209  {
210  level2 = "";
211  }
212  // </Antony>
213 
214  if (level2.isEmpty())
215  {
216  t << " <LI><OBJECT type=\"text/sitemap\">";
217  t << "<param name=\"Local\" value=\"" << field2URL(f,TRUE);
218  t << "\">";
219  t << "<param name=\"Name\" value=\"" << m_help->recode(level1) << "\">"
220  "</OBJECT>\n";
221  }
222  else
223  {
224  if (f->link)
225  {
226  t << " <LI><OBJECT type=\"text/sitemap\">";
227  t << "<param name=\"Local\" value=\"" << field2URL(f,TRUE);
228  t << "\">";
229  t << "<param name=\"Name\" value=\"" << m_help->recode(level1) << "\">"
230  "</OBJECT>\n";
231  }
232  else
233  {
234  t << " <LI><OBJECT type=\"text/sitemap\">";
235  t << "<param name=\"See Also\" value=\"" << m_help->recode(level1) << "\">";
236  t << "<param name=\"Name\" value=\"" << m_help->recode(level1) << "\">"
237  "</OBJECT>\n";
238  }
239  }
240  }
241  if (!level2Started && !level2.isEmpty())
242  { // start new list at level 2
243  t << " <UL>" << endl;
244  level2Started=TRUE;
245  }
246  else if (level2Started && level2.isEmpty())
247  { // end list at level 2
248  t << " </UL>" << endl;
249  level2Started=FALSE;
250  }
251  if (level2Started)
252  {
253  t << " <LI><OBJECT type=\"text/sitemap\">";
254  t << "<param name=\"Local\" value=\"" << field2URL(f,FALSE);
255  t << "\">";
256  t << "<param name=\"Name\" value=\"" << m_help->recode(level2) << "\">"
257  "</OBJECT>\n";
258  }
259  lastLevel1 = level1.copy();
260  }
261  if (level2Started) t << " </UL>" << endl;
262 }
263 
264 //----------------------------------------------------------------------------
265 
267 
268 /*! Constructs an html object.
269  * The object has to be \link initialize() initialized\endlink before it can
270  * be used.
271  */
272 HtmlHelp::HtmlHelp() : indexFileDict(1009)
273 {
274  /* initial depth */
275  dc = 0;
276  cf = kf = 0;
277  index = new HtmlHelpIndex(this);
278  m_fromUtf8 = (void *)(-1);
279 }
280 
282 {
283  if (m_fromUtf8!=(void *)(-1)) portable_iconv_close(m_fromUtf8);
284  delete index;
285 }
286 #if 0
287 /*! return a reference to the one and only instance of this class.
288  */
289 HtmlHelp *HtmlHelp::getInstance()
290 {
291  if (theInstance==0) theInstance = new HtmlHelp;
292  return theInstance;
293 }
294 #endif
295 
296 static QDict<QCString> s_languageDict;
297 
298 /*! This will create a contents file (index.hhc) and a index file (index.hhk)
299  * and write the header of those files.
300  * It also creates a project file (index.hhp)
301  * \sa finalize()
302  */
304 {
305  const char *str = Config_getString("CHM_INDEX_ENCODING");
306  if (!str) str = "CP1250"; // use safe and likely default
307  m_fromUtf8 = portable_iconv_open(str,"UTF-8");
308  if (m_fromUtf8==(void *)(-1))
309  {
310  err("unsupported character conversion for CHM_INDEX_ENCODING: '%s'->'UTF-8'\n", str);
311  exit(1);
312  }
313 
314  /* open the contents file */
315  QCString fName = Config_getString("HTML_OUTPUT") + "/index.hhc";
316  cf = new QFile(fName);
317  if (!cf->open(IO_WriteOnly))
318  {
319  err("Could not open file %s for writing\n",fName.data());
320  exit(1);
321  }
322  /* Write the header of the contents file */
323  cts.setDevice(cf);
324  cts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
325  "<HTML><HEAD></HEAD><BODY>\n"
326  "<OBJECT type=\"text/site properties\">\n"
327  "<param name=\"FrameName\" value=\"right\">\n"
328  "</OBJECT>\n"
329  "<UL>\n";
330 
331  /* open the contents file */
332  fName = Config_getString("HTML_OUTPUT") + "/index.hhk";
333  kf = new QFile(fName);
334  if (!kf->open(IO_WriteOnly))
335  {
336  err("Could not open file %s for writing\n",fName.data());
337  exit(1);
338  }
339  /* Write the header of the contents file */
340  kts.setDevice(kf);
341  kts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
342  "<HTML><HEAD></HEAD><BODY>\n"
343  "<OBJECT type=\"text/site properties\">\n"
344  "<param name=\"FrameName\" value=\"right\">\n"
345  "</OBJECT>\n"
346  "<UL>\n";
347 
348  /* language codes for Html help
349  0x405 Czech
350  0x406 Danish
351  0x413 Dutch
352  0xC09 English (Australia)
353  0x809 English (Britain)
354  0x1009 English (Canada)
355  0x1809 English (Ireland)
356  0x1409 English (New Zealand)
357  0x1C09 English (South Africa)
358  0x409 English (United States)
359  0x40B Finnish
360  0x40C French
361  0x407 German
362  0x408 Greece
363  0x40E Hungarian
364  0x410 Italian
365  0x814 Norwegian
366  0x415 Polish
367  0x816 Portuguese(Portugal)
368  0x416 Portuguese(Brazil)
369  0x419 Russian
370  0x80A Spanish(Mexico)
371  0xC0A Spanish(Modern Sort)
372  0x40A Spanish(Traditional Sort)
373  0x41D Swedish
374  0x41F Turkey
375  0x411 Japanese
376  0x412 Korean
377  0x804 Chinese (PRC)
378  0x404 Chinese (Taiwan)
379 
380  New LCIDs:
381  0x421 Indonesian
382  0x41A Croatian
383  0x418 Romanian
384  0x424 Slovenian
385  0x41B Slovak
386  0x422 Ukrainian
387  0x81A Serbian (Serbia, Latin)
388  0x403 Catalan
389  0x426 Latvian
390  0x427 Lithuanian
391  0x436 Afrikaans
392  0x42A Vietnamese
393  0x429 Persian (Iran)
394  0xC01 Arabic (Egypt) - I don't know which version of arabic is used inside translator_ar.h ,
395  so I have chosen Egypt at random
396 
397  */
398  s_languageDict.setAutoDelete(TRUE);
399  s_languageDict.clear();
400  s_languageDict.insert("czech", new QCString("0x405 Czech"));
401  s_languageDict.insert("danish", new QCString("0x406 Danish"));
402  s_languageDict.insert("dutch", new QCString("0x413 Dutch"));
403  s_languageDict.insert("finnish", new QCString("0x40B Finnish"));
404  s_languageDict.insert("french", new QCString("0x40C French"));
405  s_languageDict.insert("german", new QCString("0x407 German"));
406  s_languageDict.insert("greek", new QCString("0x408 Greece"));
407  s_languageDict.insert("hungarian", new QCString("0x40E Hungarian"));
408  s_languageDict.insert("italian", new QCString("0x410 Italian"));
409  s_languageDict.insert("norwegian", new QCString("0x814 Norwegian"));
410  s_languageDict.insert("polish", new QCString("0x415 Polish"));
411  s_languageDict.insert("portuguese", new QCString("0x816 Portuguese(Portugal)"));
412  s_languageDict.insert("brazilian", new QCString("0x416 Portuguese(Brazil)"));
413  s_languageDict.insert("russian", new QCString("0x419 Russian"));
414  s_languageDict.insert("spanish", new QCString("0x40A Spanish(Traditional Sort)"));
415  s_languageDict.insert("swedish", new QCString("0x41D Swedish"));
416  s_languageDict.insert("turkish", new QCString("0x41F Turkey"));
417  s_languageDict.insert("japanese", new QCString("0x411 Japanese"));
418  s_languageDict.insert("japanese-en", new QCString("0x411 Japanese"));
419  s_languageDict.insert("korean", new QCString("0x412 Korean"));
420  s_languageDict.insert("korean-en", new QCString("0x412 Korean"));
421  s_languageDict.insert("chinese", new QCString("0x804 Chinese (PRC)"));
422  s_languageDict.insert("chinese-traditional", new QCString("0x404 Chinese (Taiwan)"));
423 
424  // new LCIDs
425  s_languageDict.insert("indonesian", new QCString("0x412 Indonesian"));
426  s_languageDict.insert("croatian", new QCString("0x41A Croatian"));
427  s_languageDict.insert("romanian", new QCString("0x418 Romanian"));
428  s_languageDict.insert("slovene", new QCString("0x424 Slovenian"));
429  s_languageDict.insert("slovak", new QCString("0x41B Slovak"));
430  s_languageDict.insert("ukrainian", new QCString("0x422 Ukrainian"));
431  s_languageDict.insert("serbian", new QCString("0x81A Serbian (Serbia, Latin)"));
432  s_languageDict.insert("catalan", new QCString("0x403 Catalan"));
433  s_languageDict.insert("lithuanian", new QCString("0x427 Lithuanian"));
434  s_languageDict.insert("afrikaans", new QCString("0x436 Afrikaans"));
435  s_languageDict.insert("vietnamese", new QCString("0x42A Vietnamese"));
436  s_languageDict.insert("persian", new QCString("0x429 Persian (Iran)"));
437  s_languageDict.insert("arabic", new QCString("0xC01 Arabic (Egypt)"));
438  s_languageDict.insert("latvian", new QCString("0x426 Latvian"));
439  s_languageDict.insert("macedonian", new QCString("0x042f Macedonian (Former Yugoslav Republic of Macedonia)"));
440  s_languageDict.insert("armenian", new QCString("0x42b Armenian"));
441  //Code for Esperanto should be as shown below but the htmlhelp compiler 1.3 does not support this
442  // (and no newer version is available).
443  //So do a fallback to the default language (see getLanguageString())
444  //s_languageDict.insert("esperanto", new QCString("0x48f Esperanto"));
445  s_languageDict.insert("serbian-cyrillic", new QCString("0xC1A Serbian (Serbia, Cyrillic)"));
446 }
447 
448 
450 {
451  if (!theTranslator->idLanguage().isEmpty())
452  {
454  if (s)
455  {
456  return *s;
457  }
458  }
459  // default language
460  return "0x409 English (United States)";
461 }
462 
463 
464 
466 {
467  /* Write the project file */
468  QCString fName = Config_getString("HTML_OUTPUT") + "/index.hhp";
469  QFile f(fName);
470  if (f.open(IO_WriteOnly))
471  {
472  FTextStream t(&f);
473 
474  QCString indexName="index"+Doxygen::htmlFileExtension;
475  t << "[OPTIONS]\n";
476  if (!Config_getString("CHM_FILE").isEmpty())
477  {
478  t << "Compiled file=" << Config_getString("CHM_FILE") << "\n";
479  }
480  t << "Compatibility=1.1\n"
481  "Full-text search=Yes\n"
482  "Contents file=index.hhc\n"
483  "Default Window=main\n"
484  "Default topic=" << indexName << "\n"
485  "Index file=index.hhk\n"
486  "Language=" << getLanguageString() << endl;
487  if (Config_getBool("BINARY_TOC")) t << "Binary TOC=YES\n";
488  if (Config_getBool("GENERATE_CHI")) t << "Create CHI file=YES\n";
489  t << "Title=" << recode(Config_getString("PROJECT_NAME")) << endl << endl;
490 
491  t << "[WINDOWS]" << endl;
492 
493  // NOTE: the 0x10387e number is a set of bits specifying the buttons
494  // which should appear in the CHM viewer; that specific value
495  // means "show all buttons including the font-size one";
496  // the font-size one is not normally settable by the HTML Help Workshop
497  // utility but the way to set it is described here:
498  // http://support.microsoft.com/?scid=kb%3Ben-us%3B240062&x=17&y=18
499  // NOTE: the 0x70387e number in addition to the above the Next and Prev button
500  // are shown. They can only be shown in case of a binary toc.
501  // dee http://www.mif2go.com/xhtml/htmlhelp_0016_943addingtabsandtoolbarbuttonstohtmlhelp.htm#Rz108x95873
502  // Value has been taken from htmlhelp.h file of the HTML Help Workshop
503  if (Config_getBool("BINARY_TOC"))
504  {
505  t << "main=\"" << recode(Config_getString("PROJECT_NAME")) << "\",\"index.hhc\","
506  "\"index.hhk\",\"" << indexName << "\",\"" <<
507  indexName << "\",,,,,0x23520,,0x70387e,,,,,,,,0" << endl << endl;
508  }
509  else
510  {
511  t << "main=\"" << recode(Config_getString("PROJECT_NAME")) << "\",\"index.hhc\","
512  "\"index.hhk\",\"" << indexName << "\",\"" <<
513  indexName << "\",,,,,0x23520,,0x10387e,,,,,,,,0" << endl << endl;
514  }
515 
516  t << "[FILES]" << endl;
517  char *s = indexFiles.first();
518  while (s)
519  {
520  t << s << endl;
521  s = indexFiles.next();
522  }
523  uint i;
524  for (i=0;i<imageFiles.count();i++)
525  {
526  t << imageFiles.at(i) << endl;
527  }
528  f.close();
529  }
530  else
531  {
532  err("Could not open file %s for writing\n",fName.data());
533  }
534 }
535 
536 void HtmlHelp::addIndexFile(const char *s)
537 {
538  if (indexFileDict.find(s)==0)
539  {
540  indexFiles.append(s);
541  indexFileDict.insert(s,(void *)0x8);
542  }
543 }
544 
545 /*! Finalizes the HTML help. This will finish and close the
546  * contents file (index.hhc) and the index file (index.hhk).
547  * \sa initialize()
548  */
550 {
551  // end the contents file
552  cts << "</UL>\n";
553  cts << "</BODY>\n";
554  cts << "</HTML>\n";
555  cts.unsetDevice();
556  cf->close();
557  delete cf;
558 
560 
561  // end the index file
562  kts << "</UL>\n";
563  kts << "</BODY>\n";
564  kts << "</HTML>\n";
565  kts.unsetDevice();
566  kf->close();
567  delete kf;
568 
570  s_languageDict.clear();
571 }
572 
573 /*! Increase the level of the contents hierarchy.
574  * This will start a new unnumbered HTML list in contents file.
575  * \sa decContentsDepth()
576  */
578 {
579  int i; for (i=0;i<dc+1;i++) cts << " ";
580  cts << "<UL>\n";
581  ++dc;
582 }
583 
584 /*! Decrease the level of the contents hierarchy.
585  * This will end the unnumber HTML list.
586  * \sa incContentsDepth()
587  */
589 {
590  int i; for (i=0;i<dc;i++) cts << " ";
591  cts << "</UL>\n";
592  --dc;
593 }
594 
596 {
597  int iSize = s.length();
598  int oSize = iSize*4+1;
599  QCString output(oSize);
600  size_t iLeft = iSize;
601  size_t oLeft = oSize;
602  char *iPtr = s.rawData();
603  char *oPtr = output.rawData();
604  if (!portable_iconv(m_fromUtf8,&iPtr,&iLeft,&oPtr,&oLeft))
605  {
606  oSize -= (int)oLeft;
607  output.resize(oSize+1);
608  output.at(oSize)='\0';
609  return output;
610  }
611  else
612  {
613  return s;
614  }
615 }
616 
617 /*! Add an list item to the contents file.
618  * \param isDir boolean indicating if this is a dir or file entry
619  * \param name the name of the item.
620  * \param ref the URL of to the item.
621  * \param file the file in which the item is defined.
622  * \param anchor the anchor of the item.
623  * \param separateIndex not used.
624  * \param addToNavIndex not used.
625  * \param def not used.
626  */
628  const char *name,
629  const char * /*ref*/,
630  const char *file,
631  const char *anchor,
632  bool /* separateIndex */,
633  bool /* addToNavIndex */,
634  Definition * /* def */)
635 {
636  // If we're using a binary toc then folders cannot have links.
637  // Tried this and I didn't see any problems, when not using
638  // the resetting of file and anchor the TOC works better
639  // (prev / next button)
640  //if(Config_getBool("BINARY_TOC") && isDir)
641  //{
642  //file = 0;
643  //anchor = 0;
644  //}
645  int i; for (i=0;i<dc;i++) cts << " ";
646  cts << "<LI><OBJECT type=\"text/sitemap\">";
647  cts << "<param name=\"Name\" value=\"" << convertToHtml(recode(name),TRUE) << "\">";
648  if (file) // made file optional param - KPW
649  {
650  if (file && (file[0]=='!' || file[0]=='^')) // special markers for user defined URLs
651  {
652  cts << "<param name=\"";
653  if (file[0]=='^') cts << "URL"; else cts << "Local";
654  cts << "\" value=\"";
655  cts << &file[1];
656  }
657  else
658  {
659  cts << "<param name=\"Local\" value=\"";
660  cts << file << Doxygen::htmlFileExtension;
661  if (anchor) cts << "#" << anchor;
662  }
663  cts << "\">";
664  }
665  cts << "<param name=\"ImageNumber\" value=\"";
666  if (isDir) // added - KPW
667  {
668  cts << (int)BOOK_CLOSED ;
669  }
670  else
671  {
672  cts << (int)TEXT;
673  }
674  cts << "\">";
675  cts << "</OBJECT>\n";
676 }
677 
678 
680  const char *sectionAnchor,const char *word)
681 {
682  if (md)
683  {
684  static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES");
685  if (context==0) // global member
686  {
687  if (md->getGroupDef())
688  context = md->getGroupDef();
689  else if (md->getFileDef())
690  context = md->getFileDef();
691  }
692  if (context==0) return; // should not happen
693 
694  QCString cfname = md->getOutputFileBase();
695  QCString cfiname = context->getOutputFileBase();
696  QCString level1 = context->name();
697  QCString level2 = md->name();
698  QCString contRef = separateMemberPages ? cfname : cfiname;
699  QCString memRef = cfname;
700  QCString anchor = sectionAnchor ? QCString(sectionAnchor) : md->anchor();
701  index->addItem(level1,level2,contRef,anchor,TRUE,FALSE);
702  index->addItem(level2,level1,memRef,anchor,TRUE,TRUE);
703  }
704  else if (context)
705  {
706  QCString level1 = word ? QCString(word) : context->name();
707  index->addItem(level1,0,context->getOutputFileBase(),sectionAnchor,TRUE,FALSE);
708  }
709 }
710 
712 {
713  if (!imageFiles.contains(fileName)) imageFiles.append(fileName);
714 }
715 
static QCString name
Definition: declinfo.cpp:673
bool resize(uint newlen)
Definition: qcstring.h:225
char * rawData() const
Definition: qcstring.h:216
void addContentsItem(bool isDir, const char *name, const char *ref, const char *file, const char *anchor, bool separateIndex, bool addToNavIndex, Definition *def)
Definition: htmlhelp.cpp:627
bool reversed
Definition: htmlhelp.cpp:49
static QCString result
bool isEmpty() const
Definition: qcstring.h:189
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
QCString url
Definition: htmlhelp.cpp:46
IndexFieldSDict * dict
Definition: htmlhelp.cpp:78
uint length() const
Definition: qcstring.h:195
#define IO_WriteOnly
Definition: qiodevice.h:62
static QCString htmlFileExtension
Definition: doxygen.h:130
type * first()
Definition: qinternallist.h:87
char & at(uint i) const
Definition: qcstring.h:326
void setDevice(QIODevice *)
size_t portable_iconv(void *cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
Definition: portable_c.c:24
const bool FALSE
Definition: qglobal.h:370
QCString left(uint len) const
Definition: qcstring.cpp:213
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
void unsetDevice()
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
virtual QCString getOutputFileBase() const =0
void append(const char *key, const T *d)
Definition: sortdict.h:135
QDict< void > indexFileDict
Definition: htmlhelp.h:98
QCString copy() const
Definition: qcstring.h:250
void setAutoDelete(bool val)
Definition: sortdict.h:222
int portable_iconv_close(void *cd)
Definition: portable_c.c:30
uint contains(const type *d) const
Definition: qinternallist.h:78
FileDef * getFileDef() const
Definition: memberdef.cpp:4075
Definition: sortdict.h:73
static HtmlHelp * theInstance
Definition: htmlhelp.h:99
const QCString & name() const
Definition: definition.h:114
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
fileName
Definition: dumpTree.py:9
def key(type, name=None)
Definition: graph.py:13
QCString convertToHtml(const char *s, bool keepEntities)
Definition: util.cpp:5746
QCString right(uint len) const
Definition: qcstring.cpp:231
bool open(int)
Definition: qfile_unix.cpp:134
void addIndexFile(const char *name)
Definition: htmlhelp.cpp:536
QStrList indexFiles
Definition: htmlhelp.h:96
void addImageFile(const char *)
Definition: htmlhelp.cpp:711
void addIndexItem(Definition *context, MemberDef *md, const char *sectionAnchor, const char *title)
Definition: htmlhelp.cpp:679
void append(const type *d)
Definition: qinternallist.h:61
A bunch of utility functions.
const char * data() const
Definition: qcstring.h:207
void writeFields(FTextStream &t)
Definition: htmlhelp.cpp:168
QCString recode(const QCString &s)
Definition: htmlhelp.cpp:595
QCString anchor() const
Definition: memberdef.cpp:1031
QCString name
Definition: htmlhelp.cpp:45
#define Config_getString(val)
Definition: config.cpp:660
HtmlHelpIndex(HtmlHelp *help)
Definition: htmlhelp.cpp:83
static QDict< QCString > s_languageDict
Definition: htmlhelp.cpp:296
void * portable_iconv_open(const char *tocode, const char *fromcode)
Definition: portable_c.c:19
#define Config_getBool(val)
Definition: config.cpp:664
bool link
Definition: htmlhelp.cpp:48
QCString anchor
Definition: htmlhelp.cpp:47
type * next()
Definition: qinternallist.h:89
void err(const char *fmt,...)
Definition: message.cpp:226
FTextStream kts
Definition: htmlhelp.h:93
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
static QCString field2URL(const IndexField *f, bool checkReversed)
Definition: htmlhelp.cpp:132
GroupDef * getGroupDef() const
Definition: memberdef.cpp:4095
void sort()
Definition: sortdict.h:188
void initialize()
Definition: htmlhelp.cpp:303
virtual QCString idLanguage()=0
void * m_fromUtf8
Definition: htmlhelp.h:101
QCString getOutputFileBase() const
Definition: memberdef.cpp:941
QFile * cf
Definition: htmlhelp.h:92
void addItem(const char *first, const char *second, const char *url, const char *anchor, bool hasLink, bool reversed)
Definition: htmlhelp.cpp:108
Translator * theTranslator
Definition: language.cpp:157
QFile * kf
Definition: htmlhelp.h:92
QStrList imageFiles
Definition: htmlhelp.h:97
HtmlHelpIndex * index
Definition: htmlhelp.h:94
type * at(uint i)
Definition: qinternallist.h:81
friend class Iterator
Definition: sortdict.h:289
static QCString getLanguageString()
Definition: htmlhelp.cpp:449
void createProjectFile()
Definition: htmlhelp.cpp:465
void incContentsDepth()
Definition: htmlhelp.cpp:577
uint count() const
Definition: qinternallist.h:56
int compareValues(const IndexField *item1, const IndexField *item2) const
Definition: htmlhelp.cpp:59
second_as<> second
Type of time stored in seconds, in double precision.
Definition: spacetime.h:85
int dc
Definition: htmlhelp.h:95
void finalize()
Definition: htmlhelp.cpp:549
T * find(const char *key)
Definition: sortdict.h:232
void close()
Definition: qfile_unix.cpp:614
void decContentsDepth()
Definition: htmlhelp.cpp:588
friend class HtmlHelpIndex
Definition: htmlhelp.h:89
unsigned uint
Definition: qglobal.h:351
FTextStream cts
Definition: htmlhelp.h:93
static QCString * s
Definition: config.cpp:1042
union ptb::content::word::word word
const bool TRUE
Definition: qglobal.h:371
static QCString str
Portable versions of functions that are platform dependent.
QTextStream & endl(QTextStream &s)
HtmlHelp * m_help
Definition: htmlhelp.cpp:79