Commit 5b23c957 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.5.5-20080316

parent 8051d0cf
DOXYGEN Version 1.5.5-20080309 DOXYGEN Version 1.5.5-20080316
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (09 March 2008) Dimitri van Heesch (16 March 2008)
DOXYGEN Version 1.5.5_20080309 DOXYGEN Version 1.5.5_20080316
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (09 March 2008) Dimitri van Heesch (dimitri@stack.nl) (16 March 2008)
...@@ -35,11 +35,14 @@ class INode; ...@@ -35,11 +35,14 @@ class INode;
class IDocInternal; class IDocInternal;
class IDocRoot; class IDocRoot;
#define VIRTUAL_DESTRUCTOR(x) virtual ~x() {}
/*! \brief Read only interface to a string. /*! \brief Read only interface to a string.
*/ */
class IString class IString
{ {
public: public:
VIRTUAL_DESTRUCTOR(IString)
/*! Returns a latin1 character representation of the string. */ /*! Returns a latin1 character representation of the string. */
virtual const char *latin1() const = 0; virtual const char *latin1() const = 0;
/*! Returns a 16-bit unicode character representation of the character at /*! Returns a 16-bit unicode character representation of the character at
...@@ -60,6 +63,7 @@ class IString ...@@ -60,6 +63,7 @@ class IString
class ILinkedText class ILinkedText
{ {
public: public:
VIRTUAL_DESTRUCTOR(ILinkedText)
enum Kind { Kind_Text, Kind_Ref }; enum Kind { Kind_Text, Kind_Ref };
virtual Kind kind() const = 0; virtual Kind kind() const = 0;
}; };
...@@ -69,6 +73,7 @@ class ILinkedText ...@@ -69,6 +73,7 @@ class ILinkedText
class ILT_Text : public ILinkedText class ILT_Text : public ILinkedText
{ {
public: public:
VIRTUAL_DESTRUCTOR(ILT_Text)
virtual const IString *text() const = 0; virtual const IString *text() const = 0;
}; };
...@@ -77,6 +82,7 @@ class ILT_Text : public ILinkedText ...@@ -77,6 +82,7 @@ class ILT_Text : public ILinkedText
class ILT_Ref : public ILinkedText class ILT_Ref : public ILinkedText
{ {
public: public:
VIRTUAL_DESTRUCTOR(ILT_Ref)
enum TargetKind { Member, Compound }; enum TargetKind { Member, Compound };
virtual const IString *id() const = 0; virtual const IString *id() const = 0;
virtual TargetKind targetKind() const = 0; virtual TargetKind targetKind() const = 0;
...@@ -89,6 +95,7 @@ class ILT_Ref : public ILinkedText ...@@ -89,6 +95,7 @@ class ILT_Ref : public ILinkedText
class ILinkedTextIterator class ILinkedTextIterator
{ {
public: public:
VIRTUAL_DESTRUCTOR(ILinkedTextIterator)
virtual ILinkedText *toFirst() = 0; virtual ILinkedText *toFirst() = 0;
virtual ILinkedText *toLast() = 0; virtual ILinkedText *toLast() = 0;
virtual ILinkedText *toNext() = 0; virtual ILinkedText *toNext() = 0;
...@@ -101,6 +108,7 @@ class ILinkedTextIterator ...@@ -101,6 +108,7 @@ class ILinkedTextIterator
class IParam class IParam
{ {
public: public:
VIRTUAL_DESTRUCTOR(IParam)
virtual ILinkedTextIterator *type() const = 0; virtual ILinkedTextIterator *type() const = 0;
virtual const IString * declarationName() const = 0; virtual const IString * declarationName() const = 0;
virtual const IString * definitionName() const = 0; virtual const IString * definitionName() const = 0;
...@@ -113,6 +121,7 @@ class IParam ...@@ -113,6 +121,7 @@ class IParam
class IParamIterator class IParamIterator
{ {
public: public:
VIRTUAL_DESTRUCTOR(IParamIterator)
virtual IParam *toFirst() = 0; virtual IParam *toFirst() = 0;
virtual IParam *toLast() = 0; virtual IParam *toLast() = 0;
virtual IParam *toNext() = 0; virtual IParam *toNext() = 0;
...@@ -124,6 +133,7 @@ class IParamIterator ...@@ -124,6 +133,7 @@ class IParamIterator
class IMemberReference class IMemberReference
{ {
public: public:
VIRTUAL_DESTRUCTOR(IMemberReference)
virtual IMember *member() const = 0; virtual IMember *member() const = 0;
virtual const IString * name() const = 0; virtual const IString * name() const = 0;
virtual const IString * scope() const = 0; virtual const IString * scope() const = 0;
...@@ -135,6 +145,7 @@ class IMemberReference ...@@ -135,6 +145,7 @@ class IMemberReference
class IMemberReferenceIterator class IMemberReferenceIterator
{ {
public: public:
VIRTUAL_DESTRUCTOR(IMemberReferenceIterator)
virtual IMemberReference *toFirst() = 0; virtual IMemberReference *toFirst() = 0;
virtual IMemberReference *toLast() = 0; virtual IMemberReference *toLast() = 0;
virtual IMemberReference *toNext() = 0; virtual IMemberReference *toNext() = 0;
...@@ -146,6 +157,7 @@ class IMemberReferenceIterator ...@@ -146,6 +157,7 @@ class IMemberReferenceIterator
class IDoc class IDoc
{ {
public: public:
VIRTUAL_DESTRUCTOR(IDoc)
enum Kind enum Kind
{ {
Invalid = 0, // 0 Invalid = 0, // 0
...@@ -492,6 +504,7 @@ class IDocRoot : public IDoc ...@@ -492,6 +504,7 @@ class IDocRoot : public IDoc
class IDocIterator class IDocIterator
{ {
public: public:
VIRTUAL_DESTRUCTOR(IDocIterator)
virtual IDoc *toFirst() = 0; virtual IDoc *toFirst() = 0;
virtual IDoc *toLast() = 0; virtual IDoc *toLast() = 0;
virtual IDoc *toNext() = 0; virtual IDoc *toNext() = 0;
...@@ -503,12 +516,14 @@ class IDocIterator ...@@ -503,12 +516,14 @@ class IDocIterator
class IEdgeLabel class IEdgeLabel
{ {
public: public:
VIRTUAL_DESTRUCTOR(IEdgeLabel)
virtual const IString * label() const = 0; virtual const IString * label() const = 0;
}; };
class IEdgeLabelIterator class IEdgeLabelIterator
{ {
public: public:
VIRTUAL_DESTRUCTOR(IEdgeLabelIterator)
virtual IEdgeLabel *toFirst() = 0; virtual IEdgeLabel *toFirst() = 0;
virtual IEdgeLabel *toLast() = 0; virtual IEdgeLabel *toLast() = 0;
virtual IEdgeLabel *toNext() = 0; virtual IEdgeLabel *toNext() = 0;
...@@ -520,6 +535,7 @@ class IEdgeLabelIterator ...@@ -520,6 +535,7 @@ class IEdgeLabelIterator
class IChildNode class IChildNode
{ {
public: public:
VIRTUAL_DESTRUCTOR(IChildNode)
enum NodeRelation { PublicInheritance, ProtectedInheritance, enum NodeRelation { PublicInheritance, ProtectedInheritance,
PrivateInheritance, Usage, TemplateInstance PrivateInheritance, Usage, TemplateInstance
}; };
...@@ -532,6 +548,7 @@ class IChildNode ...@@ -532,6 +548,7 @@ class IChildNode
class IChildNodeIterator class IChildNodeIterator
{ {
public: public:
VIRTUAL_DESTRUCTOR(IChildNodeIterator)
virtual IChildNode *toFirst() = 0; virtual IChildNode *toFirst() = 0;
virtual IChildNode *toLast() = 0; virtual IChildNode *toLast() = 0;
virtual IChildNode *toNext() = 0; virtual IChildNode *toNext() = 0;
...@@ -543,6 +560,7 @@ class IChildNodeIterator ...@@ -543,6 +560,7 @@ class IChildNodeIterator
class INode class INode
{ {
public: public:
VIRTUAL_DESTRUCTOR(INode)
virtual const IString * id() const = 0; virtual const IString * id() const = 0;
virtual const IString * label() const = 0; virtual const IString * label() const = 0;
virtual const IString * linkId() const = 0; virtual const IString * linkId() const = 0;
...@@ -552,6 +570,7 @@ class INode ...@@ -552,6 +570,7 @@ class INode
class INodeIterator class INodeIterator
{ {
public: public:
VIRTUAL_DESTRUCTOR(INodeIterator)
virtual INode *toFirst() = 0; virtual INode *toFirst() = 0;
virtual INode *toLast() = 0; virtual INode *toLast() = 0;
virtual INode *toNext() = 0; virtual INode *toNext() = 0;
...@@ -563,12 +582,14 @@ class INodeIterator ...@@ -563,12 +582,14 @@ class INodeIterator
class IGraph class IGraph
{ {
public: public:
VIRTUAL_DESTRUCTOR(IGraph)
virtual INodeIterator *nodes() const = 0; virtual INodeIterator *nodes() const = 0;
}; };
class IMember class IMember
{ {
public: public:
VIRTUAL_DESTRUCTOR(IMember)
enum MemberKind { Invalid=0, enum MemberKind { Invalid=0,
Define, Property, Variable, Typedef, Enum, Define, Property, Variable, Typedef, Enum,
Function, Signal, Prototype, Friend, DCOP, Slot, Function, Signal, Prototype, Friend, DCOP, Slot,
...@@ -675,6 +696,7 @@ class IEnumValue : public IMember ...@@ -675,6 +696,7 @@ class IEnumValue : public IMember
class IInclude class IInclude
{ {
public: public:
VIRTUAL_DESTRUCTOR(IInclude)
virtual const IString * name() const = 0; virtual const IString * name() const = 0;
virtual const IString * refId() const = 0; virtual const IString * refId() const = 0;
virtual bool isLocal() const = 0; virtual bool isLocal() const = 0;
...@@ -683,6 +705,7 @@ class IInclude ...@@ -683,6 +705,7 @@ class IInclude
class IIncludeIterator class IIncludeIterator
{ {
public: public:
VIRTUAL_DESTRUCTOR(IIncludeIterator)
virtual IInclude *toFirst() = 0; virtual IInclude *toFirst() = 0;
virtual IInclude *toLast() = 0; virtual IInclude *toLast() = 0;
virtual IInclude *toNext() = 0; virtual IInclude *toNext() = 0;
...@@ -694,6 +717,7 @@ class IIncludeIterator ...@@ -694,6 +717,7 @@ class IIncludeIterator
class IMemberIterator class IMemberIterator
{ {
public: public:
VIRTUAL_DESTRUCTOR(IMemberIterator)
virtual IMember *toFirst() = 0; virtual IMember *toFirst() = 0;
virtual IMember *toLast() = 0; virtual IMember *toLast() = 0;
virtual IMember *toNext() = 0; virtual IMember *toNext() = 0;
...@@ -721,6 +745,7 @@ class IEnum : public IMember ...@@ -721,6 +745,7 @@ class IEnum : public IMember
class ISection class ISection
{ {
public: public:
VIRTUAL_DESTRUCTOR(ISection)
/*! Possible section types */ /*! Possible section types */
enum SectionKind enum SectionKind
{ Invalid=0, { Invalid=0,
...@@ -804,6 +829,7 @@ class IUserDefined : public ISection ...@@ -804,6 +829,7 @@ class IUserDefined : public ISection
class ISectionIterator class ISectionIterator
{ {
public: public:
VIRTUAL_DESTRUCTOR(ISectionIterator)
virtual ISection *toFirst() = 0; virtual ISection *toFirst() = 0;
virtual ISection *toLast() = 0; virtual ISection *toLast() = 0;
virtual ISection *toNext() = 0; virtual ISection *toNext() = 0;
...@@ -840,6 +866,7 @@ class ISectionIterator ...@@ -840,6 +866,7 @@ class ISectionIterator
class ICompound class ICompound
{ {
public: public:
VIRTUAL_DESTRUCTOR(ICompound)
/*! Represents the kind of compounds recognised by doxygen. */ /*! Represents the kind of compounds recognised by doxygen. */
enum CompoundKind { Invalid=0, enum CompoundKind { Invalid=0,
Class, Struct, Union, Interface, Protocol, Category, Class, Struct, Union, Interface, Protocol, Category,
...@@ -900,6 +927,7 @@ class ICompound ...@@ -900,6 +927,7 @@ class ICompound
class ICompoundIterator class ICompoundIterator
{ {
public: public:
VIRTUAL_DESTRUCTOR(ICompoundIterator)
virtual void toFirst() = 0; virtual void toFirst() = 0;
virtual void toLast() = 0; virtual void toLast() = 0;
virtual void toNext() = 0; virtual void toNext() = 0;
...@@ -911,6 +939,7 @@ class ICompoundIterator ...@@ -911,6 +939,7 @@ class ICompoundIterator
class IRelatedCompound class IRelatedCompound
{ {
public: public:
VIRTUAL_DESTRUCTOR(IRelatedCompound)
enum Protection { Public, Protected, Private }; enum Protection { Public, Protected, Private };
enum Kind { Normal, Virtual }; enum Kind { Normal, Virtual };
virtual ICompound *compound() const = 0; virtual ICompound *compound() const = 0;
...@@ -923,6 +952,7 @@ class IRelatedCompound ...@@ -923,6 +952,7 @@ class IRelatedCompound
class IRelatedCompoundIterator class IRelatedCompoundIterator
{ {
public: public:
VIRTUAL_DESTRUCTOR(IRelatedCompoundIterator)
virtual IRelatedCompound *toFirst() = 0; virtual IRelatedCompound *toFirst() = 0;
virtual IRelatedCompound *toLast() = 0; virtual IRelatedCompound *toLast() = 0;
virtual IRelatedCompound *toNext() = 0; virtual IRelatedCompound *toNext() = 0;
...@@ -1042,6 +1072,7 @@ class IPage : public ICompound ...@@ -1042,6 +1072,7 @@ class IPage : public ICompound
class IDoxygen class IDoxygen
{ {
public: public:
VIRTUAL_DESTRUCTOR(IDoxygen)
/*! Returns an iterator that can be used to iterate over the list /*! Returns an iterator that can be used to iterate over the list
* of compounds found in the project. * of compounds found in the project.
......
...@@ -165,7 +165,7 @@ template<class T> class BaseHandler : public QXmlDefaultHandler, ...@@ -165,7 +165,7 @@ template<class T> class BaseHandler : public QXmlDefaultHandler,
return TRUE; return TRUE;
} }
StartElementHandlerT *handler = m_startHandlers[name]; StartElementHandlerT *handler = ElementMapper<T>::m_startHandlers[name];
if (handler) if (handler)
{ {
(*handler)(attrib); (*handler)(attrib);
...@@ -205,7 +205,7 @@ template<class T> class BaseHandler : public QXmlDefaultHandler, ...@@ -205,7 +205,7 @@ template<class T> class BaseHandler : public QXmlDefaultHandler,
} }
else if (m_skipUntil.isEmpty()) else if (m_skipUntil.isEmpty())
{ {
EndElementHandlerT *handler = m_endHandlers[name]; EndElementHandlerT *handler = ElementMapper<T>::m_endHandlers[name];
if (handler) if (handler)
{ {
(*handler)(); (*handler)();
...@@ -301,7 +301,7 @@ template<class T> class BaseFallBackHandler : public ElementMapper<T>, ...@@ -301,7 +301,7 @@ template<class T> class BaseFallBackHandler : public ElementMapper<T>,
bool handleStartElement(const QString & name, bool handleStartElement(const QString & name,
const QXmlAttributes & attrib) const QXmlAttributes & attrib)
{ {
StartElementHandlerT *handler = m_startHandlers[name]; StartElementHandlerT *handler = ElementMapper<T>::m_startHandlers[name];
if (handler) if (handler)
{ {
(*handler)(attrib); (*handler)(attrib);
...@@ -311,7 +311,7 @@ template<class T> class BaseFallBackHandler : public ElementMapper<T>, ...@@ -311,7 +311,7 @@ template<class T> class BaseFallBackHandler : public ElementMapper<T>,
} }
bool handleEndElement(const QString &name) bool handleEndElement(const QString &name)
{ {
EndElementHandlerT *handler = m_endHandlers[name]; EndElementHandlerT *handler = ElementMapper<T>::m_endHandlers[name];
if (handler) if (handler)
{ {
(*handler)(); (*handler)();
......
This diff is collapsed.
../include/doxmlintf.h
\ No newline at end of file
...@@ -20,7 +20,7 @@ doxygen_version_minor=5 ...@@ -20,7 +20,7 @@ doxygen_version_minor=5
doxygen_version_revision=5 doxygen_version_revision=5
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package. #NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=20080309 doxygen_version_mmn=20080316
bin_dirs=`echo $PATH | sed -e "s/:/ /g"` bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
......
...@@ -2937,7 +2937,7 @@ void writeIndex(OutputList &ol) ...@@ -2937,7 +2937,7 @@ void writeIndex(OutputList &ol)
ol.startIndexSection(isMainPage); ol.startIndexSection(isMainPage);
if (mainPageHasTitle()) if (mainPageHasTitle())
{ {
ol.parseDoc(defFileName,defLine,Doxygen::mainPage,0,Doxygen::mainPage->title(),FALSE,FALSE); ol.parseText(Doxygen::mainPage->title());
} }
else else
{ {
...@@ -2954,13 +2954,22 @@ void writeIndex(OutputList &ol) ...@@ -2954,13 +2954,22 @@ void writeIndex(OutputList &ol)
bool first=Doxygen::mainPage==0; bool first=Doxygen::mainPage==0;
for (pdi.toFirst();(pd=pdi.current());++pdi) for (pdi.toFirst();(pd=pdi.current());++pdi)
{ {
if (!pd->getGroupDef() && !pd->isReference()) if (!pd->getGroupDef() && !pd->isReference() &&
!pd->hasParentPage()
)
{ {
QCString title = pd->title(); QCString title = pd->title();
if (title.isEmpty()) title=pd->name(); if (title.isEmpty()) title=pd->name();
ol.startIndexSection(isPageDocumentation); ol.startIndexSection(isPageDocumentation);
ol.parseText(title); ol.parseText(title);
ol.endIndexSection(isPageDocumentation); ol.endIndexSection(isPageDocumentation);
ol.pushGeneratorState(); // write TOC title (RTF only)
ol.disableAllBut(OutputGenerator::RTF);
ol.startIndexSection(isPageDocumentation2);
ol.parseText(title);
ol.endIndexSection(isPageDocumentation2);
ol.popGeneratorState();
ol.writeAnchor(0,pd->name());
ol.writePageLink(pd->getOutputFileBase(),first); ol.writePageLink(pd->getOutputFileBase(),first);
first=FALSE; first=FALSE;
......
...@@ -115,6 +115,7 @@ enum IndexSections ...@@ -115,6 +115,7 @@ enum IndexSections
isFileDocumentation, isFileDocumentation,
isExampleDocumentation, isExampleDocumentation,
isPageDocumentation, isPageDocumentation,
isPageDocumentation2,
isEndIndex isEndIndex
}; };
......
...@@ -236,7 +236,7 @@ static void writeDefaultHeaderPart1(QTextStream &t) ...@@ -236,7 +236,7 @@ static void writeDefaultHeaderPart1(QTextStream &t)
s=extraPackages.next(); s=extraPackages.next();
} }
t << "\\makeindex\n" t << "\\makeindex\n"
"\\setcounter{tocdepth}{1}\n" "\\setcounter{tocdepth}{3}\n"
"\\renewcommand{\\footrulewidth}{0.4pt}\n" "\\renewcommand{\\footrulewidth}{0.4pt}\n"
"\\begin{document}\n"; "\\begin{document}\n";
if (theTranslator->idLanguage()=="greek") t << "\\selectlanguage{greek}\n"; if (theTranslator->idLanguage()=="greek") t << "\\selectlanguage{greek}\n";
...@@ -585,6 +585,8 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -585,6 +585,8 @@ void LatexGenerator::startIndexSection(IndexSections is)
t << "{"; //Page Documentation}\n"; t << "{"; //Page Documentation}\n";
} }
break; break;
case isPageDocumentation2:
break;
case isEndIndex: case isEndIndex:
break; break;
} }
...@@ -793,6 +795,8 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -793,6 +795,8 @@ void LatexGenerator::endIndexSection(IndexSections is)
#endif #endif
} }
break; break;
case isPageDocumentation2:
break;
case isEndIndex: case isEndIndex:
t << "\\printindex\n"; t << "\\printindex\n";
t << "\\end{document}\n"; t << "\\end{document}\n";
...@@ -1104,7 +1108,7 @@ void LatexGenerator::endMemberHeader() ...@@ -1104,7 +1108,7 @@ void LatexGenerator::endMemberHeader()
void LatexGenerator::startMemberDoc(const char *clname, void LatexGenerator::startMemberDoc(const char *clname,
const char *memname, const char *memname,
const char *, const char *,
const char *) const char *title)
{ {
if (memname && memname[0]!='@') if (memname && memname[0]!='@')
{ {
...@@ -1141,6 +1145,9 @@ void LatexGenerator::startMemberDoc(const char *clname, ...@@ -1141,6 +1145,9 @@ void LatexGenerator::startMemberDoc(const char *clname,
// escapeMakeIndexChars(this,t,memname); // escapeMakeIndexChars(this,t,memname);
// t << "]"; // t << "]";
//} //}
t << "[";
escapeMakeIndexChars(title);
t << "]";
t << "{\\setlength{\\rightskip}{0pt plus 5cm}"; t << "{\\setlength{\\rightskip}{0pt plus 5cm}";
disableLinks=TRUE; disableLinks=TRUE;
} }
...@@ -1181,9 +1188,16 @@ void LatexGenerator::writeAnchor(const char *fName,const char *name) ...@@ -1181,9 +1188,16 @@ void LatexGenerator::writeAnchor(const char *fName,const char *name)
{ {
//printf("LatexGenerator::writeAnchor(%s,%s)\n",fName,name); //printf("LatexGenerator::writeAnchor(%s,%s)\n",fName,name);
t << "\\label{" << name << "}" << endl; t << "\\label{" << name << "}" << endl;
if (fName && Config_getBool("PDF_HYPERLINKS")) if (Config_getBool("PDF_HYPERLINKS"))
{ {
t << "\\hypertarget{" << stripPath(fName) << "_" << name << "}{}" << endl; if (fName)
{
t << "\\hypertarget{" << stripPath(fName) << "_" << name << "}{}" << endl;
}
else
{
t << "\\hypertarget{" << name << "}{}" << endl;
}
} }
} }
......
...@@ -13,13 +13,14 @@ PageDef::PageDef(const char *f,int l,const char *n, ...@@ -13,13 +13,14 @@ PageDef::PageDef(const char *f,int l,const char *n,
: Definition(f,l,n), m_title(t) : Definition(f,l,n), m_title(t)
{ {
setDocumentation(d,f,l); setDocumentation(d,f,l);
subPageDict = new PageSDict(7); m_subPageDict = new PageSDict(7);
pageScope = 0; m_pageScope = 0;
m_nestingLevel = 0;
} }
PageDef::~PageDef() PageDef::~PageDef()
{ {
delete subPageDict; delete m_subPageDict;
} }
void PageDef::findSectionsInDocumentation() void PageDef::findSectionsInDocumentation()
...@@ -46,11 +47,18 @@ void PageDef::addInnerCompound(Definition *def) ...@@ -46,11 +47,18 @@ void PageDef::addInnerCompound(Definition *def)
if (def->definitionType()==Definition::TypePage) if (def->definitionType()==Definition::TypePage)
{ {
PageDef *pd = (PageDef*)def; PageDef *pd = (PageDef*)def;
subPageDict->append(pd->name(),pd); m_subPageDict->append(pd->name(),pd);
def->setOuterScope(this); def->setOuterScope(this);
pd->setNestingLevel(m_nestingLevel+1);
} }
} }
bool PageDef::hasParentPage() const
{
return getOuterScope() &&
getOuterScope()->definitionType()==Definition::TypePage;
}
void PageDef::writeDocumentation(OutputList &ol) void PageDef::writeDocumentation(OutputList &ol)
{ {
//outputList->disable(OutputGenerator::Man); //outputList->disable(OutputGenerator::Man);
...@@ -62,6 +70,17 @@ void PageDef::writeDocumentation(OutputList &ol) ...@@ -62,6 +70,17 @@ void PageDef::writeDocumentation(OutputList &ol)
startFile(ol,pageName,pageName,title(),HLI_None,TRUE); startFile(ol,pageName,pageName,title(),HLI_None,TRUE);
ol.pushGeneratorState();
if (m_nestingLevel>0) // a sub page
{
// do not generate sub page output for RTF and LaTeX, as these are
// part of their parent page
ol.disableAll();
ol.enable(OutputGenerator::Man);
ol.enable(OutputGenerator::Html);
}
if (getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX")) if (getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX"))
{ {
getOuterScope()->writeNavigationPath(ol); getOuterScope()->writeNavigationPath(ol);
...@@ -80,6 +99,7 @@ void PageDef::writeDocumentation(OutputList &ol) ...@@ -80,6 +99,7 @@ void PageDef::writeDocumentation(OutputList &ol)
// for Latex the section is already generated as a chapter in the index! // for Latex the section is already generated as a chapter in the index!
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
SectionInfo *si=0; SectionInfo *si=0;
if (!title().isEmpty() && !name().isEmpty() && if (!title().isEmpty() && !name().isEmpty() &&
(si=Doxygen::sectionDict.find(pageName))!=0) (si=Doxygen::sectionDict.find(pageName))!=0)
...@@ -93,18 +113,11 @@ void PageDef::writeDocumentation(OutputList &ol) ...@@ -93,18 +113,11 @@ void PageDef::writeDocumentation(OutputList &ol)
} }
ol.popGeneratorState(); ol.popGeneratorState();
ol.startTextBlock(); writePageDocumentation(ol);
ol.parseDoc(docFile(), // fileName
docLine(), // startLine ol.popGeneratorState();
this, // context
0, // memberdef
documentation(), // docStr
TRUE, // index words
FALSE // not an example
);
ol.endTextBlock();
endFile(ol); endFile(ol);
//outputList->enable(OutputGenerator::Man);
if (!Config_getString("GENERATE_TAGFILE").isEmpty()) if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{ {
...@@ -131,6 +144,53 @@ void PageDef::writeDocumentation(OutputList &ol) ...@@ -131,6 +144,53 @@ void PageDef::writeDocumentation(OutputList &ol)
} }
} }
void PageDef::writePageDocumentation(OutputList &ol)
{
ol.startTextBlock();
ol.parseDoc(docFile(), // fileName
docLine(), // startLine
this, // context
0, // memberdef
documentation(), // docStr
TRUE, // index words
FALSE // not an example
);
ol.endTextBlock();
if (hasSubPages())
{
// for printed documentation we write subpages as section's of the
// parent page.
ol.pushGeneratorState();
ol.disableAll();
ol.enable(OutputGenerator::Latex);
ol.enable(OutputGenerator::RTF);
PageSDict::Iterator pdi(*m_subPageDict);
PageDef *subPage=pdi.toFirst();
for (pdi.toFirst();(subPage=pdi.current());++pdi)
{
SectionInfo::SectionType sectionType = SectionInfo::Paragraph;
switch (m_nestingLevel)
{
case 0: sectionType = SectionInfo::Page; break;
case 1: sectionType = SectionInfo::Section; break;
case 2: sectionType = SectionInfo::Subsection; break;
case 3: sectionType = SectionInfo::Subsubsection; break;
default: sectionType = SectionInfo::Paragraph; break;
}
QCString title = subPage->title();
if (title.isEmpty()) title = subPage->name();
ol.startSection(subPage->name(),title,sectionType);
ol.parseText(title);
ol.endSection(subPage->name(),sectionType);
subPage->writePageDocumentation(ol);
}
ol.popGeneratorState();
}
}
bool PageDef::visibleInIndex() const bool PageDef::visibleInIndex() const
{ {
return // not part of a group return // not part of a group
...@@ -153,7 +213,11 @@ bool PageDef::documentedPage() const ...@@ -153,7 +213,11 @@ bool PageDef::documentedPage() const
bool PageDef::hasSubPages() const bool PageDef::hasSubPages() const
{ {
return subPageDict->count()>0; return m_subPageDict->count()>0;
} }
void PageDef::setNestingLevel(int l)
{
m_nestingLevel = l;
}
...@@ -35,7 +35,6 @@ class PageDef : public Definition ...@@ -35,7 +35,6 @@ class PageDef : public Definition
{ {
return isLinkableInProject() || isReference(); return isLinkableInProject() || isReference();
} }
void addSubPage(PageDef *def);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
// functions to get a uniform interface with Definitions // functions to get a uniform interface with Definitions
...@@ -43,21 +42,25 @@ class PageDef : public Definition ...@@ -43,21 +42,25 @@ class PageDef : public Definition
void findSectionsInDocumentation(); void findSectionsInDocumentation();
QCString title() const { return m_title; } QCString title() const { return m_title; }
GroupDef * getGroupDef() const; GroupDef * getGroupDef() const;
PageSDict * getSubPages() const { return subPageDict; } PageSDict * getSubPages() const { return m_subPageDict; }
void setFileName(const char *name) { m_fileName = name; } void setFileName(const char *name) { m_fileName = name; }
void addInnerCompound(Definition *d); void addInnerCompound(Definition *d);
bool visibleInIndex() const; bool visibleInIndex() const;
bool documentedPage() const; bool documentedPage() const;
bool hasSubPages() const; bool hasSubPages() const;
void setPageScope(Definition *d){ pageScope = d; } bool hasParentPage() const;
Definition *getPageScope() const { return pageScope; } void setPageScope(Definition *d){ m_pageScope = d; }
Definition *getPageScope() const { return m_pageScope; }
private: private:
void setNestingLevel(int l);
void writePageDocumentation(OutputList &ol);
QCString m_fileName; QCString m_fileName;
QCString m_title; QCString m_title;
GroupDef *m_inGroup; GroupDef *m_inGroup;
PageSDict *subPageDict; // list of pages in the group PageSDict *m_subPageDict; // list of pages in the group
Definition *pageScope; Definition *m_pageScope;
int m_nestingLevel;
}; };
class PageSDict : public SDict<PageDef> class PageSDict : public SDict<PageDef>
......
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
#include "dirdef.h" #include "dirdef.h"
#include "vhdldocgen.h" #include "vhdldocgen.h"
//#define DBG_RTF(x) x; #define DBG_RTF(x) x;
#define DBG_RTF(x) //#define DBG_RTF(x)
static QCString dateToRTFDateString() static QCString dateToRTFDateString()
{ {
...@@ -515,6 +515,10 @@ void RTFGenerator::startIndexSection(IndexSections is) ...@@ -515,6 +515,10 @@ void RTFGenerator::startIndexSection(IndexSections is)
{ {
//Page Documentation //Page Documentation
beginRTFChapter(); beginRTFChapter();
}
break;
case isPageDocumentation2:
{
t << "{\\tc \\v "; t << "{\\tc \\v ";
} }
break; break;
...@@ -833,7 +837,7 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -833,7 +837,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
{ {
//#error "fix me in the same way as the latex index..." //#error "fix me in the same way as the latex index..."
//t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}"<< endl; //t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}"<< endl;
t << "}"<< endl; //t << "}"<< endl;
//PageSDict::Iterator pdi(*Doxygen::pageSDict); //PageSDict::Iterator pdi(*Doxygen::pageSDict);
//PageDef *pd=pdi.toFirst(); //PageDef *pd=pdi.toFirst();
//bool first=TRUE; //bool first=TRUE;
...@@ -850,6 +854,12 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -850,6 +854,12 @@ void RTFGenerator::endIndexSection(IndexSections is)
//} //}
} }
break; break;
case isPageDocumentation2:
{
t << "}";
t << "\\par " << rtf_Style_Reset << endl;
}
break;
case isEndIndex: case isEndIndex:
beginRTFChapter(); beginRTFChapter();
t << rtf_Style["Heading1"]->reference; t << rtf_Style["Heading1"]->reference;
...@@ -1607,8 +1617,9 @@ void RTFGenerator::startSection(const char *,const char *title,SectionInfo::Sect ...@@ -1607,8 +1617,9 @@ void RTFGenerator::startSection(const char *,const char *title,SectionInfo::Sect
void RTFGenerator::endSection(const char *lab,SectionInfo::SectionType) void RTFGenerator::endSection(const char *lab,SectionInfo::SectionType)
{ {
DBG_RTF(t << "{\\comment (endSection)}" << endl) DBG_RTF(t << "{\\comment (endSection)}" << endl)
newParagraph();
// make bookmark // make bookmark
m_omitParagraph=FALSE;
newParagraph();
writeAnchor(0,lab); writeAnchor(0,lab);
t << "}"; t << "}";
} }
...@@ -1813,7 +1824,7 @@ void RTFGenerator::writeAnchor(const char *fileName,const char *name) ...@@ -1813,7 +1824,7 @@ void RTFGenerator::writeAnchor(const char *fileName,const char *name)
anchor+=name; anchor+=name;
} }
DBG_RTF(t <<"{\\comment writeAncheor (" << anchor << ")}" << endl) DBG_RTF(t <<"{\\comment writeAnchor (" << anchor << ")}" << endl)
t << "{\\bkmkstart " << rtfFormatBmkStr(anchor) << "}" << endl; t << "{\\bkmkstart " << rtfFormatBmkStr(anchor) << "}" << endl;
t << "{\\bkmkend " << rtfFormatBmkStr(anchor) << "}" << endl; t << "{\\bkmkend " << rtfFormatBmkStr(anchor) << "}" << endl;
} }
......
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