From a1995ea7b217edfe0a6ddf3d60ea7bde1e23c1d7 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 26 Nov 2000 14:55:14 +0000 Subject: Release-1.2.3-20001126 --- INSTALL | 4 +- README | 4 +- VERSION | 2 +- addon/configgen/configgen.cpp | 29 +- doc/index.doc | 73 +--- packages/rpm/doxygen.spec | 2 +- src/classdef.cpp | 62 +-- src/config.h | 3 +- src/config.l | 23 +- src/doc.l | 27 +- src/doxygen.cpp | 115 ++++-- src/doxygen.h | 1 + src/doxygen.pro.in | 5 +- src/doxygen.t | 3 + src/ftvhelp.cpp | 446 ++++++++++++++++++++++ src/ftvhelp.h | 47 +++ src/groupdef.cpp | 100 ++++- src/groupdef.h | 14 + src/htmlgen.cpp | 2 - src/htmlgen.h | 2 - src/htmlhelp.cpp | 32 +- src/htmlhelp.h | 33 +- src/index.cpp | 858 +++++++++++++++++++++++++++++------------- src/index.h | 1 + src/latexgen.cpp | 53 +-- src/page.h | 5 +- src/rtfgen.cpp | 71 ++-- src/scanner.l | 5 + src/treeview.h | 472 +++++++++++++++++++++++ src/treeview.js | 472 +++++++++++++++++++++++ src/util.cpp | 50 ++- src/util.h | 2 + 32 files changed, 2491 insertions(+), 527 deletions(-) create mode 100644 src/ftvhelp.cpp create mode 100644 src/ftvhelp.h create mode 100644 src/treeview.h create mode 100644 src/treeview.js diff --git a/INSTALL b/INSTALL index dc8d97e..b97ceee 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ -DOXYGEN Version 1.2.3-20001118 +DOXYGEN Version 1.2.3-20001126 Please read the installation section of the manual for instructions. -------- -Dimitri van Heesch (18 November 2000) +Dimitri van Heesch (26 November 2000) diff --git a/README b/README index 0b55d1d..ccd8256 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.2.3-20001118 +DOXYGEN Version 1.2.3-20001126 Please read INSTALL for compilation instructions. @@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at Enjoy, -Dimitri van Heesch (18 November 2000) +Dimitri van Heesch (26 November 2000) diff --git a/VERSION b/VERSION index f3921ca..af626bc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.3-20001118 +1.2.3-20001126 diff --git a/addon/configgen/configgen.cpp b/addon/configgen/configgen.cpp index c6aa0f2..c05cca7 100644 --- a/addon/configgen/configgen.cpp +++ b/addon/configgen/configgen.cpp @@ -712,8 +712,8 @@ int main(int argc,char * argv[]) // process template file while (!ctfile.atEnd()) { - int l=ctfile.readLine(buf,maxLineLen-1); - if (buf[l-2]=='\r') // remove the \r for the folks using Windows + int l = ctfile.readLine(buf,maxLineLen-1); + if (l>1 && buf[l-2]=='\r') // remove the \r for the folks using Windows { buf[l-2]='\n'; buf[l-1]='\r'; @@ -1302,6 +1302,31 @@ void init() 1,20 ); addDependency("enumValuesPerLine","generateHtml"); + ConfigBool::add( "ftvHelpFlag", + "GENERATE_TREEVIEW", + "FALSE", + "should a folder tree view be generated?", + "If the GENERATE_TREEVIEW tag is set to YES, a side pannel will be\n" + "generated containing a tree-like index structure (just like the one that \n" + "is generated for HTML Help). For this to work a browser that supports \n" + "JavaScript and frames is required (for instance Netscape 4.0+ \n" + "or Internet explorer 4.0+). " + ); + addDependency("ftvHelpFlag","generateHtml"); + +// TODO: integrate this option +// ConfigBool::add( "htmlHelpGroupsOnly", +// "HTMLHELP_GROUPS_ONLY", +// "FALSE", +// "should \\ingroup's be used to create HTML Help hierarchy?", +// "If the HTMLHELP_GROUPS_ONLY tag is set to YES, documented objects are \n" +// "displayed in the HTML Help tree if and only if they are \n" +// "placed in a user-defined group using the \\ingroup markup. \n" +// "Use \\defgroup to define a group before adding objects to a group. \n" +// "Also affects FTV Help (see GENERATE_FTVHELP tag). \n" +// ); +// addDependency("htmlHelpGroupsOnly","generateHtml"); + //----------------------------------------------------------------------------------------------- ConfigInfo::add( "LaTeX","configuration options related to the LaTeX output"); //----------------------------------------------------------------------------------------------- diff --git a/doc/index.doc b/doc/index.doc index 621efa0..39069ec 100644 --- a/doc/index.doc +++ b/doc/index.doc @@ -165,82 +165,13 @@ Thanks go to:
  • Matthias Andree for providing a .spec script for building rpms from the sources.
  • Tim Mensch for adding the todo command. +
  • Ken Wong for providing the HTML tree view code.
  • Jens Breitenstein, Christophe Bordeaux, Samuel Hägglund, Xet Erixon, Vlastimil Havran, Petr Prikryl, Ahmed Also Faisal, Alessandro Falappa, Kenji Nagamatsu, Francisco Oltra Thennet, Olli Korhonen, Boris Bralo, Nickolay Semyonov, and Grzegorz Kowal for providing translations into various languages. -
  • -Arnt Gulbrandsen, -Adam P. Jenkins, -Frank van de Pol, -Ulrich Quill, -Karl Robillard, -Frugal the Curious, -Michael Figley, -Eric Bos, -Barry Roberts, -Mark Tigges, -Jan Ekholm, -Andre Johansen, -Martin Franken, -Martin Hofmann, -Ulrich Ring, -Andy Guy, -Ryan Mclean, -Joseph Reklow, -Morten Eriksen, -Arthur Pope, -Andreas Felber, -Matthias Schwartz, -Björn Bon, -Volker Börchers, -Baruch Even, -Kor de Jong, -Thomas Eschenbacher, -Bert Scholten, -Germar Morgenthaler, -Daniel Bellen, -Terry Brown, -Anke Selig, -David Aspinwall, -Hellmar Becker, -Harald Krummeck, -Christoph Koegl, -Martin Reinecke, -Joseph Turian, -Craig P Earls, -Greg Sjaardema, -Vlado Sironja, -Jens Schmidt, -Lutz Sammer, -Robert Dale, -Ionutz Borcoman, -Markus Noga, -Darren Kelly, -Joerg Ott, -Kostya Serebrainy, -Marco Molteni, -Johannes Zellner, -Ole Gerden, -Olaf Meeuwissen, -Feiyi Wang, -Robert J. Clark, -Matthias Baas, -Walter Mueller, -William van Dieten, -Joshua Jensen, -Patrick Alberts, -Jacques Tremblay, -John Sturton, -Moshe Kruger, -David Wong, -Peter Garner, -Fred Labrosse, -Frank Schimmel, -Reinhard Nissl, -Alexander Gidon, -and many others for suggestions, patches and bug reports. +
  • many, many others for suggestions, patches and bug reports. */ diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index 686ca25..a426ee4 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,5 +1,5 @@ Name: doxygen -Version: 1.2.3-20001118 +Version: 1.2.3-20001126 Summary: documentation system for C, C++ and IDL Release: 1 Source0: doxygen-%{version}.src.tar.gz diff --git a/src/classdef.cpp b/src/classdef.cpp index 227f18e..239ae3f 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -617,6 +617,37 @@ ArgumentList *ClassDef::outerTemplateArguments() const return tempArgs; } } + + +static void writeTemplateSpec(OutputList &ol,ArgumentList *al, + const QCString &pageType,const QCString &name) +{ + if (al) // class is a template + { + ol.startSubsubsection(); + ol.docify("template<"); + Argument *a=al->first(); + while (a) + { + ol.docify(a->type); + if (!a->name.isEmpty()) + { + ol.docify(" "); + ol.docify(a->name); + } + if (a->defval.length()!=0) + { + ol.docify(" = "); + ol.docify(a->defval); + } + a=al->next(); + if (a) ol.docify(", "); + } + ol.docify("> "+pageType.lower()+" "+name); + ol.endSubsubsection(); + ol.writeString("\n"); + } +} // write all documentation for this class void ClassDef::writeDocumentation(OutputList &ol) @@ -945,32 +976,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ol.endGroupHeader(); ol.startTextBlock(); - ArgumentList *al=outerTempArgList; - if (al) // class is a template - { - ol.startSubsubsection(); - ol.docify("template<"); - Argument *a=al->first(); - while (a) - { - ol.docify(a->type); - if (!a->name.isEmpty()) - { - ol.docify(" "); - ol.docify(a->name); - } - if (a->defval.length()!=0) - { - ol.docify(" = "); - ol.docify(a->defval); - } - a=al->next(); - if (a) ol.docify(", "); - } - ol.docify("> "+pageType.lower()+" "+name()); - ol.endSubsubsection(); - ol.writeString("\n"); - } + writeTemplateSpec(ol,outerTempArgList,pageType,name()); // repeat brief description if (!briefDescription().isEmpty() && Config::repeatBriefFlag) @@ -1009,6 +1015,10 @@ void ClassDef::writeDocumentation(OutputList &ol) writeSourceDef(ol,name()); ol.endTextBlock(); } + else + { + writeTemplateSpec(ol,outerTempArgList,pageType,name()); + } typedefMembers.countDocMembers(); if (typedefMembers.totalCount()>0) diff --git a/src/config.h b/src/config.h index a3165d7..176c1ad 100644 --- a/src/config.h +++ b/src/config.h @@ -1,4 +1,4 @@ -/* This file was generated by configgen on Sat Oct 28 15:42:39 2000 +/* This file was generated by configgen on Sat Nov 25 21:38:08 2000 * from config_templ.h * * DO NOT EDIT! @@ -97,6 +97,7 @@ struct Config static bool htmlHelpFlag; // should html help files be generated? static bool noIndexFlag; // generate condensed index flag static int enumValuesPerLine; // number of enum values that are put on one line + static bool ftvHelpFlag; // should a folder tree view be generated? static bool generateLatex; // generate Latex output static QCString latexOutputDir; // the directory to put the Latex files static bool compactLatexFlag; // generate compact LaTeX documentation. diff --git a/src/config.l b/src/config.l index d158cdb..6d4d834 100644 --- a/src/config.l +++ b/src/config.l @@ -1,4 +1,4 @@ -/* This file was generated by configgen on Sat Oct 28 15:42:39 2000 +/* This file was generated by configgen on Sat Nov 25 21:38:08 2000 * from config_templ.l * * DO NOT EDIT! @@ -134,6 +134,7 @@ bool Config::htmlAlignMemberFlag = TRUE; bool Config::htmlHelpFlag = FALSE; bool Config::noIndexFlag = FALSE; int Config::enumValuesPerLine = 4; +bool Config::ftvHelpFlag = FALSE; bool Config::generateLatex = TRUE; QCString Config::latexOutputDir = "latex"; bool Config::compactLatexFlag = FALSE; @@ -411,6 +412,7 @@ static void readIncludeFile(const char *incName) "GENERATE_HTMLHELP"[ \t]*"=" { BEGIN(GetBool); b=&Config::htmlHelpFlag; } "DISABLE_INDEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::noIndexFlag; } "ENUM_VALUES_PER_LINE"[ \t]*"=" { BEGIN(GetString); s=&enumValuesPerLineString; s->resize(0); } +"GENERATE_TREEVIEW"[ \t]*"=" { BEGIN(GetBool); b=&Config::ftvHelpFlag; } "GENERATE_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateLatex; } "LATEX_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::latexOutputDir; s->resize(0); } "COMPACT_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactLatexFlag; } @@ -710,6 +712,7 @@ void dumpConfig() printf("htmlHelpFlag=`%d'\n",Config::htmlHelpFlag); printf("noIndexFlag=`%d'\n",Config::noIndexFlag); printf("enumValuesPerLine=`%d'\n",Config::enumValuesPerLine); + printf("ftvHelpFlag=`%d'\n",Config::ftvHelpFlag); printf("# configuration options related to the LaTeX output\n"); printf("generateLatex=`%d'\n",Config::generateLatex); printf("latexOutputDir=`%s'\n",Config::latexOutputDir.data()); @@ -878,6 +881,7 @@ void Config::init() Config::htmlHelpFlag = FALSE; Config::noIndexFlag = FALSE; Config::enumValuesPerLine = 4; + Config::ftvHelpFlag = FALSE; Config::generateLatex = TRUE; Config::latexOutputDir = "latex"; Config::compactLatexFlag = FALSE; @@ -1037,8 +1041,8 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# information to generate all constant output in the proper language. \n"; t << "# The default language is English, other supported languages are: \n"; t << "# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, \n"; - t << "# Korean, Hungarian, Spanish, Romanian, Russian, Croatian, Polish, \n"; - t << "# Portuguese and Slovene.\n"; + t << "# Korean, Hungarian, Norwegian, Spanish, Romanian, Russian, Croatian, \n"; + t << "# Polish, Portuguese and Slovene.\n"; t << "\n"; } t << "OUTPUT_LANGUAGE = "; @@ -1708,6 +1712,19 @@ void writeTemplateConfig(QFile *f,bool sl) if (!sl) { t << "\n"; + t << "# If the GENERATE_TREEVIEW tag is set to YES, a side pannel will be\n"; + t << "# generated containing a tree-like index structure (just like the one that \n"; + t << "# is generated for HTML Help). For this to work a browser that supports \n"; + t << "# JavaScript and frames is required (for instance Netscape 4.0+ \n"; + t << "# or Internet explorer 4.0+). \n"; + t << "\n"; + } + t << "GENERATE_TREEVIEW = "; + writeBoolValue(t,Config::ftvHelpFlag); + t << "\n"; + if (!sl) + { + t << "\n"; } t << "#---------------------------------------------------------------------------\n"; t << "# configuration options related to the LaTeX output\n"; diff --git a/src/doc.l b/src/doc.l index 41af1ee..274844f 100644 --- a/src/doc.l +++ b/src/doc.l @@ -756,7 +756,7 @@ FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]+ ID [a-z_A-Z][a-z_A-Z0-9]* SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+ -URLMASK [a-z_A-Z0-9\~\:\?\@\#\.\-\+\/\=]+ +URLMASK [a-z_A-Z0-9\~\:\?\@\%\#\.\-\+\/\=]+ NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9] WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]"\"") ATTR ({B}+[^>\n]*)? @@ -963,10 +963,13 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") } . { linkText += *yytext; } "\n" { linkText += " "; } -{CMD}"endlink" { // <- needed for things like \endlink. +{CMD}"endlink" { // <- needed for things like \endlink. //printf("GenerateLink className=`%s' linkRef=`%s' linkText=`%s'\n", // className.data(),linkRef.data(),linkText.data()); - generateLink(*outDoc,className,linkRef,inSeeBlock,linkText.stripWhiteSpace()); + if (!generateLink(*outDoc,className,linkRef,inSeeBlock,linkText.stripWhiteSpace())) + { + warn(yyFileName,yyLineNr,"Warning: link to unknown section %s in the documentation of this entity!",linkRef.data()); + } BEGIN( DocScan ); } {CMD}"endlink"/[^a-z_A-Z0-9] { warn(yyFileName,yyLineNr, @@ -2007,6 +2010,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") "%"[a-zA-Z_0-9\-]+ { outDoc->docify(yytext+1); } +{FILEMASK} { + outDoc->startEmphasis(); + generateFileRef(*outDoc,yytext); + outDoc->endEmphasis(); + BEGIN( DocScan ); + } [a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()|\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" { outDoc->startEmphasis(); generateRef(*outDoc,className,yytext,inSeeBlock); @@ -2019,6 +2028,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") outDoc->endEmphasis(); BEGIN( DocScan ); } +{FILEMASK} { + outDoc->startBold(); + generateFileRef(*outDoc,yytext); + outDoc->endBold(); + BEGIN( DocScan ); + } [a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()|\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" { outDoc->startBold(); generateRef(*outDoc,className,yytext,inSeeBlock); @@ -2031,6 +2046,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") outDoc->endBold(); BEGIN( DocScan ); } +{FILEMASK} { + outDoc->startTypewriter(); + generateFileRef(*outDoc,yytext); + outDoc->endTypewriter(); + BEGIN( DocScan ); + } [a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()!\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" { outDoc->startTypewriter(); generateRef(*outDoc,className,yytext,inSeeBlock); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 1469a90..14901c7 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -51,6 +51,7 @@ #include "language.h" #include "debug.h" #include "htmlhelp.h" +#include "ftvhelp.h" #include "defargs.h" #include "rtfgen.h" #include "xml.h" @@ -193,6 +194,7 @@ int documentedGroups; int documentedNamespaces; int documentedNamespaceMembers; int documentedIncludeFiles; +int documentedPages; QTextStream tagFile; @@ -218,7 +220,7 @@ const char *getOverloadDocs() static void addRelatedPage(const char *name,const QCString &ptitle, const QCString &doc,QList *anchors, const char *fileName,int startLine, - int todoId,int testId + int todoId,int testId,GroupDef *gd=0 ) { PageInfo *pi=0; @@ -251,6 +253,8 @@ static void addRelatedPage(const char *name,const QCString &ptitle, setFileNameForSections(anchors,pageName); pageSDict->append(baseName,pi); + + if (gd) gd->addPage(pi); if (!pi->title.isEmpty()) { @@ -259,7 +263,14 @@ static void addRelatedPage(const char *name,const QCString &ptitle, // a page name is a label as well! SectionInfo *si=new SectionInfo( pi->name,pi->title,SectionInfo::Section); - si->fileName=pageName; + if (gd) + { + si->fileName=gd->getOutputFileBase(); + } + else + { + si->fileName=pageName; + } //printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data()); //printf("Adding section info %s\n",pi->name.data()); sectionDict.insert(pageName,si); @@ -267,6 +278,20 @@ static void addRelatedPage(const char *name,const QCString &ptitle, } } +static void addRelatedPage(Entry *root) +{ + GroupDef *gd=0; + QListIterator sli(*root->groups); + QCString *s; + for (;(s=sli.current());++sli) + { + if (!s->isEmpty() && (gd=groupDict[*s])) break; + } + addRelatedPage(root->name,root->args,root->doc,root->anchors, + root->fileName,root->startLine,root->todoId,root->testId,gd + ); +} + //---------------------------------------------------------------------------- static void addRefItem(int todoId,int testId,const char *prefix, @@ -1754,7 +1779,11 @@ static void buildMemberList(Entry *root) QCString nsName,rnsName; if (nd) nsName = nd->name().copy(); if (rnd) rnsName = rnd->name().copy(); + QCString groupName,rgroupName; + if (md->getGroupDef()) groupName=md->getGroupDef()->name().copy(); + if (root->groups && root->groups->first()) rgroupName=root->groups->first()->copy(); //printf("namespace `%s' `%s'\n",nsName.data(),rnsName.data()); + //printf("groupNames `%s' `%s'\n",groupName.data(),rgroupName.data()); if ( matchArguments(md->argumentList(),root->argList,0,nsName) ) @@ -1764,7 +1793,10 @@ static void buildMemberList(Entry *root) ((fd!=0 && // no external reference and fd->absFilePath()==root->fileName // prototype in the same file ) || - md->getGroupDef()!=0 // member is part of a group + ( + !groupName.isEmpty() || // member is or was part of a group + !rgroupName.isEmpty() + ) ); // otherwise, allow a duplicate global member with the same argument list @@ -4565,9 +4597,7 @@ static void buildPageList(Entry *root) { if (!root->name.isEmpty()) { - addRelatedPage(root->name,root->args,root->doc,root->anchors, - root->fileName,root->startLine,root->todoId,root->testId - ); + addRelatedPage(root); } } else if (root->section == Entry::MAINPAGEDOC_SEC) @@ -4670,32 +4700,36 @@ static void resolveUserReferences() static void generatePageDocs() { + if (documentedPages==0) return; PageSDictIterator pdi(*pageSDict); PageInfo *pi=0; for (pdi.toFirst();(pi=pdi.current());++pdi) { - msg("Generating docs for page %s...\n",pi->name.data()); - outputList->disable(OutputGenerator::Man); - QCString pageName; - if (Config::caseSensitiveNames) - pageName=pi->name.copy(); - else - pageName=pi->name.lower(); - - startFile(*outputList,pageName,pi->title); - SectionInfo *si=0; - if (!pi->title.isEmpty() && !pi->name.isEmpty() && - (si=sectionDict[pi->name])!=0) - { - outputList->startSection(si->label,si->title,FALSE); - outputList->docify(si->title); - outputList->endSection(si->label,FALSE); - } - outputList->startTextBlock(); - parseDoc(*outputList,pi->defFileName,pi->defLine,0,0,pi->doc); - outputList->endTextBlock(); - endFile(*outputList); - outputList->enable(OutputGenerator::Man); + if (!pi->inGroup) + { + msg("Generating docs for page %s...\n",pi->name.data()); + outputList->disable(OutputGenerator::Man); + QCString pageName; + if (Config::caseSensitiveNames) + pageName=pi->name.copy(); + else + pageName=pi->name.lower(); + + startFile(*outputList,pageName,pi->title); + SectionInfo *si=0; + if (!pi->title.isEmpty() && !pi->name.isEmpty() && + (si=sectionDict[pi->name])!=0) + { + outputList->startSection(si->label,si->title,FALSE); + outputList->docify(si->title); + outputList->endSection(si->label,FALSE); + } + outputList->startTextBlock(); + parseDoc(*outputList,pi->defFileName,pi->defLine,0,0,pi->doc); + outputList->endTextBlock(); + endFile(*outputList); + outputList->enable(OutputGenerator::Man); + } } } @@ -4724,6 +4758,7 @@ static void buildExampleList(Entry *root) convertFileName(pi->name)+"-example" ); exampleSDict->inSort(root->name,pi); + addExampleToGroups(root,pi); } } } @@ -4774,13 +4809,17 @@ static void generateGroupDocs() for (;(gd=gli.current());++gli) { //printf("group %s #members=%d\n",gd->name().data(),gd->countMembers()); - if (gd->countMembers()>0) gd->writeDocumentation(*outputList); - else - { - warn(gd->getDefFileName(),gd->getDefLine(), - "Warning: group %s does not have any (documented) members.", - gd->name().data()); - } + //if (gd->countMembers()>0) + //{ + // gd->writeDocumentation(*outputList); + //} + //else + //{ + // warn(gd->getDefFileName(),gd->getDefLine(), + // "Warning: group %s does not have any (documented) members.", + // gd->name().data()); + //} + gd->writeDocumentation(*outputList); } } @@ -5709,6 +5748,7 @@ int main(int argc,char **argv) outputList->add(new HtmlGenerator); HtmlGenerator::init(); if (Config::htmlHelpFlag) HtmlHelp::getInstance()->initialize(); + if (Config::ftvHelpFlag) FTVHelp::getInstance()->initialize(); copyStyleSheet(); } if (Config::generateLatex) @@ -6037,6 +6077,7 @@ int main(int argc,char **argv) documentedGroups = countGroups(); documentedNamespaces = countNamespaces(); documentedNamespaceMembers = countNamespaceMembers(); + documentedPages = countRelatedPages(); //documentedIncludeFiles = countIncludeFiles(); // compute the shortest possible names of all files @@ -6154,6 +6195,10 @@ int main(int argc,char **argv) { HtmlHelp::getInstance()->finalize(); } + if (Config::generateHtml && Config::ftvHelpFlag) + { + FTVHelp::getInstance()->finalize(); + } if (Config::generateHtml) removeDoxFont(Config::htmlOutputDir); diff --git a/src/doxygen.h b/src/doxygen.h index efe2b83..edfe602 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -116,6 +116,7 @@ extern int documentedGroups; extern int documentedNamespaces; extern int documentedNamespaceMembers; extern int documentedIncludeFiles; +extern int documentedPages; extern QCString spaces; extern const char * getOverloadDocs(); diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in index 66d57a0..f963466 100644 --- a/src/doxygen.pro.in +++ b/src/doxygen.pro.in @@ -27,7 +27,8 @@ HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \ translator_it.h formula.h debug.h membergroup.h htmlhelp.h \ translator_ru.h translator_pl.h dot.h rtfgen.h xml.h xml_dtd.h \ reflist.h page.h sortdict.h translator_hu.h translator_kr.h \ - translator_ro.h translator_si.h translator_cn.h + translator_ro.h translator_si.h translator_cn.h ftvhelp.h \ + treeview.h SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \ memberdef.cpp membername.cpp index.cpp memberlist.cpp \ entry.cpp logos.cpp instdox.cpp message.cpp code.cpp \ @@ -38,7 +39,7 @@ SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \ diagram.cpp gifenc.cpp image.cpp namespacedef.cpp \ version.cpp language.cpp definition.cpp formula.cpp debug.cpp \ membergroup.cpp htmlhelp.cpp dot.cpp rtfgen.cpp xml.cpp \ - reflist.cpp + reflist.cpp ftvhelp.cpp unix:LIBS += -L../qtools -lqtools win32:INCLUDEPATH += . win32:LIBS += qtools.lib shell32.lib diff --git a/src/doxygen.t b/src/doxygen.t index c2d7aae..be0dcc4 100644 --- a/src/doxygen.t +++ b/src/doxygen.t @@ -81,3 +81,6 @@ sub GenerateDep { xml_dtd.h: doxygen.dtd cat doxygen.dtd | sed -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >xml_dtd.h +treeview.h: treeview.js + cat treeview.js | sed -e "s/\\\\/\\\\\\\\/g" -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >treeview.h + diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp new file mode 100644 index 0000000..25ca875 --- /dev/null +++ b/src/ftvhelp.cpp @@ -0,0 +1,446 @@ +/****************************************************************************** + * ftvhelp.cpp,v 1.0 2000/09/06 16:09:00 + * + * Kenney Wong + * + * Folder Tree View for offline help on browsers that do not support HTML Help. + * Uses the FTV structure from: + * http://www.geocities.com/Paris/LeftBank/2178/ftexample.html + */ + +#include +#include +#include +#include + +#include "ftvhelp.h" +#include "config.h" +#include "message.h" + + +const char treeview_data[]= +#include "treeview.h" +; + +unsigned char ftv2blank_gif[] = { + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, + 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x0f, 0x00, 0x21, 0xfe, 0x1c, + 0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d, + 0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72, + 0x20, 0x32, 0x2e, 0x30, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x16, 0x00, 0x40, 0x04, 0x14, 0xf0, 0xc9, 0x49, 0xab, 0xbd, 0x38, 0xeb, + 0xcd, 0xbb, 0xff, 0x60, 0x28, 0x8e, 0x64, 0x69, 0x9e, 0x68, 0xaa, 0x3e, + 0x11, 0x00, 0x3b +}; +unsigned int ftv2blank_gif_len = 135; + +unsigned char ftv2doc_gif[] = { + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x18, 0x00, 0x16, 0x00, 0xa2, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xc0, 0xc0, + 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x06, 0x00, 0x2c, 0x00, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x16, 0x00, 0x00, 0x03, 0x55, 0x68, 0xba, 0xdc, + 0xfe, 0x30, 0xca, 0x49, 0x6b, 0x24, 0x38, 0x67, 0x6b, 0x88, 0xf8, 0x60, + 0x30, 0x10, 0x96, 0x17, 0x04, 0x02, 0x2a, 0x0c, 0x02, 0x49, 0x79, 0x20, + 0x58, 0xcc, 0xc5, 0x9b, 0x02, 0x38, 0x00, 0x0e, 0xf5, 0x04, 0xc7, 0x1f, + 0x51, 0x4f, 0x62, 0xca, 0xe1, 0x3e, 0xbc, 0x17, 0x4a, 0x15, 0x4b, 0xfa, + 0x3e, 0x46, 0xdd, 0x6a, 0x78, 0x09, 0x02, 0x85, 0x4a, 0x41, 0x14, 0x49, + 0x85, 0xfc, 0x42, 0x5c, 0xdb, 0x32, 0x86, 0xf5, 0x0d, 0xce, 0xe8, 0x74, + 0xf7, 0x41, 0x6b, 0xbb, 0x39, 0xf0, 0xb8, 0xdc, 0x92, 0x00, 0x00, 0x3b +}; +unsigned int ftv2doc_gif_len = 144; + +unsigned char ftv2folderclosed_gif[] = { + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x18, 0x00, 0x16, 0x00, 0xa2, 0x00, + 0x00, 0x80, 0x00, 0x80, 0xff, 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0x80, 0x80, + 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x05, 0x00, 0x2c, 0x00, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x16, 0x00, 0x00, 0x03, 0x4c, 0x58, 0xba, 0xdc, + 0xfe, 0x30, 0xca, 0x49, 0x2b, 0x25, 0xc4, 0x3a, 0x0c, 0x40, 0xd6, 0x05, + 0xd7, 0x75, 0xdf, 0x45, 0x8c, 0xa8, 0x77, 0x09, 0x69, 0x5a, 0x42, 0x27, + 0xdb, 0x8e, 0xef, 0xd6, 0xc9, 0xb3, 0x0a, 0x8f, 0x78, 0x8b, 0xed, 0x3c, + 0x1f, 0x61, 0x20, 0x39, 0x05, 0x49, 0xc3, 0x00, 0xb1, 0x88, 0x12, 0x60, + 0x06, 0x82, 0x80, 0xb3, 0x66, 0x23, 0x0d, 0xa4, 0xd2, 0xdf, 0x85, 0x84, + 0xd5, 0x5a, 0x4e, 0x43, 0x2f, 0x08, 0x43, 0x05, 0x99, 0xcf, 0xe8, 0x49, + 0x02, 0x00, 0x3b +}; +unsigned int ftv2folderclosed_gif_len = 135; + +unsigned char ftv2folderopen_gif[] = { + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x18, 0x00, 0x16, 0x00, 0xa2, 0x00, + 0x00, 0x80, 0x00, 0x80, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xc0, 0xc0, + 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x06, 0x00, 0x2c, 0x00, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x16, 0x00, 0x00, 0x03, 0x5f, 0x68, 0xba, 0xdc, + 0xfe, 0x30, 0xca, 0x49, 0x2b, 0x24, 0xf6, 0x0e, 0x9c, 0x59, 0x01, 0xc2, + 0xc6, 0x10, 0x24, 0xf5, 0x09, 0x02, 0x47, 0xa2, 0x9c, 0x74, 0x86, 0x2b, + 0x1a, 0x10, 0x45, 0xe1, 0x82, 0x68, 0x31, 0x08, 0x01, 0x2b, 0x00, 0x36, + 0xc8, 0x4b, 0xa0, 0x43, 0xf1, 0x08, 0xbf, 0xe0, 0x63, 0x58, 0xec, 0xa5, + 0x92, 0x11, 0xe6, 0x4e, 0x86, 0x04, 0x46, 0x71, 0xc4, 0x9d, 0xb3, 0xaa, + 0x74, 0x7c, 0x70, 0x45, 0xd6, 0xce, 0x7a, 0x05, 0x15, 0x49, 0x53, 0xf2, + 0x95, 0x88, 0x36, 0x42, 0x27, 0x5f, 0x80, 0x7c, 0x2e, 0xef, 0x46, 0x6b, + 0xf8, 0xbc, 0xbd, 0xc3, 0xef, 0xfb, 0x1b, 0x09, 0x00, 0x3b +}; +unsigned int ftv2folderopen_gif_len = 154; + +unsigned char ftv2lastnode_gif[] = { + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, + 0x00, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x0f, 0x00, 0x21, 0xfe, 0x1c, + 0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d, + 0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72, + 0x20, 0x32, 0x2e, 0x30, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x16, 0x00, 0x40, 0x04, 0x1b, 0xf0, 0xc9, 0x49, 0xab, 0xbd, 0x38, 0xeb, + 0xcd, 0xbb, 0xff, 0x60, 0x28, 0x72, 0xc0, 0x57, 0x7a, 0x67, 0x97, 0x92, + 0x4f, 0xe9, 0xb6, 0x63, 0x2c, 0xcf, 0x5e, 0x04, 0x00, 0x3b +}; +unsigned int ftv2lastnode_gif_len = 142; + +unsigned char ftv2link_gif[] = { + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x18, 0x00, 0x16, 0x00, 0xb3, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0xff, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, + 0xc0, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x0f, 0x00, 0x21, 0xfe, 0x1c, + 0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d, + 0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72, + 0x20, 0x32, 0x2e, 0x30, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x16, 0x00, 0x00, 0x04, 0x77, 0xf0, 0xc9, 0x49, 0xab, 0xbd, 0x38, 0xeb, + 0x7d, 0x8d, 0xff, 0x20, 0x27, 0x19, 0x93, 0x50, 0x1e, 0x24, 0x47, 0x9a, + 0x12, 0x7b, 0x3c, 0xa9, 0x16, 0xb3, 0x8f, 0x00, 0xdc, 0xc0, 0xb6, 0x3e, + 0x47, 0xe1, 0xbf, 0x82, 0x43, 0x4e, 0x26, 0xe9, 0x19, 0x0a, 0x81, 0xc2, + 0x4b, 0xa8, 0xab, 0x29, 0x0b, 0x04, 0xa4, 0x21, 0x38, 0xcc, 0xa4, 0x0a, + 0xbc, 0xc0, 0x80, 0x30, 0xe0, 0x55, 0x31, 0x2b, 0xa5, 0x21, 0xc9, 0xa5, + 0xca, 0x40, 0x06, 0x40, 0x80, 0xdb, 0x65, 0x5a, 0x2b, 0x80, 0xc1, 0x00, + 0x70, 0x30, 0xbf, 0x1f, 0x37, 0xfc, 0xed, 0xe5, 0x25, 0x02, 0xd2, 0x78, + 0x34, 0x76, 0x60, 0x78, 0x13, 0x43, 0x2e, 0x5f, 0x16, 0x31, 0x12, 0x74, + 0x07, 0x8e, 0x8e, 0x89, 0x70, 0x38, 0x93, 0x94, 0x91, 0x22, 0x97, 0x98, + 0x99, 0x9a, 0x0f, 0x11, 0x00, 0x3b +}; +unsigned int ftv2link_gif_len = 234; + +unsigned char ftv2mlastnode_gif[] = { + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, + 0x00, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x2c, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x16, 0x00, 0x00, 0x04, 0x2a, 0x30, 0xc8, 0x49, + 0xab, 0x95, 0xe0, 0xea, 0x7d, 0x33, 0xff, 0x15, 0x20, 0x8e, 0x63, 0x67, + 0x5a, 0x5e, 0x78, 0xaa, 0x68, 0x20, 0xbc, 0x6f, 0x90, 0xcd, 0x53, 0x4a, + 0xd9, 0xf5, 0x7a, 0xeb, 0x35, 0x49, 0x82, 0xc0, 0xa0, 0x70, 0x48, 0x2c, + 0x1a, 0x35, 0x11, 0x00, 0x3b +}; +unsigned int ftv2mlastnode_gif_len = 125; + +unsigned char ftv2mnode_gif[] = { + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, + 0x00, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x2c, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x16, 0x00, 0x00, 0x04, 0x2e, 0x70, 0xc9, 0x49, + 0xab, 0x95, 0xe0, 0xea, 0x7d, 0x33, 0xff, 0x15, 0x20, 0x8e, 0x63, 0x67, + 0x5a, 0x5e, 0x78, 0xaa, 0xe8, 0x22, 0xbc, 0xef, 0x92, 0xcd, 0x53, 0x4a, + 0xd9, 0xf5, 0x7a, 0xeb, 0x35, 0x49, 0x82, 0x40, 0x4c, 0x70, 0x28, 0x24, + 0x06, 0x71, 0xc6, 0x0d, 0x52, 0x12, 0x01, 0x00, 0x3b +}; +unsigned int ftv2mnode_gif_len = 129; + +unsigned char ftv2node_gif[] = { + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, + 0x00, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x0f, 0x00, 0x21, 0xfe, 0x1c, + 0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d, + 0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72, + 0x20, 0x32, 0x2e, 0x30, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x16, 0x00, 0x40, 0x04, 0x20, 0xf0, 0xc9, 0x49, 0xab, 0xbd, 0x38, 0xeb, + 0xcd, 0xbb, 0xff, 0x60, 0x28, 0x72, 0xc0, 0x57, 0x7a, 0x67, 0x97, 0x92, + 0x4f, 0xe9, 0xb6, 0xd7, 0xba, 0xc9, 0x1a, 0x9d, 0xd9, 0x18, 0x1e, 0x63, + 0x11, 0x00, 0x3b +}; +unsigned int ftv2node_gif_len = 147; + +unsigned char ftv2plastnode_gif[] = { + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, + 0x00, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x2c, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x16, 0x00, 0x00, 0x04, 0x2f, 0x30, 0xc8, 0x49, + 0xab, 0x95, 0xe0, 0xea, 0x7d, 0x33, 0xff, 0x15, 0x20, 0x8e, 0x63, 0x67, + 0x5a, 0x5e, 0x20, 0x4c, 0x29, 0x95, 0xae, 0x98, 0x29, 0xcc, 0x73, 0x90, + 0xdd, 0xec, 0x04, 0xdb, 0xa7, 0x9a, 0xa3, 0x3d, 0x17, 0x89, 0x04, 0x2a, + 0x1a, 0x8f, 0xc8, 0xa4, 0x72, 0xa9, 0x89, 0x00, 0x00, 0x3b +}; +unsigned int ftv2plastnode_gif_len = 130; + +unsigned char ftv2pnode_gif[] = { + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, + 0x00, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x2c, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x16, 0x00, 0x00, 0x04, 0x32, 0x70, 0xc9, 0x49, + 0xab, 0x95, 0xe0, 0xea, 0x7d, 0x33, 0xff, 0x15, 0x20, 0x8e, 0x63, 0x67, + 0x5a, 0xde, 0x22, 0x4c, 0x29, 0x95, 0xae, 0x98, 0x29, 0xcc, 0xf3, 0x92, + 0xdd, 0xec, 0x04, 0xdb, 0xa7, 0x9a, 0xa3, 0x3d, 0x17, 0x89, 0x04, 0x2a, + 0xc6, 0x8c, 0x48, 0x5e, 0xd2, 0xd8, 0x5a, 0x72, 0x9a, 0x93, 0x08, 0x00, + 0x3b +}; +unsigned int ftv2pnode_gif_len = 133; + +unsigned char ftv2vertline_gif[] = { + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x16, 0x00, 0xb3, 0x00, + 0x00, 0x80, 0x80, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x0f, 0x00, 0x21, 0xfe, 0x1c, + 0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d, + 0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72, + 0x20, 0x32, 0x2e, 0x30, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x16, 0x00, 0x40, 0x04, 0x19, 0xf0, 0xc9, 0x49, 0xab, 0xbd, 0x38, 0xeb, + 0xcd, 0xbb, 0xff, 0x60, 0x28, 0x72, 0xc0, 0x57, 0x7a, 0x67, 0x97, 0x92, + 0x66, 0x8b, 0xba, 0x2a, 0x5c, 0x45, 0x00, 0x3b +}; +unsigned int ftv2vertline_gif_len = 140; + +struct ImageInfo +{ + const char *name; + unsigned char *data; + unsigned int len; +} image_info[] = +{ + { "ftv2blank.gif",ftv2blank_gif,ftv2blank_gif_len }, + { "ftv2doc.gif",ftv2doc_gif,ftv2doc_gif_len }, + { "ftv2folderclosed.gif",ftv2folderclosed_gif,ftv2folderclosed_gif_len }, + { "ftv2folderopen.gif",ftv2folderopen_gif,ftv2folderopen_gif_len }, + { "ftv2lastnode.gif",ftv2lastnode_gif,ftv2lastnode_gif_len }, + { "ftv2link.gif",ftv2link_gif,ftv2link_gif_len }, + { "ftv2mlastnode.gif",ftv2mlastnode_gif,ftv2mlastnode_gif_len }, + { "ftv2mnode.gif",ftv2mnode_gif,ftv2mnode_gif_len }, + { "ftv2node.gif",ftv2node_gif,ftv2node_gif_len }, + { "ftv2plastnode.gif",ftv2plastnode_gif,ftv2plastnode_gif_len }, + { "ftv2pnode.gif",ftv2pnode_gif,ftv2pnode_gif_len }, + { "ftv2vertline.gif",ftv2vertline_gif,ftv2vertline_gif_len }, + { 0,0,0 } +}; + +static void generateFolderTreeViewData() +{ + // Generate tree view script + QCString fileName=Config::htmlOutputDir+"/treeview.js"; + QFile f(fileName); + if (!f.open(IO_WriteOnly)) + { + err("Cannot open file %s for writing!\n",fileName.data()); + return; + } + else + { + QTextStream t(&f); + t << treeview_data; + f.close(); + } + + // Generate alternative index.html as a frame + fileName=Config::htmlOutputDir+"/index.html"; + f.setName(fileName); + if (!f.open(IO_WriteOnly)) + { + err("Cannot open file %s for writing!\n",fileName.data()); + return; + } + else + { + QTextStream t(&f); + t << "" << Config::projectName << "" << endl; + t << "" << endl; + t << " " << endl; + t << " " << endl; + t << "" << endl; + t << "" << endl; + f.close(); + } + + // Generate tree view frame + fileName=Config::htmlOutputDir+"/tree.html"; + f.setName(fileName); + if (!f.open(IO_WriteOnly)) + { + err("Cannot open file %s for writing!\n",fileName.data()); + return; + } + else + { + QTextStream t(&f); + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "" << endl; + t << "" << endl; + f.close(); + } + + // Generate tree view images + ImageInfo *p = image_info; + while (p->name) + { + QCString fileName=Config::htmlOutputDir+"/"+p->name; + QFile f(fileName); + if (f.open(IO_WriteOnly)) + f.writeBlock((char *)p->data,p->len); + else + { + fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data()); + } + f.close(); + p++; + } +} + +//---------------------------------------------------------------------------- + +FTVHelp *FTVHelp::m_theInstance = 0; + +/*! Construm_cts an ftv help object. + * The object has to be \link initialize() initialized\endlink before it can + * be used. + */ +FTVHelp::FTVHelp() +{ + /* initial depth */ + m_dc = 0; + m_cf = 0; +} + +/*! return a reference to the one and only instance of this class. + */ +FTVHelp *FTVHelp::getInstance() +{ + if (m_theInstance==0) m_theInstance = new FTVHelp; + return m_theInstance; +} + +/*! This will create a folder tree view table of contents file (tree.js). + * \sa finalize() + */ +void FTVHelp::initialize() +{ + /* open the contents file */ + QCString fName = Config::htmlOutputDir + "/tree.js"; + m_cf = new QFile(fName); + if (!m_cf->open(IO_WriteOnly)) + { + err("Could not open file %s for writing\n",fName.data()); + exit(1); + } + /* Write the header of the contents file */ + m_cts.setDevice(m_cf); + m_cts << "foldersTree = gFld(\""; + if (Config::projectName.isEmpty()) + { + m_cts << "Root"; + } + else + { + m_cts << Config::projectName; + } + m_cts << "\", \"\")\n"; +} + +/*! Finalizes the FTV help. This will finish and close the + * contents file (index.js). + * \sa initialize() + */ +void FTVHelp::finalize() +{ + m_cts.unsetDevice(); + m_cf->close(); + delete m_cf; + generateFolderTreeViewData(); +} + +/*! Increase the level of the contents hierarchy. + * This will start a new sublist in contents file. + * \sa decContentsDepth() + */ +int FTVHelp::incContentsDepth() +{ + //int i; for (i=0;i + * + * Folder Tree View for offline help on browsers that do not support HTML Help. + * Uses the FTV structure from: + * http://www.geocities.com/Paris/LeftBank/2178/ftexample.html + */ + +#ifndef FTVHELP_H +#define FTVHELP_H + +#include "qtbc.h" +#include + +class QFile; + +/*! A class that generated the FTV Help specific file. + * This file is used in conjunction with additional FTV web browser code + * that can be obtained from: + * http://www.geocities.com/Paris/LeftBank/2178/ftexample.html + */ +class FTVHelp +{ + public: + static FTVHelp *getInstance(); + void initialize(); + void finalize(); + int incContentsDepth(); + int decContentsDepth(); + /*! return the current depth of the contents tree */ + int contentsDepth() { return m_dc; } + void addContentsItem(bool isDir, + const char *name, const char *ref = 0, + const char *anchor = 0); + + private: + FTVHelp(); + QFile *m_cf; + QTextStream m_cts; + int m_dc; + static FTVHelp *m_theInstance; +}; + +#endif /* FTVHELP_H */ + diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 3217c13..054222a 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -30,6 +30,7 @@ #include "message.h" #include "membergroup.h" #include "doxygen.h" +#include "page.h" GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) : Definition(df,dl,na) @@ -38,7 +39,8 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) : classList = new ClassList; groupList = new GroupList; namespaceList = new NamespaceList; - + pageDict = new PageSDict(257); + exampleDict = new PageSDict(257); allMemberList = new MemberList; allMemberDict = new QDict; if (t) @@ -52,6 +54,8 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) : memberGroupList = new MemberGroupList; memberGroupList->setAutoDelete(TRUE); memberGroupDict = new MemberGroupDict(1009); + + visited = 0; } GroupDef::~GroupDef() @@ -60,6 +64,8 @@ GroupDef::~GroupDef() delete classList; delete groupList; delete namespaceList; + delete pageDict; + delete exampleDict; delete allMemberList; delete allMemberDict; delete memberGroupList; @@ -100,6 +106,17 @@ void GroupDef::addNamespace(const NamespaceDef *def) namespaceList->append(def); } +void GroupDef::addPage(PageInfo *def) +{ + pageDict->append(def->name,def); + def->inGroup = this; +} + +void GroupDef::addExample(const PageInfo *def) +{ + exampleDict->append(def->name,def); +} + void GroupDef::addMemberListToGroup(MemberList *ml, bool (MemberDef::*func)() const) { @@ -214,7 +231,9 @@ int GroupDef::countMembers() const classList->count()+ namespaceList->count()+ groupList->count()+ - allMemberList->count(); + allMemberList->count()+ + pageDict->count()+ + exampleDict->count(); } /*! Compute the HTML anchor names for all members in the class */ @@ -249,6 +268,8 @@ void GroupDef::writeDocumentation(OutputList &ol) //ol.enable(OutputGenerator::Latex); ol.popGeneratorState(); } + + ol.startMemberSections(); if (fileList->count()>0) { @@ -340,31 +361,59 @@ void GroupDef::writeDocumentation(OutputList &ol) allMemberList->writeDeclarations(ol,0,0,0,this,0,0); } ol.endMemberSections(); - //int dl=doc.length(); - //doc=doc.stripWhiteSpace(); + + if (!briefDescription().isEmpty() || !documentation().isEmpty()) { - ol.writeRuler(); - ol.pushGeneratorState(); - ol.disable(OutputGenerator::Latex); - ol.disable(OutputGenerator::RTF); - ol.writeAnchor(0,"_details"); - ol.popGeneratorState(); - ol.startGroupHeader(); - parseText(ol,theTranslator->trDetailedDescription()); - ol.endGroupHeader(); - // repeat brief description - if (!briefDescription().isEmpty()) + + if (pageDict->count()!=countMembers()) // classical layout { - ol+=briefOutput; - ol.newParagraph(); + ol.writeRuler(); + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::RTF); + ol.writeAnchor(0,"_details"); + ol.popGeneratorState(); + ol.startGroupHeader(); + parseText(ol,theTranslator->trDetailedDescription()); + ol.endGroupHeader(); + + // repeat brief description + if (!briefDescription().isEmpty() && Config::repeatBriefFlag) + { + ol+=briefOutput; + ol.newParagraph(); + } } + // write documentation if (!documentation().isEmpty()) { parseDoc(ol,defFileName,defLine,name(),0,documentation()+"\n"); } } + PageInfo *pi=0; + PageSDictIterator pdi(*pageDict); + for (pdi.toFirst();(pi=pdi.current());++pdi) + { + QCString pageName; + if (Config::caseSensitiveNames) + pageName=pi->name.copy(); + else + pageName=pi->name.lower(); + + SectionInfo *si=0; + if (!pi->title.isEmpty() && !pi->name.isEmpty() && + (si=sectionDict[pi->name])!=0) + { + ol.startSection(si->label,si->title,TRUE); + ol.docify(si->title); + ol.endSection(si->label,TRUE); + } + ol.startTextBlock(); + parseDoc(ol,pi->defFileName,pi->defLine,0,0,pi->doc); + ol.endTextBlock(); + } defineMembers.countDocMembers(TRUE); if (defineMembers.totalCount()>0 ) @@ -507,3 +556,20 @@ void addMemberToGroups(Entry *root,MemberDef *md) } } + +void addExampleToGroups(Entry *root,PageInfo *eg) +{ + QListIterator sli(*root->groups); + QCString *s; + for (;(s=sli.current());++sli) + { + GroupDef *gd=0; + if (!s->isEmpty() && (gd=groupDict[*s])) + { + gd->addExample(eg); + //printf("Example %s: in group %s\n",eg->name().data(),s->data()); + } + } +} + + diff --git a/src/groupdef.h b/src/groupdef.h index 385c6e5..b8aaa40 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -24,6 +24,7 @@ #include "definition.h" #include "memberlist.h" #include "memberdef.h" +#include "htmlhelp.h" class FileList; class ClassList; @@ -35,6 +36,8 @@ class OutputList; class NamespaceList; class MemberGroupList; class MemberGroupDict; +class PageSDict; +class PageInfo; class GroupDef : public Definition { @@ -48,6 +51,8 @@ class GroupDef : public Definition void addClass(const ClassDef *def); void addNamespace(const NamespaceDef *def); void addGroup(const GroupDef *def); + void addPage(PageInfo *def); // pages in this group + void addExample(const PageInfo *def); // examples in this group void insertMember(MemberDef *def); void writeDocumentation(OutputList &ol); int countMembers() const; @@ -64,6 +69,10 @@ class GroupDef : public Definition void addMembersToMemberGroup(); void distributeMemberGroupDocumentation(); + bool visited; // number of times accessed for output - KPW + + friend void writeGroupTreeNode(OutputList&, GroupDef*); // make accessible for writing tree view of group in index.cpp - KPW + protected: void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const); @@ -74,6 +83,8 @@ class GroupDef : public Definition ClassList *classList; // list of classes in the group NamespaceList *namespaceList; // list of namespaces in the group GroupList *groupList; // list of sub groups. + PageSDict *pageDict; // list of pages in the group + PageSDict *exampleDict; // list of examples in the group MemberList *allMemberList; // list of all members in the group QDict *allMemberDict; @@ -107,5 +118,8 @@ void addClassToGroups(Entry *root,ClassDef *cd); void addNamespaceToGroups(Entry *root,NamespaceDef *nd); void addGroupToGroups(Entry *root,GroupDef *subGroup); void addMemberToGroups(Entry *root,MemberDef *md); +void addPageToGroups(Entry *root,PageInfo *pi); +void addExampleToGroups(Entry *root,PageInfo *eg); #endif + diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 1b93b5a..a962d9f 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -60,8 +60,6 @@ static const char *defaultStyleSheet = "FONT.charliteral { color: #008080 }\n"; -HtmlHelp *HtmlGenerator::htmlHelp = 0; - HtmlGenerator::HtmlGenerator() : OutputGenerator() { if (!Config::headerFile.isEmpty()) header=fileToString(Config::headerFile); diff --git a/src/htmlgen.h b/src/htmlgen.h index fbe3468..0f3b588 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -22,7 +22,6 @@ #include "outputgen.h" class QFile; -class HtmlHelp; class HtmlGenerator : public OutputGenerator { @@ -249,7 +248,6 @@ class HtmlGenerator : public OutputGenerator HtmlGenerator &operator=(const HtmlGenerator &g); HtmlGenerator(const HtmlGenerator &g); - static HtmlHelp *htmlHelp; int col; }; diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 064aec2..1802a48 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -267,7 +267,7 @@ void HtmlHelp::initialize() cts << "\n" "\n" "\n" - "\n" + "\n" "\n" "