Commit a30c2e3c authored by dimitri's avatar dimitri

Release-1.2.3-20001126

parent 2f32e4c2
DOXYGEN Version 1.2.3-20001118
DOXYGEN Version 1.2.3-20001126
Please read the installation section of the manual for instructions.
--------
Dimitri van Heesch (18 November 2000)
Dimitri van Heesch (26 November 2000)
DOXYGEN Version 1.2.3-20001118
DOXYGEN Version 1.2.3-20001126
Please read INSTALL for compilation instructions.
......@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (18 November 2000)
Dimitri van Heesch (26 November 2000)
1.2.3-20001118
1.2.3-20001126
......@@ -712,8 +712,8 @@ int main(int argc,char * argv[])
// process template file
while (!ctfile.atEnd())
{
int l=ctfile.readLine(buf,maxLineLen-1);
if (buf[l-2]=='\r') // remove the \r for the folks using Windows
int l = ctfile.readLine(buf,maxLineLen-1);
if (l>1 && buf[l-2]=='\r') // remove the \r for the folks using Windows
{
buf[l-2]='\n';
buf[l-1]='\r';
......@@ -1302,6 +1302,31 @@ void init()
1,20
);
addDependency("enumValuesPerLine","generateHtml");
ConfigBool::add( "ftvHelpFlag",
"GENERATE_TREEVIEW",
"FALSE",
"should a folder tree view be generated?",
"If the GENERATE_TREEVIEW tag is set to YES, a side pannel will be\n"
"generated containing a tree-like index structure (just like the one that \n"
"is generated for HTML Help). For this to work a browser that supports \n"
"JavaScript and frames is required (for instance Netscape 4.0+ \n"
"or Internet explorer 4.0+). "
);
addDependency("ftvHelpFlag","generateHtml");
// TODO: integrate this option
// ConfigBool::add( "htmlHelpGroupsOnly",
// "HTMLHELP_GROUPS_ONLY",
// "FALSE",
// "should \\ingroup's be used to create HTML Help hierarchy?",
// "If the HTMLHELP_GROUPS_ONLY tag is set to YES, documented objects are \n"
// "displayed in the HTML Help tree if and only if they are \n"
// "placed in a user-defined group using the \\ingroup markup. \n"
// "Use \\defgroup to define a group before adding objects to a group. \n"
// "Also affects FTV Help (see GENERATE_FTVHELP tag). \n"
// );
// addDependency("htmlHelpGroupsOnly","generateHtml");
//-----------------------------------------------------------------------------------------------
ConfigInfo::add( "LaTeX","configuration options related to the LaTeX output");
//-----------------------------------------------------------------------------------------------
......
......@@ -165,82 +165,13 @@ Thanks go to:
<li>Matthias Andree for providing a .spec script for building rpms from the
sources.
<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,
Vlastimil Havran, Petr Prikryl, Ahmed Also Faisal, Alessandro Falappa,
Kenji Nagamatsu, Francisco Oltra Thennet, Olli Korhonen,
Boris Bralo, Nickolay Semyonov, and Grzegorz Kowal for providing
translations into various languages.
<li>
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.
<li>many, many others for suggestions, patches and bug reports.
</ul>
*/
Name: doxygen
Version: 1.2.3-20001118
Version: 1.2.3-20001126
Summary: documentation system for C, C++ and IDL
Release: 1
Source0: doxygen-%{version}.src.tar.gz
......
......@@ -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
void ClassDef::writeDocumentation(OutputList &ol)
{
......@@ -945,32 +976,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.endGroupHeader();
ol.startTextBlock();
ArgumentList *al=outerTempArgList;
if (al) // class is a template
{
ol.startSubsubsection();
ol.docify("template<");
Argument *a=al->first();
while (a)
{
ol.docify(a->type);
if (!a->name.isEmpty())
{
ol.docify(" ");
ol.docify(a->name);
}
if (a->defval.length()!=0)
{
ol.docify(" = ");
ol.docify(a->defval);
}
a=al->next();
if (a) ol.docify(", ");
}
ol.docify("> "+pageType.lower()+" "+name());
ol.endSubsubsection();
ol.writeString("\n");
}
writeTemplateSpec(ol,outerTempArgList,pageType,name());
// repeat brief description
if (!briefDescription().isEmpty() && Config::repeatBriefFlag)
......@@ -1009,6 +1015,10 @@ void ClassDef::writeDocumentation(OutputList &ol)
writeSourceDef(ol,name());
ol.endTextBlock();
}
else
{
writeTemplateSpec(ol,outerTempArgList,pageType,name());
}
typedefMembers.countDocMembers();
if (typedefMembers.totalCount()>0)
......
/* This file was generated by configgen on Sat Oct 28 15:42:39 2000
/* This file was generated by configgen on Sat Nov 25 21:38:08 2000
* from config_templ.h
*
* DO NOT EDIT!
......@@ -97,6 +97,7 @@ struct Config
static bool htmlHelpFlag; // should html help files be generated?
static bool noIndexFlag; // generate condensed index flag
static int enumValuesPerLine; // number of enum values that are put on one line
static bool ftvHelpFlag; // should a folder tree view be generated?
static bool generateLatex; // generate Latex output
static QCString latexOutputDir; // the directory to put the Latex files
static bool compactLatexFlag; // generate compact LaTeX documentation.
......
/* This file was generated by configgen on Sat Oct 28 15:42:39 2000
/* This file was generated by configgen on Sat Nov 25 21:38:08 2000
* from config_templ.l
*
* DO NOT EDIT!
......@@ -134,6 +134,7 @@ bool Config::htmlAlignMemberFlag = TRUE;
bool Config::htmlHelpFlag = FALSE;
bool Config::noIndexFlag = FALSE;
int Config::enumValuesPerLine = 4;
bool Config::ftvHelpFlag = FALSE;
bool Config::generateLatex = TRUE;
QCString Config::latexOutputDir = "latex";
bool Config::compactLatexFlag = FALSE;
......@@ -411,6 +412,7 @@ static void readIncludeFile(const char *incName)
<Start>"GENERATE_HTMLHELP"[ \t]*"=" { BEGIN(GetBool); b=&Config::htmlHelpFlag; }
<Start>"DISABLE_INDEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::noIndexFlag; }
<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>"LATEX_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::latexOutputDir; s->resize(0); }
<Start>"COMPACT_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactLatexFlag; }
......@@ -710,6 +712,7 @@ void dumpConfig()
printf("htmlHelpFlag=`%d'\n",Config::htmlHelpFlag);
printf("noIndexFlag=`%d'\n",Config::noIndexFlag);
printf("enumValuesPerLine=`%d'\n",Config::enumValuesPerLine);
printf("ftvHelpFlag=`%d'\n",Config::ftvHelpFlag);
printf("# configuration options related to the LaTeX output\n");
printf("generateLatex=`%d'\n",Config::generateLatex);
printf("latexOutputDir=`%s'\n",Config::latexOutputDir.data());
......@@ -878,6 +881,7 @@ void Config::init()
Config::htmlHelpFlag = FALSE;
Config::noIndexFlag = FALSE;
Config::enumValuesPerLine = 4;
Config::ftvHelpFlag = FALSE;
Config::generateLatex = TRUE;
Config::latexOutputDir = "latex";
Config::compactLatexFlag = FALSE;
......@@ -1037,8 +1041,8 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# information to generate all constant output in the proper language. \n";
t << "# The default language is English, other supported languages are: \n";
t << "# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, \n";
t << "# Korean, Hungarian, Spanish, Romanian, Russian, Croatian, Polish, \n";
t << "# Portuguese and Slovene.\n";
t << "# Korean, Hungarian, Norwegian, Spanish, Romanian, Russian, Croatian, \n";
t << "# Polish, Portuguese and Slovene.\n";
t << "\n";
}
t << "OUTPUT_LANGUAGE = ";
......@@ -1706,6 +1710,19 @@ void writeTemplateConfig(QFile *f,bool sl)
writeIntValue(t,Config::enumValuesPerLine);
t << "\n";
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";
}
......
......@@ -756,7 +756,7 @@ FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]+
ID [a-z_A-Z][a-z_A-Z0-9]*
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+
URLMASK [a-z_A-Z0-9\~\:\?\@\#\.\-\+\/\=]+
URLMASK [a-z_A-Z0-9\~\:\?\@\%\#\.\-\+\/\=]+
NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9]
WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]"\"")
ATTR ({B}+[^>\n]*)?
......@@ -966,7 +966,10 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
<DocLink,DocLinkText>{CMD}"endlink" { // <- needed for things like \endlink.
//printf("GenerateLink className=`%s' linkRef=`%s' linkText=`%s'\n",
// className.data(),linkRef.data(),linkText.data());
generateLink(*outDoc,className,linkRef,inSeeBlock,linkText.stripWhiteSpace());
if (!generateLink(*outDoc,className,linkRef,inSeeBlock,linkText.stripWhiteSpace()))
{
warn(yyFileName,yyLineNr,"Warning: link to unknown section %s in the documentation of this entity!",linkRef.data());
}
BEGIN( DocScan );
}
<DocScan>{CMD}"endlink"/[^a-z_A-Z0-9] { warn(yyFileName,yyLineNr,
......@@ -2007,6 +2010,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
<DocScan,DocEmphasis,DocBold,DocCode>"%"[a-zA-Z_0-9\-]+ {
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\*\&]*")" {
outDoc->startEmphasis();
generateRef(*outDoc,className,yytext,inSeeBlock);
......@@ -2019,6 +2028,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->endEmphasis();
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\*\&]*")" {
outDoc->startBold();
generateRef(*outDoc,className,yytext,inSeeBlock);
......@@ -2031,6 +2046,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->endBold();
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\*\&]*")" {
outDoc->startTypewriter();
generateRef(*outDoc,className,yytext,inSeeBlock);
......
......@@ -51,6 +51,7 @@
#include "language.h"
#include "debug.h"
#include "htmlhelp.h"
#include "ftvhelp.h"
#include "defargs.h"
#include "rtfgen.h"
#include "xml.h"
......@@ -193,6 +194,7 @@ int documentedGroups;
int documentedNamespaces;
int documentedNamespaceMembers;
int documentedIncludeFiles;
int documentedPages;
QTextStream tagFile;
......@@ -218,7 +220,7 @@ const char *getOverloadDocs()
static void addRelatedPage(const char *name,const QCString &ptitle,
const QCString &doc,QList<QCString> *anchors,
const char *fileName,int startLine,
int todoId,int testId
int todoId,int testId,GroupDef *gd=0
)
{
PageInfo *pi=0;
......@@ -252,6 +254,8 @@ static void addRelatedPage(const char *name,const QCString &ptitle,
pageSDict->append(baseName,pi);
if (gd) gd->addPage(pi);
if (!pi->title.isEmpty())
{
//outputList->writeTitle(pi->name,pi->title);
......@@ -259,7 +263,14 @@ static void addRelatedPage(const char *name,const QCString &ptitle,
// a page name is a label as well!
SectionInfo *si=new SectionInfo(
pi->name,pi->title,SectionInfo::Section);
if (gd)
{
si->fileName=gd->getOutputFileBase();
}
else
{
si->fileName=pageName;
}
//printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data());
//printf("Adding section info %s\n",pi->name.data());
sectionDict.insert(pageName,si);
......@@ -267,6 +278,20 @@ static void addRelatedPage(const char *name,const QCString &ptitle,
}
}
static void addRelatedPage(Entry *root)
{
GroupDef *gd=0;
QListIterator<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,
......@@ -1754,7 +1779,11 @@ static void buildMemberList(Entry *root)
QCString nsName,rnsName;
if (nd) nsName = nd->name().copy();
if (rnd) rnsName = rnd->name().copy();
QCString groupName,rgroupName;
if (md->getGroupDef()) groupName=md->getGroupDef()->name().copy();
if (root->groups && root->groups->first()) rgroupName=root->groups->first()->copy();
//printf("namespace `%s' `%s'\n",nsName.data(),rnsName.data());
//printf("groupNames `%s' `%s'\n",groupName.data(),rgroupName.data());
if (
matchArguments(md->argumentList(),root->argList,0,nsName)
)
......@@ -1764,7 +1793,10 @@ static void buildMemberList(Entry *root)
((fd!=0 && // no external reference and
fd->absFilePath()==root->fileName // prototype in the same file
) ||
md->getGroupDef()!=0 // member is part of a group
(
!groupName.isEmpty() || // member is or was part of a group
!rgroupName.isEmpty()
)
);
// otherwise, allow a duplicate global member with the same argument list
......@@ -4565,9 +4597,7 @@ static void buildPageList(Entry *root)
{
if (!root->name.isEmpty())
{
addRelatedPage(root->name,root->args,root->doc,root->anchors,
root->fileName,root->startLine,root->todoId,root->testId
);
addRelatedPage(root);
}
}
else if (root->section == Entry::MAINPAGEDOC_SEC)
......@@ -4670,9 +4700,12 @@ static void resolveUserReferences()
static void generatePageDocs()
{
if (documentedPages==0) return;
PageSDictIterator pdi(*pageSDict);
PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi)
{
if (!pi->inGroup)
{
msg("Generating docs for page %s...\n",pi->name.data());
outputList->disable(OutputGenerator::Man);
......@@ -4697,6 +4730,7 @@ static void generatePageDocs()
endFile(*outputList);
outputList->enable(OutputGenerator::Man);
}
}
}
//----------------------------------------------------------------------------
......@@ -4724,6 +4758,7 @@ static void buildExampleList(Entry *root)
convertFileName(pi->name)+"-example"
);
exampleSDict->inSort(root->name,pi);
addExampleToGroups(root,pi);
}
}
}
......@@ -4774,13 +4809,17 @@ static void generateGroupDocs()
for (;(gd=gli.current());++gli)
{
//printf("group %s #members=%d\n",gd->name().data(),gd->countMembers());
if (gd->countMembers()>0) gd->writeDocumentation(*outputList);
else
{
warn(gd->getDefFileName(),gd->getDefLine(),
"Warning: group %s does not have any (documented) members.",
gd->name().data());
}
//if (gd->countMembers()>0)
//{
// gd->writeDocumentation(*outputList);
//}
//else
//{
// warn(gd->getDefFileName(),gd->getDefLine(),
// "Warning: group %s does not have any (documented) members.",
// gd->name().data());
//}
gd->writeDocumentation(*outputList);
}
}
......@@ -5709,6 +5748,7 @@ int main(int argc,char **argv)
outputList->add(new HtmlGenerator);
HtmlGenerator::init();
if (Config::htmlHelpFlag) HtmlHelp::getInstance()->initialize();
if (Config::ftvHelpFlag) FTVHelp::getInstance()->initialize();
copyStyleSheet();
}
if (Config::generateLatex)
......@@ -6037,6 +6077,7 @@ int main(int argc,char **argv)
documentedGroups = countGroups();
documentedNamespaces = countNamespaces();
documentedNamespaceMembers = countNamespaceMembers();
documentedPages = countRelatedPages();
//documentedIncludeFiles = countIncludeFiles();
// compute the shortest possible names of all files
......@@ -6154,6 +6195,10 @@ int main(int argc,char **argv)
{
HtmlHelp::getInstance()->finalize();
}
if (Config::generateHtml && Config::ftvHelpFlag)
{
FTVHelp::getInstance()->finalize();
}
if (Config::generateHtml) removeDoxFont(Config::htmlOutputDir);
......
......@@ -116,6 +116,7 @@ extern int documentedGroups;
extern int documentedNamespaces;
extern int documentedNamespaceMembers;
extern int documentedIncludeFiles;
extern int documentedPages;
extern QCString spaces;
extern const char * getOverloadDocs();
......
......@@ -27,7 +27,8 @@ HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \
translator_it.h formula.h debug.h membergroup.h htmlhelp.h \
translator_ru.h translator_pl.h dot.h rtfgen.h xml.h xml_dtd.h \
reflist.h page.h sortdict.h translator_hu.h translator_kr.h \
translator_ro.h translator_si.h translator_cn.h
translator_ro.h translator_si.h translator_cn.h ftvhelp.h \
treeview.h
SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \
memberdef.cpp membername.cpp index.cpp memberlist.cpp \
entry.cpp logos.cpp instdox.cpp message.cpp code.cpp \
......@@ -38,7 +39,7 @@ SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \
diagram.cpp gifenc.cpp image.cpp namespacedef.cpp \
version.cpp language.cpp definition.cpp formula.cpp debug.cpp \
membergroup.cpp htmlhelp.cpp dot.cpp rtfgen.cpp xml.cpp \
reflist.cpp
reflist.cpp ftvhelp.cpp
unix:LIBS += -L../qtools -lqtools
win32:INCLUDEPATH += .
win32:LIBS += qtools.lib shell32.lib
......
......@@ -81,3 +81,6 @@ sub GenerateDep {
xml_dtd.h: doxygen.dtd
cat doxygen.dtd | sed -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >xml_dtd.h
treeview.h: treeview.js
cat treeview.js | sed -e "s/\\\\/\\\\\\\\/g" -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >treeview.h
This diff is collapsed.
/******************************************************************************
* 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 @@
#include "message.h"
#include "membergroup.h"
#include "doxygen.h"
#include "page.h"
GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) :
Definition(df,dl,na)
......@@ -38,7 +39,8 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) :
classList = new ClassList;
groupList = new GroupList;
namespaceList = new NamespaceList;
pageDict = new PageSDict(257);
exampleDict = new PageSDict(257);
allMemberList = new MemberList;
allMemberDict = new QDict<MemberDef>;
if (t)
......@@ -52,6 +54,8 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) :
memberGroupList = new MemberGroupList;
memberGroupList->setAutoDelete(TRUE);
memberGroupDict = new MemberGroupDict(1009);
visited = 0;
}
GroupDef::~GroupDef()
......@@ -60,6 +64,8 @@ GroupDef::~GroupDef()
delete classList;
delete groupList;
delete namespaceList;
delete pageDict;
delete exampleDict;
delete allMemberList;
delete allMemberDict;
delete memberGroupList;
......@@ -100,6 +106,17 @@ void GroupDef::addNamespace(const NamespaceDef *def)
namespaceList->append(def);
}
void GroupDef::addPage(PageInfo *def)
{
pageDict->append(def->name,def);
def->inGroup = this;
}
void GroupDef::addExample(const PageInfo *def)
{
exampleDict->append(def->name,def);
}
void GroupDef::addMemberListToGroup(MemberList *ml,
bool (MemberDef::*func)() const)
{
......@@ -214,7 +231,9 @@ int GroupDef::countMembers() const
classList->count()+
namespaceList->count()+
groupList->count()+
allMemberList->count();
allMemberList->count()+
pageDict->count()+
exampleDict->count();
}
/*! Compute the HTML anchor names for all members in the class */
......@@ -249,6 +268,8 @@ void GroupDef::writeDocumentation(OutputList &ol)
//ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
}
ol.startMemberSections();
if (fileList->count()>0)
{
......@@ -340,9 +361,12 @@ void GroupDef::writeDocumentation(OutputList &ol)
allMemberList->writeDeclarations(ol,0,0,0,this,0,0);
}
ol.endMemberSections();
//int dl=doc.length();
//doc=doc.stripWhiteSpace();
if (!briefDescription().isEmpty() || !documentation().isEmpty())
{
if (pageDict->count()!=countMembers()) // classical layout
{
ol.writeRuler();
ol.pushGeneratorState();
......@@ -353,18 +377,43 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
// repeat brief description
if (!briefDescription().isEmpty())
if (!briefDescription().isEmpty() && Config::repeatBriefFlag)
{
ol+=briefOutput;
ol.newParagraph();
}
}
// write documentation
if (!documentation().isEmpty())
{
parseDoc(ol,defFileName,defLine,name(),0,documentation()+"\n");
}
}
PageInfo *pi=0;
PageSDictIterator pdi(*pageDict);
for (pdi.toFirst();(pi=pdi.current());++pdi)
{
QCString pageName;
if (Config::caseSensitiveNames)
pageName=pi->name.copy();
else
pageName=pi->name.lower();
SectionInfo *si=0;
if (!pi->title.isEmpty() && !pi->name.isEmpty() &&
(si=sectionDict[pi->name])!=0)
{
ol.startSection(si->label,si->title,TRUE);
ol.docify(si->title);
ol.endSection(si->label,TRUE);
}
ol.startTextBlock();
parseDoc(ol,pi->defFileName,pi->defLine,0,0,pi->doc);
ol.endTextBlock();
}
defineMembers.countDocMembers(TRUE);
if (defineMembers.totalCount()>0 )
......@@ -507,3 +556,20 @@ void addMemberToGroups(Entry *root,MemberDef *md)
}
}
void addExampleToGroups(Entry *root,PageInfo *eg)
{
QListIterator<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 @@
#include "definition.h"
#include "memberlist.h"
#include "memberdef.h"
#include "htmlhelp.h"
class FileList;
class ClassList;
......@@ -35,6 +36,8 @@ class OutputList;
class NamespaceList;
class MemberGroupList;
class MemberGroupDict;
class PageSDict;
class PageInfo;
class GroupDef : public Definition
{
......@@ -48,6 +51,8 @@ class GroupDef : public Definition
void addClass(const ClassDef *def);
void addNamespace(const NamespaceDef *def);
void addGroup(const GroupDef *def);
void addPage(PageInfo *def); // pages in this group
void addExample(const PageInfo *def); // examples in this group
void insertMember(MemberDef *def);
void writeDocumentation(OutputList &ol);
int countMembers() const;
......@@ -64,6 +69,10 @@ class GroupDef : public Definition
void addMembersToMemberGroup();
void distributeMemberGroupDocumentation();
bool visited; // number of times accessed for output - KPW
friend void writeGroupTreeNode(OutputList&, GroupDef*); // make accessible for writing tree view of group in index.cpp - KPW
protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
......@@ -74,6 +83,8 @@ class GroupDef : public Definition
ClassList *classList; // list of classes in the group
NamespaceList *namespaceList; // list of namespaces in the group
GroupList *groupList; // list of sub groups.
PageSDict *pageDict; // list of pages in the group
PageSDict *exampleDict; // list of examples in the group
MemberList *allMemberList; // list of all members in the group
QDict<MemberDef> *allMemberDict;
......@@ -107,5 +118,8 @@ void addClassToGroups(Entry *root,ClassDef *cd);
void addNamespaceToGroups(Entry *root,NamespaceDef *nd);
void addGroupToGroups(Entry *root,GroupDef *subGroup);
void addMemberToGroups(Entry *root,MemberDef *md);
void addPageToGroups(Entry *root,PageInfo *pi);
void addExampleToGroups(Entry *root,PageInfo *eg);
#endif
......@@ -60,8 +60,6 @@ static const char *defaultStyleSheet =
"FONT.charliteral { color: #008080 }\n";
HtmlHelp *HtmlGenerator::htmlHelp = 0;
HtmlGenerator::HtmlGenerator() : OutputGenerator()
{
if (!Config::headerFile.isEmpty()) header=fileToString(Config::headerFile);
......
......@@ -22,7 +22,6 @@
#include "outputgen.h"
class QFile;
class HtmlHelp;
class HtmlGenerator : public OutputGenerator
{
......@@ -249,7 +248,6 @@ class HtmlGenerator : public OutputGenerator
HtmlGenerator &operator=(const HtmlGenerator &g);
HtmlGenerator(const HtmlGenerator &g);
static HtmlHelp *htmlHelp;
int col;
};
......
......@@ -267,7 +267,7 @@ void HtmlHelp::initialize()
cts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
"<HTML><HEAD></HEAD><BODY>\n"
"<OBJECT type=\"text/site properties\">\n"
"<param name=\"ImageType\" value=\"Folder\">\n"
"<param name=\"FrameName\" value=\"right\">\n"
"</OBJECT>\n"
"<UL>\n";
......@@ -284,7 +284,7 @@ void HtmlHelp::initialize()
kts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
"<HTML><HEAD></HEAD><BODY>\n"
"<OBJECT type=\"text/site properties\">\n"
"<param name=\"ImageType\" value=\"Folder\">\n"
"<param name=\"FrameName\" value=\"right\">\n"
"</OBJECT>\n"
"<UL>\n";
}
......@@ -297,19 +297,21 @@ void HtmlHelp::createProjectFile()
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
QCString indexName="index.html";
if (Config::ftvHelpFlag) indexName="main.html";
t << "[OPTIONS]\n"
"Compatibility=1.1\n"
"Full-text search=Yes\n"
"Contents file=index.hhc\n"
"Default Window=main\n"
"Default topic=index.html\n"
"Default topic=" << indexName << "\n"
"Index file=index.hhk\n"
"Title=" << Config::projectName << endl << endl;
t << "[WINDOWS]" << endl;
t << "main=\"" << Config::projectName << "\",\"index.hhc\","
"\"index.hhk\",\"index.html\",\"index.html\",,,,,0x23520,,"
"0x3006,,,,,,,,0" << endl << endl;
"\"index.hhk\",\"" << indexName << "\",\"" <<
indexName << "\",,,,,0x23520,,0x3006,,,,,,,,0" << endl << endl;
t << "[FILES]" << endl;
char *s = indexFiles.first();
......@@ -380,19 +382,30 @@ int HtmlHelp::decContentsDepth()
* \param name the name of 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)
{
int i; for (i=0;i<dc;i++) cts << " ";
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";
if (anchor) cts << "#" << anchor;
cts << "\">";
}
cts << "<param name=\"Name\" value=\"" << name << "\">"
"</OBJECT>\n";
cts << "<param name=\"ImageNumber\" value=\"";
if (isDir) // added - KPW
{
cts << (int)BOOK_CLOSED ;
}
else
{
cts << (int)TEXT;
}
cts << "\">";
cts << "</OBJECT>\n";
}
/*! Add an list item to the index file.
......@@ -406,3 +419,4 @@ void HtmlHelp::addIndexItem(const char *level1, const char *level2,
index->addItem(level1,level2,ref,anchor,TRUE);
index->addItem(level2,level1,ref,anchor,FALSE);
}
......@@ -34,6 +34,32 @@ class HtmlHelpIndex;
*/
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:
static HtmlHelp *getInstance();
void initialize();
......@@ -42,12 +68,16 @@ class HtmlHelp
int decContentsDepth();
/*! return the current depth of the contents tree */
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);
void addIndexItem(const char *level1, const char *level2,
const char *ref, const char *anchor);
void addIndexFile(const char *name);
private:
void createProjectFile();
......@@ -61,3 +91,4 @@ class HtmlHelp
};
#endif /* HTMLHELP_H */
This diff is collapsed.
......@@ -73,5 +73,6 @@ int countNamespaces();
int countAnnotatedClasses();
int countNamespaceMembers();
int countIncludeFiles();
int countRelatedPages();
#endif
......@@ -493,13 +493,10 @@ void LatexGenerator::startIndexSection(IndexSections is)
GroupDef *gd=groupList.first();
bool found=FALSE;
while (gd && !found)
{
if (gd->countMembers()>0)
{
if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Module Documentation}\n";
found=TRUE;
}
gd=groupList.next();
}
}
......@@ -618,21 +615,15 @@ void LatexGenerator::endIndexSection(IndexSections is)
GroupDef *gd=groupList.first();
bool found=FALSE;
while (gd && !found)
{
if (gd->countMembers()>0)
{
t << "}\n\\input{" << gd->getOutputFileBase() << "}\n";
found=TRUE;
}
gd=groupList.next();
}
while (gd)
{
if (gd->countMembers()>0)
{
if (Config::compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << gd->getOutputFileBase() << "}\n";
}
gd=groupList.next();
}
}
......@@ -734,24 +725,20 @@ void LatexGenerator::endIndexSection(IndexSections is)
t << "}\n";
PageSDictIterator pdi(*pageSDict);
PageInfo *pi=pdi.toFirst();
if (pi)
bool first=TRUE;
for (pdi.toFirst();(pi=pdi.current());++pdi)
{
QCString pageName;
if (Config::caseSensitiveNames)
pageName=pi->name.copy();
else
pageName=pi->name.lower();
t << "\\input{" << pageName << "}\n";
}
for (++pdi;(pi=pdi.current());++pdi)
if (!pi->inGroup)
{
if (Config::compactLatexFlag) t << "\\input" ; else t << "\\include";
QCString pageName;
if (Config::caseSensitiveNames)
pageName=pi->name.copy();
else
pageName=pi->name.lower();
if (Config::compactLatexFlag || first) t << "\\input" ; else t << "\\include";
t << "{" << pageName << "}\n";
first=FALSE;
}
}
}
break;
......
......@@ -22,7 +22,7 @@ class PageInfo
public:
PageInfo(const char *f, int l,const char *n,const char *d,const char *t) :
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
QCString defFileName;
......@@ -36,6 +36,9 @@ class PageInfo
// ids
int todoId;
int testId;
// is this page part of a group
GroupDef *inGroup;
};
class PageSDict : public SDict<PageInfo>
......
......@@ -809,12 +809,9 @@ void RTFGenerator::startIndexSection(IndexSections is)
GroupDef *gd=groupList.first();
bool found=FALSE;
while (gd && !found)
{
if (gd->countMembers()>0)
{
beginRTFChapter();
found=TRUE;
}
gd=groupList.next();
}
}
......@@ -965,31 +962,13 @@ void RTFGenerator::endIndexSection(IndexSections is)
case isModuleDocumentation:
{
GroupDef *gd=groupList.first();
bool found=FALSE;
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)
{
if (gd->countMembers()>0)
{
t << "\\par " << Rtf_Style_Reset << endl;
beginRTFSection();
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
t << gd->getOutputFileBase();
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
}
gd=groupList.next();
}
}
......@@ -1120,30 +1099,22 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}"<< endl;
PageSDictIterator pdi(*pageSDict);
PageInfo *pi=pdi.toFirst();
if (pi)
bool first=TRUE;
for (pdi.toFirst();(pi=pdi.current());++pdi)
{
QCString pageName;
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)
if (!pi->inGroup)
{
QCString pageName;
if (Config::caseSensitiveNames)
pageName=pi->name.copy();
else
pageName=pi->name.lower();
//t << "\\par " << Rtf_Style_Reset << endl;
//beginRTFSection();
if (first) t << "\\par " << Rtf_Style_Reset << endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
t << pageName;
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
first=FALSE;
}
}
}
break;
......
......@@ -3000,6 +3000,11 @@ TITLE [tT][iI][tT][lL][eE]
}
<ExampleDoc,PageDoc,ClassDoc>"\n" { yyLineNr++ ; 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; }
<Doc,JavaDoc,LineDoc,ExampleDoc,PageDoc,ClassDoc>^{B}*"//"
<Doc,ExampleDoc,PageDoc,ClassDoc>"//" { current->doc += yytext; }
......
This diff is collapsed.
This diff is collapsed.
......@@ -788,7 +788,14 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext)
if (compact) ol.startCenter(); else ol.startItemList();
if (!compact) ol.writeListItem();
if (Config::ftvHelpFlag)
{
ol.startQuickIndexItem(extLink,"main.html");
}
else
{
ol.startQuickIndexItem(extLink,"index.html");
}
parseText(ol,theTranslator->trMainPage());
ol.endQuickIndexItem();
......@@ -869,7 +876,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext)
parseText(ol,theTranslator->trFileMembers());
ol.endQuickIndexItem();
}
if (pageSDict->count()>0)
if (documentedPages>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"pages.html");
......@@ -2432,9 +2439,20 @@ bool generateLink(OutputList &ol,const char *clName,
return FALSE;
}
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);
writePageRef(ol,pi->name,0);
}
return TRUE;
}
else if ((pi=exampleSDict->find(linkRef))) // link to an example
......@@ -2754,7 +2772,28 @@ QCString convertNameToFile(const char *name,bool allowDots)
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;
}
......@@ -2837,3 +2876,4 @@ QCString stripScope(const char *name)
}
return result;
}
......@@ -144,6 +144,7 @@ void initClassHierarchy(ClassList *cl);
bool hasVisibleRoot(BaseClassList *bcl);
int minClassDistance(ClassDef *cd,ClassDef *bcd,int level=0);
QCString convertNameToFile(const char *name,bool allowDots=FALSE);
QCString convertToHtml(const QCString &s);
void extractNamespaceName(const QCString &scopeName,
QCString &className,QCString &namespaceName);
QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ);
......@@ -151,3 +152,4 @@ QCString stripScope(const char *name);
int iSystem(const char *command);
#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