diff options
-rw-r--r-- | src/classdef.cpp | 4 | ||||
-rw-r--r-- | src/htmlgen.cpp | 21 | ||||
-rw-r--r-- | src/htmlgen.h | 7 | ||||
-rw-r--r-- | src/latexgen.cpp | 14 | ||||
-rw-r--r-- | src/latexgen.h | 4 | ||||
-rw-r--r-- | src/mangen.cpp | 25 | ||||
-rw-r--r-- | src/mangen.h | 9 | ||||
-rw-r--r-- | src/memberdef.cpp | 21 | ||||
-rw-r--r-- | src/outputgen.h | 8 | ||||
-rw-r--r-- | src/outputlist.h | 9 | ||||
-rw-r--r-- | src/rtfgen.cpp | 17 | ||||
-rw-r--r-- | src/rtfgen.h | 4 | ||||
-rw-r--r-- | templates/html/doxygen.css | 10 |
13 files changed, 62 insertions, 91 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index 657968e..1d72073 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1013,13 +1013,13 @@ void ClassDef::writeDetailedDocumentationBody(OutputList &ol) // write examples if (hasExamples() && m_impl->exampleSDict) { - ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": "); + ol.startExamples(); ol.startDescForItem(); //ol.startParagraph(); writeExample(ol,m_impl->exampleSDict); //ol.endParagraph(); ol.endDescForItem(); - ol.endSimpleSect(); + ol.endExamples(); } //ol.newParagraph(); writeSourceDef(ol,name()); diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 87bc10a..ee23fb8 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1943,25 +1943,16 @@ void HtmlGenerator::endDescTableData() t << "</td>"; } -void HtmlGenerator::startSimpleSect(SectionTypes, - const char *filename,const char *anchor, - const char *title) +void HtmlGenerator::startExamples() { - t << "<dl><dt><b>"; - if (filename) - { - writeObjectLink(0,filename,anchor,title); - } - else - { - docify(title); - } - t << "</b></dt>"; + t << "<dl class=\"section examples\"><dt>"; + docify(theTranslator->trExamples()); + t << "</dt>"; } -void HtmlGenerator::endSimpleSect() +void HtmlGenerator::endExamples() { - t << "</dl>"; + t << "</dl>" << endl; } void HtmlGenerator::startParamList(ParamListTypes, diff --git a/src/htmlgen.h b/src/htmlgen.h index 2d8d6e0..221269f 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -246,13 +246,10 @@ class HtmlGenerator : public OutputGenerator void endCenter() { t << "</center>" << endl; } void startSmall() { t << "<small>" << endl; } void endSmall() { t << "</small>" << endl; } - //void startDescList(SectionTypes) { t << "<dl compact><dt><b>" << endl; } - //void endDescList() { t << "</dl>"; } - void startSimpleSect(SectionTypes,const char *,const char *,const char *); - void endSimpleSect(); + void startExamples(); + void endExamples(); void startParamList(ParamListTypes,const char *); void endParamList(); - //void writeDescItem() { t << "<dd>" << endl; } void startSection(const char *,const char *,SectionInfo::SectionType); void endSection(const char *,SectionInfo::SectionType); void addIndexItem(const char *,const char *); diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 474d368..204683e 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -2095,22 +2095,14 @@ void LatexGenerator::endDescItem() } } -void LatexGenerator::startSimpleSect(SectionTypes,const char *file, - const char *anchor,const char *title) +void LatexGenerator::startExamples() { t << "\\begin{Desc}\n\\item["; - if (file) - { - writeObjectLink(0,file,anchor,title); - } - else - { - docify(title); - } + docify(theTranslator->trExamples()); t << "]"; } -void LatexGenerator::endSimpleSect() +void LatexGenerator::endExamples() { t << "\\end{Desc}" << endl; } diff --git a/src/latexgen.h b/src/latexgen.h index 07c4080..1460000 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -235,8 +235,8 @@ class LatexGenerator : public OutputGenerator const char *,const char *,const char *) {} void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; } void endDescList() { t << "\\end{Desc}" << endl; } - void startSimpleSect(SectionTypes,const char *,const char *,const char *); - void endSimpleSect(); + void startExamples(); + void endExamples(); void startParamList(ParamListTypes,const char *title); void endParamList(); void startDescForItem() { t << "\\par" << endl; } diff --git a/src/mangen.cpp b/src/mangen.cpp index d23b2fe..2a10db6 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -650,8 +650,25 @@ void ManGenerator::endSection(const char *,SectionInfo::SectionType type) } } -void ManGenerator::startSimpleSect(SectionTypes,const char *, - const char *,const char *title) +void ManGenerator::startExamples() +{ + if (!firstCol) + { t << endl << ".PP" << endl; + firstCol=TRUE; paragraph=TRUE; + col=0; + } + paragraph=FALSE; + startBold(); + docify(theTranslator->trExamples()); + endBold(); + paragraph=TRUE; +} + +void ManGenerator::endExamples() +{ +} + +void ManGenerator::startDescTable(const char *title) { if (!firstCol) { t << endl << ".PP" << endl; @@ -663,10 +680,12 @@ void ManGenerator::startSimpleSect(SectionTypes,const char *, docify(title); endBold(); paragraph=TRUE; + startDescForItem(); } -void ManGenerator::endSimpleSect() +void ManGenerator::endDescTable() { + endDescForItem(); } void ManGenerator::startParamList(ParamListTypes,const char *title) diff --git a/src/mangen.h b/src/mangen.h index 0413ffd..e109355 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -169,8 +169,8 @@ class ManGenerator : public OutputGenerator const char *,const char *,const char *) {} void startDescList(SectionTypes); void endDescList() {} - void startSimpleSect(SectionTypes,const char *,const char *,const char *); - void endSimpleSect(); + void startExamples(); + void endExamples(); void startParamList(ParamListTypes,const char *title); void endParamList(); //void writeDescItem(); @@ -197,9 +197,8 @@ class ManGenerator : public OutputGenerator void endContents() {} void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) t << " "; } - void startDescTable(const char *t) - { startSimpleSect(EnumValues,0,0,t); startDescForItem(); } - void endDescTable() { endDescForItem(); endSimpleSect(); } + void startDescTable(const char *t); + void endDescTable(); void startDescTableRow() {} void endDescTableRow() {} void startDescTableTitle() { startItemListItem(); startBold(); startEmphasis(); endItemListItem(); } diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 819904f..c9745ac 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -2309,11 +2309,11 @@ void MemberDef::_writeExamples(OutputList &ol) // write the list of examples that use this member if (hasExamples()) { - ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": "); + ol.startExamples(); ol.startDescForItem(); writeExample(ol,m_impl->exampleSDict); ol.endDescForItem(); - ol.endSimpleSect(); + ol.endExamples(); } } @@ -2346,8 +2346,6 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container, { if (first) { - //ol.startSimpleSect(BaseOutputDocInterface::EnumValues,0,0,theTranslator->trEnumerationValues()+": "); - //ol.startDescForItem(); ol.startDescTable(theTranslator->trEnumerationValues()); } @@ -2355,28 +2353,17 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container, ol.addIndexItem(fmd->name(),ciname); ol.addIndexItem(ciname,fmd->name()); - //Doxygen::indexList->addIndexItem( - // ciname, // level1 - // fmd->name(), // level2 - // separateMemPages ? cfname : cfiname, // contRef - // cfname, // memRef - // fmd->anchor(), // anchor - // fmd); // memberdef Doxygen::indexList->addIndexItem(container,fmd); - //ol.writeListItem(); ol.startDescTableTitle(); ol.startDoxyAnchor(cfname,cname,fmd->anchor(),fmd->name(),fmd->argsString()); first=FALSE; - //ol.startEmphasis(); ol.docify(fmd->name()); - //ol.endEmphasis(); ol.disableAllBut(OutputGenerator::Man); ol.writeString(" "); ol.enableAll(); ol.endDoxyAnchor(cfname,fmd->anchor()); ol.endDescTableTitle(); - //ol.newParagraph(); ol.startDescTableData(); bool hasBrief = !fmd->briefDescription().isEmpty(); @@ -2407,11 +2394,7 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container, } if (!first) { - //ol.endItemList(); ol.endDescTable(); - //ol.endDescForItem(); - //ol.endSimpleSect(); - //ol.writeChar('\n'); } } } diff --git a/src/outputgen.h b/src/outputgen.h index 44d34b8..9935bd9 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -145,7 +145,8 @@ class BaseOutputDocInterface : public CodeOutputInterface Since, Date, Bug, Note, Warning, Par, Deprecated, Pre, Post, Invar, Remark, Attention, - Todo, Test, RCS, */ EnumValues, + Todo, Test, RCS, */ + EnumValues, Examples }; @@ -279,9 +280,8 @@ class BaseOutputDocInterface : public CodeOutputInterface virtual void startSmall() = 0; virtual void endSmall() = 0; - virtual void startSimpleSect(SectionTypes t,const char *file, - const char *anchor,const char *title) = 0; - virtual void endSimpleSect() = 0; + virtual void startExamples() = 0; + virtual void endExamples() = 0; virtual void startParamList(ParamListTypes t,const char *title) = 0; virtual void endParamList() = 0; diff --git a/src/outputlist.h b/src/outputlist.h index 2e89101..5fd8017 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -321,11 +321,10 @@ class OutputList : public OutputDocInterface const char *title,const char *name) { forall(&OutputGenerator::writeInheritedSectionTitle,id,ref, file,anchor,title,name); } - void startSimpleSect(SectionTypes t,const char *file,const char *anchor, - const char *title) - { forall(&OutputGenerator::startSimpleSect,t,file,anchor,title); } - void endSimpleSect() - { forall(&OutputGenerator::endSimpleSect); } + void startExamples() + { forall(&OutputGenerator::startExamples); } + void endExamples() + { forall(&OutputGenerator::endExamples); } void startParamList(ParamListTypes t,const char *title) { forall(&OutputGenerator::startParamList,t,title); } void endParamList() diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 64da929..e2de5ab 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -2727,21 +2727,14 @@ void RTFGenerator::endMemberGroup(bool hasHeader) t << "}"; } -void RTFGenerator::startSimpleSect(SectionTypes,const char *file,const char *anchor,const char *title) +void RTFGenerator::startExamples() { - DBG_RTF(t << "{\\comment (startSimpleSect)}" << endl) + DBG_RTF(t << "{\\comment (startExamples)}" << endl) t << "{"; // ends at endDescList t << "{"; // ends at endDescTitle startBold(); newParagraph(); - if (file) - { - writeObjectLink(0,file,anchor,title); - } - else - { - docify(title); - } + docify(theTranslator->trExamples()); endBold(); t << "}"; newParagraph(); @@ -2749,9 +2742,9 @@ void RTFGenerator::startSimpleSect(SectionTypes,const char *file,const char *anc t << rtf_Style_Reset << rtf_DList_DepthStyle(); } -void RTFGenerator::endSimpleSect() +void RTFGenerator::endExamples() { - DBG_RTF(t << "{\\comment (endSimpleSect)}" << endl) + DBG_RTF(t << "{\\comment (endExamples)}" << endl) m_omitParagraph = FALSE; newParagraph(); decrementIndentLevel(); diff --git a/src/rtfgen.h b/src/rtfgen.h index bb3146a..b6b32c7 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -164,8 +164,8 @@ class RTFGenerator : public OutputGenerator void writeInheritedSectionTitle(const char *,const char *,const char *, const char *,const char *,const char *) {} void startDescList(SectionTypes); - void startSimpleSect(SectionTypes,const char *,const char *,const char *); - void endSimpleSect(); + void startExamples(); + void endExamples(); void startParamList(ParamListTypes,const char *); void endParamList(); //void writeDescItem(); diff --git a/templates/html/doxygen.css b/templates/html/doxygen.css index 8e87381..4d9d168 100644 --- a/templates/html/doxygen.css +++ b/templates/html/doxygen.css @@ -1112,14 +1112,12 @@ div.headertitle direction: rtl; } -dl -{ - padding: 0 0 0 10px; +dl { + padding: 0 0 0 0; } -/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ -dl.section -{ +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { margin-left: 0px; padding-left: 0px; } |