summaryrefslogtreecommitdiffstats
path: root/src/index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.cpp')
-rw-r--r--src/index.cpp56
1 files changed, 24 insertions, 32 deletions
diff --git a/src/index.cpp b/src/index.cpp
index 5d16e4e..b401a0a 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -48,6 +48,7 @@
#include "classlist.h"
#include "namespacedef.h"
#include "filename.h"
+#include "tooltip.h"
#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX 200
#define MAX_ITEMS_BEFORE_QUICK_INDEX 30
@@ -301,9 +302,11 @@ void endFile(OutputList &ol,bool skipNavIndex,bool skipEndContents,
ol.writeString("</div><!-- doc-content -->\n");
}
}
+
ol.writeFooter(navPath); // write the footer
ol.popGeneratorState();
ol.endFile();
+ TooltipManager::instance()->clearTooltips(); // Only clear after the last is written
}
void endFileWithNavPath(Definition *d,OutputList &ol)
@@ -487,7 +490,7 @@ static void writeClassTree(OutputList &ol,const BaseClassList *bcl,bool hideSupe
}
ol.startIndexListItem();
//printf("Passed...\n");
- bool hasChildren = !cd->visited && !hideSuper && classHasVisibleChildren(cd);
+ bool hasChildren = !cd->isVisited() && !hideSuper && classHasVisibleChildren(cd);
//printf("tree4: Has children %s: %d\n",cd->name().data(),hasChildren);
if (cd->isLinkable())
{
@@ -534,8 +537,8 @@ static void writeClassTree(OutputList &ol,const BaseClassList *bcl,bool hideSupe
if (hasChildren)
{
//printf("Class %s at %p visited=%d\n",cd->name().data(),cd,cd->visited);
- bool wasVisited=cd->visited;
- cd->visited=TRUE;
+ bool wasVisited=cd->isVisited();
+ cd->setVisited(TRUE);
if (cd->getLanguage()==SrcLangExt_VHDL)
{
writeClassTree(ol,cd->baseClasses(),wasVisited,level+1,ftv,addToIndex);
@@ -869,7 +872,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT
started=TRUE;
}
ol.startIndexListItem();
- bool hasChildren = !cd->visited && classHasVisibleChildren(cd);
+ bool hasChildren = !cd->isVisited() && classHasVisibleChildren(cd);
//printf("list: Has children %s: %d\n",cd->name().data(),hasChildren);
if (cd->isLinkable())
{
@@ -910,13 +913,13 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT
}
if (cd->getLanguage()==SrcLangExt_VHDL && hasChildren)
{
- writeClassTree(ol,cd->baseClasses(),cd->visited,1,ftv,addToIndex);
- cd->visited=TRUE;
+ writeClassTree(ol,cd->baseClasses(),cd->isVisited(),1,ftv,addToIndex);
+ cd->setVisited(TRUE);
}
else if (hasChildren)
{
- writeClassTree(ol,cd->subClasses(),cd->visited,1,ftv,addToIndex);
- cd->visited=TRUE;
+ writeClassTree(ol,cd->subClasses(),cd->isVisited(),1,ftv,addToIndex);
+ cd->setVisited(TRUE);
}
ol.endIndexListItem();
}
@@ -2219,6 +2222,7 @@ static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct
// the last column may contain less items then the others
//int colsInRow = (i<rows-1) ? columns : itemsInLastRow;
//printf("row [%d]\n",i);
+ bool cellCont = false;
for (j=0;j<columns;j++) // foreach table column
{
if (colIterators[j])
@@ -2230,6 +2234,7 @@ static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct
{
if (cell->letter()!=0)
{
+ cellCont = true;
QCString s = letterToLabel(cell->letter());
ol.writeString("<td rowspan=\"2\" valign=\"bottom\">");
ol.writeString("<a name=\"letter_");
@@ -2246,6 +2251,7 @@ static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct
}
else if (cell->classDef()!=(ClassDef*)0x8)
{
+ cellCont = true;
cd = cell->classDef();
ol.writeString("<td valign=\"top\">");
QCString namesp,cname;
@@ -2284,20 +2290,21 @@ static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct
}
ol.writeNonBreakableSpace(3);
}
- else
+ ++(*colIterators[j]);
+ if (cell->letter()!=0 || cell->classDef()!=(ClassDef*)0x8)
{
- ol.writeString("<td>");
+ ol.writeString("</td>\n");
}
- ++(*colIterators[j]);
- ol.writeString("</td>");
}
}
else
{
+ cellCont = true;
ol.writeString("<td></td>");
}
}
}
+ if (!cellCont) ol.writeString("<td></td>"); // we need at least one cell in case of xhtml
ol.writeString("</tr>\n");
}
ol.writeString("</table>\n");
@@ -3882,7 +3889,7 @@ static int countGroups()
{
if (!gd->isReference())
{
- gd->visited=FALSE;
+ //gd->visited=FALSE;
count++;
}
}
@@ -3900,7 +3907,6 @@ static int countDirs()
{
if (dd->isLinkableInProject())
{
- dd->visited=FALSE;
count++;
}
}
@@ -3940,8 +3946,9 @@ void writeGraphInfo(OutputList &ol)
legendDocs = legendDocs.left(s+8) + "[!-- SVG 0 --]\n" + legendDocs.mid(e);
//printf("legendDocs=%s\n",legendDocs.data());
}
- FileDef fd("","graph_legend");
- ol.generateDoc("graph_legend",1,&fd,0,legendDocs,FALSE,FALSE);
+ FileDef *fd = createFileDef("","graph_legend");
+ ol.generateDoc("graph_legend",1,fd,0,legendDocs,FALSE,FALSE);
+ delete fd;
// restore config settings
stripCommentsStateRef = oldStripCommentsState;
@@ -5275,22 +5282,7 @@ static void writeMenuData()
if (f.open(IO_WriteOnly))
{
FTextStream t(&f);
- t << "/*\n@ @licstart The following is the entire license notice for the\n"
- "JavaScript code in this file.\n\nCopyright (C) 1997-2017 by Dimitri van Heesch\n\n"
- "This program is free software; you can redistribute it and/or modify\n"
- "it under the terms of the GNU General Public License as published by\n"
- "the Free Software Foundation; either version 2 of the License, or\n"
- "(at your option) any later version.\n\n"
- "This program is distributed in the hope that it will be useful,\n"
- "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
- " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- " GNU General Public License for more details.\n\n"
- "You should have received a copy of the GNU General Public License along\n"
- "with this program; if not, write to the Free Software Foundation, Inc.,\n"
- "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n"
- "@licend The above is the entire license notice\n"
- "for the JavaScript code in this file\n"
- "*/\n";
+ t << JAVASCRIPT_LICENSE_TEXT;
t << "var menudata={";
bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
if (hasChildren) t << "]";