summaryrefslogtreecommitdiffstats
path: root/src/htmlgen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/htmlgen.cpp')
-rw-r--r--src/htmlgen.cpp358
1 files changed, 187 insertions, 171 deletions
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index af8c9e0..cc3e61d 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -1,12 +1,12 @@
/******************************************************************************
*
- *
+ *
*
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -62,7 +62,7 @@ static void writeClientSearchBox(FTextStream &t,const char *relPath)
t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n";
t << " onmouseout=\"return searchBox.OnSearchSelectHide()\"\n";
t << " alt=\"\"/>\n";
- t << " <input type=\"text\" id=\"MSearchField\" value=\""
+ t << " <input type=\"text\" id=\"MSearchField\" value=\""
<< theTranslator->trSearch() << "\" accesskey=\"S\"\n";
t << " onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n";
t << " onblur=\"searchBox.OnSearchFieldFocus(false)\" \n";
@@ -200,7 +200,7 @@ static QCString removeEmptyLines(const QCString &s)
{
const char *e = p;
while (*e==' ' || *e=='\t') e++;
- if (*e=='\n')
+ if (*e=='\n')
{
p=e;
}
@@ -279,11 +279,11 @@ static QCString substituteHtmlKeywords(const QCString &s,
}
}
- if (timeStamp)
+ if (timeStamp)
{
generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), convertToHtml(Config_getString(PROJECT_NAME)));
}
- else
+ else
{
generatedBy = theTranslator->trGeneratedBy();
}
@@ -291,12 +291,14 @@ static QCString substituteHtmlKeywords(const QCString &s,
if (treeView)
{
treeViewCssJs = "<link href=\"$relpath^navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"
- "<script type=\"text/javascript\" src=\"$relpath^resize.js\"></script>\n"
- "<script type=\"text/javascript\" src=\"$relpath^navtreedata.js\"></script>\n"
- "<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n"
- "<script type=\"text/javascript\">\n"
- " $(document).ready(initResizable);\n"
- "</script>";
+ "<script type=\"text/javascript\" src=\"$relpath^resize.js\"></script>\n"
+ "<script type=\"text/javascript\" src=\"$relpath^navtreedata.js\"></script>\n"
+ "<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n"
+ "<script type=\"text/javascript\">\n"
+ "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n"
+ " $(document).ready(initResizable);\n"
+ "/* @license-end */"
+ "</script>";
}
if (searchEngine)
@@ -313,8 +315,10 @@ static QCString substituteHtmlKeywords(const QCString &s,
if (disableIndex || !Config_getBool(HTML_DYNAMIC_MENUS))
{
searchCssJs += "<script type=\"text/javascript\">\n"
- " $(document).ready(function() { init_search(); });\n"
- "</script>";
+ "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n"
+ " $(document).ready(function() { init_search(); });\n"
+ "/* @license-end */\n"
+ "</script>";
}
}
else
@@ -322,17 +326,19 @@ static QCString substituteHtmlKeywords(const QCString &s,
if (disableIndex || !Config_getBool(HTML_DYNAMIC_MENUS))
{
searchCssJs += "<script type=\"text/javascript\">\n"
- " $(document).ready(function() {\n"
- " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n"
- " });\n"
- "</script>\n";
+ "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n"
+ " $(document).ready(function() {\n"
+ " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n"
+ " });\n"
+ " /* @license-end */\n"
+ "</script>\n";
}
// OPENSEARCH_PROVIDER {
searchCssJs += "<link rel=\"search\" href=\"" + relPath +
"search_opensearch.php?v=opensearch.xml\" "
"type=\"application/opensearchdescription+xml\" title=\"" +
- (hasProjectName ? projectName : QCString("Doxygen")) +
+ (hasProjectName ? projectName : QCString("Doxygen")) +
"\"/>";
// OPENSEARCH_PROVIDER }
}
@@ -341,11 +347,11 @@ static QCString substituteHtmlKeywords(const QCString &s,
if (mathJax)
{
- QCString path = Config_getString(MATHJAX_RELPATH);
- if (path.isEmpty() || path.left(2)=="..") // relative path
- {
- path.prepend(relPath);
- }
+ QCString path = Config_getString(MATHJAX_RELPATH);
+ if (path.isEmpty() || path.left(2)=="..") // relative path
+ {
+ path.prepend(relPath);
+ }
mathJaxJs = "<script type=\"text/x-mathjax-config\">\n"
" MathJax.Hub.Config({\n"
" extensions: [\"tex2jax.js\"";
@@ -369,7 +375,7 @@ static QCString substituteHtmlKeywords(const QCString &s,
mathJaxJs += "\n";
}
mathJaxJs += "</script>";
- mathJaxJs += "<script type=\"text/javascript\" src=\"" + path + "MathJax.js\"></script>\n";
+ mathJaxJs += "<script type=\"text/javascript\" async src=\"" + path + "MathJax.js\"></script>\n";
}
// first substitute generic keywords
@@ -389,7 +395,7 @@ static QCString substituteHtmlKeywords(const QCString &s,
result = substitute(result,"$extrastylesheet",extraCssText);
result = substitute(result,"$relpath$",relPath); //<-- obsolete: for backwards compatibility only
result = substitute(result,"$relpath^",relPath); //<-- must be last
-
+
// additional HTML only conditional blocks
result = selectBlock(result,"DISABLE_INDEX",disableIndex);
result = selectBlock(result,"GENERATE_TREEVIEW",treeView);
@@ -412,7 +418,7 @@ HtmlCodeGenerator::HtmlCodeGenerator()
{
}
-HtmlCodeGenerator::HtmlCodeGenerator(FTextStream &t,const QCString &relPath)
+HtmlCodeGenerator::HtmlCodeGenerator(FTextStream &t,const QCString &relPath)
: m_col(0), m_relPath(relPath)
{
setTextStream(t);
@@ -433,7 +439,7 @@ void HtmlCodeGenerator::codify(const char *str)
{
static int tabSize = Config_getInt(TAB_SIZE);
if (str && m_streamSet)
- {
+ {
const char *p=str;
char c;
int spacesToNextTabStop;
@@ -442,19 +448,19 @@ void HtmlCodeGenerator::codify(const char *str)
c=*p++;
switch(c)
{
- case '\t': spacesToNextTabStop =
- tabSize - (m_col%tabSize);
- m_t << Doxygen::spaces.left(spacesToNextTabStop);
- m_col+=spacesToNextTabStop;
- break;
- case '\n': m_t << "\n"; m_col=0;
+ case '\t': spacesToNextTabStop =
+ tabSize - (m_col%tabSize);
+ m_t << Doxygen::spaces.left(spacesToNextTabStop);
+ m_col+=spacesToNextTabStop;
+ break;
+ case '\n': m_t << "\n"; m_col=0;
break;
case '\r': break;
- case '<': m_t << "&lt;"; m_col++;
+ case '<': m_t << "&lt;"; m_col++;
break;
- case '>': m_t << "&gt;"; m_col++;
+ case '>': m_t << "&gt;"; m_col++;
break;
- case '&': m_t << "&amp;"; m_col++;
+ case '&': m_t << "&amp;"; m_col++;
break;
case '\'': m_t << "&#39;"; m_col++; // &apos; is not valid XHTML
break;
@@ -469,8 +475,8 @@ void HtmlCodeGenerator::codify(const char *str)
m_t << "\\";
m_col++;
break;
- default: p=writeUtf8Char(m_t,p-1);
- m_col++;
+ default: p=writeUtf8Char(m_t,p-1);
+ m_col++;
break;
}
}
@@ -502,7 +508,7 @@ void HtmlCodeGenerator::docify(const char *str)
else
m_t << "\\";
break;
- default: m_t << c;
+ default: m_t << c;
}
}
}
@@ -519,7 +525,7 @@ void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename,
qsnprintf(lineAnchor,maxLineNrStr,"l%05d",l);
m_t << "<div class=\"line\">";
- m_t << "<a name=\"" << lineAnchor << "\"></a><span class=\"lineno\">";
+ m_t << "<a name=\"" << lineAnchor << "\"></a><span class=\"lineno\">";
if (filename)
{
_writeCodeLink("line",ref,filename,anchor,lineNumber,0);
@@ -528,7 +534,7 @@ void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename,
{
codify(lineNumber);
}
- m_t << "</span>";
+ m_t << "</span>";
m_t << "&#160;";
}
@@ -546,7 +552,7 @@ void HtmlCodeGenerator::_writeCodeLink(const char *className,
const char *anchor, const char *name,
const char *tooltip)
{
- if (ref)
+ if (ref)
{
m_t << "<a class=\"" << className << "Ref\" ";
m_t << externalLinkTarget() << externalRef(m_relPath,ref,FALSE);
@@ -649,33 +655,33 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
}
-void HtmlCodeGenerator::startCodeLine(bool hasLineNumbers)
-{
+void HtmlCodeGenerator::startCodeLine(bool hasLineNumbers)
+{
if (m_streamSet)
{
if (!hasLineNumbers) m_t << "<div class=\"line\">";
- m_col=0;
+ m_col=0;
}
}
-void HtmlCodeGenerator::endCodeLine()
-{
+void HtmlCodeGenerator::endCodeLine()
+{
if (m_streamSet) m_t << "</div>";
}
-void HtmlCodeGenerator::startFontClass(const char *s)
-{
- if (m_streamSet) m_t << "<span class=\"" << s << "\">";
+void HtmlCodeGenerator::startFontClass(const char *s)
+{
+ if (m_streamSet) m_t << "<span class=\"" << s << "\">";
}
-void HtmlCodeGenerator::endFontClass()
-{
- if (m_streamSet) m_t << "</span>";
+void HtmlCodeGenerator::endFontClass()
+{
+ if (m_streamSet) m_t << "</span>";
}
-void HtmlCodeGenerator::writeCodeAnchor(const char *anchor)
-{
- if (m_streamSet) m_t << "<a name=\"" << anchor << "\"></a>";
+void HtmlCodeGenerator::writeCodeAnchor(const char *anchor)
+{
+ if (m_streamSet) m_t << "<a name=\"" << anchor << "\"></a>";
}
//--------------------------------------------------------------------------
@@ -701,29 +707,29 @@ void HtmlGenerator::init()
exit(1);
}
//writeLogo(dname);
- if (!Config_getString(HTML_HEADER).isEmpty())
+ if (!Config_getString(HTML_HEADER).isEmpty())
{
g_header=fileToString(Config_getString(HTML_HEADER));
//printf("g_header='%s'\n",g_header.data());
}
- else
+ else
{
g_header = ResourceMgr::instance().getAsString("header.html");
}
- if (!Config_getString(HTML_FOOTER).isEmpty())
+ if (!Config_getString(HTML_FOOTER).isEmpty())
{
g_footer=fileToString(Config_getString(HTML_FOOTER));
//printf("g_footer='%s'\n",g_footer.data());
}
- else
+ else
{
g_footer = ResourceMgr::instance().getAsString("footer.html");
}
if (Config_getBool(USE_MATHJAX))
{
- if (!Config_getString(MATHJAX_CODEFILE).isEmpty())
+ if (!Config_getString(MATHJAX_CODEFILE).isEmpty())
{
g_mathjax_code=fileToString(Config_getString(MATHJAX_CODEFILE));
//printf("g_mathjax_code='%s'\n",g_mathjax_code.data());
@@ -877,7 +883,7 @@ void HtmlGenerator::startFile(const char *name,const char *,
lastTitle=title;
relPath = relativePathToRoot(fileName);
- if (fileName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension)
+ if (fileName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension)
{
fileName+=Doxygen::htmlFileExtension;
}
@@ -885,19 +891,21 @@ void HtmlGenerator::startFile(const char *name,const char *,
m_codeGen.setTextStream(t);
m_codeGen.setRelativePath(relPath);
Doxygen::indexList->addIndexFile(fileName);
-
+
lastFile = fileName;
t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title)),relPath);
- t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
+ t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
<< versionString << " -->" << endl;
//static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
static bool searchEngine = Config_getBool(SEARCHENGINE);
if (searchEngine /*&& !generateTreeView*/)
{
t << "<script type=\"text/javascript\">\n";
- t << "var searchBox = new SearchBox(\"searchBox\", \""
+ t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
+ t << "var searchBox = new SearchBox(\"searchBox\", \""
<< relPath<< "search\",false,'" << theTranslator->trSearch() << "');\n";
+ t << "/* @license-end */\n";
t << "</script>\n";
}
//generateDynamicSections(t,relPath);
@@ -997,8 +1005,8 @@ void HtmlGenerator::writeStyleInfo(int part)
if (Config_getString(HTML_STYLESHEET).isEmpty()) // write default style sheet
{
//printf("write doxygen.css\n");
- startPlainFile("doxygen.css");
-
+ startPlainFile("doxygen.css");
+
// alternative, cooler looking titles
//t << "H1 { text-align: center; border-width: thin none thin none;" << endl;
//t << " border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }" << endl;
@@ -1098,7 +1106,7 @@ void HtmlGenerator::startIndexItem(const char *ref,const char *f)
//printf("HtmlGenerator::startIndexItem(%s,%s)\n",ref,f);
if (ref || f)
{
- if (ref)
+ if (ref)
{
t << "<a class=\"elRef\" ";
t << externalLinkTarget() << externalRef(relPath,ref,FALSE);
@@ -1143,7 +1151,7 @@ void HtmlGenerator::writeStartAnnoItem(const char *,const char *f,
void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
const char *anchor, const char *name)
{
- if (ref)
+ if (ref)
{
t << "<a class=\"elRef\" ";
t << externalLinkTarget() << externalRef(relPath,ref,FALSE);
@@ -1166,7 +1174,7 @@ void HtmlGenerator::startTextLink(const char *f,const char *anchor)
t << "<a href=\"";
if (f) t << relPath << f << Doxygen::htmlFileExtension;
if (anchor) t << "#" << anchor;
- t << "\">";
+ t << "\">";
}
void HtmlGenerator::endTextLink()
@@ -1181,7 +1189,7 @@ void HtmlGenerator::startHtmlLink(const char *url)
if (generateTreeView) t << "target=\"top\" ";
t << "href=\"";
if (url) t << url;
- t << "\">";
+ t << "\">";
}
void HtmlGenerator::endHtmlLink()
@@ -1277,7 +1285,7 @@ void HtmlGenerator::docify(const char *str,bool inHtmlComment)
else
t << "\\";
break;
- default: t << c;
+ default: t << c;
}
}
}
@@ -1304,7 +1312,7 @@ static void startSectionHeader(FTextStream &t,
"onclick=\"return toggleVisibility(this)\" "
"class=\"dynheader closed\" "
"style=\"cursor:pointer;\">" << endl;
- t << " <img id=\"dynsection-" << sectionCount << "-trigger\" src=\""
+ t << " <img id=\"dynsection-" << sectionCount << "-trigger\" src=\""
<< relPath << "closed.png\" alt=\"+\"/> ";
}
else
@@ -1392,13 +1400,13 @@ void HtmlGenerator::endClassDiagram(const ClassDiagram &d,
}
-void HtmlGenerator::startMemberList()
-{
+void HtmlGenerator::startMemberList()
+{
DBG_HTML(t << "<!-- startMemberList -->" << endl)
}
-void HtmlGenerator::endMemberList()
-{
+void HtmlGenerator::endMemberList()
+{
DBG_HTML(t << "<!-- endMemberList -->" << endl)
}
@@ -1406,8 +1414,8 @@ void HtmlGenerator::endMemberList()
// 0 = single column right aligned
// 1 = double column left aligned
// 2 = single column left aligned
-void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char *inheritId)
-{
+void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char *inheritId)
+{
DBG_HTML(t << "<!-- startMemberItem() -->" << endl)
if (m_emptySection)
{
@@ -1429,10 +1437,10 @@ void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char *
}
}
-void HtmlGenerator::endMemberItem()
-{
- t << "</td></tr>";
- t << endl;
+void HtmlGenerator::endMemberItem()
+{
+ t << "</td></tr>";
+ t << endl;
}
void HtmlGenerator::startMemberTemplateParams()
@@ -1451,15 +1459,15 @@ void HtmlGenerator::endMemberTemplateParams(const char *anchor,const char *inher
}
-void HtmlGenerator::insertMemberAlign(bool templ)
-{
+void HtmlGenerator::insertMemberAlign(bool templ)
+{
DBG_HTML(t << "<!-- insertMemberAlign -->" << endl)
QCString className = templ ? "memTemplItemRight" : "memItemRight";
- t << "&#160;</td><td class=\"" << className << "\" valign=\"bottom\">";
+ t << "&#160;</td><td class=\"" << className << "\" valign=\"bottom\">";
}
-void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId)
-{
+void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId)
+{
DBG_HTML(t << "<!-- startMemberDescription -->" << endl)
if (m_emptySection)
{
@@ -1471,20 +1479,20 @@ void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheri
{
t << " inherit " << inheritId;
}
- t << "\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">";
+ t << "\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">";
}
-void HtmlGenerator::endMemberDescription()
-{
+void HtmlGenerator::endMemberDescription()
+{
DBG_HTML(t << "<!-- endMemberDescription -->" << endl)
- t << "<br /></td></tr>" << endl;
+ t << "<br /></td></tr>" << endl;
}
void HtmlGenerator::startMemberSections()
{
DBG_HTML(t << "<!-- startMemberSections -->" << endl)
m_emptySection=TRUE; // we postpone writing <table> until we actually
- // write a row to prevent empty tables, which
+ // write a row to prevent empty tables, which
// are not valid XHTML!
}
@@ -1535,9 +1543,9 @@ void HtmlGenerator::endMemberSubtitle()
t << "</td></tr>" << endl;
}
-void HtmlGenerator::startIndexList()
-{
- t << "<table>" << endl;
+void HtmlGenerator::startIndexList()
+{
+ t << "<table>" << endl;
}
void HtmlGenerator::endIndexList()
@@ -1545,10 +1553,10 @@ void HtmlGenerator::endIndexList()
t << "</table>" << endl;
}
-void HtmlGenerator::startIndexKey()
-{
+void HtmlGenerator::startIndexKey()
+{
// inserted 'class = ...', 02 jan 2002, jh
- t << " <tr><td class=\"indexkey\">";
+ t << " <tr><td class=\"indexkey\">";
}
void HtmlGenerator::endIndexKey()
@@ -1556,10 +1564,10 @@ void HtmlGenerator::endIndexKey()
t << "</td>";
}
-void HtmlGenerator::startIndexValue(bool)
-{
+void HtmlGenerator::startIndexValue(bool)
+{
// inserted 'class = ...', 02 jan 2002, jh
- t << "<td class=\"indexvalue\">";
+ t << "<td class=\"indexvalue\">";
}
void HtmlGenerator::endIndexValue(const char *,bool)
@@ -1578,13 +1586,13 @@ void HtmlGenerator::endMemberDocList()
}
void HtmlGenerator::startMemberDoc( const char *clName, const char *memName,
- const char *anchor, const char *title,
+ const char *anchor, const char *title,
int memCount, int memTotal, bool showInline)
{
DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
t << "\n<h2 class=\"memtitle\">"
- << "<span class=\"permalink\"><a href=\"#" << anchor << "\">&#9670;&nbsp;</a></span>"
- << title;
+ << "<span class=\"permalink\"><a href=\"#" << anchor << "\">&#9670;&nbsp;</a></span>";
+ docify(title);
if (memTotal>1)
{
t << " <span class=\"overload\">[" << memCount << "/" << memTotal <<"]</span>";
@@ -1612,7 +1620,7 @@ void HtmlGenerator::startMemberDocName(bool /*align*/)
DBG_HTML(t << "<!-- startMemberDocName -->" << endl;)
t << " <table class=\"memname\">" << endl;
-
+
t << " <tr>" << endl;
t << " <td class=\"memname\">";
}
@@ -1715,8 +1723,8 @@ void HtmlGenerator::exceptionEntry(const char* prefix,bool closeBracket)
t << "</td><td></td><td colspan=\"2\">";
}
-void HtmlGenerator::endMemberDoc(bool hasArgs)
-{
+void HtmlGenerator::endMemberDoc(bool hasArgs)
+{
DBG_HTML(t << "<!-- endMemberDoc -->" << endl;)
if (!hasArgs)
{
@@ -1859,17 +1867,17 @@ void HtmlGenerator::endMemberGroup(bool)
{
}
-void HtmlGenerator::startIndent()
-{
+void HtmlGenerator::startIndent()
+{
DBG_HTML(t << "<!-- startIndent -->" << endl;)
t << "<div class=\"memdoc\">\n";
}
-void HtmlGenerator::endIndent()
-{
+void HtmlGenerator::endIndent()
+{
DBG_HTML(t << "<!-- endIndent -->" << endl;)
- t << endl << "</div>" << endl << "</div>" << endl;
+ t << endl << "</div>" << endl << "</div>" << endl;
}
void HtmlGenerator::addIndexItem(const char *,const char *)
@@ -1943,7 +1951,7 @@ void HtmlGenerator::startSimpleSect(SectionTypes,
void HtmlGenerator::endSimpleSect()
{
- t << "</dl>";
+ t << "</dl>";
}
void HtmlGenerator::startParamList(ParamListTypes,
@@ -1956,21 +1964,21 @@ void HtmlGenerator::startParamList(ParamListTypes,
void HtmlGenerator::endParamList()
{
- t << "</dl>";
+ t << "</dl>";
}
void HtmlGenerator::writeDoc(DocNode *n,Definition *ctx,MemberDef *)
{
HtmlDocVisitor *visitor = new HtmlDocVisitor(t,m_codeGen,ctx);
n->accept(visitor);
- delete visitor;
+ delete visitor;
}
//---------------- helpers for index generation -----------------------------
static void startQuickIndexList(FTextStream &t,bool compact,bool topLevel=TRUE)
{
- if (compact)
+ if (compact)
{
if (topLevel)
{
@@ -1980,9 +1988,9 @@ static void startQuickIndexList(FTextStream &t,bool compact,bool topLevel=TRUE)
{
t << " <div id=\"navrow2\" class=\"tabs2\">\n";
}
- t << " <ul class=\"tablist\">\n";
+ t << " <ul class=\"tablist\">\n";
}
- else
+ else
{
t << "<ul>";
}
@@ -1990,12 +1998,12 @@ static void startQuickIndexList(FTextStream &t,bool compact,bool topLevel=TRUE)
static void endQuickIndexList(FTextStream &t,bool compact)
{
- if (compact)
+ if (compact)
{
t << " </ul>\n";
t << " </div>\n";
}
- else
+ else
{
t << "</ul>\n";
}
@@ -2005,8 +2013,8 @@ static void startQuickIndexItem(FTextStream &t,const char *l,
bool hl,bool /*compact*/,
const QCString &relPath)
{
- t << " <li";
- if (hl)
+ t << " <li";
+ if (hl)
{
t << " class=\"current\"";
}
@@ -2028,17 +2036,17 @@ static bool quickLinkVisible(LayoutNavEntry::Kind kind)
static bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
switch (kind)
{
- case LayoutNavEntry::MainPage: return TRUE;
- case LayoutNavEntry::User: return TRUE;
- case LayoutNavEntry::UserGroup: return TRUE;
+ case LayoutNavEntry::MainPage: return TRUE;
+ case LayoutNavEntry::User: return TRUE;
+ case LayoutNavEntry::UserGroup: return TRUE;
case LayoutNavEntry::Pages: return indexedPages>0;
case LayoutNavEntry::Modules: return documentedGroups>0;
case LayoutNavEntry::Namespaces: return documentedNamespaces>0 && showNamespaces;
case LayoutNavEntry::NamespaceList: return documentedNamespaces>0 && showNamespaces;
case LayoutNavEntry::NamespaceMembers: return documentedNamespaceMembers[NMHL_All]>0;
case LayoutNavEntry::Classes: return annotatedClasses>0;
- case LayoutNavEntry::ClassList: return annotatedClasses>0;
- case LayoutNavEntry::ClassIndex: return annotatedClasses>0;
+ case LayoutNavEntry::ClassList: return annotatedClasses>0;
+ case LayoutNavEntry::ClassIndex: return annotatedClasses>0;
case LayoutNavEntry::ClassHierarchy: return hierarchyClasses>0;
case LayoutNavEntry::ClassMembers: return documentedClassMembers[CMHL_All]>0;
case LayoutNavEntry::Files: return documentedHtmlFiles>0 && showFiles;
@@ -2109,8 +2117,8 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
{
QCString url = entry->url();
startQuickIndexItem(t,url,
- entry==hlEntry &&
- (entry->children().count()>0 ||
+ entry==hlEntry &&
+ (entry->children().count()>0 ||
(entry->kind()==kind && !highlightParent)
),
TRUE,relPath);
@@ -2181,11 +2189,11 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
case HLI_Pages: kind = LayoutNavEntry::Pages; break;
case HLI_Examples: kind = LayoutNavEntry::Examples; break;
case HLI_UserGroup: kind = LayoutNavEntry::UserGroup; break;
- case HLI_ClassVisible: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes;
+ case HLI_ClassVisible: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes;
highlightParent = TRUE; break;
- case HLI_NamespaceVisible: kind = LayoutNavEntry::NamespaceList; altKind = LayoutNavEntry::Namespaces;
+ case HLI_NamespaceVisible: kind = LayoutNavEntry::NamespaceList; altKind = LayoutNavEntry::Namespaces;
highlightParent = TRUE; break;
- case HLI_FileVisible: kind = LayoutNavEntry::FileList; altKind = LayoutNavEntry::Files;
+ case HLI_FileVisible: kind = LayoutNavEntry::FileList; altKind = LayoutNavEntry::Files;
highlightParent = TRUE; break;
case HLI_None: break;
case HLI_Search: break;
@@ -2205,6 +2213,7 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
t << "<script type=\"text/javascript\" src=\"" << relPath << "menudata.js\"></script>" << endl;
t << "<script type=\"text/javascript\" src=\"" << relPath << "menu.js\"></script>" << endl;
t << "<script type=\"text/javascript\">" << endl;
+ t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
t << "$(function() {" << endl;
t << " initMenu('" << relPath << "',"
<< (searchEngine?"true":"false") << ","
@@ -2219,12 +2228,14 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
}
else
{
+ t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
t << " $(document).ready(function() {\n"
<< " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n"
<< " });\n";
}
}
t << "});" << endl;
+ t << "/* @license-end */";
t << "</script>" << endl;
t << "<div id=\"main-nav\"></div>" << endl;
}
@@ -2237,7 +2248,7 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
{
highlightParent=TRUE;
hlEntry = root->children().getFirst();
- if (hlEntry==0)
+ if (hlEntry==0)
{
return; // argl, empty index!
}
@@ -2247,7 +2258,7 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
LayoutNavEntry *e = hlEntry->children().getFirst();
if (e)
{
- hlEntry = e;
+ hlEntry = e;
}
}
renderQuickLinksAsTabs(t,relPath,hlEntry,kind,highlightParent,hli==HLI_Search);
@@ -2271,23 +2282,25 @@ QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpa
if (generateTreeView)
{
result = QCString(
- "<div id=\"side-nav\" class=\"ui-resizable side-nav-resizable\">\n"
- " <div id=\"nav-tree\">\n"
- " <div id=\"nav-tree-contents\">\n"
- " <div id=\"nav-sync\" class=\"sync\"></div>\n"
- " </div>\n"
- " </div>\n"
- " <div id=\"splitbar\" style=\"-moz-user-select:none;\" \n"
- " class=\"ui-resizable-handle\">\n"
- " </div>\n"
- "</div>\n"
- "<script type=\"text/javascript\">\n"
- "$(document).ready(function(){initNavTree('") +
- QCString(name) + Doxygen::htmlFileExtension +
- QCString("','") + relpath +
- QCString("');});\n"
- "</script>\n"
- "<div id=\"doc-content\">\n");
+ "<div id=\"side-nav\" class=\"ui-resizable side-nav-resizable\">\n"
+ " <div id=\"nav-tree\">\n"
+ " <div id=\"nav-tree-contents\">\n"
+ " <div id=\"nav-sync\" class=\"sync\"></div>\n"
+ " </div>\n"
+ " </div>\n"
+ " <div id=\"splitbar\" style=\"-moz-user-select:none;\" \n"
+ " class=\"ui-resizable-handle\">\n"
+ " </div>\n"
+ "</div>\n"
+ "<script type=\"text/javascript\">\n"
+ "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n"
+ "$(document).ready(function(){initNavTree('") +
+ QCString(name) + Doxygen::htmlFileExtension +
+ QCString("','") + relpath +
+ QCString("');});\n"
+ "/* @license-end */\n"
+ "</script>\n"
+ "<div id=\"doc-content\">\n");
}
return result;
}
@@ -2349,10 +2362,10 @@ void HtmlGenerator::writeSearchPage()
t << ");\n\n";
t << "$translator = array(\n";
t << " 'search_results_title' => \"" << theTranslator->trSearchResultsTitle() << "\",\n";
- t << " 'search_results' => array(\n";
- t << " 0 => \"" << theTranslator->trSearchResults(0) << "\",\n";
- t << " 1 => \"" << theTranslator->trSearchResults(1) << "\",\n";
- t << " 2 => \"" << substitute(theTranslator->trSearchResults(2), "$", "\\$") << "\",\n";
+ t << " 'search_results' => array(\n";
+ t << " 0 => \"" << theTranslator->trSearchResults(0) << "\",\n";
+ t << " 1 => \"" << theTranslator->trSearchResults(1) << "\",\n";
+ t << " 2 => \"" << substitute(theTranslator->trSearchResults(2), "$", "\\$") << "\",\n";
t << " ),\n";
t << " 'search_matches' => \"" << theTranslator->trSearchMatches() << "\",\n";
t << " 'search' => \"" << theTranslator->trSearch() << "\",\n";
@@ -2373,11 +2386,13 @@ void HtmlGenerator::writeSearchPage()
FTextStream t(&f);
t << substituteHtmlKeywords(g_header,"Search","");
- t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
+ t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
<< versionString << " -->" << endl;
t << "<script type=\"text/javascript\">\n";
- t << "var searchBox = new SearchBox(\"searchBox\", \""
+ t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
+ t << "var searchBox = new SearchBox(\"searchBox\", \""
<< "search\",false,'" << theTranslator->trSearch() << "');\n";
+ t << "/* @license-end */\n";
t << "</script>\n";
if (!Config_getBool(DISABLE_INDEX))
{
@@ -2425,11 +2440,13 @@ void HtmlGenerator::writeExternalSearchPage()
FTextStream t(&f);
t << substituteHtmlKeywords(g_header,"Search","");
- t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
+ t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
<< versionString << " -->" << endl;
t << "<script type=\"text/javascript\">\n";
- t << "var searchBox = new SearchBox(\"searchBox\", \""
+ t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
+ t << "var searchBox = new SearchBox(\"searchBox\", \""
<< "search\",false,'" << theTranslator->trSearch() << "');\n";
+ t << "/* @license-end */\n";
t << "</script>\n";
if (!Config_getBool(DISABLE_INDEX))
{
@@ -2580,15 +2597,15 @@ void HtmlGenerator::startHeaderSection()
t << "<div class=\"header\">" << endl;
}
-void HtmlGenerator::startTitleHead(const char *)
-{
+void HtmlGenerator::startTitleHead(const char *)
+{
t << " <div class=\"headertitle\">" << endl;
- startTitle();
+ startTitle();
}
-void HtmlGenerator::endTitleHead(const char *,const char *)
-{
- endTitle();
+void HtmlGenerator::endTitleHead(const char *,const char *)
+{
+ endTitle();
t << " </div>" << endl;
}
@@ -2684,7 +2701,7 @@ void HtmlGenerator::endLabels()
}
void HtmlGenerator::writeInheritedSectionTitle(
- const char *id, const char *ref,
+ const char *id, const char *ref,
const char *file, const char *anchor,
const char *title, const char *name)
{
@@ -2704,7 +2721,7 @@ void HtmlGenerator::writeInheritedSectionTitle(
classLink+=QCString("\">")+convertToHtml(name,FALSE)+"</a>";
t << "<tr class=\"inherit_header " << id << "\">"
<< "<td colspan=\"2\" onclick=\"javascript:toggleInherit('" << id << "')\">"
- << "<img src=\"" << relPath << "closed.png\" alt=\"-\"/>&#160;"
+ << "<img src=\"" << relPath << "closed.png\" alt=\"-\"/>&#160;"
<< theTranslator->trInheritedFrom(convertToHtml(title,FALSE),classLink)
<< "</td></tr>" << endl;
}
@@ -2760,4 +2777,3 @@ void HtmlGenerator::addWord(const char *word,bool hiPriority)
Doxygen::searchIndex->addWord(word,hiPriority);
}
}
-