htmlgen.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  */
17 
18 #include <stdlib.h>
19 
20 #include <qdir.h>
21 #include <qregexp.h>
22 #include "message.h"
23 #include "htmlgen.h"
24 #include "config.h"
25 #include "util.h"
26 #include "doxygen.h"
27 #include "logos.h"
28 #include "diagram.h"
29 #include "version.h"
30 #include "dot.h"
31 #include "language.h"
32 #include "htmlhelp.h"
33 #include "docparser.h"
34 #include "htmldocvisitor.h"
35 #include "searchindex.h"
36 #include "pagedef.h"
37 #include "debug.h"
38 #include "dirdef.h"
39 #include "vhdldocgen.h"
40 #include "layout.h"
41 #include "image.h"
42 #include "ftvhelp.h"
43 #include "bufstr.h"
44 #include "resourcemgr.h"
45 
46 
47 //#define DBG_HTML(x) x;
48 #define DBG_HTML(x)
49 
53 
54 
55 static void writeClientSearchBox(FTextStream &t,const char *relPath)
56 {
57  t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
58  t << " <span class=\"left\">\n";
59  t << " <img id=\"MSearchSelect\" src=\"" << relPath << "search/mag_sel.png\"\n";
60  t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n";
61  t << " onmouseout=\"return searchBox.OnSearchSelectHide()\"\n";
62  t << " alt=\"\"/>\n";
63  t << " <input type=\"text\" id=\"MSearchField\" value=\""
64  << theTranslator->trSearch() << "\" accesskey=\"S\"\n";
65  t << " onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n";
66  t << " onblur=\"searchBox.OnSearchFieldFocus(false)\" \n";
67  t << " onkeyup=\"searchBox.OnSearchFieldChange(event)\"/>\n";
68  t << " </span><span class=\"right\">\n";
69  t << " <a id=\"MSearchClose\" href=\"javascript:searchBox.CloseResultsWindow()\">"
70  << "<img id=\"MSearchCloseImg\" border=\"0\" src=\"" << relPath << "search/close.png\" alt=\"\"/></a>\n";
71  t << " </span>\n";
72  t << " </div>\n";
73 }
74 
75 static void writeServerSearchBox(FTextStream &t,const char *relPath,bool highlightSearch)
76 {
77  static bool externalSearch = Config_getBool("EXTERNAL_SEARCH");
78  t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
79  t << " <div class=\"left\">\n";
80  t << " <form id=\"FSearchBox\" action=\"" << relPath;
81  if (externalSearch)
82  {
83  t << "search" << Doxygen::htmlFileExtension;
84  }
85  else
86  {
87  t << "search.php";
88  }
89  t << "\" method=\"get\">\n";
90  t << " <img id=\"MSearchSelect\" src=\"" << relPath << "search/mag.png\" alt=\"\"/>\n";
91  if (!highlightSearch)
92  {
93  t << " <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\""
94  << theTranslator->trSearch() << "\" size=\"20\" accesskey=\"S\" \n";
95  t << " onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n";
96  t << " onblur=\"searchBox.OnSearchFieldFocus(false)\"/>\n";
97  t << " </form>\n";
98  t << " </div><div class=\"right\"></div>\n";
99  t << " </div>\n";
100  }
101 }
102 
103 //------------------------------------------------------------------------
104 
105 /// Clear a text block \a s from \a begin to \a end markers
106 QCString clearBlock(const char *s,const char *begin,const char *end)
107 {
108  if (s==0 || begin==0 || end==0) return s;
109  const char *p, *q;
110  int beginLen = qstrlen(begin);
111  int endLen = qstrlen(end);
112  int resLen = 0;
113  for (p=s; (q=strstr(p,begin))!=0; p=q+endLen)
114  {
115  resLen+=(int)(q-p);
116  p=q+beginLen;
117  if ((q=strstr(p,end))==0)
118  {
119  resLen+=beginLen;
120  break;
121  }
122  }
123  resLen+=qstrlen(p);
124  // resLen is the length of the string without the marked block
125 
126  QCString result(resLen+1);
127  char *r;
128  for (r=result.rawData(), p=s; (q=strstr(p,begin))!=0; p=q+endLen)
129  {
130  int l = (int)(q-p);
131  memcpy(r,p,l);
132  r+=l;
133  p=q+beginLen;
134  if ((q=strstr(p,end))==0)
135  {
136  memcpy(r,begin,beginLen);
137  r+=beginLen;
138  break;
139  }
140  }
141  qstrcpy(r,p);
142  return result;
143 }
144 //----------------------------------------------------------------------
145 
146 QCString selectBlock(const QCString& s,const QCString &name,bool enable)
147 {
148  // TODO: this is an expensive function that is called a lot -> optimize it
149  const QCString begin = "<!--BEGIN " + name + "-->";
150  const QCString end = "<!--END " + name + "-->";
151  const QCString nobegin = "<!--BEGIN !" + name + "-->";
152  const QCString noend = "<!--END !" + name + "-->";
153 
154  QCString result = s;
155  if (enable)
156  {
157  result = substitute(result, begin, "");
158  result = substitute(result, end, "");
159  result = clearBlock(result, nobegin, noend);
160  }
161  else
162  {
163  result = substitute(result, nobegin, "");
164  result = substitute(result, noend, "");
165  result = clearBlock(result, begin, end);
166  }
167 
168  return result;
169 }
170 
171 static QCString getSearchBox(bool serverSide, QCString relPath, bool highlightSearch)
172 {
174  FTextStream t(&result);
175  if (serverSide)
176  {
177  writeServerSearchBox(t, relPath, highlightSearch);
178  }
179  else
180  {
181  writeClientSearchBox(t, relPath);
182  }
183  return QCString(result);
184 }
185 
187 {
188  BufStr out(s.length()+1);
189  const char *p=s.data();
190  if (p)
191  {
192  char c;
193  while ((c=*p++))
194  {
195  if (c=='\n')
196  {
197  const char *e = p;
198  while (*e==' ' || *e=='\t') e++;
199  if (*e=='\n')
200  {
201  p=e;
202  }
203  else out.addChar(c);
204  }
205  else
206  {
207  out.addChar(c);
208  }
209  }
210  }
211  out.addChar('\0');
212  //printf("removeEmptyLines(%s)=%s\n",s.data(),out.data());
213  return out.data();
214 }
215 
217  const QCString &title,
218  const QCString &relPath,
219  const QCString &navPath=QCString())
220 {
221  // Build CSS/Javascript tags depending on treeview, search engine settings
222  QCString cssFile;
223  QStrList extraCssFile;
224  QCString generatedBy;
225  QCString treeViewCssJs;
226  QCString searchCssJs;
227  QCString searchBox;
228  QCString mathJaxJs;
229  QCString extraCssText;
230 
231  static QCString projectName = Config_getString("PROJECT_NAME");
232  static bool timeStamp = Config_getBool("HTML_TIMESTAMP");
233  static bool treeView = Config_getBool("GENERATE_TREEVIEW");
234  static bool searchEngine = Config_getBool("SEARCHENGINE");
235  static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
236  static bool mathJax = Config_getBool("USE_MATHJAX");
237  static QCString mathJaxFormat = Config_getEnum("MATHJAX_FORMAT");
238  static bool disableIndex = Config_getBool("DISABLE_INDEX");
239  static bool hasProjectName = !projectName.isEmpty();
240  static bool hasProjectNumber = !Config_getString("PROJECT_NUMBER").isEmpty();
241  static bool hasProjectBrief = !Config_getString("PROJECT_BRIEF").isEmpty();
242  static bool hasProjectLogo = !Config_getString("PROJECT_LOGO").isEmpty();
243  static bool titleArea = (hasProjectName || hasProjectBrief || hasProjectLogo || (disableIndex && searchEngine));
244 
245  cssFile = Config_getString("HTML_STYLESHEET");
246  if (cssFile.isEmpty())
247  {
248  cssFile = "doxygen.css";
249  }
250  else
251  {
252  QFileInfo cssfi(cssFile);
253  if (cssfi.exists())
254  {
255  cssFile = cssfi.fileName().utf8();
256  }
257  else
258  {
259  cssFile = "doxygen.css";
260  }
261  }
262 
263  extraCssText = "";
264  extraCssFile = Config_getList("HTML_EXTRA_STYLESHEET");
265  for (uint i=0; i<extraCssFile.count(); ++i)
266  {
267  QCString fileName(extraCssFile.at(i));
268  if (!fileName.isEmpty())
269  {
270  QFileInfo fi(fileName);
271  if (fi.exists())
272  {
273  extraCssText += "<link href=\"$relpath^"+stripPath(fileName)+"\" rel=\"stylesheet\" type=\"text/css\"/>\n";
274  }
275  }
276  }
277 
278  if (timeStamp)
279  {
280  generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), convertToHtml(Config_getString("PROJECT_NAME")));
281  }
282  else
283  {
284  generatedBy = theTranslator->trGeneratedBy();
285  }
286 
287  if (treeView)
288  {
289  treeViewCssJs = "<link href=\"$relpath^navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"
290  "<script type=\"text/javascript\" src=\"$relpath^resize.js\"></script>\n"
291  "<script type=\"text/javascript\" src=\"$relpath^navtreedata.js\"></script>\n"
292  "<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n"
293  "<script type=\"text/javascript\">\n"
294  " $(document).ready(initResizable);\n"
295  " $(window).load(resizeHeight);\n"
296  "</script>";
297  }
298 
299  if (searchEngine)
300  {
301  searchCssJs = "<link href=\"$relpath^search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n";
302  if (!serverBasedSearch)
303  {
304  searchCssJs += "<script type=\"text/javascript\" src=\"$relpath^search/searchdata.js\"></script>\n";
305  }
306  searchCssJs += "<script type=\"text/javascript\" src=\"$relpath^search/search.js\"></script>\n";
307 
308  if (!serverBasedSearch)
309  {
310  searchCssJs += "<script type=\"text/javascript\">\n"
311  " $(document).ready(function() { init_search(); });\n"
312  "</script>";
313  }
314  else
315  {
316  searchCssJs += "<script type=\"text/javascript\">\n"
317  " $(document).ready(function() {\n"
318  " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n"
319  " });\n"
320  "</script>\n";
321 
322  // OPENSEARCH_PROVIDER {
323  searchCssJs += "<link rel=\"search\" href=\"" + relPath +
324  "search_opensearch.php?v=opensearch.xml\" "
325  "type=\"application/opensearchdescription+xml\" title=\"" +
326  (hasProjectName ? projectName : QCString("Doxygen")) +
327  "\"/>";
328  // OPENSEARCH_PROVIDER }
329  }
330  searchBox = getSearchBox(serverBasedSearch, relPath, FALSE);
331  }
332 
333  if (mathJax)
334  {
335  QCString path = Config_getString("MATHJAX_RELPATH");
336  if (path.isEmpty() || path.left(2)=="..") // relative path
337  {
338  path.prepend(relPath);
339  }
340  mathJaxJs = "<script type=\"text/x-mathjax-config\">\n"
341  " MathJax.Hub.Config({\n"
342  " extensions: [\"tex2jax.js\"";
343  QStrList &mathJaxExtensions = Config_getList("MATHJAX_EXTENSIONS");
344  const char *s = mathJaxExtensions.first();
345  while (s)
346  {
347  mathJaxJs+= ", \""+QCString(s)+".js\"";
348  s = mathJaxExtensions.next();
349  }
350  if (mathJaxFormat.isEmpty())
351  {
352  mathJaxFormat = "HTML-CSS";
353  }
354  mathJaxJs += "],\n"
355  " jax: [\"input/TeX\",\"output/"+mathJaxFormat+"\"],\n"
356  "});\n";
357  if (!g_mathjax_code.isEmpty())
358  {
359  mathJaxJs += g_mathjax_code;
360  mathJaxJs += "\n";
361  }
362  mathJaxJs += "</script>";
363  mathJaxJs += "<script type=\"text/javascript\" src=\"" + path + "MathJax.js\"></script>\n";
364  }
365 
366  // first substitute generic keywords
368  convertToHtml(Config_getString("PROJECT_NAME")),
369  convertToHtml(Config_getString("PROJECT_NUMBER")),
370  convertToHtml(Config_getString("PROJECT_BRIEF")));
371 
372  // additional HTML only keywords
373  result = substitute(result,"$navpath",navPath);
374  result = substitute(result,"$stylesheet",cssFile);
375  result = substitute(result,"$treeview",treeViewCssJs);
376  result = substitute(result,"$searchbox",searchBox);
377  result = substitute(result,"$search",searchCssJs);
378  result = substitute(result,"$mathjax",mathJaxJs);
379  result = substitute(result,"$generatedby",generatedBy);
380  result = substitute(result,"$extrastylesheet",extraCssText);
381  result = substitute(result,"$relpath$",relPath); //<-- obsolete: for backwards compatibility only
382  result = substitute(result,"$relpath^",relPath); //<-- must be last
383 
384  // additional HTML only conditional blocks
385  result = selectBlock(result,"DISABLE_INDEX",disableIndex);
386  result = selectBlock(result,"GENERATE_TREEVIEW",treeView);
387  result = selectBlock(result,"SEARCHENGINE",searchEngine);
388  result = selectBlock(result,"TITLEAREA",titleArea);
389  result = selectBlock(result,"PROJECT_NAME",hasProjectName);
390  result = selectBlock(result,"PROJECT_NUMBER",hasProjectNumber);
391  result = selectBlock(result,"PROJECT_BRIEF",hasProjectBrief);
392  result = selectBlock(result,"PROJECT_LOGO",hasProjectLogo);
393 
394  result = removeEmptyLines(result);
395 
396  return result;
397 }
398 
399 //--------------------------------------------------------------------------
400 
402  : m_streamSet(FALSE), m_col(0)
403 {
404 }
405 
407  : m_col(0), m_relPath(relPath)
408 {
409  setTextStream(t);
410 }
411 
413 {
414  m_streamSet = t.device()!=0;
415  m_t.setDevice(t.device());
416 }
417 
419 {
420  m_relPath = path;
421 }
422 
424 {
425  static int tabSize = Config_getInt("TAB_SIZE");
426  if (str && m_streamSet)
427  {
428  const char *p=str;
429  char c;
430  int spacesToNextTabStop;
431  while (*p)
432  {
433  c=*p++;
434  switch(c)
435  {
436  case '\t': spacesToNextTabStop =
437  tabSize - (m_col%tabSize);
438  m_t << Doxygen::spaces.left(spacesToNextTabStop);
439  m_col+=spacesToNextTabStop;
440  break;
441  case '\n': m_t << "\n"; m_col=0;
442  break;
443  case '\r': break;
444  case '<': m_t << "&lt;"; m_col++;
445  break;
446  case '>': m_t << "&gt;"; m_col++;
447  break;
448  case '&': m_t << "&amp;"; m_col++;
449  break;
450  case '\'': m_t << "&#39;"; m_col++; // &apos; is not valid XHTML
451  break;
452  case '"': m_t << "&quot;"; m_col++;
453  break;
454  case '\\':
455  if (*p=='<')
456  { m_t << "&lt;"; p++; }
457  else if (*p=='>')
458  { m_t << "&gt;"; p++; }
459  else
460  m_t << "\\";
461  m_col++;
462  break;
463  default: p=writeUtf8Char(m_t,p-1);
464  m_col++;
465  break;
466  }
467  }
468  }
469 }
470 
472 {
473  if (str && m_streamSet)
474  {
475  const char *p=str;
476  char c;
477  while (*p)
478  {
479  c=*p++;
480  switch(c)
481  {
482  case '<': m_t << "&lt;"; break;
483  case '>': m_t << "&gt;"; break;
484  case '&': m_t << "&amp;"; break;
485  case '"': m_t << "&quot;"; break;
486  case '\\':
487  if (*p=='<')
488  { m_t << "&lt;"; p++; }
489  else if (*p=='>')
490  { m_t << "&gt;"; p++; }
491  else
492  m_t << "\\";
493  break;
494  default: m_t << c;
495  }
496  }
497  }
498 }
499 
500 void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename,
501  const char *anchor,int l)
502 {
503  if (!m_streamSet) return;
504  const int maxLineNrStr = 10;
505  char lineNumber[maxLineNrStr];
506  char lineAnchor[maxLineNrStr];
507  qsnprintf(lineNumber,maxLineNrStr,"%5d",l);
508  qsnprintf(lineAnchor,maxLineNrStr,"l%05d",l);
509 
510  m_t << "<div class=\"line\">";
511  m_t << "<a name=\"" << lineAnchor << "\"></a><span class=\"lineno\">";
512  if (filename)
513  {
514  _writeCodeLink("line",ref,filename,anchor,lineNumber,0);
515  }
516  else
517  {
518  codify(lineNumber);
519  }
520  m_t << "</span>";
521  m_t << "&#160;";
522 }
523 
524 void HtmlCodeGenerator::writeCodeLink(const char *ref,const char *f,
525  const char *anchor, const char *name,
526  const char *tooltip)
527 {
528  if (!m_streamSet) return;
529  //printf("writeCodeLink(ref=%s,f=%s,anchor=%s,name=%s,tooltip=%s)\n",ref,f,anchor,name,tooltip);
530  _writeCodeLink("code",ref,f,anchor,name,tooltip);
531 }
532 
534  const char *ref,const char *f,
535  const char *anchor, const char *name,
536  const char *tooltip)
537 {
538  if (ref)
539  {
540  m_t << "<a class=\"" << className << "Ref\" ";
542  }
543  else
544  {
545  m_t << "<a class=\"" << className << "\" ";
546  }
547  m_t << "href=\"";
548  m_t << externalRef(m_relPath,ref,TRUE);
549  if (f) m_t << f << Doxygen::htmlFileExtension;
550  if (anchor) m_t << "#" << anchor;
551  m_t << "\"";
552  if (tooltip) m_t << " title=\"" << convertToHtml(tooltip) << "\"";
553  m_t << ">";
554  docify(name);
555  m_t << "</a>";
556  m_col+=qstrlen(name);
557 }
558 
559 void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
560  const char *decl, const char *desc,
561  const SourceLinkInfo &defInfo,
562  const SourceLinkInfo &declInfo)
563 {
564  m_t << "<div class=\"ttc\" id=\"" << id << "\">";
565  m_t << "<div class=\"ttname\">";
566  if (!docInfo.url.isEmpty())
567  {
568  m_t << "<a href=\"";
569  m_t << externalRef(m_relPath,docInfo.ref,TRUE);
570  m_t << docInfo.url << Doxygen::htmlFileExtension;
571  if (!docInfo.anchor.isEmpty())
572  {
573  m_t << "#" << docInfo.anchor;
574  }
575  m_t << "\">";
576  }
577  docify(docInfo.name);
578  if (!docInfo.url.isEmpty())
579  {
580  m_t << "</a>";
581  }
582  m_t << "</div>";
583  if (decl)
584  {
585  m_t << "<div class=\"ttdeci\">";
586  docify(decl);
587  m_t << "</div>";
588  }
589  if (desc)
590  {
591  m_t << "<div class=\"ttdoc\">";
592  docify(desc); // desc is already HTML escaped; but there are still < and > signs
593  m_t << "</div>";
594  }
595  if (!defInfo.file.isEmpty())
596  {
597  m_t << "<div class=\"ttdef\"><b>Definition:</b> ";
598  if (!defInfo.url.isEmpty())
599  {
600  m_t << "<a href=\"";
601  m_t << externalRef(m_relPath,defInfo.ref,TRUE);
602  m_t << defInfo.url << Doxygen::htmlFileExtension;
603  if (!defInfo.anchor.isEmpty())
604  {
605  m_t << "#" << defInfo.anchor;
606  }
607  m_t << "\">";
608  }
609  m_t << defInfo.file << ":" << defInfo.line;
610  if (!defInfo.url.isEmpty())
611  {
612  m_t << "</a>";
613  }
614  m_t << "</div>";
615  }
616  if (!declInfo.file.isEmpty())
617  {
618  m_t << "<div class=\"ttdecl\"><b>Declaration:</b> ";
619  if (!declInfo.url.isEmpty())
620  {
621  m_t << "<a href=\"";
622  m_t << externalRef(m_relPath,declInfo.ref,TRUE);
623  m_t << declInfo.url << Doxygen::htmlFileExtension;
624  if (!declInfo.anchor.isEmpty())
625  {
626  m_t << "#" << declInfo.anchor;
627  }
628  m_t << "\">";
629  }
630  m_t << declInfo.file << ":" << declInfo.line;
631  if (!declInfo.url.isEmpty())
632  {
633  m_t << "</a>";
634  }
635  m_t << "</div>";
636  }
637  m_t << "</div>" << endl;
638 }
639 
640 
641 void HtmlCodeGenerator::startCodeLine(bool hasLineNumbers)
642 {
643  if (m_streamSet)
644  {
645  if (!hasLineNumbers) m_t << "<div class=\"line\">";
646  m_col=0;
647  }
648 }
649 
651 {
652  if (m_streamSet) m_t << "</div>";
653 }
654 
656 {
657  if (m_streamSet) m_t << "<span class=\"" << s << "\">";
658 }
659 
661 {
662  if (m_streamSet) m_t << "</span>";
663 }
664 
665 void HtmlCodeGenerator::writeCodeAnchor(const char *anchor)
666 {
667  if (m_streamSet) m_t << "<a name=\"" << anchor << "\"></a>";
668 }
669 
670 //--------------------------------------------------------------------------
671 
673 {
674  dir=Config_getString("HTML_OUTPUT");
676 }
677 
679 {
680  //printf("HtmlGenerator::~HtmlGenerator()\n");
681 }
682 
684 {
685  QCString dname=Config_getString("HTML_OUTPUT");
686  QDir d(dname);
687  if (!d.exists() && !d.mkdir(dname))
688  {
689  err("Could not create output directory %s\n",dname.data());
690  exit(1);
691  }
692  //writeLogo(dname);
693  if (!Config_getString("HTML_HEADER").isEmpty())
694  {
695  g_header=fileToString(Config_getString("HTML_HEADER"));
696  //printf("g_header='%s'\n",g_header.data());
697  }
698  else
699  {
700  g_header = ResourceMgr::instance().getAsString("header.html");
701  }
702 
703  if (!Config_getString("HTML_FOOTER").isEmpty())
704  {
705  g_footer=fileToString(Config_getString("HTML_FOOTER"));
706  //printf("g_footer='%s'\n",g_footer.data());
707  }
708  else
709  {
710  g_footer = ResourceMgr::instance().getAsString("footer.html");
711  }
712 
713  if (Config_getBool("USE_MATHJAX"))
714  {
715  if (!Config_getString("MATHJAX_CODEFILE").isEmpty())
716  {
717  g_mathjax_code=fileToString(Config_getString("MATHJAX_CODEFILE"));
718  //printf("g_mathjax_code='%s'\n",g_mathjax_code.data());
719  }
720  }
721  createSubDirs(d);
722 
724  mgr.copyResource("tabs.css",dname);
725  mgr.copyResource("jquery.js",dname);
726  if (Config_getBool("INTERACTIVE_SVG"))
727  {
728  mgr.copyResource("svgpan.js",dname);
729  }
730 
731  {
732  QFile f(dname+"/dynsections.js");
733  if (f.open(IO_WriteOnly))
734  {
735  FTextStream t(&f);
736  t << mgr.getAsString("dynsections.js");
737  if (Config_getBool("SOURCE_BROWSER") && Config_getBool("SOURCE_TOOLTIPS"))
738  {
739  t << endl <<
740  "$(document).ready(function() {\n"
741  " $('.code,.codeRef').each(function() {\n"
742  " $(this).data('powertip',$('#'+$(this).attr('href').replace(/.*\\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());\n"
743  " $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true });\n"
744  " });\n"
745  "});\n";
746  }
747  }
748  }
749 }
750 
751 /// Additional initialization after indices have been created
753 {
755  QCString dname=Config_getString("HTML_OUTPUT");
757  //writeColoredImgData(dname,colored_tab_data);
758  mgr.copyResource("tab_a.lum",dname);
759  mgr.copyResource("tab_b.lum",dname);
760  mgr.copyResource("tab_h.lum",dname);
761  mgr.copyResource("tab_s.lum",dname);
762  mgr.copyResource("nav_h.lum",dname);
763  mgr.copyResource("nav_f.lum",dname);
764  mgr.copyResource("bc_s.luma",dname);
765  mgr.copyResource("doxygen.luma",dname);
766  mgr.copyResource("closed.luma",dname);
767  mgr.copyResource("open.luma",dname);
768  mgr.copyResource("bdwn.luma",dname);
769  mgr.copyResource("sync_on.luma",dname);
770  mgr.copyResource("sync_off.luma",dname);
771 
772  //{
773  // unsigned char shadow[6] = { 5, 5, 5, 5, 5, 5 };
774  // unsigned char shadow_alpha[6] = { 80, 60, 40, 20, 10, 0 };
775  // ColoredImage img(1,6,shadow,shadow_alpha,0,0,100);
776  // img.save(dname+"/nav_g.png");
777  //}
778  mgr.copyResource("nav_g.png",dname);
779 }
780 
782 {
783  static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
784  //writeImgData(dir,serverBasedSearch ? search_server_data : search_client_data);
786 
787  mgr.copyResource("search_l.png",dir);
788  Doxygen::indexList->addImageFile("search/search_l.png");
789  mgr.copyResource("search_m.png",dir);
790  Doxygen::indexList->addImageFile("search/search_m.png");
791  mgr.copyResource("search_r.png",dir);
792  Doxygen::indexList->addImageFile("search/search_r.png");
793  if (serverBasedSearch)
794  {
795  mgr.copyResource("mag.png",dir);
796  Doxygen::indexList->addImageFile("search/mag.png");
797  }
798  else
799  {
800  mgr.copyResource("close.png",dir);
801  Doxygen::indexList->addImageFile("search/close.png");
802  mgr.copyResource("mag_sel.png",dir);
803  Doxygen::indexList->addImageFile("search/mag_sel.png");
804  }
805 
806  QCString searchDirName = Config_getString("HTML_OUTPUT")+"/search";
807  QFile f(searchDirName+"/search.css");
808  if (f.open(IO_WriteOnly))
809  {
810  FTextStream t(&f);
811  QCString searchCss = replaceColorMarkers(mgr.getAsString("search.css"));
812  searchCss = substitute(searchCss,"$doxygenversion",versionString);
813  if (Config_getBool("DISABLE_INDEX"))
814  {
815  // move up the search box if there are no tabs
816  searchCss = substitute(searchCss,"margin-top: 8px;","margin-top: 0px;");
817  }
818  t << searchCss;
819  Doxygen::indexList->addStyleSheetFile("search/search.css");
820  }
821 }
822 
824 {
825  FTextStream t(&file);
826  t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",versionString));
827 }
828 
829 void HtmlGenerator::writeHeaderFile(QFile &file, const char * /*cssname*/)
830 {
831  FTextStream t(&file);
832  t << "<!-- HTML header for doxygen " << versionString << "-->" << endl;
833  t << ResourceMgr::instance().getAsString("header.html");
834 }
835 
837 {
838  FTextStream t(&file);
839  t << "<!-- HTML footer for doxygen " << versionString << "-->" << endl;
840  t << ResourceMgr::instance().getAsString("footer.html");
841 }
842 
843 void HtmlGenerator::startFile(const char *name,const char *,
844  const char *title)
845 {
846  //printf("HtmlGenerator::startFile(%s)\n",name);
849  relPath = relativePathToRoot(fileName);
850 
852  {
853  fileName+=Doxygen::htmlFileExtension;
854  }
855  startPlainFile(fileName);
857  m_codeGen.setRelativePath(relPath);
858  Doxygen::indexList->addIndexFile(fileName);
859 
860  lastFile = fileName;
861  t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title)),relPath);
862 
863  t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
864  << versionString << " -->" << endl;
865  //static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
866  static bool searchEngine = Config_getBool("SEARCHENGINE");
867  if (searchEngine /*&& !generateTreeView*/)
868  {
869  t << "<script type=\"text/javascript\">\n";
870  t << "var searchBox = new SearchBox(\"searchBox\", \""
871  << relPath<< "search\",false,'" << theTranslator->trSearch() << "');\n";
872  t << "</script>\n";
873  }
874  //generateDynamicSections(t,relPath);
875  m_sectionCount=0;
876 }
877 
879 {
880  static bool searchEngine = Config_getBool("SEARCHENGINE");
881  static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
882  if (searchEngine && !serverBasedSearch)
883  {
884  (void)relPath;
885  t << "<!-- window showing the filter options -->\n";
886  t << "<div id=\"MSearchSelectWindow\"\n";
887  t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n";
888  t << " onmouseout=\"return searchBox.OnSearchSelectHide()\"\n";
889  t << " onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n";
890  t << "</div>\n";
891  t << "\n";
892  t << "<!-- iframe showing the search results (closed by default) -->\n";
893  t << "<div id=\"MSearchResultsWindow\">\n";
894  t << "<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n";
895  t << " name=\"MSearchResults\" id=\"MSearchResults\">\n";
896  t << "</iframe>\n";
897  t << "</div>\n";
898  t << "\n";
899  }
900 }
901 
903 {
904  writeSearchInfo(t,relPath);
905 }
906 
907 
909 {
910  static bool timeStamp = Config_getBool("HTML_TIMESTAMP");
912  if (timeStamp)
913  {
914  result += theTranslator->trGeneratedAt(
916  Config_getString("PROJECT_NAME")
917  );
918  }
919  else
920  {
921  result += theTranslator->trGeneratedBy();
922  }
923  result += "&#160;\n<a href=\"http://www.doxygen.org/index.html\">\n"
924  "<img class=\"footer\" src=\"";
925  result += path;
926  result += "doxygen.png\" alt=\"doxygen\"/></a> ";
927  result += versionString;
928  result += " ";
929  return result;
930 }
931 
933 {
934  t << writeLogoAsString(relPath);
935 }
936 
938  const QCString &relPath,const QCString &navPath)
939 {
940  t << substituteHtmlKeywords(g_footer,convertToHtml(lastTitle),relPath,navPath);
941 }
942 
943 void HtmlGenerator::writeFooter(const char *navPath)
944 {
945  writePageFooter(t,lastTitle,relPath,navPath);
946 }
947 
949 {
950  endPlainFile();
951 }
952 
954 {
955  t << "<h3 class=\"version\">";
956 }
957 
959 {
960  t << "</h3>";
961 }
962 
964 {
965  //printf("writeStyleInfo(%d)\n",part);
966  if (part==0)
967  {
968  if (Config_getString("HTML_STYLESHEET").isEmpty()) // write default style sheet
969  {
970  //printf("write doxygen.css\n");
971  startPlainFile("doxygen.css");
972 
973  // alternative, cooler looking titles
974  //t << "H1 { text-align: center; border-width: thin none thin none;" << endl;
975  //t << " border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }" << endl;
976 
977  t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",versionString));
978  endPlainFile();
979  Doxygen::indexList->addStyleSheetFile("doxygen.css");
980  }
981  else // write user defined style sheet
982  {
983  QCString cssname=Config_getString("HTML_STYLESHEET");
984  QFileInfo cssfi(cssname);
985  if (!cssfi.exists() || !cssfi.isFile() || !cssfi.isReadable())
986  {
987  err("style sheet %s does not exist or is not readable!", Config_getString("HTML_STYLESHEET").data());
988  }
989  else
990  {
991  // convert style sheet to string
992  QCString fileStr = fileToString(cssname);
993  // write the string into the output dir
994  startPlainFile(cssfi.fileName().utf8());
995  t << fileStr;
996  endPlainFile();
997  }
999  }
1000  static QStrList extraCssFile = Config_getList("HTML_EXTRA_STYLESHEET");
1001  for (uint i=0; i<extraCssFile.count(); ++i)
1002  {
1003  QCString fileName(extraCssFile.at(i));
1004  if (!fileName.isEmpty())
1005  {
1006  QFileInfo fi(fileName);
1007  if (fi.exists())
1008  {
1010  }
1011  }
1012  }
1013  }
1014 }
1015 
1016 void HtmlGenerator::startDoxyAnchor(const char *,const char *,
1017  const char *anchor, const char *,
1018  const char *)
1019 {
1020  t << "<a class=\"anchor\" id=\"" << anchor << "\"></a>";
1021 }
1022 
1023 void HtmlGenerator::endDoxyAnchor(const char *,const char *)
1024 {
1025 }
1026 
1027 //void HtmlGenerator::newParagraph()
1028 //{
1029 // t << endl << "<p>" << endl;
1030 //}
1031 
1033 {
1034  t << endl << "<p>";
1035 }
1036 
1038 {
1039  t << "</p>" << endl;
1040 }
1041 
1042 void HtmlGenerator::writeString(const char *text)
1043 {
1044  t << text;
1045 }
1046 
1048 {
1049  t << "<li>";
1050 }
1051 
1053 {
1054  t << "</li>" << endl;
1055 }
1056 
1057 void HtmlGenerator::startIndexItem(const char *ref,const char *f)
1058 {
1059  //printf("HtmlGenerator::startIndexItem(%s,%s)\n",ref,f);
1060  if (ref || f)
1061  {
1062  if (ref)
1063  {
1064  t << "<a class=\"elRef\" ";
1065  t << externalLinkTarget() << externalRef(relPath,ref,FALSE);
1066  }
1067  else
1068  {
1069  t << "<a class=\"el\" ";
1070  }
1071  t << "href=\"";
1072  t << externalRef(relPath,ref,TRUE);
1073  if (f) t << f << Doxygen::htmlFileExtension << "\">";
1074  }
1075  else
1076  {
1077  t << "<b>";
1078  }
1079 }
1080 
1081 void HtmlGenerator::endIndexItem(const char *ref,const char *f)
1082 {
1083  //printf("HtmlGenerator::endIndexItem(%s,%s,%s)\n",ref,f,name);
1084  if (ref || f)
1085  {
1086  t << "</a>";
1087  }
1088  else
1089  {
1090  t << "</b>";
1091  }
1092 }
1093 
1094 void HtmlGenerator::writeStartAnnoItem(const char *,const char *f,
1095  const char *path,const char *name)
1096 {
1097  t << "<li>";
1098  if (path) docify(path);
1099  t << "<a class=\"el\" href=\"" << f << Doxygen::htmlFileExtension << "\">";
1100  docify(name);
1101  t << "</a> ";
1102 }
1103 
1104 void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
1105  const char *anchor, const char *name)
1106 {
1107  if (ref)
1108  {
1109  t << "<a class=\"elRef\" ";
1110  t << externalLinkTarget() << externalRef(relPath,ref,FALSE);
1111  }
1112  else
1113  {
1114  t << "<a class=\"el\" ";
1115  }
1116  t << "href=\"";
1117  t << externalRef(relPath,ref,TRUE);
1118  if (f) t << f << Doxygen::htmlFileExtension;
1119  if (anchor) t << "#" << anchor;
1120  t << "\">";
1121  docify(name);
1122  t << "</a>";
1123 }
1124 
1125 void HtmlGenerator::startTextLink(const char *f,const char *anchor)
1126 {
1127  t << "<a href=\"";
1128  if (f) t << relPath << f << Doxygen::htmlFileExtension;
1129  if (anchor) t << "#" << anchor;
1130  t << "\">";
1131 }
1132 
1134 {
1135  t << "</a>";
1136 }
1137 
1139 {
1140  static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
1141  t << "<a ";
1142  if (generateTreeView) t << "target=\"top\" ";
1143  t << "href=\"";
1144  if (url) t << url;
1145  t << "\">";
1146 }
1147 
1149 {
1150  t << "</a>";
1151 }
1152 
1153 void HtmlGenerator::startGroupHeader(int extraIndentLevel)
1154 {
1155  if (extraIndentLevel==2)
1156  {
1157  t << "<h4 class=\"groupheader\">";
1158  }
1159  else if (extraIndentLevel==1)
1160  {
1161  t << "<h3 class=\"groupheader\">";
1162  }
1163  else // extraIndentLevel==0
1164  {
1165  t << "<h2 class=\"groupheader\">";
1166  }
1167 }
1168 
1169 void HtmlGenerator::endGroupHeader(int extraIndentLevel)
1170 {
1171  if (extraIndentLevel==2)
1172  {
1173  t << "</h4>" << endl;
1174  }
1175  else if (extraIndentLevel==1)
1176  {
1177  t << "</h3>" << endl;
1178  }
1179  else
1180  {
1181  t << "</h2>" << endl;
1182  }
1183 }
1184 
1186 {
1187  switch(type)
1188  {
1189  case SectionInfo::Page: t << "\n\n<h1>"; break;
1190  case SectionInfo::Section: t << "\n\n<h2>"; break;
1191  case SectionInfo::Subsection: t << "\n\n<h3>"; break;
1192  case SectionInfo::Subsubsection: t << "\n\n<h4>"; break;
1193  case SectionInfo::Paragraph: t << "\n\n<h5>"; break;
1194  default: ASSERT(0); break;
1195  }
1196  t << "<a class=\"anchor\" id=\"" << lab << "\"></a>";
1197 }
1198 
1200 {
1201  switch(type)
1202  {
1203  case SectionInfo::Page: t << "</h1>"; break;
1204  case SectionInfo::Section: t << "</h2>"; break;
1205  case SectionInfo::Subsection: t << "</h3>"; break;
1206  case SectionInfo::Subsubsection: t << "</h4>"; break;
1207  case SectionInfo::Paragraph: t << "</h5>"; break;
1208  default: ASSERT(0); break;
1209  }
1210 }
1211 
1212 void HtmlGenerator::docify(const char *str)
1213 {
1214  docify(str,FALSE);
1215 }
1216 
1217 void HtmlGenerator::docify(const char *str,bool inHtmlComment)
1218 {
1219  if (str)
1220  {
1221  const char *p=str;
1222  char c;
1223  while (*p)
1224  {
1225  c=*p++;
1226  switch(c)
1227  {
1228  case '<': t << "&lt;"; break;
1229  case '>': t << "&gt;"; break;
1230  case '&': t << "&amp;"; break;
1231  case '"': t << "&quot;"; break;
1232  case '-': if (inHtmlComment) t << "&#45;"; else t << "-"; break;
1233  case '\\':
1234  if (*p=='<')
1235  { t << "&lt;"; p++; }
1236  else if (*p=='>')
1237  { t << "&gt;"; p++; }
1238  else
1239  t << "\\";
1240  break;
1241  default: t << c;
1242  }
1243  }
1244  }
1245 }
1246 
1248 {
1249  char cs[2];
1250  cs[0]=c;
1251  cs[1]=0;
1252  docify(cs);
1253 }
1254 
1255 //--- helper function for dynamic sections -------------------------
1256 
1258  const QCString &relPath,int sectionCount)
1259 {
1260  //t << "<!-- startSectionHeader -->";
1261  static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
1262  if (dynamicSections)
1263  {
1264  t << "<div id=\"dynsection-" << sectionCount << "\" "
1265  "onclick=\"return toggleVisibility(this)\" "
1266  "class=\"dynheader closed\" "
1267  "style=\"cursor:pointer;\">" << endl;
1268  t << " <img id=\"dynsection-" << sectionCount << "-trigger\" src=\""
1269  << relPath << "closed.png\" alt=\"+\"/> ";
1270  }
1271  else
1272  {
1273  t << "<div class=\"dynheader\">" << endl;
1274  }
1275 }
1276 
1278 {
1279  //t << "<!-- endSectionHeader -->";
1280  t << "</div>" << endl;
1281 }
1282 
1283 static void startSectionSummary(FTextStream &t,int sectionCount)
1284 {
1285  //t << "<!-- startSectionSummary -->";
1286  static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
1287  if (dynamicSections)
1288  {
1289  t << "<div id=\"dynsection-" << sectionCount << "-summary\" "
1290  "class=\"dynsummary\" "
1291  "style=\"display:block;\">" << endl;
1292  }
1293 }
1294 
1296 {
1297  //t << "<!-- endSectionSummary -->";
1298  static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
1299  if (dynamicSections)
1300  {
1301  t << "</div>" << endl;
1302  }
1303 }
1304 
1305 static void startSectionContent(FTextStream &t,int sectionCount)
1306 {
1307  //t << "<!-- startSectionContent -->";
1308  static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
1309  if (dynamicSections)
1310  {
1311  t << "<div id=\"dynsection-" << sectionCount << "-content\" "
1312  "class=\"dyncontent\" "
1313  "style=\"display:none;\">" << endl;
1314  }
1315  else
1316  {
1317  t << "<div class=\"dyncontent\">" << endl;
1318  }
1319 }
1320 
1322 {
1323  //t << "<!-- endSectionContent -->";
1324  t << "</div>" << endl;
1325 }
1326 
1327 //----------------------------
1328 
1330 {
1332 }
1333 
1335  const char *fileName,const char *name)
1336 {
1341  t << " <div class=\"center\">" << endl;
1342  t << " <img src=\"";
1343  t << relPath << fileName << ".png\" usemap=\"#" << convertToId(name);
1344  t << "_map\" alt=\"\"/>" << endl;
1345  t << " <map id=\"" << convertToId(name);
1346  t << "_map\" name=\"";
1347  docify(name);
1348  t << "_map\">" << endl;
1349 
1350  d.writeImage(t,dir,relPath,fileName);
1351  t << " </div>";
1353  m_sectionCount++;
1354 }
1355 
1356 
1358 {
1359  DBG_HTML(t << "<!-- startMemberList -->" << endl)
1360 }
1361 
1363 {
1364  DBG_HTML(t << "<!-- endMemberList -->" << endl)
1365 }
1366 
1367 // anonymous type:
1368 // 0 = single column right aligned
1369 // 1 = double column left aligned
1370 // 2 = single column left aligned
1371 void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char *inheritId)
1372 {
1373  DBG_HTML(t << "<!-- startMemberItem() -->" << endl)
1374  if (m_emptySection)
1375  {
1376  t << "<table class=\"memberdecls\">" << endl;
1378  }
1379  t << "<tr class=\"memitem:" << anchor;
1380  if (inheritId)
1381  {
1382  t << " inherit " << inheritId;
1383  }
1384  t << "\">";
1385  switch(annoType)
1386  {
1387  case 0: t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break;
1388  case 1: t << "<td class=\"memItemLeft\" >"; break;
1389  case 2: t << "<td class=\"memItemLeft\" valign=\"top\">"; break;
1390  default: t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
1391  }
1392 }
1393 
1395 {
1396  t << "</td></tr>";
1397  t << endl;
1398 }
1399 
1401 {
1402 }
1403 
1404 void HtmlGenerator::endMemberTemplateParams(const char *anchor,const char *inheritId)
1405 {
1406  t << "</td></tr>" << endl;
1407  t << "<tr class=\"memitem:" << anchor;
1408  if (inheritId)
1409  {
1410  t << " inherit " << inheritId;
1411  }
1412  t << "\"><td class=\"memTemplItemLeft\" align=\"right\" valign=\"top\">";
1413 }
1414 
1415 
1417 {
1418  DBG_HTML(t << "<!-- insertMemberAlign -->" << endl)
1419  QCString className = templ ? "memTemplItemRight" : "memItemRight";
1420  t << "&#160;</td><td class=\"" << className << "\" valign=\"bottom\">";
1421 }
1422 
1423 void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId)
1424 {
1425  DBG_HTML(t << "<!-- startMemberDescription -->" << endl)
1426  if (m_emptySection)
1427  {
1428  t << "<table class=\"memberdecls\">" << endl;
1430  }
1431  t << "<tr class=\"memdesc:" << anchor;
1432  if (inheritId)
1433  {
1434  t << " inherit " << inheritId;
1435  }
1436  t << "\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">";
1437 }
1438 
1440 {
1441  DBG_HTML(t << "<!-- endMemberDescription -->" << endl)
1442  t << "<br /></td></tr>" << endl;
1443 }
1444 
1446 {
1447  DBG_HTML(t << "<!-- startMemberSections -->" << endl)
1448  m_emptySection=TRUE; // we postpone writing <table> until we actually
1449  // write a row to prevent empty tables, which
1450  // are not valid XHTML!
1451 }
1452 
1454 {
1455  DBG_HTML(t << "<!-- endMemberSections -->" << endl)
1456  if (!m_emptySection)
1457  {
1458  t << "</table>" << endl;
1459  }
1460 }
1461 
1462 void HtmlGenerator::startMemberHeader(const char *anchor)
1463 {
1464  DBG_HTML(t << "<!-- startMemberHeader -->" << endl)
1465  if (!m_emptySection)
1466  {
1467  t << "</table>";
1469  }
1470  if (m_emptySection)
1471  {
1472  t << "<table class=\"memberdecls\">" << endl;
1474  }
1475  t << "<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\">";
1476  if (anchor)
1477  {
1478  t << "<a name=\"" << anchor << "\"></a>" << endl;
1479  }
1480 }
1481 
1483 {
1484  DBG_HTML(t << "<!-- endMemberHeader -->" << endl)
1485  t << "</h2></td></tr>" << endl;
1486 }
1487 
1489 {
1490  DBG_HTML(t << "<!-- startMemberSubtitle -->" << endl)
1491  t << "<tr><td class=\"ititle\" colspan=\"2\">";
1492 }
1493 
1495 {
1496  DBG_HTML(t << "<!-- endMemberSubtitle -->" << endl)
1497  t << "</td></tr>" << endl;
1498 }
1499 
1501 {
1502  t << "<table>" << endl;
1503 }
1504 
1506 {
1507  t << "</table>" << endl;
1508 }
1509 
1511 {
1512  // inserted 'class = ...', 02 jan 2002, jh
1513  t << " <tr><td class=\"indexkey\">";
1514 }
1515 
1517 {
1518  t << "</td>";
1519 }
1520 
1522 {
1523  // inserted 'class = ...', 02 jan 2002, jh
1524  t << "<td class=\"indexvalue\">";
1525 }
1526 
1527 void HtmlGenerator::endIndexValue(const char *,bool)
1528 {
1529  t << "</td></tr>" << endl;
1530 }
1531 
1533 {
1534  DBG_HTML(t << "<!-- startMemberDocList -->" << endl;)
1535 }
1536 
1538 {
1539  DBG_HTML(t << "<!-- endMemberDocList -->" << endl;)
1540 }
1541 
1542 void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *,bool)
1543 {
1544  DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
1545 
1546  t << "\n<div class=\"memitem\">" << endl;
1547  t << "<div class=\"memproto\">" << endl;
1548 }
1549 
1551 {
1552  DBG_HTML(t << "<!-- startMemberDocPrefixItem -->" << endl;)
1553  t << "<div class=\"memtemplate\">" << endl;
1554 }
1555 
1557 {
1558  DBG_HTML(t << "<!-- endMemberDocPrefixItem -->" << endl;)
1559  t << "</div>" << endl;
1560 }
1561 
1563 {
1564  DBG_HTML(t << "<!-- startMemberDocName -->" << endl;)
1565 
1566  t << " <table class=\"memname\">" << endl;
1567 
1568  t << " <tr>" << endl;
1569  t << " <td class=\"memname\">";
1570 }
1571 
1573 {
1574  DBG_HTML(t << "<!-- endMemberDocName -->" << endl;)
1575  t << "</td>" << endl;
1576 }
1577 
1579 {
1580  DBG_HTML(t << "<!-- startParameterList -->" << endl;)
1581  t << " <td>";
1582  if (openBracket) t << "(";
1583  t << "</td>" << endl;
1584 }
1585 
1586 void HtmlGenerator::startParameterType(bool first,const char *key)
1587 {
1588  if (first)
1589  {
1590  DBG_HTML(t << "<!-- startFirstParameterType -->" << endl;)
1591  t << " <td class=\"paramtype\">";
1592  }
1593  else
1594  {
1595  DBG_HTML(t << "<!-- startParameterType -->" << endl;)
1596  t << " <tr>" << endl;
1597  t << " <td class=\"paramkey\">";
1598  if (key) t << key;
1599  t << "</td>" << endl;
1600  t << " <td></td>" << endl;
1601  t << " <td class=\"paramtype\">";
1602  }
1603 }
1604 
1606 {
1607  DBG_HTML(t << "<!-- endParameterType -->" << endl;)
1608  t << "&#160;</td>" << endl;
1609 }
1610 
1611 void HtmlGenerator::startParameterName(bool /*oneArgOnly*/)
1612 {
1613  DBG_HTML(t << "<!-- startParameterName -->" << endl;)
1614  t << " <td class=\"paramname\">";
1615 }
1616 
1617 void HtmlGenerator::endParameterName(bool last,bool emptyList,bool closeBracket)
1618 {
1619  DBG_HTML(t << "<!-- endParameterName -->" << endl;)
1620  if (last)
1621  {
1622  if (emptyList)
1623  {
1624  if (closeBracket) t << "</td><td>)";
1625  t << "</td>" << endl;
1626  t << " <td>";
1627  }
1628  else
1629  {
1630  t << "&#160;</td>" << endl;
1631  t << " </tr>" << endl;
1632  t << " <tr>" << endl;
1633  t << " <td></td>" << endl;
1634  t << " <td>";
1635  if (closeBracket) t << ")";
1636  t << "</td>" << endl;
1637  t << " <td></td><td>";
1638  }
1639  }
1640  else
1641  {
1642  t << "</td>" << endl;
1643  t << " </tr>" << endl;
1644  }
1645 }
1646 
1648 {
1649  DBG_HTML(t << "<!-- endParameterList -->" << endl;)
1650  t << "</td>" << endl;
1651  t << " </tr>" << endl;
1652 }
1653 
1654 void HtmlGenerator::exceptionEntry(const char* prefix,bool closeBracket)
1655 {
1656  DBG_HTML(t << "<!-- exceptionEntry -->" << endl;)
1657  t << "</td>" << endl;
1658  t << " </tr>" << endl;
1659  t << " <tr>" << endl;
1660  t << " <td align=\"right\">";
1661  // colspan 2 so it gets both parameter type and parameter name columns
1662  if (prefix)
1663  t << prefix << "</td><td>(</td><td colspan=\"2\">";
1664  else if (closeBracket)
1665  t << "</td><td>)</td><td></td><td>";
1666  else
1667  t << "</td><td></td><td colspan=\"2\">";
1668 }
1669 
1670 void HtmlGenerator::endMemberDoc(bool hasArgs)
1671 {
1672  DBG_HTML(t << "<!-- endMemberDoc -->" << endl;)
1673  if (!hasArgs)
1674  {
1675  t << " </tr>" << endl;
1676  }
1677  t << " </table>" << endl;
1678  // t << "</div>" << endl;
1679 }
1680 
1682 {
1684 }
1685 
1687 {
1688  bool generateLegend = Config_getBool("GENERATE_LEGEND");
1689  bool umlLook = Config_getBool("UML_LOOK");
1694 
1696  if (generateLegend && !umlLook)
1697  {
1698  t << "<center><span class=\"legend\">[";
1699  startHtmlLink(relPath+"graph_legend"+Doxygen::htmlFileExtension);
1700  t << theTranslator->trLegend();
1701  endHtmlLink();
1702  t << "]</span></center>";
1703  }
1704 
1706  m_sectionCount++;
1707 }
1708 
1710 {
1712 }
1713 
1715 {
1720 
1722 
1724  m_sectionCount++;
1725 }
1726 
1728 {
1730 }
1731 
1733 {
1738 
1740 
1742  m_sectionCount++;
1743 }
1744 
1746 {
1748 }
1749 
1751 {
1756 
1758 
1760  m_sectionCount++;
1761 }
1762 
1764 {
1766 }
1767 
1769 {
1774 
1776 
1778  m_sectionCount++;
1779 }
1780 
1782 {
1783  g.writeGraph(t,dir,fileName);
1784 }
1785 
1787 {
1788  t << "<tr><td colspan=\"2\"><div class=\"groupHeader\">";
1789 }
1790 
1792 {
1793  t << "</div></td></tr>" << endl;
1794 }
1795 
1797 {
1798  t << "<tr><td colspan=\"2\"><div class=\"groupText\">";
1799 }
1800 
1802 {
1803  t << "</div></td></tr>" << endl;
1804 }
1805 
1807 {
1808 }
1809 
1811 {
1812 }
1813 
1815 {
1816  DBG_HTML(t << "<!-- startIndent -->" << endl;)
1817 
1818  t << "<div class=\"memdoc\">\n";
1819 }
1820 
1822 {
1823  DBG_HTML(t << "<!-- endIndent -->" << endl;)
1824  t << endl << "</div>" << endl << "</div>" << endl;
1825 }
1826 
1827 void HtmlGenerator::addIndexItem(const char *,const char *)
1828 {
1829 }
1830 
1832 {
1833  int i;
1834  for (i=0;i<n;i++)
1835  {
1836  t << "&#160;";
1837  }
1838 }
1839 
1841  const char *filename,const char *anchor,
1842  const char *title)
1843 {
1844  t << "<dl><dt><b>";
1845  if (filename)
1846  {
1847  writeObjectLink(0,filename,anchor,title);
1848  }
1849  else
1850  {
1851  docify(title);
1852  }
1853  t << "</b></dt>";
1854 }
1855 
1857 {
1858  t << "</dl>";
1859 }
1860 
1862  const char *title)
1863 {
1864  t << "<dl><dt><b>";
1865  docify(title);
1866  t << "</b></dt>";
1867 }
1868 
1870 {
1871  t << "</dl>";
1872 }
1873 
1875 {
1876  HtmlDocVisitor *visitor = new HtmlDocVisitor(t,m_codeGen,ctx);
1877  n->accept(visitor);
1878  delete visitor;
1879 }
1880 
1881 //---------------- helpers for index generation -----------------------------
1882 
1883 static void startQuickIndexList(FTextStream &t,bool compact,bool topLevel=TRUE)
1884 {
1885  if (compact)
1886  {
1887  if (topLevel)
1888  {
1889  t << " <div id=\"navrow1\" class=\"tabs\">\n";
1890  }
1891  else
1892  {
1893  t << " <div id=\"navrow2\" class=\"tabs2\">\n";
1894  }
1895  t << " <ul class=\"tablist\">\n";
1896  }
1897  else
1898  {
1899  t << "<ul>";
1900  }
1901 }
1902 
1903 static void endQuickIndexList(FTextStream &t,bool compact)
1904 {
1905  if (compact)
1906  {
1907  t << " </ul>\n";
1908  t << " </div>\n";
1909  }
1910  else
1911  {
1912  t << "</ul>\n";
1913  }
1914 }
1915 
1916 static void startQuickIndexItem(FTextStream &t,const char *l,
1917  bool hl,bool /*compact*/,
1918  const QCString &relPath)
1919 {
1920  t << " <li";
1921  if (hl)
1922  {
1923  t << " class=\"current\"";
1924  }
1925  t << ">";
1926  if (l) t << "<a href=\"" << correctURL(l,relPath) << "\">";
1927  t << "<span>";
1928 }
1929 
1930 static void endQuickIndexItem(FTextStream &t,const char *l)
1931 {
1932  t << "</span>";
1933  if (l) t << "</a>";
1934  t << "</li>\n";
1935 }
1936 
1938 {
1939  static bool showFiles = Config_getBool("SHOW_FILES");
1940  static bool showNamespaces = Config_getBool("SHOW_NAMESPACES");
1941  switch (kind)
1942  {
1943  case LayoutNavEntry::MainPage: return TRUE;
1944  case LayoutNavEntry::User: return TRUE;
1945  case LayoutNavEntry::UserGroup: return TRUE;
1946  case LayoutNavEntry::Pages: return indexedPages>0;
1948  case LayoutNavEntry::Namespaces: return documentedNamespaces>0 && showNamespaces;
1949  case LayoutNavEntry::NamespaceList: return documentedNamespaces>0 && showNamespaces;
1956  case LayoutNavEntry::Files: return documentedHtmlFiles>0 && showFiles;
1957  case LayoutNavEntry::FileList: return documentedHtmlFiles>0 && showFiles;
1959  //case LayoutNavEntry::Dirs: return documentedDirs>0;
1961  }
1962  return FALSE;
1963 }
1964 
1965 static void renderQuickLinksAsTree(FTextStream &t,const QCString &relPath,LayoutNavEntry *root)
1966 
1967 {
1970  int count=0;
1971  for (li.toFirst();(entry=li.current());++li)
1972  {
1973  if (entry->visible() && quickLinkVisible(entry->kind())) count++;
1974  }
1975  if (count>0) // at least one item is visible
1976  {
1978  for (li.toFirst();(entry=li.current());++li)
1979  {
1980  if (entry->visible() && quickLinkVisible(entry->kind()))
1981  {
1982  QCString url = entry->url();
1983  t << "<li><a href=\"" << relPath << url << "\"><span>";
1984  t << fixSpaces(entry->title());
1985  t << "</span></a>\n";
1986  // recursive into child list
1987  renderQuickLinksAsTree(t,relPath,entry);
1988  t << "</li>";
1989  }
1990  }
1992  }
1993 }
1994 
1995 
1996 static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
1997  LayoutNavEntry *hlEntry,LayoutNavEntry::Kind kind,
1998  bool highlightParent,bool highlightSearch)
1999 {
2000  if (hlEntry->parent()) // first draw the tabs for the parent of hlEntry
2001  {
2002  renderQuickLinksAsTabs(t,relPath,hlEntry->parent(),kind,highlightParent,highlightSearch);
2003  }
2004  if (hlEntry->parent() && hlEntry->parent()->children().count()>0) // draw tabs for row containing hlEntry
2005  {
2006  bool topLevel = hlEntry->parent()->parent()==0;
2007  QListIterator<LayoutNavEntry> li(hlEntry->parent()->children());
2009 
2010  int count=0;
2011  for (li.toFirst();(entry=li.current());++li)
2012  {
2013  if (entry->visible() && quickLinkVisible(entry->kind())) count++;
2014  }
2015  if (count>0) // at least one item is visible
2016  {
2017  startQuickIndexList(t,TRUE,topLevel);
2018  for (li.toFirst();(entry=li.current());++li)
2019  {
2020  if (entry->visible() && quickLinkVisible(entry->kind()))
2021  {
2022  QCString url = entry->url();
2023  startQuickIndexItem(t,url,
2024  entry==hlEntry &&
2025  (entry->children().count()>0 ||
2026  (entry->kind()==kind && !highlightParent)
2027  ),
2028  TRUE,relPath);
2029  t << fixSpaces(entry->title());
2030  endQuickIndexItem(t,url);
2031  }
2032  }
2033  if (hlEntry->parent()==LayoutDocManager::instance().rootNavEntry()) // first row is special as it contains the search box
2034  {
2035  static bool searchEngine = Config_getBool("SEARCHENGINE");
2036  static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
2037  if (searchEngine)
2038  {
2039  t << " <li>\n";
2040  if (!serverBasedSearch) // pure client side search
2041  {
2042  writeClientSearchBox(t,relPath);
2043  t << " </li>\n";
2044  }
2045  else // server based search
2046  {
2047  writeServerSearchBox(t,relPath,highlightSearch);
2048  if (!highlightSearch)
2049  {
2050  t << " </li>\n";
2051  }
2052  }
2053  }
2054  if (!highlightSearch) // on the search page the index will be ended by the
2055  // page itself
2056  {
2058  }
2059  }
2060  else // normal case for other rows than first one
2061  {
2063  }
2064  }
2065  }
2066 }
2067 
2068 static void writeDefaultQuickLinks(FTextStream &t,bool compact,
2069  HighlightedItem hli,
2070  const char *file,
2071  const QCString &relPath)
2072 {
2075  LayoutNavEntry::Kind altKind = (LayoutNavEntry::Kind)-1; // fall back for the old layout file
2076  bool highlightParent=FALSE;
2077  switch (hli) // map HLI enums to LayoutNavEntry::Kind enums
2078  {
2079  case HLI_Main: kind = LayoutNavEntry::MainPage; break;
2080  case HLI_Modules: kind = LayoutNavEntry::Modules; break;
2081  //case HLI_Directories: kind = LayoutNavEntry::Dirs; break;
2083  case HLI_Hierarchy: kind = LayoutNavEntry::ClassHierarchy; break;
2084  case HLI_Classes: kind = LayoutNavEntry::ClassIndex; altKind = LayoutNavEntry::Classes; break;
2085  case HLI_Annotated: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes; break;
2086  case HLI_Files: kind = LayoutNavEntry::FileList; altKind = LayoutNavEntry::Files; break;
2088  case HLI_Functions: kind = LayoutNavEntry::ClassMembers; break;
2089  case HLI_Globals: kind = LayoutNavEntry::FileGlobals; break;
2090  case HLI_Pages: kind = LayoutNavEntry::Pages; break;
2091  case HLI_Examples: kind = LayoutNavEntry::Examples; break;
2092  case HLI_UserGroup: kind = LayoutNavEntry::UserGroup; break;
2094  highlightParent = TRUE; break;
2096  highlightParent = TRUE; break;
2098  highlightParent = TRUE; break;
2099  case HLI_None: break;
2100  case HLI_Search: break;
2101  }
2102 
2103  if (compact)
2104  {
2105  // find highlighted index item
2106  LayoutNavEntry *hlEntry = root->find(kind,kind==LayoutNavEntry::UserGroup ? file : 0);
2107  if (!hlEntry && altKind!=(LayoutNavEntry::Kind)-1) { hlEntry=root->find(altKind); kind=altKind; }
2108  if (!hlEntry) // highlighted item not found in the index! -> just show the level 1 index...
2109  {
2110  highlightParent=TRUE;
2111  hlEntry = root->children().getFirst();
2112  if (hlEntry==0)
2113  {
2114  return; // argl, empty index!
2115  }
2116  }
2117  if (kind==LayoutNavEntry::UserGroup)
2118  {
2119  LayoutNavEntry *e = hlEntry->children().getFirst();
2120  if (e)
2121  {
2122  hlEntry = e;
2123  }
2124  }
2125  renderQuickLinksAsTabs(t,relPath,hlEntry,kind,highlightParent,hli==HLI_Search);
2126  }
2127  else
2128  {
2129  renderQuickLinksAsTree(t,relPath,root);
2130  }
2131 }
2132 
2134 {
2135  t << "</div><!-- top -->" << endl;
2136 }
2137 
2138 QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpath)
2139 {
2140  static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
2141  QCString result;
2142  // write split bar
2143  if (generateTreeView)
2144  {
2145  result = QCString(
2146  "<div id=\"side-nav\" class=\"ui-resizable side-nav-resizable\">\n"
2147  " <div id=\"nav-tree\">\n"
2148  " <div id=\"nav-tree-contents\">\n"
2149  " <div id=\"nav-sync\" class=\"sync\"></div>\n"
2150  " </div>\n"
2151  " </div>\n"
2152  " <div id=\"splitbar\" style=\"-moz-user-select:none;\" \n"
2153  " class=\"ui-resizable-handle\">\n"
2154  " </div>\n"
2155  "</div>\n"
2156  "<script type=\"text/javascript\">\n"
2157  "$(document).ready(function(){initNavTree('") +
2159  QCString("','") + relpath +
2160  QCString("');});\n"
2161  "</script>\n"
2162  "<div id=\"doc-content\">\n");
2163  }
2164  return result;
2165 }
2166 
2168 {
2169  t << writeSplitBarAsString(name,relPath);
2170 }
2171 
2173 {
2174  t << substitute(s,"$relpath^",relPath);
2175 }
2176 
2178 {
2179  t << "<div class=\"contents\">" << endl;
2180 }
2181 
2183 {
2184  t << "</div><!-- contents -->" << endl;
2185 }
2186 
2187 void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli,const char *file)
2188 {
2189  writeDefaultQuickLinks(t,compact,hli,file,relPath);
2190 }
2191 
2192 // PHP based search script
2194 {
2195  static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
2196  static bool disableIndex = Config_getBool("DISABLE_INDEX");
2197  static QCString projectName = Config_getString("PROJECT_NAME");
2198  static QCString htmlOutput = Config_getString("HTML_OUTPUT");
2199 
2200  // OPENSEARCH_PROVIDER {
2201  QCString configFileName = htmlOutput+"/search_config.php";
2202  QFile cf(configFileName);
2203  if (cf.open(IO_WriteOnly))
2204  {
2205  FTextStream t(&cf);
2206  t << "<script language=\"php\">\n\n";
2207  t << "$config = array(\n";
2208  t << " 'PROJECT_NAME' => \"" << convertToHtml(projectName) << "\",\n";
2209  t << " 'GENERATE_TREEVIEW' => " << (generateTreeView?"true":"false") << ",\n";
2210  t << " 'DISABLE_INDEX' => " << (disableIndex?"true":"false") << ",\n";
2211  t << ");\n\n";
2212  t << "$translator = array(\n";
2213  t << " 'search_results_title' => \"" << theTranslator->trSearchResultsTitle() << "\",\n";
2214  t << " 'search_results' => array(\n";
2215  t << " 0 => \"" << theTranslator->trSearchResults(0) << "\",\n";
2216  t << " 1 => \"" << theTranslator->trSearchResults(1) << "\",\n";
2217  t << " 2 => \"" << substitute(theTranslator->trSearchResults(2), "$", "\\$") << "\",\n";
2218  t << " ),\n";
2219  t << " 'search_matches' => \"" << theTranslator->trSearchMatches() << "\",\n";
2220  t << " 'search' => \"" << theTranslator->trSearch() << "\",\n";
2221  t << " 'split_bar' => \"" << substitute(substitute(writeSplitBarAsString("search",""), "\"","\\\""), "\n","\\n") << "\",\n";
2222  t << " 'logo' => \"" << substitute(substitute(writeLogoAsString(""), "\"","\\\""), "\n","\\n") << "\",\n";
2223  t << ");\n\n";
2224  t << "</script>\n";
2225  }
2226 
2227  ResourceMgr::instance().copyResource("search_functions.php",htmlOutput);
2228  ResourceMgr::instance().copyResource("search_opensearch.php",htmlOutput);
2229  // OPENSEARCH_PROVIDER }
2230 
2231  QCString fileName = htmlOutput+"/search.php";
2232  QFile f(fileName);
2233  if (f.open(IO_WriteOnly))
2234  {
2235  FTextStream t(&f);
2236  t << substituteHtmlKeywords(g_header,"Search","");
2237 
2238  t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
2239  << versionString << " -->" << endl;
2240  t << "<script type=\"text/javascript\">\n";
2241  t << "var searchBox = new SearchBox(\"searchBox\", \""
2242  << "search\",false,'" << theTranslator->trSearch() << "');\n";
2243  t << "</script>\n";
2244  if (!Config_getBool("DISABLE_INDEX"))
2245  {
2247  }
2248  else
2249  {
2250  t << "</div>" << endl;
2251  }
2252 
2253  t << "<script language=\"php\">\n";
2254  t << "require_once \"search_functions.php\";\n";
2255  t << "main();\n";
2256  t << "</script>\n";
2257 
2258  // Write empty navigation path, to make footer connect properly
2259  if (generateTreeView)
2260  {
2261  t << "</div><!-- doc-contents -->\n";
2262  //t << "<div id=\"nav-path\" class=\"navpath\">\n";
2263  //t << " <ul>\n";
2264  }
2265 
2266  writePageFooter(t,"Search","","");
2267  }
2268  QCString scriptName = htmlOutput+"/search/search.js";
2269  QFile sf(scriptName);
2270  if (sf.open(IO_WriteOnly))
2271  {
2272  FTextStream t(&sf);
2273  t << ResourceMgr::instance().getAsString("extsearch.js");
2274  }
2275  else
2276  {
2277  err("Failed to open file '%s' for writing...\n",scriptName.data());
2278  }
2279 }
2280 
2282 {
2283  static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
2284  QCString fileName = Config_getString("HTML_OUTPUT")+"/search"+Doxygen::htmlFileExtension;
2285  QFile f(fileName);
2286  if (f.open(IO_WriteOnly))
2287  {
2288  FTextStream t(&f);
2289  t << substituteHtmlKeywords(g_header,"Search","");
2290 
2291  t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
2292  << versionString << " -->" << endl;
2293  t << "<script type=\"text/javascript\">\n";
2294  t << "var searchBox = new SearchBox(\"searchBox\", \""
2295  << "search\",false,'" << theTranslator->trSearch() << "');\n";
2296  t << "</script>\n";
2297  if (!Config_getBool("DISABLE_INDEX"))
2298  {
2300  t << " <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\"\" size=\"20\" accesskey=\"S\" onfocus=\"searchBox.OnSearchFieldFocus(true)\" onblur=\"searchBox.OnSearchFieldFocus(false)\"/>\n";
2301  t << " </form>\n";
2302  t << " </div><div class=\"right\"></div>\n";
2303  t << " </div>\n";
2304  t << " </li>\n";
2305  t << " </ul>\n";
2306  t << " </div>\n";
2307  t << "</div>\n";
2308  }
2309  else
2310  {
2311  t << "</div>" << endl;
2312  }
2313  t << writeSplitBarAsString("search","");
2314  t << "<div class=\"header\">" << endl;
2315  t << " <div class=\"headertitle\">" << endl;
2316  t << " <div class=\"title\">" << theTranslator->trSearchResultsTitle() << "</div>" << endl;
2317  t << " </div>" << endl;
2318  t << "</div>" << endl;
2319  t << "<div class=\"contents\">" << endl;
2320 
2321  t << "<div id=\"searchresults\"></div>" << endl;
2322  t << "</div>" << endl;
2323 
2324  if (generateTreeView)
2325  {
2326  t << "</div><!-- doc-contents -->" << endl;
2327  }
2328 
2329  writePageFooter(t,"Search","","");
2330  }
2331  QCString scriptName = Config_getString("HTML_OUTPUT")+"/search/search.js";
2332  QFile sf(scriptName);
2333  if (sf.open(IO_WriteOnly))
2334  {
2335  FTextStream t(&sf);
2336  t << "var searchResultsText=["
2337  << "\"" << theTranslator->trSearchResults(0) << "\","
2338  << "\"" << theTranslator->trSearchResults(1) << "\","
2339  << "\"" << theTranslator->trSearchResults(2) << "\"];" << endl;
2340  t << "var serverUrl=\"" << Config_getString("SEARCHENGINE_URL") << "\";" << endl;
2341  t << "var tagMap = {" << endl;
2342  bool first=TRUE;
2343  // add search mappings
2344  QStrList &extraSearchMappings = Config_getList("EXTRA_SEARCH_MAPPINGS");
2345  char *ml=extraSearchMappings.first();
2346  while (ml)
2347  {
2348  QCString mapLine = ml;
2349  int eqPos = mapLine.find('=');
2350  if (eqPos!=-1) // tag command contains a destination
2351  {
2352  QCString tagName = mapLine.left(eqPos).stripWhiteSpace();
2353  QCString destName = mapLine.right(mapLine.length()-eqPos-1).stripWhiteSpace();
2354  if (!tagName.isEmpty())
2355  {
2356  if (!first) t << "," << endl;
2357  t << " \"" << tagName << "\": \"" << destName << "\"";
2358  first=FALSE;
2359  }
2360  }
2361  ml=extraSearchMappings.next();
2362  }
2363  if (!first) t << endl;
2364  t << "};" << endl << endl;
2365  t << ResourceMgr::instance().getAsString("extsearch.js");
2366  t << endl;
2367  t << "$(document).ready(function() {" << endl;
2368  t << " var query = trim(getURLParameter('query'));" << endl;
2369  t << " if (query) {" << endl;
2370  t << " searchFor(query,0,20);" << endl;
2371  t << " } else {" << endl;
2372  t << " var results = $('#results');" << endl;
2373  t << " results.html('<p>" << theTranslator->trSearchResults(0) << "</p>');" << endl;
2374  t << " }" << endl;
2375  t << "});" << endl;
2376  }
2377  else
2378  {
2379  err("Failed to open file '%s' for writing...\n",scriptName.data());
2380  }
2381 }
2382 
2383 void HtmlGenerator::startConstraintList(const char *header)
2384 {
2385  t << "<div class=\"typeconstraint\">" << endl;
2386  t << "<dl><dt><b>" << header << "</b></dt><dd>" << endl;
2387  t << "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">" << endl;
2388 }
2389 
2391 {
2392  t << "<tr><td valign=\"top\"><em>";
2393 }
2394 
2396 {
2397  t << "</em></td>";
2398 }
2399 
2401 {
2402  t << "<td>&#160;:</td><td valign=\"top\"><em>";
2403 }
2404 
2406 {
2407  t << "</em></td>";
2408 }
2409 
2411 {
2412  t << "<td>&#160;";
2413 }
2414 
2416 {
2417  t << "</td></tr>" << endl;
2418 }
2419 
2421 {
2422  t << "</table>" << endl;
2423  t << "</dd>" << endl;
2424  t << "</dl>" << endl;
2425  t << "</div>" << endl;
2426 }
2427 
2428 void HtmlGenerator::lineBreak(const char *style)
2429 {
2430  if (style)
2431  {
2432  t << "<br class=\"" << style << "\" />" << endl;
2433  }
2434  else
2435  {
2436  t << "<br />" << endl;
2437  }
2438 }
2439 
2441 {
2442  t << "<div class=\"header\">" << endl;
2443 }
2444 
2446 {
2447  t << " <div class=\"headertitle\">" << endl;
2448  startTitle();
2449 }
2450 
2451 void HtmlGenerator::endTitleHead(const char *,const char *)
2452 {
2453  endTitle();
2454  t << " </div>" << endl;
2455 }
2456 
2458 {
2459  t << "</div><!--header-->" << endl;
2460 }
2461 
2463 {
2464  if (m_emptySection)
2465  {
2466  t << "<table class=\"memberdecls\">" << endl;
2468  }
2469  t << "<tr><td colspan=\"2\"><h3>";
2470 }
2471 
2473 {
2474  t << "</h3></td></tr>" << endl;
2475 }
2476 
2478 {
2479  DBG_HTML(t << "<!-- startMemberDocSimple -->" << endl;)
2480  t << "<table class=\"fieldtable\">" << endl;
2481  t << "<tr><th colspan=\"3\">" << theTranslator->trCompoundMembers() << "</th></tr>" << endl;
2482 }
2483 
2485 {
2486  DBG_HTML(t << "<!-- endMemberDocSimple -->" << endl;)
2487  t << "</table>" << endl;
2488 }
2489 
2491 {
2492  DBG_HTML(t << "<!-- startInlineMemberType -->" << endl;)
2493  t << "<tr><td class=\"fieldtype\">" << endl;
2494 }
2495 
2497 {
2498  DBG_HTML(t << "<!-- endInlineMemberType -->" << endl;)
2499  t << "</td>" << endl;
2500 }
2501 
2503 {
2504  DBG_HTML(t << "<!-- startInlineMemberName -->" << endl;)
2505  t << "<td class=\"fieldname\">" << endl;
2506 }
2507 
2509 {
2510  DBG_HTML(t << "<!-- endInlineMemberName -->" << endl;)
2511  t << "</td>" << endl;
2512 }
2513 
2515 {
2516  DBG_HTML(t << "<!-- startInlineMemberDoc -->" << endl;)
2517  t << "<td class=\"fielddoc\">" << endl;
2518 }
2519 
2521 {
2522  DBG_HTML(t << "<!-- endInlineMemberDoc -->" << endl;)
2523  t << "</td></tr>" << endl;
2524 }
2525 
2527 {
2528  DBG_HTML(t << "<!-- startLabels -->" << endl;)
2529  t << "<span class=\"mlabels\">";
2530 }
2531 
2532 void HtmlGenerator::writeLabel(const char *l,bool /*isLast*/)
2533 {
2534  DBG_HTML(t << "<!-- writeLabel(" << l << ") -->" << endl;)
2535  //t << "<tt>[" << l << "]</tt>";
2536  //if (!isLast) t << ", ";
2537  t << "<span class=\"mlabel\">" << l << "</span>";
2538 }
2539 
2541 {
2542  DBG_HTML(t << "<!-- endLabels -->" << endl;)
2543  t << "</span>";
2544 }
2545 
2547  const char *id, const char *ref,
2548  const char *file, const char *anchor,
2549  const char *title, const char *name)
2550 {
2551  DBG_HTML(t << "<!-- writeInheritedSectionTitle -->" << endl;)
2552  QCString a = anchor;
2553  if (!a.isEmpty()) a.prepend("#");
2554  QCString classLink = QCString("<a class=\"el\" href=\"");
2555  if (ref)
2556  {
2557  classLink+= externalLinkTarget() + externalRef(relPath,ref,TRUE);
2558  }
2559  else
2560  {
2561  classLink+=relPath;
2562  }
2563  classLink+=file+Doxygen::htmlFileExtension+a;
2564  classLink+=QCString("\">")+convertToHtml(name,FALSE)+"</a>";
2565  t << "<tr class=\"inherit_header " << id << "\">"
2566  << "<td colspan=\"2\" onclick=\"javascript:toggleInherit('" << id << "')\">"
2567  << "<img src=\"" << relPath << "closed.png\" alt=\"-\"/>&#160;"
2568  << theTranslator->trInheritedFrom(convertToHtml(title,FALSE),classLink)
2569  << "</td></tr>" << endl;
2570 }
2571 
2572 void HtmlGenerator::writeSummaryLink(const char *file,const char *anchor,const char *title,bool first)
2573 {
2574  if (first)
2575  {
2576  t << " <div class=\"summary\">\n";
2577  }
2578  else
2579  {
2580  t << " &#124;\n";
2581  }
2582  t << "<a href=\"";
2583  if (file)
2584  {
2585  t << relPath << file;
2587  }
2588  else
2589  {
2590  t << "#";
2591  t << anchor;
2592  }
2593  t << "\">";
2594  t << title;
2595  t << "</a>";
2596 }
2597 
2598 void HtmlGenerator::endMemberDeclaration(const char *anchor,const char *inheritId)
2599 {
2600  t << "<tr class=\"separator:" << anchor;
2601  if (inheritId)
2602  {
2603  t << " inherit " << inheritId;
2604  }
2605  t << "\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n";
2606 }
2607 
2608 void HtmlGenerator::setCurrentDoc(Definition *context,const char *anchor,bool isSourceFile)
2609 {
2611  {
2612  Doxygen::searchIndex->setCurrentDoc(context,anchor,isSourceFile);
2613  }
2614 }
2615 
2616 void HtmlGenerator::addWord(const char *word,bool hiPriority)
2617 {
2619  {
2620  Doxygen::searchIndex->addWord(word,hiPriority);
2621  }
2622 }
2623 
static void endSectionContent(FTextStream &t)
Definition: htmlgen.cpp:1321
static QCString name
Definition: declinfo.cpp:673
Traverses directory structures and contents in a platform-independent way.
Definition: qdir.h:52
void writeFooter(const char *navPath)
Definition: htmlgen.cpp:943
void codify(const char *text)
Definition: htmlgen.cpp:423
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
static void startSectionContent(FTextStream &t, int sectionCount)
Definition: htmlgen.cpp:1305
static QCString writeSplitBarAsString(const char *name, const char *relpath)
Definition: htmlgen.cpp:2138
void endPlainFile()
Definition: outputgen.cpp:55
static void writeDefaultQuickLinks(FTextStream &t, bool compact, HighlightedItem hli, const char *file, const QCString &relPath)
Definition: htmlgen.cpp:2068
char * rawData() const
Definition: qcstring.h:216
void insertMemberAlign(bool)
Definition: htmlgen.cpp:1416
void startLabels()
Definition: htmlgen.cpp:2526
void startMemberSections()
Definition: htmlgen.cpp:1445
QCString ref
Definition: outputgen.h:43
void endInlineMemberDoc()
Definition: htmlgen.cpp:2520
void writeCodeLink(const char *ref, const char *file, const char *anchor, const char *name, const char *tooltip)
Definition: htmlgen.cpp:524
QCString file
Definition: outputgen.h:50
QCString fileToString(const char *name, bool filter, bool isSourceCode)
Definition: util.cpp:2418
QCString substituteKeywords(const QCString &s, const char *title, const char *projName, const char *projNum, const char *projBrief)
Definition: util.cpp:5122
QCString getAsString(const char *name) const
static QCString g_footer
Definition: htmlgen.cpp:51
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
void writeQuickLinks(bool compact, HighlightedItem hli, const char *file)
Definition: htmlgen.cpp:2187
QList< Entry > entry
LayoutNavEntry * find(LayoutNavEntry::Kind k, const char *file=0) const
Definition: layout.cpp:76
void addIndexItem(const char *, const char *)
Definition: htmlgen.cpp:1827
void endParameterName(bool last, bool emptyList, bool closeBracket)
Definition: htmlgen.cpp:1617
static constexpr double g
Definition: Units.h:144
static PageSDict * exampleSDict
Definition: doxygen.h:101
static QCString result
bool isEmpty() const
Definition: qcstring.h:189
static void writeFooterFile(QFile &f)
Definition: htmlgen.cpp:836
int documentedHtmlFiles
Definition: index.cpp:65
void endIndent()
Definition: htmlgen.cpp:1821
void endMemberGroup(bool)
Definition: htmlgen.cpp:1810
QCString url
Definition: outputgen.h:53
static void writeHeaderFile(QFile &f, const char *cssname)
Definition: htmlgen.cpp:829
static void writeExternalSearchPage()
Definition: htmlgen.cpp:2281
void endHeaderSection()
Definition: htmlgen.cpp:2457
uint length() const
Definition: qcstring.h:195
virtual QCString trInheritedFrom(const char *members, const char *what)=0
int documentedFileMembers[FMHL_Total]
Definition: index.cpp:63
void writeDoc(DocNode *, Definition *, MemberDef *)
Definition: htmlgen.cpp:1874
void endTitle()
Definition: htmlgen.h:141
void endCallGraph(const DotCallGraph &g)
Definition: htmlgen.cpp:1750
void lineBreak(const char *style)
Definition: htmlgen.cpp:2428
#define IO_WriteOnly
Definition: qiodevice.h:62
void startGroupHeader(int)
Definition: htmlgen.cpp:1153
static void writeStyleSheetFile(QFile &f)
Definition: htmlgen.cpp:823
static QCString htmlFileExtension
Definition: doxygen.h:130
static void writeTabData()
Additional initialization after indices have been created.
Definition: htmlgen.cpp:752
void startInlineMemberName()
Definition: htmlgen.cpp:2502
QCString ref
Definition: outputgen.h:52
int documentedClassMembers[CMHL_Total]
Definition: index.cpp:62
Concrete visitor implementation for HTML output.
type * first()
Definition: qinternallist.h:87
#define qsnprintf
Definition: qcstring.h:73
void endConstraintList()
Definition: htmlgen.cpp:2420
static void startSectionHeader(FTextStream &t, const QCString &relPath, int sectionCount)
Definition: htmlgen.cpp:1257
void endDoxyAnchor(const char *fName, const char *anchor)
Definition: htmlgen.cpp:1023
void endIndexKey()
Definition: htmlgen.cpp:1516
void setDevice(QIODevice *)
void endMemberGroupDocs()
Definition: htmlgen.cpp:1801
virtual QCString trSearchMatches()=0
virtual QCString trSearchResultsTitle()=0
void endMemberTemplateParams(const char *anchor, const char *inheritId)
Definition: htmlgen.cpp:1404
QCString anchor
Definition: outputgen.h:54
void endMemberDocPrefixItem()
Definition: htmlgen.cpp:1556
const bool FALSE
Definition: qglobal.h:370
static void endSectionHeader(FTextStream &t)
Definition: htmlgen.cpp:1277
void writeNavigationPath(const char *s)
Definition: htmlgen.cpp:2172
static LayoutDocManager & instance()
Definition: layout.cpp:1359
bool copyResource(const char *name, const char *targetDir) const
void endLabels()
Definition: htmlgen.cpp:2540
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1) const
Definition: dot.cpp:4519
void startMemberGroup()
Definition: htmlgen.cpp:1806
static ResourceMgr & instance()
Definition: resourcemgr.cpp:35
void startContents()
Definition: htmlgen.cpp:2177
void startConstraintParam()
Definition: htmlgen.cpp:2390
void startHtmlLink(const char *url)
Definition: htmlgen.cpp:1138
void endDirDepGraph(const DotDirDeps &g)
Definition: htmlgen.cpp:1768
void startMemberDescription(const char *anchor, const char *inheritId)
Definition: htmlgen.cpp:1423
static QCString stripPath(const QCString &s)
Definition: tagreader.cpp:1287
void endGroupCollaboration(const DotGroupCollaboration &g)
Definition: htmlgen.cpp:1732
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition: htmlgen.cpp:1937
static QCString className
Definition: declinfo.cpp:669
#define Config_getList(val)
Definition: config.cpp:662
QCString left(uint len) const
Definition: qcstring.cpp:213
void startConstraintList(const char *)
Definition: htmlgen.cpp:2383
void endInlineMemberType()
Definition: htmlgen.cpp:2496
QCString relativePathToRoot(const char *name)
Definition: util.cpp:5436
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
void endTextLink()
Definition: htmlgen.cpp:1133
static void renderQuickLinksAsTree(FTextStream &t, const QCString &relPath, LayoutNavEntry *root)
Definition: htmlgen.cpp:1965
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
QCString lastTitle
Definition: htmlgen.h:349
int count() const
Definition: sortdict.h:284
void endMemberDocSimple()
Definition: htmlgen.cpp:2484
void endContents()
Definition: htmlgen.cpp:2182
void endSection(const char *, SectionInfo::SectionType)
Definition: htmlgen.cpp:1199
void startTitle()
Definition: htmlgen.h:140
string filename
Definition: train.py:213
void writeInheritedSectionTitle(const char *id, const char *ref, const char *file, const char *anchor, const char *title, const char *name)
Definition: htmlgen.cpp:2546
void setTextStream(FTextStream &t)
Definition: htmlgen.cpp:412
static QStrList * l
Definition: config.cpp:1044
const QList< LayoutNavEntry > & children() const
Definition: layout.h:157
QCString correctURL(const QCString &url, const QCString &relPath)
Definition: util.cpp:8084
void startMemberGroupHeader(bool)
Definition: htmlgen.cpp:1786
void startParameterName(bool)
Definition: htmlgen.cpp:1611
void endIndexListItem()
Definition: htmlgen.cpp:1052
Base class for the layout of a navigation item at the top of the HTML pages.
Definition: layout.h:118
void endTitleHead(const char *, const char *)
Definition: htmlgen.cpp:2451
void startClassDiagram()
Definition: htmlgen.cpp:1329
void endGroupHeader(int)
Definition: htmlgen.cpp:1169
void endMemberDocName()
Definition: htmlgen.cpp:1572
bool isFile() const
#define Config_getEnum(val)
Definition: config.cpp:663
QCString convertToId(const char *s)
Definition: util.cpp:5685
void startCallGraph()
Definition: htmlgen.cpp:1745
void startProjectNumber()
Definition: htmlgen.cpp:953
#define Config_getInt(val)
Definition: config.cpp:661
void startInlineHeader()
Definition: htmlgen.cpp:2462
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool TBRank=TRUE, bool imageMap=TRUE, int graphId=-1) const
Definition: dot.cpp:3133
void endDotGraph(const DotClassGraph &g)
Definition: htmlgen.cpp:1686
bool m_emptySection
Definition: htmlgen.h:358
virtual QCString trSearchResults(int numDocuments)=0
void startMemberSubtitle()
Definition: htmlgen.cpp:1488
void startDirDepGraph()
Definition: htmlgen.cpp:1763
uint count() const
Definition: qlist.h:66
void docify(const char *str)
Definition: htmlgen.cpp:471
void endParamList()
Definition: htmlgen.cpp:1869
virtual bool mkdir(const QString &dirName, bool acceptAbsPath=TRUE) const
Definition: qdir_unix.cpp:98
void startIndexItem(const char *ref, const char *file)
Definition: htmlgen.cpp:1057
static SearchIndexIntf * searchIndex
Definition: doxygen.h:133
Q_EXPORT uint qstrlen(const char *str)
Definition: qcstring.h:81
void writeCodeAnchor(const char *anchor)
Definition: htmlgen.cpp:665
static QCString removeEmptyLines(const QCString &s)
Definition: htmlgen.cpp:186
void startPlainFile(const char *name)
Definition: outputgen.cpp:42
const double e
void endParagraph()
Definition: htmlgen.cpp:1037
void writeLabel(const char *l, bool isLast)
Definition: htmlgen.cpp:2532
virtual QCString trGeneratedBy()=0
fileName
Definition: dumpTree.py:9
uint count() const
Definition: qlist.h:131
void endMemberDocList()
Definition: htmlgen.cpp:1537
static void writeSearchData(const char *dir)
Definition: htmlgen.cpp:781
int hierarchyClasses
Definition: index.cpp:57
void writeImage(FTextStream &t, const char *path, const char *relPath, const char *file, bool generateMap=TRUE) const
Definition: diagram.cpp:1353
def key(type, name=None)
Definition: graph.py:13
void writeLineNumber(const char *, const char *, const char *, int)
Definition: htmlgen.cpp:500
void startInlineMemberType()
Definition: htmlgen.cpp:2490
void startHeaderSection()
Definition: htmlgen.cpp:2440
Singleton for managing resources compiled into an executable.
Definition: resourcemgr.h:32
void startMemberDocName(bool)
Definition: htmlgen.cpp:1562
QCString convertToHtml(const char *s, bool keepEntities)
Definition: util.cpp:5746
QCString right(uint len) const
Definition: qcstring.cpp:231
std::void_t< T > n
const double a
const char * writeUtf8Char(FTextStream &t, const char *s)
Definition: util.cpp:7165
bool open(int)
Definition: qfile_unix.cpp:134
void endMemberList()
Definition: htmlgen.cpp:1362
void endConstraintParam()
Definition: htmlgen.cpp:2395
QCString m_relPath
Definition: htmlgen.h:67
void startInclDepGraph()
Definition: htmlgen.cpp:1709
static void startQuickIndexList(FTextStream &t, bool compact, bool topLevel=TRUE)
Definition: htmlgen.cpp:1883
virtual void addWord(const char *word, bool hiPriority)=0
void startMemberGroupDocs()
Definition: htmlgen.cpp:1796
void addStyleSheetFile(const char *name)
Definition: index.h:149
char versionString[]
Definition: version.cpp:1
void startIndexValue(bool)
Definition: htmlgen.cpp:1521
void startIndent()
Definition: htmlgen.cpp:1814
void endHtmlLink()
Definition: htmlgen.cpp:1148
void endQuickIndices()
Definition: htmlgen.cpp:2133
void endConstraintDocs()
Definition: htmlgen.cpp:2415
void writeObjectLink(const char *ref, const char *file, const char *anchor, const char *name)
Definition: htmlgen.cpp:1104
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
void endMemberItem()
Definition: htmlgen.cpp:1394
QCString clearBlock(const char *s, const char *begin, const char *end)
Clear a text block s from begin to end markers.
Definition: htmlgen.cpp:106
p
Definition: test.py:223
void endIndexItem(const char *ref, const char *file)
Definition: htmlgen.cpp:1081
A bunch of utility functions.
void writeGraphicalHierarchy(const DotGfxHierarchyTable &g)
Definition: htmlgen.cpp:1781
int indexedPages
Definition: index.cpp:61
const char * data() const
Definition: qcstring.h:207
void startMemberDocList()
Definition: htmlgen.cpp:1532
void addImageFile(const char *name)
Definition: index.h:147
QCString dateToString(bool includeTime)
Definition: util.cpp:2473
#define Config_getString(val)
Definition: config.cpp:660
void writeChar(char c)
Definition: htmlgen.cpp:1247
void endMemberSubtitle()
Definition: htmlgen.cpp:1494
void endParameterType()
Definition: htmlgen.cpp:1605
type * current() const
Definition: qlist.h:146
void _writeCodeLink(const char *className, const char *ref, const char *file, const char *anchor, const char *name, const char *tooltip)
Definition: htmlgen.cpp:533
void startFontClass(const char *s)
Definition: htmlgen.cpp:655
#define Config_getBool(val)
Definition: config.cpp:664
QCString name
Definition: outputgen.h:42
static void writeSearchPage()
Definition: htmlgen.cpp:2193
QIODevice * device() const
void endIndexValue(const char *, bool)
Definition: htmlgen.cpp:1527
type * getFirst() const
Definition: qlist.h:95
QCString selectBlock(const QCString &s, const QCString &name, bool enable)
Definition: htmlgen.cpp:146
void startMemberDoc(const char *, const char *, const char *, const char *, bool)
Definition: htmlgen.cpp:1542
static QCString g_header
Definition: htmlgen.cpp:50
void startFile(const char *name, const char *manName, const char *title)
Definition: htmlgen.cpp:843
QFile * file
Definition: outputgen.h:487
void endMemberHeader()
Definition: htmlgen.cpp:1482
void startMemberTemplateParams()
Definition: htmlgen.cpp:1400
type * next()
Definition: qinternallist.h:89
void endFile()
Definition: htmlgen.cpp:948
void err(const char *fmt,...)
Definition: message.cpp:226
void endIndexList()
Definition: htmlgen.cpp:1505
int documentedGroups
Definition: index.cpp:59
void endParameterList()
Definition: htmlgen.cpp:1647
void startParamList(ParamListTypes, const char *)
Definition: htmlgen.cpp:1861
void endMemberDoc(bool)
Definition: htmlgen.cpp:1670
Buffer used to store strings.
Definition: bufstr.h:30
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
void endClassDiagram(const ClassDiagram &, const char *, const char *)
Definition: htmlgen.cpp:1334
QCString fileName
Definition: outputgen.h:488
void startDotGraph()
Definition: htmlgen.cpp:1681
LayoutNavEntry * rootNavEntry() const
Definition: layout.cpp:1370
QCString dir
Definition: outputgen.h:489
static void writeServerSearchBox(FTextStream &t, const char *relPath, bool highlightSearch)
Definition: htmlgen.cpp:75
void startGroupCollaboration()
Definition: htmlgen.cpp:1727
static void init()
Definition: htmlgen.cpp:683
void startParagraph()
Definition: htmlgen.cpp:1032
virtual QCString trGeneratedAt(const char *date, const char *projName)=0
void endMemberGroupHeader()
Definition: htmlgen.cpp:1791
void endFontClass()
Definition: htmlgen.cpp:660
void writeString(const char *text)
Definition: htmlgen.cpp:1042
int documentedNamespaces
Definition: index.cpp:60
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1) const
Definition: dot.cpp:3824
static void renderQuickLinksAsTabs(FTextStream &t, const QCString &relPath, LayoutNavEntry *hlEntry, LayoutNavEntry::Kind kind, bool highlightParent, bool highlightSearch)
Definition: htmlgen.cpp:1996
FTextStream t
Definition: outputgen.h:486
QCString anchor
Definition: outputgen.h:45
void writeNonBreakableSpace(int)
Definition: htmlgen.cpp:1831
void startMemberList()
Definition: htmlgen.cpp:1357
QCString fixSpaces(const QCString &s)
Definition: index.cpp:223
void writeGraph(FTextStream &t, const char *path, const char *fileName) const
Definition: dot.cpp:2366
int documentedNamespaceMembers[NMHL_Total]
Definition: index.cpp:64
static QCString getSearchBox(bool serverSide, QCString relPath, bool highlightSearch)
Definition: htmlgen.cpp:171
virtual QCString trSearch()=0
static void endSectionSummary(FTextStream &t)
Definition: htmlgen.cpp:1295
static QCString writeLogoAsString(const char *path)
Definition: htmlgen.cpp:908
static void writePageFooter(FTextStream &t, const QCString &, const QCString &, const QCString &)
Definition: htmlgen.cpp:937
void writeStartAnnoItem(const char *type, const char *file, const char *path, const char *name)
Definition: htmlgen.cpp:1094
static QCString substituteHtmlKeywords(const QCString &s, const QCString &title, const QCString &relPath, const QCString &navPath=QCString())
Definition: htmlgen.cpp:216
static void endQuickIndexItem(FTextStream &t, const char *l)
Definition: htmlgen.cpp:1930
void startParameterList(bool)
Definition: htmlgen.cpp:1578
void startMemberHeader(const char *)
Definition: htmlgen.cpp:1462
bool m_streamSet
Definition: htmlgen.h:64
void endMemberDescription()
Definition: htmlgen.cpp:1439
static QCString g_mathjax_code
Definition: htmlgen.cpp:52
void endInclDepGraph(const DotInclDepGraph &g)
Definition: htmlgen.cpp:1714
Q_EXPORT char * qstrcpy(char *dst, const char *src)
Definition: qcstring.h:87
QString fileName() const
virtual void setCurrentDoc(Definition *ctx, const char *anchor, bool isSourceFile)=0
#define DBG_HTML(x)
Definition: htmlgen.cpp:48
virtual void exceptionEntry(const char *, bool)
Definition: htmlgen.cpp:1654
static void startQuickIndexItem(FTextStream &t, const char *l, bool hl, bool, const QCString &relPath)
Definition: htmlgen.cpp:1916
void writeStyleInfo(int part)
Definition: htmlgen.cpp:963
void startConstraintDocs()
Definition: htmlgen.cpp:2410
void endProjectNumber()
Definition: htmlgen.cpp:958
static void startSectionSummary(FTextStream &t, int sectionCount)
Definition: htmlgen.cpp:1283
Translator * theTranslator
Definition: language.cpp:157
void startMemberDocPrefixItem()
Definition: htmlgen.cpp:1550
QCString writeGraph(FTextStream &out, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1, bool linkRelations=TRUE) const
Definition: dot.cpp:3977
int m_sectionCount
Definition: htmlgen.h:357
QCString url
Definition: outputgen.h:44
void docify(const char *text)
Definition: htmlgen.cpp:1212
virtual QCString trCompoundMembers()=0
void startMemberDocSimple()
Definition: htmlgen.cpp:2477
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
QCString lastFile
Definition: htmlgen.h:350
type * at(uint i)
Definition: qinternallist.h:81
HighlightedItem
Definition: index.h:180
void createSubDirs(QDir &d)
Definition: util.cpp:5458
void addIndexFile(const char *name)
Definition: index.h:145
void setCurrentDoc(Definition *context, const char *anchor, bool isSourceFile)
Definition: htmlgen.cpp:2608
QCString replaceColorMarkers(const char *str)
Definition: util.cpp:7919
void endInlineHeader()
Definition: htmlgen.cpp:2472
void startDoxyAnchor(const char *fName, const char *manName, const char *anchor, const char *name, const char *args)
Definition: htmlgen.cpp:1016
static void endQuickIndexList(FTextStream &t, bool compact)
Definition: htmlgen.cpp:1903
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1) const
Definition: dot.cpp:3503
void addWord(const char *word, bool hiPriority)
Definition: htmlgen.cpp:2616
static QCString spaces
Definition: doxygen.h:151
const char * cs
virtual ~HtmlGenerator()
Definition: htmlgen.cpp:678
void setRelativePath(const QCString &path)
Definition: htmlgen.cpp:418
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
void startConstraintType()
Definition: htmlgen.cpp:2400
virtual QCString trLegend()=0
void endConstraintType()
Definition: htmlgen.cpp:2405
uint count() const
Definition: qinternallist.h:56
void startIndexKey()
Definition: htmlgen.cpp:1510
Definition: dot.h:42
QCString utf8() const
Definition: qstring.cpp:14507
LayoutNavEntry * parent() const
Definition: layout.h:147
void endMemberDeclaration(const char *anchor, const char *inheritId)
Definition: htmlgen.cpp:2598
void startParameterType(bool first, const char *key)
Definition: htmlgen.cpp:1586
void endMemberSections()
Definition: htmlgen.cpp:1453
void endInlineMemberName()
Definition: htmlgen.cpp:2508
unsigned uint
Definition: qglobal.h:351
void startMemberItem(const char *anchor, int, const char *inheritId)
Definition: htmlgen.cpp:1371
void startSection(const char *, const char *, SectionInfo::SectionType)
Definition: htmlgen.cpp:1185
QCString externalLinkTarget()
Definition: util.cpp:7850
void startSimpleSect(SectionTypes, const char *, const char *, const char *)
Definition: htmlgen.cpp:1840
static void writeClientSearchBox(FTextStream &t, const char *relPath)
Definition: htmlgen.cpp:55
void startTitleHead(const char *)
Definition: htmlgen.cpp:2445
Definition: dot.h:43
virtual void accept(DocVisitor *v)=0
void writeSummaryLink(const char *file, const char *anchor, const char *title, bool first)
Definition: htmlgen.cpp:2572
static QCString * s
Definition: config.cpp:1042
virtual bool exists() const
Definition: qdir.cpp:820
union ptb::content::word::word word
const bool TRUE
Definition: qglobal.h:371
void endCodeLine()
Definition: htmlgen.cpp:650
void writeSplitBar(const char *name)
Definition: htmlgen.cpp:2167
void writeLogo()
Definition: htmlgen.cpp:932
void endSimpleSect()
Definition: htmlgen.cpp:1856
static QCString str
static IndexList * indexList
Definition: doxygen.h:149
void writeTooltip(const char *id, const DocLinkInfo &docInfo, const char *decl, const char *desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo)
Definition: htmlgen.cpp:559
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: util.cpp:5088
void startTextLink(const char *file, const char *anchor)
Definition: htmlgen.cpp:1125
int annotatedClasses
Definition: index.cpp:55
void startIndexList()
Definition: htmlgen.cpp:1500
void startInlineMemberDoc()
Definition: htmlgen.cpp:2514
FTextStream m_t
Definition: htmlgen.h:65
QTextStream & endl(QTextStream &s)
void writeSearchInfo()
Definition: htmlgen.cpp:902
QCString relPath
Definition: htmlgen.h:351
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
Definition: util.cpp:7856
bool exists() const
Definition: qfileinfo.cpp:265
#define ASSERT(x)
Definition: qglobal.h:590
HtmlCodeGenerator m_codeGen
Definition: htmlgen.h:359
QCString filterTitle(const QCString &title)
Definition: util.cpp:7765
void startCodeLine(bool)
Definition: htmlgen.cpp:641
bool isReadable() const
Definition: qfileinfo.cpp:405
void startIndexListItem()
Definition: htmlgen.cpp:1047