64static constexpr auto hex=
"0123456789ABCDEF";
79 t <<
" <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
80 t <<
" <span class=\"left\">\n";
81 t <<
" <span id=\"MSearchSelect\" class=\"search-icon\">";
82 t <<
"<span class=\"search-icon-dropdown\"></span></span>\n";
83 t <<
" <input type=\"text\" id=\"MSearchField\" value=\"\" placeholder=\""
85 t <<
" </span><span class=\"right\">\n";
86 t <<
" <a id=\"MSearchClose\" href=\"javascript:searchBox.CloseResultsWindow()\">"
87 <<
"<div id=\"MSearchCloseImg\" class=\"close-icon\"></div></a>\n";
97 t <<
" <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
98 t <<
" <div class=\"left\">\n";
99 t <<
" <form id=\"FSearchBox\" action=\"" << relPath;
108 t <<
"\" method=\"get\">\n";
109 t <<
" <span id=\"MSearchSelectExt\" class=\"search-icon\"></span>\n";
112 t <<
" <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\"\" placeholder=\""
115 t <<
" </div><div class=\"right\"></div>\n";
146 if (macrofile.
empty())
return "";
152 const char *data = s.
data();
161 while (i < size && (data[i] ==
' ' || data[i] ==
'\t' || data[i] ==
'\n'))
163 if (data[i] ==
'\n') line++;
166 if (i >= size)
break;
170 warn(macrofile,line,
"file contains non valid code, expected '\\' got '{:c}'",data[i]);
176 i += strlen(
"newcommand");
180 i += strlen(
"renewcommand");
184 warn(macrofile,line,
"file contains non valid code, expected 'newcommand' or 'renewcommand'");
190 warn(macrofile,line,
"file contains non valid code, expected '{{' got '{:c}'",data[i]);
196 warn(macrofile,line,
"file contains non valid code, expected '\\' got '{:c}'",data[i]);
202 while (i < size && (data[i] !=
'}')) result+=data[i++];
205 warn(macrofile,line,
"file contains non valid code, no closing '}}' for command");
217 while (i < size && (data[i] !=
']')) nr += data[i++];
220 warn(macrofile,line,
"file contains non valid code, no closing ']'");
225 else if (data[i] !=
'{')
227 warn(macrofile,line,
"file contains non valid code, expected '[' or '{{' got '{:c}'",data[i]);
234 warn(macrofile,line,
"file contains non valid code, expected '{{' got '{:c}'",data[i]);
241 while (i < size && cnt)
253 else if (data[i] !=
'"') result+=data[i++];
261 if (cnt) result+=data[i];
279 warn(macrofile,line,
"file contains non valid code, no closing '}}' for replacement");
313 bool isSource =
false)
333 bool hasProjectName = !projectName.
empty();
340 bool hasCookie = treeView || searchEngine ||
Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE;
341 static bool titleArea = (hasProjectName || hasProjectBrief || hasProjectLogo || (disableIndex && searchEngine));
346 cssFile =
"doxygen.css";
359 cssFile =
"doxygen.css";
366 for (
const auto &fileName : extraCssFile)
368 if (!fileName.empty())
370 DString htmlStyleSheet = fileName;
373 extraCssText +=
"<link href=\""+htmlStyleSheet+
"\" rel=\"stylesheet\" type=\"text/css\"/>\n";
380 extraCssText +=
"<link href=\"$relpath^"+
stripPath(fileName)+
"\" rel=\"stylesheet\" type=\"text/css\"/>\n";
388 case TIMESTAMP_t::NO:
398 treeViewCssJs =
"<link href=\"$relpath^navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"
399 "<script type=\"text/javascript\" src=\"$relpath^navtreedata.js\"></script>\n"
400 "<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n";
405 searchCssJs =
"<link href=\"$relpath^search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n";
406 if (!serverBasedSearch)
408 searchCssJs +=
"<script type=\"text/javascript\" src=\"$relpath^search/searchdata.js\"></script>\n";
412 searchCssJs +=
"<style type=\"text/css\">\n"
414 " font-family: 'Material Symbols Outlined';\n"
415 " font-style: normal;\n"
416 " font-weight: 400;\n"
417 " src: url($relpath^MaterialSymbolsOutlined.min.woff2) format('woff2');\n"
419 ".material-symbols-outlined {\n"
420 " font-family: 'Material Symbols Outlined';\n"
421 " font-weight: normal;\n"
422 " font-style: normal;\n"
423 " font-size: 24px;\n"
425 " letter-spacing: normal;\n"
426 " text-transform: none;\n"
427 " display: inline-block;\n"
428 " white-space: nowrap;\n"
429 " word-wrap: normal;\n"
431 " -moz-font-feature-settings: 'liga';\n"
432 " -moz-osx-font-smoothing: grayscale;\n"
436 searchCssJs +=
"<script type=\"text/javascript\" src=\"$relpath^search/search.js\"></script>\n";
438 if (!serverBasedSearch)
444 searchCssJs +=
"<link rel=\"search\" href=\"" + relPath +
445 "search_opensearch.php?v=opensearch.xml\" "
446 "type=\"application/opensearchdescription+xml\" title=\"" +
447 (hasProjectName ? projectName :
DString(
"Doxygen")) +
451 searchBox =
getSearchBox(serverBasedSearch, relPath,
false);
454 if (mathJax && !isSource)
463 auto writeMathJax3Packages = [&mathJaxJs](
const StringVector &mathJaxExtensions)
465 mathJaxJs +=
" packages: ['base','configmacros'";
468 mathJaxJs+=
",'newcommand'";
470 for (
const auto &s : mathJaxExtensions)
472 mathJaxJs+=
",'"+s+
"'";
477 auto writeMathJax4Packages = [&mathJaxJs](
const StringVector &mathJaxExtensions)
479 mathJaxJs +=
" packages: {\n";
481 for (
const auto &s : mathJaxExtensions)
483 if (!first) mathJaxJs+=
",";
486 mathJaxJs+=
"\n '[-]': ['";
487 mathJaxJs+=s.
data()+1;
492 mathJaxJs+=
"\n '[+]': ['"+s+
"']";
496 mathJaxJs +=
"\n }\n";
499 auto writeMathJaxScript = [&path,&mathJaxJs](
const DString &pathPostfix,
503 mathJaxJs +=
"<script type=\"text/javascript\">\n"
504 "window.MathJax = {\n"
506 " ignoreHtmlClass: 'tex2jax_ignore',\n"
507 " processHtmlClass: 'tex2jax_process'\n"
514 if (!mathJaxExtensions.empty())
517 mathJaxJs+=
" loader: {\n"
519 for (
const auto &s : mathJaxExtensions)
523 if (!first) mathJaxJs+=
",";
524 mathJaxJs+=
"'[tex]/"+s+
"'";
531 mathJaxJs+=
" tex: {\n"
538 writePackages(mathJaxExtensions);
552 mathJaxJs+=
"</script>\n";
553 mathJaxJs +=
"<script type=\"text/javascript\" id=\"MathJax-script\" async=\"async\" src=\"" +
554 path + pathPostfix +
"tex-" + mathJaxFormat.
lower() +
".js\">";
555 mathJaxJs+=
"</script>\n";
558 switch (mathJaxVersion)
560 case MATHJAX_VERSION_t::MathJax_4:
561 writeMathJaxScript(
"",writeMathJax4Packages);
563 case MATHJAX_VERSION_t::MathJax_3:
564 writeMathJaxScript(
"es5/",writeMathJax3Packages);
566 case MATHJAX_VERSION_t::MathJax_2:
569 mathJaxJs =
"<script type=\"text/x-mathjax-config\">\n"
570 "MathJax.Hub.Config({\n"
571 " extensions: [\"tex2jax.js\"";
573 for (
const auto &s : mathJaxExtensions)
575 mathJaxJs+=
", \""+
DString(s)+
".js\"";
577 if (mathJaxFormat.
empty())
579 mathJaxFormat =
"HTML-CSS";
582 " jax: [\"input/TeX\",\"output/"+mathJaxFormat+
"\"],\n";
585 mathJaxJs +=
" TeX: { Macros: {\n";
590 mathJaxJs +=
"});\n";
596 mathJaxJs +=
"</script>\n";
597 mathJaxJs +=
"<script type=\"text/javascript\" async=\"async\" src=\"" + path +
"MathJax.js\"></script>\n";
606 darkModeJs=
"<script type=\"text/javascript\" src=\"$relpath^darkmode_toggle.js\"></script>\n";
612 mermaidJs =
"<script type=\"module\">\n"
613 "import mermaid from '" + mermaidJsUrl +
"';\n";
616 case HTML_COLORSTYLE_t::LIGHT:
617 mermaidJs +=
"const theme = 'default';\n";
619 case HTML_COLORSTYLE_t::DARK:
620 mermaidJs +=
"const theme = 'dark';\n";
622 case HTML_COLORSTYLE_t::AUTO_LIGHT:
623 case HTML_COLORSTYLE_t::AUTO_DARK:
624 mermaidJs +=
"const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'default';\n";
626 case HTML_COLORSTYLE_t::TOGGLE:
627 mermaidJs +=
"const theme = DarkModeToggle.darkModeEnabled ? 'dark' : 'default'\n";
630 mermaidJs +=
"mermaid.initialize({ startOnLoad: true, theme: theme });\n";
635 " const elementCode = '.mermaid';\n"
636 " const loadMermaid = function(theme) {\n"
637 " mermaid.initialize({theme})\n"
638 " mermaid.init({theme}, document.querySelectorAll(elementCode))\n"
640 " const saveOriginalData = function() {\n"
641 " return new Promise((resolve, reject) => {\n"
643 " var els = document.querySelectorAll(elementCode), count = els.length;\n"
644 " els.forEach(element => {\n"
645 " element.setAttribute('data-original-code', element.innerHTML)\n"
647 " if (count == 0) { resolve() }\n"
649 " } catch (error) { reject(error) }\n"
652 " const resetProcessed = function(){\n"
653 " return new Promise((resolve, reject) => {\n"
655 " var els = document.querySelectorAll(elementCode), count = els.length;\n"
656 " els.forEach(element => {\n"
657 " if (element.getAttribute('data-original-code') != null) {\n"
658 " element.removeAttribute('data-processed')\n"
659 " element.innerHTML = element.getAttribute('data-original-code')\n"
662 " if(count == 0) { resolve() }\n"
664 " } catch (error) { reject(error) }\n"
667 " saveOriginalData()\n"
668 " const original = DarkModeToggle.enableDarkMode.bind(DarkModeToggle);\n"
669 " DarkModeToggle.enableDarkMode = function(enable) {\n"
670 " original(enable);\n"
671 " resetProcessed().then(loadMermaid(enable ? 'dark' : 'default')).catch(console.error)\n"
675 mermaidJs +=
"</script>\n";
680 treeViewCssJs+=
"<script type=\"text/javascript\" src=\"$relpath^cookie.js\"></script>\n";
689 {
"$title", [&]() {
return !title.
empty() ? title : projName; } },
690 {
"$doxygenversion", [&]() {
return getDoxygenVersion(); } },
691 {
"$projectname", [&]() {
return projName; } },
701 {
"$datetime", [&]() ->
DString {
return "<span class=\"datetime\"></span>"; } },
702 {
"$date", [&]() ->
DString {
return "<span class=\"date\"></span>"; } },
703 {
"$time", [&]() ->
DString {
return "<span class=\"time\"></span>"; } },
704 {
"$year", [&]() ->
DString {
return "<span class=\"year\"></span>"; } },
705 {
"$navpath", [&]() ->
DString {
return navPath; } },
706 {
"$stylesheet", [&]() ->
DString {
return cssFile; } },
707 {
"$treeview", [&]() ->
DString {
return treeViewCssJs; } },
708 {
"$searchbox", [&]() ->
DString {
return searchBox; } },
709 {
"$search", [&]() ->
DString {
return searchCssJs; } },
710 {
"$mathjax", [&]() ->
DString {
return mathJaxJs; } },
711 {
"$mermaidjs", [&]() ->
DString {
return mermaidJs; } },
712 {
"$darkmode", [&]() ->
DString {
return darkModeJs; } },
713 {
"$generatedby", [&]() ->
DString {
return generatedBy; } },
714 {
"$extrastylesheet",[&]() ->
DString {
return extraCssText; } },
715 {
"$relpath$", [&]() ->
DString {
return relPath; } }
718 result =
substitute(result,
"$relpath^",relPath);
724 {
"FULL_SIDEBAR", hasFullSideBar },
725 {
"DISABLE_INDEX", disableIndex },
726 {
"GENERATE_TREEVIEW", treeView },
727 {
"SEARCHENGINE", searchEngine },
728 {
"TITLEAREA", titleArea },
729 {
"PROJECT_NAME", hasProjectName },
730 {
"PROJECT_NUMBER", hasProjectNumber },
731 {
"PROJECT_BRIEF", hasProjectBrief },
732 {
"PROJECT_LOGO", hasProjectLogo },
733 {
"PROJECT_ICON", hasProjectIcon },
734 {
"COPY_CLIPBOARD", hasCopyClipboard },
735 {
"HTML_CODE_FOLDING", codeFolding },
736 {
"HTML_DYNAMIC_SECTIONS", dynamicSections},
757 size_t separator = line.
find(
':');
759 std::string key = line.
left(separator).
str();
760 size_t semi = line.
rfind(
';');
763 map.emplace(key,value);
774 if (colorStyle==HTML_COLORSTYLE_t::LIGHT)
778 else if (colorStyle==HTML_COLORSTYLE_t::DARK)
793 result+=input.
mid(p,i-p);
794 size_t j=input.
find(
")",i+4);
796 auto it = mapping.find(input.
mid(i+4,j-i-4).
str());
797 if (it==mapping.end())
799 err(
"failed to find value variable {}. It is not longer defined in doxygen.css\n",input.
mid(i+4,j-i-4));
813 if (colorStyle==HTML_COLORSTYLE_t::LIGHT)
817 else if (colorStyle==HTML_COLORSTYLE_t::DARK)
853 const char *p=str.
data();
866 int spacesToNextTabStop = tabSize - (
m_col%tabSize);
867 while (spacesToNextTabStop--)
886 case '\'': *
m_t <<
"'";
m_col++;
888 case '"': *
m_t <<
""";
m_col++;
892 { *
m_t <<
"<"; p++; }
894 { *
m_t <<
">"; p++; }
896 { *
m_t <<
"\\‍[";
m_col++;p++; }
898 { *
m_t <<
"\\‍]";
m_col++;p++; }
900 { *
m_t <<
"\\‍(";
m_col++;p++; }
902 { *
m_t <<
"\\‍)";
m_col++;p++; }
909 uint8_t uc =
static_cast<uint8_t
>(c);
912 *
m_t <<
"$" <<
hex[uc>>4] <<
hex[uc&0xF] <<
";";
956 const DString &anchor,
int l,
bool writeLineAnchor)
960 const int maxLineNrStr = 10;
961 char lineNumber[maxLineNrStr];
962 char lineAnchor[maxLineNrStr];
963 snprintf(lineNumber,maxLineNrStr,
"%5d",l);
964 snprintf(lineAnchor,maxLineNrStr,
"l%05d",l);
969 *
m_t <<
"<div class=\"line\">";
973 if (writeLineAnchor) *
m_t <<
"<a id=\"" << lineAnchor <<
"\" name=\"" << lineAnchor <<
"\"></a>";
974 *
m_t <<
"<span class=\"lineno\">";
975 if (!filename.
empty())
1008 m_col+=name.length();
1012 *
m_t <<
"<a class=\"" << className <<
"Ref\" ";
1017 *
m_t <<
"<a class=\"" << className <<
"\" ";
1037 *
m_t <<
"<div class=\"ttc\" id=\"" <<
id <<
"\">";
1038 *
m_t <<
"<div class=\"ttname\">";
1041 *
m_t <<
"<a href=\"";
1057 *
m_t <<
"<div class=\"ttdeci\">";
1064 *
m_t <<
"<div class=\"ttdoc\">";
1074 *
m_t <<
"<a href=\"";
1093 *
m_t <<
"<a href=\"";
1118 *
m_t <<
"<div class=\"line\">";
1142 *
m_t <<
"<span class=\"" << s <<
"\">";
1154 *
m_t <<
"<a id=\"" << anchor <<
"\" name=\"" << anchor <<
"\"></a>";
1159 *
m_t <<
"<div class=\"fragment\">";
1171 *
m_t <<
"</div><!-- fragment -->";
1181 const int maxLineNrStr = 10;
1182 char lineNumber[maxLineNrStr];
1183 snprintf(lineNumber,maxLineNrStr,
"%05d",lineNr);
1184 *
m_t <<
"<div class=\"foldopen\" id=\"foldopen" << lineNumber <<
1185 "\" data-start=\"" << startMarker <<
1186 "\" data-end=\"" << endMarker <<
1190 *
m_t <<
"<div class=\"line\">";
1198 *
m_t <<
"<div class=\"line\">";
1274 return (str.
contains(
"$datetime",
false) ||
1287 term(
"Could not create output directory {}\n",dname);
1454 mgr.
copyResource(
"MaterialSymbolsOutlined.min.woff2",dname);
1456 mgr.
copyResource(
"MaterialSymbolsOutlined_LICENSE.txt",dname);
1467 DString searchDirName = dname;
1477 searchCss = mgr.
getAsString(
"search_sidebar.css");
1483 searchCss = mgr.
getAsString(
"search_nomenu_toggle.css");
1492 searchCss = mgr.
getAsString(
"search_fixedtabs.css");
1499 searchCss += mgr.
getAsString(
"search_common.css");
1500 searchCss =
substitute(searchCss,
"$doxygenversion",getDoxygenVersion());
1508 t <<
"/* The standard CSS for doxygen " << getDoxygenVersion() <<
"*/\n\n";
1511 case HTML_COLORSTYLE_t::LIGHT:
1512 case HTML_COLORSTYLE_t::DARK:
1515 case HTML_COLORSTYLE_t::AUTO_LIGHT:
1516 case HTML_COLORSTYLE_t::TOGGLE:
1521 case HTML_COLORSTYLE_t::AUTO_DARK:
1527 if (
Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::AUTO_LIGHT)
1529 t <<
"@media (prefers-color-scheme: dark) {\n";
1530 t <<
" html:not(.dark-mode) {\n";
1531 t <<
" color-scheme: dark;\n\n";
1535 else if (
Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::AUTO_DARK)
1537 t <<
"@media (prefers-color-scheme: light) {\n";
1538 t <<
" html:not(.light-mode) {\n";
1539 t <<
" color-scheme: light;\n\n";
1543 else if (
Config_getEnum(HTML_COLORSTYLE)==HTML_COLORSTYLE_t::TOGGLE)
1545 t <<
"html.dark-mode {\n";
1556 " border-bottom: none;\n"
1557 " background-color: var(--nav-background-color);\n"
1558 " border-right: 1px solid var(--nav-border-color);\n"
1573 case TIMESTAMP_t::YES:
1574 case TIMESTAMP_t::DATETIME:
1577 case TIMESTAMP_t::DATE:
1583 t <<
"--timestamp: '" << timeStampStr <<
"';\n";
1596 t <<
"span.timestamp { content: ' '; }\n";
1597 t <<
"span.timestamp:before { content: var(--timestamp); }\n\n";
1601 t <<
"span.datetime { content: ' '; }\n";
1602 t <<
"span.datetime:before { content: var(--datetime); }\n\n";
1603 t <<
"span.date { content: ' '; }\n";
1604 t <<
"span.date:before { content: var(--date); }\n\n";
1605 t <<
"span.time { content: ' '; }\n";
1606 t <<
"span.time:before { content: var(--time); }\n\n";
1607 t <<
"span.year { content: ' '; }\n";
1608 t <<
"span.year:before { content: var(--year); }\n\n";
1615 bool addScrollbarStyling =
Config_getList(HTML_EXTRA_STYLESHEET).empty();
1616 if (addScrollbarStyling)
1631 t <<
"<!-- HTML header for doxygen " << getDoxygenVersion() <<
"-->\n";
1637 t <<
"<!-- HTML footer for doxygen " << getDoxygenVersion() <<
"-->\n";
1644 const DString &title,
int ,
int )
1664 << getDoxygenVersion() <<
" -->\n";
1673 m_t <<
"<script type=\"application/json\" id=\"doxygen-config\">\n";
1676 m_t <<
" \"generateTreeView\": " << (generateTreeView?
"true":
"false") <<
",\n";
1677 m_t <<
" \"searchEngine\": " << (searchEngine?
"true":
"false") <<
",\n";
1678 m_t <<
" \"serverBasedSearch\": " << (serverBasedSearch?
"true":
"false") <<
",\n";
1679 m_t <<
" \"disableIndex\": " << (disableIndex?
"true":
"false") <<
",\n";
1680 m_t <<
" \"dynamicMenus\": " << (dynamicMenus?
"true":
"false") <<
",\n";
1681 m_t <<
" \"fullSidebar\": " << (fullSidebar?
"true":
"false") <<
"\n";
1683 m_t <<
"</script>\n";
1687 m_t <<
"<script type=\"text/javascript\">\n";
1688 m_t <<
"let searchBox = new SearchBox(\"searchBox\", \""
1690 m_t <<
"</script>\n";
1694 m_t <<
"<script type=\"text/javascript\">\n";
1695 m_t <<
"document.addEventListener('DOMContentLoaded', codefold.init);\n";
1696 m_t <<
"</script>\n";
1705 if (searchEngine && !serverBasedSearch)
1707 t <<
"<!-- window showing the filter options -->\n";
1708 t <<
"<div id=\"MSearchSelectWindow\">\n";
1711 t <<
"<!-- iframe showing the search results (closed by default) -->\n";
1712 t <<
"<div id=\"MSearchResultsWindow\">\n";
1713 t <<
"<div id=\"MSearchResults\">\n";
1714 t <<
"<div class=\"SRPage\">\n";
1715 t <<
"<div id=\"SRIndex\">\n";
1716 t <<
"<div id=\"SRResults\"></div>\n";
1739 case TIMESTAMP_t::NO:
1747 result +=
" \n<a href=\"https://www.doxygen.org/index.html\">\n"
1748 "<img class=\"footer\" src=\"";
1750 result +=
"doxygen.svg\" width=\"104\" height=\"31\" alt=\"doxygen\"/></a> ";
1751 result += getDoxygenVersion();
1779 m_t <<
"<h3 class=\"version\">";
1808 err(
"style sheet {} does not exist or is not readable!\n",
Config_getString(HTML_STYLESHEET));
1823 for (
const auto &
fileName : extraCssFiles)
1868 m_t <<
"<a id=\"" << anchor <<
"\" name=\"" << anchor <<
"\"></a>";
1881 if (!classDef.
empty())
1882 m_t <<
"\n<p class=\"" << classDef <<
"\">";
1914 m_t <<
"<a class=\"elRef\" ";
1919 m_t <<
"<a class=\"el\" ";
1957 m_t <<
"<a class=\"el\" href=\"" << fn <<
"\">";
1967 m_t <<
"<a class=\"elRef\" ";
1972 m_t <<
"<a class=\"el\" ";
1988 m_t <<
"<a href=\"";
2005 if (extraIndentLevel==2)
2009 else if (extraIndentLevel==1)
2021 m_t <<
" class=\"groupheader\">";
2026 if (extraIndentLevel==2)
2030 else if (extraIndentLevel==1)
2051 default:
ASSERT(0);
break;
2053 m_t <<
"<a id=\"" << lab <<
"\" name=\"" << lab <<
"\"></a>";
2067 default:
ASSERT(0);
break;
2080 const char *p=str.
data();
2086 case '<':
m_t <<
"<";
break;
2087 case '>':
m_t <<
">";
break;
2088 case '&':
m_t <<
"&";
break;
2089 case '"':
m_t <<
""";
break;
2090 case '-':
if (inHtmlComment)
m_t <<
"-";
else m_t <<
"-";
break;
2093 {
m_t <<
"<"; p++; }
2095 {
m_t <<
">"; p++; }
2097 {
m_t <<
"\\‍["; p++; }
2099 {
m_t <<
"\\‍]"; p++; }
2101 {
m_t <<
"\\‍("; p++; }
2103 {
m_t <<
"\\‍)"; p++; }
2124 const DString &relPath,
int sectionCount)
2128 if (dynamicSections)
2130 t <<
"<div id=\"dynsection-" << sectionCount <<
"\" "
2131 "class=\"dynheader closed\">"
2132 "<span class=\"dynarrow\"><span class=\"arrowhead closed\"></span></span>";
2136 t <<
"<div class=\"dynheader\">\n";
2150 if (dynamicSections)
2152 t <<
"<div id=\"dynsection-" << sectionCount <<
"-summary\" "
2153 "class=\"dynsummary\">\n";
2161 if (dynamicSections)
2171 if (dynamicSections)
2173 t <<
"<div id=\"dynsection-" << sectionCount <<
"-content\" "
2174 "class=\"dyncontent hidden\">\n";
2178 t <<
"<div class=\"dyncontent\">\n";
2206 m_t <<
" <div class=\"center\">\n";
2207 m_t <<
" <img src=\"";
2209 m_t <<
"_map\" alt=\"\"/>\n";
2219 m_t <<
" <div class=\"center\">\n";
2220 m_t <<
" <img src=\"";
2249 m_t <<
"<table class=\"memberdecls\">\n";
2253 if (!inheritId.
empty())
2255 if (dynamicSections)
m_t <<
" inherit";
2256 m_t <<
" " << inheritId;
2259 if (!anchor.
empty())
2273 m_t <<
"</td></tr>\n";
2283 m_t <<
"</td></tr>\n";
2285 if (!inheritId.
empty())
2287 if (dynamicSections)
m_t <<
" inherit";
2288 m_t <<
" " << inheritId;
2290 m_t <<
" template\"><td class=\"memItemLeft\">";
2295 m_t <<
"<div class=\"compoundTemplParams\">";
2306 m_t <<
" </td><td class=\"memItemRight\">";
2311 if (!initTag)
m_t <<
" </td>";
2323 DBG_HTML(
m_t <<
"<!-- startMemberDescription -->\n")
2327 m_t <<
"<table class=\"memberdecls\">\n";
2330 m_t <<
"<tr class=\"memdesc:" << anchor;
2331 if (!inheritId.
empty())
2333 if (dynamicSections)
m_t <<
" inherit";
2334 m_t <<
" " << inheritId;
2337 m_t <<
"<td class=\"mdescLeft\"> </td>";
2338 if (typ)
m_t <<
"<td class=\"mdescLeft\"> </td>";
2339 m_t <<
"<td class=\"mdescRight\">";
2344 DBG_HTML(
m_t <<
"<!-- endMemberDescription -->\n")
2345 m_t <<
"<br /></td></tr>\n";
2361 m_t <<
"</table>\n";
2375 m_t <<
"<table class=\"memberdecls\">\n";
2378 m_t <<
"<tr class=\"heading\"><td colspan=\"" << typ <<
"\"><h2";
2379 if (!anchor.
empty())
2381 m_t <<
" id=\"header-" << anchor <<
"\"";
2383 m_t <<
" class=\"groupheader\">";
2384 if (!anchor.
empty())
2386 m_t <<
"<a id=\"" << anchor <<
"\" name=\"" << anchor <<
"\"></a>\n";
2393 m_t <<
"</h2></td></tr>\n";
2401 m_t <<
"<table class=\"memberdecls\">\n";
2404 m_t <<
"<tr><td class=\"ititle\" colspan=\"2\">";
2410 m_t <<
"</td></tr>\n";
2420 m_t <<
"</table>\n";
2455 int memCount,
int memTotal,
bool )
2458 m_t <<
"\n<h2 class=\"memtitle\">"
2459 <<
"<span class=\"permalink\"><a href=\"#" << anchor <<
"\">◆ </a></span>";
2463 m_t <<
" <span class=\"overload\">[" << memCount <<
"/" << memTotal <<
"]</span>";
2466 m_t <<
"\n<div class=\"memitem\">\n";
2467 m_t <<
"<div class=\"memproto\">\n";
2472 DBG_HTML(
m_t <<
"<!-- startMemberDocPrefixItem -->\n";)
2473 m_t <<
"<div class=\"memtemplate\">\n";
2478 DBG_HTML(
m_t <<
"<!-- endMemberDocPrefixItem -->\n";)
2486 m_t <<
" <table class=\"memname\">\n";
2489 m_t <<
" <td class=\"memname\">";
2502 if (openBracket)
m_t <<
"(";
2510 DBG_HTML(
m_t <<
"<!-- startFirstParameterType -->\n";)
2511 m_t <<
" <td class=\"paramtype\">";
2517 m_t <<
" <td class=\"paramkey\">" << key <<
"</td>\n";
2518 m_t <<
" <td></td>\n";
2519 m_t <<
" <td class=\"paramtype\">";
2532 m_t <<
" <td class=\"paramname\"><span class=\"paramname\"><em>";
2538 m_t <<
"</em></span>";
2543 DBG_HTML(
m_t <<
"<!-- startParameterExtra -->\n";)
2553 if (closeBracket)
m_t <<
"</td><td>)";
2560 if (closeBracket)
m_t <<
")";
2572 m_t <<
"<span class=\"paramdefsep\">";
2574 m_t <<
"</span><span class=\"paramdefval\">";
2597 m_t <<
" <td align=\"right\">";
2601 m_t <<
prefix <<
"</td><td>(</td><td colspan=\"2\">";
2602 else if (closeBracket)
2603 m_t <<
" )</td><td></td><td></td><td>";
2605 m_t <<
"</td><td></td><td colspan=\"2\">";
2615 m_t <<
" </table>\n";
2634 if (generateLegend && !umlLook)
2637 m_t <<
"<center><span class=\"legend\">[";
2640 if (generateTreeView)
m_t <<
"target=\"top\" ";
2646 m_t <<
"]</span></center>";
2732 m_t <<
"<tr id=\"" <<
id <<
"\" class=\"groupHeader\"><td colspan=\"2\"><div class=\"groupHeader\">";
2737 m_t <<
"</div></td></tr>\n";
2742 m_t <<
"<tr><td colspan=\"2\" class=\"ititle\"><div class=\"groupText\">";
2747 m_t <<
"</div></td></tr>\n";
2762 m_t <<
"<div class=\"memdoc\">\n";
2768 m_t <<
"\n</div>\n" <<
"</div>\n";
2777 for (
int i=0; i<n; i++)
2785 m_t <<
"<table class=\"fieldtable\">\n"
2786 <<
"<tr><th colspan=\"" << (hasInits?3:2) <<
"\">" << title <<
"</th></tr>";
2790 m_t <<
"</table>\n";
2805 m_t <<
"<td class=\"fieldname\">";
2810 m_t <<
" </td>";
2815 m_t <<
"<td class=\"fieldinit\">";
2820 m_t <<
" </td>";
2825 m_t <<
"<td class=\"fielddoc\">";
2835 m_t <<
"<dl class=\"section examples\"><dt>";
2852 std::visit(visitor,astImpl->
root);
2864 t <<
" <div id=\"navrow1\" class=\"tabs\">\n";
2868 t <<
" <div id=\"navrow2\" class=\"tabs2\">\n";
2870 t <<
" <ul class=\"tablist\">\n";
2898 t <<
" class=\"current\"";
2908 if (!l.
empty()) t <<
"</a>";
2919 case LayoutNavEntry::MainPage:
return true;
2920 case LayoutNavEntry::User:
return true;
2921 case LayoutNavEntry::UserGroup:
return true;
2922 case LayoutNavEntry::Pages:
return index.numIndexedPages()>0;
2923 case LayoutNavEntry::Topics:
return index.numDocumentedGroups()>0;
2924 case LayoutNavEntry::Modules:
return index.numDocumentedModules()>0;
2925 case LayoutNavEntry::ModuleList:
return index.numDocumentedModules()>0;
2927 case LayoutNavEntry::Namespaces:
return showNamespaces && index.numDocumentedNamespaces()>0;
2928 case LayoutNavEntry::NamespaceList:
return showNamespaces && index.numDocumentedNamespaces()>0;
2930 case LayoutNavEntry::Concepts:
return index.numDocumentedConcepts()>0;
2931 case LayoutNavEntry::Classes:
return index.numAnnotatedClasses()>0;
2932 case LayoutNavEntry::ClassList:
return index.numAnnotatedClasses()>0;
2933 case LayoutNavEntry::ClassIndex:
return index.numAnnotatedClasses()>0;
2934 case LayoutNavEntry::ClassHierarchy:
return index.numHierarchyClasses()>0;
2936 case LayoutNavEntry::Files:
return showFiles && index.numDocumentedFiles()>0;
2937 case LayoutNavEntry::FileList:
return showFiles && index.numDocumentedFiles()>0;
2940 case LayoutNavEntry::Interfaces:
return index.numAnnotatedInterfaces()>0;
2941 case LayoutNavEntry::InterfaceList:
return index.numAnnotatedInterfaces()>0;
2942 case LayoutNavEntry::InterfaceIndex:
return index.numAnnotatedInterfaces()>0;
2943 case LayoutNavEntry::InterfaceHierarchy:
return index.numHierarchyInterfaces()>0;
2944 case LayoutNavEntry::Structs:
return index.numAnnotatedStructs()>0;
2945 case LayoutNavEntry::StructList:
return index.numAnnotatedStructs()>0;
2946 case LayoutNavEntry::StructIndex:
return index.numAnnotatedStructs()>0;
2947 case LayoutNavEntry::Exceptions:
return index.numAnnotatedExceptions()>0;
2948 case LayoutNavEntry::ExceptionList:
return index.numAnnotatedExceptions()>0;
2949 case LayoutNavEntry::ExceptionIndex:
return index.numAnnotatedExceptions()>0;
2950 case LayoutNavEntry::ExceptionHierarchy:
return index.numHierarchyExceptions()>0;
2951 case LayoutNavEntry::None:
2952 ASSERT(kind != LayoutNavEntry::None);
2962 for (
const auto &entry : root->
children())
2969 for (
const auto &entry : root->
children())
2974 t <<
"<li><a href=\"" << relPath << url <<
"\"><span>";
2976 t <<
"</span></a>\n";
2989 bool highlightParent,
bool highlightSearch)
3012 entry.get()==hlEntry &&
3013 (!entry->children().empty() ||
3014 (entry->kind()==kind && !highlightParent)
3032 if (disableIndex || !generateTreeView || !fullSidebar)
3034 if (!serverBasedSearch)
3042 if (!highlightSearch)
3083 bool highlightParent=
false;
3111 highlightParent =
true;
break;
3113 highlightParent =
true;
break;
3115 highlightParent =
true;
break;
3117 highlightParent =
true;
break;
3119 highlightParent =
true;
break;
3121 highlightParent =
true;
break;
3123 highlightParent =
true;
break;
3125 highlightParent =
true;
break;
3130 if (!disableIndex && dynamicMenus)
3139 searchPage =
"search.php";
3141 t <<
"<script type=\"text/javascript\" src=\"" << relPath <<
"menudata.js\"></script>\n";
3142 t <<
"<script type=\"text/javascript\" src=\"" << relPath <<
"menu.js\"></script>\n";
3143 t <<
"<div id=\"main-nav-mobile\">\n";
3144 if (searchEngine && !fullSidebar)
3146 t <<
"<div class=\"sm sm-dox\"><input id=\"main-menu-state\" type=\"checkbox\"/>\n";
3147 t <<
"<label class=\"main-menu-btn\" for=\"main-menu-state\">\n";
3148 t <<
"<span class=\"main-menu-btn-icon\"></span> Toggle main menu visibility</label>\n";
3149 t <<
"<span id=\"searchBoxPos1\">";
3153 t <<
"</div><!-- main-nav-mobile -->\n";
3154 t <<
"<div id=\"main-nav\">\n";
3155 t <<
" <ul class=\"sm sm-dox\" id=\"main-menu\">\n";
3156 t <<
" <li id=\"searchBoxPos2\">\n";
3157 if (searchEngine && !(generateTreeView && fullSidebar))
3163 t <<
"</div><!-- main-nav -->\n";
3165 else if (!disableIndex)
3169 if (!hlEntry && altKind!=LayoutNavEntry::None) { hlEntry=root->
find(altKind); kind=altKind; }
3172 highlightParent=
true;
3173 hlEntry = root->
children().front().get();
3174 if (hlEntry==
nullptr)
3179 if (kind==LayoutNavEntry::UserGroup)
3187 t <<
"<div id=\"main-nav\">\n";
3191 t <<
"</div><!-- main-nav -->\n";
3194 else if (!generateTreeView)
3198 if (generateTreeView && !disableIndex && fullSidebar && !extraTabs)
3200 t <<
"<div id=\"container\"><div id=\"doc-content\">\n";
3207 m_t <<
"</div><!-- top -->\n";
3208 if (!generateTreeView)
3210 m_t <<
"<div id=\"doc-content\">\n";
3219 if (generateTreeView)
3226 "<div id=\"side-nav\" class=\"ui-resizable side-nav-resizable\">\n");
3229 " <div id=\"nav-tree\">\n"
3230 " <div id=\"nav-tree-contents\">\n"
3231 " <div id=\"nav-sync\" class=\"sync\"></div>\n"
3234 " <div id=\"splitbar\" class=\"ui-resizable-handle\">\n"
3237 "<script type=\"text/javascript\">\n"
3238 "document.addEventListener('DOMContentLoaded',() => { initNavTree('" + fn +
"','" + relpath +
"','" + allMembersFile +
"'); });\n"
3242 result+=
"<div id=\"container\">\n<div id=\"doc-content\">\n";
3260 m_t <<
"<div class=\"contents\">\n";
3265 m_t <<
"</div><!-- contents -->\n";
3275 m_t <<
"</div><!-- PageDoc -->\n";
3289 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3294 DString configFileName = htmlOutput+
"/search_config.php";
3300 t <<
"$config = array(\n";
3301 t <<
" 'PROJECT_NAME' => \"" <<
convertToHtml(projectName) <<
"\",\n";
3302 t <<
" 'GENERATE_TREEVIEW' => " << (generateTreeView?
"true":
"false") <<
",\n";
3303 t <<
" 'DISABLE_INDEX' => " << (disableIndex?
"true":
"false") <<
",\n";
3304 t <<
" 'FULL_SIDEBAR' => " << (fullSidebar?
"true":
"false") <<
",\n";
3306 t <<
"$translator = array(\n";
3308 t <<
" 'search_results' => array(\n";
3333 << getDoxygenVersion() <<
" -->\n";
3334 t <<
"<script type=\"text/javascript\">\n";
3335 t <<
"let searchBox = new SearchBox(\"searchBox\", \""
3339 if (!disableIndex && !quickLinksAfterSplitbar)
3343 if (generateTreeView)
3345 t <<
"</div><!-- top -->\n";
3348 if (quickLinksAfterSplitbar)
3352 t <<
"<!-- generated -->\n";
3355 t <<
"require_once \"search_functions.php\";\n";
3360 if (generateTreeView)
3362 t <<
"</div><!-- doc-content -->\n";
3363 t <<
"</div><!-- container -->\n";
3370 DString scriptName = htmlOutput+
"/search/search.js";
3379 err(
"Failed to open file '{}' for writing...\n",scriptName);
3388 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3398 << getDoxygenVersion() <<
" -->\n";
3399 t <<
"<script type=\"text/javascript\">\n";
3400 t <<
"let searchBox = new SearchBox(\"searchBox\", \""
3404 if (!disableIndex && !quickLinksAfterSplitbar)
3408 if (generateTreeView)
3410 t <<
"</div><!-- top -->\n";
3413 if (quickLinksAfterSplitbar)
3418 t <<
"<div class=\"header\">\n";
3419 t <<
" <div class=\"headertitle\">\n";
3423 t <<
"<div class=\"contents\">\n";
3425 t <<
"<div id=\"searchresults\"></div>\n";
3428 if (generateTreeView)
3430 t <<
"</div><!-- doc-content -->\n";
3431 t <<
"</div><!-- container -->\n";
3439 DString scriptName = dname+
"/search/search.js";
3444 t <<
"const searchResultsText=["
3448 t <<
"const serverUrl=\"" <<
Config_getString(SEARCHENGINE_URL) <<
"\";\n";
3449 t <<
"const tagMap = {\n";
3453 for (
const auto &ml : extraSearchMappings)
3460 if (!tagName.
empty())
3462 if (!first) t <<
",\n";
3463 t <<
" \"" << tagName <<
"\": \"" << destName <<
"\"";
3468 if (!first) t <<
"\n";
3472 t <<
"document.addEventListener('DOMContentLoaded',() => {\n";
3473 t <<
" const query = trim(getURLParameter('query'));\n";
3474 t <<
" if (query) {\n";
3475 t <<
" searchFor(query,0,20);\n";
3477 t <<
" const results = document.getElementById('searchresults');\n";
3478 t <<
" if (results) {\n";
3486 err(
"Failed to open file '{}' for writing...\n",scriptName);
3492 m_t <<
"<div class=\"typeconstraint\">\n";
3493 m_t <<
"<dl><dt><b>" << header <<
"</b></dt><dd>\n";
3494 m_t <<
"<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">\n";
3499 m_t <<
"<tr><td valign=\"top\"><em>";
3504 m_t <<
"</em></td>";
3509 m_t <<
"<td> :</td><td valign=\"top\"><em>";
3514 m_t <<
"</em></td>";
3519 m_t <<
"<td> ";
3524 m_t <<
"</td></tr>\n";
3529 m_t <<
"</table>\n";
3539 m_t <<
"<br class=\"" << style <<
"\" />\n";
3549 m_t <<
"<div class=\"header\">\n";
3554 m_t <<
" <div class=\"headertitle\">";
3566 m_t <<
"</div><!--header-->\n";
3573 m_t <<
"<table class=\"memberdecls memberdecls-inline\">\n";
3576 m_t <<
"<tr><th colspan=\"2\"><h3>";
3581 m_t <<
"</h3></th></tr>\n";
3586 DBG_HTML(
m_t <<
"<!-- startMemberDocSimple -->\n";)
3587 m_t <<
"<table class=\"fieldtable\">\n";
3588 m_t <<
"<tr><th colspan=\"" << (isEnum?
"2":
"3") <<
"\">";
3596 m_t <<
"</table>\n";
3601 DBG_HTML(
m_t <<
"<!-- startInlineMemberType -->\n";)
3602 m_t <<
"<tr><td class=\"fieldtype\">\n";
3607 DBG_HTML(
m_t <<
"<!-- endInlineMemberType -->\n";)
3613 DBG_HTML(
m_t <<
"<!-- startInlineMemberName -->\n";)
3614 m_t <<
"<td class=\"fieldname\">\n";
3619 DBG_HTML(
m_t <<
"<!-- endInlineMemberName -->\n";)
3625 DBG_HTML(
m_t <<
"<!-- startInlineMemberDoc -->\n";)
3626 m_t <<
"<td class=\"fielddoc\">\n";
3632 m_t <<
"</td></tr>\n";
3638 m_t <<
"<div class=\"embeddoc indent-" << indent <<
"\">";
3650 m_t <<
"<span class=\"mlabels\">";
3655 DBG_HTML(
m_t <<
"<!-- writeLabel(" << label <<
") -->\n";)
3657 auto convertLabelToClass = [](
const std::string &lab) {
3670 for (
size_t i=0; i<l; i++)
3672 char c = input.
at(i);
3673 if (
static_cast<signed char>(c)<0 || (c>=
'a' && c<=
'z') || c==
'_')
3678 else if (nmstart && (
static_cast<signed char>(c)<0 || (c>=
'a' && c<=
'z') || (c>=
'0' && c<=
'9') || c==
'_'))
3682 else if (nmstart && (c==
' ' || c==
'-'))
3690 m_t <<
"<span class=\"mlabel " << convertLabelToClass(label.
stripWhiteSpace().
str()) <<
"\">" << label <<
"</span>";
3704 DBG_HTML(
m_t <<
"<!-- writeInheritedSectionTitle -->\n";)
3712 classLink +=
" href=\"";
3717 classLink +=
"href=\"";
3722 classLink=classLink+fn+a;
3724 m_t <<
"<tr class=\"inherit_header " <<
id <<
"\">";
3725 if (dynamicSections)
3727 m_t <<
"<td colspan=\"2\" class=\"dyn-inherit\">";
3728 m_t <<
"<span class=\"dynarrow\"><span class=\"arrowhead closed\"></span></span>";
3732 m_t <<
"<td colspan=\"2\">";
3742 m_t <<
" <div class=\"summary\">\n";
3748 m_t <<
"<a href=\"";
3755 else if (!anchor.
empty())
3767 m_t <<
"<div id=\"page-nav\" class=\"page-nav-panel\">\n";
3768 m_t <<
"<div id=\"page-nav-resize-handle\"></div>\n";
3769 m_t <<
"<div id=\"page-nav-tree\">\n";
3770 m_t <<
"<div id=\"page-nav-contents\">\n";
3771 m_t <<
"</div><!-- page-nav-contents -->\n";
3772 m_t <<
"</div><!-- page-nav-tree -->\n";
3773 m_t <<
"</div><!-- page-nav -->\n";
3797 m_t <<
"<div class=\"toc\">";
3827 char cs[2] = {
static_cast<char>(
'0'+l+1), 0 };
3828 const char *empty = (l!=nextLevel-1) ?
" empty" :
"";
3847 char cs[2] = {
static_cast<char>(
'0'+nextLevel), 0 };
3852 m_t <<
"<a href=\"#"+label+
"\">";
Class representing a built-in class diagram.
void writeImage(TextStream &t, const DString &path, const DString &relPath, const DString &file, bool generateMap, bool toIndex) const
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
size_t rfind(char c, size_t pos=npos) const
DString mid(size_t index, size_t len=npos) const
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
char & at(size_t i)
Returns a reference to the character at index i.
DString & prepend(const char *s)
int contains(char c, bool cs=true) const
size_t find(char c, size_t pos=0) const
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
DString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
DString left(size_t len) const
const std::string & str() const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool startsWith(const char *s) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
The common base class of all entity definitions found in the sources.
Class representing a directory in the file system.
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
Class representing the abstract syntax tree of a documentation block.
Representation of an call graph.
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)
Representation of a class inheritance or dependency graph.
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool TBRank=true, bool imageMap=true, int graphId=-1)
Representation of an directory dependency graph.
DString writeGraph(TextStream &out, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1, bool linkRelations=true)
Represents a graphical class hierarchy.
void writeGraph(TextStream &t, const DString &path, const DString &fileName)
Representation of a group collaboration graph.
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)
Representation of an include dependency graph.
DString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const DString &path, const DString &fileName, const DString &relPath, bool writeImageMap=true, int graphId=-1)
static PageLinkedMap * exampleLinkedMap
static IndexList * indexList
static DString htmlFileExtension
Minimal replacement for QFileInfo.
std::string fileName() const
std::string absFilePath() const
Generator for HTML code fragments.
void codify(const DString &text) override
void startSpecialComment() override
HtmlCodeGenerator(TextStream *t, const DString &relPath)
void endCodeLine() override
size_t m_stripIndentAmount
void writeCodeLink(CodeSymbolType type, const DString &ref, const DString &file, const DString &anchor, const DString &name, const DString &tooltip) override
void startCodeFragment(const DString &style) override
void startFold(int, const DString &, const DString &) override
void _writeCodeLink(const DString &className, const DString &ref, const DString &file, const DString &anchor, const DString &name, const DString &tooltip)
void startCodeLine(int) override
void setFileName(const DString fileName)
void startFontClass(const DString &s) override
void writeLineNumber(const DString &, const DString &, const DString &, int, bool) override
void setRelativePath(const DString &path)
void setStripIndentAmount(size_t amount) override
void endSpecialComment() override
void endFontClass() override
void writeCodeAnchor(const DString &anchor) override
void setTextStream(TextStream *t)
void writeTooltip(const DString &id, const DocLinkInfo &docInfo, const DString &decl, const DString &desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo) override
void endCodeFragment(const DString &) override
void stripCodeComments(bool b) override
OutputType type() const override
Concrete visitor implementation for HTML output.
void startClassDiagram() override
void docify(const DString &text) override
static void writeSearchData(const DString &dir)
void startDescTable(const DString &title, const bool hasInits) override
void writeLogo() override
static DString getNavTreeCss()
void endParameterExtra(bool last, bool emptyList, bool closeBracket) override
void startTocEntry(const SectionInfo *si) override
void writeQuickLinks(HighlightedItem hli, const DString &file, bool extraTabs) override
void startInlineMemberName() override
void endDescTableInit() override
void startMemberGroupHeader(const DString &, bool) override
void startInlineMemberType() override
void endDescTable() override
void startParameterDefVal(const char *sep) override
void startIndexKey() override
void endClassDiagram(const ClassDiagram &, const DString &, const DString &) override
void startParameterName(bool) override
void startDoxyAnchor(const DString &fName, const DString &manName, const DString &anchor, const DString &name, const DString &args) override
static void writeSearchPage()
void startInclDepGraph() override
void insertMemberAlignLeft(MemberItemType, bool) override
void startGroupHeader(const DString &, int) override
void startMemberSubtitle() override
HtmlGenerator & operator=(const HtmlGenerator &)
void startTextLink(const DString &file, const DString &anchor) override
void startMemberDocName(bool) override
void startParagraph(const DString &classDef) override
void endParameterType() override
void startLabels() override
void startCallGraph() override
void endMemberList() override
void endIndexList() override
void writeSearchInfo() override
void startContents() override
void startDescTableRow() override
void startDirDepGraph() override
void startCompoundTemplateParams() override
void startConstraintParam() override
void endGroupHeader(int) override
void writeChar(char c) override
void endConstraintList() override
void endParameterList() override
static void writePageFooter(TextStream &t, const DString &, const DString &, const DString &)
void startDotGraph() override
void endIndent() override
void writeSplitBar(const DString &name, const DString &allMembersFile) override
void endParameterName() override
void endPageDoc() override
void startMemberDocList() override
void endDescTableRow() override
void startDescTableInit() override
void startMemberDescription(const DString &anchor, const DString &inheritId, bool typ) override
void startLocalToc(int level) override
void startMemberList() override
static void writeHeaderFile(TextStream &t, const DString &cssname)
void endQuickIndices() override
void startHeaderSection() override
void startDescTableTitle() override
void endIndexValue(const DString &, bool) override
void startMemberDoc(const DString &clName, const DString &memName, const DString &anchor, const DString &title, int memCount, int memTotal, bool showInline) override
void endDirDepGraph(DotDirDeps &g) override
void startIndexList() override
void startEmbeddedDoc(size_t) override
void endParameterDefVal() override
void endMemberGroup(bool) override
void lineBreak(const DString &style) override
void endInlineHeader() override
void endEmbeddedDoc() override
void startPageDoc(const DString &pageTitle) override
static void writeFooterFile(TextStream &t)
void endMemberDescription() override
void startGroupCollaboration() override
void endConstraintDocs() override
void writeNonBreakableSpace(int) override
void endMemberGroupHeader(bool) override
void writePageOutline() override
void startInlineMemberDoc() override
static void writeTabData()
Additional initialization after indices have been created.
void endExamples() override
void endIndexKey() override
void addLabel(const DString &, const DString &) override
void endMemberDocName() override
void endContents() override
void endInlineMemberType() override
void writeLabel(const DString &l, bool isLast) override
void startMemberGroupDocs() override
void startMemberDocSimple(bool) override
OutputType type() const override
void endHeaderSection() override
void startIndent() override
void writeStyleInfo(int part) override
void endMemberGroupDocs() override
void endDotGraph(DotClassGraph &g) override
void endMemberDeclaration(const DString &anchor, const DString &inheritId) override
void endMemberHeader() override
void startMemberItem(const DString &anchor, MemberItemType, const DString &inheritId) override
void endTextLink() override
void startConstraintList(const DString &) override
void startMemberSections() override
void startTitleHead(const DString &) override
void endMemberSections() override
void endMemberDocList() override
void endCompoundTemplateParams() override
void addIndexItem(const DString &, const DString &) override
static void writeExternalSearchPage()
void startSection(const DString &, const DString &, SectionType) override
void endDescTableData() override
void writeSummaryLink(const DString &file, const DString &anchor, const DString &title, bool first) override
void startDescTableData() override
void endParagraph() override
void insertMemberAlign(bool) override
static void writeStyleSheetFile(TextStream &t)
void startMemberTemplateParams() override
void writeFooter(const DString &navPath) override
void endLabels() override
HtmlCodeGenerator * m_codeGen
void startIndexItem(const DString &ref, const DString &file) override
void startMemberHeader(const DString &, int) override
void startIndexValue(bool) override
void endGroupCollaboration(DotGroupCollaboration &g) override
void endSection(const DString &, SectionType) override
void endLocalToc() override
std::unique_ptr< OutputCodeList > m_codeList
void startConstraintType() override
void endConstraintParam() override
void endMemberTemplateParams(const DString &anchor, const DString &inheritId) override
void addCodeGen(OutputCodeList &list) override
void startConstraintDocs() override
void docify_(const DString &text, bool inHtmlComment)
void endPlainFile() override
void startIndexListItem() override
void endProjectNumber() override
void writeDoc(const IDocNodeAST *node, const Definition *, const MemberDef *, int id, int sectionLevel) override
void endMemberDocPrefixItem() override
void endDescTableTitle() override
void startFile(const DString &name, bool isSource, const DString &manName, const DString &title, int id, int hierarchyLevel) override
void endInclDepGraph(DotInclDepGraph &g) override
void startParameterExtra() override
void writeNavigationPath(const DString &s) override
static DString writeLogoAsString(const DString &path)
void startProjectNumber() override
void endDoxyAnchor(const DString &fName, const DString &anchor) override
void startPlainFile(const DString &name) override
void writeString(const DString &text) override
void writeGraphicalHierarchy(DotGfxHierarchyTable &g) override
void startExamples() override
void endTitleHead(const DString &, const DString &) override
void writeInheritedSectionTitle(const DString &id, const DString &ref, const DString &file, const DString &anchor, const DString &title, const DString &name) override
void writeStartAnnoItem(const DString &type, const DString &file, const DString &path, const DString &name) override
void endInlineMemberDoc() override
void endCallGraph(DotCallGraph &g) override
void endConstraintType() override
void endMemberSubtitle() override
void startMemberDocPrefixItem() override
void endTocEntry(const SectionInfo *si) override
void endMemberItem(MemberItemType) override
void startMemberGroup() override
void endMemberDoc(bool) override
static void writeSearchInfoStatic(TextStream &t, const DString &relPath)
void endIndexItem(const DString &ref, const DString &file) override
void startInlineHeader() override
void endInlineMemberName() override
void endMemberDocSimple(bool) override
static DString fixSpaces(const DString &s)
void exceptionEntry(const DString &, bool) override
void writeObjectLink(const DString &ref, const DString &file, const DString &anchor, const DString &name) override
void endIndexListItem() override
void startParameterList(bool) override
static DString writeSplitBarAsString(const DString &name, const DString &relpath, const DString &allMembersFile)
void startParameterType(bool first, const DString &key) override
opaque representation of the abstract syntax tree (AST)
static Index & instance()
void addIndexFile(const DString &name)
void addImageFile(const DString &name)
void addStyleSheetFile(const DString &name)
static LayoutDocManager & instance()
Returns a reference to this singleton.
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
A model of a class/file/namespace member symbol.
static MermaidManager & instance()
Class representing a list of different code generators.
void add(OutputCodeIntfPtr &&p)
Abstract interface for output generators.
Singleton for managing resources compiled into an executable.
static ResourceMgr & instance()
Returns the one and only instance of this class.
bool copyResource(const DString &name, const DString &targetDir) const
Copies a registered resource to a given target directory.
DString getAsString(const DString &name) const
Gets the resource data as a C string.
class that provide information about a section.
constexpr bool isSection() const
static constexpr int Section
static constexpr int Subsection
static constexpr int Subsubsection
constexpr int level() const
static constexpr int Page
static constexpr int Paragraph
static constexpr int Subsubparagraph
static constexpr int Subparagraph
Text streaming class that buffers data.
bool empty() const
Returns true iff the buffer is empty.
std::string str() const
Return the contents of the buffer as a std::string object.
virtual DString trCompoundMembers()=0
virtual DString trLegend()=0
virtual DString trSearching()=0
virtual DString trGeneratedAt(const DString &date, const DString &projName)=0
virtual DString trInheritedFrom(const DString &members, const DString &what)=0
virtual DString trSearchResults(int numDocuments)=0
virtual DString trISOLang()=0
virtual DString trDeclaration()=0
virtual DString trSearchMatches()=0
virtual DString trSearch()=0
virtual DString trGeneratedBy()=0
virtual DString trDefinition()=0
virtual DString trEnumerationValues()=0
virtual DString trRTFTableOfContents()=0
virtual DString trNoMatches()=0
virtual DString trCopyToClipboard()=0
virtual DString trSearchResultsTitle()=0
virtual DString trLoading()=0
virtual DString trExamples()=0
#define Config_getInt(name)
#define Config_getList(name)
#define Config_getEnumAsString(name)
#define Config_getBool(name)
#define Config_getString(name)
#define Config_getEnum(name)
std::vector< std::string > StringVector
std::unordered_map< std::string, std::string > StringUnorderedMap
std::vector< bool > BoolVector
DString yearToString()
Returns the current year as a string.
DString dateToString(DateTimeType includeTime)
Returns the current date, when includeTime is set also the time is provided.
DString substitute(const DString &s, const DString &src, const DString &dst)
substitute all occurrences of src in s by dst
static bool hasDateReplacement(const DString &str)
static constexpr auto hex
static DString getSearchBox(bool serverSide, DString relPath, bool highlightSearch)
static void startSectionHeader(TextStream &t, const DString &relPath, int sectionCount)
static void startSectionContent(TextStream &t, int sectionCount)
static void endQuickIndexList(TextStream &t)
static DString replaceVariables(const DString &input)
static DString substituteHtmlKeywords(const DString &file, const DString &str, const DString &title, const DString &relPath, const DString &navPath=DString(), bool isSource=false)
static bool useDynamicSections()
static void startSectionSummary(TextStream &t, int sectionCount)
static void startQuickIndexItem(TextStream &t, const DString &l, bool hl, bool, const DString &relPath)
static void startQuickIndexList(TextStream &t, bool topLevel=true)
static const SelectionMarkerInfo htmlMarkerInfo
static void fillColorStyleMap(const DString &definitions, StringUnorderedMap &map)
static void endQuickIndexItem(TextStream &t, const DString &l)
static void renderQuickLinksAsTree(TextStream &t, const DString &relPath, LayoutNavEntry *root)
static void endSectionContent(TextStream &t)
static DString g_latex_macro
static void writeServerSearchBox(TextStream &t, const DString &relPath, bool highlightSearch)
static void fillColorStyleMaps()
static StringUnorderedMap g_lightMap
static void writeDefaultStyleSheet(TextStream &t)
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
static void renderQuickLinksAsTabs(TextStream &t, const DString &relPath, LayoutNavEntry *hlEntry, LayoutNavEntry::Kind kind, bool highlightParent, bool highlightSearch)
static std::mutex g_indexLock
static DString g_header_file
static DString getConvertLatexMacro()
Convert a set of LaTeX commands \(re)newcommand to a form readable by MathJax LaTeX syntax:
static void writeDefaultQuickLinks(TextStream &t, HighlightedItem hli, const DString &file, const DString &relPath, bool extraTabs)
static DString g_mathjax_code
static StringUnorderedMap g_darkMap
static void endSectionHeader(TextStream &t)
static void endSectionSummary(TextStream &t)
static void writeClientSearchBox(TextStream &t, const DString &relPath)
static DString g_footer_file
Translator * theTranslator
#define warn(file, line, fmt,...)
std::ofstream openOutputStream(const DString &name, bool append=false)
size_t updateColumnCount(const char *s, size_t col)
OutputCodeDefer< HtmlCodeGenerator > HtmlCodeGeneratorDefer
Portable versions of functions that are platform dependent.
Some helper functions for std::string.
bool literal_at(const char *data, const char(&str)[N])
returns true iff data points to a substring that matches string literal str
std::string removeEmptyLines(const std::string &s)
void writeIndent(TextStream &t)
void incIndent(TextStream &t, const DString &text)
void decIndent(TextStream &t, const DString &text)
Base class for the layout of a navigation item at the top of the HTML pages.
const LayoutNavEntryList & children() const
LayoutNavEntry * find(LayoutNavEntry::Kind k, const DString &file=DString()) const
LayoutNavEntry * parent() const
constexpr const char * codeSymbolType2Str(CodeSymbolType type) noexcept
std::string convertUTF8ToLower(const std::string &input)
Converts the input string into a lower case version, also taking into account non-ASCII characters th...
const char * writeUTF8Char(TextStream &t, const char *s)
Writes the UTF8 character pointed to by s to stream t and returns a pointer to the next character.
Various UTF8 related helper functions.
DString replaceColorMarkers(const DString &str)
Replaces any markers of the form ##AA in input string str by new markers of the form #AABBCC,...
DString filterTitle(const DString &title)
DString selectBlocks(const DString &s, const SelectionBlockList &blockList, const SelectionMarkerInfo &markerInfo)
remove disabled blocks and all block markers from s and return the result as a string
DString externalLinkTarget(const bool parent)
DString correctURL(const DString &url, const DString &relPath)
Corrects URL url according to the relative path relPath.
DString convertToId(const DString &s)
DString showDate(const DString &fmt)
void clearSubDirs(const Dir &d)
void createSubDirs(const Dir &d)
DString convertToHtml(const DString &s, bool keepEntities)
void addHtmlExtensionIfMissing(DString &fName)
void checkBlocks(const DString &s, const DString fileName, const SelectionMarkerInfo &markerInfo)
DString fileToString(const DString &name, bool filter, bool isSourceCode)
DString substituteKeywords(const DString &file, const DString &s, const KeywordSubstitutionList &keywords)
DString relativePathToRoot(const DString &name)
DString projectLogoFile()
DString createHtmlUrl(const DString &relPath, const DString &ref, bool isLocalFile, const DString &targetFileName, const DString &anchor)
DString projectLogoSize()
DString externalRef(const DString &relPath, const DString &ref)
DString stripPath(const DString &s)
A bunch of utility functions.