Commit a1995ea7 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.3-20001126

parent ecaf7fbf
DOXYGEN Version 1.2.3-20001118 DOXYGEN Version 1.2.3-20001126
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (18 November 2000) Dimitri van Heesch (26 November 2000)
DOXYGEN Version 1.2.3-20001118 DOXYGEN Version 1.2.3-20001126
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at ...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (18 November 2000) Dimitri van Heesch (26 November 2000)
1.2.3-20001118 1.2.3-20001126
...@@ -712,8 +712,8 @@ int main(int argc,char * argv[]) ...@@ -712,8 +712,8 @@ int main(int argc,char * argv[])
// process template file // process template file
while (!ctfile.atEnd()) while (!ctfile.atEnd())
{ {
int l=ctfile.readLine(buf,maxLineLen-1); int l = ctfile.readLine(buf,maxLineLen-1);
if (buf[l-2]=='\r') // remove the \r for the folks using Windows if (l>1 && buf[l-2]=='\r') // remove the \r for the folks using Windows
{ {
buf[l-2]='\n'; buf[l-2]='\n';
buf[l-1]='\r'; buf[l-1]='\r';
...@@ -1302,6 +1302,31 @@ void init() ...@@ -1302,6 +1302,31 @@ void init()
1,20 1,20
); );
addDependency("enumValuesPerLine","generateHtml"); 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"); ConfigInfo::add( "LaTeX","configuration options related to the LaTeX output");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
......
...@@ -165,82 +165,13 @@ Thanks go to: ...@@ -165,82 +165,13 @@ Thanks go to:
<li>Matthias Andree for providing a .spec script for building rpms from the <li>Matthias Andree for providing a .spec script for building rpms from the
sources. sources.
<li>Tim Mensch for adding the todo command. <li>Tim Mensch for adding the todo command.
<li>Ken Wong for providing the HTML tree view code.
<li>Jens Breitenstein, Christophe Bordeaux, Samuel Hägglund, Xet Erixon, <li>Jens Breitenstein, Christophe Bordeaux, Samuel Hägglund, Xet Erixon,
Vlastimil Havran, Petr Prikryl, Ahmed Also Faisal, Alessandro Falappa, Vlastimil Havran, Petr Prikryl, Ahmed Also Faisal, Alessandro Falappa,
Kenji Nagamatsu, Francisco Oltra Thennet, Olli Korhonen, Kenji Nagamatsu, Francisco Oltra Thennet, Olli Korhonen,
Boris Bralo, Nickolay Semyonov, and Grzegorz Kowal for providing Boris Bralo, Nickolay Semyonov, and Grzegorz Kowal for providing
translations into various languages. translations into various languages.
<li> <li>many, many others for suggestions, patches and bug reports.
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&ouml;rn Bon,
Volker B&ouml;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.
</ul> </ul>
*/ */
Name: doxygen Name: doxygen
Version: 1.2.3-20001118 Version: 1.2.3-20001126
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 1 Release: 1
Source0: doxygen-%{version}.src.tar.gz Source0: doxygen-%{version}.src.tar.gz
......
...@@ -618,6 +618,37 @@ ArgumentList *ClassDef::outerTemplateArguments() const ...@@ -618,6 +618,37 @@ ArgumentList *ClassDef::outerTemplateArguments() const
} }
} }
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 // write all documentation for this class
void ClassDef::writeDocumentation(OutputList &ol) void ClassDef::writeDocumentation(OutputList &ol)
{ {
...@@ -945,32 +976,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -945,32 +976,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.endGroupHeader(); ol.endGroupHeader();
ol.startTextBlock(); ol.startTextBlock();
ArgumentList *al=outerTempArgList; writeTemplateSpec(ol,outerTempArgList,pageType,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");
}
// repeat brief description // repeat brief description
if (!briefDescription().isEmpty() && Config::repeatBriefFlag) if (!briefDescription().isEmpty() && Config::repeatBriefFlag)
...@@ -1009,6 +1015,10 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1009,6 +1015,10 @@ void ClassDef::writeDocumentation(OutputList &ol)
writeSourceDef(ol,name()); writeSourceDef(ol,name());
ol.endTextBlock(); ol.endTextBlock();
} }
else
{
writeTemplateSpec(ol,outerTempArgList,pageType,name());
}
typedefMembers.countDocMembers(); typedefMembers.countDocMembers();
if (typedefMembers.totalCount()>0) if (typedefMembers.totalCount()>0)
......
/* 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 * from config_templ.h
* *
* DO NOT EDIT! * DO NOT EDIT!
...@@ -97,6 +97,7 @@ struct Config ...@@ -97,6 +97,7 @@ struct Config
static bool htmlHelpFlag; // should html help files be generated? static bool htmlHelpFlag; // should html help files be generated?
static bool noIndexFlag; // generate condensed index flag static bool noIndexFlag; // generate condensed index flag
static int enumValuesPerLine; // number of enum values that are put on one line 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 bool generateLatex; // generate Latex output
static QCString latexOutputDir; // the directory to put the Latex files static QCString latexOutputDir; // the directory to put the Latex files
static bool compactLatexFlag; // generate compact LaTeX documentation. static bool compactLatexFlag; // generate compact LaTeX documentation.
......
/* 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 * from config_templ.l
* *
* DO NOT EDIT! * DO NOT EDIT!
...@@ -134,6 +134,7 @@ bool Config::htmlAlignMemberFlag = TRUE; ...@@ -134,6 +134,7 @@ bool Config::htmlAlignMemberFlag = TRUE;
bool Config::htmlHelpFlag = FALSE; bool Config::htmlHelpFlag = FALSE;
bool Config::noIndexFlag = FALSE; bool Config::noIndexFlag = FALSE;
int Config::enumValuesPerLine = 4; int Config::enumValuesPerLine = 4;
bool Config::ftvHelpFlag = FALSE;
bool Config::generateLatex = TRUE; bool Config::generateLatex = TRUE;
QCString Config::latexOutputDir = "latex"; QCString Config::latexOutputDir = "latex";
bool Config::compactLatexFlag = FALSE; bool Config::compactLatexFlag = FALSE;
...@@ -411,6 +412,7 @@ static void readIncludeFile(const char *incName) ...@@ -411,6 +412,7 @@ static void readIncludeFile(const char *incName)
<Start>"GENERATE_HTMLHELP"[ \t]*"=" { BEGIN(GetBool); b=&Config::htmlHelpFlag; } <Start>"GENERATE_HTMLHELP"[ \t]*"=" { BEGIN(GetBool); b=&Config::htmlHelpFlag; }
<Start>"DISABLE_INDEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::noIndexFlag; } <Start>"DISABLE_INDEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::noIndexFlag; }
<Start>"ENUM_VALUES_PER_LINE"[ \t]*"=" { BEGIN(GetString); s=&enumValuesPerLineString; s->resize(0); } <Start>"ENUM_VALUES_PER_LINE"[ \t]*"=" { BEGIN(GetString); s=&enumValuesPerLineString; s->resize(0); }
<Start>"GENERATE_TREEVIEW"[ \t]*"=" { BEGIN(GetBool); b=&Config::ftvHelpFlag; }
<Start>"GENERATE_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateLatex; } <Start>"GENERATE_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateLatex; }
<Start>"LATEX_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::latexOutputDir; s->resize(0); } <Start>"LATEX_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::latexOutputDir; s->resize(0); }
<Start>"COMPACT_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactLatexFlag; } <Start>"COMPACT_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactLatexFlag; }
...@@ -710,6 +712,7 @@ void dumpConfig() ...@@ -710,6 +712,7 @@ void dumpConfig()
printf("htmlHelpFlag=`%d'\n",Config::htmlHelpFlag); printf("htmlHelpFlag=`%d'\n",Config::htmlHelpFlag);
printf("noIndexFlag=`%d'\n",Config::noIndexFlag); printf("noIndexFlag=`%d'\n",Config::noIndexFlag);
printf("enumValuesPerLine=`%d'\n",Config::enumValuesPerLine); printf("enumValuesPerLine=`%d'\n",Config::enumValuesPerLine);
printf("ftvHelpFlag=`%d'\n",Config::ftvHelpFlag);
printf("# configuration options related to the LaTeX output\n"); printf("# configuration options related to the LaTeX output\n");
printf("generateLatex=`%d'\n",Config::generateLatex); printf("generateLatex=`%d'\n",Config::generateLatex);
printf("latexOutputDir=`%s'\n",Config::latexOutputDir.data()); printf("latexOutputDir=`%s'\n",Config::latexOutputDir.data());
...@@ -878,6 +881,7 @@ void Config::init() ...@@ -878,6 +881,7 @@ void Config::init()
Config::htmlHelpFlag = FALSE; Config::htmlHelpFlag = FALSE;
Config::noIndexFlag = FALSE; Config::noIndexFlag = FALSE;
Config::enumValuesPerLine = 4; Config::enumValuesPerLine = 4;
Config::ftvHelpFlag = FALSE;
Config::generateLatex = TRUE; Config::generateLatex = TRUE;
Config::latexOutputDir = "latex"; Config::latexOutputDir = "latex";
Config::compactLatexFlag = FALSE; Config::compactLatexFlag = FALSE;
...@@ -1037,8 +1041,8 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -1037,8 +1041,8 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# information to generate all constant output in the proper language. \n"; t << "# information to generate all constant output in the proper language. \n";
t << "# The default language is English, other supported languages are: \n"; t << "# The default language is English, other supported languages are: \n";
t << "# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, \n"; t << "# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, \n";
t << "# Korean, Hungarian, Spanish, Romanian, Russian, Croatian, Polish, \n"; t << "# Korean, Hungarian, Norwegian, Spanish, Romanian, Russian, Croatian, \n";
t << "# Portuguese and Slovene.\n"; t << "# Polish, Portuguese and Slovene.\n";
t << "\n"; t << "\n";
} }
t << "OUTPUT_LANGUAGE = "; t << "OUTPUT_LANGUAGE = ";
...@@ -1706,6 +1710,19 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -1706,6 +1710,19 @@ void writeTemplateConfig(QFile *f,bool sl)
writeIntValue(t,Config::enumValuesPerLine); writeIntValue(t,Config::enumValuesPerLine);
t << "\n"; t << "\n";
if (!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";
} }
......
...@@ -756,7 +756,7 @@ FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]+ ...@@ -756,7 +756,7 @@ FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]+
ID [a-z_A-Z][a-z_A-Z0-9]* ID [a-z_A-Z][a-z_A-Z0-9]*
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+ SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+
URLMASK [a-z_A-Z0-9\~\:\?\@\#\.\-\+\/\=]+ URLMASK [a-z_A-Z0-9\~\:\?\@\%\#\.\-\+\/\=]+
NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9] NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9]
WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]"\"") WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]"\"")
ATTR ({B}+[^>\n]*)? ATTR ({B}+[^>\n]*)?
...@@ -966,7 +966,10 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -966,7 +966,10 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
<DocLink,DocLinkText>{CMD}"endlink" { // <- needed for things like \endlink. <DocLink,DocLinkText>{CMD}"endlink" { // <- needed for things like \endlink.
//printf("GenerateLink className=`%s' linkRef=`%s' linkText=`%s'\n", //printf("GenerateLink className=`%s' linkRef=`%s' linkText=`%s'\n",
// className.data(),linkRef.data(),linkText.data()); // 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 ); BEGIN( DocScan );
} }
<DocScan>{CMD}"endlink"/[^a-z_A-Z0-9] { warn(yyFileName,yyLineNr, <DocScan>{CMD}"endlink"/[^a-z_A-Z0-9] { warn(yyFileName,yyLineNr,
...@@ -2007,6 +2010,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -2007,6 +2010,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
<DocScan,DocEmphasis,DocBold,DocCode>"%"[a-zA-Z_0-9\-]+ { <DocScan,DocEmphasis,DocBold,DocCode>"%"[a-zA-Z_0-9\-]+ {
outDoc->docify(yytext+1); outDoc->docify(yytext+1);
} }
<DocEmphasis>{FILEMASK} {
outDoc->startEmphasis();
generateFileRef(*outDoc,yytext);
outDoc->endEmphasis();
BEGIN( DocScan );
}
<DocEmphasis>[a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()|\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" { <DocEmphasis>[a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()|\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" {
outDoc->startEmphasis(); outDoc->startEmphasis();
generateRef(*outDoc,className,yytext,inSeeBlock); generateRef(*outDoc,className,yytext,inSeeBlock);
...@@ -2019,6 +2028,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -2019,6 +2028,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->endEmphasis(); outDoc->endEmphasis();
BEGIN( DocScan ); BEGIN( DocScan );
} }
<DocBold>{FILEMASK} {
outDoc->startBold();
generateFileRef(*outDoc,yytext);
outDoc->endBold();
BEGIN( DocScan );
}
<DocBold>[a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()|\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" { <DocBold>[a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()|\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" {
outDoc->startBold(); outDoc->startBold();
generateRef(*outDoc,className,yytext,inSeeBlock); generateRef(*outDoc,className,yytext,inSeeBlock);
...@@ -2031,6 +2046,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -2031,6 +2046,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->endBold(); outDoc->endBold();
BEGIN( DocScan ); BEGIN( DocScan );
} }
<DocCode>{FILEMASK} {
outDoc->startTypewriter();
generateFileRef(*outDoc,yytext);
outDoc->endTypewriter();
BEGIN( DocScan );
}
<DocCode>[a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()!\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" { <DocCode>[a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()!\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" {
outDoc->startTypewriter(); outDoc->startTypewriter();
generateRef(*outDoc,className,yytext,inSeeBlock); generateRef(*outDoc,className,yytext,inSeeBlock);
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include "language.h" #include "language.h"
#include "debug.h" #include "debug.h"
#include "htmlhelp.h" #include "htmlhelp.h"
#include "ftvhelp.h"
#include "defargs.h" #include "defargs.h"
#include "rtfgen.h" #include "rtfgen.h"
#include "xml.h" #include "xml.h"
...@@ -193,6 +194,7 @@ int documentedGroups; ...@@ -193,6 +194,7 @@ int documentedGroups;
int documentedNamespaces; int documentedNamespaces;
int documentedNamespaceMembers; int documentedNamespaceMembers;
int documentedIncludeFiles; int documentedIncludeFiles;
int documentedPages;
QTextStream tagFile; QTextStream tagFile;
...@@ -218,7 +220,7 @@ const char *getOverloadDocs() ...@@ -218,7 +220,7 @@ const char *getOverloadDocs()
static void addRelatedPage(const char *name,const QCString &ptitle, static void addRelatedPage(const char *name,const QCString &ptitle,
const QCString &doc,QList<QCString> *anchors, const QCString &doc,QList<QCString> *anchors,
const char *fileName,int startLine, const char *fileName,int startLine,
int todoId,int testId int todoId,int testId,GroupDef *gd=0
) )
{ {
PageInfo *pi=0; PageInfo *pi=0;
...@@ -252,6 +254,8 @@ static void addRelatedPage(const char *name,const QCString &ptitle, ...@@ -252,6 +254,8 @@ static void addRelatedPage(const char *name,const QCString &ptitle,
pageSDict->append(baseName,pi); pageSDict->append(baseName,pi);
if (gd) gd->addPage(pi);
if (!pi->title.isEmpty()) if (!pi->title.isEmpty())
{ {
//outputList->writeTitle(pi->name,pi->title); //outputList->writeTitle(pi->name,pi->title);
...@@ -259,7 +263,14 @@ static void addRelatedPage(const char *name,const QCString &ptitle, ...@@ -259,7 +263,14 @@ static void addRelatedPage(const char *name,const QCString &ptitle,
// a page name is a label as well! // a page name is a label as well!
SectionInfo *si=new SectionInfo( SectionInfo *si=new SectionInfo(
pi->name,pi->title,SectionInfo::Section); pi->name,pi->title,SectionInfo::Section);
if (gd)
{
si->fileName=gd->getOutputFileBase();
}
else
{
si->fileName=pageName; si->fileName=pageName;
}
//printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data()); //printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data());
//printf("Adding section info %s\n",pi->name.data()); //printf("Adding section info %s\n",pi->name.data());
sectionDict.insert(pageName,si); sectionDict.insert(pageName,si);
...@@ -267,6 +278,20 @@ static void addRelatedPage(const char *name,const QCString &ptitle, ...@@ -267,6 +278,20 @@ static void addRelatedPage(const char *name,const QCString &ptitle,
} }
} }
static void addRelatedPage(Entry *root)
{
GroupDef *gd=0;
QListIterator<QCString> 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, static void addRefItem(int todoId,int testId,const char *prefix,
...@@ -1754,7 +1779,11 @@ static void buildMemberList(Entry *root) ...@@ -1754,7 +1779,11 @@ static void buildMemberList(Entry *root)
QCString nsName,rnsName; QCString nsName,rnsName;
if (nd) nsName = nd->name().copy(); if (nd) nsName = nd->name().copy();
if (rnd) rnsName = rnd->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("namespace `%s' `%s'\n",nsName.data(),rnsName.data());
//printf("groupNames `%s' `%s'\n",groupName.data(),rgroupName.data());
if ( if (
matchArguments(md->argumentList(),root->argList,0,nsName) matchArguments(md->argumentList(),root->argList,0,nsName)
) )
...@@ -1764,7 +1793,10 @@ static void buildMemberList(Entry *root) ...@@ -1764,7 +1793,10 @@ static void buildMemberList(Entry *root)
((fd!=0 && // no external reference and ((fd!=0 && // no external reference and
fd->absFilePath()==root->fileName // prototype in the same file 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 // otherwise, allow a duplicate global member with the same argument list
...@@ -4565,9 +4597,7 @@ static void buildPageList(Entry *root) ...@@ -4565,9 +4597,7 @@ static void buildPageList(Entry *root)
{ {
if (!root->name.isEmpty()) if (!root->name.isEmpty())
{ {
addRelatedPage(root->name,root->args,root->doc,root->anchors, addRelatedPage(root);
root->fileName,root->startLine,root->todoId,root->testId
);
} }
} }
else if (root->section == Entry::MAINPAGEDOC_SEC) else if (root->section == Entry::MAINPAGEDOC_SEC)
...@@ -4670,9 +4700,12 @@ static void resolveUserReferences() ...@@ -4670,9 +4700,12 @@ static void resolveUserReferences()
static void generatePageDocs() static void generatePageDocs()
{ {
if (documentedPages==0) return;
PageSDictIterator pdi(*pageSDict); PageSDictIterator pdi(*pageSDict);
PageInfo *pi=0; PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
{
if (!pi->inGroup)
{ {
msg("Generating docs for page %s...\n",pi->name.data()); msg("Generating docs for page %s...\n",pi->name.data());
outputList->disable(OutputGenerator::Man); outputList->disable(OutputGenerator::Man);
...@@ -4697,6 +4730,7 @@ static void generatePageDocs() ...@@ -4697,6 +4730,7 @@ static void generatePageDocs()
endFile(*outputList); endFile(*outputList);
outputList->enable(OutputGenerator::Man); outputList->enable(OutputGenerator::Man);
} }
}
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -4724,6 +4758,7 @@ static void buildExampleList(Entry *root) ...@@ -4724,6 +4758,7 @@ static void buildExampleList(Entry *root)
convertFileName(pi->name)+"-example" convertFileName(pi->name)+"-example"
); );
exampleSDict->inSort(root->name,pi); exampleSDict->inSort(root->name,pi);
addExampleToGroups(root,pi);
} }
} }
} }
...@@ -4774,13 +4809,17 @@ static void generateGroupDocs() ...@@ -4774,13 +4809,17 @@ static void generateGroupDocs()
for (;(gd=gli.current());++gli) for (;(gd=gli.current());++gli)
{ {
//printf("group %s #members=%d\n",gd->name().data(),gd->countMembers()); //printf("group %s #members=%d\n",gd->name().data(),gd->countMembers());
if (gd->countMembers()>0) gd->writeDocumentation(*outputList); //if (gd->countMembers()>0)
else //{
{ // gd->writeDocumentation(*outputList);
warn(gd->getDefFileName(),gd->getDefLine(), //}
"Warning: group %s does not have any (documented) members.", //else
gd->name().data()); //{
} // 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) ...@@ -5709,6 +5748,7 @@ int main(int argc,char **argv)
outputList->add(new HtmlGenerator); outputList->add(new HtmlGenerator);
HtmlGenerator::init(); HtmlGenerator::init();
if (Config::htmlHelpFlag) HtmlHelp::getInstance()->initialize(); if (Config::htmlHelpFlag) HtmlHelp::getInstance()->initialize();
if (Config::ftvHelpFlag) FTVHelp::getInstance()->initialize();
copyStyleSheet(); copyStyleSheet();
} }
if (Config::generateLatex) if (Config::generateLatex)
...@@ -6037,6 +6077,7 @@ int main(int argc,char **argv) ...@@ -6037,6 +6077,7 @@ int main(int argc,char **argv)
documentedGroups = countGroups(); documentedGroups = countGroups();
documentedNamespaces = countNamespaces(); documentedNamespaces = countNamespaces();
documentedNamespaceMembers = countNamespaceMembers(); documentedNamespaceMembers = countNamespaceMembers();
documentedPages = countRelatedPages();
//documentedIncludeFiles = countIncludeFiles(); //documentedIncludeFiles = countIncludeFiles();
// compute the shortest possible names of all files // compute the shortest possible names of all files
...@@ -6154,6 +6195,10 @@ int main(int argc,char **argv) ...@@ -6154,6 +6195,10 @@ int main(int argc,char **argv)
{ {
HtmlHelp::getInstance()->finalize(); HtmlHelp::getInstance()->finalize();
} }
if (Config::generateHtml && Config::ftvHelpFlag)
{
FTVHelp::getInstance()->finalize();
}
if (Config::generateHtml) removeDoxFont(Config::htmlOutputDir); if (Config::generateHtml) removeDoxFont(Config::htmlOutputDir);
......
...@@ -116,6 +116,7 @@ extern int documentedGroups; ...@@ -116,6 +116,7 @@ extern int documentedGroups;
extern int documentedNamespaces; extern int documentedNamespaces;
extern int documentedNamespaceMembers; extern int documentedNamespaceMembers;
extern int documentedIncludeFiles; extern int documentedIncludeFiles;
extern int documentedPages;
extern QCString spaces; extern QCString spaces;
extern const char * getOverloadDocs(); extern const char * getOverloadDocs();
......
...@@ -27,7 +27,8 @@ HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \ ...@@ -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_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 \ 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 \ 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 \ SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \
memberdef.cpp membername.cpp index.cpp memberlist.cpp \ memberdef.cpp membername.cpp index.cpp memberlist.cpp \
entry.cpp logos.cpp instdox.cpp message.cpp code.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 \ ...@@ -38,7 +39,7 @@ SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \
diagram.cpp gifenc.cpp image.cpp namespacedef.cpp \ diagram.cpp gifenc.cpp image.cpp namespacedef.cpp \
version.cpp language.cpp definition.cpp formula.cpp debug.cpp \ version.cpp language.cpp definition.cpp formula.cpp debug.cpp \
membergroup.cpp htmlhelp.cpp dot.cpp rtfgen.cpp xml.cpp \ membergroup.cpp htmlhelp.cpp dot.cpp rtfgen.cpp xml.cpp \
reflist.cpp reflist.cpp ftvhelp.cpp
unix:LIBS += -L../qtools -lqtools unix:LIBS += -L../qtools -lqtools
win32:INCLUDEPATH += . win32:INCLUDEPATH += .
win32:LIBS += qtools.lib shell32.lib win32:LIBS += qtools.lib shell32.lib
......
...@@ -81,3 +81,6 @@ sub GenerateDep { ...@@ -81,3 +81,6 @@ sub GenerateDep {
xml_dtd.h: doxygen.dtd xml_dtd.h: doxygen.dtd
cat doxygen.dtd | sed -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >xml_dtd.h 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
/******************************************************************************
* ftvhelp.cpp,v 1.0 2000/09/06 16:09:00
*
* Kenney Wong <kwong@ea.com>
*
* 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 <stdio.h>
#include <stdlib.h>
#include <qlist.h>
#include <qdict.h>
#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 << "<html><head><title>" << Config::projectName << "</title></head>" << endl;
t << "<frameset cols=\"250,*\">" << endl;
t << " <frame src=\"tree.html\" name=\"treefrm\">" << endl;
t << " <frame src=\"main.html\" name=\"basefrm\">" << endl;
t << "</frameset>" << endl;
t << "</html>" << 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 << "<html><head>" << endl;
t << "<link rel=\"stylesheet\" href=\"doxygen.css\">" << endl;
t << "<script src=\"treeview.js\"></script>" << endl;
t << "<script src=\"tree.js\"></script>" << endl;
t << "<script>" << endl;
t << "initializeDocument()" << endl;
t << "</script>" << endl;
t << "</head>" << endl;
t << "<body bgcolor=\"#ffffff\">" << endl;
t << "</body>" << endl;
t << "</html>" << 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(\"<b>";
if (Config::projectName.isEmpty())
{
m_cts << "Root";
}
else
{
m_cts << Config::projectName;
}
m_cts << "</b>\", \"\")\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<m_dc+1;i++) m_cts << " ";
return ++m_dc;
}
/*! Decrease the level of the contents hierarchy.
* This will end the current sublist.
* \sa incContentsDepth()
*/
int FTVHelp::decContentsDepth()
{
//int i; for (i=0;i<m_dc;i++) m_cts << " ";
return --m_dc;
}
/*! Add a list item to the contents file.
* \param isDir TRUE if the item is a directory, FALSE if it is a text
* \param name the name of the item.
* \param ref the URL of to the item.
*/
void FTVHelp::addContentsItem(bool isDir,const char *name,const char *ref,
const char *anchor)
{
int i; for (i=0;i<m_dc;i++) m_cts << " ";
QCString parent;
if (m_dc==0) parent="foldersTree"; else parent.sprintf("aux%d",m_dc);
if (isDir) // directory entry
{
m_cts << "aux" << m_dc+1 << " = insFld(" << parent << ", gFld(\"" << name << "\", ";
if (ref) // ref optional param
{
m_cts << "\"" << ref << ".html\"))";
}
else
{
m_cts << "\"\"))";
}
}
else // text entry
{
m_cts << " insDoc(" << parent << ", gLnk(0, \"" << name << "\", ";
if (ref) // ref optional param
{
m_cts << "\"" << ref << ".html";
if (anchor) m_cts << "#" << anchor;
m_cts << "\"))";
}
else
{
m_cts << "\"\"))";
}
}
m_cts << "\n";
}
/******************************************************************************
* ftvhelp.h,v 1.0 2000/09/06 16:09:00
*
* Kenney Wong <kwong@ea.com>
*
* 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 <qtextstream.h>
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 */
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "message.h" #include "message.h"
#include "membergroup.h" #include "membergroup.h"
#include "doxygen.h" #include "doxygen.h"
#include "page.h"
GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) : GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) :
Definition(df,dl,na) Definition(df,dl,na)
...@@ -38,7 +39,8 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) : ...@@ -38,7 +39,8 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) :
classList = new ClassList; classList = new ClassList;
groupList = new GroupList; groupList = new GroupList;
namespaceList = new NamespaceList; namespaceList = new NamespaceList;
pageDict = new PageSDict(257);
exampleDict = new PageSDict(257);
allMemberList = new MemberList; allMemberList = new MemberList;
allMemberDict = new QDict<MemberDef>; allMemberDict = new QDict<MemberDef>;
if (t) if (t)
...@@ -52,6 +54,8 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) : ...@@ -52,6 +54,8 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) :
memberGroupList = new MemberGroupList; memberGroupList = new MemberGroupList;
memberGroupList->setAutoDelete(TRUE); memberGroupList->setAutoDelete(TRUE);
memberGroupDict = new MemberGroupDict(1009); memberGroupDict = new MemberGroupDict(1009);
visited = 0;
} }
GroupDef::~GroupDef() GroupDef::~GroupDef()
...@@ -60,6 +64,8 @@ GroupDef::~GroupDef() ...@@ -60,6 +64,8 @@ GroupDef::~GroupDef()
delete classList; delete classList;
delete groupList; delete groupList;
delete namespaceList; delete namespaceList;
delete pageDict;
delete exampleDict;
delete allMemberList; delete allMemberList;
delete allMemberDict; delete allMemberDict;
delete memberGroupList; delete memberGroupList;
...@@ -100,6 +106,17 @@ void GroupDef::addNamespace(const NamespaceDef *def) ...@@ -100,6 +106,17 @@ void GroupDef::addNamespace(const NamespaceDef *def)
namespaceList->append(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, void GroupDef::addMemberListToGroup(MemberList *ml,
bool (MemberDef::*func)() const) bool (MemberDef::*func)() const)
{ {
...@@ -214,7 +231,9 @@ int GroupDef::countMembers() const ...@@ -214,7 +231,9 @@ int GroupDef::countMembers() const
classList->count()+ classList->count()+
namespaceList->count()+ namespaceList->count()+
groupList->count()+ groupList->count()+
allMemberList->count(); allMemberList->count()+
pageDict->count()+
exampleDict->count();
} }
/*! Compute the HTML anchor names for all members in the class */ /*! Compute the HTML anchor names for all members in the class */
...@@ -249,6 +268,8 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -249,6 +268,8 @@ void GroupDef::writeDocumentation(OutputList &ol)
//ol.enable(OutputGenerator::Latex); //ol.enable(OutputGenerator::Latex);
ol.popGeneratorState(); ol.popGeneratorState();
} }
ol.startMemberSections(); ol.startMemberSections();
if (fileList->count()>0) if (fileList->count()>0)
{ {
...@@ -340,9 +361,12 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -340,9 +361,12 @@ void GroupDef::writeDocumentation(OutputList &ol)
allMemberList->writeDeclarations(ol,0,0,0,this,0,0); allMemberList->writeDeclarations(ol,0,0,0,this,0,0);
} }
ol.endMemberSections(); ol.endMemberSections();
//int dl=doc.length();
//doc=doc.stripWhiteSpace();
if (!briefDescription().isEmpty() || !documentation().isEmpty()) if (!briefDescription().isEmpty() || !documentation().isEmpty())
{
if (pageDict->count()!=countMembers()) // classical layout
{ {
ol.writeRuler(); ol.writeRuler();
ol.pushGeneratorState(); ol.pushGeneratorState();
...@@ -353,18 +377,43 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -353,18 +377,43 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription()); parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader(); ol.endGroupHeader();
// repeat brief description // repeat brief description
if (!briefDescription().isEmpty()) if (!briefDescription().isEmpty() && Config::repeatBriefFlag)
{ {
ol+=briefOutput; ol+=briefOutput;
ol.newParagraph(); ol.newParagraph();
} }
}
// write documentation // write documentation
if (!documentation().isEmpty()) if (!documentation().isEmpty())
{ {
parseDoc(ol,defFileName,defLine,name(),0,documentation()+"\n"); 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); defineMembers.countDocMembers(TRUE);
if (defineMembers.totalCount()>0 ) if (defineMembers.totalCount()>0 )
...@@ -507,3 +556,20 @@ void addMemberToGroups(Entry *root,MemberDef *md) ...@@ -507,3 +556,20 @@ void addMemberToGroups(Entry *root,MemberDef *md)
} }
} }
void addExampleToGroups(Entry *root,PageInfo *eg)
{
QListIterator<QCString> 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());
}
}
}
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "definition.h" #include "definition.h"
#include "memberlist.h" #include "memberlist.h"
#include "memberdef.h" #include "memberdef.h"
#include "htmlhelp.h"
class FileList; class FileList;
class ClassList; class ClassList;
...@@ -35,6 +36,8 @@ class OutputList; ...@@ -35,6 +36,8 @@ class OutputList;
class NamespaceList; class NamespaceList;
class MemberGroupList; class MemberGroupList;
class MemberGroupDict; class MemberGroupDict;
class PageSDict;
class PageInfo;
class GroupDef : public Definition class GroupDef : public Definition
{ {
...@@ -48,6 +51,8 @@ class GroupDef : public Definition ...@@ -48,6 +51,8 @@ class GroupDef : public Definition
void addClass(const ClassDef *def); void addClass(const ClassDef *def);
void addNamespace(const NamespaceDef *def); void addNamespace(const NamespaceDef *def);
void addGroup(const GroupDef *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 insertMember(MemberDef *def);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
int countMembers() const; int countMembers() const;
...@@ -64,6 +69,10 @@ class GroupDef : public Definition ...@@ -64,6 +69,10 @@ class GroupDef : public Definition
void addMembersToMemberGroup(); void addMembersToMemberGroup();
void distributeMemberGroupDocumentation(); 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: protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const); void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
...@@ -74,6 +83,8 @@ class GroupDef : public Definition ...@@ -74,6 +83,8 @@ class GroupDef : public Definition
ClassList *classList; // list of classes in the group ClassList *classList; // list of classes in the group
NamespaceList *namespaceList; // list of namespaces in the group NamespaceList *namespaceList; // list of namespaces in the group
GroupList *groupList; // list of sub groups. 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 MemberList *allMemberList; // list of all members in the group
QDict<MemberDef> *allMemberDict; QDict<MemberDef> *allMemberDict;
...@@ -107,5 +118,8 @@ void addClassToGroups(Entry *root,ClassDef *cd); ...@@ -107,5 +118,8 @@ void addClassToGroups(Entry *root,ClassDef *cd);
void addNamespaceToGroups(Entry *root,NamespaceDef *nd); void addNamespaceToGroups(Entry *root,NamespaceDef *nd);
void addGroupToGroups(Entry *root,GroupDef *subGroup); void addGroupToGroups(Entry *root,GroupDef *subGroup);
void addMemberToGroups(Entry *root,MemberDef *md); void addMemberToGroups(Entry *root,MemberDef *md);
void addPageToGroups(Entry *root,PageInfo *pi);
void addExampleToGroups(Entry *root,PageInfo *eg);
#endif #endif
...@@ -60,8 +60,6 @@ static const char *defaultStyleSheet = ...@@ -60,8 +60,6 @@ static const char *defaultStyleSheet =
"FONT.charliteral { color: #008080 }\n"; "FONT.charliteral { color: #008080 }\n";
HtmlHelp *HtmlGenerator::htmlHelp = 0;
HtmlGenerator::HtmlGenerator() : OutputGenerator() HtmlGenerator::HtmlGenerator() : OutputGenerator()
{ {
if (!Config::headerFile.isEmpty()) header=fileToString(Config::headerFile); if (!Config::headerFile.isEmpty()) header=fileToString(Config::headerFile);
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include "outputgen.h" #include "outputgen.h"
class QFile; class QFile;
class HtmlHelp;
class HtmlGenerator : public OutputGenerator class HtmlGenerator : public OutputGenerator
{ {
...@@ -249,7 +248,6 @@ class HtmlGenerator : public OutputGenerator ...@@ -249,7 +248,6 @@ class HtmlGenerator : public OutputGenerator
HtmlGenerator &operator=(const HtmlGenerator &g); HtmlGenerator &operator=(const HtmlGenerator &g);
HtmlGenerator(const HtmlGenerator &g); HtmlGenerator(const HtmlGenerator &g);
static HtmlHelp *htmlHelp;
int col; int col;
}; };
......
...@@ -267,7 +267,7 @@ void HtmlHelp::initialize() ...@@ -267,7 +267,7 @@ void HtmlHelp::initialize()
cts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n" cts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
"<HTML><HEAD></HEAD><BODY>\n" "<HTML><HEAD></HEAD><BODY>\n"
"<OBJECT type=\"text/site properties\">\n" "<OBJECT type=\"text/site properties\">\n"
"<param name=\"ImageType\" value=\"Folder\">\n" "<param name=\"FrameName\" value=\"right\">\n"
"</OBJECT>\n" "</OBJECT>\n"
"<UL>\n"; "<UL>\n";
...@@ -284,7 +284,7 @@ void HtmlHelp::initialize() ...@@ -284,7 +284,7 @@ void HtmlHelp::initialize()
kts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n" kts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
"<HTML><HEAD></HEAD><BODY>\n" "<HTML><HEAD></HEAD><BODY>\n"
"<OBJECT type=\"text/site properties\">\n" "<OBJECT type=\"text/site properties\">\n"
"<param name=\"ImageType\" value=\"Folder\">\n" "<param name=\"FrameName\" value=\"right\">\n"
"</OBJECT>\n" "</OBJECT>\n"
"<UL>\n"; "<UL>\n";
} }
...@@ -297,19 +297,21 @@ void HtmlHelp::createProjectFile() ...@@ -297,19 +297,21 @@ void HtmlHelp::createProjectFile()
if (f.open(IO_WriteOnly)) if (f.open(IO_WriteOnly))
{ {
QTextStream t(&f); QTextStream t(&f);
QCString indexName="index.html";
if (Config::ftvHelpFlag) indexName="main.html";
t << "[OPTIONS]\n" t << "[OPTIONS]\n"
"Compatibility=1.1\n" "Compatibility=1.1\n"
"Full-text search=Yes\n" "Full-text search=Yes\n"
"Contents file=index.hhc\n" "Contents file=index.hhc\n"
"Default Window=main\n" "Default Window=main\n"
"Default topic=index.html\n" "Default topic=" << indexName << "\n"
"Index file=index.hhk\n" "Index file=index.hhk\n"
"Title=" << Config::projectName << endl << endl; "Title=" << Config::projectName << endl << endl;
t << "[WINDOWS]" << endl; t << "[WINDOWS]" << endl;
t << "main=\"" << Config::projectName << "\",\"index.hhc\"," t << "main=\"" << Config::projectName << "\",\"index.hhc\","
"\"index.hhk\",\"index.html\",\"index.html\",,,,,0x23520,," "\"index.hhk\",\"" << indexName << "\",\"" <<
"0x3006,,,,,,,,0" << endl << endl; indexName << "\",,,,,0x23520,,0x3006,,,,,,,,0" << endl << endl;
t << "[FILES]" << endl; t << "[FILES]" << endl;
char *s = indexFiles.first(); char *s = indexFiles.first();
...@@ -380,19 +382,30 @@ int HtmlHelp::decContentsDepth() ...@@ -380,19 +382,30 @@ int HtmlHelp::decContentsDepth()
* \param name the name of the item. * \param name the name of the item.
* \param ref the URL of to the item. * \param ref the URL of to the item.
*/ */
void HtmlHelp::addContentsItem(const char *name,const char *ref, void HtmlHelp::addContentsItem(bool isDir,
const char *name,const char *ref,
const char *anchor) const char *anchor)
{ {
int i; for (i=0;i<dc;i++) cts << " "; int i; for (i=0;i<dc;i++) cts << " ";
cts << "<LI><OBJECT type=\"text/sitemap\">"; cts << "<LI><OBJECT type=\"text/sitemap\">";
if (ref) cts << "<param name=\"Name\" value=\"" << name << "\">";
if (ref) // made ref optional param - KPW
{ {
cts << "<param name=\"Local\" value=\"" << ref << ".html"; cts << "<param name=\"Local\" value=\"" << ref << ".html";
if (anchor) cts << "#" << anchor; if (anchor) cts << "#" << anchor;
cts << "\">"; cts << "\">";
} }
cts << "<param name=\"Name\" value=\"" << name << "\">" cts << "<param name=\"ImageNumber\" value=\"";
"</OBJECT>\n"; if (isDir) // added - KPW
{
cts << (int)BOOK_CLOSED ;
}
else
{
cts << (int)TEXT;
}
cts << "\">";
cts << "</OBJECT>\n";
} }
/*! Add an list item to the index file. /*! Add an list item to the index file.
...@@ -406,3 +419,4 @@ void HtmlHelp::addIndexItem(const char *level1, const char *level2, ...@@ -406,3 +419,4 @@ void HtmlHelp::addIndexItem(const char *level1, const char *level2,
index->addItem(level1,level2,ref,anchor,TRUE); index->addItem(level1,level2,ref,anchor,TRUE);
index->addItem(level2,level1,ref,anchor,FALSE); index->addItem(level2,level1,ref,anchor,FALSE);
} }
...@@ -34,6 +34,32 @@ class HtmlHelpIndex; ...@@ -34,6 +34,32 @@ class HtmlHelpIndex;
*/ */
class HtmlHelp class HtmlHelp
{ {
/*! used in imageNumber param of HTMLHelp::addContentsItem() function
to specify document icon in tree view.
Writes <param name="ImageNumber" value="xx"> in .HHC file. */
enum ImageNumber {
BOOK_CLOSED=1, BOOK_OPEN,
BOOK_CLOSED_NEW, BOOK_OPEN_NEW,
FOLDER_CLOSED, FOLDER_OPEN,
FOLDER_CLOSED_NEW,FOLDER_OPEN_NEW,
QUERY, QUERY_NEW,
TEXT, TEXT_NEW,
WEB_DOC, WEB_DOC_NEW,
WEB_LINK, WEB_LINK_NEW,
INFO, INFO_NEW,
LINK, LINK_NEW,
BOOKLET, BOOKLET_NEW,
EMAIL, EMAIL_NEW,
EMAIL2, EMAIL2_NEW,
IMAGE, IMAGE_NEW,
AUDIO, AUDIO_NEW,
MUSIC, MUSIC_NEW,
VIDEO, VIDEO_NEW,
INDEX, INDEX_NEW,
IDEA, IDEA_NEW,
NOTE, NOTE_NEW,
TOOL, TOOL_NEW
};
public: public:
static HtmlHelp *getInstance(); static HtmlHelp *getInstance();
void initialize(); void initialize();
...@@ -42,12 +68,16 @@ class HtmlHelp ...@@ -42,12 +68,16 @@ class HtmlHelp
int decContentsDepth(); int decContentsDepth();
/*! return the current depth of the contents tree */ /*! return the current depth of the contents tree */
int contentsDepth() { return dc; } int contentsDepth() { return dc; }
void addContentsItem(const char *name, const char *ref, // added imageNumber - KPW
void addContentsItem(bool isDir,
const char *name,
const char *ref = 0,
const char *anchor = 0); const char *anchor = 0);
void addIndexItem(const char *level1, const char *level2, void addIndexItem(const char *level1, const char *level2,
const char *ref, const char *anchor); const char *ref, const char *anchor);
void addIndexFile(const char *name); void addIndexFile(const char *name);
private: private:
void createProjectFile(); void createProjectFile();
...@@ -61,3 +91,4 @@ class HtmlHelp ...@@ -61,3 +91,4 @@ class HtmlHelp
}; };
#endif /* HTMLHELP_H */ #endif /* HTMLHELP_H */
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "groupdef.h" #include "groupdef.h"
#include "language.h" #include "language.h"
#include "htmlhelp.h" #include "htmlhelp.h"
#include "ftvhelp.h"
#include "dot.h" #include "dot.h"
#include "page.h" #include "page.h"
...@@ -101,11 +102,17 @@ QCString abbreviate(const char *s,const char *name) ...@@ -101,11 +102,17 @@ QCString abbreviate(const char *s,const char *name)
void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
{ {
HtmlHelp *htmlHelp=0; HtmlHelp *htmlHelp=0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag; FTVHelp *ftvHelp=0;
if (Config::generateHtml && Config::htmlHelpFlag) bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
if (hasHtmlHelp)
{ {
htmlHelp = HtmlHelp::getInstance(); htmlHelp = HtmlHelp::getInstance();
} }
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
}
BaseClassListIterator bcli(*bcl); BaseClassListIterator bcli(*bcl);
bool started=FALSE; bool started=FALSE;
for ( ; bcli.current() ; ++bcli) for ( ; bcli.current() ; ++bcli)
...@@ -117,9 +124,11 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) ...@@ -117,9 +124,11 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
{ {
ol.startIndexList(); ol.startIndexList();
if (hasHtmlHelp) htmlHelp->incContentsDepth(); if (hasHtmlHelp) htmlHelp->incContentsDepth();
if (hasFtvHelp) ftvHelp->incContentsDepth();
started=TRUE; started=TRUE;
} }
//printf("Passed...\n"); //printf("Passed...\n");
bool hasChildren = !cd->visited && !hideSuper && cd->superClasses()->count()>0;
if (cd->isLinkable()) if (cd->isLinkable())
{ {
ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName()); ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName());
...@@ -131,19 +140,26 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) ...@@ -131,19 +140,26 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
} }
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addContentsItem(cd->name(),cd->getOutputFileBase()); htmlHelp->addContentsItem(hasChildren,cd->name(),cd->getOutputFileBase());
}
if (hasFtvHelp)
{
ftvHelp->addContentsItem(hasChildren,cd->name(),cd->getOutputFileBase());
} }
} }
else else
{ {
ol.writeIndexItem(0,0,cd->name()); ol.writeIndexItem(0,0,cd->name());
//if (hasHtmlHelp) htmlHelp->addContentsItem(cd->name(),"nodoc");
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addContentsItem(cd->name(),0); htmlHelp->addContentsItem(hasChildren,cd->name(),0);
}
if (hasFtvHelp)
{
ftvHelp->addContentsItem(hasChildren,cd->name(),0);
} }
} }
if (!cd->visited && !hideSuper && cd->superClasses()->count()>0) if (hasChildren)
{ {
//printf("Class %s at %p visited=%d\n",cd->name().data(),cd,cd->visited); //printf("Class %s at %p visited=%d\n",cd->name().data(),cd,cd->visited);
bool wasVisited=cd->visited; bool wasVisited=cd->visited;
...@@ -156,9 +172,118 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) ...@@ -156,9 +172,118 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
{ {
ol.endIndexList(); ol.endIndexList();
if (hasHtmlHelp) htmlHelp->decContentsDepth(); if (hasHtmlHelp) htmlHelp->decContentsDepth();
if (hasFtvHelp) ftvHelp->decContentsDepth();
} }
} }
#if 0
//----------------------------------------------------------------------------
/*! Generates HTML Help tree of classes */
void writeClassTree(BaseClassList *cl)
{
HtmlHelp *htmlHelp=0;
FTVHelp *ftvHelp=0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag && Config::htmlHelpGroupsOnly;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag && Config::htmlHelpGroupsOnly;
if (hasHtmlHelp)
{
htmlHelp = HtmlHelp::getInstance();
}
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
}
BaseClassListIterator cli(*cl);
bool started=FALSE;
for ( ; cli.current() ; ++cli)
{
ClassDef *cd=cli.current()->classDef;
if (cd->isVisibleInHierarchy() && !cd->visited)
{
if (!started)
{
if (hasHtmlHelp) htmlHelp->incContentsDepth();
if (hasFtvHelp) ftvHelp->incContentsDepth();
started=TRUE;
}
bool hasChildren = cd->superClasses()->count()>0;
if (cd->isLinkable())
{
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(hasChildren,cd->name(),cd->getOutputFileBase());
}
if (hasFtvHelp)
{
ftvHelp->addContentsItem(hasChildren,cd->name(),cd->getOutputFileBase());
}
}
if (hasChildren)
{
writeClassTree(cd->superClasses());
}
cd->visited=TRUE;
}
}
if (started)
{
if (hasHtmlHelp) htmlHelp->decContentsDepth();
if (hasFtvHelp) ftvHelp->decContentsDepth();
}
}
//----------------------------------------------------------------------------
/*! Generates HTML Help tree of classes */
void writeClassTree(ClassList *cl)
{
HtmlHelp *htmlHelp=0;
FTVHelp *ftvHelp=0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag && Config::htmlHelpGroupsOnly;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag && Config::htmlHelpGroupsOnly;
if (hasHtmlHelp)
{
htmlHelp = HtmlHelp::getInstance();
}
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
}
ClassListIterator cli(*cl);
bool started=FALSE;
for ( ; cli.current() ; ++cli)
{
ClassDef *cd=cli.current();
if (cd->isVisibleInHierarchy() && !cd->visited)
{
if (!started)
{
started=TRUE;
}
bool hasChildren = cd->superClasses()->count()>0;
if (cd->isLinkable())
{
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(hasChildren,cd->name(),cd->getOutputFileBase());
}
if (hasFtvHelp)
{
ftvHelp->addContentsItem(hasChildren,cd->name(),cd->getOutputFileBase());
}
}
if (hasChildren)
{
writeClassTree(cd->superClasses());
}
cd->visited=TRUE;
}
}
}
#endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void writeClassHierarchy(OutputList &ol) void writeClassHierarchy(OutputList &ol)
...@@ -166,11 +291,17 @@ void writeClassHierarchy(OutputList &ol) ...@@ -166,11 +291,17 @@ void writeClassHierarchy(OutputList &ol)
initClassHierarchy(&classList); initClassHierarchy(&classList);
HtmlHelp *htmlHelp=0; HtmlHelp *htmlHelp=0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag; FTVHelp *ftvHelp=0;
if (Config::generateHtml && Config::htmlHelpFlag) bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
if (hasHtmlHelp)
{ {
htmlHelp = HtmlHelp::getInstance(); htmlHelp = HtmlHelp::getInstance();
} }
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
}
bool started=FALSE; bool started=FALSE;
ClassListIterator cli(classList); ClassListIterator cli(classList);
...@@ -190,8 +321,10 @@ void writeClassHierarchy(OutputList &ol) ...@@ -190,8 +321,10 @@ void writeClassHierarchy(OutputList &ol)
{ {
ol.startIndexList(); ol.startIndexList();
if (hasHtmlHelp) htmlHelp->incContentsDepth(); if (hasHtmlHelp) htmlHelp->incContentsDepth();
if (hasFtvHelp) ftvHelp->incContentsDepth();
started=TRUE; started=TRUE;
} }
bool hasChildren = !cd->visited && cd->superClasses()->count()>0;
if (cd->isLinkable()) if (cd->isLinkable())
{ {
ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName()); ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName());
...@@ -203,20 +336,26 @@ void writeClassHierarchy(OutputList &ol) ...@@ -203,20 +336,26 @@ void writeClassHierarchy(OutputList &ol)
} }
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addContentsItem(cd->name(),cd->getOutputFileBase()); htmlHelp->addContentsItem(hasChildren,cd->name(),cd->getOutputFileBase());
//cd->writeMembersToContents(); }
if (hasFtvHelp)
{
ftvHelp->addContentsItem(hasChildren,cd->name(),cd->getOutputFileBase());
} }
} }
else else
{ {
ol.writeIndexItem(0,0,cd->displayName()); ol.writeIndexItem(0,0,cd->displayName());
//if (hasHtmlHelp) htmlHelp->addContentsItem(cd->name(),"nodoc");
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addContentsItem(cd->name(),0); htmlHelp->addContentsItem(hasChildren,cd->name(),0);
}
if (hasFtvHelp)
{
ftvHelp->addContentsItem(hasChildren,cd->name(),0);
} }
} }
if (!cd->visited && cd->superClasses()->count()>0) if (hasChildren)
{ {
writeClassTree(ol,cd->superClasses(),cd->visited); writeClassTree(ol,cd->superClasses(),cd->visited);
cd->visited=TRUE; cd->visited=TRUE;
...@@ -228,6 +367,7 @@ void writeClassHierarchy(OutputList &ol) ...@@ -228,6 +367,7 @@ void writeClassHierarchy(OutputList &ol)
{ {
ol.endIndexList(); ol.endIndexList();
if (hasHtmlHelp) htmlHelp->decContentsDepth(); if (hasHtmlHelp) htmlHelp->decContentsDepth();
if (hasFtvHelp) ftvHelp->decContentsDepth();
} }
} }
...@@ -256,15 +396,23 @@ void writeHierarchicalIndex(OutputList &ol) ...@@ -256,15 +396,23 @@ void writeHierarchicalIndex(OutputList &ol)
startFile(ol,"hierarchy","Hierarchical Index"); startFile(ol,"hierarchy","Hierarchical Index");
startTitle(ol,0); startTitle(ol,0);
QCString title = theTranslator->trClassHierarchy(); QCString title = theTranslator->trClassHierarchy();
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" "); if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" ");
parseText(ol,title); parseText(ol,title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
if (Config::generateHtml && Config::htmlHelpFlag) FTVHelp *ftvHelp = 0;
if (Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/)
{ {
htmlHelp = HtmlHelp::getInstance(); htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(title,"hierarchy"); htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"hierarchy");
}
if (Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/)
{
ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(TRUE,ftvHelpTitle,"hierarchy");
} }
if (Config::haveDotFlag && Config::gfxHierarchyFlag) if (Config::haveDotFlag && Config::gfxHierarchyFlag)
{ {
...@@ -295,21 +443,29 @@ void writeGraphicalClassHierarchy(OutputList &ol) ...@@ -295,21 +443,29 @@ void writeGraphicalClassHierarchy(OutputList &ol)
startFile(ol,"inherits","Graphical Class Hierarchy"); startFile(ol,"inherits","Graphical Class Hierarchy");
startTitle(ol,0); startTitle(ol,0);
QCString title = theTranslator->trGraphicalHierarchy(); QCString title = theTranslator->trGraphicalHierarchy();
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" "); if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" ");
parseText(ol,title); parseText(ol,title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
FTVHelp *ftvHelp = 0;
if (Config::generateHtml && Config::htmlHelpFlag) if (Config::generateHtml && Config::htmlHelpFlag)
{ {
htmlHelp = HtmlHelp::getInstance(); htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(title,"inherits"); htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"inherits");
}
if (Config::generateHtml && Config::ftvHelpFlag)
{
ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(FALSE,ftvHelpTitle,"inherits");
} }
ol.startTextLink("hierarchy",0); ol.startTextLink("hierarchy",0);
parseText(ol,theTranslator->trGotoTextualHierarchy()); parseText(ol,theTranslator->trGotoTextualHierarchy());
ol.endTextLink(); ol.endTextLink();
ol.newParagraph(); ol.newParagraph();
parseText(ol,theTranslator->trClassHierarchyDescription()); //parseText(ol,theTranslator->trClassHierarchyDescription());
//ol.newParagraph(); //ol.newParagraph();
ol.endTextBlock(); ol.endTextBlock();
DotGfxHierarchyTable g; DotGfxHierarchyTable g;
...@@ -363,18 +519,28 @@ void writeFileIndex(OutputList &ol) ...@@ -363,18 +519,28 @@ void writeFileIndex(OutputList &ol)
startFile(ol,"files","File Index"); startFile(ol,"files","File Index");
startTitle(ol,0); startTitle(ol,0);
QCString title = theTranslator->trFileList(); QCString title = theTranslator->trFileList();
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" "); if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" ");
parseText(ol,title); parseText(ol,title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag; FTVHelp *ftvHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp = HtmlHelp::getInstance(); htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(title,"files"); htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"files");
htmlHelp->incContentsDepth(); htmlHelp->incContentsDepth();
} }
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(TRUE,ftvHelpTitle,"files");
ftvHelp->incContentsDepth();
}
//ol.newParagraph(); //ol.newParagraph();
parseText(ol,theTranslator->trFileListDescription(Config::extractAllFlag)); parseText(ol,theTranslator->trFileListDescription(Config::extractAllFlag));
//ol.newParagraph(); //ol.newParagraph();
...@@ -468,7 +634,11 @@ void writeFileIndex(OutputList &ol) ...@@ -468,7 +634,11 @@ void writeFileIndex(OutputList &ol)
ol.writeObjectLink(0,fd->getOutputFileBase(),0,fd->name()); ol.writeObjectLink(0,fd->getOutputFileBase(),0,fd->name());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addContentsItem(fd->name(),fd->getOutputFileBase()); htmlHelp->addContentsItem(FALSE,fd->name(),fd->getOutputFileBase());
}
if (hasFtvHelp)
{
ftvHelp->addContentsItem(FALSE,fd->name(),fd->getOutputFileBase());
} }
} }
else else
...@@ -476,6 +646,14 @@ void writeFileIndex(OutputList &ol) ...@@ -476,6 +646,14 @@ void writeFileIndex(OutputList &ol)
ol.startBold(); ol.startBold();
ol.docify(fd->name()); ol.docify(fd->name());
ol.endBold(); ol.endBold();
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(FALSE,fd->name(),0);
}
if (hasFtvHelp)
{
ftvHelp->addContentsItem(FALSE,fd->name(),0);
}
} }
if (src) if (src)
{ {
...@@ -499,7 +677,6 @@ void writeFileIndex(OutputList &ol) ...@@ -499,7 +677,6 @@ void writeFileIndex(OutputList &ol)
} }
ol.popGeneratorState(); ol.popGeneratorState();
// -------------------------------------------------------- // --------------------------------------------------------
} }
fd=fl->next(); fd=fl->next();
} }
...@@ -510,79 +687,14 @@ void writeFileIndex(OutputList &ol) ...@@ -510,79 +687,14 @@ void writeFileIndex(OutputList &ol)
{ {
htmlHelp->decContentsDepth(); htmlHelp->decContentsDepth();
} }
endFile(ol); if (hasFtvHelp)
//ol.enable(OutputGenerator::Man);
ol.popGeneratorState();
}
//----------------------------------------------------------------------------
#if 0
void writeSourceIndex(OutputList &ol)
{
ol.disableAllBut(OutputGenerator::Html);
startFile(ol,"sources","Source Index");
startTitle(ol,0);
QCString title = theTranslator->trSources();
if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" ");
parseText(ol,title);
endTitle(ol,0,0);
ol.startTextBlock();
HtmlHelp *htmlHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag;
if (hasHtmlHelp)
{
htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(title,"sources");
htmlHelp->incContentsDepth();
}
//ol.newParagraph();
//parseText(ol,theTranslator->trFileListDescription(Config::extractAllFlag));
//ol.newParagraph();
ol.endTextBlock();
//ol.startIndexList();
bool started=FALSE;
FileName *fn=inputNameList.first();
while (fn)
{
FileDef *fd=fn->first();
while (fd)
{
if (!fd->isReference())
{
if (!started)
{
started=TRUE;
ol.startItemList();
}
ol.writeListItem();
QCString path;
if (Config::fullPathNameFlag)
{
path=stripFromPath(fd->getPath().copy());
}
if (!path.isEmpty()) ol.docify(path);
ol.writeObjectLink(0,fd->sourceName(),0,fd->name());
ol.writeString("\n");
if (Config::generateHtml && Config::htmlHelpFlag)
{
HtmlHelp::getInstance()->addContentsItem(
fd->name(),fd->sourceName());
}
}
fd=fn->next();
}
fn=inputNameList.next();
}
if (started) ol.endItemList();
if (hasHtmlHelp)
{ {
htmlHelp->decContentsDepth(); ftvHelp->decContentsDepth();
} }
endFile(ol); endFile(ol);
ol.enable(OutputGenerator::Man); //ol.enable(OutputGenerator::Man);
ol.popGeneratorState();
} }
#endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
int countNamespaces() int countNamespaces()
...@@ -607,18 +719,28 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -607,18 +719,28 @@ void writeNamespaceIndex(OutputList &ol)
startFile(ol,"namespaces","Namespace Index"); startFile(ol,"namespaces","Namespace Index");
startTitle(ol,0); startTitle(ol,0);
QCString title = theTranslator->trNamespaceList(); QCString title = theTranslator->trNamespaceList();
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" "); if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" ");
parseText(ol,title); parseText(ol,title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag; FTVHelp *ftvHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp = HtmlHelp::getInstance(); htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(title,"namespaces"); htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"namespaces");
htmlHelp->incContentsDepth(); htmlHelp->incContentsDepth();
} }
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(TRUE,ftvHelpTitle,"namespaces");
ftvHelp->incContentsDepth();
}
//ol.newParagraph(); //ol.newParagraph();
parseText(ol,theTranslator->trNamespaceListDescription(Config::extractAllFlag)); parseText(ol,theTranslator->trNamespaceListDescription(Config::extractAllFlag));
//ol.newParagraph(); //ol.newParagraph();
...@@ -628,7 +750,7 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -628,7 +750,7 @@ void writeNamespaceIndex(OutputList &ol)
NamespaceDef *nd=namespaceList.first(); NamespaceDef *nd=namespaceList.first();
while (nd) while (nd)
{ {
if (nd->isLinkableInProject()) if (nd->isLinkableInProject() && nd->countMembers()>0)
{ {
ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name()); ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
if (!nd->briefDescription().isEmpty()) if (!nd->briefDescription().isEmpty())
...@@ -642,16 +764,14 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -642,16 +764,14 @@ void writeNamespaceIndex(OutputList &ol)
ol+=briefOutput; ol+=briefOutput;
ol.docify(")"); ol.docify(")");
} }
//else
//{
// ol.startEmphasis();
// parseText(ol,theTranslator->trNoDescriptionAvailable());
// ol.endEmphasis();
//}
ol.writeEndAnnoItem(nd->getOutputFileBase()); ol.writeEndAnnoItem(nd->getOutputFileBase());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addContentsItem(nd->name(),nd->getOutputFileBase()); htmlHelp->addContentsItem(FALSE,nd->name(),nd->getOutputFileBase());
}
if (hasFtvHelp)
{
ftvHelp->addContentsItem(FALSE,nd->name(),nd->getOutputFileBase());
} }
} }
nd=namespaceList.next(); nd=namespaceList.next();
...@@ -661,6 +781,10 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -661,6 +781,10 @@ void writeNamespaceIndex(OutputList &ol)
{ {
htmlHelp->decContentsDepth(); htmlHelp->decContentsDepth();
} }
if (hasFtvHelp)
{
ftvHelp->decContentsDepth();
}
endFile(ol); endFile(ol);
//ol.enable(OutputGenerator::Man); //ol.enable(OutputGenerator::Man);
ol.popGeneratorState(); ol.popGeneratorState();
...@@ -689,6 +813,8 @@ int countAnnotatedClasses() ...@@ -689,6 +813,8 @@ int countAnnotatedClasses()
void writeAnnotatedClassList(OutputList &ol) void writeAnnotatedClassList(OutputList &ol)
{ {
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
ol.startIndexList(); ol.startIndexList();
//ClassDef *cd=classList.first(); //ClassDef *cd=classList.first();
//while (cd) //while (cd)
...@@ -718,18 +844,14 @@ void writeAnnotatedClassList(OutputList &ol) ...@@ -718,18 +844,14 @@ void writeAnnotatedClassList(OutputList &ol)
ol+=briefOutput; ol+=briefOutput;
ol.docify(")"); ol.docify(")");
} }
//else
//{
// ol.startEmphasis();
// parseText(ol,theTranslator->trNoDescriptionAvailable());
// ol.endEmphasis();
//}
ol.writeEndAnnoItem(cd->getOutputFileBase()); ol.writeEndAnnoItem(cd->getOutputFileBase());
if (Config::generateHtml && Config::htmlHelpFlag) if (hasHtmlHelp)
{ {
HtmlHelp::getInstance()->addContentsItem( HtmlHelp::getInstance()->addContentsItem(FALSE,cd->name(),cd->getOutputFileBase());
cd->name(),cd->getOutputFileBase()); }
//cd->writeMembersToContents(); if (hasFtvHelp)
{
FTVHelp::getInstance()->addContentsItem(FALSE,cd->name(),cd->getOutputFileBase());
} }
} }
cd=classList.next(); cd=classList.next();
...@@ -910,6 +1032,9 @@ void writeAlphabeticalIndex(OutputList &ol) ...@@ -910,6 +1032,9 @@ void writeAlphabeticalIndex(OutputList &ol)
void writeAnnotatedIndex(OutputList &ol) void writeAnnotatedIndex(OutputList &ol)
{ {
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
if (annotatedClasses==0) return; if (annotatedClasses==0) return;
//if (classList.count()==0) return; //if (classList.count()==0) return;
...@@ -918,25 +1043,38 @@ void writeAnnotatedIndex(OutputList &ol) ...@@ -918,25 +1043,38 @@ void writeAnnotatedIndex(OutputList &ol)
startFile(ol,"annotated","Annotated Index"); startFile(ol,"annotated","Annotated Index");
startTitle(ol,0); startTitle(ol,0);
QCString title = theTranslator->trCompoundList(); QCString title = theTranslator->trCompoundList();
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" "); if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" ");
parseText(ol,title); parseText(ol,title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
if (Config::generateHtml && Config::htmlHelpFlag) FTVHelp *ftvHelp = 0;
if (hasHtmlHelp)
{ {
htmlHelp = HtmlHelp::getInstance(); htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(title,"annotated"); htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"annotated");
htmlHelp->incContentsDepth(); htmlHelp->incContentsDepth();
} }
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(TRUE,ftvHelpTitle,"annotated");
ftvHelp->incContentsDepth();
}
parseText(ol,theTranslator->trCompoundListDescription()); parseText(ol,theTranslator->trCompoundListDescription());
//ol.newParagraph(); //ol.newParagraph();
ol.endTextBlock(); ol.endTextBlock();
writeAnnotatedClassList(ol); writeAnnotatedClassList(ol);
if (Config::generateHtml && Config::htmlHelpFlag) if (hasHtmlHelp)
{ {
htmlHelp->decContentsDepth(); htmlHelp->decContentsDepth();
} }
if (hasFtvHelp)
{
ftvHelp->decContentsDepth();
}
endFile(ol); endFile(ol);
//ol.enable(OutputGenerator::Man); //ol.enable(OutputGenerator::Man);
...@@ -1371,92 +1509,6 @@ void writeNamespaceMemberIndex(OutputList &ol) ...@@ -1371,92 +1509,6 @@ void writeNamespaceMemberIndex(OutputList &ol)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//int countIncludeFiles()
//{
// int count=0;
// FileDef *fd=includeFiles.first();
// while (fd)
// {
// //if (fd->isLinkableInProject())
// //{
// count++;
// //}
// fd=includeFiles.next();
// }
// return count;
//}
//
////----------------------------------------------------------------------------
//
//void writeHeaderFileList(OutputList &ol)
//{
// bool started=FALSE;
// FileDef *fd=includeFiles.first();
// while (fd)
// {
// /*
// if (fd->isLinkableInProject())
// {
// */
// if (!started)
// {
// started=TRUE;
// ol.startItemList();
// }
// ol.writeListItem();
// QCString path;
// if (Config::fullPathNameFlag)
// {
// path=stripFromPath(fd->getPath().copy());
// }
// if (!path.isEmpty()) ol.docify(path);
// ol.writeObjectLink(0,fd->includeName(),0,fd->name());
// ol.writeString("\n");
// if (Config::generateHtml && Config::htmlHelpFlag)
// {
// HtmlHelp::getInstance()->addContentsItem(
// fd->name(),fd->includeName());
// }
// /*
// }
// */
// fd=includeFiles.next();
// }
// if (started) ol.endItemList();
//}
//
////----------------------------------------------------------------------------
//
//void writeHeaderIndex(OutputList &ol)
//{
// if (documentedIncludeFiles==0) return;
// ol.disable(OutputGenerator::Man);
// ol.disable(OutputGenerator::Latex);
// startFile(ol,"headers","Header File Index");
// startTitle(ol,0);
// QCString title = Config::projectName+" "+theTranslator->trHeaderFiles();
// parseText(ol,title);
// endTitle(ol,0,0);
// HtmlHelp *htmlHelp = 0;
// if (Config::generateHtml && Config::htmlHelpFlag)
// {
// htmlHelp = HtmlHelp::getInstance();
// htmlHelp->addContentsItem(title,"headers");
// htmlHelp->incContentsDepth();
// }
// parseText(ol,theTranslator->trHeaderFilesDescription());
// writeHeaderFileList(ol);
// if (Config::generateHtml && Config::htmlHelpFlag)
// {
// htmlHelp->decContentsDepth();
// }
// endFile(ol);
// ol.enable(OutputGenerator::Latex);
// ol.enable(OutputGenerator::Man);
//}
//----------------------------------------------------------------------------
void writeExampleIndex(OutputList &ol) void writeExampleIndex(OutputList &ol)
{ {
if (exampleSDict->count()==0) return; if (exampleSDict->count()==0) return;
...@@ -1465,18 +1517,28 @@ void writeExampleIndex(OutputList &ol) ...@@ -1465,18 +1517,28 @@ void writeExampleIndex(OutputList &ol)
startFile(ol,"examples","Example Index"); startFile(ol,"examples","Example Index");
startTitle(ol,0); startTitle(ol,0);
QCString title = theTranslator->trExamples(); QCString title = theTranslator->trExamples();
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" "); if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" ");
parseText(ol,title); parseText(ol,title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag; FTVHelp *ftvHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp = HtmlHelp::getInstance(); htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(title,"examples"); htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"examples");
htmlHelp->incContentsDepth(); htmlHelp->incContentsDepth();
} }
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(TRUE,ftvHelpTitle,"examples");
ftvHelp->incContentsDepth();
}
parseText(ol,theTranslator->trExamplesDescription()); parseText(ol,theTranslator->trExamplesDescription());
//ol.newParagraph(); //ol.newParagraph();
ol.endTextBlock(); ol.endTextBlock();
...@@ -1490,12 +1552,14 @@ void writeExampleIndex(OutputList &ol) ...@@ -1490,12 +1552,14 @@ void writeExampleIndex(OutputList &ol)
if (!pi->title.isEmpty()) if (!pi->title.isEmpty())
{ {
ol.writeObjectLink(0,n,0,pi->title); ol.writeObjectLink(0,n,0,pi->title);
if (hasHtmlHelp) htmlHelp->addContentsItem(pi->title,n); if (hasHtmlHelp) htmlHelp->addContentsItem(FALSE,pi->title,n);
if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,pi->title,n);
} }
else else
{ {
ol.writeObjectLink(0,n,0,pi->name); ol.writeObjectLink(0,n,0,pi->name);
if (hasHtmlHelp) htmlHelp->addContentsItem(pi->name,n); if (hasHtmlHelp) htmlHelp->addContentsItem(FALSE,pi->name,n);
if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,pi->name,n);
} }
ol.writeString("\n"); ol.writeString("\n");
} }
...@@ -1504,6 +1568,10 @@ void writeExampleIndex(OutputList &ol) ...@@ -1504,6 +1568,10 @@ void writeExampleIndex(OutputList &ol)
{ {
htmlHelp->decContentsDepth(); htmlHelp->decContentsDepth();
} }
if (hasFtvHelp)
{
ftvHelp->decContentsDepth();
}
endFile(ol); endFile(ol);
//ol.enable(OutputGenerator::Man); //ol.enable(OutputGenerator::Man);
ol.popGeneratorState(); ol.popGeneratorState();
...@@ -1511,26 +1579,50 @@ void writeExampleIndex(OutputList &ol) ...@@ -1511,26 +1579,50 @@ void writeExampleIndex(OutputList &ol)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
int countRelatedPages()
{
int count=0;
PageSDictIterator pdi(*pageSDict);
PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi)
{
if (!pi->inGroup) count++;
}
return count;
}
//----------------------------------------------------------------------------
void writePageIndex(OutputList &ol) void writePageIndex(OutputList &ol)
{ {
if (pageSDict->count()==0) return; if (documentedPages==0) return;
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
startFile(ol,"pages","Page Index"); startFile(ol,"pages","Page Index");
startTitle(ol,0); startTitle(ol,0);
QCString title = theTranslator->trRelatedPages(); QCString title = theTranslator->trRelatedPages();
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" "); if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" ");
parseText(ol,title); parseText(ol,title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag; FTVHelp *ftvHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp = HtmlHelp::getInstance(); htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(title,"pages"); htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"pages");
htmlHelp->incContentsDepth(); htmlHelp->incContentsDepth();
} }
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(TRUE,ftvHelpTitle,"pages");
ftvHelp->incContentsDepth();
}
parseText(ol,theTranslator->trRelatedPagesDescription()); parseText(ol,theTranslator->trRelatedPagesDescription());
//ol.newParagraph(); //ol.newParagraph();
ol.endTextBlock(); ol.endTextBlock();
...@@ -1538,6 +1630,8 @@ void writePageIndex(OutputList &ol) ...@@ -1538,6 +1630,8 @@ void writePageIndex(OutputList &ol)
PageSDictIterator pdi(*pageSDict); PageSDictIterator pdi(*pageSDict);
PageInfo *pi=0; PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
{
if (!pi->inGroup)
{ {
QCString pageName,pageTitle; QCString pageName,pageTitle;
...@@ -1556,13 +1650,19 @@ void writePageIndex(OutputList &ol) ...@@ -1556,13 +1650,19 @@ void writePageIndex(OutputList &ol)
//ol.writeObjectLink(0,pageName,0,pageTitle); //ol.writeObjectLink(0,pageName,0,pageTitle);
ol.writeEndAnnoItem(pageName); ol.writeEndAnnoItem(pageName);
ol.writeString("\n"); ol.writeString("\n");
if (hasHtmlHelp) htmlHelp->addContentsItem(pageTitle,pageName); if (hasHtmlHelp) htmlHelp->addContentsItem(FALSE,pageTitle,pageName);
if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,pageTitle,pageName);
}
} }
ol.endIndexList(); ol.endIndexList();
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->decContentsDepth(); htmlHelp->decContentsDepth();
} }
if (hasFtvHelp)
{
ftvHelp->decContentsDepth();
}
endFile(ol); endFile(ol);
//ol.enable(OutputGenerator::Man); //ol.enable(OutputGenerator::Man);
ol.popGeneratorState(); ol.popGeneratorState();
...@@ -1577,22 +1677,231 @@ int countGroups() ...@@ -1577,22 +1677,231 @@ int countGroups()
GroupDef *gd; GroupDef *gd;
for (;(gd=gli.current());++gli) for (;(gd=gli.current());++gli)
{ {
if (gd->countMembers()>0) count++; gd->visited=FALSE;
count++;
} }
return count; return count;
} }
//----------------------------------------------------------------------------
void writeGraphInfo(OutputList &ol)
{
if (!Config::haveDotFlag || !Config::generateHtml) return;
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
generateGraphLegend(Config::htmlOutputDir);
startFile(ol,"graph_legend","Graph Legend");
startTitle(ol,0);
parseText(ol,theTranslator->trLegendTitle());
endTitle(ol,0,0);
bool oldStripCommentsState = Config::stripCommentsFlag;
// temporarily disable the stripping of comments for our own code example!
Config::stripCommentsFlag = FALSE;
parseDoc(ol,"graph_legend",1,0,0,theTranslator->trLegendDocs());
Config::stripCommentsFlag = oldStripCommentsState;
endFile(ol);
ol.popGeneratorState();
}
//----------------------------------------------------------------------------
/*!
* write groups as hierarchial trees
* \author KPW
*/
void writeGroupTreeNode(OutputList &ol, GroupDef *gd)
{
HtmlHelp *htmlHelp=0;
FTVHelp *ftvHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag;
if (hasHtmlHelp)
{
htmlHelp = HtmlHelp::getInstance();
}
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
}
GroupDef *subgd = 0;
GroupListIterator gli(*gd->groupList);
if (!gd->visited)
{
//printf("gd->name()=%s #members=%d\n",gd->name().data(),gd->countMembers());
// write group info
bool hasSubGroups = gd->groupList->count()>0;
bool hasSubPages = gd->pageDict->count()>0;
//printf("gd=`%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count());
if(htmlHelp)
{
htmlHelp->addContentsItem(hasSubGroups || hasSubPages,gd->groupTitle(),gd->getOutputFileBase());
htmlHelp->incContentsDepth();
}
if(ftvHelp)
{
ftvHelp->addContentsItem(hasSubGroups || hasSubPages,gd->groupTitle(),gd->getOutputFileBase());
ftvHelp->incContentsDepth();
}
//ol.writeListItem();
//ol.startTextLink(gd->getOutputFileBase(),0);
//parseText(ol,gd->groupTitle());
//ol.endTextLink();
ol.writeIndexItem(0,gd->getOutputFileBase(),gd->groupTitle());
//ol.writeStartAnnoItem(0,gd->getOutputFileBase(),0,gd-);
//parseText(ol,gd->groupTitle());
//ol.writeEndAnnoItem(gd->getOutputFileBase());
// write pages
PageSDictIterator pli(*gd->pageDict);
PageInfo *pi = 0;
for (pli.toFirst();(pi=pli.current());++pli)
{
SectionInfo *si=0;
if (!pi->name.isEmpty()) si=sectionDict[pi->name];
if(htmlHelp) htmlHelp->addContentsItem(FALSE,
convertToHtml(pi->title),
gd->getOutputFileBase(),
si ? si->label.data() : 0
);
if(ftvHelp) ftvHelp->addContentsItem(FALSE,
convertToHtml(pi->title),
gd->getOutputFileBase(),
si ? si->label.data() : 0
);
}
// write subgroups
if (hasSubGroups)
{
ol.startIndexList();
for (gli.toLast();(subgd=gli.current());--gli)
{
writeGroupTreeNode(ol,subgd);
}
ol.endIndexList();
}
#if 0
// write namespaces
NamespaceList *namespaceList=gd->namespaceList;
if (namespaceList->count()>0)
{
NamespaceDef *nsd=namespaceList->first();
while (nsd)
{
if(htmlHelp)
htmlHelp->addContentsItem(FALSE,convertToHtml(nsd->name()).data(),nsd->getOutputFileBase());
if(ftvHelp)
ftvHelp->addContentsItem(FALSE,convertToHtml(nsd->name()).data(),nsd->getOutputFileBase());
nsd=namespaceList->next();
}
}
// write classes
writeClassTree(gd->classList);
// write members
MemberList memberLists[7] = {
gd->defineMembers,
gd->typedefMembers,
gd->enumMembers,
gd->enumValMembers,
gd->funcMembers,
gd->varMembers,
gd->protoMembers
};
MemberList members;
for (int i=0;i<7;i++)
{
members=memberLists[i];
if (members.count()>0)
{
MemberDef *md=members.first();
while (md)
{
if(htmlHelp)
htmlHelp->addContentsItem(FALSE,md->name(),md->getGroupDef()->getOutputFileBase().data(),md->anchor());
if(ftvHelp)
ftvHelp->addContentsItem(FALSE,md->name(),md->getGroupDef()->getOutputFileBase().data(),md->anchor());
md=members.next();
}
}
}
// write file list
FileList *fileList=gd->fileList;
if (fileList->count()>0)
{
FileDef *fd=fileList->first();
while (fd)
{
if(htmlHelp)
htmlHelp->addContentsItem(FALSE,convertToHtml(fd->name()),fd->getOutputFileBase().data());
if(ftvHelp)
ftvHelp->addContentsItem(FALSE,convertToHtml(fd->name()),fd->getOutputFileBase().data());
fd=fileList->next();
}
}
// write examples
PageSDictIterator eli(*(gd->exampleDict));
{
PageInfo *pi=eli.toFirst();
while (pi)
{
if(htmlHelp)
htmlHelp->addContentsItem(FALSE,convertToHtml(pi->name),convertNameToFile(pi->name)+"-example");
if(ftvHelp)
ftvHelp->addContentsItem(FALSE,convertToHtml(pi->name),convertNameToFile(pi->name)+"-example");
pi=++eli;
}
}
#endif
if(htmlHelp) htmlHelp->decContentsDepth();
if(ftvHelp) ftvHelp->decContentsDepth();
gd->visited=TRUE;
}
}
void writeGroupHierarchy(OutputList &ol)
{
ol.startIndexList();
GroupListIterator gli(groupList);
GroupDef *gd;
for (;(gd=gli.current());++gli)
{
writeGroupTreeNode(ol,gd);
}
ol.endIndexList();
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#if 0
void writeGroupList(OutputList &ol) void writeGroupList(OutputList &ol)
{ {
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag;
HtmlHelp *htmlHelp = 0;
FTVHelp *ftvHelp = 0;
if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance();
if (hasFtvHelp) ftvHelp = FTVHelp::getInstance();
ol.startDescription(); ol.startDescription();
GroupListIterator gli(groupList); GroupListIterator gli(groupList);
GroupDef *gd; GroupDef *gd;
for (;(gd=gli.current());++gli) for (;(gd=gli.current());++gli)
{ {
//printf("gd->name()=%s #members=%d\n",gd->name().data(),gd->countMembers()); //printf("gd->name()=%s #members=%d\n",gd->name().data(),gd->countMembers());
if (gd->countMembers()>0) //if (gd->countMembers()>0)
//{
if (gd->hasDocumentation())
{ {
ol.startDescItem(); ol.startDescItem();
ol.startTextLink(gd->getOutputFileBase(),0); ol.startTextLink(gd->getOutputFileBase(),0);
...@@ -1603,31 +1912,31 @@ void writeGroupList(OutputList &ol) ...@@ -1603,31 +1912,31 @@ void writeGroupList(OutputList &ol)
gd->getDefFileName(),gd->getDefLine(), gd->getDefFileName(),gd->getDefLine(),
0,0,gd->briefDescription()); 0,0,gd->briefDescription());
ol.newParagraph(); ol.newParagraph();
//}
const char *docFile = 0;
if (gd->hasDocumentation()) docFile = gd->getOutputFileBase();
if (hasHtmlHelp)
{
htmlHelp = HtmlHelp::getInstance();
if(!Config::htmlHelpGroupsOnly)
{
htmlHelp->addContentsItem(FALSE,gd->groupTitle(),docFile);
}
}
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
if(!Config::htmlHelpGroupsOnly)
{
ftvHelp->addContentsItem(FALSE,gd->groupTitle(),docFile);
}
}
} }
} }
ol.endDescription(); ol.endDescription();
} }
#endif
//----------------------------------------------------------------------------
void writeGraphInfo(OutputList &ol)
{
if (!Config::haveDotFlag || !Config::generateHtml) return;
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
generateGraphLegend(Config::htmlOutputDir);
startFile(ol,"graph_legend","Graph Legend");
startTitle(ol,0);
parseText(ol,theTranslator->trLegendTitle());
endTitle(ol,0,0);
bool oldStripCommentsState = Config::stripCommentsFlag;
// temporarily disable the stripping of comments for our own code example!
Config::stripCommentsFlag = FALSE;
parseDoc(ol,"graph_legend",1,0,0,theTranslator->trLegendDocs());
Config::stripCommentsFlag = oldStripCommentsState;
endFile(ol);
ol.popGeneratorState();
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -1639,24 +1948,52 @@ void writeGroupIndex(OutputList &ol) ...@@ -1639,24 +1948,52 @@ void writeGroupIndex(OutputList &ol)
startFile(ol,"modules","Module Index"); startFile(ol,"modules","Module Index");
startTitle(ol,0); startTitle(ol,0);
QCString title = theTranslator->trModules(); QCString title = theTranslator->trModules();
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" "); if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" ");
parseText(ol,title); parseText(ol,title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
FTVHelp *ftvHelp = 0;
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag; bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag;
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp = HtmlHelp::getInstance(); htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(title,"modules"); //if(!Config::htmlHelpGroupsOnly)
//{
htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"modules");
htmlHelp->incContentsDepth(); htmlHelp->incContentsDepth();
//}
}
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
//if(!Config::htmlHelpGroupsOnly)
//{
ftvHelp->addContentsItem(TRUE,htmlHelpTitle,"modules");
ftvHelp->incContentsDepth();
//}
} }
parseText(ol,theTranslator->trModulesDescription()); parseText(ol,theTranslator->trModulesDescription());
ol.endTextBlock(); ol.endTextBlock();
writeGroupList(ol); writeGroupHierarchy(ol);
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
//writeGroupTree(ol); // KPW - modified to write hierarchial HMTL Help
//if(!Config::htmlHelpGroupsOnly)
//{
htmlHelp->decContentsDepth(); htmlHelp->decContentsDepth();
//}
}
if (hasFtvHelp)
{
//writeGroupTree(ol); // KPW - modified to write hierarchial FTV Help
//if(!Config::htmlHelpGroupsOnly)
//{
ftvHelp->decContentsDepth();
//}
} }
endFile(ol); endFile(ol);
ol.popGeneratorState(); ol.popGeneratorState();
...@@ -1667,9 +2004,6 @@ void writeGroupIndex(OutputList &ol) ...@@ -1667,9 +2004,6 @@ void writeGroupIndex(OutputList &ol)
void writeIndex(OutputList &ol) void writeIndex(OutputList &ol)
{ {
// save old generator state // save old generator state
//bool manEnabled = ol.isEnabled(OutputGenerator::Man);
//bool texEnabled = ol.isEnabled(OutputGenerator::Latex);
//bool htmEnabled = ol.isEnabled(OutputGenerator::Html);
ol.pushGeneratorState(); ol.pushGeneratorState();
QCString projPrefix; QCString projPrefix;
...@@ -1691,17 +2025,24 @@ void writeIndex(OutputList &ol) ...@@ -1691,17 +2025,24 @@ void writeIndex(OutputList &ol)
QCString title; QCString title;
if (!mainPage || mainPage->title.isEmpty()) if (!mainPage || mainPage->title.isEmpty())
{ {
title = "Main Index"; title = theTranslator->trMainPage();
} }
else else
{ {
title = substitute(mainPage->title,"%",""); title = substitute(mainPage->title,"%","");
} }
ol.startFile("index",title,FALSE);
QCString indexName="index";
if (Config::ftvHelpFlag) indexName="main";
ol.startFile(indexName,title,FALSE);
if (Config::generateHtml && Config::htmlHelpFlag) if (Config::generateHtml && Config::htmlHelpFlag)
{ {
HtmlHelp::getInstance()->addContentsItem(title,"index"); HtmlHelp::getInstance()->addContentsItem(FALSE,title,indexName);
}
if (Config::generateHtml && Config::ftvHelpFlag)
{
FTVHelp::getInstance()->addContentsItem(FALSE,title,indexName);
} }
if (!Config::noIndexFlag) writeQuickLinks(ol,TRUE); if (!Config::noIndexFlag) writeQuickLinks(ol,TRUE);
...@@ -1801,7 +2142,7 @@ void writeIndex(OutputList &ol) ...@@ -1801,7 +2142,7 @@ void writeIndex(OutputList &ol)
parseText(ol,projPrefix+theTranslator->trFileIndex()); parseText(ol,projPrefix+theTranslator->trFileIndex());
ol.endIndexSection(isFileIndex); ol.endIndexSection(isFileIndex);
} }
if (pageSDict->count()>0) if (documentedPages>0)
{ {
ol.startIndexSection(isPageIndex); ol.startIndexSection(isPageIndex);
parseText(ol,projPrefix+theTranslator->trPageIndex()); parseText(ol,projPrefix+theTranslator->trPageIndex());
...@@ -1875,3 +2216,4 @@ void writeIndex(OutputList &ol) ...@@ -1875,3 +2216,4 @@ void writeIndex(OutputList &ol)
// else ol.disable(OutputGenerator::Html); // else ol.disable(OutputGenerator::Html);
ol.popGeneratorState(); ol.popGeneratorState();
} }
...@@ -73,5 +73,6 @@ int countNamespaces(); ...@@ -73,5 +73,6 @@ int countNamespaces();
int countAnnotatedClasses(); int countAnnotatedClasses();
int countNamespaceMembers(); int countNamespaceMembers();
int countIncludeFiles(); int countIncludeFiles();
int countRelatedPages();
#endif #endif
...@@ -493,13 +493,10 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -493,13 +493,10 @@ void LatexGenerator::startIndexSection(IndexSections is)
GroupDef *gd=groupList.first(); GroupDef *gd=groupList.first();
bool found=FALSE; bool found=FALSE;
while (gd && !found) while (gd && !found)
{
if (gd->countMembers()>0)
{ {
if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Module Documentation}\n"; t << "{"; //Module Documentation}\n";
found=TRUE; found=TRUE;
}
gd=groupList.next(); gd=groupList.next();
} }
} }
...@@ -618,21 +615,15 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -618,21 +615,15 @@ void LatexGenerator::endIndexSection(IndexSections is)
GroupDef *gd=groupList.first(); GroupDef *gd=groupList.first();
bool found=FALSE; bool found=FALSE;
while (gd && !found) while (gd && !found)
{
if (gd->countMembers()>0)
{ {
t << "}\n\\input{" << gd->getOutputFileBase() << "}\n"; t << "}\n\\input{" << gd->getOutputFileBase() << "}\n";
found=TRUE; found=TRUE;
}
gd=groupList.next(); gd=groupList.next();
} }
while (gd) while (gd)
{
if (gd->countMembers()>0)
{ {
if (Config::compactLatexFlag) t << "\\input"; else t << "\\include"; if (Config::compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << gd->getOutputFileBase() << "}\n"; t << "{" << gd->getOutputFileBase() << "}\n";
}
gd=groupList.next(); gd=groupList.next();
} }
} }
...@@ -734,24 +725,20 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -734,24 +725,20 @@ void LatexGenerator::endIndexSection(IndexSections is)
t << "}\n"; t << "}\n";
PageSDictIterator pdi(*pageSDict); PageSDictIterator pdi(*pageSDict);
PageInfo *pi=pdi.toFirst(); PageInfo *pi=pdi.toFirst();
if (pi) bool first=TRUE;
for (pdi.toFirst();(pi=pdi.current());++pdi)
{ {
QCString pageName; if (!pi->inGroup)
if (Config::caseSensitiveNames)
pageName=pi->name.copy();
else
pageName=pi->name.lower();
t << "\\input{" << pageName << "}\n";
}
for (++pdi;(pi=pdi.current());++pdi)
{ {
if (Config::compactLatexFlag) t << "\\input" ; else t << "\\include";
QCString pageName; QCString pageName;
if (Config::caseSensitiveNames) if (Config::caseSensitiveNames)
pageName=pi->name.copy(); pageName=pi->name.copy();
else else
pageName=pi->name.lower(); pageName=pi->name.lower();
if (Config::compactLatexFlag || first) t << "\\input" ; else t << "\\include";
t << "{" << pageName << "}\n"; t << "{" << pageName << "}\n";
first=FALSE;
}
} }
} }
break; break;
......
...@@ -22,7 +22,7 @@ class PageInfo ...@@ -22,7 +22,7 @@ class PageInfo
public: public:
PageInfo(const char *f, int l,const char *n,const char *d,const char *t) : PageInfo(const char *f, int l,const char *n,const char *d,const char *t) :
defFileName(f), defLine(l), name(n), defFileName(f), defLine(l), name(n),
doc(d), title(t), todoId(0), testId(0) {} doc(d), title(t), todoId(0), testId(0),inGroup(0) {}
// where the page definition was found // where the page definition was found
QCString defFileName; QCString defFileName;
...@@ -36,6 +36,9 @@ class PageInfo ...@@ -36,6 +36,9 @@ class PageInfo
// ids // ids
int todoId; int todoId;
int testId; int testId;
// is this page part of a group
GroupDef *inGroup;
}; };
class PageSDict : public SDict<PageInfo> class PageSDict : public SDict<PageInfo>
......
...@@ -809,12 +809,9 @@ void RTFGenerator::startIndexSection(IndexSections is) ...@@ -809,12 +809,9 @@ void RTFGenerator::startIndexSection(IndexSections is)
GroupDef *gd=groupList.first(); GroupDef *gd=groupList.first();
bool found=FALSE; bool found=FALSE;
while (gd && !found) while (gd && !found)
{
if (gd->countMembers()>0)
{ {
beginRTFChapter(); beginRTFChapter();
found=TRUE; found=TRUE;
}
gd=groupList.next(); gd=groupList.next();
} }
} }
...@@ -965,31 +962,13 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -965,31 +962,13 @@ void RTFGenerator::endIndexSection(IndexSections is)
case isModuleDocumentation: case isModuleDocumentation:
{ {
GroupDef *gd=groupList.first(); GroupDef *gd=groupList.first();
bool found=FALSE;
t << "{\\tc \\v " << theTranslator->trModuleDocumentation() << "}"<< endl; t << "{\\tc \\v " << theTranslator->trModuleDocumentation() << "}"<< endl;
while (gd && !found)
{
if (gd->countMembers()>0)
{
t << "\\par " << Rtf_Style_Reset << endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
t << gd->getOutputFileBase();
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
found=TRUE;
}
gd=groupList.next();
}
while (gd) while (gd)
{
if (gd->countMembers()>0)
{ {
t << "\\par " << Rtf_Style_Reset << endl; t << "\\par " << Rtf_Style_Reset << endl;
beginRTFSection();
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \""; t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
t << gd->getOutputFileBase(); t << gd->getOutputFileBase();
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
}
gd=groupList.next(); gd=groupList.next();
} }
} }
...@@ -1120,30 +1099,22 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -1120,30 +1099,22 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}"<< endl; t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}"<< endl;
PageSDictIterator pdi(*pageSDict); PageSDictIterator pdi(*pageSDict);
PageInfo *pi=pdi.toFirst(); PageInfo *pi=pdi.toFirst();
if (pi) bool first=TRUE;
for (pdi.toFirst();(pi=pdi.current());++pdi)
{ {
QCString pageName; if (!pi->inGroup)
if (Config::caseSensitiveNames)
pageName=pi->name.copy();
else
pageName=pi->name.lower();
t << "\\par " << Rtf_Style_Reset << endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
t << pageName;
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
}
for (++pdi;(pi=pdi.current());++pdi)
{ {
QCString pageName; QCString pageName;
if (Config::caseSensitiveNames) if (Config::caseSensitiveNames)
pageName=pi->name.copy(); pageName=pi->name.copy();
else else
pageName=pi->name.lower(); pageName=pi->name.lower();
//t << "\\par " << Rtf_Style_Reset << endl; if (first) t << "\\par " << Rtf_Style_Reset << endl;
//beginRTFSection();
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \""; t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
t << pageName; t << pageName;
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
first=FALSE;
}
} }
} }
break; break;
......
...@@ -3000,6 +3000,11 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -3000,6 +3000,11 @@ TITLE [tT][iI][tT][lL][eE]
} }
<ExampleDoc,PageDoc,ClassDoc>"\n" { yyLineNr++ ; current->doc+=yytext; } <ExampleDoc,PageDoc,ClassDoc>"\n" { yyLineNr++ ; current->doc+=yytext; }
<ExampleDoc,PageDoc,ClassDoc>[a-z_A-Z0-9 \t]+ { current->doc += yytext; } <ExampleDoc,PageDoc,ClassDoc>[a-z_A-Z0-9 \t]+ { current->doc += yytext; }
<ExampleDoc,PageDoc>{CMD}"ingroup"{B}+ {
lastGroupContext = YY_START;
lineCount();
BEGIN( GroupName );
}
<ExampleDoc,PageDoc,ClassDoc>. { current->doc += yytext; } <ExampleDoc,PageDoc,ClassDoc>. { current->doc += yytext; }
<Doc,JavaDoc,LineDoc,ExampleDoc,PageDoc,ClassDoc>^{B}*"//" <Doc,JavaDoc,LineDoc,ExampleDoc,PageDoc,ClassDoc>^{B}*"//"
<Doc,ExampleDoc,PageDoc,ClassDoc>"//" { current->doc += yytext; } <Doc,ExampleDoc,PageDoc,ClassDoc>"//" { current->doc += yytext; }
......
"//**************************************************************** \n"
"// You are free to copy the \"Folder-Tree\" script as long as you \n"
"// keep this copyright notice: \n"
"// Script found in: http://www.geocities.com/Paris/LeftBank/2178/ \n"
"// Author: Marcelino Alves Martins (martins@hks.com) December '97. \n"
"//**************************************************************** \n"
" \n"
"//Log of changes: \n"
"// 17 Feb 98 - Fix initialization flashing problem with Netscape\n"
"// \n"
"// 27 Jan 98 - Root folder starts open; support for USETEXTLINKS; \n"
"// make the ftien4 a js file \n"
"// \n"
" \n"
"// Definition of class Folder \n"
"// ***************************************************************** \n"
" \n"
"function Folder(folderDescription, hreference) //constructor \n"
"{ \n"
" //constant data \n"
" this.desc = folderDescription \n"
" this.hreference = hreference \n"
" this.id = -1 \n"
" this.navObj = 0 \n"
" this.iconImg = 0 \n"
" this.nodeImg = 0 \n"
" this.isLastNode = 0 \n"
" \n"
" //dynamic data \n"
" this.isOpen = true \n"
" this.iconSrc = \"ftv2folderopen.gif\" \n"
" this.children = new Array \n"
" this.nChildren = 0 \n"
" \n"
" //methods \n"
" this.initialize = initializeFolder \n"
" this.setState = setStateFolder \n"
" this.addChild = addChild \n"
" this.createIndex = createEntryIndex \n"
" this.hide = hideFolder \n"
" this.display = display \n"
" this.renderOb = drawFolder \n"
" this.totalHeight = totalHeight \n"
" this.subEntries = folderSubEntries \n"
" this.outputLink = outputFolderLink \n"
"} \n"
" \n"
"function setStateFolder(isOpen) \n"
"{ \n"
" var subEntries \n"
" var totalHeight \n"
" var fIt = 0 \n"
" var i=0 \n"
" \n"
" if (isOpen == this.isOpen) \n"
" return \n"
" \n"
" if (browserVersion == 2) \n"
" { \n"
" totalHeight = 0 \n"
" for (i=0; i < this.nChildren; i++) \n"
" totalHeight = totalHeight + this.children[i].navObj.clip.height \n"
" subEntries = this.subEntries() \n"
" if (this.isOpen) \n"
" totalHeight = 0 - totalHeight \n"
" for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) \n"
" indexOfEntries[fIt].navObj.moveBy(0, totalHeight) \n"
" } \n"
" this.isOpen = isOpen \n"
" propagateChangesInState(this) \n"
"} \n"
" \n"
"function propagateChangesInState(folder) \n"
"{ \n"
" var i=0 \n"
" \n"
" if (folder.isOpen) \n"
" { \n"
" if (folder.nodeImg) \n"
" if (folder.isLastNode) \n"
" folder.nodeImg.src = \"ftv2mlastnode.gif\" \n"
" else \n"
" folder.nodeImg.src = \"ftv2mnode.gif\" \n"
" folder.iconImg.src = \"ftv2folderopen.gif\" \n"
" for (i=0; i<folder.nChildren; i++) \n"
" folder.children[i].display() \n"
" } \n"
" else \n"
" { \n"
" if (folder.nodeImg) \n"
" if (folder.isLastNode) \n"
" folder.nodeImg.src = \"ftv2plastnode.gif\" \n"
" else \n"
" folder.nodeImg.src = \"ftv2pnode.gif\" \n"
" folder.iconImg.src = \"ftv2folderclosed.gif\" \n"
" for (i=0; i<folder.nChildren; i++) \n"
" folder.children[i].hide() \n"
" } \n"
"} \n"
" \n"
"function hideFolder() \n"
"{ \n"
" if (browserVersion == 1) { \n"
" if (this.navObj.style.display == \"none\") \n"
" return \n"
" this.navObj.style.display = \"none\" \n"
" } else { \n"
" if (this.navObj.visibility == \"hidden\") \n"
" return \n"
" this.navObj.visibility = \"hidden\" \n"
" } \n"
" \n"
" this.setState(0) \n"
"} \n"
" \n"
"function initializeFolder(level, lastNode, leftSide) \n"
"{ \n"
"var j=0 \n"
"var i=0 \n"
"var numberOfFolders \n"
"var numberOfDocs \n"
"var nc \n"
" \n"
" nc = this.nChildren \n"
" \n"
" this.createIndex() \n"
" \n"
" var auxEv = \"\" \n"
" \n"
" if (browserVersion > 0) \n"
" auxEv = \"<a href='javascript:clickOnNode(\"+this.id+\")'>\" \n"
" else \n"
" auxEv = \"<a>\" \n"
" \n"
" if (level>0) \n"
" if (lastNode) //the last 'brother' in the children array \n"
" { \n"
" this.renderOb(leftSide + auxEv + \"<img name='nodeIcon\" + this.id + \"' src='ftv2mlastnode.gif' width=16 height=22 border=0></a>\") \n"
" leftSide = leftSide + \"<img src='ftv2blank.gif' width=16 height=22>\" \n"
" this.isLastNode = 1 \n"
" } \n"
" else \n"
" { \n"
" this.renderOb(leftSide + auxEv + \"<img name='nodeIcon\" + this.id + \"' src='ftv2mnode.gif' width=16 height=22 border=0></a>\") \n"
" leftSide = leftSide + \"<img src='ftv2vertline.gif' width=16 height=22>\" \n"
" this.isLastNode = 0 \n"
" } \n"
" else \n"
" this.renderOb(\"\") \n"
" \n"
" if (nc > 0) \n"
" { \n"
" level = level + 1 \n"
" for (i=0 ; i < this.nChildren; i++) \n"
" { \n"
" if (i == this.nChildren-1) \n"
" this.children[i].initialize(level, 1, leftSide) \n"
" else \n"
" this.children[i].initialize(level, 0, leftSide) \n"
" } \n"
" } \n"
"} \n"
" \n"
"function drawFolder(leftSide) \n"
"{ \n"
" if (browserVersion == 2) { \n"
" if (!doc.yPos) \n"
" doc.yPos=8 \n"
" doc.write(\"<layer id='folder\" + this.id + \"' top=\" + doc.yPos + \" visibility=hidden>\") \n"
" } \n"
" \n"
" doc.write(\"\\n<table \") \n"
" if (browserVersion == 1) \n"
" doc.write(\" id='folder\" + this.id + \"' style='position:block;' \") \n"
" doc.write(\" border=0 cellspacing=0 cellpadding=0>\") \n"
" doc.write(\"\\n<tr><td>\") \n"
" doc.write(leftSide) \n"
" this.outputLink() \n"
" doc.write(\"<img name='folderIcon\" + this.id + \"' \") \n"
" doc.write(\"src='\" + this.iconSrc+\"' border=0></a>\") \n"
" doc.write(\"</td>\\n<td valign=middle nowrap>\") \n"
" if (USETEXTLINKS) \n"
" { \n"
" this.outputLink() \n"
" doc.write(this.desc + \"</a>\") \n"
" } \n"
" else \n"
" doc.write(this.desc) \n"
" doc.write(\"</td>\") \n"
" doc.write(\"\\n</table>\\n\") \n"
" \n"
" if (browserVersion == 2) { \n"
" doc.write(\"</layer>\") \n"
" } \n"
" \n"
" if (browserVersion == 1) { \n"
" this.navObj = doc.all[\"folder\"+this.id] \n"
" this.iconImg = doc.all[\"folderIcon\"+this.id] \n"
" this.nodeImg = doc.all[\"nodeIcon\"+this.id] \n"
" } else if (browserVersion == 2) { \n"
" this.navObj = doc.layers[\"folder\"+this.id] \n"
" this.iconImg = this.navObj.document.images[\"folderIcon\"+this.id] \n"
" this.nodeImg = this.navObj.document.images[\"nodeIcon\"+this.id] \n"
" doc.yPos=doc.yPos+this.navObj.clip.height \n"
" } \n"
"} \n"
" \n"
"function outputFolderLink() \n"
"{ \n"
" if (this.hreference) \n"
" { \n"
" doc.write(\"<a href='\" + this.hreference + \"' TARGET=\\\"basefrm\\\" \") \n"
" if (browserVersion > 0) \n"
" doc.write(\"onClick='javascript:clickOnFolder(\"+this.id+\")'\") \n"
" doc.write(\">\") \n"
" } \n"
" else \n"
" doc.write(\"<a>\") \n"
"} \n"
" \n"
"function addChild(childNode) \n"
"{ \n"
" this.children[this.nChildren] = childNode \n"
" this.nChildren++ \n"
" return childNode \n"
"} \n"
" \n"
"function folderSubEntries() \n"
"{ \n"
" var i = 0 \n"
" var se = this.nChildren \n"
" \n"
" for (i=0; i < this.nChildren; i++){ \n"
" if (this.children[i].children) //is a folder \n"
" se = se + this.children[i].subEntries() \n"
" } \n"
" \n"
" return se \n"
"} \n"
" \n"
" \n"
"// Definition of class Item (a document or link inside a Folder) \n"
"// ************************************************************* \n"
" \n"
"function Item(itemDescription, itemLink) // Constructor \n"
"{ \n"
" // constant data \n"
" this.desc = itemDescription \n"
" this.link = itemLink \n"
" this.id = -1 //initialized in initalize() \n"
" this.navObj = 0 //initialized in render() \n"
" this.iconImg = 0 //initialized in render() \n"
" this.iconSrc = \"ftv2doc.gif\" \n"
" \n"
" // methods \n"
" this.initialize = initializeItem \n"
" this.createIndex = createEntryIndex \n"
" this.hide = hideItem \n"
" this.display = display \n"
" this.renderOb = drawItem \n"
" this.totalHeight = totalHeight \n"
"} \n"
" \n"
"function hideItem() \n"
"{ \n"
" if (browserVersion == 1) { \n"
" if (this.navObj.style.display == \"none\") \n"
" return \n"
" this.navObj.style.display = \"none\" \n"
" } else { \n"
" if (this.navObj.visibility == \"hidden\") \n"
" return \n"
" this.navObj.visibility = \"hidden\" \n"
" } \n"
"} \n"
" \n"
"function initializeItem(level, lastNode, leftSide) \n"
"{ \n"
" this.createIndex() \n"
" \n"
" if (level>0) \n"
" if (lastNode) //the last 'brother' in the children array \n"
" { \n"
" this.renderOb(leftSide + \"<img src='ftv2lastnode.gif' width=16 height=22>\") \n"
" leftSide = leftSide + \"<img src='ftv2blank.gif' width=16 height=22>\" \n"
" } \n"
" else \n"
" { \n"
" this.renderOb(leftSide + \"<img src='ftv2node.gif' width=16 height=22>\") \n"
" leftSide = leftSide + \"<img src='ftv2vertline.gif' width=16 height=22>\" \n"
" } \n"
" else \n"
" this.renderOb(\"\") \n"
"} \n"
" \n"
"function drawItem(leftSide) \n"
"{ \n"
" if (browserVersion == 2) \n"
" doc.write(\"<layer id='item\" + this.id + \"' top=\" + doc.yPos + \" visibility=hidden>\") \n"
" \n"
" doc.write(\"\\n<table \") \n"
" if (browserVersion == 1) \n"
" doc.write(\" id='item\" + this.id + \"' style='position:block;' \") \n"
" doc.write(\" border=0 cellspacing=0 cellpadding=0>\\n\") \n"
" doc.write(\"<tr><td>\") \n"
" doc.write(leftSide) \n"
" if (this.link!=\"\")\n"
" {\n"
" doc.write(\"<a href=\" + this.link + \">\") \n"
" }\n"
" doc.write(\"<img id='itemIcon\"+this.id+\"' \") \n"
" doc.write(\"src='\"+this.iconSrc+\"' border=0>\") \n"
" if (this.link!=\"\")\n"
" {\n"
" doc.write(\"</a>\")\n"
" } \n"
" doc.write(\"</td>\\n<td valign=middle nowrap>\") \n"
" if (USETEXTLINKS && this.link!=\"\") \n"
" doc.write(\"<a href=\" + this.link + \">\" + this.desc + \"</a>\") \n"
" else \n"
" doc.write(this.desc) \n"
" doc.write(\"\\n</table>\\n\") \n"
" \n"
" if (browserVersion == 2) \n"
" doc.write(\"</layer>\") \n"
" \n"
" if (browserVersion == 1) { \n"
" this.navObj = doc.all[\"item\"+this.id] \n"
" this.iconImg = doc.all[\"itemIcon\"+this.id] \n"
" } else if (browserVersion == 2) { \n"
" this.navObj = doc.layers[\"item\"+this.id] \n"
" this.iconImg = this.navObj.document.images[\"itemIcon\"+this.id] \n"
" doc.yPos=doc.yPos+this.navObj.clip.height \n"
" } \n"
"} \n"
" \n"
" \n"
"// Methods common to both objects (pseudo-inheritance) \n"
"// ******************************************************** \n"
" \n"
"function display() \n"
"{ \n"
" if (browserVersion == 1) \n"
" this.navObj.style.display = \"block\" \n"
" else \n"
" this.navObj.visibility = \"show\" \n"
"} \n"
" \n"
"function createEntryIndex() \n"
"{ \n"
" this.id = nEntries \n"
" indexOfEntries[nEntries] = this \n"
" nEntries++ \n"
"} \n"
" \n"
"// total height of subEntries open \n"
"function totalHeight() //used with browserVersion == 2 \n"
"{ \n"
" var h = this.navObj.clip.height \n"
" var i = 0 \n"
" \n"
" if (this.isOpen) //is a folder and _is_ open \n"
" for (i=0 ; i < this.nChildren; i++) \n"
" h = h + this.children[i].totalHeight() \n"
" \n"
" return h \n"
"} \n"
" \n"
" \n"
"// Events \n"
"// ********************************************************* \n"
" \n"
"function clickOnFolder(folderId) \n"
"{ \n"
" var clicked = indexOfEntries[folderId] \n"
" \n"
" if (!clicked.isOpen) \n"
" clickOnNode(folderId) \n"
" \n"
" return \n"
" \n"
" if (clicked.isSelected) \n"
" return \n"
"} \n"
" \n"
"function clickOnNode(folderId) \n"
"{ \n"
" var clickedFolder = 0 \n"
" var state = 0 \n"
" \n"
" clickedFolder = indexOfEntries[folderId] \n"
" state = clickedFolder.isOpen \n"
" \n"
" clickedFolder.setState(!state) //open<->close \n"
"} \n"
" \n"
"function initializeDocument() \n"
"{ \n"
" doc = document;\n"
" if (doc.all) \n"
" browserVersion = 1 //IE4 \n"
" else \n"
" if (doc.layers) \n"
" browserVersion = 2 //NS4 \n"
" else \n"
" browserVersion = 0 //other \n"
"\n"
" foldersTree.initialize(0, 1, \"\") \n"
" foldersTree.display()\n"
" \n"
" if (browserVersion > 0) \n"
" { \n"
" doc.write(\"<layer top=\"+indexOfEntries[nEntries-1].navObj.top+\">&nbsp;</layer>\") \n"
" \n"
" // close the whole tree \n"
" clickOnNode(0) \n"
" // open the root folder \n"
" clickOnNode(0) \n"
" } \n"
"} \n"
" \n"
"// Auxiliary Functions for Folder-Treee backward compatibility \n"
"// ********************************************************* \n"
" \n"
"function gFld(description, hreference) \n"
"{ \n"
" folder = new Folder(description, hreference) \n"
" return folder \n"
"} \n"
" \n"
"function gLnk(target, description, linkData) \n"
"{ \n"
" fullLink = \"\" \n"
" \n"
" if (linkData!=\"\")\n"
" {\n"
" if (target==0) \n"
" { \n"
" fullLink = \"'\"+linkData+\"' target=\\\"basefrm\\\"\" \n"
" } \n"
" else \n"
" { \n"
" if (target==1) \n"
" fullLink = \"'http://\"+linkData+\"' target=_blank\" \n"
" else \n"
" fullLink = \"'http://\"+linkData+\"' target=\\\"basefrm\\\"\" \n"
" }\n"
" } \n"
" \n"
" linkItem = new Item(description, fullLink) \n"
" return linkItem \n"
"} \n"
" \n"
"function insFld(parentFolder, childFolder) \n"
"{ \n"
" return parentFolder.addChild(childFolder) \n"
"} \n"
" \n"
"function insDoc(parentFolder, document) \n"
"{ \n"
" parentFolder.addChild(document) \n"
"} \n"
" \n"
"// Global variables \n"
"// **************** \n"
" \n"
"USETEXTLINKS = 1\n"
"indexOfEntries = new Array \n"
"nEntries = 0 \n"
"doc = document \n"
"browserVersion = 0 \n"
"selectedFolder=0\n"
//****************************************************************
// You are free to copy the "Folder-Tree" script as long as you
// keep this copyright notice:
// Script found in: http://www.geocities.com/Paris/LeftBank/2178/
// Author: Marcelino Alves Martins (martins@hks.com) December '97.
//****************************************************************
//Log of changes:
// 17 Feb 98 - Fix initialization flashing problem with Netscape
//
// 27 Jan 98 - Root folder starts open; support for USETEXTLINKS;
// make the ftien4 a js file
//
// Definition of class Folder
// *****************************************************************
function Folder(folderDescription, hreference) //constructor
{
//constant data
this.desc = folderDescription
this.hreference = hreference
this.id = -1
this.navObj = 0
this.iconImg = 0
this.nodeImg = 0
this.isLastNode = 0
//dynamic data
this.isOpen = true
this.iconSrc = "ftv2folderopen.gif"
this.children = new Array
this.nChildren = 0
//methods
this.initialize = initializeFolder
this.setState = setStateFolder
this.addChild = addChild
this.createIndex = createEntryIndex
this.hide = hideFolder
this.display = display
this.renderOb = drawFolder
this.totalHeight = totalHeight
this.subEntries = folderSubEntries
this.outputLink = outputFolderLink
}
function setStateFolder(isOpen)
{
var subEntries
var totalHeight
var fIt = 0
var i=0
if (isOpen == this.isOpen)
return
if (browserVersion == 2)
{
totalHeight = 0
for (i=0; i < this.nChildren; i++)
totalHeight = totalHeight + this.children[i].navObj.clip.height
subEntries = this.subEntries()
if (this.isOpen)
totalHeight = 0 - totalHeight
for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++)
indexOfEntries[fIt].navObj.moveBy(0, totalHeight)
}
this.isOpen = isOpen
propagateChangesInState(this)
}
function propagateChangesInState(folder)
{
var i=0
if (folder.isOpen)
{
if (folder.nodeImg)
if (folder.isLastNode)
folder.nodeImg.src = "ftv2mlastnode.gif"
else
folder.nodeImg.src = "ftv2mnode.gif"
folder.iconImg.src = "ftv2folderopen.gif"
for (i=0; i<folder.nChildren; i++)
folder.children[i].display()
}
else
{
if (folder.nodeImg)
if (folder.isLastNode)
folder.nodeImg.src = "ftv2plastnode.gif"
else
folder.nodeImg.src = "ftv2pnode.gif"
folder.iconImg.src = "ftv2folderclosed.gif"
for (i=0; i<folder.nChildren; i++)
folder.children[i].hide()
}
}
function hideFolder()
{
if (browserVersion == 1) {
if (this.navObj.style.display == "none")
return
this.navObj.style.display = "none"
} else {
if (this.navObj.visibility == "hidden")
return
this.navObj.visibility = "hidden"
}
this.setState(0)
}
function initializeFolder(level, lastNode, leftSide)
{
var j=0
var i=0
var numberOfFolders
var numberOfDocs
var nc
nc = this.nChildren
this.createIndex()
var auxEv = ""
if (browserVersion > 0)
auxEv = "<a href='javascript:clickOnNode("+this.id+")'>"
else
auxEv = "<a>"
if (level>0)
if (lastNode) //the last 'brother' in the children array
{
this.renderOb(leftSide + auxEv + "<img name='nodeIcon" + this.id + "' src='ftv2mlastnode.gif' width=16 height=22 border=0></a>")
leftSide = leftSide + "<img src='ftv2blank.gif' width=16 height=22>"
this.isLastNode = 1
}
else
{
this.renderOb(leftSide + auxEv + "<img name='nodeIcon" + this.id + "' src='ftv2mnode.gif' width=16 height=22 border=0></a>")
leftSide = leftSide + "<img src='ftv2vertline.gif' width=16 height=22>"
this.isLastNode = 0
}
else
this.renderOb("")
if (nc > 0)
{
level = level + 1
for (i=0 ; i < this.nChildren; i++)
{
if (i == this.nChildren-1)
this.children[i].initialize(level, 1, leftSide)
else
this.children[i].initialize(level, 0, leftSide)
}
}
}
function drawFolder(leftSide)
{
if (browserVersion == 2) {
if (!doc.yPos)
doc.yPos=8
doc.write("<layer id='folder" + this.id + "' top=" + doc.yPos + " visibility=hidden>")
}
doc.write("\n<table ")
if (browserVersion == 1)
doc.write(" id='folder" + this.id + "' style='position:block;' ")
doc.write(" border=0 cellspacing=0 cellpadding=0>")
doc.write("\n<tr><td>")
doc.write(leftSide)
this.outputLink()
doc.write("<img name='folderIcon" + this.id + "' ")
doc.write("src='" + this.iconSrc+"' border=0></a>")
doc.write("</td>\n<td valign=middle nowrap>")
if (USETEXTLINKS)
{
this.outputLink()
doc.write(this.desc + "</a>")
}
else
doc.write(this.desc)
doc.write("</td>")
doc.write("\n</table>\n")
if (browserVersion == 2) {
doc.write("</layer>")
}
if (browserVersion == 1) {
this.navObj = doc.all["folder"+this.id]
this.iconImg = doc.all["folderIcon"+this.id]
this.nodeImg = doc.all["nodeIcon"+this.id]
} else if (browserVersion == 2) {
this.navObj = doc.layers["folder"+this.id]
this.iconImg = this.navObj.document.images["folderIcon"+this.id]
this.nodeImg = this.navObj.document.images["nodeIcon"+this.id]
doc.yPos=doc.yPos+this.navObj.clip.height
}
}
function outputFolderLink()
{
if (this.hreference)
{
doc.write("<a href='" + this.hreference + "' TARGET=\"basefrm\" ")
if (browserVersion > 0)
doc.write("onClick='javascript:clickOnFolder("+this.id+")'")
doc.write(">")
}
else
doc.write("<a>")
}
function addChild(childNode)
{
this.children[this.nChildren] = childNode
this.nChildren++
return childNode
}
function folderSubEntries()
{
var i = 0
var se = this.nChildren
for (i=0; i < this.nChildren; i++){
if (this.children[i].children) //is a folder
se = se + this.children[i].subEntries()
}
return se
}
// Definition of class Item (a document or link inside a Folder)
// *************************************************************
function Item(itemDescription, itemLink) // Constructor
{
// constant data
this.desc = itemDescription
this.link = itemLink
this.id = -1 //initialized in initalize()
this.navObj = 0 //initialized in render()
this.iconImg = 0 //initialized in render()
this.iconSrc = "ftv2doc.gif"
// methods
this.initialize = initializeItem
this.createIndex = createEntryIndex
this.hide = hideItem
this.display = display
this.renderOb = drawItem
this.totalHeight = totalHeight
}
function hideItem()
{
if (browserVersion == 1) {
if (this.navObj.style.display == "none")
return
this.navObj.style.display = "none"
} else {
if (this.navObj.visibility == "hidden")
return
this.navObj.visibility = "hidden"
}
}
function initializeItem(level, lastNode, leftSide)
{
this.createIndex()
if (level>0)
if (lastNode) //the last 'brother' in the children array
{
this.renderOb(leftSide + "<img src='ftv2lastnode.gif' width=16 height=22>")
leftSide = leftSide + "<img src='ftv2blank.gif' width=16 height=22>"
}
else
{
this.renderOb(leftSide + "<img src='ftv2node.gif' width=16 height=22>")
leftSide = leftSide + "<img src='ftv2vertline.gif' width=16 height=22>"
}
else
this.renderOb("")
}
function drawItem(leftSide)
{
if (browserVersion == 2)
doc.write("<layer id='item" + this.id + "' top=" + doc.yPos + " visibility=hidden>")
doc.write("\n<table ")
if (browserVersion == 1)
doc.write(" id='item" + this.id + "' style='position:block;' ")
doc.write(" border=0 cellspacing=0 cellpadding=0>\n")
doc.write("<tr><td>")
doc.write(leftSide)
if (this.link!="")
{
doc.write("<a href=" + this.link + ">")
}
doc.write("<img id='itemIcon"+this.id+"' ")
doc.write("src='"+this.iconSrc+"' border=0>")
if (this.link!="")
{
doc.write("</a>")
}
doc.write("</td>\n<td valign=middle nowrap>")
if (USETEXTLINKS && this.link!="")
doc.write("<a href=" + this.link + ">" + this.desc + "</a>")
else
doc.write(this.desc)
doc.write("\n</table>\n")
if (browserVersion == 2)
doc.write("</layer>")
if (browserVersion == 1) {
this.navObj = doc.all["item"+this.id]
this.iconImg = doc.all["itemIcon"+this.id]
} else if (browserVersion == 2) {
this.navObj = doc.layers["item"+this.id]
this.iconImg = this.navObj.document.images["itemIcon"+this.id]
doc.yPos=doc.yPos+this.navObj.clip.height
}
}
// Methods common to both objects (pseudo-inheritance)
// ********************************************************
function display()
{
if (browserVersion == 1)
this.navObj.style.display = "block"
else
this.navObj.visibility = "show"
}
function createEntryIndex()
{
this.id = nEntries
indexOfEntries[nEntries] = this
nEntries++
}
// total height of subEntries open
function totalHeight() //used with browserVersion == 2
{
var h = this.navObj.clip.height
var i = 0
if (this.isOpen) //is a folder and _is_ open
for (i=0 ; i < this.nChildren; i++)
h = h + this.children[i].totalHeight()
return h
}
// Events
// *********************************************************
function clickOnFolder(folderId)
{
var clicked = indexOfEntries[folderId]
if (!clicked.isOpen)
clickOnNode(folderId)
return
if (clicked.isSelected)
return
}
function clickOnNode(folderId)
{
var clickedFolder = 0
var state = 0
clickedFolder = indexOfEntries[folderId]
state = clickedFolder.isOpen
clickedFolder.setState(!state) //open<->close
}
function initializeDocument()
{
doc = document;
if (doc.all)
browserVersion = 1 //IE4
else
if (doc.layers)
browserVersion = 2 //NS4
else
browserVersion = 0 //other
foldersTree.initialize(0, 1, "")
foldersTree.display()
if (browserVersion > 0)
{
doc.write("<layer top="+indexOfEntries[nEntries-1].navObj.top+">&nbsp;</layer>")
// close the whole tree
clickOnNode(0)
// open the root folder
clickOnNode(0)
}
}
// Auxiliary Functions for Folder-Treee backward compatibility
// *********************************************************
function gFld(description, hreference)
{
folder = new Folder(description, hreference)
return folder
}
function gLnk(target, description, linkData)
{
fullLink = ""
if (linkData!="")
{
if (target==0)
{
fullLink = "'"+linkData+"' target=\"basefrm\""
}
else
{
if (target==1)
fullLink = "'http://"+linkData+"' target=_blank"
else
fullLink = "'http://"+linkData+"' target=\"basefrm\""
}
}
linkItem = new Item(description, fullLink)
return linkItem
}
function insFld(parentFolder, childFolder)
{
return parentFolder.addChild(childFolder)
}
function insDoc(parentFolder, document)
{
parentFolder.addChild(document)
}
// Global variables
// ****************
USETEXTLINKS = 1
indexOfEntries = new Array
nEntries = 0
doc = document
browserVersion = 0
selectedFolder=0
...@@ -788,7 +788,14 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext) ...@@ -788,7 +788,14 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext)
if (compact) ol.startCenter(); else ol.startItemList(); if (compact) ol.startCenter(); else ol.startItemList();
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
if (Config::ftvHelpFlag)
{
ol.startQuickIndexItem(extLink,"main.html");
}
else
{
ol.startQuickIndexItem(extLink,"index.html"); ol.startQuickIndexItem(extLink,"index.html");
}
parseText(ol,theTranslator->trMainPage()); parseText(ol,theTranslator->trMainPage());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
...@@ -869,7 +876,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext) ...@@ -869,7 +876,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext)
parseText(ol,theTranslator->trFileMembers()); parseText(ol,theTranslator->trFileMembers());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (pageSDict->count()>0) if (documentedPages>0)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"pages.html"); ol.startQuickIndexItem(extLink,"pages.html");
...@@ -2432,9 +2439,20 @@ bool generateLink(OutputList &ol,const char *clName, ...@@ -2432,9 +2439,20 @@ bool generateLink(OutputList &ol,const char *clName,
return FALSE; return FALSE;
} }
else if ((pi=pageSDict->find(linkRef))) // link to a page else if ((pi=pageSDict->find(linkRef))) // link to a page
{
GroupDef *gd = pi->inGroup;
if (gd)
{
SectionInfo *si=0;
if (!pi->name.isEmpty()) si=sectionDict[pi->name];
ol.writeObjectLink(0,gd->getOutputFileBase(),si ? si->label.data() : 0,lt);
writePageRef(ol,gd->getOutputFileBase(),si ? si->label.data() : 0);
}
else
{ {
ol.writeObjectLink(0,pi->name,0,lt); ol.writeObjectLink(0,pi->name,0,lt);
writePageRef(ol,pi->name,0); writePageRef(ol,pi->name,0);
}
return TRUE; return TRUE;
} }
else if ((pi=exampleSDict->find(linkRef))) // link to an example else if ((pi=exampleSDict->find(linkRef))) // link to an example
...@@ -2754,7 +2772,28 @@ QCString convertNameToFile(const char *name,bool allowDots) ...@@ -2754,7 +2772,28 @@ QCString convertNameToFile(const char *name,bool allowDots)
break; break;
} }
} }
//printf("convertNameToFile(%s)=`%s'\n",name,result.data()); return result;
}
/*! Converts a string to HTML-encoded string */
QCString convertToHtml(const QCString &s)
{
QCString result;
char c;
const char *p=s.data();
while ((c=*p++)!=0)
{
switch(c)
{
case '<': result+="&lt;"; break;
case '>': result+="&gt;"; break;
case '&': result+="&amp;"; break;
case '"': result+="&quot;"; break;
default:
result+=c;
break;
}
}
return result; return result;
} }
...@@ -2837,3 +2876,4 @@ QCString stripScope(const char *name) ...@@ -2837,3 +2876,4 @@ QCString stripScope(const char *name)
} }
return result; return result;
} }
...@@ -144,6 +144,7 @@ void initClassHierarchy(ClassList *cl); ...@@ -144,6 +144,7 @@ void initClassHierarchy(ClassList *cl);
bool hasVisibleRoot(BaseClassList *bcl); bool hasVisibleRoot(BaseClassList *bcl);
int minClassDistance(ClassDef *cd,ClassDef *bcd,int level=0); int minClassDistance(ClassDef *cd,ClassDef *bcd,int level=0);
QCString convertNameToFile(const char *name,bool allowDots=FALSE); QCString convertNameToFile(const char *name,bool allowDots=FALSE);
QCString convertToHtml(const QCString &s);
void extractNamespaceName(const QCString &scopeName, void extractNamespaceName(const QCString &scopeName,
QCString &className,QCString &namespaceName); QCString &className,QCString &namespaceName);
QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ); QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ);
...@@ -151,3 +152,4 @@ QCString stripScope(const char *name); ...@@ -151,3 +152,4 @@ QCString stripScope(const char *name);
int iSystem(const char *command); int iSystem(const char *command);
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment