summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-05-12 18:30:38 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-05-14 17:46:17 (GMT)
commit3112d709e3decbb6931f9484725a35e0630af9b8 (patch)
tree97feeb265b8a4812b7d1e1885b080e26b3631419
parentcd998a7164e30cee896cccd190846b79ebb4355f (diff)
downloadDoxygen-3112d709e3decbb6931f9484725a35e0630af9b8.zip
Doxygen-3112d709e3decbb6931f9484725a35e0630af9b8.tar.gz
Doxygen-3112d709e3decbb6931f9484725a35e0630af9b8.tar.bz2
Some fixes for template.cpp and improve the template output
-rw-r--r--src/context.cpp114
-rw-r--r--src/htmlgen.cpp13
-rw-r--r--src/resourcemgr.cpp10
-rw-r--r--src/resourcemgr.h2
-rwxr-xr-xsrc/template.cpp235
-rw-r--r--src/template.h5
-rw-r--r--templates/html/dynsections_tooltips.js6
-rw-r--r--templates/html/header.html6
-rw-r--r--templates/html/htmlannotated.tpl2
-rw-r--r--templates/html/htmlbase.tpl98
-rw-r--r--templates/html/htmlclass.tpl6
-rw-r--r--templates/html/htmlclasses.tpl37
-rw-r--r--templates/html/htmljsmenudata.tpl64
-rw-r--r--templates/html/htmljsmenuletterdata.tpl15
-rw-r--r--templates/html/htmljsnavtree.tpl24
-rw-r--r--templates/html/htmljssearchdata.tpl27
-rw-r--r--templates/html/htmljssearchindex.tpl10
-rw-r--r--templates/html/htmllayout.tpl37
-rw-r--r--templates/html/htmlmemberindex.tpl13
-rw-r--r--templates/html/htmlmemdecl.tpl2
-rw-r--r--templates/html/htmlpage.tpl2
-rw-r--r--templates/html/htmlsearchresult.tpl7
22 files changed, 466 insertions, 269 deletions
diff --git a/src/context.cpp b/src/context.cpp
index 2ae62a0..fc7a586 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -9377,61 +9377,82 @@ class SymbolContext::Private
const Definition *prevScope = prev ? prev->getOuterScope() : 0;
const MemberDef *md = toMemberDef(m_def);
bool isFunctionLike = md && (md->isFunction() || md->isSlot() || md->isSignal());
- bool overloadedFunction = isFunctionLike &&
- ((prevScope!=0 && scope==prevScope) || (scope && scope==nextScope));
- QCString prefix;
- if (md) prefix=md->localName();
- if (overloadedFunction) // overloaded member function
- {
- prefix+=md->argsString();
- // show argument list to disambiguate overloaded functions
- }
- else if (md && isFunctionLike) // unique member function
- {
- prefix+="()"; // only to show it is a function
- }
- bool found=FALSE;
+ bool overloadedFunction = ((prevScope!=0 && scope==prevScope) || (scope && scope==nextScope)) &&
+ md && (md->isFunction() || md->isSlot());
+
QCString name;
- if (m_def->definitionType()==Definition::TypeClass)
+ if (prev==0 && next==0) // unique name
{
- name = m_def->displayName();
- found = TRUE;
- }
- else if (m_def->definitionType()==Definition::TypeNamespace)
- {
- name = m_def->displayName();
- found = TRUE;
- }
- else if (scope==0 || scope==Doxygen::globalScope) // in global scope
- {
- if (md)
+ if (scope!=Doxygen::globalScope)
+ {
+ name = scope->name();
+ }
+ else if (md)
{
const FileDef *fd = md->getBodyDef();
if (fd==0) fd = md->getFileDef();
if (fd)
{
- if (!prefix.isEmpty()) prefix+=": ";
- name = prefix + convertToXML(fd->localName());
- found = TRUE;
+ name = fd->localName();
}
}
}
- else if (md && (md->getClassDef() || md->getNamespaceDef()))
- // member in class or namespace scope
- {
- SrcLangExt lang = md->getLanguage();
- name = m_def->getOuterScope()->qualifiedName()
- + getLanguageSpecificSeparator(lang) + prefix;
- found = TRUE;
- }
- else if (scope) // some thing else? -> show scope
- {
- name = prefix + convertToXML(scope->name());
- found = TRUE;
- }
- if (!found) // fallback
+ else
{
- name = prefix + "("+theTranslator->trGlobalNamespace()+")";
+
+ QCString prefix;
+ if (md) prefix=md->localName();
+ if (overloadedFunction) // overloaded member function
+ {
+ prefix+=md->argsString();
+ // show argument list to disambiguate overloaded functions
+ }
+ else if (md && isFunctionLike) // unique member function
+ {
+ prefix+="()"; // only to show it is a function
+ }
+ bool found=FALSE;
+ if (m_def->definitionType()==Definition::TypeClass)
+ {
+ name = m_def->displayName();
+ found = TRUE;
+ }
+ else if (m_def->definitionType()==Definition::TypeNamespace)
+ {
+ name = m_def->displayName();
+ found = TRUE;
+ }
+ else if (scope==0 || scope==Doxygen::globalScope) // in global scope
+ {
+ if (md)
+ {
+ const FileDef *fd = md->getBodyDef();
+ if (fd==0) fd = md->getFileDef();
+ if (fd)
+ {
+ if (!prefix.isEmpty()) prefix+=": ";
+ name = prefix + convertToXML(fd->localName());
+ found = TRUE;
+ }
+ }
+ }
+ else if (md && (md->resolveAlias()->getClassDef() || md->resolveAlias()->getNamespaceDef()))
+ // member in class or namespace scope
+ {
+ SrcLangExt lang = md->getLanguage();
+ name = m_def->getOuterScope()->qualifiedName()
+ + getLanguageSpecificSeparator(lang) + prefix;
+ found = TRUE;
+ }
+ else if (scope) // some thing else? -> show scope
+ {
+ name = prefix + convertToXML(scope->name());
+ found = TRUE;
+ }
+ if (!found) // fallback
+ {
+ name = prefix + "("+theTranslator->trGlobalNamespace()+")";
+ }
}
return name;
}
@@ -9600,7 +9621,10 @@ class SymbolGroupListContext::Private : public GenericNodeListContext
QCString name = searchName(*it);
if (name!=lastName)
{
- append(SymbolGroupContext::alloc(it_begin,it));
+ if (it!=it_begin)
+ {
+ append(SymbolGroupContext::alloc(it_begin,it));
+ }
it_begin = it;
lastName = name;
}
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index ad8782b..cde7ef2 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -999,13 +999,7 @@ void HtmlGenerator::init()
t << mgr.getAsString("dynsections.js");
if (Config_getBool(SOURCE_BROWSER) && Config_getBool(SOURCE_TOOLTIPS))
{
- t <<
- "\n$(document).ready(function() {\n"
- " $('.code,.codeRef').each(function() {\n"
- " $(this).data('powertip',$('#a'+$(this).attr('href').replace(/.*\\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());\n"
- " $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true });\n"
- " });\n"
- "});\n";
+ t << mgr.getAsString("dynsections_tooltips.js");
}
}
}
@@ -2501,7 +2495,7 @@ static void writeDefaultQuickLinks(TextStream &t,bool compact,
t << "<script type=\"text/javascript\" src=\"" << relPath << "menudata.js\"></script>\n";
t << "<script type=\"text/javascript\" src=\"" << relPath << "menu.js\"></script>\n";
t << "<script type=\"text/javascript\">\n";
- t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
+ t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
t << "$(function() {\n";
t << " initMenu('" << relPath << "',"
<< (searchEngine?"true":"false") << ","
@@ -2516,14 +2510,13 @@ static void writeDefaultQuickLinks(TextStream &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 << "});\n";
- t << "/* @license-end */";
+ t << "/* @license-end */\n";
t << "</script>\n";
t << "<div id=\"main-nav\"></div>\n";
}
diff --git a/src/resourcemgr.cpp b/src/resourcemgr.cpp
index 161e480..fb52d99 100644
--- a/src/resourcemgr.cpp
+++ b/src/resourcemgr.cpp
@@ -76,9 +76,11 @@ bool ResourceMgr::writeCategory(const QCString &categoryName,const QCString &tar
return TRUE;
}
-bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,const QCString &targetName) const
+bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,const QCString &targetName,bool append) const
{
std::string pathName = targetDir.str()+"/"+targetName.str();
+ std::ios_base::openmode mode = std::ofstream::out | std::ofstream::binary;
+ if (append) mode |= std::ofstream::app;
const Resource *res = get(name);
if (res)
{
@@ -86,7 +88,7 @@ bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,
{
case Resource::Verbatim:
{
- std::ofstream f(pathName,std::ofstream::out | std::ofstream::binary);
+ std::ofstream f(pathName,mode);
bool ok=false;
if (f.is_open())
{
@@ -137,7 +139,7 @@ bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,
break;
case Resource::CSS:
{
- std::ofstream t(pathName,std::ofstream::out | std::ofstream::binary);
+ std::ofstream t(pathName,mode);
if (t.is_open())
{
QCString buf(res->size+1);
@@ -157,7 +159,7 @@ bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,
break;
case Resource::SVG:
{
- std::ofstream t(pathName,std::ostream::out | std::ofstream::binary);
+ std::ofstream t(pathName,mode);
if (t.is_open())
{
QCString buf(res->size+1);
diff --git a/src/resourcemgr.h b/src/resourcemgr.h
index 7978e09..3c4c1b3 100644
--- a/src/resourcemgr.h
+++ b/src/resourcemgr.h
@@ -48,7 +48,7 @@ class ResourceMgr
bool copyResource(const QCString &name,const QCString &targetDir) const;
/** Copies a registered resource to a given target directory under a given target name */
- bool copyResourceAs(const QCString &name,const QCString &targetDir,const QCString &targetName) const;
+ bool copyResourceAs(const QCString &name,const QCString &targetDir,const QCString &targetName, bool append=false) const;
/** Gets the resource data as a C string */
QCString getAsString(const QCString &name) const;
diff --git a/src/template.cpp b/src/template.cpp
index 82b35f7..13ce7ef 100755
--- a/src/template.cpp
+++ b/src/template.cpp
@@ -98,30 +98,33 @@ static std::vector<QCString> split(const QCString &str,const QCString &sep,
/** Strips spaces surrounding `=` from string \a in, so
* `foo = 10 bar=5 baz= 'hello'` will become `foo=10 bar=5 baz='hello'`
*/
-static QCString removeSpacesAroundEquals(const QCString &s)
+static void removeSpacesAroundEquals(QCString &s)
{
- if (s.isEmpty()) return s;
- QCString result(s);
- const char *p=s.data();
- char *q = result.rawData();
- char c;
- while ((c=*p++))
+ //printf(">removeSpacesAroundEquals(%s)\n",qPrint(s));
+ uint i=0, dstIdx=0, l=s.length();
+ while (i<l)
{
- if (c==' ') // found a space, see if there is a = as well
+ char c = s[i++];
+ if (c==' ')
{
- const char *t = p;
- bool found=FALSE;
- while (*t==' ' || *t=='=') { if (*t++=='=') found=TRUE; }
- if (found)
+ bool found=false;
+ // look ahead for space or '='
+ uint j=i;
+ while (j<l && (s[j]==' '|| s[j]=='='))
+ {
+ if (s[j]=='=') found=true;
+ j++;
+ }
+ if (found) // found a '=', write it without spaces
{
- c='=';
- p=t; // move p to end of '\s*=\s*' sequence
+ c = '=';
+ i=j;
}
}
- *q++=c;
+ s[dstIdx++]=c;
}
- if (q<p) result.resize(static_cast<uint>(q-result.data())+1);
- return result;
+ s.resize(dstIdx+1);
+ //printf("<removeSpacesAroundEquals(%s)\n",qPrint(s));
}
//----------------------------------------------------------------------------
@@ -130,9 +133,9 @@ static QCString removeSpacesAroundEquals(const QCString &s)
static QCString replace(const QCString &s,char csrc,char cdst)
{
QCString result = s;
- for (char *p=result.data();*p;p++)
+ for (uint i=0;i<result.length();i++)
{
- if (*p==csrc) *p=cdst;
+ if (result[i]==csrc) result[i]=cdst;
}
return result;
}
@@ -514,6 +517,7 @@ class TemplateContextImpl : public TemplateContext
void push();
void pop();
void set(const QCString &name,const TemplateVariant &v);
+ void update(const QCString &name,const TemplateVariant &v);
TemplateVariant get(const QCString &name) const;
const TemplateVariant *getRef(const QCString &name) const;
void setOutputDirectory(const QCString &dir)
@@ -1078,14 +1082,14 @@ class FilterAlphaIndex
private:
struct ListElem
{
- ListElem(uint k,const TemplateVariant &v) : key(k), value(v) {}
- QCString key;
+ ListElem(std::string k,const TemplateVariant &v) : key(k), value(v) {}
+ std::string key;
TemplateVariant value;
};
- static QCString keyToLabel(const QCString &startLetter)
+ static QCString keyToLabel(const char *startLetter)
{
- if (startLetter.isEmpty()) return startLetter;
- const char *p = startLetter.data();
+ //printf(">keyToLabel(%s)\n",qPrint(startLetter));
+ const char *p = startLetter;
char c = *p;
QCString result;
if (c<127 && c>31) // printable ASCII character
@@ -1102,16 +1106,14 @@ class FilterAlphaIndex
result+=hex[((unsigned char)c)&0xf];
}
}
+ //printf("<keyToLabel(%s)\n",qPrint(result));
return result;
}
- static uint determineSortKey(TemplateStructIntf *s,const QCString &attribName)
+ static std::string determineSortKey(TemplateStructIntf *s,const QCString &attribName)
{
TemplateVariant v = s->get(attribName);
int index = getPrefixIndex(v.toString());
- return getUnicodeForUTF8CharAt(
- convertUTF8ToUpper(
- getUTF8CharAt(v.toString().str(),index)
- ),0);
+ return convertUTF8ToUpper(getUTF8CharAt(v.toString().str(),index));
}
public:
@@ -1134,7 +1136,7 @@ class FilterAlphaIndex
TemplateStructIntf *s = item.toStruct();
if (s)
{
- uint sortKey = determineSortKey(s,args.toString());
+ std::string sortKey = determineSortKey(s,args.toString());
sortList.emplace_back(sortKey,item);
//printf("sortKey=%s\n",qPrint(sortKey));
}
@@ -1147,7 +1149,7 @@ class FilterAlphaIndex
[](const auto &lhs,const auto &rhs) { return lhs.key < rhs.key; });
// create an index from the sorted list
- QCString letter;
+ std::string letter;
TemplateStruct *indexNode = 0;
TemplateList *indexList = 0;
for (const auto &elem : sortList)
@@ -1158,7 +1160,7 @@ class FilterAlphaIndex
indexNode = TemplateStruct::alloc();
indexList = TemplateList::alloc();
indexNode->set("letter", elem.key);
- indexNode->set("label", keyToLabel(elem.key));
+ indexNode->set("label", keyToLabel(elem.key.c_str()));
indexNode->set("items",indexList);
result->append(indexNode);
letter=elem.key;
@@ -1282,6 +1284,55 @@ class FilterIsAbsoluteURL
//--------------------------------------------------------------------
+/** @brief The implementation of the "lower" filter */
+class FilterLower
+{
+ public:
+ static TemplateVariant apply(const TemplateVariant &v,const TemplateVariant &)
+ {
+ if (v.isValid() && v.type()==TemplateVariant::String)
+ {
+ return v.toString().lower();
+ }
+ return v;
+ }
+};
+
+//--------------------------------------------------------------------
+
+/** @brief The implementation of the "upper" filter */
+class FilterUpper
+{
+ public:
+ static TemplateVariant apply(const TemplateVariant &v,const TemplateVariant &)
+ {
+ if (v.isValid() && v.type()==TemplateVariant::String)
+ {
+ return v.toString().upper();
+ }
+ return v;
+ }
+};
+
+//--------------------------------------------------------------------
+
+/** @brief The implementation of the "e" filter */
+class FilterHtmlEscape
+{
+ public:
+ static TemplateVariant apply(const TemplateVariant &v,const TemplateVariant &)
+ {
+ if (v.isValid() && v.type()==TemplateVariant::String)
+ {
+ return convertToHtml(v.toString());
+ }
+ return v;
+ }
+};
+
+
+//--------------------------------------------------------------------
+
/** @brief The implementation of the "decodeURL" filter
* The leading character is removed from the value in case it is a ^ or !.
* - ^ is used to encode a absolute URL
@@ -1359,7 +1410,10 @@ static TemplateFilterFactory::AutoRegister<FilterAdd> fAdd("add")
static TemplateFilterFactory::AutoRegister<FilterGet> fGet("get");
static TemplateFilterFactory::AutoRegister<FilterRaw> fRaw("raw");
static TemplateFilterFactory::AutoRegister<FilterList> fList("list");
+static TemplateFilterFactory::AutoRegister<FilterLower> fLower("lower");
+static TemplateFilterFactory::AutoRegister<FilterUpper> fUpper("upper");
static TemplateFilterFactory::AutoRegister<FilterAppend> fAppend("append");
+static TemplateFilterFactory::AutoRegister<FilterHtmlEscape> fEscape("e");
static TemplateFilterFactory::AutoRegister<FilterLength> fLength("length");
static TemplateFilterFactory::AutoRegister<FilterNoWrap> fNoWrap("nowrap");
static TemplateFilterFactory::AutoRegister<FilterFlatten> fFlatten("flatten");
@@ -1409,7 +1463,7 @@ class ExprAstVariable : public ExprAst
{
public:
ExprAstVariable(const QCString &name) : m_name(name)
- { TRACE(("ExprAstVariable(%s)\n",name)); }
+ { TRACE(("ExprAstVariable(%s)\n",name.data())); }
const QCString &name() const { return m_name; }
virtual TemplateVariant resolve(TemplateContext *c)
{
@@ -1461,7 +1515,7 @@ class ExprAstFilter : public ExprAst
{
public:
ExprAstFilter(const QCString &name,ExprAst *arg) : m_name(name), m_arg(arg)
- { TRACE(("ExprAstFilter(%s)\n",name)); }
+ { TRACE(("ExprAstFilter(%s)\n",name.data())); }
~ExprAstFilter() { delete m_arg; }
const QCString &name() const { return m_name; }
TemplateVariant apply(const TemplateVariant &v,TemplateContext *c)
@@ -1506,7 +1560,7 @@ class ExprAstLiteral : public ExprAst
{
public:
ExprAstLiteral(const QCString &lit) : m_literal(lit)
- { TRACE(("ExprAstLiteral(%s)\n",lit)); }
+ { TRACE(("ExprAstLiteral(%s)\n",lit.data())); }
const QCString &literal() const { return m_literal; }
virtual TemplateVariant resolve(TemplateContext *) { return TemplateVariant(m_literal); }
private:
@@ -1969,6 +2023,7 @@ class ExpressionParser
{
warn(m_parser->templateName(),m_line,"unexpected operator '%s' in expression",
Operator::toString(m_curToken.op));
+ abort();
}
break;
default:
@@ -2261,8 +2316,8 @@ class ExpressionParser
m_curToken.id = s;
p++;
}
- //TRACE(("token type=%d op=%d num=%d id=%s\n",
- // m_curToken.type,m_curToken.op,m_curToken.num,qPrint(m_curToken.id)));
+ TRACE(("token type=%d op=%d num=%d id=%s\n",
+ m_curToken.type,m_curToken.op,m_curToken.num,qPrint(m_curToken.id)));
m_tokenStream = p;
return TRUE;
@@ -2382,6 +2437,23 @@ void TemplateContextImpl::set(const QCString &name,const TemplateVariant &v)
ctx.insert(std::make_pair(name.str(),v));
}
+void TemplateContextImpl::update(const QCString &name,const TemplateVariant &v)
+{
+ int depth=0;
+ for (auto &ctx : m_contextStack)
+ {
+ auto it = ctx.find(name.str());
+ if (it!=ctx.end())
+ {
+ ctx.erase(it);
+ ctx.insert(std::make_pair(name.str(),v));
+ return;
+ }
+ depth++;
+ }
+ warn(m_templateName,m_line,"requesting update for non-existing variable '%s'",qPrint(name));
+}
+
TemplateVariant TemplateContextImpl::get(const QCString &name) const
{
int i=name.find('.');
@@ -3544,21 +3616,16 @@ class TemplateNodeInclude : public TemplateNodeCreator<TemplateNodeInclude>
static void stripLeadingWhiteSpace(QCString &s)
{
- const char *src = s.data();
- if (src)
+ uint i=0, dstIdx=0, l=s.length();
+ bool skipSpaces=true;
+ while (i<l)
{
- char *dst = s.rawData();
- char c;
- bool skipSpaces=TRUE;
- while ((c=*src++))
- {
- if (c=='\n') { *dst++=c; skipSpaces=TRUE; }
- else if (c==' ' && skipSpaces) {}
- else { *dst++=c; skipSpaces=FALSE; }
- }
- *dst='\0';
- s.resize( (int)(dst - src) + 1 );
+ char c = s[i++];
+ if (c=='\n') { s[dstIdx++]=c; skipSpaces=true; }
+ else if (c==' ' && skipSpaces) {}
+ else { s[dstIdx++] = c; skipSpaces=false; }
}
+ s.resize(dstIdx+1);
}
/** @brief Class representing an 'create' tag in a template */
@@ -3945,7 +4012,8 @@ class TemplateNodeWith : public TemplateNodeCreator<TemplateNodeWith>
{
TRACE(("{TemplateNodeWith(%s)\n",qPrint(data)));
ExpressionParser expParser(parser,line);
- QCString filteredData = removeSpacesAroundEquals(data);
+ QCString filteredData = data;
+ removeSpacesAroundEquals(filteredData);
std::vector<QCString> args = split(filteredData," ");
auto it = args.begin();
while (it!=args.end())
@@ -4114,6 +4182,52 @@ class TemplateNodeSet : public TemplateNodeCreator<TemplateNodeSet>
//----------------------------------------------------------
+/** @brief Class representing an 'update' tag in a template */
+class TemplateNodeUpdate : public TemplateNodeCreator<TemplateNodeUpdate>
+{
+ struct Mapping
+ {
+ Mapping(const QCString &n,ExprAst *e) : name(n), value(e) {}
+ ~Mapping() { }
+ QCString name;
+ ExprAst *value = 0;
+ };
+ public:
+ TemplateNodeUpdate(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
+ : TemplateNodeCreator<TemplateNodeUpdate>(parser,parent,line)
+ {
+ TRACE(("{TemplateNodeUpdate(%s)\n",qPrint(data)));
+ ExpressionParser expParser(parser,line);
+ // data format: name=expression
+ int j=data.find('=');
+ ExprAst *expr = 0;
+ if (j>0 && (expr = expParser.parse(data.mid(j+1))))
+ {
+ m_mapping = std::make_unique<Mapping>(data.left(j),expr);
+ }
+ TRACE(("}TemplateNodeUpdate(%s)\n",qPrint(data)));
+ }
+ ~TemplateNodeUpdate()
+ {
+ }
+ void render(TextStream &, TemplateContext *c)
+ {
+ TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
+ if (ci==0) return; // should not happen
+ ci->setLocation(m_templateName,m_line);
+ if (m_mapping)
+ {
+ TemplateVariant value = m_mapping->value->resolve(c);
+ ci->update(m_mapping->name,value);
+ }
+ }
+ private:
+ std::unique_ptr<Mapping> m_mapping;
+};
+
+
+//----------------------------------------------------------
+
/** @brief Class representing an 'spaceless' tag in a template */
class TemplateNodeSpaceless : public TemplateNodeCreator<TemplateNodeSpaceless>
{
@@ -4313,6 +4427,12 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
m_resExpr = ep.parse(data.left(i)); // part before as
m_asExpr = ep.parse(data.mid(i+4)); // part after as
}
+ else if ((i=data.find(" append "))!=-1) // resource a appends to b
+ {
+ m_resExpr = ep.parse(data.left(i)); // part before append
+ m_asExpr = ep.parse(data.mid(i+8)); // part after append
+ m_append = true;
+ }
else // resource a
{
m_resExpr = ep.parse(data);
@@ -4345,11 +4465,12 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
QCString targetFile = m_asExpr->resolve(c).toString();
mkpath(ci,targetFile.str());
if (targetFile.isEmpty())
- { ci->warn(m_templateName,m_line,"invalid parameter at right side of 'as' for resource command\n");
+ {
+ ci->warn(m_templateName,m_line,"invalid parameter at right side of '%s' for resource command\n", m_append ? "append" : "as");
}
else
{
- ResourceMgr::instance().copyResourceAs(resourceFile,outputDirectory,targetFile);
+ ResourceMgr::instance().copyResourceAs(resourceFile,outputDirectory,targetFile,m_append);
}
}
else
@@ -4362,6 +4483,7 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
private:
ExprAst *m_resExpr = 0;
ExprAst *m_asExpr = 0;
+ bool m_append = false;
};
//----------------------------------------------------------
@@ -4477,6 +4599,7 @@ static TemplateNodeFactory::AutoRegister<TemplateNodeRange> autoRefRange
static TemplateNodeFactory::AutoRegister<TemplateNodeExtend> autoRefExtend("extend");
static TemplateNodeFactory::AutoRegister<TemplateNodeCreate> autoRefCreate("create");
static TemplateNodeFactory::AutoRegister<TemplateNodeRepeat> autoRefRepeat("repeat");
+static TemplateNodeFactory::AutoRegister<TemplateNodeUpdate> autoRefUpdate("update");
static TemplateNodeFactory::AutoRegister<TemplateNodeInclude> autoRefInclude("include");
static TemplateNodeFactory::AutoRegister<TemplateNodeMarkers> autoRefMarkers("markers");
static TemplateNodeFactory::AutoRegister<TemplateNodeTabbing> autoRefTabbing("tabbing");
@@ -4797,7 +4920,7 @@ void TemplateLexer::addToken(TemplateTokenStream &tokens,
{
if (startPos<endPos)
{
- int len = endPos-startPos+1;
+ int len = endPos-startPos;
QCString text = data.mid(startPos,len);
if (type!=TemplateToken::Text) text = text.stripWhiteSpace();
tokens.push_back(std::make_unique<TemplateToken>(type,text,line));
@@ -4822,8 +4945,8 @@ void TemplateParser::parse(
while (hasNextToken())
{
auto tok = takeNextToken();
- //printf("%p:Token type=%d data='%s' line=%d\n",
- // parent,tok->type,qPrint(tok->data),tok->line);
+ TRACE(("%p:Token type=%d data='%s' line=%d\n",
+ (void*)parent,tok->type,qPrint(tok->data),tok->line));
switch(tok->type)
{
case TemplateToken::Text:
diff --git a/src/template.h b/src/template.h
index dee063d..18e8b06 100644
--- a/src/template.h
+++ b/src/template.h
@@ -28,7 +28,7 @@ class TextStream;
/** @defgroup template_api Template API
*
* This is the API for a
- * <a href="https://docs.djangoproject.com/en/1.6/topics/templates/">Django</a>
+ * <a href="https://www.djangoproject.com/">Django</a>
* compatible template system written in C++.
* It is somewhat inspired by Stephen Kelly's
* <a href="http://www.gitorious.org/grantlee/pages/Home">Grantlee</a>.
@@ -175,6 +175,9 @@ class TemplateVariant
/** Constructs a new variant with a string value \a s. */
TemplateVariant(const QCString &s,bool raw=FALSE) : m_type(String), m_strVal(s), m_strukt(0), m_raw(raw) {}
+ /** Constructs a new variant with a string value \a s. */
+ TemplateVariant(const std::string &s,bool raw=FALSE) : m_type(String), m_strVal(s), m_strukt(0), m_raw(raw) {}
+
/** Constructs a new variant with a struct value \a s.
* @note. The variant will hold a reference to the object.
*/
diff --git a/templates/html/dynsections_tooltips.js b/templates/html/dynsections_tooltips.js
new file mode 100644
index 0000000..ddc333a
--- /dev/null
+++ b/templates/html/dynsections_tooltips.js
@@ -0,0 +1,6 @@
+$(document).ready(function() {
+ $('.code,.codeRef').each(function() {
+ $(this).data('powertip',$('#a'+$(this).attr('href').replace(/.*\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());
+ $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true });
+ });
+});
diff --git a/templates/html/header.html b/templates/html/header.html
index c3bcc04..628b61e 100644
--- a/templates/html/header.html
+++ b/templates/html/header.html
@@ -22,9 +22,11 @@ $mathjax
$extrastylesheet
</head>
<body>
-<!--BEGIN FULL_SIDEBAR-->
+<!--BEGIN DISABLE_INDEX-->
+ <!--BEGIN FULL_SIDEBAR-->
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
-<!--END FULL_SIDEBAR-->
+ <!--END FULL_SIDEBAR-->
+<!--END DISABLE_INDEX-->
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
diff --git a/templates/html/htmlannotated.tpl b/templates/html/htmlannotated.tpl
index c5faa14..2e4d40d 100644
--- a/templates/html/htmlannotated.tpl
+++ b/templates/html/htmlannotated.tpl
@@ -4,7 +4,7 @@
<div class="textblock">
{{ tr.classListDescription }}
</div>
-{% indexentry nav name=tr.classes file=page.fileName anchor='' isReference=False %}
+{% indexentry nav name=tr.classList file=page.fileName anchor='' isReference=False %}
{% opensubindex nav %}
{% with tree=classTree %}
{% include 'htmldirtree.tpl' %}
diff --git a/templates/html/htmlbase.tpl b/templates/html/htmlbase.tpl
index f021ddd..11cb054 100644
--- a/templates/html/htmlbase.tpl
+++ b/templates/html/htmlbase.tpl
@@ -6,8 +6,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen {{ doxygen.version }}"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
-<title>{{ config.PROJECT_NAME }}: {{ page.title }}</title>
+<title>{% if config.PROJECT_NAME %}{{ config.PROJECT_NAME }}: {% endif %}{{ page.title }}</title>
<link href="{{ page.relPath }}tabs.css" rel="stylesheet" type="text/css"/>
+{% if config.DISABLE_INDEX and config.FULL_SIDEBAR %}
+<script type="text/javascript">var page_layout=1;</script>
+{% endif %}
<script type="text/javascript" src="{{ page.relPath }}jquery.js"></script>
<script type="text/javascript" src="{{ page.relPath }}dynsections.js"></script>
{% if config.GENERATE_TREEVIEW %}
@@ -15,22 +18,6 @@
<script type="text/javascript" src="{{ page.relPath }}resize.js"></script>
<script type="text/javascript" src="{{ page.relPath }}navtreedata.js"></script>
<script type="text/javascript" src="{{ page.relPath }}navtree.js"></script>
-<script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(document).ready(initResizable);
- /* @license-end */
-</script>
-{% endif %}
-{% if not config.DISABLE_INDEX %}
-<script type="text/javascript" src="menudata.js"></script>
-<script type="text/javascript" src="menu.js"></script>
-<script type="text/javascript">
-/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
-$(function() {
- initMenu('',{% if config.SEARCHENGINE %}true{% else %}false{% endif %},'{{ tr.search }}');
-});
-/* @license-end */
-</script>
{% endif %}
{% if config.SEARCHENGINE %}
<link href="{{ page.relPath }}search/search.css" rel="stylesheet" type="text/css"/>
@@ -40,18 +27,18 @@ $(function() {
<script type="text/javascript" src="{{ page.relPath }}search/search.js"></script>
{% if config.SERVER_BASED_SEARCH %}
<script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
+ /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() {
if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }
});
- /* @license-end */
+ /* @license-end */
</script>
<link rel="search" href="{{ page.relPath }}search-opensearch.php?v=opensearch.xml" type="application/opensearchdescription+xml" title="{{ config.PROJECT_NAME }}"/>
- {% else %}
+ {% elif config.DISABLE_INDEX or not config.HTML_DYNAMIC_MENUS %}
<script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
+ /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
- /* @license-end */
+ /* @license-end */
</script>
{% endif %}
{% endif %}
@@ -72,6 +59,9 @@ $(function() {
</head>
<body>
{% endblock %}
+{% if config.DISABLE_INDEX and config.FULL_SIDEBAR %}
+<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
+{% endif %}
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
{% block titlearea %}
{% if config.PROJECT_NAME or config.PROJECT_BRIEF or config.PROJECT_LOGO or config.DISABLE_INDEX and config.SEARCHENGINE %}
@@ -82,7 +72,7 @@ $(function() {
{% if config.PROJECT_LOGO %}
<td id="projectlogo"><img alt="Logo" src="{{ page.relPath }}{{ config.PROJECT_LOGO|stripPath }}"/></td>
{% endif %}
- <td style="padding-left: 0.5em;">
+ <td id="projectalign" style="padding-left: 0.5em;">
{% if config.PROJECT_NAME %}
<div id="projectname">{{ config.PROJECT_NAME }}
{% if config.PROJECT_NUMBER %}
@@ -95,7 +85,13 @@ $(function() {
{% endif %}
</td>
{% if config.DISABLE_INDEX and config.SEARCHENGINE %}{# search box is part of title area #}
+ {% if config.GENERATE_TREEVIEW and config.FULL_SIDEBAR %}{# search box separate row #}
+ </tr>
+ <tr>
+ <td colspan="2">
+ {% else %}
<td>
+ {% endif %}
{% if config.SERVER_BASED_SEARCH %}
<div id="MSearchBox" class="MSearchBoxInactive">
<div class="left">
@@ -139,27 +135,45 @@ $(function() {
{% block search %}
{% if config.SEARCHENGINE %}
<script type="text/javascript">
-/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
-var searchBox = new SearchBox("searchBox", "{{ page.relPath }}search",false,'{{ tr.search }}');
+/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
+ var searchBox = new SearchBox("searchBox", "{{ page.relPath }}search",false,'{{ tr.search }}','{{ config.HTML_FILE_EXTENSION }}');
/* @license-end */
</script>
{% endif %}
{% endblock %}
{% block tabs %}
-{% if not config.DISABLE_INDEX %}
+{% if config.HTML_DYNAMIC_MENUS %}
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
+$(function() {
+ initMenu('{{ page.relPath }}',{% if config.SEARCHENGINE %}true{% else %}false{% endif %},{% if config.SERVER_BASED_SEARCH %}true{% else %}false{% endif %},{% if config.EXTERNAL_SEARCH %}'search{{ config.HTML_FILE_EXTENSION }}'{% else %}'search.php'{% endif %},'{{ tr.search }}');
+ {% if config.SEARCHENGINE %}
+ $(document).ready(function() { {% if not config.SERVER_BASED_SEARCH %}init_search();{% else %}if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); } {% endif %}});
+ {% endif %}
+});
+/* @license-end */
+</script>
<div id="main-nav"></div>
{% endif %}
+
+{% if not config.DISABLE_INDEX and not config.HTML_DYNAMIC_MENUS %}
+{% include 'htmltabs.tpl' %}
+{% endif %}
+</div><!-- top -->
+
{% endblock %}
{% block navpath %}
{% endblock %}
-
-</div><!-- top -->
{% block splitbar %}
{% if config.GENERATE_TREEVIEW %}
+{% if not config.DISABLE_INDEX or not config.FULL_SIDEBAR %}
<div id="side-nav" class="ui-resizable side-nav-resizable">
+{% endif %}
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
@@ -170,8 +184,8 @@ var searchBox = new SearchBox("searchBox", "{{ page.relPath }}search",false,'{{
</div>
</div>
<script type="text/javascript">
-/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
-$(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix %}{{ page_postfix }}{% endif %}{{ config.HTML_FILE_EXTENSION }}','{{ page.relPath }}');});
+/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
+$(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix %}{{ page_postfix }}{% endif %}{{ config.HTML_FILE_EXTENSION }}','{{ page.relPath }}'); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
@@ -181,13 +195,15 @@ $(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix
{% block searchInfo %}
{% if config.SEARCHENGINE and not config.SERVER_BASED_SEARCH %}
<!-- window showing the filter options -->
-<div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()"
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
-<iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
</iframe>
</div>
{% endif %}
@@ -195,20 +211,22 @@ $(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix
<div class="header">
{% block title %}
- <div class="headertitle"><div class="title">{{ page.title }}</div></div>
+<div class="headertitle">
+<div class="title">{{ page.title }}</div></div>
{% endblock %}
-</div>
+</div><!-- header -->
{% block content %}
{% endblock %}
{% block endsplitbar %}
{% if config.GENERATE_TREEVIEW %}
-</div><!-- content -->
+</div><!-- doc-content -->
{% endif %}
{% endblock %}
{% block footer %}
+<!-- start footer part -->
{% if config.GENERATE_TREEVIEW %}
<div id="nav-path" class="navpath">{# id is needed for treeview function! #}
<ul>
@@ -233,14 +251,8 @@ $(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix
</div>
{% else %}
<hr class="footer"/><address class="footer"><small>
-{% if config.HTML_TIMESTAMP %}
-{{ tr.generatedAt:doxygen.date,config.PROJECT_NAME }}
-{% else %}
-{{ tr.generatedBy }}
-{% endif %}
-&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="{{ page.relPath }}doxygen.svg" width="104" height="31" alt="doxygen"/></a>
- {{ doxygen.version }}
- </small></address>
+{% if config.HTML_TIMESTAMP %}{{ tr.generatedAt:doxygen.date,config.PROJECT_NAME }}{% else %}{{ tr.generatedBy }}{% endif %}&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="{{ page.relPath }}doxygen.svg" width="104" height="31" alt="doxygen"/></a> {{ doxygen.version }}
+</small></address>
{% endif %}
</body>
</html>
diff --git a/templates/html/htmlclass.tpl b/templates/html/htmlclass.tpl
index 9a2b494..d5175af 100644
--- a/templates/html/htmlclass.tpl
+++ b/templates/html/htmlclass.tpl
@@ -429,7 +429,7 @@
{{ compound.generatedFromFiles }}
<ul>
{% for file in compound.usedFiles %}
- <li>{% if file.sourceFileName %}
+ <li>{% if file.sourceFileName and file.isLinkable %}
<a class="el" href="{{ file.sourceFileName }}{{ config.HTML_FILE_EXTENSION }}">
{% endif %}
{% if not file.sourceFileName and file.isLinkable %}
@@ -440,7 +440,7 @@
{% else %}
{{ file.name|stripPath }}
{% endif %}
- {% if file.sourceFileName or file.isLinkable %}
+ {% if file.isLinkable %}
</a>
{% endif %}
{% if file.versionInfo %} {{ file.versionInfo }}{% endif %}
@@ -448,6 +448,6 @@
{% endfor %}
</ul>
{% endif %}
-</div>
+</div><!-- contents -->
{% endblock %}
diff --git a/templates/html/htmlclasses.tpl b/templates/html/htmlclasses.tpl
index c00ce32..372d72d 100644
--- a/templates/html/htmlclasses.tpl
+++ b/templates/html/htmlclasses.tpl
@@ -1,9 +1,6 @@
{% extend 'htmlbase.tpl' %}
{% block content %}
<div class="contents">
-<div class="textblock">
-{% indexentry nav name=tr.classIndex file=page.fileName anchor='' isReference=False %}
-</div>
{% with index=classIndex.list|alphaIndex:'name' %}
{# quick index at top #}
<div class="qindex">
@@ -15,32 +12,20 @@
{% endfor %}
</div>
{# multi column index #}
- <div class="classindex" style="column-count:{{ config.COLS_IN_ALPHA_INDEX }};-moz-column-count:{{ config.COLS_IN_ALPHA_INDEX }};-webkit-column-count:{{ config.COLS_IN_ALPHA_INDEX}}">
+ <div class="classindex">
{% for section in index %}
- <ul>
+ <dl class="classindex {% cycle 'even' 'odd' %}">
{% for cls in section.items %}
- <li>
- <span class="ai">
- {% if forloop.first %}
- <a name="letter_{{ section.label }}"></a>
- <span class="ah">&#160;&#160;{{ section.letter }}&#160;&#160;</span><br/>
- {% endif %}
- {% with obj=cls text=cls.name %}
- {% include 'htmlobjlink.tpl' %}
- {% endwith %}
- </span>
- </li>
+ {% if forloop.first %}
+ <dt class="alphachar"><a id="letter_{{ section.label }}" name="letter_{{ section.label }}">{{ section.letter }}</a></dt>
+ {% endif %}
+ <dd>
+ {% with obj=cls text=cls.name %}
+ {% include 'htmlobjlink.tpl' %}
+ {% endwith %}
+ </dd>
{% endfor %}
- </ul>
- {% endfor %}
- </div><!-- classindex -->
- {# quick index at bottom #}
- <div class="qindex">
- {% for section in index %}
- <a class="qindex" href="#letter_{{ section.label }}">{{ section.letter }}</a>
- {% if not forloop.last %}
- &#160;|&#160;
- {% endif %}
+ </dl>
{% endfor %}
</div>
{% endwith %}
diff --git a/templates/html/htmljsmenudata.tpl b/templates/html/htmljsmenudata.tpl
index 3db8bd4..e795918 100644
--- a/templates/html/htmljsmenudata.tpl
+++ b/templates/html/htmljsmenudata.tpl
@@ -1,39 +1,40 @@
/*
- @licstart The following is the entire license notice for the
- JavaScript code in this file.
+ @licstart The following is the entire license notice for the JavaScript code in this file.
- Copyright (C) 1997-2017 by Dimitri van Heesch
+ The MIT License (MIT)
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ Copyright (C) 1997-2020 by Dimitri van Heesch
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
- @licend The above is the entire license notice
- for the JavaScript code in this file
- */
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend The above is the entire license notice for the JavaScript code in this file
+*/
var menudata={children:[
-{text:'{{ tr.mainPage }}',url:'index{{ config.HTML_FILE_EXTENSION }}'}
+{text:"{{ tr.mainPage }}",url:"index{{ config.HTML_FILE_EXTENSION }}"}
{% if pageTree.tree %}
-,{text:'{{ tr.pages }}',url:'pages{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.pages }}",url:"pages{{ config.HTML_FILE_EXTENSION }}"}
{% endif %}
{% if moduleTree.tree %}
-,{text:'{{ tr.modules }}',url:'modules{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.modules }}",url:"modules{{ config.HTML_FILE_EXTENSION }}"}
{% endif %}
{% if namespaceList %}
-,{text:'{{ tr.namespaces }}',url:'namespaces{{ config.HTML_FILE_EXTENSION }}',children:[
- {text:'{{ tr.namespaceList }}',url:'namespaces{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.namespaces }}",url:'namespaces{{ config.HTML_FILE_EXTENSION }}",children:[
+ {text:"{{ tr.namespaceList }}",url:'namespaces{{ config.HTML_FILE_EXTENSION }}"}
{% if namespaceMembersIndex.all %}
-,{text:'{{ tr.namespaceMembers }}',url:'namespacemembers{{ config.HTML_FILE_EXTENSION }}',children:[
+,{text:"{{ tr.namespaceMembers }}",url:'namespacemembers{{ config.HTML_FILE_EXTENSION }}",children:[
{% with page=namespaceMembersIndex %}
{% include 'htmljsmenumembersdata.tpl' %}
{% endwith %}
@@ -42,13 +43,14 @@ var menudata={children:[
]}
{% endif %}
{% if classList %}
-,{text:'{{ tr.classes }}',url:'annotated{{ config.HTML_FILE_EXTENSION }}',children:[
- {text:'{{ tr.classList }}',url:'annotated{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.classes }}",url:"annotated{{ config.HTML_FILE_EXTENSION }}",children:[
+ {text:"{{ tr.classList }}",url:"annotated{{ config.HTML_FILE_EXTENSION }}"}
+,{text:"{{ tr.classIndex }}",url:"classes{{ config.HTML_FILE_EXTENSION }}"}
{% if classHierarchy.tree %}
-,{text:'{{ tr.classHierarchy }}',url:'hierarchy{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.classHierarchy }}",url:"hierarchy{{ config.HTML_FILE_EXTENSION }}"}
{% endif %}
{% if classMembersIndex.all %}
-,{text:'{{ tr.classMembers }}',url:'functions{{ config.HTML_FILE_EXTENSION }}',children:[
+,{text:"{{ tr.classMembers }}",url:"functions{{ config.HTML_FILE_EXTENSION }}",children:[
{% with page=classMembersIndex %}
{% include 'htmljsmenumembersdata.tpl' %}
{% endwith %}
@@ -57,10 +59,10 @@ var menudata={children:[
]}
{% endif %}
{% if fileList %}
-,{text:'{{ tr.files }}',url:'files{{ config.HTML_FILE_EXTENSION }}',children[
- {text:'{{ tr.fileList }}',url:'files{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.files }}",url:"files{{ config.HTML_FILE_EXTENSION }}",children:[
+ {text:"{{ tr.fileList }}",url:"files{{ config.HTML_FILE_EXTENSION }}"}
{% if globalsIndex.all %}
-,{text:'{{ tr.fileMembers }}',url'globals{{ config.HTML_FILE_EXTENSION }}',children:[
+,{text:"{{ tr.fileMembers }}",url:"globals{{ config.HTML_FILE_EXTENSION }}",children:[
{% with page=globalsIndex %}
{% include 'htmljsmenumembersdata.tpl' %}
{% endwith %}
@@ -69,6 +71,6 @@ var menudata={children:[
]}
{% endif %}
{% if exampleTree.tree %}
-,{text:'{{ tr.examples }}',url:'examples{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.examples }}",url:"examples{{ config.HTML_FILE_EXTENSION }}"}
{% endif %}
]}
diff --git a/templates/html/htmljsmenuletterdata.tpl b/templates/html/htmljsmenuletterdata.tpl
index ded3402..e1c5679 100644
--- a/templates/html/htmljsmenuletterdata.tpl
+++ b/templates/html/htmljsmenuletterdata.tpl
@@ -1,10 +1,19 @@
{# inputs: page, list, section, text #}
-{text:'{{ text }}',url:'{{ page.fileName }}{{ section }}{{ config.HTML_FILE_EXTENSION }}'
-{% if list|length>maxItemsForMultiPageList %}
+{text:"{{ text }}",url:"{{ page.fileName }}{{ section }}{{ config.HTML_FILE_EXTENSION }}"
+{% if list|length>maxItemsForFlatList %}
,children:[
{% with index=list|alphaIndex:'name' %}
{% for sect in index %}
- {text:'{{ sect.letter }}',url:'{{ page.fileName }}{{ section }}_{{ sect.label }}{{ config.HTML_FILE_EXTENSION }}'}{% if not forloop.last %},{% endif %}
+ {% spaceless %}
+ {text:"{{ sect.letter }}",url:"
+ {% if list|length<=maxItemsForMultiPageList %}
+ {{ page.fileName }}{{ section }}{{ config.HTML_FILE_EXTENSION }}#index_{{ sect.label }}"
+ {% else %}
+ {{ page.fileName }}{{ section }}_{{ sect.label }}{{ config.HTML_FILE_EXTENSION }}"
+ {% endif %}
+ }
+ {% endspaceless %}
+ {% if not forloop.last %},{% endif %}
{% endfor %}
{% endwith %}
]
diff --git a/templates/html/htmljsnavtree.tpl b/templates/html/htmljsnavtree.tpl
index 947b980..3d11175 100644
--- a/templates/html/htmljsnavtree.tpl
+++ b/templates/html/htmljsnavtree.tpl
@@ -1,3 +1,27 @@
+/*
+ @licstart The following is the entire license notice for the JavaScript code in this file.
+
+ The MIT License (MIT)
+
+ Copyright (C) 1997-2020 by Dimitri van Heesch
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend The above is the entire license notice for the JavaScript code in this file
+*/
var NAVTREE =
[
{% recursetree index.nav %}
diff --git a/templates/html/htmljssearchdata.tpl b/templates/html/htmljssearchdata.tpl
index 802795e..5146bae 100644
--- a/templates/html/htmljssearchdata.tpl
+++ b/templates/html/htmljssearchdata.tpl
@@ -2,30 +2,21 @@
var indexSectionsWithContent =
{
{% set count=0 %}
-{% for idx in searchIndices %}
- {% if idx.symbolIndices %}
- {{ count }}:"{% for si in idx.symbolIndices %}{{ si.letter }}{% endfor %}"{%if not forloop.last %},{% endif %}
- {% set count=count+1 %}
- {% endif %}
-{% endfor %}
+{% for idx in searchIndices %}{% if idx.symbolIndices %}{% if count>0 %},
+{% endif %} {{ count }}:"{% for si in idx.symbolIndices %}{{ si.letter }}{% endfor %}"{% set count=count+1 %}{% endif %}{% endfor %}
};
+
var indexSectionNames =
{
{% set count=0 %}
-{% for idx in searchIndices %}
- {% if idx.symbolIndices %}
- {{ count }}:"{{ idx.name }}"{% if not forloop.last %},{% endif %}
- {% set count=count+1 %}
- {% endif %}
-{% endfor %}
+{% for idx in searchIndices %}{% if idx.symbolIndices %}{% if count>0 %},
+{% endif %} {{ count }}:"{{ idx.name }}"{% set count=count+1 %}{% endif %}{% endfor %}
};
+
var indexSectionLabels =
{
{% set count=0 %}
-{% for idx in searchIndices %}
- {% if idx.symbolIndices %}
- {{ count }}:"{{ idx.text }}"{% if not forloop.last %},{% endif %}
- {% set count=count+1 %}
- {% endif %}
-{% endfor %}
+{% for idx in searchIndices %}{% if idx.symbolIndices %}{% if count>0 %},
+{% endif %} {{ count }}:"{{ idx.text }}"{% set count=count+1 %}{% endif %}{% endfor %}
};
+
diff --git a/templates/html/htmljssearchindex.tpl b/templates/html/htmljssearchindex.tpl
index a16fa4f..b23e19e 100644
--- a/templates/html/htmljssearchindex.tpl
+++ b/templates/html/htmljssearchindex.tpl
@@ -1,15 +1,13 @@
{# input: si symbolIndex #}
var searchData =
[
-{% for group in si.symbolGroups %}['{{ group.id }}',['{{ group.name }}',
-{% for sym in group.symbols %}
-{% spaceless %}
-['{{ sym.relPath }}{{ sym.fileName }}{{ config.HTML_FILE_EXTENSION }}{% if sym.anchor %}#{{ sym.anchor }}{% endif %}',
+{% for group in si.symbolGroups %} ['{{ group.id }}_{{ symbolCount }}',['{{ group.name }}',{% spaceless %}{% for sym in group.symbols %}['{{ sym.relPath }}{{ sym.fileName }}{{ config.HTML_FILE_EXTENSION }}{% if sym.anchor %}#{{ sym.anchor }}{% endif %}',
{% if not config.EXT_LINKS_IN_WINDOW %}1{% else %}0{% endif %},
-'{{ sym.scope|nowrap }}']
-{% endspaceless %}
+'{{ sym.scope|nowrap|e }}']
{% if not forloop.last %},{% endif %}
{% endfor %}
+{% update symbolCount=symbolCount+1 %}
+{% endspaceless %}
]]{% if not forloop.last %},{% endif %}
{% endfor %}
];
diff --git a/templates/html/htmllayout.tpl b/templates/html/htmllayout.tpl
index b79f835..736a624 100644
--- a/templates/html/htmllayout.tpl
+++ b/templates/html/htmllayout.tpl
@@ -3,9 +3,16 @@
{# ---- copy fixed resources to the output ----- #}
{% resource 'doxygen.css' %}
-{% resource 'tabs.css' %}
+{% if config.HTML_DYNAMIC_MENUS %}
+ {% resource 'tabs.css' %}
+{% else %}
+ {% resource 'fixed_tabs.css' as 'tabs.css' %}
+{% endif %}
{% resource 'jquery.js' %}
-{% resource 'dynsections.js %}
+{% resource 'dynsections.js' %}
+{% if config.SOURCE_BROWSER and config.SOURCE_TOOLTIPS %}
+{% resource 'dynsections_tooltips.js' append 'dynsections.js' %}
+{% endif %}
{% resource 'tab_a.lum' %}
{% resource 'tab_b.lum' %}
{% resource 'tab_h.lum' %}
@@ -37,10 +44,19 @@
{% resource 'search_m.png' as 'search/search_m.png' %}
{% resource 'search_r.png' as 'search/search_r.png' %}
{% if config.DISABLE_INDEX %}
- {% resource 'search_noidx.css' as 'search/search.css' %}
+ {% if config.GENERATE_TREEVIEW and config.FULL_SIDEBAR %}
+ {% resource 'search_sidebar.css' as 'search/search.css' %}
+ {% else %}
+ {% resource 'search_nomenu.css' as 'search/search.css' %}
+ {% endif %}
{% else %}
- {% resource 'search.css' as 'search/search.css' %}
+ {% if not config.HTML_DYNAMIC_MENUS %}
+ {% resource 'search_fixedtabs.css' as 'search/search.css' %}
+ {% else %}
+ {% resource 'search.css' as 'search/search.css' %}
+ {% endif %}
{% endif %}
+{% resource 'search_common.css' append 'search/search.css' %}
{% if config.SERVER_BASED_SEARCH %}
{# server side search resources #}
@@ -56,7 +72,9 @@
{% endif %}
{# interactive SVGs #}
-{% resource 'svgpan.js' %}
+{% if config.INTERACTIVE_SVG %}
+ {% resource 'svgpan.js' %}
+{% endif %}
{# -------------------------------------------------- #}
@@ -68,7 +86,11 @@
{% set page_postfix='' %}
{# open the global navigation index #}
-{% indexentry nav name=tr.mainPage file='index' anchor='' isReference=False %}
+{% if config.PROJECT_NAME %}
+ {% indexentry nav name=config.PROJECT_NAME file='index' anchor='' isReference=False %}
+{% else %}
+ {% indexentry nav name=tr.mainPage file='index' anchor='' isReference=False %}
+{% endif %}
{% opensubindex nav %}
{# ----------- HTML DOCUMENTATION PAGES ------------ #}
@@ -180,7 +202,7 @@
{# --- classes --- #}
{% if classList %}
- {% indexentry nav name=tr.classes file='' anchor='' isReference=False %}
+ {% indexentry nav name=tr.classes file='annotated'|append:config.HTML_FILE_EXTENSION anchor='' isReference=False %}
{% opensubindex nav %}
{# write the annotated class list #}
@@ -256,6 +278,7 @@
{# write search data #}
{% if config.SEARCHENGINE and not config.SERVER_BASED_SEARCH %}
{% create 'search/searchdata.js' from 'htmljssearchdata.tpl' %}
+ {% set symbolCount=0 %}
{% for idx in searchIndices %}
{% for si in idx.symbolIndices %}
{% with baseName=si.name|append:'_'|append:forloop.counter0 %}
diff --git a/templates/html/htmlmemberindex.tpl b/templates/html/htmlmemberindex.tpl
index 216dd31..7de92b9 100644
--- a/templates/html/htmlmemberindex.tpl
+++ b/templates/html/htmlmemberindex.tpl
@@ -7,24 +7,23 @@
{% for section in index %}
{% if not singleList or letter=='' or section.letter==letter %}
{% if not singleList %}
- <a class="anchor" id="{{ section.label }}"></a><h3>- {{ section.letter }} -</h3>
+ <a class="anchor" id="index_{{ section.label }}"></a><h3>- {{ section.letter }} -</h3>
<ul>
{% endif %}
{% for nameList in section.items|groupBy:'name' %}
- {% spaceless %}
{% for item in nameList|listsort:'{{item.file.name}}' %}
{% if forloop.first %}
- <li>{{ item.name }}{% if (item.isFunction or item.isSignal or item.isSlot) and not item.isObjCMethod %}(){% endif %}&#160;:&#160;
+ <li>{{ item.name }}{% if (item.isFunction or item.isSignal or item.isSlot) and not item.isObjCMethod %}(){% endif %} :
{% endif %}
+ {% spaceless %}
{% with obj=item scope=item|get:scope text=scope.name %}
{% include 'htmlobjlink.tpl' %}
{% endwith %}
- {% if not forloop.last %},&#160;
- {% else %}
- </li>
+ {% endspaceless %}
+ {% if not forloop.last %},
+ {% else %}</li>
{% endif %}
{% endfor %}
- {% endspaceless %}
{% endfor %}
{% if not singleList %}
</ul>
diff --git a/templates/html/htmlmemdecl.tpl b/templates/html/htmlmemdecl.tpl
index c7894d8..4f859f7 100644
--- a/templates/html/htmlmemdecl.tpl
+++ b/templates/html/htmlmemdecl.tpl
@@ -64,7 +64,7 @@
{% spaceless %}
template&lt;
{% for targ in member.templateArgs %}
- {{ targ.type }} {{ targ.name }}{% if targ.defVal %} = {{ targ.defval }}{% endif %}{% if not forloop.last %}, {% endif %}
+ {{ targ.type }} {{ targ.name }}{% if targ.defVal %} = {{ targ.defVal }}{% endif %}{% if not forloop.last %}, {% endif %}
{% endfor %}
{% endspaceless %} &gt;
</td></tr><tr class="memitem:{{ member.anchor }}{% if inheritId %} inherit {{ inheritId }}{% endif %}"><td class="memTemplItemLeft" align="right" valign="top">
diff --git a/templates/html/htmlpage.tpl b/templates/html/htmlpage.tpl
index 7547ed5..449f601 100644
--- a/templates/html/htmlpage.tpl
+++ b/templates/html/htmlpage.tpl
@@ -50,7 +50,7 @@
</ul>
</li>
{% endif %}
-{% if exampleList.items %}
+{% if exampleList %}
<li><a href="{{ page.relPath }}examples{{ config.HTML_FILE_EXTENSION }}"><span>{{ tr.examples }}</span></a>
{% endif %}
</ul>
diff --git a/templates/html/htmlsearchresult.tpl b/templates/html/htmlsearchresult.tpl
index 139faf2..9174196 100644
--- a/templates/html/htmlsearchresult.tpl
+++ b/templates/html/htmlsearchresult.tpl
@@ -1,6 +1,7 @@
{# input: baseName #}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html><head><title></title>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen {{ doxygen.version }}"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
@@ -12,14 +13,14 @@
<div class="SRStatus" id="Loading">{{ tr.loading }}</div>
<div id="SRResults"></div>
<script type="text/javascript">
-/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
+/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
createResults();
/* @license-end */
</script>
<div class="SRStatus" id="Searching">{{ tr.searching }}</div>
<div class="SRStatus" id="NoMatches">{{ tr.noMatches }}</div>
<script type="text/javascript">
-/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
+/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");