Commit 4074da5b authored by Jeff Verkoeyen's avatar Jeff Verkoeyen

Add BREAD_CRUMB_TRAIL.

This feature enables recursive printing of the bread crumbs for any
page, rather than just printing the parent group.
parent 6a60477b
...@@ -3358,6 +3358,14 @@ to be found in the default search path. ...@@ -3358,6 +3358,14 @@ to be found in the default search path.
<![CDATA[ <![CDATA[
If the \c DOT_CLEANUP tag is set to \c YES doxygen will If the \c DOT_CLEANUP tag is set to \c YES doxygen will
remove the intermediate dot files that are used to generate the various graphs. remove the intermediate dot files that are used to generate the various graphs.
]]>
</docs>
</option>
<option type='bool' id='BREAD_CRUMB_TRAIL' defval='0'>
<docs>
<![CDATA[
If the \c BREAD_CRUMB_TRAIL tag is set to \c YES then the complete bread crumb
trail for a page will be displayed rather than just the root group.
]]> ]]>
</docs> </docs>
</option> </option>
......
...@@ -6349,26 +6349,40 @@ void addRefItem(const QList<ListItemInfo> *sli, ...@@ -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(); GroupList *groups = d->partOfGroups();
if (groups) // write list of group to which this definition belongs if (groups) // write list of group to which this definition belongs
{ {
if (root) {
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.writeString("<div class=\"ingroups\">"); ol.writeString("<div class=\"ingroups\">");
}
GroupListIterator gli(*groups); GroupListIterator gli(*groups);
GroupDef *gd; GroupDef *gd;
bool first=TRUE; bool first=true;
for (gli.toFirst();(gd=gli.current());++gli) for (gli.toFirst();(gd=gli.current());++gli)
{ {
if (shouldRecurse && recursivelyAddGroupListToTitle(ol, gd, false, shouldRecurse)) {
ol.writeString(" > ");
}
if (!first) { ol.writeString(" &#124; "); } else first=FALSE; if (!first) { ol.writeString(" &#124; "); } else first=FALSE;
ol.writeObjectLink(gd->getReference(), ol.writeObjectLink(gd->getReference(),
gd->getOutputFileBase(),0,gd->groupTitle()); gd->getOutputFileBase(),0,gd->groupTitle());
} }
if (root) {
ol.writeString("</div>"); ol.writeString("</div>");
ol.popGeneratorState(); 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, void filterLatexString(FTextStream &t,const char *str,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment