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

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
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3358,6 +3358,14 @@ to be found in the default search path.
<![CDATA[
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.
]]>
      </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>
    </option>
+22 −8
Original line number Diff line number Diff line
@@ -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
  {
    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 (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());
    }
    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,