diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2018-05-22 18:35:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-22 18:35:11 (GMT) |
commit | 17d663f8eb711c6da175273be3f9f8e77a965e68 (patch) | |
tree | ae2d616d8de8e274adf16ecb16cefc557059b25f /src | |
parent | f10c9a42cd3b506cb5bb5cf0192c9e221adafa72 (diff) | |
parent | 36afe5e25c10dfd5a6208df7c8892eb2bb7498c5 (diff) | |
download | Doxygen-17d663f8eb711c6da175273be3f9f8e77a965e68.zip Doxygen-17d663f8eb711c6da175273be3f9f8e77a965e68.tar.gz Doxygen-17d663f8eb711c6da175273be3f9f8e77a965e68.tar.bz2 |
Merge pull request #687 from albert-github/feature/bug_vhdl_ports_html
Better HTML output for VHDL Ports
Diffstat (limited to 'src')
-rw-r--r-- | src/htmlgen.cpp | 31 | ||||
-rw-r--r-- | src/htmlgen.h | 5 | ||||
-rw-r--r-- | src/latexgen.cpp | 4 | ||||
-rw-r--r-- | src/latexgen.h | 5 | ||||
-rw-r--r-- | src/mangen.cpp | 8 | ||||
-rw-r--r-- | src/mangen.h | 5 | ||||
-rw-r--r-- | src/outputgen.h | 5 | ||||
-rw-r--r-- | src/outputlist.h | 10 | ||||
-rw-r--r-- | src/rtfgen.cpp | 2 | ||||
-rw-r--r-- | src/rtfgen.h | 5 | ||||
-rw-r--r-- | src/vhdldocgen.cpp | 14 |
11 files changed, 56 insertions, 38 deletions
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index accc6a0..740b2f5 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1428,13 +1428,7 @@ void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char * t << " inherit " << inheritId; } t << "\">"; - switch(annoType) - { - case 0: t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break; - case 1: t << "<td class=\"memItemLeft\" >"; break; - case 2: t << "<td class=\"memItemLeft\" valign=\"top\">"; break; - default: t << "<td class=\"memTemplParams\" colspan=\"2\">"; break; - } + insertMemberAlignLeft(annoType, true); } void HtmlGenerator::endMemberItem() @@ -1466,7 +1460,19 @@ void HtmlGenerator::insertMemberAlign(bool templ) t << " </td><td class=\"" << className << "\" valign=\"bottom\">"; } -void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId) +void HtmlGenerator::insertMemberAlignLeft(int annoType, bool initTag) +{ + if (!initTag) t << " </td>"; + switch(annoType) + { + case 0: t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break; + case 1: t << "<td class=\"memItemLeft\" >"; break; + case 2: t << "<td class=\"memItemLeft\" valign=\"top\">"; break; + default: t << "<td class=\"memTemplParams\" colspan=\"2\">"; break; + } +} + +void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId, bool typ) { DBG_HTML(t << "<!-- startMemberDescription -->" << endl) if (m_emptySection) @@ -1479,7 +1485,10 @@ void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheri { t << " inherit " << inheritId; } - t << "\"><td class=\"mdescLeft\"> </td><td class=\"mdescRight\">"; + t << "\">"; + t << "<td class=\"mdescLeft\"> </td>"; + if (typ) t << "<td class=\"mdescLeft\"> </td>"; + t << "<td class=\"mdescRight\">";; } void HtmlGenerator::endMemberDescription() @@ -1505,7 +1514,7 @@ void HtmlGenerator::endMemberSections() } } -void HtmlGenerator::startMemberHeader(const char *anchor) +void HtmlGenerator::startMemberHeader(const char *anchor, int typ) { DBG_HTML(t << "<!-- startMemberHeader -->" << endl) if (!m_emptySection) @@ -1518,7 +1527,7 @@ void HtmlGenerator::startMemberHeader(const char *anchor) t << "<table class=\"memberdecls\">" << endl; m_emptySection=FALSE; } - t << "<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\">"; + t << "<tr class=\"heading\"><td colspan=\"" << typ << "\"><h2 class=\"groupheader\">"; if (anchor) { t << "<a name=\"" << anchor << "\"></a>" << endl; diff --git a/src/htmlgen.h b/src/htmlgen.h index 82f0c17..2d8d6e0 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -175,7 +175,7 @@ class HtmlGenerator : public OutputGenerator void endMemberSections(); void startHeaderSection(); void endHeaderSection(); - void startMemberHeader(const char *); + void startMemberHeader(const char *, int); void endMemberHeader(); void startMemberSubtitle(); void endMemberSubtitle(); @@ -200,7 +200,8 @@ class HtmlGenerator : public OutputGenerator void endMemberGroup(bool); void insertMemberAlign(bool); - void startMemberDescription(const char *anchor,const char *inheritId); + void insertMemberAlignLeft(int,bool); + void startMemberDescription(const char *anchor,const char *inheritId, bool typ); void endMemberDescription(); void startMemberDeclaration() {} void endMemberDeclaration(const char *anchor,const char *inheritId); diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 00826e6..045be5c 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -1550,7 +1550,7 @@ void LatexGenerator::endGroupHeader(int) t << "}" << endl; } -void LatexGenerator::startMemberHeader(const char *) +void LatexGenerator::startMemberHeader(const char *,int) { if (Config_getBool(COMPACT_LATEX)) { @@ -1838,7 +1838,7 @@ void LatexGenerator::endMemberItem() t << endl; } -void LatexGenerator::startMemberDescription(const char *,const char *) +void LatexGenerator::startMemberDescription(const char *,const char *,bool) { if (!insideTabbing) { diff --git a/src/latexgen.h b/src/latexgen.h index 430d250..469e411 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -169,7 +169,7 @@ class LatexGenerator : public OutputGenerator void endMemberSections() {} void startHeaderSection() {} void endHeaderSection() {} - void startMemberHeader(const char *); + void startMemberHeader(const char *,int); void endMemberHeader(); void startMemberSubtitle() {} void endMemberSubtitle() {} @@ -194,6 +194,7 @@ class LatexGenerator : public OutputGenerator void endMemberGroup(bool); void insertMemberAlign(bool) {} + void insertMemberAlignLeft(int,bool){} void writeRuler() { t << endl << endl; } void writeAnchor(const char *fileName,const char *name); @@ -225,7 +226,7 @@ class LatexGenerator : public OutputGenerator void endCenter() { t << "\\end{center}" << endl; } void startSmall() { t << "\\footnotesize "; } void endSmall() { t << "\\normalsize "; } - void startMemberDescription(const char *,const char *); + void startMemberDescription(const char *,const char *,bool); void endMemberDescription(); void startMemberDeclaration() {} void endMemberDeclaration(const char *,const char *) {} diff --git a/src/mangen.cpp b/src/mangen.cpp index 17e6003..d23b2fe 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -283,7 +283,7 @@ void ManGenerator::endGroupHeader(int) upperCase=FALSE; } -void ManGenerator::startMemberHeader(const char *) +void ManGenerator::startMemberHeader(const char *,int) { if (!firstCol) t << endl; t << ".SS \""; @@ -619,9 +619,9 @@ void ManGenerator::startSection(const char *,const char *,SectionInfo::SectionTy { case SectionInfo::Page: startGroupHeader(FALSE); break; case SectionInfo::Section: startGroupHeader(FALSE); break; - case SectionInfo::Subsection: startMemberHeader(0); break; - case SectionInfo::Subsubsection: startMemberHeader(0); break; - case SectionInfo::Paragraph: startMemberHeader(0); break; + case SectionInfo::Subsection: startMemberHeader(0, -1); break; + case SectionInfo::Subsubsection: startMemberHeader(0, -1); break; + case SectionInfo::Paragraph: startMemberHeader(0, -1); break; default: ASSERT(0); break; } } diff --git a/src/mangen.h b/src/mangen.h index b3b9f76..0413ffd 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -99,9 +99,10 @@ class ManGenerator : public OutputGenerator void endMemberSections() {} void startHeaderSection() {} void endHeaderSection(); - void startMemberHeader(const char *); + void startMemberHeader(const char *,int); void endMemberHeader(); void insertMemberAlign(bool) {} + void insertMemberAlignLeft(int,bool){} void startMemberSubtitle() {} void endMemberSubtitle() {} //void writeListItem(); @@ -160,7 +161,7 @@ class ManGenerator : public OutputGenerator void endCenter() {} void startSmall() {} void endSmall() {} - void startMemberDescription(const char *,const char *) { t << "\n.RI \""; firstCol=FALSE; } + void startMemberDescription(const char *,const char *,bool) { t << "\n.RI \""; firstCol=FALSE; } void endMemberDescription() { t << "\""; firstCol=FALSE; } void startMemberDeclaration() {} void endMemberDeclaration(const char *,const char *) {} diff --git a/src/outputgen.h b/src/outputgen.h index 68356b4..44d34b8 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -380,7 +380,7 @@ class OutputGenerator : public BaseOutputDocInterface virtual void endMemberSections() = 0; virtual void startHeaderSection() = 0; virtual void endHeaderSection() = 0; - virtual void startMemberHeader(const char *anchor) = 0; + virtual void startMemberHeader(const char *anchor, int typ) = 0; virtual void endMemberHeader() = 0; virtual void startMemberSubtitle() = 0; virtual void endMemberSubtitle() = 0; @@ -403,6 +403,7 @@ class OutputGenerator : public BaseOutputDocInterface virtual void startMemberGroup() = 0; virtual void endMemberGroup(bool) = 0; virtual void insertMemberAlign(bool) = 0; + virtual void insertMemberAlignLeft(int,bool) = 0; virtual void startMemberDoc(const char *,const char *, const char *,const char *,int,int,bool) = 0; virtual void endMemberDoc(bool) = 0; @@ -414,7 +415,7 @@ class OutputGenerator : public BaseOutputDocInterface virtual void writeStartAnnoItem(const char *type,const char *file, const char *path,const char *name) = 0; virtual void writeEndAnnoItem(const char *name) = 0; - virtual void startMemberDescription(const char *anchor,const char *inheritId) = 0; + virtual void startMemberDescription(const char *anchor,const char *inheritId, bool typ) = 0; virtual void endMemberDescription() = 0; virtual void startMemberDeclaration() = 0; virtual void endMemberDeclaration(const char *anchor,const char *inheritId) = 0; diff --git a/src/outputlist.h b/src/outputlist.h index 0738ed1..2e89101 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -191,8 +191,8 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startHeaderSection); } void endHeaderSection() { forall(&OutputGenerator::endHeaderSection); } - void startMemberHeader(const char *anchor) - { forall(&OutputGenerator::startMemberHeader,anchor); } + void startMemberHeader(const char *anchor, int typ = 2) + { forall(&OutputGenerator::startMemberHeader,anchor,typ); } void endMemberHeader() { forall(&OutputGenerator::endMemberHeader); } void startMemberSubtitle() @@ -237,6 +237,8 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::endMemberGroup,last); } void insertMemberAlign(bool templ=FALSE) { forall(&OutputGenerator::insertMemberAlign,templ); } + void insertMemberAlignLeft(int typ=0, bool templ=FALSE) + { forall(&OutputGenerator::insertMemberAlignLeft,typ,templ); } void writeRuler() { forall(&OutputGenerator::writeRuler); } void writeAnchor(const char *fileName,const char *name) @@ -306,8 +308,8 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startBold); } void endBold() { forall(&OutputGenerator::endBold); } - void startMemberDescription(const char *anchor,const char *inheritId=0) - { forall(&OutputGenerator::startMemberDescription,anchor,inheritId); } + void startMemberDescription(const char *anchor,const char *inheritId=0, bool typ = false) + { forall(&OutputGenerator::startMemberDescription,anchor,inheritId, typ); } void endMemberDescription() { forall(&OutputGenerator::endMemberDescription); } void startMemberDeclaration() diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 7fcfbb3..9a6f549 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -1626,7 +1626,7 @@ void RTFGenerator::endDescItem() newParagraph(); } -void RTFGenerator::startMemberDescription(const char *,const char *) +void RTFGenerator::startMemberDescription(const char *,const char *,bool) { DBG_RTF(t << "{\\comment (startMemberDescription)}" << endl) t << "{" << endl; diff --git a/src/rtfgen.h b/src/rtfgen.h index d8f6ca7..1eb7db0 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -103,7 +103,7 @@ class RTFGenerator : public OutputGenerator void endMemberSections() {} void startHeaderSection() {} void endHeaderSection() {} - void startMemberHeader(const char *) { startGroupHeader(FALSE); } + void startMemberHeader(const char *,int) { startGroupHeader(FALSE); } void endMemberHeader() { endGroupHeader(FALSE); } void startMemberSubtitle(); void endMemberSubtitle(); @@ -120,6 +120,7 @@ class RTFGenerator : public OutputGenerator void startMemberTemplateParams() {} void endMemberTemplateParams(const char *,const char *) {} void insertMemberAlign(bool) {} + void insertMemberAlignLeft(int,bool){} void writeRuler() { rtfwriteRuler_thin(); } @@ -156,7 +157,7 @@ class RTFGenerator : public OutputGenerator void startSmall() { t << "{\\sub "; } void endSmall() { t << "}"; } - void startMemberDescription(const char *,const char *); + void startMemberDescription(const char *,const char *,bool); void endMemberDescription(); void startMemberDeclaration() {} void endMemberDeclaration(const char *,const char *) {} diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index dcf7f42..6625d16 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -2096,19 +2096,21 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol, writeLink(mdef,ol); ol.docify(" "); - ol.insertMemberAlign(); if (mm==VhdlDocGen::GENERIC) { + ol.insertMemberAlign(); ol.startBold(); VhdlDocGen::formatString(largs,ol,mdef); ol.endBold(); } else { + ol.insertMemberAlignLeft(isAnonymous, false); ol.docify(" "); ol.startBold(); VhdlDocGen::formatString(ltype,ol,mdef); ol.endBold(); + ol.insertMemberAlign(); ol.docify(" "); VhdlDocGen::formatString(largs,ol,mdef); } @@ -2263,11 +2265,11 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol, ol.endMemberItem(); if (!mdef->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC) /* && !annMemb */) { - QCString s=mdef->briefDescription(); - ol.startMemberDescription(mdef->anchor()); + QCString s=mdef->briefDescription(); + ol.startMemberDescription(mdef->anchor(), NULL, mm == VhdlDocGen::PORT); ol.generateDoc(mdef->briefFile(),mdef->briefLine(), - mdef->getOuterScope()?mdef->getOuterScope():d, - mdef,s.data(),TRUE,FALSE,0,TRUE,FALSE); + mdef->getOuterScope()?mdef->getOuterScope():d, + mdef,s.data(),TRUE,FALSE,0,TRUE,FALSE); if (detailsVisible) { ol.pushGeneratorState(); @@ -2364,7 +2366,7 @@ void VhdlDocGen::writeVHDLDeclarations(MemberList* ml,OutputList &ol, if (title) { - ol.startMemberHeader(title); + ol.startMemberHeader(title,type == VhdlDocGen::PORT ? 3 : 2); ol.parseText(title); ol.endMemberHeader(); ol.docify(" "); |