diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commentcnv.l | 34 | ||||
-rw-r--r-- | src/config.xml | 30 | ||||
-rw-r--r-- | src/configoptions.cpp | 21 | ||||
-rw-r--r-- | src/dot.cpp | 87 | ||||
-rw-r--r-- | src/dot.h | 20 | ||||
-rw-r--r-- | src/doxygen.cpp | 2 | ||||
-rw-r--r-- | src/doxygen.css | 31 | ||||
-rw-r--r-- | src/doxygen_css.h | 31 | ||||
-rw-r--r-- | src/fortranscanner.l | 82 | ||||
-rw-r--r-- | src/htmlgen.cpp | 153 | ||||
-rw-r--r-- | src/htmlgen.h | 6 | ||||
-rw-r--r-- | src/latexdocvisitor.cpp | 6 | ||||
-rw-r--r-- | src/latexgen.cpp | 14 | ||||
-rw-r--r-- | src/latexgen.h | 6 | ||||
-rw-r--r-- | src/layout.cpp | 6 | ||||
-rw-r--r-- | src/mangen.h | 6 | ||||
-rw-r--r-- | src/outputgen.cpp | 5 | ||||
-rw-r--r-- | src/qhp.cpp | 5 | ||||
-rw-r--r-- | src/rtfgen.cpp | 8 | ||||
-rw-r--r-- | src/rtfgen.h | 8 | ||||
-rw-r--r-- | src/scanner.l | 2 | ||||
-rw-r--r-- | src/search.js | 4 | ||||
-rw-r--r-- | src/search_js.h | 4 | ||||
-rw-r--r-- | src/svgpan.js | 100 | ||||
-rw-r--r-- | src/svgpan_js.h | 100 |
25 files changed, 491 insertions, 280 deletions
diff --git a/src/commentcnv.l b/src/commentcnv.l index 6884865..ac72394 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -64,6 +64,8 @@ static QCString g_blockName; static int g_lastCommentContext; static bool g_inSpecialComment; static bool g_inRoseComment; +static int g_stringContext; +static int g_charContext; static int g_javaBlock; static bool g_specialComment; @@ -310,10 +312,12 @@ void replaceComment(int offset); } <Scan>"\"" { /* start of a string */ copyToOutput(yytext,yyleng); + g_stringContext = YY_START; BEGIN(SkipString); } <Scan>' { copyToOutput(yytext,yyleng); + g_charContext = YY_START; BEGIN(SkipChar); } <Scan>\n { /* new line */ @@ -506,7 +510,7 @@ void replaceComment(int offset); } <SkipString>"\"" { /* end of string */ copyToOutput(yytext,yyleng); - BEGIN(Scan); + BEGIN(g_stringContext); } <SkipString>. { /* any other string character */ copyToOutput(yytext,yyleng); @@ -519,7 +523,7 @@ void replaceComment(int offset); } <SkipChar>' { /* end of character literal */ copyToOutput(yytext,yyleng); - BEGIN(Scan); + BEGIN(g_charContext); } <SkipChar>. { /* any other string character */ copyToOutput(yytext,yyleng); @@ -528,10 +532,10 @@ void replaceComment(int offset); copyToOutput(yytext,yyleng); } -<CComment>[^\\!@*\n{]* { /* anything that is not a '*' or command */ +<CComment>[^\\!@*\n{\"]* { /* anything that is not a '*' or command */ copyToOutput(yytext,yyleng); } -<CComment>"*"+[^*/\\@\n]* { /* stars without slashes */ +<CComment>"*"+[^*/\\@\n{\"]* { /* stars without slashes */ copyToOutput(yytext,yyleng); } <CComment>"\"\"\"" { /* end of Python docstring */ @@ -593,6 +597,16 @@ void replaceComment(int offset); BEGIN(Scan); } } +<CComment>"'" { + g_charContext = YY_START; + copyToOutput(yytext,yyleng); + BEGIN(SkipChar); + } +<CComment>"\"" { + g_stringContext = YY_START; + copyToOutput(yytext,yyleng); + BEGIN(SkipString); + } <CComment>. { copyToOutput(yytext,yyleng); } @@ -734,6 +748,18 @@ void replaceComment(int offset); } <ReadAliasArgs>^[ \t]*"//"[/!]/[^\n]+ { // skip leading special comments (see bug 618079) } +<ReadAliasArgs>"*/" { // oops, end of comment in the middle of an alias? + if (g_lang==SrcLangExt_Python) + { + REJECT; + } + else // abort the alias, restart scanning + { + copyToOutput(g_aliasString,g_aliasString.length()); + copyToOutput(yytext,yyleng); + BEGIN(Scan); + } + } <ReadAliasArgs>[^{}\n\\\*]+ { g_aliasString+=yytext; g_lastEscaped=FALSE; diff --git a/src/config.xml b/src/config.xml index 6893283..9f081c4 100644 --- a/src/config.xml +++ b/src/config.xml @@ -1405,23 +1405,21 @@ explicitly to a value larger than 0 to get control over the balance between CPU load and processing speed. ' defval='0' minval='0' maxval='32'/> <option type='string' id='DOT_FONTNAME' format='string' docs=' -By default doxygen will write a font called Helvetica to the output -directory and reference it in all dot files that doxygen generates. -When you want a differently looking font you can specify the font name -using DOT_FONTNAME. You need to make sure dot is able to find the font, -which can be done by putting it in a standard location or by setting the -DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -containing the font. +By default doxygen will use the Helvetica font for all dot files that +doxygen generates. When you want a differently looking font you can specify +the font name using DOT_FONTNAME. You need to make sure dot is able to find +the font, which can be done by putting it in a standard location or by setting +the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +directory containing the font. ' defval='Helvetica' depends='HAVE_DOT'/> <option type='int' id='DOT_FONTSIZE' docs=' The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. The default size is 10pt. ' minval='4' maxval='24' defval='10' depends='HAVE_DOT'/> <option type='string' id='DOT_FONTPATH' format='string' docs=' -By default doxygen will tell dot to use the output directory to look for the -FreeSans.ttf font (which doxygen will put there itself). If you specify a -different font using DOT_FONTNAME you can set the path where dot -can find it using this tag. +By default doxygen will tell dot to use the Helvetica font. +If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to +set the path where dot can find it. ' defval='' depends='HAVE_DOT'/> <option type='bool' id='CLASS_GRAPH' docs=' If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen @@ -1487,7 +1485,9 @@ relations between the files in the directories. <option type='enum' id='DOT_IMAGE_FORMAT' defval='png' docs=' The DOT_IMAGE_FORMAT tag can be used to set the image format of the images generated by dot. Possible values are svg, png, jpg, or gif. -If left blank png will be used. +If left blank png will be used. If you choose svg you need to set +HTML_FILE_EXTENSION to xhtml in order to make the SVG files +visible in IE 9+ (other browsers do not have this requirement). ' depends='HAVE_DOT'> <value name='png'/> <value name='jpg'/> @@ -1497,8 +1497,10 @@ If left blank png will be used. <option type='bool' id='INTERACTIVE_SVG' doc=' If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to enable generation of interactive SVG images that allow zooming and panning. -Note that this requires a modern browser. For Internet Explorer you will need -at least version 9. +Note that this requires a modern browser other than Internet Explorer. +Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you +need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files +visible. Older versions of IE do not have SVG support. ' defval='0' depends='HAVE_DOT'/> <option type='string' id='DOT_PATH' format='dir' docs=' The tag DOT_PATH can be used to specify the path where the dot tool can be diff --git a/src/configoptions.cpp b/src/configoptions.cpp index 2afa94a..2e45947 100644 --- a/src/configoptions.cpp +++ b/src/configoptions.cpp @@ -2123,13 +2123,11 @@ void addConfigOptions(Config *cfg) //---- cs = cfg->addString( "DOT_FONTNAME", - "By default doxygen will write a font called Helvetica to the output\n" - "directory and reference it in all dot files that doxygen generates.\n" - "When you want a differently looking font you can specify the font name\n" - "using DOT_FONTNAME. You need to make sure dot is able to find the font,\n" - "which can be done by putting it in a standard location or by setting the\n" - "DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory\n" - "containing the font." + "By default doxygen will use the Helvetica font for all dot files that doxygen generates. When you want a differently looking font you can specify\n" + "the font name using DOT_FONTNAME. You need to make sure dot is able to find\n" + "the font, which can be done by putting it in a standard location or by setting\n" + "the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the\n" + "directory containing the font." ); cs->setDefaultValue("Helvetica"); cs->addDependency("HAVE_DOT"); @@ -2144,10 +2142,8 @@ void addConfigOptions(Config *cfg) //---- cs = cfg->addString( "DOT_FONTPATH", - "By default doxygen will tell dot to use the output directory to look for the\n" - "FreeSans.ttf font (which doxygen will put there itself). If you specify a\n" - "different font using DOT_FONTNAME you can set the path where dot\n" - "can find it using this tag." + "By default doxygen will tell dot to use the Helvetica font.\n" + "If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to set the path where dot can find it." ); cs->addDependency("HAVE_DOT"); //---- @@ -2260,7 +2256,8 @@ void addConfigOptions(Config *cfg) "DOT_IMAGE_FORMAT", "The DOT_IMAGE_FORMAT tag can be used to set the image format of the images\n" "generated by dot. Possible values are svg, png, jpg, or gif.\n" - "If left blank png will be used.", + "If left blank png will be used. If you choose svg you need to set\n" + "HTML_FILE_EXTENSION to xhtml in order to make the SVG files visible in IE 9+ (other browsers do not have this requirement).", "png" ); ce->addValue("png"); diff --git a/src/dot.cpp b/src/dot.cpp index 1e17d15..2cd6c83 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -58,6 +58,7 @@ static const char svgZoomHeader[] = "<svg id=\"main\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" onload=\"init(evt)\">\n" " <defs>\n" " <circle id=\"rim\" cx=\"0\" cy=\"0\" r=\"7\"/>\n" +" <circle id=\"rim2\" cx=\"0\" cy=\"0\" r=\"3.5\"/>\n" " <g id=\"zoomPlus\">\n" " <use xlink:href=\"#rim\" fill=\"#404040\">\n" " <set attributeName=\"fill\" to=\"#808080\" begin=\"zoomplus.mouseover\" end=\"zoomplus.mouseout\"/>\n" @@ -71,11 +72,13 @@ static const char svgZoomHeader[] = " <path d=\"M-4,0h8\" fill=\"none\" stroke=\"white\" stroke-width=\"1.5\" pointer-events=\"none\"/>\n" " </g>\n" " <g id=\"dirArrow\">\n" -" <use xlink:href=\"#rim\" fill=\"#404040\">\n" -" <set attributeName=\"fill\" to=\"#808080\" begin=\"zoomminus.mouseover\" end=\"zoomminus.mouseout\"/>\n" -" </use>\n" " <path fill=\"none\" stroke=\"white\" stroke-width=\"1.5\" d=\"M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5\"/>\n" " </g>\n" +" <g id=\"resetDef\">\n" +" <use xlink:href=\"#rim2\" fill=\"#404040\">\n" +" <set attributeName=\"fill\" to=\"#808080\" begin=\"reset.mouseover\" end=\"reset.mouseout\"/>\n" +" </use>\n" +" </g>\n" " </defs>\n" "\n" "<script type=\"text/javascript\">\n" @@ -86,6 +89,7 @@ static const char svgZoomFooter[] = " <rect fill=\"#f2f5e9\" fill-opacity=\"0.5\" stroke=\"#606060\" stroke-width=\".5\" x=\"0\" y=\"0\" width=\"60\" height=\"60\"/>\n" " <use id=\"zoomplus\" xlink:href=\"#zoomPlus\" x=\"17\" y=\"9\" onmousedown=\"handleZoom(evt,'in')\"/>\n" " <use id=\"zoomminus\" xlink:href=\"#zoomMin\" x=\"42\" y=\"9\" onmousedown=\"handleZoom(evt,'out')\"/>\n" +" <use id=\"reset\" xlink:href=\"#resetDef\" x=\"30\" y=\"36\" onmousedown=\"handleReset()\"/>\n" " <g id=\"arrowUp\" xlink:href=\"#dirArrow\" transform=\"translate(30 24)\" onmousedown=\"handlePan(0,-1)\">\n" " <use xlink:href=\"#rim\" fill=\"#404040\">\n" " <set attributeName=\"fill\" to=\"#808080\" begin=\"arrowUp.mouseover\" end=\"arrowUp.mouseout\"/>\n" @@ -209,8 +213,14 @@ static int getDotFontSize() static void writeGraphHeader(FTextStream &t) { + static bool interactiveSVG = Config_getBool("INTERACTIVE_SVG"); t << "digraph G" << endl; t << "{" << endl; + if (interactiveSVG) // insert a comment to force regeneration when this + // option is toggled + { + t << " // INTERACTIVE_SVG=YES\n"; + } if (Config_getBool("DOT_TRANSPARENT")) { t << " bgcolor=\"transparent\";" << endl; @@ -566,21 +576,24 @@ static bool writeSVGFigureLink(FTextStream &out,const QCString &relPath, } if (width==-1 && height==-1) { -// out << "<object type=\"image/svg+xml\" data=\"" - out << "<div class=\"zoom\"><iframe src=\"" - << relPath << baseName << ".svg\" width=\"100%\" height=\"600\"" - << " frameborder=\"0\" scrolling=\"no\">"; + out << "<div class=\"zoom\">"; + //out << "<object type=\"image/svg+xml\" data=\"" + //out << "<embed type=\"image/svg+xml\" src=\"" + out << "<iframe scrolling=\"no\" frameborder=\"0\" src=\"" + << relPath << baseName << ".svg\" width=\"100%\" height=\"600\">"; } else { -// out << "<object type=\"image/svg+xml\" data=\"" - out << "<iframe src=\"" + //out << "<object type=\"image/svg+xml\" data=\"" + //out << "<embed type=\"image/svg+xml\" src=\"" + out << "<iframe scrolling=\"no\" frameborder=\"0\" src=\"" << relPath << baseName << ".svg\" width=\"" << ((width*96+48)/72) << "\" height=\"" - << ((height*96+48)/72) << "\" frameborder=\"0\" scrolling=\"no\">"; + << ((height*96+48)/72) << "\">"; } writeSVGNotSupported(out); -// out << "</object>"; + //out << "</object>"; + //out << "</embed>"; out << "</iframe>"; if (width==-1 && height==-1) { @@ -824,6 +837,7 @@ int DotFilePatcher::addMap(const QCString &mapFile,const QCString &relPath, map->context = context; map->label = label; map->zoomable = FALSE; + map->graphId = -1; m_maps.append(map); return id; } @@ -837,12 +851,14 @@ int DotFilePatcher::addFigure(const QCString &baseName, map->urlOnly = heightCheck; map->label = baseName; map->zoomable = FALSE; + map->graphId = -1; m_maps.append(map); return id; } int DotFilePatcher::addSVGConversion(const QCString &relPath,bool urlOnly, - const QCString &context,bool zoomable) + const QCString &context,bool zoomable, + int graphId) { int id = m_maps.count(); Map *map = new Map; @@ -850,6 +866,7 @@ int DotFilePatcher::addSVGConversion(const QCString &relPath,bool urlOnly, map->urlOnly = urlOnly; map->context = context; map->zoomable = zoomable; + map->graphId = graphId; m_maps.append(map); return id; } @@ -864,6 +881,7 @@ int DotFilePatcher::addSVGObject(const QCString &baseName, map->relPath = relPath; map->label = baseName; map->zoomable = FALSE; + map->graphId = -1; m_maps.append(map); return id; } @@ -873,10 +891,14 @@ bool DotFilePatcher::run() //printf("DotFilePatcher::run(): %s\n",m_patchFile.data()); static bool interactiveSVG = Config_getBool("INTERACTIVE_SVG"); bool isSVGFile = m_patchFile.right(4)==".svg"; + int graphId = -1; + QCString relPath; if (isSVGFile) { Map *map = m_maps.at(0); // there is only one 'map' for a SVG file interactiveSVG = interactiveSVG && map->zoomable; + graphId = map->graphId; + relPath = map->relPath; //printf("DotFilePatcher::addSVGConversion: file=%s zoomable=%d\n", // m_patchFile.data(),map->zoomable); } @@ -940,8 +962,12 @@ bool DotFilePatcher::run() t << svgZoomHeader; t << "var viewWidth = " << width << ";\n"; t << "var viewHeight = " << height << ";\n"; + if (graphId>=0) + { + t << "var sectionId = 'dynsection-" << graphId << "';\n"; + } t << "</script>\n"; - t << "<script xlink:href=\"svgpan.js\"/>\n"; + t << "<script xlink:href=\"" << relPath << "svgpan.js\"/>\n"; t << "<svg id=\"graph\" class=\"graph\">\n"; t << "<g id=\"viewport\">\n"; } @@ -1166,7 +1192,8 @@ int DotManager::addFigure(const QCString &file,const QCString &baseName, } int DotManager::addSVGConversion(const QCString &file,const QCString &relPath, - bool urlOnly,const QCString &context,bool zoomable) + bool urlOnly,const QCString &context,bool zoomable, + int graphId) { DotFilePatcher *map = m_dotMaps.find(file); if (map==0) @@ -1174,7 +1201,7 @@ int DotManager::addSVGConversion(const QCString &file,const QCString &relPath, map = new DotFilePatcher(file); m_dotMaps.append(file,map); } - return map->addSVGConversion(relPath,urlOnly,context,zoomable); + return map->addSVGConversion(relPath,urlOnly,context,zoomable,graphId); } int DotManager::addSVGObject(const QCString &file,const QCString &baseName, @@ -2048,7 +2075,7 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out, if (regenerate) { DotManager::instance()->addSVGConversion(absImgName,QCString(), - FALSE,QCString(),FALSE); + FALSE,QCString(),FALSE,0); } int mapId = DotManager::instance()->addSVGObject(fileName,baseName, absImgName,QCString()); @@ -2767,7 +2794,8 @@ QCString DotClassGraph::writeGraph(FTextStream &out, const char *fileName, const char *relPath, bool /*isTBRank*/, - bool generateImageMap) const + bool generateImageMap, + int graphId) const { QDir d(path); // store the original directory @@ -2858,7 +2886,7 @@ QCString DotClassGraph::writeGraph(FTextStream &out, { if (regenerate) { - DotManager::instance()->addSVGConversion(absImgName,relPath,FALSE,QCString(),TRUE); + DotManager::instance()->addSVGConversion(absImgName,relPath,FALSE,QCString(),TRUE,graphId); } int mapId = DotManager::instance()->addSVGObject(fileName,baseName,absImgName,relPath); out << "<!-- SVG " << mapId << " -->" << endl; @@ -3098,7 +3126,8 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out, const char *path, const char *fileName, const char *relPath, - bool generateImageMap + bool generateImageMap, + int graphId ) const { QDir d(path); @@ -3174,7 +3203,7 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out, { if (regenerate) { - DotManager::instance()->addSVGConversion(absImgName,relPath,FALSE,QCString(),TRUE); + DotManager::instance()->addSVGConversion(absImgName,relPath,FALSE,QCString(),TRUE,graphId); } int mapId = DotManager::instance()->addSVGObject(fileName,baseName,absImgName,relPath); out << "<!-- SVG " << mapId << " -->" << endl; @@ -3391,7 +3420,8 @@ DotCallGraph::~DotCallGraph() QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat format, const char *path,const char *fileName, - const char *relPath,bool generateImageMap) const + const char *relPath,bool generateImageMap,int + graphId) const { QDir d(path); // store the original directory @@ -3464,7 +3494,7 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat format, { if (regenerate) { - DotManager::instance()->addSVGConversion(absImgName,relPath,FALSE,QCString(),TRUE); + DotManager::instance()->addSVGConversion(absImgName,relPath,FALSE,QCString(),TRUE,graphId); } int mapId = DotManager::instance()->addSVGObject(fileName,baseName,absImgName,relPath); out << "<!-- SVG " << mapId << " -->" << endl; @@ -3527,7 +3557,8 @@ QCString DotDirDeps::writeGraph(FTextStream &out, const char *path, const char *fileName, const char *relPath, - bool generateImageMap) const + bool generateImageMap, + int graphId) const { QDir d(path); // store the original directory @@ -3608,7 +3639,7 @@ QCString DotDirDeps::writeGraph(FTextStream &out, { if (regenerate) { - DotManager::instance()->addSVGConversion(absImgName,relPath,FALSE,QCString(),TRUE); + DotManager::instance()->addSVGConversion(absImgName,relPath,FALSE,QCString(),TRUE,graphId); } int mapId = DotManager::instance()->addSVGObject(fileName,baseName,absImgName,relPath); out << "<!-- SVG " << mapId << " -->" << endl; @@ -3781,7 +3812,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, void writeDotImageMapFromFile(FTextStream &t, const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &baseName, - const QCString &context) + const QCString &context,int graphId) { QDir d(outDir); @@ -3807,7 +3838,7 @@ void writeDotImageMapFromFile(FTextStream &t, { writeSVGFigureLink(t,relPath,inFile,inFile+".svg"); DotFilePatcher patcher(inFile+".svg"); - patcher.addSVGConversion(relPath,TRUE,context,TRUE); + patcher.addSVGConversion(relPath,TRUE,context,TRUE,graphId); patcher.run(); } else // bitmap graphics @@ -4040,7 +4071,7 @@ void DotGroupCollaboration::addCollaborationMember( QCString DotGroupCollaboration::writeGraph( FTextStream &t, GraphOutputFormat format, const char *path, const char *fileName, const char *relPath, - bool writeImageMap) const + bool writeImageMap,int graphId) const { QDir d(path); // store the original directory @@ -4147,7 +4178,7 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t, GraphOutputFormat fo { if (regenerate) { - DotManager::instance()->addSVGConversion(absImgName,relPath,FALSE,QCString(),TRUE); + DotManager::instance()->addSVGConversion(absImgName,relPath,FALSE,QCString(),TRUE,graphId); } int mapId = DotManager::instance()->addSVGObject(fileName,baseName,absImgName,relPath); t << "<!-- SVG " << mapId << " -->" << endl; @@ -166,7 +166,7 @@ class DotClassGraph bool isTooBig() const; QCString writeGraph(FTextStream &t,GraphOutputFormat f,const char *path, const char *fileName, const char *relPath, - bool TBRank=TRUE,bool imageMap=TRUE) const; + bool TBRank=TRUE,bool imageMap=TRUE,int graphId=-1) const; void writeXML(FTextStream &t); void writeDEF(FTextStream &t); @@ -196,7 +196,7 @@ class DotInclDepGraph ~DotInclDepGraph(); QCString writeGraph(FTextStream &t, GraphOutputFormat f, const char *path,const char *fileName,const char *relPath, - bool writeImageMap=TRUE) const; + bool writeImageMap=TRUE,int graphId=-1) const; bool isTrivial() const; bool isTooBig() const; QCString diskName() const; @@ -223,7 +223,8 @@ class DotCallGraph ~DotCallGraph(); QCString writeGraph(FTextStream &t, GraphOutputFormat f, const char *path,const char *fileName, - const char *relPath,bool writeImageMap=TRUE) const; + const char *relPath,bool writeImageMap=TRUE, + int graphId=-1) const; void buildGraph(DotNode *n,MemberDef *md,int distance); bool isTrivial() const; bool isTooBig() const; @@ -253,7 +254,8 @@ class DotDirDeps const char *path, const char *fileName, const char *relPath, - bool writeImageMap=TRUE) const; + bool writeImageMap=TRUE, + int graphId=-1) const; private: DirDef *m_dir; }; @@ -299,7 +301,7 @@ class DotGroupCollaboration ~DotGroupCollaboration(); QCString writeGraph(FTextStream &t, GraphOutputFormat format, const char *path,const char *fileName,const char *relPath, - bool writeImageMap=TRUE) const; + bool writeImageMap=TRUE,int graphId=-1) const; void buildGraph(GroupDef* gd); bool isTrivial() const; private : @@ -368,13 +370,15 @@ class DotFilePatcher QCString context; QCString label; bool zoomable; + int graphId; }; DotFilePatcher(const char *patchFile); int addMap(const QCString &mapFile,const QCString &relPath, bool urlOnly,const QCString &context,const QCString &label); int addFigure(const QCString &baseName, const QCString &figureName,bool heightCheck); - int addSVGConversion(const QCString &relPath,bool urlOnly,const QCString &context,bool zoomable); + int addSVGConversion(const QCString &relPath,bool urlOnly, + const QCString &context,bool zoomable,int graphId); int addSVGObject(const QCString &baseName, const QCString &figureName, const QCString &relPath); bool run(); @@ -421,7 +425,7 @@ class DotManager int addFigure(const QCString &file,const QCString &baseName, const QCString &figureName,bool heightCheck); int addSVGConversion(const QCString &file,const QCString &relPath, - bool urlOnly,const QCString &context,bool zoomable); + bool urlOnly,const QCString &context,bool zoomable,int graphId); int addSVGObject(const QCString &file,const QCString &baseName, const QCString &figureNAme,const QCString &relPath); bool run(); @@ -445,7 +449,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, void writeDotImageMapFromFile(FTextStream &t, const QCString& inFile, const QCString& outDir, const QCString& relPath,const QCString& baseName, - const QCString& context); + const QCString& context,int graphId=-1); void writeDotDirDepGraph(FTextStream &t,DirDef *dd); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index e65871b..0924dd7 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -9261,6 +9261,8 @@ extern void commentScanTest(); void initDoxygen() { + const char *lang = portable_getenv("LC_ALL"); + if (lang) portable_setenv("LANG",lang); setlocale(LC_ALL,""); setlocale(LC_CTYPE,"C"); // to get isspace(0xA0)==0, needed for UTF-8 setlocale(LC_NUMERIC,"C"); diff --git a/src/doxygen.css b/src/doxygen.css index 51aa196..778b60c 100644 --- a/src/doxygen.css +++ b/src/doxygen.css @@ -181,7 +181,7 @@ div.groupText { } body { - background: white; + background-color: white; color: black; margin: 0; } @@ -846,3 +846,32 @@ div.zoom border: 1px solid ##A0; } +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } + pre.fragment + { + overflow: visible; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + } +} + diff --git a/src/doxygen_css.h b/src/doxygen_css.h index 9e44733..f4069f6 100644 --- a/src/doxygen_css.h +++ b/src/doxygen_css.h @@ -181,7 +181,7 @@ "}\n" "\n" "body {\n" -" background: white;\n" +" background-color: white;\n" " color: black;\n" " margin: 0;\n" "}\n" @@ -846,3 +846,32 @@ " border: 1px solid ##A0;\n" "}\n" "\n" +"@media print\n" +"{\n" +" #top { display: none; }\n" +" #side-nav { display: none; }\n" +" #nav-path { display: none; }\n" +" body { overflow:visible; }\n" +" h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }\n" +" .summary { display: none; }\n" +" .memitem { page-break-inside: avoid; }\n" +" #doc-content\n" +" {\n" +" margin-left:0 !important;\n" +" height:auto !important;\n" +" width:auto !important;\n" +" overflow:inherit;\n" +" display:inline;\n" +" }\n" +" pre.fragment\n" +" {\n" +" overflow: visible;\n" +" text-wrap: unrestricted;\n" +" white-space: -moz-pre-wrap; /* Moz */\n" +" white-space: -pre-wrap; /* Opera 4-6 */\n" +" white-space: -o-pre-wrap; /* Opera 7 */\n" +" white-space: pre-wrap; /* CSS3 */\n" +" word-wrap: break-word; /* IE 5.5+ */\n" +" }\n" +"}\n" +"\n" diff --git a/src/fortranscanner.l b/src/fortranscanner.l index c189bbc..bc0ffc4 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -748,25 +748,72 @@ private { addCurrentEntry(); } else if (!argType.isEmpty()) - { // deklaration of parameter list: add type for corr. parameter + { // declaration of parameter list: add type for corr. parameter parameter = getParameter(argName); - if (parameter) { + if (parameter) + { v_type= V_PARAMETER; - if (!argType.isNull()) - parameter->type=argType.stripWhiteSpace(); - if (!docBlock.isNull()) { - parameter->docs += "\n"; - parameter->docs += docBlock; - } + if (!argType.isNull()) parameter->type=argType.stripWhiteSpace(); + if (!docBlock.isNull()) + { + parameter->docs += "\n"; + parameter->docs += docBlock; + } } // save, it may be function return type - modifiers[current_root][name.lower()].type = argType; + if (parameter) + { + modifiers[current_root][name.lower()].type = argType; + } + else + { + if ((current_root->name.lower() == argName.lower()) || + (modifiers[current_root->parent()][current_root->name.lower()].returnName == argName.lower())) + { + int strt = current_root->type.find("function"); + QString lft; + QString rght; + if (strt != -1) + { + lft = ""; + rght = ""; + if (strt != 0) lft = current_root->type.left(strt).stripWhiteSpace(); + if ((current_root->type.length() - strt - strlen("function"))!= 0) + { + rght = current_root->type.right(current_root->type.length() - strt - strlen("function")).stripWhiteSpace(); + } + current_root->type = lft; + if (rght.length() > 0) + { + if (current_root->type.length() > 0) current_root->type += " "; + current_root->type += rght; + } + if (argType.stripWhiteSpace().length() > 0) + { + if (current_root->type.length() > 0) current_root->type += " "; + current_root->type += argType.stripWhiteSpace(); + } + if (current_root->type.length() > 0) current_root->type += " "; + current_root->type += "function"; + } + else + { + current_root->type += " " + argType.stripWhiteSpace(); + } + current_root->type = current_root->type.stripWhiteSpace(); + modifiers[current_root][name.lower()].type = current_root->type; + } + else + { + modifiers[current_root][name.lower()].type = argType; + } + } // any accumulated doc for argument should be emptied, // because it is handled other way and this doc can be // unexpectedly passed to the next member. current->doc.resize(0); current->brief.resize(0); - } + } } <Variable>{ARGS} { /* dimension of the previous entry. */ QCString name(argName); @@ -784,12 +831,12 @@ private { BEGIN(Initialization); } <Variable>"\n" { currentModifiers = SymbolModifiers(); - yy_pop_state(); // end variable deklaration list + yy_pop_state(); // end variable declaration list newLine(); docBlock.resize(0); } <Variable>";".*"\n" { currentModifiers = SymbolModifiers(); - yy_pop_state(); // end variable deklaration list + yy_pop_state(); // end variable declaration list docBlock.resize(0); inputStringSemi =(const char*)(yytext+1); pushBuffer(inputStringSemi); @@ -856,12 +903,15 @@ private { <SubprogPrefix>{BS}{SUBPROG}{BS_} { // Fortran subroutine or function found - addSubprogram(yytext); + result=yytext; + result=result.stripWhiteSpace(); + addSubprogram(result); BEGIN(Subprog); } <Start,ModuleBody,SubprogBody,InterfaceBody,ModuleBodyContains,SubprogBodyContains>^{BS}({PREFIX}{BS_})?{SUBPROG}{BS_} { // Fortran subroutine or function found + v_type = V_IGNORE; if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC) { addInterface("$interface$", ifType); @@ -1820,7 +1870,8 @@ static void addSubprogram(const char *text) //fprintf(stderr,"1=========> got subprog, type: %s\n",text); current->section = Entry::FUNCTION_SEC ; QCString subtype = text; subtype=subtype.lower().stripWhiteSpace(); - if (!current->type) current->type = subtype; + current->type += " " + subtype; + current->type = current->type.stripWhiteSpace(); current->fileName = yyFileName; current->bodyLine = yyLineNr; // used for source reference current->startLine = -1; // ??? what is startLine for? @@ -2062,8 +2113,7 @@ void FortranLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf, bool FortranLanguageScanner::needsPreprocessing(const QCString &extension) { - return !(extension==".f"||extension==".f90"|| - extension==".f95"||extension==".f03"); + return extension!=extension.lower(); // use preprocessor only for upper case extensions } void FortranLanguageScanner::resetCodeParserState() { diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index d62fffa..c976825 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1109,6 +1109,58 @@ void HtmlGenerator::init() t << svgpan_script; } } + + if (Config_getBool("HTML_DYNAMIC_SECTIONS")) + { + QFile f(dname+"/dynsections.js"); + if (f.open(IO_WriteOnly)) + { + FTextStream t(&f); + t << + "var showTriggers = new Array();\n" + "\n" + "function registerShow(sectId,showFunc) {\n" + " showTriggers[sectId] = showFunc;\n" + "}\n" + "\n" + "function hasClass(ele,cls) {\n" + " return ele.className.match(new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)'));\n" + "}\n" + "\n" + "function addClass(ele,cls) {\n" + " if (!this.hasClass(ele,cls)) ele.className += \" \"+cls;\n" + "}\n" + "\n" + "function removeClass(ele,cls) {\n" + " if (hasClass(ele,cls)) {\n" + " var reg = new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)');\n" + " ele.className=ele.className.replace(reg,' ');\n" + " }\n" + "}\n" + "\n" + "function toggleVisibility(linkObj) {\n" + " var base = linkObj.getAttribute('id');\n" + " var summary = document.getElementById(base + '-summary');\n" + " var content = document.getElementById(base + '-content');\n" + " var trigger = document.getElementById(base + '-trigger');\n" + " if ( hasClass(linkObj,'closed') ) {\n" + " summary.style.display = 'none';\n" + " content.style.display = 'block';\n" + " trigger.src = trigger.src.substring(0,trigger.src.length-10)+'open.png';\n" + " removeClass(linkObj,'closed');\n" + " addClass(linkObj,'opened');\n" + " if (showTriggers[base]) { showTriggers[base](); }\n" + " } else if ( hasClass(linkObj,'opened') ) {\n" + " summary.style.display = 'block';\n" + " content.style.display = 'none';\n" + " trigger.src = trigger.src.substring(0,trigger.src.length-8)+'closed.png';\n" + " removeClass(linkObj,'opened');\n" + " addClass(linkObj,'closed');\n" + " }\n" + " return false;\n" + "}\n"; + } + } } /// Additional initialization after indices have been created @@ -1352,87 +1404,8 @@ static void generateDynamicSections(FTextStream &t,const QCString &relPath) { if (Config_getBool("HTML_DYNAMIC_SECTIONS")) { - t << -#if 0 - "<script type=\"text/javascript\">\n" - "<!--\n" - "function changeDisplayState (e){\n" - " var num=this.id.replace(/[^[0-9]/g,'');\n" - " var button=this.firstChild;\n" - " var sectionDiv=document.getElementById('dynsection'+num);\n" - " if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){\n" - " sectionDiv.style.display='block';\n" - " button.src='" << relPath << "open.png';\n" - " }else{\n" - " sectionDiv.style.display='none';\n" - " button.src='" << relPath << "closed.png';\n" - " }\n" - "}\n" - "function initDynSections(){\n" - " var divs=document.getElementsByTagName('div');\n" - " var sectionCounter=1;\n" - " for(var i=0;i<divs.length-1;i++){\n" - " if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){\n" - " var header=divs[i];\n" - " var section=divs[i+1];\n" - " var button=header.firstChild;\n" - " if (button!='IMG'){\n" - " divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);\n" - " button=document.createElement('img');\n" - " divs[i].insertBefore(button,divs[i].firstChild);\n" - " }\n" - " header.style.cursor='pointer';\n" - " header.onclick=changeDisplayState;\n" - " header.id='dynheader'+sectionCounter;\n" - " button.src='" << relPath << "closed.png';\n" - " section.id='dynsection'+sectionCounter;\n" - " section.style.display='none';\n" - " section.style.marginLeft='14px';\n" - " sectionCounter++;\n" - " }\n" - " }\n" - "}\n" - "window.onload = initDynSections;\n" - "-->\n" - "</script>\n"; -#endif - "<script type=\"text/javascript\">\n" - "function hasClass(ele,cls) {\n" - " return ele.className.match(new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)'));\n" - "}\n" - "\n" - "function addClass(ele,cls) {\n" - " if (!this.hasClass(ele,cls)) ele.className += \" \"+cls;\n" - "}\n" - "\n" - "function removeClass(ele,cls) {\n" - " if (hasClass(ele,cls)) {\n" - " var reg = new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)');\n" - " ele.className=ele.className.replace(reg,' ');\n" - " }\n" - "}\n" - "\n" - "function toggleVisibility(linkObj) {\n" - " var base = linkObj.getAttribute('id');\n" - " var summary = document.getElementById(base + '-summary');\n" - " var content = document.getElementById(base + '-content');\n" - " var trigger = document.getElementById(base + '-trigger');\n" - " if ( hasClass(linkObj,'closed') ) {\n" - " summary.style.display = 'none';\n" - " content.style.display = 'block';\n" - " trigger.src = '" << relPath << "open.png';\n" - " removeClass(linkObj,'closed');\n" - " addClass(linkObj,'opened');\n" - " } else if ( hasClass(linkObj,'opened') ) {\n" - " summary.style.display = 'block';\n" - " content.style.display = 'none';\n" - " trigger.src = '" << relPath << "closed.png';\n" - " removeClass(linkObj,'opened');\n" - " addClass(linkObj,'closed');\n" - " }\n" - " return false;\n" - "}\n" - "</script>\n"; + t << "<script type=\"text/javascript\" src=\"" << relPath + << "dynsections.js\"></script>\n"; } } @@ -1478,10 +1451,10 @@ void HtmlGenerator::startFile(const char *name,const char *, static bool searchEngine = Config_getBool("SEARCHENGINE"); if (searchEngine /*&& !generateTreeView*/) { - t << "<script type=\"text/javascript\"><!--\n"; + t << "<script type=\"text/javascript\">\n"; t << "var searchBox = new SearchBox(\"searchBox\", \"" << relPath<< "search\",false,'" << theTranslator->trSearch() << "');\n"; - t << "--></script>\n"; + t << "</script>\n"; } generateDynamicSections(t,relPath); m_sectionCount=0; @@ -2408,7 +2381,7 @@ void HtmlGenerator::endDotGraph(const DotClassGraph &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,BITMAP,dir,fileName,relPath); + g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,TRUE,m_sectionCount); if (Config_getBool("GENERATE_LEGEND")) { t << "<center><span class=\"legend\">["; @@ -2434,7 +2407,7 @@ void HtmlGenerator::endInclDepGraph(const DotInclDepGraph &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,BITMAP,dir,fileName,relPath); + g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,m_sectionCount); endSectionContent(t); m_sectionCount++; @@ -2452,7 +2425,7 @@ void HtmlGenerator::endGroupCollaboration(const DotGroupCollaboration &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,BITMAP,dir,fileName,relPath); + g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,m_sectionCount); endSectionContent(t); m_sectionCount++; @@ -2470,7 +2443,7 @@ void HtmlGenerator::endCallGraph(const DotCallGraph &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,BITMAP,dir,fileName,relPath); + g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,m_sectionCount); endSectionContent(t); m_sectionCount++; @@ -2488,7 +2461,7 @@ void HtmlGenerator::endDirDepGraph(const DotDirDeps &g) endSectionSummary(t); startSectionContent(t,m_sectionCount); - g.writeGraph(t,BITMAP,dir,fileName,relPath); + g.writeGraph(t,BITMAP,dir,fileName,relPath,TRUE,m_sectionCount); endSectionContent(t); m_sectionCount++; @@ -2971,10 +2944,10 @@ void HtmlGenerator::writeSearchPage() static bool searchEngine = Config_getBool("SEARCHENGINE"); if (searchEngine /* && !generateTreeView*/) { - t << "<script type=\"text/javascript\"><!--\n"; + t << "<script type=\"text/javascript\">\n"; t << "var searchBox = new SearchBox(\"searchBox\", \"" << "search\",false,'" << theTranslator->trSearch() << "');\n"; - t << "--></script>\n"; + t << "</script>\n"; } t << "<div id=\"top\">" << endl; writeTitleArea(t,"",projectName,projectBrief,projectNumber,projectLogo); diff --git a/src/htmlgen.h b/src/htmlgen.h index f2fc39c..df63555 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -46,9 +46,9 @@ class HtmlGenerator : public OutputGenerator void enable() { if (genStack->top()) active=*genStack->top(); else active=TRUE; } void disable() { active=FALSE; } - void enableIf(OutputType o) { if (o==Html) active=TRUE; } - void disableIf(OutputType o) { if (o==Html) active=FALSE; } - void disableIfNot(OutputType o) { if (o!=Html) active=FALSE; } + void enableIf(OutputType o) { if (o==Html) enable(); } + void disableIf(OutputType o) { if (o==Html) disable(); } + void disableIfNot(OutputType o) { if (o!=Html) disable(); } bool isEnabled(OutputType o) { return (o==Html && active); } OutputGenerator *get(OutputType o) { return (o==Html) ? this : 0; } diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 7885d82..28455d9 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -1304,7 +1304,9 @@ void LatexDocVisitor::visitPost(DocParamList *pl) void LatexDocVisitor::visitPre(DocXRefItem *x) { if (m_hide) return; - m_t << "\\begin{Desc}" << endl; + m_t << "\\begin{DoxyRefDesc}{"; + filter(x->title()); + m_t << "}" << endl; bool anonymousEnum = x->file()=="@"; m_t << "\\item["; if (Config_getBool("PDF_HYPERLINKS") && !anonymousEnum) @@ -1324,7 +1326,7 @@ void LatexDocVisitor::visitPre(DocXRefItem *x) void LatexDocVisitor::visitPost(DocXRefItem *) { if (m_hide) return; - m_t << "\\end{Desc}" << endl; + m_t << "\\end{DoxyRefDesc}" << endl; } void LatexDocVisitor::visitPre(DocInternalRef *ref) diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 000fc1f..9491983 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -325,7 +325,6 @@ static void writeDefaultStyleSheetPart1(FTextStream &t) "\\RequirePackage{longtable}\n" "\\RequirePackage{verbatim}\n" "\\RequirePackage{ifthen}\n" - "\\RequirePackage{settobox}\n" "\\RequirePackage[table]{xcolor}\n\n"; t << "% Use helvetica font instead of times roman\n" @@ -773,25 +772,30 @@ static void writeDefaultStyleSheetPart3(FTextStream &t) t << "\\newlength{\\xreflength}\n"; t << "\\newcommand{\\xreflabel}[1]{%\n"; t << " \\sbox{\\xrefbox}{#1}%\n"; - t << " \\settoboxwidth{\\xreflength}{\\xrefbox}%\n"; + t << " \\setlength{\\xreflength}{\\wd\\xrefbox}%\n"; t << " \\ifthenelse{\\xreflength>\\labelwidth}{%\n"; t << " \\begin{minipage}{\\textwidth}%\n"; t << " \\setlength{\\parindent}{0pt}%\n"; - t << " \\hangindent=25pt\\bfseries #1\\vspace{\\itemsep}%\n"; + t << " \\hangindent=15pt\\bfseries #1\\vspace{1.2\\itemsep}%\n"; t << " \\end{minipage}%\n"; t << " }{%\n"; t << " \\parbox[b]{\\labelwidth}{\\makebox[0pt][l]{\\textbf{#1}}}%\n"; t << " }}%\n"; t << "\\newenvironment{DoxyRefList}{%\n"; t << " \\begin{list}{}{%\n"; - t << " \\setlength{\\labelwidth}{75pt}%\n"; + t << " \\setlength{\\labelwidth}{10pt}%\n"; t << " \\setlength{\\leftmargin}{\\labelwidth}%\n"; t << " \\addtolength{\\leftmargin}{\\labelsep}%\n"; t << " \\renewcommand{\\makelabel}{\\xreflabel}%\n"; t << " }%\n"; t << " }%\n"; t << "{\\end{list}}\n"; - + t << "\\newenvironment{DoxyRefDesc}[1]\n"; + t << "{\\begin{list}{}{%\n"; + t << " \\renewcommand\\makelabel[1]{\\textbf{##1}}\n"; + t << " \\settowidth\\labelwidth{\\makelabel{#1}}\n"; + t << " \\setlength\\leftmargin{\\labelwidth+\\labelsep}}}\n"; + t << "{\\end{list}}\n"; t << "\\newenvironment{Indent}\n"; t << " {\\begin{list}{}{\\setlength{\\leftmargin}{0.5cm}}\n"; t << " \\item[]\\ignorespaces}\n"; diff --git a/src/latexgen.h b/src/latexgen.h index 0d7c2ef..6b4dec6 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -38,9 +38,9 @@ class LatexGenerator : public OutputGenerator void enable() { if (genStack->top()) active=*genStack->top(); else active=TRUE; } void disable() { active=FALSE; } - void enableIf(OutputType o) { if (o==Latex) active=TRUE; } - void disableIf(OutputType o) { if (o==Latex) active=FALSE; } - void disableIfNot(OutputType o) { if (o!=Latex) active=FALSE; } + void enableIf(OutputType o) { if (o==Latex) enable(); } + void disableIf(OutputType o) { if (o==Latex) disable(); } + void disableIfNot(OutputType o) { if (o!=Latex) disable(); } bool isEnabled(OutputType o) { return (o==Latex && active); } OutputGenerator *get(OutputType o) { return (o==Latex) ? this : 0; } diff --git a/src/layout.cpp b/src/layout.cpp index 46b90a7..6adff4a 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -511,10 +511,12 @@ class LayoutParser : public QXmlDefaultHandler MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation())); m_sHandler.insert("file/memberdef/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docEnumMembers,theTranslator->trEnumerationTypeDocumentation())); + MemberList::docEnumMembers, + theTranslator->trEnumerationTypeDocumentation())); m_sHandler.insert("file/memberdef/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberList::docFuncMembers,theTranslator->trFunctionDocumentation())); + MemberList::docFuncMembers, + fortranOpt ? theTranslator->trSubprogramDocumentation() : theTranslator->trFunctionDocumentation())); m_sHandler.insert("file/memberdef/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberList::docVarMembers,theTranslator->trVariableDocumentation())); diff --git a/src/mangen.h b/src/mangen.h index c635fc5..c80d849 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -34,9 +34,9 @@ class ManGenerator : public OutputGenerator void enable() { if (genStack->top()) active=*genStack->top(); else active=TRUE; } void disable() { active=FALSE; } - void enableIf(OutputType o) { if (o==Man) active=TRUE; } - void disableIf(OutputType o) { if (o==Man) active=FALSE; } - void disableIfNot(OutputType o) { if (o!=Man) active=FALSE; } + void enableIf(OutputType o) { if (o==Man) enable(); } + void disableIf(OutputType o) { if (o==Man) disable(); } + void disableIfNot(OutputType o) { if (o!=Man) disable(); } bool isEnabled(OutputType o) { return (o==Man && active); } OutputGenerator *get(OutputType o) { return (o==Man) ? this : 0; } diff --git a/src/outputgen.cpp b/src/outputgen.cpp index 71b10ed..fbe6b3e 100644 --- a/src/outputgen.cpp +++ b/src/outputgen.cpp @@ -58,6 +58,7 @@ void OutputGenerator::startPlainFile(const char *name) void OutputGenerator::endPlainFile() { + t.unsetDevice(); delete file; file=0; fileName.resize(0); @@ -66,12 +67,12 @@ void OutputGenerator::endPlainFile() void OutputGenerator::pushGeneratorState() { genStack->push(new bool(isEnabled())); - //printf("%p:pushGeneratorState(%d)\n",this,genStack->count()); + //printf("%p:pushGeneratorState(%d) enabled=%d\n",this,genStack->count(),isEnabled()); } void OutputGenerator::popGeneratorState() { - //printf("%p:popGeneratorState(%d)\n",this,genStack->count()); + //printf("%p:popGeneratorState(%d) enabled=%d\n",this,genStack->count(),isEnabled()); bool *lb = genStack->pop(); ASSERT(lb!=0); if (lb==0) return; // for some robustness against superfluous \endhtmlonly commands. diff --git a/src/qhp.cpp b/src/qhp.cpp index 6a9e28e..07230d9 100644 --- a/src/qhp.cpp +++ b/src/qhp.cpp @@ -33,6 +33,7 @@ static QCString makeFileName(const char * withoutExtension) static QCString makeRef(const char * withoutExtension, const char * anchor) { + //printf("QHP::makeRef(%s,%s)\n",withoutExtension,anchor); if (!withoutExtension) return QCString(); QCString result = makeFileName(withoutExtension); if (!anchor) return result; @@ -191,6 +192,10 @@ void Qhp::addIndexItem(Definition *context,MemberDef *md, const char *word) { (void)word; + //printf("addIndexItem(%s %s %s\n", + // context?context->name().data():"<none>", + // md?md->name().data():"<none>", + // word); if (md) // member { diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 0cebf87..da60111 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -2652,13 +2652,19 @@ void RTFGenerator::endParamList() void RTFGenerator::startParameterType(bool first,const char *key) { - DBG_RTF(t << "{\\comment (startParameterList)}" << endl) + DBG_RTF(t << "{\\comment (startParameterType)}" << endl) if (!first && key) { t << " " << key << " "; } } +void RTFGenerator::endParameterType() +{ + DBG_RTF(t << "{\\comment (endParameterType)}" << endl) + t << " "; +} + void RTFGenerator::printDoc(DocNode *n,const char *langExt) { RTFDocVisitor *visitor = new RTFDocVisitor(t,*this,langExt); diff --git a/src/rtfgen.h b/src/rtfgen.h index 20931fa..d85f921 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -34,9 +34,9 @@ class RTFGenerator : public OutputGenerator void enable() { if (genStack->top()) active=*genStack->top(); else active=TRUE; } void disable() { active=FALSE; } - void enableIf(OutputType o) { if (o==RTF) active=TRUE; } - void disableIf(OutputType o) { if (o==RTF) active=FALSE; } - void disableIfNot(OutputType o) { if (o!=RTF) active=FALSE; } + void enableIf(OutputType o) { if (o==RTF) enable(); } + void disableIf(OutputType o) { if (o==RTF) disable(); } + void disableIfNot(OutputType o) { if (o!=RTF) disable(); } bool isEnabled(OutputType o) { return (o==RTF && active); } OutputGenerator *get(OutputType o) { return (o==RTF) ? this : 0; } @@ -219,7 +219,7 @@ class RTFGenerator : public OutputGenerator void startMemberDocName(bool) {} void endMemberDocName() {} void startParameterType(bool,const char *); - void endParameterType() {} + void endParameterType(); void startParameterName(bool) {} void endParameterName(bool,bool,bool) {} void startParameterList(bool) {} diff --git a/src/scanner.l b/src/scanner.l index 7ebc0d8..78a9eaf 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -5064,7 +5064,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) new BaseInfo(baseName,baseProt,baseVirt) ); } - if ((current->spec & Entry::Interface) || + if ((current->spec & (Entry::Interface|Entry::Struct)) || insideJava || insidePHP || insideCS || insideD || insideObjC) { diff --git a/src/search.js b/src/search.js index 010fd4b..8c429a2 100644 --- a/src/search.js +++ b/src/search.js @@ -240,7 +240,7 @@ function SearchBox(name, resultsPath, inFrame, label) var node = child.firstChild; if (j==id) { - node.innerHTML='•'; + node.innerHTML='•'; } else { @@ -337,7 +337,7 @@ function SearchBox(name, resultsPath, inFrame, label) hasResultsPage = false; } - window.frames.MSearchResults.location.href = resultsPageWithSearch; + window.frames.MSearchResults.location = resultsPageWithSearch; var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); if (domPopupSearchResultsWindow.style.display!='block') diff --git a/src/search_js.h b/src/search_js.h index d8ef087..934f338 100644 --- a/src/search_js.h +++ b/src/search_js.h @@ -240,7 +240,7 @@ " var node = child.firstChild;\n" " if (j==id)\n" " {\n" -" node.innerHTML='•';\n" +" node.innerHTML='•';\n" " }\n" " else\n" " {\n" @@ -337,7 +337,7 @@ " hasResultsPage = false;\n" " }\n" "\n" -" window.frames.MSearchResults.location.href = resultsPageWithSearch; \n" +" window.frames.MSearchResults.location = resultsPageWithSearch; \n" " var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();\n" "\n" " if (domPopupSearchResultsWindow.style.display!='block')\n" diff --git a/src/svgpan.js b/src/svgpan.js index 2f75255..da381fd 100644 --- a/src/svgpan.js +++ b/src/svgpan.js @@ -1,5 +1,6 @@ /** * The code below is based on SVGPan Library 1.2 and was modified for doxygen + * to support both zooming and panning via the mouse and via embedded bottons. * * This code is licensed under the following BSD license: * @@ -46,11 +47,10 @@ var maxZoom; if (!window) window=this; /** - * Register handlers + * Show the graph in the middle of the view, scaled to fit */ -function init(evt) +function show() { - svgDoc = evt.target.ownerDocument; if (window.innerHeight) // Firefox { windowWidth = window.innerWidth; @@ -61,21 +61,39 @@ function init(evt) windowWidth = document.documentElement.clientWidth windowHeight = document.documentElement.clientHeight } - else + if (!windowWidth || !windowHeight) // failsafe { windowWidth = 800; windowHeight = 600; } - minZoom = windowHeight/viewHeight; - maxZoom = 1.5; + minZoom = Math.min(windowHeight/viewHeight,windowWidth/viewWidth); + maxZoom = minZoom+1.5; zoomInFactor = Math.pow(maxZoom/minZoom,1.0/zoomSteps); zoomOutFactor = 1.0/zoomInFactor; var g = svgDoc.getElementById('viewport'); - var bb = g.getBBox(); - var a = 'scale('+minZoom+') rotate(0) translate('+((innerWidth-viewWidth*minZoom)/(2*minZoom))+' '+viewHeight+')'; + try + { + var bb = g.getBBox(); // this can throw an exception if css { display: none } + var tx = (windowWidth-viewWidth*minZoom+8)/(2*minZoom); + var ty = viewHeight+(windowHeight-viewHeight*minZoom)/(2*minZoom); + var a = 'scale('+minZoom+') rotate(0) translate('+tx+' '+ty+')'; + g.setAttribute('transform',a); + } + catch(e) {} +} - g.setAttribute('transform',a); +/** + * Register handlers + */ +function init(evt) +{ + svgDoc = evt.target.ownerDocument; + if (top.window && top.window.registerShow) // register show function in html doc for dynamic sections + { + top.window.registerShow(sectionId,show); + } + show(); setAttributes(root, { "onmousedown" : "handleMouseDown(evt)", @@ -85,36 +103,22 @@ function init(evt) if (window.addEventListener) { - if (navigator.userAgent.toLowerCase().indexOf('webkit') >= 0 || navigator.userAgent.toLowerCase().indexOf("opera") >= 0) - window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari + if (navigator.userAgent.toLowerCase().indexOf('webkit') >= 0 || + navigator.userAgent.toLowerCase().indexOf("opera") >= 0 || + navigator.appVersion.indexOf("MSIE") != -1) + { + window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari/IE9 + } else + { window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others + } } } window.onresize=function() { - if (svgDoc) - { - var newWindowWidth; - if (window.innerWidth) // Firefox - { - newWindowWidth = window.innerWidth; - } - else if (document.documentElement.clientWidth) // Chrome/Safari - { - newWindowWidth = document.documentElement.clientWidth - } - if (newWindowWidth) - { - var g = svgDoc.getElementById("viewport"); - var n = g.getCTM(); - n = n.translate((newWindowWidth-windowWidth)/(2*minZoom),0); - setCTM(g, n); - stateTf = stateTf.multiply(n.inverse()); - windowWidth = newWindowWidth; - } - } + if (svgDoc) { show(); } } /** @@ -178,9 +182,14 @@ function handleMouseWheel(evt) { delta = evt.wheelDelta / 720; // Opera } + else if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || + navigator.appVersion.indexOf("MSIE") != -1) + { + delta = evt.wheelDelta / 7200; // Chrome/IE9 + } else { - delta = evt.wheelDelta / 7200; // Chrome/Safari/Opera + delta = evt.wheelDelta / 72000; // Safari } } else @@ -243,6 +252,18 @@ function handleMouseUp(evt) state = ''; } +/** + * Dumps a matrix to a string (useful for debug). + */ +function dumpMatrix(matrix) +{ + var s = "[ " + matrix.a + ", " + matrix.c + ", " + matrix.e + "\n " + matrix.b + ", " + matrix.d + ", " + matrix.f + "\n 0, 0, 1 ]"; + return s; +} + +/** + * Handler for pan buttons + */ function handlePan(x,y) { var g = svgDoc.getElementById("viewport"); @@ -250,22 +271,25 @@ function handlePan(x,y) } /** - * Dumps a matrix to a string (useful for debug). + * Handle reset button */ -function dumpMatrix(matrix) +function handleReset() { - var s = "[ " + matrix.a + ", " + matrix.c + ", " + matrix.e + "\n " + matrix.b + ", " + matrix.d + ", " + matrix.f + "\n 0, 0, 1 ]"; - return s; + show(); } +/** + * Handler for zoom buttons + */ function handleZoom(evt,direction) { var g = svgDoc.getElementById("viewport"); var factor = direction=='in' ? zoomInFactor : zoomOutFactor; var m = g.getCTM(); var p = root.createSVGPoint(); - p.x = windowWidth/2; + p.x = windowWidth/2; p.y = windowHeight/2; doZoom(g,p,factor); } + diff --git a/src/svgpan_js.h b/src/svgpan_js.h index 0714d6d..ddc3eac 100644 --- a/src/svgpan_js.h +++ b/src/svgpan_js.h @@ -1,5 +1,6 @@ "/**\n" " * The code below is based on SVGPan Library 1.2 and was modified for doxygen\n" +" * to support both zooming and panning via the mouse and via embedded bottons.\n" " *\n" " * This code is licensed under the following BSD license:\n" " *\n" @@ -46,11 +47,10 @@ "if (!window) window=this;\n" "\n" "/**\n" -" * Register handlers\n" +" * Show the graph in the middle of the view, scaled to fit \n" " */\n" -"function init(evt) \n" +"function show()\n" "{\n" -" svgDoc = evt.target.ownerDocument;\n" " if (window.innerHeight) // Firefox\n" " {\n" " windowWidth = window.innerWidth;\n" @@ -61,21 +61,39 @@ " windowWidth = document.documentElement.clientWidth\n" " windowHeight = document.documentElement.clientHeight\n" " }\n" -" else\n" +" if (!windowWidth || !windowHeight) // failsafe\n" " {\n" " windowWidth = 800;\n" " windowHeight = 600;\n" " }\n" -" minZoom = windowHeight/viewHeight;\n" -" maxZoom = 1.5;\n" +" minZoom = Math.min(windowHeight/viewHeight,windowWidth/viewWidth);\n" +" maxZoom = minZoom+1.5;\n" " zoomInFactor = Math.pow(maxZoom/minZoom,1.0/zoomSteps);\n" " zoomOutFactor = 1.0/zoomInFactor;\n" "\n" " var g = svgDoc.getElementById('viewport');\n" -" var bb = g.getBBox();\n" -" var a = 'scale('+minZoom+') rotate(0) translate('+((innerWidth-viewWidth*minZoom)/(2*minZoom))+' '+viewHeight+')';\n" +" try\n" +" {\n" +" var bb = g.getBBox(); // this can throw an exception if css { display: none }\n" +" var tx = (windowWidth-viewWidth*minZoom+8)/(2*minZoom);\n" +" var ty = viewHeight+(windowHeight-viewHeight*minZoom)/(2*minZoom);\n" +" var a = 'scale('+minZoom+') rotate(0) translate('+tx+' '+ty+')';\n" +" g.setAttribute('transform',a);\n" +" }\n" +" catch(e) {}\n" +"}\n" "\n" -" g.setAttribute('transform',a);\n" +"/**\n" +" * Register handlers\n" +" */\n" +"function init(evt) \n" +"{\n" +" svgDoc = evt.target.ownerDocument;\n" +" if (top.window && top.window.registerShow) // register show function in html doc for dynamic sections\n" +" {\n" +" top.window.registerShow(sectionId,show);\n" +" }\n" +" show();\n" "\n" " setAttributes(root, {\n" " \"onmousedown\" : \"handleMouseDown(evt)\",\n" @@ -85,36 +103,22 @@ "\n" " if (window.addEventListener)\n" " {\n" -" if (navigator.userAgent.toLowerCase().indexOf('webkit') >= 0 || navigator.userAgent.toLowerCase().indexOf(\"opera\") >= 0)\n" -" window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari\n" +" if (navigator.userAgent.toLowerCase().indexOf('webkit') >= 0 || \n" +" navigator.userAgent.toLowerCase().indexOf(\"opera\") >= 0 || \n" +" navigator.appVersion.indexOf(\"MSIE\") != -1)\n" +" {\n" +" window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari/IE9\n" +" }\n" " else\n" +" {\n" " window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others\n" +" }\n" " }\n" "}\n" "\n" "window.onresize=function()\n" "{\n" -" if (svgDoc)\n" -" {\n" -" var newWindowWidth;\n" -" if (window.innerWidth) // Firefox\n" -" {\n" -" newWindowWidth = window.innerWidth;\n" -" }\n" -" else if (document.documentElement.clientWidth) // Chrome/Safari\n" -" {\n" -" newWindowWidth = document.documentElement.clientWidth\n" -" }\n" -" if (newWindowWidth)\n" -" {\n" -" var g = svgDoc.getElementById(\"viewport\");\n" -" var n = g.getCTM();\n" -" n = n.translate((newWindowWidth-windowWidth)/(2*minZoom),0);\n" -" setCTM(g, n);\n" -" stateTf = stateTf.multiply(n.inverse());\n" -" windowWidth = newWindowWidth;\n" -" }\n" -" }\n" +" if (svgDoc) { show(); }\n" "}\n" "\n" "/**\n" @@ -178,9 +182,14 @@ " {\n" " delta = evt.wheelDelta / 720; // Opera\n" " }\n" +" else if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 ||\n" +" navigator.appVersion.indexOf(\"MSIE\") != -1)\n" +" {\n" +" delta = evt.wheelDelta / 7200; // Chrome/IE9\n" +" }\n" " else\n" " {\n" -" delta = evt.wheelDelta / 7200; // Chrome/Safari/Opera\n" +" delta = evt.wheelDelta / 72000; // Safari\n" " }\n" " }\n" " else\n" @@ -243,6 +252,18 @@ " state = '';\n" "}\n" "\n" +"/**\n" +" * Dumps a matrix to a string (useful for debug).\n" +" */\n" +"function dumpMatrix(matrix) \n" +"{\n" +" var s = \"[ \" + matrix.a + \", \" + matrix.c + \", \" + matrix.e + \"\\n \" + matrix.b + \", \" + matrix.d + \", \" + matrix.f + \"\\n 0, 0, 1 ]\";\n" +" return s;\n" +"}\n" +"\n" +"/**\n" +" * Handler for pan buttons\n" +" */\n" "function handlePan(x,y)\n" "{\n" " var g = svgDoc.getElementById(\"viewport\");\n" @@ -250,22 +271,25 @@ "}\n" "\n" "/**\n" -" * Dumps a matrix to a string (useful for debug).\n" +" * Handle reset button\n" " */\n" -"function dumpMatrix(matrix) \n" +"function handleReset()\n" "{\n" -" var s = \"[ \" + matrix.a + \", \" + matrix.c + \", \" + matrix.e + \"\\n \" + matrix.b + \", \" + matrix.d + \", \" + matrix.f + \"\\n 0, 0, 1 ]\";\n" -" return s;\n" +" show();\n" "}\n" "\n" +"/**\n" +" * Handler for zoom buttons\n" +" */\n" "function handleZoom(evt,direction)\n" "{\n" " var g = svgDoc.getElementById(\"viewport\");\n" " var factor = direction=='in' ? zoomInFactor : zoomOutFactor;\n" " var m = g.getCTM();\n" " var p = root.createSVGPoint();\n" -" p.x = windowWidth/2; \n" +" p.x = windowWidth/2;\n" " p.y = windowHeight/2;\n" " doZoom(g,p,factor);\n" "}\n" "\n" +"\n" |