diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2010-12-24 16:12:24 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2010-12-24 16:12:24 (GMT) |
commit | fe6ff0cfd058b1b09bf389dd2c20be317183e094 (patch) | |
tree | 2e3f5d0757e53645fc902d0a87aa44dfd31d2d4d /src/definition.cpp | |
parent | 0014470c309dccbc2ac72c527391039900b8cf3d (diff) | |
download | Doxygen-fe6ff0cfd058b1b09bf389dd2c20be317183e094.zip Doxygen-fe6ff0cfd058b1b09bf389dd2c20be317183e094.tar.gz Doxygen-fe6ff0cfd058b1b09bf389dd2c20be317183e094.tar.bz2 |
Release-1.7.2-20101224
Diffstat (limited to 'src/definition.cpp')
-rw-r--r-- | src/definition.cpp | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/src/definition.cpp b/src/definition.cpp index e4cf2c8..5c62632 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -575,6 +575,7 @@ static bool readCodeFragment(const char *fileName, char cn=0; while (lineNr<=endLine && !feof(f) && !found) { + int pc=0; while ((c=fgetc(f))!='{' && c!=':' && c!=EOF) { //printf("parsing char `%c'\n",c); @@ -586,10 +587,24 @@ static bool readCodeFragment(const char *fileName, { col+=Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE")); } + else if (pc=='/' && c=='/') // skip single line comment + { + while ((c=fgetc(f))!='\n' && c!=EOF) pc=c; + if (c=='\n') lineNr++,col=0; + } + else if (pc=='/' && c=='*') // skip C style comment + { + while (((c=fgetc(f))!='/' || pc!='*') && c!=EOF) + { + if (c=='\n') lineNr++,col=0; + pc=c; + } + } else { col++; } + pc = c; } if (c==':') { @@ -1291,7 +1306,7 @@ void Definition::writePathFragment(OutputList &ol) const { m_impl->outerScope->writePathFragment(ol); } - ol.writeString(" <li>"); + ol.writeString(" <li class=\"navelem\">"); if (isLinkable()) { if (definitionType()==Definition::TypeGroup && ((const GroupDef*)this)->groupTitle()) @@ -1327,14 +1342,31 @@ void Definition::writePathFragment(OutputList &ol) const void Definition::writeNavigationPath(OutputList &ol) const { + static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); + static bool hasCustomFooter = !Config_getString("HTML_FOOTER").isEmpty(); + ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); - ol.writeString(" <div class=\"navpath\">\n"); + if (generateTreeView) + { + ol.writeString("</div>\n"); + } + + ol.writeString(" <div id=\"nav-path\" class=\"navpath\">\n"); ol.writeString(" <ul>\n"); writePathFragment(ol); - ol.writeString(" </ul>\n"); - ol.writeString(" </div>\n"); + if (!hasCustomFooter) + { + if (generateTreeView) // write the doxygen logo as part of the navigation bar + { + ol.writeString(" <li class=\"footer\">"); + ol.writeLogo(); + ol.writeString("</li>\n"); + } + ol.writeString(" </ul>\n"); + ol.writeString(" </div>\n"); + } ol.popGeneratorState(); } |