59 t <<
" <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
60 t <<
" <span class=\"left\">\n";
61 t <<
" <img id=\"MSearchSelect\" src=\"" << relPath <<
"search/mag_sel.png\"\n";
62 t <<
" onmouseover=\"return searchBox.OnSearchSelectShow()\"\n";
63 t <<
" onmouseout=\"return searchBox.OnSearchSelectHide()\"\n";
65 t <<
" <input type=\"text\" id=\"MSearchField\" value=\""
67 t <<
" onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n";
68 t <<
" onblur=\"searchBox.OnSearchFieldFocus(false)\" \n";
69 t <<
" onkeyup=\"searchBox.OnSearchFieldChange(event)\"/>\n";
70 t <<
" </span><span class=\"right\">\n";
71 t <<
" <a id=\"MSearchClose\" href=\"javascript:searchBox.CloseResultsWindow()\">"
72 <<
"<img id=\"MSearchCloseImg\" border=\"0\" src=\"" << relPath <<
"search/close.png\" alt=\"\"/></a>\n";
82 t <<
" <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
83 t <<
" <div class=\"left\">\n";
84 t <<
" <form id=\"FSearchBox\" action=\"" << relPath;
93 t <<
"\" method=\"get\">\n";
94 t <<
" <img id=\"MSearchSelect\" src=\"" << relPath <<
"search/mag.png\" alt=\"\"/>\n";
97 t <<
" <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\""
99 t <<
" onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n";
100 t <<
" onblur=\"searchBox.OnSearchFieldFocus(false)\"/>\n";
102 t <<
" </div><div class=\"right\"></div>\n";
110 QCString
clearBlock(
const char *s,
const char *begin,
const char *end)
112 if (s==0 || begin==0 || end==0)
return s;
114 int beginLen = qstrlen(begin);
115 int endLen = qstrlen(end);
117 for (p=s; (q=strstr(p,begin))!=0; p=q+endLen)
121 if ((q=strstr(p,end))==0)
130 QCString result(resLen+1);
132 for (r=result.rawData(), p=s; (q=strstr(p,begin))!=0; p=q+endLen)
138 if ((q=strstr(p,end))==0)
140 memcpy(r,begin,beginLen);
150 QCString
selectBlock(
const QCString& s,
const QCString &name,
bool enable)
153 const QCString begin =
"<!--BEGIN " + name +
"-->";
154 const QCString end =
"<!--END " + name +
"-->";
155 const QCString nobegin =
"<!--BEGIN !" + name +
"-->";
156 const QCString noend =
"<!--END !" + name +
"-->";
175 static QCString
getSearchBox(
bool serverSide, QCString relPath,
bool highlightSearch)
187 return QCString(result);
193 const char *p=s.
data();
202 while (*e==
' ' || *e==
'\t') e++;
221 const QCString &title,
222 const QCString &relPath,
223 const QCString &navPath=QCString())
227 QStrList extraCssFile;
228 QCString generatedBy;
229 QCString treeViewCssJs;
230 QCString searchCssJs;
233 QCString extraCssText;
239 static bool serverBasedSearch =
Config_getBool(SERVER_BASED_SEARCH);
243 static bool hasProjectName = !projectName.isEmpty();
247 static bool titleArea = (hasProjectName || hasProjectBrief || hasProjectLogo || (disableIndex && searchEngine));
250 if (cssFile.isEmpty())
252 cssFile =
"doxygen.css";
256 QFileInfo cssfi(cssFile);
259 cssFile = cssfi.fileName().utf8();
263 cssFile =
"doxygen.css";
269 for (uint i=0; i<extraCssFile.count(); ++i)
271 QCString fileName(extraCssFile.at(i));
272 if (!fileName.isEmpty())
274 QFileInfo fi(fileName);
277 extraCssText +=
"<link href=\"$relpath^"+
stripPath(fileName)+
"\" rel=\"stylesheet\" type=\"text/css\"/>\n";
293 treeViewCssJs =
"<link href=\"$relpath^navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"
294 "<script type=\"text/javascript\" src=\"$relpath^resize.js\"></script>\n"
295 "<script type=\"text/javascript\" src=\"$relpath^navtreedata.js\"></script>\n"
296 "<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n"
297 "<script type=\"text/javascript\">\n"
298 " $(document).ready(initResizable);\n"
304 searchCssJs =
"<link href=\"$relpath^search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n";
305 if (!serverBasedSearch)
307 searchCssJs +=
"<script type=\"text/javascript\" src=\"$relpath^search/searchdata.js\"></script>\n";
309 searchCssJs +=
"<script type=\"text/javascript\" src=\"$relpath^search/search.js\"></script>\n";
311 if (!serverBasedSearch)
315 searchCssJs +=
"<script type=\"text/javascript\">\n"
316 " $(document).ready(function() { init_search(); });\n"
324 searchCssJs +=
"<script type=\"text/javascript\">\n"
325 " $(document).ready(function() {\n"
326 " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n"
332 searchCssJs +=
"<link rel=\"search\" href=\"" + relPath +
333 "search_opensearch.php?v=opensearch.xml\" "
334 "type=\"application/opensearchdescription+xml\" title=\"" +
335 (hasProjectName ? projectName : QCString(
"Doxygen")) +
339 searchBox =
getSearchBox(serverBasedSearch, relPath, FALSE);
345 if (path.isEmpty() || path.left(2)==
"..")
347 path.prepend(relPath);
349 mathJaxJs =
"<script type=\"text/x-mathjax-config\">\n"
350 " MathJax.Hub.Config({\n"
351 " extensions: [\"tex2jax.js\"";
353 const char *s = mathJaxExtensions.first();
356 mathJaxJs+=
", \""+QCString(s)+
".js\"";
357 s = mathJaxExtensions.next();
359 if (mathJaxFormat.isEmpty())
361 mathJaxFormat =
"HTML-CSS";
364 " jax: [\"input/TeX\",\"output/"+mathJaxFormat+
"\"],\n"
371 mathJaxJs +=
"</script>";
372 mathJaxJs +=
"<script type=\"text/javascript\" src=\"" + path +
"MathJax.js\"></script>\n";
382 result =
substitute(result,
"$navpath",navPath);
383 result =
substitute(result,
"$stylesheet",cssFile);
384 result =
substitute(result,
"$treeview",treeViewCssJs);
385 result =
substitute(result,
"$searchbox",searchBox);
386 result =
substitute(result,
"$search",searchCssJs);
387 result =
substitute(result,
"$mathjax",mathJaxJs);
388 result =
substitute(result,
"$generatedby",generatedBy);
389 result =
substitute(result,
"$extrastylesheet",extraCssText);
390 result =
substitute(result,
"$relpath$",relPath);
391 result =
substitute(result,
"$relpath^",relPath);
394 result =
selectBlock(result,
"DISABLE_INDEX",disableIndex);
395 result =
selectBlock(result,
"GENERATE_TREEVIEW",treeView);
396 result =
selectBlock(result,
"SEARCHENGINE",searchEngine);
397 result =
selectBlock(result,
"TITLEAREA",titleArea);
398 result =
selectBlock(result,
"PROJECT_NAME",hasProjectName);
399 result =
selectBlock(result,
"PROJECT_NUMBER",hasProjectNumber);
400 result =
selectBlock(result,
"PROJECT_BRIEF",hasProjectBrief);
401 result =
selectBlock(result,
"PROJECT_LOGO",hasProjectLogo);
411 : m_streamSet(FALSE), m_col(0)
416 : m_col(0), m_relPath(relPath)
439 int spacesToNextTabStop;
445 case '\t': spacesToNextTabStop =
446 tabSize - (
m_col%tabSize);
448 m_col+=spacesToNextTabStop;
465 {
m_t <<
"<"; p++; }
467 {
m_t <<
">"; p++; }
491 case '<':
m_t <<
"<";
break;
492 case '>':
m_t <<
">";
break;
493 case '&':
m_t <<
"&";
break;
494 case '"':
m_t <<
""";
break;
497 {
m_t <<
"<"; p++; }
499 {
m_t <<
">"; p++; }
510 const char *anchor,
int l)
513 const int maxLineNrStr = 10;
514 char lineNumber[maxLineNrStr];
515 char lineAnchor[maxLineNrStr];
516 qsnprintf(lineNumber,maxLineNrStr,
"%5d",l);
517 qsnprintf(lineAnchor,maxLineNrStr,
"l%05d",l);
519 m_t <<
"<div class=\"line\">";
520 m_t <<
"<a name=\"" << lineAnchor <<
"\"></a><span class=\"lineno\">";
534 const char *anchor,
const char *name,
543 const char *ref,
const char *f,
544 const char *anchor,
const char *name,
549 m_t <<
"<a class=\"" << className <<
"Ref\" ";
554 m_t <<
"<a class=\"" << className <<
"\" ";
559 if (anchor)
m_t <<
"#" << anchor;
565 m_col+=qstrlen(name);
569 const char *decl,
const char *desc,
573 m_t <<
"<div class=\"ttc\" id=\"" <<
id <<
"\">";
574 m_t <<
"<div class=\"ttname\">";
575 if (!docInfo.
url.isEmpty())
580 if (!docInfo.
anchor.isEmpty())
587 if (!docInfo.
url.isEmpty())
594 m_t <<
"<div class=\"ttdeci\">";
600 m_t <<
"<div class=\"ttdoc\">";
604 if (!defInfo.
file.isEmpty())
606 m_t <<
"<div class=\"ttdef\"><b>Definition:</b> ";
607 if (!defInfo.
url.isEmpty())
612 if (!defInfo.
anchor.isEmpty())
619 if (!defInfo.
url.isEmpty())
625 if (!declInfo.
file.isEmpty())
627 m_t <<
"<div class=\"ttdecl\"><b>Declaration:</b> ";
628 if (!declInfo.
url.isEmpty())
633 if (!declInfo.
anchor.isEmpty())
640 if (!declInfo.
url.isEmpty())
654 if (!hasLineNumbers)
m_t <<
"<div class=\"line\">";
696 if (!d.exists() && !d.mkdir(dname))
698 err(
"Could not create output directory %s\n",dname.data());
745 QFile f(dname+
"/dynsections.js");
746 if (f.open(IO_WriteOnly))
753 "$(document).ready(function() {\n"
754 " $('.code,.codeRef').each(function() {\n"
755 " $(this).data('powertip',$('#'+$(this).attr('href').replace(/.*\\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());\n"
756 " $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true });\n"
796 static bool serverBasedSearch =
Config_getBool(SERVER_BASED_SEARCH);
806 if (serverBasedSearch)
820 QFile f(searchDirName+
"/search.css");
821 if (f.open(IO_WriteOnly))
885 t <<
"<script type=\"text/javascript\">\n";
886 t <<
"var searchBox = new SearchBox(\"searchBox\", \""
897 static bool serverBasedSearch =
Config_getBool(SERVER_BASED_SEARCH);
898 if (searchEngine && !serverBasedSearch)
901 t <<
"<!-- window showing the filter options -->\n";
902 t <<
"<div id=\"MSearchSelectWindow\"\n";
903 t <<
" onmouseover=\"return searchBox.OnSearchSelectShow()\"\n";
904 t <<
" onmouseout=\"return searchBox.OnSearchSelectHide()\"\n";
905 t <<
" onkeydown=\"return searchBox.OnSearchSelectKey(event)\">\n";
908 t <<
"<!-- iframe showing the search results (closed by default) -->\n";
909 t <<
"<div id=\"MSearchResultsWindow\">\n";
910 t <<
"<iframe src=\"javascript:void(0)\" frameborder=\"0\" \n";
911 t <<
" name=\"MSearchResults\" id=\"MSearchResults\">\n";
939 result +=
" \n<a href=\"http://www.doxygen.org/index.html\">\n"
940 "<img class=\"footer\" src=\"";
942 result +=
"doxygen.png\" alt=\"doxygen\"/></a> ";
954 const QCString &relPath,
const QCString &navPath)
971 t <<
"<h3 class=\"version\">";
1000 QFileInfo cssfi(cssname);
1001 if (!cssfi.exists() || !cssfi.isFile() || !cssfi.isReadable())
1003 err(
"style sheet %s does not exist or is not readable!",
Config_getString(HTML_STYLESHEET).data());
1016 static QStrList extraCssFile =
Config_getList(HTML_EXTRA_STYLESHEET);
1017 for (uint i=0; i<extraCssFile.count(); ++i)
1019 QCString
fileName(extraCssFile.at(i));
1033 const char *anchor,
const char *,
1036 t <<
"<a id=\"" << anchor <<
"\"></a>";
1055 t <<
"</p>" <<
endl;
1070 t <<
"</li>" <<
endl;
1080 t <<
"<a class=\"elRef\" ";
1085 t <<
"<a class=\"el\" ";
1111 const char *path,
const char *name)
1121 const char *anchor,
const char *name)
1125 t <<
"<a class=\"elRef\" ";
1130 t <<
"<a class=\"el\" ";
1135 if (anchor)
t <<
"#" << anchor;
1145 if (anchor)
t <<
"#" << anchor;
1156 static bool generateTreeView =
Config_getBool(GENERATE_TREEVIEW);
1158 if (generateTreeView)
t <<
"target=\"top\" ";
1171 if (extraIndentLevel==2)
1173 t <<
"<h4 class=\"groupheader\">";
1175 else if (extraIndentLevel==1)
1177 t <<
"<h3 class=\"groupheader\">";
1181 t <<
"<h2 class=\"groupheader\">";
1187 if (extraIndentLevel==2)
1189 t <<
"</h4>" <<
endl;
1191 else if (extraIndentLevel==1)
1193 t <<
"</h3>" <<
endl;
1197 t <<
"</h2>" <<
endl;
1210 default: ASSERT(0);
break;
1212 t <<
"<a id=\"" << lab <<
"\"></a>";
1224 default: ASSERT(0);
break;
1244 case '<':
t <<
"<";
break;
1245 case '>':
t <<
">";
break;
1246 case '&':
t <<
"&";
break;
1247 case '"':
t <<
""";
break;
1248 case '-':
if (inHtmlComment)
t <<
"-";
else t <<
"-";
break;
1251 {
t <<
"<"; p++; }
1253 {
t <<
">"; p++; }
1274 const QCString &relPath,
int sectionCount)
1277 static bool dynamicSections =
Config_getBool(HTML_DYNAMIC_SECTIONS);
1278 if (dynamicSections)
1280 t <<
"<div id=\"dynsection-" << sectionCount <<
"\" "
1281 "onclick=\"return toggleVisibility(this)\" "
1282 "class=\"dynheader closed\" "
1283 "style=\"cursor:pointer;\">" <<
endl;
1284 t <<
" <img id=\"dynsection-" << sectionCount <<
"-trigger\" src=\""
1285 << relPath <<
"closed.png\" alt=\"+\"/> ";
1289 t <<
"<div class=\"dynheader\">" <<
endl;
1296 t <<
"</div>" <<
endl;
1302 static bool dynamicSections =
Config_getBool(HTML_DYNAMIC_SECTIONS);
1303 if (dynamicSections)
1305 t <<
"<div id=\"dynsection-" << sectionCount <<
"-summary\" "
1306 "class=\"dynsummary\" "
1307 "style=\"display:block;\">" <<
endl;
1314 static bool dynamicSections =
Config_getBool(HTML_DYNAMIC_SECTIONS);
1315 if (dynamicSections)
1317 t <<
"</div>" <<
endl;
1324 static bool dynamicSections =
Config_getBool(HTML_DYNAMIC_SECTIONS);
1325 if (dynamicSections)
1327 t <<
"<div id=\"dynsection-" << sectionCount <<
"-content\" "
1328 "class=\"dyncontent\" "
1329 "style=\"display:none;\">" <<
endl;
1333 t <<
"<div class=\"dyncontent\">" <<
endl;
1340 t <<
"</div>" <<
endl;
1351 const char *fileName,
const char *name)
1357 t <<
" <div class=\"center\">" <<
endl;
1358 t <<
" <img src=\"";
1359 t << relPath << fileName <<
".png\" usemap=\"#" <<
convertToId(name);
1360 t <<
"_map\" alt=\"\"/>" <<
endl;
1362 t <<
"_map\" name=\"";
1364 t <<
"_map\">" <<
endl;
1392 t <<
"<table class=\"memberdecls\">" <<
endl;
1395 t <<
"<tr class=\"memitem:" << anchor;
1398 t <<
" inherit " << inheritId;
1403 case 0:
t <<
"<td class=\"memItemLeft\" align=\"right\" valign=\"top\">";
break;
1404 case 1:
t <<
"<td class=\"memItemLeft\" >";
break;
1405 case 2:
t <<
"<td class=\"memItemLeft\" valign=\"top\">";
break;
1406 default:
t <<
"<td class=\"memTemplParams\" colspan=\"2\">";
break;
1422 t <<
"</td></tr>" <<
endl;
1423 t <<
"<tr class=\"memitem:" << anchor;
1426 t <<
" inherit " << inheritId;
1428 t <<
"\"><td class=\"memTemplItemLeft\" align=\"right\" valign=\"top\">";
1435 QCString className = templ ?
"memTemplItemRight" :
"memItemRight";
1436 t <<
" </td><td class=\"" << className <<
"\" valign=\"bottom\">";
1444 t <<
"<table class=\"memberdecls\">" <<
endl;
1447 t <<
"<tr class=\"memdesc:" << anchor;
1450 t <<
" inherit " << inheritId;
1452 t <<
"\"><td class=\"mdescLeft\"> </td><td class=\"mdescRight\">";
1458 t <<
"<br /></td></tr>" <<
endl;
1474 t <<
"</table>" <<
endl;
1488 t <<
"<table class=\"memberdecls\">" <<
endl;
1491 t <<
"<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\">";
1494 t <<
"<a name=\"" << anchor <<
"\"></a>" <<
endl;
1501 t <<
"</h2></td></tr>" <<
endl;
1507 t <<
"<tr><td class=\"ititle\" colspan=\"2\">";
1513 t <<
"</td></tr>" <<
endl;
1518 t <<
"<table>" <<
endl;
1523 t <<
"</table>" <<
endl;
1529 t <<
" <tr><td class=\"indexkey\">";
1540 t <<
"<td class=\"indexvalue\">";
1545 t <<
"</td></tr>" <<
endl;
1559 const char *anchor,
const char *title,
1560 int memCount,
int memTotal,
bool showInline)
1563 t <<
"\n<h2 class=\"memtitle\">"
1564 <<
"<span class=\"permalink\"><a href=\"#" << anchor <<
"\">§ </a></span>"
1568 t <<
" <span class=\"overload\">[" << memCount <<
"/" << memTotal <<
"]</span>";
1572 t <<
"\n<div class=\"memitem\">" <<
endl;
1573 t <<
"<div class=\"memproto\">" <<
endl;
1579 t <<
"<div class=\"memtemplate\">" <<
endl;
1585 t <<
"</div>" <<
endl;
1592 t <<
" <table class=\"memname\">" <<
endl;
1594 t <<
" <tr>" <<
endl;
1595 t <<
" <td class=\"memname\">";
1601 t <<
"</td>" <<
endl;
1608 if (openBracket)
t <<
"(";
1609 t <<
"</td>" <<
endl;
1617 t <<
" <td class=\"paramtype\">";
1622 t <<
" <tr>" <<
endl;
1623 t <<
" <td class=\"paramkey\">";
1625 t <<
"</td>" <<
endl;
1626 t <<
" <td></td>" <<
endl;
1627 t <<
" <td class=\"paramtype\">";
1634 t <<
" </td>" <<
endl;
1640 t <<
" <td class=\"paramname\">";
1650 if (closeBracket)
t <<
"</td><td>)";
1651 t <<
"</td>" <<
endl;
1656 t <<
" </td>" <<
endl;
1657 t <<
" </tr>" <<
endl;
1658 t <<
" <tr>" <<
endl;
1659 t <<
" <td></td>" <<
endl;
1661 if (closeBracket)
t <<
")";
1662 t <<
"</td>" <<
endl;
1663 t <<
" <td></td><td>";
1668 t <<
"</td>" <<
endl;
1669 t <<
" </tr>" <<
endl;
1676 t <<
"</td>" <<
endl;
1677 t <<
" </tr>" <<
endl;
1683 t <<
"</td>" <<
endl;
1684 t <<
" </tr>" <<
endl;
1685 t <<
" <tr>" <<
endl;
1686 t <<
" <td align=\"right\">";
1689 t << prefix <<
"</td><td>(</td><td colspan=\"2\">";
1690 else if (closeBracket)
1691 t <<
"</td><td>)</td><td></td><td>";
1693 t <<
"</td><td></td><td colspan=\"2\">";
1701 t <<
" </tr>" <<
endl;
1703 t <<
" </table>" <<
endl;
1722 if (generateLegend && !umlLook)
1724 t <<
"<center><span class=\"legend\">[";
1728 t <<
"]</span></center>";
1814 t <<
"<tr><td colspan=\"2\"><div class=\"groupHeader\">";
1819 t <<
"</div></td></tr>" <<
endl;
1824 t <<
"<tr><td colspan=\"2\"><div class=\"groupText\">";
1829 t <<
"</div></td></tr>" <<
endl;
1844 t <<
"<div class=\"memdoc\">\n";
1868 t <<
"<table class=\"fieldtable\">" <<
endl
1869 <<
"<tr><th colspan=\"2\">" << title <<
"</th></tr>";
1873 t <<
"</table>" <<
endl;
1883 t <<
"</tr>" <<
endl;
1888 t <<
"<td class=\"fieldname\">";
1898 t <<
"<td class=\"fielddoc\">";
1907 const char *filename,
const char *anchor,
1955 t <<
" <div id=\"navrow1\" class=\"tabs\">\n";
1959 t <<
" <div id=\"navrow2\" class=\"tabs2\">\n";
1961 t <<
" <ul class=\"tablist\">\n";
1984 const QCString &relPath)
1989 t <<
" class=\"current\"";
1992 if (l) t <<
"<a href=\"" <<
correctURL(l,relPath) <<
"\">";
2034 QListIterator<LayoutNavEntry> li(root->
children());
2037 for (li.toFirst();(entry=li.current());++li)
2044 for (li.toFirst();(entry=li.current());++li)
2048 QCString url = entry->url();
2049 t <<
"<li><a href=\"" << relPath << url <<
"\"><span>";
2051 t <<
"</span></a>\n";
2064 bool highlightParent,
bool highlightSearch)
2077 for (li.toFirst();(entry=li.current());++li)
2084 for (li.toFirst();(entry=li.current());++li)
2088 QCString url = entry->url();
2091 (entry->children().count()>0 ||
2092 (entry->kind()==kind && !highlightParent)
2102 static bool serverBasedSearch =
Config_getBool(SERVER_BASED_SEARCH);
2106 if (!serverBasedSearch)
2114 if (!highlightSearch)
2120 if (!highlightSearch)
2137 const QCString &relPath)
2139 static bool serverBasedSearch =
Config_getBool(SERVER_BASED_SEARCH);
2146 QCString searchPage;
2153 searchPage =
"search.php";
2155 t <<
"<script type=\"text/javascript\" src=\"" << relPath <<
"menudata.js\"></script>" <<
endl;
2156 t <<
"<script type=\"text/javascript\" src=\"" << relPath <<
"menu.js\"></script>" <<
endl;
2157 t <<
"<script type=\"text/javascript\">" <<
endl;
2158 t <<
"$(function() {" <<
endl;
2159 t <<
" initMenu('" << relPath <<
"',"
2160 << (searchEngine?
"true":
"false") <<
","
2161 << (serverBasedSearch?
"true":
"false") <<
",'"
2162 << searchPage <<
"','"
2166 if (!serverBasedSearch)
2168 t <<
" $(document).ready(function() { init_search(); });\n";
2172 t <<
" $(document).ready(function() {\n"
2173 <<
" if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n"
2178 t <<
"</script>" <<
endl;
2179 t <<
"<div id=\"main-nav\"></div>" <<
endl;
2189 t <<
"</div><!-- top -->" <<
endl;
2194 static bool generateTreeView =
Config_getBool(GENERATE_TREEVIEW);
2197 if (generateTreeView)
2200 "<div id=\"side-nav\" class=\"ui-resizable side-nav-resizable\">\n"
2201 " <div id=\"nav-tree\">\n"
2202 " <div id=\"nav-tree-contents\">\n"
2203 " <div id=\"nav-sync\" class=\"sync\"></div>\n"
2206 " <div id=\"splitbar\" style=\"-moz-user-select:none;\" \n"
2207 " class=\"ui-resizable-handle\">\n"
2210 "<script type=\"text/javascript\">\n"
2211 "$(document).ready(function(){initNavTree('") +
2213 QCString(
"','") + relpath +
2216 "<div id=\"doc-content\">\n");
2233 t <<
"<div class=\"contents\">" <<
endl;
2238 t <<
"</div><!-- contents -->" <<
endl;
2249 static bool generateTreeView =
Config_getBool(GENERATE_TREEVIEW);
2255 QCString configFileName = htmlOutput+
"/search_config.php";
2256 QFile cf(configFileName);
2257 if (cf.open(IO_WriteOnly))
2260 t <<
"<script language=\"php\">\n\n";
2261 t <<
"$config = array(\n";
2262 t <<
" 'PROJECT_NAME' => \"" <<
convertToHtml(projectName) <<
"\",\n";
2263 t <<
" 'GENERATE_TREEVIEW' => " << (generateTreeView?
"true":
"false") <<
",\n";
2264 t <<
" 'DISABLE_INDEX' => " << (disableIndex?
"true":
"false") <<
",\n";
2266 t <<
"$translator = array(\n";
2268 t <<
" 'search_results' => array(\n";
2285 QCString
fileName = htmlOutput+
"/search.php";
2287 if (f.open(IO_WriteOnly))
2294 t <<
"<script type=\"text/javascript\">\n";
2295 t <<
"var searchBox = new SearchBox(\"searchBox\", \""
2304 t <<
"</div>" <<
endl;
2307 t <<
"<script language=\"php\">\n";
2308 t <<
"require_once \"search_functions.php\";\n";
2313 if (generateTreeView)
2315 t <<
"</div><!-- doc-content -->\n";
2320 QCString scriptName = htmlOutput+
"/search/search.js";
2321 QFile sf(scriptName);
2322 if (sf.open(IO_WriteOnly))
2329 err(
"Failed to open file '%s' for writing...\n",scriptName.data());
2335 static bool generateTreeView =
Config_getBool(GENERATE_TREEVIEW);
2339 if (f.open(IO_WriteOnly))
2346 t <<
"<script type=\"text/javascript\">\n";
2347 t <<
"var searchBox = new SearchBox(\"searchBox\", \""
2353 t <<
" <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\"\" size=\"20\" accesskey=\"S\" onfocus=\"searchBox.OnSearchFieldFocus(true)\" onblur=\"searchBox.OnSearchFieldFocus(false)\"/>\n";
2355 t <<
" </div><div class=\"right\"></div>\n";
2364 t <<
"</div>" <<
endl;
2367 t <<
"<div class=\"header\">" <<
endl;
2368 t <<
" <div class=\"headertitle\">" <<
endl;
2370 t <<
" </div>" <<
endl;
2371 t <<
"</div>" <<
endl;
2372 t <<
"<div class=\"contents\">" <<
endl;
2374 t <<
"<div id=\"searchresults\"></div>" <<
endl;
2375 t <<
"</div>" <<
endl;
2377 if (generateTreeView)
2379 t <<
"</div><!-- doc-content -->" <<
endl;
2386 QFile sf(scriptName);
2387 if (sf.open(IO_WriteOnly))
2390 t <<
"var searchResultsText=["
2395 t <<
"var tagMap = {" <<
endl;
2398 QStrList &extraSearchMappings =
Config_getList(EXTRA_SEARCH_MAPPINGS);
2399 char *ml=extraSearchMappings.first();
2402 QCString mapLine = ml;
2403 int eqPos = mapLine.find(
'=');
2406 QCString tagName = mapLine.left(eqPos).stripWhiteSpace();
2407 QCString destName = mapLine.right(mapLine.length()-eqPos-1).stripWhiteSpace();
2408 if (!tagName.isEmpty())
2410 if (!first) t <<
"," <<
endl;
2411 t <<
" \"" << tagName <<
"\": \"" << destName <<
"\"";
2415 ml=extraSearchMappings.next();
2417 if (!first) t <<
endl;
2418 t <<
"};" << endl <<
endl;
2421 t <<
"$(document).ready(function() {" <<
endl;
2422 t <<
" var query = trim(getURLParameter('query'));" <<
endl;
2423 t <<
" if (query) {" <<
endl;
2424 t <<
" searchFor(query,0,20);" <<
endl;
2425 t <<
" } else {" <<
endl;
2426 t <<
" var results = $('#results');" <<
endl;
2433 err(
"Failed to open file '%s' for writing...\n",scriptName.data());
2439 t <<
"<div class=\"typeconstraint\">" <<
endl;
2440 t <<
"<dl><dt><b>" << header <<
"</b></dt><dd>" <<
endl;
2441 t <<
"<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">" <<
endl;
2446 t <<
"<tr><td valign=\"top\"><em>";
2456 t <<
"<td> :</td><td valign=\"top\"><em>";
2471 t <<
"</td></tr>" <<
endl;
2476 t <<
"</table>" <<
endl;
2477 t <<
"</dd>" <<
endl;
2478 t <<
"</dl>" <<
endl;
2479 t <<
"</div>" <<
endl;
2486 t <<
"<br class=\"" << style <<
"\" />" <<
endl;
2490 t <<
"<br />" <<
endl;
2496 t <<
"<div class=\"header\">" <<
endl;
2501 t <<
" <div class=\"headertitle\">" <<
endl;
2508 t <<
" </div>" <<
endl;
2513 t <<
"</div><!--header-->" <<
endl;
2520 t <<
"<table class=\"memberdecls\">" <<
endl;
2523 t <<
"<tr><td colspan=\"2\"><h3>";
2528 t <<
"</h3></td></tr>" <<
endl;
2534 t <<
"<table class=\"fieldtable\">" <<
endl;
2535 t <<
"<tr><th colspan=\"" << (isEnum?
"2":
"3") <<
"\">";
2543 t <<
"</table>" <<
endl;
2549 t <<
"<tr><td class=\"fieldtype\">" <<
endl;
2555 t <<
"</td>" <<
endl;
2561 t <<
"<td class=\"fieldname\">" <<
endl;
2567 t <<
"</td>" <<
endl;
2573 t <<
"<td class=\"fielddoc\">" <<
endl;
2579 t <<
"</td></tr>" <<
endl;
2585 t <<
"<span class=\"mlabels\">";
2593 t <<
"<span class=\"mlabel\">" << l <<
"</span>";
2603 const char *
id,
const char *ref,
2604 const char *
file,
const char *anchor,
2605 const char *title,
const char *name)
2607 DBG_HTML(
t <<
"<!-- writeInheritedSectionTitle -->" <<
endl;)
2608 QCString a = anchor;
2609 if (!a.isEmpty()) a.prepend(
"#");
2610 QCString classLink = QCString(
"<a class=\"el\" href=\"");
2620 classLink+=QCString(
"\">")+
convertToHtml(name,FALSE)+
"</a>";
2621 t <<
"<tr class=\"inherit_header " <<
id <<
"\">"
2622 <<
"<td colspan=\"2\" onclick=\"javascript:toggleInherit('" <<
id <<
"')\">"
2623 <<
"<img src=\"" << relPath <<
"closed.png\" alt=\"-\"/> "
2625 <<
"</td></tr>" <<
endl;
2632 t <<
" <div class=\"summary\">\n";
2641 t << relPath <<
file;
2656 t <<
"<tr class=\"separator:" << anchor;
2659 t <<
" inherit " << inheritId;
2661 t <<
"\"><td class=\"memSeparator\" colspan=\"2\"> </td></tr>\n";