summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authorJeff Verkoeyen <jverkoey@gmail.com>2014-06-26 17:06:35 (GMT)
committerJeff Verkoeyen <jverkoey@gmail.com>2014-07-19 06:48:10 (GMT)
commit4074da5b83d37dd1c72c5df015fb2b41e7725a7e (patch)
tree88841f3632017f8ae5495b84ddc7e92c73887307 /src/util.cpp
parent6a60477b418e21dbadd3e62dc557a038e319581b (diff)
downloadDoxygen-4074da5b83d37dd1c72c5df015fb2b41e7725a7e.zip
Doxygen-4074da5b83d37dd1c72c5df015fb2b41e7725a7e.tar.gz
Doxygen-4074da5b83d37dd1c72c5df015fb2b41e7725a7e.tar.bz2
Add BREAD_CRUMB_TRAIL.
This feature enables recursive printing of the bread crumbs for any page, rather than just printing the parent group.
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 0113e62..2aafaba 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -6349,26 +6349,40 @@ void addRefItem(const QList<ListItemInfo> *sli,
}
}
-void addGroupListToTitle(OutputList &ol,Definition *d)
+bool recursivelyAddGroupListToTitle(OutputList &ol,Definition *d,bool root,bool shouldRecurse)
{
GroupList *groups = d->partOfGroups();
if (groups) // write list of group to which this definition belongs
{
- ol.pushGeneratorState();
- ol.disableAllBut(OutputGenerator::Html);
- ol.writeString("<div class=\"ingroups\">");
+ if (root) {
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+ ol.writeString("<div class=\"ingroups\">");
+ }
GroupListIterator gli(*groups);
GroupDef *gd;
- bool first=TRUE;
+ bool first=true;
for (gli.toFirst();(gd=gli.current());++gli)
{
- if (!first) { ol.writeString(" &#124; "); } else first=FALSE;
+ if (shouldRecurse && recursivelyAddGroupListToTitle(ol, gd, false, shouldRecurse)) {
+ ol.writeString(" > ");
+ }
+ if (!first) { ol.writeString(" &#124; "); } else first=FALSE;
ol.writeObjectLink(gd->getReference(),
gd->getOutputFileBase(),0,gd->groupTitle());
}
- ol.writeString("</div>");
- ol.popGeneratorState();
+ if (root) {
+ ol.writeString("</div>");
+ ol.popGeneratorState();
+ }
+ return true;
}
+ return false;
+}
+
+void addGroupListToTitle(OutputList &ol,Definition *d)
+{
+ recursivelyAddGroupListToTitle(ol,d,true,Config_getBool("BREAD_CRUMB_TRAIL"));
}
void filterLatexString(FTextStream &t,const char *str,